decocms 4.574.8 → 4.574.9
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-BAmHKKsU.js → AlertCircle-BrBujzmj.js} +1 -1
- package/dist/client/assets/{AreaChart-Dzi9L-5c.js → AreaChart-Bs4ZyKEJ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-gk0ZCHpe.js → ArrowLeft-B2qsUhAF.js} +1 -1
- package/dist/client/assets/{ArrowUp-Oow5hGQz.js → ArrowUp-Bq_XWrMf.js} +1 -1
- package/dist/client/assets/{CartesianChart-GB7-WfQw.js → CartesianChart-BzQXSn72.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BQlyLGsu.js → CategoricalChart-B34tgPab.js} +1 -1
- package/dist/client/assets/{CheckCircle-DmfFwydo.js → CheckCircle-BrU3KNn_.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-DhmNgA1s.js → ChevronSelectorVertical-C15U3mNk.js} +1 -1
- package/dist/client/assets/{ChevronUp-h3R0LiST.js → ChevronUp-CxdkHAYX.js} +1 -1
- package/dist/client/assets/{CreditCard01-opvzFjuh.js → CreditCard01-gy5ViYmH.js} +1 -1
- package/dist/client/assets/{Globe04-B7My-KRc.js → Globe04-Qb5La101.js} +1 -1
- package/dist/client/assets/{Key01-DtUFXCmn.js → Key01-XBNKfFAD.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DbqgHdC0.js → LinkBroken01-BNA4t2nT.js} +1 -1
- package/dist/client/assets/{Minus-BrKkP3oW.js → Minus-BQ1U44OY.js} +1 -1
- package/dist/client/assets/{Monitor01-ZcR52K7T.js → Monitor01-CTMwaVR_.js} +1 -1
- package/dist/client/assets/{Play-CmLZLyOc.js → Play-oyq9OzZ5.js} +1 -1
- package/dist/client/assets/{Plus-Ci-A-fWx.js → Plus-B14W9n_P.js} +1 -1
- package/dist/client/assets/{ReferenceLine-k6lFOpoF.js → ReferenceLine-CBcoZK_U.js} +1 -1
- package/dist/client/assets/{SearchMd-DjJWIBOz.js → SearchMd-DDYfB5ME.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-DqYzokeC.js → ShoppingBag01-B4Qpz0kc.js} +1 -1
- package/dist/client/assets/{Sun-DRGxYgs4.js → Sun-SepDLWMM.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BUmyYri2.js → SwitchHorizontal01-B1owjF7D.js} +1 -1
- package/dist/client/assets/{Tool01-BpRZdana.js → Tool01-D4V2T_mI.js} +1 -1
- package/dist/client/assets/{Tooltip-CiaiPRI1.js → Tooltip-BrxiV7qQ.js} +1 -1
- package/dist/client/assets/{Trash01-b7MmLF07.js → Trash01-CTl0J4n_.js} +1 -1
- package/dist/client/assets/{Upload01-DGExuych.js → Upload01-CE3wDuuV.js} +1 -1
- package/dist/client/assets/{UserSquare-aPvg2Nw7.js → UserSquare-D6mrj9zR.js} +1 -1
- package/dist/client/assets/{Users01-BKOqY1GP.js → Users01-vnVJQGsa.js} +1 -1
- package/dist/client/assets/{XClose-w7hRM8A3.js → XClose-DWFAtfm6.js} +1 -1
- package/dist/client/assets/{Zap-z5XiOqRJ.js → Zap-4X8Ik5ls.js} +1 -1
- package/dist/client/assets/{access-gate-DVYwMQ0P.js → access-gate-CmrYCcY4.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-KFg0vdbz.js → add-connection-dialog-C7VuLdpX.js} +1 -1
- package/dist/client/assets/agent-app-D6yj-pMQ.js +1 -0
- package/dist/client/assets/{agent-assets-DBXXdN-F.js → agent-assets-CtfeFO-q.js} +1 -1
- package/dist/client/assets/{agent-automation-mqokXjnT.js → agent-automation-CBfmQGxD.js} +1 -1
- package/dist/client/assets/{agent-automations-4REoeTdH.js → agent-automations-C9pDoA5t.js} +1 -1
- package/dist/client/assets/{agent-calendar-D3Ep29wr.js → agent-calendar-Dpbs8ukc.js} +1 -1
- package/dist/client/assets/{agent-capabilities-CVf7Tm9q.js → agent-capabilities-CANCMZIX.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-5aNARyd1.js → agent-connect-sources-CUOKdCzE.js} +1 -1
- package/dist/client/assets/agent-deck-9cClb9g8.js +1 -0
- package/dist/client/assets/{agent-e2e-B_HILHfY.js → agent-e2e-Do0w1Fmk.js} +1 -1
- package/dist/client/assets/agent-experiments-i1khXsMD.js +1 -0
- package/dist/client/assets/{agent-file-ChXQ_dxN.js → agent-file-BGZ-rpXM.js} +1 -1
- package/dist/client/assets/{agent-hosting-Q-HUFuhy.js → agent-hosting-BcEptfro.js} +1 -1
- package/dist/client/assets/{agent-icon-Cq6bkxhD.js → agent-icon-C4zAUQeZ.js} +1 -1
- package/dist/client/assets/agent-library-D7XfbskT.js +1 -0
- package/dist/client/assets/agent-library-file-BETUEujK.js +1 -0
- package/dist/client/assets/agent-overview-BT1unfrS.js +1 -0
- package/dist/client/assets/{agent-releases-V69FFrsa.js → agent-releases-dth3gbg2.js} +1 -1
- package/dist/client/assets/agent-settings-CjJHki-K.js +1 -0
- package/dist/client/assets/{agent-site-editor-CN1s3wDa.js → agent-site-editor--0x03xZz.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-B-MqMBV6.js +2 -0
- package/dist/client/assets/agent-site-editor-content-T7SQ0eTX.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CLHaZdDj.js +1 -0
- package/dist/client/assets/agent-view-BD06Jv6z.js +1 -0
- package/dist/client/assets/{agent-view-guard-D_qa8QG0.js → agent-view-guard-DRTikUW7.js} +1 -1
- package/dist/client/assets/{ai-providers-Dpuo8FL0.js → ai-providers-BIsnOJUw.js} +1 -1
- package/dist/client/assets/{alert-UQKKr_Kk.js → alert-ChcrHQqB.js} +1 -1
- package/dist/client/assets/{analytics-sections-CplA1JwF.js → analytics-sections-IEaJPRpN.js} +1 -1
- package/dist/client/assets/api-keys-BEjN8NqZ.js +1 -0
- package/dist/client/assets/{api-keys-C2CtORaM.js → api-keys-DyiCkrNJ.js} +1 -1
- package/dist/client/assets/{app-editor-DxS_SOS1.js → app-editor-cC2ECYDV.js} +1 -1
- package/dist/client/assets/{asset-utils-D7YjAVSU.js → asset-utils-BemSLLjv.js} +1 -1
- package/dist/client/assets/{auth-Cy8U0vN0.js → auth-DZBq7iRr.js} +1 -1
- package/dist/client/assets/{auth-catchall-BzWkrG7V.js → auth-catchall-DrPulr77.js} +1 -1
- package/dist/client/assets/{auth-entry-D9eSm7L9.js → auth-entry-7YktIufn.js} +1 -1
- package/dist/client/assets/{auth-split-layout-QrGrLjO_.js → auth-split-layout-BIjGKhmF.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-qsvUUvW_.js → authenticate-and-persist-oauth-DArrCFGG.js} +1 -1
- package/dist/client/assets/{automation-list-row-CirPKB_R.js → automation-list-row-DjfCNmU2.js} +1 -1
- package/dist/client/assets/{automation-runs-DkcFNSpy.js → automation-runs-HL4m0VQL.js} +1 -1
- package/dist/client/assets/{automations-DQrJLYNP.js → automations-B1iMF-BH.js} +1 -1
- package/dist/client/assets/{autosend-BneXym43.js → autosend-VANv9yLj.js} +1 -1
- package/dist/client/assets/{badge-DkIOux3v.js → badge-DaX-o_aM.js} +1 -1
- package/dist/client/assets/{block-document-C7UjkOY9.js → block-document-Cx04oYbY.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-CfDmwLLA.js → blocks-preview-workspace-context-DgF7HYHj.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-BfcuzOZT.js → blocks-tab-states-C8jjKnoC.js} +1 -1
- package/dist/client/assets/{blog-schema-D_gjHI6M.js → blog-schema-O25l7G8m.js} +1 -1
- package/dist/client/assets/{buckets-CzLaj5xW.js → buckets-Bb4wZzzE.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-UX5YM4et.js → build-improve-prompt-doc-BQ6BtFA5.js} +1 -1
- package/dist/client/assets/{calendar-DoivltYN.js → calendar-CI3L7G9u.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dk8QULrM.js → capability-load-error-De4jloBS.js} +1 -1
- package/dist/client/assets/{category-editor-CKte_uBr.js → category-editor-DMUoSfne.js} +1 -1
- package/dist/client/assets/{chart-BpO8BFbN.js → chart-DFYkssKS.js} +1 -1
- package/dist/client/assets/{chat-context-B1Dc5lsu.js → chat-context-BFrEkp-x.js} +1 -1
- package/dist/client/assets/{chat-draft-zRebzdTN.js → chat-draft-WVue6bVm.js} +1 -1
- package/dist/client/assets/{checkbox-BADwu2Rj.js → checkbox-C9g8LYdj.js} +1 -1
- package/dist/client/assets/{choose-editor-mfO2CtNV.js → choose-editor-K8PxtGC5.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BkkXQ3np.js → cli-auth-success-7WGG5Ny7.js} +1 -1
- package/dist/client/assets/{client-icons-CHsHOEe7.js → client-icons-Dg3AySOi.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-DfZDkcQ1.js → cms-settings-editor-BGVlbtsi.js} +1 -1
- package/dist/client/assets/{cms-store-drafts-BuRwcXPq.js → cms-store-drafts-B7OZSklj.js} +1 -1
- package/dist/client/assets/{collapsible-BFh_qMlo.js → collapsible-CouDnhO6.js} +1 -1
- package/dist/client/assets/{collection-detail-Cq-xHp6m.js → collection-detail-UPbZXX41.js} +1 -1
- package/dist/client/assets/{collection-display-button-BYbMEj23.js → collection-display-button-D8katl6X.js} +1 -1
- package/dist/client/assets/{collection-search-Bg84Y9_0.js → collection-search-OjmLQPGA.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-4Lsn1giX.js → collection-table-wrapper-BC08hxFi.js} +1 -1
- package/dist/client/assets/{collection-tabs-D57aIX5v.js → collection-tabs-CwlrIKLz.js} +1 -1
- package/dist/client/assets/{combobox-iSV-CQzM.js → combobox-Fnhph1yB.js} +1 -1
- package/dist/client/assets/{command-CnVdPyj_.js → command-DZp1V8X-.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-Bmqe6SeC.js → companion-mcps-section-1gPvogQd.js} +1 -1
- package/dist/client/assets/{config-DUlh6l4D.js → config-C4Gsnqii.js} +1 -1
- package/dist/client/assets/{connect-Bw0GJuTn.js → connect-DiSxRkvs.js} +1 -1
- package/dist/client/assets/{connect-layout-CwJayWyX.js → connect-layout-DQX9wvNz.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B1fyzn4u.js → connect-source-dialog-ZMMXP6WV.js} +1 -1
- package/dist/client/assets/{connection-Ds0NPGRv.js → connection-B5iqnjJS.js} +1 -1
- package/dist/client/assets/{connection-card-Cnzr9qgv.js → connection-card-dWBeLnkC.js} +1 -1
- package/dist/client/assets/{connection-detail-C94Si9oS.js → connection-detail-vQx4JY7p.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DLZm80Vh.js → connection-form-helpers-C-PfuEYz.js} +1 -1
- package/dist/client/assets/{connection-slug-JtkQvH-U.js → connection-slug-BPPZqv13.js} +1 -1
- package/dist/client/assets/{connections-BwWpc88q.js → connections-BNB5dOFV.js} +1 -1
- package/dist/client/assets/{content-tab-Frzx5T6f.js → content-tab-BjndC62X.js} +3 -3
- package/dist/client/assets/{context--tEugIHA.js → context-B-eGOpuA.js} +1 -1
- package/dist/client/assets/{context-menu-DmK-hmJb.js → context-menu-DqHkPsZX.js} +1 -1
- package/dist/client/assets/{context-shell-M8Z1NRsU.js → context-shell-DkPH0WI3.js} +3 -3
- package/dist/client/assets/{core.esm-PCFOeq2F.js → core.esm-CEehG5ej.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-c0RCVWjZ.js → create-organization-dialog-C-eZv_C7.js} +1 -1
- package/dist/client/assets/{device-hint-Cb5Yk9vR.js → device-hint-juJpe-S9.js} +1 -1
- package/dist/client/assets/{discover-1n4s1YWq.js → discover-COI3hr0O.js} +1 -1
- package/dist/client/assets/{domain-settings-BWnBbfZl.js → domain-settings-BBV7EcxE.js} +1 -1
- package/dist/client/assets/{drawer-BbDXg4uh.js → drawer-CwBC6h27.js} +1 -1
- package/dist/client/assets/{editor-SbnY9UBB.js → editor-YZleAELh.js} +1 -1
- package/dist/client/assets/{editor-classes-DIUoFA4r.js → editor-classes-CK9ai0gl.js} +1 -1
- package/dist/client/assets/{empty-state-Dx0vUNGR.js → empty-state-B9QiU_VY.js} +1 -1
- package/dist/client/assets/{empty-state-DUtU0We7.js → empty-state-CwTtE-MO.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-8BUY4PRB.js → experiments-tab-choice-C1gEvb6G.js} +1 -1
- package/dist/client/assets/{extract-connection-data-5aIWs5nm.js → extract-connection-data-CkWpG9Fj.js} +1 -1
- package/dist/client/assets/{feature-gate-B4_WUn2S.js → feature-gate-CEDC08jo.js} +1 -1
- package/dist/client/assets/{feature-paywall-Ci_hk3eZ.js → feature-paywall-UROHXvVY.js} +1 -1
- package/dist/client/assets/{file-explorer-DS7-0IU7.js → file-explorer-DktEvpiP.js} +1 -1
- package/dist/client/assets/{file-preview-3QxlKUQz.js → file-preview-xiRlJpsu.js} +1 -1
- package/dist/client/assets/{file-share-button-CA034yeE.js → file-share-button-Br7H7qe9.js} +1 -1
- package/dist/client/assets/{file-type-icon-Bp2pbI2H.js → file-type-icon-BRiZbFJM.js} +1 -1
- package/dist/client/assets/{folder-icon-BkUUZm4G.js → folder-icon-CHiicbmI.js} +1 -1
- package/dist/client/assets/{form-BZxHXIID.js → form-BbCRE2mk.js} +1 -1
- package/dist/client/assets/{general-j2gaIDEz.js → general-CYLLbCmH.js} +1 -1
- package/dist/client/assets/{github-icon-ddw588tY.js → github-icon-q1xudgoP.js} +1 -1
- package/dist/client/assets/{home-8Ff5iue5.js → home-CVchwepi.js} +1 -1
- package/dist/client/assets/{home-overview-DGDE6TGI.js → home-overview-BGSikjDJ.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-DB9dOS9F.js → hosted-reconcile-rqZnV2Vw.js} +1 -1
- package/dist/client/assets/{icon-button-D5w08aAD.js → icon-button-Bq3ZJEeE.js} +1 -1
- package/dist/client/assets/{index-Cp6n42Yr.js → index-BD2-Tfve.js} +3 -3
- package/dist/client/assets/{index-CTsVtX6Z.js → index-BD6O45bL.js} +1 -1
- package/dist/client/assets/{index-Bew7RNKQ.js → index-BEFauG6g.js} +1 -1
- package/dist/client/assets/{index-CuNO2v8I.js → index-BW39Ccy3.js} +1 -1
- package/dist/client/assets/{index--SSY-JG1.js → index-BfxFxvBn.js} +1 -1
- package/dist/client/assets/{index-D4OC_zRz.js → index-CGTT47Gs.js} +1 -1
- package/dist/client/assets/{index-B5NK1-t4.js → index-CH4-90Yv.js} +1 -1
- package/dist/client/assets/{index-CMIbJ8MG.js → index-CdvPHHMd.js} +1 -1
- package/dist/client/assets/{index-Dz6SE42K.js → index-CwSLxVp3.js} +1 -1
- package/dist/client/assets/{index-Bs6auyxm.js → index-D8kKxC0w.js} +1 -1
- package/dist/client/assets/{index-CH52vsqw.js → index-DLzGeaMa.js} +1 -1
- package/dist/client/assets/{index-DXV9Rrgh.js → index-DRQaomOR.js} +1 -1
- package/dist/client/assets/{index-CllkIJqm.js → index-DcLP2Uex.js} +1 -1
- package/dist/client/assets/{index-BSoGrbzN.js → index-KVVHw2gU.js} +1 -1
- package/dist/client/assets/{index-DZucODSP.js → index-ULZrkDIx.js} +1 -1
- package/dist/client/assets/{index-DY7W6fVv.js → index-WlHdhzWm.js} +1 -1
- package/dist/client/assets/{index-redirect-D5oUlGVq.js → index-redirect-cM8n5Bf0.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-C6Hka48g.js → infiniteQueryObserver-CFbscoFz.js} +1 -1
- package/dist/client/assets/{infra-billing-cI61pY-d.js → infra-billing-CVwEnJc4.js} +1 -1
- package/dist/client/assets/{input-DGGlfIK5.js → input-mbVW2uET.js} +1 -1
- package/dist/client/assets/{input-C0CJR9vr.js → input-vtcNycLk.js} +3 -3
- package/dist/client/assets/{integration-icon-C9enxTmo.js → integration-icon-C5Anrc8v.js} +1 -1
- package/dist/client/assets/{jira-icon-BrLIhIWw.js → jira-icon-Bmi1xI6r.js} +1 -1
- package/dist/client/assets/{label-DollvLW8.js → label-CZVy73g_.js} +1 -1
- package/dist/client/assets/{layout-BfONeqKu.js → layout-mU_v4Bh-.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-DGD5VDL8.js → legacy-admin-welcome-dialog-xczBeRkI.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-gnvJlDT7.js → legacy-agents-deep-DOprMiQ8.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-Ceue37fQ.js → legacy-main-redirect-frLtUhr7.js} +1 -1
- package/dist/client/assets/library-H2QdAzSR.js +1 -0
- package/dist/client/assets/{library-tab-C4UPTrtu.js → library-tab-DB25yn1i.js} +1 -1
- package/dist/client/assets/{login-BJ2i0F0x.js → login-CmHRnJOc.js} +1 -1
- package/dist/client/assets/{markdown-BAasaHPS.js → markdown-Bn6_U_KJ.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BZ0wqpxq.js → mcp-app-renderer-CLwGZiBS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BdTbmZs-.js → mcp-oauth-DLp_LyKE.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DMVjZNG4.js → mcp-oauth-nWMLUxbw.js} +1 -1
- package/dist/client/assets/{members-B5rwN-xs.js → members-ZiG-LF73.js} +1 -1
- package/dist/client/assets/{memory-D2wUtT6f.js → memory-Bc4AG_R5.js} +1 -1
- package/dist/client/assets/{mock-board-B5ve8ttC.js → mock-board-vq_twtUH.js} +3 -3
- package/dist/client/assets/{monaco-editor-D3FwWS6z.js → monaco-editor-Cwn1FokD.js} +1 -1
- package/dist/client/assets/{monitoring-NCSiQ2Pk.js → monitoring-Ck9IWyMH.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-us5YxB_s.js → monitoring-stats-row-CBa0yJyc.js} +1 -1
- package/dist/client/assets/{multi-select-C9p48rxb.js → multi-select-VgSnOaCE.js} +1 -1
- package/dist/client/assets/{mustache-BE51OfHp.js → mustache-DsmTghzT.js} +1 -1
- package/dist/client/assets/{named-rule-view-Dr1gx6K_.js → named-rule-view-D2hRJFjn.js} +1 -1
- package/dist/client/assets/{new-project-dialog-COHpjNot.js → new-project-dialog-Bq2ZRt1E.js} +1 -1
- package/dist/client/assets/{oauth-callback-CUBLm5wr.js → oauth-callback-DisZamoA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CIj7gVYm.js → oauth-callback-ai-provider-CQY9pH53.js} +1 -1
- package/dist/client/assets/{oauth-consent-bt38CVDY.js → oauth-consent-BLSOh8Vc.js} +1 -1
- package/dist/client/assets/{onboarding-Bx5RinvH.js → onboarding-knc2o8kj.js} +1 -1
- package/dist/client/assets/{openai-conversation-BtohP0w7.js → openai-conversation-D0zBymrP.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-BFYfi1F9.js → optimistic-project-sidebar-views-CkyuDF51.js} +1 -1
- package/dist/client/assets/{order-monitor-day-CKVt2dpk.js → order-monitor-day--YYykwM7.js} +1 -1
- package/dist/client/assets/{organization-choice-BLQB1MdJ.js → organization-choice-DihqTAxR.js} +1 -1
- package/dist/client/assets/{orgs-CEDevUSC.js → orgs-05_Ljhax.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BvxGuDLU.js → own-accounts-section-Vq-dKaIp.js} +1 -1
- package/dist/client/assets/{pair-BjJ0vlX3.js → pair-B-D0jk5j.js} +1 -1
- package/dist/client/assets/{parse-sections-CLMVUWEK.js → parse-sections-DH_6p8mX.js} +3 -3
- package/dist/client/assets/{plan-KNHptWXW.js → plan-C8ZCF1fK.js} +1 -1
- package/dist/client/assets/{plan-ladder-NH52TbUB.js → plan-ladder-ia9SV_u2.js} +1 -1
- package/dist/client/assets/{plan-usage-card-CicIxe-V.js → plan-usage-card-BhMgoOQ-.js} +1 -1
- package/dist/client/assets/{popover-D24o9prf.js → popover-BX49i_9-.js} +1 -1
- package/dist/client/assets/{post-calendar-Bz188EnX.js → post-calendar-BRPy06yS.js} +1 -1
- package/dist/client/assets/{post-editor-CuUceih2.js → post-editor-DO094Qrr.js} +1 -1
- package/dist/client/assets/{preview-content-BA-6vON6.js → preview-content-ByMvryRR.js} +1 -1
- package/dist/client/assets/{preview-dialog-oxja9bAU.js → preview-dialog-CsbNSWkE.js} +1 -1
- package/dist/client/assets/{preview-panel-D9I-ugJU.js → preview-panel-CBrKmmim.js} +1 -1
- package/dist/client/assets/{preview-tab-BwdMydLW.js → preview-tab-DEjq4YQm.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-COzRJ8BW.js → product-picker-dialog-D8SJ6ifV.js} +1 -1
- package/dist/client/assets/{profile-My2od47M.js → profile-DGZtmJpW.js} +1 -1
- package/dist/client/assets/{project-app-view-E76q47JL.js → project-app-view-CSFErIuG.js} +1 -1
- package/dist/client/assets/{project-apps-DrYTNZ5G.js → project-apps-DsmVr6MW.js} +1 -1
- package/dist/client/assets/{project-icon-BM-iwutu.js → project-icon-BMNmURUS.js} +1 -1
- package/dist/client/assets/{project-index-BUVdFrBG.js → project-index-Cf8pv3Xb.js} +1 -1
- package/dist/client/assets/project-reports-DmwAf8Qf.js +1 -0
- package/dist/client/assets/project-tasks-D5vOWT5d.js +1 -0
- package/dist/client/assets/{projects-B3gCjiBk.js → projects-BbuSRcBC.js} +1 -1
- package/dist/client/assets/{projects-empty-state-CTxV56Xs.js → projects-empty-state-D2U4ObkW.js} +1 -1
- package/dist/client/assets/{prompts-D5bhWe_R.js → prompts-ev7-vW68.js} +1 -1
- package/dist/client/assets/{record-editor-D6SsY0SM.js → record-editor-B82Hi6oO.js} +1 -1
- package/dist/client/assets/{redirect-editor-B3698ZCQ.js → redirect-editor-1Kyi1-Qo.js} +1 -1
- package/dist/client/assets/reports-D8_7BSxz.js +1 -0
- package/dist/client/assets/{reports-DaZdSGhj.js → reports-DaISkEl7.js} +1 -1
- package/dist/client/assets/{reports-onboarding-AyYmW8fp.js → reports-onboarding-3NRLE0S7.js} +1 -1
- package/dist/client/assets/{reports-tab-CxSjMYsb.js → reports-tab-BTnE3zXc.js} +2 -2
- package/dist/client/assets/repositories-Rj9HwEBO.js +1 -0
- package/dist/client/assets/{repositories-DQ6Ky9_o.js → repositories-iO0v9MBk.js} +1 -1
- package/dist/client/assets/{repository-binding-D4ffxM0-.js → repository-binding-t2SUt_ly.js} +1 -1
- package/dist/client/assets/{repository-picker-D3voXCbp.js → repository-picker-lw8HWu2E.js} +1 -1
- package/dist/client/assets/{require-capability-D4DqAm-3.js → require-capability-BpHMNsFK.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CNDWmtf1.js → required-auth-layout-D0fYWaPn.js} +1 -1
- package/dist/client/assets/{reset-password-BiiJ_CmP.js → reset-password-GLJcH65P.js} +1 -1
- package/dist/client/assets/{resizable-DsL82mTc.js → resizable-vYXdh-GF.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BRctEg0A.js → resolve-tab-icon-V8LVv3Xn.js} +1 -1
- package/dist/client/assets/{review-settings-BJLhtyo0.js → review-settings-Daf3NI57.js} +1 -1
- package/dist/client/assets/{role-color-Lpygw__k.js → role-color-C4jOHzdR.js} +1 -1
- package/dist/client/assets/{roles-miGbxbmy.js → roles-CV8Os6WH.js} +1 -1
- package/dist/client/assets/{route-Dp0kuMSx.js → route-ChpHpM6U.js} +1 -1
- package/dist/client/assets/{route-CHU5WEK3.js → route-D4eWmnLE.js} +1 -1
- package/dist/client/assets/route-DpfhbI1P.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-WRNVQRt_.js → sandbox-lifecycle-context-wSSR64uz.js} +1 -1
- package/dist/client/assets/{schema-DEsOzh4i.js → schema-lfiSlL5j.js} +1 -1
- package/dist/client/assets/{schema-wLAfgKNj.js → schema-rAmMhTAU.js} +1 -1
- package/dist/client/assets/{scroll-area-DOw7gsKP.js → scroll-area-BdbZ2pRg.js} +1 -1
- package/dist/client/assets/{search-input-B3MNzTE0.js → search-input-DvpyQdwd.js} +1 -1
- package/dist/client/assets/{search-toggle-DReGYaJo.js → search-toggle-EaKGGn7w.js} +1 -1
- package/dist/client/assets/{secret-picker-C20_xwTo.js → secret-picker-ZdBMvgUe.js} +1 -1
- package/dist/client/assets/{secrets-BySkDPIF.js → secrets-D35RaSBM.js} +1 -1
- package/dist/client/assets/{section-array-field-DTljbrtq.js → section-array-field-C3FXtjzL.js} +1 -1
- package/dist/client/assets/{sections-BoRSb0eA.js → sections-BXC8sRej.js} +1 -1
- package/dist/client/assets/{sections-editor-CHnIwFIR.js → sections-editor-oQAkX7iV.js} +1 -1
- package/dist/client/assets/{select-CF7TydOZ.js → select-DzfQ0lJI.js} +1 -1
- package/dist/client/assets/{select-model-B9Bic-T3.js → select-model-Bc-aj0Ca.js} +1 -1
- package/dist/client/assets/{seo-editor-DOkOiarr.js → seo-editor-B-SmTz7B.js} +1 -1
- package/dist/client/assets/{separator-DhcQY19g.js → separator-CtG551Kh.js} +1 -1
- package/dist/client/assets/settings-tab--GGe5YhB.js +1 -0
- package/dist/client/assets/{sheet-BdVmV6Pq.js → sheet-ChvL33ih.js} +1 -1
- package/dist/client/assets/{shell-layout-MQ4OcCap.js → shell-layout-CUa5MDUh.js} +1 -1
- package/dist/client/assets/{site-draft-actions-BaadF58T.js → site-draft-actions-C7WlFKVv.js} +1 -1
- package/dist/client/assets/{site-draft-view-Ccdq_-fk.js → site-draft-view-CjzDGxji.js} +1 -1
- package/dist/client/assets/site-editor-BgYmGLHo.js +1 -0
- package/dist/client/assets/{site-editor-toast-DM5YZS3Y.js → site-editor-toast-CWugfiSd.js} +1 -1
- package/dist/client/assets/{skills-DJOLRmph.js → skills-C5QLe26M.js} +1 -1
- package/dist/client/assets/{slider-DJcSL4Tw.js → slider-Ecd2IIkn.js} +1 -1
- package/dist/client/assets/{sortable.esm-C_BgVL5v.js → sortable.esm-B7uFfy_P.js} +1 -1
- package/dist/client/assets/{sso-BZDDOaue.js → sso-0gVFO2bM.js} +1 -1
- package/dist/client/assets/{suggestion-B3N1mIWr.js → suggestion-DNThc8_w.js} +1 -1
- package/dist/client/assets/{super-agent-icon-g2NhNxGd.js → super-agent-icon-WK3PJICd.js} +1 -1
- package/dist/client/assets/{switch-IAv0jmhq.js → switch-rEtvwmeJ.js} +1 -1
- package/dist/client/assets/{synced-repos-GfE9kIif.js → synced-repos-CsB9l6Mv.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CJmmHM_1.js → tab-icon-glyph-DuRegJvy.js} +1 -1
- package/dist/client/assets/{table-DO96vrVz.js → table-tgAIcOjU.js} +1 -1
- package/dist/client/assets/{tabs-B1aOuHa_.js → tabs-CRh6BkF5.js} +1 -1
- package/dist/client/assets/{task-board-Bc-7X8Cr.js → task-board-DVzbOFVa.js} +1 -1
- package/dist/client/assets/{task-route-UOwF7ZyB.js → task-route-DJww-aBE.js} +1 -1
- package/dist/client/assets/{task-status-BjQzfxdG.js → task-status-CPDhSMht.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CIxAcfXM.js → taskboard-analytics-Dmg8kQ7N.js} +1 -1
- package/dist/client/assets/{tasks-6JgQa8El.js → tasks-BSfgBHRO.js} +1 -1
- package/dist/client/assets/tasks-BiPHQc84.js +1 -0
- package/dist/client/assets/{textarea-DCa16Aq1.js → textarea-CvTlfpHc.js} +1 -1
- package/dist/client/assets/{thread-analytics-10dzcGNV.js → thread-analytics-DD_Y3FQw.js} +1 -1
- package/dist/client/assets/{thread-intent-Ddlv1EMC.js → thread-intent-BhJhZ_UP.js} +1 -1
- package/dist/client/assets/{thread-route-C_pt-wyk.js → thread-route-DFmD7mlY.js} +1 -1
- package/dist/client/assets/{thread-route-AJ1czxsb.js → thread-route-Df1f7USR.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-BF95jdw2.js → thread-sheet-body-CCNPZBqb.js} +1 -1
- package/dist/client/assets/{time-range-picker-BOytGVlx.js → time-range-picker-CNJKAQia.js} +1 -1
- package/dist/client/assets/{toggle-group-DTX-YKoE.js → toggle-group-CEtlbqEu.js} +1 -1
- package/dist/client/assets/{tool-namespace-BKOiLsuX.js → tool-namespace-xhn6qzed.js} +1 -1
- package/dist/client/assets/{tool-set-selector-DnHiuvkS.js → tool-set-selector-0qJqj3BN.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BImRw-Lv.js → toolbar-icon-button-BYM1l_EM.js} +1 -1
- package/dist/client/assets/{tooltip-D6hu1dbX.js → tooltip-CPWUruKJ.js} +1 -1
- package/dist/client/assets/{tooltipContext-Dofwvvi6.js → tooltipContext-DYzAHA8b.js} +1 -1
- package/dist/client/assets/{track-t0ME1Ly8.js → track-As-I-W_o.js} +1 -1
- package/dist/client/assets/{types-CM-Rkav0.js → types-BM3wGHXs.js} +1 -1
- package/dist/client/assets/{url-slug-jY-crr9m.js → url-slug-C7LbKTWT.js} +1 -1
- package/dist/client/assets/{usage-stats-wdmn6GE1.js → usage-stats-BITMwpzs.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CRYxK9KK.js → use-ai-providers-pPbmGXbG.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-DvjmPUTS.js → use-apply-named-rule-Bv0WgvtT.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-COLxNYu8.js +1 -0
- package/dist/client/assets/{use-automations-BpFoHkvb.js → use-automations-BEx9jN5g.js} +1 -1
- package/dist/client/assets/{use-autosave-DGu11Mbg.js → use-autosave-BxToYayg.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-BKzS5s7M.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-SqWJFsf3.js → use-chat-layout-state-YDnStvp0.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-XDOPUQHc.js → use-cms-publish-actions-BJxFUgnP.js} +1 -1
- package/dist/client/assets/{use-connect-companion-B3czJAuB.js → use-connect-companion-CMi6qABv.js} +1 -1
- package/dist/client/assets/{use-connection-BQ2tY3eA.js → use-connection-BeyjX32e.js} +1 -1
- package/dist/client/assets/{use-content-sync-fcT1LgMa.js → use-content-sync-D9WlRyAv.js} +1 -1
- package/dist/client/assets/{use-copy-8YzW6-lz.js → use-copy-Yov8ynUc.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-PI2Bl-dF.js → use-date-fns-locale-CqG8akF0.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BcrhTA1Q.js → use-debounced-autosave-BwG78Eft.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BTFyu_fg.js → use-debounced-value-CjUdoTQj.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DT_w_P1F.js → use-deco-credits-CHVv60jE.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Cgg-kjzY.js → use-decopilot-events-Dxkyyj-f.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B-NX9bKA.js → use-delete-connection-DcDccx5j.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-59-ElZAe.js → use-deployment-admin-BP73XI6k.js} +1 -1
- package/dist/client/assets/{use-entitlements-DLe5ef_A.js → use-entitlements-B6JBu_O9.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-D1k789oB.js → use-fast-preview-draft-url-Be4qQSKF.js} +1 -1
- package/dist/client/assets/{use-file-configs-BpNaWDSz.js → use-file-configs-4JpNA1Tb.js} +1 -1
- package/dist/client/assets/{use-id-selection-ouzPuXIU.js → use-id-selection-CdOmebQh.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-ClYflJTd.js → use-inbox-feed-vv9gd7Sc.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BgEfhgKU.js → use-infinite-scroll-DuiGO_jY.js} +1 -1
- package/dist/client/assets/{use-join-requests-BUkPdRUf.js → use-join-requests-aN5r5Pxn.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-DvzXIGUh.js → use-main-panel-tabs-LFa8N1wr.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D-uKGgD8.js → use-mcp-auth-status-D1KHm_6z.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DwDMU7Zt.js → use-mcp-client-Dwx3joSc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-C6NWo9MQ.js → use-mcp-prompts-CgaLso39.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DZaATGrv.js → use-mcp-tools-KrWmb9CR.js} +1 -1
- package/dist/client/assets/{use-mobile-BGUAkmF8.js → use-mobile-BL_lLwbJ.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CC7bxDZW.js → use-move-blocks-DLKMXFIt.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DgVOA-5d.js → use-navigate-to-agent-DquGUsnU.js} +1 -1
- package/dist/client/assets/{use-org-fs-DunUzjbR.js → use-org-fs-DDN_Ivwy.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-DrOMrEnQ.js → use-org-repo-syncs-VLN8P34E.js} +1 -1
- package/dist/client/assets/{use-org-sso-bHD0WS2b.js → use-org-sso-DCyl-5Yq.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CPT_AQxx.js → use-organization-settings-ezDxn50S.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-1t6Rz_Yq.js → use-project-native-view-presence-Dmz_uZfw.js} +1 -1
- package/dist/client/assets/{use-project-scope-DZ381aQg.js → use-project-scope-Bv0XQrp-.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CMUESJxc.js → use-recent-apps-C1nVs7iP.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Rl_4afQa.js → use-reports-diagnostic-CG1-7P8p.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-C4Btxk0W.js → use-sandbox-events-DGTvdxAG.js} +1 -1
- package/dist/client/assets/{use-secrets-DWea_YYg.js → use-secrets-BDKLIqQa.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-C5OIxUQk.js → use-section-preview-base-RsRAdpLG.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DwaUZcOQ.js → use-sidebar-collapsed-pjufulEj.js} +1 -1
- package/dist/client/assets/{use-tags-CnnPBapF.js → use-tags-DRgt7SdO.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BCEU5OIE.js → use-task-board-analytics-BBqVIyLD.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C0YoK98Y.js → use-task-board-events-C076JDrW.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-DHx4WnJL.js → use-task-board-item-prs-CMWcegEQ.js} +1 -1
- package/dist/client/assets/{use-task-board-items-Gk66Irve.js → use-task-board-items-C3wN6VZ7.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-_ANJzZ4J.js → use-task-board-prompts-BljQAl60.js} +1 -1
- package/dist/client/assets/{use-task-metadata-DJcBNC2v.js → use-task-metadata-IKal_B89.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-sLAJub_R.js → use-thread-outputs-DW15e6qt.js} +1 -1
- package/dist/client/assets/{use-voice-input-CxbYDlyj.js → use-voice-input-Bhc30U5o.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DIP1SnGb.js +1 -0
- package/dist/client/assets/{useQueries-mzrH2emD.js → useQueries-BWsosSvF.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DrHv36Dy.js +1 -0
- package/dist/client/assets/{users-Bu6Qt6s2.js → users-BL-cP3wa.js} +1 -1
- package/dist/client/assets/{utils-DM_dS343.js → utils-DgoaBGZ5.js} +1 -1
- package/dist/client/assets/{variant-calendar-CTxdQFVd.js → variant-calendar-D9HBG0p_.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BVs7zu47.js → variant-matcher-override-DoXeO1c0.js} +1 -1
- package/dist/client/assets/{view-header-p1uaKDV9.js → view-header-j_OBPXJD.js} +1 -1
- package/dist/client/assets/{virtual-mcp-C1hB0s55.js → virtual-mcp-DUuDRM1F.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-xnhJvZvd.js → watch-sse-pool-Bno2kqCn.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +412 -412
- package/package.json +1 -1
- package/dist/client/assets/agent-app-DXwdoAjf.js +0 -1
- package/dist/client/assets/agent-deck-Dd-94Ll1.js +0 -1
- package/dist/client/assets/agent-experiments-ScITEgVg.js +0 -1
- package/dist/client/assets/agent-library-BeNJQBOC.js +0 -1
- package/dist/client/assets/agent-library-file-B2Ucnk93.js +0 -1
- package/dist/client/assets/agent-overview-CmWFjWhR.js +0 -1
- package/dist/client/assets/agent-settings-ClO775W2.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CbYxsWDQ.js +0 -2
- package/dist/client/assets/agent-site-editor-content-DiQWw-fO.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-lCIgS5W9.js +0 -1
- package/dist/client/assets/agent-view-BNMlU9Xn.js +0 -1
- package/dist/client/assets/api-keys-VCcvSSAk.js +0 -1
- package/dist/client/assets/library-DKGbQOFX.js +0 -1
- package/dist/client/assets/project-reports-Fc7-jScE.js +0 -1
- package/dist/client/assets/project-tasks-Bhf7Ee7Q.js +0 -1
- package/dist/client/assets/reports-CANELH-J.js +0 -1
- package/dist/client/assets/repositories-BSWAcVK8.js +0 -1
- package/dist/client/assets/route-wjqv8tCV.js +0 -1
- package/dist/client/assets/settings-tab-D25mtqBG.js +0 -1
- package/dist/client/assets/site-editor-4daajG8m.js +0 -1
- package/dist/client/assets/tasks-Cbn3588T.js +0 -1
- package/dist/client/assets/use-ask-in-chat-CTdK-Xy9.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BY-tUedz.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B3K8Xwsj.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DMjSwk6C.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,cB as ce,j as p,cH as _,cG as T,cE as C,cL as le,cA as de,cX as ue,cT as fe,cM as me}from"./index-
|
|
1
|
+
import{r as l,cB as ce,j as p,cH as _,cG as T,cE as C,cL as le,cA as de,cX as ue,cT as fe,cM as me}from"./index-BD2-Tfve.js";import{c as Y}from"./index-BdQq_4o_.js";var X=["PageUp","PageDown"],$=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[z,Se,pe]=le(M),[W]=fe(M,[pe]),[he,B]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),V=l.useRef(S);function j(b){const y=ye(S,b);A(b,y)}function se(b){A(b,f.current)}function ae(){const b=V.current[f.current];S[f.current]!==b&&d(S)}function A(b,y,{commit:k}={commit:!1}){const U=_e(c),H=Ce(Math.round((b-n)/c)*c+n,U),I=Y(H,[n,s]);K((D=[])=>{const P=be(D,I,y);if(De(P,u*c)){f.current=P.indexOf(I);const F=String(P)!==String(D);return F&&k&&d(P),F?P:D}else return D})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(z.Provider,{scope:e.__scopeSlider,children:p.jsx(z.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(V.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:j,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&A(n,0,{commit:!0}),onEndKeyDown:()=>!a&&A(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const H=X.includes(b.key)||b.shiftKey&&$.includes(b.key)?10:1,I=f.current,D=S[I],P=c*H*y;A(D+P,I,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function E(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],j=O(K,f?[o,n]:[n,o]);return R.current=S,j(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=E(x.clientX);r?.(S)},onSlideMove:x=>{const S=E(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=B(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):X.concat($).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=B(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=B(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=B(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,E=>w(E)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(z.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function Ee(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function De(e,t){if(t>0){const o=Ee(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ae=q,Ie=te,Te=ne,Be=oe;export{Te as R,Ie as T,Ae as a,Be as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as E,j as x,m as q,by as At,t as ue,b1 as Ye,a4 as Mt,ha as St,i as Ct,K as Rt,bR as Et,h as Je,o as $t}from"./index-Cp6n42Yr.js";import{a as _t,n as et,E as ie,o as Lt,x as It,y as P,z as zt,A as Pt,B as tt,C as N,G as Ee,H as Ht,I as jt,J as $e,K as Nt,L as V,N as D,m as H,O as J,T as nt,R as ke,Q as xe,U as Ot,V as Bt,W as Dt,X as Ft,Y as qt,s as Wt,Z as Ut,u as Gt,b as Zt}from"./usage-stats-wdmn6GE1.js";import{T as _,n as Vt,i as Kt,E as Qt}from"./editor-classes-DIUoFA4r.js";import{a as Xt,e as rt,s as Yt,S as Jt}from"./suggestion-B3N1mIWr.js";import{B as en,c as tn,t as nn,C as st,f as rn,g as _e,s as sn,m as Le,a as Ie,b as an,d as ze,e as on,h as ln,i as cn,j as un,k as hn,l as dn,n as pn}from"./index-DZucODSP.js";import{aU as fn,af as gn,ag as mn,ai as kn,Y as xn,bm as bn,aZ as wn}from"./agent-icon-Cq6bkxhD.js";import{i as yn}from"./SwitchHorizontal01-BUmyYri2.js";import{s as Tn}from"./Trash01-b7MmLF07.js";import{k as vn,a as An}from"./use-org-fs-DunUzjbR.js";import{E as Pe,i as it,b as Mn,c as Sn,d as at,A as Cn,e as Rn,m as En,f as $n,g as _n}from"./markdown-BAasaHPS.js";import{f as Ln,a as In,c as zn,C as Pn,b as He}from"./command-CnVdPyj_.js";import{I as Hn}from"./icon-button-D5w08aAD.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const A=n.getAttributes("link").href;l(typeof A=="string"?A:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const A=Vt(a);if(A===""){g();return}if(!Kt(A)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:A}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let y;e[11]!==r?(y=r("markdownEditor.link"),e[11]=r,e[12]=y):y=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=x.jsx(fn,{size:14}),e[13]=T):T=e[13];let v;e[14]!==h||e[15]!==y||e[16]!==f?(v=x.jsx(_,{active:h,label:y,onClick:f,children:T}),e[14]=h,e[15]=y,e[16]=f,e[17]=v):v=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.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:A=>{A.currentTarget.contains(A.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:A=>{l(A.target.value),u(!1)},onKeyDown:A=>{A.key==="Enter"?(A.preventDefault(),k()):A.key==="Escape"&&(A.preventDefault(),i(!1),n.chain().focus().run())},className:q("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")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(At,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(Tn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let w;return e[27]!==v||e[28]!==b?(w=x.jsxs("div",{className:"relative",children:[v,b]}),e[27]=v,e[28]=b,e[29]=w):w=e[29],w}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},je=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},ot=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=_t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(en,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(gn,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(kn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(xn,{size:14})}),x.jsx(le,{}),ot.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(je,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(yn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(je,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(bn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:ot.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=vn(Pe),r=An(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=it(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?Mn:Sn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new et("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Lt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Zn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((v,b,w,A)=>{p=w,g=A});let m;f.doc.nodesBetween(p,g,(v,b)=>{v===l&&(m=b+v.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const y=i.nodes.paragraph;m!==void 0&&l.isBlock&&y&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,y.create()),k=m+1);const T=It.near(f.doc.resolve(k));o&&f.setSelection(T),s&&he(f,s,T.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=it(g);Vn(h,Zn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function lt(t){F=t}var O={exec:()=>null};function M(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{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)}}>`)},Yn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {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+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ct=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ut=M(ct).replace(/bull/g,we).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(),nr=M(ct).replace(/bull/g,we).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(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="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",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=M("^ {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",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ht=M(ye).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",ae).getRegex(),or=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ht).getRegex(),Ae={blockquote:or,code:Jn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:ut,list:ir,newline:Yn,paragraph:ht,table:O,text:rr},Ne=M("^ *([^\\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",ae).getRegex(),lr={...Ae,lheading:nr,table:Ne,paragraph:M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).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",ae).getRegex()},cr={...Ae,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).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:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as E,j as x,m as q,by as At,t as ue,b1 as Ye,a4 as Mt,ha as St,i as Ct,K as Rt,bR as Et,h as Je,o as $t}from"./index-BD2-Tfve.js";import{a as _t,n as et,E as ie,o as Lt,x as It,y as P,z as zt,A as Pt,B as tt,C as N,G as Ee,H as Ht,I as jt,J as $e,K as Nt,L as V,N as D,m as H,O as J,T as nt,R as ke,Q as xe,U as Ot,V as Bt,W as Dt,X as Ft,Y as qt,s as Wt,Z as Ut,u as Gt,b as Zt}from"./usage-stats-BITMwpzs.js";import{T as _,n as Vt,i as Kt,E as Qt}from"./editor-classes-CK9ai0gl.js";import{a as Xt,e as rt,s as Yt,S as Jt}from"./suggestion-DNThc8_w.js";import{B as en,c as tn,t as nn,C as st,f as rn,g as _e,s as sn,m as Le,a as Ie,b as an,d as ze,e as on,h as ln,i as cn,j as un,k as hn,l as dn,n as pn}from"./index-ULZrkDIx.js";import{aU as fn,af as gn,ag as mn,ai as kn,Y as xn,bm as bn,aZ as wn}from"./agent-icon-C4zAUQeZ.js";import{i as yn}from"./SwitchHorizontal01-B1owjF7D.js";import{s as Tn}from"./Trash01-CTl0J4n_.js";import{k as vn,a as An}from"./use-org-fs-DDN_Ivwy.js";import{E as Pe,i as it,b as Mn,c as Sn,d as at,A as Cn,e as Rn,m as En,f as $n,g as _n}from"./markdown-Bn6_U_KJ.js";import{f as Ln,a as In,c as zn,C as Pn,b as He}from"./command-DZp1V8X-.js";import{I as Hn}from"./icon-button-Bq3ZJEeE.js";function jn(t){const e=$.c(30),{editor:n}=t,r=j(),[s,i]=E.useState(!1),[a,l]=E.useState(""),[o,u]=E.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const h=c;let d;e[2]!==n||e[3]!==s?(d=()=>{if(s){i(!1);return}const A=n.getAttributes("link").href;l(typeof A=="string"?A:""),u(!1),i(!0)},e[2]=n,e[3]=s,e[4]=d):d=e[4];const f=d;let p;e[5]!==n?(p=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),i(!1)},e[5]=n,e[6]=p):p=e[6];const g=p;let m;e[7]!==a||e[8]!==n||e[9]!==g?(m=()=>{const A=Vt(a);if(A===""){g();return}if(!Kt(A)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:A}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let y;e[11]!==r?(y=r("markdownEditor.link"),e[11]=r,e[12]=y):y=e[12];let T;e[13]===Symbol.for("react.memo_cache_sentinel")?(T=x.jsx(fn,{size:14}),e[13]=T):T=e[13];let v;e[14]!==h||e[15]!==y||e[16]!==f?(v=x.jsx(_,{active:h,label:y,onClick:f,children:T}),e[14]=h,e[15]=y,e[16]=f,e[17]=v):v=e[17];let b;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(b=s&&x.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:A=>{A.currentTarget.contains(A.relatedTarget)||i(!1)},children:[x.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:A=>{l(A.target.value),u(!1)},onKeyDown:A=>{A.key==="Enter"?(A.preventDefault(),k()):A.key==="Escape"&&(A.preventDefault(),i(!1),n.chain().focus().run())},className:q("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")}),x.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:x.jsx(At,{size:14})}),h&&x.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:x.jsx(Tn,{size:14})})]}),e[18]=h,e[19]=k,e[20]=a,e[21]=n,e[22]=o,e[23]=s,e[24]=g,e[25]=r,e[26]=b):b=e[26];let w;return e[27]!==v||e[28]!==b?(w=x.jsxs("div",{className:"relative",children:[v,b]}),e[27]=v,e[28]=b,e[29]=w):w=e[29],w}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=x.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},je=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=x.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},ot=[1,2,3],Nn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function On(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:Bn},e[0]=n,e[1]=a):a=e[1];const l=_t(a);let o;e[2]!==r?(o=r("markdownEditor.heading1"),e[2]=r,e[3]=o):o=e[3];let u;e[4]!==r?(u=r("markdownEditor.heading2"),e[4]=r,e[5]=u):u=e[5];let c;e[6]!==r?(c=r("markdownEditor.heading3"),e[6]=r,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==u||e[10]!==c?(h={1:o,2:u,3:c},e[8]=o,e[9]=u,e[10]=c,e[11]=h):h=e[11];const d=h;let f;e[12]!==n||e[13]!==d||e[14]!==s||e[15]!==l||e[16]!==r?(f=s&&x.jsxs(en,{editor:n,shouldShow:Nn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[x.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:x.jsx(gn,{size:14})}),x.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:x.jsx(mn,{size:14})}),x.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:x.jsx(kn,{size:14})}),x.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:x.jsx(xn,{size:14})}),x.jsx(le,{}),ot.map((g,m)=>x.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:x.jsx(je,{children:`H${g}`})},g)),x.jsx(le,{}),x.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:x.jsx(yn,{size:14})}),x.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:x.jsx(je,{children:"1."})}),x.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:x.jsx(bn,{size:14})}),x.jsx(le,{}),x.jsx(jn,{editor:n})]}),e[12]=n,e[13]=d,e[14]=s,e[15]=l,e[16]=r,e[17]=f):f=e[17];let p;return e[18]!==f?(p=x.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function Bn(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:ot.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Dn=10,Fn=25,qn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function Wn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??qn[t.type]??""}function Un(){const t=$.c(4),e=j(),{upload:n}=vn(Pe),r=An(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=it(a),o=l?Dn:Fn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?Mn:Sn,c=`${crypto.randomUUID()}${Wn(a)}`;try{return await n.mutateAsync({dir:u,files:[new File([a],c,{type:a.type})]}),r(`${u}/${c}`)}catch{return ue.error(e("markdownEditor.uploadFailed",{name:a.name})),null}}},t[0]=r,t[1]=e,t[2]=n,t[3]=s):s=t[3],s}const ee=new et("uploadSlots"),Gn=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new Lt({key:ee,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(ee);if(!t.docChanged&&!n)return e;const r=new Map;for(const[s,i]of e)r.set(s,t.mapping.map(i));if(n){const[s,i]=n;i===null?r.delete(s):r.set(s,i)}return r}}})]}});function he(t,e,n){return t.setMeta(ee,[e,n])}function Zn(t,e){return ee.getState(t)?.get(e)}function Vn(t,e,n,r,s){const{schema:i}=t.state,a=i.nodes[n];if(!a)return;const l=a.create(r),o=t.state.selection.to===e,u=t.state.doc.resolve(e),c=u.parent.textBetween(Math.max(0,u.parentOffset-1),u.parentOffset,void 0,""),h=()=>i.text(" "),d=l.isInline?[...c&&!/\s/.test(c)?[h()]:[],l,h()]:l,f=t.state.tr.replaceWith(e,e,d);let p=e,g=e;f.mapping.maps.at(-1)?.forEach((v,b,w,A)=>{p=w,g=A});let m;f.doc.nodesBetween(p,g,(v,b)=>{v===l&&(m=b+v.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const y=i.nodes.paragraph;m!==void 0&&l.isBlock&&y&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,y.create()),k=m+1);const T=It.near(f.doc.resolve(k));o&&f.setSelection(T),s&&he(f,s,T.to),t.dispatch(f)}function Kn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Qn(t=!0){const e=j(),{uploadFile:n}=Un(),r=E.useRef(n);r.current=n;const[s,i]=E.useState(0),a=E.useRef(0),l=h=>{a.current+=h,i(a.current)},o=(h,d,f)=>{if(!t||d.length===0)return!1;l(d.length);const p=Symbol("upload");return h.dispatch(he(h.state.tr,p,f)),(async()=>{for(const g of d)try{const m=await r.current(g);if(!m||h.isDestroyed)continue;const k=it(g);Vn(h,Zn(h.state,p)??h.state.selection.to,k?"image":"attachment",k?{src:m,alt:g.name}:{href:m,name:g.name},p)}catch{ue.error(e("markdownEditor.uploadFailed",{name:g.name}))}finally{l(-1)}h.isDestroyed||h.dispatch(he(h.state.tr,p,null))})(),!0};return{pending:s,uploading:()=>a.current>0,uploadInto:o,handlePaste:(h,d)=>{const f=Kn(d.clipboardData);return f.length===0?!1:(d.stopPropagation(),o(h,f,h.state.selection.to))},handleDrop:(h,d,f,p)=>{if(p)return!1;const g=Array.from(d.dataTransfer?.files??[]);if(g.length===0)return!1;const m=h.posAtCoords({left:d.clientX,top:d.clientY})?.pos;return m===void 0?!1:(d.stopPropagation(),o(h,g,m))}}}function be(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var F=be();function lt(t){F=t}var O={exec:()=>null};function M(t,e=""){let n=typeof t=="string"?t:t.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(R.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,e)};return r}var Xn=(()=>{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)}}>`)},Yn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,er=/^ {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+|$)/,tr=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ct=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ut=M(ct).replace(/bull/g,we).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(),nr=M(ct).replace(/bull/g,we).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(),ye=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,rr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,sr=M(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ir=M(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,we).getRegex(),ae="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",ve=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ar=M("^ {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",ve).replace("tag",ae).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ht=M(ye).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",ae).getRegex(),or=M(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ht).getRegex(),Ae={blockquote:or,code:Jn,def:sr,fences:er,heading:tr,hr:K,html:ar,lheading:ut,list:ir,newline:Yn,paragraph:ht,table:O,text:rr},Ne=M("^ *([^\\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",ae).getRegex(),lr={...Ae,lheading:nr,table:Ne,paragraph:M(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ne).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",ae).getRegex()},cr={...Ae,html:M(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ve).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:O,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:M(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ut).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},ur=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,hr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dt=/^( {2,}|\\)\n(?!\s*$)/,dr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,W=/[\p{P}\p{S}]/u,oe=/[\s\p{P}\p{S}]/u,Me=/[^\s\p{P}\p{S}]/u,pr=M(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),pt=/(?!~)[\p{P}\p{S}]/u,fr=/(?!~)[\s\p{P}\p{S}]/u,gr=/(?:[^\s\p{P}\p{S}]|~)/u,mr=M(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Xn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ft=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,kr=M(ft,"u").replace(/punct/g,W).getRegex(),xr=M(ft,"u").replace(/punct/g,pt).getRegex(),gt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",br=M(gt,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),wr=M(gt,"gu").replace(/notPunctSpace/g,gr).replace(/punctSpace/g,fr).replace(/punct/g,pt).getRegex(),yr=M("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Tr=M(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),vr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Ar=M(vr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Mr=M(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Sr=M(/^<(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(),Cr=M(ve).replace("(?:-->|$)","-->").getRegex(),Rr=M("^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",Cr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Er=M(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mt=M(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),kt=M(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),$r=M("reflink|nolink(?!\\()","g").replace("reflink",mt).replace("nolink",kt).getRegex(),Oe=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Mr,autolink:Sr,blockSkip:mr,br:dt,code:hr,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:kr,emStrongRDelimAst:br,emStrongRDelimUnd:yr,escape:ur,link:Er,nolink:kt,punctuation:pr,reflink:mt,reflinkSearch:$r,tag:Rr,text:dr,url:O},_r={...Se,link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:wr,emStrongLDelim:xr,delLDelim:Tr,delRDelim:Ar,url:M(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Oe).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:M(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Oe).getRegex()},Lr={...de,br:M(dt).replace("{2,}","*").getRegex(),text:M(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:lr,pedantic:cr},U={normal:Se,gfm:de,breaks:Lr,pedantic:_r},Ir={"&":"&","<":"<",">":">",'"':""","'":"'"},Be=t=>Ir[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Be)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Be);return t}function De(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Fe(t,e){let n=t.replace(R.findPipe,(i,a,l)=>{let o=!1,u=a;for(;--u>=0&&l[u]==="\\";)o=!o;return o?"|":" |"}),r=n.split(R.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(R.slashPipe,"|");return r}function G(t,e,n){let r=t.length;if(r===0)return"";let s=0;for(;s<r&&t.charAt(r-s-1)===e;)s++;return t.slice(0,r-s)}function zr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Pr(t,e=0){let n=e,r="";for(let s of t)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function qe(t,e,n,r,s){let i=e.href,a=e.title||null,l=t[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,o}function Hr(t,e,n){let r=t.match(n.other.indentCodeCompensation);if(r===null)return e;let s=r[1];return e.split(`
|
|
3
3
|
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[l]=a;return l.length>=s.length?i.slice(s.length):i}).join(`
|
|
4
4
|
`)}var ne=class{options;rules;lexer;constructor(t){this.options=t||F}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:G(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as w,aq as le,as as re,b as se,a4 as ce,l as de,j as s,m as ue,n as ae,r as D,d as he,aQ as Q,R as J,P as z,aY as fe,B as me}from"./index-Cp6n42Yr.js";import{u as pe}from"./use-mobile-BGUAkmF8.js";import{h as ge,c as be,u as xe,m as ye}from"./use-sidebar-collapsed-DwaUZcOQ.js";import{a as ie,R as je,b as Se}from"./resizable-DsL82mTc.js";import{c as ve,r as Ce,m as Te}from"./use-chat-layout-state-SqWJFsf3.js";import{M as Le,o as Ne}from"./agent-icon-Cq6bkxhD.js";import{c as X,T as Z,a as ee}from"./tooltip-D6hu1dbX.js";import{T as te}from"./toolbar-icon-button-BImRw-Lv.js";import{u as we}from"./use-project-scope-DZ381aQg.js";import{b as Pe}from"./repository-binding-D4ffxM0-.js";function ne(l,e){const a=typeof l=="number"?l:Number(l);return!Number.isFinite(a)||a<=0||a>=100?e:a}function ze(l,e){const a=w.c(8);let o;a[0]!==e?(o=c=>ne(c,e),a[0]=e,a[1]=o):o=a[1];const[t,i]=le(l,o);let n;a[2]!==e||a[3]!==t?(n=ne(t,e),a[2]=e,a[3]=t,a[4]=n):n=a[4];let u;return a[5]!==i||a[6]!==n?(u=[n,i],a[5]=i,a[6]=n,a[7]=u):u=a[7],u}const _e=33;function Oe(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.sidePanelWidth(),l[0]=e):e=l[0],ze(e,_e)}function Ee(l){const e=w.c(64),{actions:a,navigation:o}=l,t=se(),{org:i}=ce(),n=we(),u=Pe(n),c=ge(),{toggleSidebar:d}=be(),h=xe(),r=oe();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Me},e[0]=f):f=e[0];const m=de(f),b=m?.mainView==="overview";let x;e[1]!==u?.title||e[2]!==t?(x=u?.title??t("common.loading"),e[1]=u?.title,e[2]=t,e[3]=x):x=e[3];const y=x;let j;e[4]!==b||e[5]!==m?.mainView||e[6]!==m?.pageTitle||e[7]!==y||e[8]!==n||e[9]!==t?(j=b?n?y:t("sidebar.navDestinations.home"):m?.mainView==="files"?t("sidebar.navDestinations.context"):t(m?.pageTitle??"page.view"),e[4]=b,e[5]=m?.mainView,e[6]=m?.pageTitle,e[7]=y,e[8]=n,e[9]=t,e[10]=j):j=e[10];const S=j,C=n??"";let T;e[11]!==i.slug||e[12]!==C?(T={to:"/$org/projects/$agentId",params:{org:i.slug,agentId:C}},e[11]=i.slug,e[12]=C,e[13]=T):T=e[13];const p=T;let g;if(e[14]!==c||e[15]!==b||e[16]!==i.slug||e[17]!==p||e[18]!==y||e[19]!==n||e[20]!==t||e[21]!==S){if(g=[],c){let v;e[23]!==t?(v=t("sidebar.navDestinations.settings"),e[23]=t,e[24]=v):v=e[24];let B;e[25]!==i.slug?(B={to:"/$org/settings/general",params:{org:i.slug}},e[25]=i.slug,e[26]=B):B=e[26];let K;e[27]!==v||e[28]!==B?(K={key:"settings",label:v,link:B},e[27]=v,e[28]=B,e[29]=K):K=e[29],g.push(K)}else if(n&&!b){let v;e[30]!==p||e[31]!==y?(v={key:"project",label:y,link:p},e[30]=p,e[31]=y,e[32]=v):v=e[32],g.push(v)}let V;e[33]!==S?(V={key:"page",label:S},e[33]=S,e[34]=V):V=e[34],g.push(V),e[14]=c,e[15]=b,e[16]=i.slug,e[17]=p,e[18]=y,e[19]=n,e[20]=t,e[21]=S,e[22]=g}else g=e[22];const L=h,N=!!r&&!r.threadless&&r.threadOpen;let P;e[35]!==r||e[36]!==L||e[37]!==t?(P=L&&r&&!r.threadless&&s.jsxs(X,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(te,{"aria-label":t(r.threadOpen?"page.closeThread":"page.openThread"),"aria-pressed":r.threadOpen,active:r.threadOpen,onClick:r.toggleThread,children:s.jsx(Le,{size:16})})}),s.jsx(ee,{side:"bottom",children:t(r.threadOpen?"page.closeThread":"page.openThread")})]}),e[35]=r,e[36]=L,e[37]=t,e[38]=P):P=e[38];const q=P,W=(!L||N)&&"md:hidden";let _;e[39]!==W?(_=ue(W),e[39]=W,e[40]=_):_=e[40];let O;e[41]!==t?(O=t("page.expandSidebar"),e[41]=t,e[42]=O):O=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{size:16}),e[43]=A):A=e[43];let E;e[44]!==_||e[45]!==O||e[46]!==d?(E=s.jsx(Z,{asChild:!0,children:s.jsx(te,{className:_,onClick:d,"aria-label":O,children:A})}),e[44]=_,e[45]=O,e[46]=d,e[47]=E):E=e[47];let M;e[48]!==t?(M=t("page.expandSidebar"),e[48]=t,e[49]=M):M=e[49];let R;e[50]!==M?(R=s.jsx(ee,{side:"bottom",children:M}),e[50]=M,e[51]=R):R=e[51];let k;e[52]!==E||e[53]!==R?(k=s.jsxs(X,{children:[E,R]}),e[52]=E,e[53]=R,e[54]=k):k=e[54];let I;e[55]!==q||e[56]!==k?(I=s.jsxs(s.Fragment,{children:[k,q]}),e[55]=q,e[56]=k,e[57]=I):I=e[57];let H;return e[58]!==a||e[59]!==g||e[60]!==o||e[61]!==i.name||e[62]!==I?(H=s.jsx(ae.Header,{leading:I,breadcrumbs:g,scope:i.name,actions:a,navigation:o}),e[58]=a,e[59]=g,e[60]=o,e[61]=i.name,e[62]=I,e[63]=H):H=e[63],H}function Me(l){return l.matches.findLast(Re)?.staticData}function Re(l){return l.staticData.pageTitle}const $="chat-layout-thread",F="chat-layout-content",G=D.createContext(null);function ke(){return U()}function oe(){return D.use(G)}function U(){const l=D.use(G);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function Ie(l){const e=w.c(23),{children:a,...o}=l,t=pe(),i=he(),n=D.useRef(null),[u,c]=Oe(),{threadOpen:d,contentOpen:h}=o,r=ve(o),f=d&&h?u:r.side,m=100-f,b=p=>{const g=p.getLayout(),L=g[$],N=g[F];typeof L!="number"||typeof N!="number"||Math.abs(L-f)<.001&&Math.abs(N-m)<.001||p.setLayout({[$]:f,[F]:m})},x=Ce({visibility:o,threadVisibilityExplicit:o.threadVisibilityExplicit});let y;e[0]!==t||e[1]!==o||e[2]!==x?(y={...o,isMobile:t,mobileSurface:x},e[0]=t,e[1]=o,e[2]=x,e[3]=y):y=e[3];const j=y;let S;e[4]!==t||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==j?(S=!o.threadless&&s.jsx(ye,{open:t?j.mobileSurface==="chat":d,onToggle:()=>{t?i({to:".",search:p=>({...p,...Te(j.mobileSurface==="chat"?"main":"chat")}),replace:!0}):o.toggleThread()}}),e[4]=t,e[5]=o,e[6]=i,e[7]=d,e[8]=j,e[9]=S):S=e[9];let C;e[10]!==a||e[11]!==h||e[12]!==m||e[13]!==t||e[14]!==c||e[15]!==b||e[16]!==d||e[17]!==f?(C=t?s.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:a}):s.jsx(je,{ref:p=>{if(n.current=p,!p)return;let g=!0;return queueMicrotask(()=>{g&&b(p)}),()=>{g=!1,n.current===p&&(n.current=null)}},defaultLayout:{[$]:f,[F]:m},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(p,g)=>{const{isUserInteraction:L}=g;if(!L){const P=n.current;P&&b(P);return}const N=p[$];d&&h&&typeof N=="number"&&N>0&&N<100&&c(N)},children:a}),e[10]=a,e[11]=h,e[12]=m,e[13]=t,e[14]=c,e[15]=b,e[16]=d,e[17]=f,e[18]=C):C=e[18];let T;return e[19]!==S||e[20]!==C||e[21]!==j?(T=s.jsxs(G,{value:j,children:[S,C]}),e[19]=S,e[20]=C,e[21]=j,e[22]=T):T=e[22],T}function Be(l){const e=w.c(16),{children:a,topbar:o}=l,t=U();if(t.isMobile){let r;return e[0]!==a||e[1]!==t.mobileSurface||e[2]!==o?(r=t.mobileSurface==="chat"?s.jsxs(z,{variant:"plain","data-slot":"chat-layout-thread",children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}):null,e[0]=a,e[1]=t.mobileSurface,e[2]=o,e[3]=r):r=e[3],r}const i=t.threadOpen?"":void 0;let n;e[4]!==a||e[5]!==t.threadOpen||e[6]!==o?(n=t.threadOpen&&s.jsxs(s.Fragment,{children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}),e[4]=a,e[5]=t.threadOpen,e[6]=o,e[7]=n):n=e[7];let u;e[8]!==n?(u=s.jsx("div",{className:"h-full min-h-0 p-0.5",children:s.jsx(z,{"data-testid":"side-panel",children:n})}),e[8]=n,e[9]=u):u=e[9];let c;e[10]!==i||e[11]!==u?(c=s.jsx(ie,{id:$,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":i,className:"min-w-0 overflow-hidden bg-sidebar",children:u}),e[10]=i,e[11]=u,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"bg-sidebar"}),e[13]=d):d=e[13];let h;return e[14]!==c?(h=s.jsxs(s.Fragment,{children:[c,d]}),e[14]=c,e[15]=h):h=e[15],h}function $e({children:l,routeId:e}){return l}function Y(l){const e=w.c(23),{children:a,actions:o,drawer:t,aside:i}=l,n=U();if(n.isMobile&&n.mobileSurface!=="main")return null;const u=n.isMobile?"plain":"card";let c;e[0]!==o||e[1]!==n.contentNavigation?(c=s.jsx(Ee,{navigation:n.contentNavigation,actions:o}),e[0]=o,e[1]=n.contentNavigation,e[2]=c):c=e[2];let d;e[3]!==a||e[4]!==n.contentKey?(d=s.jsx(Q,{children:s.jsx($e,{routeId:n.contentKey,children:a})}),e[3]=a,e[4]=n.contentKey,e[5]=d):d=e[5];let h;e[6]!==n.contentKey||e[7]!==d?(h=s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:s.jsx(J,{children:d},n.contentKey)}),e[6]=n.contentKey,e[7]=d,e[8]=h):h=e[8];let r;e[9]!==t||e[10]!==h?(r=s.jsxs(z.Content,{children:[h,t]}),e[9]=t,e[10]=h,e[11]=r):r=e[11];let f;e[12]!==c||e[13]!==r?(f=s.jsxs(ae.Breadcrumbs.Provider,{children:[c,r]}),e[12]=c,e[13]=r,e[14]=f):f=e[14];let m;e[15]!==u||e[16]!==f?(m=s.jsx(z,{"data-testid":"main-panel",variant:u,children:f}),e[15]=u,e[16]=f,e[17]=m):m=e[17];const b=m;let x;return e[18]!==i||e[19]!==n.contentOpen||e[20]!==n.isMobile||e[21]!==b?(x=n.isMobile?b:s.jsx(ie,{id:F,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":n.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:s.jsxs("div",{className:"flex h-full min-h-0",children:[s.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:b}),i&&s.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:s.jsx(z,{"data-testid":"aside-panel",children:s.jsx(J,{children:s.jsx(Q,{children:i})},D.isValidElement(i)?i.key??void 0:void 0)})})]})}),e[18]=i,e[19]=n.contentOpen,e[20]=n.isMobile,e[21]=b,e[22]=x):x=e[22],x}function De(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{children:s.jsx(fe,{})}),l[0]=e):e=l[0],e}function Ae(l){const e=w.c(18),{error:a,reset:o}=l,t=se();let i;e[0]!==t?(i=t("common.errorBoundary.somethingWentWrong"),e[0]=t,e[1]=i):i=e[1];let n;e[2]!==i?(n=s.jsx("h2",{className:"text-lg font-medium",children:i}),e[2]=i,e[3]=n):n=e[3];let u;e[4]!==a.message||e[5]!==t?(u=a.message||t("common.errorBoundary.unexpectedError"),e[4]=a.message,e[5]=t,e[6]=u):u=e[6];let c;e[7]!==u?(c=s.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:u}),e[7]=u,e[8]=c):c=e[8];let d;e[9]!==t?(d=t("common.errorBoundary.tryAgain"),e[9]=t,e[10]=d):d=e[10];let h;e[11]!==o||e[12]!==d?(h=s.jsx(me,{variant:"outline",onClick:o,children:d}),e[11]=o,e[12]=d,e[13]=h):h=e[13];let r;return e[14]!==n||e[15]!==c||e[16]!==h?(r=s.jsx(Y,{children:s.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[n,c,h]})}),e[14]=n,e[15]=c,e[16]=h,e[17]=r):r=e[17],r}const He=Object.assign(Ie,{Thread:Be,Content:Y}),Xe=Object.freeze(Object.defineProperty({__proto__:null,ChatLayout:He,ChatLayoutError:Ae,ChatLayoutPending:De,useChatLayout:ke,useOptionalChatLayout:oe},Symbol.toStringTag,{value:"Module"}));export{He as C,Ee as R,Xe as i,ke as u};
|
|
1
|
+
import{c as w,aq as le,as as re,b as se,a4 as ce,l as de,j as s,m as ue,n as ae,r as D,d as he,aQ as Q,R as J,P as z,aY as fe,B as me}from"./index-BD2-Tfve.js";import{u as pe}from"./use-mobile-BL_lLwbJ.js";import{h as ge,c as be,u as xe,m as ye}from"./use-sidebar-collapsed-pjufulEj.js";import{a as ie,R as je,b as Se}from"./resizable-vYXdh-GF.js";import{c as ve,r as Ce,m as Te}from"./use-chat-layout-state-YDnStvp0.js";import{M as Le,o as Ne}from"./agent-icon-C4zAUQeZ.js";import{c as X,T as Z,a as ee}from"./tooltip-CPWUruKJ.js";import{T as te}from"./toolbar-icon-button-BYM1l_EM.js";import{u as we}from"./use-project-scope-Bv0XQrp-.js";import{b as Pe}from"./repository-binding-t2SUt_ly.js";function ne(l,e){const a=typeof l=="number"?l:Number(l);return!Number.isFinite(a)||a<=0||a>=100?e:a}function ze(l,e){const a=w.c(8);let o;a[0]!==e?(o=c=>ne(c,e),a[0]=e,a[1]=o):o=a[1];const[t,i]=le(l,o);let n;a[2]!==e||a[3]!==t?(n=ne(t,e),a[2]=e,a[3]=t,a[4]=n):n=a[4];let u;return a[5]!==i||a[6]!==n?(u=[n,i],a[5]=i,a[6]=n,a[7]=u):u=a[7],u}const _e=33;function Oe(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=re.sidePanelWidth(),l[0]=e):e=l[0],ze(e,_e)}function Ee(l){const e=w.c(64),{actions:a,navigation:o}=l,t=se(),{org:i}=ce(),n=we(),u=Pe(n),c=ge(),{toggleSidebar:d}=be(),h=xe(),r=oe();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={select:Me},e[0]=f):f=e[0];const m=de(f),b=m?.mainView==="overview";let x;e[1]!==u?.title||e[2]!==t?(x=u?.title??t("common.loading"),e[1]=u?.title,e[2]=t,e[3]=x):x=e[3];const y=x;let j;e[4]!==b||e[5]!==m?.mainView||e[6]!==m?.pageTitle||e[7]!==y||e[8]!==n||e[9]!==t?(j=b?n?y:t("sidebar.navDestinations.home"):m?.mainView==="files"?t("sidebar.navDestinations.context"):t(m?.pageTitle??"page.view"),e[4]=b,e[5]=m?.mainView,e[6]=m?.pageTitle,e[7]=y,e[8]=n,e[9]=t,e[10]=j):j=e[10];const S=j,C=n??"";let T;e[11]!==i.slug||e[12]!==C?(T={to:"/$org/projects/$agentId",params:{org:i.slug,agentId:C}},e[11]=i.slug,e[12]=C,e[13]=T):T=e[13];const p=T;let g;if(e[14]!==c||e[15]!==b||e[16]!==i.slug||e[17]!==p||e[18]!==y||e[19]!==n||e[20]!==t||e[21]!==S){if(g=[],c){let v;e[23]!==t?(v=t("sidebar.navDestinations.settings"),e[23]=t,e[24]=v):v=e[24];let B;e[25]!==i.slug?(B={to:"/$org/settings/general",params:{org:i.slug}},e[25]=i.slug,e[26]=B):B=e[26];let K;e[27]!==v||e[28]!==B?(K={key:"settings",label:v,link:B},e[27]=v,e[28]=B,e[29]=K):K=e[29],g.push(K)}else if(n&&!b){let v;e[30]!==p||e[31]!==y?(v={key:"project",label:y,link:p},e[30]=p,e[31]=y,e[32]=v):v=e[32],g.push(v)}let V;e[33]!==S?(V={key:"page",label:S},e[33]=S,e[34]=V):V=e[34],g.push(V),e[14]=c,e[15]=b,e[16]=i.slug,e[17]=p,e[18]=y,e[19]=n,e[20]=t,e[21]=S,e[22]=g}else g=e[22];const L=h,N=!!r&&!r.threadless&&r.threadOpen;let P;e[35]!==r||e[36]!==L||e[37]!==t?(P=L&&r&&!r.threadless&&s.jsxs(X,{children:[s.jsx(Z,{asChild:!0,children:s.jsx(te,{"aria-label":t(r.threadOpen?"page.closeThread":"page.openThread"),"aria-pressed":r.threadOpen,active:r.threadOpen,onClick:r.toggleThread,children:s.jsx(Le,{size:16})})}),s.jsx(ee,{side:"bottom",children:t(r.threadOpen?"page.closeThread":"page.openThread")})]}),e[35]=r,e[36]=L,e[37]=t,e[38]=P):P=e[38];const q=P,W=(!L||N)&&"md:hidden";let _;e[39]!==W?(_=ue(W),e[39]=W,e[40]=_):_=e[40];let O;e[41]!==t?(O=t("page.expandSidebar"),e[41]=t,e[42]=O):O=e[42];let A;e[43]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ne,{size:16}),e[43]=A):A=e[43];let E;e[44]!==_||e[45]!==O||e[46]!==d?(E=s.jsx(Z,{asChild:!0,children:s.jsx(te,{className:_,onClick:d,"aria-label":O,children:A})}),e[44]=_,e[45]=O,e[46]=d,e[47]=E):E=e[47];let M;e[48]!==t?(M=t("page.expandSidebar"),e[48]=t,e[49]=M):M=e[49];let R;e[50]!==M?(R=s.jsx(ee,{side:"bottom",children:M}),e[50]=M,e[51]=R):R=e[51];let k;e[52]!==E||e[53]!==R?(k=s.jsxs(X,{children:[E,R]}),e[52]=E,e[53]=R,e[54]=k):k=e[54];let I;e[55]!==q||e[56]!==k?(I=s.jsxs(s.Fragment,{children:[k,q]}),e[55]=q,e[56]=k,e[57]=I):I=e[57];let H;return e[58]!==a||e[59]!==g||e[60]!==o||e[61]!==i.name||e[62]!==I?(H=s.jsx(ae.Header,{leading:I,breadcrumbs:g,scope:i.name,actions:a,navigation:o}),e[58]=a,e[59]=g,e[60]=o,e[61]=i.name,e[62]=I,e[63]=H):H=e[63],H}function Me(l){return l.matches.findLast(Re)?.staticData}function Re(l){return l.staticData.pageTitle}const $="chat-layout-thread",F="chat-layout-content",G=D.createContext(null);function ke(){return U()}function oe(){return D.use(G)}function U(){const l=D.use(G);if(!l)throw new Error("ChatLayout regions require a ChatLayout");return l}function Ie(l){const e=w.c(23),{children:a,...o}=l,t=pe(),i=he(),n=D.useRef(null),[u,c]=Oe(),{threadOpen:d,contentOpen:h}=o,r=ve(o),f=d&&h?u:r.side,m=100-f,b=p=>{const g=p.getLayout(),L=g[$],N=g[F];typeof L!="number"||typeof N!="number"||Math.abs(L-f)<.001&&Math.abs(N-m)<.001||p.setLayout({[$]:f,[F]:m})},x=Ce({visibility:o,threadVisibilityExplicit:o.threadVisibilityExplicit});let y;e[0]!==t||e[1]!==o||e[2]!==x?(y={...o,isMobile:t,mobileSurface:x},e[0]=t,e[1]=o,e[2]=x,e[3]=y):y=e[3];const j=y;let S;e[4]!==t||e[5]!==o||e[6]!==i||e[7]!==d||e[8]!==j?(S=!o.threadless&&s.jsx(ye,{open:t?j.mobileSurface==="chat":d,onToggle:()=>{t?i({to:".",search:p=>({...p,...Te(j.mobileSurface==="chat"?"main":"chat")}),replace:!0}):o.toggleThread()}}),e[4]=t,e[5]=o,e[6]=i,e[7]=d,e[8]=j,e[9]=S):S=e[9];let C;e[10]!==a||e[11]!==h||e[12]!==m||e[13]!==t||e[14]!==c||e[15]!==b||e[16]!==d||e[17]!==f?(C=t?s.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:a}):s.jsx(je,{ref:p=>{if(n.current=p,!p)return;let g=!0;return queueMicrotask(()=>{g&&b(p)}),()=>{g=!1,n.current===p&&(n.current=null)}},defaultLayout:{[$]:f,[F]:m},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0 [&>[data-chat-layout-panel-open]]:!min-w-[320px]",style:{overflow:"visible"},onLayoutChanged:(p,g)=>{const{isUserInteraction:L}=g;if(!L){const P=n.current;P&&b(P);return}const N=p[$];d&&h&&typeof N=="number"&&N>0&&N<100&&c(N)},children:a}),e[10]=a,e[11]=h,e[12]=m,e[13]=t,e[14]=c,e[15]=b,e[16]=d,e[17]=f,e[18]=C):C=e[18];let T;return e[19]!==S||e[20]!==C||e[21]!==j?(T=s.jsxs(G,{value:j,children:[S,C]}),e[19]=S,e[20]=C,e[21]=j,e[22]=T):T=e[22],T}function Be(l){const e=w.c(16),{children:a,topbar:o}=l,t=U();if(t.isMobile){let r;return e[0]!==a||e[1]!==t.mobileSurface||e[2]!==o?(r=t.mobileSurface==="chat"?s.jsxs(z,{variant:"plain","data-slot":"chat-layout-thread",children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}):null,e[0]=a,e[1]=t.mobileSurface,e[2]=o,e[3]=r):r=e[3],r}const i=t.threadOpen?"":void 0;let n;e[4]!==a||e[5]!==t.threadOpen||e[6]!==o?(n=t.threadOpen&&s.jsxs(s.Fragment,{children:[o,s.jsx(z.Content,{"data-testid":"chat-panel",children:a})]}),e[4]=a,e[5]=t.threadOpen,e[6]=o,e[7]=n):n=e[7];let u;e[8]!==n?(u=s.jsx("div",{className:"h-full min-h-0 p-0.5",children:s.jsx(z,{"data-testid":"side-panel",children:n})}),e[8]=n,e[9]=u):u=e[9];let c;e[10]!==i||e[11]!==u?(c=s.jsx(ie,{id:$,defaultSize:"33%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":i,className:"min-w-0 overflow-hidden bg-sidebar",children:u}),e[10]=i,e[11]=u,e[12]=c):c=e[12];let d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Se,{className:"bg-sidebar"}),e[13]=d):d=e[13];let h;return e[14]!==c?(h=s.jsxs(s.Fragment,{children:[c,d]}),e[14]=c,e[15]=h):h=e[15],h}function $e({children:l,routeId:e}){return l}function Y(l){const e=w.c(23),{children:a,actions:o,drawer:t,aside:i}=l,n=U();if(n.isMobile&&n.mobileSurface!=="main")return null;const u=n.isMobile?"plain":"card";let c;e[0]!==o||e[1]!==n.contentNavigation?(c=s.jsx(Ee,{navigation:n.contentNavigation,actions:o}),e[0]=o,e[1]=n.contentNavigation,e[2]=c):c=e[2];let d;e[3]!==a||e[4]!==n.contentKey?(d=s.jsx(Q,{children:s.jsx($e,{routeId:n.contentKey,children:a})}),e[3]=a,e[4]=n.contentKey,e[5]=d):d=e[5];let h;e[6]!==n.contentKey||e[7]!==d?(h=s.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:s.jsx(J,{children:d},n.contentKey)}),e[6]=n.contentKey,e[7]=d,e[8]=h):h=e[8];let r;e[9]!==t||e[10]!==h?(r=s.jsxs(z.Content,{children:[h,t]}),e[9]=t,e[10]=h,e[11]=r):r=e[11];let f;e[12]!==c||e[13]!==r?(f=s.jsxs(ae.Breadcrumbs.Provider,{children:[c,r]}),e[12]=c,e[13]=r,e[14]=f):f=e[14];let m;e[15]!==u||e[16]!==f?(m=s.jsx(z,{"data-testid":"main-panel",variant:u,children:f}),e[15]=u,e[16]=f,e[17]=m):m=e[17];const b=m;let x;return e[18]!==i||e[19]!==n.contentOpen||e[20]!==n.isMobile||e[21]!==b?(x=n.isMobile?b:s.jsx(ie,{id:F,defaultSize:"67%",minSize:"20%",collapsible:!0,collapsedSize:"0%","data-chat-layout-panel-open":n.contentOpen?"":void 0,className:"min-w-0 overflow-hidden bg-sidebar",children:s.jsxs("div",{className:"flex h-full min-h-0",children:[s.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:b}),i&&s.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:s.jsx(z,{"data-testid":"aside-panel",children:s.jsx(J,{children:s.jsx(Q,{children:i})},D.isValidElement(i)?i.key??void 0:void 0)})})]})}),e[18]=i,e[19]=n.contentOpen,e[20]=n.isMobile,e[21]=b,e[22]=x):x=e[22],x}function De(){const l=w.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Y,{children:s.jsx(fe,{})}),l[0]=e):e=l[0],e}function Ae(l){const e=w.c(18),{error:a,reset:o}=l,t=se();let i;e[0]!==t?(i=t("common.errorBoundary.somethingWentWrong"),e[0]=t,e[1]=i):i=e[1];let n;e[2]!==i?(n=s.jsx("h2",{className:"text-lg font-medium",children:i}),e[2]=i,e[3]=n):n=e[3];let u;e[4]!==a.message||e[5]!==t?(u=a.message||t("common.errorBoundary.unexpectedError"),e[4]=a.message,e[5]=t,e[6]=u):u=e[6];let c;e[7]!==u?(c=s.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:u}),e[7]=u,e[8]=c):c=e[8];let d;e[9]!==t?(d=t("common.errorBoundary.tryAgain"),e[9]=t,e[10]=d):d=e[10];let h;e[11]!==o||e[12]!==d?(h=s.jsx(me,{variant:"outline",onClick:o,children:d}),e[11]=o,e[12]=d,e[13]=h):h=e[13];let r;return e[14]!==n||e[15]!==c||e[16]!==h?(r=s.jsx(Y,{children:s.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[n,c,h]})}),e[14]=n,e[15]=c,e[16]=h,e[17]=r):r=e[17],r}const He=Object.assign(Ie,{Thread:Be,Content:Y}),Xe=Object.freeze(Object.defineProperty({__proto__:null,ChatLayout:He,ChatLayoutError:Ae,ChatLayoutPending:De,useChatLayout:ke,useOptionalChatLayout:oe},Symbol.toStringTag,{value:"Module"}));export{He as C,Ee as R,Xe as i,ke as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,by as Yt,aj as as,K as bt,i as Et,a5 as As,m as ot,gv as _s,o as cs,h as Ks,bC as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,bW as Js,h5 as Gs,T as Qs,W as Ys,I as Xt}from"./index-
|
|
1
|
+
import{c as ue,r as xe,d as ns,a4 as ht,b as Pe,j as t,B as je,t as dt,by as Yt,aj as as,K as bt,i as Et,a5 as As,m as ot,gv as _s,o as cs,h as Ks,bC as Us,ab as Vs,L as qs,u as Hs,n as _t,E as Wt,R as Bs,bW as Js,h5 as Gs,T as Qs,W as Ys,I as Xt}from"./index-BD2-Tfve.js";import{S as Ws}from"./search-input-DvpyQdwd.js";import{E as Ht}from"./empty-state-B9QiU_VY.js";import{R as Xs}from"./require-capability-BpHMNsFK.js";import{f as js}from"./pair-B-D0jk5j.js";import{u as ts}from"./use-connection-BeyjX32e.js";import{g as Ps}from"./connection-slug-BPPZqv13.js";import{B as Lt}from"./badge-DaX-o_aM.js";import{P as ds,a as ms,b as us}from"./popover-BX49i_9-.js";import{c as Pt,T as Dt,a as Rt,b as Zs}from"./tooltip-CPWUruKJ.js";import{G as fs,e as Ut,bX as el,aV as Ns,Y as tl}from"./agent-icon-C4zAUQeZ.js";import{i as sl}from"./Key01-XBNKfFAD.js";import{i as ll}from"./Play-oyq9OzZ5.js";import{MonacoCodeEditor as bs}from"./monaco-editor-Cwn1FokD.js";import{u as rl}from"./use-mcp-client-Dwx3joSc.js";import{a as il}from"./repository-binding-t2SUt_ly.js";import{n as Ot}from"./LinkBroken01-BNA4t2nT.js";import{c as ol}from"./SwitchHorizontal01-B1owjF7D.js";import{s as nl}from"./Plus-B14W9n_P.js";import{s as al}from"./Trash01-CTl0J4n_.js";import{M as zt}from"./multi-select-VgSnOaCE.js";import{b as yt,a as wt,c as ze,d as St,S as Ct}from"./select-DzfQ0lJI.js";import{e as ys,T as cl}from"./time-range-picker-CNJKAQia.js";import{T as dl}from"./textarea-CvTlfpHc.js";import{C as Ds}from"./collection-tabs-CwlrIKLz.js";import{S as ml}from"./switch-rEtvwmeJ.js";import{L as ul}from"./label-CZVy73g_.js";import{I as It}from"./integration-icon-C5Anrc8v.js";import{A as fl,a as xl,b as pl}from"./alert-ChcrHQqB.js";import{K as gt}from"./monitoring-stats-row-CBa0yJyc.js";import{b as Bt}from"./use-entitlements-B6JBu_O9.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-CCNPZBqb.js";import{u as wl}from"./useSuspenseInfiniteQuery-DrHv36Dy.js";import{c as Sl,S as Cl,b as Rs,a as Ls}from"./sheet-ChvL33ih.js";import{c as _e,b as vt,d as Jt,e as Gt,T as ge,a as Qt}from"./table-tgAIcOjU.js";import{n as ss,t as ls}from"./ChevronUp-CxdkHAYX.js";import{u as Os}from"./use-id-selection-CdOmebQh.js";import{u as Fs}from"./use-infinite-scroll-DuiGO_jY.js";import{u as Il}from"./useInfiniteQuery-DIP1SnGb.js";import{g as Tl}from"./task-status-CPDhSMht.js";import{u as kl,d as Ml}from"./use-automations-BEx9jN5g.js";import{A as _l}from"./automation-runs-HL4m0VQL.js";import{i as Pl}from"./ArrowLeft-B2qsUhAF.js";import{E as Cs}from"./empty-state-CwTtE-MO.js";import{O as $s}from"./watch-sse-pool-Bno2kqCn.js";import{t as Dl}from"./task-key-BCHdFiOO.js";import{b as Rl,r as Ll,O as Ol,e as Fl}from"./order-monitor-day--YYykwM7.js";import{F as $l}from"./feature-gate-CEDC08jo.js";import"./SearchMd-DDYfB5ME.js";import"./access-gate-CmrYCcY4.js";import"./capability-load-error-De4jloBS.js";import"./Tool01-D4V2T_mI.js";import"./collapsible-CouDnhO6.js";import"./use-copy-Yov8ynUc.js";import"./usage-stats-BITMwpzs.js";import"./tool-namespace-xhn6qzed.js";import"./form-BbCRE2mk.js";import"./utils-CVEq3hMx.js";import"./markdown-Bn6_U_KJ.js";import"./chat-context-BFrEkp-x.js";import"./autosend-VANv9yLj.js";import"./thread-route-DFmD7mlY.js";import"./use-project-scope-Bv0XQrp-.js";import"./thread-intent-BhJhZ_UP.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./use-ai-providers-pPbmGXbG.js";import"./use-decopilot-events-Dxkyyj-f.js";import"./use-organization-settings-ezDxn50S.js";import"./schema-rAmMhTAU.js";import"./task-board-DVzbOFVa.js";import"./use-mobile-BL_lLwbJ.js";import"./shell-layout-CUa5MDUh.js";import"./Globe04-Qb5La101.js";import"./UserSquare-D6mrj9zR.js";import"./use-deployment-admin-BP73XI6k.js";import"./admin-fetch-BhTJlAsX.js";import"./XClose-DWFAtfm6.js";import"./CheckCircle-BrU3KNn_.js";import"./Monitor01-CTMwaVR_.js";import"./Zap-4X8Ik5ls.js";import"./command-DZp1V8X-.js";import"./index-KVVHw2gU.js";import"./project-icon-BMNmURUS.js";import"./use-navigate-to-agent-DquGUsnU.js";import"./use-debounced-value-CjUdoTQj.js";import"./new-project-dialog-Bq2ZRt1E.js";import"./repository-picker-lw8HWu2E.js";import"./github-icon-q1xudgoP.js";import"./collection-search-OjmLQPGA.js";import"./ShoppingBag01-B4Qpz0kc.js";import"./legacy-admin-welcome-dialog-xczBeRkI.js";import"./drawer-CwBC6h27.js";import"./required-auth-layout-D0fYWaPn.js";import"./use-org-sso-DCyl-5Yq.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLwGZiBS.js";import"./types-BM3wGHXs.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./AlertCircle-BrBujzmj.js";import"./use-mcp-prompts-CgaLso39.js";import"./use-thread-outputs-DW15e6qt.js";import"./file-type-icon-BRiZbFJM.js";import"./index-DLzGeaMa.js";import"./ArrowUp-Bq_XWrMf.js";import"./ChevronSelectorVertical-C15U3mNk.js";import"./CreditCard01-gy5ViYmH.js";import"./Minus-BQ1U44OY.js";import"./Sun-SepDLWMM.js";import"./Upload01-CE3wDuuV.js";import"./Users01-vnVJQGsa.js";import"./editor-YZleAELh.js";import"./auth-DZBq7iRr.js";import"./checkbox-C9g8LYdj.js";import"./index-BdQq_4o_.js";import"./scroll-area-BdbZ2pRg.js";import"./calendar-CI3L7G9u.js";import"./chart-DFYkssKS.js";import"./CategoricalChart-B34tgPab.js";import"./index-D8kKxC0w.js";import"./tooltipContext-DYzAHA8b.js";import"./CartesianChart-BzQXSn72.js";import"./AreaChart-Bs4ZyKEJ.js";import"./infiniteQueryObserver-CFbscoFz.js";import"./useQueries-BWsosSvF.js";import"./ReferenceLine-CBcoZK_U.js";import"./feature-paywall-UROHXvVY.js";import"./plan-ladder-ia9SV_u2.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 I,b as X,r as $,m as W,j as s,a4 as ze,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,at as dt,Y as ke,a5 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aA as gt,l as bt,H as xt,aq as $e,L as Ye,$ as jt,as as Ge,aB as yt,P as vt}from"./index-Cp6n42Yr.js";import{u as Ie,c as qe,i as St,j as wt,k as Ct,l as _t}from"./use-sidebar-collapsed-DwaUZcOQ.js";import{S as kt,a as Ot,b as zt}from"./sheet-BdVmV6Pq.js";import{u as Rt}from"./use-mobile-BGUAkmF8.js";import{u as Et,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./core.esm-PCFOeq2F.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-C_BgVL5v.js";import{i as It}from"./Tool01-BpRZdana.js";import{y as Kt,z as Ft,B as Bt,C as Ut,A as Wt,D as Be,l as Ht}from"./agent-icon-Cq6bkxhD.js";import{s as Xt}from"./Plus-Ci-A-fWx.js";import{i as Yt}from"./UserSquare-aPvg2Nw7.js";import{s as Ze}from"./XClose-w7hRM8A3.js";import{T as ge,a as be,c as xe}from"./tooltip-D6hu1dbX.js";import{C as Pe,f as Gt,g as qt,e as Zt}from"./context-menu-DmK-hmJb.js";import{a as Vt,O as Ve,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as ns,t as is,f as Je,m as ls,o as os}from"./shell-layout-MQ4OcCap.js";import{C as as}from"./create-organization-dialog-c0RCVWjZ.js";import{P as cs}from"./project-apps-DrYTNZ5G.js";import{u as ds,a as us}from"./use-recent-apps-CMUESJxc.js";import{a as fs}from"./use-navigate-to-agent-DgVOA-5d.js";import{a as ms,u as hs}from"./use-project-scope-DZ381aQg.js";import{C as Ue,a as ps,b as gs,c as bs,d as xs}from"./command-CnVdPyj_.js";import{u as js}from"./use-debounced-value-BTFyu_fg.js";import{n as ys}from"./ShoppingBag01-DqYzokeC.js";import{F as vs,a as Ae,b as Ss,c as Qe}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-DCa16Aq1.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=js(h,150),m=h.length>0,u=p===h,{hits:y,isSearching:j,isStale:C,isError:w}=Vt(m?p:""),a=m?y: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 v;e[4]!==d?(v=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=v):v=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(ps,{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=W(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(Ue,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let E;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(E=!w&&u&&!j&&a.length===0&&s.jsx(Ue,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=E):E=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(gs,{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 z;e[36]!==E||e[37]!==D||e[38]!==R||e[39]!==O?(z=s.jsxs(bs,{className:R,children:[O,E,D]}),e[36]=E,e[37]=D,e[38]=R,e[39]=O,e[40]=z):z=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==z||e[44]!==v||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:n,onOpenChange:g,title:v,description:S,shouldFilter:!1,children:[_,z]}),e[41]=n,e[42]=g,e[43]=z,e[44]=v,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 We(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function zs(){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 We(n,"image/png");if((!r||r.size>Qe)&&(r=await We(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}=ze(),[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=>Ss.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 v=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));v.length>0&&f(S=>[...S,...v])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},y=async()=>{h(!0);try{m([await zs()])}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(ws,{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(Ze,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:y,disabled:o.length>=Ae,children:[s.jsx(Kt,{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 ye(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=W("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:W("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/",Es="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=ze(),[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(Bt,{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(ys,{}),t[13]=u):u=t[13];let y;t[14]!==e?(y=e("sidebar.help.guides"),t[14]=e,t[15]=y):y=t[15];let j;t[16]!==y?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Rs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,y]})}),t[16]=y,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:Es,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(Ft,{}),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 v;t[30]!==g||t[31]!==m?(v=s.jsx(ye,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=v):v=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]!==v||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[v,S]}),t[36]=v,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:y}=$t(b);let j;e[2]!==m?(j=Lt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=y?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,v=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==v||e[10]!==S?(k=W("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",v,S),e[9]=v,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(Be,{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(Gt,{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 E;e[25]!==R||e[26]!==O?(E=s.jsxs(xe,{children:[R,O]}),e[25]=R,e[26]=O,e[27]=E):E=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ht,{}),e[28]=D):D=e[28];let z;e[29]!==f?(z=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=z):z=e[30];let A;e[31]!==l||e[32]!==z?(A=s.jsxs(Pe,{onSelect:l,children:[D,z]}),e[31]=l,e[32]=z,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Be,{}),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 B;e[41]!==o||e[42]!==f?(B=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=B):B=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==B?(Y=s.jsxs(qt,{children:[A,F,B]}),e[44]=A,e[45]=F,e[46]=B,e[47]=Y):Y=e[47];let K;e[48]!==E||e[49]!==Y?(K=s.jsxs(Zt,{children:[E,Y]}),e[48]=E,e[49]=Y,e[50]=K):K=e[50];let U;e[51]!==r||e[52]!==K?(U=s.jsx(ye,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=U):U=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==U||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:U}),e[54]=p,e[55]=h,e[56]=U,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,y,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?(y=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=y):y=e[21],j=W("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]=y,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],y=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]!==y||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:y,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=y,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 v;e[38]!==n.title?(v=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=v):v=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==v?(S=s.jsxs(b,{children:[g,v]}),e[40]=b,e[41]=g,e[42]=v,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?(_=W("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 E,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(E=W("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(Ze,{size:10}),e[54]=E,e[55]=D):(E=e[54],D=e[55]);let z;e[56]!==R||e[57]!==O?(z=s.jsx("button",{type:"button","aria-label":R,onClick:O,className:E,children:D}),e[56]=R,e[57]=O,e[58]=z):z=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==z||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,z]}),e[59]=S,e[60]=T,e[61]=z,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=cs[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=W("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(ye,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Bs(){const{org:t}=ze();return ds(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=ze(),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),[y,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=fs(c.slug),{projects:x}=ms(),g=hs(),v=us(),S=v&&v.projectId===null?v.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Jt(p??[],c),{recent:T}=Qt(),R=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[E,D]=$e(O,ts),z=Oe(E),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ss(rs(_,z,c.slug),T,c.slug,A,z.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=Et(Dt(Pt,P)),B=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>ls(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(Ws))},U=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),os()},G=!C&&"border-r border-sidebar-border";let q;e[6]!==G?(q=W("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=q):q=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 Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Re=Nt,Ee=Tt,De=At,Ne=L.map(Us),Te=Mt,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:z.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}})},onTogglePin:()=>D(M=>is(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>ns(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]!==B||e[17]!==F||e[18]!==Ee||e[19]!==V?(J=s.jsx(Re,{sensors:F,collisionDetection:Ee,onDragEnd:B,children:V}),e[15]=Re,e[16]=B,e[17]=F,e[18]=Ee,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]!==Z?(ee=s.jsxs("div",{className:st,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,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 ve;e[29]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Yt,{size:18}),e[29]=ve):ve=e[29];let se;e[30]!==U||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:U,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:ve})}),e[30]=U,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:yt.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(ye,{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(Xt,{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(ye,{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]!==q?(me=s.jsxs("div",{className:q,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=q,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==y||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:y,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=y,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(as,{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 Us(t){return t.slug}function Ws(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}=qe(),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 y;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?(y=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]=y):y=e[14],y}const Me=400,Xe=16,Gs="sidebar.width.v2";function qs(){const t=I.c(14),e=Zs;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 y=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 v=e(j+(g.clientX-y));C?.style.setProperty("--sidebar-width",`${v}px`)},x=g=>{const v=e(j+(g.clientX-y));i(v);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 Zs(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=Rt(),[i,c]=$e(Ge.sidebarOpen(),!0),l=qs();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(Bs,{}),!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(Ct,{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}=qe(),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 v;return e[12]!==x||e[13]!==g?(v=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=v):v=e[14],v}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(kt,{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 y;e[21]!==h||e[22]!==r?(y=r({onClose:h}),e[21]=h,e[22]=r,e[23]=y):y=e[23];let j;e[24]!==y?(j=s.jsx("div",{className:"min-w-0 flex-1",children:y}),e[24]=y,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(Ot,{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(zt,{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(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(vt,{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 kr=Object.assign(Js,{Sidebar:Qs,Content:tr});export{kr as L};
|
|
1
|
+
import{c as I,b as X,r as $,m as W,j as s,a4 as ze,e as nt,t as je,D as it,v as lt,w as ot,x as at,y as ct,B as Fe,at as dt,Y as ke,a5 as ut,E as H,X as ft,Z as mt,_ as ht,d as pt,aA as gt,l as bt,H as xt,aq as $e,L as Ye,$ as jt,as as Ge,aB as yt,P as vt}from"./index-BD2-Tfve.js";import{u as Ie,c as qe,i as St,j as wt,k as Ct,l as _t}from"./use-sidebar-collapsed-pjufulEj.js";import{S as kt,a as Ot,b as zt}from"./sheet-ChvL33ih.js";import{u as Rt}from"./use-mobile-BL_lLwbJ.js";import{u as Et,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./core.esm-CEehG5ej.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-B7uFfy_P.js";import{i as It}from"./Tool01-D4V2T_mI.js";import{y as Kt,z as Ft,B as Bt,C as Ut,A as Wt,D as Be,l as Ht}from"./agent-icon-C4zAUQeZ.js";import{s as Xt}from"./Plus-B14W9n_P.js";import{i as Yt}from"./UserSquare-D6mrj9zR.js";import{s as Ze}from"./XClose-DWFAtfm6.js";import{T as ge,a as be,c as xe}from"./tooltip-CPWUruKJ.js";import{C as Pe,f as Gt,g as qt,e as Zt}from"./context-menu-DqHkPsZX.js";import{a as Vt,O as Ve,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as ns,t as is,f as Je,m as ls,o as os}from"./shell-layout-CUa5MDUh.js";import{C as as}from"./create-organization-dialog-C-eZv_C7.js";import{P as cs}from"./project-apps-DsmVr6MW.js";import{u as ds,a as us}from"./use-recent-apps-C1nVs7iP.js";import{a as fs}from"./use-navigate-to-agent-DquGUsnU.js";import{a as ms,u as hs}from"./use-project-scope-Bv0XQrp-.js";import{C as Ue,a as ps,b as gs,c as bs,d as xs}from"./command-DZp1V8X-.js";import{u as js}from"./use-debounced-value-CjUdoTQj.js";import{n as ys}from"./ShoppingBag01-B4Qpz0kc.js";import{F as vs,a as Ae,b as Ss,c as Qe}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-CvTlfpHc.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=js(h,150),m=h.length>0,u=p===h,{hits:y,isSearching:j,isStale:C,isError:w}=Vt(m?p:""),a=m?y: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 v;e[4]!==d?(v=d("sidebar.rail.searchOrganizations"),e[4]=d,e[5]=v):v=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(ps,{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=W(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(Ue,{children:d("sidebar.rail.searchFailed")}),e[15]=w,e[16]=m,e[17]=d,e[18]=O):O=e[18];let E;e[19]!==w||e[20]!==j||e[21]!==a.length||e[22]!==u||e[23]!==d?(E=!w&&u&&!j&&a.length===0&&s.jsx(Ue,{children:d("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=a.length,e[22]=u,e[23]=d,e[24]=E):E=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(gs,{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 z;e[36]!==E||e[37]!==D||e[38]!==R||e[39]!==O?(z=s.jsxs(bs,{className:R,children:[O,E,D]}),e[36]=E,e[37]=D,e[38]=R,e[39]=O,e[40]=z):z=e[40];let A;return e[41]!==n||e[42]!==g||e[43]!==z||e[44]!==v||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:n,onOpenChange:g,title:v,description:S,shouldFilter:!1,children:[_,z]}),e[41]=n,e[42]=g,e[43]=z,e[44]=v,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 We(t,e,n){return new Promise(r=>t.toBlob(r,e,n))}async function zs(){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 We(n,"image/png");if((!r||r.size>Qe)&&(r=await We(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}=ze(),[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=>Ss.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 v=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));v.length>0&&f(S=>[...S,...v])},u=a=>{URL.revokeObjectURL(a.previewUrl),f(x=>x.filter(g=>g!==a))},y=async()=>{h(!0);try{m([await zs()])}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(ws,{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(Ze,{size:12})})]},a.previewUrl))}),s.jsxs(ct,{className:"sm:justify-between",children:[Os()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:y,disabled:o.length>=Ae,children:[s.jsx(Kt,{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 ye(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=W("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:W("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/",Es="https://discord.gg/EQkX7CymV";function Ds(){const t=I.c(39),e=X(),{org:n}=ze(),[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(Bt,{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(ys,{}),t[13]=u):u=t[13];let y;t[14]!==e?(y=e("sidebar.help.guides"),t[14]=e,t[15]=y):y=t[15];let j;t[16]!==y?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Rs,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[u,y]})}),t[16]=y,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:Es,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(Ft,{}),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 v;t[30]!==g||t[31]!==m?(v=s.jsx(ye,{active:!1,children:s.jsxs(ht,{children:[m,g]})}),t[30]=g,t[31]=m,t[32]=v):v=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]!==v||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[v,S]}),t[36]=v,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:y}=$t(b);let j;e[2]!==m?(j=Lt.Transform.toString(m?{...m,x:0}:null),e[2]=m,e[3]=j):j=e[3];const C=y?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,v=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=i&&"cursor-pointer";let k;e[9]!==v||e[10]!==S?(k=W("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",v,S),e[9]=v,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(Be,{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(Gt,{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 E;e[25]!==R||e[26]!==O?(E=s.jsxs(xe,{children:[R,O]}),e[25]=R,e[26]=O,e[27]=E):E=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Ht,{}),e[28]=D):D=e[28];let z;e[29]!==f?(z=f("sidebar.rail.organizationSettings"),e[29]=f,e[30]=z):z=e[30];let A;e[31]!==l||e[32]!==z?(A=s.jsxs(Pe,{onSelect:l,children:[D,z]}),e[31]=l,e[32]=z,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Be,{}),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 B;e[41]!==o||e[42]!==f?(B=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),f("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=f,e[43]=B):B=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==B?(Y=s.jsxs(qt,{children:[A,F,B]}),e[44]=A,e[45]=F,e[46]=B,e[47]=Y):Y=e[47];let K;e[48]!==E||e[49]!==Y?(K=s.jsxs(Zt,{children:[E,Y]}),e[48]=E,e[49]=Y,e[50]=K):K=e[50];let U;e[51]!==r||e[52]!==K?(U=s.jsx(ye,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=U):U=e[53];let G;return e[54]!==p||e[55]!==h||e[56]!==U||e[57]!==a?(G=s.jsx("div",{ref:h,...p,style:a,className:"w-full shrink-0 touch-none",children:U}),e[54]=p,e[55]=h,e[56]=U,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,y,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?(y=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=y):y=e[21],j=W("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]=y,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],y=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]!==y||e[31]!==j||e[32]!==a?(x=s.jsx(o,{to:h,params:p,"aria-label":m,"aria-current":u,onClick:y,className:j,children:a}),e[25]=o,e[26]=h,e[27]=p,e[28]=m,e[29]=u,e[30]=y,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 v;e[38]!==n.title?(v=s.jsx(be,{side:"right",children:n.title}),e[38]=n.title,e[39]=v):v=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==v?(S=s.jsxs(b,{children:[g,v]}),e[40]=b,e[41]=g,e[42]=v,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?(_=W("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 E,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(E=W("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(Ze,{size:10}),e[54]=E,e[55]=D):(E=e[54],D=e[55]);let z;e[56]!==R||e[57]!==O?(z=s.jsx("button",{type:"button","aria-label":R,onClick:O,className:E,children:D}),e[56]=R,e[57]=O,e[58]=z):z=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==z||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,z]}),e[59]=S,e[60]=T,e[61]=z,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=cs[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=W("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(ye,{active:!0,label:l,children:m}),e[23]=l,e[24]=m,e[25]=u):u=e[25],u}function Bs(){const{org:t}=ze();return ds(t.slug),null}function et(t){const e=I.c(77),{onNavigate:n}=t===void 0?{}:t,r=X(),i=pt(),{org:c}=ze(),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),[y,j]=$.useState(!1),C=Ie(),{recent:w,forget:a}=fs(c.slug),{projects:x}=ms(),g=hs(),v=us(),S=v&&v.projectId===null?v.app:null,k=S?[]:w.flatMap(N=>x.filter(M=>M.id===N)),_=Jt(p??[],c),{recent:T}=Qt(),R=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ge.railOrgPrefs(),e[4]=O):O=e[4];const[E,D]=$e(O,ts),z=Oe(E),A=$.useSyncExternalStore(Ps,As,Ms),{shown:L}=ss(rs(_,z,c.slug),T,c.slug,A,z.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=Et(Dt(Pt,P)),B=N=>{const{active:M,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(rt=>ls(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(Ws))},U=()=>{if(H("org_rail_search_opened"),!c.id){j(!0);return}n?.(),os()},G=!C&&"border-r border-sidebar-border";let q;e[6]!==G?(q=W("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=q):q=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 Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Re=Nt,Ee=Tt,De=At,Ne=L.map(Us),Te=Mt,Le=L.map(N=>s.jsxs($.Fragment,{children:[s.jsx($s,{org:N,active:N.slug===h,pinned:z.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}})},onTogglePin:()=>D(M=>is(Oe(M),N.slug)),onHide:N.slug===c.slug?void 0:()=>D(M=>ns(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]!==B||e[17]!==F||e[18]!==Ee||e[19]!==V?(J=s.jsx(Re,{sensors:F,collisionDetection:Ee,onDragEnd:B,children:V}),e[15]=Re,e[16]=B,e[17]=F,e[18]=Ee,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]!==Z?(ee=s.jsxs("div",{className:st,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,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 ve;e[29]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(Yt,{size:18}),e[29]=ve):ve=e[29];let se;e[30]!==U||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:U,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:ve})}),e[30]=U,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:yt.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(ye,{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(Xt,{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(ye,{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]!==q?(me=s.jsxs("div",{className:q,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=q,e[63]=me):me=e[63];let he;e[64]!==c.slug||e[65]!==_||e[66]!==y||e[67]!==j||e[68]!==K?(he=s.jsx(Cs,{open:y,onOpenChange:j,orgs:_,currentSlug:c.slug,onSelect:K}),e[64]=c.slug,e[65]=_,e[66]=y,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==m||e[71]!==u?(pe=s.jsx(as,{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 Us(t){return t.slug}function Ws(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}=qe(),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 y;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?(y=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]=y):y=e[14],y}const Me=400,Xe=16,Gs="sidebar.width.v2";function qs(){const t=I.c(14),e=Zs;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 y=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 v=e(j+(g.clientX-y));C?.style.setProperty("--sidebar-width",`${v}px`)},x=g=>{const v=e(j+(g.clientX-y));i(v);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 Zs(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=Rt(),[i,c]=$e(Ge.sidebarOpen(),!0),l=qs();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(Bs,{}),!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(Ct,{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}=qe(),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 v;return e[12]!==x||e[13]!==g?(v=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=v):v=e[14],v}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(kt,{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 y;e[21]!==h||e[22]!==r?(y=r({onClose:h}),e[21]=h,e[22]=r,e[23]=y):y=e[23];let j;e[24]!==y?(j=s.jsx("div",{className:"min-w-0 flex-1",children:y}),e[24]=y,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(Ot,{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(zt,{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(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(vt,{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 kr=Object.assign(Js,{Sidebar:Qs,Content:tr});export{kr as L};
|