decocms 4.594.0 → 4.594.1
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-kHXzu73r.js → AlertCircle-CngNmW3n.js} +1 -1
- package/dist/client/assets/{AreaChart-CJxx8aiG.js → AreaChart-w2QCUzTm.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DcKid1bz.js → ArrowLeft-7wIIyF4Y.js} +1 -1
- package/dist/client/assets/{ArrowRight-ajc9j6D-.js → ArrowRight-Dyuh-rXZ.js} +1 -1
- package/dist/client/assets/{ArrowUp-CjAvmMLL.js → ArrowUp-C9hRfWJJ.js} +1 -1
- package/dist/client/assets/{BookOpen01-CdH9hkvz.js → BookOpen01-Bov9QL4X.js} +1 -1
- package/dist/client/assets/{CartesianChart-BRKqG5iH.js → CartesianChart-DZFTbe0Q.js} +1 -1
- package/dist/client/assets/{CategoricalChart-DW_7VziR.js → CategoricalChart-BJA3WMzp.js} +1 -1
- package/dist/client/assets/{CheckCircle-DG9pUM8a.js → CheckCircle-C0mDI2jO.js} +1 -1
- package/dist/client/assets/{ChevronDown-CWnE_Wmz.js → ChevronDown-Cz82ih9S.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-ByCpNum0.js → ChevronSelectorVertical-B_wf9OPd.js} +1 -1
- package/dist/client/assets/{ChevronUp-C_rAiuf1.js → ChevronUp-CLsy4_cr.js} +1 -1
- package/dist/client/assets/{CreditCard01-C6eDo3p0.js → CreditCard01-C7XdJQOf.js} +1 -1
- package/dist/client/assets/{Eye-DFeDq2Hx.js → Eye-BoMcImel.js} +1 -1
- package/dist/client/assets/{File02-R0RW2VCN.js → File02-BmbcQ1JX.js} +1 -1
- package/dist/client/assets/{Fingerprint04-D-EFj_6a.js → Fingerprint04-CeWGcIpe.js} +1 -1
- package/dist/client/assets/{Globe04-DudUQgTy.js → Globe04-_51WnfFJ.js} +1 -1
- package/dist/client/assets/{Image01-Dfaw0Ysf.js → Image01-nL5rafgN.js} +1 -1
- package/dist/client/assets/{Key01-9JQCF719.js → Key01-DPEcpDw6.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B-cVGLzN.js → LayoutLeft-DFrTynS3.js} +1 -1
- package/dist/client/assets/{LinkBroken01-CpDM6pG5.js → LinkBroken01-BPaKcMJ1.js} +1 -1
- package/dist/client/assets/{MessageCircle01-44De_8cO.js → MessageCircle01-DEwhGd-N.js} +1 -1
- package/dist/client/assets/{Minus-09UkIbMe.js → Minus-CZtTY14n.js} +1 -1
- package/dist/client/assets/{Monitor01-BPQw3JGv.js → Monitor01-Dzk9r8YI.js} +1 -1
- package/dist/client/assets/{Play-BRDYCYl7.js → Play-BNkIfSsq.js} +1 -1
- package/dist/client/assets/{Plus-BJfG2DpW.js → Plus-WQeLSh07.js} +1 -1
- package/dist/client/assets/{ReferenceLine-KUFosDOj.js → ReferenceLine-Kl_nxn9t.js} +1 -1
- package/dist/client/assets/{SearchMd-DioGBYbO.js → SearchMd-CrM5HGUz.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CdQhBv_H.js → ShoppingBag01-Dvi8noNw.js} +1 -1
- package/dist/client/assets/{Sun-U7FHkItb.js → Sun-BUSaNVU-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-sPBj-OL8.js → SwitchHorizontal01-HaaMuIs0.js} +1 -1
- package/dist/client/assets/{Tool01-BEo5XKkS.js → Tool01-9Nk8XcOI.js} +1 -1
- package/dist/client/assets/{Tooltip-2A3BALIx.js → Tooltip--i_yceGL.js} +1 -1
- package/dist/client/assets/{Trash01-l4iOtEBN.js → Trash01-By8obgKt.js} +1 -1
- package/dist/client/assets/{TrendUp01-aviiZW6M.js → TrendUp01-D-BYwryf.js} +1 -1
- package/dist/client/assets/{Upload01-BhvyPM8u.js → Upload01-BPnZnmHF.js} +1 -1
- package/dist/client/assets/{UserCheck01-B1rJ65So.js → UserCheck01-CuByTN5F.js} +1 -1
- package/dist/client/assets/{UserSquare-D44lppb_.js → UserSquare-T90Jaoc-.js} +1 -1
- package/dist/client/assets/{Users01-CxQycal6.js → Users01-D1-vaLa3.js} +1 -1
- package/dist/client/assets/{XClose-BwokcWjs.js → XClose-Bomoew3H.js} +1 -1
- package/dist/client/assets/{Zap-DoXbwvKP.js → Zap-lo-lOcPp.js} +1 -1
- package/dist/client/assets/{access-gate-Cb6wrWbo.js → access-gate-D9gT0mCZ.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-AJ93ohYz.js → add-connection-dialog-Bn6L9Ywx.js} +1 -1
- package/dist/client/assets/agent-app-BBl0rE0n.js +1 -0
- package/dist/client/assets/{agent-assets-BjERacII.js → agent-assets-BLuZ1J0l.js} +1 -1
- package/dist/client/assets/{agent-automation-lPIiQ1-S.js → agent-automation-C0jF6GoO.js} +1 -1
- package/dist/client/assets/{agent-automations-DChAwthU.js → agent-automations-CIknlYgn.js} +1 -1
- package/dist/client/assets/agent-blog-Dz0ZGfFq.js +2 -0
- package/dist/client/assets/agent-blog-post-r0FRVJ6G.js +2 -0
- package/dist/client/assets/{agent-calendar-DVTbFVx4.js → agent-calendar-eiAtEeXX.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CJLhsDjp.js → agent-capabilities-DWZ6HVp_.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-BUkRDeee.js → agent-connect-sources-tGjfqQgF.js} +1 -1
- package/dist/client/assets/agent-deck-Bhm8TGFo.js +1 -0
- package/dist/client/assets/{agent-e2e-DBAmX-ay.js → agent-e2e-ba5rV3St.js} +1 -1
- package/dist/client/assets/agent-experiments-D8dPEPBA.js +1 -0
- package/dist/client/assets/agent-file-n_x6LXzO.js +1 -0
- package/dist/client/assets/{agent-hosting-KJs4AVma.js → agent-hosting-D6vOkjJV.js} +1 -1
- package/dist/client/assets/{agent-icon-BS6RPQ_A.js → agent-icon-zvo6Zsex.js} +1 -1
- package/dist/client/assets/agent-library-BM2Fah9h.js +1 -0
- package/dist/client/assets/agent-library-file-BO40iakQ.js +1 -0
- package/dist/client/assets/agent-overview-CJRKK7hh.js +1 -0
- package/dist/client/assets/{agent-releases-BwIrRp2G.js → agent-releases-CjP_903O.js} +1 -1
- package/dist/client/assets/agent-settings-CE2XV9z9.js +1 -0
- package/dist/client/assets/{agent-site-editor-CyUzqfPD.js → agent-site-editor-CRCOwi7y.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-1w7lcxGQ.js +2 -0
- package/dist/client/assets/agent-site-editor-content-BU4N-bBf.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-D9XYlGea.js +1 -0
- package/dist/client/assets/agent-view-B4jYgL5h.js +1 -0
- package/dist/client/assets/{agent-view-guard-dXJW4cSq.js → agent-view-guard-DupPwYUR.js} +1 -1
- package/dist/client/assets/{ai-providers-CoJXv_AA.js → ai-providers-P9lSOFin.js} +1 -1
- package/dist/client/assets/{alert-hKxZXEZZ.js → alert-QfzOpdUg.js} +1 -1
- package/dist/client/assets/{analytics-sections-D8qsQ7bM.js → analytics-sections-at8BigEj.js} +1 -1
- package/dist/client/assets/api-keys-BoLbPekZ.js +1 -0
- package/dist/client/assets/{api-keys-BpcBSUmB.js → api-keys-yj-YvHdL.js} +1 -1
- package/dist/client/assets/app-editor-CALR-Eh0.js +1 -0
- package/dist/client/assets/{asset-utils-CdU3Ttfs.js → asset-utils-BDYUvtkF.js} +1 -1
- package/dist/client/assets/{auth-C3yWOKhG.js → auth--2gxCib9.js} +1 -1
- package/dist/client/assets/{auth-catchall-DheSxLuf.js → auth-catchall-BwHg1hCN.js} +1 -1
- package/dist/client/assets/{auth-entry-C5exDM0H.js → auth-entry-8MjIvWkA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Hg6hlPX8.js → auth-split-layout-DP2m0wm-.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CIyQIb0N.js → authenticate-and-persist-oauth-GGQFCWKI.js} +1 -1
- package/dist/client/assets/{automation-list-row-BYtaYJm7.js → automation-list-row-BJoBOS8m.js} +1 -1
- package/dist/client/assets/{automation-runs-DvuKFaor.js → automation-runs-ComF4nUM.js} +1 -1
- package/dist/client/assets/{automations-D70iF6cO.js → automations-C5fxNUIr.js} +1 -1
- package/dist/client/assets/{badge-wWozseh3.js → badge-Di6qp_17.js} +1 -1
- package/dist/client/assets/{block-document-CQOXOWIP.js → block-document-D7KablrH.js} +3 -3
- package/dist/client/assets/{blocks-preview-workspace-context-BmhSK0mg.js → blocks-preview-workspace-context-JYcUL0TS.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-CDYT4Ypi.js → blocks-tab-states-D8VyxdkW.js} +1 -1
- package/dist/client/assets/blog-preview-url-DwcMPB8a.js +1 -0
- package/dist/client/assets/blog-schema-Dhm1FJA9.js +1 -0
- package/dist/client/assets/blog-source-gate-B93Jk1n3.js +1 -0
- package/dist/client/assets/{blog-view-gate-WETs9z4-.js → blog-view-gate-BDjHkxlS.js} +1 -1
- package/dist/client/assets/{buckets-BcxYNwzK.js → buckets-DAeP-NAt.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BpGLSKmi.js → build-improve-prompt-doc-WLZ-Q0Fx.js} +1 -1
- package/dist/client/assets/{calendar-Sr3cNZGh.js → calendar-CqkLsAo9.js} +1 -1
- package/dist/client/assets/{capability-load-error-Cwe4uK-x.js → capability-load-error-j4JpxktV.js} +1 -1
- package/dist/client/assets/category-editor-BblvA1zP.js +1 -0
- package/dist/client/assets/category-tree-DSsAlLjn.js +18 -0
- package/dist/client/assets/{chart-D0It11Pz.js → chart-BZy9kWyI.js} +1 -1
- package/dist/client/assets/{chat-context-B6UvvRRf.js → chat-context-CxkYg5uT.js} +1 -1
- package/dist/client/assets/{chat-draft-D0WJnhz_.js → chat-draft-DzaoNZT_.js} +1 -1
- package/dist/client/assets/{checkbox-Cs2Li62P.js → checkbox-C-dWRGEo.js} +1 -1
- package/dist/client/assets/{choose-editor-Cwvr5cPX.js → choose-editor-DS4c61th.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DjQMGZUD.js → cli-auth-success-DV77yJjs.js} +1 -1
- package/dist/client/assets/cms-settings-editor-DaqJeGro.js +1 -0
- package/dist/client/assets/{cms-store-drafts-DDk2L1_s.js → cms-store-drafts-5dkWWhlw.js} +1 -1
- package/dist/client/assets/{collapsible-D4n-ssmc.js → collapsible-BSD-rIyq.js} +1 -1
- package/dist/client/assets/{collection-detail-CWZme-FJ.js → collection-detail-wkxjhC55.js} +1 -1
- package/dist/client/assets/{collection-display-button--oxelZ8R.js → collection-display-button-JBmYQ-27.js} +1 -1
- package/dist/client/assets/{collection-search-CDDauqCr.js → collection-search-BpNjeFlC.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B8osPBIm.js → collection-table-wrapper-BmrrNnjL.js} +1 -1
- package/dist/client/assets/{collection-tabs-B1EmRyNS.js → collection-tabs-CmuugrOY.js} +1 -1
- package/dist/client/assets/{combobox-LL4GsRoi.js → combobox-D_fSr7_C.js} +1 -1
- package/dist/client/assets/{command-DQwD4jPt.js → command-CwP4XJhp.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-aZ0yAV9m.js → companion-mcps-section-CG0lncr5.js} +1 -1
- package/dist/client/assets/{config-zmlExYow.js → config-4NBdyaeh.js} +1 -1
- package/dist/client/assets/{connect-C2FkNxOj.js → connect-ChCcHtpb.js} +1 -1
- package/dist/client/assets/{connect-key-MUQgzDUZ.js → connect-key-CJ6TvBP8.js} +1 -1
- package/dist/client/assets/{connect-layout-C10vBM31.js → connect-layout-DTpwfpPI.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-DZFw66w3.js → connect-source-dialog-_ChBZ2Vd.js} +1 -1
- package/dist/client/assets/{connection-B7vXPxEB.js → connection-DezKWiQc.js} +1 -1
- package/dist/client/assets/{connection-card-DqrVYaVF.js → connection-card-CxiJ1Nzx.js} +1 -1
- package/dist/client/assets/{connection-detail-BhmikSW0.js → connection-detail-CYCmhAUL.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CipIPASt.js → connection-form-helpers-UXeTmEmu.js} +1 -1
- package/dist/client/assets/{connection-slug-DgGnB6qk.js → connection-slug-DWaKdRBx.js} +1 -1
- package/dist/client/assets/{connections-BH6dclGQ.js → connections-Bc9bEkOC.js} +1 -1
- package/dist/client/assets/{content-tab-CMouaD3S.js → content-tab-ChWZ09d_.js} +4 -4
- package/dist/client/assets/{context-BXIwVeKt.js → context-1XEBvNOV.js} +1 -1
- package/dist/client/assets/{context-menu-BTcjoIYF.js → context-menu-haKBWhFK.js} +1 -1
- package/dist/client/assets/{context-shell-Bh2U1zxs.js → context-shell-DApzBqkB.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-Dbp2Y7NH.js → create-organization-dialog-BXvqxw2I.js} +1 -1
- package/dist/client/assets/{daily-pulse-BiRUE30R.js → daily-pulse-Dpm7YKyw.js} +1 -1
- package/dist/client/assets/{delete-copy-BH5xrx9H.js → delete-copy-L_pixdww.js} +2 -2
- package/dist/client/assets/{device-hint-CMC1mr9e.js → device-hint-DfNddHqx.js} +1 -1
- package/dist/client/assets/{discover-DN_s50Be.js → discover-CDF3_FOL.js} +1 -1
- package/dist/client/assets/{domain-settings-DBexbsXu.js → domain-settings-SR0-GydA.js} +1 -1
- package/dist/client/assets/{drawer-BMY0wk6r.js → drawer-CmJXwXhP.js} +1 -1
- package/dist/client/assets/{editor-classes-BygI_Lvg.js → editor-classes-C_k7lpha.js} +1 -1
- package/dist/client/assets/{editor-C6mSxTrt.js → editor-stZYyxdg.js} +1 -1
- package/dist/client/assets/{empty-state-C4vGG4yC.js → empty-state-BP4JRDLR.js} +1 -1
- package/dist/client/assets/{empty-state-hp9a4BQn.js → empty-state-DlNabApi.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-a808JseX.js → experiments-tab-choice-DZp7Pnbi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-B_eUCQ7e.js → extract-connection-data-CzqnFJl9.js} +1 -1
- package/dist/client/assets/{feature-gate-DtqeHOu4.js → feature-gate-C_eiJnqB.js} +1 -1
- package/dist/client/assets/{feature-paywall-BGOy9Z00.js → feature-paywall-CBOn7yV2.js} +1 -1
- package/dist/client/assets/{file-explorer-q1C_0Dfl.js → file-explorer-BrZ-CG01.js} +1 -1
- package/dist/client/assets/{file-preview-Cid_-Y34.js → file-preview-PTP8hmPn.js} +1 -1
- package/dist/client/assets/{file-share-button-eK3lxbyf.js → file-share-button-BegoNidK.js} +1 -1
- package/dist/client/assets/{file-type-icon-DOJ02s9h.js → file-type-icon-M87xyG0K.js} +1 -1
- package/dist/client/assets/{folder-icon-4Pb3O8qn.js → folder-icon-Dcx7O7hC.js} +1 -1
- package/dist/client/assets/{form-BZ2nSi_9.js → form-CJTkS9yd.js} +1 -1
- package/dist/client/assets/{frame-navigation-C3j5rPCM.js → frame-navigation-BZ8W_2dq.js} +1 -1
- package/dist/client/assets/{gateway-client-8UpI_Rdq.js → gateway-client-zPU6BhGI.js} +1 -1
- package/dist/client/assets/{general-bkCbo1TA.js → general-CvWpV1rC.js} +1 -1
- package/dist/client/assets/{github-icon-C-V2EETw.js → github-icon-D3IlXxDN.js} +1 -1
- package/dist/client/assets/{held-block-view-xCVzC3Lr.js → held-block-view-CEue5DyE.js} +1 -1
- package/dist/client/assets/{home-Dgh1Wb3u.js → home-CBhOYnUz.js} +1 -1
- package/dist/client/assets/{home-overview-CzbNLHJq.js → home-overview-nMDmkNSh.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DS6ZmO5s.js → hosted-reconcile-CC64pDxA.js} +1 -1
- package/dist/client/assets/{icon-button-CFamiizZ.js → icon-button-C9InOUgM.js} +1 -1
- package/dist/client/assets/{index-B4YS6GMo.js → index-B6vsr4i3.js} +1 -1
- package/dist/client/assets/{index-BFjuxezw.js → index-B8ZkvDME.js} +1 -1
- package/dist/client/assets/{index-GMDFirHC.js → index-BIBRRoOW.js} +1 -1
- package/dist/client/assets/{index-CqlRRF6p.js → index-BPvzZzln.js} +1 -1
- package/dist/client/assets/{index-6V91lP75.js → index-C-bUN66r.js} +1 -1
- package/dist/client/assets/{index-CJQHYkKb.js → index-CY-w4kYr.js} +1 -1
- package/dist/client/assets/{index-B9tCllzH.js → index-Cdf0nHrK.js} +1 -1
- package/dist/client/assets/{index-DwIomefI.js → index-CiG92g6c.js} +1 -1
- package/dist/client/assets/{index-D_u7RJfU.js → index-CnFOA69K.js} +1 -1
- package/dist/client/assets/{index-BesTmknq.js → index-CyK1A-PV.js} +1 -1
- package/dist/client/assets/{index-D9WtqDmJ.js → index-D2FJssDQ.js} +1 -1
- package/dist/client/assets/{index-B-PIhH8l.js → index-Dy0Aphio.js} +1 -1
- package/dist/client/assets/{index-BYQu9U5P.js → index-OaQ5Wven.js} +1 -1
- package/dist/client/assets/{index-cjnTxfp5.js → index-g0fJQ3Ik.js} +1 -1
- package/dist/client/assets/{index-BeSn1lKu.js → index-hl8iFWLs.js} +1 -1
- package/dist/client/assets/{index--r4E_gW7.js → index-kPKwu4SB.js} +1 -1
- package/dist/client/assets/{index-BVZH8mqe.js → index-mb-jxjEy.js} +6 -6
- package/dist/client/assets/{index-redirect-BMGe_utm.js → index-redirect-Cc2j63PQ.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-f5kG4cIT.js → infiniteQueryObserver-Dfcni9SV.js} +1 -1
- package/dist/client/assets/{infra-billing-DaAfhBWg.js → infra-billing-BYZXmRJD.js} +1 -1
- package/dist/client/assets/{input-o0eNZBV4.js → input-BUC-cGry.js} +3 -3
- package/dist/client/assets/{input-A20A_mwu.js → input-DjfzIqsk.js} +1 -1
- package/dist/client/assets/{integration-icon-CcV5frEs.js → integration-icon-DRbGJhQo.js} +1 -1
- package/dist/client/assets/item-actions-CDU7n7Cr.js +1 -0
- package/dist/client/assets/{jira-icon-DlgPbK3F.js → jira-icon-DdgjDC_T.js} +1 -1
- package/dist/client/assets/{label-Dc_tSb6f.js → label-DFYaZzfV.js} +1 -1
- package/dist/client/assets/{layout-514nGx9I.js → layout-C1ShA0A2.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DtYrilLw.js → legacy-admin-welcome-dialog-C0rLwEhl.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DS7wnjib.js → legacy-agents-deep-0KD5AZ-a.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BQ-dfJNU.js → legacy-main-redirect-DsJJQAHz.js} +1 -1
- package/dist/client/assets/library-DKYFm9Uv.js +1 -0
- package/dist/client/assets/{library-tab-CZB0EHNl.js → library-tab-BttdbOwT.js} +1 -1
- package/dist/client/assets/{login-BVGV6SaO.js → login-DkrQRBM-.js} +1 -1
- package/dist/client/assets/{markdown-DvUyMKlV.js → markdown-B-EQMrBl.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CRu4PbUr.js → mcp-app-renderer-B8_THT37.js} +1 -1
- package/dist/client/assets/{mcp-oauth-CIY9YLWi.js → mcp-oauth-Cya-fh0P.js} +1 -1
- package/dist/client/assets/{mcp-oauth-NdGb5Zj9.js → mcp-oauth-_iPR8QjI.js} +1 -1
- package/dist/client/assets/{members-CgoGmOSR.js → members-BVOPoO_W.js} +1 -1
- package/dist/client/assets/{memory-BfzundeZ.js → memory-C23hLBrZ.js} +1 -1
- package/dist/client/assets/{mock-board-D8DOoo_p.js → mock-board-BcZu24PK.js} +3 -3
- package/dist/client/assets/{monaco-editor-C3D0iT4a.js → monaco-editor-DttATUsj.js} +1 -1
- package/dist/client/assets/{monitoring-BvN0RJq0.js → monitoring-CLDBgSzo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-By2SXcyl.js → monitoring-stats-row-CRxmylqh.js} +1 -1
- package/dist/client/assets/{multi-select-Dak9eW6K.js → multi-select-CSOG3KaA.js} +1 -1
- package/dist/client/assets/{mustache-CMgVEDUc.js → mustache-clchl4ci.js} +1 -1
- package/dist/client/assets/{named-rule-step-BnN-hlGb.js → named-rule-step-C-_N0SXT.js} +1 -1
- package/dist/client/assets/{named-rule-view-hUwolemN.js → named-rule-view-DrUf_Aau.js} +1 -1
- package/dist/client/assets/{new-project-dialog-BeD2i_Hm.js → new-project-dialog-KtG8l1yi.js} +1 -1
- package/dist/client/assets/{new-project-store-BfrY24D-.js → new-project-store-DDZH8miu.js} +1 -1
- package/dist/client/assets/{oauth-callback-CNqxDLu3.js → oauth-callback-B-J4rjBS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-0KF_xg3k.js → oauth-callback-ai-provider-DCheihxt.js} +1 -1
- package/dist/client/assets/{oauth-consent-li4JOhlZ.js → oauth-consent-P6jhSz87.js} +1 -1
- package/dist/client/assets/{onboarding-CzP4oXTn.js → onboarding-BoQQb_DJ.js} +1 -1
- package/dist/client/assets/{openai-conversation-BMsTp1zg.js → openai-conversation-BRIcN7ns.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-C29BxST1.js → optimistic-project-sidebar-views-BhBXjk9R.js} +1 -1
- package/dist/client/assets/{order-monitor-day-D910WxJ3.js → order-monitor-day-DEr2FQ1w.js} +1 -1
- package/dist/client/assets/{organization-choice-BhMXPFKX.js → organization-choice-NHrCNKHD.js} +1 -1
- package/dist/client/assets/{orgs-ZZqk-o74.js → orgs-oDKfi1NH.js} +1 -1
- package/dist/client/assets/{own-accounts-section-4_Hp7fJv.js → own-accounts-section-DfQklfiL.js} +1 -1
- package/dist/client/assets/{pair-C4tumP78.js → pair-CI1Rts6X.js} +1 -1
- package/dist/client/assets/{parse-sections-B5REiM5j.js → parse-sections-Cv7KSMgB.js} +3 -3
- package/dist/client/assets/{plan-vUNQzJtH.js → plan-DhBEXV7d.js} +1 -1
- package/dist/client/assets/{plan-ladder-BlcJL4hV.js → plan-ladder-Dn1mCpkd.js} +1 -1
- package/dist/client/assets/{plan-usage-card-DW3wLLQF.js → plan-usage-card-CoidaM8B.js} +1 -1
- package/dist/client/assets/{popover-9q-VKuQx.js → popover-D73VbCM5.js} +1 -1
- package/dist/client/assets/post-calendar-bB_dTysf.js +1 -0
- package/dist/client/assets/{post-editor-BUxXB6Uz.js → post-editor-DJgKYRYW.js} +2 -2
- package/dist/client/assets/{preview-content-aN9ghsH_.js → preview-content-g2WEpueQ.js} +1 -1
- package/dist/client/assets/{preview-dialog-DqNYRBay.js → preview-dialog-DEGn7q2O.js} +1 -1
- package/dist/client/assets/{preview-panel-DV1FaRUZ.js → preview-panel-BWh6T2ND.js} +1 -1
- package/dist/client/assets/preview-tab-BFrQickY.js +557 -0
- package/dist/client/assets/primitives-BHTaKbue.js +1 -0
- package/dist/client/assets/{product-picker-dialog-DVs_Kuee.js → product-picker-dialog-B1FnNY41.js} +1 -1
- package/dist/client/assets/{profile-DbdvfkDI.js → profile-KHrko28l.js} +1 -1
- package/dist/client/assets/{project-app-view-Cfrp6muY.js → project-app-view-CEsZ7pyQ.js} +1 -1
- package/dist/client/assets/{project-apps-z0dBtbP_.js → project-apps-BFfwYw5p.js} +1 -1
- package/dist/client/assets/{project-icon-C8Sq9Uyo.js → project-icon-Bl4IAncl.js} +1 -1
- package/dist/client/assets/{project-index-BOyydKXT.js → project-index-DyqPLhTf.js} +1 -1
- package/dist/client/assets/project-reports-Bo9Tf1zF.js +1 -0
- package/dist/client/assets/project-tasks-t-YvuQ_q.js +1 -0
- package/dist/client/assets/{projects-B5BvS56N.js → projects-D4oIfDMZ.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CDTj5tcd.js → projects-empty-state-PFeDurZg.js} +1 -1
- package/dist/client/assets/{prompts-DfS9pOYH.js → prompts-TmqmoJme.js} +1 -1
- package/dist/client/assets/record-editor-WmiU2d6T.js +1 -0
- package/dist/client/assets/redirect-editor-BlBcxP_z.js +1 -0
- package/dist/client/assets/reports-Cb0Mwz-u.js +1 -0
- package/dist/client/assets/{reports-C624VFLj.js → reports-DxGhEr3Y.js} +1 -1
- package/dist/client/assets/{reports-onboarding-_pxt1WkF.js → reports-onboarding-CM7YPxA7.js} +1 -1
- package/dist/client/assets/{reports-tab-BBmHq9vJ.js → reports-tab-DLrLzkx3.js} +2 -2
- package/dist/client/assets/{repositories-B7d9yCxo.js → repositories-67wiZj2r.js} +1 -1
- package/dist/client/assets/repositories-CDNeFlHK.js +1 -0
- package/dist/client/assets/{repository-binding-BIfwJXBl.js → repository-binding-w-FCDYuS.js} +1 -1
- package/dist/client/assets/{repository-picker-vN0XhyKR.js → repository-picker-DF0-TGsg.js} +1 -1
- package/dist/client/assets/{require-capability-B6_v4BKo.js → require-capability-7Xn2Fb3C.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BXbkUsYd.js → required-auth-layout-B1owCwtw.js} +1 -1
- package/dist/client/assets/{reset-password-DPvgQ5Qd.js → reset-password-BvZRYC01.js} +1 -1
- package/dist/client/assets/{resizable-AytQ6SyX.js → resizable-CJbr1Nyi.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BzV0wsYq.js → resolve-tab-icon-3aZJM1BR.js} +1 -1
- package/dist/client/assets/{review-settings-BTg5QElS.js → review-settings-CISstknV.js} +1 -1
- package/dist/client/assets/{role-color-CNGxunw8.js → role-color-CW1lGNZj.js} +1 -1
- package/dist/client/assets/{roles-DrWSfOhb.js → roles-D7rYnEMh.js} +1 -1
- package/dist/client/assets/route-CFBPrBcw.js +1 -0
- package/dist/client/assets/{route-BX1VK4D8.js → route-CPaIZZ88.js} +1 -1
- package/dist/client/assets/{route-IYkPM4iL.js → route-CT0-z-8-.js} +1 -1
- package/dist/client/assets/{route-page-header-DnxbH76I.js → route-page-header-CRzmHOKm.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-CvJPOlyv.js → sandbox-git-api-1xYJwdHB.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-CO9pd80k.js → sandbox-lifecycle-context-CxRkhFod.js} +1 -1
- package/dist/client/assets/{save-status-eUv6TQpr.js → save-status-Csuo4rYY.js} +1 -1
- package/dist/client/assets/{schema-C2ft4i4u.js → schema-BluyjH2z.js} +1 -1
- package/dist/client/assets/{schema-CATZG76m.js → schema-DU3GC-Ez.js} +1 -1
- package/dist/client/assets/{scroll-area-w9_Bvwmf.js → scroll-area-D9mVov2B.js} +1 -1
- package/dist/client/assets/{search-input-D3b0Dc5Y.js → search-input-D-gp-h4P.js} +1 -1
- package/dist/client/assets/{search-toggle-DBEAkZhz.js → search-toggle-C1j-Ki1u.js} +1 -1
- package/dist/client/assets/{secret-picker-CVfi84wZ.js → secret-picker-BoQX39kK.js} +1 -1
- package/dist/client/assets/{secrets-Bxh8ZQN1.js → secrets-BZwPjTxC.js} +1 -1
- package/dist/client/assets/section-array-field-4siTAXTX.js +1 -0
- package/dist/client/assets/{sections-BS4WKjIk.js → sections-Cwqt7k6K.js} +1 -1
- package/dist/client/assets/sections-editor-B2wYNbjz.js +1 -0
- package/dist/client/assets/{select-BJ7g3jt1.js → select-DnlDCB9E.js} +1 -1
- package/dist/client/assets/{select-model-CIoiyBbQ.js → select-model-Cm1Kbu8h.js} +1 -1
- package/dist/client/assets/seo-editor-DbLTH9Vw.js +1 -0
- package/dist/client/assets/{separator-DUnD5wBI.js → separator-DsSANYB0.js} +1 -1
- package/dist/client/assets/{session-runtime-CRv5j4jh.js → session-runtime-D2GKulko.js} +1 -1
- package/dist/client/assets/settings-tab-CSzHYez6.js +1 -0
- package/dist/client/assets/{sheet-B1zTFenO.js → sheet-Ctckoytn.js} +1 -1
- package/dist/client/assets/{shell-layout-BT6RZJ9X.js → shell-layout-BS_Y65pV.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BhvNLFOt.js → site-draft-actions-BZf0yVqo.js} +1 -1
- package/dist/client/assets/{site-draft-view-D89p35uK.js → site-draft-view-NypTEK1x.js} +1 -1
- package/dist/client/assets/site-editor-BbPLQWC_.js +1 -0
- package/dist/client/assets/{site-editor-toast-vvVLBG6s.js → site-editor-toast-DfzFv4iY.js} +1 -1
- package/dist/client/assets/{skills-C22XOkU8.js → skills-2_Ugx28k.js} +1 -1
- package/dist/client/assets/{slider-46E0vJw8.js → slider-Bqy5W8RM.js} +1 -1
- package/dist/client/assets/{sortable.esm-BzU9NXcP.js → sortable.esm-Cl-YQgc8.js} +1 -1
- package/dist/client/assets/{sso-zNrVMXEh.js → sso-CdbJh-Eu.js} +1 -1
- package/dist/client/assets/{suggestion-B9N6oqkG.js → suggestion-BoV2NIg6.js} +1 -1
- package/dist/client/assets/{super-agent-icon-AyK0wzxQ.js → super-agent-icon-CDA5EiNS.js} +1 -1
- package/dist/client/assets/{switch-BX8b8tB6.js → switch--3C-A5oU.js} +1 -1
- package/dist/client/assets/{synced-repos-DS_Rsdst.js → synced-repos-BpiKoBMD.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-DpR7ri7q.js → tab-icon-glyph-CEoTzCNL.js} +1 -1
- package/dist/client/assets/{table-DNvSx4nT.js → table-Cy5fo0ER.js} +1 -1
- package/dist/client/assets/{tabs-ClkuSww4.js → tabs-DJ6SkMve.js} +1 -1
- package/dist/client/assets/{task-board-DLNmAHmR.js → task-board-CShHcm1L.js} +1 -1
- package/dist/client/assets/{task-key-BjUMQvHV.js → task-key-BP2--GY6.js} +1 -1
- package/dist/client/assets/{task-route-B6gZ9LxC.js → task-route-BDNP9yC7.js} +1 -1
- package/dist/client/assets/{task-status-CvKutQFi.js → task-status-GPS8HLw1.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-BgegxTfw.js → taskboard-analytics-DPlKE9oq.js} +1 -1
- package/dist/client/assets/tasks-Coh8-0jv.js +1 -0
- package/dist/client/assets/{tasks-VtqJyf5J.js → tasks-DQ5zrDt3.js} +1 -1
- package/dist/client/assets/{textarea-BnYcD_gb.js → textarea-BCGFjA5F.js} +1 -1
- package/dist/client/assets/{thread-analytics-CHgBpfHv.js → thread-analytics-B5IqH-5A.js} +1 -1
- package/dist/client/assets/{thread-button-Cra7mRSW.js → thread-button-Dw70OEJl.js} +1 -1
- package/dist/client/assets/{thread-intent-CYNXEfHP.js → thread-intent-BQWCtBA_.js} +1 -1
- package/dist/client/assets/{thread-route-muzc431X.js → thread-route-DRsKlO-E.js} +1 -1
- package/dist/client/assets/{thread-route-D00Shirq.js → thread-route-Dix8r-rB.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-B4d3KSH7.js → thread-sheet-body-iwOtv26B.js} +1 -1
- package/dist/client/assets/{time-range-picker-BzLGuV9Q.js → time-range-picker-CUAzqD4s.js} +1 -1
- package/dist/client/assets/{toggle-group-Cu3LE1oL.js → toggle-group-jkikwCcL.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DpIP2fev.js → tool-set-selector-Clh56c6v.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Bo8OSaqx.js → toolbar-icon-button-DcIFSTOI.js} +1 -1
- package/dist/client/assets/{tooltip-CfeBMv8z.js → tooltip-DCzbfwd7.js} +1 -1
- package/dist/client/assets/{tooltipContext-BMU8k-Rs.js → tooltipContext-2wUW4UR-.js} +1 -1
- package/dist/client/assets/{track-DWmwuKVj.js → track-D4IkVAbh.js} +1 -1
- package/dist/client/assets/{types-D_vNw-3-.js → types-BQYXFpO6.js} +1 -1
- package/dist/client/assets/{url-slug-BOPVIawN.js → url-slug-E3otz4_J.js} +1 -1
- package/dist/client/assets/{usage-stats-Dzci2XGy.js → usage-stats-CiB8uQLm.js} +1 -1
- package/dist/client/assets/{use-ai-providers-C30oeluP.js → use-ai-providers-CTbi7eSd.js} +1 -1
- package/dist/client/assets/{use-api-keys-CK1ZH-th.js → use-api-keys-CuxnpyDB.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DGYGOn-1.js → use-apply-named-rule-BroFciug.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-vlpFfAp7.js +1 -0
- package/dist/client/assets/{use-automations-CtbjaE6m.js → use-automations-BdniAcmH.js} +1 -1
- package/dist/client/assets/{use-autosave-Bpr4B2YO.js → use-autosave-C9MsBAi1.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BloQ91Xb.js +1 -0
- package/dist/client/assets/use-blog-view-Bi3aoju6.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-DBVzfsNg.js → use-chat-layout-state-77HNlix_.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-CWkUAckV.js → use-cms-publish-actions-DGO40mZ2.js} +1 -1
- package/dist/client/assets/{use-connect-companion-iGJRty2G.js → use-connect-companion-BkEQhdBC.js} +1 -1
- package/dist/client/assets/{use-connection-C-m8b2Fk.js → use-connection-DxwzNo03.js} +1 -1
- package/dist/client/assets/{use-content-sync-BJ7PE3PC.js → use-content-sync-C9H2kDwl.js} +1 -1
- package/dist/client/assets/{use-copy-BHPkBnZF.js → use-copy-DSNmvH9L.js} +1 -1
- package/dist/client/assets/{use-current-view-CHhVzMwk.js → use-current-view-DvszbK0Z.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Cn791fqZ.js → use-date-fns-locale-BSsydU_s.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-C6OCZte6.js → use-debounced-autosave-D6iRm-Vv.js} +1 -1
- package/dist/client/assets/{use-debounced-value-By7KggQt.js → use-debounced-value-CAOKwJaL.js} +1 -1
- package/dist/client/assets/{use-deco-credits-19cW8oHb.js → use-deco-credits-DnZKzVHP.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BxfGa0_j.js → use-decopilot-events-BhcT5RAV.js} +1 -1
- package/dist/client/assets/{use-delete-block-3AD9rKWc.js → use-delete-block-Bd0Db3-p.js} +1 -1
- package/dist/client/assets/{use-delete-connection-Cma0d5Z7.js → use-delete-connection-BMDl_PP-.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-COmgwPUq.js → use-deployment-admin-DCWHLNad.js} +1 -1
- package/dist/client/assets/{use-entitlements-B8D7pawV.js → use-entitlements-CzwT7L5B.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-BQhDGlp9.js → use-fast-preview-draft-url-DbEjmD3f.js} +1 -1
- package/dist/client/assets/{use-file-configs-CCo70YSN.js → use-file-configs-yKe4yLHn.js} +1 -1
- package/dist/client/assets/{use-id-selection-BOT74h8X.js → use-id-selection-DmcvY3GI.js} +1 -1
- package/dist/client/assets/{use-in-settings-qQ2sbeu5.js → use-in-settings-BTBVzmbg.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-CIBoyRh8.js → use-inbox-feed-BOy7gIMv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ct_PbHT3.js → use-infinite-scroll-DnhPBPks.js} +1 -1
- package/dist/client/assets/{use-join-requests-CbaI0xCz.js → use-join-requests-C0zVtdAh.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-CPcNwsEn.js → use-main-panel-tabs-BCg6GLFm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BfHI4tpd.js → use-mcp-auth-status-BZRJODR4.js} +1 -1
- package/dist/client/assets/{use-mcp-client-7NPwItGN.js → use-mcp-client-4k5JKqzF.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C7QHdaI_.js → use-mcp-prompts-pJuJ9yii.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DqnFukoV.js → use-mcp-tools-Dh4scI4V.js} +1 -1
- package/dist/client/assets/{use-mobile-5e0sSd3X.js → use-mobile-CBwmaBFU.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Cqt9Q8CZ.js → use-move-blocks-D8MFSTf7.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CtsEyeFb.js → use-navigate-to-agent-H87rWFYJ.js} +1 -1
- package/dist/client/assets/{use-never-published-BK3TeRer.js → use-never-published-Db-SviVk.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cq9dcDh3.js → use-org-fs-CbXrwKDd.js} +1 -1
- package/dist/client/assets/{use-org-notice-Dvph2j3S.js → use-org-notice-BLDWm2ef.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CCuZhNZU.js → use-org-repo-syncs-BLfbsB0Y.js} +1 -1
- package/dist/client/assets/{use-org-sso-BKXSOEb_.js → use-org-sso-Cfy5SkJ5.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BoOQOwrg.js → use-organization-settings-UrGbnM2k.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-DPGDB1T1.js → use-panel-navigate-B5u6ws6M.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-SSp2DD_u.js → use-project-native-view-presence-Cww1Huve.js} +1 -1
- package/dist/client/assets/{use-project-scope-BIucgFKc.js → use-project-scope-Dydp2D08.js} +1 -1
- package/dist/client/assets/{use-recent-apps-4zSmjU-Q.js → use-recent-apps-B6ojF6fA.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DWL8tyP6.js → use-reports-diagnostic-EfyKTU1j.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-TxpzU2Iw.js → use-sandbox-events-DEHux0gs.js} +1 -1
- package/dist/client/assets/{use-secrets-CsCKmxLc.js → use-secrets-G3Yo5eAI.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BxFRvYUl.js → use-section-preview-base-C2ASOAPw.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DHFFs76T.js → use-sidebar-collapsed-DgMGLJyh.js} +1 -1
- package/dist/client/assets/{use-tags-aDaEeB96.js → use-tags-laGjgQqt.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-XXuDuH8s.js → use-task-board-analytics-Ct6FAXeB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-CLDgREI3.js → use-task-board-item-prs-BbVn1nYd.js} +1 -1
- package/dist/client/assets/{use-task-board-items-D4fdH47R.js → use-task-board-items-B_EMxvU9.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-DRYQb2DR.js → use-task-board-prompts-CE2PVOHH.js} +1 -1
- package/dist/client/assets/{use-task-metadata-CSvrbSt0.js → use-task-metadata-L0GKyc-x.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-CrNLjxTt.js → use-thread-outputs-B9502nWa.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-BG3Ihm6n.js → use-view-draft-kind-CZT4hOaN.js} +1 -1
- package/dist/client/assets/{use-voice-input-BspgCDOI.js → use-voice-input-Nzha8Za1.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-FxnnBp9W.js +1 -0
- package/dist/client/assets/{useQueries-DGhxO9Ry.js → useQueries-CQ0xJF7W.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CtWAJlQZ.js +1 -0
- package/dist/client/assets/{users-CC1uXfIH.js → users-C_-sgV42.js} +1 -1
- package/dist/client/assets/{utils-JVZxV40b.js → utils-pe9cqItP.js} +1 -1
- package/dist/client/assets/{variant-calendar-COAsXla8.js → variant-calendar-d5m67-k3.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-Dm9kjKRy.js → variant-matcher-override-DoPQRIHU.js} +1 -1
- package/dist/client/assets/{view-header-d4Obd__T.js → view-header-B0xV_oWh.js} +1 -1
- package/dist/client/assets/{virtual-mcp-TQWeP4ry.js → virtual-mcp-DN6fu9Nf.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-CWcYbOm5.js → watch-sse-pool-7J-tc7Ge.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BwabK-EN.js +0 -1
- package/dist/client/assets/agent-blog-BAFEHC3F.js +0 -2
- package/dist/client/assets/agent-blog-post-BfZLJHCc.js +0 -2
- package/dist/client/assets/agent-deck-FkIcljPu.js +0 -1
- package/dist/client/assets/agent-experiments-DDePdz1s.js +0 -1
- package/dist/client/assets/agent-file-Dq7RwOoN.js +0 -1
- package/dist/client/assets/agent-library-C06De_Om.js +0 -1
- package/dist/client/assets/agent-library-file-DZtwB2bP.js +0 -1
- package/dist/client/assets/agent-overview-3kq8I1YX.js +0 -1
- package/dist/client/assets/agent-settings-CQxH-SU4.js +0 -1
- package/dist/client/assets/agent-site-editor-code-lMnnKFV4.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BQ-pFVV_.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Dipnwf9A.js +0 -1
- package/dist/client/assets/agent-view-D74Nsx4n.js +0 -1
- package/dist/client/assets/api-keys-B9w3P2co.js +0 -1
- package/dist/client/assets/app-editor-DLwnlaqE.js +0 -1
- package/dist/client/assets/blog-preview-url-D1Gi50Jy.js +0 -1
- package/dist/client/assets/blog-schema-G_pvuSAo.js +0 -1
- package/dist/client/assets/blog-source-gate-Z08IMogx.js +0 -1
- package/dist/client/assets/category-editor-DZLdQENU.js +0 -1
- package/dist/client/assets/category-tree-oBVfCVRR.js +0 -4
- package/dist/client/assets/cms-settings-editor-h4wDmiSv.js +0 -1
- package/dist/client/assets/empty-message-B3ykEghT.js +0 -15
- package/dist/client/assets/item-actions-CZD9JeRy.js +0 -1
- package/dist/client/assets/library-Cy3CmAZa.js +0 -1
- package/dist/client/assets/post-calendar-Cw6GB31X.js +0 -1
- package/dist/client/assets/preview-tab-CNYeoSqY.js +0 -557
- package/dist/client/assets/project-reports-CN1JvK97.js +0 -1
- package/dist/client/assets/project-tasks-Cimkg6Js.js +0 -1
- package/dist/client/assets/record-editor-BC_pgxjj.js +0 -1
- package/dist/client/assets/redirect-editor-CJJivlqw.js +0 -1
- package/dist/client/assets/reports-BU9i6BvT.js +0 -1
- package/dist/client/assets/repositories-D-ngJeYU.js +0 -1
- package/dist/client/assets/route-DxNP7FKc.js +0 -1
- package/dist/client/assets/section-array-field-CkDPdYBe.js +0 -1
- package/dist/client/assets/sections-editor-CLaZ0j6X.js +0 -1
- package/dist/client/assets/seo-editor-C5CvtZIp.js +0 -1
- package/dist/client/assets/settings-tab-k_yzR7TC.js +0 -1
- package/dist/client/assets/site-editor-DO2-FIjd.js +0 -1
- package/dist/client/assets/tasks-BZlAEaTY.js +0 -1
- package/dist/client/assets/use-ask-in-chat-Cp6wJI2T.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-DUe21BCo.js +0 -1
- package/dist/client/assets/use-blog-view-D_--u8j_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BJoJv4VQ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BFQG7J82.js +0 -1
|
@@ -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-Dzci2XGy.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-BVZH8mqe.js";import{C as k}from"./index-B4YS6GMo.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-CiB8uQLm.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-mb-jxjEy.js";import{C as k}from"./index-B6vsr4i3.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,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hj as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-BVZH8mqe.js";import{u as dt,t as Be,f as ue,A as ft,v as gt,Y as P,Z as mt,_ as kt,H as xt,I as D,$ as ve,a0 as bt,e as wt,a1 as Se,a2 as yt,a3 as G,N as Fe,a4 as he,c as qe,a5 as pe,a6 as Tt,a7 as vt,s as St,a8 as Mt,a as Et,E as At}from"./usage-stats-Dzci2XGy.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-BygI_Lvg.js";import{a as Ct,e as Ue,s as It,S as Lt}from"./suggestion-B9N6oqkG.js";import{B as zt}from"./index-6V91lP75.js";import{aE as Pt,ai as jt,aj as Nt,al as Ht,K as Ot,aY as Dt,aJ as Bt}from"./agent-icon-BS6RPQ_A.js";import{i as Ft}from"./SwitchHorizontal01-sPBj-OL8.js";import{s as qt}from"./Trash01-l4iOtEBN.js";import{k as Ut,a as Zt}from"./use-org-fs-Cq9dcDh3.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Yt}from"./markdown-DvUyMKlV.js";import{s as Jt,T as en}from"./index-B4YS6GMo.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-DQwD4jPt.js";import{I as an}from"./icon-button-CFamiizZ.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),In={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},Ln={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as _,j as f,m as B,aY as at,t as se,b5 as Oe,a6 as ot,hj as lt,i as ct,K as ut,ca as ht,h as De,o as pt}from"./index-mb-jxjEy.js";import{u as dt,t as Be,f as ue,A as ft,v as gt,Y as P,Z as mt,_ as kt,H as xt,I as D,$ as ve,a0 as bt,e as wt,a1 as Se,a2 as yt,a3 as G,N as Fe,a4 as he,c as qe,a5 as pe,a6 as Tt,a7 as vt,s as St,a8 as Mt,a as Et,E as At}from"./usage-stats-CiB8uQLm.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-C_k7lpha.js";import{a as Ct,e as Ue,s as It,S as Lt}from"./suggestion-BoV2NIg6.js";import{B as zt}from"./index-C-bUN66r.js";import{aE as Pt,ai as jt,aj as Nt,al as Ht,K as Ot,aY as Dt,aJ as Bt}from"./agent-icon-zvo6Zsex.js";import{i as Ft}from"./SwitchHorizontal01-HaaMuIs0.js";import{s as qt}from"./Trash01-By8obgKt.js";import{k as Ut,a as Zt}from"./use-org-fs-CbXrwKDd.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Yt}from"./markdown-B-EQMrBl.js";import{s as Jt,T as en}from"./index-B6vsr4i3.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-CwP4XJhp.js";import{I as an}from"./icon-button-C9InOUgM.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),In={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},Ln={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ye=/^( {2,}|\\)\n(?!\s*$)/,jn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,be=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),Je=/(?!~)[\p{P}\p{S}]/u,Hn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),et=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bn=S(et,"u").replace(/punct/g,F).getRegex(),Fn=S(et,"u").replace(/punct/g,Je).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qn=S(tt,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Un=S(tt,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Hn).replace(/punct/g,Je).getRegex(),Zn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Gn=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),Kn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Wn=S(Kn,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Qn=S(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),Xn=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vn=S(ke).replace("(?:-->|$)","-->").getRegex(),Yn=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Jn=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nt=S(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",me).getRegex(),rt=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",me).getRegex(),er=S("reflink|nolink(?!\\()","g").replace("reflink",nt).replace("nolink",rt).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,we={_backpedal:N,anyPunctuation:Qn,autolink:Xn,blockSkip:Dn,br:Ye,code:Pn,del:N,delLDelim:N,delRDelim:N,emStrongLDelim:Bn,emStrongRDelimAst:qn,emStrongRDelimUnd:Zn,escape:zn,link:Jn,nolink:rt,punctuation:Nn,reflink:nt,reflinkSearch:er,tag:Yn,text:jn,url:N},tr={...we,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},ae={...we,emStrongRDelimAst:Un,emStrongLDelim:Fn,delLDelim:Gn,delRDelim:Wn,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_e).getRegex()},nr={...ae,br:S(Ye).replace("{2,}","*").getRegex(),text:S(ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:xe,gfm:In,pedantic:Ln},q={normal:we,gfm:ae,breaks:nr,pedantic:tr},rr={"&":"&","<":"<",">":">",'"':""","'":"'"},$e=t=>rr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,$e)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,$e);return t}function Ce(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Ie(t,e){let n=t.replace(R.findPipe,(a,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),s=n.split(R.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function U(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function sr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function ir(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let a=4-n%4;s+=" ".repeat(a),n+=a}else s+=r,n++;return s}function Le(t,e,n,s,r){let a=e.href,i=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function ar(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
|
|
3
3
|
`).map(a=>{let i=a.match(n.other.beginningSpace);if(i===null)return a;let[l]=i;return l.length>=r.length?a.slice(r.length):a}).join(`
|
|
4
4
|
`)}var Y=class{options;rules;lexer;constructor(t){this.options=t||O}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:U(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,a6 as h,h2 as d,j as g,N as m,ag as p,a2 as j}from"./index-
|
|
1
|
+
import{c as f,a6 as h,h2 as d,j as g,N as m,ag as p,a2 as j}from"./index-mb-jxjEy.js";import{L as v}from"./legacy-main-redirect-DsJJQAHz.js";import"./thread-route-DRsKlO-E.js";const x=j("/shell/$org/org-shell/");function L(){const t=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let e;t[0]!==i||t[1]!==a.slug||t[2]!==l||t[3]!==o?(e=d({org:a.slug,agentId:o,main:i,search:l}),t[0]=i,t[1]=a.slug,t[2]=l,t[3]=o,t[4]=e):e=t[4];const s=e;if(s?.kind==="canonical"){let r;return t[5]!==s?(r=g.jsx(v,{target:s}),t[5]=s,t[6]=r):r=t[6],r}}let n;t[7]!==o?(n=o?.trim()||null,t[7]=o,t[8]=n):n=t[8];const u=n;if(u){let e;t[9]!==a.slug||t[10]!==u?(e={org:a.slug,agentId:u},t[9]=a.slug,t[10]=u,t[11]=e):e=t[11];let s;t[12]!==l?(s={...l,virtualmcpid:void 0},t[12]=l,t[13]=s):s=t[13];let r;return t[14]!==e||t[15]!==s?(r=g.jsx(m,{to:p.projects,params:e,search:s,hash:!0,replace:!0}),t[14]=e,t[15]=s,t[16]=r):r=t[16],r}let c;return t[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),t[17]=a.slug,t[18]=c):c=t[18],c}function N(t){return{...t,virtualmcpid:void 0}}export{L as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ue,r as xe,d as ns,a6 as ht,b as Pe,j as t,B as je,t as dt,aY as Yt,am as as,K as bt,i as Et,a7 as As,m as ot,gG as _s,o as cs,h as Ks,e0 as Us,ad as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,dW as Js,hf as Gs,T as Qs,W as Ys,I as Xt}from"./index-
|
|
1
|
+
import{c as ue,r as xe,d as ns,a6 as ht,b as Pe,j as t,B as je,t as dt,aY as Yt,am as as,K as bt,i as Et,a7 as As,m as ot,gG as _s,o as cs,h as Ks,e0 as Us,ad as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,dW as Js,hf as Gs,T as Qs,W as Ys,I as Xt}from"./index-mb-jxjEy.js";import{S as Ws}from"./search-input-D-gp-h4P.js";import{E as Ht}from"./empty-state-DlNabApi.js";import{R as Xs}from"./require-capability-7Xn2Fb3C.js";import{f as js}from"./pair-CI1Rts6X.js";import{b as ts}from"./use-connection-DxwzNo03.js";import{g as Ps}from"./connection-slug-DWaKdRBx.js";import{B as Lt}from"./badge-Di6qp_17.js";import{P as ds,a as ms,b as us}from"./popover-D73VbCM5.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-DCzbfwd7.js";import{z as fs,e as Ut,bw as el,av as Ns,K as tl}from"./agent-icon-zvo6Zsex.js";import{i as sl}from"./Key01-DPEcpDw6.js";import{i as ll}from"./Play-BNkIfSsq.js";import{MonacoCodeEditor as bs}from"./monaco-editor-DttATUsj.js";import{u as rl}from"./use-mcp-client-4k5JKqzF.js";import{u as il}from"./repository-binding-w-FCDYuS.js";import{n as Ot}from"./LinkBroken01-BPaKcMJ1.js";import{c as ol}from"./SwitchHorizontal01-HaaMuIs0.js";import{s as nl}from"./Plus-WQeLSh07.js";import{s as al}from"./Trash01-By8obgKt.js";import{M as zt}from"./multi-select-CSOG3KaA.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-DnlDCB9E.js";import{e as ys,T as cl}from"./time-range-picker-CUAzqD4s.js";import{T as dl}from"./textarea-BCGFjA5F.js";import{C as Ds}from"./collection-tabs-CmuugrOY.js";import{S as ml}from"./switch--3C-A5oU.js";import{L as ul}from"./label-DFYaZzfV.js";import{I as It}from"./integration-icon-DRbGJhQo.js";import{A as fl,a as xl,b as pl}from"./alert-QfzOpdUg.js";import{K as gt}from"./monitoring-stats-row-CRxmylqh.js";import{b as Bt}from"./use-entitlements-CzwT7L5B.js";import{g as gl,b as ws,f as Nt,c as Zt,d as hl,e as Ss,a as xs,h as vl,i as ps,T as jl,j as Nl,r as bl,k as yl}from"./thread-sheet-body-iwOtv26B.js";import{u as wl}from"./useSuspenseInfiniteQuery-CtWAJlQZ.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-Ctckoytn.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-Cy5fo0ER.js";import{t as ss}from"./ChevronDown-Cz82ih9S.js";import{n as ls}from"./ChevronUp-CLsy4_cr.js";import{u as Os}from"./use-id-selection-DmcvY3GI.js";import{u as Fs}from"./use-infinite-scroll-DnhPBPks.js";import{u as Il}from"./useInfiniteQuery-FxnnBp9W.js";import{g as Tl}from"./task-status-GPS8HLw1.js";import{u as kl,d as Ml}from"./use-automations-BdniAcmH.js";import{A as _l}from"./automation-runs-ComF4nUM.js";import{i as Pl}from"./ArrowLeft-7wIIyF4Y.js";import{E as Cs}from"./empty-state-BP4JRDLR.js";import{O as $s}from"./watch-sse-pool-7J-tc7Ge.js";import{t as Dl}from"./task-key-BP2--GY6.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day-DEr2FQ1w.js";import{F as $l}from"./feature-gate-C_eiJnqB.js";import"./SearchMd-CrM5HGUz.js";import"./access-gate-D9gT0mCZ.js";import"./capability-load-error-j4JpxktV.js";import"./Tool01-9Nk8XcOI.js";import"./ArrowRight-Dyuh-rXZ.js";import"./collapsible-BSD-rIyq.js";import"./use-copy-DSNmvH9L.js";import"./usage-stats-CiB8uQLm.js";import"./utils-CVEq3hMx.js";import"./markdown-B-EQMrBl.js";import"./chat-context-CxkYg5uT.js";import"./use-panel-navigate-B5u6ws6M.js";import"./thread-route-DRsKlO-E.js";import"./use-project-scope-Dydp2D08.js";import"./use-view-draft-kind-CZT4hOaN.js";import"./use-blog-view-Bi3aoju6.js";import"./use-organization-settings-UrGbnM2k.js";import"./schema-BluyjH2z.js";import"./task-board-CShHcm1L.js";import"./thread-intent-BQWCtBA_.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./session-runtime-D2GKulko.js";import"./use-ai-providers-CTbi7eSd.js";import"./use-current-view-DvszbK0Z.js";import"./use-in-settings-BTBVzmbg.js";import"./use-decopilot-events-BhcT5RAV.js";import"./use-mobile-CBwmaBFU.js";import"./File02-BmbcQ1JX.js";import"./gateway-client-zPU6BhGI.js";import"./form-CJTkS9yd.js";import"./UserCheck01-CuByTN5F.js";import"./use-task-board-items-B_EMxvU9.js";import"./config-4NBdyaeh.js";import"./AlertCircle-CngNmW3n.js";import"./CheckCircle-C0mDI2jO.js";import"./Eye-BoMcImel.js";import"./task-route-BDNP9yC7.js";import"./project-index-DyqPLhTf.js";import"./TrendUp01-D-BYwryf.js";import"./shell-layout-BS_Y65pV.js";import"./Globe04-_51WnfFJ.js";import"./UserSquare-T90Jaoc-.js";import"./use-deployment-admin-DCWHLNad.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-Bomoew3H.js";import"./use-org-notice-BLDWm2ef.js";import"./Monitor01-Dzk9r8YI.js";import"./Zap-lo-lOcPp.js";import"./command-CwP4XJhp.js";import"./index-Dy0Aphio.js";import"./project-icon-Bl4IAncl.js";import"./use-navigate-to-agent-H87rWFYJ.js";import"./use-debounced-value-CAOKwJaL.js";import"./new-project-dialog-KtG8l1yi.js";import"./repository-picker-DF0-TGsg.js";import"./github-icon-D3IlXxDN.js";import"./collection-search-BpNjeFlC.js";import"./BookOpen01-Bov9QL4X.js";import"./ShoppingBag01-Dvi8noNw.js";import"./new-project-store-DDZH8miu.js";import"./legacy-admin-welcome-dialog-C0rLwEhl.js";import"./drawer-CmJXwXhP.js";import"./required-auth-layout-B1owCwtw.js";import"./use-org-sso-Cfy5SkJ5.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-B8_THT37.js";import"./types-BQYXFpO6.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./Image01-nL5rafgN.js";import"./use-mcp-prompts-pJuJ9yii.js";import"./use-thread-outputs-B9502nWa.js";import"./file-type-icon-M87xyG0K.js";import"./index-B8ZkvDME.js";import"./ArrowUp-C9hRfWJJ.js";import"./ChevronSelectorVertical-B_wf9OPd.js";import"./CreditCard01-C7XdJQOf.js";import"./MessageCircle01-DEwhGd-N.js";import"./Fingerprint04-CeWGcIpe.js";import"./LayoutLeft-DFrTynS3.js";import"./Minus-CZtTY14n.js";import"./Sun-BUSaNVU-.js";import"./Upload01-BPnZnmHF.js";import"./Users01-D1-vaLa3.js";import"./editor-stZYyxdg.js";import"./auth--2gxCib9.js";import"./checkbox-C-dWRGEo.js";import"./index-BdQq_4o_.js";import"./scroll-area-D9mVov2B.js";import"./calendar-CqkLsAo9.js";import"./chart-BZy9kWyI.js";import"./CategoricalChart-BJA3WMzp.js";import"./index-OaQ5Wven.js";import"./tooltipContext-2wUW4UR-.js";import"./CartesianChart-DZFTbe0Q.js";import"./AreaChart-w2QCUzTm.js";import"./infiniteQueryObserver-Dfcni9SV.js";import"./useQueries-CQ0xJF7W.js";import"./ReferenceLine-Kl_nxn9t.js";import"./feature-paywall-CBOn7yV2.js";import"./plan-ladder-Dn1mCpkd.js";const rs={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},zl=["eq","contains","exists","in"];function El(s){return zl.includes(s)}function jt(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Al(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...m]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&El(i)?i:"eq",value:decodeURIComponent(m.join(":")||"")}}).filter(e=>e!==void 0)}function Vt(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
|
|
2
2
|
`)}function Is(s){return s.trim()?s.split(`
|
|
3
3
|
`).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Kl(s){const e={},l={},i=[],m={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(m[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(m).length>0?m:void 0}}function Ts(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=rs.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,rs.maxJsonRenderSize)+`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,a6 as z,K as W,i as Y,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aU as Z,w as J,v as ee,D as te}from"./index-BVZH8mqe.js";import{n as se}from"./ArrowUp-CjAvmMLL.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-B6UvvRRf.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-o0eNZBV4.js";import{u as je,a as ve,S as be,M as A}from"./pair-C4tumP78.js";import{A as ye,f as Q}from"./agent-icon-BS6RPQ_A.js";import{n as Ne}from"./use-sandbox-events-TxpzU2Iw.js";import{a as Ce}from"./agent-capabilities-CJLhsDjp.js";import{a as we}from"./repository-binding-BIfwJXBl.js";import{c as Se,i as ke}from"./thread-intent-CYNXEfHP.js";import{a as Te}from"./use-panel-navigate-DPGDB1T1.js";import{N as $e}from"./index-GMDFirHC.js";import{i as Ee}from"./ArrowRight-ajc9j6D-.js";import{d as De}from"./use-entitlements-B8D7pawV.js";import{u as Pe}from"./use-deco-credits-19cW8oHb.js";import{F as _e}from"./feature-paywall-BGOy9Z00.js";import{i as Ie}from"./AlertCircle-kHXzu73r.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=W.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=Y(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function U(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(U(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(U(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(Q,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(Q,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function Qe(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Ue(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function We(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ye(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Ue({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(We,{Main:Ye,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:Qe,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
|
|
1
|
+
import{c as v,a6 as z,K as W,i as Y,m as $,j as l,b as M,B,L as V,r as w,d as K,E as L,x as X,aU as Z,w as J,v as ee,D as te}from"./index-mb-jxjEy.js";import{n as se}from"./ArrowUp-C9hRfWJJ.js";import{u as H,f as G,T as ne,A as ae,n as re,o as ie,b as oe,c as le,p as ce,q as ue,t as de,L as fe}from"./chat-context-CxkYg5uT.js";import{T as me,c as ge,b as xe,d as pe,H as he}from"./input-BUC-cGry.js";import{u as je,a as ve,S as be,M as A}from"./pair-CI1Rts6X.js";import{A as ye,f as Q}from"./agent-icon-zvo6Zsex.js";import{n as Ne}from"./use-sandbox-events-DEHux0gs.js";import{a as Ce}from"./agent-capabilities-DWZ6HVp_.js";import{a as we}from"./repository-binding-w-FCDYuS.js";import{c as Se,i as ke}from"./thread-intent-BQWCtBA_.js";import{a as Te}from"./use-panel-navigate-B5u6ws6M.js";import{N as $e}from"./index-BIBRRoOW.js";import{i as Ee}from"./ArrowRight-Dyuh-rXZ.js";import{d as De}from"./use-entitlements-CzwT7L5B.js";import{u as Pe}from"./use-deco-credits-DnZKzVHP.js";import{F as _e}from"./feature-paywall-CBOn7yV2.js";import{i as Ie}from"./AlertCircle-CngNmW3n.js";const Oe=15e3;function Me(e,t,n){const s=v.c(20),r=n===void 0?{}:n,{org:a}=z(),i=we(e);let c;s[0]!==t||s[1]!==i?.metadata||s[2]!==e?(c=!!e&&!!t&&Ce(i?.metadata),s[0]=t,s[1]=i?.metadata,s[2]=e,s[3]=c):c=s[3];const u=c;let o;s[4]!==t||s[5]!==a.slug||s[6]!==e?(o=W.chatDraftChanges(a.slug,e??"",t??""),s[4]=t,s[5]=a.slug,s[6]=e,s[7]=o):o=s[7];let d;s[8]!==t||s[9]!==a.slug||s[10]!==e?(d=()=>Ne(a.slug,e,t),s[8]=t,s[9]=a.slug,s[10]=e,s[11]=d):d=s[11];const p=r.poll===!1?!1:Oe;let g;s[12]!==u||s[13]!==o||s[14]!==d||s[15]!==p?(g={queryKey:o,queryFn:d,enabled:u,refetchInterval:p,retry:!1},s[12]=u,s[13]=o,s[14]=d,s[15]=p,s[16]=g):g=s[16];const{data:m}=Y(g),f=m===void 0?0:m,x=u?i:null;let h;return s[17]!==f||s[18]!==x?(h={project:x,changeCount:f},s[17]=f,s[18]=x,s[19]=h):h=s[19],h}function Fe(){const e=v.c(7),t=H(),n=G(),s=t?.virtualMcpId??null,r=t?.currentBranch??null,{project:a,changeCount:i}=Me(s,r);if(!a||!s||!r||i===0)return null;const c=a.icon??null,u=!!n&&(n.isRunInProgress||n.status==="streaming"||n.status==="submitted");let o;return e[0]!==r||e[1]!==i||e[2]!==a.title||e[3]!==c||e[4]!==u||e[5]!==s?(o={virtualMcpId:s,projectTitle:a.title,projectIcon:c,branch:r,changeCount:i,editing:u},e[0]=r,e[1]=i,e[2]=a.title,e[3]=c,e[4]=u,e[5]=s,e[6]=o):o=e[6],o}function Re(e){const t=v.c(24),{icon:n,title:s,subtitle:r,status:a,detail:i,action:c,className:u}=e;let o;t[0]!==u?(o=$("rounded-xl border border-border bg-card p-3",u),t[0]=u,t[1]=o):o=t[1];let d;t[2]!==n?(d=l.jsx("div",{className:"shrink-0",children:n}),t[2]=n,t[3]=d):d=t[3];let p;t[4]!==s?(p=l.jsx("p",{className:"truncate text-sm font-medium text-foreground",children:s}),t[4]=s,t[5]=p):p=t[5];let g;t[6]!==r?(g=r&&l.jsx("p",{className:"truncate text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=g):g=t[7];let m;t[8]!==p||t[9]!==g?(m=l.jsxs("div",{className:"min-w-0 flex-1",children:[p,g]}),t[8]=p,t[9]=g,t[10]=m):m=t[10];let f;t[11]!==a?(f=a&&l.jsx("span",{className:"flex shrink-0 items-center gap-1.5 text-sm text-muted-foreground",children:a}),t[11]=a,t[12]=f):f=t[12];let x;t[13]!==d||t[14]!==m||t[15]!==f?(x=l.jsxs("div",{className:"flex items-center gap-2.5",children:[d,m,f]}),t[13]=d,t[14]=m,t[15]=f,t[16]=x):x=t[16];let h;t[17]!==c||t[18]!==i?(h=(i||c)&&l.jsxs("div",{className:"mt-3 flex items-center justify-between gap-2",children:[l.jsx("span",{className:"text-sm text-muted-foreground",children:i}),c]}),t[17]=c,t[18]=i,t[19]=h):h=t[19];let b;return t[20]!==o||t[21]!==x||t[22]!==h?(b=l.jsxs("div",{className:o,children:[x,h]}),t[20]=o,t[21]=x,t[22]=h,t[23]=b):b=t[23],b}function ze(e){const t=v.c(10),{draft:n}=e,s=M(),r=n.editing?"animate-pulse bg-warning":"bg-success";let a;t[0]!==r?(a=$("size-1.5 rounded-full",r),t[0]=r,t[1]=a):a=t[1];let i;t[2]!==a?(i=l.jsx("span",{"aria-hidden":!0,className:a}),t[2]=a,t[3]=i):i=t[3];const c=n.editing?"chat.draft.editing":"chat.draft.ready";let u;t[4]!==s||t[5]!==c?(u=s(c),t[4]=s,t[5]=c,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==u?(o=l.jsxs(l.Fragment,{children:[i,u]}),t[7]=i,t[8]=u,t[9]=o):o=t[9],o}function Be(e){const t=v.c(11),{draft:n}=e,s=M(),{org:r}=z(),a=H()?.taskId??null;let i;t[0]!==n.virtualMcpId||t[1]!==r.slug?(i={org:r.slug,agentId:n.virtualMcpId},t[0]=n.virtualMcpId,t[1]=r.slug,t[2]=i):i=t[2];let c;t[3]!==a?(c=a?{thread:a}:{},t[3]=a,t[4]=c):c=t[4];let u;t[5]!==s?(u=s("chat.draft.open"),t[5]=s,t[6]=u):u=t[6];let o;return t[7]!==i||t[8]!==c||t[9]!==u?(o=l.jsx(B,{variant:"outline",size:"sm",asChild:!0,children:l.jsx(V,{to:"/$org/projects/$agentId/site-editor",params:i,search:c,children:u})}),t[7]=i,t[8]=c,t[9]=u,t[10]=o):o=t[10],o}function q(){const e=v.c(20),t=M(),n=Fe();if(!n)return null;let s;e[0]!==n.projectIcon||e[1]!==n.projectTitle?(s=l.jsx(ye,{icon:n.projectIcon,name:n.projectTitle,size:"sm"}),e[0]=n.projectIcon,e[1]=n.projectTitle,e[2]=s):s=e[2];const r=n.projectTitle;let a;e[3]!==n.branch?(a=l.jsx("span",{className:"font-mono",children:n.branch}),e[3]=n.branch,e[4]=a):a=e[4];let i;e[5]!==n?(i=l.jsx(ze,{draft:n}),e[5]=n,e[6]=i):i=e[6];const c=n.changeCount===1?"chat.draft.change":"chat.draft.changes";let u;e[7]!==n.changeCount||e[8]!==t||e[9]!==c?(u=t(c,{count:n.changeCount}),e[7]=n.changeCount,e[8]=t,e[9]=c,e[10]=u):u=e[10];let o;e[11]!==n?(o=l.jsx(Be,{draft:n}),e[11]=n,e[12]=o):o=e[12];let d;return e[13]!==n.projectTitle||e[14]!==s||e[15]!==a||e[16]!==i||e[17]!==u||e[18]!==o?(d=l.jsx(Re,{className:"mx-2.5 mb-6",icon:s,title:r,subtitle:a,status:i,detail:u,action:o}),e[13]=n.projectTitle,e[14]=s,e[15]=a,e[16]=i,e[17]=u,e[18]=o,e[19]=d):d=e[19],d}function He(e){return e.parts.some(t=>t.type==="dynamic-tool"||t.type.startsWith("tool-"))}function Le(e){let t=0;for(const n of e)for(const s of n.parts??[]){const r=s;r.type==="tool-load_repo"&&r.state==="output-available"&&r.output?.success===!0&&t++}return t}function Ae(){const e=v.c(11),{openPanel:t}=Te(),n=Se(),s=G()?.messages??[],r=H(),a=r?.taskId??null,i=r?.currentBranch;let c;e[0]!==i?(c=ke(i),e[0]=i,e[1]=c):c=e[1];const u=c;let o;e[2]!==s?(o=Le(s),e[2]=s,e[3]=o):o=e[3];const d=o,p=w.useRef(null),g=w.useRef(null);let m,f;e[4]!==u||e[5]!==d||e[6]!==n||e[7]!==t||e[8]!==a?(m=()=>{if(!d||!a)return;const x=`${a}:${d}`;g.current!==x&&(g.current=x,n?.refreshThreadMetadata(a)),p.current!==a&&(p.current=a,u||t("site-editor"))},f=[d,a,t,n,u],e[4]=u,e[5]=d,e[6]=n,e[7]=t,e[8]=a,e[9]=m,e[10]=f):(m=e[9],f=e[10]),w.useEffect(m,f)}function U(e){return`deco-credits-empty-dismissed:${e}`}function pt(e){try{return localStorage.getItem(U(e))==="1"}catch{return!1}}function qe(){const e=v.c(56),t=M(),{org:n}=z(),s=De("credits"),r=K(),{decoKeyId:a}=Pe(),[i,c]=w.useState(!0);let u;e[0]!==n.id?(u=()=>{L("credits_empty_state_dismissed",{organization_id:n.id}),c(!1);try{localStorage.setItem(U(n.id),"1")}catch{}},e[0]=n.id,e[1]=u):u=e[1];const o=u;let d,p;if(e[2]!==i||e[3]!==n.id?(d=()=>{i&&L("credits_empty_state_shown",{organization_id:n.id})},p=[i,n.id],e[2]=i,e[3]=n.id,e[4]=d,e[5]=p):(d=e[4],p=e[5]),w.useEffect(d,p),!i)return null;if(!s){let k;e[6]!==t?(k=t("chat.input.allowanceExhaustedTitle"),e[6]=t,e[7]=k):k=e[7];let O;e[8]!==k?(O={title:k},e[8]=k,e[9]=O):O=e[9];let R;return e[10]!==o||e[11]!==O?(R=l.jsx(_e,{feature:"chat",copy:O,onDismiss:o}),e[10]=o,e[11]=O,e[12]=R):R=e[12],R}let g;e[13]!==o?(g=k=>!k&&o(),e[13]=o,e[14]=g):g=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),e[15]=m):m=e[15];let f;e[16]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(Q,{size:20,className:"text-warning"})}),e[16]=f):f=e[16];let x;e[17]!==t?(x=t("chat.creditsEmptyState.title"),e[17]=t,e[18]=x):x=e[18];let h;e[19]!==x?(h=l.jsx(X,{className:"text-lg font-semibold",children:x}),e[19]=x,e[20]=h):h=e[20];let b;e[21]!==t?(b=t("chat.creditsEmptyState.description"),e[21]=t,e[22]=b):b=e[22];let N;e[23]!==b?(N=l.jsx(Z,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:b}),e[23]=b,e[24]=N):N=e[24];let C;e[25]!==h||e[26]!==N?(C=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[m,l.jsxs(J,{className:"relative gap-3",children:[f,l.jsxs("div",{className:"text-center",children:[h,N]})]})]}),e[25]=h,e[26]=N,e[27]=C):C=e[27];let y;e[28]!==a||e[29]!==o?(y=a&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(me,{source:"empty_state",onDone:o})}),e[28]=a,e[29]=o,e[30]=y):y=e[30];let S;e[31]!==o||e[32]!==r||e[33]!==n.slug?(S=()=>{r({to:"/$org/settings/ai-providers",params:{org:n.slug}}),o()},e[31]=o,e[32]=r,e[33]=n.slug,e[34]=S):S=e[34];let j;e[35]!==t?(j=t("chat.creditsEmptyState.useYourOwnProvider"),e[35]=t,e[36]=j):j=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx(Ee,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),e[37]=T):T=e[37];let E;e[38]!==S||e[39]!==j?(E=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:S,children:[j,T]}),e[38]=S,e[39]=j,e[40]=E):E=e[40];let D;e[41]!==t?(D=t("chat.creditsEmptyState.skipForNow"),e[41]=t,e[42]=D):D=e[42];let P;e[43]!==o||e[44]!==D?(P=l.jsx(B,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:o,children:D}),e[43]=o,e[44]=D,e[45]=P):P=e[45];let _;e[46]!==E||e[47]!==P?(_=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[E,P]}),e[46]=E,e[47]=P,e[48]=_):_=e[48];let I;e[49]!==C||e[50]!==y||e[51]!==_?(I=l.jsxs(ee,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:Ke,children:[C,y,_]}),e[49]=C,e[50]=y,e[51]=_,e[52]=I):I=e[52];let F;return e[53]!==I||e[54]!==g?(F=l.jsx(te,{open:!0,onOpenChange:g,children:I}),e[53]=I,e[54]=g,e[55]=F):F=e[55],F}function Ke(e){return e.preventDefault()}function Ge(e){const t=v.c(6),{balanceDollars:n}=e;let s;t[0]!==n?(s=n.toFixed(2),t[0]=n,t[1]=s):s=t[1];const r=s;let a,i;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),i=l.jsx(Q,{size:13,className:"text-success"}),t[2]=a,t[3]=i):(a=t[2],i=t[3]);let c;return t[4]!==r?(c=l.jsxs("div",{className:a,children:[i,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",r," in credits to get started"]})]}),t[4]=r,t[5]=c):c=t[5],c}function Qe(){const e=v.c(8),{org:t}=z(),n=K();let s;e[0]!==n||e[1]!==t.slug?(s=()=>n({to:"/$org/settings/ai-providers",params:{org:t.slug}}),e[0]=n,e[1]=t.slug,e[2]=s):s=e[2];let r,a,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=$("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),a=l.jsx(Ie,{size:13,className:"text-warning"}),i=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),e[3]=r,e[4]=a,e[5]=i):(r=e[3],a=e[4],i=e[5]);let c;return e[6]!==s?(c=l.jsxs("button",{type:"button",onClick:s,className:r,children:[a,i]}),e[6]=s,e[7]=c):c=e[7],c}function Ue(e){const t=v.c(7),{scrollRef:n,sentinelRef:s,hasMoreOlder:r,isFetchingOlder:a,fetchOlderMessages:i}=e;let c,u;t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n||t[4]!==s?(c=()=>{const o=s.current,d=n.current;if(!o||!d||!r)return;const p=new IntersectionObserver(async g=>{if(!g[0]?.isIntersecting||a||!r)return;const f=d.scrollHeight,x=d.scrollTop;await i(),requestAnimationFrame(()=>{const h=d.scrollHeight;d.scrollTop=x+(h-f)})},{root:d,rootMargin:"200px 0px 0px 0px"});return p.observe(o),()=>p.disconnect()},u=[n,s,r,a,i],t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s,t[5]=c,t[6]=u):(c=t[5],u=t[6]),w.useEffect(c,u)}function We(e){const t=v.c(5),{className:n,children:s}=e;let r;t[0]!==n?(r=$("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",n),t[0]=n,t[1]=r):r=t[1];let a;return t[2]!==s||t[3]!==r?(a=l.jsx("div",{className:r,children:s}),t[2]=s,t[3]=r,t[4]=a):a=t[4],a}function Ye(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-1 min-h-0 overflow-y-auto isolate",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}function Ve(e){const t=v.c(2),{children:n}=e;let s;return t[0]!==n?(s=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:n}),t[0]=n,t[1]=s):s=t[1],s}function Xe(){const e=M(),{messages:t,status:n,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a,isRunInProgress:i}=oe(),{taskId:c}=le();Ae();const u=ce(c??""),o=ue(u),d=o.size===0?t:t.filter(j=>!o.has(j.id)),p=de(d,n==="submitted"||n==="streaming"||i),g=p.visible,m=je(g),f=m.at(-1),x=m.findIndex(j=>!!j.assistant&&He(j.assistant)),b=pe()*he+16,N=w.useRef(null),C=w.useRef(null);Ue({scrollRef:N,sentinelRef:C,hasMoreOlder:s,isFetchingOlder:r,fetchOlderMessages:a});const y=ve({initial:!1}),S=j=>{N.current=j,y.scrollRef(j)};return l.jsx(fe.Provider,{value:p,children:l.jsx(be,{messages:t,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:b},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),r&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:e("chat.chat.loadingOlderMessages")}),m.slice(0,-1).map((j,T)=>l.jsxs(w.Fragment,{children:[l.jsx(A,{pair:j,isLastPair:!1,status:T===m.length-1?n:void 0}),T===x&&l.jsx(q,{})]},`pair-${j.user?.id??j.assistant?.id}`))]}),f&&l.jsxs("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx(A,{pair:f,isLastPair:!0,status:n},`pair-${f.user?.id??f.assistant?.id}`),x===m.length-1&&l.jsx(q,{})]})]})}),!y.isAtBottom&&l.jsx(B,{type:"button",variant:"outline",size:"icon-sm","aria-label":e("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:b+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(se,{size:14})})]})})})}function Ze(e){const t=v.c(5),{children:n,className:s}=e;let r;t[0]!==s?(r=$("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",s),t[0]=s,t[1]=r):r=t[1];let a;return t[2]!==n||t[3]!==r?(a=l.jsx("div",{className:r,children:n}),t[2]=n,t[3]=r,t[4]=a):a=t[4],a}const ht=Object.assign(We,{Main:Ye,Messages:Xe,EmptyState:Ve,Footer:Ze,Input:xe,Provider:ie,StreamHost:re,ActiveTaskStreamSource:ae,ThreadlessStreamSource:ne,NoAiProviderEmptyState:$e,CreditsEmptyState:qe,CreditsEyebrow:Ge,NoCreditsEyebrow:Qe,CreditsExhaustedBanner:ge});export{ht as C,Me as u,pt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,b as X,r as $,m as B,j as s,a6 as Ee,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,aw as dt,Y as ke,a7 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aD as gt,l as bt,H as xt,at as $e,L as Ye,$ as jt,av as Ge,aE as vt,P as yt}from"./index-BVZH8mqe.js";import{u as Ie,c as Ze,g as St,h as wt,i as Ct}from"./use-sidebar-collapsed-DHFFs76T.js";import{S as _t,a as kt,b as Ot}from"./sheet-B1zTFenO.js";import{u as Et}from"./use-mobile-5e0sSd3X.js";import{u as Rt,a as zt,D as Dt,c as Nt,C as Tt,P as Lt}from"./task-key-BjUMQvHV.js";import{S as Pt,v as At,u as Mt}from"./sortable.esm-BzU9NXcP.js";import{i as $t}from"./Tool01-BEo5XKkS.js";import{t as It,r as Kt,u as Ft,v as Ut,A as Wt,w as Ue}from"./agent-icon-BS6RPQ_A.js";import{s as Bt}from"./Plus-BJfG2DpW.js";import{i as Ht}from"./UserSquare-D44lppb_.js";import{a as Xt}from"./UserCheck01-B1rJ65So.js";import{s as qe}from"./XClose-BwokcWjs.js";import{T as ge,a as be,c as xe}from"./tooltip-CfeBMv8z.js";import{C as Pe,f as Yt,g as Gt,e as Zt}from"./context-menu-BTcjoIYF.js";import{a as qt,O as Ve,w as Vt,b as Jt,c as Qt,E as es,r as Oe,d as ts,e as ss,h as rs,t as ns,f as Je,m as is,o as ls}from"./use-org-notice-Dvph2j3S.js";import{C as os}from"./create-organization-dialog-Dbp2Y7NH.js";import{P as as}from"./project-apps-z0dBtbP_.js";import{u as cs,a as ds}from"./use-recent-apps-4zSmjU-Q.js";import{a as us}from"./use-navigate-to-agent-CtsEyeFb.js";import{a as fs,u as ms}from"./use-project-scope-BIucgFKc.js";import{C as We,a as hs,b as ps,c as gs,d as bs}from"./command-DQwD4jPt.js";import{u as xs}from"./use-debounced-value-By7KggQt.js";import{n as js}from"./BookOpen01-CdH9hkvz.js";import{F as vs,a as Ae,b as ys,c as Qe}from"./feedback-BqoIMOg7.js";import{T as Ss}from"./textarea-BnYcD_gb.js";import{a as ws}from"./thread-button-Cra7mRSW.js";function Cs(t){const e=I.c(48),{open:n,onOpenChange:r,orgs:i,currentSlug:c,onSelect:l}=t,d=X(),[o,f]=$.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const h=b,p=xs(h,150),m=h.length>0,u=p===h,{hits:v,isSearching:j,isStale:C,isError:w}=qt(m?p:""),a=m?v:i;let x;e[2]!==r?(x=L=>{r(L),L||f("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==d?(y=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=y):y=e[5];let S;e[6]!==d?(S=d("sidebar.rail.searchPlaceholder"),e[6]=d,e[7]=S):S=e[7];let k;e[8]!==d?(k=d("sidebar.rail.searchPlaceholder"),e[8]=d,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(hs,{value:o,onValueChange:f,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=m&&(C||!u)&&"opacity-50";let R;e[13]!==T?(R=B(T),e[13]=T,e[14]=R):R=e[14];let O;e[15]!==w||e[16]!==m||e[17]!==d?(O=m&&w&&s.jsx(We,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(z=!w&&u&&!j&&a.length===0&&s.jsx(We,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=z):z=e[24];let D;if(e[25]!==c||e[26]!==l||e[27]!==g||e[28]!==a||e[29]!==d){let L;e[31]!==c||e[32]!==l||e[33]!==g||e[34]!==d?(L=P=>s.jsxs(ps,{value:P.slug,onSelect:()=>{g(!1),P.slug!==c&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Ve,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===c&&s.jsx("span",{className:"text-meta shrink-0",children:d("sidebar.rail.currentOrganization")})]},P.id),e[31]=c,e[32]=l,e[33]=g,e[34]=d,e[35]=L):L=e[35],D=a.map(L),e[25]=c,e[26]=l,e[27]=g,e[28]=a,e[29]=d,e[30]=D}else D=e[30];let E;e[36]!==z||e[37]!==D||e[38]!==R||e[39]!==O?(E=s.jsxs(gs,{className:R,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=R,e[39]=O,e[40]=E):E=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==E||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(bs,{open:n,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,E]}),e[41]=n,e[42]=g,e[43]=E,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function _s(t){const e=I.c(4),{size:n,className:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=i):i=e[0];let c;return e[1]!==r||e[2]!==n?(c=s.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:i}),e[1]=r,e[2]=n,e[3]=c):c=e[3],c}const ks=250;function Os(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(c=>setTimeout(c,ks));const n=document.createElement("canvas");n.width=e.videoWidth,n.height=e.videoHeight,n.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(n,"image/png");if((!r||r.size>Qe)&&(r=await Be(n,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const i=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${i}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:n}){const r=X(),i=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:c}=Ee(),[l,d]=$.useState(""),[o,f]=$.useState([]),[b,h]=$.useState(!1),p=()=>{for(const a of o)URL.revokeObjectURL(a.previewUrl);f([]),d("")},m=a=>{const x=a.filter(S=>ys.includes(S.type)?S.size>Qe?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&f(S=>[...S,...y])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},v=async()=>{h(!0);try{m([await Es()])}catch(a){a instanceof DOMException&&a.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",a),je.error(r("sidebar.feedback.screenshotFailed")))}finally{h(!1)}},j=a=>{const x=Array.from(a.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(a.preventDefault(),m(x))},C=nt({mutationFn:async()=>{const a=new FormData;a.set("kind",t),a.set("message",l.trim()),a.set("pageUrl",window.location.href);for(const g of o)a.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(c.slug)}/feedback`,{method:"POST",body:a});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(i.sent),p(),n(!1)},onError:()=>je.error(i.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(it,{open:e&&!b,onOpenChange:n,children:s.jsxs(lt,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(ot,{children:s.jsx(at,{children:i.title})}),s.jsx(Ss,{autoFocus:!0,value:l,onChange:a=>d(a.target.value),onPaste:j,onKeyDown:a=>{a.key==="Enter"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),w&&C.mutate())},placeholder:i.placeholder,className:"min-h-32 max-h-80",maxLength:vs}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((a,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:a.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:a.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>u(a),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(It,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:n,label:r,children:i}=t,c=n?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==c?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",c),e[0]=c,e[1]=l):l=e[1];let d;e[2]!==l?(d=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=d):d=e[3];let o;e[4]!==n||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=n,e[5]=r,e[6]=o):o=e[6];let f;return e[7]!==i||e[8]!==d||e[9]!==o?(f=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[d,i,o]}),e[7]=i,e[8]=d,e[9]=o,e[10]=f):f=e[10],f}const Rs="https://docs.decocms.com/",zs="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=Ee(),[r,i]=$.useState(null),c=!!n.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),i(_)},t[0]=l):l=t[0];const d=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:18}),t[3]=f):f=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(ft,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ls,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:f})})}),t[4]=o,t[5]=b):b=t[5];let h;t[6]!==e?(h=e("sidebar.help.button"),t[6]=e,t[7]=h):h=t[7];let p;t[8]!==h?(p=s.jsx(be,{side:"right",children:h}),t[8]=h,t[9]=p):p=t[9];let m;t[10]!==b||t[11]!==p?(m=s.jsxs(xe,{children:[b,p]}),t[10]=b,t[11]=p,t[12]=m):m=t[12];let u;t[13]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(js,{}),t[13]=u):u=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Rs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_s,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let a;t[21]!==w?(a=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ns,children:[C,w]})}),t[21]=w,t[22]=a):a=t[22];let x;t[23]!==c||t[24]!==e?(x=c&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{}),s.jsxs(ke,{onSelect:()=>d("problem"),children:[s.jsx(ut,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>d("feedback"),children:[s.jsx(Kt,{}),e("sidebar.feedback.button")]})]}),t[23]=c,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==a||t[27]!==x||t[28]!==j?(g=s.jsxs(mt,{side:"right",align:"end",className:"w-56",children:[j,a,x]}),t[26]=a,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==m?(y=s.jsx(ve,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=y):y=t[32];let S;t[33]!==c||t[34]!==r?(S=c&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>i(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>i(_?"feedback":null)})]}),t[33]=c,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ns(){return H("help_menu_discord_opened")}function Ts(){return H("help_menu_guides_opened")}function Ls(){return H("help_menu_opened")}function Ps(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const As=()=>Je(globalThis.innerHeight),Ms=()=>Je(0);function $s(t){const e=I.c(59),{org:n,active:r,onSelect:i,pinned:c,onOpenSettings:l,onTogglePin:d,onHide:o}=t,f=X();let b;e[0]!==n.slug?(b={id:n.slug},e[0]=n.slug,e[1]=b):b=e[1];const{setNodeRef:h,listeners:p,transform:m,transition:u,isDragging:v}=Mt(b);let j;e[2]!==m?(j=Tt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${n.slug}`;let a;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==u?(a={transform:j,transition:u,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=u,e[8]=a):a=e[8];const x=n.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==n?(_=s.jsx(Ve,{org:n,size:"lg"}),e[12]=n,e[13]=_):_=e[13];let T;e[14]!==c?(T=c&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=c,e[15]=T):T=e[15];let R;e[16]!==i||e[17]!==n.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(R=s.jsx(ge,{asChild:!0,children:s.jsx(Yt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:i,className:k,children:[_,T]})})}),e[16]=i,e[17]=n.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=R):R=e[22];let O;e[23]!==n.name?(O=s.jsx(be,{side:"right",children:n.name}),e[23]=n.name,e[24]=O):O=e[24];let z;e[25]!==R||e[26]!==O?(z=s.jsxs(xe,{children:[R,O]}),e[25]=R,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Xt,{}),e[28]=D):D=e[28];let E;e[29]!==f?(E=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=E):E=e[30];let A;e[31]!==l||e[32]!==E?(A=s.jsxs(Pe,{onSelect:l,children:[D,E]}),e[31]=l,e[32]=E,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==c||e[36]!==f?(P=f(c?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=c,e[36]=f,e[37]=P):P=e[37];let F;e[38]!==d||e[39]!==P?(F=s.jsxs(Pe,{onSelect:d,children:[L,P]}),e[38]=d,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==f?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx($t,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Gt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==W||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:W}),e[54]=p,e[55]=h,e[56]=W,e[57]=a,e[58]=G):G=e[58],G}function Is(t){const e=I.c(64),{project:n,orgSlug:r,active:i,onClose:c,onNavigate:l}=t,d=X();let o,f,b,h,p,m,u,v,j,C,w;if(e[0]!==i||e[1]!==l||e[2]!==r||e[3]!==n.icon||e[4]!==n.id||e[5]!==n.title){const L=Ut(n.icon,n.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,f=ge,C=!0,o=Ye,h=jt.root,e[17]!==r||e[18]!==n.id?(p={org:r,agentId:n.id},e[17]=r,e[18]=n.id,e[19]=p):p=e[19],m=n.title,u=i||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,i&&"ring-[1.5px] ring-current"),e[0]=i,e[1]=l,e[2]=r,e[3]=n.icon,e[4]=n.id,e[5]=n.title,e[6]=o,e[7]=f,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=u,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],f=e[7],b=e[8],h=e[9],p=e[10],m=e[11],u=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let a;e[22]!==n.icon||e[23]!==n.title?(a=s.jsx(Wt,{icon:n.icon,name:n.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=n.icon,e[23]=n.title,e[24]=a):a=e[24];let x;e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==m||e[29]!==u||e[30]!==v||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:v,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=v,e[31]=j,e[32]=a,e[33]=x):x=e[33];let g;e[34]!==f||e[35]!==x||e[36]!==C?(g=s.jsx(f,{asChild:C,children:x}),e[34]=f,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==n.title?(y=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==n.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:n.title}),e[46]=n.title,e[47]=_,e[48]=T):T=e[48];let R;e[49]!==n.title||e[50]!==d?(R=d("sidebar.rail.closeApp",{name:n.title}),e[49]=n.title,e[50]=d,e[51]=R):R=e[51];let O;e[52]!==c?(O=()=>{H("org_rail_recent_project_closed"),c()},e[52]=c,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let E;e[56]!==R||e[57]!==O?(E=s.jsx("button",{type:"button","aria-label":R,onClick:O,className:z,children:D}),e[56]=R,e[57]=O,e[58]=E):E=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==E||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,E]}),e[59]=S,e[60]=T,e[61]=E,e[62]=w,e[63]=A):A=e[63],A}const Ks={"site-editor":"/site-editor"};function Fs(t){const e=I.c(26),{app:n}=t,r=X(),i=as[n],c=Ks[n];if(!i||!c)return null;let l;e[0]!==i.labelKey||e[1]!==r?(l=r(i.labelKey),e[0]=i.labelKey,e[1]=r,e[2]=l):l=e[2];let d;e[3]!==i.labelKey||e[4]!==r?(d=r(i.labelKey),e[3]=i.labelKey,e[4]=r,e[5]=d):d=e[5];let o;e[6]!==i.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",i.tone),e[6]=i.tone,e[7]=o):o=e[7];let f;e[8]!==i.Icon?(f=s.jsx(i.Icon,{size:18}),e[8]=i.Icon,e[9]=f):f=e[9];let b;e[10]!==d||e[11]!==o||e[12]!==f||e[13]!==c?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ye,{to:c,"aria-label":d,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:f})}),e[10]=d,e[11]=o,e[12]=f,e[13]=c,e[14]=b):b=e[14];let h;e[15]!==i.labelKey||e[16]!==r?(h=r(i.labelKey),e[15]=i.labelKey,e[16]=r,e[17]=h):h=e[17];let p;e[18]!==h?(p=s.jsx(be,{side:"right",children:h}),e[18]=h,e[19]=p):p=e[19];let m;e[20]!==b||e[21]!==p?(m=s.jsxs(xe,{children:[b,p]}),e[20]=b,e[21]=p,e[22]=m):m=e[22];let u;return e[23]!==l||e[24]!==m?(u=s.jsx(ve,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Us(){const{org:t}=Ee();return cs(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=Ee(),l=gt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={select:Xs},e[0]=d):d=e[0];const o=bt(d);let f;e[1]!==o||e[2]!==l?(f=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=f):f=e[3];const b=f,h=b?b.org:c.slug,{data:p}=xt(),[m,u]=$.useState(!1),[v,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=us(c.slug),{projects:x}=fs(),g=ms(),y=ds(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Vt(p??[],c),{recent:T}=Jt(),R=Qt();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,es),E=Oe(z),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ts(ss(_,E,c.slug),T,c.slug,A,E.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=Rt(zt(Lt,P)),U=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>is(Oe(rt),L.map(Hs),String(M.id),String(Ke.id))))},Y=N=>{n?.(),i({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),n?.(),R(N,L.map(Bs))},W=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),ls()},G=!C&&"border-r border-sidebar-border";let Z;e[6]!==G?(Z=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=Z):Z=e[7];const st="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let q;e[8]!==r?(q=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=q):q=e[9];const Re=Dt,ze=Nt,De=Pt,Ne=L.map(Ws),Te=At,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:E.pinned.includes(N.slug),onSelect:N.slug!==c.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{n?.(),i({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D(M=>ns(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>rs(Oe(M),N.slug))}),N.slug===c.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map(M=>s.jsx(Is,{project:M,orgSlug:c.slug,active:g===M.id,onClose:()=>a(M.id),onNavigate:n},M.id))})]},N.id));let V;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(V=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=V):V=e[14];let J;e[15]!==Re||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==V?(J=s.jsx(Re,{sensors:F,collisionDetection:ze,onDragEnd:U,children:V}),e[15]=Re,e[16]=U,e[17]=F,e[18]=ze,e[19]=V,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Fs,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==q?(ee=s.jsxs("div",{className:st,"aria-label":q,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=q,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ht,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ne;e[36]!==re?(ne=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ne):ne=e[37];let ie;e[38]!==se||e[39]!==ne?(ie=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ne]})}),e[38]=se,e[39]=ne,e[40]=ie):ie=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==u?(oe=()=>u(!0),e[43]=u,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Bt,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ds,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ie||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ie,ue,Ce]}),e[57]=ie,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==Z?(me=s.jsxs("div",{className:Z,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=Z,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:v,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(os,{open:m,onOpenChange:u}),e[70]=m,e[71]=u,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Ws(t){return t.slug}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.isLoading}function Ys(t){const e=I.c(15),{width:n,minWidth:r,maxWidth:i,onPointerDown:c,onKeyDown:l,onDoubleClick:d}=t,o=X(),{isMobile:f}=Ze(),b=Ie();if(f||b)return null;let h;e[0]!==o?(h=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=h):h=e[1];let p;e[2]!==o?(p=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=p):p=e[3];let m,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={left:"var(--sidebar-width)"},u=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=m,e[5]=u):(m=e[4],u=e[5]);let v;return e[6]!==i||e[7]!==r||e[8]!==d||e[9]!==l||e[10]!==c||e[11]!==h||e[12]!==p||e[13]!==n?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":h,"aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":i,title:p,tabIndex:0,onPointerDown:c,onKeyDown:l,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:m,children:u}),e[6]=i,e[7]=r,e[8]=d,e[9]=l,e[10]=c,e[11]=h,e[12]=p,e[13]=n,e[14]=v):v=e[14],v}const Me=400,Xe=16,Gs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=u=>typeof u=="number"?e(u):192,t[0]=n):n=t[0];const[r,i]=$e(Gs,n),c=$.useRef(null);let l;t[1]!==i||t[2]!==r?(l=u=>{u.preventDefault();const v=u.clientX,j=e(r),C=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const a=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));i(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",a),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=i,t[2]=r,t[3]=l):l=t[3];const d=l;let o;t[4]!==i?(o=()=>{i(192)},t[4]=i,t[5]=o):o=t[5];const f=o;let b;t[6]!==i||t[7]!==r?(b=u=>{if(u.key==="ArrowLeft")i(e(r-Xe));else if(u.key==="ArrowRight")i(e(r+Xe));else if(u.key==="Home")i(192);else if(u.key==="End")i(Me);else return;u.preventDefault()},t[6]=i,t[7]=r,t[8]=b):b=t[8];const h=b,p=e(r);let m;return t[9]!==h||t[10]!==d||t[11]!==f||t[12]!==p?(m={width:p,minWidth:192,maxWidth:Me,wrapperRef:c,onStartResize:d,onKeyDownResize:h,resetWidth:f},t[9]=h,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13],m}function qs(t){return Math.max(192,Math.min(Me,t))}const tt=$.createContext(null);function Vs(){const t=$.use(tt);if(!t)throw new Error("Layout regions require a Layout");return t}function Js({children:t,notice:e,outsideOrg:n}){const r=Et(),[i,c]=$e(Ge.sidebarOpen(),!0),l=Zs();return s.jsx(tt,{value:{isMobile:r,resize:l},children:s.jsx(St,{open:i,onOpenChange:c,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!n&&s.jsx(Us,{}),!r&&(n?.rail??!0)&&s.jsx(et,{}),s.jsx(wt,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(ws,{children:t})})]})]})})})}function Qs(t){const e=I.c(36),{children:n,renderMobile:r}=t,i=X(),{isMobile:c,resize:l}=Vs(),{openMobile:d,setOpenMobile:o}=Ze(),f=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const h=b;if(!c){let x;e[2]!==n||e[3]!==f?(x=s.jsx("div",{className:"contents",inert:f,children:n}),e[2]=n,e[3]=f,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Ys,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let p;e[15]!==i?(p=i("layouts.shellControls.navigationTitle"),e[15]=i,e[16]=p):p=e[16];let m;e[17]!==p?(m=s.jsx(_t,{className:"sr-only",children:p}),e[17]=p,e[18]=m):m=e[18];let u;e[19]!==h?(u=s.jsx(et,{onNavigate:h}),e[19]=h,e[20]=u):u=e[20];let v;e[21]!==h||e[22]!==r?(v=r({onClose:h}),e[21]=h,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==u||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[u,j]}),e[26]=u,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==m||e[30]!==C?(w=s.jsxs(kt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:er,children:[m,C]}),e[29]=m,e[30]=C,e[31]=w):w=e[31];let a;return e[32]!==d||e[33]!==o||e[34]!==w?(a=s.jsx(Ot,{open:d,onOpenChange:o,children:w}),e[32]=d,e[33]=o,e[34]=w,e[35]=a):a=e[35],a}function er(t){return t.preventDefault()}function tr(t){const e=I.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsx(Ct,{className:"flex flex-col min-h-0",style:r,children:s.jsx(yt,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n})})}),e[1]=n,e[2]=i):i=e[2],i}const Er=Object.assign(Js,{Sidebar:Qs,Content:tr});export{Er as L};
|
|
1
|
+
import{c as I,b as X,r as $,m as B,j as s,a6 as Ee,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,aw as dt,Y as ke,a7 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aD as gt,l as bt,H as xt,at as $e,L as Ye,$ as jt,av as Ge,aE as vt,P as yt}from"./index-mb-jxjEy.js";import{u as Ie,c as Ze,g as St,h as wt,i as Ct}from"./use-sidebar-collapsed-DgMGLJyh.js";import{S as _t,a as kt,b as Ot}from"./sheet-Ctckoytn.js";import{u as Et}from"./use-mobile-CBwmaBFU.js";import{u as Rt,a as zt,D as Dt,c as Nt,C as Tt,P as Lt}from"./task-key-BP2--GY6.js";import{S as Pt,v as At,u as Mt}from"./sortable.esm-Cl-YQgc8.js";import{i as $t}from"./Tool01-9Nk8XcOI.js";import{t as It,r as Kt,u as Ft,v as Ut,A as Wt,w as Ue}from"./agent-icon-zvo6Zsex.js";import{s as Bt}from"./Plus-WQeLSh07.js";import{i as Ht}from"./UserSquare-T90Jaoc-.js";import{a as Xt}from"./UserCheck01-CuByTN5F.js";import{s as qe}from"./XClose-Bomoew3H.js";import{T as ge,a as be,c as xe}from"./tooltip-DCzbfwd7.js";import{C as Pe,f as Yt,g as Gt,e as Zt}from"./context-menu-haKBWhFK.js";import{a as qt,O as Ve,w as Vt,b as Jt,c as Qt,E as es,r as Oe,d as ts,e as ss,h as rs,t as ns,f as Je,m as is,o as ls}from"./use-org-notice-BLDWm2ef.js";import{C as os}from"./create-organization-dialog-BXvqxw2I.js";import{P as as}from"./project-apps-BFfwYw5p.js";import{u as cs,a as ds}from"./use-recent-apps-B6ojF6fA.js";import{a as us}from"./use-navigate-to-agent-H87rWFYJ.js";import{a as fs,u as ms}from"./use-project-scope-Dydp2D08.js";import{C as We,a as hs,b as ps,c as gs,d as bs}from"./command-CwP4XJhp.js";import{u as xs}from"./use-debounced-value-CAOKwJaL.js";import{n as js}from"./BookOpen01-Bov9QL4X.js";import{F as vs,a as Ae,b as ys,c as Qe}from"./feedback-BqoIMOg7.js";import{T as Ss}from"./textarea-BCGFjA5F.js";import{a as ws}from"./thread-button-Dw70OEJl.js";function Cs(t){const e=I.c(48),{open:n,onOpenChange:r,orgs:i,currentSlug:c,onSelect:l}=t,d=X(),[o,f]=$.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const h=b,p=xs(h,150),m=h.length>0,u=p===h,{hits:v,isSearching:j,isStale:C,isError:w}=qt(m?p:""),a=m?v:i;let x;e[2]!==r?(x=L=>{r(L),L||f("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==d?(y=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=y):y=e[5];let S;e[6]!==d?(S=d("sidebar.rail.searchPlaceholder"),e[6]=d,e[7]=S):S=e[7];let k;e[8]!==d?(k=d("sidebar.rail.searchPlaceholder"),e[8]=d,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(hs,{value:o,onValueChange:f,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=m&&(C||!u)&&"opacity-50";let R;e[13]!==T?(R=B(T),e[13]=T,e[14]=R):R=e[14];let O;e[15]!==w||e[16]!==m||e[17]!==d?(O=m&&w&&s.jsx(We,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(z=!w&&u&&!j&&a.length===0&&s.jsx(We,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=z):z=e[24];let D;if(e[25]!==c||e[26]!==l||e[27]!==g||e[28]!==a||e[29]!==d){let L;e[31]!==c||e[32]!==l||e[33]!==g||e[34]!==d?(L=P=>s.jsxs(ps,{value:P.slug,onSelect:()=>{g(!1),P.slug!==c&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Ve,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===c&&s.jsx("span",{className:"text-meta shrink-0",children:d("sidebar.rail.currentOrganization")})]},P.id),e[31]=c,e[32]=l,e[33]=g,e[34]=d,e[35]=L):L=e[35],D=a.map(L),e[25]=c,e[26]=l,e[27]=g,e[28]=a,e[29]=d,e[30]=D}else D=e[30];let E;e[36]!==z||e[37]!==D||e[38]!==R||e[39]!==O?(E=s.jsxs(gs,{className:R,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=R,e[39]=O,e[40]=E):E=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==E||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(bs,{open:n,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,E]}),e[41]=n,e[42]=g,e[43]=E,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function _s(t){const e=I.c(4),{size:n,className:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=i):i=e[0];let c;return e[1]!==r||e[2]!==n?(c=s.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:i}),e[1]=r,e[2]=n,e[3]=c):c=e[3],c}const ks=250;function Os(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(c=>setTimeout(c,ks));const n=document.createElement("canvas");n.width=e.videoWidth,n.height=e.videoHeight,n.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(n,"image/png");if((!r||r.size>Qe)&&(r=await Be(n,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const i=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${i}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:n}){const r=X(),i=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:c}=Ee(),[l,d]=$.useState(""),[o,f]=$.useState([]),[b,h]=$.useState(!1),p=()=>{for(const a of o)URL.revokeObjectURL(a.previewUrl);f([]),d("")},m=a=>{const x=a.filter(S=>ys.includes(S.type)?S.size>Qe?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&f(S=>[...S,...y])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},v=async()=>{h(!0);try{m([await Es()])}catch(a){a instanceof DOMException&&a.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",a),je.error(r("sidebar.feedback.screenshotFailed")))}finally{h(!1)}},j=a=>{const x=Array.from(a.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(a.preventDefault(),m(x))},C=nt({mutationFn:async()=>{const a=new FormData;a.set("kind",t),a.set("message",l.trim()),a.set("pageUrl",window.location.href);for(const g of o)a.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(c.slug)}/feedback`,{method:"POST",body:a});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(i.sent),p(),n(!1)},onError:()=>je.error(i.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(it,{open:e&&!b,onOpenChange:n,children:s.jsxs(lt,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(ot,{children:s.jsx(at,{children:i.title})}),s.jsx(Ss,{autoFocus:!0,value:l,onChange:a=>d(a.target.value),onPaste:j,onKeyDown:a=>{a.key==="Enter"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),w&&C.mutate())},placeholder:i.placeholder,className:"min-h-32 max-h-80",maxLength:vs}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((a,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:a.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:a.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>u(a),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(It,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:n,label:r,children:i}=t,c=n?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==c?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",c),e[0]=c,e[1]=l):l=e[1];let d;e[2]!==l?(d=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=d):d=e[3];let o;e[4]!==n||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=n,e[5]=r,e[6]=o):o=e[6];let f;return e[7]!==i||e[8]!==d||e[9]!==o?(f=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[d,i,o]}),e[7]=i,e[8]=d,e[9]=o,e[10]=f):f=e[10],f}const Rs="https://docs.decocms.com/",zs="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=Ee(),[r,i]=$.useState(null),c=!!n.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),i(_)},t[0]=l):l=t[0];const d=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Ft,{size:18}),t[3]=f):f=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(ft,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ls,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:f})})}),t[4]=o,t[5]=b):b=t[5];let h;t[6]!==e?(h=e("sidebar.help.button"),t[6]=e,t[7]=h):h=t[7];let p;t[8]!==h?(p=s.jsx(be,{side:"right",children:h}),t[8]=h,t[9]=p):p=t[9];let m;t[10]!==b||t[11]!==p?(m=s.jsxs(xe,{children:[b,p]}),t[10]=b,t[11]=p,t[12]=m):m=t[12];let u;t[13]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(js,{}),t[13]=u):u=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Rs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(_s,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let a;t[21]!==w?(a=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ns,children:[C,w]})}),t[21]=w,t[22]=a):a=t[22];let x;t[23]!==c||t[24]!==e?(x=c&&s.jsxs(s.Fragment,{children:[s.jsx(dt,{}),s.jsxs(ke,{onSelect:()=>d("problem"),children:[s.jsx(ut,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>d("feedback"),children:[s.jsx(Kt,{}),e("sidebar.feedback.button")]})]}),t[23]=c,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==a||t[27]!==x||t[28]!==j?(g=s.jsxs(mt,{side:"right",align:"end",className:"w-56",children:[j,a,x]}),t[26]=a,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==m?(y=s.jsx(ve,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=y):y=t[32];let S;t[33]!==c||t[34]!==r?(S=c&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>i(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>i(_?"feedback":null)})]}),t[33]=c,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ns(){return H("help_menu_discord_opened")}function Ts(){return H("help_menu_guides_opened")}function Ls(){return H("help_menu_opened")}function Ps(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const As=()=>Je(globalThis.innerHeight),Ms=()=>Je(0);function $s(t){const e=I.c(59),{org:n,active:r,onSelect:i,pinned:c,onOpenSettings:l,onTogglePin:d,onHide:o}=t,f=X();let b;e[0]!==n.slug?(b={id:n.slug},e[0]=n.slug,e[1]=b):b=e[1];const{setNodeRef:h,listeners:p,transform:m,transition:u,isDragging:v}=Mt(b);let j;e[2]!==m?(j=Tt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${n.slug}`;let a;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==u?(a={transform:j,transition:u,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=u,e[8]=a):a=e[8];const x=n.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==n?(_=s.jsx(Ve,{org:n,size:"lg"}),e[12]=n,e[13]=_):_=e[13];let T;e[14]!==c?(T=c&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=c,e[15]=T):T=e[15];let R;e[16]!==i||e[17]!==n.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(R=s.jsx(ge,{asChild:!0,children:s.jsx(Yt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:i,className:k,children:[_,T]})})}),e[16]=i,e[17]=n.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=R):R=e[22];let O;e[23]!==n.name?(O=s.jsx(be,{side:"right",children:n.name}),e[23]=n.name,e[24]=O):O=e[24];let z;e[25]!==R||e[26]!==O?(z=s.jsxs(xe,{children:[R,O]}),e[25]=R,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Xt,{}),e[28]=D):D=e[28];let E;e[29]!==f?(E=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=E):E=e[30];let A;e[31]!==l||e[32]!==E?(A=s.jsxs(Pe,{onSelect:l,children:[D,E]}),e[31]=l,e[32]=E,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==c||e[36]!==f?(P=f(c?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=c,e[36]=f,e[37]=P):P=e[37];let F;e[38]!==d||e[39]!==P?(F=s.jsxs(Pe,{onSelect:d,children:[L,P]}),e[38]=d,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==f?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx($t,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Gt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==W||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:W}),e[54]=p,e[55]=h,e[56]=W,e[57]=a,e[58]=G):G=e[58],G}function Is(t){const e=I.c(64),{project:n,orgSlug:r,active:i,onClose:c,onNavigate:l}=t,d=X();let o,f,b,h,p,m,u,v,j,C,w;if(e[0]!==i||e[1]!==l||e[2]!==r||e[3]!==n.icon||e[4]!==n.id||e[5]!==n.title){const L=Ut(n.icon,n.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,f=ge,C=!0,o=Ye,h=jt.root,e[17]!==r||e[18]!==n.id?(p={org:r,agentId:n.id},e[17]=r,e[18]=n.id,e[19]=p):p=e[19],m=n.title,u=i||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,i&&"ring-[1.5px] ring-current"),e[0]=i,e[1]=l,e[2]=r,e[3]=n.icon,e[4]=n.id,e[5]=n.title,e[6]=o,e[7]=f,e[8]=b,e[9]=h,e[10]=p,e[11]=m,e[12]=u,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],f=e[7],b=e[8],h=e[9],p=e[10],m=e[11],u=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let a;e[22]!==n.icon||e[23]!==n.title?(a=s.jsx(Wt,{icon:n.icon,name:n.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=n.icon,e[23]=n.title,e[24]=a):a=e[24];let x;e[25]!==o||e[26]!==h||e[27]!==p||e[28]!==m||e[29]!==u||e[30]!==v||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:v,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=v,e[31]=j,e[32]=a,e[33]=x):x=e[33];let g;e[34]!==f||e[35]!==x||e[36]!==C?(g=s.jsx(f,{asChild:C,children:x}),e[34]=f,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==n.title?(y=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==n.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:n.title}),e[46]=n.title,e[47]=_,e[48]=T):T=e[48];let R;e[49]!==n.title||e[50]!==d?(R=d("sidebar.rail.closeApp",{name:n.title}),e[49]=n.title,e[50]=d,e[51]=R):R=e[51];let O;e[52]!==c?(O=()=>{H("org_rail_recent_project_closed"),c()},e[52]=c,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let E;e[56]!==R||e[57]!==O?(E=s.jsx("button",{type:"button","aria-label":R,onClick:O,className:z,children:D}),e[56]=R,e[57]=O,e[58]=E):E=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==E||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,E]}),e[59]=S,e[60]=T,e[61]=E,e[62]=w,e[63]=A):A=e[63],A}const Ks={"site-editor":"/site-editor"};function Fs(t){const e=I.c(26),{app:n}=t,r=X(),i=as[n],c=Ks[n];if(!i||!c)return null;let l;e[0]!==i.labelKey||e[1]!==r?(l=r(i.labelKey),e[0]=i.labelKey,e[1]=r,e[2]=l):l=e[2];let d;e[3]!==i.labelKey||e[4]!==r?(d=r(i.labelKey),e[3]=i.labelKey,e[4]=r,e[5]=d):d=e[5];let o;e[6]!==i.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",i.tone),e[6]=i.tone,e[7]=o):o=e[7];let f;e[8]!==i.Icon?(f=s.jsx(i.Icon,{size:18}),e[8]=i.Icon,e[9]=f):f=e[9];let b;e[10]!==d||e[11]!==o||e[12]!==f||e[13]!==c?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ye,{to:c,"aria-label":d,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:f})}),e[10]=d,e[11]=o,e[12]=f,e[13]=c,e[14]=b):b=e[14];let h;e[15]!==i.labelKey||e[16]!==r?(h=r(i.labelKey),e[15]=i.labelKey,e[16]=r,e[17]=h):h=e[17];let p;e[18]!==h?(p=s.jsx(be,{side:"right",children:h}),e[18]=h,e[19]=p):p=e[19];let m;e[20]!==b||e[21]!==p?(m=s.jsxs(xe,{children:[b,p]}),e[20]=b,e[21]=p,e[22]=m):m=e[22];let u;return e[23]!==l||e[24]!==m?(u=s.jsx(ve,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Us(){const{org:t}=Ee();return cs(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=Ee(),l=gt();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={select:Xs},e[0]=d):d=e[0];const o=bt(d);let f;e[1]!==o||e[2]!==l?(f=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=f):f=e[3];const b=f,h=b?b.org:c.slug,{data:p}=xt(),[m,u]=$.useState(!1),[v,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=us(c.slug),{projects:x}=fs(),g=ms(),y=ds(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Vt(p??[],c),{recent:T}=Jt(),R=Qt();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,es),E=Oe(z),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ts(ss(_,E,c.slug),T,c.slug,A,E.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=Rt(zt(Lt,P)),U=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>is(Oe(rt),L.map(Hs),String(M.id),String(Ke.id))))},Y=N=>{n?.(),i({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),n?.(),R(N,L.map(Bs))},W=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),ls()},G=!C&&"border-r border-sidebar-border";let Z;e[6]!==G?(Z=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=Z):Z=e[7];const st="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let q;e[8]!==r?(q=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=q):q=e[9];const Re=Dt,ze=Nt,De=Pt,Ne=L.map(Ws),Te=At,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:E.pinned.includes(N.slug),onSelect:N.slug!==c.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{n?.(),i({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D(M=>ns(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>rs(Oe(M),N.slug))}),N.slug===c.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map(M=>s.jsx(Is,{project:M,orgSlug:c.slug,active:g===M.id,onClose:()=>a(M.id),onNavigate:n},M.id))})]},N.id));let V;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(V=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=V):V=e[14];let J;e[15]!==Re||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==V?(J=s.jsx(Re,{sensors:F,collisionDetection:ze,onDragEnd:U,children:V}),e[15]=Re,e[16]=U,e[17]=F,e[18]=ze,e[19]=V,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Fs,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==q?(ee=s.jsxs("div",{className:st,"aria-label":q,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=q,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Ht,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ne;e[36]!==re?(ne=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ne):ne=e[37];let ie;e[38]!==se||e[39]!==ne?(ie=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ne]})}),e[38]=se,e[39]=ne,e[40]=ie):ie=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==u?(oe=()=>u(!0),e[43]=u,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Bt,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ds,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ie||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ie,ue,Ce]}),e[57]=ie,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==Z?(me=s.jsxs("div",{className:Z,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=Z,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:v,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(os,{open:m,onOpenChange:u}),e[70]=m,e[71]=u,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Ws(t){return t.slug}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.isLoading}function Ys(t){const e=I.c(15),{width:n,minWidth:r,maxWidth:i,onPointerDown:c,onKeyDown:l,onDoubleClick:d}=t,o=X(),{isMobile:f}=Ze(),b=Ie();if(f||b)return null;let h;e[0]!==o?(h=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=h):h=e[1];let p;e[2]!==o?(p=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=p):p=e[3];let m,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(m={left:"var(--sidebar-width)"},u=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=m,e[5]=u):(m=e[4],u=e[5]);let v;return e[6]!==i||e[7]!==r||e[8]!==d||e[9]!==l||e[10]!==c||e[11]!==h||e[12]!==p||e[13]!==n?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":h,"aria-valuenow":n,"aria-valuemin":r,"aria-valuemax":i,title:p,tabIndex:0,onPointerDown:c,onKeyDown:l,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:m,children:u}),e[6]=i,e[7]=r,e[8]=d,e[9]=l,e[10]=c,e[11]=h,e[12]=p,e[13]=n,e[14]=v):v=e[14],v}const Me=400,Xe=16,Gs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=u=>typeof u=="number"?e(u):192,t[0]=n):n=t[0];const[r,i]=$e(Gs,n),c=$.useRef(null);let l;t[1]!==i||t[2]!==r?(l=u=>{u.preventDefault();const v=u.clientX,j=e(r),C=c.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const a=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));i(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",a),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=i,t[2]=r,t[3]=l):l=t[3];const d=l;let o;t[4]!==i?(o=()=>{i(192)},t[4]=i,t[5]=o):o=t[5];const f=o;let b;t[6]!==i||t[7]!==r?(b=u=>{if(u.key==="ArrowLeft")i(e(r-Xe));else if(u.key==="ArrowRight")i(e(r+Xe));else if(u.key==="Home")i(192);else if(u.key==="End")i(Me);else return;u.preventDefault()},t[6]=i,t[7]=r,t[8]=b):b=t[8];const h=b,p=e(r);let m;return t[9]!==h||t[10]!==d||t[11]!==f||t[12]!==p?(m={width:p,minWidth:192,maxWidth:Me,wrapperRef:c,onStartResize:d,onKeyDownResize:h,resetWidth:f},t[9]=h,t[10]=d,t[11]=f,t[12]=p,t[13]=m):m=t[13],m}function qs(t){return Math.max(192,Math.min(Me,t))}const tt=$.createContext(null);function Vs(){const t=$.use(tt);if(!t)throw new Error("Layout regions require a Layout");return t}function Js({children:t,notice:e,outsideOrg:n}){const r=Et(),[i,c]=$e(Ge.sidebarOpen(),!0),l=Zs();return s.jsx(tt,{value:{isMobile:r,resize:l},children:s.jsx(St,{open:i,onOpenChange:c,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!n&&s.jsx(Us,{}),!r&&(n?.rail??!0)&&s.jsx(et,{}),s.jsx(wt,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(ws,{children:t})})]})]})})})}function Qs(t){const e=I.c(36),{children:n,renderMobile:r}=t,i=X(),{isMobile:c,resize:l}=Vs(),{openMobile:d,setOpenMobile:o}=Ze(),f=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const h=b;if(!c){let x;e[2]!==n||e[3]!==f?(x=s.jsx("div",{className:"contents",inert:f,children:n}),e[2]=n,e[3]=f,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Ys,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let p;e[15]!==i?(p=i("layouts.shellControls.navigationTitle"),e[15]=i,e[16]=p):p=e[16];let m;e[17]!==p?(m=s.jsx(_t,{className:"sr-only",children:p}),e[17]=p,e[18]=m):m=e[18];let u;e[19]!==h?(u=s.jsx(et,{onNavigate:h}),e[19]=h,e[20]=u):u=e[20];let v;e[21]!==h||e[22]!==r?(v=r({onClose:h}),e[21]=h,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==u||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[u,j]}),e[26]=u,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==m||e[30]!==C?(w=s.jsxs(kt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:er,children:[m,C]}),e[29]=m,e[30]=C,e[31]=w):w=e[31];let a;return e[32]!==d||e[33]!==o||e[34]!==w?(a=s.jsx(Ot,{open:d,onOpenChange:o,children:w}),e[32]=d,e[33]=o,e[34]=w,e[35]=a):a=e[35],a}function er(t){return t.preventDefault()}function tr(t){const e=I.c(3),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let i;return e[1]!==n?(i=s.jsx(Ct,{className:"flex flex-col min-h-0",style:r,children:s.jsx(yt,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:n})})}),e[1]=n,e[2]=i):i=e[2],i}const Er=Object.assign(Js,{Sidebar:Qs,Content:tr});export{Er as L};
|
|
@@ -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-mb-jxjEy.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};
|