decocms 4.616.0 → 4.617.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/AlertCircle-DLcqA-Vc.js +1 -0
- package/dist/client/assets/AreaChart-DXgnBi8E.js +1 -0
- package/dist/client/assets/ArrowLeft-BSf9qK0B.js +1 -0
- package/dist/client/assets/ArrowRight-B9Ag2Jne.js +1 -0
- package/dist/client/assets/ArrowUp-Bvsnn071.js +1 -0
- package/dist/client/assets/BookOpen01-CIuv_Ae_.js +1 -0
- package/dist/client/assets/CartesianChart-C897FgR0.js +1 -0
- package/dist/client/assets/CategoricalChart-D79Y9MaG.js +33 -0
- package/dist/client/assets/CheckCircle-Abykuf2x.js +1 -0
- package/dist/client/assets/ChevronDown-CCC_w34y.js +1 -0
- package/dist/client/assets/ChevronSelectorVertical-CnYm62on.js +1 -0
- package/dist/client/assets/ChevronUp-BQixP1rC.js +1 -0
- package/dist/client/assets/CreditCard01-Dxwp5ygx.js +1 -0
- package/dist/client/assets/Eye-1k4JclX4.js +1 -0
- package/dist/client/assets/File02-B2v4MuD_.js +1 -0
- package/dist/client/assets/Fingerprint04-5gPbq8CS.js +1 -0
- package/dist/client/assets/Globe04-BwyaTy24.js +1 -0
- package/dist/client/assets/Image01-BKGukLJT.js +1 -0
- package/dist/client/assets/Key01-Cw7--3Qr.js +1 -0
- package/dist/client/assets/LayoutLeft-BPqF2E0g.js +1 -0
- package/dist/client/assets/LinkBroken01-Dv6Ah6nj.js +1 -0
- package/dist/client/assets/MessageCircle01-Cs1j8fQA.js +1 -0
- package/dist/client/assets/Minus-B9t8Cj2h.js +1 -0
- package/dist/client/assets/Monitor01-Dl91x6Dg.js +1 -0
- package/dist/client/assets/Play-DUqcPhTA.js +1 -0
- package/dist/client/assets/Plus-BvILRm8V.js +1 -0
- package/dist/client/assets/ReferenceLine-Bm1JI_3I.js +1 -0
- package/dist/client/assets/SearchMd-LhFkHyRE.js +1 -0
- package/dist/client/assets/ShoppingBag01-DuqldR2K.js +1 -0
- package/dist/client/assets/Sun-B3Dv9qvC.js +1 -0
- package/dist/client/assets/SwitchHorizontal01-B8u3e1M_.js +1 -0
- package/dist/client/assets/Tool01-Dzvelx3t.js +1 -0
- package/dist/client/assets/Tooltip-Co7VWF0S.js +1 -0
- package/dist/client/assets/Trash01-B0KaHXIB.js +1 -0
- package/dist/client/assets/Upload01-RL-4RPrA.js +1 -0
- package/dist/client/assets/UserCheck01-CRs22g1f.js +1 -0
- package/dist/client/assets/UserSquare-DKZc5_qG.js +1 -0
- package/dist/client/assets/Users01-BATDjDHh.js +1 -0
- package/dist/client/assets/XClose-9THWeCtY.js +1 -0
- package/dist/client/assets/Zap-DPXkdXwF.js +1 -0
- package/dist/client/assets/access-gate-CaVxuEUE.js +1 -0
- package/dist/client/assets/add-connection-dialog-BjNDlu0a.js +1 -0
- package/dist/client/assets/agent-app-DgQ1DbBw.js +1 -0
- package/dist/client/assets/agent-assets-CP2iSSZ5.js +1 -0
- package/dist/client/assets/agent-automation-BCzmRTkb.js +20 -0
- package/dist/client/assets/agent-automations-CZRlckLb.js +1 -0
- package/dist/client/assets/agent-blog-D0TcfYEK.js +2 -0
- package/dist/client/assets/agent-blog-post-MKt8mw1p.js +2 -0
- package/dist/client/assets/agent-business-case-XZsRMspd.js +1 -0
- package/dist/client/assets/agent-calendar--BZHZLQm.js +1 -0
- package/dist/client/assets/agent-capabilities-B2Uj5YcZ.js +1 -0
- package/dist/client/assets/agent-connect-sources-DWDTt-s6.js +1 -0
- package/dist/client/assets/agent-deck-Cwtjbq2B.js +1 -0
- package/dist/client/assets/agent-e2e-DkRrI893.js +1 -0
- package/dist/client/assets/agent-experiments-UIW7KYbb.js +1 -0
- package/dist/client/assets/agent-file-C5LQ-Y8n.js +1 -0
- package/dist/client/assets/agent-hosting-g3Q-edug.js +1 -0
- package/dist/client/assets/agent-icon-BjjtuL9t.js +1 -0
- package/dist/client/assets/agent-library-fPB8jboG.js +1 -0
- package/dist/client/assets/agent-library-file-C9IJBhTP.js +1 -0
- package/dist/client/assets/agent-overview-DM5tC54a.js +1 -0
- package/dist/client/assets/agent-releases-Dm8VzhwE.js +3 -0
- package/dist/client/assets/agent-settings-BjqlSo13.js +1 -0
- package/dist/client/assets/agent-site-editor-Ddfl5Qrp.js +16 -0
- package/dist/client/assets/agent-site-editor-code-92SCPwA9.js +2 -0
- package/dist/client/assets/agent-site-editor-content-DE5jggye.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-Bkg72jYl.js +1 -0
- package/dist/client/assets/agent-view-CNzF1IWc.js +1 -0
- package/dist/client/assets/agent-view-guard-Ch-xI5p5.js +1 -0
- package/dist/client/assets/ai-providers-_bNeXkPZ.js +1 -0
- package/dist/client/assets/alert-CrGQnFDm.js +1 -0
- package/dist/client/assets/analytics-sections-BJ8aMDmG.js +1 -0
- package/dist/client/assets/api-keys-BaH5-qoz.js +1 -0
- package/dist/client/assets/api-keys-C-w-AEKg.js +1 -0
- package/dist/client/assets/app-editor-C4kKN5l6.js +1 -0
- package/dist/client/assets/asset-utils-BwGT5GVr.js +1 -0
- package/dist/client/assets/auth-BjUi9SzO.js +1 -0
- package/dist/client/assets/auth-catchall-Bp7IT5gp.js +1 -0
- package/dist/client/assets/auth-entry-cz3T9g0E.js +1 -0
- package/dist/client/assets/auth-split-layout-BG3ENIWT.js +1 -0
- package/dist/client/assets/authenticate-and-persist-oauth-CpCvRcyc.js +1 -0
- package/dist/client/assets/automation-list-row-BNjpstJE.js +1 -0
- package/dist/client/assets/automation-runs-DZqA1IKX.js +1 -0
- package/dist/client/assets/automations-BwLjym_V.js +1 -0
- package/dist/client/assets/badge-BtHgi9Dj.js +1 -0
- package/dist/client/assets/block-document-nnyItFM1.js +3 -0
- package/dist/client/assets/blocks-preview-workspace-context-DU-eF-HP.js +1 -0
- package/dist/client/assets/blocks-tab-states-BgPsbVCy.js +1 -0
- package/dist/client/assets/blog-preview-url-DiKqUmAn.js +1 -0
- package/dist/client/assets/blog-schema-DxMdD_q3.js +1 -0
- package/dist/client/assets/blog-source-gate-COO06WDu.js +1 -0
- package/dist/client/assets/blog-view-gate-DznPBvkc.js +1 -0
- package/dist/client/assets/buckets-Cg1NOVz1.js +1 -0
- package/dist/client/assets/build-improve-prompt-doc-DRDsCZ_z.js +2 -0
- package/dist/client/assets/calendar-DvWhcvLy.js +1 -0
- package/dist/client/assets/capability-load-error-qUGXI89g.js +1 -0
- package/dist/client/assets/category-editor-zQHZXLZl.js +1 -0
- package/dist/client/assets/category-tree-BNcD1qLS.js +18 -0
- package/dist/client/assets/chart-en7CYt0p.js +13 -0
- package/dist/client/assets/chat-context-7_gxJldr.js +43 -0
- package/dist/client/assets/chat-draft-BHgbcBBA.js +1 -0
- package/dist/client/assets/checkbox-DjuOGnHn.js +1 -0
- package/dist/client/assets/choose-editor-CkmkeC2o.js +1 -0
- package/dist/client/assets/cli-auth-success-BjK-gOo7.js +1 -0
- package/dist/client/assets/cms-settings-editor-Dxts04dN.js +1 -0
- package/dist/client/assets/cms-store-drafts-0DVxUrv4.js +1 -0
- package/dist/client/assets/collapsible-CdsqjV3Q.js +1 -0
- package/dist/client/assets/collection-detail-YJTnEWNQ.js +1 -0
- package/dist/client/assets/collection-display-button-DbvAJiF6.js +1 -0
- package/dist/client/assets/collection-search-DrJXq4ci.js +1 -0
- package/dist/client/assets/collection-table-wrapper-DZ7Td_v5.js +1 -0
- package/dist/client/assets/collection-tabs-C724UmTl.js +1 -0
- package/dist/client/assets/combobox-t82yeZiW.js +1 -0
- package/dist/client/assets/command-CywiUm1_.js +1 -0
- package/dist/client/assets/companion-mcps-section-D_AZqJju.js +1 -0
- package/dist/client/assets/config-Bo_Pw9UW.js +1 -0
- package/dist/client/assets/connect-WARP1WEq.js +9 -0
- package/dist/client/assets/connect-key-B1V67JVw.js +1 -0
- package/dist/client/assets/connect-layout-CXOCkn5w.js +1 -0
- package/dist/client/assets/connect-source-dialog-CihWpkgb.js +1 -0
- package/dist/client/assets/connection-DhmM25t6.js +1 -0
- package/dist/client/assets/connection-card-VUrpjnFR.js +1 -0
- package/dist/client/assets/connection-detail-COKfTXOD.js +1 -0
- package/dist/client/assets/connection-form-helpers-DyA1kgCO.js +1 -0
- package/dist/client/assets/connection-slug-B8NnPDGD.js +1 -0
- package/dist/client/assets/connections-Cn0UJJur.js +1 -0
- package/dist/client/assets/content-changes-Azl0DGRu.js +1 -0
- package/dist/client/assets/content-tab-BE75eDB8.js +19 -0
- package/dist/client/assets/context-DfWZakzA.js +1 -0
- package/dist/client/assets/context-menu-DGMuE0Wx.js +1 -0
- package/dist/client/assets/context-shell-C2oF7Qbb.js +37 -0
- package/dist/client/assets/create-organization-dialog-BD79lWYM.js +1 -0
- package/dist/client/assets/daily-pulse-JYouzDb1.js +1 -0
- package/dist/client/assets/delete-copy-uGZgr1b8.js +4 -0
- package/dist/client/assets/device-hint-CSgg6WGu.js +1 -0
- package/dist/client/assets/discover-CT2OmQu_.js +1 -0
- package/dist/client/assets/domain-settings-DiP6KyFA.js +1 -0
- package/dist/client/assets/drawer-CjKXZo1A.js +1 -0
- package/dist/client/assets/editor-cC61lBiD.js +11 -0
- package/dist/client/assets/editor-classes-Dci-OTTD.js +1 -0
- package/dist/client/assets/empty-state-BIdtkRNt.js +1 -0
- package/dist/client/assets/empty-state-CSRN6MuQ.js +1 -0
- package/dist/client/assets/experiments-tab-choice-BOXgxWUo.js +1 -0
- package/dist/client/assets/extract-connection-data-DHH2hoWT.js +1 -0
- package/dist/client/assets/feature-gate-D9RAUNRH.js +1 -0
- package/dist/client/assets/feature-paywall-Bz5Z3aLH.js +1 -0
- package/dist/client/assets/file-explorer-CucOscXN.js +2 -0
- package/dist/client/assets/file-preview-1wnZ_cuW.js +1 -0
- package/dist/client/assets/file-share-button-BPSq7NUQ.js +3 -0
- package/dist/client/assets/file-type-icon-C6tkg31Z.js +1 -0
- package/dist/client/assets/folder-icon-C8jPheKD.js +1 -0
- package/dist/client/assets/form-CQDdpHi1.js +1 -0
- package/dist/client/assets/frame-navigation-ByKJWd46.js +1 -0
- package/dist/client/assets/gateway-client-DS76r1Hn.js +1 -0
- package/dist/client/assets/general-BzdlYpbI.js +1 -0
- package/dist/client/assets/github-icon-CRGJhZEW.js +1 -0
- package/dist/client/assets/held-block-view-_NAzc4-t.js +3 -0
- package/dist/client/assets/home-DDSF8rZg.js +1 -0
- package/dist/client/assets/home-overview-n0-OUC5j.js +1 -0
- package/dist/client/assets/hosted-reconcile-CfF1sBks.js +1 -0
- package/dist/client/assets/icon-button-D_nPapys.js +1 -0
- package/dist/client/assets/index-B3boqtpT.js +1 -0
- package/dist/client/assets/index-BHrsFYmc.js +1 -0
- package/dist/client/assets/index-Ba_9vJbi.js +1 -0
- package/dist/client/assets/index-Bh1KH6V9.js +1 -0
- package/dist/client/assets/index-BpbG2g7p.js +4 -0
- package/dist/client/assets/index-BsIeh4Cx.js +273 -0
- package/dist/client/assets/index-CJrWKUIX.js +5 -0
- package/dist/client/assets/index-CN7fFBPr.js +1 -0
- package/dist/client/assets/index-CRELQxwJ.js +1 -0
- package/dist/client/assets/index-CaJAqu_T.js +1 -0
- package/dist/client/assets/index-CwmLzzd3.js +1 -0
- package/dist/client/assets/index-D5anuWoT.js +4 -0
- package/dist/client/assets/index-DBEEj-vf.js +15 -0
- package/dist/client/assets/index-DGdPUWQG.js +1 -0
- package/dist/client/assets/index-DOMlzk_A.css +1 -0
- package/dist/client/assets/index-Dsd0_C0j.js +26 -0
- package/dist/client/assets/index-MPKk5o35.js +1 -0
- package/dist/client/assets/index-oJ2Lq2a6.js +69 -0
- package/dist/client/assets/index-redirect-DKOxwLwx.js +1 -0
- package/dist/client/assets/infiniteQueryObserver-miJ0qd3O.js +1 -0
- package/dist/client/assets/infra-billing-DfQFVjyV.js +1 -0
- package/dist/client/assets/input-Cibdd1Bl.js +17 -0
- package/dist/client/assets/input-hFWCgmwb.js +1 -0
- package/dist/client/assets/integration-icon-BSOeiN0V.js +1 -0
- package/dist/client/assets/item-actions-BjKd3FRP.js +1 -0
- package/dist/client/assets/jira-icon-WTQXxflI.js +1 -0
- package/dist/client/assets/label-CBW7L69I.js +1 -0
- package/dist/client/assets/layout-BlesHAZ1.js +1 -0
- package/dist/client/assets/legacy-admin-welcome-dialog-RwxXOqrU.js +1 -0
- package/dist/client/assets/legacy-agents-deep-CtuBViyN.js +1 -0
- package/dist/client/assets/legacy-main-redirect-DKohh52R.js +1 -0
- package/dist/client/assets/library-BoY66rxH.js +1 -0
- package/dist/client/assets/library-tab-BsMvTm1T.js +162 -0
- package/dist/client/assets/login-CgmVi49N.js +1 -0
- package/dist/client/assets/markdown-DvPFu_gp.js +93 -0
- package/dist/client/assets/mcp-app-renderer-seklbs59.js +11 -0
- package/dist/client/assets/mcp-oauth-Cw4-dvxH.js +1 -0
- package/dist/client/assets/mcp-oauth-DgE6VdJT.js +1 -0
- package/dist/client/assets/members-DdCrInaP.js +1 -0
- package/dist/client/assets/memory-CRmXOeBE.js +7 -0
- package/dist/client/assets/mock-board-BV0aUocv.js +10 -0
- package/dist/client/assets/monaco-editor-Dhyw1ohX.js +9 -0
- package/dist/client/assets/monitoring-Cg3Rxytu.js +2 -0
- package/dist/client/assets/monitoring-stats-row-DDuZv4oU.js +1 -0
- package/dist/client/assets/multi-select-DHaljr4C.js +1 -0
- package/dist/client/assets/mustache-v3ZFSqS-.js +4 -0
- package/dist/client/assets/named-rule-step-dkVeuHXn.js +1 -0
- package/dist/client/assets/named-rule-view-CfaxirGC.js +1 -0
- package/dist/client/assets/new-project-dialog-DX6rZ2cz.js +1 -0
- package/dist/client/assets/new-project-store-DtdGtBjZ.js +1 -0
- package/dist/client/assets/oauth-callback-CLS08uxu.js +1 -0
- package/dist/client/assets/oauth-callback-ai-provider-bNsVOLdH.js +1 -0
- package/dist/client/assets/oauth-consent-CM3gKmya.js +1 -0
- package/dist/client/assets/onboarding-BZmXPOyd.js +1 -0
- package/dist/client/assets/openai-conversation-DTZ5Z_HK.js +3 -0
- package/dist/client/assets/optimistic-project-sidebar-views-6-EM8OX8.js +1 -0
- package/dist/client/assets/order-monitor-day-KHCikvDv.js +1 -0
- package/dist/client/assets/organization-choice-BWCrFxGF.js +1 -0
- package/dist/client/assets/orgs-lLBDt22T.js +1 -0
- package/dist/client/assets/own-accounts-section-CaSAEb7Y.js +1 -0
- package/dist/client/assets/pair-BAbQ-x4Q.js +48 -0
- package/dist/client/assets/parse-sections-CKHDLrWI.js +4 -0
- package/dist/client/assets/plan-DZj08zn4.js +1 -0
- package/dist/client/assets/plan-ladder-BLK6ReJp.js +1 -0
- package/dist/client/assets/plan-page-DQcOvDA2.js +6 -0
- package/dist/client/assets/plan-usage-card-BPWHUo4J.js +6 -0
- package/dist/client/assets/popover-Gt1AIK6d.js +1 -0
- package/dist/client/assets/post-calendar-DLDK1vFH.js +1 -0
- package/dist/client/assets/post-editor-CNyc33jM.js +2 -0
- package/dist/client/assets/preview-content-BJvMrYUN.js +1 -0
- package/dist/client/assets/preview-dialog-MqrPwyTk.js +1 -0
- package/dist/client/assets/preview-panel-pXiIEUoI.js +1 -0
- package/dist/client/assets/preview-tab-BGKCgMeF.js +557 -0
- package/dist/client/assets/primitives-C4yMpgfh.js +1 -0
- package/dist/client/assets/product-picker-dialog-DnHdeIrw.js +1 -0
- package/dist/client/assets/profile-BYqoI30T.js +1 -0
- package/dist/client/assets/project-app-view-kNeRUgF1.js +1 -0
- package/dist/client/assets/project-apps-cGCkc8Ax.js +1 -0
- package/dist/client/assets/project-icon-CXKZsp_F.js +1 -0
- package/dist/client/assets/project-index-C--rpXOV.js +1 -0
- package/dist/client/assets/project-reports-D51CbGAF.js +1 -0
- package/dist/client/assets/project-tasks-3Qp1kMHx.js +1 -0
- package/dist/client/assets/projects-BnaJss-v.js +1 -0
- package/dist/client/assets/projects-empty-state-CrBRuchN.js +1 -0
- package/dist/client/assets/prompts-CQqQeup0.js +1 -0
- package/dist/client/assets/record-editor-LjbJ8qDY.js +1 -0
- package/dist/client/assets/redirect-editor-B6pXHp_N.js +1 -0
- package/dist/client/assets/reports-BpEvTI00.js +3 -0
- package/dist/client/assets/reports-CQ1A9Zcm.js +1 -0
- package/dist/client/assets/reports-onboarding-kezZu8mx.js +1 -0
- package/dist/client/assets/reports-tab-CI16sdaV.js +2 -0
- package/dist/client/assets/repositories-BQrA_Dt8.js +1 -0
- package/dist/client/assets/repositories-Lh2baPgI.js +1 -0
- package/dist/client/assets/repository-binding-Coty9GKk.js +1 -0
- package/dist/client/assets/repository-picker-BTFXh-Or.js +1 -0
- package/dist/client/assets/require-capability-B75Gfza_.js +1 -0
- package/dist/client/assets/required-auth-layout-C_6SEQQV.js +1 -0
- package/dist/client/assets/reset-password-wMcNb9Do.js +1 -0
- package/dist/client/assets/resizable-Cbb3qdAX.js +1 -0
- package/dist/client/assets/resolve-tab-icon-DAtBYAEl.js +1 -0
- package/dist/client/assets/review-settings-BLjNzHem.js +1 -0
- package/dist/client/assets/role-color-vePuHimp.js +1 -0
- package/dist/client/assets/roles-9DfagegS.js +1 -0
- package/dist/client/assets/route-BAPAagaz.js +1 -0
- package/dist/client/assets/route-DKu6Pqys.js +1 -0
- package/dist/client/assets/route-b1nMnSaM.js +1 -0
- package/dist/client/assets/route-page-header-B-LIky3L.js +1 -0
- package/dist/client/assets/sandbox-git-api-DqhV02JW.js +1 -0
- package/dist/client/assets/sandbox-lifecycle-context-BquR_fQJ.js +1 -0
- package/dist/client/assets/save-status-DGZixUwz.js +1 -0
- package/dist/client/assets/schema-D1r-HRSl.js +1 -0
- package/dist/client/assets/schema-De4v5WlF.js +1 -0
- package/dist/client/assets/scroll-area-B3fSYr2v.js +1 -0
- package/dist/client/assets/search-input-Cdt9kMfy.js +1 -0
- package/dist/client/assets/search-toggle-DSp7Hcky.js +1 -0
- package/dist/client/assets/secret-picker-BawDPkEh.js +1 -0
- package/dist/client/assets/secrets-C8EXSlYe.js +1 -0
- package/dist/client/assets/section-array-field-CdNjVmNO.js +1 -0
- package/dist/client/assets/sections-Bs7Iv2jZ.js +1 -0
- package/dist/client/assets/sections-editor-CfAuLUez.js +1 -0
- package/dist/client/assets/select-CggP6HUZ.js +1 -0
- package/dist/client/assets/select-model-DLzfLIPF.js +1 -0
- package/dist/client/assets/seo-editor-CPdU1reK.js +1 -0
- package/dist/client/assets/separator-BVRbMe65.js +1 -0
- package/dist/client/assets/session-runtime-CWomfon_.js +1 -0
- package/dist/client/assets/settings-tab-DShUXmqJ.js +1 -0
- package/dist/client/assets/sheet-Cctf5Haw.js +1 -0
- package/dist/client/assets/shell-layout-CqMAaDgr.js +1 -0
- package/dist/client/assets/site-draft-actions-C7GVkvic.js +7 -0
- package/dist/client/assets/site-draft-view-D0jluchh.js +1 -0
- package/dist/client/assets/site-editor-BeVDYUvN.js +1 -0
- package/dist/client/assets/site-editor-toast-CwtPztls.js +1 -0
- package/dist/client/assets/skills-xCNKk2jF.js +1 -0
- package/dist/client/assets/slider-BcmfJAYi.js +1 -0
- package/dist/client/assets/sortable.esm-tCMXaEey.js +1 -0
- package/dist/client/assets/sso-D6p5do3e.js +1 -0
- package/dist/client/assets/suggestion-BxWaJ319.js +2 -0
- package/dist/client/assets/super-agent-icon-B9i-UVjr.js +1 -0
- package/dist/client/assets/switch-CtfynxSC.js +1 -0
- package/dist/client/assets/synced-repos-DIodp1Su.js +1 -0
- package/dist/client/assets/tab-icon-glyph-pwqNLeo_.js +1 -0
- package/dist/client/assets/table-BTX1YfJT.js +1 -0
- package/dist/client/assets/tabs-CIIqTZdK.js +1 -0
- package/dist/client/assets/task-board-D7JZjCH3.js +1 -0
- package/dist/client/assets/task-key-CmyVr7eu.js +5 -0
- package/dist/client/assets/task-route-Ctqk0dq-.js +1 -0
- package/dist/client/assets/task-status-B5VEkn1i.js +1 -0
- package/dist/client/assets/taskboard-analytics-BGxgsamA.js +1 -0
- package/dist/client/assets/tasks-CM8b8pVQ.js +4 -0
- package/dist/client/assets/tasks-DmPnSoyF.js +1 -0
- package/dist/client/assets/textarea-DCckijcS.js +1 -0
- package/dist/client/assets/thread-analytics-D9sTrcBy.js +1 -0
- package/dist/client/assets/thread-button-BV5c-Xnr.js +1 -0
- package/dist/client/assets/thread-intent-CimeMAhs.js +15 -0
- package/dist/client/assets/thread-route-Byp6euSQ.js +1 -0
- package/dist/client/assets/thread-route-CJPA6DE4.js +1 -0
- package/dist/client/assets/thread-sheet-body-Dypvjwcl.js +1 -0
- package/dist/client/assets/time-range-picker-Cv23khp_.js +1 -0
- package/dist/client/assets/toggle-group-pweJWvtL.js +1 -0
- package/dist/client/assets/tool-set-selector-CQaNN2xC.js +1 -0
- package/dist/client/assets/toolbar-icon-button-CuKGUCEO.js +1 -0
- package/dist/client/assets/tooltip-C6N4ArKE.js +1 -0
- package/dist/client/assets/tooltipContext-fbSMmnSx.js +1 -0
- package/dist/client/assets/track-CjKst96m.js +1 -0
- package/dist/client/assets/types-7fmsgFT9.js +77 -0
- package/dist/client/assets/url-slug-CXerOL6f.js +1 -0
- package/dist/client/assets/usage-stats-DWuHrZxJ.js +141 -0
- package/dist/client/assets/use-ai-providers-MtFIBImG.js +1 -0
- package/dist/client/assets/use-api-keys-9SqcfWYR.js +1 -0
- package/dist/client/assets/use-apply-named-rule-BDDqH76g.js +1 -0
- package/dist/client/assets/use-ask-in-chat-DD41hTUU.js +1 -0
- package/dist/client/assets/use-automations-D2mAem9w.js +1 -0
- package/dist/client/assets/use-autosave-B2qXm0BM.js +1 -0
- package/dist/client/assets/use-blocks-v8-project-zdtgXF8h.js +1 -0
- package/dist/client/assets/use-blog-view-zATJAdkS.js +1 -0
- package/dist/client/assets/use-chat-layout-state-qKOMz4In.js +1 -0
- package/dist/client/assets/use-cms-publish-actions-XW-XQVoH.js +10 -0
- package/dist/client/assets/use-connect-companion-BAKvxUvx.js +1 -0
- package/dist/client/assets/use-connection-cRB5MkmY.js +1 -0
- package/dist/client/assets/use-content-sync-CHIhyqUa.js +1 -0
- package/dist/client/assets/use-copy-BZFH2e_O.js +1 -0
- package/dist/client/assets/use-current-view-DmgrA-Uh.js +1 -0
- package/dist/client/assets/use-date-fns-locale-DLFMwx_W.js +1 -0
- package/dist/client/assets/use-debounced-autosave-BF7EN-b1.js +1 -0
- package/dist/client/assets/use-debounced-value-BuH3c6jr.js +1 -0
- package/dist/client/assets/use-deco-credits-DWmcC5WJ.js +1 -0
- package/dist/client/assets/use-decopilot-events-xUZ9Tv7u.js +1 -0
- package/dist/client/assets/use-delete-block-pyMELcga.js +1 -0
- package/dist/client/assets/use-delete-connection-BoORUiSg.js +1 -0
- package/dist/client/assets/use-deployment-admin-b-BYr0h5.js +1 -0
- package/dist/client/assets/use-entitlements-DvWm2PK9.js +1 -0
- package/dist/client/assets/use-fast-preview-draft-url-BhFRNHph.js +1 -0
- package/dist/client/assets/use-file-configs-D4tBDbQj.js +1 -0
- package/dist/client/assets/use-id-selection-CpyPb5QB.js +1 -0
- package/dist/client/assets/use-in-settings-Coqt6v7y.js +1 -0
- package/dist/client/assets/use-inbox-feed-F2LzP84_.js +1 -0
- package/dist/client/assets/use-infinite-scroll-BAZy4BEv.js +1 -0
- package/dist/client/assets/use-join-requests-CPgCBxbT.js +1 -0
- package/dist/client/assets/use-main-panel-tabs-DHNL1FRk.js +1 -0
- package/dist/client/assets/use-mcp-auth-status-DlC_DSr7.js +1 -0
- package/dist/client/assets/use-mcp-client-H1P1GrJW.js +10 -0
- package/dist/client/assets/use-mcp-prompts-BOv869a4.js +1 -0
- package/dist/client/assets/use-mcp-tools-BBXEdmEY.js +1 -0
- package/dist/client/assets/use-mobile-D9RQChal.js +1 -0
- package/dist/client/assets/use-move-blocks-DKU8czJq.js +1 -0
- package/dist/client/assets/use-navigate-to-agent-BE-SmhD_.js +1 -0
- package/dist/client/assets/use-never-published-Dz_fylPy.js +1 -0
- package/dist/client/assets/use-org-fs-CwOfnGxA.js +1 -0
- package/dist/client/assets/use-org-notice-CqY792jc.js +1 -0
- package/dist/client/assets/use-org-repo-syncs-vZ0K6s_c.js +1 -0
- package/dist/client/assets/use-org-sso-Ba8Nu3bB.js +1 -0
- package/dist/client/assets/use-organization-settings-COfNAHE5.js +1 -0
- package/dist/client/assets/use-panel-navigate-3vE9xSHD.js +1 -0
- package/dist/client/assets/use-project-native-view-presence-ZiETUsg6.js +1 -0
- package/dist/client/assets/use-project-scope-Kr-x4L3R.js +1 -0
- package/dist/client/assets/use-recent-apps-LwGPbax8.js +1 -0
- package/dist/client/assets/use-reports-diagnostic-CRZjklP_.js +1 -0
- package/dist/client/assets/use-sandbox-events-BpgKHG4A.js +2 -0
- package/dist/client/assets/use-secrets-CJemEGEq.js +1 -0
- package/dist/client/assets/use-section-preview-base-CHNg45Lp.js +1 -0
- package/dist/client/assets/use-sidebar-collapsed-DItqXDBb.js +1 -0
- package/dist/client/assets/use-tags-DhlYAQW2.js +1 -0
- package/dist/client/assets/use-task-board-analytics-BvRXGAd9.js +1 -0
- package/dist/client/assets/use-task-board-item-prs-gtItx2hM.js +1 -0
- package/dist/client/assets/use-task-board-items-BzqC9Y7K.js +1 -0
- package/dist/client/assets/use-task-board-prompts-7jyYjgpj.js +1 -0
- package/dist/client/assets/use-task-metadata-zqAgAqTz.js +1 -0
- package/dist/client/assets/use-thread-outputs-CUHPfq8O.js +1 -0
- package/dist/client/assets/use-view-draft-kind-Jydb7grX.js +1 -0
- package/dist/client/assets/use-voice-input-TAUwPuti.js +1 -0
- package/dist/client/assets/useInfiniteQuery-CrdnpEov.js +1 -0
- package/dist/client/assets/useQueries-JFb05AJh.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BfQiipma.js +1 -0
- package/dist/client/assets/users-f8EfLxs-.js +1 -0
- package/dist/client/assets/utils-DGeDmUlv.js +4 -0
- package/dist/client/assets/variant-calendar-BttrajzN.js +1 -0
- package/dist/client/assets/variant-matcher-override-BwlNNQnX.js +1 -0
- package/dist/client/assets/view-header-C-eCfmgS.js +1 -0
- package/dist/client/assets/virtual-mcp-V9dTdtB7.js +1 -0
- package/dist/client/assets/watch-sse-pool-CT562yBl.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/AlertCircle-B79T3vQg.js +0 -1
- package/dist/client/assets/AreaChart-1DjcfWAa.js +0 -1
- package/dist/client/assets/ArrowLeft-CFDBmtQn.js +0 -1
- package/dist/client/assets/ArrowRight-_1mjBk8q.js +0 -1
- package/dist/client/assets/ArrowUp-CGwCu8lq.js +0 -1
- package/dist/client/assets/BookOpen01-Cja5K-Zg.js +0 -1
- package/dist/client/assets/CartesianChart-DbfxDEk8.js +0 -1
- package/dist/client/assets/CategoricalChart-aQS_hxQA.js +0 -33
- package/dist/client/assets/CheckCircle-BdP9IvPO.js +0 -1
- package/dist/client/assets/ChevronDown-NJEKYVpP.js +0 -1
- package/dist/client/assets/ChevronSelectorVertical-QA_eM8SF.js +0 -1
- package/dist/client/assets/ChevronUp-CdlwQKca.js +0 -1
- package/dist/client/assets/CreditCard01-u7S1Papb.js +0 -1
- package/dist/client/assets/Eye-_AXqkWO1.js +0 -1
- package/dist/client/assets/File02-C4vk1-0W.js +0 -1
- package/dist/client/assets/Fingerprint04-bmDV_Zt8.js +0 -1
- package/dist/client/assets/Globe04-BXEQpgH7.js +0 -1
- package/dist/client/assets/Image01-DLy5un7V.js +0 -1
- package/dist/client/assets/Key01-CX9koaUb.js +0 -1
- package/dist/client/assets/LayoutLeft-Cc8HE6Mh.js +0 -1
- package/dist/client/assets/LinkBroken01-Be5szqzO.js +0 -1
- package/dist/client/assets/MessageCircle01-CWoIju4P.js +0 -1
- package/dist/client/assets/Minus-DJIrYTlh.js +0 -1
- package/dist/client/assets/Monitor01-DO2zUSLy.js +0 -1
- package/dist/client/assets/Play-Upgk6Vwe.js +0 -1
- package/dist/client/assets/Plus-C6PPIhQG.js +0 -1
- package/dist/client/assets/ReferenceLine-DHROouFX.js +0 -1
- package/dist/client/assets/SearchMd-ByGW18TK.js +0 -1
- package/dist/client/assets/ShoppingBag01-CoDrN_Bf.js +0 -1
- package/dist/client/assets/Sun-CFnDb3Gg.js +0 -1
- package/dist/client/assets/SwitchHorizontal01-DdMiH6v0.js +0 -1
- package/dist/client/assets/Tool01-C5U5GfFn.js +0 -1
- package/dist/client/assets/Tooltip-DMrOgBeB.js +0 -1
- package/dist/client/assets/Trash01-D3BXHl0z.js +0 -1
- package/dist/client/assets/Upload01-CmSjLpWk.js +0 -1
- package/dist/client/assets/UserCheck01-DkrJoTgc.js +0 -1
- package/dist/client/assets/UserSquare-CzDpovKf.js +0 -1
- package/dist/client/assets/Users01-CsPiPLgE.js +0 -1
- package/dist/client/assets/XClose-VFawdZTC.js +0 -1
- package/dist/client/assets/Zap-Dg95CWCj.js +0 -1
- package/dist/client/assets/access-gate-DEhQZEHK.js +0 -1
- package/dist/client/assets/add-connection-dialog-CY-1hoag.js +0 -1
- package/dist/client/assets/agent-app-CS5E8TvR.js +0 -1
- package/dist/client/assets/agent-assets-BvO33f5b.js +0 -1
- package/dist/client/assets/agent-automation-CNHhtRSa.js +0 -20
- package/dist/client/assets/agent-automations-8X1ZfMQ4.js +0 -1
- package/dist/client/assets/agent-blog-B-qgjc0R.js +0 -2
- package/dist/client/assets/agent-blog-post-ihtWC77H.js +0 -2
- package/dist/client/assets/agent-business-case-BqRjG0NY.js +0 -1
- package/dist/client/assets/agent-calendar-Bggq_CeJ.js +0 -1
- package/dist/client/assets/agent-capabilities-CHyVSIfo.js +0 -1
- package/dist/client/assets/agent-connect-sources-6QJ7xuGT.js +0 -1
- package/dist/client/assets/agent-deck-DDkow9Jj.js +0 -1
- package/dist/client/assets/agent-e2e-BFv54RnX.js +0 -1
- package/dist/client/assets/agent-experiments-CquSa1RS.js +0 -1
- package/dist/client/assets/agent-file-BxJTMm5y.js +0 -1
- package/dist/client/assets/agent-hosting-DdRCvd0_.js +0 -1
- package/dist/client/assets/agent-icon-mHnKN98z.js +0 -1
- package/dist/client/assets/agent-library-file-BEu5nmWb.js +0 -1
- package/dist/client/assets/agent-library-t6Vm-IxI.js +0 -1
- package/dist/client/assets/agent-overview-GOOAoGpS.js +0 -1
- package/dist/client/assets/agent-releases-DUkasnwf.js +0 -3
- package/dist/client/assets/agent-settings-IVdSvBTa.js +0 -1
- package/dist/client/assets/agent-site-editor-BtLnQekr.js +0 -16
- package/dist/client/assets/agent-site-editor-code-SuEMtdpK.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Dm31bcya.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-Dxo8gMEH.js +0 -1
- package/dist/client/assets/agent-view-DhGmpIyd.js +0 -1
- package/dist/client/assets/agent-view-guard-ddWX7YUu.js +0 -1
- package/dist/client/assets/ai-providers-CftklSU0.js +0 -1
- package/dist/client/assets/alert-ZlCw8k67.js +0 -1
- package/dist/client/assets/analytics-sections-qmiNeFYX.js +0 -1
- package/dist/client/assets/api-keys-BXYphvnv.js +0 -1
- package/dist/client/assets/api-keys-BlILgoSx.js +0 -1
- package/dist/client/assets/app-editor-BmpLgmI9.js +0 -1
- package/dist/client/assets/asset-utils-CpZNl06_.js +0 -1
- package/dist/client/assets/auth-Dj5MlzXt.js +0 -1
- package/dist/client/assets/auth-catchall-D_wyvME9.js +0 -1
- package/dist/client/assets/auth-entry-CT9zrr5H.js +0 -1
- package/dist/client/assets/auth-split-layout-BYLGv9rB.js +0 -1
- package/dist/client/assets/authenticate-and-persist-oauth-CgoDUSs7.js +0 -1
- package/dist/client/assets/automation-list-row-BIiiA8x6.js +0 -1
- package/dist/client/assets/automation-runs-C1aNVdBb.js +0 -1
- package/dist/client/assets/automations-DiBZRi3C.js +0 -1
- package/dist/client/assets/badge-D43CW9ql.js +0 -1
- package/dist/client/assets/block-document-DLzckaqO.js +0 -3
- package/dist/client/assets/blocks-preview-workspace-context-C1Xh6Ud9.js +0 -1
- package/dist/client/assets/blocks-tab-states-Dt0sIut6.js +0 -1
- package/dist/client/assets/blog-preview-url-BmfGCEca.js +0 -1
- package/dist/client/assets/blog-schema-DTkkJRmS.js +0 -1
- package/dist/client/assets/blog-source-gate-obpk25AX.js +0 -1
- package/dist/client/assets/blog-view-gate-BeBRgyJz.js +0 -1
- package/dist/client/assets/buckets-DqLM3qT3.js +0 -1
- package/dist/client/assets/build-improve-prompt-doc-BMIlWXqc.js +0 -2
- package/dist/client/assets/calendar-BVJiHXRt.js +0 -1
- package/dist/client/assets/capability-load-error-D-3178zq.js +0 -1
- package/dist/client/assets/category-editor-CJYnKN4F.js +0 -1
- package/dist/client/assets/category-tree-By1yHef5.js +0 -18
- package/dist/client/assets/chart-B0-vTmRF.js +0 -13
- package/dist/client/assets/chat-context-DElPd_KV.js +0 -43
- package/dist/client/assets/chat-draft-DYeAZXwC.js +0 -1
- package/dist/client/assets/checkbox-EN58bnRW.js +0 -1
- package/dist/client/assets/choose-editor-B6TNwHW_.js +0 -1
- package/dist/client/assets/cli-auth-success-DOsGD2k0.js +0 -1
- package/dist/client/assets/cms-settings-editor-Dnr_wfon.js +0 -1
- package/dist/client/assets/cms-store-drafts-DqlEEelF.js +0 -1
- package/dist/client/assets/collapsible-SwapIfxI.js +0 -1
- package/dist/client/assets/collection-detail-DDKzScDr.js +0 -1
- package/dist/client/assets/collection-display-button-BrJc-eHB.js +0 -1
- package/dist/client/assets/collection-search-DrcBBUCd.js +0 -1
- package/dist/client/assets/collection-table-wrapper-Cr2x7lMQ.js +0 -1
- package/dist/client/assets/collection-tabs-DNPK2rVO.js +0 -1
- package/dist/client/assets/combobox-BwdUn3zV.js +0 -1
- package/dist/client/assets/command-SY2ZnRo9.js +0 -1
- package/dist/client/assets/companion-mcps-section-Z9bmavQ2.js +0 -1
- package/dist/client/assets/config-BSLjSLLm.js +0 -1
- package/dist/client/assets/connect-dNubHVjE.js +0 -9
- package/dist/client/assets/connect-key-DPTpHhHK.js +0 -1
- package/dist/client/assets/connect-layout-DhYyXJ_a.js +0 -1
- package/dist/client/assets/connect-source-dialog-aKk77DlM.js +0 -1
- package/dist/client/assets/connection-INGF_Tys.js +0 -1
- package/dist/client/assets/connection-card-Da6QMOrb.js +0 -1
- package/dist/client/assets/connection-detail-iamd96u6.js +0 -1
- package/dist/client/assets/connection-form-helpers-DP9s_gSg.js +0 -1
- package/dist/client/assets/connection-slug-BUzOiIKa.js +0 -1
- package/dist/client/assets/connections-CxDpre2g.js +0 -1
- package/dist/client/assets/content-changes-RUsWfEyU.js +0 -1
- package/dist/client/assets/content-tab-BHPLt3xh.js +0 -19
- package/dist/client/assets/context-8uRKn5a5.js +0 -1
- package/dist/client/assets/context-menu-D_l3ejD0.js +0 -1
- package/dist/client/assets/context-shell-BDr9r5_c.js +0 -37
- package/dist/client/assets/create-organization-dialog-SvXxbH0G.js +0 -1
- package/dist/client/assets/daily-pulse-OhSSo082.js +0 -1
- package/dist/client/assets/delete-copy-BI6H_-VN.js +0 -4
- package/dist/client/assets/device-hint-D0KKa1HI.js +0 -1
- package/dist/client/assets/discover-hFnfS6fz.js +0 -1
- package/dist/client/assets/domain-settings-DE07O2_X.js +0 -1
- package/dist/client/assets/drawer-Cc5GoGE_.js +0 -1
- package/dist/client/assets/editor-CuwMJTkv.js +0 -11
- package/dist/client/assets/editor-classes-nwzo85k0.js +0 -1
- package/dist/client/assets/empty-state-BOACqe8n.js +0 -1
- package/dist/client/assets/empty-state-OmCxeENw.js +0 -1
- package/dist/client/assets/experiments-tab-choice-Bqizq6-B.js +0 -1
- package/dist/client/assets/extract-connection-data-u4OYVXGw.js +0 -1
- package/dist/client/assets/feature-gate-DmGuW1HX.js +0 -1
- package/dist/client/assets/feature-paywall-C9J82eQO.js +0 -1
- package/dist/client/assets/file-explorer-B1FCcYRv.js +0 -2
- package/dist/client/assets/file-preview-CCN1XfzT.js +0 -1
- package/dist/client/assets/file-share-button-DRrjFIUZ.js +0 -3
- package/dist/client/assets/file-type-icon-Ch8YrFS_.js +0 -1
- package/dist/client/assets/folder-icon-DcGaEdrE.js +0 -1
- package/dist/client/assets/form-CJYtyj_a.js +0 -1
- package/dist/client/assets/frame-navigation-E7yKrUfa.js +0 -1
- package/dist/client/assets/gateway-client-BgktQVnM.js +0 -1
- package/dist/client/assets/general-Cz3Mlr1e.js +0 -1
- package/dist/client/assets/github-icon-r0MgwWDh.js +0 -1
- package/dist/client/assets/held-block-view-Di7yDwAi.js +0 -3
- package/dist/client/assets/home-BTdnZuGt.js +0 -1
- package/dist/client/assets/home-overview--FC1AzlV.js +0 -1
- package/dist/client/assets/hosted-reconcile-CSjK-swv.js +0 -1
- package/dist/client/assets/icon-button-DDIgoNaN.js +0 -1
- package/dist/client/assets/index-51kU6OFU.js +0 -1
- package/dist/client/assets/index-BN4Io9gE.js +0 -4
- package/dist/client/assets/index-B_2fJp-u.css +0 -1
- package/dist/client/assets/index-BmiiXn5j.js +0 -1
- package/dist/client/assets/index-BxXZTFf-.js +0 -26
- package/dist/client/assets/index-C4lDOrVl.js +0 -1
- package/dist/client/assets/index-CC54wkAD.js +0 -1
- package/dist/client/assets/index-CLK91j5E.js +0 -1
- package/dist/client/assets/index-D1W7ut2I.js +0 -269
- package/dist/client/assets/index-DDMNdM21.js +0 -1
- package/dist/client/assets/index-DH9TD1uL.js +0 -4
- package/dist/client/assets/index-DXzlWhjJ.js +0 -1
- package/dist/client/assets/index-DgGQR13e.js +0 -69
- package/dist/client/assets/index-H8x29Tys.js +0 -15
- package/dist/client/assets/index-HG0Hn-tb.js +0 -5
- package/dist/client/assets/index-ICy5uJS1.js +0 -1
- package/dist/client/assets/index-KDBjhzA9.js +0 -1
- package/dist/client/assets/index-Yw-FAojM.js +0 -1
- package/dist/client/assets/index-redirect-CCAMfHj_.js +0 -1
- package/dist/client/assets/infiniteQueryObserver-DOpE6BBu.js +0 -1
- package/dist/client/assets/infra-billing-CXB12KfP.js +0 -1
- package/dist/client/assets/input-BpwrytAl.js +0 -1
- package/dist/client/assets/input-DoVas9av.js +0 -17
- package/dist/client/assets/integration-icon-DXN-XJCR.js +0 -1
- package/dist/client/assets/item-actions-CkyvC2L-.js +0 -1
- package/dist/client/assets/jira-icon-DYRW4UM7.js +0 -1
- package/dist/client/assets/label-CJFBh9Hz.js +0 -1
- package/dist/client/assets/layout-E6Mx6Nvv.js +0 -1
- package/dist/client/assets/legacy-admin-welcome-dialog-BdcU4w3n.js +0 -1
- package/dist/client/assets/legacy-agents-deep-RrLkFDTz.js +0 -1
- package/dist/client/assets/legacy-main-redirect-jo5L4iyk.js +0 -1
- package/dist/client/assets/library-Rf-tFgTl.js +0 -1
- package/dist/client/assets/library-tab-hHLKC6vr.js +0 -162
- package/dist/client/assets/login-DOIEj3kL.js +0 -1
- package/dist/client/assets/markdown-Cs_VFIOo.js +0 -93
- package/dist/client/assets/mcp-app-renderer-DXnjbkH-.js +0 -11
- package/dist/client/assets/mcp-oauth-DqtV9nxi.js +0 -1
- package/dist/client/assets/mcp-oauth-m9Nn_Cby.js +0 -1
- package/dist/client/assets/members-C1d4xgmU.js +0 -1
- package/dist/client/assets/memory-DZqrn_HB.js +0 -7
- package/dist/client/assets/mock-board-DlNminaI.js +0 -10
- package/dist/client/assets/monaco-editor-BUZ150q-.js +0 -9
- package/dist/client/assets/monitoring-sYMmBqE5.js +0 -2
- package/dist/client/assets/monitoring-stats-row-BhJSpOTB.js +0 -1
- package/dist/client/assets/multi-select-Bh8RuVPt.js +0 -1
- package/dist/client/assets/mustache-DDfkx3Qd.js +0 -4
- package/dist/client/assets/named-rule-step-DipCSV0p.js +0 -1
- package/dist/client/assets/named-rule-view-_NZ7qOsC.js +0 -1
- package/dist/client/assets/new-project-dialog-CRE_OifY.js +0 -1
- package/dist/client/assets/new-project-store-C_CW1RtD.js +0 -1
- package/dist/client/assets/oauth-callback-ai-provider-CXQ3H8DV.js +0 -1
- package/dist/client/assets/oauth-callback-bS0CM5qz.js +0 -1
- package/dist/client/assets/oauth-consent-DXEafLdq.js +0 -1
- package/dist/client/assets/onboarding-CagamfPF.js +0 -1
- package/dist/client/assets/openai-conversation-BiojiiW5.js +0 -3
- package/dist/client/assets/optimistic-project-sidebar-views-1-DUBv8z.js +0 -1
- package/dist/client/assets/order-monitor-day-BOwSvE0N.js +0 -1
- package/dist/client/assets/organization-choice-DtvjAEPE.js +0 -1
- package/dist/client/assets/orgs-DztNhQ1I.js +0 -1
- package/dist/client/assets/own-accounts-section-wjvAAFf5.js +0 -1
- package/dist/client/assets/pair-DxgOEXG6.js +0 -48
- package/dist/client/assets/parse-sections-5x1kD0Ku.js +0 -4
- package/dist/client/assets/plan-DnP7NDfJ.js +0 -1
- package/dist/client/assets/plan-ladder-CzWQv3Fw.js +0 -1
- package/dist/client/assets/plan-page-D5xGomuu.js +0 -6
- package/dist/client/assets/plan-usage-card-BHY2xgyw.js +0 -6
- package/dist/client/assets/popover-DbSdZVd4.js +0 -1
- package/dist/client/assets/post-calendar-Br_sRpTk.js +0 -1
- package/dist/client/assets/post-editor-hYFyaI7Z.js +0 -2
- package/dist/client/assets/preview-content-C_sHEYDI.js +0 -1
- package/dist/client/assets/preview-dialog-BueRO4-u.js +0 -1
- package/dist/client/assets/preview-panel-D70i4kYa.js +0 -1
- package/dist/client/assets/preview-tab-CR27meIw.js +0 -557
- package/dist/client/assets/primitives-C_DAyRMT.js +0 -1
- package/dist/client/assets/product-picker-dialog-Cwx6BuL6.js +0 -1
- package/dist/client/assets/profile-DkquqcCP.js +0 -1
- package/dist/client/assets/project-app-view-5rTPzvKu.js +0 -1
- package/dist/client/assets/project-apps-DevR_6vG.js +0 -1
- package/dist/client/assets/project-icon-BD1ByOdc.js +0 -1
- package/dist/client/assets/project-index-BnS4CpAf.js +0 -1
- package/dist/client/assets/project-reports-BurjoLQc.js +0 -1
- package/dist/client/assets/project-tasks-nlwCObOo.js +0 -1
- package/dist/client/assets/projects-empty-state-D08dJvBE.js +0 -1
- package/dist/client/assets/projects-vpomg-Z6.js +0 -1
- package/dist/client/assets/prompts-jqUHmJ_e.js +0 -1
- package/dist/client/assets/record-editor-DFvIgTaA.js +0 -1
- package/dist/client/assets/redirect-editor-Cieib2_p.js +0 -1
- package/dist/client/assets/reports-BQEZzmQr.js +0 -3
- package/dist/client/assets/reports-DrKbPCdl.js +0 -1
- package/dist/client/assets/reports-onboarding-DOs_4gka.js +0 -1
- package/dist/client/assets/reports-tab-Bajtbz_h.js +0 -2
- package/dist/client/assets/repositories-BWyOhQYL.js +0 -1
- package/dist/client/assets/repositories-CBIonCcP.js +0 -1
- package/dist/client/assets/repository-binding-CGFnGVxJ.js +0 -1
- package/dist/client/assets/repository-picker-BPjktPxl.js +0 -1
- package/dist/client/assets/require-capability-CQ3NJym_.js +0 -1
- package/dist/client/assets/required-auth-layout-DmEyED-o.js +0 -1
- package/dist/client/assets/reset-password-Cp_nLiLi.js +0 -1
- package/dist/client/assets/resizable-zRzPDJM0.js +0 -1
- package/dist/client/assets/resolve-tab-icon-XrYn5LuK.js +0 -1
- package/dist/client/assets/review-settings-DHSAoP1k.js +0 -1
- package/dist/client/assets/role-color-DVzABbHa.js +0 -1
- package/dist/client/assets/roles-B7pKl-QS.js +0 -1
- package/dist/client/assets/route-BChDSB4_.js +0 -1
- package/dist/client/assets/route-nMFReO1B.js +0 -1
- package/dist/client/assets/route-oRV_9YzF.js +0 -1
- package/dist/client/assets/route-page-header-DXblwPS1.js +0 -1
- package/dist/client/assets/sandbox-git-api-z3lgxnDh.js +0 -1
- package/dist/client/assets/sandbox-lifecycle-context-DXG6Bomw.js +0 -1
- package/dist/client/assets/save-status-zH9sfFJK.js +0 -1
- package/dist/client/assets/schema-B0fnhJuA.js +0 -1
- package/dist/client/assets/schema-C-iQKwVz.js +0 -1
- package/dist/client/assets/scroll-area-Dm0jhVU4.js +0 -1
- package/dist/client/assets/search-input-DPbHiMJC.js +0 -1
- package/dist/client/assets/search-toggle-BTwJc97H.js +0 -1
- package/dist/client/assets/secret-picker-B6OGx2mQ.js +0 -1
- package/dist/client/assets/secrets-Cf1UmVo2.js +0 -1
- package/dist/client/assets/section-array-field-Dfaksxcj.js +0 -1
- package/dist/client/assets/sections-UpitVoFq.js +0 -1
- package/dist/client/assets/sections-editor-DOTx2SrX.js +0 -1
- package/dist/client/assets/select-Us30SuzI.js +0 -1
- package/dist/client/assets/select-model-DvuOFAKE.js +0 -1
- package/dist/client/assets/seo-editor-D_wkdMi9.js +0 -1
- package/dist/client/assets/separator-Bdq1NG6k.js +0 -1
- package/dist/client/assets/session-runtime-BIDE-rQF.js +0 -1
- package/dist/client/assets/settings-tab-DHHNeg02.js +0 -1
- package/dist/client/assets/sheet-D8HVkLc6.js +0 -1
- package/dist/client/assets/shell-layout-CCvUDm4c.js +0 -1
- package/dist/client/assets/site-draft-actions-BLjlvxVb.js +0 -7
- package/dist/client/assets/site-draft-view-B6y_crr2.js +0 -1
- package/dist/client/assets/site-editor-BVtedbL2.js +0 -1
- package/dist/client/assets/site-editor-toast-B6psqL4S.js +0 -1
- package/dist/client/assets/skills-gf32nwAO.js +0 -1
- package/dist/client/assets/slider-oJh009BK.js +0 -1
- package/dist/client/assets/sortable.esm-DhKgeEID.js +0 -1
- package/dist/client/assets/sso-CRyh0I61.js +0 -1
- package/dist/client/assets/suggestion-HxkFbXWu.js +0 -2
- package/dist/client/assets/super-agent-icon-DhNy1L1t.js +0 -1
- package/dist/client/assets/switch-C8bVi-NX.js +0 -1
- package/dist/client/assets/synced-repos-M8yw1Jwe.js +0 -1
- package/dist/client/assets/tab-icon-glyph-BJdR1rTv.js +0 -1
- package/dist/client/assets/table-BOhYBEKO.js +0 -1
- package/dist/client/assets/tabs-Bfy1intI.js +0 -1
- package/dist/client/assets/task-board-CgO9M3z4.js +0 -1
- package/dist/client/assets/task-key-B2-Ue6HC.js +0 -5
- package/dist/client/assets/task-route-Ba3aez9x.js +0 -1
- package/dist/client/assets/task-status-CdYrOhRh.js +0 -1
- package/dist/client/assets/taskboard-analytics-loV9TaFT.js +0 -1
- package/dist/client/assets/tasks-Brq4Pp7A.js +0 -4
- package/dist/client/assets/tasks-Z7BLYet6.js +0 -1
- package/dist/client/assets/textarea-D93s_9gX.js +0 -1
- package/dist/client/assets/thread-analytics-BxXXEL8G.js +0 -1
- package/dist/client/assets/thread-button-DQmfTj65.js +0 -1
- package/dist/client/assets/thread-intent-CJjEXtuE.js +0 -15
- package/dist/client/assets/thread-route-Cpqj5B6r.js +0 -1
- package/dist/client/assets/thread-route-khw3rYS4.js +0 -1
- package/dist/client/assets/thread-sheet-body-DE8XX1TP.js +0 -1
- package/dist/client/assets/time-range-picker-w3lHNK8L.js +0 -1
- package/dist/client/assets/toggle-group-DpYPg3qc.js +0 -1
- package/dist/client/assets/tool-set-selector-CRZL7bC5.js +0 -1
- package/dist/client/assets/toolbar-icon-button-6BTsLHAb.js +0 -1
- package/dist/client/assets/tooltip-BZz0vywC.js +0 -1
- package/dist/client/assets/tooltipContext-CZ3OeUnD.js +0 -1
- package/dist/client/assets/track-CR6tDDcQ.js +0 -1
- package/dist/client/assets/types-C3qQbU3-.js +0 -77
- package/dist/client/assets/url-slug-DTf0xW9o.js +0 -1
- package/dist/client/assets/usage-stats-CLMr8vHI.js +0 -141
- package/dist/client/assets/use-ai-providers-COZOIITa.js +0 -1
- package/dist/client/assets/use-api-keys-B2DhKv5O.js +0 -1
- package/dist/client/assets/use-apply-named-rule-D22hDqIn.js +0 -1
- package/dist/client/assets/use-ask-in-chat-i9g8xTsQ.js +0 -1
- package/dist/client/assets/use-automations-y62q9wiV.js +0 -1
- package/dist/client/assets/use-autosave-D8b9idjo.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-BzS0SD5J.js +0 -1
- package/dist/client/assets/use-blog-view-Bj96i8iq.js +0 -1
- package/dist/client/assets/use-chat-layout-state-CRsWJAkm.js +0 -1
- package/dist/client/assets/use-cms-publish-actions-Bws1dcKi.js +0 -10
- package/dist/client/assets/use-connect-companion-Cd1kyM3y.js +0 -1
- package/dist/client/assets/use-connection-vpR-lNEV.js +0 -1
- package/dist/client/assets/use-content-sync-SowupOFR.js +0 -1
- package/dist/client/assets/use-copy-9vSDNA2-.js +0 -1
- package/dist/client/assets/use-current-view-e2srGh0R.js +0 -1
- package/dist/client/assets/use-date-fns-locale-DVuctzWR.js +0 -1
- package/dist/client/assets/use-debounced-autosave-C31axPZ5.js +0 -1
- package/dist/client/assets/use-debounced-value-Cw8HgnQu.js +0 -1
- package/dist/client/assets/use-deco-credits-DPzf77AT.js +0 -1
- package/dist/client/assets/use-decopilot-events-Dp7emgSR.js +0 -1
- package/dist/client/assets/use-delete-block-Crpx8FjE.js +0 -1
- package/dist/client/assets/use-delete-connection-BQ9YqO-c.js +0 -1
- package/dist/client/assets/use-deployment-admin-By_xF0wv.js +0 -1
- package/dist/client/assets/use-entitlements-Bi51m-s-.js +0 -1
- package/dist/client/assets/use-fast-preview-draft-url-CRmeng0Q.js +0 -1
- package/dist/client/assets/use-file-configs-GoxRHe-r.js +0 -1
- package/dist/client/assets/use-id-selection-BQh1Bg7W.js +0 -1
- package/dist/client/assets/use-in-settings-CU_P2dfR.js +0 -1
- package/dist/client/assets/use-inbox-feed-bSGgas59.js +0 -1
- package/dist/client/assets/use-infinite-scroll-DfV_gkqU.js +0 -1
- package/dist/client/assets/use-join-requests-DI3-5eWl.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DTbCL9St.js +0 -1
- package/dist/client/assets/use-mcp-auth-status-C7HNLPrb.js +0 -1
- package/dist/client/assets/use-mcp-client-C_qG7wUZ.js +0 -10
- package/dist/client/assets/use-mcp-prompts-BVogmm65.js +0 -1
- package/dist/client/assets/use-mcp-tools-C6UyNv6N.js +0 -1
- package/dist/client/assets/use-mobile-BA8hUvQw.js +0 -1
- package/dist/client/assets/use-move-blocks-BuTBuPq7.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-BlGlq6Si.js +0 -1
- package/dist/client/assets/use-never-published-iwVh38ki.js +0 -1
- package/dist/client/assets/use-org-fs-CvKheX_E.js +0 -1
- package/dist/client/assets/use-org-notice-5uXj9qdB.js +0 -1
- package/dist/client/assets/use-org-repo-syncs-De9jW4li.js +0 -1
- package/dist/client/assets/use-org-sso-aEsmoftk.js +0 -1
- package/dist/client/assets/use-organization-settings-DzL3Na4t.js +0 -1
- package/dist/client/assets/use-panel-navigate-RwlB8yz2.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-LtOEv_bc.js +0 -1
- package/dist/client/assets/use-project-scope-CayH-uv6.js +0 -1
- package/dist/client/assets/use-recent-apps-DruGOBJK.js +0 -1
- package/dist/client/assets/use-reports-diagnostic-DmG6vfW3.js +0 -1
- package/dist/client/assets/use-sandbox-events-BC-9Qeez.js +0 -2
- package/dist/client/assets/use-secrets-Bx8YDUF-.js +0 -1
- package/dist/client/assets/use-section-preview-base-23Zb6ABj.js +0 -1
- package/dist/client/assets/use-sidebar-collapsed-BWfZDELa.js +0 -1
- package/dist/client/assets/use-tags-DQn-ihwP.js +0 -1
- package/dist/client/assets/use-task-board-analytics-4KchvJP_.js +0 -1
- package/dist/client/assets/use-task-board-item-prs-bjSiDC9b.js +0 -1
- package/dist/client/assets/use-task-board-items-BUgzBLKd.js +0 -1
- package/dist/client/assets/use-task-board-prompts-CScMHEY4.js +0 -1
- package/dist/client/assets/use-task-metadata-ml12mmZb.js +0 -1
- package/dist/client/assets/use-thread-outputs-DKNz-3Hm.js +0 -1
- package/dist/client/assets/use-view-draft-kind-6ZToH2lU.js +0 -1
- package/dist/client/assets/use-voice-input-FNIQ7Gtg.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B7H5rw7X.js +0 -1
- package/dist/client/assets/useQueries-b1U_PciZ.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BAeDGxcg.js +0 -1
- package/dist/client/assets/users-CjER3r5S.js +0 -1
- package/dist/client/assets/utils-DxxrR_sy.js +0 -4
- package/dist/client/assets/variant-calendar-DYmrGYCj.js +0 -1
- package/dist/client/assets/variant-matcher-override-ksW5aMSA.js +0 -1
- package/dist/client/assets/view-header-COMgGMz-.js +0 -1
- package/dist/client/assets/virtual-mcp-DXFiFNeR.js +0 -1
- package/dist/client/assets/watch-sse-pool-DZnjbZdQ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aJ as Dt,aK as q,bs as je,bF as _n,dD as Oe,dB as xn,ez as we,c as A,i as F,eA as Rn,eB as Tn,q as Z,r as L,eC as Pn,K as g,eD as Y,eE as X,bE as $n,a as Nn,aw as De,a6 as jn,bA as It,eF as An,eG as _t,au as Mn,bw as B,eh as xt,eH as Ln,eI as Qn,eJ as Un,t as te,j as z}from"./index-D1W7ut2I.js";import{C as j,E as T,i as Ae,P as Bn,b as Fn,c as Me,d as Rt,e as Tt}from"./content-changes-RUsWfEyU.js";import{b as Le}from"./repository-binding-CGFnGVxJ.js";import{e as Pt}from"./backoff-CrEUbyZT.js";import{b as pe}from"./sandbox-url-D3mC8qhT.js";import{u as Cn}from"./chat-context-DElPd_KV.js";import{i as Vn,u as Hn}from"./use-sandbox-events-BC-9Qeez.js";import{u as Qe}from"./use-blocks-v8-project-BzS0SD5J.js";import{u as $t}from"./use-voice-input-FNIQ7Gtg.js";import{s as ot}from"./session-runtime-BIDE-rQF.js";import{s as Jn}from"./utils-DxxrR_sy.js";import{a as Wn}from"./sandbox-git-api-z3lgxnDh.js";function Nt(e){try{const t=new URL(e);if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const n=t.hostname.toLowerCase();return n==="127.0.0.1"||n==="[::1]"||n==="localhost"}catch{return!1}}function ue(e){try{const t=new URL(e);return(t.hostname==="127.0.0.1"||t.hostname==="[::1]")&&(t.hostname="localhost"),t.href}catch{return e}}const jt=Dt({endpoint:q().max(2048).refine(e=>Nt(e)&&new URL(e).pathname==="/rpc").transform(ue)});function vr(e){const t=new URLSearchParams(e.replace(/^#/,"")),n=jt.safeParse({endpoint:t.get("endpoint")??""});return n.success?n.data:null}function At(e){const t=jt.safeParse(e);return t.success?t.data:null}const Mt="studio:deco-serve-last";function br(e){try{localStorage.setItem(Mt,JSON.stringify(e))}catch{}}function wr(){try{const e=localStorage.getItem(Mt);return e?At(JSON.parse(e)):null}catch{return null}}function pr(e){try{return new URL(ue(e)).host}catch{return e}}function Yn(e,t=1e4){return Math.min(1e3*2**Math.max(0,e-1),t)}const Gn="http://localhost:4545/rpc";class Ue extends Error{constructor(t="the endpoint isn't deco serve"){super(t),this.name="NotDecoServeError"}}function zn(e){if(e instanceof Ue)return{reason:"not-deco-serve"};if(!(e instanceof j))return{reason:"not-answering"};switch(e.code){case T.Unauthorized:case T.MethodNotFound:return{reason:"outdated"};case T.Unsupported:return Ae(e)?{reason:"outdated"}:{reason:"version-mismatch"};case T.Unavailable:return/^the endpoint answered HTTP/.test(e.message)?{reason:"not-deco-serve"}:{reason:"error",detail:e.message};default:return{reason:"error",detail:e.message}}}function mr(e,t){if(e)return[ue(e.endpoint)];const n=[t?.endpoint,Gn].filter(o=>!!o).map(ue);return[...new Set(n)]}const Xn=Dt({blocks:Oe(q(),Oe(q(),xn()).refine(je)),versions:Oe(q(),q().min(1)),missing:_n(q())});function Zn(e,t){const n=Xn.parse(e),o=Object.keys(n.blocks),s=Object.keys(n.versions),r=[...o,...n.missing],i=new Set(t);if(s.length!==o.length||o.some(a=>!Object.hasOwn(n.versions,a))||r.length!==i.size||new Set(r).size!==r.length||r.some(a=>!i.has(a)))throw new Error("The CMS block response did not account for the requested names");return n}function ne(e,t){const n=e.index?.entries[t];return!!n&&je(e.blocks[t])&&e.versions[t]===n.version}function Kn(e,t,n){const o=new Map;let s=!1;for(const[r,i]of Object.entries(n.blocks)){const a=t.index?.entries[r];if(a){if(n.versions[r]!==a.version){s||=a.version===e.index?.entries[r]?.version;continue}t.blocks[r]!==e.blocks[r]||t.versions[r]!==e.versions[r]||o.set(r,i)}}return s||=n.missing.some(r=>!!t.index?.entries[r]),{blocks:o.size?{...t.blocks,...Object.fromEntries(o)}:t.blocks,versions:o.size?{...t.versions,...Object.fromEntries([...o.keys()].map(r=>[r,n.versions[r]]))}:t.versions,refreshIndex:s}}function qn(e,t,n){return!!e.index&&t.every(o=>e.index?.entries[o]?ne(e,o)&&(!n||n[o]===e.blocks[o]):!n||n[o]===void 0)}const st=50,rt=10;function eo(e,t=n=>fetch(n)){let n=1;return{async batch(o){const s=o.map(()=>n++),r=await t(new Request(e,{method:"POST",headers:{"content-type":"application/json"},credentials:"include",signal:we(),body:JSON.stringify(o.map((l,c)=>({jsonrpc:"2.0",id:s[c],method:l.method,params:l.params??{}})))}));if(!r.ok)throw new j(T.Unavailable,`the hosted CMS answered ${r.status}`);const i=await r.json(),a=new Map((Array.isArray(i)?i:[]).map(l=>[l.id,l]));return s.map(l=>{const c=a.get(l);return c?c.error?{ok:!1,error:j.from(c.error)}:{ok:!0,result:c.result}:{ok:!1,error:new j(T.InternalError,"no response for this call")}})}}}function to(e,t){if(!e)return t??{};const n={};for(const[o,s]of Object.entries(e.entries)){if(t&&Object.hasOwn(t,o)){n[o]=t[o];continue}n[o]={[Tn]:!0,...s.meta?.type?{__resolveType:s.meta.type}:{},...s.meta?.path!==void 0?{path:s.meta.path}:{},...s.meta?.refs?.length?{[Rn]:s.meta.refs}:{}}}for(const[o,s]of Object.entries(t??{}))Object.hasOwn(n,o)||(n[o]=s);return n}function no(e,t){return e?.entries[t]?.meta?.refs??[]}function oo(e,t){return Object.hasOwn(e.draft,t)?e.draft[t]?.version??null:null}function Be(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}function Ie(e,t){if(Array.isArray(e)){for(const n of e)Ie(n,t);return}if(Be(e))for(const[n,o]of Object.entries(e))n==="__resolveType"&&typeof o=="string"?t.add(o):Ie(o,t)}function Lt(e,t){if(!Be(e))return;const n={};typeof e.__resolveType=="string"&&(n.type=e.__resolveType),typeof e.path=="string"&&(n.path=e.path);const o=new Set;Ie(e,o);const s=[...o].filter(r=>t.has(r)).sort();return s.length>0&&(n.refs=s),Object.keys(n).length>0?n:void 0}function Qt(e,t,n,o){Y(e),e.setQueryData(g.contentIndex(t),s=>{if(!s)return s;const r={...s.entries},i={...s.draft},a=new Set([...Object.keys(r),...Object.keys(o)]);for(const[l,c]of Object.entries(n)){const f=i[l]?.editor??null;if(c===null||c===X){delete r[l],i[l]={operation:"delete",version:X,editor:f};continue}const h=Lt(o[l],a);r[l]={version:c,...h?{meta:h}:{}},i[l]={operation:"set",version:c,editor:f}}return{...s,entries:r,draft:i}})}function so(e,t,n,o){e.setQueryData(g.contentIndex(t),s=>{if(!s)return s;const r={...s.draft},i={...s.entries};if(o===null)delete r[n];else if(r[n]={operation:o.block===null?"delete":"set",version:o.version,editor:r[n]?.editor??null},o.block===null)delete i[n];else{const a=new Set([...Object.keys(i),n]),l=Lt(o.block,a);i[n]={version:o.version,...l?{meta:l}:{}}}return{...s,entries:i,draft:r}})}const it=new WeakMap;async function Fe(e,t,n,o,s=new Set){const r=e.getQueryData(g.contentIndex(n));if(!r)throw new j(T.Unavailable,"The CMS index is not loaded yet");let i=it.get(e);i||(i=new Map,it.set(e,i));const a=e.getQueryData(g.decofile(n))??{},l=e.getQueryData(g.contentVersions(n))??{},c=[],f=[];for(const u of new Set(o)){const d=r.entries[u];if(!d||s.has(u)||je(a[u])&&l[u]===d.version)continue;const v=i.get(`${n}\0${u}`);v?c.push(v):f.push(u)}if(f.length>0){const u=io(e,t,n,f);for(const d of f){const v=`${n}\0${d}`;i.set(v,u),u.catch(()=>{}).finally(()=>{i.get(v)===u&&i.delete(v)})}c.push(u)}await Promise.all(c);const h=fe(e,n);if(o.some(u=>h.index?.entries[u]&&!s.has(u)&&!ne(h,u)))throw new j(T.Unavailable,"A CMS block changed while loading; try again")}async function ro(e,t,n,o,s){if(!t){const i=o?.[s];return Be(i)&&!$n(i)?i:void 0}await Fe(e,t,n,[s]);const r=fe(e,n);return r.index?.entries[s]&&ne(r,s)?r.blocks[s]:void 0}function fe(e,t){return{index:e.getQueryData(g.contentIndex(t)),blocks:e.getQueryData(g.decofile(t))??{},versions:e.getQueryData(g.contentVersions(t))??{}}}async function io(e,t,n,o){const s=fe(e,n),r=[];for(let i=0;i<o.length;i+=st)r.push(o.slice(i,i+st));for(let i=0;i<r.length;i+=rt){const a=r.slice(i,i+rt),l=await t.batch(a.map(c=>({method:"cms.blocks",params:{names:c}})));if(l.length!==a.length)throw new j(T.InternalError,"Incomplete CMS batch response");for(const[c,f]of l.entries()){if(!f.ok)throw f.error;const h=Zn(f.result,a[c]),u=fe(e,n),d=Kn(s,u,h);if(Y(e),d.blocks!==u.blocks&&e.setQueryData(g.decofile(n),d.blocks),d.versions!==u.versions&&e.setQueryData(g.contentVersions(n),d.versions),d.refreshIndex)throw e.invalidateQueries({queryKey:g.decofile(n),exact:!0},{cancelRefetch:!1}),new j(T.Unavailable,"The CMS index changed while loading blocks; try again")}}}function Ce(e){const t=A.c(4);let n;t[0]!==e?(n=g.contentIndex(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:ao,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s}async function ao(){throw new Error("the content index is set by the poll")}function at(e,t){const n=A.c(8);let o;n[0]!==t?(o=Pn(t),n[0]=t,n[1]=o):o=n[1];const s=o;let r;n[2]!==e||n[3]!==s?(r=a=>e.getQueryCache().subscribe(l=>{l.query.queryHash===s&&a()}),n[2]=e,n[3]=s,n[4]=r):r=n[4];let i;return n[5]!==e||n[6]!==t?(i=()=>e.getQueryData(t),n[5]=e,n[6]=t,n[7]=i):i=n[7],L.useSyncExternalStore(r,i)}const ct=3e4;function co(e){if(!(e instanceof j))return;const t=e.data?.retryAfterMs;return typeof t=="number"&&t>0?t:void 0}function lo(e,t,n,o){const s=A.c(15),r=Z(),i=Ce(t);let a;s[0]!==t?(a=g.decofile(t),s[0]=t,s[1]=a):a=s[1];const l=at(r,a);let c;s[2]!==t?(c=g.contentVersions(t),s[2]=t,s[3]=c):c=s[3];const f=at(r,c),h=o?.withRefs??!1,u=new Set(n);if(h)for(const p of n)for(const k of no(i,p))u.add(k);const d=[...u].filter(p=>!!i?.entries[p]).sort(),v={index:i,blocks:l??{},versions:f??{}},b=d.some(p=>!ne(v,p)),w=JSON.stringify(d.map(p=>[p,i?.entries[p]?.version,ne(v,p)])),[_,S]=L.useState(null),[$,E]=L.useState(0),D=_?.key===w?_:null;L.useEffect(()=>{if(!e||!w)return;let p=!0;const k=JSON.parse(w).map(ho);return Fe(r,e,t,k).then(()=>{p&&S(P=>P?.key===w?null:P)},P=>{p&&S(Q=>({key:w,count:(Q?.key===w?Q.count:0)+1,retryAfterMs:co(P)}))}),()=>{p=!1}},[e,r,t,w,$]);let I;s[4]!==D||s[5]!==E?(I=()=>{if(!D)return;const p=Math.min(ct,D.retryAfterMs??Pt(ct,1e3,D.count-1,2,.5)),k=setTimeout(()=>E(fo),p);return()=>clearTimeout(k)},s[4]=D,s[5]=E,s[6]=I):I=s[6];let m;s[7]!==D?(m=[D],s[7]=D,s[8]=m):m=s[8],L.useEffect(I,m);const y=!e||qn(v,[...u],o?.listing),O=!!e&&b&&D!==null;let x;s[9]!==E?(x=()=>E(uo),s[9]=E,s[10]=x):x=s[10];let N;return s[11]!==y||s[12]!==O||s[13]!==x?(N={ready:y,failed:O,retry:x},s[11]=y,s[12]=O,s[13]=x,s[14]=N):N=s[14],N}function uo(e){return e+1}function fo(e){return e+1}function ho(e){const[t]=e;return t}const Ut=L.createContext(null);function go(e){const t=A.c(24),n=L.useContext(Ut),o=Qe(n?null:e),{data:s}=Nn.useSession(),r=s?.user?.id??"",i=!!e&&!!r;let a;t[0]!==i||t[1]!==r||t[2]!==e?(a=i?De.decoServeConnection(r,e):null,t[0]=i,t[1]=r,t[2]=e,t[3]=a):a=t[3];const[l,c]=ut(a);let f;t[4]!==i||t[5]!==r||t[6]!==e?(f=i?De.decoServeEndpoint(r,e):null,t[4]=i,t[5]=r,t[6]=e,t[7]=f):f=t[7];const[h,u]=ut(f);if(n)return n;let d;t[8]!==l||t[9]!==i||t[10]!==o?(d=i&&o?At(l):null,t[8]=l,t[9]=i,t[10]=o,t[11]=d):d=t[11];const v=d,b=i&&o&&typeof h=="string"?h:null;let w;t[12]!==u||t[13]!==c||t[14]!==i?(w=$=>{i&&(c($),u($.endpoint))},t[12]=u,t[13]=c,t[14]=i,t[15]=w):w=t[15];let _;t[16]!==c||t[17]!==i?(_=()=>{i&&c(null)},t[16]=c,t[17]=i,t[18]=_):_=t[18];let S;return t[19]!==v||t[20]!==b||t[21]!==w||t[22]!==_?(S={connection:v,lastEndpoint:b,set:w,clear:_},t[19]=v,t[20]=b,t[21]=w,t[22]=_,t[23]=S):S=t[23],S}function lt(e){try{const t=localStorage.getItem(e);return t===null?null:JSON.parse(t)}catch{return null}}function ut(e){const t=A.c(17),n=Z(),o=e??"";let s;t[0]!==o?(s=["localStorage",o],t[0]=o,t[1]=s):s=t[1];const r=s;let i,a;t[2]!==e?(i=()=>e?lt(e):null,a=()=>e?lt(e):null,t[2]=e,t[3]=i,t[4]=a):(i=t[3],a=t[4]);const l=!!e;let c;t[5]!==r||t[6]!==i||t[7]!==a||t[8]!==l?(c={queryKey:r,queryFn:i,initialData:a,enabled:l,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[5]=r,t[6]=i,t[7]=a,t[8]=l,t[9]=c):c=t[9];const{data:f}=F(c);let h;t[10]!==e||t[11]!==n||t[12]!==r?(h=b=>{if(e){try{b===null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(b))}catch{}n.setQueryData(r,b)}},t[10]=e,t[11]=n,t[12]=r,t[13]=h):h=t[13];const u=h,d=e?f??null:null;let v;return t[14]!==u||t[15]!==d?(v=[d,u],t[14]=u,t[15]=d,t[16]=v):v=t[16],v}function Bt(e,t=""){return{source:e,cacheKeySuffix:e==="github"?"":e==="sandbox"?":sandbox":`:serve:${t}`}}function vo(e){return JSON.stringify([e.kind==="legacy"?"legacy":"protocol",e.source,e.cacheKeySuffix])}function Sr(e){return e.kind==="protocol"||e.kind==="unavailable"}function yr(e){const t=e.hasOrg?e.orgFlag:!1,{backend:n}=e;return n===null||n==="legacy"?t:!0}function kr(e,t,n){return t!=="github"||!n?!1:e.kind==="pending"?!0:e.kind==="unavailable"&&e.siteNotOwned?!1:(e.kind==="protocol"||e.kind==="unavailable")&&e.source==="github"}function Or(e){if(e.kind!=="protocol"||e.source!=="local")return null;const t=e.describe.preview?.url;return t&&Nt(t)?t:null}function Er(e,t){return e.kind!=="protocol"||e.source!=="local"||!e.describe.assets||!t?null:new URL(t.endpoint).origin}function Ft(e){return e.hasServeConnection?"local":e.runtime==="sandbox"?"sandbox":"github"}function bo(e){if(!e.hasProject)return"legacy";const t=Ft(e);if(t==="local")return"protocol-local";if(!e.v8)return"legacy";if(t==="sandbox"){const o=e.sandboxSite;return o==="ready"?"protocol-sandbox":o==="error"?"retrying-sandbox":"pending"}const n=e.githubSite;return n==="ready"?"protocol-github":n==="not-owned"?"site-not-owned-github":n==="error"?"unavailable-github":"pending"}function wo(e){return{github:e.v8&&e.mode==="github",sandbox:e.v8&&e.mode==="sandbox"&&e.workingTreeReady}}function ft(e){return e.isError||e.errorUpdateCount>0}function po(e,t,n){if(!t||n.size===0)return e;const o={...e};for(const s of n)Object.hasOwn(t,s)?o[s]=t[s]:delete o[s];return o}function mo(e){if(!e||typeof e!="object")return[];const t=e,n=[];return typeof t.blockKey=="string"&&n.push(t.blockKey),t.writes&&typeof t.writes=="object"&&n.push(...Object.keys(t.writes)),Array.isArray(t.deletes)&&n.push(...t.deletes.filter(o=>typeof o=="string")),n}const Ct="__noSchema";function Vt(){return{manifest:{blocks:{}},schema:{definitions:{},root:{}},[Ct]:!0}}function Dr(e){return!!e&&e[Ct]===!0}function Ve(e){if(!e.ok)return e.error.code===T.NotFound;const t=e.result;return t.notModified===!1&&t.schema===null}function So(e,t){return(typeof t.name=="string"?t.name.trim():"")||e}const yo=(e,t)=>e.label.localeCompare(t.label)||e.key.localeCompare(t.key);function Ir(e){const t=new Map;for(const[n,o]of Object.entries(e)){const s=o&&typeof o=="object"&&!Array.isArray(o)?o:{},r=typeof s.__resolveType=="string"?s.__resolveType:null,i=t.get(r)??[];i.push({key:n,label:So(n,s)}),t.set(r,i)}return[...t.entries()].map(([n,o])=>({resolveType:n,blocks:o.sort(yo)})).sort((n,o)=>n.resolveType===null?1:o.resolveType===null?-1:dt(n.resolveType).localeCompare(dt(o.resolveType))||n.resolveType.localeCompare(o.resolveType))}function dt(e){return(e.split("/").filter(Boolean).at(-1)??e).replace(/\.(tsx?|jsx?)$/,"")||e}function ht(e,t,n){if(t.length===0)return n;const[o,...s]=t;if(Array.isArray(e)&&typeof o=="number"){const r=e.slice();return r[o]=ht(e[o],s,n),r}if(e&&typeof e=="object"&&typeof o=="string"){const r=e,i={};for(const a of Object.keys(r))i[a]=a===o?ht(r[a],s,n):r[a];return i}return e}function _r(e){if(e.trim()==="")return null;const t=Number(e);return Number.isFinite(t)?t:null}class gt extends Error{}const He="site-not-owned";async function ko(e){return e.status!==409?!1:(await e.clone().json().catch(()=>null))?.code==="site_not_owned"}async function Oo(e,t=n=>fetch(n)){const n=Me({endpoint:e,fetch:async o=>{const s=await t(new Request(o,{signal:we(o.signal)}));if(await ko(s))throw new gt;return s}});try{return await We(n)}catch(o){if(o instanceof gt)return He;throw o}}async function Eo(e,t,n){await t();const o=await Oo(e,n);return o===He?o:{...o,hosted:eo(e,n)}}const Je=5e3;function Do(e){if(!e.site)throw new Error("this project names no site");return An(e.site,e.branch)}function Io(e){return new URL(pe(e,"rpc"),window.location.origin).href}async function We(e){const[t,n]=await e.batch([{method:"describe"},{method:"schema.get"}]);if(!t?.ok)throw t?.error??new Error("no describe");if(t.result?.protocol!==Bn)throw new Ue;const s=Fn(t.result);if(!n)throw new Error("no schema.get");if(Ve(n))return{client:e,describe:s,hasSchema:!1};if(n.ok)return{client:e,describe:s,hasSchema:!0};throw n.error}function _o(e,t=n=>fetch(n)){return We(Me({endpoint:e,fetch:n=>t(new Request(n,{signal:we(n.signal)}))}))}function se(e,t){const n=A.c(40),{org:o}=jn(),{connection:s}=go(e),{runtime:r}=$t(e),i=L.useContext(Ut),a=Qe(e),l=It(Le(e)?.metadata),c=Ft({hasServeConnection:!!s,runtime:r}),f=Bt(c,s?.endpoint??""),h=Cn()?.taskId??null,u=Vn(Hn().lifecycle.phase),d=Z(),v=wo({mode:c,v8:a,workingTreeReady:u}),b=v.github&&!!o.slug&&!!e&&!!t,w=F({queryKey:g.contentBackend(o.slug,e??"",t??"","github"),queryFn:()=>Eo(Do({orgSlug:o.slug,site:l,branch:t}),()=>_t(l,t)),enabled:b,staleTime:Number.POSITIVE_INFINITY,...vt}),_=v.sandbox&&!!o.slug&&!!e&&!!t;let S;n[0]!==t||n[1]!==o.slug||n[2]!==h||n[3]!==e?(S=()=>_o(Io({orgSlug:o.slug,virtualMcpId:e,branch:t,threadId:h})),n[0]=t,n[1]=o.slug,n[2]=h,n[3]=e,n[4]=S):S=n[4];const $=F({queryKey:g.contentBackend(o.slug,e??"",t??"","sandbox",h??""),queryFn:S,enabled:_,staleTime:Number.POSITIVE_INFINITY,...vt}),E=!!s;let D;n[5]!==s?.endpoint||n[6]!==o.slug||n[7]!==e?(D=g.contentBackend(o.slug,e??"","local",s?.endpoint??""),n[5]=s?.endpoint,n[6]=o.slug,n[7]=e,n[8]=D):D=n[8];let I;n[9]!==s?(I=()=>jo(s.endpoint),n[9]=s,n[10]=I):I=n[10];let m;n[11]!==E||n[12]!==D||n[13]!==I?(m={queryKey:D,queryFn:I,enabled:E,staleTime:Number.POSITIVE_INFINITY,retry:To,retryDelay:Ro,refetchInterval:xo},n[11]=E,n[12]=D,n[13]=I,n[14]=m):m=n[14];const y=F(m);let O;n[15]!==s?.endpoint||n[16]!==o.slug||n[17]!==e?(O=g.contentBackend(o.slug,e??"","local",s?.endpoint??""),n[15]=s?.endpoint,n[16]=o.slug,n[17]=e,n[18]=O):O=n[18];const x=O;let N;n[19]!==s?.endpoint||n[20]!==o.slug||n[21]!==e?(N=g.contentBackend(o.slug,e??"","local-describe",s?.endpoint??""),n[19]=s?.endpoint,n[20]=o.slug,n[21]=e,n[22]=N):N=n[22];let p;n[23]!==y.data||n[24]!==x||n[25]!==d?(p=async()=>{try{return await y.data.client.describe()}catch(K){const In=K;throw d.invalidateQueries({queryKey:x,exact:!0},{cancelRefetch:!1}),In}},n[23]=y.data,n[24]=x,n[25]=d,n[26]=p):p=n[26];const k=!!y.data&&!i;let P;n[27]!==N||n[28]!==p||n[29]!==k?(P={queryKey:N,queryFn:p,enabled:k,refetchInterval:Je,retry:!1},n[27]=N,n[28]=p,n[29]=k,n[30]=P):P=n[30];const M=F(P).data??y.data?.describe,U=bo({hasProject:!!e,hasServeConnection:!!s,runtime:r,v8:a,githubSite:w.data===He?"not-owned":w.data?"ready":ft(w)?"error":"loading",sandboxSite:Po({data:$.data,isError:ft($),workingTreeReady:u})});if(U==="pending")return{kind:"pending",...f};if(U==="retrying-sandbox")return{kind:"pending",retrying:"sandbox",...f};if(U==="legacy")return{kind:"legacy"};if(U==="protocol-github")return{..._e(f,w.data),site:l};if(U==="site-not-owned-github")return{kind:"unavailable",...f,siteNotOwned:!0};if(U==="protocol-sandbox")return _e(f,$.data);if(U==="unavailable-github"){let K;return n[31]!==f?(K={kind:"unavailable",...f},n[31]=f,n[32]=K):K=n[32],K}const R=y.error??y.failureReason,H=s?.endpoint??"";let J;return n[33]!==M||n[34]!==y.data||n[35]!==y.failureCount||n[36]!==y.isError||n[37]!==H||n[38]!==R?(J=No({probed:y.data,isError:y.isError,failureCount:y.failureCount,failure:R,describe:M,endpoint:H}),n[33]=M,n[34]=y.data,n[35]=y.failureCount,n[36]=y.isError,n[37]=H,n[38]=R,n[39]=J):J=n[39],J}function xo(e){return e.state.status==="error"||e.state.data?.hasSchema===!1?Je:!1}function Ro(e){return Yn(e+1)}function To(e,t){return!(t instanceof j)&&!(t instanceof Ue)}function Po(e){return e.data!==void 0?"ready":e.workingTreeReady?e.isError?"error":"loading":"unavailable"}const $o=3;function No(e){const t=Bt("local",e.endpoint),n=e.probed?_e(t,{...e.probed,describe:e.describe??e.probed.describe}):null;return e.isError||e.failureCount>0?n?.kind==="protocol"&&!e.isError&&e.failureCount<$o?n:{kind:"unavailable",...t,problem:zn(e.failure)}:n??{kind:"pending",...t}}const vt={retry:2,refetchInterval:e=>e.state.status==="error"?Je:!1};function _e(e,t){return{kind:"protocol",...e,client:t.client,describe:t.describe,hasSchema:t.hasSchema,...t.hosted?{hosted:t.hosted}:{}}}function jo(e,t){return We(Me({endpoint:e,fetch:n=>fetch(n,{signal:we(t?AbortSignal.any([t,n.signal]):n.signal)})}))}function xe(e){const t=`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`;return e.protocolSuffix?`${t}${e.protocolSuffix}`:e.localPreviewUrl?`${t}:local:${e.localPreviewUrl}`:t}function Ao(e,t){return xe({...e,protocolSuffix:t.cacheKeySuffix})}function Mo(e,t,n){return e?t==="pending"?{ready:!1,failed:!1}:t==="unavailable"?{ready:!1,failed:!0}:n:{ready:!0,failed:!1}}function Lo(e,t){return JSON.stringify([e?.orgSlug,e?.virtualMcpId,e?.branch,vo(t)])}function Qo(e,t,n){const o=A.c(21),s=Z(),r=se(e?.virtualMcpId,e?.branch),i=e&&r.kind==="protocol"&&r.hosted?r:null;let a;o[0]!==i||o[1]!==e?(a=i&&e?Ao(e,i):"",o[0]=i,o[1]=e,o[2]=a):a=o[2];const l=lo(i?.hosted,a,t,n),c=e!==null;let f;o[3]!==r.kind||o[4]!==l||o[5]!==c?(f=Mo(c,r.kind,l),o[3]=r.kind,o[4]=l,o[5]=c,o[6]=f):f=o[6];const h=f,u=r.kind!=="legacy";let d;o[7]!==r||o[8]!==e?(d=Lo(e,r),o[7]=r,o[8]=e,o[9]=d):d=o[9];let v;o[10]!==r.kind||o[11]!==r.source||o[12]!==l||o[13]!==s||o[14]!==e?(v=()=>{if(l.retry(),!e||r.kind!=="unavailable")return;const w=r.source;s.resetQueries({queryKey:g.contentBackend(e.orgSlug,e.virtualMcpId,...w==="local"?["local"]:[e.branch,w])})},o[10]=r.kind,o[11]=r.source,o[12]=l,o[13]=s,o[14]=e,o[15]=v):v=o[15];let b;return o[16]!==h||o[17]!==u||o[18]!==d||o[19]!==v?(b={...h,v8:u,scopeKey:d,retry:v},o[16]=h,o[17]=u,o[18]=d,o[19]=v,o[20]=b):b=o[20],b}function Ht(e){const t=A.c(12);let n;t[0]!==e?(n=De.localPreviewUrl(e??""),t[0]=e,t[1]=n):n=t[1];const o=n,[s,r]=Mn(o,null),i=Qe(e);let a;t[2]!==s||t[3]!==e?(a=e?ot(s):null,t[2]=s,t[3]=e,t[4]=a):a=t[4];const c=i?null:a;let f,h;t[5]!==r?(f=d=>r(ot(d)),h=()=>r(null),t[5]=r,t[6]=f,t[7]=h):(f=t[6],h=t[7]);let u;return t[8]!==c||t[9]!==f||t[10]!==h?(u={url:c,setUrl:f,clear:h},t[8]=c,t[9]=f,t[10]=h,t[11]=u):u=t[11],u}const bt=6e4,Uo=2147483647;function Bo(e,t){if(e===null||e.trim()==="")return bt;const n=e.trim(),o=/^\d+(?:\.\d+)?$/.test(n)?Number(n)*1e3:/^[A-Za-z]{3}, /.test(n)?Math.max(0,Date.parse(n)-t):Number.NaN;return Number.isFinite(o)&&o>=0&&o<=Uo?o:bt}class Jt extends Error{constructor(t,n,o,s=Date.now()){super(t),this.status=n,this.name="ContentResponseError",this.retryAt=n===429?s+Bo(o,s):null}status;retryAt}function Fo(e,t,n=Date.now()){const o=Pt(5e3,1e3,e,2,0);return t instanceof Jt&&t.retryAt!==null?Math.max(o,t.retryAt-n):o}async function Ye(e,t){const n=await e.json().catch(()=>null),o=n!==null&&typeof n=="object"&&"error"in n&&typeof n.error=="string"?n.error:`${t} failed (${e.status})`;throw new Jt(o,e.status,e.headers.get("retry-after"))}function Co(e,t){const n=(e??"").trim().replace(/^[/\\]+|[/\\]+$/g,"");return n?`${n}/${t}`:t}function wt(e){let t;try{t=JSON.parse(e)}catch{return null}return typeof t!="object"||t===null||Array.isArray(t)?null:t}function me(e,t,n){return["decofile-write",e,t,n]}function Vo(e,t,n){return{id:me(e,t,n).join(":")}}class Ge extends Error{constructor(t,n,o=[],s=!1){super(n),this.blocks=t,this.fields=o,this.carriedStored=s,this.name="BlockConflictError"}blocks;fields;carriedStored}function ze(e){return`${e.orgSlug}/${e.virtualMcpId}/${e.branch}`}function Xe(e){return`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}`}async function Ho(e,t){return Ye(e,t)}function Jo(e,t,n){e.setQueryData(g.decofileDraft(ze(t)),n)}function Wo(e,t){return e.getQueryData(g.decofileDraft(ze(t)))??null}async function Yo(e,t){return(await fetch(Xe(e),{cache:"no-store",headers:{"if-none-match":`"${t}"`}}).catch(()=>null))?.status===200}function xr(e){const t=A.c(4);let n;t[0]!==e?(n=g.decofileDraft(e?ze(e):""),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:Go,staleTime:Number.POSITIVE_INFINITY,gcTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s??null}async function Go(){throw new Error("decofileDraft is populated by reads/writes, not fetched")}async function zo(e,t){const n=await fetch(Xe(t),{cache:"no-store"});if(!n.ok)return Ye(n,"Read decofile");const o=await n.json();return o.token&&Jo(e,t,{version:o.version,token:o.token,apiHost:o.apiHost??window.location.host}),o.decofile}async function Rr(e,t){const n=await fetch(Xe(e),{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(n.status===409){const s=await n.json().catch(()=>({}));throw s.code==="block-conflict"?new Ge(s.blocks??[],s.error??"Block changed"):new Error(s.error??`Save failed (${n.status})`)}if(!n.ok)return Ho(n,"Save");const o=await n.json();return{...o,apiHost:o.apiHost??window.location.host}}const Wt=3e3,Xo=15e3,Zo=2*6e4,Yt={now:()=>Date.now(),setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),hidden:()=>typeof document<"u"&&document.visibilityState==="hidden"};function Ko(e){return e<Zo?Wt:Xo}function qo(e,t=Yt){const n=t.now();let o=!1,s=!1,r=null;const i=()=>{o||(r=t.setTimeout(a,Ko(t.now()-n)))},a=()=>{if(r=null,o)return;const{read:l,skip:c}=e();if(s||t.hidden()||c?.()){i();return}s=!0;let f;try{f=l()}catch{f=void 0}Promise.resolve(f).catch(()=>{}).finally(()=>{s=!1}),i()};return i(),()=>{o=!0,r!==null&&t.clearTimeout(r)}}const pt=()=>0;function es(e,t,n=Yt){const o=L.useRef(t);o.current=t;const[s]=L.useState(()=>({polling:()=>qo(()=>o.current,n),idle:()=>()=>{}}));L.useSyncExternalStore(e?s.polling:s.idle,pt,pt)}function Gt(e,t){return pe(e,t)}function ts(e,t){return pe(e,"preview-fetch",{path:t})}function Tr(e){return Gt(e,"preview-invoke")}function Pr(e){return Gt(e,"catalog-invoke")}function zt(e){try{const{hostname:t}=new URL(e);return t==="localhost"||t.endsWith(".localhost")||t==="127.0.0.1"||t==="::1"}catch{return!1}}function ns(){if(typeof document>"u")return null;const e=Array.from(document.querySelectorAll("iframe"));for(const t of e){const n=t.getAttribute("src");if(n&&zt(n))return n}return null}function os(e,t){const n=e.previewUrl??e.getFallbackPreviewUrl?.()??ns();return n&&zt(n)?new URL(t,n).toString():ts(e,t)}function ss(e){return os(e,"/.decofile")}function rs(e){return e===400?"absent":e===404?"unavailable":e>=200&&e<300?"ok":"error"}function mt(e){return e.liveOk||e.committedAbsent?404:e.liveStatus??502}async function is(e,t){const n=pe(e,"read"),o=await fetch(n,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:t,full:!0})}),s=rs(o.status);if(s==="absent")return{kind:"absent"};if(s==="unavailable")return{kind:"unavailable"};if(s==="error"){const i=new Error(`Failed to read ${t}: ${o.status}`);throw i.status=o.status,i}const r=await o.json();return typeof r.content!="string"?{kind:"unavailable"}:{kind:"data",data:Jn(r.content)}}async function as(e,t){const n=await is(e,t);if(n.kind!=="data")return n;try{return{kind:"data",data:JSON.parse(n.data)}}catch{return{kind:"unavailable"}}}async function $r(e){const t=`/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}/meta`,n=await fetch(t,{cache:"no-store"});if(n.status===404)return{kind:"absent"};if(!n.ok)return Ye(n,"Read committed meta");try{return{kind:"data",data:await n.json()}}catch{return{kind:"unavailable"}}}function cs(e){return Le(e)?.metadata?.runtime?.path??null}function Re(e,t,n,o){const s=B(e),r=Object.keys(n?.changes??{}).find(a=>B(a)===s);if(r!==void 0&&n)return n.changes[r].baseVersion;const i=Object.keys(t?.draft??{}).some(a=>B(a)===s);if(t&&!i){const a=Object.keys(t.entries).find(l=>B(l)===s);return a===void 0?null:t.entries[a].version}return o?.[e]??null}class Xt extends Error{constructor(t){super(t instanceof Error?t.message:String(t),{cause:t}),this.name="ServeLostError"}}function Nr(e){return e instanceof j&&e.code===T.Conflict}function Zt(e){const t=e.data?.violations;return!Array.isArray(t)||t.length===0?e.message:t.slice(0,3).map(n=>n.message).join("; ")}class Ze extends Error{constructor(){super("The draft's changes couldn't be read"),this.name="HostedDraftUnreadError"}}class Ke extends Error{constructor(){super("The blocks kept changing while the change was saved"),this.name="HostedKeptChangingError"}}function jr(e,t){return(t instanceof Ze||t instanceof Ke)&&(t.message=Kt(e,t,"github")),t}function Kt(e,t,n){if(t instanceof Ze)return e("siteEditor.save.draftUnread");if(t instanceof Ke)return e("siteEditor.save.keptChanging");if(t instanceof Ge)return t.message;if(n==="local")return us(e,t);if(t instanceof j)switch(t.code){case T.Conflict:return e("siteEditor.save.conflict");case T.ReadOnly:return e("siteEditor.save.readOnly");case T.InvalidBlock:case T.InvalidParams:return e("siteEditor.save.invalid");case T.LimitExceeded:return e("siteEditor.save.tooLarge")}return e("siteEditor.save.failed")}function ls(e,t){if(t==="local"||e instanceof Ge||e instanceof Ze||e instanceof Ke)return null;if(e instanceof j){const n=e.code===T.InvalidBlock||e.code===T.InvalidParams?Zt(e):e.message;return n?`${e.code}: ${n}`:null}return e.message||null}function us(e,t){if(t instanceof Xt)return e("decoServe.save.serverGone");if(t instanceof j)switch(t.code){case T.Conflict:return e("decoServe.save.conflict");case T.ReadOnly:return e("decoServe.save.readOnly");case T.InvalidBlock:case T.InvalidParams:return e("decoServe.save.invalid",{detail:Zt(t)});case T.LimitExceeded:return e("decoServe.save.tooLarge")}return e("sectionsEditor.sectionsEditor.saveFailed",{error:t.message})}function fs(e,t,n){return e===null?0:Math.max(0,n-Math.max(0,t-e))}function ds(e,t){const[n,o]=L.useState(e),s=L.useRef(null);return e&&!n&&o(!0),L.useEffect(()=>{if(e){s.current??=Date.now();return}if(!n)return;const r=()=>{s.current=null,o(!1)},i=fs(s.current,Date.now(),t);if(i===0){r();return}const a=setTimeout(r,i);return()=>clearTimeout(a)},[e,n,t]),n}const hs="decocms:content-writes",Te=new Set;let G;function qt(){if(G!==void 0)return G;G=null;try{typeof BroadcastChannel=="function"&&(G=new BroadcastChannel(hs),G.addEventListener("message",e=>{const t=e.data?.cacheKey;if(typeof t=="string")for(const n of[...Te])n(t)}))}catch{G=null}return G}function gs(e){try{qt()?.postMessage({cacheKey:e})}catch{}}function vs(e){return qt(),Te.add(e),()=>{Te.delete(e)}}const en="__at=",tn="__test=",bs=/^[0-9a-f]{12}-[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;function ws(e){return e.at!==void 0||Object.keys(e.tests??{}).length>0}function ee(e){return typeof e=="string"&&bs.test(e)}function St(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function ps(e){const t=e.tests??{};return[...e.at!==void 0?[en+St(e.at)]:[],...Object.keys(t).map(n=>tn+St(`${n}=${t[n]?"on":"off"}`))]}function yt(e,t){const o=[...e.split("&").filter(s=>s&&!s.startsWith(en)&&!s.startsWith(tn)),...t];return o.length>0?`?${o.join("&")}`:""}function de(e,t){const n=ps(t),o=e.indexOf("?"),s=o===-1?e:e.slice(0,o);if(ee(s))return s+yt(o===-1?"":e.slice(o+1),n);const r=e.lastIndexOf("@");if(r<=0)return e;const i=e.slice(0,r),a=i.indexOf("?"),l=a===-1?i:i.slice(0,a),c=a===-1?"":i.slice(a+1);return`${l}${yt(c,n)}${e.slice(r)}`}function Ar(e,t,n){if(!ws(t))return e;try{const o=new URL(e),s=o.searchParams.get("__draft");return s&&s!=="off"?(o.searchParams.set("__draft",de(s,t)),o.toString()):ee(n)?(o.searchParams.set("__draft",de(n,t)),o.toString()):e}catch{return e}}function Mr(e,t,n="/"){if(!e||!ee(t))return null;try{const o=new URL(n,e);return o.searchParams.set("__draft",t),o.toString()}catch{return null}}function nn(e){return btoa(encodeURIComponent(e))}function Lr(e,t,n){const o=ms(e,t,n);return o.searchParams.set("__cb",crypto.randomUUID()),o.toString()}function ms(e,t,n){const o=new URL(e).origin,s=new URL(`/live/previews/${encodeURIComponent(t)}`,o);return s.searchParams.set("path","/"),s.searchParams.set("pathTemplate","/"),s.searchParams.set("props",nn(JSON.stringify({path:"/",sections:[{__resolveType:n}]}))),s}const Ss="__draft";function Qr(e){return`${`${e.apiHost}/api/${e.orgSlug}/decofile/${encodeURIComponent(e.virtualMcpId)}/${encodeURIComponent(e.branch)}?token=${e.token}`}@${e.version}`}const ys="off";function ks(e,t){if(!t)return e;const n=new URL(e);return n.searchParams.set(Ss,t),n.toString()}function Ur(e){const t=e.pageBlock.__resolveType;if(typeof t!="string"||!t)return null;const n=new URL(e.previewBaseUrl).origin,o=new URL(`/live/previews/${encodeURIComponent(t)}`,n);o.searchParams.set("__decoFBT","0"),o.searchParams.set("__d",""),o.searchParams.set("path",e.path),o.searchParams.set("pathTemplate",e.pathTemplate);const{__resolveType:s,...r}=e.pageBlock,i=JSON.stringify({__props:r,__decofile:e.decofile});return{src:o.toString(),body:i}}function Br(e,t,n,o){const s=new URL(e).origin,r=new URL(`/live/previews/${encodeURIComponent(t)}`,s);r.searchParams.set("__d","");const i=[{__resolveType:"preview",block:n}];return o&&i.push(o),r.searchParams.set("props",nn(JSON.stringify({sections:i}))),r.toString()}function Fr(e){return e.fastPreviewActive&&e.previewServerUrl?e.previewServerUrl:e.sandboxUrl??null}const kt="__variant=";function on(e,t,n){return`${e}@${t}=${n}`}function Cr(e,t){return!e||!t.multivariate||t.variants.length<=1?[]:t.index<0||t.index>=t.variants.length?[]:[on(e,"sections",t.index)]}function Vr(e){const t=Array.isArray(e.mvObj.variants)?e.mvObj.variants:[];if(!e.pageKey||e.sectionIndex<0)return[];if(e.selectedVariantIndex<0||e.selectedVariantIndex>=t.length)return[];const o=`${e.page.multivariate?`sections.variants.${e.page.index}.value${e.page.lazyValues?".value":""}`:"sections"}.${e.sectionIndex}${e.sectionLazy?".section":""}`;return[on(e.pageKey,o,e.selectedVariantIndex)]}function Hr(e,t){return[...t,...e]}function Os(e){return encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`)}function qe(e,t){const n=e.lastIndexOf("@");if(n<=0)return e;const o=e.slice(0,n),s=o.indexOf("?"),r=s===-1?o:o.slice(0,s),a=[...s===-1?[]:o.slice(s+1).split("&").filter(c=>c&&!c.startsWith(kt)),...t.map(c=>kt+Os(c))],l=a.length>0?`?${a.join("&")}`:"";return`${r}${l}${e.slice(n)}`}function Jr(e,t,n=!1){if(t.length===0&&!n)return null;try{const o=new URL(e),s=o.hostname==="[::1]"?`localhost${o.port?`:${o.port}`:""}`:o.host;return qe(`${s}${o.pathname}@local`,t)}catch{return null}}function Wr(e,t){if(t.length===0)return e;try{const n=new URL(e),o=n.searchParams.get("__draft");return!o||o==="off"?e:(n.searchParams.set("__draft",qe(o,t)),n.toString())}catch{return e}}function Es(e){const{pointer:t}=e;if(!t||t===ys)return null;const n=t.indexOf("?");return ee(n===-1?t:t.slice(0,n))||t.lastIndexOf("@")<=0?null:ee(e.heldRevision)&&e.forcedVariants.length===0?de(e.heldRevision,e.previewOptions):de(qe(t,e.forcedVariants),e.previewOptions)}function Ds(e,t){if(!e||!t)return null;try{return ks(e,t)}catch{return null}}function Yr(e,t,n){if(!e||!n)return null;try{return Ds(new URL(t,e).toString(),n)}catch{return null}}const he={forcedVariants:[],previewOptions:{}},ie=new Map,ae=new Map,Pe=new Map;function sn(e){for(const t of Pe.get(e)??[])t()}function rn(e,t){const n=ee(t)?t:null;(ae.get(e)??null)!==n&&(n?ae.set(e,n):ae.delete(e),sn(e))}function Is(e){return ae.get(e)??null}function _s(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Gr(e,t){const n=ie.get(e)??he,o=t??he;_s(n,o)||(t?ie.set(e,o):ie.delete(e),sn(e))}function xs(e){return ie.get(e)??he}function an(e,t){let n=Pe.get(e);return n||(n=new Set,Pe.set(e,n)),n.add(t),()=>{n.delete(t)}}function Rs(e){const t=A.c(3);let n,o;return t[0]!==e?(n=s=>an(e,s),o=()=>xs(e),t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),L.useSyncExternalStore(n,o,Ts)}function Ts(){return he}function Ps(e){const t=A.c(3);let n,o;return t[0]!==e?(n=s=>e?an(e,s):Ns,o=()=>e?Is(e):null,t[0]=e,t[1]=n,t[2]=o):(n=t[1],o=t[2]),L.useSyncExternalStore(n,o,$s)}function $s(){return null}function Ns(){}function zr(e,t){const n=A.c(4),o=Rs(e),s=Ps(e);let r;return n[0]!==o||n[1]!==s||n[2]!==t?(r=Es({pointer:t,heldRevision:s,...o}),n[0]=o,n[1]=s,n[2]=t,n[3]=r):r=n[3],r}const cn={phase:"idle",inFlight:0,reload:{seq:0,navigates:!1},epoch:0},js=15e3,ge=new Map;function W(e,t){return`${e}/${t}`}function V(e){let t=ge.get(e);return t||(t={state:cn,listeners:new Set,previews:0,timer:null,discardListeners:new Set},ge.set(e,t)),t}function C(e,t){const n=V(e);n.state={...n.state,...t};for(const o of n.listeners)o()}function Se(e){e.timer&&clearTimeout(e.timer),e.timer=null}function ve(e){return ge.get(e)?.state??cn}function As(e,t){const n=V(e);return n.listeners.add(t),()=>{n.listeners.delete(t)}}function Xr(e){const t=V(e);return t.previews++,()=>{t.previews--,t.previews===0&&t.state.phase==="reloading"&&(Se(t),C(e,{phase:"idle"}))}}function Zr(e){const t=ge.get(e);!t||t.state.phase!=="reloading"||(Se(t),C(e,{phase:"idle"}))}function ln(e){const t=V(e);Se(t),C(e,{phase:"saving",inFlight:t.state.inFlight+1})}function ce(e,t){const n=V(e),o=Math.max(0,n.state.inFlight-1);if(o>0){C(e,{inFlight:o});return}if(!t.ok||n.previews===0){C(e,{phase:"idle",inFlight:o});return}un(e,t.navigates,o)}function un(e,t,n=0){const o=V(e);Se(o),o.timer=setTimeout(()=>{o.timer=null,o.state.phase==="reloading"&&C(e,{phase:"idle"})},js),C(e,{phase:"reloading",inFlight:n,reload:{seq:o.state.reload.seq+1,navigates:t}})}function Ms(e){return e?.kind==="protocol"&&e.source==="github"}async function le(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:s,branch:r,backend:i,cacheKey:a}=e,l=t.kind==="publish"||t.kind==="reapply"?n.invalidateQueries({queryKey:g.hostedReleases(o,s)}):null;if(i?.kind!=="protocol"){const v=a&&t.reread?n.invalidateQueries({queryKey:g.decofile(a)}):null;if(await Promise.all([l,v]),v&&t.kind!=="edit"){const b=W(o,s);C(b,{epoch:ve(b).epoch+1})}return{navigates:!1}}const c=r?g.protocolDraftRead(o,s,r):null,f=c?JSON.stringify(n.getQueryData(c)??null):null,h=l?[l]:[];if(a&&t.reread&&h.push(n.invalidateQueries({queryKey:g.decofile(a)})),a&&!t.adopted&&h.push(n.invalidateQueries({queryKey:g.contentChanges(a)})),r&&i.source==="sandbox"&&h.push(n.invalidateQueries({queryKey:Wn(o,s,r)})),Ms(i)&&c&&!t.adopted&&h.push(n.invalidateQueries({queryKey:c})),await Promise.all(h),t.kind!=="edit"){const v=W(o,s);C(v,{epoch:ve(v).epoch+1})}const u=c?JSON.stringify(n.getQueryData(c)??null):null,d=f!==u;return d&&await new Promise(v=>xt.schedule(v)),{navigates:d}}async function Ls(e,t){return ln(W(e.orgSlug,e.virtualMcpId)),fn(e,t)}function Ot(e){return e.branch?JSON.stringify(e.queryClient.getQueryData(g.protocolDraftRead(e.orgSlug,e.virtualMcpId,e.branch))??null):null}async function fn(e,t){const n=W(e.orgSlug,e.virtualMcpId),o=t.adopted?Ot(e):null;let s;try{s=await t.write()}catch(i){throw ce(n,{ok:!1,navigates:!1}),t.refreshOnError&&le(e,{kind:t.kind,reread:!0}).catch(()=>{}),i}if(e.backend?.kind==="protocol"&&e.cacheKey&&gs(e.cacheKey),rn(n,t.shownRevision?.(s)??null),t.adopted){const i=Ot(e)!==o;return i&&await new Promise(a=>xt.schedule(a)),ce(n,{ok:!0,navigates:i}),t.reread&&le(e,t).catch(()=>{}),s}let r=!1;try{({navigates:r}=await le(e,t))}catch{}finally{ce(n,{ok:!0,navigates:r})}return s}function Kr(e,t){const{queryClient:n,orgSlug:o,virtualMcpId:s,branch:r}=e,i=W(o,s),a=new Set(t.blockKeys);for(const f of[...V(i).discardListeners])f(a);ln(i);let l=!1;const c=()=>(l=!0,fn(e,{kind:"discard",reread:!0,write:t.write}));return r?n.getMutationCache().build(n,{mutationKey:me(o,s,r),scope:Vo(o,s,r),mutationFn:c}).execute(void 0).catch(f=>{throw l||ce(i,{ok:!1,navigates:!1}),f}):c()}function qr(e,t,n){const o=A.c(8);let s;o[0]!==e||o[1]!==t?(s=W(e,t),o[0]=e,o[1]=t,o[2]=s):s=o[2];const r=s;let i;o[3]!==n||o[4]!==r?(i=()=>{const l=V(r).discardListeners;return l.add(n),()=>{l.delete(n)}},o[3]=n,o[4]=r,o[5]=i):i=o[5];let a;o[6]!==r?(a=[r],o[6]=r,o[7]=a):a=o[7],L.useEffect(i,a)}function dn(e){const t=W(e.orgSlug,e.virtualMcpId);ve(t).inFlight>0||(rn(t,null),le(e,{kind:"external"}).then(({navigates:n})=>{const o=V(t);o.previews>0&&o.state.inFlight===0&&un(t,n)}).catch(()=>{}))}function Qs(e,t){const n=A.c(7);let o;n[0]!==e||n[1]!==t?(o=W(e,t),n[0]=e,n[1]=t,n[2]=o):o=n[2];const s=o;let r;n[3]!==s?(r=c=>As(s,c),n[3]=s,n[4]=r):r=n[4];const i=r;let a;n[5]!==s?(a=()=>ve(s),n[5]=s,n[6]=a):a=n[6];const l=a;return L.useSyncExternalStore(i,l,l)}const Us=500;function ei(e,t){const{phase:n}=Qs(e,t);return ds(n!=="idle",Us)}function Bs(e){const t=new Error(`${e} unavailable (content server unreachable)`);return t.status=502,t}function hn(e,t){return g.liveMeta(e.orgSlug,e.virtualMcpId,e.branch,`protocol${t.cacheKeySuffix}`,"")}function ti(e,t,n,o){if(o?.source==="github"){const i=e.getQueryData(g.contentIndex(t));return i?oo(i,n):Fs(e,t,n)}const s=e.getQueryData(g.contentVersions(t));if(!s)return;if(Object.hasOwn(s,n))return s[n];const r=e.getQueryData(g.decofile(t));return r&&Object.hasOwn(r,n)?void 0:null}function gn(e,t){if(Object.hasOwn(e.changes,t))return e.changes[t];const n=B(t),o=Object.keys(e.changes).find(s=>B(s)===n);return o===void 0?void 0:e.changes[o]}function Fs(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(o)return vn(o,ye(e,t),n)}function vn(e,t,n){const o=gn(e,n);return o?.kind==="delete"?o.version??X:o?o.version:t.has(B(n))?X:null}function ni(e,t,n){const o=e.getQueryData(g.contentChanges(t));if(!o)return!1;const s=gn(o,n);return s?s.kind==="set"&&s.baseVersion===null:ye(e,t).has(B(n))}function oi(e,t){const n=e.getQueryData(g.decofile(t)),o=e.getQueryData(g.contentChanges(t));if(!n||!o)return null;const s=ye(e,t);return{blocks:n,versionOf:r=>vn(o,s,r)}}function ye(e,t){return new Set(e.getQueryData(g.contentDraftTombstones(t)))}function be(e,t,n,o){const s=B(n),r=ye(e,t);r.has(s)!==o&&(o?r.add(s):r.delete(s),Y(e),e.setQueryData(g.contentDraftTombstones(t),[...r]))}function bn(e,t,n,o){const s=o.revision,r=e.getQueryData(g.contentVersions(n)),i=Object.entries(o.versions??{}).map(([u,d])=>[u,d===X?null:d]),a=e.getQueryData(g.contentChanges(n)),l=e.getQueryData(g.contentIndex(n)),c=new Set(i.flatMap(([u])=>Re(u,l,a,r)===null?[u]:[])),f=new Set(i.flatMap(([u,d])=>d===null?[]:[B(u)]));e.setQueryData(g.contentChanges(n),u=>{if(!u)return u;const d={...u.changes};for(const[v,b]of i){const w=Re(v,l,u,r);b!==null?d[v]={kind:"set",version:b,baseVersion:w}:w!==null?d[v]={kind:"delete",version:null,baseVersion:w}:delete d[v]}return{...u,changes:d,edited:!0}});for(const[u,d]of i)d!==null?be(e,n,u,!1):!f.has(B(u))&&c.has(u)&&be(e,n,u,!0);const h=o.revision;return h&&h!=="none"&&e.setQueryData(g.protocolDraftRead(t.orgSlug,t.virtualMcpId,t.branch),u=>u&&{...u,version:h}),s}function ke(e,t,n){Y(e),e.setQueryData(g.contentVersions(t),o=>{const s={...o};for(const[r,i]of Object.entries(n))i===null?delete s[r]:s[r]=i;return s})}function wn(e,t){const n=e.getMutationCache().findAll({mutationKey:me(t.orgSlug,t.virtualMcpId,t.branch),status:"pending"});return new Set(n.flatMap(o=>mo(o.state.variables)))}function $e(e,t){e.resetQueries({queryKey:g.contentBackend(t.orgSlug,t.virtualMcpId,"local")})}async function oe(e,t,n,o){try{return await o()}catch(s){const r=!(s instanceof j);throw t.source==="local"&&r?($e(e,n),new Xt(s)):(t.source==="local"&&Ae(s)&&$e(e,n),s)}}const Et=new WeakMap;function et(e){let t=Et.get(e);return t||(t={inFlight:new Map,rereading:new Set},Et.set(e,t)),t}function pn(e,t,n,o){const{inFlight:s}=et(e),r=s.get(o);if(r)return r;const i=tt(e,t,n,o,!0);return s.set(o,i),i.finally(()=>{s.get(o)===i&&s.delete(o)})}function Cs(e,t,n){const o=A.c(8),s=Z(),r=t?.orgSlug,i=t?.virtualMcpId,a=t?.branch;let l,c;o[0]!==e||o[1]!==a||o[2]!==n||o[3]!==r||o[4]!==s||o[5]!==i?(l=()=>{if(!e||!r||!i||!a)return;const f={orgSlug:r,virtualMcpId:i,branch:a},{rereading:h}=et(s);return vs(u=>{u===n&&(h.has(n)||(h.add(n),Hs(s,e,f,n).catch(Vs).finally(()=>h.delete(n))))})},c=[s,e,r,i,a,n],o[0]=e,o[1]=a,o[2]=n,o[3]=r,o[4]=s,o[5]=i,o[6]=l,o[7]=c):(l=o[6],c=o[7]),L.useEffect(l,c)}function Vs(){}async function Hs(e,t,n,o){const s=et(e).inFlight.get(o);return s&&await s.catch(()=>{}),pn(e,t,n,o)}async function tt(e,t,n,o,s){Y(e);const r=g.decofile(o),i=hn(n,t),a=g.contentRevision(o),l=g.contentVersions(o),c=e.getQueryData(r),f=e.getQueryData(l),u=e.getQueryData(i),d=e.getQueryData(a)??void 0,v=s&&c&&f?d?.revision:void 0,b=s&&u?d?.schemaVersion:void 0,w=g.contentChanges(o),_=e.getQueryData(w);if(t.source==="github"&&t.hosted)return Js(e,t,t.hosted,n,o,{conditional:s,seen:d,currentMeta:u,schemaIfNoneMatch:b,seenChanges:_});const[S,$,E]=await oe(e,t,n,()=>t.client.batch([{method:"blocks.list",params:v?{ifNoneMatch:v}:{}},{method:"schema.get",params:b?{ifNoneMatch:b}:{}},{method:"changes.list",params:Rt(_)}])),D=e.getQueryData(a)?.revision,I=D!==void 0&&D!==d?.revision;if(E?.ok){const k=I?null:Tt(_,E.result);k&&e.setQueryData(w,k)}else E&&t.source==="local"&&Ae(E.error)&&$e(e,n);if(!S?.ok)throw S?.error??new Error("no blocks.list");if(!$)throw new Error("no schema.get");const m=S.result,y=Ve($),O=$.ok&&!y?$.result:null;if(m.notModified&&(!c||!f)||O?.notModified&&!u)return tt(e,t,n,o,!1);const x=m.notModified?new Set:wn(e,n),N=m.notModified?c:po(m.blocks,c,x),p=y?Vt():O?O.notModified?u:O.schema:$.error;if(e.setQueryData(a,{revision:I?D:m.notModified?d?.revision:m.revision,schemaVersion:O?O.notModified?d?.schemaVersion:O.version??void 0:void 0}),e.setQueryData(r,N),!m.notModified){const k=e.getQueryData(l),P={...m.versions};for(const Q of x){const M=k?.[Q];M!==void 0?P[Q]=M:delete P[Q]}e.setQueryData(l,P)}return p instanceof j||e.setQueryData(i,p),!I&&!m.notModified&&c&&d?.revision&&m.revision!==d.revision&&dn({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o}),{blocks:N,meta:p}}async function Js(e,t,n,o,s,r){const i=g.decofile(s),a=g.contentIndex(s),l=g.contentRevision(s),c=g.contentVersions(s),f=hn(o,t),h=g.contentChanges(s),u=e.getQueryData(a),d=r.conditional&&u?r.seen?.revision:void 0,[v,b,w]=await oe(e,t,o,()=>n.batch([{method:"cms.index",params:d?{ifNoneMatch:d}:{}},{method:"schema.get",params:r.schemaIfNoneMatch?{ifNoneMatch:r.schemaIfNoneMatch}:{}},{method:"changes.list",params:Rt(r.seenChanges)}])),_=e.getQueryData(a)??u,S=e.getQueryData(l)?.revision,$=S!==void 0&&S!==r.seen?.revision;if(w?.ok&&!$){const R=Tt(r.seenChanges,w.result);R&&e.setQueryData(h,R)}if(!v?.ok)throw v?.error??new Error("no cms.index");if(!b)throw new Error("no schema.get");const E=v.result,D=Ve(b),I=b.ok&&!D?b.result:null;if(E.notModified&&!u||I?.notModified&&!r.currentMeta)return tt(e,t,o,s,!1);const m=D?Vt():I?I.notModified?r.currentMeta:I.schema:b.error;m instanceof j||e.setQueryData(f,m);const y=I?I.notModified?r.seen?.schemaVersion:I.version??void 0:void 0,O=e.getQueryData(i)??{};if(E.notModified||$)return e.setQueryData(l,{revision:$?S:r.seen?.revision,schemaVersion:y}),e.setQueryData(i,O),{blocks:O,meta:m};const x={revision:E.revision,resolvedRef:E.resolvedRef,sequence:E.sequence,entries:E.entries,draft:E.draft};e.setQueryData(a,x);const N=!!r.seen?.revision&&x.revision!==r.seen.revision&&(!r.seen.revision.startsWith("s-")||!!u&&mn(u.draft,x.draft));N&&e.setQueryData(g.protocolDraftRead(o.orgSlug,o.virtualMcpId,o.branch),R=>R&&{...R,version:x.revision}),e.setQueryData(l,{revision:x.revision,schemaVersion:y});const p=wn(e,o),k=e.getQueryData(c)??{},P={},Q={},M=[];for(const[R,H]of Object.entries(O)){const J=x.entries[R];!J&&!p.has(R)||(P[R]=H,k[R]!==void 0&&(Q[R]=k[R]),J&&!p.has(R)&&k[R]!==J.version&&M.push(R))}return e.setQueryData(i,P),e.setQueryData(c,Q),M.length>0&&await Fe(e,n,s,M,p),_&&N&&Ws(_,x)&&dn({queryClient:e,orgSlug:o.orgSlug,virtualMcpId:o.virtualMcpId,branch:o.branch,backend:t,cacheKey:s}),{blocks:e.getQueryData(i)??P,meta:m}}function Ws(e,t){if(mn(e.draft,t.draft))return!0;const n=Object.keys(t.entries);return n.length!==Object.keys(e.entries).length?!0:n.some(o=>!Object.hasOwn(e.entries,o)||e.entries[o]?.version!==t.entries[o]?.version)}function mn(e,t){const n=Object.keys(t);return n.length!==Object.keys(e).length?!0:n.some(o=>!Object.hasOwn(e,o)||e[o]?.version!==t[o]?.version)}function Ys(e,t){const n=[...Object.keys(t.set??{}),...t.delete??[]];return Object.fromEntries(n.filter(o=>Object.hasOwn(e,o)).map(o=>[o,e[o]]))}function Ee(e){if(!(e instanceof j)||e.code!==T.Unavailable)return;const t=e.data?.landed;if(!(!t||typeof t!="object"||Array.isArray(t)))return Object.fromEntries(Object.entries(t).filter(n=>typeof n[1]=="string"))}async function Gs(e,t){if(!(e instanceof j)||e.code!==T.Conflict)return;const n=e.data?.entries;if(!n||typeof n!="object")return;const o=Object.entries(n);if(o.length===0)return;const s=t.set??{},r=new Set(t.delete??[]),i={};for(const[a,l]of o){const c=l?.actual;if(typeof c!="string"||(Object.hasOwn(s,a)?await Un(s[a]):r.has(a)?X:void 0)!==c)return;i[a]=c}return i}function zs(e,t){const n=Object.fromEntries(Object.entries(e.set??{}).filter(([s])=>!Object.hasOwn(t,s))),o=(e.delete??[]).filter(s=>!Object.hasOwn(t,s));return{...Object.keys(n).length>0?{set:n}:{},...o.length>0?{delete:o}:{}}}function re(e,t,n,o,s){Y(e),bn(e,t,n,{revision:e.getQueryData(g.contentRevision(n))?.revision??"",versions:s}),ke(e,n,Object.fromEntries(Object.entries(s).map(([r,i])=>[r,i===X?null:i]))),Qt(e,n,s,o.set??{})}async function si(e,t,n,o,s,r){if(t.source==="github"){const a=[...Object.keys(s.set??{}),...s.delete??[]].filter(c=>!r||!Object.hasOwn(r,c));if(a.length>0)throw new Error(`A hosted save needs a precondition for every block it touches (missing: ${a.join(", ")})`);const l=Ln(s.set);if(l.length>0)throw new Error(`A hosted save can't write a block that isn't loaded (${l.join(", ")})`)}return Ls({queryClient:e,orgSlug:n.orgSlug,virtualMcpId:n.virtualMcpId,branch:n.branch,backend:t,cacheKey:o},{kind:"edit",adopted:t.source==="github",write:async()=>{const i=(f,h=r)=>oe(e,t,n,()=>t.client.blocksApply({set:f.set,delete:f.delete,...h?{ifMatch:Ys(h,f)}:{}}));let a;try{a=await i(s)}catch(f){const h=t.source==="github"?Ee(f):void 0;if(!h)throw f;const u=zs(s,h);Object.keys(h).length>0&&re(e,n,o,s,h);let d;try{d=await i(u)}catch(v){const b=Ee(v);b&&Object.keys(b).length>0&&re(e,n,o,u,b);const w=await Gs(v,u);if(!w)throw v;re(e,n,o,u,w);try{d=await i(u,{...r,...w})}catch(_){const S=Ee(_);throw S&&Object.keys(S).length>0&&re(e,n,o,u,S),_}}a={...d,versions:{...h,...d.versions}}}Y(e);const l=t.source==="github"?bn(e,n,o,a):a.revision;t.source==="github"&&Qt(e,o,a.versions??{},s.set??{}),e.setQueryData(g.contentRevision(o),f=>({...f,revision:l}));const c=a.versions??{};return ke(e,o,c),{revision:l,versions:c}}})}function Sn(e,t){if(!(e instanceof j))return;const n=e.data?.draft;if(!n||typeof n!="object"||!Object.hasOwn(n,t))return;const o=n[t];return o&&typeof o.version=="string"?o:void 0}function yn(e,t,n){if(!(n instanceof j))return;const o=n.data?.draft;if(!(!o||typeof o!="object"))for(const[s,r]of Object.entries(o))r===null&&be(e,t,s,!1)}function kn(e,t,n,o){Y(e),Qn(e,n,o);const s=o.block===null,r=e.getQueryData(g.contentVersions(t)),i=e.getQueryData(g.contentChanges(t)),a=Re(n,e.getQueryData(g.contentIndex(t)),i,r);if(i){const l=B(n),c=Object.fromEntries(Object.entries(i.changes).filter(([f])=>B(f)!==l));s?a!==null&&(c[n]={kind:"delete",version:null,baseVersion:a}):c[n]={kind:"set",version:o.version,baseVersion:a},e.setQueryData(g.contentChanges(t),{...i,changes:c,edited:!0})}be(e,t,n,s&&a===null),e.setQueryData(g.decofile(t),l=>{const c={...l};return s?delete c[n]:c[n]=o.block,c}),ke(e,t,{[n]:s?null:o.version}),so(e,t,n,o)}function ri(e,t,n,o){if(t.source!=="github"||!(o instanceof j))return!1;yn(e,n,o);const s=o.data?.draft;if(!s||typeof s!="object")return!1;const r=Object.keys(s),i=r.map(a=>Sn(o,a));return r.length===0||i.some(a=>a===void 0)?!1:(e.cancelQueries({queryKey:g.decofile(n)}),r.forEach((a,l)=>{kn(e,n,a,i[l])}),!0)}async function ii(e,t,n,o,s,r){t.source==="github"&&yn(e,o,r);const i=t.source==="github"?Sn(r,s):void 0;if(i)return e.cancelQueries({queryKey:g.decofile(o)}),kn(e,o,s,i),!0;await e.invalidateQueries({queryKey:g.decofile(o)});let a;try{const c=(await oe(e,t,n,()=>t.client.changesGet({names:[s]}))).entries[s];if(c&&c.after===null&&c.version!==null)return!1;a={value:c?.after??null,version:c?.version??null},t.source==="github"&&e.setQueryData(g.contentChanges(o),f=>{if(!f)return f;const h={...f.changes};return c?.kind?h[s]={kind:c.kind,version:c.version,baseVersion:c.baseVersion}:delete h[s],{...f,changes:h,edited:!0}})}catch{const l=await oe(e,t,n,()=>t.client.blocksList({}));if(l.notModified)return!1;a={value:l.blocks[s]??null,version:l.versions[s]??null}}return e.setQueryData(g.decofile(o),l=>{const c={...l};return a.value===null?delete c[s]:c[s]=a.value,c}),ke(e,o,{[s]:a.version}),!1}function Xs(e){const t=A.c(17),n=Le(e?.virtualMcpId)?.metadata;let o;t[0]!==n?(o=It(n),t[0]=n,t[1]=o):o=t[1];const s=o;let r;t[2]!==e?.branch||t[3]!==e?.orgSlug||t[4]!==e?.virtualMcpId?(r=g.protocolDraftRead(e?.orgSlug??"",e?.virtualMcpId??"",e?.branch??""),t[2]=e?.branch,t[3]=e?.orgSlug,t[4]=e?.virtualMcpId,t[5]=r):r=t[5];let i;t[6]!==e||t[7]!==s?(i=async()=>{const b=await _t(s,e.branch),w=b.pointer?.lastIndexOf("@")??-1;return{draft:b.pointer&&w>0?b.pointer.slice(0,w):null,version:b.pointer&&w>0?b.pointer.slice(w+1):b.etag}},t[6]=e,t[7]=s,t[8]=i):i=t[8];const a=!!e&&!!s;let l;t[9]!==r||t[10]!==i||t[11]!==a?(l={queryKey:r,queryFn:i,enabled:a,staleTime:Number.POSITIVE_INFINITY},t[9]=r,t[10]=i,t[11]=a,t[12]=l):l=t[12];const{data:c,isPending:f,isError:h}=F(l),u=!!e&&!!s&&f&&!h;if(!e||!c?.draft||!c.version){let b;return t[13]!==u?(b={pointer:null,pending:u},t[13]=u,t[14]=b):b=t[14],b}const d=`${c.draft}@${c.version}`;let v;return t[15]!==d?(v={pointer:d,pending:!1},t[15]=d,t[16]=v):v=t[16],v}function ai(e){return Xs(e).pointer}function ci(e){const t=A.c(4);let n;t[0]!==e?(n=g.contentRevision(e),t[0]=e,t[1]=n):n=t[1];let o;t[2]!==n?(o={queryKey:n,enabled:!1,queryFn:Zs,staleTime:Number.POSITIVE_INFINITY},t[2]=n,t[3]=o):o=t[3];const{data:s}=F(o);return s?.revision}async function Zs(){throw new Error("content revisions are set by reads and writes")}function nt(e,t){const n=A.c(6),{url:o}=Ht(e?.virtualMcpId),s=se(e?.virtualMcpId,e?.branch);if(!e)return"";let r;return n[0]!==s.cacheKeySuffix||n[1]!==s.kind||n[2]!==o||n[3]!==t?.tunnel||n[4]!==e?(r=s.kind!=="legacy"&&s.cacheKeySuffix!==void 0?xe({...e,protocolSuffix:s.cacheKeySuffix}):xe({...e,localPreviewUrl:t?.tunnel===!1?null:o}),n[0]=s.cacheKeySuffix,n[1]=s.kind,n[2]=o,n[3]=t?.tunnel,n[4]=e,n[5]=r):r=n[5],r}function li(e,t){const n=A.c(46),{url:o}=Ht(e?.virtualMcpId),s=!!o,r=se(e?.virtualMcpId,e?.branch),i=r.kind==="protocol"?r:null,a=nt(e),l=t?.fetchEnabled??!0,c=cs(e?.virtualMcpId),f=$t(e?.virtualMcpId).runtime==="cms",h=Z();let u;n[0]!==a?(u=g.decofile(a),n[0]=a,n[1]=u):u=n[1];const d=u;Cs(i,i&&e?e:null,a);let v;n[2]!==e||n[3]!==h||n[4]!==d?(v=()=>{if(!e||h.isMutating({mutationKey:me(e.orgSlug,e.virtualMcpId,e.branch)})>0)return!0;const k=h.getQueryState(d);return k?.fetchStatus==="fetching"||Date.now()-(k?.dataUpdatedAt??0)<Wt/2},n[2]=e,n[3]=h,n[4]=d,n[5]=v):v=n[5];let b;n[6]!==f||n[7]!==s||n[8]!==e||n[9]!==i||n[10]!==h||n[11]!==d?(b=async()=>{if(e){if(!i&&f&&!s){const k=Wo(h,e)?.version;if(k&&!await Yo(e,k))return}await h.refetchQueries({queryKey:d,exact:!0},{cancelRefetch:!1})}},n[6]=f,n[7]=s,n[8]=e,n[9]=i,n[10]=h,n[11]=d,n[12]=b):b=n[12];let w;n[13]!==v||n[14]!==b?(w={skip:v,read:b},n[13]=v,n[14]=b,n[15]=w):w=n[15],es(!!t?.pollWhile&&!!e,w);const _=Ce(i?.hosted?a:"");let S;n[16]!==r.kind||n[17]!==f||n[18]!==l||n[19]!==a||n[20]!==s||n[21]!==o||n[22]!==c||n[23]!==e||n[24]!==i||n[25]!==h?(S=async()=>{if(i)return(await pn(h,i,e,a)).blocks;if(r.kind==="unavailable")throw Bs("decofile");if(s){const M=await fetch(new URL("/.decofile",o).toString(),{cache:"no-store"}).catch(qs),U=M?.ok?wt(await M.text()):null;if(U)return U;const R=new Error("decofile unavailable (local tunnel unreachable)");throw R.status=502,R}if(f)return zo(h,e);const k=()=>as(e,Co(c,".deco/blocks.gen.json"));if(l){const M=await fetch(ss(e),{cache:"no-store"}).catch(Ks);if(M?.ok){const H=wt(await M.text());if(H)return H}const U=await k();if(U.kind==="data")return U.data;const R=new Error(`Failed to fetch decofile: ${M?.status??"network error"}`);throw R.status=mt({liveOk:!!M?.ok,liveStatus:M?.status,committedAbsent:U.kind==="absent"}),R}const P=await k();if(P.kind==="data")return P.data;const Q=new Error("decofile unavailable (preview down, no committed snapshot)");throw Q.status=mt({liveOk:!1,committedAbsent:P.kind==="absent"}),Q},n[16]=r.kind,n[17]=f,n[18]=l,n[19]=a,n[20]=s,n[21]=o,n[22]=c,n[23]=e,n[24]=i,n[25]=h,n[26]=S):S=n[26];const $=!!e&&r.kind!=="pending",E=i?0:3e4,D=i?.describe.pollIntervalMs,I=i?"always":void 0;let m;n[27]!==f||n[28]!==s||n[29]!==i?(m=(k,P)=>{if(i||f||s)return k<3;const Q=P.status;return Q!==502&&Q!==404&&k<2},n[27]=f,n[28]=s,n[29]=i,n[30]=m):m=n[30];let y;n[31]!==d||n[32]!==S||n[33]!==$||n[34]!==E||n[35]!==D||n[36]!==I||n[37]!==m?(y={queryKey:d,queryFn:S,enabled:$,staleTime:E,refetchInterval:D,refetchIntervalInBackground:!1,refetchOnWindowFocus:I,retry:m,retryDelay:Fo},n[31]=d,n[32]=S,n[33]=$,n[34]=E,n[35]=D,n[36]=I,n[37]=m,n[38]=y):y=n[38];const O=F(y);let x;n[39]!==_||n[40]!==O?(x=_&&O.data?to(_,O.data):void 0,n[39]=_,n[40]=O,n[41]=x):x=n[41];const N=x;let p;return n[42]!==N||n[43]!==i?.hosted||n[44]!==O?(p=i?.hosted&&N?{...O,data:N}:O,n[42]=N,n[43]=i?.hosted,n[44]=O,n[45]=p):p=n[45],p}function Ks(){return null}function qs(){return null}function ui(e,t,n){return Qo(e,t,n)}function fi(e){const t=A.c(4),n=Z(),o=se(e?.virtualMcpId,e?.branch),s=nt(e),r=o.kind==="protocol"?o.hosted:void 0;let i;return t[0]!==s||t[1]!==n||t[2]!==r?(i=(a,l)=>ro(n,r,s,a,l),t[0]=s,t[1]=n,t[2]=r,t[3]=i):i=t[3],i}function di(e,t){const n=A.c(3),o=se(e?.virtualMcpId,e?.branch),s=nt(e),r=Ce(o.kind==="protocol"&&o.hosted?s:"");let i;return n[0]!==r?.entries||n[1]!==t?(i=Object.entries(r?.entries??{}).filter(a=>{const[,l]=a;return t(l.meta?.type??"")}).map(er),n[0]=r?.entries,n[1]=t,n[2]=i):i=n[2],i}function er(e){const[t]=e;return t}const tr="site-editor-save",On={id:tr,description:void 0,action:void 0,cancel:void 0},hi="site-editor-undo",Ne="site-editor-publish";function nr(e){const t=A.c(7),{label:n,detail:o}=e;let s;t[0]!==n?(s=z.jsx("summary",{className:"cursor-pointer select-none text-muted-foreground",children:n}),t[0]=n,t[1]=s):s=t[1];let r;t[2]!==o?(r=z.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-muted-foreground",children:o}),t[2]=o,t[3]=r):r=t[3];let i;return t[4]!==s||t[5]!==r?(i=z.jsxs("details",{className:"mt-1 text-xs",children:[s,r]}),t[4]=s,t[5]=r,t[6]=i):i=t[6],i}function En(e,t){return t?z.jsx(nr,{label:e("siteEditor.details"),detail:t}):void 0}function gi(e,t,n){te.error(Kt(e,t,n),{...On,description:En(e,ls(t,n))})}function vi(e,t,n=!1){te.info(e(t?"sectionsEditor.reconcile.leftDeleted":"sectionsEditor.reconcile.keptTheirs"),{...On,description:e(t?n?"sectionsEditor.reconcile.leftDeletedNeverPublishedHint":"sectionsEditor.reconcile.leftDeletedHint":"sectionsEditor.reconcile.keptTheirsHint")})}const Dn={action:void 0,duration:void 0};function bi(e,t){te.success(t?e("siteEditor.publish.publishedOn",{host:t}):e("siteEditor.publish.published"),{...Dn,id:Ne,description:void 0})}function wi(e,{headline:t,body:n,detail:o,retry:s,pending:r,tone:i="error"}){const a=En(e,o??null);te[i](t,{id:Ne,description:n&&a?z.jsxs(z.Fragment,{children:[z.jsx("p",{children:n}),a]}):n??a,action:s?{label:e("siteEditor.tryAgain"),onClick:l=>{l.preventDefault(),te.loading(r??e("thread.publishPopover.publishing"),{...Dn,id:Ne,description:void 0}),s()}}:void 0,duration:s?Number.POSITIVE_INFINITY:void 0})}function pi(e){return e instanceof Error?e.message||null:e==null?null:String(e)}export{Ho as $,Ds as A,ws as B,as as C,Ft as D,Fr as E,kr as F,Xs as G,W as H,Ps as I,Gr as J,Jr as K,de as L,ys as M,ks as N,Ar as O,Wr as P,Lr as Q,Zr as R,Xr as S,Ut as T,Qs as U,ci as V,Ur as W,Vo as X,me as Y,Ls as Z,is as _,mr as a,vo as a0,Ao as a1,Ir as a2,dt as a3,ht as a4,_r as a5,yr as a6,Er as a7,Gn as a8,En as a9,ti as aA,qr as aB,oi as aC,Jo as aD,Rr as aE,Ke as aF,xr as aG,ai as aH,Qr as aI,ri as aJ,ee as aK,Mr as aL,wi as aM,hi as aN,On as aO,Fe as aP,wn as aQ,to as aR,Br as aS,Pr as aT,Cr as aU,Vr as aV,Hr as aW,pi as aa,ms as ab,hn as ac,nr as ad,zr as ae,Yr as af,Qo as ag,os as ah,pn as ai,Bs as aj,Fo as ak,$r as al,Ne as am,Dn as an,bi as ao,Kr as ap,vi as aq,ni as ar,jr as as,Ge as at,Nr as au,Hs as av,Ze as aw,si as ax,ii as ay,gi as az,go as b,Ht as c,fi as d,pr as e,di as f,ei as g,Or as h,Sr as i,li as j,ui as k,Yn as l,zn as m,Nt as n,jo as o,vr as p,Tr as q,wr as r,br as s,ts as t,se as u,nt as v,Dr as w,cs as x,Co as y,Es as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as ee,a6 as te,q as ne,r as E,j as t,B as G,n as F,e3 as ae,a7 as ce,aR as me,aQ as pe,aN as de,aL as ue,aM as ge,aP as fe,aO as he,bc as xe,t as C,dR as je,c as se,m as ke,_ as ve,X as ye,Z as Se,Y as be,K as q,gK as Ce}from"./index-D1W7ut2I.js";import{a as De}from"./SwitchHorizontal01-DdMiH6v0.js";import{E as we}from"./agent-icon-mHnKN98z.js";import{s as Ne}from"./Trash01-D3BXHl0z.js";import{i as Pe}from"./Upload01-CmSjLpWk.js";import{i as ie}from"./Zap-Dg95CWCj.js";import{S as Ae}from"./search-toggle-BTwJc97H.js";import{E as Y}from"./empty-state-OmCxeENw.js";import{C as Ee}from"./collection-tabs-DNPK2rVO.js";import{S as Me,F as Oe}from"./folder-icon-DcGaEdrE.js";import{j as Te,k as Re,n as Ie}from"./use-org-fs-CvKheX_E.js";import{af as ze,R as Z,Z as $e}from"./chat-context-DElPd_KV.js";import{c as _e}from"./context-shell-BDr9r5_c.js";import"./AlertCircle-B79T3vQg.js";import"./UserCheck01-DkrJoTgc.js";import"./Tool01-C5U5GfFn.js";import"./ArrowUp-CGwCu8lq.js";import"./ArrowLeft-CFDBmtQn.js";import"./ArrowRight-_1mjBk8q.js";import"./BookOpen01-Cja5K-Zg.js";import"./Globe04-BXEQpgH7.js";import"./CheckCircle-BdP9IvPO.js";import"./ChevronDown-NJEKYVpP.js";import"./ChevronSelectorVertical-QA_eM8SF.js";import"./ChevronUp-CdlwQKca.js";import"./UserSquare-CzDpovKf.js";import"./LinkBroken01-Be5szqzO.js";import"./CreditCard01-u7S1Papb.js";import"./File02-C4vk1-0W.js";import"./MessageCircle01-CWoIju4P.js";import"./Eye-_AXqkWO1.js";import"./Fingerprint04-bmDV_Zt8.js";import"./Image01-DLy5un7V.js";import"./Key01-CX9koaUb.js";import"./LayoutLeft-Cc8HE6Mh.js";import"./Minus-DJIrYTlh.js";import"./Monitor01-DO2zUSLy.js";import"./Sun-CFnDb3Gg.js";import"./Play-Upgk6Vwe.js";import"./Plus-C6PPIhQG.js";import"./SearchMd-ByGW18TK.js";import"./ShoppingBag01-CoDrN_Bf.js";import"./Users01-CsPiPLgE.js";import"./XClose-VFawdZTC.js";import"./icon-button-DDIgoNaN.js";import"./tooltip-BZz0vywC.js";import"./index-DXzlWhjJ.js";import"./badge-D43CW9ql.js";import"./markdown-Cs_VFIOo.js";import"./use-copy-9vSDNA2-.js";import"./use-mobile-BA8hUvQw.js";import"./use-panel-navigate-RwlB8yz2.js";import"./thread-route-Cpqj5B6r.js";import"./use-project-scope-CayH-uv6.js";import"./repository-binding-CGFnGVxJ.js";import"./use-mcp-client-C_qG7wUZ.js";import"./auth-Dj5MlzXt.js";import"./task-board-CgO9M3z4.js";import"./schema-C-iQKwVz.js";import"./file-preview-CCN1XfzT.js";import"./utils-DxxrR_sy.js";import"./editor-CuwMJTkv.js";import"./file-type-icon-Ch8YrFS_.js";import"./useInfiniteQuery-B7H5rw7X.js";import"./infiniteQueryObserver-DOpE6BBu.js";import"./use-view-draft-kind-6ZToH2lU.js";import"./use-blog-view-Bj96i8iq.js";import"./use-organization-settings-DzL3Na4t.js";import"./thread-intent-CJjEXtuE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DZnjbZdQ.js";import"./session-runtime-BIDE-rQF.js";import"./use-entitlements-Bi51m-s-.js";import"./use-ai-providers-COZOIITa.js";import"./use-current-view-e2srGh0R.js";import"./use-in-settings-CU_P2dfR.js";import"./use-decopilot-events-Dp7emgSR.js";import"./require-capability-CQ3NJym_.js";import"./access-gate-DEhQZEHK.js";import"./capability-load-error-D-3178zq.js";import"./sections-UpitVoFq.js";import"./textarea-D93s_9gX.js";import"./use-ask-in-chat-i9g8xTsQ.js";import"./shell-layout-CCvUDm4c.js";import"./use-deployment-admin-By_xF0wv.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-5uXj9qdB.js";import"./command-SY2ZnRo9.js";import"./index-ICy5uJS1.js";import"./integration-icon-DXN-XJCR.js";import"./project-icon-BD1ByOdc.js";import"./use-navigate-to-agent-BlGlq6Si.js";import"./use-debounced-value-Cw8HgnQu.js";import"./new-project-dialog-CRE_OifY.js";import"./label-CJFBh9Hz.js";import"./repository-picker-BPjktPxl.js";import"./github-icon-r0MgwWDh.js";import"./collection-search-DrcBBUCd.js";import"./new-project-store-C_CW1RtD.js";import"./legacy-admin-welcome-dialog-BdcU4w3n.js";import"./drawer-Cc5GoGE_.js";import"./required-auth-layout-DmEyED-o.js";import"./use-org-sso-aEsmoftk.js";const J=200,Fe=new Set(["node_modules","__pycache__"]);function H(s){const[,...e]=s.webkitRelativePath.split("/");return e.length>0?e.join("/"):s.name}function Le(s){return H(s).split("/").every(e=>!e.startsWith(".")&&!Fe.has(e))}function Be(s){return s.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"skill"}function Ke(s,e){const i=new Map;for(const o of s){const c=H(o).split("/");c.pop();const a=["skills",e,...c].join("/");i.set(a,[...i.get(a)??[],o])}return i}async function Qe(s,e){const o=(await Promise.allSettled([...s].map(([c,a])=>e({dir:c,files:a})))).find(c=>c.status==="rejected");if(o)throw o.reason}function qe(s,e){const i=_e(e),o=`skills/${s}`;return{id:`home/${o}`,name:i.name??s,description:i.description,disableModelInvocation:i.disableModelInvocation,source:"home",volume:Z,path:o,sandboxPath:`${ze}/${Z}/${o}`}}const L="*";function B(s){return s.volume==="home"}function re(s,e){const i=s.indexOf(":");return i===-1?{label:e,glyph:ie}:{label:s.slice(i+1),glyph:s.startsWith("repo:")?je:we}}function Ge(s){const e=se.c(48),{entry:i,pending:o,onOpen:c,onDelete:a}=s,n=ee(),{org:g}=te();let M;e[0]!==i.source||e[1]!==g.name?(M=re(i.source,g.name),e[0]=i.source,e[1]=g.name,e[2]=M):M=e[2];const{label:O,glyph:R}=M;let D;e[3]!==i?(D=B(i),e[3]=i,e[4]=D):D=e[4];const I=D,w=o?"opacity-60":"hover:bg-accent";let f;e[5]!==w?(f=ke("relative transition-colors group overflow-hidden flex flex-col h-full",w),e[5]=w,e[6]=f):f=e[6];let m;e[7]!==i.name||e[8]!==c||e[9]!==o?(m=!o&&t.jsx("button",{type:"button",onClick:c,className:"absolute inset-0 z-0","aria-label":i.name}),e[7]=i.name,e[8]=c,e[9]=o,e[10]=m):m=e[10];const N=I?"default":"system",z=!I;let h;e[11]!==R||e[12]!==N||e[13]!==z?(h=t.jsx(Oe,{glyph:R,tone:N,readOnly:z,className:"size-8 shrink-0"}),e[11]=R,e[12]=N,e[13]=z,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==n?(x=a&&t.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:t.jsxs(ve,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(G,{variant:"ghost",size:"icon",children:t.jsx(De,{size:16})})}),t.jsx(Se,{align:"end",children:t.jsxs(be,{variant:"destructive",onClick:K=>{K.stopPropagation(),a()},children:[t.jsx(Ne,{size:16}),n("settings.skills.deleteButton")]})})]})}),e[15]=a,e[16]=n,e[17]=x):x=e[17];let j;e[18]!==h||e[19]!==x?(j=t.jsxs("div",{className:"flex items-start justify-between",children:[h,x]}),e[18]=h,e[19]=x,e[20]=j):j=e[20];let b;e[21]!==i.name?(b=t.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.name}),e[21]=i.name,e[22]=b):b=e[22];let k;e[23]!==i.description||e[24]!==n?(k=i.description||n("settings.skills.noDescription"),e[23]=i.description,e[24]=n,e[25]=k):k=e[25];let p;e[26]!==k?(p=t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:k}),e[26]=k,e[27]=p):p=e[27];let v;e[28]!==b||e[29]!==p?(v=t.jsxs("div",{className:"flex flex-col gap-1",children:[b,p]}),e[28]=b,e[29]=p,e[30]=v):v=e[30];let d;e[31]!==j||e[32]!==v?(d=t.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[j,v]}),e[31]=j,e[32]=v,e[33]=d):d=e[33];let y;e[34]!==O||e[35]!==o||e[36]!==n?(y=o?n("settings.skills.importing"):O,e[34]=O,e[35]=o,e[36]=n,e[37]=y):y=e[37];let u;e[38]!==y?(u=t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:"h-10 flex items-center px-4.5",children:t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y})})}),e[38]=y,e[39]=u):u=e[39];let S;e[40]!==d||e[41]!==u?(S=t.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[d,u]}),e[40]=d,e[41]=u,e[42]=S):S=e[42];let T;return e[43]!==o||e[44]!==S||e[45]!==f||e[46]!==m?(T=t.jsxs(Ce,{size:"flush","aria-busy":o,className:f,children:[m,S]}),e[43]=o,e[44]=S,e[45]=f,e[46]=m,e[47]=T):T=e[47],T}function V(s){const e=se.c(2),{children:i}=s;let o;return e[0]!==i?(o=t.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:i}),e[0]=i,e[1]=o):o=e[1],o}function Ks(){const s=ee(),{org:e}=te(),i=Te(),{remove:o,upload:c}=Re("home"),a=ne(),n=E.useRef(null),[g,M]=E.useState(""),[O,R]=E.useState(L),[D,I]=E.useState(!1),[w,f]=E.useState(null),[m,N]=E.useState(null),[z,h]=E.useState(null),x=()=>{a.invalidateQueries({queryKey:q.slashSkills(e.id)}),a.invalidateQueries({queryKey:q.orgFsSkills(e.id)})},j=r=>a.setQueryData(q.slashSkills(e.id),l=>r(l??[]));async function b(r){const l=[...r??[]];if(n.current&&(n.current.value=""),l.length===0)return;const P=l[0]?.webkitRelativePath??"";if(!P){C.error(s("settings.skills.importNeedsFolder"));return}const Q=P.split("/")[0]??"",_=l.filter(Le),U=_.find(A=>H(A)==="SKILL.md");if(!U){C.error(s("settings.skills.importMissingSkillMd"));return}if(_.length>J){C.error(s("settings.skills.importTooManyFiles",{count:String(_.length),max:String(J)}));return}const $=Be(Q),X=`skills/${$}`;let W=!1;I(!0);try{if(await Ie(e.slug,"home",X)){C.error(s("settings.skills.importSlugTaken",{slug:$}));return}W=!0;const A=qe($,await U.text());j(le=>[A,...le]),h(A.id),await Qe(Ke(_,$),c.mutateAsync),C.success(s("settings.skills.importSuccess",{name:$}))}catch(A){W&&await o.mutateAsync(X).catch(()=>{}),C.error(A instanceof Error?A.message:s("settings.skills.importError"))}finally{h(null),x(),I(!1)}}const k=g.toLowerCase(),p=(i.data??[]).filter(r=>r.name.toLowerCase().includes(k)||(r.description??"").toLowerCase().includes(k)).sort((r,l)=>Number(B(l))-Number(B(r))||r.name.localeCompare(l.name)),v=new Set((i.data??[]).map(r=>r.source)),d=new Map;for(const r of p)d.set(r.source,(d.get(r.source)??0)+1);const y=[{id:L,label:s("settings.skills.filterAll"),count:p.length},...[...v].map(r=>({id:r,label:re(r,e.name).label,count:d.get(r)??0}))],u=v.has(O)?O:L,S=u===L?p:p.filter(r=>r.source===u),T=r=>f($e(r.volume,r.path)),K=async()=>{if(!m)return;const{id:r,path:l}=m;N(null),j(P=>P.filter(Q=>Q.id!==r));try{await o.mutateAsync(l),C.success(s("settings.skills.deleteSuccess"))}catch(P){C.error(P instanceof Error?P.message:s("settings.skills.deleteError"))}finally{x()}},oe=t.jsxs(G,{size:"sm",disabled:D,onClick:()=>n.current?.click(),children:[t.jsx(Pe,{size:14}),s(D?"settings.skills.importing":"settings.skills.importButton")]});return t.jsxs(F,{children:[t.jsx(F.Content,{children:t.jsx(F.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[t.jsx(F.Actions,{secondary:t.jsx(Ae,{value:g,onChange:M,label:s("library.context.search"),placeholder:s("settings.skills.searchPlaceholder"),clearLabel:s("library.library.clearSearch")}),children:oe}),t.jsx("input",{ref:n,type:"file",multiple:!0,webkitdirectory:"",className:"hidden",onChange:r=>{b(r.target.files)}}),y.length>2&&t.jsx(Ee,{placement:"page",tabs:y,activeTab:u,onTabChange:R}),i.isPending?t.jsx("div",{className:"@container",children:t.jsx(V,{children:Array.from({length:8},(r,l)=>t.jsx(ae,{className:"h-[168px] rounded-xl"},l))})}):i.isError?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ce,{size:48,className:"text-muted-foreground"}),title:s("settings.skills.errorTitle"),description:i.error instanceof Error?i.error.message:s("settings.skills.errorDescription"),actions:t.jsx(G,{size:"sm",variant:"outline",onClick:()=>{i.refetch()},children:s("settings.skills.retry")})})}):S.length===0?t.jsx("div",{className:"flex items-center justify-center py-20",children:t.jsx(Y,{image:t.jsx(ie,{size:48,className:"text-muted-foreground"}),title:s(g?"settings.skills.noResultsTitle":"settings.skills.emptyTitle"),description:g?s("settings.skills.noResultsDescription",{search:g}):s("settings.skills.emptyDescription"),actions:!1})}):t.jsx("div",{className:"@container",children:t.jsx(V,{children:S.map(r=>{const l=r.id===z;return t.jsx(Ge,{entry:r,pending:l,onOpen:()=>T(r),onDelete:B(r)&&!l?()=>N(r):void 0},r.id)})})})]})})}),w&&t.jsx(Me,{skillPath:w,onClose:()=>f(null)},w),t.jsx(me,{open:m!==null,onOpenChange:r=>!r&&N(null),children:t.jsxs(pe,{children:[t.jsxs(de,{children:[t.jsx(ue,{children:s("settings.skills.deleteDialogTitle")}),t.jsx(ge,{children:s("settings.skills.deleteDialogDescription",{name:m?.name??""})})]}),t.jsxs(fe,{children:[t.jsx(he,{children:s("settings.skills.cancel")}),t.jsx(xe,{onClick:K,variant:"destructive",children:s("settings.skills.deleteButton")})]})]})})]})}export{Ks as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as _,m as N,j}from"./index-D1W7ut2I.js";import{T as k,R as z,a as D,b as S}from"./index-BmiiXn5j.js";function V(T){const e=_.c(41);let i,t,n,s,c,b,g,o,r,a;e[0]!==T?({className:i,defaultValue:t,value:a,min:b,max:g,onPointerDown:s,onKeyDown:n,thumbLabel:o,thumbValueText:r,...c}=T,e[0]=T,e[1]=i,e[2]=t,e[3]=n,e[4]=s,e[5]=c,e[6]=b,e[7]=g,e[8]=o,e[9]=r,e[10]=a):(i=e[1],t=e[2],n=e[3],s=e[4],c=e[5],b=e[6],g=e[7],o=e[8],r=e[9],a=e[10]);const d=b===void 0?0:b,u=g===void 0?100:g;let p;e[11]!==t||e[12]!==u||e[13]!==d||e[14]!==a?(p=Array.isArray(a)?a:Array.isArray(t)?t:[d,u],e[11]=t,e[12]=u,e[13]=d,e[14]=a,e[15]=p):p=e[15];const A=p;let f;e[16]!==i?(f=N("relative flex w-full touch-none items-center py-2 select-none data-[disabled]:opacity-50 data-[orientation=vertical]:px-2 data-[orientation=vertical]:py-0 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",i),e[16]=i,e[17]=f):f=e[17];let m;e[18]!==s?(m=l=>{l.currentTarget.dataset.pointer="",s?.(l)},e[18]=s,e[19]=m):m=e[19];let h;e[20]!==n?(h=l=>{delete l.currentTarget.dataset.pointer,n?.(l)},e[20]=n,e[21]=h):h=e[21];let x;e[22]===Symbol.for("react.memo_cache_sentinel")?(x=N("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1"),e[22]=x):x=e[22];let w;e[23]===Symbol.for("react.memo_cache_sentinel")?(w=j.jsx(k,{"data-slot":"slider-track",className:x,children:j.jsx(z,{"data-slot":"slider-range",className:N("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),e[23]=w):w=e[23];let v;if(e[24]!==A.length||e[25]!==o||e[26]!==r){let l;e[28]!==o||e[29]!==r?(l=(E,R)=>j.jsx(S,{"data-slot":"slider-thumb",...o!==void 0?{"aria-label":o}:{},...r!==void 0?{"aria-valuetext":r}:{},className:"relative block size-4 shrink-0 cursor-grab rounded-full bg-white shadow-edge transition-transform duration-150 after:absolute after:-inset-3 after:rounded-full after:content-[''] hover:scale-110 focus-ring in-data-pointer:outline-none! active:scale-110 active:cursor-grabbing disabled:pointer-events-none motion-reduce:transition-none"},R),e[28]=o,e[29]=r,e[30]=l):l=e[30],v=Array.from({length:A.length},l),e[24]=A.length,e[25]=o,e[26]=r,e[27]=v}else v=e[27];let y;return e[31]!==t||e[32]!==u||e[33]!==d||e[34]!==c||e[35]!==f||e[36]!==m||e[37]!==h||e[38]!==v||e[39]!==a?(y=j.jsxs(D,{"data-slot":"slider",defaultValue:t,value:a,min:d,max:u,className:f,...c,onPointerDown:m,onKeyDown:h,children:[w,v]}),e[31]=t,e[32]=u,e[33]=d,e[34]=c,e[35]=f,e[36]=m,e[37]=h,e[38]=v,e[39]=a,e[40]=y):y=e[40],y}export{V as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,eX as G}from"./index-D1W7ut2I.js";import{b as de,d as fe,e as U,f as ge,g as pe,h as be,i as ve,C as Y,j as he,K as y,k as me,l as xe,m as Ie,s as ye}from"./task-key-B2-Ue6HC.js";function q(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Re(e,t){return e.reduce((n,r,s)=>{const a=t.get(r);return a&&(n[s]=a),n},Array(e.length))}function O(e){return e!==null&&e>=0}function Ce(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function we(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const B=e=>{let{rects:t,activeIndex:n,overIndex:r,index:s}=e;const a=q(t,r,n),o=t[s],c=a[s];return!c||!o?null:{x:c.left-o.left,y:c.top-o.top,scaleX:c.width/o.width,scaleY:c.height/o.height}},L={scaleX:1,scaleY:1},Ke=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:s,rects:a,overIndex:o}=e;const c=(t=a[n])!=null?t:r;if(!c)return null;if(s===n){const u=a[o];return u?{x:0,y:n<o?u.top+u.height-(c.top+c.height):u.top-c.top,...L}:null}const f=De(a,s,n);return s>n&&s<=o?{x:0,y:-c.height-f,...L}:s<n&&s>=o?{x:0,y:c.height+f,...L}:{x:0,y:0,...L}};function De(e,t,n){const r=e[t],s=e[t-1],a=e[t+1];return r?n<t?s?r.top-(s.top+s.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):s?r.top-(s.top+s.height):0:0}const H="Sortable",V=G.createContext({activeIndex:-1,containerId:H,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:B,disabled:{draggable:!1,droppable:!1}});function Pe(e){let{children:t,id:n,items:r,strategy:s=B,disabled:a=!1}=e;const{active:o,dragOverlay:c,droppableRects:f,over:u,measureDroppableContainers:i}=de(),l=fe(H,n),d=c.rect!==null,g=v.useMemo(()=>r.map(I=>typeof I=="object"&&"id"in I?I.id:I),[r]),R=o!=null,C=o?g.indexOf(o.id):-1,h=u?g.indexOf(u.id):-1,w=v.useRef(g),x=!Ce(g,w.current),m=h!==-1&&C===-1||x,b=we(a);U(()=>{x&&R&&i(g)},[x,g,R,i]),v.useEffect(()=>{w.current=g},[g]);const D=v.useMemo(()=>({activeIndex:C,containerId:l,disabled:b,disableTransforms:m,items:g,overIndex:h,useDragOverlay:d,sortedRects:Re(g,f),strategy:s}),[C,l,b.draggable,b.droppable,m,g,h,f,d,s]);return G.createElement(V.Provider,{value:D},t)}const Se=e=>{let{id:t,items:n,activeIndex:r,overIndex:s}=e;return q(n,r,s).indexOf(t)},Ae=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:s,items:a,newIndex:o,previousItems:c,previousContainerId:f,transition:u}=e;return!u||!r||c!==a&&s===o?!1:n?!0:o!==s&&t===f},Te={duration:200,easing:"ease"},J="transform",Ee=Y.Transition.toString({property:J,duration:0,easing:"linear"}),Ne={roleDescription:"sortable"};function Oe(e){let{disabled:t,index:n,node:r,rect:s}=e;const[a,o]=v.useState(null),c=v.useRef(n);return U(()=>{if(!t&&n!==c.current&&r.current){const f=s.current;if(f){const u=he(r.current,{ignoreTransform:!0}),i={x:f.left-u.left,y:f.top-u.top,scaleX:f.width/u.width,scaleY:f.height/u.height};(i.x||i.y)&&o(i)}}n!==c.current&&(c.current=n)},[t,n,r,s]),v.useEffect(()=>{a&&o(null)},[a]),a}function _e(e){let{animateLayoutChanges:t=Ae,attributes:n,disabled:r,data:s,getNewIndex:a=Se,id:o,strategy:c,resizeObserverConfig:f,transition:u=Te}=e;const{items:i,containerId:l,activeIndex:d,disabled:g,disableTransforms:R,sortedRects:C,overIndex:h,useDragOverlay:w,strategy:x}=v.useContext(V),m=Le(r,g),b=i.indexOf(o),D=v.useMemo(()=>({sortable:{containerId:l,index:b,items:i},...s}),[l,s,b,i]),I=v.useMemo(()=>i.slice(i.indexOf(o)),[i,o]),{rect:N,node:$,isOver:W,setNodeRef:z}=ge({id:o,data:D,disabled:m.droppable,resizeObserverConfig:{updateMeasurementsFor:I,...f}}),{active:T,activatorEvent:Z,activeNodeRect:ee,attributes:te,setNodeRef:K,listeners:re,isDragging:M,over:ne,setActivatorNodeRef:se,transform:oe}=pe({id:o,data:D,attributes:{...Ne,...n},disabled:m.draggable}),ae=be(z,K),S=!!T,P=S&&!R&&O(d)&&O(h),_=!w&&M,j=_&&P?oe:null,ie=P?j??(c??x)({rects:C,activeNodeRect:ee,activeIndex:d,overIndex:h,index:b}):null,E=O(d)&&O(h)?a({id:o,items:i,activeIndex:d,overIndex:h}):b,A=T?.id,p=v.useRef({activeId:A,items:i,newIndex:E,containerId:l}),ce=i!==p.current.items,F=t({active:T,containerId:l,isDragging:M,isSorting:S,id:o,index:b,items:i,newIndex:p.current.newIndex,previousItems:p.current.items,previousContainerId:p.current.containerId,transition:u,wasDragging:p.current.activeId!=null}),X=Oe({disabled:!F,index:b,node:$,rect:N});return v.useEffect(()=>{S&&p.current.newIndex!==E&&(p.current.newIndex=E),l!==p.current.containerId&&(p.current.containerId=l),i!==p.current.items&&(p.current.items=i)},[S,E,l,i]),v.useEffect(()=>{if(A===p.current.activeId)return;if(A!=null&&p.current.activeId==null){p.current.activeId=A;return}const ue=setTimeout(()=>{p.current.activeId=A},50);return()=>clearTimeout(ue)},[A]),{active:T,activeIndex:d,attributes:te,data:D,rect:N,index:b,newIndex:E,items:i,isOver:W,isSorting:S,isDragging:M,listeners:re,node:$,overIndex:h,over:ne,setNodeRef:ae,setActivatorNodeRef:se,setDroppableNodeRef:z,setDraggableNodeRef:K,transform:X??ie,transition:le()};function le(){if(X||ce&&p.current.newIndex===b)return Ee;if(!(_&&!ve(Z)||!u)&&(S||F))return Y.Transition.toString({...u,property:J})}}function Le(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function k(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const ke=[y.Down,y.Right,y.Up,y.Left],je=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:s,droppableContainers:a,over:o,scrollableAncestors:c}}=t;if(ke.includes(e.code)){if(e.preventDefault(),!n||!r)return;const f=[];a.getEnabled().forEach(l=>{if(!l||l!=null&&l.disabled)return;const d=s.get(l.id);if(d)switch(e.code){case y.Down:r.top<d.top&&f.push(l);break;case y.Up:r.top>d.top&&f.push(l);break;case y.Left:r.left>d.left&&f.push(l);break;case y.Right:r.left<d.left&&f.push(l);break}});const u=me({collisionRect:r,droppableRects:s,droppableContainers:f});let i=xe(u,"id");if(i===o?.id&&u.length>1&&(i=u[1].id),i!=null){const l=a.get(n.id),d=a.get(i),g=d?s.get(d.id):null,R=d?.node.current;if(R&&g&&l&&d){const h=Ie(R).some((I,N)=>c[N]!==I),w=Q(l,d),x=Me(l,d),m=h||!w?{x:0,y:0}:{x:x?r.width-g.width:0,y:x?r.height-g.height:0},b={x:g.left,y:g.top};return m.x&&m.y?b:ye(b,m)}}}};function Q(e,t){return!k(e)||!k(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Me(e,t){return!k(e)||!k(t)||!Q(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}export{Pe as S,q as a,B as r,je as s,_e as u,Ke as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as A,a6 as B,r as v,j as e,n as x,hx as k,gZ as b,gl as y,gm as a,ie as D,B as u,I as g,aR as z,aQ as O,aN as R,aL as T,aP as F,aO as q,bc as M,E as C,t as c,c as U}from"./index-D1W7ut2I.js";import{D as $}from"./domain-settings-DE07O2_X.js";import{S as H}from"./switch-C8bVi-NX.js";import{a as Q,b as Z,c as G,d as J}from"./use-org-sso-aEsmoftk.js";import{s as K}from"./Trash01-D3BXHl0z.js";import{R as V}from"./require-capability-CQ3NJym_.js";import"./badge-D43CW9ql.js";import"./select-Us30SuzI.js";import"./index-BdQq_4o_.js";import"./index-DXzlWhjJ.js";import"./ChevronDown-NJEKYVpP.js";import"./ChevronUp-CdlwQKca.js";import"./access-gate-DEhQZEHK.js";import"./capability-load-error-D-3178zq.js";function W(){const s=A(),{org:o}=B(),{data:h,isLoading:P}=Q(o.id,o.slug),f=Z(o.id,o.slug),S=G(o.id,o.slug),E=J(o.id,o.slug),[i,l]=v.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[d,p]=v.useState(!1),[I,j]=v.useState(!1),m=h?.configured&&h.config,n=h?.config,N=()=>{n&&l({issuer:n.issuer,clientId:n.clientId,clientSecret:"",discoveryEndpoint:n.discoveryEndpoint??"",domain:n.domain,scopes:n.scopes.join(" ")}),p(!0)},_=async()=>{if(!i.issuer||!i.clientId||!i.domain){c.error(s("settings.orgSso.requiredFieldsError"));return}if(!m&&!i.clientSecret){c.error(s("settings.orgSso.clientSecretRequiredError"));return}try{await f.mutateAsync({issuer:i.issuer,clientId:i.clientId,clientSecret:i.clientSecret,discoveryEndpoint:i.discoveryEndpoint||void 0,scopes:i.scopes.split(/\s+/).filter(Boolean),domain:i.domain,enforced:n?.enforced??!1}),C(m?"sso_config_updated":"sso_configured",{organization_id:o.id,email_domain:i.domain}),c.success(s("settings.orgSso.configurationSavedSuccess")),p(!1)}catch(t){c.error(t instanceof Error?t.message:s("settings.orgSso.saveSsoConfigError"))}},w=async()=>{try{await S.mutateAsync(),C("sso_config_removed",{organization_id:o.id}),c.success(s("settings.orgSso.configurationRemovedSuccess")),p(!1),j(!1)}catch{c.error(s("settings.orgSso.removeSsoConfigError"))}},L=async t=>{try{await E.mutateAsync(t),C("sso_enforcement_toggled",{organization_id:o.id,enforced:t}),c.success(s(t?"settings.orgSso.enforcementEnabledSuccess":"settings.orgSso.enforcementDisabledSuccess"))}catch{c.error(s("settings.orgSso.toggleEnforcementError"))}};return e.jsxs(x,{children:[e.jsx(x.Content,{children:e.jsx(x.Container,{children:e.jsxs(k,{children:[e.jsx(x.Title,{children:s("settings.orgSso.securityTitle")}),e.jsx($,{}),P?e.jsx("div",{className:"text-sm text-muted-foreground",children:s("settings.orgSso.loading")}):e.jsxs(e.Fragment,{children:[m&&!d&&e.jsx(b,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.providerLabel"),action:e.jsx("span",{className:"font-medium",children:n.issuer})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.clientId})}),e.jsx(a,{title:s("settings.orgSso.domainLabel"),action:e.jsx("span",{className:"font-medium",children:n.domain})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx("span",{className:"font-mono text-xs",children:n.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:s("settings.orgSso.enforceSsoLabel"),description:s("settings.orgSso.enforceSsoDescription"),action:e.jsx(H,{checked:n.enforced,onCheckedChange:L,disabled:E.isPending})}),e.jsxs(D,{children:[e.jsxs(u,{variant:"ghost",size:"sm",onClick:()=>j(!0),disabled:S.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(K,{size:14}),s("settings.orgSso.removeButton")]}),e.jsx(u,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/${o.slug}/sso/authorize`,"_blank")},children:s("settings.orgSso.testSsoButton")}),e.jsx(u,{variant:"outline",size:"sm",onClick:N,children:s("settings.orgSso.editConfigButton")})]})]})}),(!m||d)&&e.jsx(b,{title:s("settings.orgSso.sectionTitle"),children:e.jsxs(y,{children:[e.jsx(a,{title:s("settings.orgSso.issuerUrlLabel"),description:s("settings.orgSso.issuerUrlDescription"),action:e.jsx(g,{id:"sso-issuer",placeholder:s("settings.orgSso.issuerUrlPlaceholder"),value:i.issuer,onChange:t=>l(r=>({...r,issuer:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientIdLabel"),action:e.jsx(g,{id:"sso-client-id",placeholder:s("settings.orgSso.clientIdPlaceholder"),value:i.clientId,onChange:t=>l(r=>({...r,clientId:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.clientSecretLabel"),description:d&&m?s("settings.orgSso.clientSecretEditDescription"):void 0,action:e.jsx(g,{id:"sso-client-secret",type:"password",placeholder:s("settings.orgSso.clientSecretPlaceholder"),value:i.clientSecret,onChange:t=>l(r=>({...r,clientSecret:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.emailDomainLabel"),description:s("settings.orgSso.emailDomainDescription"),action:e.jsx(g,{id:"sso-domain",placeholder:s("settings.orgSso.emailDomainPlaceholder"),value:i.domain,onChange:t=>l(r=>({...r,domain:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.scopesLabel"),action:e.jsx(g,{id:"sso-scopes",placeholder:s("settings.orgSso.scopesPlaceholder"),value:i.scopes,onChange:t=>l(r=>({...r,scopes:t.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:s("settings.orgSso.discoveryEndpointLabel"),description:s("settings.orgSso.discoveryEndpointDescription"),action:e.jsx(g,{id:"sso-discovery",placeholder:s("settings.orgSso.discoveryEndpointPlaceholder"),value:i.discoveryEndpoint,onChange:t=>l(r=>({...r,discoveryEndpoint:t.target.value})),className:"w-[280px]"})}),e.jsxs(D,{children:[d&&e.jsx(u,{variant:"outline",size:"sm",onClick:()=>p(!1),children:s("settings.orgSso.cancelButton")}),e.jsx(u,{onClick:_,disabled:f.isPending,size:"sm",children:f.isPending?s("settings.orgSso.savingButton"):s(d?"settings.orgSso.updateButton":"settings.orgSso.configureSsoButton")})]})]})})]})]})})}),e.jsx(z,{open:I,onOpenChange:j,children:e.jsxs(O,{children:[e.jsx(R,{children:e.jsx(T,{children:s("settings.orgSso.removeConfirmation")})}),e.jsxs(F,{children:[e.jsx(q,{disabled:S.isPending,children:s("settings.orgSso.cancelButton")}),e.jsx(M,{onClick:w,disabled:S.isPending,variant:"destructive",children:s("settings.orgSso.removeButton")})]})]})})]})}function me(){const s=U.c(1);let o;return s[0]===Symbol.for("react.memo_cache_sentinel")?(o=e.jsx(V,{capability:"org:manage",area:"security",children:e.jsx(W,{})}),s[0]=o):o=s[0],o}export{me as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{W as Ye,v as ie,B as Ge,X as ze,Y as Qe,Z as Ze}from"./usage-stats-CLMr8vHI.js";import{r as p,gt as Je,go as we,gu as et,gv as j,gw as te,j as I,cd as tt,gx as nt,gy as ne,gz as ot,gA as rt,gB as st,gC as it,gD as at,gE as lt,gF as Ce,gG as ct,c as H,V as ut,K as dt,gH as ft,gI as gt,gJ as mt,b as pt,m as vt,h as ht}from"./index-D1W7ut2I.js";import{g as bt,d as xt}from"./gateway-client-BgktQVnM.js";import{A as yt}from"./agent-icon-mHnKN98z.js";var Hn=Ye;var Et=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ae=Et.join(","),Ie=typeof Element>"u",z=Ie?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,J=!Ie&&Element.prototype.getRootNode?function(n){var e;return n==null||(e=n.getRootNode)===null||e===void 0?void 0:e.call(n)}:function(n){return n?.ownerDocument},ee=function(e,t){var o;t===void 0&&(t=!0);var r=e==null||(o=e.getAttribute)===null||o===void 0?void 0:o.call(e,"inert"),s=r===""||r==="true",i=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):ee(e.parentNode));return i},Rt=function(e){var t,o=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return o===""||o==="true"},St=function(e,t,o){if(ee(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(ae));return t&&z.call(e,ae)&&r.unshift(e),r=r.filter(o),r},le=function(e,t,o){for(var r=[],s=Array.from(e);s.length;){var i=s.shift();if(!ee(i,!1))if(i.tagName==="SLOT"){var a=i.assignedElements(),l=a.length?a:i.children,c=le(l,!0,o);o.flatten?r.push.apply(r,c):r.push({scopeParent:i,candidates:c})}else{var d=z.call(i,ae);d&&o.filter(i)&&(t||!e.includes(i))&&r.push(i);var u=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!ee(u,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(u&&g){var h=le(u===!0?i.children:u.children,!0,o);o.flatten?r.push.apply(r,h):r.push({scopeParent:i,candidates:h})}else s.unshift.apply(s,i.children)}}return r},Te=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Pe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Rt(e))&&!Te(e)?0:e.tabIndex},wt=function(e,t){var o=Pe(e);return o<0&&t&&!Te(e)?0:o},Ct=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Ae=function(e){return e.tagName==="INPUT"},It=function(e){return Ae(e)&&e.type==="hidden"},Tt=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(o){return o.tagName==="SUMMARY"});return t},Pt=function(e,t){for(var o=0;o<e.length;o++)if(e[o].checked&&e[o].form===t)return e[o]},At=function(e){if(!e.name)return!0;var t=e.form||J(e),o=function(a){return t.querySelectorAll('input[type="radio"][name="'+a+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(e.name));else try{r=o(e.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Pt(r,e.form);return!s||s===e},Nt=function(e){return Ae(e)&&e.type==="radio"},Dt=function(e){return Nt(e)&&!At(e)},Mt=function(e){var t,o=e&&J(e),r=(t=o)===null||t===void 0?void 0:t.host,s=!1;if(o&&o!==e){var i,a,l;for(s=!!((i=r)!==null&&i!==void 0&&(a=i.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&r;){var c,d,u;o=J(r),r=(c=o)===null||c===void 0?void 0:c.host,s=!!((d=r)!==null&&d!==void 0&&(u=d.ownerDocument)!==null&&u!==void 0&&u.contains(r))}}return s},ge=function(e){var t=e.getBoundingClientRect(),o=t.width,r=t.height;return o===0&&r===0},Ot=function(e,t){var o=t.displayCheck,r=t.getShadowRoot;if(o==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var i=z.call(e,"details>summary:first-of-type"),a=i?e.parentElement:e;if(z.call(a,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="full-native"||o==="legacy-full"){if(typeof r=="function"){for(var l=e;e;){var c=e.parentElement,d=J(e);if(c&&!c.shadowRoot&&r(c)===!0)return ge(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(Mt(e))return!e.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return ge(e);return!1},Ft=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var o=0;o<t.children.length;o++){var r=t.children.item(o);if(r.tagName==="LEGEND")return z.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},qt=function(e,t){return!(t.disabled||It(t)||Ot(t,e)||Tt(t)||Ft(t))},me=function(e,t){return!(Dt(t)||Pe(t)<0||!qt(e,t))},$t=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},Ne=function(e){var t=[],o=[];return e.forEach(function(r,s){var i=!!r.scopeParent,a=i?r.scopeParent:r,l=wt(a,i),c=i?Ne(r.candidates):a;l===0?i?t.push.apply(t,c):t.push(a):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:c})}),o.sort(Ct).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(t)},De=function(e,t){t=t||{};var o;return t.getShadowRoot?o=le([e],t.includeContainer,{filter:me.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:$t}):o=St(e,t.includeContainer,me.bind(null,t)),Ne(o)};function kt(){return/apple/i.test(navigator.vendor)}const pe="data-floating-ui-focusable";function _t(n){let e=n.activeElement;for(;((t=e)==null||(t=t.shadowRoot)==null?void 0:t.activeElement)!=null;){var t;e=e.shadowRoot.activeElement}return e}function ce(n,e){if(!n||!e)return!1;const t=e.getRootNode==null?void 0:e.getRootNode();if(n.contains(e))return!0;if(t&&Je(t)){let o=e;for(;o;){if(n===o)return!0;o=o.parentNode||o.host}}return!1}function G(n){return"composedPath"in n?n.composedPath()[0]:n.target}function oe(n,e){if(e==null)return!1;if("composedPath"in n)return n.composedPath().includes(e);const t=n;return t.target!=null&&e.contains(t.target)}function Lt(n){return n.matches("html,body")}function Q(n){return n?.ownerDocument||document}function jt(n){return n?n.hasAttribute(pe)?n:n.querySelector("["+pe+"]")||n:null}function Z(n,e,t){return t===void 0&&(t=!0),n.filter(r=>{var s;return r.parentId===e&&(!t||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...Z(n,r.id,t)])}function Kt(n){return"nativeEvent"in n}var Bt=typeof document<"u",Ut=function(){},V=Bt?p.useLayoutEffect:Ut;const Vt={...we},Wt=Vt.useInsertionEffect,Ht=Wt||(n=>n());function W(n){const e=p.useRef(()=>{});return Ht(()=>{e.current=n}),p.useCallback(function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}const Me=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Oe(n,e){const t=De(n,Me()),o=t.length;if(o===0)return;const r=_t(Q(n)),s=t.indexOf(r),i=s===-1?e===1?0:o-1:s+e;return t[i]}function Xt(n){return Oe(Q(n).body,1)||n}function Yt(n){return Oe(Q(n).body,-1)||n}function re(n,e){const t=e||n.currentTarget,o=n.relatedTarget;return!o||!ce(t,o)}function Gt(n){De(n,Me()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function ve(n){n.querySelectorAll("[data-tabindex]").forEach(t=>{const o=t.dataset.tabindex;delete t.dataset.tabindex,o?t.setAttribute("tabindex",o):t.removeAttribute("tabindex")})}const zt="data-floating-ui-focusable",he="active",be="selected",Qt={...we};let xe=!1,Zt=0;const ye=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Zt++;function Jt(){const[n,e]=p.useState(()=>xe?ye():void 0);return V(()=>{n==null&&e(ye())},[]),p.useEffect(()=>{xe=!0},[]),n}const en=Qt.useId,ue=en||Jt;function tn(){const n=new Map;return{emit(e,t){var o;(o=n.get(e))==null||o.forEach(r=>r(t))},on(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off(e,t){var o;(o=n.get(e))==null||o.delete(t)}}}const nn=p.createContext(null),on=p.createContext(null),Fe=()=>{var n;return((n=p.useContext(nn))==null?void 0:n.id)||null},qe=()=>p.useContext(on);function de(n){return"data-floating-ui-"+n}const rn={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ee=p.forwardRef(function(e,t){const[o,r]=p.useState();V(()=>{kt()&&r("button")},[]);const s={ref:t,tabIndex:0,role:o,"aria-hidden":o?void 0:!0,[de("focus-guard")]:"",style:rn};return I.jsx("span",{...e,...s})}),sn={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$e=p.createContext(null),Re=de("portal");function an(n){n===void 0&&(n={});const{id:e,root:t}=n,o=ue(),r=cn(),[s,i]=p.useState(null),a=p.useRef(null);return V(()=>()=>{s?.remove(),queueMicrotask(()=>{a.current=null})},[s]),V(()=>{if(!o||a.current)return;const l=e?document.getElementById(e):null;if(!l)return;const c=document.createElement("div");c.id=o,c.setAttribute(Re,""),l.appendChild(c),a.current=c,i(c)},[e,o]),V(()=>{if(t===null||!o||a.current)return;let l=t||r?.portalNode;l&&!it(l)&&(l=l.current),l=l||document.body;let c=null;e&&(c=document.createElement("div"),c.id=e,l.appendChild(c));const d=document.createElement("div");d.id=o,d.setAttribute(Re,""),l=c||l,l.appendChild(d),a.current=d,i(d)},[e,t,o,r]),s}function ln(n){const{children:e,id:t,root:o,preserveTabOrder:r=!0}=n,s=an({id:t,root:o}),[i,a]=p.useState(null),l=p.useRef(null),c=p.useRef(null),d=p.useRef(null),u=p.useRef(null),g=i?.modal,h=i?.open,y=!!i&&!i.modal&&i.open&&r&&!!(o||s);return p.useEffect(()=>{if(!s||!r||g)return;function m(f){s&&re(f)&&(f.type==="focusin"?ve:Gt)(s)}return s.addEventListener("focusin",m,!0),s.addEventListener("focusout",m,!0),()=>{s.removeEventListener("focusin",m,!0),s.removeEventListener("focusout",m,!0)}},[s,r,g]),p.useEffect(()=>{s&&(h||ve(s))},[h,s]),I.jsxs($e.Provider,{value:p.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:d,afterInsideRef:u,portalNode:s,setFocusManagerState:a}),[r,s]),children:[y&&s&&I.jsx(Ee,{"data-type":"outside",ref:l,onFocus:m=>{if(re(m,s)){var f;(f=d.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Yt(x);b?.focus()}}}),y&&s&&I.jsx("span",{"aria-owns":s.id,style:sn}),s&&tt.createPortal(e,s),y&&s&&I.jsx(Ee,{"data-type":"outside",ref:c,onFocus:m=>{if(re(m,s)){var f;(f=u.current)==null||f.focus()}else{const x=i?i.domReference:null,b=Xt(x);b?.focus(),i?.closeOnFocusOut&&i?.onOpenChange(!1,m.nativeEvent,"focus-out")}}})]})}const cn=()=>p.useContext($e),un={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Se=n=>{var e,t;return{escapeKey:typeof n=="boolean"?n:(e=n?.escapeKey)!=null?e:!1,outsidePress:typeof n=="boolean"?n:(t=n?.outsidePress)!=null?t:!0}};function fn(n,e){e===void 0&&(e={});const{open:t,onOpenChange:o,elements:r,dataRef:s}=n,{enabled:i=!0,escapeKey:a=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:d=!1,referencePressEvent:u="pointerdown",ancestorScroll:g=!1,bubbles:h,capture:y}=e,m=qe(),f=W(typeof l=="function"?l:()=>!1),x=typeof l=="function"?f:l,b=p.useRef(!1),{escapeKey:E,outsidePress:v}=Se(h),{escapeKey:D,outsidePress:C}=Se(y),O=p.useRef(!1),A=W(R=>{var S;if(!t||!i||!a||R.key!=="Escape"||O.current)return;const P=(S=s.current.floatingContext)==null?void 0:S.nodeId,M=m?Z(m.nodesRef.current,P):[];if(!E&&(R.stopPropagation(),M.length>0)){let w=!0;if(M.forEach(N=>{var q;if((q=N.context)!=null&&q.open&&!N.context.dataRef.current.__escapeKeyBubbles){w=!1;return}}),!w)return}o(!1,Kt(R)?R.nativeEvent:R,"escape-key")}),F=W(R=>{var S;const P=()=>{var M;A(R),(M=G(R))==null||M.removeEventListener("keydown",P)};(S=G(R))==null||S.addEventListener("keydown",P)}),T=W(R=>{var S;const P=s.current.insideReactTree;s.current.insideReactTree=!1;const M=b.current;if(b.current=!1,c==="click"&&M||P||typeof x=="function"&&!x(R))return;const w=G(R),N="["+de("inert")+"]",q=Q(r.floating).querySelectorAll(N);let L=j(w)?w:null;for(;L&&!ne(L);){const k=ot(L);if(ne(k)||!j(k))break;L=k}if(q.length&&j(w)&&!Lt(w)&&!ce(w,r.floating)&&Array.from(q).every(k=>!ce(L,k)))return;if(rt(w)&&K){const k=ne(w),B=st(w),Y=/auto|scroll/,Ke=k||Y.test(B.overflowX),Be=k||Y.test(B.overflowY),Ue=Ke&&w.clientWidth>0&&w.scrollWidth>w.clientWidth,Ve=Be&&w.clientHeight>0&&w.scrollHeight>w.clientHeight,We=B.direction==="rtl",He=Ve&&(We?R.offsetX<=w.offsetWidth-w.clientWidth:R.offsetX>w.clientWidth),Xe=Ue&&R.offsetY>w.clientHeight;if(He||Xe)return}const U=(S=s.current.floatingContext)==null?void 0:S.nodeId,X=m&&Z(m.nodesRef.current,U).some(k=>{var B;return oe(R,(B=k.context)==null?void 0:B.elements.floating)});if(oe(R,r.floating)||oe(R,r.domReference)||X)return;const fe=m?Z(m.nodesRef.current,U):[];if(fe.length>0){let k=!0;if(fe.forEach(B=>{var Y;if((Y=B.context)!=null&&Y.open&&!B.context.dataRef.current.__outsidePressBubbles){k=!1;return}}),!k)return}o(!1,R,"outside-press")}),$=W(R=>{var S;const P=()=>{var M;T(R),(M=G(R))==null||M.removeEventListener(c,P)};(S=G(R))==null||S.addEventListener(c,P)});p.useEffect(()=>{if(!t||!i)return;s.current.__escapeKeyBubbles=E,s.current.__outsidePressBubbles=v;let R=-1;function S(q){o(!1,q,"ancestor-scroll")}function P(){window.clearTimeout(R),O.current=!0}function M(){R=window.setTimeout(()=>{O.current=!1},nt()?5:0)}const w=Q(r.floating);a&&(w.addEventListener("keydown",D?F:A,D),w.addEventListener("compositionstart",P),w.addEventListener("compositionend",M)),x&&w.addEventListener(c,C?$:T,C);let N=[];return g&&(j(r.domReference)&&(N=te(r.domReference)),j(r.floating)&&(N=N.concat(te(r.floating))),!j(r.reference)&&r.reference&&r.reference.contextElement&&(N=N.concat(te(r.reference.contextElement)))),N=N.filter(q=>{var L;return q!==((L=w.defaultView)==null?void 0:L.visualViewport)}),N.forEach(q=>{q.addEventListener("scroll",S,{passive:!0})}),()=>{a&&(w.removeEventListener("keydown",D?F:A,D),w.removeEventListener("compositionstart",P),w.removeEventListener("compositionend",M)),x&&w.removeEventListener(c,C?$:T,C),N.forEach(q=>{q.removeEventListener("scroll",S)}),window.clearTimeout(R)}},[s,r,a,x,c,t,o,g,i,E,v,A,D,F,T,C,$]),p.useEffect(()=>{s.current.insideReactTree=!1},[s,x,c]);const _=p.useMemo(()=>({onKeyDown:A,...d&&{[un[u]]:R=>{o(!1,R.nativeEvent,"reference-press")},...u!=="click"&&{onClick(R){o(!1,R.nativeEvent,"reference-press")}}}}),[A,o,d,u]),K=p.useMemo(()=>{function R(S){S.button===0&&(b.current=!0)}return{onKeyDown:A,onMouseDown:R,onMouseUp:R,[dn[c]]:()=>{s.current.insideReactTree=!0}}},[A,c,s]);return p.useMemo(()=>i?{reference:_,floating:K}:{},[i,_,K])}function gn(n){const{open:e=!1,onOpenChange:t,elements:o}=n,r=ue(),s=p.useRef({}),[i]=p.useState(()=>tn()),a=Fe()!=null,[l,c]=p.useState(o.reference),d=W((h,y,m)=>{s.current.openEvent=h?y:void 0,i.emit("openchange",{open:h,event:y,reason:m,nested:a}),t?.(h,y,m)}),u=p.useMemo(()=>({setPositionReference:c}),[]),g=p.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return p.useMemo(()=>({dataRef:s,open:e,onOpenChange:d,elements:g,events:i,floatingId:r,refs:u}),[e,d,g,i,r,u])}function mn(n){n===void 0&&(n={});const{nodeId:e}=n,t=gn({...n,elements:{reference:null,floating:null,...n.elements}}),o=n.rootContext||t,r=o.elements,[s,i]=p.useState(null),[a,l]=p.useState(null),d=r?.domReference||s,u=p.useRef(null),g=qe();V(()=>{d&&(u.current=d)},[d]);const h=et({...n,elements:{...r,...a&&{reference:a}}}),y=p.useCallback(E=>{const v=j(E)?{getBoundingClientRect:()=>E.getBoundingClientRect(),getClientRects:()=>E.getClientRects(),contextElement:E}:E;l(v),h.refs.setReference(v)},[h.refs]),m=p.useCallback(E=>{(j(E)||E===null)&&(u.current=E,i(E)),(j(h.refs.reference.current)||h.refs.reference.current===null||E!==null&&!j(E))&&h.refs.setReference(E)},[h.refs]),f=p.useMemo(()=>({...h.refs,setReference:m,setPositionReference:y,domReference:u}),[h.refs,m,y]),x=p.useMemo(()=>({...h.elements,domReference:d}),[h.elements,d]),b=p.useMemo(()=>({...h,...o,refs:f,elements:x,nodeId:e}),[h,f,x,e,o]);return V(()=>{o.dataRef.current.floatingContext=b;const E=g?.nodesRef.current.find(v=>v.id===e);E&&(E.context=b)}),p.useMemo(()=>({...h,context:b,refs:f,elements:x}),[h,f,x,b])}function se(n,e,t){const o=new Map,r=t==="item";let s=n;if(r&&n){const{[he]:i,[be]:a,...l}=n;s=l}return{...t==="floating"&&{tabIndex:-1,[zt]:""},...s,...e.map(i=>{const a=i?i[t]:null;return typeof a=="function"?n?a(n):null:a}).concat(n).reduce((i,a)=>(a&&Object.entries(a).forEach(l=>{let[c,d]=l;if(!(r&&[he,be].includes(c)))if(c.indexOf("on")===0){if(o.has(c)||o.set(c,[]),typeof d=="function"){var u;(u=o.get(c))==null||u.push(d),i[c]=function(){for(var g,h=arguments.length,y=new Array(h),m=0;m<h;m++)y[m]=arguments[m];return(g=o.get(c))==null?void 0:g.map(f=>f(...y)).find(f=>f!==void 0)}}}else i[c]=d}),i),{})}}function pn(n){n===void 0&&(n=[]);const e=n.map(a=>a?.reference),t=n.map(a=>a?.floating),o=n.map(a=>a?.item),r=p.useCallback(a=>se(a,n,"reference"),e),s=p.useCallback(a=>se(a,n,"floating"),t),i=p.useCallback(a=>se(a,n,"item"),o);return p.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}const vn=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(n,e){var t,o;e===void 0&&(e={});const{open:r,elements:s,floatingId:i}=n,{enabled:a=!0,role:l="dialog"}=e,c=ue(),d=((t=s.domReference)==null?void 0:t.id)||c,u=p.useMemo(()=>{var b;return((b=jt(s.floating))==null?void 0:b.id)||i},[s.floating,i]),g=(o=vn.get(l))!=null?o:l,y=Fe()!=null,m=p.useMemo(()=>g==="tooltip"||l==="label"?{["aria-"+(l==="label"?"labelledby":"describedby")]:r?u:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?u:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&y&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,u,y,r,d,l]),f=p.useMemo(()=>{const b={id:u,...g&&{role:g}};return g==="tooltip"||l==="label"?b:{...b,...g==="menu"&&{"aria-labelledby":d}}},[g,u,d,l]),x=p.useCallback(b=>{let{active:E,selected:v}=b;const D={role:"option",...E&&{id:u+"-fui-option"}};switch(l){case"select":case"combobox":return{...D,"aria-selected":v}}return{}},[u,l]);return p.useMemo(()=>a?{reference:m,floating:f,item:x}:{},[a,m,f,x])}function bn(n){var e;const{char:t,allowSpaces:o,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,$position:a}=n,l=o&&!r,c=Ze(t),d=new RegExp(`\\s${c}$`),u=i?"^":"",g=r?"":c,h=l?new RegExp(`${u}${c}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${u}(?:^)?${c}[^\\s${g}]*`,"gm"),y=((e=a.nodeBefore)===null||e===void 0?void 0:e.isText)&&a.nodeBefore.text;if(!y)return null;const m=a.pos-y.length,f=Array.from(y.matchAll(h)).pop();if(!f||f.input===void 0||f.index===void 0)return null;const x=f.input.slice(Math.max(0,f.index-1),f.index),b=new RegExp(`^[${s?.join("")}\0]?$`).test(x);if(s!==null&&!b)return null;const E=m+f.index;let v=E+f[0].length;return l&&d.test(y.slice(v-1,v+1))&&(f[0]+=" ",v+=1),E<a.pos&&v>=a.pos?{range:{from:E,to:v},query:f[0].slice(t.length),text:f[0]}:null}function xn(n){return n.docChanged?n.steps.some(e=>{const t=e.slice;if(!t?.content)return!1;const o=t.content.textBetween(0,t.content.size,`
|
|
2
|
-
`);return/\s/.test(o)}):!1}function yn(n){return()=>{const e=n.state.selection.$anchor.pos,{top:t,right:o,bottom:r,left:s}=n.view.coordsAtPos(e);try{return new DOMRect(s,t,o-s,r-t)}catch{return null}}}function En(n,e,t,o){return t?()=>{const r=o.getState(n.state),s=r?.decorationId,i=e.dom.querySelector(`[data-decoration-id="${s}"]`);return i?.getBoundingClientRect()||null}:yn(n)}function Rn({match:n,dismissedRange:e,state:t,transaction:o,editor:r,shouldResetDismissed:s,effectiveAllowSpaces:i}){return s?.({editor:r,state:t,range:e,match:n,transaction:o,allowSpaces:i})?!1:i?n.range.from===e.from:n.range.from===e.from&&!xn(o)}function Sn({view:n,pluginKeyRef:e}){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}function wn({pluginKey:n,decorationTag:e,decorationClass:t,decorationContent:o,decorationEmptyClass:r,renderer:s,dispatchExit:i}){return{handleKeyDown(a,l){var c;const d=n.getState(a.state);if(!d.active)return!1;if(l.key==="Escape"||l.key==="Esc"){var u;return s==null||(u=s.onKeyDown)===null||u===void 0||u.call(s,{view:a,event:l,range:d.range}),i(a),!0}return(s==null||(c=s.onKeyDown)===null||c===void 0?void 0:c.call(s,{view:a,event:l,range:d.range}))||!1},decorations(a){const{active:l,range:c,decorationId:d,query:u}=n.getState(a);if(!l)return null;const g=!u?.length,h=[t];return g&&h.push(r),ze.create(a.doc,[Qe.inline(c.from,c.to,{nodeName:e,class:h.join(" "),"data-decoration-id":d||void 0,"data-decoration-content":o})])}}}function Cn({editor:n,char:e,effectiveAllowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,findSuggestionMatch:i,allow:a,shouldShow:l,shouldKeepDismissed:c,pluginKey:d}){return{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}},apply(u,g,h,y){const{isEditable:m}=n,{composing:f}=n.view,{selection:x}=u,{empty:b,from:E}=x,v={...g},D=u.getMeta(d);if(D&&D.exit)return v.active=!1,v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null,v.dismissedRange=g.active?{...g.range}:g.dismissedRange,v;if(v.composing=f,u.docChanged&&v.dismissedRange!==null&&(v.dismissedRange={from:u.mapping.map(v.dismissedRange.from),to:u.mapping.map(v.dismissedRange.to)}),m&&(b||n.view.composing)){(E<g.range.from||E>g.range.to)&&!f&&!g.composing&&(v.active=!1);const C=i({char:e,allowSpaces:t,allowToIncludeChar:o,allowedPrefixes:r,startOfLine:s,$position:x.$from}),O=`id_${Math.floor(Math.random()*4294967295)}`;C&&a({editor:n,state:y,range:C.range,isActive:g.active})&&(!l||l({editor:n,range:C.range,query:C.query,text:C.text,transaction:u}))?(v.dismissedRange!==null&&!c({match:C,dismissedRange:v.dismissedRange,state:y,transaction:u})&&(v.dismissedRange=null),v.dismissedRange===null?(v.active=!0,v.decorationId=g.decorationId||O,v.range=C.range,v.query=C.query,v.text=C.text):v.active=!1):(C||(v.dismissedRange=null),v.active=!1)}else v.active=!1;return v.active||(v.decorationId=null,v.range={from:0,to:0},v.query=null,v.text=null),v}}}function In({editor:n,items:e}){let t=null,o=null,r=null;const s=()=>{o!==null&&(clearTimeout(o),o=null),r?.(),r=null},i=c=>new Promise(d=>{r=d,o=setTimeout(()=>{o=null;const u=r;r=null,u?.()},c)}),a=()=>{t?.abort(),s(),t=null};return{abort:a,fetch:async(c,d)=>{a(),t=new AbortController;const u=t;if(d>0&&await i(d),t!==u||u.signal.aborted)return{status:"aborted"};try{const g=await e({editor:n,query:c,signal:u.signal});return t!==u||u.signal.aborted?{status:"aborted"}:{status:"resolved",items:g}}catch{return t!==u||u.signal.aborted?{status:"aborted"}:{status:"error"}}}}}function Tn({placement:n,offset:e,flip:t,floatingUi:o}){var r,s,i,a;const l=[at({mainAxis:(r=e.mainAxis)!==null&&r!==void 0?r:4,crossAxis:(s=e.crossAxis)!==null&&s!==void 0?s:0})];return t&&l.push(lt()),!(o==null||(i=o.middleware)===null||i===void 0)&&i.length&&l.push(...o.middleware),{placement:n,strategy:(a=o?.strategy)!==null&&a!==void 0?a:"absolute",middleware:l}}function Pn(n){if(n instanceof HTMLElement)return n;if(typeof n=="string")try{const e=document.querySelector(n);if(e)return e}catch{return document.body}return document.body}function An({getReferenceRect:n,contextElement:e,config:t,container:o,dismissOnOutsideClick:r,dismiss:s}){return(i,a={})=>{const l={getBoundingClientRect:()=>{var y;return(y=n())!==null&&y!==void 0?y:new DOMRect},contextElement:e};let c=!1;const d=!i.isConnected;d&&Pn(o).appendChild(i),a.onPosition||(i.style.visibility="hidden",i.style.width="max-content");const g=Ce(l,i,()=>{ct(l,i,{placement:t.placement,strategy:t.strategy,middleware:t.middleware}).then(({x:y,y:m,placement:f,strategy:x})=>{if(a.onPosition){a.onPosition({x:y,y:m,placement:f,strategy:x});return}Object.assign(i.style,{position:x,left:`${y}px`,top:`${m}px`}),c||(c=!0,i.style.visibility="")})},a.autoUpdate);let h;return r&&(h=y=>{const m=y.target;!(m instanceof Node)||i.contains(m)||e.contains(m)||s()},document.addEventListener("pointerdown",h,!0)),()=>{g(),h&&document.removeEventListener("pointerdown",h,!0),d&&i.remove()}}}function Nn({editor:n,pluginKey:e,items:t,renderer:o,minQueryLength:r,debounce:s,initialItems:i,placement:a,offset:l,container:c,flip:d,floatingUi:u,dismissOnOutsideClick:g,command:h,clientRectFor:y,dispatchExit:m}){let f;const x=In({editor:n,items:t}),b=Tn({placement:a,offset:l,flip:d,floatingUi:u});function E(v,D){switch(v){case"started":var C;o==null||(C=o.onStart)===null||C===void 0||C.call(o,D);break;case"updated":var O;o==null||(O=o.onUpdate)===null||O===void 0||O.call(o,D);break;case"stopped":var A;o==null||(A=o.onExit)===null||A===void 0||A.call(o,D)}}return{update:async(v,D)=>{var C,O;const A=e.getState(D),F=e.getState(v.state);if(!A||!F)return;let T=null;const $=A.query!==F.query,_=A.text!==F.text,K=A.range.from!==F.range.from||A.range.to!==F.range.to,R=$||_||K;if(!A.active&&F.active)T="started";else if(A.active&&!F.active)T="stopped";else if(F.active&&R)T="updated";else return;const S=T==="stopped"?A:F,P=v.dom.querySelector(`[data-decoration-id="${S.decorationId}"]`),M=y(v,P),w=r===0||(S.query?S.query.length>=r:!1),N=(T==="started"||T==="updated")&&w;if(f={editor:n,range:S.range,query:S.query||"",text:S.text||"",items:i??[],command:U=>h({editor:n,range:S.range,props:U}),decorationNode:P,clientRect:M,loading:N,placement:a,offset:{mainAxis:(C=l.mainAxis)!==null&&C!==void 0?C:4,crossAxis:(O=l.crossAxis)!==null&&O!==void 0?O:0},container:c,flip:d,floatingUi:b,mount:An({getReferenceRect:M,contextElement:v.dom,config:b,container:c,dismissOnOutsideClick:g,dismiss:()=>m(n.view)})},T==="started"){var q;o==null||(q=o.onBeforeStart)===null||q===void 0||q.call(o,f)}if(T==="updated"){var L;o==null||(L=o.onBeforeUpdate)===null||L===void 0||L.call(o,f)}if(T==="started"&&E(T,f),T==="started"||T==="updated")if(!N)x.abort(),f={...f,items:i??[],loading:!1};else{f={...f,items:i??[],loading:!0},T="updated",E(T,f);const U=await x.fetch(S.query||"",s);if(U.status==="aborted")return;const X=e.getState(v.state);if(!X?.active){x.abort();return}f=U.status==="resolved"?{...f,items:U.items,loading:!1}:{...f,loading:!1}}if(T==="stopped"){x.abort(),E(T,f),f=void 0;return}T==="updated"&&E(T,f)},destroy:()=>{var v;x.abort(),f&&(o==null||(v=o.onExit)===null||v===void 0||v.call(o,f))}}}const ke=new ie("suggestion");function _e({pluginKey:n=ke,editor:e,char:t="@",allowSpaces:o=!1,allowToIncludeChar:r=!1,allowedPrefixes:s=[" "],startOfLine:i=!1,decorationTag:a="span",decorationClass:l="suggestion",decorationContent:c="",decorationEmptyClass:d="is-empty",command:u=()=>null,items:g=()=>[],minQueryLength:h=0,debounce:y=0,initialItems:m,placement:f="bottom-start",offset:x={},container:b,flip:E=!0,floatingUi:v,dismissOnOutsideClick:D=!0,render:C=()=>({}),allow:O=()=>!0,findSuggestionMatch:A=bn,shouldShow:F,shouldResetDismissed:T}){const $=C?.(),_=o&&!r,K=(P,M)=>En(e,P,M,n);function R(P){return Rn({...P,editor:e,shouldResetDismissed:T,effectiveAllowSpaces:_})}const S=P=>Sn({view:P,pluginKeyRef:n});return new Ge({key:n,view:()=>Nn({editor:e,pluginKey:n,items:g,renderer:$,minQueryLength:h,debounce:y,initialItems:m,placement:f,offset:x,container:b,flip:E,floatingUi:v,dismissOnOutsideClick:D,command:u,clientRectFor:K,dispatchExit:S}),state:Cn({editor:e,char:t,effectiveAllowSpaces:_,allowToIncludeChar:r,allowedPrefixes:s,startOfLine:i,findSuggestionMatch:A,allow:O,shouldShow:F,shouldKeepDismissed:R,pluginKey:n}),props:wn({pluginKey:n,decorationTag:a,decorationClass:l,decorationContent:c,decorationEmptyClass:d,renderer:$,dispatchExit:S})})}function Xn(n,e=ke){const t=n.state.tr.setMeta(e,{exit:!0});n.dispatch(t)}var Yn=_e;function Dn(n){const e=H.c(17),{editor:t,query:o,items:r,onSelect:s,onClose:i}=n,[a,l]=p.useState(0),c=p.useRef(r),d=p.useRef(a),u=p.useRef(s),g=p.useRef(i),h=p.useDeferredValue(o),[y,m]=p.useState(h);y!==h&&(m(h),l(0)),a>=r.length&&r.length>0&&l(0);let f,x;e[0]!==r?(f=()=>{c.current=r},x=[r],e[0]=r,e[1]=f,e[2]=x):(f=e[1],x=e[2]),p.useEffect(f,x);let b,E;e[3]!==a?(b=()=>{d.current=a},E=[a],e[3]=a,e[4]=b,e[5]=E):(b=e[4],E=e[5]),p.useEffect(b,E);let v,D;e[6]!==s?(v=()=>{u.current=s},D=[s],e[6]=s,e[7]=v,e[8]=D):(v=e[7],D=e[8]),p.useEffect(v,D);let C,O;e[9]!==i?(C=()=>{g.current=i},O=[i],e[9]=i,e[10]=C,e[11]=O):(C=e[10],O=e[11]),p.useEffect(C,O);let A,F;e[12]!==t?(F=()=>{if(t?.isDestroyed)return;let _;try{_=t.view.dom}catch{return}if(!_)return;const K=S=>{const P=c.current;if(!P.length)return!1;const M=()=>l(N=>(N+1)%P.length),w=()=>l(N=>(N-1+P.length)%P.length);switch(S.key){case"ArrowUp":return S.preventDefault(),w(),!0;case"ArrowDown":return S.preventDefault(),M(),!0;case"Tab":return S.preventDefault(),S.shiftKey?w():M(),!0;case"Home":return S.preventDefault(),l(0),!0;case"End":return S.preventDefault(),l(P.length-1),!0;case"Enter":{if(S.isComposing)return!1;S.preventDefault();const N=d.current;return N!==-1&&P[N]&&u.current?.(P[N],N),!0}case"Escape":return S.preventDefault(),g.current?.(),!0;default:return!1}},R=S=>{K(S)};return _.addEventListener("keydown",R,!0),()=>{_?.removeEventListener("keydown",R,!0)}},A=[t],e[12]=t,e[13]=A,e[14]=F):(A=e[13],F=e[14]),p.useEffect(F,A);const T=r.length?a:void 0;let $;return e[15]!==T?($={selectedIndex:T,setSelectedIndex:l},e[15]=T,e[16]=$):$=e[16],$}function Mn(n,e){switch(e.type){case"SET_SELECTED_ITEM":return{...n,selectedItem:e.payload};case"ON_START":return{...n,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...n,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return n}}const Le=p.createContext(void 0);function je(){const n=p.useContext(Le);if(!n)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return n}function On(n){const e=H.c(16),{editor:t,char:o,pluginKey:r,allow:s,onOpenChange:i}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=a):a=e[0];const[l,c]=p.useReducer(Mn,a);let d;e[1]!==i?(d=m=>{i?.(m)},e[1]=i,e[2]=d):d=e[2];const u=p.useEffectEvent(d);let g;e[3]!==o||e[4]!==s||e[5]!==t||e[6]!==u||e[7]!==r?(g=()=>{if(t?.isDestroyed)return;const m=r instanceof ie?r:new ie(r);t.state.plugins.find(b=>b.spec.key===m)&&t.unregisterPlugin(m);const x=_e({pluginKey:m,editor:t,char:o,allow(b){const E=t.state.doc.resolve(b.range.from);for(let v=E.depth;v>0;v--)if(E.node(v).type.name==="image")return!1;return!(s&&!s(b))},command(){},render:()=>({onStart:b=>{c({type:"ON_START",payload:{element:b.decorationNode??null,query:b.query,range:b.range}}),u(!0)},onUpdate:b=>{c({type:"ON_UPDATE",payload:{element:b.decorationNode??null,query:b.query,range:b.range}})},onKeyDown:b=>b.event.key==="Escape"?(c({type:"ON_EXIT"}),!0):!1,onExit:()=>{c({type:"ON_EXIT"}),u(!1)}}),items:Fn});return t.registerPlugin(x),()=>{t?.isDestroyed||t.unregisterPlugin(m)}},e[3]=o,e[4]=s,e[5]=t,e[6]=u,e[7]=r,e[8]=g):g=e[8];let h;e[9]!==o||e[10]!==s||e[11]!==t||e[12]!==r?(h=[t,r,o,c,s],e[9]=o,e[10]=s,e[11]=t,e[12]=r,e[13]=h):h=e[13],p.useEffect(g,h);let y;return e[14]!==l?(y={state:l,dispatch:c},e[14]=l,e[15]=y):y=e[15],y}function Fn(){return[]}function qn({editor:n,queryKey:e,queryFn:t,onSelect:o}){const{state:r,dispatch:s}=je(),i=p.useDeferredValue(r.query),{data:a}=ut({queryKey:dt.suggestionItems(e,r.open,i),queryFn:()=>r.open?t({query:i}):[]}),l=()=>{s({type:"ON_EXIT"})},c=async(u,g)=>{if(!(r.selectedItem!==null||!r.range)){s({type:"SET_SELECTED_ITEM",payload:u});try{const{view:h}=n,m=h.state.selection.$to.nodeAfter?.text?.startsWith(" "),f=r.range?{...r.range}:{from:0,to:0};m&&r.range&&(f.to+=1),await o({range:f,item:u})===!1?s({type:"SET_SELECTED_ITEM",payload:null}):l()}catch{l()}}},{selectedIndex:d}=Dn({editor:n,query:i,items:a,onSelect:c,onClose:l});return{selectedItem:r.selectedItem,items:a,selectedIndex:d,close:l,onSelect:c}}function $n({children:n}){const{state:e,dispatch:t}=je(),{open:o,element:r}=e,s=()=>{t({type:"ON_EXIT"})},{refs:i,floatingStyles:a,context:l}=mn({placement:"bottom-start",open:o,onOpenChange:g=>{g||s()},elements:{reference:r},middleware:[ft(10),gt(),mt()],whileElementsMounted:Ce}),c=fn(l,{outsidePress:g=>!(g.target instanceof Element&&g.target.closest(".ProseMirror"))}),d=hn(l,{role:"listbox"}),{getFloatingProps:u}=pn([c,d]);return o?I.jsx(ln,{children:I.jsx("div",{ref:i.setFloating,style:a,...u(),className:"z-50 w-auto min-w-[360px] max-w-[520px] rounded-lg border bg-popover p-0 text-popover-foreground shadow-soft outline-hidden overflow-hidden",children:n})}):null}const kn=n=>{const e=H.c(17),{item:t,isSelected:o,onSelect:r,isLoading:s,ref:i,renderItem:a}=n;let l;if(e[0]!==t){const x=bt(t._meta);l=t.title||xt(t.name,x),e[0]=t,e[1]=l}else l=e[1];const c=l,d=t.description||null,u=t.icon,g=o&&"bg-accent text-accent-foreground",h=s&&"pointer-events-none opacity-50";let y;e[2]!==g||e[3]!==h?(y=vt("relative flex w-full cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors","hover:bg-accent hover:text-accent-foreground","focus:bg-accent focus:text-accent-foreground",g,h),e[2]=g,e[3]=h,e[4]=y):y=e[4];let m;e[5]!==d||e[6]!==u||e[7]!==s||e[8]!==t||e[9]!==c||e[10]!==a?(m=a?a(t):I.jsxs(I.Fragment,{children:[u!==void 0&&I.jsx(yt,{icon:u,name:c,size:"xs",className:"mr-2"}),I.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[I.jsxs("div",{className:"flex items-center justify-between gap-2",children:[I.jsx("span",{className:"font-medium flex items-center truncate capitalize",children:c}),s&&I.jsx(ht,{size:"xs"})]}),d&&I.jsx("div",{className:"text-xs text-muted-foreground line-clamp-1",children:d})]}),t.drillable&&I.jsx("kbd",{className:"shrink-0 ml-2 px-1.5 py-0.5 text-2xs font-medium text-muted-foreground bg-muted border border-border rounded",children:"↵"})]}),e[5]=d,e[6]=u,e[7]=s,e[8]=t,e[9]=c,e[10]=a,e[11]=m):m=e[11];let f;return e[12]!==r||e[13]!==i||e[14]!==y||e[15]!==m?(f=I.jsx("div",{ref:i,onClick:r,className:y,children:m}),e[12]=r,e[13]=i,e[14]=y,e[15]=m,e[16]=f):f=e[16],f},_n=n=>{const e=H.c(24),{editor:t,queryKey:o,queryFn:r,onSelect:s,renderItem:i,emptyLabel:a}=n,l=pt();let c;e[0]!==t||e[1]!==s||e[2]!==r||e[3]!==o?(c={editor:t,queryKey:o,queryFn:r,onSelect:s},e[0]=t,e[1]=s,e[2]=r,e[3]=o,e[4]=c):c=e[4];const{items:d,selectedIndex:u,onSelect:g,selectedItem:h}=qn(c);if(!d.length){let x;e[5]!==a||e[6]!==l?(x=a??l("chat.mention.noItemsFound"),e[5]=a,e[6]=l,e[7]=x):x=e[7];let b;return e[8]!==x?(b=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md border shadow-soft p-3 text-sm",children:x}),e[8]=x,e[9]=b):b=e[9],b}let y;e[10]===Symbol.for("react.memo_cache_sentinel")?(y={maxHeight:"min(320px, var(--radix-popover-content-available-height, 320px))"},e[10]=y):y=e[10];let m;if(e[11]!==g||e[12]!==d||e[13]!==i||e[14]!==u||e[15]!==h?.name){let x;e[17]!==g||e[18]!==i||e[19]!==u||e[20]!==h?.name?(x=(b,E)=>I.jsx(kn,{item:b,isSelected:E===u,ref:E===u?Kn:void 0,onSelect:()=>g(b,E),isLoading:h?.name===b.name,renderItem:i},`${b.kind??"item"}:${b.name}`),e[17]=g,e[18]=i,e[19]=u,e[20]=h?.name,e[21]=x):x=e[21],m=d.map(x),e[11]=g,e[12]=d,e[13]=i,e[14]=u,e[15]=h?.name,e[16]=m}else m=e[16];let f;return e[22]!==m?(f=I.jsx("div",{className:"min-w-[360px] max-w-[520px] bg-popover text-popover-foreground rounded-md overflow-y-auto",style:y,children:I.jsx("div",{className:"p-1",children:m})}),e[22]=m,e[23]=f):f=e[23],f};function Ln(){const n=H.c(1);let e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=I.jsx("div",{className:"p-1",children:[...Array(3)].map(jn)}),n[0]=e):e=n[0],e}function jn(n,e){return I.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1.5 animate-pulse",children:[I.jsx("div",{className:"h-4 w-24 bg-muted rounded"}),I.jsx("div",{className:"h-3 w-32 bg-muted rounded"})]},e)}function Gn(n){const e=H.c(20),{editor:t,char:o,pluginKey:r,queryKey:s,queryFn:i,onSelect:a,allow:l,onOpenChange:c,renderItem:d,emptyLabel:u}=n;let g;e[0]!==l||e[1]!==o||e[2]!==t||e[3]!==c||e[4]!==r?(g={editor:t,char:o,pluginKey:r,allow:l,onOpenChange:c},e[0]=l,e[1]=o,e[2]=t,e[3]=c,e[4]=r,e[5]=g):g=e[5];const{state:h,dispatch:y}=On(g);let m;e[6]!==y||e[7]!==h?(m={state:h,dispatch:y},e[6]=y,e[7]=h,e[8]=m):m=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=I.jsx(Ln,{}),e[9]=f):f=e[9];let x;e[10]!==t||e[11]!==u||e[12]!==a||e[13]!==i||e[14]!==s||e[15]!==d?(x=I.jsx($n,{children:I.jsx(p.Suspense,{fallback:f,children:I.jsx(_n,{editor:t,queryKey:s,queryFn:i,onSelect:a,renderItem:d,emptyLabel:u})})}),e[10]=t,e[11]=u,e[12]=a,e[13]=i,e[14]=s,e[15]=d,e[16]=x):x=e[16];let b;return e[17]!==m||e[18]!==x?(b=I.jsx(Le.Provider,{value:m,children:x}),e[17]=m,e[18]=x,e[19]=b):b=e[19],b}function Kn(n){n&&n.scrollIntoView({block:"center",behavior:"smooth"})}export{Gn as S,Yn as a,Xn as e,Hn as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as l,m as a,j as m,g_ as u}from"./index-D1W7ut2I.js";function p(r){const e=l.c(8),{size:n,className:c}=r,t=n===void 0?16:n;let s;e[0]!==t?(s={width:t,height:t},e[0]=t,e[1]=s):s=e[1];let i;e[2]!==c?(i=a("shrink-0 rounded-full object-cover",c),e[2]=c,e[3]=i):i=e[3];let o;return e[4]!==t||e[5]!==s||e[6]!==i?(o=m.jsx("img",{src:u,alt:"Super Agent",width:t,height:t,style:s,className:i}),e[4]=t,e[5]=s,e[6]=i,e[7]=o):o=e[7],o}export{p as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as c,j as i,c9 as C,c7 as _,c4 as T,ca as I,cg as M,cr as H,cn as z,c as A,m as g}from"./index-D1W7ut2I.js";var b="Switch",[U]=z(b),[q,L]=U(b),y=c.forwardRef((o,e)=>{const{__scopeSwitch:t,name:s,checked:r,defaultChecked:n,required:a,disabled:d,value:u="on",onCheckedChange:w,form:l,...k}=o,[p,h]=c.useState(null),S=_(e,m=>h(m)),v=c.useRef(!1),x=p?l||!!p.closest("form"):!0,[f,N]=T({prop:r,defaultProp:n??!1,onChange:w,caller:b});return i.jsxs(q,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":a,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...k,ref:S,onClick:I(o.onClick,m=>{N(B=>!B),x&&(v.current=m.isPropagationStopped(),v.current||m.stopPropagation())})}),x&&i.jsx(R,{control:p,bubbles:!v.current,name:s,value:u,checked:f,required:a,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});y.displayName=b;var E="SwitchThumb",P=c.forwardRef((o,e)=>{const{__scopeSwitch:t,...s}=o,r=L(E,t);return i.jsx(C.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...s,ref:e})});P.displayName=E;var O="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:o,control:e,checked:t,bubbles:s=!0,...r},n)=>{const a=c.useRef(null),d=_(a,n),u=M(t),w=H(e);return c.useEffect(()=>{const l=a.current;if(!l)return;const k=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(k,"checked").set;if(u!==t&&h){const S=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(S)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...r,tabIndex:-1,ref:d,style:{...r.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=O;function j(o){return o?"checked":"unchecked"}var $=y,D=P;function W(o){const e=A.c(9);let t,s;e[0]!==o?({className:t,...s}=o,e[0]=o,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-foreground/15 inline-flex h-[1.125rem] w-8 shrink-0 items-center rounded-full border-2 border-transparent transition-colors outline-none focus-ring disabled:opacity-50",t),e[3]=t,e[4]=r):r=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(D,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-3.5 rounded-full shadow-[0_0_0_1px_#0000000f] ring-0 transition-transform data-[state=checked]:translate-x-3.5 data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let a;return e[6]!==s||e[7]!==r?(a=i.jsx($,{"data-slot":"switch",className:r,...s,children:n}),e[6]=s,e[7]=r,e[8]=a):a=e[8],a}export{W as S};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ee,j as s,i9 as he,b as pe,r as oe,B as Z,gl as fe,dR as ge,m as xe,gm as je,hJ as Re,t as re,e3 as Se,x as ve,aW as be,w as De,I as Ce,y as Pe,v as _e,D as Ae,aL as ke,aM as Ne,aN as Ee,aO as Oe,bc as Ie,aP as ze,aQ as we,aR as Te}from"./index-D1W7ut2I.js";import{s as ue}from"./Plus-C6PPIhQG.js";import{E as $e}from"./empty-state-BOACqe8n.js";import{u as Fe,G as Ge,R as Be}from"./repository-picker-BPjktPxl.js";import{u as He,b as Le,c as qe}from"./use-org-repo-syncs-De9jW4li.js";import{R as Je}from"./require-capability-CQ3NJym_.js";import"./ArrowLeft-CFDBmtQn.js";import"./tooltip-BZz0vywC.js";import"./index-DXzlWhjJ.js";import"./label-CJFBh9Hz.js";import"./github-icon-r0MgwWDh.js";import"./useInfiniteQuery-B7H5rw7X.js";import"./infiniteQueryObserver-DOpE6BBu.js";import"./collection-search-DrcBBUCd.js";import"./SearchMd-ByGW18TK.js";import"./BookOpen01-Cja5K-Zg.js";import"./ShoppingBag01-CoDrN_Bf.js";import"./use-debounced-value-Cw8HgnQu.js";import"./use-organization-settings-DzL3Na4t.js";import"./schema-C-iQKwVz.js";import"./task-board-CgO9M3z4.js";import"./access-gate-DEhQZEHK.js";import"./capability-load-error-D-3178zq.js";function Me(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Qe(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:Re(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=ee.c(30),{config:n,onRemove:i}=e,c=pe(),d=Qe(n,c),m=Fe();let r;t[0]!==n.repositoryId||t[1]!==m.data?(r=m.data?.find(D=>D.id===n.repositoryId),t[0]=n.repositoryId,t[1]=m.data,t[2]=r):r=t[2];const a=r,l=je;let p;t[3]!==a?(p=a?s.jsx(Ge,{provider:a.provider,size:16}):s.jsx(ge,{size:16}),t[3]=a,t[4]=p):p=t[4];const j=a?.path??`${n.repoOwner}/${n.repoName}`;let R;t[5]!==j?(R=s.jsx("span",{className:"truncate",children:j}),t[5]=j,t[6]=R):R=t[6];let g;t[7]!==n.ref?(g=s.jsxs("span",{className:"text-xs font-normal text-muted-foreground shrink-0",children:["@",n.ref]}),t[7]=n.ref,t[8]=g):g=t[8];let S;t[9]!==R||t[10]!==g?(S=s.jsxs("span",{className:"flex items-center gap-2",children:[R,g]}),t[9]=R,t[10]=g,t[11]=S):S=t[11];const b=xe(d.error&&"text-destructive");let v;t[12]!==n.volume||t[13]!==c?(v=c("settings.syncedRepos.rowSubtitle",{volume:n.volume}),t[12]=n.volume,t[13]=c,t[14]=v):v=t[14];let u;t[15]!==d.label||t[16]!==b||t[17]!==v?(u=s.jsxs("span",{className:b,children:[v," ·"," ",d.label]}),t[15]=d.label,t[16]=b,t[17]=v,t[18]=u):u=t[18];let y;t[19]!==c?(y=c("settings.syncedRepos.remove"),t[19]=c,t[20]=y):y=t[20];let f;t[21]!==i||t[22]!==y?(f=s.jsx(Z,{variant:"outline",size:"sm",onClick:i,children:y}),t[21]=i,t[22]=y,t[23]=f):f=t[23];let h;return t[24]!==l||t[25]!==f||t[26]!==p||t[27]!==S||t[28]!==u?(h=s.jsx(l,{icon:p,title:S,description:u,action:f}),t[24]=l,t[25]=f,t[26]=p,t[27]=S,t[28]=u,t[29]=h):h=t[29],h}function We(e){const t=ee.c(15),{onAdd:n}=e,i=pe();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ge,{}),t[0]=c):c=t[0];let d;t[1]!==i?(d=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=d):d=t[2];let m;t[3]!==i?(m=i("settings.syncedRepos.emptyDescription"),t[3]=i,t[4]=m):m=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ue,{size:14}),t[5]=r):r=t[5];let a;t[6]!==i?(a=i("settings.syncedRepos.addRepo"),t[6]=i,t[7]=a):a=t[7];let l;t[8]!==n||t[9]!==a?(l=s.jsxs(Z,{onClick:n,size:"sm",children:[r,a]}),t[8]=n,t[9]=a,t[10]=l):l=t[10];let p;return t[11]!==d||t[12]!==m||t[13]!==l?(p=s.jsx(fe,{children:s.jsx($e,{size:"inline",icon:c,title:d,description:m,children:l})}),t[11]=d,t[12]=m,t[13]=l,t[14]=p):p=t[14],p}function Ke(){const e=ee.c(102),t=pe(),n=He(),i=Le(),c=qe(),[d,m]=oe.useState(!1),[r,a]=oe.useState(null),[l,p]=oe.useState(""),[j,R]=oe.useState(null);let g;e[0]!==i||e[1]!==r||e[2]!==t||e[3]!==l?(g=function(){!r||!l.trim()||i.mutate({repositoryId:r.id,volume:l.trim()},{onSuccess:x=>{a(null),re.success(t("settings.syncedRepos.created",{volume:x.volume}))},onError:x=>{re.error(x instanceof Error?x.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=r,e[2]=t,e[3]=l,e[4]=g):g=e[4];const S=g;let b;e[5]!==j||e[6]!==c||e[7]!==t?(b=function(){j&&c.mutate(j.id,{onSuccess:()=>re.success(t("settings.syncedRepos.removed")),onError:x=>re.error(x instanceof Error?x.message:t("settings.syncedRepos.failed")),onSettled:()=>R(null)})},e[5]=j,e[6]=c,e[7]=t,e[8]=b):b=e[8];const v=b;if(n.isPending){let o;return e[9]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Se,{className:"h-32 w-full"}),e[9]=o):o=e[9],o}let u;e[10]!==n.data?(u=n.data??[],e[10]=n.data,e[11]=u):u=e[11];const y=u;let f;e[12]!==y||e[13]!==t?(f=y.length===0?s.jsx(We,{onAdd:()=>m(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(Z,{onClick:()=>m(!0),size:"sm",children:[s.jsx(ue,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx(fe,{children:y.map(o=>s.jsx(Ve,{config:o,onRemove:()=>R(o)},o.id))})]}),e[12]=y,e[13]=t,e[14]=f):f=e[14];let h;e[15]!==t?(h=t("settings.syncedRepos.pickerTitle"),e[15]=t,e[16]=h):h=e[16];let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=o=>{const{repository:x}=o;m(!1),a(x),p(Me(x.path.split("/").at(-1)??x.path))},e[17]=D):D=e[17];let C;e[18]!==d||e[19]!==h?(C=s.jsx(Be,{open:d,onOpenChange:m,title:h,onPicked:D}),e[18]=d,e[19]=h,e[20]=C):C=e[20];const ae=r!==null;let te;e[21]===Symbol.for("react.memo_cache_sentinel")?(te=o=>{o||a(null)},e[21]=te):te=e[21];let P;e[22]!==t?(P=t("settings.syncedRepos.nameDialogTitle"),e[22]=t,e[23]=P):P=e[23];let _;e[24]!==P?(_=s.jsx(ve,{children:P}),e[24]=P,e[25]=_):_=e[25];const ce=r?r.path:"";let A;e[26]!==t||e[27]!==ce?(A=t("settings.syncedRepos.nameDialogDescription",{repo:ce}),e[26]=t,e[27]=ce,e[28]=A):A=e[28];let k;e[29]!==A?(k=s.jsx(be,{children:A}),e[29]=A,e[30]=k):k=e[30];let N;e[31]!==_||e[32]!==k?(N=s.jsxs(De,{children:[_,k]}),e[31]=_,e[32]=k,e[33]=N):N=e[33];let se;e[34]===Symbol.for("react.memo_cache_sentinel")?(se=o=>p(o.target.value),e[34]=se):se=e[34];let E;e[35]!==t?(E=t("settings.syncedRepos.namePlaceholder"),e[35]=t,e[36]=E):E=e[36];let O;e[37]!==E||e[38]!==l?(O=s.jsx(Ce,{value:l,onChange:se,placeholder:E,autoFocus:!0}),e[37]=E,e[38]=l,e[39]=O):O=e[39];let ie;e[40]===Symbol.for("react.memo_cache_sentinel")?(ie=()=>a(null),e[40]=ie):ie=e[40];const ye=i.isPending;let I;e[41]!==t?(I=t("settings.syncedRepos.cancel"),e[41]=t,e[42]=I):I=e[42];let z;e[43]!==i.isPending||e[44]!==I?(z=s.jsx(Z,{variant:"outline",onClick:ie,disabled:ye,children:I}),e[43]=i.isPending,e[44]=I,e[45]=z):z=e[45];let w;e[46]!==i.isPending||e[47]!==l?(w=!l.trim()||i.isPending,e[46]=i.isPending,e[47]=l,e[48]=w):w=e[48];let T;e[49]!==i.isPending||e[50]!==t?(T=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[49]=i.isPending,e[50]=t,e[51]=T):T=e[51];let $;e[52]!==S||e[53]!==w||e[54]!==T?($=s.jsx(Z,{disabled:w,onClick:S,children:T}),e[52]=S,e[53]=w,e[54]=T,e[55]=$):$=e[55];let F;e[56]!==z||e[57]!==$?(F=s.jsxs(Pe,{children:[z,$]}),e[56]=z,e[57]=$,e[58]=F):F=e[58];let G;e[59]!==N||e[60]!==O||e[61]!==F?(G=s.jsxs(_e,{className:"sm:max-w-sm",children:[N,O,F]}),e[59]=N,e[60]=O,e[61]=F,e[62]=G):G=e[62];let B;e[63]!==G||e[64]!==ae?(B=s.jsx(Ae,{open:ae,onOpenChange:te,children:G}),e[63]=G,e[64]=ae,e[65]=B):B=e[65];const de=j!==null;let ne;e[66]===Symbol.for("react.memo_cache_sentinel")?(ne=o=>{o||R(null)},e[66]=ne):ne=e[66];const me=j?.volume??"";let H;e[67]!==t||e[68]!==me?(H=t("settings.syncedRepos.removeTitle",{volume:me}),e[67]=t,e[68]=me,e[69]=H):H=e[69];let L;e[70]!==H?(L=s.jsx(ke,{children:H}),e[70]=H,e[71]=L):L=e[71];let q;e[72]!==t?(q=t("settings.syncedRepos.removeDescription"),e[72]=t,e[73]=q):q=e[73];let J;e[74]!==q?(J=s.jsx(Ne,{children:q}),e[74]=q,e[75]=J):J=e[75];let M;e[76]!==L||e[77]!==J?(M=s.jsxs(Ee,{children:[L,J]}),e[76]=L,e[77]=J,e[78]=M):M=e[78];let Q;e[79]!==t?(Q=t("settings.syncedRepos.cancel"),e[79]=t,e[80]=Q):Q=e[80];let V;e[81]!==Q?(V=s.jsx(Oe,{children:Q}),e[81]=Q,e[82]=V):V=e[82];let W;e[83]!==t?(W=t("settings.syncedRepos.remove"),e[83]=t,e[84]=W):W=e[84];let K;e[85]!==v||e[86]!==W?(K=s.jsx(Ie,{onClick:v,children:W}),e[85]=v,e[86]=W,e[87]=K):K=e[87];let U;e[88]!==V||e[89]!==K?(U=s.jsxs(ze,{children:[V,K]}),e[88]=V,e[89]=K,e[90]=U):U=e[90];let X;e[91]!==M||e[92]!==U?(X=s.jsxs(we,{children:[M,U]}),e[91]=M,e[92]=U,e[93]=X):X=e[93];let Y;e[94]!==de||e[95]!==X?(Y=s.jsx(Te,{open:de,onOpenChange:ne,children:X}),e[94]=de,e[95]=X,e[96]=Y):Y=e[96];let le;return e[97]!==B||e[98]!==f||e[99]!==Y||e[100]!==C?(le=s.jsxs(s.Fragment,{children:[f,C,B,Y]}),e[97]=B,e[98]=f,e[99]=Y,e[100]=C,e[101]=le):le=e[101],le}function Ue(){const e=ee.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(he,{group:"storage",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}function Rt(){const e=ee.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Je,{capability:"file-configs:manage",area:"files",children:s.jsx(Ue,{})}),e[0]=t):t=e[0],t}export{Rt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,m as f,j as i}from"./index-D1W7ut2I.js";import{E as p}from"./agent-icon-mHnKN98z.js";function j(m){const s=a.c(10),{icon:o,className:l}=m,e=l===void 0?"size-4":l;if(o.kind==="component"){const{Component:c}=o;let t;return s[0]!==c||s[1]!==e?(t=i.jsx(c,{className:e}),s[0]=c,s[1]=e,s[2]=t):t=s[2],t}if(o.kind==="url"){const c=o.src;let t;s[3]!==e?(t=f(e,"rounded-sm object-cover"),s[3]=e,s[4]=t):t=s[4];let r;return s[5]!==o.src||s[6]!==t?(r=i.jsx("img",{src:c,alt:"",className:t}),s[5]=o.src,s[6]=t,s[7]=r):r=s[7],r}let n;return s[8]!==e?(n=i.jsx(p,{className:e}),s[8]=e,s[9]=n):n=s[9],n}export{j as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as f,m as r,j as c}from"./index-D1W7ut2I.js";function u(o){const e=f.c(15);let t,l,s;e[0]!==o?({className:t,variant:s,...l}=o,e[0]=o,e[1]=t,e[2]=l,e[3]=s):(t=e[1],l=e[2],s=e[3]);const a=s===void 0?"card":s,m=a==="card"&&"bg-card rounded-xl shadow-edge overflow-hidden";let n;e[4]!==m?(n=r("w-full min-w-0",m),e[4]=m,e[5]=n):n=e[5];const p=a==="flush"&&"[&_th]:text-muted-foreground [&_th]:font-normal [&_tr]:border-border/50";let i;e[6]!==t||e[7]!==p?(i=r("w-full caption-bottom text-sm min-w-0",p,t),e[6]=t,e[7]=p,e[8]=i):i=e[8];let d;e[9]!==l||e[10]!==i?(d=c.jsx("table",{"data-slot":"table",className:i,...l}),e[9]=l,e[10]=i,e[11]=d):d=e[11];let b;return e[12]!==n||e[13]!==d?(b=c.jsx("div",{"data-slot":"table-container",className:n,children:d}),e[12]=n,e[13]=d,e[14]=b):b=e[14],b}function h(o){const e=f.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=r("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function N(o){const e=f.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=r("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function w(o){const e=f.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=r("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function j(o){const e=f.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=r("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function g(o){const e=f.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=r("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{j as T,h as a,w as b,g as c,N as d,u as e};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as b,j as u,g3 as M,c9 as g,ca as h,g4 as P,e4 as S,c3 as V,c4 as k,c6 as F,g5 as _,cn as D,c as m,m as v}from"./index-D1W7ut2I.js";import{A as G,t as z}from"./active-indicator-CCMhAsc_.js";var x="Tabs",[L]=D(x,[_]),C=_(),[K,T]=L(x),N=b.forwardRef((o,e)=>{const{__scopeTabs:a,value:t,onValueChange:n,defaultValue:r,orientation:s="horizontal",dir:i,activationMode:d="automatic",...f}=o,l=V(i),[c,p]=k({prop:t,onChange:n,defaultProp:r??"",caller:x});return u.jsx(K,{scope:a,baseId:F(),value:c,onValueChange:p,orientation:s,dir:l,activationMode:d,children:u.jsx(g.div,{dir:l,"data-orientation":s,...f,ref:e})})});N.displayName=x;var y="TabsList",I=b.forwardRef((o,e)=>{const{__scopeTabs:a,loop:t=!0,...n}=o,r=T(y,a),s=C(a);return u.jsx(P,{asChild:!0,...s,orientation:r.orientation,dir:r.dir,loop:t,children:u.jsx(g.div,{role:"tablist","aria-orientation":r.orientation,...n,ref:e})})});I.displayName=y;var j="TabsTrigger",w=b.forwardRef((o,e)=>{const{__scopeTabs:a,value:t,disabled:n=!1,...r}=o,s=T(j,a),i=C(a),d=E(s.baseId,t),f=$(s.baseId,t),l=t===s.value;return u.jsx(M,{asChild:!0,...i,focusable:!n,active:l,children:u.jsx(g.button,{type:"button",role:"tab","aria-selected":l,"aria-controls":f,"data-state":l?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:d,...r,ref:e,onMouseDown:h(o.onMouseDown,c=>{!n&&c.button===0&&c.ctrlKey===!1?s.onValueChange(t):c.preventDefault()}),onKeyDown:h(o.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(t)}),onFocus:h(o.onFocus,()=>{const c=s.activationMode!=="manual";!l&&!n&&c&&s.onValueChange(t)})})})});w.displayName=j;var A="TabsContent",R=b.forwardRef((o,e)=>{const{__scopeTabs:a,value:t,forceMount:n,children:r,...s}=o,i=T(A,a),d=E(i.baseId,t),f=$(i.baseId,t),l=t===i.value,c=b.useRef(l);return b.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),u.jsx(S,{present:n||l,children:({present:p})=>u.jsx(g.div,{"data-state":l?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":d,hidden:!p,id:f,tabIndex:0,...s,ref:e,style:{...o.style,animationDuration:c.current?"0s":void 0},children:p&&r})})});R.displayName=A;function E(o,e){return`${o}-trigger-${e}`}function $(o,e){return`${o}-content-${e}`}var B=N,O=I,q=w,H=R;function W(o){const e=m.c(10);let a,t,n;e[0]!==o?({className:a,variant:n,...t}=o,e[0]=o,e[1]=a,e[2]=t,e[3]=n):(a=e[1],t=e[2],n=e[3]);const r=n===void 0?"pill":n;let s;e[4]!==a?(s=v("flex flex-col gap-2",a),e[4]=a,e[5]=s):s=e[5];let i;return e[6]!==t||e[7]!==s||e[8]!==r?(i=u.jsx(B,{"data-slot":"tabs","data-variant":r,className:s,...t}),e[6]=t,e[7]=s,e[8]=r,e[9]=i):i=e[9],i}const J=z(':scope > [data-slot="tabs-trigger"][data-state="active"]');function X(o){const e=m.c(17);let a,t,n,r;e[0]!==o?({className:t,variant:r,children:a,...n}=o,e[0]=o,e[1]=a,e[2]=t,e[3]=n,e[4]=r):(a=e[1],t=e[2],n=e[3],r=e[4]);const s=r||"pill",i=s!=="canvas",d=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background":"bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center gap-1 rounded-full p-1";let f;e[5]!==t||e[6]!==d?(f=v("relative",d,t),e[5]=t,e[6]=d,e[7]=f):f=e[7];let l;e[8]!==s||e[9]!==i?(l=i&&u.jsx("span",{"aria-hidden":!0,ref:J,"data-slot":"tabs-indicator",className:v(G,s==="underline"?"bottom-[-1px] h-0.5 rounded-full bg-primary":"top-1 bottom-1 rounded-full bg-background shadow-[0_1px_2px_0_#0000000d] dark:bg-input/30")}),e[8]=s,e[9]=i,e[10]=l):l=e[10];let c;return e[11]!==a||e[12]!==s||e[13]!==n||e[14]!==f||e[15]!==l?(c=u.jsxs(O,{"data-slot":"tabs-list","data-variant":s,className:f,...n,children:[l,a]}),e[11]=a,e[12]=s,e[13]=n,e[14]=f,e[15]=l,e[16]=c):c=e[16],c}function Y(o){const e=m.c(11);let a,t,n;e[0]!==o?({className:a,variant:n,...t}=o,e[0]=o,e[1]=a,e[2]=t,e[3]=n):(a=e[1],t=e[2],n=e[3]);const r=n||"pill",s=r==="underline"?"relative z-10 flex items-center h-full px-3 text-sm whitespace-nowrap transition-colors text-muted-foreground hover:text-foreground data-[state=active]:text-foreground focus-ring disabled:pointer-events-none disabled:opacity-50":r==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"relative z-10 data-[state=active]:text-foreground hover:text-foreground focus-ring text-muted-foreground inline-flex h-7 flex-1 items-center justify-center gap-1.5 rounded-full px-3 text-sm font-medium whitespace-nowrap transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==s?(i=v(s,a),e[4]=a,e[5]=s,e[6]=i):i=e[6];let d;return e[7]!==r||e[8]!==t||e[9]!==i?(d=u.jsx(q,{"data-slot":"tabs-trigger","data-variant":r,className:i,...t}),e[7]=r,e[8]=t,e[9]=i,e[10]=d):d=e[10],d}function Z(o){const e=m.c(8);let a,t;e[0]!==o?({className:a,...t}=o,e[0]=o,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let n;e[3]!==a?(n=v("flex-1 outline-none h-full",a),e[3]=a,e[4]=n):n=e[4];let r;return e[5]!==t||e[6]!==n?(r=u.jsx(H,{"data-slot":"tabs-content",className:n,...t}),e[5]=t,e[6]=n,e[7]=r):r=e[7],r}export{Y as T,X as a,W as b,Z as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as s}from"./schema-C-iQKwVz.js";import{cs as n}from"./index-D1W7ut2I.js";n(["claude-code","codex"]);const A="super-agent",t=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],o=t[0];function u(e){return t[e%t.length]??o}function R(e){return e.createdBy==="system"}const l="chore",_=["reviewer"],E={reviewer:"Reviewer"},d=["QA Agent","Code Reviewer"];function S(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const f=["triage","todo","in_progress","in_review","qa","customer_approval","ready_for_deployment","post_deploy_validation","done","archived"];function i(e,a){return e?[E[a],...d].some(r=>e.startsWith(`${r}:`)):!1}function D(e){return e.reviewerEnabled||!e.hasPullRequest?!1:!e.threadTitles.some(a=>_.some(r=>i(a,r)))}const p="task-board.item.updated",v="task-board.rules.updated",b="task-board.sprints.updated",m="task-board.item.deleted",L="task-board.item.prs.updated",N=4e3;export{f as C,o as D,_ as R,A as S,p as T,m as a,L as b,v as c,b as d,l as e,i as f,D as g,N as h,R as i,u as n,S as r};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as l,eX as A,cd as we}from"./index-D1W7ut2I.js";function Qr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const $e=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ge(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function st(e){return"nodeType"in e}function P(e){var t,n;return e?ge(e)?e:st(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function at(e){const{Document:t}=P(e);return e instanceof t}function Ae(e){return ge(e)?!1:e instanceof P(e).HTMLElement}function Ut(e){return e instanceof P(e).SVGElement}function ve(e){return e?ge(e)?e.document:st(e)?at(e)?e:Ae(e)||Ut(e)?e.ownerDocument:document:document:document}const G=$e?l.useLayoutEffect:l.useEffect;function Ye(e){const t=l.useRef(e);return G(()=>{t.current=e}),l.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function wn(){const e=l.useRef(null),t=l.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=l.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Se(e,t){t===void 0&&(t=[e]);const n=l.useRef(e);return G(()=>{n.current!==e&&(n.current=e)},t),n}function Me(e,t){const n=l.useRef();return l.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function ze(e){const t=Ye(e),n=l.useRef(null),r=l.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Be(e){const t=l.useRef();return l.useEffect(()=>{t.current=e},[e]),t.current}let Qe={};function We(e,t){return l.useMemo(()=>{if(t)return t;const n=Qe[e]==null?0:Qe[e]+1;return Qe[e]=n,e+"-"+n},[e,t])}function Ht(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((i,a)=>{const s=Object.entries(a);for(const[c,u]of s){const f=i[c];f!=null&&(i[c]=f+e*u)}return i},{...t})}}const he=Ht(1),Fe=Ht(-1);function xn(e){return"clientX"in e&&"clientY"in e}function lt(e){if(!e)return!1;const{KeyboardEvent:t}=P(e.target);return t&&e instanceof t}function Cn(e){if(!e)return!1;const{TouchEvent:t}=P(e.target);return t&&e instanceof t}function Xe(e){if(Cn(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return xn(e)?{x:e.clientX,y:e.clientY}:null}const Re=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Re.Translate.toString(e),Re.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Lt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Dn(e){return e.matches(Lt)?e:e.querySelector(Lt)}const Sn={display:"none"};function Rn(e){let{id:t,value:n}=e;return A.createElement("div",{id:t,style:Sn},n)}function En(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return A.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function An(){const[e,t]=l.useState("");return{announce:l.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Vt=l.createContext(null);function Mn(e){const t=l.useContext(Vt);l.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function On(){const[e]=l.useState(()=>new Set),t=l.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[l.useCallback(r=>{let{type:o,event:i}=r;e.forEach(a=>{var s;return(s=a[o])==null?void 0:s.call(a,i)})},[e]),t]}const Nn={draggable:`
|
|
2
|
-
To pick up a draggable item, press the space bar.
|
|
3
|
-
While dragging, use the arrow keys to move the item.
|
|
4
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
5
|
-
`},Tn={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ln(e){let{announcements:t=Tn,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Nn}=e;const{announce:i,announcement:a}=An(),s=We("DndLiveRegion"),[c,u]=l.useState(!1);if(l.useEffect(()=>{u(!0)},[]),Mn(l.useMemo(()=>({onDragStart(d){let{active:g}=d;i(t.onDragStart({active:g}))},onDragMove(d){let{active:g,over:h}=d;t.onDragMove&&i(t.onDragMove({active:g,over:h}))},onDragOver(d){let{active:g,over:h}=d;i(t.onDragOver({active:g,over:h}))},onDragEnd(d){let{active:g,over:h}=d;i(t.onDragEnd({active:g,over:h}))},onDragCancel(d){let{active:g,over:h}=d;i(t.onDragCancel({active:g,over:h}))}}),[i,t])),!c)return null;const f=A.createElement(A.Fragment,null,A.createElement(Rn,{id:r,value:o.draggable}),A.createElement(En,{id:s,announcement:a}));return n?we.createPortal(f,n):f}var O;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(O||(O={}));function Ke(){}function Zr(e,t){return l.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function eo(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return l.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Y=Object.freeze({x:0,y:0});function ct(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function kn(e,t){const n=Xe(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function ut(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function In(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function nt(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function Pn(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function kt(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const to=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=kt(t,t.left,t.top),i=[];for(const a of r){const{id:s}=a,c=n.get(s);if(c){const u=ct(kt(c),o);i.push({id:s,data:{droppableContainer:a,value:u}})}}return i.sort(ut)},no=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=nt(t),i=[];for(const a of r){const{id:s}=a,c=n.get(s);if(c){const u=nt(c),f=o.reduce((g,h,C)=>g+ct(u[C],h),0),d=Number((f/4).toFixed(4));i.push({id:s,data:{droppableContainer:a,value:d}})}}return i.sort(ut)};function zn(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),a=o-r,s=i-n;if(r<o&&n<i){const c=t.width*t.height,u=e.width*e.height,f=a*s,d=f/(c+u-f);return Number(d.toFixed(4))}return 0}const Bn=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const i of r){const{id:a}=i,s=n.get(a);if(s){const c=zn(s,t);c>0&&o.push({id:a,data:{droppableContainer:i,value:c}})}}return o.sort(In)};function Fn(e,t){const{top:n,left:r,bottom:o,right:i}=t;return n<=e.y&&e.y<=o&&r<=e.x&&e.x<=i}const ro=e=>{let{droppableContainers:t,droppableRects:n,pointerCoordinates:r}=e;if(!r)return[];const o=[];for(const i of t){const{id:a}=i,s=n.get(a);if(s&&Fn(r,s)){const u=nt(s).reduce((d,g)=>d+ct(r,g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:i,value:f}})}}return o.sort(ut)};function Xn(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function qt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Y}function Kn(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return o.reduce((a,s)=>({...a,top:a.top+e*s.y,bottom:a.bottom+e*s.y,left:a.left+e*s.x,right:a.right+e*s.x}),{...n})}}const jn=Kn(1);function Jt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function $n(e,t,n){const r=Jt(t);if(!r)return e;const{scaleX:o,scaleY:i,x:a,y:s}=r,c=e.left-a-(1-o)*parseFloat(n),u=e.top-s-(1-i)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=i?e.height/i:e.height;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c}}const Yn={ignoreTransform:!1};function Oe(e,t){t===void 0&&(t=Yn);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=P(e).getComputedStyle(e);u&&(n=$n(n,u,f))}const{top:r,left:o,width:i,height:a,bottom:s,right:c}=n;return{top:r,left:o,width:i,height:a,bottom:s,right:c}}function It(e){return Oe(e,{ignoreTransform:!0})}function Wn(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function Un(e,t){return t===void 0&&(t=P(e).getComputedStyle(e)),t.position==="fixed"}function Hn(e,t){t===void 0&&(t=P(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?n.test(i):!1})}function dt(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(at(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!Ae(o)||Ut(o)||n.includes(o))return n;const i=P(e).getComputedStyle(o);return o!==e&&Hn(o,i)&&n.push(o),Un(o,i)?n:r(o.parentNode)}return e?r(e):n}function Gt(e){const[t]=dt(e,1);return t??null}function Ze(e){return!$e||!e?null:ge(e)?e:st(e)?at(e)||e===ve(e).scrollingElement?window:Ae(e)?e:null:null}function _t(e){return ge(e)?e.scrollX:e.scrollLeft}function Qt(e){return ge(e)?e.scrollY:e.scrollTop}function rt(e){return{x:_t(e),y:Qt(e)}}var T;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(T||(T={}));function Zt(e){return!$e||!e?!1:e===document.scrollingElement}function en(e){const t={x:0,y:0},n=Zt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:i,isBottom:a,isRight:s,maxScroll:r,minScroll:t}}const Vn={x:.2,y:.2};function qn(e,t,n,r,o){let{top:i,left:a,right:s,bottom:c}=n;r===void 0&&(r=10),o===void 0&&(o=Vn);const{isTop:u,isBottom:f,isLeft:d,isRight:g}=en(e),h={x:0,y:0},C={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&i<=t.top+v.height?(h.y=T.Backward,C.y=r*Math.abs((t.top+v.height-i)/v.height)):!f&&c>=t.bottom-v.height&&(h.y=T.Forward,C.y=r*Math.abs((t.bottom-v.height-c)/v.height)),!g&&s>=t.right-v.width?(h.x=T.Forward,C.x=r*Math.abs((t.right-v.width-s)/v.width)):!d&&a<=t.left+v.width&&(h.x=T.Backward,C.x=r*Math.abs((t.left+v.width-a)/v.width)),{direction:h,speed:C}}function Jn(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:a}=window;return{top:0,left:0,right:i,bottom:a,width:i,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function tn(e){return e.reduce((t,n)=>he(t,rt(n)),Y)}function Gn(e){return e.reduce((t,n)=>t+_t(n),0)}function _n(e){return e.reduce((t,n)=>t+Qt(n),0)}function nn(e,t){if(t===void 0&&(t=Oe),!e)return;const{top:n,left:r,bottom:o,right:i}=t(e);Gt(e)&&(o<=0||i<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Qn=[["x",["left","right"],Gn],["y",["top","bottom"],_n]];class ft{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=dt(n),o=tn(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,a,s]of Qn)for(const c of a)Object.defineProperty(this,c,{get:()=>{const u=s(r),f=o[i]-u;return this.rect[c]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class xe{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function Zn(e){const{EventTarget:t}=P(e);return e instanceof t?e:ve(e)}function et(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var K;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(K||(K={}));function Pt(e){e.preventDefault()}function er(e){e.stopPropagation()}var D;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(D||(D={}));const rn={start:[D.Space,D.Enter],cancel:[D.Esc],end:[D.Space,D.Enter,D.Tab]},tr=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case D.Right:return{...n,x:n.x+25};case D.Left:return{...n,x:n.x-25};case D.Down:return{...n,y:n.y+25};case D.Up:return{...n,y:n.y-25}}};class on{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new xe(ve(n)),this.windowListeners=new xe(P(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(K.Resize,this.handleCancel),this.windowListeners.add(K.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(K.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&nn(r),n(Y)}handleKeyDown(t){if(lt(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:i=rn,coordinateGetter:a=tr,scrollBehavior:s="smooth"}=o,{code:c}=t;if(i.end.includes(c)){this.handleEnd(t);return}if(i.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:Y;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const g=Fe(d,f),h={x:0,y:0},{scrollableAncestors:C}=r.current;for(const v of C){const p=t.code,{isTop:y,isRight:x,isLeft:w,isBottom:N,maxScroll:S,minScroll:R}=en(v),b=Jn(v),m={x:Math.min(p===D.Right?b.right-b.width/2:b.right,Math.max(p===D.Right?b.left:b.left+b.width/2,d.x)),y:Math.min(p===D.Down?b.bottom-b.height/2:b.bottom,Math.max(p===D.Down?b.top:b.top+b.height/2,d.y))},E=p===D.Right&&!x||p===D.Left&&!w,L=p===D.Down&&!N||p===D.Up&&!y;if(E&&m.x!==d.x){const M=v.scrollLeft+g.x,H=p===D.Right&&M<=S.x||p===D.Left&&M>=R.x;if(H&&!g.y){v.scrollTo({left:M,behavior:s});return}H?h.x=v.scrollLeft-M:h.x=p===D.Right?v.scrollLeft-S.x:v.scrollLeft-R.x,h.x&&v.scrollBy({left:-h.x,behavior:s});break}else if(L&&m.y!==d.y){const M=v.scrollTop+g.y,H=p===D.Down&&M<=S.y||p===D.Up&&M>=R.y;if(H&&!g.x){v.scrollTo({top:M,behavior:s});return}H?h.y=v.scrollTop-M:h.y=p===D.Down?v.scrollTop-S.y:v.scrollTop-R.y,h.y&&v.scrollBy({top:-h.y,behavior:s});break}}this.handleMove(t,he(Fe(d,this.referenceCoordinates),h))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}on.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=rn,onActivation:o}=t,{active:i}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const s=i.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function zt(e){return!!(e&&"distance"in e)}function Bt(e){return!!(e&&"delay"in e)}class ht{constructor(t,n,r){var o;r===void 0&&(r=Zn(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:i}=t,{target:a}=i;this.props=t,this.events=n,this.document=ve(a),this.documentListeners=new xe(this.document),this.listeners=new xe(r),this.windowListeners=new xe(P(a)),this.initialCoordinates=(o=Xe(i))!=null?o:Y,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(K.Resize,this.handleCancel),this.windowListeners.add(K.DragStart,Pt),this.windowListeners.add(K.VisibilityChange,this.handleCancel),this.windowListeners.add(K.ContextMenu,Pt),this.documentListeners.add(K.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Bt(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(zt(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(K.Click,er,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(K.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:i}=this,{onMove:a,options:{activationConstraint:s}}=i;if(!o)return;const c=(n=Xe(t))!=null?n:Y,u=Fe(o,c);if(!r&&s){if(zt(s)){if(s.tolerance!=null&&et(u,s.tolerance))return this.handleCancel();if(et(u,s.distance))return this.handleStart()}if(Bt(s)&&et(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),a(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===D.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const nr={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class sn extends ht{constructor(t){const{event:n}=t,r=ve(n.target);super(t,nr,r)}}sn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const rr={move:{name:"mousemove"},end:{name:"mouseup"}};var ot;(function(e){e[e.RightClick=2]="RightClick"})(ot||(ot={}));class or extends ht{constructor(t){super(t,rr,ve(t.event.target))}}or.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ot.RightClick?!1:(r?.({event:n}),!0)}}];const tt={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class ir extends ht{constructor(t){super(t,tt)}static setup(){return window.addEventListener(tt.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(tt.move.name,t)};function t(){}}}ir.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var Ce;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Ce||(Ce={}));var je;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(je||(je={}));function sr(e){let{acceleration:t,activator:n=Ce.Pointer,canScroll:r,draggingRect:o,enabled:i,interval:a=5,order:s=je.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:g}=e;const h=lr({delta:d,disabled:!i}),[C,v]=wn(),p=l.useRef({x:0,y:0}),y=l.useRef({x:0,y:0}),x=l.useMemo(()=>{switch(n){case Ce.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Ce.DraggableRect:return o}},[n,o,c]),w=l.useRef(null),N=l.useCallback(()=>{const R=w.current;if(!R)return;const b=p.current.x*y.current.x,m=p.current.y*y.current.y;R.scrollBy(b,m)},[]),S=l.useMemo(()=>s===je.TreeOrder?[...u].reverse():u,[s,u]);l.useEffect(()=>{if(!i||!u.length||!x){v();return}for(const R of S){if(r?.(R)===!1)continue;const b=u.indexOf(R),m=f[b];if(!m)continue;const{direction:E,speed:L}=qn(R,m,x,t,g);for(const M of["x","y"])h[M][E[M]]||(L[M]=0,E[M]=0);if(L.x>0||L.y>0){v(),w.current=R,C(N,a),p.current=L,y.current=E;return}}p.current={x:0,y:0},y.current={x:0,y:0},v()},[t,N,r,v,i,a,JSON.stringify(x),JSON.stringify(h),C,u,S,f,JSON.stringify(g)])}const ar={x:{[T.Backward]:!1,[T.Forward]:!1},y:{[T.Backward]:!1,[T.Forward]:!1}};function lr(e){let{delta:t,disabled:n}=e;const r=Be(t);return Me(o=>{if(n||!r||!o)return ar;const i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[T.Backward]:o.x[T.Backward]||i.x===-1,[T.Forward]:o.x[T.Forward]||i.x===1},y:{[T.Backward]:o.y[T.Backward]||i.y===-1,[T.Forward]:o.y[T.Forward]||i.y===1}}},[n,t,r])}function cr(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Me(o=>{var i;return t==null?null:(i=r??o)!=null?i:null},[r,t])}function ur(e,t){return l.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,i=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...i]},[]),[e,t])}var Ee;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Ee||(Ee={}));var it;(function(e){e.Optimized="optimized"})(it||(it={}));const Ft=new Map;function dr(e,t){let{dragging:n,dependencies:r,config:o}=t;const[i,a]=l.useState(null),{frequency:s,measure:c,strategy:u}=o,f=l.useRef(e),d=p(),g=Se(d),h=l.useCallback(function(y){y===void 0&&(y=[]),!g.current&&a(x=>x===null?y:x.concat(y.filter(w=>!x.includes(w))))},[g]),C=l.useRef(null),v=Me(y=>{if(d&&!n)return Ft;if(!y||y===Ft||f.current!==e||i!=null){const x=new Map;for(let w of e){if(!w)continue;if(i&&i.length>0&&!i.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const N=w.node.current,S=N?new ft(c(N),N):null;w.rect.current=S,S&&x.set(w.id,S)}return x}return y},[e,i,n,d,c]);return l.useEffect(()=>{f.current=e},[e]),l.useEffect(()=>{d||h()},[n,d]),l.useEffect(()=>{i&&i.length>0&&a(null)},[JSON.stringify(i)]),l.useEffect(()=>{d||typeof s!="number"||C.current!==null||(C.current=setTimeout(()=>{h(),C.current=null},s))},[s,d,h,...r]),{droppableRects:v,measureDroppableContainers:h,measuringScheduled:i!=null};function p(){switch(u){case Ee.Always:return!1;case Ee.BeforeDragging:return n;default:return!n}}}function gt(e,t){return Me(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function fr(e,t){return gt(e,t)}function hr(e){let{callback:t,disabled:n}=e;const r=Ye(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(r)},[r,n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function Ue(e){let{callback:t,disabled:n}=e;const r=Ye(t),o=l.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(r)},[n]);return l.useEffect(()=>()=>o?.disconnect(),[o]),o}function gr(e){return new ft(Oe(e),e)}function Xt(e,t,n){t===void 0&&(t=gr);const[r,o]=l.useState(null);function i(){o(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const f=t(e);return JSON.stringify(c)===JSON.stringify(f)?c:f})}const a=hr({callback(c){if(e)for(const u of c){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){i();break}}}}),s=Ue({callback:i});return G(()=>{i(),e?(s?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),a?.disconnect())},[e]),r}function vr(e){const t=gt(e);return qt(e,t)}const Kt=[];function pr(e){const t=l.useRef(e),n=Me(r=>e?r&&r!==Kt&&e&&t.current&&e.parentNode===t.current.parentNode?r:dt(e):Kt,[e]);return l.useEffect(()=>{t.current=e},[e]),n}function br(e){const[t,n]=l.useState(null),r=l.useRef(e),o=l.useCallback(i=>{const a=Ze(i.target);a&&n(s=>s?(s.set(a,rt(a)),new Map(s)):null)},[]);return l.useEffect(()=>{const i=r.current;if(e!==i){a(i);const s=e.map(c=>{const u=Ze(c);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,rt(u)]):null}).filter(c=>c!=null);n(s.length?new Map(s):null),r.current=e}return()=>{a(e),a(i)};function a(s){s.forEach(c=>{const u=Ze(c);u?.removeEventListener("scroll",o)})}},[o,e]),l.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,a)=>he(i,a),Y):tn(e):Y,[e,t])}function jt(e,t){t===void 0&&(t=[]);const n=l.useRef(null);return l.useEffect(()=>{n.current=null},t),l.useEffect(()=>{const r=e!==Y;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Fe(e,n.current):Y}function mr(e){l.useEffect(()=>{if(!$e)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function yr(e,t){return l.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:i}=r;return n[o]=a=>{i(a,t)},n},{}),[e,t])}function an(e){return l.useMemo(()=>e?Wn(e):null,[e])}const $t=[];function wr(e,t){t===void 0&&(t=Oe);const[n]=e,r=an(n?P(n):null),[o,i]=l.useState($t);function a(){i(()=>e.length?e.map(c=>Zt(c)?r:new ft(t(c),c)):$t)}const s=Ue({callback:a});return G(()=>{s?.disconnect(),a(),e.forEach(c=>s?.observe(c))},[e]),o}function ln(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Ae(t)?t:e}function xr(e){let{measure:t}=e;const[n,r]=l.useState(null),o=l.useCallback(u=>{for(const{target:f}of u)if(Ae(f)){r(d=>{const g=t(f);return d?{...d,width:g.width,height:g.height}:g});break}},[t]),i=Ue({callback:o}),a=l.useCallback(u=>{const f=ln(u);i?.disconnect(),f&&i?.observe(f),r(f?t(f):null)},[t,i]),[s,c]=ze(a);return l.useMemo(()=>({nodeRef:s,rect:n,setRef:c}),[n,s,c])}const Cr=[{sensor:sn,options:{}},{sensor:on,options:{}}],Dr={current:{}},Pe={draggable:{measure:It},droppable:{measure:It,strategy:Ee.WhileDragging,frequency:it.Optimized},dragOverlay:{measure:Oe}};class De extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Sr={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new De,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ke},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Pe,measureDroppableContainers:Ke,windowRect:null,measuringScheduled:!1},cn={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ke,draggableNodes:new Map,over:null,measureDroppableContainers:Ke},Ne=l.createContext(cn),un=l.createContext(Sr);function Rr(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new De}}}function Er(e,t){switch(t.type){case O.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case O.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case O.DragEnd:case O.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case O.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new De(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case O.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const a=new De(e.droppable.containers);return a.set(n,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case O.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const i=new De(e.droppable.containers);return i.delete(n),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function Ar(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=l.useContext(Ne),i=Be(r),a=Be(n?.id);return l.useEffect(()=>{if(!t&&!r&&i&&a!=null){if(!lt(i)||document.activeElement===i.target)return;const s=o.get(a);if(!s)return;const{activatorNode:c,node:u}=s;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[c.current,u.current]){if(!f)continue;const d=Dn(f);if(d){d.focus();break}}})}},[r,t,o,a,i]),null}function dn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...r}),n):n}function Mr(e){return l.useMemo(()=>({draggable:{...Pe.draggable,...e?.draggable},droppable:{...Pe.droppable,...e?.droppable},dragOverlay:{...Pe.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Or(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const i=l.useRef(!1),{x:a,y:s}=typeof o=="boolean"?{x:o,y:o}:o;G(()=>{if(!a&&!s||!t){i.current=!1;return}if(i.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=qt(f,r);if(a||(d.x=0),s||(d.y=0),i.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const g=Gt(u);g&&g.scrollBy({top:d.y,left:d.x})}},[t,a,s,r,n])}const He=l.createContext({...Y,scaleX:1,scaleY:1});var re;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(re||(re={}));const oo=l.memo(function(t){var n,r,o,i;let{id:a,accessibility:s,autoScroll:c=!0,children:u,sensors:f=Cr,collisionDetection:d=Bn,measuring:g,modifiers:h,...C}=t;const v=l.useReducer(Er,void 0,Rr),[p,y]=v,[x,w]=On(),[N,S]=l.useState(re.Uninitialized),R=N===re.Initialized,{draggable:{active:b,nodes:m,translate:E},droppable:{containers:L}}=p,M=b!=null?m.get(b):null,H=l.useRef({initial:null,translated:null}),V=l.useMemo(()=>{var I;return b!=null?{id:b,data:(I=M?.data)!=null?I:Dr,rect:H}:null},[b,M]),_=l.useRef(null),[vt,pt]=l.useState(null),[q,bt]=l.useState(null),oe=Se(C,Object.values(C)),Ve=We("DndDescribedBy",a),mt=l.useMemo(()=>L.getEnabled(),[L]),ie=Mr(g),{droppableRects:le,measureDroppableContainers:Te,measuringScheduled:yt}=dr(mt,{dragging:R,dependencies:[E.x,E.y],config:ie.droppable}),j=cr(m,b),wt=l.useMemo(()=>q?Xe(q):null,[q]),xt=yn(),Ct=fr(j,ie.draggable.measure);Or({activeNode:b!=null?m.get(b):null,config:xt.layoutShiftCompensation,initialRect:Ct,measure:ie.draggable.measure});const $=Xt(j,ie.draggable.measure,Ct),qe=Xt(j?j.parentElement:null),se=l.useRef({activatorEvent:null,active:null,activeNode:j,collisionRect:null,collisions:null,droppableRects:le,draggableNodes:m,draggingNode:null,draggingNodeRect:null,droppableContainers:L,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Dt=L.getNodeFor((n=se.current.over)==null?void 0:n.id),ae=xr({measure:ie.dragOverlay.measure}),Le=(r=ae.nodeRef.current)!=null?r:j,ce=R?(o=ae.rect)!=null?o:$:null,St=!!(ae.nodeRef.current&&ae.rect),Rt=vr(St?null:$),Je=an(Le?P(Le):null),Q=pr(R?Dt??j:null),ke=wr(Q),Ie=dn(h,{transform:{x:E.x-Rt.x,y:E.y-Rt.y,scaleX:1,scaleY:1},activatorEvent:q,active:V,activeNodeRect:$,containerNodeRect:qe,draggingNodeRect:ce,over:se.current.over,overlayNodeRect:ae.rect,scrollableAncestors:Q,scrollableAncestorRects:ke,windowRect:Je}),Et=wt?he(wt,E):null,At=br(Q),fn=jt(At),hn=jt(At,[$]),ue=he(Ie,fn),de=ce?jn(ce,Ie):null,pe=V&&de?d({active:V,collisionRect:de,droppableRects:le,droppableContainers:mt,pointerCoordinates:Et}):null,Mt=Pn(pe,"id"),[Z,Ot]=l.useState(null),gn=St?Ie:he(Ie,hn),vn=Xn(gn,(i=Z?.rect)!=null?i:null,$),Ge=l.useRef(null),Nt=l.useCallback((I,z)=>{let{sensor:B,options:ee}=z;if(_.current==null)return;const X=m.get(_.current);if(!X)return;const F=I.nativeEvent,W=new B({active:_.current,activeNode:X,event:F,options:ee,context:se,onAbort(k){if(!m.get(k))return;const{onDragAbort:U}=oe.current,J={id:k};U?.(J),x({type:"onDragAbort",event:J})},onPending(k,te,U,J){if(!m.get(k))return;const{onDragPending:me}=oe.current,ne={id:k,constraint:te,initialCoordinates:U,offset:J};me?.(ne),x({type:"onDragPending",event:ne})},onStart(k){const te=_.current;if(te==null)return;const U=m.get(te);if(!U)return;const{onDragStart:J}=oe.current,be={activatorEvent:F,active:{id:te,data:U.data,rect:H}};we.unstable_batchedUpdates(()=>{J?.(be),S(re.Initializing),y({type:O.DragStart,initialCoordinates:k,active:te}),x({type:"onDragStart",event:be}),pt(Ge.current),bt(F)})},onMove(k){y({type:O.DragMove,coordinates:k})},onEnd:fe(O.DragEnd),onCancel:fe(O.DragCancel)});Ge.current=W;function fe(k){return async function(){const{active:U,collisions:J,over:be,scrollAdjustedTranslate:me}=se.current;let ne=null;if(U&&me){const{cancelDrop:ye}=oe.current;ne={activatorEvent:F,active:U,collisions:J,delta:me,over:be},k===O.DragEnd&&typeof ye=="function"&&await Promise.resolve(ye(ne))&&(k=O.DragCancel)}_.current=null,we.unstable_batchedUpdates(()=>{y({type:k}),S(re.Uninitialized),Ot(null),pt(null),bt(null),Ge.current=null;const ye=k===O.DragEnd?"onDragEnd":"onDragCancel";if(ne){const _e=oe.current[ye];_e?.(ne),x({type:ye,event:ne})}})}}},[m]),pn=l.useCallback((I,z)=>(B,ee)=>{const X=B.nativeEvent,F=m.get(ee);if(_.current!==null||!F||X.dndKit||X.defaultPrevented)return;const W={active:F};I(B,z.options,W)===!0&&(X.dndKit={capturedBy:z.sensor},_.current=ee,Nt(B,z))},[m,Nt]),Tt=ur(f,pn);mr(f),G(()=>{$&&N===re.Initializing&&S(re.Initialized)},[$,N]),l.useEffect(()=>{const{onDragMove:I}=oe.current,{active:z,activatorEvent:B,collisions:ee,over:X}=se.current;if(!z||!B)return;const F={active:z,activatorEvent:B,collisions:ee,delta:{x:ue.x,y:ue.y},over:X};we.unstable_batchedUpdates(()=>{I?.(F),x({type:"onDragMove",event:F})})},[ue.x,ue.y]),l.useEffect(()=>{const{active:I,activatorEvent:z,collisions:B,droppableContainers:ee,scrollAdjustedTranslate:X}=se.current;if(!I||_.current==null||!z||!X)return;const{onDragOver:F}=oe.current,W=ee.get(Mt),fe=W&&W.rect.current?{id:W.id,rect:W.rect.current,data:W.data,disabled:W.disabled}:null,k={active:I,activatorEvent:z,collisions:B,delta:{x:X.x,y:X.y},over:fe};we.unstable_batchedUpdates(()=>{Ot(fe),F?.(k),x({type:"onDragOver",event:k})})},[Mt]),G(()=>{se.current={activatorEvent:q,active:V,activeNode:j,collisionRect:de,collisions:pe,droppableRects:le,draggableNodes:m,draggingNode:Le,draggingNodeRect:ce,droppableContainers:L,over:Z,scrollableAncestors:Q,scrollAdjustedTranslate:ue},H.current={initial:ce,translated:de}},[V,j,pe,de,m,Le,ce,le,L,Z,Q,ue]),sr({...xt,delta:E,draggingRect:de,pointerCoordinates:Et,scrollableAncestors:Q,scrollableAncestorRects:ke});const bn=l.useMemo(()=>({active:V,activeNode:j,activeNodeRect:$,activatorEvent:q,collisions:pe,containerNodeRect:qe,dragOverlay:ae,draggableNodes:m,droppableContainers:L,droppableRects:le,over:Z,measureDroppableContainers:Te,scrollableAncestors:Q,scrollableAncestorRects:ke,measuringConfiguration:ie,measuringScheduled:yt,windowRect:Je}),[V,j,$,q,pe,qe,ae,m,L,le,Z,Te,Q,ke,ie,yt,Je]),mn=l.useMemo(()=>({activatorEvent:q,activators:Tt,active:V,activeNodeRect:$,ariaDescribedById:{draggable:Ve},dispatch:y,draggableNodes:m,over:Z,measureDroppableContainers:Te}),[q,Tt,V,$,y,Ve,m,Z,Te]);return A.createElement(Vt.Provider,{value:w},A.createElement(Ne.Provider,{value:mn},A.createElement(un.Provider,{value:bn},A.createElement(He.Provider,{value:vn},u)),A.createElement(Ar,{disabled:s?.restoreFocus===!1})),A.createElement(Ln,{...s,hiddenTextDescribedById:Ve}));function yn(){const I=vt?.autoScrollEnabled===!1,z=typeof c=="object"?c.enabled===!1:c===!1,B=R&&!I&&!z;return typeof c=="object"?{...c,enabled:B}:{enabled:B}}}),Nr=l.createContext(null),Yt="button",Tr="Draggable";function io(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const i=We(Tr),{activators:a,activatorEvent:s,active:c,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:g}=l.useContext(Ne),{role:h=Yt,roleDescription:C="draggable",tabIndex:v=0}=o??{},p=c?.id===t,y=l.useContext(p?He:Nr),[x,w]=ze(),[N,S]=ze(),R=yr(a,t),b=Se(n);G(()=>(d.set(t,{id:t,key:i,node:x,activatorNode:N,data:b}),()=>{const E=d.get(t);E&&E.key===i&&d.delete(t)}),[d,t]);const m=l.useMemo(()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":p&&h===Yt?!0:void 0,"aria-roledescription":C,"aria-describedby":f.draggable}),[r,h,v,p,C,f.draggable]);return{active:c,activatorEvent:s,activeNodeRect:u,attributes:m,isDragging:p,listeners:r?void 0:R,node:x,over:g,setNodeRef:w,setActivatorNodeRef:S,transform:y}}function Lr(){return l.useContext(un)}const kr="Droppable",Ir={timeout:25};function so(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const i=We(kr),{active:a,dispatch:s,over:c,measureDroppableContainers:u}=l.useContext(Ne),f=l.useRef({disabled:n}),d=l.useRef(!1),g=l.useRef(null),h=l.useRef(null),{disabled:C,updateMeasurementsFor:v,timeout:p}={...Ir,...o},y=Se(v??r),x=l.useCallback(()=>{if(!d.current){d.current=!0;return}h.current!=null&&clearTimeout(h.current),h.current=setTimeout(()=>{u(Array.isArray(y.current)?y.current:[y.current]),h.current=null},p)},[p]),w=Ue({callback:x,disabled:C||!a}),N=l.useCallback((m,E)=>{w&&(E&&(w.unobserve(E),d.current=!1),m&&w.observe(m))},[w]),[S,R]=ze(N),b=Se(t);return l.useEffect(()=>{!w||!S.current||(w.disconnect(),d.current=!1,w.observe(S.current))},[S,w]),l.useEffect(()=>(s({type:O.RegisterDroppable,element:{id:r,key:i,disabled:n,node:S,rect:g,data:b}}),()=>s({type:O.UnregisterDroppable,key:i,id:r})),[r]),l.useEffect(()=>{n!==f.current.disabled&&(s({type:O.SetDroppableDisabled,id:r,key:i,disabled:n}),f.current.disabled=n)},[r,i,n,s]),{active:a,rect:g,isOver:c?.id===r,node:S,over:c,setNodeRef:R}}function Pr(e){let{animation:t,children:n}=e;const[r,o]=l.useState(null),[i,a]=l.useState(null),s=Be(n);return!n&&!r&&s&&o(s),G(()=>{if(!i)return;const c=r?.key,u=r?.props.id;if(c==null||u==null){o(null);return}Promise.resolve(t(u,i)).then(()=>{o(null)})},[t,r,i]),A.createElement(A.Fragment,null,n,r?l.cloneElement(r,{ref:a}):null)}const zr={x:0,y:0,scaleX:1,scaleY:1};function Br(e){let{children:t}=e;return A.createElement(Ne.Provider,{value:cn},A.createElement(He.Provider,{value:zr},t))}const Fr={position:"fixed",touchAction:"none"},Xr=e=>lt(e)?"transform 250ms ease":void 0,Kr=l.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:i,className:a,rect:s,style:c,transform:u,transition:f=Xr}=e;if(!s)return null;const d=o?u:{...u,scaleX:1,scaleY:1},g={...Fr,width:s.width,height:s.height,top:s.top,left:s.left,transform:Re.Transform.toString(d),transformOrigin:o&&r?kn(r,s):void 0,transition:typeof f=="function"?f(r):f,...c};return A.createElement(n,{className:a,style:g,ref:t},i)}),jr=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:i,className:a}=e;if(i!=null&&i.active)for(const[s,c]of Object.entries(i.active))c!==void 0&&(o[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,c));if(i!=null&&i.dragOverlay)for(const[s,c]of Object.entries(i.dragOverlay))c!==void 0&&r.node.style.setProperty(s,c);return a!=null&&a.active&&n.node.classList.add(a.active),a!=null&&a.dragOverlay&&r.node.classList.add(a.dragOverlay),function(){for(const[c,u]of Object.entries(o))n.node.style.setProperty(c,u);a!=null&&a.active&&n.node.classList.remove(a.active)}},$r=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:Re.Transform.toString(t)},{transform:Re.Transform.toString(n)}]},Yr={duration:250,easing:"ease",keyframes:$r,sideEffects:jr({styles:{active:{opacity:"0"}}})};function Wr(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Ye((i,a)=>{if(t===null)return;const s=n.get(i);if(!s)return;const c=s.node.current;if(!c)return;const u=ln(a);if(!u)return;const{transform:f}=P(a).getComputedStyle(a),d=Jt(f);if(!d)return;const g=typeof t=="function"?t:Ur(t);return nn(c,o.draggable.measure),g({active:{id:i,data:s.data,node:c,rect:o.draggable.measure(c)},draggableNodes:n,dragOverlay:{node:a,rect:o.dragOverlay.measure(u)},droppableContainers:r,measuringConfiguration:o,transform:d})})}function Ur(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...Yr,...e};return i=>{let{active:a,dragOverlay:s,transform:c,...u}=i;if(!t)return;const f={x:s.rect.left-a.rect.left,y:s.rect.top-a.rect.top},d={scaleX:c.scaleX!==1?a.rect.width*c.scaleX/s.rect.width:1,scaleY:c.scaleY!==1?a.rect.height*c.scaleY/s.rect.height:1},g={x:c.x-f.x,y:c.y-f.y,...d},h=o({...u,active:a,dragOverlay:s,transform:{initial:c,final:g}}),[C]=h,v=h[h.length-1];if(JSON.stringify(C)===JSON.stringify(v))return;const p=r?.({active:a,dragOverlay:s,...u}),y=s.node.animate(h,{duration:t,easing:n,fill:"forwards"});return new Promise(x=>{y.onfinish=()=>{p?.(),x()}})}}let Wt=0;function Hr(e){return l.useMemo(()=>{if(e!=null)return Wt++,Wt},[e])}const ao=A.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:i,modifiers:a,wrapperElement:s="div",className:c,zIndex:u=999}=e;const{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggableNodes:C,droppableContainers:v,dragOverlay:p,over:y,measuringConfiguration:x,scrollableAncestors:w,scrollableAncestorRects:N,windowRect:S}=Lr(),R=l.useContext(He),b=Hr(d?.id),m=dn(a,{activatorEvent:f,active:d,activeNodeRect:g,containerNodeRect:h,draggingNodeRect:p.rect,over:y,overlayNodeRect:p.rect,scrollableAncestors:w,scrollableAncestorRects:N,transform:R,windowRect:S}),E=gt(g),L=Wr({config:r,draggableNodes:C,droppableContainers:v,measuringConfiguration:x}),M=E?p.setRef:void 0;return A.createElement(Br,null,A.createElement(Pr,{animation:L},d&&b?A.createElement(Kr,{key:b,id:d.id,ref:M,as:s,activatorEvent:f,adjustScale:t,className:c,transition:i,rect:E,style:{zIndex:u,...o},transform:m},n):null))}),Vr=4,qr="TASK";function Jr(e){return e.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,Vr)||qr}function lo(e,t){return t==null?null:`${Jr(e)}-${String(t).padStart(2,"0")}`}const Gr=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function co(e){const t=Gr.exec(e.trim())?.[1];return t===void 0?null:Number(t)}export{Re as C,oo as D,D as K,sn as P,Zr as a,Lr as b,to as c,We as d,G as e,so as f,io as g,Qr as h,lt as i,Oe as j,no as k,Pn as l,dt as m,on as n,ao as o,ro as p,co as q,Fe as s,lo as t,eo as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as o,t as c}from"./task-key-B2-Ue6HC.js";import{t as d}from"./project-index-BnS4CpAf.js";import{S as f}from"./task-board-CgO9M3z4.js";const k="__unassigned__",i="__backlog__",I={assignee:null,priority:null,due:null,tags:[],project:null,sprint:null,search:""},g=864e5;function D(t,e){const n=new Date(t),s=new Date(e);return n.getFullYear()===s.getFullYear()&&n.getMonth()===s.getMonth()&&n.getDate()===s.getDate()}function u(t,e){const n=t.trim();return n===""?!1:e!=null&&o(n)===e}function p(t,e){return t.assigneeId===e?!0:t.assigneeId===f&&t.assignedBy===e}function h(t,e,n){const s=e.search.trim().toLowerCase();if(s!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(s)&&!u(s,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===k){if(t.assigneeId!==null)return!1}else if(!p(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const r=new Date(t.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&r>=a||e.due==="today"&&!D(r,a)||e.due==="week"&&(r<a||r>a+7*g))return!1}if(e.tags.length>0){const r=t.tags.map(a=>a.id);if(!e.tags.some(a=>r.includes(a)))return!1}if(!d(t,e.project,n))return!1;if(e.sprint!==null){const r=e.sprint===i?null:e.sprint;if((t.sprintId??null)!==r)return!1}return!0}function R(t,e){return t===null||t===i||e.some(n=>n.id===t)?t:null}const l={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"},w=Object.keys(l);function L(t){return l[t]}function _(t,e){return c(t,e.keySeq)??e.id}function B(t,e,n){const s=encodeURIComponent(t),r=encodeURIComponent(_(t,e));return n?`/${s}/projects/${encodeURIComponent(n)}/tasks/${r}`:`/${s}/tasks/${r}`}function m(t,e){const n=e?.trim();if(n)return t.find(s=>u(n,s.keySeq))??t.find(s=>s.id===n)}const y=/^board_[\w-]+$/,S=64;function N(t){const e=t.trim();return e.length>S?null:o(e)!==null||y.test(e)?e:null}export{i as B,w as D,I as E,k as U,B as a,h as b,L as d,m as f,N as p,R as r,_ as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as n}from"./AlertCircle-B79T3vQg.js";import{i as r}from"./CheckCircle-BdP9IvPO.js";import{dP as i}from"./index-D1W7ut2I.js";import{aP as s,aQ as l,z as m}from"./agent-icon-mHnKN98z.js";const a={requires_action:{labelKey:"common.taskStatus.requiresAction",icon:n,iconClassName:"text-warning",labelColor:"text-warning"},failed:{labelKey:"common.taskStatus.failed",icon:m,iconClassName:"text-destructive",labelColor:"text-destructive"},expired:{labelKey:"common.taskStatus.expired",icon:l,iconClassName:"text-warning",labelColor:"text-warning"},in_progress:{labelKey:"common.taskStatus.inProgress",icon:s,iconClassName:"text-primary",labelColor:"text-primary"},completed:{labelKey:"common.taskStatus.completed",icon:r,iconClassName:"text-muted-foreground/50",labelColor:"text-muted-foreground"}},o={labelKey:"common.taskStatus.unknown",icon:i,iconClassName:"text-muted-foreground",labelColor:"text-muted-foreground"};function c(e){return e in a}function C(e){if(e===null)return o;const t=e??"completed";return c(t)?a[t]:o}export{a as S,C as g};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as q,b as G,r as B,j as s,n as Q,m as J,f as X}from"./index-D1W7ut2I.js";import{ChatLayout as Z}from"./index-CLK91j5E.js";import{C as ee}from"./collection-tabs-DNPK2rVO.js";import{A as M,a as te,b as se,u as ae}from"./use-task-board-analytics-4KchvJP_.js";import{T as le,e as W}from"./time-range-picker-w3lHNK8L.js";import{S as ie,d as oe,c as re,a as ne,b as ce}from"./sheet-D8HVkLc6.js";import{S as me,s as de,D as fe}from"./analytics-sections-qmiNeFYX.js";import{a as pe}from"./task-route-Ba3aez9x.js";import{C as ge}from"./combobox-BwdUn3zV.js";import"./use-mobile-BA8hUvQw.js";import"./tooltip-BZz0vywC.js";import"./index-DXzlWhjJ.js";import"./MessageCircle01-CWoIju4P.js";import"./XClose-VFawdZTC.js";import"./thread-button-DQmfTj65.js";import"./use-sidebar-collapsed-BWfZDELa.js";import"./use-chat-layout-state-CRsWJAkm.js";import"./use-panel-navigate-RwlB8yz2.js";import"./thread-route-Cpqj5B6r.js";import"./use-project-scope-CayH-uv6.js";import"./repository-binding-CGFnGVxJ.js";import"./use-mcp-client-C_qG7wUZ.js";import"./auth-Dj5MlzXt.js";import"./toolbar-icon-button-6BTsLHAb.js";import"./use-in-settings-CU_P2dfR.js";import"./resizable-zRzPDJM0.js";import"./route-page-header-DXblwPS1.js";import"./LayoutLeft-Cc8HE6Mh.js";import"./use-current-view-e2srGh0R.js";import"./badge-D43CW9ql.js";import"./popover-DbSdZVd4.js";import"./scroll-area-Dm0jhVU4.js";import"./index-BdQq_4o_.js";import"./ChevronDown-NJEKYVpP.js";import"./UserCheck01-DkrJoTgc.js";import"./calendar-BVJiHXRt.js";import"./chart-B0-vTmRF.js";import"./CategoricalChart-aQS_hxQA.js";import"./index-Yw-FAojM.js";import"./tooltipContext-CZ3OeUnD.js";import"./CartesianChart-DbfxDEk8.js";import"./table-BOhYBEKO.js";import"./AlertCircle-B79T3vQg.js";import"./ArrowUp-CGwCu8lq.js";import"./toggle-group-DpYPg3qc.js";import"./active-indicator-CCMhAsc_.js";import"./config-BSLjSLLm.js";import"./task-key-B2-Ue6HC.js";import"./CheckCircle-BdP9IvPO.js";import"./Eye-_AXqkWO1.js";import"./task-board-CgO9M3z4.js";import"./schema-C-iQKwVz.js";import"./AreaChart-1DjcfWAa.js";import"./project-index-BnS4CpAf.js";import"./ChevronSelectorVertical-QA_eM8SF.js";import"./command-SY2ZnRo9.js";import"./index-ICy5uJS1.js";import"./SearchMd-ByGW18TK.js";const ue={TASK_BOARD_OPERATION:"taskBoard.analytics.tabOperation",TASK_BOARD_REWORK:"taskBoard.analytics.tabRework",TASK_BOARD_DELIVERY:"taskBoard.analytics.tabDelivery",TASK_BOARD_SPRINTS:"taskBoard.analytics.tabSprints",TASK_BOARD_STUCK:"taskBoard.analytics.tabStuck",TASK_BOARD_COST:"taskBoard.analytics.tabCost",TASK_BOARD_ERRORS:"taskBoard.analytics.tabErrors",TASK_BOARD_TENANTS:"taskBoard.analytics.tabTenants"};function F(t){const e=new Date;return{from:(W(t.from).date??e).toISOString(),to:(W(t.to).date??e).toISOString()}}function z(t){const e=q.c(6),{className:d}=t;let r;e[0]!==d?(r=J("surface flex flex-col gap-6 p-4",d),e[0]=d,e[1]=r):r=e[1];let l,f;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]}),f=s.jsx("div",{className:"h-[140px] w-full animate-pulse rounded bg-muted/60"}),e[2]=l,e[3]=f):(l=e[2],f=e[3]);let n;return e[4]!==r?(n=s.jsxs("div",{className:r,children:[l,f]}),e[4]=r,e[5]=n):n=e[5],n}function xe(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:[0,1,2,3].map(he)}),t[0]=e):e=t[0];let d;return t[1]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs("div",{className:"flex flex-col gap-4","aria-busy":!0,children:[e,s.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:[s.jsx(z,{}),s.jsx(z,{})]}),s.jsx(z,{})]}),t[1]=d):d=t[1],d}function he(t){return s.jsxs("div",{className:"surface flex flex-col gap-1 p-4",children:[s.jsx("div",{className:"h-5 w-24 animate-pulse rounded bg-muted"}),s.jsx("div",{className:"h-10 w-16 animate-pulse rounded bg-muted"})]},t)}function Se(t){const e=q.c(27),{target:d,open:r,onOpenChange:l,params:f,taskHref:n}=t,j=G(),{data:i,isLoading:a,error:y}=se(f,r?d?.drill??null:null);let u;e[0]!==i?.sections?(u=i?.sections.find(ke),e[0]=i?.sections,e[1]=u):u=e[1];const c=u,T=c?.rows.length??0,b=d?.label;let x;e[2]!==b?(x=s.jsx(ie,{children:b}),e[2]=b,e[3]=x):x=e[3];let h;e[4]!==T||e[5]!==j||e[6]!==c?(h=c?j(T===1?"taskBoard.analytics.drillCountOne":"taskBoard.analytics.drillCount",{n:String(T)}):" ",e[4]=T,e[5]=j,e[6]=c,e[7]=h):h=e[7];let p;e[8]!==h?(p=s.jsx(oe,{children:h}),e[8]=h,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=s.jsxs(re,{children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let k;e[13]!==y||e[14]!==a||e[15]!==n||e[16]!==c?(k=a?s.jsx("div",{className:"flex flex-col gap-2 p-2","aria-busy":!0,children:[0,1,2,3,4].map(be)}):y?s.jsx("p",{className:"p-2 text-sm text-destructive",children:y.message}):c?.kind==="table"&&s.jsx(fe,{section:c,taskHref:n}),e[13]=y,e[14]=a,e[15]=n,e[16]=c,e[17]=k):k=e[17];let o;e[18]!==k?(o=s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-2 pb-4",children:k}),e[18]=k,e[19]=o):o=e[19];let m;e[20]!==g||e[21]!==o?(m=s.jsxs(ne,{side:"right",size:"lg",children:[g,o]}),e[20]=g,e[21]=o,e[22]=m):m=e[22];let S;return e[23]!==l||e[24]!==r||e[25]!==m?(S=s.jsx(ce,{open:r,onOpenChange:l,children:m}),e[23]=l,e[24]=r,e[25]=m,e[26]=S):S=e[26],S}function be(t){return s.jsx("div",{className:"h-11 animate-pulse rounded bg-muted"},t)}function ke(t){return t.kind==="table"}function je(t){const e=q.c(26),{tool:d,org:r,project:l,range:f,taskHref:n}=t;let j;e[0]!==r||e[1]!==l||e[2]!==f?(j={org:r,project:l,...f},e[0]=r,e[1]=l,e[2]=f,e[3]=j):j=e[3];const i=j,{data:a,isPending:y,error:u}=te(d,i),[c,T]=B.useState(null),[b,x]=B.useState(!1);if(u){let o;return e[4]!==u.message?(o=s.jsx("div",{className:"surface p-8 text-center text-sm text-destructive",children:u.message}),e[4]=u.message,e[5]=o):o=e[5],o}if(y||!a){let o;return e[6]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(xe,{}),e[6]=o):o=e[6],o}let h;if(e[7]!==a.range||e[8]!==a.sections||e[9]!==r||e[10]!==n){let o;e[12]!==a.range||e[13]!==r||e[14]!==n?(o=m=>s.jsx("div",{className:J("min-w-0",de(m)==="full"&&"md:col-span-2",m.kind==="table"&&"mt-6"),children:s.jsx(me,{section:m,threadLinks:!0,showOrg:r==="all",taskHref:n,range:a.range,onDrill:S=>{T(S),x(!0)}})},m.title),e[12]=a.range,e[13]=r,e[14]=n,e[15]=o):o=e[15],h=a.sections.map(o),e[7]=a.range,e[8]=a.sections,e[9]=r,e[10]=n,e[11]=h}else h=e[11];let p;e[16]!==h?(p=s.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2",children:h}),e[16]=h,e[17]=p):p=e[17];let g;e[18]!==c||e[19]!==b||e[20]!==i||e[21]!==n?(g=s.jsx(Se,{target:c,open:b,onOpenChange:x,params:i,taskHref:n}),e[18]=c,e[19]=b,e[20]=i,e[21]=n,e[22]=g):g=e[22];let k;return e[23]!==p||e[24]!==g?(k=s.jsxs("div",{className:"flex flex-col gap-4",children:[p,g]}),e[23]=p,e[24]=g,e[25]=k):k=e[25],k}function Te(t){const e=q.c(64),{org:d,project:r,taskHref:l,actions:f,notice:n,showTenants:j}=t,i=G(),[a,y]=B.useState("TASK_BOARD_OPERATION");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={from:"now-30d",to:"now"},e[0]=u):u=e[0];const[c,T]=B.useState(u);let b;e[1]!==c?(b=()=>F(c),e[1]=c,e[2]=b):b=e[2];const[x,h]=B.useState(b);let p;if(e[3]!==j||e[4]!==i){let R;e[6]!==j?(R=Y=>Y!=="TASK_BOARD_TENANTS"||j,e[6]=j,e[7]=R):R=e[7];let O;e[8]!==i?(O=Y=>({id:Y,label:i(ue[Y])}),e[8]=i,e[9]=O):O=e[9],p=M.filter(R).map(O),e[3]=j,e[4]=i,e[5]=p}else p=e[5];const g=p;let k;e[10]===Symbol.for("react.memo_cache_sentinel")?(k=R=>{T(R),h(F(R))},e[10]=k):k=e[10];let o;e[11]!==i?(o=i("monitoring.timeRangePicker.absoluteTimeRange"),e[11]=i,e[12]=o):o=e[12];let m;e[13]!==i?(m=i("monitoring.timeRangePicker.from"),e[13]=i,e[14]=m):m=e[14];let S;e[15]!==i?(S=i("monitoring.timeRangePicker.to"),e[15]=i,e[16]=S):S=e[16];let _;e[17]!==i?(_=i("monitoring.timeRangePicker.applyTimeRange"),e[17]=i,e[18]=_):_=e[18];let v;e[19]!==o||e[20]!==m||e[21]!==S||e[22]!==_?(v={absoluteTimeRange:o,from:m,to:S,applyTimeRange:_},e[19]=o,e[20]=m,e[21]=S,e[22]=_,e[23]=v):v=e[23];let A;e[24]!==i?(A=i("monitoring.timeRangePicker.last7Days"),e[24]=i,e[25]=A):A=e[25];let N;e[26]!==A?(N={label:A,from:"now-7d",to:"now",value:"7d"},e[26]=A,e[27]=N):N=e[27];let w;e[28]!==i?(w=i("monitoring.timeRangePicker.last30Days"),e[28]=i,e[29]=w):w=e[29];let D;e[30]!==w?(D={label:w,from:"now-30d",to:"now",value:"30d"},e[30]=w,e[31]=D):D=e[31];let C;e[32]!==i?(C=i("monitoring.timeRangePicker.last90Days"),e[32]=i,e[33]=C):C=e[33];let P;e[34]!==C?(P={label:C,from:"now-90d",to:"now",value:"90d"},e[34]=C,e[35]=P):P=e[35];let E;e[36]!==N||e[37]!==D||e[38]!==P?(E=[N,D,P],e[36]=N,e[37]=D,e[38]=P,e[39]=E):E=e[39];let K;e[40]!==c||e[41]!==E||e[42]!==v?(K=s.jsx(le,{value:c,onChange:k,labels:v,quickRanges:E}),e[40]=c,e[41]=E,e[42]=v,e[43]=K):K=e[43];let L;e[44]!==f||e[45]!==K?(L=s.jsxs(Q.Actions,{children:[f,K]}),e[44]=f,e[45]=K,e[46]=L):L=e[46];let U;e[47]===Symbol.for("react.memo_cache_sentinel")?(U=R=>{const O=M.find(Y=>Y===R);O&&y(O)},e[47]=U):U=e[47];let $;e[48]!==a||e[49]!==g?($=s.jsx(ee,{placement:"page",tabs:g,activeTab:a,onTabChange:U}),e[48]=a,e[49]=g,e[50]=$):$=e[50];let I;e[51]!==d||e[52]!==r||e[53]!==x||e[54]!==a||e[55]!==l?(I=s.jsx(je,{tool:a,org:d,project:r,range:x,taskHref:l},a),e[51]=d,e[52]=r,e[53]=x,e[54]=a,e[55]=l,e[56]=I):I=e[56];let H;e[57]!==n||e[58]!==I?(H=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1200px] flex-col gap-4 px-4 pt-6 pb-10 md:px-10",children:[n,I]}),e[57]=n,e[58]=I,e[59]=H):H=e[59];let V;return e[60]!==L||e[61]!==$||e[62]!==H?(V=s.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-auto",children:[L,$,H]}),e[60]=L,e[61]=$,e[62]=H,e[63]=V):V=e[63],V}function Ot(){const t=q.c(37),e=G();let d;t[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[0]=d):d=t[0];const r=X(d),l=r.org??"",f=r.agentId,n=ae(),[j,i]=B.useState(l),[a,y]=B.useState(l);l!==j&&(i(l),y(l));const u=!f&&(n.data?.isTaskBoardAdmin??!1);let c;t[1]!==e?(c=e("taskBoard.analytics.orgCurrent"),t[1]=e,t[2]=c):c=t[2];let T;t[3]!==l||t[4]!==c?(T={value:l,label:c},t[3]=l,t[4]=c,t[5]=T):T=t[5];let b;t[6]!==e?(b=e("taskBoard.analytics.orgAll"),t[6]=e,t[7]=b):b=t[7];let x;t[8]!==b?(x={value:"all",label:b},t[8]=b,t[9]=x):x=t[9];let h;if(t[10]!==n.data?.orgs||t[11]!==l||t[12]!==T||t[13]!==x){let v;t[15]!==l?(v=A=>A.slug!==l,t[15]=l,t[16]=v):v=t[16],h=[T,x,...(n.data?.orgs??[]).filter(v).map(ve)],t[10]=n.data?.orgs,t[11]=l,t[12]=T,t[13]=x,t[14]=h}else h=t[14];const p=h;let g;t[17]!==a||t[18]!==l||t[19]!==f?(g=v=>pe(l,{id:v,keySeq:null},f)+(a===l?"":`?boardOrg=${encodeURIComponent(a)}`),t[17]=a,t[18]=l,t[19]=f,t[20]=g):g=t[20];const o=a==="all"?void 0:g;let m;t[21]!==u||t[22]!==a||t[23]!==p||t[24]!==e?(m=u&&s.jsx(ge,{options:p,value:a,onChange:y,width:"w-[220px]",searchPlaceholder:e("taskBoard.analytics.orgSearch"),emptyMessage:e("taskBoard.analytics.orgEmpty")}),t[21]=u,t[22]=a,t[23]=p,t[24]=e,t[25]=m):m=t[25];let S;t[26]!==a||t[27]!==l||t[28]!==e?(S=a!==l&&s.jsx("div",{className:"rounded-lg bg-warning/10 px-3 py-2 text-sm text-warning",children:a==="all"?e("taskBoard.analytics.bannerAll"):e("taskBoard.analytics.bannerOrg",{org:a})}),t[26]=a,t[27]=l,t[28]=e,t[29]=S):S=t[29];let _;return t[30]!==u||t[31]!==a||t[32]!==f||t[33]!==o||t[34]!==m||t[35]!==S?(_=s.jsx(Z.Content,{children:s.jsx(Te,{org:a,project:f,taskHref:o,showTenants:u,actions:m,notice:S},a)}),t[30]=u,t[31]=a,t[32]=f,t[33]=o,t[34]=m,t[35]=S,t[36]=_):_=t[36],_}function ve(t){return{value:t.slug,label:`${t.slug} · ${t.name}`}}export{Ot as default};
|