decocms 4.529.0 → 4.530.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-DemHm_Wd.js → ActiveShapeUtils-DvZ4kp7j.js} +1 -1
- package/dist/client/assets/{AlertCircle-COvusPgV.js → AlertCircle-BOP0_W_U.js} +1 -1
- package/dist/client/assets/{AreaChart-DyTNutvb.js → AreaChart-yTlVcJtZ.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DLvj60sB.js → ArrowLeft-TqR4Fgfq.js} +1 -1
- package/dist/client/assets/{ArrowUp-BUXNFn6K.js → ArrowUp-C33jPuMc.js} +1 -1
- package/dist/client/assets/{BarChart-pUJx5RZM.js → BarChart-DrtskOqN.js} +1 -1
- package/dist/client/assets/{Building02-GTlj-q2W.js → Building02-mn349zQD.js} +1 -1
- package/dist/client/assets/{CartesianChart-GHKU27xx.js → CartesianChart-Dl6ED4Qn.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BYHLRXHR.js → CategoricalChart-DZtGpsC8.js} +1 -1
- package/dist/client/assets/{CheckCircle-C512y-MG.js → CheckCircle-BCSSdEIk.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BsYzg3zS.js → ChevronSelectorVertical-Bf_2MNcW.js} +1 -1
- package/dist/client/assets/{ChevronUp-krQUb2vU.js → ChevronUp-bG7QziWc.js} +1 -1
- package/dist/client/assets/{Copy01-DMa3yAGL.js → Copy01-CCULGI20.js} +1 -1
- package/dist/client/assets/{CreditCard01-B64VnM4Z.js → CreditCard01-CSCSy42G.js} +1 -1
- package/dist/client/assets/{DotsVertical-DcrZktRa.js → DotsVertical-DKcUxvbN.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-4lCbO0nP.js → ErrorBarContext-CMcrOvhv.js} +1 -1
- package/dist/client/assets/{Globe04-wvLOPSBv.js → Globe04-DJ5nStZd.js} +1 -1
- package/dist/client/assets/{Image01-C1LM4LI_.js → Image01-DBJ7dlcG.js} +1 -1
- package/dist/client/assets/{Key01-DBOKyeyp.js → Key01-EhXWdZXA.js} +1 -1
- package/dist/client/assets/{Link01-C15xvQCb.js → Link01-D3zxQ7B9.js} +1 -1
- package/dist/client/assets/{LinkBroken01-C-j1r45F.js → LinkBroken01-DJ9tk8Nb.js} +1 -1
- package/dist/client/assets/{Minus-pd7IxdG4.js → Minus-C_yGMjay.js} +1 -1
- package/dist/client/assets/{Monitor01-DkBo0gFa.js → Monitor01-HXiLn6G2.js} +1 -1
- package/dist/client/assets/{Play-BG4TP59z.js → Play-CtPfgXDv.js} +1 -1
- package/dist/client/assets/{Plus-CZXpdtEH.js → Plus-DT_Y3SXq.js} +1 -1
- package/dist/client/assets/{ReferenceLine-D8vPnc2l.js → ReferenceLine-BoIeIT-2.js} +1 -1
- package/dist/client/assets/{SearchMd-7uzgB_fN.js → SearchMd-g-czGrfP.js} +1 -1
- package/dist/client/assets/{Sector-BoQZLv3P.js → Sector-CXiTgTJg.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-fwBzMipi.js → ShoppingBag01-TKNh_f0W.js} +1 -1
- package/dist/client/assets/{Sun-BndYhLEq.js → Sun-D2qZhPc5.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C8FHYpzr.js → SwitchHorizontal01-Cd-vTdga.js} +1 -1
- package/dist/client/assets/{Tool01-D6wuoLhW.js → Tool01-DZn57NDu.js} +1 -1
- package/dist/client/assets/{Trash01-fFkz00Bo.js → Trash01-Bw8Leo0g.js} +1 -1
- package/dist/client/assets/{Upload01-B7NXMv4U.js → Upload01-DBuU3kZE.js} +1 -1
- package/dist/client/assets/{UserSquare-Dy6q7vGw.js → UserSquare-lDfe1WCi.js} +1 -1
- package/dist/client/assets/{Users01-Bzd23uge.js → Users01-B094G3md.js} +1 -1
- package/dist/client/assets/{XClose-Bl8OQypT.js → XClose-BZ7_Ux4e.js} +1 -1
- package/dist/client/assets/{ZoomOut-CbRHTtaG.js → ZoomOut-Bmxt_E04.js} +1 -1
- package/dist/client/assets/{access-gate-BUmBK35t.js → access-gate-D_BS-DcG.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-EKB9ifd5.js → add-connection-dialog-CD5rNCCt.js} +1 -1
- package/dist/client/assets/agent-analytics-vthOPnN6.js +1 -0
- package/dist/client/assets/agent-app-n-Aif9MC.js +1 -0
- package/dist/client/assets/{agent-assets-CLaEj6EO.js → agent-assets-CzNeFhAl.js} +1 -1
- package/dist/client/assets/{agent-automation-DjrvgxKz.js → agent-automation-CJ9v34r4.js} +1 -1
- package/dist/client/assets/{agent-automations-B_j3JMK5.js → agent-automations-gTSN0JNV.js} +1 -1
- package/dist/client/assets/{agent-calendar-BYK51o6p.js → agent-calendar-IRAVVe-8.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-CEHAzyyH.js → agent-connect-sources-B53nGR4C.js} +1 -1
- package/dist/client/assets/agent-deck-D3R8f8cF.js +1 -0
- package/dist/client/assets/{agent-e2e-DC8qsIOa.js → agent-e2e-CH6W1QQ7.js} +1 -1
- package/dist/client/assets/agent-experiments-CRDhAJbR.js +1 -0
- package/dist/client/assets/{agent-file-B2uxKC-F.js → agent-file-D5Vi9cHA.js} +1 -1
- package/dist/client/assets/{agent-hosting-RnWuRGIL.js → agent-hosting-B4ezToSE.js} +1 -1
- package/dist/client/assets/{agent-icon-D8I51g86.js → agent-icon-Bss_DO5K.js} +1 -1
- package/dist/client/assets/agent-library-DU6N23OR.js +1 -0
- package/dist/client/assets/agent-library-file-DD6y_E54.js +1 -0
- package/dist/client/assets/agent-monitor-CXnnFky_.js +1 -0
- package/dist/client/assets/{agent-overview-C5NgXH7s.js → agent-overview-CcHA5SNR.js} +1 -1
- package/dist/client/assets/{agent-releases-BC4vHFHk.js → agent-releases-f23knj6h.js} +1 -1
- package/dist/client/assets/agent-settings-e1pgmpw5.js +1 -0
- package/dist/client/assets/{agent-site-editor-DxPxTcxt.js → agent-site-editor-CTB1ccaH.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-ccGdn-Hd.js +2 -0
- package/dist/client/assets/agent-site-editor-content-Cs2mbasv.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CjLUuUK-.js +1 -0
- package/dist/client/assets/agent-view-DyJhvPdi.js +1 -0
- package/dist/client/assets/{agent-view-guard-DGYTrdB6.js → agent-view-guard-Glj0vRyr.js} +1 -1
- package/dist/client/assets/{agents-list-B3GTSyKF.js → agents-list-Bi5TXBHx.js} +1 -1
- package/dist/client/assets/{ai-providers-kbqqFGXw.js → ai-providers-B-8sjV9j.js} +1 -1
- package/dist/client/assets/{alert-Co4rQNsj.js → alert-Dv_m1jIZ.js} +1 -1
- package/dist/client/assets/{analytics-sections-sv8ClgZ6.js → analytics-sections-BCtwnwxr.js} +1 -1
- package/dist/client/assets/{analytics-tab-CZkiyMbX.js → analytics-tab-PU6dzTDv.js} +1 -1
- package/dist/client/assets/api-keys-BJJzdb0A.js +1 -0
- package/dist/client/assets/{api-keys-C1HeQnUq.js → api-keys-_u2bDol0.js} +1 -1
- package/dist/client/assets/{app-editor-6n0QxI7G.js → app-editor-BX_pUpeA.js} +1 -1
- package/dist/client/assets/{asset-utils-BVjUn7sv.js → asset-utils-BUlvPqYt.js} +1 -1
- package/dist/client/assets/{auth-catchall-CNcTLbQH.js → auth-catchall-BdUzb1Pt.js} +1 -1
- package/dist/client/assets/{auth-entry-B00ENnh_.js → auth-entry-DtnFIFL2.js} +1 -1
- package/dist/client/assets/{auth-D095ELC6.js → auth-kFzpcapr.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BygL4T3m.js → auth-split-layout-2nmiIKmw.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BWNvTNl4.js → authenticate-and-persist-oauth-D5qGprX9.js} +1 -1
- package/dist/client/assets/{automation-list-row-D74lyjQr.js → automation-list-row-BPnRwXLB.js} +1 -1
- package/dist/client/assets/{automation-runs-CBMsjgBs.js → automation-runs-DKb200eV.js} +1 -1
- package/dist/client/assets/{automations-jj-tbLkb.js → automations-BW2Pm3L7.js} +1 -1
- package/dist/client/assets/{autosend-CBkC989z.js → autosend-Byl7Kst-.js} +1 -1
- package/dist/client/assets/{badge-NOwFVf79.js → badge-C-BSS2Yn.js} +1 -1
- package/dist/client/assets/{block-document-BHzrJZOA.js → block-document-BY26DfN7.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-BXnXIitx.js → blocks-preview-workspace-context-BoznkXgh.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-B1baLGbh.js → blocks-tab-states-BsLUNSHT.js} +1 -1
- package/dist/client/assets/{blog-schema-BfjxCL-D.js → blog-schema-2lf7HGSD.js} +1 -1
- package/dist/client/assets/{buckets-DuxgHXni.js → buckets-D_afurG7.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-DfrXi7V7.js → build-improve-prompt-doc-DgvtLON3.js} +1 -1
- package/dist/client/assets/{calendar-r-ZqwkU5.js → calendar-CdQftUWj.js} +1 -1
- package/dist/client/assets/{capability-load-error-C_z_eZxA.js → capability-load-error-xQmp44p-.js} +1 -1
- package/dist/client/assets/{category-editor-BVzHX2Tl.js → category-editor-vOblLSz6.js} +1 -1
- package/dist/client/assets/{cdn-tab-CqrDuE12.js → cdn-tab-BxFGf6S7.js} +1 -1
- package/dist/client/assets/{chart-CpZD0pzF.js → chart-Q4A9_vVd.js} +1 -1
- package/dist/client/assets/{chat-context-CFRPrQEn.js → chat-context-CS6VicT4.js} +1 -1
- package/dist/client/assets/{chat-draft-CookMc2A.js → chat-draft-VQFS_4wA.js} +1 -1
- package/dist/client/assets/{checkbox-CHAX1Xck.js → checkbox-CKXQp3Az.js} +1 -1
- package/dist/client/assets/{choose-editor-agHDRvWe.js → choose-editor-DJDGvcjS.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DiUqDmOP.js → cli-auth-success-BMF85xbe.js} +1 -1
- package/dist/client/assets/{client-icons-CbLac6SE.js → client-icons-D7bNXOKu.js} +1 -1
- package/dist/client/assets/{cms-settings-editor-osH6UqMf.js → cms-settings-editor-DRzsX4We.js} +1 -1
- package/dist/client/assets/{collapsible-B0-dgkow.js → collapsible-BRjo2C7P.js} +1 -1
- package/dist/client/assets/{collection-detail-DMhjkfO0.js → collection-detail-JZh-OwkO.js} +1 -1
- package/dist/client/assets/{collection-display-button-VpsslNFN.js → collection-display-button-Dysq40FS.js} +1 -1
- package/dist/client/assets/{collection-search-CfEbdS6s.js → collection-search-D1wDrhDt.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Bmq1UECe.js → collection-table-wrapper-CcBN0zuI.js} +1 -1
- package/dist/client/assets/{collection-tabs-CKvYpxHT.js → collection-tabs-oJVN40cq.js} +1 -1
- package/dist/client/assets/{column-rules-DLuTKpTB.js → column-rules-BsFrVRCt.js} +1 -1
- package/dist/client/assets/{combobox-B2ABYNJF.js → combobox-DnggoquQ.js} +1 -1
- package/dist/client/assets/{command-yWHdaNhz.js → command-RRas5VNC.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-CzTfnHtf.js → companion-mcps-section-82FwEnBT.js} +1 -1
- package/dist/client/assets/{config-BWRujj0b.js → config-yv1vcB07.js} +1 -1
- package/dist/client/assets/{connect-Dd7mHJ3b.js → connect-DQYxewxl.js} +1 -1
- package/dist/client/assets/{connect-layout-CuMi_Lil.js → connect-layout-CSqNYyzb.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CEGXiNKG.js → connect-source-dialog-BEXUazdA.js} +1 -1
- package/dist/client/assets/{connection-BLQ_zE4V.js → connection-CH3Z1KCr.js} +1 -1
- package/dist/client/assets/{connection-card-By3c6kjU.js → connection-card-BF5BfmLL.js} +1 -1
- package/dist/client/assets/{connection-detail-shznFsHq.js → connection-detail-DuqznM8O.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Z8pfNB14.js → connection-form-helpers-Cpd6u6JQ.js} +1 -1
- package/dist/client/assets/{connections-BPuzvSmY.js → connections-BYHjY91l.js} +1 -1
- package/dist/client/assets/{content-tab-DneBUwU0.js → content-tab-mCOWekqN.js} +3 -3
- package/dist/client/assets/{context-CFpk-Oj4.js → context-DdW3O60M.js} +1 -1
- package/dist/client/assets/{context-menu-DJBtOK1b.js → context-menu-D_BKuwIH.js} +1 -1
- package/dist/client/assets/{context-shell-BmoIxzr5.js → context-shell-CIoIJ4XQ.js} +3 -3
- package/dist/client/assets/{core.esm-n2M8kvjD.js → core.esm-Bd-SITM_.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-CQRec3jk.js → create-organization-dialog-B-QOCOL_.js} +1 -1
- package/dist/client/assets/{daily-pulse-BbNgROp9.js → daily-pulse-CTP_9_pD.js} +1 -1
- package/dist/client/assets/{discover-C-nnI3od.js → discover-B6JRkvo1.js} +1 -1
- package/dist/client/assets/{domain-settings-Cc13IWEI.js → domain-settings-YDH2na3C.js} +1 -1
- package/dist/client/assets/{drawer-CiMnESz2.js → drawer-H8aSAwJp.js} +1 -1
- package/dist/client/assets/{editor-DmuvoJYA.js → editor-DvPX7u6U.js} +1 -1
- package/dist/client/assets/{editor-classes-BnQ0j7aI.js → editor-classes-CnGnA58J.js} +1 -1
- package/dist/client/assets/{empty-state-TJAbP9DT.js → empty-state-BzyULwUr.js} +1 -1
- package/dist/client/assets/{empty-state-usXK3Xda.js → empty-state-DXzhbFKQ.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-0iIRb8Mb.js → experiments-tab-choice-DEkj0Qn-.js} +1 -1
- package/dist/client/assets/{experiments-tab-BP2V1ct9.js → experiments-tab-wFwzIEjh.js} +1 -1
- package/dist/client/assets/{extract-connection-data-w2KZjBRz.js → extract-connection-data-B6GxSzL3.js} +1 -1
- package/dist/client/assets/{feature-gate-CL9DvP9Y.js → feature-gate-BOfmLcrg.js} +1 -1
- package/dist/client/assets/{feature-paywall-DSpW8aNd.js → feature-paywall-BuJHEFXn.js} +1 -1
- package/dist/client/assets/{file-explorer-p0qSIvAq.js → file-explorer-By08wQDy.js} +1 -1
- package/dist/client/assets/{file-preview-BnfIAfXR.js → file-preview-ZIUn5Oc5.js} +1 -1
- package/dist/client/assets/{file-share-button-D0fIsSP3.js → file-share-button-0HRLJOC3.js} +1 -1
- package/dist/client/assets/{file-type-icon-BMJ3eu8C.js → file-type-icon-B1YNwd4s.js} +1 -1
- package/dist/client/assets/{folder-icon-AsglkwKY.js → folder-icon-BugfSbt-.js} +1 -1
- package/dist/client/assets/{form-B15LRu36.js → form-CgSRndK2.js} +1 -1
- package/dist/client/assets/{general-jGb_G4uN.js → general-BfYy1nfq.js} +1 -1
- package/dist/client/assets/{held-block-view-OUun6HKW.js → held-block-view-DJ-L3NcY.js} +3 -3
- package/dist/client/assets/{home-T15wg8dw.js → home-BMSRZeBG.js} +1 -1
- package/dist/client/assets/{hosted-publish-feedback-CpPg0deS.js → hosted-publish-feedback-D0Bdh4ip.js} +1 -1
- package/dist/client/assets/{icon-button-CdKw1JM7.js → icon-button-DLFu-3bH.js} +1 -1
- package/dist/client/assets/{index-DgseJSFR.js → index-8rk0r3sf.js} +1 -1
- package/dist/client/assets/{index-D6lKvaoF.js → index-B0tOn0op.js} +5 -5
- package/dist/client/assets/{index-BfJfM0M5.js → index-B3SUdR5w.js} +1 -1
- package/dist/client/assets/{index-CPx4iDWN.js → index-BDe6L_Fs.js} +1 -1
- package/dist/client/assets/{index-ke7VZu6f.js → index-BGhAnNs4.js} +1 -1
- package/dist/client/assets/{index-Ba639kg_.js → index-Bf7bXfI5.js} +1 -1
- package/dist/client/assets/{index-DdjqsLVd.js → index-C33RBt6x.js} +1 -1
- package/dist/client/assets/{index-Cdp3CJ7S.js → index-CEFh9jFo.js} +1 -1
- package/dist/client/assets/{index-BJ0i7OFb.js → index-CtJrnLrV.js} +1 -1
- package/dist/client/assets/{index-BCVYESVO.js → index-CvbPbFXs.js} +1 -1
- package/dist/client/assets/{index-suEm9Jo8.js → index-DJcLj00C.js} +1 -1
- package/dist/client/assets/{index-Cv-yBusP.js → index-DV5SNfGk.js} +1 -1
- package/dist/client/assets/{index-Du8mxU6I.js → index-MNuVL2v0.js} +1 -1
- package/dist/client/assets/{index-DTPm19J5.js → index-fCRLOlgL.js} +1 -1
- package/dist/client/assets/{index-CYkDIirY.js → index-qRJs3nwP.js} +1 -1
- package/dist/client/assets/{index-redirect-DPkf2M1r.js → index-redirect-CWZlZdIG.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DoO1tFcg.js → infiniteQueryObserver-Qk75Yfno.js} +1 -1
- package/dist/client/assets/{infra-billing-AOTF4BF9.js → infra-billing-Cfn8EhrD.js} +1 -1
- package/dist/client/assets/{input-BjDpMhiP.js → input-CMV7rkdx.js} +3 -3
- package/dist/client/assets/{input-CGPBEV3I.js → input-DgTSqztG.js} +1 -1
- package/dist/client/assets/{integration-icon-DsUtWvNG.js → integration-icon-DH6bJTbT.js} +1 -1
- package/dist/client/assets/{jira-icon-ClDodO3R.js → jira-icon-BaiExl6h.js} +1 -1
- package/dist/client/assets/{label-G1B1MWwD.js → label-DjW9Efu-.js} +1 -1
- package/dist/client/assets/{layout-txEP7eBz.js → layout-DBDQq16Z.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DPRz-ztQ.js → legacy-agents-deep-DqjLAu69.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-D4h2lZ1C.js → legacy-main-redirect-BqH36-dH.js} +1 -1
- package/dist/client/assets/library-DeXuJevF.js +1 -0
- package/dist/client/assets/{login-BLrZZn8v.js → login-LlR_PFwv.js} +1 -1
- package/dist/client/assets/{markdown-qzRhqGiE.js → markdown-CXmgfCfV.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-BEchnhBH.js → mcp-app-renderer-CymHe0GL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DB3Ehq2l.js → mcp-oauth-BqcW0NNd.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C5j0dGpY.js → mcp-oauth-DPBTJBcB.js} +1 -1
- package/dist/client/assets/{members-UnOmDr74.js → members-D4WInpkb.js} +1 -1
- package/dist/client/assets/{memory-DDcdJq0f.js → memory-5CntRYao.js} +1 -1
- package/dist/client/assets/{mini-report-page-0MJL6jaw.js → mini-report-page-CR4VtCxS.js} +1 -1
- package/dist/client/assets/mock-board-DJMG3prV.js +81 -0
- package/dist/client/assets/{monaco-editor-f9CmyWiW.js → monaco-editor-SOR0aZJh.js} +1 -1
- package/dist/client/assets/{monitoring-BcfPBOT_.js → monitoring-aIV3430W.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DbGeX6M1.js → monitoring-stats-row-Jq_9Q3cq.js} +1 -1
- package/dist/client/assets/{multi-select-DDgBvcml.js → multi-select-5T86gKsk.js} +1 -1
- package/dist/client/assets/{mustache-Dlytn5tt.js → mustache-BrfO16w7.js} +1 -1
- package/dist/client/assets/{named-rule-uses-Ce5M9wic.js → named-rule-uses-CWvSr5mm.js} +1 -1
- package/dist/client/assets/{new-project-dialog-CMq12kc2.js → new-project-dialog-CwbZzsMX.js} +1 -1
- package/dist/client/assets/{oauth-callback-CHDXWkE_.js → oauth-callback-BQ6KU-zk.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-UMPeP62o.js → oauth-callback-ai-provider-BWTljUMd.js} +1 -1
- package/dist/client/assets/{onboarding-M__h_Gjj.js → onboarding-UUqqxcRk.js} +1 -1
- package/dist/client/assets/{openai-conversation-CaIhAnt3.js → openai-conversation-DXu_ai6d.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-CdaXFXXA.js → optimistic-project-sidebar-views-C4KEBYns.js} +1 -1
- package/dist/client/assets/{order-monitor-day-EdsSjGDV.js → order-monitor-day-BTKxNXuV.js} +1 -1
- package/dist/client/assets/{organization-choice-nAa_gubo.js → organization-choice-CJj1aLLE.js} +1 -1
- package/dist/client/assets/{orgs-Bf_omTy9.js → orgs-g3G6AdOe.js} +1 -1
- package/dist/client/assets/{page-seo-form-bDCctB_4.js → page-seo-form-Cd3pqfx8.js} +1 -1
- package/dist/client/assets/{pair-DAGOA-DW.js → pair-BS_IW-xJ.js} +1 -1
- package/dist/client/assets/{parse-sections-CQtk5pOz.js → parse-sections-Dr39BWrW.js} +1 -1
- package/dist/client/assets/{plan-ladder-lTkei0Ti.js → plan-ladder-DPUUy26C.js} +1 -1
- package/dist/client/assets/{plan-B6ZUDARY.js → plan-w_bsMJ9F.js} +1 -1
- package/dist/client/assets/{popover-0uuKFwAZ.js → popover-BNB2WAex.js} +1 -1
- package/dist/client/assets/{post-calendar-EZk2hClJ.js → post-calendar-CHV8XEbR.js} +1 -1
- package/dist/client/assets/{post-editor-DBjNxHSS.js → post-editor-CLmTc6Vu.js} +1 -1
- package/dist/client/assets/{preview-content-QwLJXUTL.js → preview-content-BkRMOITc.js} +1 -1
- package/dist/client/assets/{preview-dialog-COkKtKSn.js → preview-dialog-BYTdTSd2.js} +1 -1
- package/dist/client/assets/{preview-panel-CYvbBECE.js → preview-panel-DXXylmoB.js} +1 -1
- package/dist/client/assets/{preview-tab-CevrXu6o.js → preview-tab-D9YpAMyB.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-C4MqsCUp.js → product-picker-dialog-WMQXlZUo.js} +1 -1
- package/dist/client/assets/{profile-BpyEXZc8.js → profile-DLCwlVCc.js} +1 -1
- package/dist/client/assets/{project-app-view-Be6CnjoI.js → project-app-view-B-s_ilf4.js} +1 -1
- package/dist/client/assets/{project-apps-B0ovyypF.js → project-apps-DgFIeSYf.js} +1 -1
- package/dist/client/assets/{project-feed-C21rLNuW.js → project-feed-u80jGsBM.js} +1 -1
- package/dist/client/assets/{project-icon-DSVUD72l.js → project-icon-DpS1PVmR.js} +1 -1
- package/dist/client/assets/project-reports-BUpmOe9y.js +1 -0
- package/dist/client/assets/project-tasks-B5gIJMoD.js +1 -0
- package/dist/client/assets/{projects-DVL140KR.js → projects-BQFTIIlv.js} +1 -1
- package/dist/client/assets/{projects-empty-state--1SkJcww.js → projects-empty-state-B1rOjHBT.js} +1 -1
- package/dist/client/assets/{prompts-BB-mkKBu.js → prompts-BwDjnPim.js} +1 -1
- package/dist/client/assets/record-editor-B87aHfte.js +1 -0
- package/dist/client/assets/{redirect-editor-MSkonkYZ.js → redirect-editor-DIUdga9p.js} +1 -1
- package/dist/client/assets/{releases-api-XsGA4Jqp.js → releases-api-CbLHrT57.js} +1 -1
- package/dist/client/assets/{reports-Bs2cZ7-f.js → reports-BY7Ys0O3.js} +1 -1
- package/dist/client/assets/reports-Bv95v9-B.js +1 -0
- package/dist/client/assets/{reports-onboarding-CQDYROlT.js → reports-onboarding-sD19crIX.js} +1 -1
- package/dist/client/assets/{reports-tab-unD6Cc73.js → reports-tab-CXYw7uK_.js} +2 -2
- package/dist/client/assets/repositories-5RE7P1Fj.js +1 -0
- package/dist/client/assets/{repositories-D4uDVy59.js → repositories-B0n3HOv9.js} +1 -1
- package/dist/client/assets/{repository-binding-DG0YfJ0p.js → repository-binding-DBKiXzE_.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DmsHSDsT.js → repository-import-picker-BW6Sgxp6.js} +1 -1
- package/dist/client/assets/{repository-picker-DtHxD0oz.js → repository-picker-CC5H8ljW.js} +1 -1
- package/dist/client/assets/{require-capability-Coznh-2O.js → require-capability-COWPBR01.js} +1 -1
- package/dist/client/assets/{required-auth-layout-D6rVgMVl.js → required-auth-layout-CiEz7oyV.js} +1 -1
- package/dist/client/assets/{reset-password-T1aKmDxe.js → reset-password-CRw2eYcE.js} +1 -1
- package/dist/client/assets/{resizable-BToK-_9q.js → resizable-BnHppfEe.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-BZcs-4Ej.js → resolve-tab-icon-Bo7Cblp-.js} +1 -1
- package/dist/client/assets/{review-settings-D8DTqrlS.js → review-settings-c5PLuzL1.js} +1 -1
- package/dist/client/assets/{roles-BjZzPNJU.js → roles-Ch2duQPh.js} +1 -1
- package/dist/client/assets/route-6_F9Lvsg.js +1 -0
- package/dist/client/assets/{route-CGlwPlVk.js → route-D6dIow4H.js} +1 -1
- package/dist/client/assets/{route-ZKQ_kRmZ.js → route-DBe1uYBt.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-DmhDA6t4.js → sandbox-lifecycle-context-BcTeO4Q3.js} +1 -1
- package/dist/client/assets/{schema-DNxvjoV7.js → schema-C7U_cF_C.js} +1 -1
- package/dist/client/assets/{schema-DnX2JCBp.js → schema-DuXRpy1C.js} +1 -1
- package/dist/client/assets/{scroll-area-DuxlLjxF.js → scroll-area-BYf7WryG.js} +1 -1
- package/dist/client/assets/{search-input-D-Pyf_-v.js → search-input-Bl81W1Nh.js} +1 -1
- package/dist/client/assets/{search-toggle-Dtmn6N5P.js → search-toggle-BR2ntzDz.js} +1 -1
- package/dist/client/assets/{secret-picker-DVVZ5bEr.js → secret-picker-CYFTZf4e.js} +1 -1
- package/dist/client/assets/{secrets-cTi-1KGY.js → secrets-vKVDoP1f.js} +1 -1
- package/dist/client/assets/{section-array-field-D7M_bj6e.js → section-array-field-DUVFffgC.js} +1 -1
- package/dist/client/assets/{sections-editor-Cp3o1WEu.js → sections-editor-CcMaFbqS.js} +1 -1
- package/dist/client/assets/{sections-DoIjBnkB.js → sections-y7v9FSuQ.js} +1 -1
- package/dist/client/assets/{select-WYGhjx6Y.js → select-BqKA-vqL.js} +1 -1
- package/dist/client/assets/{select-model-7YJABjjD.js → select-model-BGFnOFCQ.js} +1 -1
- package/dist/client/assets/{seo-editor-DxqL4dEA.js → seo-editor-Zi_CHSPY.js} +1 -1
- package/dist/client/assets/{separator-CAQrypmQ.js → separator-B8n6kHAZ.js} +1 -1
- package/dist/client/assets/settings-tab-KnQUkP6Y.js +1 -0
- package/dist/client/assets/{sheet-BXLIoGMZ.js → sheet-BAxFoa2_.js} +1 -1
- package/dist/client/assets/{shell-layout-DIzvUuq-.js → shell-layout-CV6pDkTS.js} +1 -1
- package/dist/client/assets/{site-draft-actions-L6qNX2KR.js → site-draft-actions-Bgz-FOQK.js} +1 -1
- package/dist/client/assets/{site-draft-view-CFpMP26D.js → site-draft-view-DHafi4O7.js} +2 -2
- package/dist/client/assets/site-editor-BNlcB92o.js +1 -0
- package/dist/client/assets/{site-editor-toast-DYuw8EYm.js → site-editor-toast-DlVUb8vV.js} +1 -1
- package/dist/client/assets/{skills-Bs4GOdTG.js → skills-BtMvbWCD.js} +1 -1
- package/dist/client/assets/{slider-CViVuHCu.js → slider-KvVzGkcV.js} +1 -1
- package/dist/client/assets/{sortable.esm-DEhQR8uW.js → sortable.esm-CHgVwe8S.js} +1 -1
- package/dist/client/assets/{sso-RbRiEKa0.js → sso-DuuvDFz4.js} +1 -1
- package/dist/client/assets/{suggestion-Bx_JdcJG.js → suggestion-Cmvr6ozT.js} +1 -1
- package/dist/client/assets/{switch-BByo6038.js → switch-DqbfJ6XC.js} +1 -1
- package/dist/client/assets/{symbol-Dxfa7ArY.js → symbol-BkEjWtZb.js} +1 -1
- package/dist/client/assets/{synced-repos-COUZBGua.js → synced-repos-BxtXsnIq.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-Bk-ZO6Ik.js → tab-icon-glyph-RtjNPv4h.js} +1 -1
- package/dist/client/assets/{table-CSNuDYSH.js → table-Ch8y7OxX.js} +1 -1
- package/dist/client/assets/{tabs-D3JiC-AY.js → tabs-CvTwctdA.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-BmM5P6_t.js → task-assignee-avatar-DWyVzTkD.js} +1 -1
- package/dist/client/assets/{task-board-9JuNZBWk.js → task-board-BN1n0sAA.js} +1 -1
- package/dist/client/assets/{task-route-8N1kEUR4.js → task-route-WFFRmRkj.js} +1 -1
- package/dist/client/assets/{task-status-CqFVxY8B.js → task-status-DSSpycnv.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-CJlU-oAO.js → taskboard-analytics-xsNPy8N8.js} +1 -1
- package/dist/client/assets/{tasks-gqaInVx6.js → tasks-D5PsurKg.js} +1 -1
- package/dist/client/assets/tasks-DqBBZHH6.js +1 -0
- package/dist/client/assets/{textarea-L_ZRNMiO.js → textarea-Ce3-2mS-.js} +1 -1
- package/dist/client/assets/{thread-analytics-BcGg7DjZ.js → thread-analytics-D6o0TQdW.js} +1 -1
- package/dist/client/assets/{thread-intent-B7fQ4X9a.js → thread-intent-Ckrry8zY.js} +1 -1
- package/dist/client/assets/{thread-route-qfZwEURL.js → thread-route-B2QRkxdS.js} +1 -1
- package/dist/client/assets/{thread-route-P1MEabq1.js → thread-route-dALO1ggR.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-Brz-5Xzp.js → thread-sheet-body-O6J2hk4T.js} +1 -1
- package/dist/client/assets/{time-range-picker-D-N-klXR.js → time-range-picker-BdhPN_P3.js} +1 -1
- package/dist/client/assets/{toggle-group-DGrVpPy5.js → toggle-group-DplSVqNV.js} +1 -1
- package/dist/client/assets/{tool-namespace-D6LarB3P.js → tool-namespace-Ca_f3ged.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DA7DTn0f.js → toolbar-icon-button-BU_Lc1T3.js} +1 -1
- package/dist/client/assets/{tooltip-LAilTl9w.js → tooltip-CgglVi9W.js} +1 -1
- package/dist/client/assets/{tooltipContext-BD4z8QR3.js → tooltipContext-C2kbIrVy.js} +1 -1
- package/dist/client/assets/{track-BDBNTOtn.js → track-y4KgSLRA.js} +1 -1
- package/dist/client/assets/{types-B-ck70wq.js → types-Df2OBpZL.js} +1 -1
- package/dist/client/assets/{url-slug-hCw666fV.js → url-slug-CiVvW5vP.js} +1 -1
- package/dist/client/assets/{usage-stats-C7wY64zK.js → usage-stats-DK8XMQvR.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CCh3hgye.js → use-ai-providers-hxbNecrE.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-C3ZZJzlV.js → use-apply-named-rule-CGvl7OA7.js} +1 -1
- package/dist/client/assets/{use-automations-CRFTJK4f.js → use-automations-eL46w5sy.js} +1 -1
- package/dist/client/assets/{use-autosave-DCyEvO0j.js → use-autosave-0ySBC_GL.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-wJjkzkeX.js → use-chat-layout-state-BSTkVYBd.js} +1 -1
- package/dist/client/assets/{use-clock-tick-N15XxKsH.js → use-clock-tick-Ck7vSkhv.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-Ba42J8md.js → use-cms-publish-actions-CNrHUo7H.js} +1 -1
- package/dist/client/assets/{use-connect-companion-DnBPIlmE.js → use-connect-companion-KqiIqJ2t.js} +1 -1
- package/dist/client/assets/{use-connection-BBWQ1upy.js → use-connection-EUcmc_O-.js} +1 -1
- package/dist/client/assets/{use-copy-Bnv2yRR0.js → use-copy-CE87YLnn.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CLc8yu5S.js → use-create-virtual-mcp-9RehQdtY.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-Br988cT0.js → use-date-fns-locale-4LRMo-Iu.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-GFM4KrwH.js → use-debounced-autosave-DjMsuM5_.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DLa-riOh.js → use-debounced-value-CthHwE3s.js} +1 -1
- package/dist/client/assets/{use-deco-credits-3I0Gmtle.js → use-deco-credits-BbBcoaKj.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C6bScbXe.js → use-decopilot-events-PGYGrQrr.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BZQtBcN0.js → use-delete-connection-D4r9W5uz.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-D2xZ3EVY.js → use-deployment-admin-C_gdAaQL.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DRBVlysi.js → use-fast-preview-draft-url-B55YeUkV.js} +1 -1
- package/dist/client/assets/{use-file-configs-EhGCWGKO.js → use-file-configs-CYRdd8Dm.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-MI8GAssc.js → use-inbox-feed-D9h8ltqT.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Dl4ppp1T.js → use-infinite-scroll-B-uSWzNc.js} +1 -1
- package/dist/client/assets/{use-join-requests-D0RX0KVp.js → use-join-requests-BUZPOPVU.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Dy6OYkJL.js → use-main-panel-tabs-Bk1EtVnG.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BLS8Hv4S.js → use-mcp-auth-status-3nUlBDBy.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DwqRqgyq.js → use-mcp-client-DJpi4PM5.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-l19k-bhU.js → use-mcp-prompts-wOk1Vinz.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CNG9BIav.js → use-mcp-tools-Bfcp5LpM.js} +1 -1
- package/dist/client/assets/{use-mobile-BwQy16Q6.js → use-mobile-D1VdMSzS.js} +1 -1
- package/dist/client/assets/{use-move-blocks-Crj0de_N.js → use-move-blocks-Dg9U_Nb8.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BK5-GF4Q.js → use-navigate-to-agent-CCS7aqQS.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-BQr-ZtMF.js → use-open-billing-url-BixRtMzE.js} +1 -1
- package/dist/client/assets/{use-org-fs-DLZ1-PTn.js → use-org-fs-CeGf0w9Y.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CDoF8IOA.js → use-org-repo-syncs-BfOEx3n_.js} +1 -1
- package/dist/client/assets/{use-org-sso-C-qEDq8K.js → use-org-sso-DMyNEVzj.js} +1 -1
- package/dist/client/assets/{use-organization-roles-D0H2tUJi.js → use-organization-roles-DAWtiUfW.js} +1 -1
- package/dist/client/assets/{use-organization-settings-kq9jLGY0.js → use-organization-settings-DPGSLMns.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BECpOul-.js → use-panel-navigate-Bgyt5CHg.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-1uAz-ylt.js → use-project-native-view-presence-C-gVs4yc.js} +1 -1
- package/dist/client/assets/{use-project-scope-DQZacSdf.js → use-project-scope-CzfpwfYe.js} +1 -1
- package/dist/client/assets/{use-recent-apps-ujQcGW4R.js → use-recent-apps-Ynx2etJA.js} +1 -1
- package/dist/client/assets/{use-releases-Brr6nY5b.js → use-releases-C6WrYJK9.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-CSbUL_Ki.js → use-reports-diagnostic-BTM7hE_9.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-DDEe74Lx.js → use-sandbox-events-h5DHAMj7.js} +1 -1
- package/dist/client/assets/{use-secrets-B-wd58Sw.js → use-secrets-C3TBzGsD.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CyvlvXKC.js → use-section-preview-base-DUpmdDxV.js} +1 -1
- package/dist/client/assets/{use-session-runtime-oQf5p7F0.js → use-session-runtime-Cr5FejOR.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-CQxN5Dgl.js → use-sidebar-collapsed-83oP_cPD.js} +1 -1
- package/dist/client/assets/{use-tags-Ckwl5Ic8.js → use-tags-Cb5ZtoLA.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-CxJm3obr.js → use-task-board-analytics-DdbcnB93.js} +1 -1
- package/dist/client/assets/{use-task-board-events-C11vdnOU.js → use-task-board-events-iZ165E68.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-OoBVrY5e.js → use-task-board-item-prs-k6qHY43S.js} +1 -1
- package/dist/client/assets/{use-task-metadata-B5vxvrwt.js → use-task-metadata-DkMgTFSM.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-Ccey92kA.js → use-thread-analytics-BqMf8Bru.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-AtJj5nDf.js → use-thread-outputs-CQhptiZl.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B3u_qeyw.js +1 -0
- package/dist/client/assets/{useQueries-DwNBQmnp.js → useQueries-BonGRGF_.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-0NVyrPzv.js +1 -0
- package/dist/client/assets/{users-47U5EmUY.js → users-DlCEgHwN.js} +1 -1
- package/dist/client/assets/{utils-CLU7TQYj.js → utils-BBkAOZCB.js} +1 -1
- package/dist/client/assets/{variant-calendar-8QsQaZXX.js → variant-calendar-CkyDXDJQ.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-VqVKqAN8.js → variant-matcher-override-Ce2rdmeW.js} +1 -1
- package/dist/client/assets/{view-header-C8Yesx7u.js → view-header-DQbofxq8.js} +1 -1
- package/dist/client/assets/{virtual-mcp-BO25j0IY.js → virtual-mcp-BI04Wiyg.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DZPVglNq.js → watch-sse-pool-BAzbGHBs.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-BIR7Elpu.js +0 -1
- package/dist/client/assets/agent-app-BY_sxPgf.js +0 -1
- package/dist/client/assets/agent-deck-O9lG5hoA.js +0 -1
- package/dist/client/assets/agent-experiments-BI2FazYu.js +0 -1
- package/dist/client/assets/agent-library-CkANn3L_.js +0 -1
- package/dist/client/assets/agent-library-file-WsrEoVuH.js +0 -1
- package/dist/client/assets/agent-monitor-B02h5NLr.js +0 -1
- package/dist/client/assets/agent-settings-LRXrMwgi.js +0 -1
- package/dist/client/assets/agent-site-editor-code-CkH40Rf7.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Cr-1q_qf.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BtO7VQJF.js +0 -1
- package/dist/client/assets/agent-view-JeA7v4l-.js +0 -1
- package/dist/client/assets/api-keys-D5vUfJru.js +0 -1
- package/dist/client/assets/library-DG80ymId.js +0 -1
- package/dist/client/assets/mock-board-BMi5jY8O.js +0 -81
- package/dist/client/assets/project-reports-B-dKM4cz.js +0 -1
- package/dist/client/assets/project-tasks-CQ6MOp0o.js +0 -1
- package/dist/client/assets/record-editor-CHzxFRQb.js +0 -1
- package/dist/client/assets/reports-CDn9xmoF.js +0 -1
- package/dist/client/assets/repositories-jqcTJr-Z.js +0 -1
- package/dist/client/assets/route-JsLO4TKF.js +0 -1
- package/dist/client/assets/settings-tab-DBT9iC5q.js +0 -1
- package/dist/client/assets/site-editor-CFIZ4rer.js +0 -1
- package/dist/client/assets/tasks-BVwsk6i_.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B3ME351M.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DdTGZQmz.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as $,b as j,r as E,j as b,l as q,ai as vt,t as ue,b7 as Xe,a4 as At,gC as Mt,m as St,K as Ct,bQ as Rt,h as Je,o as Et}from"./index-D6lKvaoF.js";import{a as $t,n as Ye,E as ie,o as _t,x as Lt,y as P,z as It,A as zt,B as et,C as N,G as Ee,H as Pt,I as Ht,J as $e,K as jt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Nt,V as Ot,W as Bt,X as Dt,Y as Ft,s as qt,Z as Wt,u as Ut,b as Gt}from"./usage-stats-C7wY64zK.js";import{T as _,n as Zt,i as Vt,E as Kt}from"./editor-classes-BnQ0j7aI.js";import{a as Qt,e as nt,s as Xt,S as Jt}from"./suggestion-Bx_JdcJG.js";import{B as Yt,c as en,t as tn,C as rt,f as nn,g as _e,s as rn,m as Le,a as Ie,b as sn,d as ze,e as an,h as on,i as ln,j as cn,k as un,l as hn,n as dn}from"./index-CPx4iDWN.js";import{ag as pn,ah as fn,aj as gn,_ as mn,bc as kn,aU as xn}from"./agent-icon-D8I51g86.js";import{i as bn}from"./SwitchHorizontal01-C8FHYpzr.js";import{i as wn}from"./Link01-C15xvQCb.js";import{s as yn}from"./Trash01-fFkz00Bo.js";import{i as Tn,b as vn}from"./use-org-fs-DLZ1-PTn.js";import{E as Pe,i as st,b as An,c as Mn,d as it,A as Sn,e as Cn,m as Rn,f as En}from"./markdown-qzRhqGiE.js";import{d as $n,e as _n,c as Ln,C as In,b as zn}from"./command-yWHdaNhz.js";import{I as Pn}from"./icon-button-CdKw1JM7.js";function Hn(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 M=n.getAttributes("link").href;l(typeof M=="string"?M:""),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 M=Zt(a);if(M===""){g();return}if(!Vt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(wn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.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:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.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")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(yn,{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]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},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&&b.jsxs(Yt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(fn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(gn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(mn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(bn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(kn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{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=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=Tn(Pe),r=vn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?An:Mn,c=`${crypto.randomUUID()}${qn(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 Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new _t({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 Gn(t,e){return ee.getState(t)?.get(e)}function Zn(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((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Lt.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),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=st(g);Zn(h,Gn(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=Vn(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 ot(t){F=t}var O={exec:()=>null};function A(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 Qn=(()=>{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)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {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+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).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(),tr=A(lt).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]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(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]*?(?:-->|$))/,ir=A("^ {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(),ut=A(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(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\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(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).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()},lr={...Ae,html:A(`^ *(?: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:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
1
|
+
import{c as $,b as j,r as E,j as b,l as q,ai as vt,t as ue,b7 as Xe,a4 as At,gC as Mt,m as St,K as Ct,bQ as Rt,h as Je,o as Et}from"./index-B0tOn0op.js";import{a as $t,n as Ye,E as ie,o as _t,x as Lt,y as P,z as It,A as zt,B as et,C as N,G as Ee,H as Pt,I as Ht,J as $e,K as jt,L as V,N as D,m as H,O as Y,T as tt,R as ke,Q as xe,U as Nt,V as Ot,W as Bt,X as Dt,Y as Ft,s as qt,Z as Wt,u as Ut,b as Gt}from"./usage-stats-DK8XMQvR.js";import{T as _,n as Zt,i as Vt,E as Kt}from"./editor-classes-CnGnA58J.js";import{a as Qt,e as nt,s as Xt,S as Jt}from"./suggestion-Cmvr6ozT.js";import{B as Yt,c as en,t as tn,C as rt,f as nn,g as _e,s as rn,m as Le,a as Ie,b as sn,d as ze,e as an,h as on,i as ln,j as cn,k as un,l as hn,n as dn}from"./index-BDe6L_Fs.js";import{ag as pn,ah as fn,aj as gn,_ as mn,bc as kn,aU as xn}from"./agent-icon-Bss_DO5K.js";import{i as bn}from"./SwitchHorizontal01-Cd-vTdga.js";import{i as wn}from"./Link01-D3zxQ7B9.js";import{s as yn}from"./Trash01-Bw8Leo0g.js";import{i as Tn,b as vn}from"./use-org-fs-CeGf0w9Y.js";import{E as Pe,i as st,b as An,c as Mn,d as it,A as Sn,e as Cn,m as Rn,f as En}from"./markdown-CXmgfCfV.js";import{d as $n,e as _n,c as Ln,C as In,b as zn}from"./command-RRas5VNC.js";import{I as Pn}from"./icon-button-DLFu-3bH.js";function Hn(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 M=n.getAttributes("link").href;l(typeof M=="string"?M:""),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 M=Zt(a);if(M===""){g();return}if(!Vt(M)){u(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:M}).run(),i(!1)},e[7]=a,e[8]=n,e[9]=g,e[10]=m):m=e[10];const k=m;let w;e[11]!==r?(w=r("markdownEditor.link"),e[11]=r,e[12]=w):w=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=b.jsx(wn,{size:14}),e[13]=y):y=e[13];let T;e[14]!==h||e[15]!==w||e[16]!==f?(T=b.jsx(_,{active:h,label:w,onClick:f,children:y}),e[14]=h,e[15]=w,e[16]=f,e[17]=T):T=e[17];let x;e[18]!==h||e[19]!==k||e[20]!==a||e[21]!==n||e[22]!==o||e[23]!==s||e[24]!==g||e[25]!==r?(x=s&&b.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:M=>{M.currentTarget.contains(M.relatedTarget)||i(!1)},children:[b.jsx("input",{autoFocus:!0,type:"text","aria-label":r("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:r("markdownEditor.linkPlaceholder"),value:a,onChange:M=>{l(M.target.value),u(!1)},onKeyDown:M=>{M.key==="Enter"?(M.preventDefault(),k()):M.key==="Escape"&&(M.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")}),b.jsx(_,{active:!1,label:r("markdownEditor.linkApply"),onClick:k,children:b.jsx(vt,{size:14})}),h&&b.jsx(_,{active:!1,label:r("markdownEditor.linkRemove"),onClick:g,children:b.jsx(yn,{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]=x):x=e[26];let v;return e[27]!==T||e[28]!==x?(v=b.jsxs("div",{className:"relative",children:[T,x]}),e[27]=T,e[28]=x,e[29]=v):v=e[29],v}const le=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=b.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},He=t=>{const e=$.c(2),{children:n}=t;let r;return e[0]!==n?(r=b.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=r):r=e[1],r},at=[1,2,3],jn=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function Nn(t){const e=$.c(20),{editor:n}=t,r=j(),[s,i]=E.useState(null);let a;e[0]!==n?(a={editor:n,selector:On},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&&b.jsxs(Yt,{editor:n,shouldShow:jn,appendTo:s,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":r("markdownEditor.toolbarAriaLabel"),children:[b.jsx(_,{active:l.bold,label:r("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:b.jsx(pn,{size:14})}),b.jsx(_,{active:l.italic,label:r("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:b.jsx(fn,{size:14})}),b.jsx(_,{active:l.strike,label:r("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:b.jsx(gn,{size:14})}),b.jsx(_,{active:l.code,label:r("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:b.jsx(mn,{size:14})}),b.jsx(le,{}),at.map((g,m)=>b.jsx(_,{active:l.headings[m]??!1,label:d[g],onClick:()=>n.chain().focus().toggleHeading({level:g}).run(),children:b.jsx(He,{children:`H${g}`})},g)),b.jsx(le,{}),b.jsx(_,{active:l.bulletList,label:r("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:b.jsx(bn,{size:14})}),b.jsx(_,{active:l.orderedList,label:r("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:b.jsx(He,{children:"1."})}),b.jsx(_,{active:l.blockquote,label:r("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:b.jsx(kn,{size:14})}),b.jsx(le,{}),b.jsx(Hn,{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=b.jsx("div",{ref:i,className:"relative z-20",children:f}),e[18]=f,e[19]=p):p=e[19],p}function On(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:at.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const Bn=10,Dn=25,Fn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function qn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??Fn[t.type]??""}function Wn(){const t=$.c(4),e=j(),{upload:n}=Tn(Pe),r=vn(Pe);let s;return t[0]!==r||t[1]!==e||t[2]!==n?(s={uploadFile:async a=>{const l=st(a),o=l?Bn:Dn;if(a.size>o*1024*1024)return ue.error(e("markdownEditor.fileTooLarge",{name:a.name,max:String(o)})),null;const u=l?An:Mn,c=`${crypto.randomUUID()}${qn(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 Ye("uploadSlots"),Un=ie.create({name:"uploadSlots",addProseMirrorPlugins(){return[new _t({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 Gn(t,e){return ee.getState(t)?.get(e)}function Zn(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((T,x,v,M)=>{p=v,g=M});let m;f.doc.nodesBetween(p,g,(T,x)=>{T===l&&(m=x+T.nodeSize)});let k=m??g;m!==void 0&&l.isInline&&(k+=1);const w=i.nodes.paragraph;m!==void 0&&l.isBlock&&w&&(f.doc.resolve(m).nodeAfter?.isTextblock||f.insert(m,w.create()),k=m+1);const y=Lt.near(f.doc.resolve(k));o&&f.setSelection(y),s&&he(f,s,y.to),t.dispatch(f)}function Vn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function Kn(t=!0){const e=j(),{uploadFile:n}=Wn(),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=st(g);Zn(h,Gn(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=Vn(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 ot(t){F=t}var O={exec:()=>null};function A(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 Qn=(()=>{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)}}>`)},Xn=/^(?:[ \t]*(?:\n|$))+/,Jn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Yn=/^ {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+|$)/,er=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,we=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,lt=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ct=A(lt).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(),tr=A(lt).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]+)*)/,nr=/^[^\n]+/,Te=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,rr=A(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Te).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),sr=A(/^(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]*?(?:-->|$))/,ir=A("^ {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(),ut=A(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(),ar=A(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ut).getRegex(),Ae={blockquote:ar,code:Jn,def:rr,fences:Yn,heading:er,hr:K,html:ir,lheading:ct,list:sr,newline:Xn,paragraph:ut,table:O,text:nr},je=A("^ *([^\\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(),or={...Ae,lheading:tr,table:je,paragraph:A(ye).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",je).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()},lr={...Ae,html:A(`^ *(?: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:A(ye).replace("hr",K).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",ct).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},cr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ur=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ht=/^( {2,}|\\)\n(?!\s*$)/,hr=/^(`+|[^`])(?:(?= {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,dr=A(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,oe).getRegex(),dt=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,fr=/(?:[^\s\p{P}\p{S}]|~)/u,gr=A(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Qn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pt=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,mr=A(pt,"u").replace(/punct/g,W).getRegex(),kr=A(pt,"u").replace(/punct/g,dt).getRegex(),ft="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xr=A(ft,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),br=A(ft,"gu").replace(/notPunctSpace/g,fr).replace(/punctSpace/g,pr).replace(/punct/g,dt).getRegex(),wr=A("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),yr=A(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,W).getRegex(),Tr="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",vr=A(Tr,"gu").replace(/notPunctSpace/g,Me).replace(/punctSpace/g,oe).replace(/punct/g,W).getRegex(),Ar=A(/\\(punct)/,"gu").replace(/punct/g,W).getRegex(),Mr=A(/^<(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(),Sr=A(ve).replace("(?:-->|$)","-->").getRegex(),Cr=A("^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",Sr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),te=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Rr=A(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",te).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),gt=A(/^!?\[(label)\]\[(ref)\]/).replace("label",te).replace("ref",Te).getRegex(),mt=A(/^!?\[(ref)\](?:\[\])?/).replace("ref",Te).getRegex(),Er=A("reflink|nolink(?!\\()","g").replace("reflink",gt).replace("nolink",mt).getRegex(),Ne=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Se={_backpedal:O,anyPunctuation:Ar,autolink:Mr,blockSkip:gr,br:ht,code:ur,del:O,delLDelim:O,delRDelim:O,emStrongLDelim:mr,emStrongRDelimAst:xr,emStrongRDelimUnd:wr,escape:cr,link:Rr,nolink:mt,punctuation:dr,reflink:gt,reflinkSearch:Er,tag:Cr,text:hr,url:O},$r={...Se,link:A(/^!?\[(label)\]\((.*?)\)/).replace("label",te).getRegex(),reflink:A(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",te).getRegex()},de={...Se,emStrongRDelimAst:br,emStrongLDelim:kr,delLDelim:yr,delRDelim:vr,url:A(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Ne).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:A(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Ne).getRegex()},_r={...de,br:A(ht).replace("{2,}","*").getRegex(),text:A(de.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Ae,gfm:or,pedantic:lr},U={normal:Se,gfm:de,breaks:_r,pedantic:$r},Lr={"&":"&","<":"<",">":">",'"':""","'":"'"},Oe=t=>Lr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,Oe)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,Oe);return t}function Be(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function De(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 Ir(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 zr(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 Fe(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 Pr(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 L,a4 as A,aX as re,l as O,j as l,M as ae,r as B,b as $,t as z,h as H,w as U,x as V,v as X,D as Y,d as Q,C as G,aY as ne,B as W}from"./index-D6lKvaoF.js";import{n as oe}from"./ArrowUp-BUXNFn6K.js";import{d as ie,b as Z,f as ce,u as de,T as me,A as ue,j as fe,k as pe,c as xe,m as ge,n as he,p as be,L as je}from"./chat-context-CFRPrQEn.js";import{s as ye,g as J,d as ve}from"./tool-namespace-D6LarB3P.js";import{b as F,T as we,a as Ne,c as Ce}from"./tooltip-LAilTl9w.js";import{d as Se,b as Te,a as Pe,D as ke}from"./drawer-CiMnESz2.js";import{C as Ee}from"./collection-search-CfEbdS6s.js";import{u as De}from"./use-mobile-BwQy16Q6.js";import{u as Me}from"./use-mcp-client-DwqRqgyq.js";import{u as _e,g as Ie}from"./use-mcp-prompts-l19k-bhU.js";import{c as Le,P as Be}from"./usage-stats-C7wY64zK.js";import{T as Oe,c as Re,b as $e,d as Ae,H as Fe}from"./input-BjDpMhiP.js";import{u as ze,a as He,S as Ge,M as q}from"./pair-DAGOA-DW.js";import{a as qe}from"./use-panel-navigate-BECpOul-.js";import{u as Ke}from"./thread-intent-B7fQ4X9a.js";import{N as Ue}from"./index-Cdp3CJ7S.js";import{i as Ve}from"./LinkBroken01-C-j1r45F.js";import{e as ee}from"./agent-icon-D8I51g86.js";import{e as Xe}from"./use-decopilot-events-C6bScbXe.js";import{u as Ye}from"./use-deco-credits-3I0Gmtle.js";import{F as Qe}from"./feature-paywall-DSpW8aNd.js";import{i as We}from"./AlertCircle-COvusPgV.js";const K=3,te="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",Ze="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function se(t){const e=L.c(46),{item:r,onSelect:a,isLoading:s,isDisabled:n,variant:d}=t,o=d===void 0?"pill":d,{prompt:i}=r;let m;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const P=J(i._meta);m=i.title??ve(i.name,P),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=m}else m=e[3];const c=m,f=i.description||null;if(o==="card"){let P;e[4]!==a||e[5]!==i?(P=()=>a(i),e[4]=a,e[5]=i,e[6]=P):P=e[6];const M=n||s,_=s&&"bg-accent/40",k=(n||s)&&"cursor-not-allowed opacity-50";let E;e[7]!==_||e[8]!==k?(E=O(Ze,"hover:bg-accent text-foreground",_,k),e[7]=_,e[8]=k,e[9]=E):E=e[9];let x;e[10]!==c?(x=l.jsx("span",{className:"font-medium truncate capitalize",children:c}),e[10]=c,e[11]=x):x=e[11];let w;e[12]!==s?(w=s&&l.jsx(H,{size:"xs"}),e[12]=s,e[13]=w):w=e[13];let p;e[14]!==x||e[15]!==w?(p=l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[x,w]}),e[14]=x,e[15]=w,e[16]=p):p=e[16];let D;e[17]!==f?(D=f&&l.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=D):D=e[18];let I;return e[19]!==p||e[20]!==D||e[21]!==P||e[22]!==M||e[23]!==E?(I=l.jsxs("button",{type:"button",onClick:P,disabled:M,className:E,children:[p,D]}),e[19]=p,e[20]=D,e[21]=P,e[22]=M,e[23]=E,e[24]=I):I=e[24],I}let u;e[25]!==a||e[26]!==i?(u=()=>a(i),e[25]=a,e[26]=i,e[27]=u):u=e[27];const v=n||s,b=s&&"bg-muted/50",N=(n||s)&&"cursor-not-allowed opacity-50";let g;e[28]!==b||e[29]!==N?(g=O(te,"hover:bg-accent hover:text-foreground",b,N),e[28]=b,e[29]=N,e[30]=g):g=e[30];let j;e[31]!==c?(j=l.jsx("span",{className:"capitalize",children:c}),e[31]=c,e[32]=j):j=e[32];let C;e[33]!==s?(C=s&&l.jsx(H,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let y;e[35]!==u||e[36]!==v||e[37]!==g||e[38]!==j||e[39]!==C?(y=l.jsx(we,{asChild:!0,children:l.jsxs("button",{type:"button",onClick:u,disabled:v,className:g,children:[j,C]})}),e[35]=u,e[36]=v,e[37]=g,e[38]=j,e[39]=C,e[40]=y):y=e[40];const S=f??c;let h;e[41]!==S?(h=l.jsx(Ne,{side:"top",className:"max-w-xs",children:l.jsx("p",{className:"text-xs",children:S})}),e[41]=S,e[42]=h):h=e[42];let T;return e[43]!==y||e[44]!==h?(T=l.jsxs(Ce,{delayDuration:400,children:[y,h]}),e[43]=y,e[44]=h,e[45]=T):T=e[45],T}function Je(t){const e=L.c(61),{items:r,open:a,onOpenChange:s,onSelect:n,loadingPrompt:d}=t,o=$(),[i,m]=B.useState(""),c=!!d;let f;e[0]!==r||e[1]!==i?(f=i.trim()?r.filter(x=>{const w=i.toLowerCase();return x.prompt.name.toLowerCase().includes(w)||(x.prompt.title??"").toLowerCase().includes(w)||(x.prompt.description??"").toLowerCase().includes(w)}):r,e[0]=r,e[1]=i,e[2]=f):f=e[2];const u=f,v=De();let b;e[3]!==u.length||e[4]!==i||e[5]!==o?(b=u.length===0&&l.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:o("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=u.length,e[4]=i,e[5]=o,e[6]=b):b=e[6];let N;if(e[7]!==u||e[8]!==c||e[9]!==d?.name||e[10]!==s||e[11]!==n){let x;e[13]!==c||e[14]!==d?.name||e[15]!==s||e[16]!==n?(x=w=>l.jsx(se,{item:w,variant:"card",onSelect:p=>{s(!1),n(p)},isLoading:d?.name===w.prompt.name,isDisabled:c&&d?.name!==w.prompt.name},w.prompt.name),e[13]=c,e[14]=d?.name,e[15]=s,e[16]=n,e[17]=x):x=e[17],N=u.map(x),e[7]=u,e[8]=c,e[9]=d?.name,e[10]=s,e[11]=n,e[12]=N}else N=e[12];let g;e[18]!==b||e[19]!==N?(g=l.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[b,N]})}),e[18]=b,e[19]=N,e[20]=g):g=e[20];const j=g;let C;e[21]!==o?(C=o("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=o,e[22]=C):C=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=x=>{x.key==="Escape"&&m("")},e[23]=y):y=e[23];let S;e[24]!==i||e[25]!==C?(S=l.jsx(Ee,{value:i,onChange:m,placeholder:C,onKeyDown:y}),e[24]=i,e[25]=C,e[26]=S):S=e[26];const h=S;if(v){let x;e[27]!==o?(x=o("chat.iceBreakers.allPromptsTitle"),e[27]=o,e[28]=x):x=e[28];let w;e[29]!==x?(w=l.jsx(Se,{className:"sr-only",children:l.jsx(Te,{children:x})}),e[29]=x,e[30]=w):w=e[30];let p;e[31]!==o?(p=o("chat.iceBreakers.promptsLabel"),e[31]=o,e[32]=p):p=e[32];let D;e[33]!==p?(D=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:p})}),e[33]=p,e[34]=D):D=e[34];let I;e[35]!==j||e[36]!==h||e[37]!==D||e[38]!==w?(I=l.jsxs(Pe,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[w,D,h,j]}),e[35]=j,e[36]=h,e[37]=D,e[38]=w,e[39]=I):I=e[39];let R;return e[40]!==s||e[41]!==a||e[42]!==I?(R=l.jsx(F,{delayDuration:400,children:l.jsx(ke,{open:a,onOpenChange:s,children:I})}),e[40]=s,e[41]=a,e[42]=I,e[43]=R):R=e[43],R}let T;e[44]!==o?(T=o("chat.iceBreakers.allPromptsTitle"),e[44]=o,e[45]=T):T=e[45];let P;e[46]!==T?(P=l.jsx(U,{className:"sr-only",children:l.jsx(V,{children:T})}),e[46]=T,e[47]=P):P=e[47];let M;e[48]!==o?(M=o("chat.iceBreakers.promptsLabel"),e[48]=o,e[49]=M):M=e[49];let _;e[50]!==M?(_=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=_):_=e[51];let k;e[52]!==j||e[53]!==h||e[54]!==_||e[55]!==P?(k=l.jsxs(X,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[P,_,h,j]}),e[52]=j,e[53]=h,e[54]=_,e[55]=P,e[56]=k):k=e[56];let E;return e[57]!==s||e[58]!==a||e[59]!==k?(E=l.jsx(F,{delayDuration:400,children:l.jsx(Y,{open:a,onOpenChange:s,children:k})}),e[57]=s,e[58]=a,e[59]=k,e[60]=E):E=e[60],E}function et(t){const e=L.c(30),{items:r,onSelect:a,loadingPrompt:s,className:n}=t,d=$(),[o,i]=B.useState(!1);if(r.length===0)return null;let m,c,f,u,v;if(e[0]!==n||e[1]!==r||e[2]!==s||e[3]!==a||e[4]!==d){const j=r.slice(0,K),C=r.slice(K),y=!!s;let S;e[10]!==y||e[11]!==s?.name||e[12]!==a?(S=T=>l.jsx(se,{item:T,onSelect:a,isLoading:s?.name===T.prompt.name,isDisabled:y&&s?.name!==T.prompt.name},T.prompt.name),e[10]=y,e[11]=s?.name,e[12]=a,e[13]=S):S=e[13];const h=j.map(S);m=F,v=400,e[14]!==n?(c=O("w-full flex flex-wrap gap-2 justify-center",n),e[14]=n,e[15]=c):c=e[15],f=h,u=C.length>0&&l.jsx("button",{type:"button",disabled:y,onClick:()=>i(!0),className:O(te,"hover:bg-accent hover:text-foreground",y&&"opacity-50 cursor-not-allowed"),children:d("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=n,e[1]=r,e[2]=s,e[3]=a,e[4]=d,e[5]=m,e[6]=c,e[7]=f,e[8]=u,e[9]=v}else m=e[5],c=e[6],f=e[7],u=e[8],v=e[9];let b;e[16]!==c||e[17]!==f||e[18]!==u?(b=l.jsxs("div",{className:c,children:[f,u]}),e[16]=c,e[17]=f,e[18]=u,e[19]=b):b=e[19];let N;e[20]!==r||e[21]!==s||e[22]!==o||e[23]!==a?(N=l.jsx(Je,{items:r,open:o,onOpenChange:i,onSelect:a,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=o,e[23]=a,e[24]=N):N=e[24];let g;return e[25]!==m||e[26]!==v||e[27]!==b||e[28]!==N?(g=l.jsxs(m,{delayDuration:v,children:[b,N]}),e[25]=m,e[26]=v,e[27]=b,e[28]=N,e[29]=g):g=e[29],g}function tt(){return null}function st(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function lt(t){const e=L.c(31),{connectionId:r}=t,a=$(),{sendMessage:s}=Z(),{org:n}=A();let d;e[0]!==r||e[1]!==n.id||e[2]!==n.slug?(d={connectionId:r,orgId:n.id,orgSlug:n.slug},e[0]=r,e[1]=n.id,e[2]=n.slug,e[3]=d):d=e[3];const o=Me(d);let i;e[4]!==o?(i={client:o,staleTime:6e4},e[4]=o,e[5]=i):i=e[5];const{data:m}=_e(i);let c;e[6]!==m?.prompts?(c=m?.prompts??[],e[6]=m?.prompts,e[7]=c):c=e[7];const f=c;let u;e[8]!==f?(u=f.map(rt),e[8]=f,e[9]=u):u=e[9];const v=u;let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b={stage:"idle"},e[10]=b):b=e[10];const[N,g]=B.useReducer(st,b),[j,C]=B.useState(null);let y;e[11]!==o||e[12]!==s||e[13]!==a?(y=async(p,D)=>{if(!o){z.error(a("chat.iceBreakers.mcpClientNotAvailable")),g({type:"RESET"});return}try{const I=await Ie(o,p.name,D);g({type:"RESET"});const R={type:"doc",content:[{type:"paragraph",content:[Le({id:p.name,name:ye(p.name,J(p._meta)),metadata:I.messages,char:"/",kind:"prompt",args:D}),{type:"text",text:" "}]}]};await s(R)}catch(I){console.error("[ice-breakers] Failed to fetch prompt:",I),z.error(a("chat.iceBreakers.failedToLoadPrompt")),g({type:"RESET"})}},e[11]=o,e[12]=s,e[13]=a,e[14]=y):y=e[14];const S=y;let h;e[15]!==S?(h=async p=>{if(p.arguments&&p.arguments.length>0){g({type:"SELECT_PROMPT",prompt:p}),C(p);return}g({type:"START_LOADING",prompt:p}),await S(p)},e[15]=S,e[16]=h):h=e[16];const T=h;let P;e[17]!==j||e[18]!==S?(P=async p=>{j&&(g({type:"START_LOADING",prompt:j,arguments:p}),C(null),await S(j,p))},e[17]=j,e[18]=S,e[19]=P):P=e[19];const M=P;if(v.length===0)return null;const _=N.stage==="loading"?N.prompt:null;let k;e[20]!==T||e[21]!==v||e[22]!==_?(k=l.jsx(et,{items:v,onSelect:T,loadingPrompt:_}),e[20]=T,e[21]=v,e[22]=_,e[23]=k):k=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{C(null),g({type:"RESET"})},e[24]=E):E=e[24];let x;e[25]!==j||e[26]!==M?(x=l.jsx(Be,{prompt:j,setPrompt:E,onSubmit:M}),e[25]=j,e[26]=M,e[27]=x):x=e[27];let w;return e[28]!==k||e[29]!==x?(w=l.jsxs(l.Fragment,{children:[k,x]}),e[28]=k,e[29]=x,e[30]=w):w=e[30],w}function rt(t){return{prompt:t}}function at(t){const e=L.c(13),{className:r}=t,{selectedVirtualMcp:a}=ie(),{org:s}=A();let n;e[0]!==s.id?(n=re(s.id),e[0]=s.id,e[1]=n):n=e[1];const d=n.id,o=a?.id??d;let i;e[2]!==r?(i=O("w-full @container",r),e[2]=r,e[3]=i):i=e[3];const m=o??"default";let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(tt,{}),e[4]=c):c=e[4];let f;e[5]!==o?(f=l.jsx(lt,{connectionId:o}),e[5]=o,e[6]=f):f=e[6];let u;e[7]!==m||e[8]!==f?(u=l.jsx(ae,{fallback:null,children:l.jsx(B.Suspense,{fallback:c,children:f},m)}),e[7]=m,e[8]=f,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=l.jsx("div",{className:i,children:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}function nt(t){let e=0;for(const r of t)for(const a of r.parts??[]){const s=a;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function ot(){const t=L.c(8),{openPanel:e}=qe(),r=Ke(),a=ce()?.messages??[],s=de()?.taskId??null;let n;t[0]!==a?(n=nt(a),t[0]=a,t[1]=n):n=t[1];const d=n,o=B.useRef(null),i=B.useRef(null);let m,c;t[2]!==d||t[3]!==r||t[4]!==e||t[5]!==s?(m=()=>{if(!d||!s)return;const f=`${s}:${d}`;i.current!==f&&(i.current=f,r?.refreshThreadMetadata(s)),o.current!==s&&(o.current=s,e("site-editor"))},c=[d,s,e,r],t[2]=d,t[3]=r,t[4]=e,t[5]=s,t[6]=m,t[7]=c):(m=t[6],c=t[7]),B.useEffect(m,c)}function le(t){return`deco-credits-empty-dismissed:${t}`}function Ft(t){try{return localStorage.getItem(le(t))==="1"}catch{return!1}}function it(){const t=L.c(56),e=$(),{org:r}=A(),a=Xe("credits"),s=Q(),{decoKeyId:n}=Ye(),[d,o]=B.useState(!0);let i;t[0]!==r.id?(i=()=>{G("credits_empty_state_dismissed",{organization_id:r.id}),o(!1);try{localStorage.setItem(le(r.id),"1")}catch{}},t[0]=r.id,t[1]=i):i=t[1];const m=i;let c,f;if(t[2]!==d||t[3]!==r.id?(c=()=>{d&&G("credits_empty_state_shown",{organization_id:r.id})},f=[d,r.id],t[2]=d,t[3]=r.id,t[4]=c,t[5]=f):(c=t[4],f=t[5]),B.useEffect(c,f),!d)return null;if(!a){let p;t[6]!==e?(p=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=p):p=t[7];let D;t[8]!==p?(D={title:p},t[8]=p,t[9]=D):D=t[9];let I;return t[10]!==m||t[11]!==D?(I=l.jsx(Qe,{feature:"chat",copy:D,onDismiss:m}),t[10]=m,t[11]=D,t[12]=I):I=t[12],I}let u;t[13]!==m?(u=p=>!p&&m(),t[13]=m,t[14]=u):u=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=v):v=t[15];let b;t[16]===Symbol.for("react.memo_cache_sentinel")?(b=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(ee,{size:20,className:"text-warning"})}),t[16]=b):b=t[16];let N;t[17]!==e?(N=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=N):N=t[18];let g;t[19]!==N?(g=l.jsx(V,{className:"text-lg font-semibold",children:N}),t[19]=N,t[20]=g):g=t[20];let j;t[21]!==e?(j=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=j):j=t[22];let C;t[23]!==j?(C=l.jsx(ne,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:j}),t[23]=j,t[24]=C):C=t[24];let y;t[25]!==g||t[26]!==C?(y=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[v,l.jsxs(U,{className:"relative gap-3",children:[b,l.jsxs("div",{className:"text-center",children:[g,C]})]})]}),t[25]=g,t[26]=C,t[27]=y):y=t[27];let S;t[28]!==n||t[29]!==m?(S=n&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(Oe,{source:"empty_state",onDone:m})}),t[28]=n,t[29]=m,t[30]=S):S=t[30];let h;t[31]!==m||t[32]!==s||t[33]!==r.slug?(h=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),m()},t[31]=m,t[32]=s,t[33]=r.slug,t[34]=h):h=t[34];let T;t[35]!==e?(T=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=T):T=t[36];let P;t[37]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx(Ve,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=P):P=t[37];let M;t[38]!==h||t[39]!==T?(M=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:h,children:[T,P]}),t[38]=h,t[39]=T,t[40]=M):M=t[40];let _;t[41]!==e?(_=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=_):_=t[42];let k;t[43]!==m||t[44]!==_?(k=l.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:m,children:_}),t[43]=m,t[44]=_,t[45]=k):k=t[45];let E;t[46]!==M||t[47]!==k?(E=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,k]}),t[46]=M,t[47]=k,t[48]=E):E=t[48];let x;t[49]!==y||t[50]!==S||t[51]!==E?(x=l.jsxs(X,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ct,children:[y,S,E]}),t[49]=y,t[50]=S,t[51]=E,t[52]=x):x=t[52];let w;return t[53]!==x||t[54]!==u?(w=l.jsx(Y,{open:!0,onOpenChange:u,children:x}),t[53]=x,t[54]=u,t[55]=w):w=t[55],w}function ct(t){return t.preventDefault()}function dt(t){const e=L.c(6),{balanceDollars:r}=t;let a;e[0]!==r?(a=r.toFixed(2),e[0]=r,e[1]=a):a=e[1];const s=a;let n,d;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=O("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),d=l.jsx(ee,{size:13,className:"text-success"}),e[2]=n,e[3]=d):(n=e[2],d=e[3]);let o;return e[4]!==s?(o=l.jsxs("div",{className:n,children:[d,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=o):o=e[5],o}function mt(){const t=L.c(8),{org:e}=A(),r=Q();let a;t[0]!==r||t[1]!==e.slug?(a=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=a):a=t[2];let s,n,d;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=O("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),n=l.jsx(We,{size:13,className:"text-warning"}),d=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=n,t[5]=d):(s=t[3],n=t[4],d=t[5]);let o;return t[6]!==a?(o=l.jsxs("button",{type:"button",onClick:a,className:s,children:[n,d]}),t[6]=a,t[7]=o):o=t[7],o}function ut(t){const e=L.c(7),{scrollRef:r,sentinelRef:a,hasMoreOlder:s,isFetchingOlder:n,fetchOlderMessages:d}=t;let o,i;e[0]!==d||e[1]!==s||e[2]!==n||e[3]!==r||e[4]!==a?(o=()=>{const m=a.current,c=r.current;if(!m||!c||!s)return;const f=new IntersectionObserver(async u=>{if(!u[0]?.isIntersecting||n||!s)return;const b=c.scrollHeight,N=c.scrollTop;await d(),requestAnimationFrame(()=>{const g=c.scrollHeight;c.scrollTop=N+(g-b)})},{root:c,rootMargin:"200px 0px 0px 0px"});return f.observe(m),()=>f.disconnect()},i=[r,a,s,n,d],e[0]=d,e[1]=s,e[2]=n,e[3]=r,e[4]=a,e[5]=o,e[6]=i):(o=e[5],i=e[6]),B.useEffect(o,i)}function ft(t){const e=L.c(5),{className:r,children:a}=t;let s;e[0]!==r?(s=O("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let n;return e[2]!==a||e[3]!==s?(n=l.jsx("div",{className:s,children:a}),e[2]=a,e[3]=s,e[4]=n):n=e[4],n}function pt(t){const e=L.c(5),{children:r,className:a}=t;let s;e[0]!==a?(s=O("flex-1 min-h-0 overflow-y-auto isolate",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==r||e[3]!==s?(n=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=n):n=e[4],n}function xt(t){const e=L.c(2),{children:r}=t;let a;return e[0]!==r?(a=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=a):a=e[1],a}function gt(){const t=$(),{messages:e,status:r,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n,isRunInProgress:d}=Z(),{taskId:o}=xe();ot();const i=ge(o??""),m=he(i),c=m.size===0?e:e.filter(h=>!m.has(h.id)),f=be(c,r==="submitted"||r==="streaming"||d),u=f.visible,v=ze(u),b=v.at(-1),g=Ae()*Fe+16,j=B.useRef(null),C=B.useRef(null);ut({scrollRef:j,sentinelRef:C,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n});const y=He({initial:!1}),S=h=>{j.current=h,y.scrollRef(h)};return l.jsx(je.Provider,{value:f,children:l.jsx(Ge,{messages:e,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:g},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),v.slice(0,-1).map((h,T)=>l.jsx(q,{pair:h,isLastPair:!1,status:T===v.length-1?r:void 0},`pair-${h.user?.id??h.assistant?.id}`))]}),b&&l.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:l.jsx(q,{pair:b,isLastPair:!0,status:r},`pair-${b.user?.id??b.assistant?.id}`)})]})}),!y.isAtBottom&&l.jsx(W,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:g+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(oe,{size:14})})]})})})}function ht(t){const e=L.c(5),{children:r,className:a}=t;let s;e[0]!==a?(s=O("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==r||e[3]!==s?(n=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=n):n=e[4],n}const zt=Object.assign(ft,{Main:pt,Messages:gt,EmptyState:xt,Footer:ht,Input:$e,Provider:pe,StreamHost:fe,ActiveTaskStreamSource:ue,ThreadlessStreamSource:me,IceBreakers:at,NoAiProviderEmptyState:Ue,CreditsEmptyState:it,CreditsEyebrow:dt,NoCreditsEyebrow:mt,CreditsExhaustedBanner:Re});export{zt as C,Ft as w};
|
|
1
|
+
import{c as L,a4 as A,aX as re,l as O,j as l,M as ae,r as B,b as $,t as z,h as H,w as U,x as V,v as X,D as Y,d as Q,C as G,aY as ne,B as W}from"./index-B0tOn0op.js";import{n as oe}from"./ArrowUp-C33jPuMc.js";import{d as ie,b as Z,f as ce,u as de,T as me,A as ue,j as fe,k as pe,c as xe,m as ge,n as he,p as be,L as je}from"./chat-context-CS6VicT4.js";import{s as ye,g as J,d as ve}from"./tool-namespace-Ca_f3ged.js";import{b as F,T as we,a as Ne,c as Ce}from"./tooltip-CgglVi9W.js";import{d as Se,b as Te,a as Pe,D as ke}from"./drawer-H8aSAwJp.js";import{C as Ee}from"./collection-search-D1wDrhDt.js";import{u as De}from"./use-mobile-D1VdMSzS.js";import{u as Me}from"./use-mcp-client-DJpi4PM5.js";import{u as _e,g as Ie}from"./use-mcp-prompts-wOk1Vinz.js";import{c as Le,P as Be}from"./usage-stats-DK8XMQvR.js";import{T as Oe,c as Re,b as $e,d as Ae,H as Fe}from"./input-CMV7rkdx.js";import{u as ze,a as He,S as Ge,M as q}from"./pair-BS_IW-xJ.js";import{a as qe}from"./use-panel-navigate-Bgyt5CHg.js";import{u as Ke}from"./thread-intent-Ckrry8zY.js";import{N as Ue}from"./index-CEFh9jFo.js";import{i as Ve}from"./LinkBroken01-DJ9tk8Nb.js";import{e as ee}from"./agent-icon-Bss_DO5K.js";import{e as Xe}from"./use-decopilot-events-PGYGrQrr.js";import{u as Ye}from"./use-deco-credits-BbBcoaKj.js";import{F as Qe}from"./feature-paywall-BuJHEFXn.js";import{i as We}from"./AlertCircle-BOP0_W_U.js";const K=3,te="inline-flex items-center gap-2 px-5 py-2.5 rounded-full bg-muted text-muted-foreground text-sm font-medium transition-colors cursor-pointer",Ze="flex flex-col gap-1.5 p-4 rounded-xl bg-accent/40 text-sm leading-snug transition-colors cursor-pointer text-left";function se(t){const e=L.c(46),{item:r,onSelect:a,isLoading:s,isDisabled:n,variant:d}=t,o=d===void 0?"pill":d,{prompt:i}=r;let m;if(e[0]!==i._meta||e[1]!==i.name||e[2]!==i.title){const P=J(i._meta);m=i.title??ve(i.name,P),e[0]=i._meta,e[1]=i.name,e[2]=i.title,e[3]=m}else m=e[3];const c=m,f=i.description||null;if(o==="card"){let P;e[4]!==a||e[5]!==i?(P=()=>a(i),e[4]=a,e[5]=i,e[6]=P):P=e[6];const M=n||s,_=s&&"bg-accent/40",k=(n||s)&&"cursor-not-allowed opacity-50";let E;e[7]!==_||e[8]!==k?(E=O(Ze,"hover:bg-accent text-foreground",_,k),e[7]=_,e[8]=k,e[9]=E):E=e[9];let x;e[10]!==c?(x=l.jsx("span",{className:"font-medium truncate capitalize",children:c}),e[10]=c,e[11]=x):x=e[11];let w;e[12]!==s?(w=s&&l.jsx(H,{size:"xs"}),e[12]=s,e[13]=w):w=e[13];let p;e[14]!==x||e[15]!==w?(p=l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[x,w]}),e[14]=x,e[15]=w,e[16]=p):p=e[16];let D;e[17]!==f?(D=f&&l.jsx("span",{className:"text-xs text-muted-foreground line-clamp-2",children:f}),e[17]=f,e[18]=D):D=e[18];let I;return e[19]!==p||e[20]!==D||e[21]!==P||e[22]!==M||e[23]!==E?(I=l.jsxs("button",{type:"button",onClick:P,disabled:M,className:E,children:[p,D]}),e[19]=p,e[20]=D,e[21]=P,e[22]=M,e[23]=E,e[24]=I):I=e[24],I}let u;e[25]!==a||e[26]!==i?(u=()=>a(i),e[25]=a,e[26]=i,e[27]=u):u=e[27];const v=n||s,b=s&&"bg-muted/50",N=(n||s)&&"cursor-not-allowed opacity-50";let g;e[28]!==b||e[29]!==N?(g=O(te,"hover:bg-accent hover:text-foreground",b,N),e[28]=b,e[29]=N,e[30]=g):g=e[30];let j;e[31]!==c?(j=l.jsx("span",{className:"capitalize",children:c}),e[31]=c,e[32]=j):j=e[32];let C;e[33]!==s?(C=s&&l.jsx(H,{size:"xs"}),e[33]=s,e[34]=C):C=e[34];let y;e[35]!==u||e[36]!==v||e[37]!==g||e[38]!==j||e[39]!==C?(y=l.jsx(we,{asChild:!0,children:l.jsxs("button",{type:"button",onClick:u,disabled:v,className:g,children:[j,C]})}),e[35]=u,e[36]=v,e[37]=g,e[38]=j,e[39]=C,e[40]=y):y=e[40];const S=f??c;let h;e[41]!==S?(h=l.jsx(Ne,{side:"top",className:"max-w-xs",children:l.jsx("p",{className:"text-xs",children:S})}),e[41]=S,e[42]=h):h=e[42];let T;return e[43]!==y||e[44]!==h?(T=l.jsxs(Ce,{delayDuration:400,children:[y,h]}),e[43]=y,e[44]=h,e[45]=T):T=e[45],T}function Je(t){const e=L.c(61),{items:r,open:a,onOpenChange:s,onSelect:n,loadingPrompt:d}=t,o=$(),[i,m]=B.useState(""),c=!!d;let f;e[0]!==r||e[1]!==i?(f=i.trim()?r.filter(x=>{const w=i.toLowerCase();return x.prompt.name.toLowerCase().includes(w)||(x.prompt.title??"").toLowerCase().includes(w)||(x.prompt.description??"").toLowerCase().includes(w)}):r,e[0]=r,e[1]=i,e[2]=f):f=e[2];const u=f,v=De();let b;e[3]!==u.length||e[4]!==i||e[5]!==o?(b=u.length===0&&l.jsx("p",{className:"col-span-4 text-sm text-muted-foreground text-center py-8",children:o("chat.iceBreakers.noPromptsMatch",{search:i})}),e[3]=u.length,e[4]=i,e[5]=o,e[6]=b):b=e[6];let N;if(e[7]!==u||e[8]!==c||e[9]!==d?.name||e[10]!==s||e[11]!==n){let x;e[13]!==c||e[14]!==d?.name||e[15]!==s||e[16]!==n?(x=w=>l.jsx(se,{item:w,variant:"card",onSelect:p=>{s(!1),n(p)},isLoading:d?.name===w.prompt.name,isDisabled:c&&d?.name!==w.prompt.name},w.prompt.name),e[13]=c,e[14]=d?.name,e[15]=s,e[16]=n,e[17]=x):x=e[17],N=u.map(x),e[7]=u,e[8]=c,e[9]=d?.name,e[10]=s,e[11]=n,e[12]=N}else N=e[12];let g;e[18]!==b||e[19]!==N?(g=l.jsx("div",{className:"flex-1 overflow-y-auto [scrollbar-gutter:stable]",children:l.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3 p-5",children:[b,N]})}),e[18]=b,e[19]=N,e[20]=g):g=e[20];const j=g;let C;e[21]!==o?(C=o("chat.iceBreakers.searchPromptsPlaceholder"),e[21]=o,e[22]=C):C=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=x=>{x.key==="Escape"&&m("")},e[23]=y):y=e[23];let S;e[24]!==i||e[25]!==C?(S=l.jsx(Ee,{value:i,onChange:m,placeholder:C,onKeyDown:y}),e[24]=i,e[25]=C,e[26]=S):S=e[26];const h=S;if(v){let x;e[27]!==o?(x=o("chat.iceBreakers.allPromptsTitle"),e[27]=o,e[28]=x):x=e[28];let w;e[29]!==x?(w=l.jsx(Se,{className:"sr-only",children:l.jsx(Te,{children:x})}),e[29]=x,e[30]=w):w=e[30];let p;e[31]!==o?(p=o("chat.iceBreakers.promptsLabel"),e[31]=o,e[32]=p):p=e[32];let D;e[33]!==p?(D=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:p})}),e[33]=p,e[34]=D):D=e[34];let I;e[35]!==j||e[36]!==h||e[37]!==D||e[38]!==w?(I=l.jsxs(Pe,{className:"h-[85vh] flex flex-col p-0 gap-0",children:[w,D,h,j]}),e[35]=j,e[36]=h,e[37]=D,e[38]=w,e[39]=I):I=e[39];let R;return e[40]!==s||e[41]!==a||e[42]!==I?(R=l.jsx(F,{delayDuration:400,children:l.jsx(ke,{open:a,onOpenChange:s,children:I})}),e[40]=s,e[41]=a,e[42]=I,e[43]=R):R=e[43],R}let T;e[44]!==o?(T=o("chat.iceBreakers.allPromptsTitle"),e[44]=o,e[45]=T):T=e[45];let P;e[46]!==T?(P=l.jsx(U,{className:"sr-only",children:l.jsx(V,{children:T})}),e[46]=T,e[47]=P):P=e[47];let M;e[48]!==o?(M=o("chat.iceBreakers.promptsLabel"),e[48]=o,e[49]=M):M=e[49];let _;e[50]!==M?(_=l.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 shrink-0",children:l.jsx("span",{className:"text-sm font-medium text-foreground",children:M})}),e[50]=M,e[51]=_):_=e[51];let k;e[52]!==j||e[53]!==h||e[54]!==_||e[55]!==P?(k=l.jsxs(X,{className:"sm:max-w-[1100px] h-[680px] p-0 gap-0 overflow-hidden flex flex-col",children:[P,_,h,j]}),e[52]=j,e[53]=h,e[54]=_,e[55]=P,e[56]=k):k=e[56];let E;return e[57]!==s||e[58]!==a||e[59]!==k?(E=l.jsx(F,{delayDuration:400,children:l.jsx(Y,{open:a,onOpenChange:s,children:k})}),e[57]=s,e[58]=a,e[59]=k,e[60]=E):E=e[60],E}function et(t){const e=L.c(30),{items:r,onSelect:a,loadingPrompt:s,className:n}=t,d=$(),[o,i]=B.useState(!1);if(r.length===0)return null;let m,c,f,u,v;if(e[0]!==n||e[1]!==r||e[2]!==s||e[3]!==a||e[4]!==d){const j=r.slice(0,K),C=r.slice(K),y=!!s;let S;e[10]!==y||e[11]!==s?.name||e[12]!==a?(S=T=>l.jsx(se,{item:T,onSelect:a,isLoading:s?.name===T.prompt.name,isDisabled:y&&s?.name!==T.prompt.name},T.prompt.name),e[10]=y,e[11]=s?.name,e[12]=a,e[13]=S):S=e[13];const h=j.map(S);m=F,v=400,e[14]!==n?(c=O("w-full flex flex-wrap gap-2 justify-center",n),e[14]=n,e[15]=c):c=e[15],f=h,u=C.length>0&&l.jsx("button",{type:"button",disabled:y,onClick:()=>i(!0),className:O(te,"hover:bg-accent hover:text-foreground",y&&"opacity-50 cursor-not-allowed"),children:d("chat.iceBreakers.moreButton",{count:C.length})}),e[0]=n,e[1]=r,e[2]=s,e[3]=a,e[4]=d,e[5]=m,e[6]=c,e[7]=f,e[8]=u,e[9]=v}else m=e[5],c=e[6],f=e[7],u=e[8],v=e[9];let b;e[16]!==c||e[17]!==f||e[18]!==u?(b=l.jsxs("div",{className:c,children:[f,u]}),e[16]=c,e[17]=f,e[18]=u,e[19]=b):b=e[19];let N;e[20]!==r||e[21]!==s||e[22]!==o||e[23]!==a?(N=l.jsx(Je,{items:r,open:o,onOpenChange:i,onSelect:a,loadingPrompt:s}),e[20]=r,e[21]=s,e[22]=o,e[23]=a,e[24]=N):N=e[24];let g;return e[25]!==m||e[26]!==v||e[27]!==b||e[28]!==N?(g=l.jsxs(m,{delayDuration:v,children:[b,N]}),e[25]=m,e[26]=v,e[27]=b,e[28]=N,e[29]=g):g=e[29],g}function tt(){return null}function st(t,e){switch(e.type){case"SELECT_PROMPT":return!e.prompt.arguments||e.prompt.arguments.length===0?{stage:"loading",prompt:e.prompt}:{stage:"idle"};case"START_LOADING":return{stage:"loading",prompt:e.prompt,arguments:e.arguments};case"RESET":return{stage:"idle"};default:return t}}function lt(t){const e=L.c(31),{connectionId:r}=t,a=$(),{sendMessage:s}=Z(),{org:n}=A();let d;e[0]!==r||e[1]!==n.id||e[2]!==n.slug?(d={connectionId:r,orgId:n.id,orgSlug:n.slug},e[0]=r,e[1]=n.id,e[2]=n.slug,e[3]=d):d=e[3];const o=Me(d);let i;e[4]!==o?(i={client:o,staleTime:6e4},e[4]=o,e[5]=i):i=e[5];const{data:m}=_e(i);let c;e[6]!==m?.prompts?(c=m?.prompts??[],e[6]=m?.prompts,e[7]=c):c=e[7];const f=c;let u;e[8]!==f?(u=f.map(rt),e[8]=f,e[9]=u):u=e[9];const v=u;let b;e[10]===Symbol.for("react.memo_cache_sentinel")?(b={stage:"idle"},e[10]=b):b=e[10];const[N,g]=B.useReducer(st,b),[j,C]=B.useState(null);let y;e[11]!==o||e[12]!==s||e[13]!==a?(y=async(p,D)=>{if(!o){z.error(a("chat.iceBreakers.mcpClientNotAvailable")),g({type:"RESET"});return}try{const I=await Ie(o,p.name,D);g({type:"RESET"});const R={type:"doc",content:[{type:"paragraph",content:[Le({id:p.name,name:ye(p.name,J(p._meta)),metadata:I.messages,char:"/",kind:"prompt",args:D}),{type:"text",text:" "}]}]};await s(R)}catch(I){console.error("[ice-breakers] Failed to fetch prompt:",I),z.error(a("chat.iceBreakers.failedToLoadPrompt")),g({type:"RESET"})}},e[11]=o,e[12]=s,e[13]=a,e[14]=y):y=e[14];const S=y;let h;e[15]!==S?(h=async p=>{if(p.arguments&&p.arguments.length>0){g({type:"SELECT_PROMPT",prompt:p}),C(p);return}g({type:"START_LOADING",prompt:p}),await S(p)},e[15]=S,e[16]=h):h=e[16];const T=h;let P;e[17]!==j||e[18]!==S?(P=async p=>{j&&(g({type:"START_LOADING",prompt:j,arguments:p}),C(null),await S(j,p))},e[17]=j,e[18]=S,e[19]=P):P=e[19];const M=P;if(v.length===0)return null;const _=N.stage==="loading"?N.prompt:null;let k;e[20]!==T||e[21]!==v||e[22]!==_?(k=l.jsx(et,{items:v,onSelect:T,loadingPrompt:_}),e[20]=T,e[21]=v,e[22]=_,e[23]=k):k=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{C(null),g({type:"RESET"})},e[24]=E):E=e[24];let x;e[25]!==j||e[26]!==M?(x=l.jsx(Be,{prompt:j,setPrompt:E,onSubmit:M}),e[25]=j,e[26]=M,e[27]=x):x=e[27];let w;return e[28]!==k||e[29]!==x?(w=l.jsxs(l.Fragment,{children:[k,x]}),e[28]=k,e[29]=x,e[30]=w):w=e[30],w}function rt(t){return{prompt:t}}function at(t){const e=L.c(13),{className:r}=t,{selectedVirtualMcp:a}=ie(),{org:s}=A();let n;e[0]!==s.id?(n=re(s.id),e[0]=s.id,e[1]=n):n=e[1];const d=n.id,o=a?.id??d;let i;e[2]!==r?(i=O("w-full @container",r),e[2]=r,e[3]=i):i=e[3];const m=o??"default";let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(tt,{}),e[4]=c):c=e[4];let f;e[5]!==o?(f=l.jsx(lt,{connectionId:o}),e[5]=o,e[6]=f):f=e[6];let u;e[7]!==m||e[8]!==f?(u=l.jsx(ae,{fallback:null,children:l.jsx(B.Suspense,{fallback:c,children:f},m)}),e[7]=m,e[8]=f,e[9]=u):u=e[9];let v;return e[10]!==i||e[11]!==u?(v=l.jsx("div",{className:i,children:u}),e[10]=i,e[11]=u,e[12]=v):v=e[12],v}function nt(t){let e=0;for(const r of t)for(const a of r.parts??[]){const s=a;s.type==="tool-load_repo"&&s.state==="output-available"&&s.output?.success===!0&&e++}return e}function ot(){const t=L.c(8),{openPanel:e}=qe(),r=Ke(),a=ce()?.messages??[],s=de()?.taskId??null;let n;t[0]!==a?(n=nt(a),t[0]=a,t[1]=n):n=t[1];const d=n,o=B.useRef(null),i=B.useRef(null);let m,c;t[2]!==d||t[3]!==r||t[4]!==e||t[5]!==s?(m=()=>{if(!d||!s)return;const f=`${s}:${d}`;i.current!==f&&(i.current=f,r?.refreshThreadMetadata(s)),o.current!==s&&(o.current=s,e("site-editor"))},c=[d,s,e,r],t[2]=d,t[3]=r,t[4]=e,t[5]=s,t[6]=m,t[7]=c):(m=t[6],c=t[7]),B.useEffect(m,c)}function le(t){return`deco-credits-empty-dismissed:${t}`}function Ft(t){try{return localStorage.getItem(le(t))==="1"}catch{return!1}}function it(){const t=L.c(56),e=$(),{org:r}=A(),a=Xe("credits"),s=Q(),{decoKeyId:n}=Ye(),[d,o]=B.useState(!0);let i;t[0]!==r.id?(i=()=>{G("credits_empty_state_dismissed",{organization_id:r.id}),o(!1);try{localStorage.setItem(le(r.id),"1")}catch{}},t[0]=r.id,t[1]=i):i=t[1];const m=i;let c,f;if(t[2]!==d||t[3]!==r.id?(c=()=>{d&&G("credits_empty_state_shown",{organization_id:r.id})},f=[d,r.id],t[2]=d,t[3]=r.id,t[4]=c,t[5]=f):(c=t[4],f=t[5]),B.useEffect(c,f),!d)return null;if(!a){let p;t[6]!==e?(p=e("chat.input.allowanceExhaustedTitle"),t[6]=e,t[7]=p):p=t[7];let D;t[8]!==p?(D={title:p},t[8]=p,t[9]=D):D=t[9];let I;return t[10]!==m||t[11]!==D?(I=l.jsx(Qe,{feature:"chat",copy:D,onDismiss:m}),t[10]=m,t[11]=D,t[12]=I):I=t[12],I}let u;t[13]!==m?(u=p=>!p&&m(),t[13]=m,t[14]=u):u=t[14];let v;t[15]===Symbol.for("react.memo_cache_sentinel")?(v=l.jsx("div",{className:"absolute inset-x-0 top-0 h-24 bg-gradient-to-b from-warning/8 to-transparent pointer-events-none rounded-t-lg"}),t[15]=v):v=t[15];let b;t[16]===Symbol.for("react.memo_cache_sentinel")?(b=l.jsx("div",{className:"flex items-center justify-center size-11 rounded-full bg-warning/10 border border-warning/20 mx-auto",children:l.jsx(ee,{size:20,className:"text-warning"})}),t[16]=b):b=t[16];let N;t[17]!==e?(N=e("chat.creditsEmptyState.title"),t[17]=e,t[18]=N):N=t[18];let g;t[19]!==N?(g=l.jsx(V,{className:"text-lg font-semibold",children:N}),t[19]=N,t[20]=g):g=t[20];let j;t[21]!==e?(j=e("chat.creditsEmptyState.description"),t[21]=e,t[22]=j):j=t[22];let C;t[23]!==j?(C=l.jsx(ne,{className:"mt-2 text-sm leading-relaxed max-w-[320px] mx-auto",children:j}),t[23]=j,t[24]=C):C=t[24];let y;t[25]!==g||t[26]!==C?(y=l.jsxs("div",{className:"relative px-6 pt-7 pb-5",children:[v,l.jsxs(U,{className:"relative gap-3",children:[b,l.jsxs("div",{className:"text-center",children:[g,C]})]})]}),t[25]=g,t[26]=C,t[27]=y):y=t[27];let S;t[28]!==n||t[29]!==m?(S=n&&l.jsx("div",{className:"px-6 pb-5",children:l.jsx(Oe,{source:"empty_state",onDone:m})}),t[28]=n,t[29]=m,t[30]=S):S=t[30];let h;t[31]!==m||t[32]!==s||t[33]!==r.slug?(h=()=>{s({to:"/$org/settings/ai-providers",params:{org:r.slug}}),m()},t[31]=m,t[32]=s,t[33]=r.slug,t[34]=h):h=t[34];let T;t[35]!==e?(T=e("chat.creditsEmptyState.useYourOwnProvider"),t[35]=e,t[36]=T):T=t[36];let P;t[37]===Symbol.for("react.memo_cache_sentinel")?(P=l.jsx(Ve,{size:12,className:"transition-transform duration-150 group-hover:translate-x-0.5"}),t[37]=P):P=t[37];let M;t[38]!==h||t[39]!==T?(M=l.jsxs("button",{type:"button",className:"group flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:h,children:[T,P]}),t[38]=h,t[39]=T,t[40]=M):M=t[40];let _;t[41]!==e?(_=e("chat.creditsEmptyState.skipForNow"),t[41]=e,t[42]=_):_=t[42];let k;t[43]!==m||t[44]!==_?(k=l.jsx(W,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:m,children:_}),t[43]=m,t[44]=_,t[45]=k):k=t[45];let E;t[46]!==M||t[47]!==k?(E=l.jsxs("div",{className:"px-6 py-3.5 border-t border-border bg-muted/30 flex items-center justify-between",children:[M,k]}),t[46]=M,t[47]=k,t[48]=E):E=t[48];let x;t[49]!==y||t[50]!==S||t[51]!==E?(x=l.jsxs(X,{className:"sm:max-w-[500px] gap-0 p-0 overflow-hidden",onOpenAutoFocus:ct,children:[y,S,E]}),t[49]=y,t[50]=S,t[51]=E,t[52]=x):x=t[52];let w;return t[53]!==x||t[54]!==u?(w=l.jsx(Y,{open:!0,onOpenChange:u,children:x}),t[53]=x,t[54]=u,t[55]=w):w=t[55],w}function ct(t){return t.preventDefault()}function dt(t){const e=L.c(6),{balanceDollars:r}=t;let a;e[0]!==r?(a=r.toFixed(2),e[0]=r,e[1]=a):a=e[1];const s=a;let n,d;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=O("inline-flex items-center gap-1.5 px-3 py-1 rounded-full","bg-success/10 border border-success/20","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),d=l.jsx(ee,{size:13,className:"text-success"}),e[2]=n,e[3]=d):(n=e[2],d=e[3]);let o;return e[4]!==s?(o=l.jsxs("div",{className:n,children:[d,l.jsxs("span",{className:"text-xs font-medium text-success tabular-nums",children:["$",s," in credits to get started"]})]}),e[4]=s,e[5]=o):o=e[5],o}function mt(){const t=L.c(8),{org:e}=A(),r=Q();let a;t[0]!==r||t[1]!==e.slug?(a=()=>r({to:"/$org/settings/ai-providers",params:{org:e.slug}}),t[0]=r,t[1]=e.slug,t[2]=a):a=t[2];let s,n,d;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=O("inline-flex items-center gap-1.5 px-3 py-1 rounded-lg cursor-pointer","bg-warning/10 border border-warning/20","hover:bg-warning/15","transition-colors duration-150","animate-in fade-in-0 slide-in-from-bottom-2 duration-300"),n=l.jsx(We,{size:13,className:"text-warning"}),d=l.jsx("span",{className:"text-xs font-medium text-warning",children:"No credits remaining · Add more"}),t[3]=s,t[4]=n,t[5]=d):(s=t[3],n=t[4],d=t[5]);let o;return t[6]!==a?(o=l.jsxs("button",{type:"button",onClick:a,className:s,children:[n,d]}),t[6]=a,t[7]=o):o=t[7],o}function ut(t){const e=L.c(7),{scrollRef:r,sentinelRef:a,hasMoreOlder:s,isFetchingOlder:n,fetchOlderMessages:d}=t;let o,i;e[0]!==d||e[1]!==s||e[2]!==n||e[3]!==r||e[4]!==a?(o=()=>{const m=a.current,c=r.current;if(!m||!c||!s)return;const f=new IntersectionObserver(async u=>{if(!u[0]?.isIntersecting||n||!s)return;const b=c.scrollHeight,N=c.scrollTop;await d(),requestAnimationFrame(()=>{const g=c.scrollHeight;c.scrollTop=N+(g-b)})},{root:c,rootMargin:"200px 0px 0px 0px"});return f.observe(m),()=>f.disconnect()},i=[r,a,s,n,d],e[0]=d,e[1]=s,e[2]=n,e[3]=r,e[4]=a,e[5]=o,e[6]=i):(o=e[5],i=e[6]),B.useEffect(o,i)}function ft(t){const e=L.c(5),{className:r,children:a}=t;let s;e[0]!==r?(s=O("flex flex-col h-full w-full bg-background transform-[translateZ(0)]",r),e[0]=r,e[1]=s):s=e[1];let n;return e[2]!==a||e[3]!==s?(n=l.jsx("div",{className:s,children:a}),e[2]=a,e[3]=s,e[4]=n):n=e[4],n}function pt(t){const e=L.c(5),{children:r,className:a}=t;let s;e[0]!==a?(s=O("flex-1 min-h-0 overflow-y-auto isolate",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==r||e[3]!==s?(n=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=n):n=e[4],n}function xt(t){const e=L.c(2),{children:r}=t;let a;return e[0]!==r?(a=l.jsx("div",{className:"min-h-full shrink-0 w-full flex items-center justify-center max-w-2xl mx-auto py-10",children:r}),e[0]=r,e[1]=a):a=e[1],a}function gt(){const t=$(),{messages:e,status:r,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n,isRunInProgress:d}=Z(),{taskId:o}=xe();ot();const i=ge(o??""),m=he(i),c=m.size===0?e:e.filter(h=>!m.has(h.id)),f=be(c,r==="submitted"||r==="streaming"||d),u=f.visible,v=ze(u),b=v.at(-1),g=Ae()*Fe+16,j=B.useRef(null),C=B.useRef(null);ut({scrollRef:j,sentinelRef:C,hasMoreOlder:a,isFetchingOlder:s,fetchOlderMessages:n});const y=He({initial:!1}),S=h=>{j.current=h,y.scrollRef(h)};return l.jsx(je.Provider,{value:f,children:l.jsx(Ge,{messages:e,children:l.jsxs("div",{className:"relative h-full w-full min-w-0",children:[l.jsx("div",{ref:S,"data-chat-scroller":!0,className:"w-full min-w-0 max-w-full overflow-y-auto h-full [container-type:size]",style:{paddingBottom:g},children:l.jsxs("div",{ref:y.contentRef,className:"overflow-x-clip",children:[l.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[l.jsx("div",{ref:C,"aria-hidden":!0,className:"h-px"}),s&&l.jsx("div",{className:"flex items-center justify-center py-3 text-xs text-muted-foreground",children:t("chat.chat.loadingOlderMessages")}),v.slice(0,-1).map((h,T)=>l.jsx(q,{pair:h,isLastPair:!1,status:T===v.length-1?r:void 0},`pair-${h.user?.id??h.assistant?.id}`))]}),b&&l.jsx("div",{className:"min-h-[100cqh] min-w-0 max-w-2xl mx-auto w-full",children:l.jsx(q,{pair:b,isLastPair:!0,status:r},`pair-${b.user?.id??b.assistant?.id}`)})]})}),!y.isAtBottom&&l.jsx(W,{type:"button",variant:"outline",size:"icon-sm","aria-label":t("chat.chat.jumpToLatest"),className:"absolute left-1/2 z-50 -translate-x-1/2 shadow-soft animate-in fade-in duration-200 dark:bg-background dark:hover:bg-accent",style:{bottom:g+8},onClick:()=>{y.scrollToBottom()},children:l.jsx(oe,{size:14})})]})})})}function ht(t){const e=L.c(5),{children:r,className:a}=t;let s;e[0]!==a?(s=O("flex-none w-full mx-auto p-2 pt-0","max-w-2xl min-w-0",a),e[0]=a,e[1]=s):s=e[1];let n;return e[2]!==r||e[3]!==s?(n=l.jsx("div",{className:s,children:r}),e[2]=r,e[3]=s,e[4]=n):n=e[4],n}const zt=Object.assign(ft,{Main:pt,Messages:gt,EmptyState:xt,Footer:ht,Input:$e,Provider:pe,StreamHost:fe,ActiveTaskStreamSource:ue,ThreadlessStreamSource:me,IceBreakers:at,NoAiProviderEmptyState:Ue,CreditsEmptyState:it,CreditsEyebrow:dt,NoCreditsEyebrow:mt,CreditsExhaustedBanner:Re});export{zt as C,Ft as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,cv as ce,j as p,cB as _,cA as B,cy as C,cF as le,cu as de,cR as ue,cN as fe,cG as me}from"./index-
|
|
1
|
+
import{r as l,cv as ce,j as p,cB as _,cA as B,cy as C,cF as le,cu as de,cR as ue,cN as fe,cG as me}from"./index-B0tOn0op.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],G=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],X={"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,T]=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 F=_e(c),N=Ce(Math.round((b-n)/c)*c+n,F),I=Y(N,[n,s]);K((E=[])=>{const P=be(E,I,y);if(Ee(P,u*c)){f.current=P.indexOf(I);const U=String(P)!==String(E);return U&&k&&d(P),U?P:E}else return E})}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 N=$.includes(b.key)||b.shiftKey&&G.includes(b.key)?10:1,I=f.current,E=S[I],P=c*N*y;A(E+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 D(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=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=X[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=X[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=T(M,o);return p.jsx(B.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(G).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=T(ee,o);return p.jsx(B.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var H="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=T(H,o),c=Q(H,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(B.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=H;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=T(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),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(B.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(B.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 De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(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,Be=ne,Te=oe;export{Be as R,Ie as T,Ae as a,Te as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as H,j as i,o as Ge,b as U,r as q,B as Ne,a as be,t as de,J as Xe,ax as ye,az as _e,l as Y,m as qe,K as Ye,ah as Je,a4 as Le,d as Ue,aH as Ve,k as Qe,G as Ze,L as ke,_ as et,C as je,ad as Pe,P as tt}from"./index-D6lKvaoF.js";import{u as Ce,c as De,i as st,j as nt,k as it,l as rt}from"./use-sidebar-collapsed-CQxN5Dgl.js";import{S as ot,a as lt,b as at}from"./sheet-BXLIoGMZ.js";import{u as ct}from"./use-mobile-BwQy16Q6.js";import{u as dt,a as ut,D as ft,c as ht,C as mt,P as gt}from"./core.esm-n2M8kvjD.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-DEhQR8uW.js";import{i as jt}from"./Tool01-D6wuoLhW.js";import{D as yt,A as vt,E as Ae,F as St}from"./agent-icon-D8I51g86.js";import{s as wt}from"./Plus-CZXpdtEH.js";import{s as Me}from"./XClose-Bl8OQypT.js";import{T as he,a as me,c as ge}from"./tooltip-LAilTl9w.js";import{C as ze,f as zt,g as Ot,e as _t}from"./context-menu-DJBtOK1b.js";import{C as Ct}from"./create-organization-dialog-CQRec3jk.js";import{P as Rt}from"./project-apps-B0ovyypF.js";import{u as Nt,a as At}from"./use-recent-apps-ujQcGW4R.js";import{b as Et}from"./use-navigate-to-agent-BK5-GF4Q.js";import{u as Tt,a as It}from"./use-project-scope-DQZacSdf.js";import{i as Lt}from"./UserSquare-Dy6q7vGw.js";import{C as Ee,e as kt,b as Pt,c as Dt,f as Mt}from"./command-yWHdaNhz.js";import{u as $t}from"./use-debounced-value-DLa-riOh.js";const Kt={xs:"xs",sm:"xs",lg:"md"};function Re(t){const e=H.c(4),{org:s,size:o}=t,r=o===void 0?"sm":o,l=s.logo??void 0,n=Kt[r];let a;return e[0]!==s.name||e[1]!==l||e[2]!==n?(a=i.jsx(Ge,{url:l,fallback:s.name,size:n,tone:"solid"}),e[0]=s.name,e[1]=l,e[2]=n,e[3]=a):a=e[3],a}function Bs({invitation:t,onChanged:e}){const s=U(),[o,r]=q.useState(!1),l=t.organizationName??s("header.orgSwitcher.unknownOrganization"),n=async()=>{r(!0);try{const d=await be.organization.acceptInvitation({invitationId:t.id});if(d.error){de.error(d.error.message),r(!1);return}}catch{de.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}de.success(s("header.orgSwitcher.joined",{name:l})),Xe();let c;try{c=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{r(!0);try{const c=await be.organization.rejectInvitation({invitationId:t.id});if(c.error){de.error(c.error.message),r(!1);return}de.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{de.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!1)}};return i.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[i.jsx(Re,{org:{name:l},size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:l}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i.jsx(Ne,{size:"sm",variant:"default",onClick:n,disabled:o,children:s("header.orgSwitcher.accept")}),i.jsx(Ne,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:l}),children:i.jsx(Me,{size:14})})]})]})}const Wt=3,$e=10,Ft=440,Bt=55;function Ke(t){const e=Math.floor((t-Ft)/Bt);return Math.min($e,Math.max(Wt,e))}function Ht(t,e,s=$e*3,o=[]){return[...new Set([e,...o,...t])].slice(0,s)}function Gt(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Xt(t,e,s,o,r=[]){if(t.length<=o)return{shown:[...t],hidden:[]};const l=new Map(t.map(a=>[a.slug,a])),n=new Set;s&&l.has(s)&&n.add(s);for(const a of r)l.has(a)&&n.add(a);for(const a of e){if(n.size>=o)break;l.has(a)&&n.add(a)}for(const a of t){if(n.size>=o)break;n.add(a.slug)}return{shown:t.filter(a=>n.has(a.slug)),hidden:t.filter(a=>!n.has(a.slug))}}const Te=[];function qt(){const t=H.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_e.recentOrgs(),t[0]=e):e=t[0];const[s,o]=ye(e,Te),r=Array.isArray(s)?s:Te;let l;t[1]!==o?(l=(a,c)=>o(d=>Ht(Array.isArray(d)?d:[],a,void 0,c)),t[1]=o,t[2]=l):l=t[2];let n;return t[3]!==r||t[4]!==l?(n={recent:r,remember:l},t[3]=r,t[4]=l,t[5]=n):n=t[5],n}const We={hidden:[],pinned:[],order:[]},fe=(t,e)=>t.filter(s=>s!==e);function ue(t){if(typeof t!="object"||t===null)return We;const e=o=>Array.isArray(o)?o.filter(r=>typeof r=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Yt(t,e){return{...t,hidden:[...fe(t.hidden,e),e],pinned:fe(t.pinned,e)}}function Jt(t,e){return{...t,hidden:fe(t.hidden,e)}}function Ut(t,e){return t.pinned.includes(e)?{...t,pinned:fe(t.pinned,e)}:{...t,hidden:fe(t.hidden,e),pinned:[...t.pinned,e]}}function Vt(t,e,s){const o=r=>{const l=e.order.indexOf(r);return l===-1?Number.MAX_SAFE_INTEGER:l};return t.filter(r=>r.slug===s||!e.hidden.includes(r.slug)).map((r,l)=>({org:r,index:l})).sort((r,l)=>Number(e.pinned.includes(l.org.slug))-Number(e.pinned.includes(r.org.slug))||o(r.org.slug)-o(l.org.slug)||r.index-l.index).map(({org:r})=>r)}function Qt(t,e,s,o){const r=e.indexOf(s),l=e.indexOf(o);if(r===-1||l===-1||r===l||t.pinned.includes(s)!==t.pinned.includes(o))return t;const n=[...e];return n.splice(r,1),n.splice(l,0,s),{...t,order:[...n,...t.order.filter(a=>!n.includes(a))]}}function ve(t){const e=H.c(11),{active:s,label:o,children:r}=t,l=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let n;e[0]!==l?(n=Y("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==n?(a=i.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:i.jsx("span",{className:n})}),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==o?(c=o&&i.jsx("span",{"aria-hidden":!0,className:Y("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:o}),e[4]=s,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==a||e[9]!==c?(d=i.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,r,c]}),e[7]=r,e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function Zt(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function es(t){const e=H.c(13),s=t.trim(),{data:o}=be.useSession(),r=o?.user?.id??"",l=s.length>0&&!!r,n=Ye.organizationSearch(r,s);let a;e[0]!==s?(a=async w=>{const{signal:O}=w,p=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:O});if(!p.ok)throw new Error(`Organization search failed: ${p.status}`);const y=await p.json();if(!Zt(y))throw new Error("Invalid organization search response");return y},e[0]=s,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==n||e[4]!==a?(c={queryKey:n,queryFn:a,enabled:l,placeholderData:Je,staleTime:3e4,retry:!1},e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5];const{data:d,isFetching:g,isPlaceholderData:m,isError:h}=qe(c);let f;e[6]!==d?.items?(f=d?.items??[],e[6]=d?.items,e[7]=f):f=e[7];const u=l&&g,x=l&&m;let j;return e[8]!==h||e[9]!==f||e[10]!==u||e[11]!==x?(j={hits:f,isSearching:u,isStale:x,isError:h},e[8]=h,e[9]=f,e[10]=u,e[11]=x,e[12]=j):j=e[12],j}function ts(t){const e=H.c(61),{orgs:s,currentSlug:o,hiddenCount:r,onSelect:l}=t,n=U(),[a,c]=q.useState(!1),[d,g]=q.useState("");let m;e[0]!==d?(m=d.trim(),e[0]=d,e[1]=m):m=e[1];const h=m,f=$t(h,150),u=h.length>0,x=f===h,{hits:j,isSearching:w,isStale:O,isError:p}=es(u?f:""),y=u?j:s;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=G=>{c(G),G||g("")},e[2]=v):v=e[2];const z=v;let b;e[3]!==n?(b=n("sidebar.rail.searchOrganizations"),e[3]=n,e[4]=b):b=e[4];let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=()=>z(!0),e[5]=A):A=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx(Lt,{size:18}),e[6]=I):I=e[6];let _;e[7]!==b?(_=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":b,onClick:A,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:I})}),e[7]=b,e[8]=_):_=e[8];let E;e[9]!==r||e[10]!==n?(E=r>0?n("sidebar.rail.searchMoreOrganizations",{count:r}):n("sidebar.rail.searchOrganizations"),e[9]=r,e[10]=n,e[11]=E):E=e[11];let C;e[12]!==E?(C=i.jsx(me,{side:"right",children:E}),e[12]=E,e[13]=C):C=e[13];let T;e[14]!==_||e[15]!==C?(T=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[_,C]})}),e[14]=_,e[15]=C,e[16]=T):T=e[16];let P;e[17]!==n?(P=n("sidebar.rail.searchOrganizations"),e[17]=n,e[18]=P):P=e[18];let S;e[19]!==n?(S=n("sidebar.rail.searchPlaceholder"),e[19]=n,e[20]=S):S=e[20];let R;e[21]!==n?(R=n("sidebar.rail.searchPlaceholder"),e[21]=n,e[22]=R):R=e[22];let M;e[23]!==d||e[24]!==R?(M=i.jsx(kt,{value:d,onValueChange:g,placeholder:R}),e[23]=d,e[24]=R,e[25]=M):M=e[25];const F=u&&(O||!x)&&"opacity-50";let K;e[26]!==F?(K=Y(F),e[26]=F,e[27]=K):K=e[27];let D;e[28]!==p||e[29]!==u||e[30]!==n?(D=u&&p&&i.jsx(Ee,{children:n("sidebar.rail.searchFailed")}),e[28]=p,e[29]=u,e[30]=n,e[31]=D):D=e[31];let $;e[32]!==p||e[33]!==w||e[34]!==y.length||e[35]!==x||e[36]!==n?($=!p&&x&&!w&&y.length===0&&i.jsx(Ee,{children:n("sidebar.rail.searchEmpty")}),e[32]=p,e[33]=w,e[34]=y.length,e[35]=x,e[36]=n,e[37]=$):$=e[37];let L;if(e[38]!==o||e[39]!==l||e[40]!==y||e[41]!==n){let G;e[43]!==o||e[44]!==l||e[45]!==n?(G=X=>i.jsxs(Pt,{value:X.slug,onSelect:()=>{z(!1),X.slug!==o&&l(X.slug)},className:"gap-2.5",children:[i.jsx(Re,{org:X,size:"sm"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:X.name}),X.slug===o&&i.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},X.id),e[43]=o,e[44]=l,e[45]=n,e[46]=G):G=e[46],L=y.map(G),e[38]=o,e[39]=l,e[40]=y,e[41]=n,e[42]=L}else L=e[42];let k;e[47]!==K||e[48]!==D||e[49]!==$||e[50]!==L?(k=i.jsxs(Dt,{className:K,children:[D,$,L]}),e[47]=K,e[48]=D,e[49]=$,e[50]=L,e[51]=k):k=e[51];let W;e[52]!==a||e[53]!==P||e[54]!==S||e[55]!==M||e[56]!==k?(W=i.jsxs(Mt,{open:a,onOpenChange:z,title:P,description:S,shouldFilter:!1,children:[M,k]}),e[52]=a,e[53]=P,e[54]=S,e[55]=M,e[56]=k,e[57]=W):W=e[57];let J;return e[58]!==W||e[59]!==T?(J=i.jsxs(i.Fragment,{children:[T,W]}),e[58]=W,e[59]=T,e[60]=J):J=e[60],J}function ss(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const ns=()=>Ke(globalThis.innerHeight),is=()=>Ke(0);function rs(t){const e=H.c(59),{org:s,active:o,onSelect:r,pinned:l,onOpenSettings:n,onTogglePin:a,onHide:c}=t,d=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:m,listeners:h,transform:f,transition:u,isDragging:x}=bt(g);let j;e[2]!==f?(j=mt.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=j):j=e[3];const w=x?1:void 0,O=`rail-org-${s.slug}`;let p;e[4]!==j||e[5]!==w||e[6]!==O||e[7]!==u?(p={transform:j,transition:u,zIndex:w,viewTransitionName:O},e[4]=j,e[5]=w,e[6]=O,e[7]=u,e[8]=p):p=e[8];const y=s.name,v=o||void 0,z=o?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",b=r&&"cursor-pointer";let A;e[9]!==z||e[10]!==b?(A=Y("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",z,b),e[9]=z,e[10]=b,e[11]=A):A=e[11];let I;e[12]!==s?(I=i.jsx(Re,{org:s,size:"lg"}),e[12]=s,e[13]=I):I=e[13];let _;e[14]!==l?(_=l&&i.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:i.jsx(Ae,{size:9})}),e[14]=l,e[15]=_):_=e[15];let E;e[16]!==r||e[17]!==s.name||e[18]!==A||e[19]!==I||e[20]!==_||e[21]!==v?(E=i.jsx(he,{asChild:!0,children:i.jsx(zt,{asChild:!0,children:i.jsxs("button",{type:"button","aria-label":y,"aria-current":v,onClick:r,className:A,children:[I,_]})})}),e[16]=r,e[17]=s.name,e[18]=A,e[19]=I,e[20]=_,e[21]=v,e[22]=E):E=e[22];let C;e[23]!==s.name?(C=i.jsx(me,{side:"right",children:s.name}),e[23]=s.name,e[24]=C):C=e[24];let T;e[25]!==E||e[26]!==C?(T=i.jsxs(ge,{children:[E,C]}),e[25]=E,e[26]=C,e[27]=T):T=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(St,{}),e[28]=P):P=e[28];let S;e[29]!==d?(S=d("sidebar.rail.organizationSettings"),e[29]=d,e[30]=S):S=e[30];let R;e[31]!==n||e[32]!==S?(R=i.jsxs(ze,{onSelect:n,children:[P,S]}),e[31]=n,e[32]=S,e[33]=R):R=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Ae,{}),e[34]=M):M=e[34];let F;e[35]!==l||e[36]!==d?(F=d(l?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=l,e[36]=d,e[37]=F):F=e[37];let K;e[38]!==a||e[39]!==F?(K=i.jsxs(ze,{onSelect:a,children:[M,F]}),e[38]=a,e[39]=F,e[40]=K):K=e[40];let D;e[41]!==c||e[42]!==d?(D=c&&i.jsxs(ze,{onSelect:c,children:[i.jsx(jt,{}),d("sidebar.rail.hideOrganization")]}),e[41]=c,e[42]=d,e[43]=D):D=e[43];let $;e[44]!==R||e[45]!==K||e[46]!==D?($=i.jsxs(Ot,{children:[R,K,D]}),e[44]=R,e[45]=K,e[46]=D,e[47]=$):$=e[47];let L;e[48]!==T||e[49]!==$?(L=i.jsxs(_t,{children:[T,$]}),e[48]=T,e[49]=$,e[50]=L):L=e[50];let k;e[51]!==o||e[52]!==L?(k=i.jsx(ve,{active:o,children:L}),e[51]=o,e[52]=L,e[53]=k):k=e[53];let W;return e[54]!==h||e[55]!==m||e[56]!==k||e[57]!==p?(W=i.jsx("div",{ref:m,...h,style:p,className:"w-full shrink-0 touch-none",children:k}),e[54]=h,e[55]=m,e[56]=k,e[57]=p,e[58]=W):W=e[58],W}function os(t){const e=H.c(64),{project:s,orgSlug:o,active:r,onClose:l,onNavigate:n}=t,a=U();let c,d,g,m,h,f,u,x,j,w,O;if(e[0]!==r||e[1]!==n||e[2]!==o||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const M=yt(s.icon,s.title);O="group/rail relative flex w-full flex-col items-center gap-1",g=ge,d=he,w=!0,c=ke,m=et.root,e[17]!==o||e[18]!==s.id?(h={org:o,agentId:s.id},e[17]=o,e[18]=s.id,e[19]=h):h=e[19],f=s.title,u=r||void 0,e[20]!==n?(x=()=>{je("org_rail_recent_project_opened"),n?.()},e[20]=n,e[21]=x):x=e[21],j=Y("flex shrink-0 rounded-lg focus-ring",M.text,r&&"ring-[1.5px] ring-current"),e[0]=r,e[1]=n,e[2]=o,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=c,e[7]=d,e[8]=g,e[9]=m,e[10]=h,e[11]=f,e[12]=u,e[13]=x,e[14]=j,e[15]=w,e[16]=O}else c=e[6],d=e[7],g=e[8],m=e[9],h=e[10],f=e[11],u=e[12],x=e[13],j=e[14],w=e[15],O=e[16];let p;e[22]!==s.icon||e[23]!==s.title?(p=i.jsx(vt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=p):p=e[24];let y;e[25]!==c||e[26]!==m||e[27]!==h||e[28]!==f||e[29]!==u||e[30]!==x||e[31]!==j||e[32]!==p?(y=i.jsx(c,{to:m,params:h,"aria-label":f,"aria-current":u,onClick:x,className:j,children:p}),e[25]=c,e[26]=m,e[27]=h,e[28]=f,e[29]=u,e[30]=x,e[31]=j,e[32]=p,e[33]=y):y=e[33];let v;e[34]!==d||e[35]!==y||e[36]!==w?(v=i.jsx(d,{asChild:w,children:y}),e[34]=d,e[35]=y,e[36]=w,e[37]=v):v=e[37];let z;e[38]!==s.title?(z=i.jsx(me,{side:"right",children:s.title}),e[38]=s.title,e[39]=z):z=e[39];let b;e[40]!==g||e[41]!==v||e[42]!==z?(b=i.jsxs(g,{children:[v,z]}),e[40]=g,e[41]=v,e[42]=z,e[43]=b):b=e[43];const A=r?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let I;e[44]!==A?(I=Y("line-clamp-2 w-full text-center text-2xs break-words transition-colors",A),e[44]=A,e[45]=I):I=e[45];let _;e[46]!==s.title||e[47]!==I?(_=i.jsx("span",{"aria-hidden":!0,className:I,children:s.title}),e[46]=s.title,e[47]=I,e[48]=_):_=e[48];let E;e[49]!==s.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=a,e[51]=E):E=e[51];let C;e[52]!==l?(C=()=>{je("org_rail_recent_project_closed"),l()},e[52]=l,e[53]=C):C=e[53];let T,P;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=Y("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"),P=i.jsx(Me,{size:10}),e[54]=T,e[55]=P):(T=e[54],P=e[55]);let S;e[56]!==E||e[57]!==C?(S=i.jsx("button",{type:"button","aria-label":E,onClick:C,className:T,children:P}),e[56]=E,e[57]=C,e[58]=S):S=e[58];let R;return e[59]!==b||e[60]!==_||e[61]!==S||e[62]!==O?(R=i.jsxs("div",{className:O,children:[b,_,S]}),e[59]=b,e[60]=_,e[61]=S,e[62]=O,e[63]=R):R=e[63],R}const ls={"site-editor":"/site-editor"};function as(t){const e=H.c(26),{app:s}=t,o=U(),r=Rt[s],l=ls[s];if(!r||!l)return null;let n;e[0]!==r.labelKey||e[1]!==o?(n=o(r.labelKey),e[0]=r.labelKey,e[1]=o,e[2]=n):n=e[2];let a;e[3]!==r.labelKey||e[4]!==o?(a=o(r.labelKey),e[3]=r.labelKey,e[4]=o,e[5]=a):a=e[5];let c;e[6]!==r.tone?(c=Y("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",r.tone),e[6]=r.tone,e[7]=c):c=e[7];let d;e[8]!==r.Icon?(d=i.jsx(r.Icon,{size:18}),e[8]=r.Icon,e[9]=d):d=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==l?(g=i.jsx(he,{asChild:!0,children:i.jsx(ke,{to:l,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:c,children:d})}),e[10]=a,e[11]=c,e[12]=d,e[13]=l,e[14]=g):g=e[14];let m;e[15]!==r.labelKey||e[16]!==o?(m=o(r.labelKey),e[15]=r.labelKey,e[16]=o,e[17]=m):m=e[17];let h;e[18]!==m?(h=i.jsx(me,{side:"right",children:m}),e[18]=m,e[19]=h):h=e[19];let f;e[20]!==g||e[21]!==h?(f=i.jsxs(ge,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=f):f=e[22];let u;return e[23]!==n||e[24]!==f?(u=i.jsx(ve,{active:!0,label:n,children:f}),e[23]=n,e[24]=f,e[25]=u):u=e[25],u}function cs(){const{org:t}=Le();return Nt(t.slug),null}function Fe(t){const e=H.c(56),{onNavigate:s}=t===void 0?{}:t,o=U(),r=Ue(),{org:l}=Le(),n=Ve();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:hs},e[0]=a):a=e[0];const c=Qe(a);let d;e[1]!==c||e[2]!==n?(d=c?n({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=c,e[2]=n,e[3]=d):d=e[3];const g=d,m=g?g.org:l.slug,{data:h}=Ze(),[f,u]=q.useState(!1),x=Ce(),{recent:j,forget:w}=Et(l.slug),{projects:O}=Tt(),p=It(),y=At(),v=y&&y.projectId===null?y.app:null,z=v?[]:j.flatMap(N=>O.filter(B=>B.id===N)),b=Gt(h??[],l),{recent:A,remember:I}=qt();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=_e.railOrgPrefs(),e[4]=_):_=e[4];const[E,C]=ye(_,We),T=ue(E),P=q.useSyncExternalStore(ss,ns,is),{shown:S}=Xt(Vt(b,T,l.slug),A,l.slug,P,T.pinned);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R={activationConstraint:{distance:8}},e[5]=R):R=e[5];const M=dt(ut(gt,R)),F=N=>{const{active:B,over:ce}=N;ce&&(je("org_rail_reordered"),C(He=>Qt(ue(He),S.map(fs),String(B.id),String(ce.id))))},K=N=>{s?.(),r({to:"/$org/home",params:{org:N},viewTransition:!0})},D=N=>{je("org_rail_travel");const B=S.some(ce=>ce.slug===N);C(ce=>Jt(ue(ce),N)),I(N,B?S.map(us):void 0),K(N)},$=!x&&"border-r border-sidebar-border";let L;e[6]!==$?(L=Y("flex w-[68px] shrink-0 flex-col items-center gap-2.5 overflow-y-auto bg-sidebar px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",$),e[6]=$,e[7]=L):L=e[7];let k;e[8]!==o?(k=o("sidebar.rail.ariaLabel"),e[8]=o,e[9]=k):k=e[9];const W=ft,J=ht,G=pt,X=S.map(ds),Se=xt,we=S.map(N=>i.jsxs(q.Fragment,{children:[i.jsx(rs,{org:N,active:N.slug===m,pinned:T.pinned.includes(N.slug),onSelect:N.slug!==l.slug?()=>D(N.slug):p?()=>K(N.slug):void 0,onOpenSettings:()=>{s?.(),r({to:"/$org/settings",params:{org:N.slug}})},onTogglePin:()=>C(B=>Ut(ue(B),N.slug)),onHide:N.slug===l.slug?void 0:()=>C(B=>Yt(ue(B),N.slug))}),N.slug===l.slug&&z.length>0&&i.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:z.map(B=>i.jsx(os,{project:B,orgSlug:l.slug,active:p===B.id,onClose:()=>w(B.id),onNavigate:s},B.id))})]},N.id));let V;e[10]!==G||e[11]!==X||e[12]!==Se||e[13]!==we?(V=i.jsx(G,{items:X,strategy:Se,children:we}),e[10]=G,e[11]=X,e[12]=Se,e[13]=we,e[14]=V):V=e[14];let Q;e[15]!==W||e[16]!==F||e[17]!==M||e[18]!==V||e[19]!==J?(Q=i.jsx(W,{sensors:M,collisionDetection:J,onDragEnd:F,children:V}),e[15]=W,e[16]=F,e[17]=M,e[18]=V,e[19]=J,e[20]=Q):Q=e[20];let Z;e[21]!==l.slug||e[22]!==b||e[23]!==S.length||e[24]!==D?(Z=b.length>S.length&&i.jsx(ts,{orgs:b,currentSlug:l.slug,hiddenCount:b.length-S.length,onSelect:D}),e[21]=l.slug,e[22]=b,e[23]=S.length,e[24]=D,e[25]=Z):Z=e[25];let ee;e[26]!==o?(ee=o("sidebar.picker.newOrganization"),e[26]=o,e[27]=ee):ee=e[27];let te;e[28]!==u?(te=()=>u(!0),e[28]=u,e[29]=te):te=e[29];let pe;e[30]===Symbol.for("react.memo_cache_sentinel")?(pe=i.jsx(wt,{size:18}),e[30]=pe):pe=e[30];let se;e[31]!==ee||e[32]!==te?(se=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":ee,onClick:te,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:pe})}),e[31]=ee,e[32]=te,e[33]=se):se=e[33];let ne;e[34]!==o?(ne=o("sidebar.picker.newOrganization"),e[34]=o,e[35]=ne):ne=e[35];let ie;e[36]!==ne?(ie=i.jsx(me,{side:"right",children:ne}),e[36]=ne,e[37]=ie):ie=e[37];let re;e[38]!==se||e[39]!==ie?(re=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=re):re=e[40];let oe;e[41]!==v?(oe=v&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),i.jsx(as,{app:v})]}),e[41]=v,e[42]=oe):oe=e[42];let le;e[43]!==Q||e[44]!==Z||e[45]!==re||e[46]!==oe||e[47]!==L||e[48]!==k?(le=i.jsxs("div",{className:L,"aria-label":k,children:[Q,Z,re,oe]}),e[43]=Q,e[44]=Z,e[45]=re,e[46]=oe,e[47]=L,e[48]=k,e[49]=le):le=e[49];let ae;e[50]!==f||e[51]!==u?(ae=i.jsx(Ct,{open:f,onOpenChange:u}),e[50]=f,e[51]=u,e[52]=ae):ae=e[52];let xe;return e[53]!==le||e[54]!==ae?(xe=i.jsxs(i.Fragment,{children:[le,ae]}),e[53]=le,e[54]=ae,e[55]=xe):xe=e[55],xe}function ds(t){return t.slug}function us(t){return t.slug}function fs(t){return t.slug}function hs(t){return t.isLoading}function ms(t){const e=H.c(15),{width:s,minWidth:o,maxWidth:r,onPointerDown:l,onKeyDown:n,onDoubleClick:a}=t,c=U(),{isMobile:d}=De(),g=Ce();if(d||g)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let h;e[2]!==c?(h=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=h):h=e[3];let f,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},u=i.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]=f,e[5]=u):(f=e[4],u=e[5]);let x;return e[6]!==r||e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==l||e[11]!==m||e[12]!==h||e[13]!==s?(x=i.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":o,"aria-valuemax":r,title:h,tabIndex:0,onPointerDown:l,onKeyDown:n,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:u}),e[6]=r,e[7]=o,e[8]=a,e[9]=n,e[10]=l,e[11]=m,e[12]=h,e[13]=s,e[14]=x):x=e[14],x}const Oe=400,Ie=16,gs="sidebar.width.v2";function ps(){const t=H.c(14),e=xs;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>typeof u=="number"?e(u):192,t[0]=s):s=t[0];const[o,r]=ye(gs,s),l=q.useRef(null);let n;t[1]!==r||t[2]!==o?(n=u=>{u.preventDefault();const x=u.clientX,j=e(o),w=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),O=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const v of O)v.style.transition="none";const p=v=>{const z=e(j+(v.clientX-x));w?.style.setProperty("--sidebar-width",`${z}px`)},y=v=>{const z=e(j+(v.clientX-x));r(z);for(const b of O)b.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=r,t[2]=o,t[3]=n):n=t[3];const a=n;let c;t[4]!==r?(c=()=>{r(192)},t[4]=r,t[5]=c):c=t[5];const d=c;let g;t[6]!==r||t[7]!==o?(g=u=>{if(u.key==="ArrowLeft")r(e(o-Ie));else if(u.key==="ArrowRight")r(e(o+Ie));else if(u.key==="Home")r(192);else if(u.key==="End")r(Oe);else return;u.preventDefault()},t[6]=r,t[7]=o,t[8]=g):g=t[8];const m=g,h=e(o);let f;return t[9]!==m||t[10]!==a||t[11]!==d||t[12]!==h?(f={width:h,minWidth:192,maxWidth:Oe,wrapperRef:l,onStartResize:a,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=a,t[11]=d,t[12]=h,t[13]=f):f=t[13],f}function xs(t){return Math.max(192,Math.min(Oe,t))}const Be=q.createContext(null);function bs(){const t=q.use(Be);if(!t)throw new Error("Layout regions require a Layout");return t}function js({children:t,notice:e,outsideOrg:s}){const o=ct(),[r,l]=ye(_e.sidebarOpen(),!0),n=ps(),a=Pe();return i.jsx(Be,{value:{isMobile:o,resize:n},children:i.jsx(st,{open:r,onOpenChange:l,children:i.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,i.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[a&&!s&&i.jsx(cs,{}),!o&&a&&(s?.rail??!0)&&i.jsx(Fe,{}),i.jsx(nt,{ref:n.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${n.width}px`,"--sidebar-width-icon":a?"0px":"3.125rem"},children:i.jsx(it,{children:t})})]})]})})})}function ys(t){const e=H.c(37),{children:s,renderMobile:o}=t,r=U(),{isMobile:l,resize:n}=bs(),{openMobile:a,setOpenMobile:c}=De(),d=Ce(),g=Pe();let m;e[0]!==c?(m=()=>c(!1),e[0]=c,e[1]=m):m=e[1];const h=m;if(!l){const v=g&&d;let z;e[2]!==s||e[3]!==v?(z=i.jsx("div",{className:"contents",inert:v,children:s}),e[2]=s,e[3]=v,e[4]=z):z=e[4];let b;e[5]!==n.maxWidth||e[6]!==n.minWidth||e[7]!==n.onKeyDownResize||e[8]!==n.onStartResize||e[9]!==n.resetWidth||e[10]!==n.width?(b=i.jsx(ms,{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,onPointerDown:n.onStartResize,onKeyDown:n.onKeyDownResize,onDoubleClick:n.resetWidth}),e[5]=n.maxWidth,e[6]=n.minWidth,e[7]=n.onKeyDownResize,e[8]=n.onStartResize,e[9]=n.resetWidth,e[10]=n.width,e[11]=b):b=e[11];let A;return e[12]!==z||e[13]!==b?(A=i.jsxs(i.Fragment,{children:[z,b]}),e[12]=z,e[13]=b,e[14]=A):A=e[14],A}let f;e[15]!==r?(f=r("layouts.shellControls.navigationTitle"),e[15]=r,e[16]=f):f=e[16];let u;e[17]!==f?(u=i.jsx(ot,{className:"sr-only",children:f}),e[17]=f,e[18]=u):u=e[18];let x;e[19]!==h||e[20]!==g?(x=g&&i.jsx(Fe,{onNavigate:h}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let j;e[22]!==h||e[23]!==o?(j=o({onClose:h}),e[22]=h,e[23]=o,e[24]=j):j=e[24];let w;e[25]!==j?(w=i.jsx("div",{className:"min-w-0 flex-1",children:j}),e[25]=j,e[26]=w):w=e[26];let O;e[27]!==x||e[28]!==w?(O=i.jsxs("div",{className:"flex h-full min-h-0",children:[x,w]}),e[27]=x,e[28]=w,e[29]=O):O=e[29];let p;e[30]!==u||e[31]!==O?(p=i.jsxs(lt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:vs,children:[u,O]}),e[30]=u,e[31]=O,e[32]=p):p=e[32];let y;return e[33]!==a||e[34]!==c||e[35]!==p?(y=i.jsx(at,{open:a,onOpenChange:c,children:p}),e[33]=a,e[34]=c,e[35]=p,e[36]=y):y=e[36],y}function vs(t){return t.preventDefault()}function Ss(t){const e=H.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={background:"transparent",containerType:"inline-size"},e[0]=o):o=e[0];let r;return e[1]!==s?(r=i.jsx(rt,{className:"flex flex-col min-h-0",style:o,children:i.jsx(tt,{variant:"plain",className:"bg-sidebar",children:i.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=r):r=e[2],r}const Hs=Object.assign(js,{Sidebar:ys,Content:Ss});export{Bs as I,Hs as L,Re as O,es as u,Gt as w};
|
|
1
|
+
import{c as H,j as i,o as Ge,b as U,r as q,B as Ne,a as be,t as de,J as Xe,ax as ye,az as _e,l as Y,m as qe,K as Ye,ah as Je,a4 as Le,d as Ue,aH as Ve,k as Qe,G as Ze,L as ke,_ as et,C as je,ad as Pe,P as tt}from"./index-B0tOn0op.js";import{u as Ce,c as De,i as st,j as nt,k as it,l as rt}from"./use-sidebar-collapsed-83oP_cPD.js";import{S as ot,a as lt,b as at}from"./sheet-BAxFoa2_.js";import{u as ct}from"./use-mobile-D1VdMSzS.js";import{u as dt,a as ut,D as ft,c as ht,C as mt,P as gt}from"./core.esm-Bd-SITM_.js";import{S as pt,v as xt,u as bt}from"./sortable.esm-CHgVwe8S.js";import{i as jt}from"./Tool01-DZn57NDu.js";import{D as yt,A as vt,E as Ae,F as St}from"./agent-icon-Bss_DO5K.js";import{s as wt}from"./Plus-DT_Y3SXq.js";import{s as Me}from"./XClose-BZ7_Ux4e.js";import{T as he,a as me,c as ge}from"./tooltip-CgglVi9W.js";import{C as ze,f as zt,g as Ot,e as _t}from"./context-menu-D_BKuwIH.js";import{C as Ct}from"./create-organization-dialog-B-QOCOL_.js";import{P as Rt}from"./project-apps-DgFIeSYf.js";import{u as Nt,a as At}from"./use-recent-apps-Ynx2etJA.js";import{b as Et}from"./use-navigate-to-agent-CCS7aqQS.js";import{u as Tt,a as It}from"./use-project-scope-CzfpwfYe.js";import{i as Lt}from"./UserSquare-lDfe1WCi.js";import{C as Ee,e as kt,b as Pt,c as Dt,f as Mt}from"./command-RRas5VNC.js";import{u as $t}from"./use-debounced-value-CthHwE3s.js";const Kt={xs:"xs",sm:"xs",lg:"md"};function Re(t){const e=H.c(4),{org:s,size:o}=t,r=o===void 0?"sm":o,l=s.logo??void 0,n=Kt[r];let a;return e[0]!==s.name||e[1]!==l||e[2]!==n?(a=i.jsx(Ge,{url:l,fallback:s.name,size:n,tone:"solid"}),e[0]=s.name,e[1]=l,e[2]=n,e[3]=a):a=e[3],a}function Bs({invitation:t,onChanged:e}){const s=U(),[o,r]=q.useState(!1),l=t.organizationName??s("header.orgSwitcher.unknownOrganization"),n=async()=>{r(!0);try{const d=await be.organization.acceptInvitation({invitationId:t.id});if(d.error){de.error(d.error.message),r(!1);return}}catch{de.error(s("header.orgSwitcher.failedToAcceptInvitation")),r(!1);return}de.success(s("header.orgSwitcher.joined",{name:l})),Xe();let c;try{c=(await be.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=c?`/${c}`:"/"},a=async()=>{r(!0);try{const c=await be.organization.rejectInvitation({invitationId:t.id});if(c.error){de.error(c.error.message),r(!1);return}de.success(s("header.orgSwitcher.invitationDeclined")),r(!1),e()}catch{de.error(s("header.orgSwitcher.failedToDeclineInvitation")),r(!1)}};return i.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[i.jsx(Re,{org:{name:l},size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate text-sm font-medium",children:l}),i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:s("header.orgSwitcher.invitedToJoin")})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[i.jsx(Ne,{size:"sm",variant:"default",onClick:n,disabled:o,children:s("header.orgSwitcher.accept")}),i.jsx(Ne,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground",onClick:a,disabled:o,"aria-label":s("header.orgSwitcher.declineInvitationTo",{name:l}),children:i.jsx(Me,{size:14})})]})]})}const Wt=3,$e=10,Ft=440,Bt=55;function Ke(t){const e=Math.floor((t-Ft)/Bt);return Math.min($e,Math.max(Wt,e))}function Ht(t,e,s=$e*3,o=[]){return[...new Set([e,...o,...t])].slice(0,s)}function Gt(t,e){return!e.id||t.some(s=>s.slug===e.slug)?[...t]:[...t,e]}function Xt(t,e,s,o,r=[]){if(t.length<=o)return{shown:[...t],hidden:[]};const l=new Map(t.map(a=>[a.slug,a])),n=new Set;s&&l.has(s)&&n.add(s);for(const a of r)l.has(a)&&n.add(a);for(const a of e){if(n.size>=o)break;l.has(a)&&n.add(a)}for(const a of t){if(n.size>=o)break;n.add(a.slug)}return{shown:t.filter(a=>n.has(a.slug)),hidden:t.filter(a=>!n.has(a.slug))}}const Te=[];function qt(){const t=H.c(6);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=_e.recentOrgs(),t[0]=e):e=t[0];const[s,o]=ye(e,Te),r=Array.isArray(s)?s:Te;let l;t[1]!==o?(l=(a,c)=>o(d=>Ht(Array.isArray(d)?d:[],a,void 0,c)),t[1]=o,t[2]=l):l=t[2];let n;return t[3]!==r||t[4]!==l?(n={recent:r,remember:l},t[3]=r,t[4]=l,t[5]=n):n=t[5],n}const We={hidden:[],pinned:[],order:[]},fe=(t,e)=>t.filter(s=>s!==e);function ue(t){if(typeof t!="object"||t===null)return We;const e=o=>Array.isArray(o)?o.filter(r=>typeof r=="string"):[],s=t;return{hidden:e(s.hidden),pinned:e(s.pinned),order:e(s.order)}}function Yt(t,e){return{...t,hidden:[...fe(t.hidden,e),e],pinned:fe(t.pinned,e)}}function Jt(t,e){return{...t,hidden:fe(t.hidden,e)}}function Ut(t,e){return t.pinned.includes(e)?{...t,pinned:fe(t.pinned,e)}:{...t,hidden:fe(t.hidden,e),pinned:[...t.pinned,e]}}function Vt(t,e,s){const o=r=>{const l=e.order.indexOf(r);return l===-1?Number.MAX_SAFE_INTEGER:l};return t.filter(r=>r.slug===s||!e.hidden.includes(r.slug)).map((r,l)=>({org:r,index:l})).sort((r,l)=>Number(e.pinned.includes(l.org.slug))-Number(e.pinned.includes(r.org.slug))||o(r.org.slug)-o(l.org.slug)||r.index-l.index).map(({org:r})=>r)}function Qt(t,e,s,o){const r=e.indexOf(s),l=e.indexOf(o);if(r===-1||l===-1||r===l||t.pinned.includes(s)!==t.pinned.includes(o))return t;const n=[...e];return n.splice(r,1),n.splice(l,0,s),{...t,order:[...n,...t.order.filter(a=>!n.includes(a))]}}function ve(t){const e=H.c(11),{active:s,label:o,children:r}=t,l=s?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let n;e[0]!==l?(n=Y("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",l),e[0]=l,e[1]=n):n=e[1];let a;e[2]!==n?(a=i.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:i.jsx("span",{className:n})}),e[2]=n,e[3]=a):a=e[3];let c;e[4]!==s||e[5]!==o?(c=o&&i.jsx("span",{"aria-hidden":!0,className:Y("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",s?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:o}),e[4]=s,e[5]=o,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==a||e[9]!==c?(d=i.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,r,c]}),e[7]=r,e[8]=a,e[9]=c,e[10]=d):d=e[10],d}function Zt(t){return typeof t=="object"&&t!==null&&Array.isArray(t.items)}function es(t){const e=H.c(13),s=t.trim(),{data:o}=be.useSession(),r=o?.user?.id??"",l=s.length>0&&!!r,n=Ye.organizationSearch(r,s);let a;e[0]!==s?(a=async w=>{const{signal:O}=w,p=await fetch(`/api/_me/organizations/search?q=${encodeURIComponent(s)}`,{signal:O});if(!p.ok)throw new Error(`Organization search failed: ${p.status}`);const y=await p.json();if(!Zt(y))throw new Error("Invalid organization search response");return y},e[0]=s,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==n||e[4]!==a?(c={queryKey:n,queryFn:a,enabled:l,placeholderData:Je,staleTime:3e4,retry:!1},e[2]=l,e[3]=n,e[4]=a,e[5]=c):c=e[5];const{data:d,isFetching:g,isPlaceholderData:m,isError:h}=qe(c);let f;e[6]!==d?.items?(f=d?.items??[],e[6]=d?.items,e[7]=f):f=e[7];const u=l&&g,x=l&&m;let j;return e[8]!==h||e[9]!==f||e[10]!==u||e[11]!==x?(j={hits:f,isSearching:u,isStale:x,isError:h},e[8]=h,e[9]=f,e[10]=u,e[11]=x,e[12]=j):j=e[12],j}function ts(t){const e=H.c(61),{orgs:s,currentSlug:o,hiddenCount:r,onSelect:l}=t,n=U(),[a,c]=q.useState(!1),[d,g]=q.useState("");let m;e[0]!==d?(m=d.trim(),e[0]=d,e[1]=m):m=e[1];const h=m,f=$t(h,150),u=h.length>0,x=f===h,{hits:j,isSearching:w,isStale:O,isError:p}=es(u?f:""),y=u?j:s;let v;e[2]===Symbol.for("react.memo_cache_sentinel")?(v=G=>{c(G),G||g("")},e[2]=v):v=e[2];const z=v;let b;e[3]!==n?(b=n("sidebar.rail.searchOrganizations"),e[3]=n,e[4]=b):b=e[4];let A;e[5]===Symbol.for("react.memo_cache_sentinel")?(A=()=>z(!0),e[5]=A):A=e[5];let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=i.jsx(Lt,{size:18}),e[6]=I):I=e[6];let _;e[7]!==b?(_=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":b,onClick:A,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:I})}),e[7]=b,e[8]=_):_=e[8];let E;e[9]!==r||e[10]!==n?(E=r>0?n("sidebar.rail.searchMoreOrganizations",{count:r}):n("sidebar.rail.searchOrganizations"),e[9]=r,e[10]=n,e[11]=E):E=e[11];let C;e[12]!==E?(C=i.jsx(me,{side:"right",children:E}),e[12]=E,e[13]=C):C=e[13];let T;e[14]!==_||e[15]!==C?(T=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[_,C]})}),e[14]=_,e[15]=C,e[16]=T):T=e[16];let P;e[17]!==n?(P=n("sidebar.rail.searchOrganizations"),e[17]=n,e[18]=P):P=e[18];let S;e[19]!==n?(S=n("sidebar.rail.searchPlaceholder"),e[19]=n,e[20]=S):S=e[20];let R;e[21]!==n?(R=n("sidebar.rail.searchPlaceholder"),e[21]=n,e[22]=R):R=e[22];let M;e[23]!==d||e[24]!==R?(M=i.jsx(kt,{value:d,onValueChange:g,placeholder:R}),e[23]=d,e[24]=R,e[25]=M):M=e[25];const F=u&&(O||!x)&&"opacity-50";let K;e[26]!==F?(K=Y(F),e[26]=F,e[27]=K):K=e[27];let D;e[28]!==p||e[29]!==u||e[30]!==n?(D=u&&p&&i.jsx(Ee,{children:n("sidebar.rail.searchFailed")}),e[28]=p,e[29]=u,e[30]=n,e[31]=D):D=e[31];let $;e[32]!==p||e[33]!==w||e[34]!==y.length||e[35]!==x||e[36]!==n?($=!p&&x&&!w&&y.length===0&&i.jsx(Ee,{children:n("sidebar.rail.searchEmpty")}),e[32]=p,e[33]=w,e[34]=y.length,e[35]=x,e[36]=n,e[37]=$):$=e[37];let L;if(e[38]!==o||e[39]!==l||e[40]!==y||e[41]!==n){let G;e[43]!==o||e[44]!==l||e[45]!==n?(G=X=>i.jsxs(Pt,{value:X.slug,onSelect:()=>{z(!1),X.slug!==o&&l(X.slug)},className:"gap-2.5",children:[i.jsx(Re,{org:X,size:"sm"}),i.jsx("span",{className:"min-w-0 flex-1 truncate",children:X.name}),X.slug===o&&i.jsx("span",{className:"text-meta shrink-0",children:n("sidebar.rail.currentOrganization")})]},X.id),e[43]=o,e[44]=l,e[45]=n,e[46]=G):G=e[46],L=y.map(G),e[38]=o,e[39]=l,e[40]=y,e[41]=n,e[42]=L}else L=e[42];let k;e[47]!==K||e[48]!==D||e[49]!==$||e[50]!==L?(k=i.jsxs(Dt,{className:K,children:[D,$,L]}),e[47]=K,e[48]=D,e[49]=$,e[50]=L,e[51]=k):k=e[51];let W;e[52]!==a||e[53]!==P||e[54]!==S||e[55]!==M||e[56]!==k?(W=i.jsxs(Mt,{open:a,onOpenChange:z,title:P,description:S,shouldFilter:!1,children:[M,k]}),e[52]=a,e[53]=P,e[54]=S,e[55]=M,e[56]=k,e[57]=W):W=e[57];let J;return e[58]!==W||e[59]!==T?(J=i.jsxs(i.Fragment,{children:[T,W]}),e[58]=W,e[59]=T,e[60]=J):J=e[60],J}function ss(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const ns=()=>Ke(globalThis.innerHeight),is=()=>Ke(0);function rs(t){const e=H.c(59),{org:s,active:o,onSelect:r,pinned:l,onOpenSettings:n,onTogglePin:a,onHide:c}=t,d=U();let g;e[0]!==s.slug?(g={id:s.slug},e[0]=s.slug,e[1]=g):g=e[1];const{setNodeRef:m,listeners:h,transform:f,transition:u,isDragging:x}=bt(g);let j;e[2]!==f?(j=mt.Transform.toString(f?{...f,x:0}:null),e[2]=f,e[3]=j):j=e[3];const w=x?1:void 0,O=`rail-org-${s.slug}`;let p;e[4]!==j||e[5]!==w||e[6]!==O||e[7]!==u?(p={transform:j,transition:u,zIndex:w,viewTransitionName:O},e[4]=j,e[5]=w,e[6]=O,e[7]=u,e[8]=p):p=e[8];const y=s.name,v=o||void 0,z=o?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",b=r&&"cursor-pointer";let A;e[9]!==z||e[10]!==b?(A=Y("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",z,b),e[9]=z,e[10]=b,e[11]=A):A=e[11];let I;e[12]!==s?(I=i.jsx(Re,{org:s,size:"lg"}),e[12]=s,e[13]=I):I=e[13];let _;e[14]!==l?(_=l&&i.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:i.jsx(Ae,{size:9})}),e[14]=l,e[15]=_):_=e[15];let E;e[16]!==r||e[17]!==s.name||e[18]!==A||e[19]!==I||e[20]!==_||e[21]!==v?(E=i.jsx(he,{asChild:!0,children:i.jsx(zt,{asChild:!0,children:i.jsxs("button",{type:"button","aria-label":y,"aria-current":v,onClick:r,className:A,children:[I,_]})})}),e[16]=r,e[17]=s.name,e[18]=A,e[19]=I,e[20]=_,e[21]=v,e[22]=E):E=e[22];let C;e[23]!==s.name?(C=i.jsx(me,{side:"right",children:s.name}),e[23]=s.name,e[24]=C):C=e[24];let T;e[25]!==E||e[26]!==C?(T=i.jsxs(ge,{children:[E,C]}),e[25]=E,e[26]=C,e[27]=T):T=e[27];let P;e[28]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx(St,{}),e[28]=P):P=e[28];let S;e[29]!==d?(S=d("sidebar.rail.organizationSettings"),e[29]=d,e[30]=S):S=e[30];let R;e[31]!==n||e[32]!==S?(R=i.jsxs(ze,{onSelect:n,children:[P,S]}),e[31]=n,e[32]=S,e[33]=R):R=e[33];let M;e[34]===Symbol.for("react.memo_cache_sentinel")?(M=i.jsx(Ae,{}),e[34]=M):M=e[34];let F;e[35]!==l||e[36]!==d?(F=d(l?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=l,e[36]=d,e[37]=F):F=e[37];let K;e[38]!==a||e[39]!==F?(K=i.jsxs(ze,{onSelect:a,children:[M,F]}),e[38]=a,e[39]=F,e[40]=K):K=e[40];let D;e[41]!==c||e[42]!==d?(D=c&&i.jsxs(ze,{onSelect:c,children:[i.jsx(jt,{}),d("sidebar.rail.hideOrganization")]}),e[41]=c,e[42]=d,e[43]=D):D=e[43];let $;e[44]!==R||e[45]!==K||e[46]!==D?($=i.jsxs(Ot,{children:[R,K,D]}),e[44]=R,e[45]=K,e[46]=D,e[47]=$):$=e[47];let L;e[48]!==T||e[49]!==$?(L=i.jsxs(_t,{children:[T,$]}),e[48]=T,e[49]=$,e[50]=L):L=e[50];let k;e[51]!==o||e[52]!==L?(k=i.jsx(ve,{active:o,children:L}),e[51]=o,e[52]=L,e[53]=k):k=e[53];let W;return e[54]!==h||e[55]!==m||e[56]!==k||e[57]!==p?(W=i.jsx("div",{ref:m,...h,style:p,className:"w-full shrink-0 touch-none",children:k}),e[54]=h,e[55]=m,e[56]=k,e[57]=p,e[58]=W):W=e[58],W}function os(t){const e=H.c(64),{project:s,orgSlug:o,active:r,onClose:l,onNavigate:n}=t,a=U();let c,d,g,m,h,f,u,x,j,w,O;if(e[0]!==r||e[1]!==n||e[2]!==o||e[3]!==s.icon||e[4]!==s.id||e[5]!==s.title){const M=yt(s.icon,s.title);O="group/rail relative flex w-full flex-col items-center gap-1",g=ge,d=he,w=!0,c=ke,m=et.root,e[17]!==o||e[18]!==s.id?(h={org:o,agentId:s.id},e[17]=o,e[18]=s.id,e[19]=h):h=e[19],f=s.title,u=r||void 0,e[20]!==n?(x=()=>{je("org_rail_recent_project_opened"),n?.()},e[20]=n,e[21]=x):x=e[21],j=Y("flex shrink-0 rounded-lg focus-ring",M.text,r&&"ring-[1.5px] ring-current"),e[0]=r,e[1]=n,e[2]=o,e[3]=s.icon,e[4]=s.id,e[5]=s.title,e[6]=c,e[7]=d,e[8]=g,e[9]=m,e[10]=h,e[11]=f,e[12]=u,e[13]=x,e[14]=j,e[15]=w,e[16]=O}else c=e[6],d=e[7],g=e[8],m=e[9],h=e[10],f=e[11],u=e[12],x=e[13],j=e[14],w=e[15],O=e[16];let p;e[22]!==s.icon||e[23]!==s.title?(p=i.jsx(vt,{icon:s.icon,name:s.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=s.icon,e[23]=s.title,e[24]=p):p=e[24];let y;e[25]!==c||e[26]!==m||e[27]!==h||e[28]!==f||e[29]!==u||e[30]!==x||e[31]!==j||e[32]!==p?(y=i.jsx(c,{to:m,params:h,"aria-label":f,"aria-current":u,onClick:x,className:j,children:p}),e[25]=c,e[26]=m,e[27]=h,e[28]=f,e[29]=u,e[30]=x,e[31]=j,e[32]=p,e[33]=y):y=e[33];let v;e[34]!==d||e[35]!==y||e[36]!==w?(v=i.jsx(d,{asChild:w,children:y}),e[34]=d,e[35]=y,e[36]=w,e[37]=v):v=e[37];let z;e[38]!==s.title?(z=i.jsx(me,{side:"right",children:s.title}),e[38]=s.title,e[39]=z):z=e[39];let b;e[40]!==g||e[41]!==v||e[42]!==z?(b=i.jsxs(g,{children:[v,z]}),e[40]=g,e[41]=v,e[42]=z,e[43]=b):b=e[43];const A=r?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let I;e[44]!==A?(I=Y("line-clamp-2 w-full text-center text-2xs break-words transition-colors",A),e[44]=A,e[45]=I):I=e[45];let _;e[46]!==s.title||e[47]!==I?(_=i.jsx("span",{"aria-hidden":!0,className:I,children:s.title}),e[46]=s.title,e[47]=I,e[48]=_):_=e[48];let E;e[49]!==s.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:s.title}),e[49]=s.title,e[50]=a,e[51]=E):E=e[51];let C;e[52]!==l?(C=()=>{je("org_rail_recent_project_closed"),l()},e[52]=l,e[53]=C):C=e[53];let T,P;e[54]===Symbol.for("react.memo_cache_sentinel")?(T=Y("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"),P=i.jsx(Me,{size:10}),e[54]=T,e[55]=P):(T=e[54],P=e[55]);let S;e[56]!==E||e[57]!==C?(S=i.jsx("button",{type:"button","aria-label":E,onClick:C,className:T,children:P}),e[56]=E,e[57]=C,e[58]=S):S=e[58];let R;return e[59]!==b||e[60]!==_||e[61]!==S||e[62]!==O?(R=i.jsxs("div",{className:O,children:[b,_,S]}),e[59]=b,e[60]=_,e[61]=S,e[62]=O,e[63]=R):R=e[63],R}const ls={"site-editor":"/site-editor"};function as(t){const e=H.c(26),{app:s}=t,o=U(),r=Rt[s],l=ls[s];if(!r||!l)return null;let n;e[0]!==r.labelKey||e[1]!==o?(n=o(r.labelKey),e[0]=r.labelKey,e[1]=o,e[2]=n):n=e[2];let a;e[3]!==r.labelKey||e[4]!==o?(a=o(r.labelKey),e[3]=r.labelKey,e[4]=o,e[5]=a):a=e[5];let c;e[6]!==r.tone?(c=Y("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",r.tone),e[6]=r.tone,e[7]=c):c=e[7];let d;e[8]!==r.Icon?(d=i.jsx(r.Icon,{size:18}),e[8]=r.Icon,e[9]=d):d=e[9];let g;e[10]!==a||e[11]!==c||e[12]!==d||e[13]!==l?(g=i.jsx(he,{asChild:!0,children:i.jsx(ke,{to:l,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:c,children:d})}),e[10]=a,e[11]=c,e[12]=d,e[13]=l,e[14]=g):g=e[14];let m;e[15]!==r.labelKey||e[16]!==o?(m=o(r.labelKey),e[15]=r.labelKey,e[16]=o,e[17]=m):m=e[17];let h;e[18]!==m?(h=i.jsx(me,{side:"right",children:m}),e[18]=m,e[19]=h):h=e[19];let f;e[20]!==g||e[21]!==h?(f=i.jsxs(ge,{children:[g,h]}),e[20]=g,e[21]=h,e[22]=f):f=e[22];let u;return e[23]!==n||e[24]!==f?(u=i.jsx(ve,{active:!0,label:n,children:f}),e[23]=n,e[24]=f,e[25]=u):u=e[25],u}function cs(){const{org:t}=Le();return Nt(t.slug),null}function Fe(t){const e=H.c(56),{onNavigate:s}=t===void 0?{}:t,o=U(),r=Ue(),{org:l}=Le(),n=Ve();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:hs},e[0]=a):a=e[0];const c=Qe(a);let d;e[1]!==c||e[2]!==n?(d=c?n({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=c,e[2]=n,e[3]=d):d=e[3];const g=d,m=g?g.org:l.slug,{data:h}=Ze(),[f,u]=q.useState(!1),x=Ce(),{recent:j,forget:w}=Et(l.slug),{projects:O}=Tt(),p=It(),y=At(),v=y&&y.projectId===null?y.app:null,z=v?[]:j.flatMap(N=>O.filter(B=>B.id===N)),b=Gt(h??[],l),{recent:A,remember:I}=qt();let _;e[4]===Symbol.for("react.memo_cache_sentinel")?(_=_e.railOrgPrefs(),e[4]=_):_=e[4];const[E,C]=ye(_,We),T=ue(E),P=q.useSyncExternalStore(ss,ns,is),{shown:S}=Xt(Vt(b,T,l.slug),A,l.slug,P,T.pinned);let R;e[5]===Symbol.for("react.memo_cache_sentinel")?(R={activationConstraint:{distance:8}},e[5]=R):R=e[5];const M=dt(ut(gt,R)),F=N=>{const{active:B,over:ce}=N;ce&&(je("org_rail_reordered"),C(He=>Qt(ue(He),S.map(fs),String(B.id),String(ce.id))))},K=N=>{s?.(),r({to:"/$org/home",params:{org:N},viewTransition:!0})},D=N=>{je("org_rail_travel");const B=S.some(ce=>ce.slug===N);C(ce=>Jt(ue(ce),N)),I(N,B?S.map(us):void 0),K(N)},$=!x&&"border-r border-sidebar-border";let L;e[6]!==$?(L=Y("flex w-[68px] shrink-0 flex-col items-center gap-2.5 overflow-y-auto bg-sidebar px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",$),e[6]=$,e[7]=L):L=e[7];let k;e[8]!==o?(k=o("sidebar.rail.ariaLabel"),e[8]=o,e[9]=k):k=e[9];const W=ft,J=ht,G=pt,X=S.map(ds),Se=xt,we=S.map(N=>i.jsxs(q.Fragment,{children:[i.jsx(rs,{org:N,active:N.slug===m,pinned:T.pinned.includes(N.slug),onSelect:N.slug!==l.slug?()=>D(N.slug):p?()=>K(N.slug):void 0,onOpenSettings:()=>{s?.(),r({to:"/$org/settings",params:{org:N.slug}})},onTogglePin:()=>C(B=>Ut(ue(B),N.slug)),onHide:N.slug===l.slug?void 0:()=>C(B=>Yt(ue(B),N.slug))}),N.slug===l.slug&&z.length>0&&i.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:z.map(B=>i.jsx(os,{project:B,orgSlug:l.slug,active:p===B.id,onClose:()=>w(B.id),onNavigate:s},B.id))})]},N.id));let V;e[10]!==G||e[11]!==X||e[12]!==Se||e[13]!==we?(V=i.jsx(G,{items:X,strategy:Se,children:we}),e[10]=G,e[11]=X,e[12]=Se,e[13]=we,e[14]=V):V=e[14];let Q;e[15]!==W||e[16]!==F||e[17]!==M||e[18]!==V||e[19]!==J?(Q=i.jsx(W,{sensors:M,collisionDetection:J,onDragEnd:F,children:V}),e[15]=W,e[16]=F,e[17]=M,e[18]=V,e[19]=J,e[20]=Q):Q=e[20];let Z;e[21]!==l.slug||e[22]!==b||e[23]!==S.length||e[24]!==D?(Z=b.length>S.length&&i.jsx(ts,{orgs:b,currentSlug:l.slug,hiddenCount:b.length-S.length,onSelect:D}),e[21]=l.slug,e[22]=b,e[23]=S.length,e[24]=D,e[25]=Z):Z=e[25];let ee;e[26]!==o?(ee=o("sidebar.picker.newOrganization"),e[26]=o,e[27]=ee):ee=e[27];let te;e[28]!==u?(te=()=>u(!0),e[28]=u,e[29]=te):te=e[29];let pe;e[30]===Symbol.for("react.memo_cache_sentinel")?(pe=i.jsx(wt,{size:18}),e[30]=pe):pe=e[30];let se;e[31]!==ee||e[32]!==te?(se=i.jsx(he,{asChild:!0,children:i.jsx("button",{type:"button","aria-label":ee,onClick:te,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:pe})}),e[31]=ee,e[32]=te,e[33]=se):se=e[33];let ne;e[34]!==o?(ne=o("sidebar.picker.newOrganization"),e[34]=o,e[35]=ne):ne=e[35];let ie;e[36]!==ne?(ie=i.jsx(me,{side:"right",children:ne}),e[36]=ne,e[37]=ie):ie=e[37];let re;e[38]!==se||e[39]!==ie?(re=i.jsx(ve,{active:!1,children:i.jsxs(ge,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=re):re=e[40];let oe;e[41]!==v?(oe=v&&i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),i.jsx(as,{app:v})]}),e[41]=v,e[42]=oe):oe=e[42];let le;e[43]!==Q||e[44]!==Z||e[45]!==re||e[46]!==oe||e[47]!==L||e[48]!==k?(le=i.jsxs("div",{className:L,"aria-label":k,children:[Q,Z,re,oe]}),e[43]=Q,e[44]=Z,e[45]=re,e[46]=oe,e[47]=L,e[48]=k,e[49]=le):le=e[49];let ae;e[50]!==f||e[51]!==u?(ae=i.jsx(Ct,{open:f,onOpenChange:u}),e[50]=f,e[51]=u,e[52]=ae):ae=e[52];let xe;return e[53]!==le||e[54]!==ae?(xe=i.jsxs(i.Fragment,{children:[le,ae]}),e[53]=le,e[54]=ae,e[55]=xe):xe=e[55],xe}function ds(t){return t.slug}function us(t){return t.slug}function fs(t){return t.slug}function hs(t){return t.isLoading}function ms(t){const e=H.c(15),{width:s,minWidth:o,maxWidth:r,onPointerDown:l,onKeyDown:n,onDoubleClick:a}=t,c=U(),{isMobile:d}=De(),g=Ce();if(d||g)return null;let m;e[0]!==c?(m=c("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=c,e[1]=m):m=e[1];let h;e[2]!==c?(h=c("sidebar.sidebarResizeHandle.title"),e[2]=c,e[3]=h):h=e[3];let f,u;e[4]===Symbol.for("react.memo_cache_sentinel")?(f={left:"var(--sidebar-width)"},u=i.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]=f,e[5]=u):(f=e[4],u=e[5]);let x;return e[6]!==r||e[7]!==o||e[8]!==a||e[9]!==n||e[10]!==l||e[11]!==m||e[12]!==h||e[13]!==s?(x=i.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":m,"aria-valuenow":s,"aria-valuemin":o,"aria-valuemax":r,title:h,tabIndex:0,onPointerDown:l,onKeyDown:n,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:f,children:u}),e[6]=r,e[7]=o,e[8]=a,e[9]=n,e[10]=l,e[11]=m,e[12]=h,e[13]=s,e[14]=x):x=e[14],x}const Oe=400,Ie=16,gs="sidebar.width.v2";function ps(){const t=H.c(14),e=xs;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=u=>typeof u=="number"?e(u):192,t[0]=s):s=t[0];const[o,r]=ye(gs,s),l=q.useRef(null);let n;t[1]!==r||t[2]!==o?(n=u=>{u.preventDefault();const x=u.clientX,j=e(o),w=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),O=w?Array.from(w.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const v of O)v.style.transition="none";const p=v=>{const z=e(j+(v.clientX-x));w?.style.setProperty("--sidebar-width",`${z}px`)},y=v=>{const z=e(j+(v.clientX-x));r(z);for(const b of O)b.style.transition="";window.removeEventListener("pointermove",p),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",p),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y)},t[1]=r,t[2]=o,t[3]=n):n=t[3];const a=n;let c;t[4]!==r?(c=()=>{r(192)},t[4]=r,t[5]=c):c=t[5];const d=c;let g;t[6]!==r||t[7]!==o?(g=u=>{if(u.key==="ArrowLeft")r(e(o-Ie));else if(u.key==="ArrowRight")r(e(o+Ie));else if(u.key==="Home")r(192);else if(u.key==="End")r(Oe);else return;u.preventDefault()},t[6]=r,t[7]=o,t[8]=g):g=t[8];const m=g,h=e(o);let f;return t[9]!==m||t[10]!==a||t[11]!==d||t[12]!==h?(f={width:h,minWidth:192,maxWidth:Oe,wrapperRef:l,onStartResize:a,onKeyDownResize:m,resetWidth:d},t[9]=m,t[10]=a,t[11]=d,t[12]=h,t[13]=f):f=t[13],f}function xs(t){return Math.max(192,Math.min(Oe,t))}const Be=q.createContext(null);function bs(){const t=q.use(Be);if(!t)throw new Error("Layout regions require a Layout");return t}function js({children:t,notice:e,outsideOrg:s}){const o=ct(),[r,l]=ye(_e.sidebarOpen(),!0),n=ps(),a=Pe();return i.jsx(Be,{value:{isMobile:o,resize:n},children:i.jsx(st,{open:r,onOpenChange:l,children:i.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,i.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[a&&!s&&i.jsx(cs,{}),!o&&a&&(s?.rail??!0)&&i.jsx(Fe,{}),i.jsx(nt,{ref:n.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${n.width}px`,"--sidebar-width-icon":a?"0px":"3.125rem"},children:i.jsx(it,{children:t})})]})]})})})}function ys(t){const e=H.c(37),{children:s,renderMobile:o}=t,r=U(),{isMobile:l,resize:n}=bs(),{openMobile:a,setOpenMobile:c}=De(),d=Ce(),g=Pe();let m;e[0]!==c?(m=()=>c(!1),e[0]=c,e[1]=m):m=e[1];const h=m;if(!l){const v=g&&d;let z;e[2]!==s||e[3]!==v?(z=i.jsx("div",{className:"contents",inert:v,children:s}),e[2]=s,e[3]=v,e[4]=z):z=e[4];let b;e[5]!==n.maxWidth||e[6]!==n.minWidth||e[7]!==n.onKeyDownResize||e[8]!==n.onStartResize||e[9]!==n.resetWidth||e[10]!==n.width?(b=i.jsx(ms,{width:n.width,minWidth:n.minWidth,maxWidth:n.maxWidth,onPointerDown:n.onStartResize,onKeyDown:n.onKeyDownResize,onDoubleClick:n.resetWidth}),e[5]=n.maxWidth,e[6]=n.minWidth,e[7]=n.onKeyDownResize,e[8]=n.onStartResize,e[9]=n.resetWidth,e[10]=n.width,e[11]=b):b=e[11];let A;return e[12]!==z||e[13]!==b?(A=i.jsxs(i.Fragment,{children:[z,b]}),e[12]=z,e[13]=b,e[14]=A):A=e[14],A}let f;e[15]!==r?(f=r("layouts.shellControls.navigationTitle"),e[15]=r,e[16]=f):f=e[16];let u;e[17]!==f?(u=i.jsx(ot,{className:"sr-only",children:f}),e[17]=f,e[18]=u):u=e[18];let x;e[19]!==h||e[20]!==g?(x=g&&i.jsx(Fe,{onNavigate:h}),e[19]=h,e[20]=g,e[21]=x):x=e[21];let j;e[22]!==h||e[23]!==o?(j=o({onClose:h}),e[22]=h,e[23]=o,e[24]=j):j=e[24];let w;e[25]!==j?(w=i.jsx("div",{className:"min-w-0 flex-1",children:j}),e[25]=j,e[26]=w):w=e[26];let O;e[27]!==x||e[28]!==w?(O=i.jsxs("div",{className:"flex h-full min-h-0",children:[x,w]}),e[27]=x,e[28]=w,e[29]=O):O=e[29];let p;e[30]!==u||e[31]!==O?(p=i.jsxs(lt,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:vs,children:[u,O]}),e[30]=u,e[31]=O,e[32]=p):p=e[32];let y;return e[33]!==a||e[34]!==c||e[35]!==p?(y=i.jsx(at,{open:a,onOpenChange:c,children:p}),e[33]=a,e[34]=c,e[35]=p,e[36]=y):y=e[36],y}function vs(t){return t.preventDefault()}function Ss(t){const e=H.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={background:"transparent",containerType:"inline-size"},e[0]=o):o=e[0];let r;return e[1]!==s?(r=i.jsx(rt,{className:"flex flex-col min-h-0",style:o,children:i.jsx(tt,{variant:"plain",className:"bg-sidebar",children:i.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s})})}),e[1]=s,e[2]=r):r=e[2],r}const Hs=Object.assign(js,{Sidebar:ys,Content:Ss});export{Bs as I,Hs as L,Re as O,es as u,Gt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,f as p,aA as u,j as s,b2 as x,N as a}from"./index-
|
|
1
|
+
import{c as f,f as p,aA as u,j as s,b2 as x,N as a}from"./index-B0tOn0op.js";import{C as j}from"./capability-load-error-xQmp44p-.js";function d(){const t=f.c(19);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org"},t[0]=o):o=t[0];const{org:r}=p(o),{capabilities:l,isPrivileged:m,loading:g,error:c}=u();if(g){let e;return t[1]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(x,{}),t[1]=e):e=t[1],e}if(c){let e;return t[2]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(j,{}),t[2]=e):e=t[2],e}const i=e=>m||l[e]===!0;if(i("org:manage")){let e;return t[3]!==r?(e=s.jsx(a,{to:"/$org/settings/general",params:{org:r},replace:!0}),t[3]=r,t[4]=e):e=t[4],e}if(i("ai-providers:manage")){let e;return t[5]!==r?(e=s.jsx(a,{to:"/$org/settings/ai-providers",params:{org:r},replace:!0}),t[5]=r,t[6]=e):e=t[6],e}if(i("secrets:manage")){let e;return t[7]!==r?(e=s.jsx(a,{to:"/$org/settings/secrets",params:{org:r},replace:!0}),t[7]=r,t[8]=e):e=t[8],e}if(i("file-configs:manage")){let e;return t[9]!==r?(e=s.jsx(a,{to:"/$org/settings/buckets",params:{org:r},replace:!0}),t[9]=r,t[10]=e):e=t[10],e}if(i("automations:manage")){let e;return t[11]!==r?(e=s.jsx(a,{to:"/$org/settings/automations",params:{org:r},replace:!0}),t[11]=r,t[12]=e):e=t[12],e}if(i("monitoring:view")){let e;return t[13]!==r?(e=s.jsx(a,{to:"/$org/settings/monitor",params:{org:r},replace:!0}),t[13]=r,t[14]=e):e=t[14],e}if(i("members:manage")){let e;return t[15]!==r?(e=s.jsx(a,{to:"/$org/settings/members",params:{org:r},replace:!0}),t[15]=r,t[16]=e):e=t[16],e}let n;return t[17]!==r?(n=s.jsx(a,{to:"/$org/settings/profile",params:{org:r},replace:!0}),t[17]=r,t[18]=n):n=t[18],n}export{d as default};
|
package/dist/client/assets/{infiniteQueryObserver-DoO1tFcg.js → infiniteQueryObserver-Qk75Yfno.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{es as g,et as d,eu as v}from"./index-
|
|
1
|
+
import{es as g,et as d,eu as v}from"./index-B0tOn0op.js";var b=class extends g{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:r}=e,i=super.createResult(e,t),{isFetching:c,isRefetching:u,isError:a,isRefetchError:P}=i,s=r.fetchMeta?.fetchMore?.direction,h=a&&s==="forward",o=c&&s==="forward",n=a&&s==="backward",f=c&&s==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:v(t,r.data),hasPreviousPage:d(t,r.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:f,isRefetchError:P&&!h&&!n,isRefetching:u&&!o&&!f}}};export{b as I};
|