decocms 4.589.0 → 4.590.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-k-5O6cw_.js → AlertCircle-BnQtMv-6.js} +1 -1
- package/dist/client/assets/{AreaChart-BbBmBhmZ.js → AreaChart-BFvJqucg.js} +1 -1
- package/dist/client/assets/{ArrowLeft-ClkcoIX4.js → ArrowLeft-BaPACAT6.js} +1 -1
- package/dist/client/assets/{ArrowRight-D62IR3mi.js → ArrowRight-B6k-K36Y.js} +1 -1
- package/dist/client/assets/{ArrowUp-DwmUsoz4.js → ArrowUp-C35HRuh8.js} +1 -1
- package/dist/client/assets/{BookOpen01-BtddYmqo.js → BookOpen01-BBHItx8D.js} +1 -1
- package/dist/client/assets/{CartesianChart-6ds2d44w.js → CartesianChart-CEwsOHQl.js} +1 -1
- package/dist/client/assets/{CategoricalChart-B61TvcyO.js → CategoricalChart-sm4gMY1U.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cp5xjlw-.js → CheckCircle-D3oahVjf.js} +1 -1
- package/dist/client/assets/{ChevronDown-CM9Urfsd.js → ChevronDown-oMNLbXnE.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-r9NWov70.js → ChevronSelectorVertical-JDvFsHfa.js} +1 -1
- package/dist/client/assets/{ChevronUp--3SHAUXV.js → ChevronUp-CnSV4M8U.js} +1 -1
- package/dist/client/assets/{CreditCard01-DVqX0918.js → CreditCard01-Ccu0AHIU.js} +1 -1
- package/dist/client/assets/{Eye-BoqAJmT6.js → Eye-CM3r7Lc0.js} +1 -1
- package/dist/client/assets/{File02-Dh6SOo4d.js → File02-CGMGUXNh.js} +1 -1
- package/dist/client/assets/{Fingerprint04-YAruy68-.js → Fingerprint04-DlOOSeVV.js} +1 -1
- package/dist/client/assets/{Globe04-DYHS72xm.js → Globe04-CadxKfGo.js} +1 -1
- package/dist/client/assets/{Image01-RSPET2Po.js → Image01-yGsYZn_M.js} +1 -1
- package/dist/client/assets/{Key01-L7povfCu.js → Key01-o2p-fC8F.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CUvx-Pvw.js → LayoutLeft-ABvNYnMK.js} +1 -1
- package/dist/client/assets/{LinkBroken01-JVhKBnEM.js → LinkBroken01-BNnH_0o8.js} +1 -1
- package/dist/client/assets/{MessageCircle01-gn4vp2uo.js → MessageCircle01-B_wmc40j.js} +1 -1
- package/dist/client/assets/{Minus-DN5eCgUQ.js → Minus-D24RR21t.js} +1 -1
- package/dist/client/assets/{Monitor01-D0Bxj-fe.js → Monitor01-CTcQUr7O.js} +1 -1
- package/dist/client/assets/{Play-7916CrEc.js → Play-Dp9OCgp7.js} +1 -1
- package/dist/client/assets/{Plus-DA5fCRCT.js → Plus-Ddk6N9HC.js} +1 -1
- package/dist/client/assets/{ReferenceLine-BiUIpSso.js → ReferenceLine-CvdHuCvD.js} +1 -1
- package/dist/client/assets/{SearchMd-BPdzWKZu.js → SearchMd-BtXOa7zE.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-BhOTMWsh.js → ShoppingBag01-qjotM8IV.js} +1 -1
- package/dist/client/assets/{Sun-CcLmZkDa.js → Sun-CMPOAIdJ.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-KL7mZ6la.js → SwitchHorizontal01-BUKYENMh.js} +1 -1
- package/dist/client/assets/{Tool01-x-P519mQ.js → Tool01-Bv4FMBZp.js} +1 -1
- package/dist/client/assets/{Tooltip-Djlyj-LN.js → Tooltip-Cxqr6-jH.js} +1 -1
- package/dist/client/assets/{Trash01-q67Vms6R.js → Trash01-80eAwkc0.js} +1 -1
- package/dist/client/assets/{TrendUp01-CXnsnsUU.js → TrendUp01-BrrkE7E_.js} +1 -1
- package/dist/client/assets/{Upload01-BUC8UUt4.js → Upload01-UOcn4lGi.js} +1 -1
- package/dist/client/assets/{UserCheck01-BxAZblZb.js → UserCheck01-DN2Xe4KS.js} +1 -1
- package/dist/client/assets/{UserSquare-2uLtK5zL.js → UserSquare-BtfMcBLx.js} +1 -1
- package/dist/client/assets/{Users01-GuAUZTSm.js → Users01-Br2fxu8y.js} +1 -1
- package/dist/client/assets/{XClose-BKbw2IM5.js → XClose-CB1ghrVZ.js} +1 -1
- package/dist/client/assets/{Zap-iZQqC26K.js → Zap-CcWl9VU4.js} +1 -1
- package/dist/client/assets/{access-gate-DNdYk1Lk.js → access-gate-BG_Vluxs.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BgsYTqB2.js → add-connection-dialog-DUqMIES3.js} +1 -1
- package/dist/client/assets/agent-app-Crvty8rD.js +1 -0
- package/dist/client/assets/{agent-assets-BlAA6Ea3.js → agent-assets-BxEewqof.js} +1 -1
- package/dist/client/assets/{agent-automation-WLxLTpF2.js → agent-automation-Bxc0_t38.js} +1 -1
- package/dist/client/assets/{agent-automations-Q5qlgn-x.js → agent-automations-CuzC1Pg-.js} +1 -1
- package/dist/client/assets/{agent-blog-DlTYvL9l.js → agent-blog-DsMAMUWr.js} +2 -2
- package/dist/client/assets/{agent-blog-post-CYSXcL8b.js → agent-blog-post-xH-M15YM.js} +2 -2
- package/dist/client/assets/{agent-calendar-CmW3YOqH.js → agent-calendar-D_xzD340.js} +1 -1
- package/dist/client/assets/{agent-capabilities-B_vVx4Z2.js → agent-capabilities-Drz4JIuP.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CMaIt_p4.js → agent-connect-sources-v4DDDepk.js} +1 -1
- package/dist/client/assets/agent-deck-x_BFx9mm.js +1 -0
- package/dist/client/assets/{agent-e2e-D9ABwflY.js → agent-e2e-DT7lzu67.js} +1 -1
- package/dist/client/assets/agent-experiments-Dcg8SFP9.js +1 -0
- package/dist/client/assets/agent-file-DvP-VTF_.js +1 -0
- package/dist/client/assets/{agent-hosting-D1Xn3qWe.js → agent-hosting-CZppmVHD.js} +1 -1
- package/dist/client/assets/{agent-icon-1xBXRQD0.js → agent-icon-Bb60OQqy.js} +1 -1
- package/dist/client/assets/agent-library-BdAwCbak.js +1 -0
- package/dist/client/assets/agent-library-file-Dli1Sfjo.js +1 -0
- package/dist/client/assets/agent-overview-_eHSb7rP.js +1 -0
- package/dist/client/assets/{agent-releases-CvessDoS.js → agent-releases-BkLYszch.js} +1 -1
- package/dist/client/assets/agent-settings-D1Crj0wd.js +1 -0
- package/dist/client/assets/agent-site-editor-code-C4_FRqxA.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DmUmmFvr.js +1 -0
- package/dist/client/assets/{agent-site-editor-DaA9FbZT.js → agent-site-editor-ifnmc9UF.js} +1 -1
- package/dist/client/assets/agent-site-editor-preview-oo4XbzjC.js +1 -0
- package/dist/client/assets/agent-view-DfviYLXB.js +1 -0
- package/dist/client/assets/{agent-view-guard-DtzAtZkl.js → agent-view-guard-C8bzF7Ur.js} +1 -1
- package/dist/client/assets/{ai-providers-D_nS8tyt.js → ai-providers-CafbVEa3.js} +1 -1
- package/dist/client/assets/{alert-BKTlpEuH.js → alert-BkQxiJJc.js} +1 -1
- package/dist/client/assets/{analytics-sections-CHwF2OJ5.js → analytics-sections-BZlYvRSx.js} +1 -1
- package/dist/client/assets/api-keys-CRKNa0nm.js +1 -0
- package/dist/client/assets/{api-keys-nye037OF.js → api-keys-Du53SjFg.js} +1 -1
- package/dist/client/assets/{app-editor-DIR7u1uj.js → app-editor-NtIQFU1q.js} +1 -1
- package/dist/client/assets/{asset-utils-EHKoLUwI.js → asset-utils-Ck6gXM1c.js} +1 -1
- package/dist/client/assets/{auth-n3l0CNa5.js → auth-bTf5wb-E.js} +1 -1
- package/dist/client/assets/{auth-catchall-B1hTDp3D.js → auth-catchall-DeGKGMLZ.js} +1 -1
- package/dist/client/assets/{auth-entry-C9-pIDNg.js → auth-entry-BwN53CDF.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BDghObzj.js → auth-split-layout-Bq_SBGGp.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-wfBLEPa1.js → authenticate-and-persist-oauth-Cx82RI9F.js} +1 -1
- package/dist/client/assets/{automation-list-row-BaFEU26i.js → automation-list-row-Cnq_iQ5F.js} +1 -1
- package/dist/client/assets/{automation-runs-R-XY-5Gf.js → automation-runs-BBeQsAZx.js} +1 -1
- package/dist/client/assets/{automations-DA4CRapY.js → automations-BQV70_nU.js} +1 -1
- package/dist/client/assets/{badge-qzONP_je.js → badge-Cijqz4Jj.js} +1 -1
- package/dist/client/assets/{block-document-3MwcWTqG.js → block-document-DxVP6l72.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-Cx1-vnp6.js → blocks-preview-workspace-context-DgWX7w85.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BzmLdpJn.js → blocks-tab-states-CWN4a32i.js} +1 -1
- package/dist/client/assets/{blog-preview-url--XUf7gOW.js → blog-preview-url-Ch1IaZzv.js} +1 -1
- package/dist/client/assets/{blog-schema-nE0twzgM.js → blog-schema-D5YUVf9X.js} +1 -1
- package/dist/client/assets/{blog-source-gate-DqoOOI_M.js → blog-source-gate-D3Q6V64K.js} +1 -1
- package/dist/client/assets/{blog-view-gate-BJcOSjYL.js → blog-view-gate-DZ71o69o.js} +1 -1
- package/dist/client/assets/{buckets-uZt9g5Bq.js → buckets-elJT8-o4.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-CgWoBsJ9.js → build-improve-prompt-doc-D11mKWJD.js} +1 -1
- package/dist/client/assets/{calendar-Dpmy4fF4.js → calendar-Nh0wEr4E.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cdh5jEwj.js → capability-load-error-CuTvP4ve.js} +1 -1
- package/dist/client/assets/{category-editor-Dwd3B69y.js → category-editor-BjGfycSn.js} +1 -1
- package/dist/client/assets/{category-tree-BhvPvvoc.js → category-tree-9gbzl7w5.js} +1 -1
- package/dist/client/assets/{chart-DrWDD8lq.js → chart-Ca85mJBX.js} +1 -1
- package/dist/client/assets/{chat-context-SiB3iaPb.js → chat-context-BblIzbHl.js} +1 -1
- package/dist/client/assets/{chat-draft-DZb5RXeg.js → chat-draft-D-2WhfQ7.js} +1 -1
- package/dist/client/assets/{checkbox-2zvTb6ww.js → checkbox-Bw8jVRUO.js} +1 -1
- package/dist/client/assets/{choose-editor-CNWQv99A.js → choose-editor-D_Hr7lgd.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BLj0fm2s.js → cli-auth-success-Dh5FmHmQ.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-C5EiL7JE.js → cms-settings-editor-CbcPK8uZ.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-OgnJq3xE.js → cms-store-drafts-OoxhJlmN.js} +1 -1
- package/dist/client/assets/{collapsible-CGEFlpDq.js → collapsible-DVkadhrk.js} +1 -1
- package/dist/client/assets/{collection-detail-PIXIFFSE.js → collection-detail-Dg8a6sAQ.js} +1 -1
- package/dist/client/assets/{collection-display-button-B1Sy-opz.js → collection-display-button-BzU8QWMv.js} +1 -1
- package/dist/client/assets/{collection-search-OTIoM0sQ.js → collection-search-BfC9V3B5.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-AbpEjmrL.js → collection-table-wrapper-CoXuxpvr.js} +1 -1
- package/dist/client/assets/{collection-tabs-CeLcBMHA.js → collection-tabs-jYS5VNg0.js} +1 -1
- package/dist/client/assets/{combobox-Cb2ClVLj.js → combobox-B9byh_rI.js} +1 -1
- package/dist/client/assets/{command-n87yBV6H.js → command-BILmufwY.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-DNJp1Z4x.js → companion-mcps-section-xvtAJ8l8.js} +1 -1
- package/dist/client/assets/{config-3CnG3YfD.js → config-W1-Afca-.js} +1 -1
- package/dist/client/assets/{connect-B3H39Rc5.js → connect-8IbHL35B.js} +1 -1
- package/dist/client/assets/{connect-key-CK5GMVlb.js → connect-key-BnHdjifo.js} +1 -1
- package/dist/client/assets/{connect-layout-BlNkHf40.js → connect-layout-BftBQduN.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B5QdFSKj.js → connect-source-dialog-CLxzDfXB.js} +1 -1
- package/dist/client/assets/{connection-D7qO0DS_.js → connection-BhGzuPX2.js} +1 -1
- package/dist/client/assets/{connection-card-DLq506jh.js → connection-card-BfEYIPuv.js} +1 -1
- package/dist/client/assets/{connection-detail-Cb8cn8w5.js → connection-detail-C1Zx_ZV3.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DgyNgCMk.js → connection-form-helpers-D7MAs32l.js} +1 -1
- package/dist/client/assets/{connection-slug-Cz4zCQv8.js → connection-slug-Bg2RO1JO.js} +1 -1
- package/dist/client/assets/{connections-D91ZFGMn.js → connections-Cd-GkQj8.js} +1 -1
- package/dist/client/assets/{content-tab-BxFhj1WZ.js → content-tab-B7Z-ZwZm.js} +3 -3
- package/dist/client/assets/{context-CajYEf8N.js → context-E10IwcN8.js} +1 -1
- package/dist/client/assets/{context-menu-h7MPYNV3.js → context-menu-B2Eostc0.js} +1 -1
- package/dist/client/assets/{context-shell-DflkpwUC.js → context-shell-DcaR1gSy.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Dhpldq4f.js → create-organization-dialog-C8zAOeBR.js} +1 -1
- package/dist/client/assets/{daily-pulse-nXUPyJMF.js → daily-pulse-V-Bjh0qd.js} +1 -1
- package/dist/client/assets/{delete-copy-We0skK0X.js → delete-copy-DJyAy8ar.js} +1 -1
- package/dist/client/assets/{device-hint-DOcsqBNG.js → device-hint-3ZLSxYF2.js} +1 -1
- package/dist/client/assets/{discover-sj6esNit.js → discover-U2xabNF1.js} +1 -1
- package/dist/client/assets/{domain-settings-DxSVKJuS.js → domain-settings-D4t8nzRJ.js} +1 -1
- package/dist/client/assets/{drawer-CHLTZ7IE.js → drawer-BT7wyGDM.js} +1 -1
- package/dist/client/assets/{editor-BSfFsGxN.js → editor-DW9kUMx-.js} +1 -1
- package/dist/client/assets/{editor-classes-BFc0AEgj.js → editor-classes-DyCyN4Yb.js} +1 -1
- package/dist/client/assets/{empty-message-BCpAqPWS.js → empty-message-D0FcHIp-.js} +1 -1
- package/dist/client/assets/{empty-state-XftlsSWz.js → empty-state-BzcN4cK6.js} +1 -1
- package/dist/client/assets/{empty-state-B8oDHUMl.js → empty-state-VNSIpAPt.js} +1 -1
- package/dist/client/assets/experiments-tab-choice-9YuWrNVT.js +1 -0
- package/dist/client/assets/{extract-connection-data-DlPXjE5Z.js → extract-connection-data-mPCrg_mv.js} +1 -1
- package/dist/client/assets/{feature-gate-Dz2idXk1.js → feature-gate-kx8MVIuD.js} +1 -1
- package/dist/client/assets/{feature-paywall-QNpgcQyq.js → feature-paywall-CHhIbNt9.js} +1 -1
- package/dist/client/assets/{file-explorer-SBkm6OaE.js → file-explorer-cEpG9HWa.js} +1 -1
- package/dist/client/assets/{file-preview-e5Po0Lnn.js → file-preview-Cpsu8GE_.js} +1 -1
- package/dist/client/assets/{file-share-button-DLIUfXlB.js → file-share-button-DlNxarYB.js} +1 -1
- package/dist/client/assets/{file-type-icon-DHed-Vbt.js → file-type-icon-C21pqavl.js} +1 -1
- package/dist/client/assets/{folder-icon-BmyxaPeT.js → folder-icon-wTenP-dd.js} +1 -1
- package/dist/client/assets/{form-tdA5bJ97.js → form-Az8scIog.js} +1 -1
- package/dist/client/assets/{frame-navigation-DJad9YsZ.js → frame-navigation-jkPdn-UI.js} +1 -1
- package/dist/client/assets/{gateway-client-MCgSJtiT.js → gateway-client-Cu1gfZuC.js} +1 -1
- package/dist/client/assets/{general-Dq2SfvLf.js → general-YA-atlwF.js} +1 -1
- package/dist/client/assets/{github-icon-BSdAKSFL.js → github-icon-kwRWOaF5.js} +1 -1
- package/dist/client/assets/{held-block-view-DMqKyknK.js → held-block-view-By_IAIkt.js} +1 -1
- package/dist/client/assets/{home-Dj3ETwz3.js → home-DK_QlbbU.js} +1 -1
- package/dist/client/assets/{home-overview-DxRzuH3P.js → home-overview-IjCn-_Kw.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-BP447g5V.js → hosted-reconcile-BGEvvvm6.js} +1 -1
- package/dist/client/assets/{icon-button-B1n86T_T.js → icon-button-V7s_uXMP.js} +1 -1
- package/dist/client/assets/{index-DdcMEgo_.js → index-BD6izHNL.js} +1 -1
- package/dist/client/assets/{index-DeDZf8GV.js → index-BtmfoALY.js} +1 -1
- package/dist/client/assets/{index-8J9eeoYX.js → index-C0EGsq0B.js} +1 -1
- package/dist/client/assets/{index-DxMUaH8f.js → index-C42mXKK8.js} +1 -1
- package/dist/client/assets/{index-CDbo40Qi.js → index-C8hvJwQ_.js} +1 -1
- package/dist/client/assets/{index-Cv404MWT.js → index-CI2JqeSm.js} +1 -1
- package/dist/client/assets/{index-C7mH2s-5.css → index-CJ1UTTEL.css} +1 -1
- package/dist/client/assets/{index-DYBVGhf3.js → index-CXLaxoLv.js} +1 -1
- package/dist/client/assets/{index-_v_cX_Uz.js → index-DE4EwBpT.js} +5 -5
- package/dist/client/assets/{index-CO8P4I1E.js → index-DEZGjjdV.js} +1 -1
- package/dist/client/assets/{index-zfbeX5vo.js → index-DFnZwjzs.js} +1 -1
- package/dist/client/assets/{index-BpQKQj0d.js → index-DYLIykFV.js} +1 -1
- package/dist/client/assets/{index-D4QMDMQB.js → index-DbyEMbZz.js} +1 -1
- package/dist/client/assets/{index-B9Qj8_a8.js → index-DcHP5YSH.js} +1 -1
- package/dist/client/assets/{index-DBEc0hp1.js → index-Dm4nPCgm.js} +1 -1
- package/dist/client/assets/{index-I4vIjLyL.js → index-DuY7zOzF.js} +1 -1
- package/dist/client/assets/{index-Gg8ZNrTJ.js → index-DyM5AzdY.js} +1 -1
- package/dist/client/assets/{index-CZRVgAXr.js → index-nusrRkOz.js} +1 -1
- package/dist/client/assets/{index-redirect-CbBr1BrP.js → index-redirect-NiwwTqMM.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-BjuIdZaK.js → infiniteQueryObserver-LrD5u9jC.js} +1 -1
- package/dist/client/assets/{infra-billing-BggUjndl.js → infra-billing-DNxBnvAp.js} +1 -1
- package/dist/client/assets/{input-rwnUX4xK.js → input-BYejQq0G.js} +1 -1
- package/dist/client/assets/{input-DVGC51NU.js → input-BhSVLI5K.js} +3 -3
- package/dist/client/assets/{integration-icon-DMudGnaH.js → integration-icon-C6k67Exr.js} +1 -1
- package/dist/client/assets/{item-actions-CXcqqG2O.js → item-actions-2t__jYIF.js} +1 -1
- package/dist/client/assets/{jira-icon-Cs0wA4Aj.js → jira-icon-BSRAdw8u.js} +1 -1
- package/dist/client/assets/{label-BPobXy5D.js → label-C1M7dYk7.js} +1 -1
- package/dist/client/assets/{layout-Haof-3fN.js → layout-99M1vA7t.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DR6IgoHi.js → legacy-admin-welcome-dialog-BoopffMy.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-BhViZxi4.js → legacy-agents-deep-CLFMaYwa.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BRcPtkE0.js → legacy-main-redirect-Bq6AqFoC.js} +1 -1
- package/dist/client/assets/library-C9GYUsX6.js +1 -0
- package/dist/client/assets/{library-tab-BXZW9Gf-.js → library-tab-Cy4cNn3F.js} +1 -1
- package/dist/client/assets/{login-DEJdToWz.js → login-Cty3LiRR.js} +1 -1
- package/dist/client/assets/{markdown-6Y7kRU0S.js → markdown-kakam2DO.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-DRWpmXqd.js → mcp-app-renderer-BIHkoYuf.js} +1 -1
- package/dist/client/assets/{mcp-oauth-dNTY3RLT.js → mcp-oauth-BUqr_G63.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CuTkV8Yh.js → mcp-oauth-WM79t5hP.js} +1 -1
- package/dist/client/assets/{members-r4o9r9rq.js → members-C14M0bx4.js} +1 -1
- package/dist/client/assets/{memory-DJveej8e.js → memory-G_vRBCa7.js} +1 -1
- package/dist/client/assets/{mock-board-BfAvxuuB.js → mock-board-h_S7u7gp.js} +3 -3
- package/dist/client/assets/{monaco-editor-DVnCrHXl.js → monaco-editor-DdBrm4wR.js} +1 -1
- package/dist/client/assets/monitoring-BHHHbvtC.js +2 -0
- package/dist/client/assets/{monitoring-stats-row--t2gmwDv.js → monitoring-stats-row-DG-o8ugE.js} +1 -1
- package/dist/client/assets/{multi-select-C4pEiex-.js → multi-select-CqOUeGWs.js} +1 -1
- package/dist/client/assets/{mustache-BJxqarwP.js → mustache-DIJrigfF.js} +1 -1
- package/dist/client/assets/{named-rule-step-CeWd1q2n.js → named-rule-step-DVe_UEzD.js} +1 -1
- package/dist/client/assets/{named-rule-view-B-FR02zc.js → named-rule-view-CAcF_K5b.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BF76iYqU.js → new-project-dialog-DjcvLRMU.js} +1 -1
- package/dist/client/assets/{new-project-store-DWxCJQOo.js → new-project-store-B0mK3YqV.js} +1 -1
- package/dist/client/assets/{oauth-callback-DTZ86bL8.js → oauth-callback-CEou5Snp.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DuXQBSEx.js → oauth-callback-ai-provider-DYzpe7R7.js} +1 -1
- package/dist/client/assets/{oauth-consent-_PYevD-4.js → oauth-consent-CdQCuT-w.js} +1 -1
- package/dist/client/assets/{onboarding-Dv4c0ulx.js → onboarding-BIuSCbza.js} +1 -1
- package/dist/client/assets/{openai-conversation-Ccmhy4PF.js → openai-conversation-CjvZy9Lo.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-ChxB21rZ.js → optimistic-project-sidebar-views-DxcK3dzF.js} +1 -1
- package/dist/client/assets/{order-monitor-day-Dz2wZyUQ.js → order-monitor-day-Bh8qxOYF.js} +1 -1
- package/dist/client/assets/{organization-choice-Doar8yJk.js → organization-choice-BFDf68QE.js} +1 -1
- package/dist/client/assets/{orgs-Du522J0-.js → orgs-BYKEF4BU.js} +1 -1
- package/dist/client/assets/{own-accounts-section-Dub3kcxT.js → own-accounts-section-BLuDOaAb.js} +1 -1
- package/dist/client/assets/{pair-dE3C8WhI.js → pair-Bx0-qASF.js} +1 -1
- package/dist/client/assets/{parse-sections-BNVVULt_.js → parse-sections-BKyVHKZ7.js} +2 -2
- package/dist/client/assets/{plan-eTOH4djb.js → plan-BrNcf_Qm.js} +1 -1
- package/dist/client/assets/{plan-ladder-CbTEVjlC.js → plan-ladder-hgLE-92y.js} +1 -1
- package/dist/client/assets/{plan-usage-card-_Ff0mpr8.js → plan-usage-card-Bv-6ufDv.js} +1 -1
- package/dist/client/assets/{popover-SbxIMG75.js → popover-DpQ7C_dy.js} +1 -1
- package/dist/client/assets/{post-calendar-B1CybeCu.js → post-calendar-DjU6TuAo.js} +1 -1
- package/dist/client/assets/{post-editor-CNorej-X.js → post-editor-DNJCw39p.js} +1 -1
- package/dist/client/assets/{preview-content-LyXURvUK.js → preview-content-BPn3hafY.js} +1 -1
- package/dist/client/assets/{preview-dialog-bMg2yisv.js → preview-dialog-y7xfrUjW.js} +1 -1
- package/dist/client/assets/{preview-panel-DVadceTQ.js → preview-panel-5mQwvRx6.js} +1 -1
- package/dist/client/assets/{preview-tab-CX_rhPDl.js → preview-tab-DY8TdvOq.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-J_wgt3fp.js → product-picker-dialog-BHSk9HN6.js} +1 -1
- package/dist/client/assets/{profile-Kt0coOMj.js → profile-DsZzxR5k.js} +1 -1
- package/dist/client/assets/{project-app-view-BJ3tVux4.js → project-app-view-A4rSGHtm.js} +1 -1
- package/dist/client/assets/{project-apps-Cni0OecT.js → project-apps-Cq_0EJc5.js} +1 -1
- package/dist/client/assets/{project-icon-m6Ad1m7q.js → project-icon-CXooITLn.js} +1 -1
- package/dist/client/assets/{project-index-C0zTM-WA.js → project-index-BUuJBy_S.js} +1 -1
- package/dist/client/assets/project-reports-6ykQNoBZ.js +1 -0
- package/dist/client/assets/project-tasks-BSjXj6m9.js +1 -0
- package/dist/client/assets/{projects-oaHlFO8V.js → projects-Dqkrn3HR.js} +1 -1
- package/dist/client/assets/{projects-empty-state-B91deBQU.js → projects-empty-state-XjLmOgs_.js} +1 -1
- package/dist/client/assets/{prompts-DSIkPLeQ.js → prompts-CzEpFpHA.js} +1 -1
- package/dist/client/assets/record-editor-Bt606KMj.js +1 -0
- package/dist/client/assets/{redirect-editor-yx7ByECD.js → redirect-editor-D4Ixq7FV.js} +1 -1
- package/dist/client/assets/reports-DhDqHE_L.js +1 -0
- package/dist/client/assets/{reports-D7g3Ml1J.js → reports-DrHCWqFy.js} +1 -1
- package/dist/client/assets/{reports-onboarding-BhNZvfy4.js → reports-onboarding-C8rbTA1F.js} +1 -1
- package/dist/client/assets/{reports-tab-Gh5DaJuQ.js → reports-tab-CFP7-TPu.js} +2 -2
- package/dist/client/assets/repositories--2bazlOa.js +1 -0
- package/dist/client/assets/{repositories-C0KYN8ne.js → repositories-BUeAZs_Y.js} +1 -1
- package/dist/client/assets/{repository-binding-CaMbcDLV.js → repository-binding-DOi5asb9.js} +1 -1
- package/dist/client/assets/{repository-picker-CtTW0G31.js → repository-picker-DFLDM8KA.js} +1 -1
- package/dist/client/assets/{require-capability-CdsgNeD6.js → require-capability-D082D4gd.js} +1 -1
- package/dist/client/assets/{required-auth-layout-AmJ1uTFt.js → required-auth-layout-0xL7EuYA.js} +1 -1
- package/dist/client/assets/{reset-password-CtqV555d.js → reset-password-CxO_jXcc.js} +1 -1
- package/dist/client/assets/{resizable-BVcChq5e.js → resizable-DGjOKkLk.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DERG1JDa.js → resolve-tab-icon-DztL_Lbc.js} +1 -1
- package/dist/client/assets/{review-settings--Kf9eCfs.js → review-settings-CKcWlOyk.js} +1 -1
- package/dist/client/assets/{role-color-OzS56aIA.js → role-color-Bx34q3Lm.js} +1 -1
- package/dist/client/assets/{roles-5yWWx_DJ.js → roles-CWAsB7zr.js} +1 -1
- package/dist/client/assets/route-CHfKJunx.js +1 -0
- package/dist/client/assets/{route-CvAef_ho.js → route-CjM8y9OR.js} +1 -1
- package/dist/client/assets/{route-9oi0rgOU.js → route-DCnJ0HI0.js} +1 -1
- package/dist/client/assets/{route-page-header-Dwl09nk0.js → route-page-header-B0Rv0-yL.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CUzd7R0k.js → sandbox-git-api-Dh8iq0dN.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-Bb3AkWOb.js → sandbox-lifecycle-context-B874XF_C.js} +1 -1
- package/dist/client/assets/{save-status-DwZEDw1l.js → save-status-DXWfo-8r.js} +1 -1
- package/dist/client/assets/{schema-XQ38kn3Z.js → schema-B60uBtu8.js} +1 -1
- package/dist/client/assets/{schema-CkOMMSLb.js → schema-BAw4aWZl.js} +1 -1
- package/dist/client/assets/{scroll-area-CYAgrqag.js → scroll-area-f7L66Joe.js} +1 -1
- package/dist/client/assets/{search-input-C650lN1b.js → search-input-CEnkS4m_.js} +1 -1
- package/dist/client/assets/{search-toggle-C3h6VPGQ.js → search-toggle-9sdl5IOX.js} +1 -1
- package/dist/client/assets/{secret-picker-Dgn1St8u.js → secret-picker-Dhpw5Aoe.js} +1 -1
- package/dist/client/assets/{secrets-CHUSJNqz.js → secrets-xBsvVkZQ.js} +1 -1
- package/dist/client/assets/{section-array-field-DjpdZjjA.js → section-array-field-Elg9g1Hy.js} +1 -1
- package/dist/client/assets/{sections-RWn2QTBe.js → sections-BfjiqFc1.js} +1 -1
- package/dist/client/assets/{sections-editor-DtmSAXwn.js → sections-editor-C0HI1jD6.js} +1 -1
- package/dist/client/assets/{select-BAD2nCs0.js → select-7jd6ioeB.js} +1 -1
- package/dist/client/assets/{select-model-DuWZC39Y.js → select-model-BrhwkBoS.js} +1 -1
- package/dist/client/assets/{seo-editor-DQ-gjrg1.js → seo-editor-CzDUsRM0.js} +1 -1
- package/dist/client/assets/{separator-DxL8DcTB.js → separator-Cmgen_16.js} +1 -1
- package/dist/client/assets/{session-runtime-CoMtO0vP.js → session-runtime-D9DUNrH3.js} +1 -1
- package/dist/client/assets/settings-tab-CBovgQiV.js +1 -0
- package/dist/client/assets/{sheet-BSNpAEVQ.js → sheet-JhW2qRxu.js} +1 -1
- package/dist/client/assets/{shell-layout-C2FEOZHE.js → shell-layout-Bn4i-sZN.js} +1 -1
- package/dist/client/assets/{site-draft-actions-DQhEp0pW.js → site-draft-actions-vD_l4dI0.js} +1 -1
- package/dist/client/assets/{site-draft-view-JFh5CXlv.js → site-draft-view-DAfg7a5M.js} +1 -1
- package/dist/client/assets/site-editor-DN53YzhB.js +1 -0
- package/dist/client/assets/{site-editor-toast-DbjIe6vh.js → site-editor-toast-Ddbwzus4.js} +1 -1
- package/dist/client/assets/{skills-mk29STuQ.js → skills-7nZrmnlQ.js} +1 -1
- package/dist/client/assets/{slider-DMCHPWiy.js → slider-3aViKv_e.js} +1 -1
- package/dist/client/assets/{sortable.esm-CsjiJtN2.js → sortable.esm-CYqzA4EE.js} +1 -1
- package/dist/client/assets/{sso-SIfrP_88.js → sso-DsswySN8.js} +1 -1
- package/dist/client/assets/{suggestion-CX1YVdIt.js → suggestion-D-Hgwid9.js} +1 -1
- package/dist/client/assets/{super-agent-icon-DCxdIVB-.js → super-agent-icon-DW2mWckT.js} +1 -1
- package/dist/client/assets/{switch-BHmpCIVF.js → switch-Do0kPE_s.js} +1 -1
- package/dist/client/assets/{synced-repos-BFxzW6vz.js → synced-repos-CMdL4gHN.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-FZMoReXN.js → tab-icon-glyph-CPu-SJDs.js} +1 -1
- package/dist/client/assets/{table-DUtLs9KY.js → table-B3FPNJeJ.js} +1 -1
- package/dist/client/assets/{tabs-ByjyyO35.js → tabs-BBSIrgk-.js} +1 -1
- package/dist/client/assets/{task-board-DFizZUve.js → task-board-CwBkvB1b.js} +1 -1
- package/dist/client/assets/{task-key-jbMkJ-gq.js → task-key-BwBSp2wf.js} +1 -1
- package/dist/client/assets/{task-route-jGx8dPBi.js → task-route-ChIrZhv2.js} +1 -1
- package/dist/client/assets/{task-status-D6uDrhP9.js → task-status-DiUFAQru.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-C9Q3oP78.js → taskboard-analytics-CHwg9WUz.js} +1 -1
- package/dist/client/assets/{tasks-CQ1Xzkf7.js → tasks-DMXy_J6l.js} +1 -1
- package/dist/client/assets/tasks-DtdTBqFs.js +1 -0
- package/dist/client/assets/{textarea-BG3_jDPK.js → textarea-DMHox9zb.js} +1 -1
- package/dist/client/assets/{thread-analytics-PTzxnnwH.js → thread-analytics-C3r6jx5Z.js} +1 -1
- package/dist/client/assets/{thread-button-CSrnO4J2.js → thread-button-DmE8j3fa.js} +1 -1
- package/dist/client/assets/{thread-intent-AFleKGnm.js → thread-intent-w6AIBxoo.js} +1 -1
- package/dist/client/assets/{thread-route-DgTdTFs-.js → thread-route-CLvsVBnP.js} +1 -1
- package/dist/client/assets/{thread-route-XlUtBNme.js → thread-route-Duqv7zcV.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-D9NA2h2p.js → thread-sheet-body-C0aw55A2.js} +1 -1
- package/dist/client/assets/{time-range-picker-COT-3s6C.js → time-range-picker-B0zBDDf6.js} +1 -1
- package/dist/client/assets/{toggle-group-B5NhEkmw.js → toggle-group-Ck3c4lOZ.js} +1 -1
- package/dist/client/assets/{tool-set-selector--vjZ40l5.js → tool-set-selector-Bu69e5wo.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-slFtkrIv.js → toolbar-icon-button-BzE7ADsg.js} +1 -1
- package/dist/client/assets/{tooltip-2yYSYsa-.js → tooltip-D8o7XnJa.js} +1 -1
- package/dist/client/assets/{tooltipContext-BjkTtu04.js → tooltipContext-BXtOlAzq.js} +1 -1
- package/dist/client/assets/{track-FOISCTZ9.js → track-Dm_O27TL.js} +1 -1
- package/dist/client/assets/{types-C-gTijki.js → types-1Bdu30d1.js} +1 -1
- package/dist/client/assets/{url-slug-lJqSTlr5.js → url-slug-DiNRd3I-.js} +1 -1
- package/dist/client/assets/{usage-stats-BeZTZSlb.js → usage-stats-DG6FopRE.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DBMFXH54.js → use-ai-providers-CZ-W5_Vf.js} +1 -1
- package/dist/client/assets/{use-api-keys-n29QPUT5.js → use-api-keys-CwpGEpqd.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-Bodgcm5R.js → use-apply-named-rule-BgnGoh6n.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-BRXPaXqz.js +1 -0
- package/dist/client/assets/{use-automations-CxZwTkEF.js → use-automations-Drn2vTSA.js} +1 -1
- package/dist/client/assets/{use-autosave-BAhs-b8G.js → use-autosave-CVCCrRc5.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-DzRCGVy9.js +1 -0
- package/dist/client/assets/use-blog-view-C52VcDgS.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-BjrxY9zk.js → use-chat-layout-state-CwQRv8ye.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-BAGkHuFe.js → use-cms-publish-actions-Ci755GgU.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DdHCkif9.js → use-connect-companion-CRGtzDfk.js} +1 -1
- package/dist/client/assets/{use-connection-DXrrdGow.js → use-connection-ms_ouyUt.js} +1 -1
- package/dist/client/assets/{use-content-sync-DZOdB8PF.js → use-content-sync-DOiEymNj.js} +1 -1
- package/dist/client/assets/{use-copy-C9KqfKbD.js → use-copy-DZ4RozT5.js} +1 -1
- package/dist/client/assets/{use-current-view-CTU_KTOZ.js → use-current-view-DEelPwTu.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DL2Sv8WK.js → use-date-fns-locale-CyaQmT4z.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-LqgXHP5M.js → use-debounced-autosave-BjAyYWZx.js} +1 -1
- package/dist/client/assets/{use-debounced-value-D0-3lKxq.js → use-debounced-value-Bp8IxyDQ.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BlcIIio7.js → use-deco-credits-CxVdjOXR.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-ia2U1D-_.js → use-decopilot-events-B0SY5lbK.js} +1 -1
- package/dist/client/assets/{use-delete-block-4OWBeqRv.js → use-delete-block-BjsNzsiq.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BhL2muMH.js → use-delete-connection-CKoZiux_.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-DMzm770d.js → use-deployment-admin-CYvlJZAA.js} +1 -1
- package/dist/client/assets/{use-entitlements-C0Jnglmb.js → use-entitlements-CLgZu0JX.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BbJh-wFY.js → use-fast-preview-draft-url-C74Sv11-.js} +1 -1
- package/dist/client/assets/{use-file-configs-Bj7muxL3.js → use-file-configs-YSla5_Ur.js} +1 -1
- package/dist/client/assets/{use-id-selection-aBsPLNQg.js → use-id-selection-DMcmgCib.js} +1 -1
- package/dist/client/assets/{use-in-settings-DTiMI92T.js → use-in-settings-C6JO-bJr.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-ykY7SYoP.js → use-inbox-feed-BTFUySHR.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-Jtx_R8.js → use-infinite-scroll-tWcf3kPZ.js} +1 -1
- package/dist/client/assets/{use-join-requests-DA8sBvoB.js → use-join-requests-B5BbblCq.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DQP_KfHN.js → use-main-panel-tabs-C4XDYFBx.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-CgYIT7O6.js → use-mcp-auth-status-Cwp9ybo5.js} +1 -1
- package/dist/client/assets/{use-mcp-client--6E0VdQ1.js → use-mcp-client-DwDXV1MV.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-DZL7WNWx.js → use-mcp-prompts-DxYkfcVh.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DGaS62Fn.js → use-mcp-tools-ClzdYJqU.js} +1 -1
- package/dist/client/assets/{use-mobile-C2Wa6qqh.js → use-mobile-COnZayaa.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Bg0QqQnT.js → use-move-blocks-jOWqN33r.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Blb_gT0Z.js → use-navigate-to-agent-CP5OGVwj.js} +1 -1
- package/dist/client/assets/{use-never-published-wykmkClz.js → use-never-published-CaQIvz2U.js} +1 -1
- package/dist/client/assets/{use-org-fs-elhmqDGC.js → use-org-fs-BXDltZ6L.js} +1 -1
- package/dist/client/assets/{use-org-notice-BmGI5AoV.js → use-org-notice-lJRg0Llc.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-Bqe0mTI4.js → use-org-repo-syncs-BKTUAfL-.js} +1 -1
- package/dist/client/assets/{use-org-sso-D0oSmb0Y.js → use-org-sso-BNYSdKNo.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D19qndSA.js → use-organization-settings-DC-YUz9d.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BUxvnLXh.js → use-panel-navigate-2F4YkW9G.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-D6vX4rCD.js → use-project-native-view-presence-Bll4Enn0.js} +1 -1
- package/dist/client/assets/{use-project-scope-BW5vvzIR.js → use-project-scope-CxUKOiru.js} +1 -1
- package/dist/client/assets/{use-recent-apps-qt6-6ySx.js → use-recent-apps-Wf6FWJn-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-yo9M4TG9.js → use-reports-diagnostic-DayP1VbO.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-xbG28nOp.js → use-sandbox-events-Ci7mtnDq.js} +1 -1
- package/dist/client/assets/{use-secrets-D1HWpuW_.js → use-secrets-KZA6qnMV.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-DXkAoW7H.js → use-section-preview-base-9TUGYkBk.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-L0ea2Q3b.js → use-sidebar-collapsed-CGalz51h.js} +1 -1
- package/dist/client/assets/{use-tags-B46ACyo8.js → use-tags-BCBmpGEr.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-Q8JP9hY1.js → use-task-board-analytics-Bab3DSS9.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DD-h7mMH.js → use-task-board-item-prs-pKWC-16x.js} +1 -1
- package/dist/client/assets/{use-task-board-items-DJs5p39s.js → use-task-board-items-CRgoGjZ1.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DhN9b-Ei.js → use-task-board-prompts-CM_nsKev.js} +1 -1
- package/dist/client/assets/{use-task-metadata-wSSRfe9l.js → use-task-metadata-CkPczRQM.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BXUBmrcQ.js → use-thread-outputs-C4QAZPKK.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-Dog_0xGP.js → use-view-draft-kind-C_NqmzJr.js} +1 -1
- package/dist/client/assets/{use-voice-input-Cml6WhPe.js → use-voice-input-EeBFx2He.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-GaL8pmo1.js +1 -0
- package/dist/client/assets/{useQueries-BuIHgxFS.js → useQueries-BIQbCllL.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CiJWfJ3g.js +1 -0
- package/dist/client/assets/{users-BBlUm9BI.js → users-sfsFErNT.js} +1 -1
- package/dist/client/assets/{utils-ZT3Tr9FQ.js → utils-BctIwn-W.js} +1 -1
- package/dist/client/assets/{variant-calendar-BJi5SDmS.js → variant-calendar-CVXKJBjL.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-DPAlBy59.js → variant-matcher-override-CqFXIJB3.js} +1 -1
- package/dist/client/assets/{view-header-D_AYsQS1.js → view-header-B5JqDpYm.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C1YM4Fvh.js → virtual-mcp-CI9v722X.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-C3KG4d2d.js → watch-sse-pool-BVDAENMM.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-Rg0Tr0ya.js +0 -1
- package/dist/client/assets/agent-deck-DaxKom9K.js +0 -1
- package/dist/client/assets/agent-experiments-gALcE-F4.js +0 -1
- package/dist/client/assets/agent-file-DY1lwsgY.js +0 -1
- package/dist/client/assets/agent-library-CPa8urhx.js +0 -1
- package/dist/client/assets/agent-library-file-CnGwYE2k.js +0 -1
- package/dist/client/assets/agent-overview-el3kyIBv.js +0 -1
- package/dist/client/assets/agent-settings-CQn5vagF.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DT9ycvyN.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BDuFxBcC.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-IKIhLz0T.js +0 -1
- package/dist/client/assets/agent-view-BhxK3cU9.js +0 -1
- package/dist/client/assets/api-keys-Cv0oZpoT.js +0 -1
- package/dist/client/assets/experiments-tab-choice-Dm_h0xkr.js +0 -1
- package/dist/client/assets/library-CB2VVs8O.js +0 -1
- package/dist/client/assets/monitoring-N4CPm7XC.js +0 -2
- package/dist/client/assets/project-reports-DiUu1Qc1.js +0 -1
- package/dist/client/assets/project-tasks-CAdmZlMS.js +0 -1
- package/dist/client/assets/record-editor-p_d7oWmO.js +0 -1
- package/dist/client/assets/reports-BEgGXtxt.js +0 -1
- package/dist/client/assets/repositories-BRHtIrVz.js +0 -1
- package/dist/client/assets/route-CmbvxWwg.js +0 -1
- package/dist/client/assets/settings-tab-XKL-PXfE.js +0 -1
- package/dist/client/assets/site-editor-BCUDTULP.js +0 -1
- package/dist/client/assets/tasks-CcgLlawT.js +0 -1
- package/dist/client/assets/use-ask-in-chat-DMYy6FC9.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CSboyg4V.js +0 -1
- package/dist/client/assets/use-blog-view-7SxY0DSD.js +0 -1
- package/dist/client/assets/useInfiniteQuery-D0bLDkrM.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DUNAnJxH.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d5 as _}from"./index-
|
|
1
|
+
import{d5 as _}from"./index-DE4EwBpT.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{r as i,j as t,c6 as o}from"./index-
|
|
1
|
+
import{r as i,j as t,c6 as o}from"./index-DE4EwBpT.js";var s=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),d="VisuallyHidden",e=i.forwardRef((r,a)=>t.jsx(o.span,{...r,ref:a,style:{...s,...r.style}}));e.displayName=d;var n=e;export{n as R,s as V};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c0 as L,c1 as B,j as c,g0 as q,c6 as y,c4 as b,f$ as K,c7 as E,g1 as _,e1 as T,ck as k,cd as U,co as V}from"./index-
|
|
1
|
+
import{r as s,c0 as L,c1 as B,j as c,g0 as q,c6 as y,c4 as b,f$ as K,c7 as E,g1 as _,e1 as T,ck as k,cd as U,co as V}from"./index-DE4EwBpT.js";var I="Radio",[z,w]=k(I),[H,W]=z(I),P=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&c.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});P.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(g,o);return c.jsx(T,{present:n||r.checked,children:c.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});G.displayName=g;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=U(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[$]=k(C,[_,w]),j=_(),N=w(),[J,Q]=$(C),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return c.jsx(J,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:c.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Q(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(P,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var Z="RadioGroupIndicator",F=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(G,{...e,...n,ref:d})});F.displayName=Z;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as H,t as U,a9 as S,C as Z,aa as X,f as R,ab as J,ac as Q,o as z}from"./usage-stats-BeZTZSlb.js";import{gA as C,hk as M,gz as P,hl as x,hm as L,hn as V,ho as K,hp as _,gC as A,eT as N,r as p,ca as $}from"./index-_v_cX_Uz.js";import{C as k}from"./index-DxMUaH8f.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
1
|
+
import{A as H,t as U,a9 as S,C as Z,aa as X,f as R,ab as J,ac as Q,o as z}from"./usage-stats-DG6FopRE.js";import{gA as C,hk as M,gz as P,hl as x,hm as L,hn as V,ho as K,hp as _,gC as A,eT as N,r as p,ca as $}from"./index-DE4EwBpT.js";import{C as k}from"./index-C42mXKK8.js";function tt(t,e){const i=Math.min(t.top,e.top),s=Math.max(t.bottom,e.bottom),l=Math.min(t.left,e.left),r=Math.max(t.right,e.right)-l,n=s-i;return new DOMRect(l,i,r,n)}var et=class{get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}get virtualElement(){var t,e;const{selection:i}=this.editor.state,s=(t=this.getReferencedVirtualElement)===null||t===void 0?void 0:t.call(this);if(s)return s;if(!(!((e=this.view)===null||e===void 0||(e=e.dom)===null||e===void 0)&&e.parentNode))return;const l=S(this.view,i.from,i.to);let r={getBoundingClientRect:()=>l,getClientRects:()=>[l]};if(i instanceof Z){let n=this.view.nodeDOM(i.from);const d=n.dataset.nodeViewWrapper?n:n.querySelector("[data-node-view-wrapper]");d&&(n=d),n&&(r={getBoundingClientRect:()=>n.getBoundingClientRect(),getClientRects:()=>[n.getBoundingClientRect()]})}if(i instanceof k){const{$anchorCell:n,$headCell:d}=i,g=n?n.pos:d.pos,f=d?d.pos:n.pos,u=this.view.nodeDOM(g),o=this.view.nodeDOM(f);if(!u||!o)return;const a=u===o?u.getBoundingClientRect():tt(u.getBoundingClientRect(),o.getBoundingClientRect());r={getBoundingClientRect:()=>a,getClientRects:()=>[a]}}return r}constructor({editor:t,element:e,view:i,pluginKey:s="bubbleMenu",updateDelay:l=250,resizeDelay:r=60,shouldShow:n,appendTo:d,getReferencedVirtualElement:g,options:f}){var u;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.floatingUIOptions={strategy:"absolute",placement:"top",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1,onShow:void 0,onHide:void 0,onUpdate:void 0,onDestroy:void 0},this.shouldShow=({view:o,state:a,from:h,to:c})=>{const{doc:m,selection:y}=a,{empty:O}=y,b=!m.textBetween(h,c).length&&X(a.selection),v=this.element.contains(document.activeElement);return!(!(o.hasFocus()||v)||O||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:o})=>{var a;if(this.editor.isDestroyed){this.destroy();return}if(this.preventHide){this.preventHide=!1;return}o?.relatedTarget&&(!((a=this.element.parentNode)===null||a===void 0)&&a.contains(o.relatedTarget))||o?.relatedTarget!==this.editor.view.dom&&this.hide()},this.handleDebouncedUpdate=(o,a)=>{const h=!a?.selection.eq(o.state.selection),c=!a?.doc.eq(o.state.doc);!h&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(o,h,c,a)},this.updateDelay))},this.updateHandler=(o,a,h,c)=>{const{composing:m}=o;if(!(m||!a&&!h)){if(!this.getShouldShow(c)){this.hide();return}this.show(),this.updatePosition()}},this.transactionHandler=({transaction:o})=>{const a=o.getMeta(this.pluginKey);a==="updatePosition"?this.updatePosition():a&&typeof a=="object"&&a.type==="updateOptions"?this.updateOptions(a.options):a==="hide"?this.hide():a==="show"&&(this.updatePosition(),this.show())},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(u=f?.scrollTarget)!==null&&u!==void 0?u:window,this.getReferencedVirtualElement=g,this.floatingUIOptions={...this.floatingUIOptions,...f},this.element.tabIndex=0,n&&(this.shouldShow=n),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}updatePosition(){if(!this.isVisible)return;const t=this.virtualElement;t&&A(t,this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:e,y:i,strategy:s,middlewareData:l})=>{var r,n;if(!(!this.isVisible||this.editor.isDestroyed||!this.element.isConnected)){if(!((r=l.hide)===null||r===void 0)&&r.referenceHidden||!((n=l.hide)===null||n===void 0)&&n.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=s,this.element.style.left=`${e}px`,this.element.style.top=`${i}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()}})}update(t,e){const{state:i}=t,s=i.selection.from!==i.selection.to;if(this.updateDelay>0&&s){this.handleDebouncedUpdate(t,e);return}const l=!e?.selection.eq(t.state.selection),r=!e?.doc.eq(t.state.doc);this.updateHandler(t,l,r,e)}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return((e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,element:this.element,view:this.view,state:i,oldState:t,from:r,to:n}))||!1}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.getReferencedVirtualElement!==void 0&&(this.getReferencedVirtualElement=t.getReferencedVirtualElement),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const B=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new et({view:e,...t})});R.create({name:"bubbleMenu",addOptions(){return{element:null,pluginKey:"bubbleMenu",updateDelay:void 0,appendTo:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[B({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,options:this.options.options,appendTo:this.options.appendTo,getReferencedVirtualElement:this.options.getReferencedVirtualElement,shouldShow:this.options.shouldShow})]:[]}});var it=class{getTextContent(t){return J(t,{textSerializers:Q(this.editor.schema)})}get middlewares(){const t=[];return this.floatingUIOptions.flip&&t.push(C(typeof this.floatingUIOptions.flip!="boolean"?this.floatingUIOptions.flip:void 0)),this.floatingUIOptions.shift&&t.push(M(typeof this.floatingUIOptions.shift!="boolean"?this.floatingUIOptions.shift:void 0)),this.floatingUIOptions.offset&&t.push(P(typeof this.floatingUIOptions.offset!="boolean"?this.floatingUIOptions.offset:void 0)),this.floatingUIOptions.arrow&&t.push(x(this.floatingUIOptions.arrow)),this.floatingUIOptions.size&&t.push(L(typeof this.floatingUIOptions.size!="boolean"?this.floatingUIOptions.size:void 0)),this.floatingUIOptions.autoPlacement&&t.push(V(typeof this.floatingUIOptions.autoPlacement!="boolean"?this.floatingUIOptions.autoPlacement:void 0)),this.floatingUIOptions.hide&&t.push(K(typeof this.floatingUIOptions.hide!="boolean"?this.floatingUIOptions.hide:void 0)),this.floatingUIOptions.inline&&t.push(_(typeof this.floatingUIOptions.inline!="boolean"?this.floatingUIOptions.inline:void 0)),t}constructor({editor:t,element:e,view:i,pluginKey:s="floatingMenu",updateDelay:l=250,resizeDelay:r=60,options:n,appendTo:d,shouldShow:g}){var f;this.preventHide=!1,this.isVisible=!1,this.scrollTarget=window,this.shouldShow=({view:u,state:o})=>{const{selection:a}=o,{$anchor:h,empty:c}=a,m=h.depth===1,y=h.parent.isTextblock&&!h.parent.type.spec.code&&!h.parent.textContent&&h.parent.childCount===0&&!this.getTextContent(h.parent);return!(!u.hasFocus()||!c||!m||!y||!this.editor.isEditable)},this.floatingUIOptions={strategy:"absolute",placement:"right",offset:8,flip:{},shift:{},arrow:!1,size:!1,autoPlacement:!1,hide:!1,inline:!1},this.updateHandler=(u,o,a,h)=>{const{composing:c}=u;if(!(c||!o&&!a)){if(!this.getShouldShow(h)){this.hide();return}this.updatePosition(),this.show()}},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:u})=>{var o;if(this.preventHide){this.preventHide=!1;return}u?.relatedTarget&&(!((o=this.element.parentNode)===null||o===void 0)&&o.contains(u.relatedTarget))||u?.relatedTarget!==this.editor.view.dom&&this.hide()},this.transactionHandler=({transaction:u})=>{const o=u.getMeta(this.pluginKey);o==="updatePosition"?this.updatePosition():o&&typeof o=="object"&&o.type==="updateOptions"?this.updateOptions(o.options):o==="hide"?this.hide():o==="show"&&(this.updatePosition(),this.show())},this.resizeHandler=()=>{this.resizeDebounceTimer&&clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=window.setTimeout(()=>{this.updatePosition()},this.resizeDelay)},this.editor=t,this.element=e,this.view=i,this.pluginKey=s,this.updateDelay=l,this.resizeDelay=r,this.appendTo=d,this.scrollTarget=(f=n?.scrollTarget)!==null&&f!==void 0?f:window,this.floatingUIOptions={...this.floatingUIOptions,...n},this.element.tabIndex=0,g&&(this.shouldShow=g),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.editor.on("transaction",this.transactionHandler),window.addEventListener("resize",this.resizeHandler),this.scrollTarget.addEventListener("scroll",this.resizeHandler),this.update(i,i.state),this.getShouldShow()&&(this.show(),this.updatePosition())}getShouldShow(t){var e;const{state:i}=this.view,{selection:s}=i,{ranges:l}=s,r=Math.min(...l.map(d=>d.$from.pos)),n=Math.max(...l.map(d=>d.$to.pos));return(e=this.shouldShow)===null||e===void 0?void 0:e.call(this,{editor:this.editor,view:this.view,state:i,oldState:t,from:r,to:n})}updateOptions(t){if(t.updateDelay!==void 0&&(this.updateDelay=t.updateDelay),t.resizeDelay!==void 0&&(this.resizeDelay=t.resizeDelay),t.appendTo!==void 0&&(this.appendTo=t.appendTo),t.shouldShow!==void 0&&t.shouldShow&&(this.shouldShow=t.shouldShow),t.options!==void 0){var e;const i=(e=t.options.scrollTarget)!==null&&e!==void 0?e:window;i!==this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.scrollTarget=i,this.scrollTarget.addEventListener("scroll",this.resizeHandler)),this.floatingUIOptions={...this.floatingUIOptions,...t.options}}}updatePosition(){var t;if(!(!((t=this.view)===null||t===void 0||(t=t.dom)===null||t===void 0)&&t.parentNode))return;const{selection:e}=this.editor.state,i=S(this.view,e.from,e.to);A({getBoundingClientRect:()=>i,getClientRects:()=>[i]},this.element,{placement:this.floatingUIOptions.placement,strategy:this.floatingUIOptions.strategy,middleware:this.middlewares}).then(({x:s,y:l,strategy:r,middlewareData:n})=>{var d,g;if(!((d=n.hide)===null||d===void 0)&&d.referenceHidden||!((g=n.hide)===null||g===void 0)&&g.escaped){this.element.style.visibility="hidden";return}this.element.style.visibility="visible",this.element.style.width="max-content",this.element.style.position=r,this.element.style.left=`${s}px`,this.element.style.top=`${l}px`,this.isVisible&&this.floatingUIOptions.onUpdate&&this.floatingUIOptions.onUpdate()})}update(t,e){const i=!e?.selection.eq(t.state.selection),s=!e?.doc.eq(t.state.doc);this.updateHandler(t,i,s,e)}show(){var t;if(this.isVisible)return;this.element.style.visibility="visible",this.element.style.opacity="1";const e=typeof this.appendTo=="function"?this.appendTo():this.appendTo;(t=e??this.view.dom.parentElement)===null||t===void 0||t.appendChild(this.element),this.floatingUIOptions.onShow&&this.floatingUIOptions.onShow(),this.isVisible=!0}hide(){this.isVisible&&(this.element.style.visibility="hidden",this.element.style.opacity="0",this.element.remove(),this.floatingUIOptions.onHide&&this.floatingUIOptions.onHide(),this.isVisible=!1)}destroy(){this.hide(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),window.removeEventListener("resize",this.resizeHandler),this.scrollTarget.removeEventListener("scroll",this.resizeHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler),this.editor.off("transaction",this.transactionHandler),this.floatingUIOptions.onDestroy&&this.floatingUIOptions.onDestroy()}};const F=t=>new H({key:typeof t.pluginKey=="string"?new U(t.pluginKey):t.pluginKey,view:e=>new it({view:e,...t})});R.create({name:"floatingMenu",addOptions(){return{element:null,options:{},pluginKey:"floatingMenu",updateDelay:void 0,resizeDelay:void 0,appendTo:void 0,shouldShow:null}},addCommands(){return{updateFloatingMenuPosition:()=>({tr:t,dispatch:e})=>(e&&t.setMeta(this.options.pluginKey,"updatePosition"),!0)}},addProseMirrorPlugins(){return this.options.element?[F({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,updateDelay:this.options.updateDelay,resizeDelay:this.options.resizeDelay,options:this.options.options,appendTo:this.options.appendTo,shouldShow:this.options.shouldShow})]:[]}});function W(t,e){return t??new U(e)}const st=typeof window<"u"?p.useLayoutEffect:p.useEffect,j=new Set(["left","opacity","position","top","visibility","width"]),nt=new Set(["animationIterationCount","aspectRatio","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","columns","fillOpacity","flex","flexGrow","flexShrink","fontWeight","gridArea","gridColumn","gridColumnEnd","gridColumnStart","gridRow","gridRowEnd","gridRowStart","lineClamp","lineHeight","opacity","order","orphans","scale","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","zIndex","zoom"]),ot=new Set(["children","className","style"]),rt=new Set(["tabIndex"]),lt=new Set(["accessKey","autoCapitalize","contentEditable","contextMenu","dir","draggable","enterKeyHint","hidden","id","lang","nonce","role","slot","spellCheck","tabIndex","title","translate"]),at={Blur:"focusout",DoubleClick:"dblclick",Focus:"focusin",MouseEnter:"mouseenter",MouseLeave:"mouseleave"};function T(t,e){return/^on[A-Z]/.test(t)&&typeof e=="function"}function dt(t){return t.startsWith("aria-")||t.startsWith("data-"),t}function ut(t){return t.startsWith("aria-")||t.startsWith("data-")||lt.has(t)}function q(t){return t.startsWith("--")?t:t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function ht(t){var e;const i=t.endsWith("Capture"),s=(i?t.slice(0,-7):t).slice(2);return{eventName:(e=at[s])!==null&&e!==void 0?e:s.toLowerCase(),options:i?{capture:!0}:void 0}}function ct(t,e){let i=e.defaultPrevented,s=!1;const l=Object.create(e);return Object.defineProperties(l,{nativeEvent:{value:e},currentTarget:{value:t},target:{value:e.target},persist:{value:()=>{}},isDefaultPrevented:{value:()=>i},isPropagationStopped:{value:()=>s},preventDefault:{value:()=>{i=!0,e.preventDefault()}},stopPropagation:{value:()=>{s=!0,e.stopPropagation()}}}),l}function E(t){return rt.has(t)}function D(t,e,i){if(e==="tabIndex"){t.tabIndex=Number(i);return}t[e]=i}function ft(t,e){if(e==="tabIndex"){t.removeAttribute("tabindex");return}const i=t[e];if(typeof i=="boolean"){t[e]=!1;return}if(typeof i=="number"){t[e]=0;return}t[e]=""}function pt(t,e){return typeof e!="number"||e===0||t.startsWith("--")||nt.has(t)?String(e):`${e}px`}function gt(t,e){j.has(e)||t.style.removeProperty(q(e))}function mt(t,e,i){j.has(e)||t.style.setProperty(q(e),pt(e,i))}function vt(t,e,i){new Set([...Object.keys(e),...Object.keys(i)]).forEach(s=>{if(ot.has(s)||!ut(s)||T(s,e[s])||T(s,i[s]))return;const l=e[s],r=i[s];if(l===r)return;const n=dt(s);if(r==null||r===!1){E(s)&&ft(t,s),t.removeAttribute(n);return}if(r===!0){E(s)&&D(t,s,!0),t.setAttribute(n,"");return}if(E(s)){D(t,s,r);return}t.setAttribute(n,String(r))})}function yt(t,e,i){if(e!==i){if(i){t.className=i;return}t.removeAttribute("class")}}function bt(t,e,i){const s=e??{},l=i??{};new Set([...Object.keys(s),...Object.keys(l)]).forEach(r=>{const n=s[r],d=l[r];if(n!==d){if(d==null){gt(t,r);return}mt(t,r,d)}})}function wt(t,e,i){e.forEach(({eventName:l,listener:r,options:n})=>{t.removeEventListener(l,r,n)});const s=[];return Object.entries(i).forEach(([l,r])=>{if(!T(l,r))return;const{eventName:n,options:d}=ht(l),g=f=>{r(ct(t,f))};t.addEventListener(n,g,d),s.push({eventName:n,listener:g,options:d})}),s}function Y(t,e){const i=p.useRef({}),s=p.useRef([]);st(()=>{const l=i.current;return yt(t,l.className,e.className),bt(t,l.style,e.style),vt(t,l,e),s.current=wt(t,s.current,e),i.current=e,()=>{s.current.forEach(({eventName:r,listener:n,options:d})=>{t.removeEventListener(r,n,d)}),s.current=[]}},[t,e])}const Tt=N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,getReferencedVirtualElement:n,options:d,children:g,...f},u)=>{const o=p.useRef(document.createElement("div")),a=p.useRef(W(t,"bubbleMenu")).current;Y(o.current,f),typeof u=="function"?u(o.current):u&&(u.current=o.current);const{editor:h}=z(),c=e||h,m={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:a,shouldShow:r,getReferencedVirtualElement:n,options:d},y=p.useRef(m);y.current=m;const[O,b]=p.useState(!1),v=p.useRef(!0);return p.useEffect(()=>{if(c?.isDestroyed)return;if(!c){console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");return}const w=o.current;w.style.visibility="hidden",w.style.position="absolute";const I=B({...y.current,editor:c,element:w});c.registerPlugin(I);const G=y.current.pluginKey;return v.current=!0,b(!0),()=>{b(!1),c.unregisterPlugin(G),window.requestAnimationFrame(()=>{w.parentNode&&w.parentNode.removeChild(w)})}},[c]),p.useEffect(()=>{if(!(!O||!c||c.isDestroyed)){if(v.current){v.current=!1;return}c.view.dispatch(c.state.tr.setMeta(a,{type:"updateOptions",options:y.current}))}},[O,c,i,s,r,d,l,n,a]),$.createPortal(g,o.current)});N.forwardRef(({pluginKey:t,editor:e,updateDelay:i,resizeDelay:s,appendTo:l,shouldShow:r=null,options:n,children:d,...g},f)=>{const u=p.useRef(document.createElement("div")),o=p.useRef(W(t,"floatingMenu")).current;Y(u.current,g),typeof f=="function"?f(u.current):f&&(f.current=u.current);const{editor:a}=z(),h=e||a,c={updateDelay:i,resizeDelay:s,appendTo:l,pluginKey:o,shouldShow:r,options:n},m=p.useRef(c);m.current=c;const[y,O]=p.useState(!1),b=p.useRef(!0);return p.useEffect(()=>{if(h?.isDestroyed)return;if(!h){console.warn("FloatingMenu component is not rendered inside of an editor component or does not have editor prop.");return}const v=u.current;v.style.visibility="hidden",v.style.position="absolute";const w=F({...m.current,editor:h,element:v});h.registerPlugin(w);const I=m.current.pluginKey;return b.current=!0,O(!0),()=>{O(!1),h.unregisterPlugin(I),window.requestAnimationFrame(()=>{v.parentNode&&v.parentNode.removeChild(v)})}},[h]),p.useEffect(()=>{if(!(!y||!h||h.isDestroyed)){if(b.current){b.current=!1;return}h.view.dispatch(h.state.tr.setMeta(o,{type:"updateOptions",options:m.current}))}},[y,h,i,s,r,n,l,o]),$.createPortal(d,u.current)});export{Tt as B};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as j,at as W,av as q,b as E,r as z,d as G,j as o,aT as $,R as I,P as N,n as U,B as k,b7 as V}from"./index-
|
|
1
|
+
import{c as j,at as W,av as q,b as E,r as z,d as G,j as o,aT as $,R as I,P as N,n as U,B as k,b7 as V}from"./index-DE4EwBpT.js";import{u as K}from"./use-mobile-COnZayaa.js";import{T as Y,a as Z,c as J}from"./tooltip-D8o7XnJa.js";import{t as Q,a as X}from"./MessageCircle01-B_wmc40j.js";import{s as ee}from"./XClose-CB1ghrVZ.js";import{b as te}from"./thread-button-DmE8j3fa.js";import{T as ne}from"./toolbar-icon-button-BzE7ADsg.js";import{b as se,R as oe,a as D}from"./resizable-DGjOKkLk.js";import{c as re,r as ie,m as le}from"./use-chat-layout-state-CwQRv8ye.js";import{R as ae}from"./route-page-header-B0Rv0-yL.js";import"./index-Dm4nPCgm.js";import"./use-sidebar-collapsed-CGalz51h.js";import"./sheet-JhW2qRxu.js";import"./use-in-settings-C6JO-bJr.js";import"./use-panel-navigate-2F4YkW9G.js";import"./thread-route-CLvsVBnP.js";import"./use-project-scope-CxUKOiru.js";import"./repository-binding-DOi5asb9.js";import"./use-mcp-client-DwDXV1MV.js";import"./auth-bTf5wb-E.js";import"./LayoutLeft-ABvNYnMK.js";import"./use-current-view-DEelPwTu.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,l]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let a;return n[5]!==l||n[6]!==s?(a=[s,l],n[5]=l,n[6]=s,n[7]=a):a=n[7],a}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",T="chat-layout-content",H="320px",O=z.createContext(null);function Fe(){return M()}function fe(){return z.use(O)}function M(){const t=z.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),l=G(),s=z.useRef(null),[a,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?a:h.side,p=100-m,y=b=>{const v=b.getLayout(),w=v[P],S=v[T];typeof w!="number"||typeof S!="number"||Math.abs(w-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[T]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==l||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{l({to:".",search:b=>({...b,...le(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=l,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[T]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:w}=v;if(!w){const R=s.current;R&&y(R);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let _;return e[18]!==g||e[19]!==L||e[20]!==f?(_=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=_):_=e[21],_}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=M();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let l;e[4]!==i.contentOpen?(l=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=l):l=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let a;e[8]!==s||e[9]!==r?(a=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=a):a=e[10];let c;return e[11]!==l||e[12]!==a?(c=o.jsxs(o.Fragment,{children:[l,a]}),e[11]=l,e[12]=a,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:l}=t;let s;e[0]!==l||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:l})}),e[0]=l,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let a;e[5]!==n?(a=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=a):a=e[6];let c;return e[7]!==s||e[8]!==a?(c=o.jsxs(J,{children:[s,a]}),e[7]=s,e[8]=a,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=M();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let l;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(l=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":r,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),pressed:r,onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=l):l=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let a;return t[9]!==l||t[10]!==s?(a=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,l,s]}),t[9]=l,t[10]=s,t[11]=a):a=t[11],a}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(xe,{}),t[0]=l):l=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let a;t[3]!==r.toggleContent||t[4]!==s?(a=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[l,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=a):a=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==a?(u=o.jsxs(o.Fragment,{children:[a,c]}),t[7]=a,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function B(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:l}=t,s=M();if(s.isMobile&&s.mobileSurface!=="main")return null;const a=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(ae,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==a||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:a,children:p}),e[16]=a,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==l?(f=l&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:l})},z.isValidElement(l)?l.key??void 0:void 0)})}),e[21]=l,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:T,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(B,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let l;e[0]!==i?(l=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=l):l=e[1];let s;e[2]!==l?(s=o.jsx("h2",{className:"text-lg font-medium",children:l}),e[2]=l,e[3]=s):s=e[3];let a;e[4]!==n.message||e[5]!==i?(a=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=a):a=e[6];let c;e[7]!==a?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:a}),e[7]=a,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(B,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:B});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,f as p,ax as u,j as s,b7 as x,N as a}from"./index-
|
|
1
|
+
import{c as f,f as p,ax as u,j as s,b7 as x,N as a}from"./index-DE4EwBpT.js";import{C as j}from"./capability-load-error-CuTvP4ve.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}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();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};
|
package/dist/client/assets/{infiniteQueryObserver-BjuIdZaK.js → infiniteQueryObserver-LrD5u9jC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e4 as g,e5 as d,e6 as v}from"./index-
|
|
1
|
+
import{e4 as g,e5 as d,e6 as v}from"./index-DE4EwBpT.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,i4 as de,b as Z,i5 as ue,r as le,i6 as xe,i7 as re,gG as T,gV as W,B as J,e0 as V,a9 as pe}from"./index-_v_cX_Uz.js";import{i as he}from"./CreditCard01-DVqX0918.js";import{B as L}from"./badge-qzONP_je.js";import{M as je}from"./multi-select-C4pEiex-.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-BAD2nCs0.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-DUtLs9KY.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-6ds2d44w.js";import{T as De}from"./Tooltip-Djlyj-LN.js";import{a as _e,A as Me}from"./AreaChart-BbBmBhmZ.js";import{c2 as Re}from"./CategoricalChart-B61TvcyO.js";import{R as Le}from"./require-capability-CdsgNeD6.js";import"./checkbox-2zvTb6ww.js";import"./Minus-DN5eCgUQ.js";import"./ChevronDown-CM9Urfsd.js";import"./command-n87yBV6H.js";import"./index-8J9eeoYX.js";import"./SearchMd-BPdzWKZu.js";import"./popover-SbxIMG75.js";import"./index-BdQq_4o_.js";import"./index-DBEc0hp1.js";import"./ChevronUp--3SHAUXV.js";import"./index-B9Qj8_a8.js";import"./access-gate-DNdYk1Lk.js";import"./capability-load-error-Cdh5jEwj.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(Me,{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(Re,{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 G(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=Z(),{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(G(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(G(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ge)},{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 Y=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(Y.length>0?1:0)>1,K=G(u,"pageviews"),se=K>0?G(u,"requests")/K:0,me=B&&v&&K>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 M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=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]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,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(W,{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(L,{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(W,{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(W,{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(Ze,{team:c,showSites:te},c.siteSlugs.join(","))),Y.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:Y.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 Ge(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ze(t){const e=k.c(13),{team:n,showSites:l}=t,o=Z(),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(L,{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(Ye,{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 Ye(t){const e=k.c(40),{invoices:n}=t,l=Z();let o;e[0]!==n?(o=n.some(Ke),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(We,{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 Ke(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 We(t){const e=k.c(14),{status:n}=t,l=Z(),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(L,{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(L,{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(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{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 Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
|
|
1
|
+
import{c as k,j as s,i4 as de,b as Z,i5 as ue,r as le,i6 as xe,i7 as re,gG as T,gV as W,B as J,e0 as V,a9 as pe}from"./index-DE4EwBpT.js";import{i as he}from"./CreditCard01-Ccu0AHIU.js";import{B as L}from"./badge-Cijqz4Jj.js";import{M as je}from"./multi-select-CqOUeGWs.js";import{S as be,d as ve,c as Be,a as Ne,b as Se}from"./select-7jd6ioeB.js";import{T as $,a as ye,b as ie,c as F,d as Te,e as we}from"./table-B3FPNJeJ.js";import{C as ke,X as Ue,Y as Ce}from"./CartesianChart-CEwsOHQl.js";import{T as De}from"./Tooltip-Cxqr6-jH.js";import{a as _e,A as Me}from"./AreaChart-BFvJqucg.js";import{c2 as Re}from"./CategoricalChart-sm4gMY1U.js";import{R as Le}from"./require-capability-D082D4gd.js";import"./checkbox-Bw8jVRUO.js";import"./Minus-D24RR21t.js";import"./ChevronDown-oMNLbXnE.js";import"./command-BILmufwY.js";import"./index-C0EGsq0B.js";import"./SearchMd-BtXOa7zE.js";import"./popover-DpQ7C_dy.js";import"./index-BdQq_4o_.js";import"./index-Dm4nPCgm.js";import"./ChevronUp-CnSV4M8U.js";import"./index-DcHP5YSH.js";import"./access-gate-BG_Vluxs.js";import"./capability-load-error-CuTvP4ve.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(Me,{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(Re,{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 G(t,e){return t.reduce((n,l)=>n+l[e],0)}function Ee(){const t=k.c(39),e=Z(),{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(G(u,c)):"—",y=[{key:"pageviews",title:e("settings.infraBilling.pageviews"),description:e("settings.infraBilling.pageviewsDescription"),colorNum:1,total:B&&v?Q.format(G(u,"pageviews")):"—"},{key:"requests",title:e("settings.infraBilling.requests"),description:e("settings.infraBilling.requestsDescription"),colorNum:2,total:j("requests",Ge)},{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 Y=C,U=S.length===1?S[0]:void 0,D=U?.billing??null,te=S.length+(Y.length>0?1:0)>1,K=G(u,"pageviews"),se=K>0?G(u,"requests")/K:0,me=B&&v&&K>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 M;t[19]!==e?(M=e("settings.infraBilling.siteLabel"),t[19]=e,t[20]=M):M=t[20];let P;t[21]!==x||t[22]!==_||t[23]!==M?(P=s.jsx(je,{className:"w-auto min-w-56 max-w-full",options:_,defaultValue:x,maxCount:2,placeholder:M,onValueChange:f}),t[21]=x,t[22]=_,t[23]=M,t[24]=P):P=t[24];let R;t[25]!==e?(R=e("settings.infraBilling.monthLabel"),t[25]=e,t[26]=R):R=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]!==R?(E=s.jsx(Se,{className:"w-48","aria-label":R,children:A}),t[28]=R,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(W,{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(L,{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(W,{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(W,{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(Ze,{team:c,showSites:te},c.siteSlugs.join(","))),Y.length>0&&s.jsxs(T,{className:"flex flex-col gap-1 p-4",children:[te&&s.jsx("span",{className:"text-sm font-medium",children:Y.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 Ge(t){return Q.format(t)}function fe(t,e){return t.unavailableReason==="partial_team"?e("settings.infraBilling.partialTeam"):e("settings.infraBilling.billingUnavailable")}function Ze(t){const e=k.c(13),{team:n,showSites:l}=t,o=Z(),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(L,{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(Ye,{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 Ye(t){const e=k.c(40),{invoices:n}=t,l=Z();let o;e[0]!==n?(o=n.some(Ke),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(We,{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 Ke(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 We(t){const e=k.c(14),{status:n}=t,l=Z(),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(L,{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(L,{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(L,{variant:"warning",children:i}),e[10]=i,e[11]=a):a=e[11],a}let f;return e[12]!==n?(f=s.jsx(L,{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 Bt(){const t=k.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Le,{capability:"members:manage",area:"billing",children:s.jsx(Xe,{})}),t[0]=e):e=t[0],e}export{Bt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as B,r as C,b as G,j as h,t as A,a7 as ye,x as xe,aU as ke,w as we,B as be,v as Pe,D as Ce,q as le,a6 as ce,K as Y,E as Q,gl as ue,gm as re,gn as z,m as _e}from"./index-_v_cX_Uz.js";import{S as de,s as Se}from"./suggestion-CX1YVdIt.js";import{K as Fe,t as De,A as Ie,p as J,L as ve,P as ne,O as je,k as Me,a as Le,Q as Re,o as Ee,l as Ae,F as Ne,s as Te,E as Qe}from"./usage-stats-BeZTZSlb.js";import{aJ as Oe}from"./agent-icon-1xBXRQD0.js";import"./chat-context-SiB3iaPb.js";import{m as Ue,i as $e,b as qe}from"./index-zfbeX5vo.js";import{u as me}from"./use-mcp-client--6E0VdQ1.js";import{u as Ke}from"./repository-binding-CaMbcDLV.js";import{g as se,a as fe}from"./gateway-client-MCgSJtiT.js";import{l as oe,g as pe}from"./use-mcp-prompts-DZL7WNWx.js";import{f as ze,b as Je}from"./use-org-fs-elhmqDGC.js";async function Be(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 He(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=B.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 Be(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,S)=>He(d,b,S,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of S){const I=v.getAsFile();I&&(await l.current?.(I,_),_=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=B.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 S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,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=B.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=B.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),S=C.useRef(null),_=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"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){J(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);J(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 R=w.toLowerCase(),E=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[...E,...X]}if(K==="agents"){let R=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();R=R.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}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(E=>E.uri.toLowerCase().includes(R)||E.name?.toLowerCase().includes(R)||E.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 H;e[42]!==i?(H=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=H):H=e[43];const ee=H;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);J(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);J(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};J(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=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),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.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)){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)}},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:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.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:()=>Je(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}),Se.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=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-[14px] max-md: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 _t(t){const e=B.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 S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("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]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=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]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,Be as p,Pt as u};
|
|
1
|
+
import{c as B,r as C,b as G,j as h,t as A,a7 as ye,x as xe,aU as ke,w as we,B as be,v as Pe,D as Ce,q as le,a6 as ce,K as Y,E as Q,gl as ue,gm as re,gn as z,m as _e}from"./index-DE4EwBpT.js";import{S as de,s as Se}from"./suggestion-D-Hgwid9.js";import{K as Fe,t as De,A as Ie,p as J,L as ve,P as ne,O as je,k as Me,a as Le,Q as Re,o as Ee,l as Ae,F as Ne,s as Te,E as Qe}from"./usage-stats-DG6FopRE.js";import{aJ as Oe}from"./agent-icon-Bb60OQqy.js";import"./chat-context-BblIzbHl.js";import{m as Ue,i as $e,b as qe}from"./index-DFnZwjzs.js";import{u as me}from"./use-mcp-client-DwDXV1MV.js";import{u as Ke}from"./repository-binding-DOi5asb9.js";import{g as se,a as fe}from"./gateway-client-Cu1gfZuC.js";import{l as oe,g as pe}from"./use-mcp-prompts-DxYkfcVh.js";import{f as ze,b as Je}from"./use-org-fs-BXDltZ6L.js";async function Be(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 He(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=B.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 Be(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,S)=>He(d,b,S,(_,v)=>l.current(_,v)),handlePaste:(d,b)=>{const F=b.clipboardData?.items;if(!F)return!1;const S=Array.from(F).filter(We);return S.length===0?!1:(b.preventDefault(),(async()=>{let _=d.state.selection.from;for(const v of S){const I=v.getAsFile();I&&(await l.current?.(I,_),_=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=B.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 S=r?.modelName??"";let _;e[19]!==i||e[20]!==S?(_=i("chat.uploader.accepts",{modelName:S}),e[19]=i,e[20]=S,e[21]=_):_=e[21];let v;e[22]!==_?(v=h.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:_}),e[22]=_,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=B.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=B.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),S=C.useRef(null),_=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"&&(_.current=!0),w.kind==="category")return d(w.name==="agents"?"agents":"resources"),!1;if(w.kind==="agent"&&w.agentId){J(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);J(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 R=w.toLowerCase(),E=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[...E,...X]}if(K==="agents"){let R=g.filter(E=>E.status==="active"&&(!E.id||!re(E.id))&&E.id!==s);if(w.trim()){const E=w.toLowerCase();R=R.filter(X=>X.title.toLowerCase().includes(E)||X.description?.toLowerCase().includes(E))}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(E=>E.uri.toLowerCase().includes(R)||E.name?.toLowerCase().includes(R)||E.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 H;e[42]!==i?(H=U=>{if(i&&(i.current=U),U)S.current=Date.now(),_.current=!1,Q("chat_picker_opened",{picker:"@"});else{const w=S.current;Q("chat_picker_closed",{picker:"@",outcome:_.current?"selected":"dismissed",duration_ms:w?Date.now()-w:null}),S.current=null,d("categories")}},e[42]=i,e[43]=H):H=e[43];const ee=H;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);J(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);J(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};J(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=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),A.error(s("chat.mentionSlash.failedLoadPrompt"))}});const F=C.useRef(null),S=C.useRef(!1),_=async({item:a,range:f})=>{if(Q("chat_picker_item_selected",{picker:"/",item_kind:a.kind,item_name:a.name}),S.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)){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)}},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:_,onOpenChange:a=>{if(r&&(r.current=a),a)F.current=Date.now(),S.current=!1,Q("chat_picker_opened",{picker:"/"});else{const f=F.current;Q("chat_picker_closed",{picker:"/",outcome:S.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:()=>Je(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}),Se.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=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-[14px] max-md: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 _t(t){const e=B.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 S;e[3]!==k||e[4]!==b||e[5]!==F?(S=_e("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]=S):S=e[6];let _;e[7]!==n||e[8]!==S?(_=h.jsx(Qe,{editor:n,className:S}),e[7]=n,e[8]=S,e[9]=_):_=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]!==_?(f=h.jsxs(h.Fragment,{children:[_,I,D,a]}),e[24]=I,e[25]=D,e[26]=a,e[27]=_,e[28]=f):f=e[28],f}export{Ct as T,bt as U,_t as a,Be as p,Pt as u};
|