decocms 4.525.0 → 4.526.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{ActiveShapeUtils-CfDf2bdI.js → ActiveShapeUtils-3Qv8pgS7.js} +1 -1
- package/dist/client/assets/{AlertCircle-X-2ynYTr.js → AlertCircle-C8rwN6lq.js} +1 -1
- package/dist/client/assets/{AreaChart-Co4tgm2e.js → AreaChart-CUZBfQth.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D5rLbzEv.js → ArrowLeft-DA6W7NwW.js} +1 -1
- package/dist/client/assets/{ArrowUp-D5ujBFbU.js → ArrowUp-DOqWtjlR.js} +1 -1
- package/dist/client/assets/{BarChart-s2InKCwb.js → BarChart-CQ6w7DQe.js} +1 -1
- package/dist/client/assets/{Building02-CmwS_4Zd.js → Building02-Do3lJJG5.js} +1 -1
- package/dist/client/assets/{CartesianChart-CV_17khx.js → CartesianChart-CLY0Gd8n.js} +1 -1
- package/dist/client/assets/{CategoricalChart-BXV8ybtn.js → CategoricalChart-BOJbYjnl.js} +1 -1
- package/dist/client/assets/{CheckCircle-K7QKF0ga.js → CheckCircle-BC_4MefA.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-8Zglhuwj.js → ChevronSelectorVertical-DmnbHDqu.js} +1 -1
- package/dist/client/assets/{ChevronUp-bhjMH6tk.js → ChevronUp-BnMEqZ-7.js} +1 -1
- package/dist/client/assets/{Copy01-BQVKjs--.js → Copy01-DhHOI-Q9.js} +1 -1
- package/dist/client/assets/{CreditCard01-DLuzN9Da.js → CreditCard01-Dw2OjkWU.js} +1 -1
- package/dist/client/assets/{DotsVertical-D0yivq6N.js → DotsVertical-B-InRCR0.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-D7k2zl1o.js → ErrorBarContext-DivKrUmF.js} +1 -1
- package/dist/client/assets/{Globe04-Do87jSl8.js → Globe04-CtMJQj21.js} +1 -1
- package/dist/client/assets/{Image01-Ca2zoOmL.js → Image01-DKlCpScV.js} +1 -1
- package/dist/client/assets/{Key01-B22TaZal.js → Key01-DBwoRjUY.js} +1 -1
- package/dist/client/assets/{Link01-CKgU9XrQ.js → Link01-BBqxtXMI.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DbRdGmca.js → LinkBroken01-CAJodWFv.js} +1 -1
- package/dist/client/assets/{Minus-DbFMOQp2.js → Minus-DiHVm4BN.js} +1 -1
- package/dist/client/assets/{Monitor01-CfX8nvtP.js → Monitor01-BhbrGCAs.js} +1 -1
- package/dist/client/assets/{Play-gY_w5wGM.js → Play-BcZ_GeUq.js} +1 -1
- package/dist/client/assets/{Plus-cZACl5Bj.js → Plus-c2_sBI5f.js} +1 -1
- package/dist/client/assets/{ReferenceLine-qGRCuWbQ.js → ReferenceLine-BSuRAWbV.js} +1 -1
- package/dist/client/assets/{SearchMd-B3lyjcge.js → SearchMd-CbbZJW9W.js} +1 -1
- package/dist/client/assets/{Sector-tGFgbjWQ.js → Sector-DByNfs86.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-CIHcZyoe.js → ShoppingBag01-6U3SUMRX.js} +1 -1
- package/dist/client/assets/{Sun-BQHZ8KXH.js → Sun-DVWc_O6K.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-C4b3q3_P.js → SwitchHorizontal01-CxSk-wEa.js} +1 -1
- package/dist/client/assets/{Tool01-DZBBNle2.js → Tool01-BxbHHa0T.js} +1 -1
- package/dist/client/assets/{Trash01-DAL2eWYn.js → Trash01-BuZ3631A.js} +1 -1
- package/dist/client/assets/{Upload01-3A7TgOQk.js → Upload01-Bo2ttnFV.js} +1 -1
- package/dist/client/assets/{UserSquare-C3P5-DPf.js → UserSquare-DCu-qtdW.js} +1 -1
- package/dist/client/assets/{Users01-CbJgTvJT.js → Users01-BC6qYZnG.js} +1 -1
- package/dist/client/assets/{XClose-B7VCNh_p.js → XClose-DVoCm2qG.js} +1 -1
- package/dist/client/assets/{ZoomOut-I9ktV8DJ.js → ZoomOut-lxtq8ebL.js} +1 -1
- package/dist/client/assets/{access-gate-aP3HDD5b.js → access-gate-DFESwNfG.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-Bk02feSt.js → add-connection-dialog-Cr3ZfKtA.js} +1 -1
- package/dist/client/assets/agent-analytics-D1M7QoAT.js +1 -0
- package/dist/client/assets/agent-app-DOxuzP2R.js +1 -0
- package/dist/client/assets/{agent-assets-CNkZSOPp.js → agent-assets-B9JCrCq8.js} +1 -1
- package/dist/client/assets/{agent-automation-C0Yq9OiE.js → agent-automation-BvEH3OZS.js} +3 -3
- package/dist/client/assets/{agent-automations-CL8PVnUy.js → agent-automations-Ck8TQkBX.js} +1 -1
- package/dist/client/assets/agent-calendar-BDOSxsW_.js +1 -0
- package/dist/client/assets/{agent-connect-sources-Bcy9EWkz.js → agent-connect-sources-CeRfuvcX.js} +1 -1
- package/dist/client/assets/agent-deck-C-BZQCII.js +1 -0
- package/dist/client/assets/{agent-e2e-CqVIclm2.js → agent-e2e-CLQ2N5KQ.js} +1 -1
- package/dist/client/assets/agent-experiments-tdlFp9nd.js +1 -0
- package/dist/client/assets/{agent-file-BmTf9y-D.js → agent-file-DCiJJt_1.js} +1 -1
- package/dist/client/assets/{agent-hosting-CLZVBk4b.js → agent-hosting-_4iDaET9.js} +1 -1
- package/dist/client/assets/{agent-icon-D9Dw0iKh.js → agent-icon-Di1pcjRb.js} +1 -1
- package/dist/client/assets/agent-library-Bz6qO4Nh.js +1 -0
- package/dist/client/assets/agent-library-file-7MTfJn5J.js +1 -0
- package/dist/client/assets/agent-monitor-D913p8vC.js +1 -0
- package/dist/client/assets/{agent-overview-DjXD2Qs4.js → agent-overview-CRm01uUj.js} +1 -1
- package/dist/client/assets/{agent-releases-CufoFdaF.js → agent-releases-DWG_3zoJ.js} +1 -1
- package/dist/client/assets/agent-settings-CDcmmP6N.js +1 -0
- package/dist/client/assets/{agent-site-editor-D37kRaBn.js → agent-site-editor-C_bY3W2I.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DgzX4I9T.js +2 -0
- package/dist/client/assets/agent-site-editor-content-B6Sevg3O.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-4LTEMQ-T.js +1 -0
- package/dist/client/assets/agent-view-BC7_pZin.js +1 -0
- package/dist/client/assets/{agent-view-guard-Ckrg4QdJ.js → agent-view-guard-stsCu2yk.js} +1 -1
- package/dist/client/assets/{agents-list-CC5MwUx0.js → agents-list-Drp41B4W.js} +1 -1
- package/dist/client/assets/{ai-providers-Cjz6Am1T.js → ai-providers-ymvf69U2.js} +1 -1
- package/dist/client/assets/{alert-CzMP0em5.js → alert-a-ykuY-J.js} +1 -1
- package/dist/client/assets/{analytics-sections-DdSu0p8k.js → analytics-sections-zQrwPGQJ.js} +1 -1
- package/dist/client/assets/{analytics-tab-akNEioSW.js → analytics-tab-CkitXnj6.js} +2 -2
- package/dist/client/assets/{api-keys-DNOcnvbb.js → api-keys-CddzjTlY.js} +1 -1
- package/dist/client/assets/api-keys-Dlh6QGx9.js +1 -0
- package/dist/client/assets/{app-editor-BX-caEcq.js → app-editor-DIJglJJe.js} +1 -1
- package/dist/client/assets/{asset-utils-KcjmG-m6.js → asset-utils-C_AVaAoE.js} +1 -1
- package/dist/client/assets/{auth-BZRl-fvJ.js → auth-CrD9p86I.js} +1 -1
- package/dist/client/assets/{auth-catchall-Cixh_xVS.js → auth-catchall-BsEXKDlO.js} +1 -1
- package/dist/client/assets/{auth-entry-CDgI8GSv.js → auth-entry-BNMHPKIK.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BpY6CA0U.js → auth-split-layout-BjtZdEYq.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DSVaoY9Y.js → authenticate-and-persist-oauth-C8UpgkvH.js} +1 -1
- package/dist/client/assets/{automation-list-row-BcZ7qNH8.js → automation-list-row-xTorJPTy.js} +1 -1
- package/dist/client/assets/{automation-runs-B9CF82zY.js → automation-runs-DWryzRp5.js} +1 -1
- package/dist/client/assets/{automations-CkWWycIp.js → automations-BzmXycMB.js} +1 -1
- package/dist/client/assets/{autosend-Lp9Ownww.js → autosend-DXH6RsEM.js} +1 -1
- package/dist/client/assets/{badge-CXzZRklK.js → badge-DNQVmTxF.js} +1 -1
- package/dist/client/assets/{block-document-CITCS8My.js → block-document-D1QOl1Oz.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-C1VREoKK.js → blocks-preview-workspace-context-CLMQ_4RI.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-3dDtGXkD.js → blocks-tab-states-BQcKMsso.js} +1 -1
- package/dist/client/assets/{blog-schema-D8JT-pfW.js → blog-schema-1IwdWH9d.js} +1 -1
- package/dist/client/assets/{buckets-DSY_lUaA.js → buckets-Do7nX161.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-BuwT-s1U.js → build-improve-prompt-doc-DDR2Aibs.js} +1 -1
- package/dist/client/assets/{calendar-H7tEy9sl.js → calendar-DSTJzxxj.js} +1 -1
- package/dist/client/assets/{capability-load-error-99aOEzWN.js → capability-load-error-RgpugPdP.js} +1 -1
- package/dist/client/assets/{category-editor-Oh8gppwu.js → category-editor-DD5zZ2D-.js} +1 -1
- package/dist/client/assets/{cdn-tab-BnhMzxv9.js → cdn-tab-BGM8bPPG.js} +1 -1
- package/dist/client/assets/{chart-Bt_svDxj.js → chart-PwHQXgEM.js} +1 -1
- package/dist/client/assets/{chat-context-B-EalrGD.js → chat-context-QAdvSmpg.js} +1 -1
- package/dist/client/assets/{chat-draft-D3axWnPl.js → chat-draft-JWz-JS1X.js} +1 -1
- package/dist/client/assets/{checkbox-B1NhUIDG.js → checkbox-6wv08vv8.js} +1 -1
- package/dist/client/assets/{choose-editor-D1BKVjbI.js → choose-editor-BrKo7WaN.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Zog61hSo.js → cli-auth-success-DYKHxuzD.js} +1 -1
- package/dist/client/assets/{client-icons-CCQzD3FK.js → client-icons-c8sjMYyL.js} +1 -1
- package/dist/client/assets/cms-settings-editor-t2vc1NHq.js +1 -0
- package/dist/client/assets/{collapsible-IxpT7xWi.js → collapsible-C8jYd33t.js} +1 -1
- package/dist/client/assets/{collection-detail-6FWEOpRT.js → collection-detail-BPkemvs1.js} +1 -1
- package/dist/client/assets/{collection-display-button-CKQHTJrg.js → collection-display-button-DPP0I4kT.js} +1 -1
- package/dist/client/assets/{collection-search-4jrHPH5z.js → collection-search-DyeQXfCG.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Cp_spvZp.js → collection-table-wrapper-BiO6hJxh.js} +1 -1
- package/dist/client/assets/{collection-tabs-BGV0tagg.js → collection-tabs-D4LYnWMJ.js} +1 -1
- package/dist/client/assets/{column-rules-D1g0VR5d.js → column-rules-BpHi7zUw.js} +1 -1
- package/dist/client/assets/{combobox-D60tpxva.js → combobox-BeM2oYco.js} +1 -1
- package/dist/client/assets/{command-DHvjfMO5.js → command-sLy5v5Id.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-TI-TBX0N.js → companion-mcps-section-Cn-Rt78u.js} +1 -1
- package/dist/client/assets/{config-Tv6nMoGu.js → config-Cbcgp9UG.js} +1 -1
- package/dist/client/assets/{connect-UTvCbjSn.js → connect-CSSOksoc.js} +1 -1
- package/dist/client/assets/{connect-layout-tlVOroiR.js → connect-layout-DkF_xYAi.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-B3OyvOFa.js → connect-source-dialog-B0JOTGvw.js} +1 -1
- package/dist/client/assets/{connection-DdGNUc6-.js → connection-LyoIrQvL.js} +1 -1
- package/dist/client/assets/{connection-card-B5O4Wsbz.js → connection-card-C90049z-.js} +1 -1
- package/dist/client/assets/{connection-detail-CmtLTaHA.js → connection-detail-DgU6Xe2S.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-DsmTilVU.js → connection-form-helpers-BzLwdyrN.js} +1 -1
- package/dist/client/assets/{connections-DqzZAO_3.js → connections-C54oiD7H.js} +1 -1
- package/dist/client/assets/content-tab-6UhA4BYQ.js +22 -0
- package/dist/client/assets/{context-CfqV1IZs.js → context-BuY1MJLw.js} +1 -1
- package/dist/client/assets/{context-menu-BKWMPe3O.js → context-menu-CXLB0nLT.js} +1 -1
- package/dist/client/assets/{context-shell-DSYPtBTI.js → context-shell-CeIQn_AW.js} +3 -3
- package/dist/client/assets/{core.esm-9HSn5uPZ.js → core.esm-BjMa39GU.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-D10b15S1.js → create-organization-dialog-BDPnd7ZU.js} +1 -1
- package/dist/client/assets/{daily-pulse-DgtJGCVE.js → daily-pulse-HnFS87ta.js} +1 -1
- package/dist/client/assets/{discover-qjJnqmId.js → discover-CoyVnhtj.js} +1 -1
- package/dist/client/assets/{domain-settings-TTJZbGRJ.js → domain-settings-Bi_Nf8Yz.js} +1 -1
- package/dist/client/assets/{drawer-C_HOpx0y.js → drawer-DUy0at62.js} +1 -1
- package/dist/client/assets/{editor-BdrieXEx.js → editor-CZ2vZ5JJ.js} +1 -1
- package/dist/client/assets/{editor-classes-ByAE0Rcb.js → editor-classes-D-ciinYO.js} +1 -1
- package/dist/client/assets/{empty-state-Cmr3S21S.js → empty-state-BG-ZsMM5.js} +1 -1
- package/dist/client/assets/{empty-state-C7Ay2sll.js → empty-state-DX5OkW8m.js} +1 -1
- package/dist/client/assets/experiments-tab-CLo6r2ny.js +1 -0
- package/dist/client/assets/{experiments-tab-choice-zawYDgsX.js → experiments-tab-choice-DxQftboi.js} +1 -1
- package/dist/client/assets/{extract-connection-data-zKnn6Dof.js → extract-connection-data-C4s2gh-W.js} +1 -1
- package/dist/client/assets/{feature-gate-C6VahgnU.js → feature-gate-Cfw3cBLP.js} +1 -1
- package/dist/client/assets/{feature-paywall-BEbplQ--.js → feature-paywall-DIAXEFng.js} +1 -1
- package/dist/client/assets/{file-explorer-DLwjIufd.js → file-explorer-BR0n-bNq.js} +2 -2
- package/dist/client/assets/{file-preview-COfbxVXI.js → file-preview-Ds8GbZw9.js} +1 -1
- package/dist/client/assets/{file-share-button-BtEY0eqQ.js → file-share-button-BXYaokcu.js} +1 -1
- package/dist/client/assets/{file-type-icon-DBRx3EE8.js → file-type-icon-CJ5Cx-FH.js} +1 -1
- package/dist/client/assets/{folder-icon-ATvneswn.js → folder-icon-BbmUc2dC.js} +1 -1
- package/dist/client/assets/{form-sdJe6ZVI.js → form-C3OwrZbQ.js} +1 -1
- package/dist/client/assets/{general-C475sARZ.js → general-Cz0YZJFb.js} +1 -1
- package/dist/client/assets/{held-block-view-CMM-oPyn.js → held-block-view-CDAp9KiG.js} +3 -3
- package/dist/client/assets/{home-y4mIYyne.js → home-CBeFS7md.js} +1 -1
- package/dist/client/assets/{icon-button-CdFqvwVW.js → icon-button-rp_0Im0Y.js} +1 -1
- package/dist/client/assets/{index-DGh8fN-O.js → index-B25kGSP3.js} +1 -1
- package/dist/client/assets/{index-5Rxgh8df.js → index-Bi8Dcq6x.js} +1 -1
- package/dist/client/assets/{index-CrwXZTne.js → index-BlnnRpsw.js} +1 -1
- package/dist/client/assets/{index-ZYyznNcg.js → index-Brzw7ag7.js} +1 -1
- package/dist/client/assets/{index-Dr2piS20.js → index-Bvthatnq.js} +1 -1
- package/dist/client/assets/{index-D47oPuzS.js → index-CAyRiseV.js} +1 -1
- package/dist/client/assets/{index-DXZflUD0.js → index-Cj9bz4MZ.js} +1 -1
- package/dist/client/assets/{index-C-AP-JX2.js → index-CwzAm9wC.js} +1 -1
- package/dist/client/assets/{index-CYjxbJyH.js → index-DFWnsxkt.js} +1 -1
- package/dist/client/assets/index-DfpwvZQG.css +1 -0
- package/dist/client/assets/{index-DZBOWYUC.js → index-DfuO6MLy.js} +1 -1
- package/dist/client/assets/{index-DKEkcTAe.js → index-DwvcPlne.js} +1 -1
- package/dist/client/assets/{index-CJkX47-N.js → index-YTZffZ6U.js} +1 -1
- package/dist/client/assets/{index-CZa3eyGb.js → index-dqTonPuB.js} +9 -9
- package/dist/client/assets/{index-D5GK2hYV.js → index-eXjVYv9z.js} +1 -1
- package/dist/client/assets/{index-Cf0lbIa5.js → index-nN_gbtO8.js} +1 -1
- package/dist/client/assets/{index-redirect-CmV_7D3q.js → index-redirect-C5brcMlb.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-Bj1XK-s-.js → infiniteQueryObserver-Dn-uClrW.js} +1 -1
- package/dist/client/assets/{infra-billing-AjJxcLpN.js → infra-billing-CH6JZhsh.js} +1 -1
- package/dist/client/assets/{input-UflMOkm2.js → input-DsO-XKG3.js} +1 -1
- package/dist/client/assets/{input-B305reVY.js → input-ziouS0a7.js} +4 -4
- package/dist/client/assets/{integration-icon-Dg-0enaK.js → integration-icon-CadbREtM.js} +1 -1
- package/dist/client/assets/{jira-icon-LHSQ0THI.js → jira-icon-7MgMLks3.js} +1 -1
- package/dist/client/assets/{label-D_y7huPi.js → label-B9vYlzdO.js} +1 -1
- package/dist/client/assets/{layout-BP2vQ1s7.js → layout-C1UtsTjt.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-DCLl15SR.js → legacy-agents-deep-CYw3qywU.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-B4J3fSRE.js → legacy-main-redirect-1pdawh_v.js} +1 -1
- package/dist/client/assets/library-Cv7xPXE0.js +1 -0
- package/dist/client/assets/{login-C_21RFJH.js → login-p4pTEV4I.js} +1 -1
- package/dist/client/assets/{markdown-DRSNNxww.js → markdown-BzS1xvA6.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-kU5GlIYH.js → mcp-app-renderer-Dsd5J6Kh.js} +1 -1
- package/dist/client/assets/{mcp-oauth-hGnP00_b.js → mcp-oauth-BiBbnx8b.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C4-kW2Qs.js → mcp-oauth-CzTstmr6.js} +1 -1
- package/dist/client/assets/{members-C6nd5H4U.js → members-ByI1ytgm.js} +1 -1
- package/dist/client/assets/{memory-CuqUqYaX.js → memory-5atI8cIN.js} +1 -1
- package/dist/client/assets/{mini-report-page-4eFJ6i6E.js → mini-report-page-BiZzy7Le.js} +1 -1
- package/dist/client/assets/{mock-board-DckuZkOJ.js → mock-board-CVxb9NJN.js} +3 -3
- package/dist/client/assets/{monaco-editor-hax50RkV.js → monaco-editor-Dqd6OMNL.js} +1 -1
- package/dist/client/assets/monitoring-CzxEm97T.js +1 -0
- package/dist/client/assets/{monitoring-stats-row-DA53VNYY.js → monitoring-stats-row-CpSxjpuK.js} +1 -1
- package/dist/client/assets/{multi-select-BXPlQfny.js → multi-select-BRyAnutb.js} +1 -1
- package/dist/client/assets/{mustache-Bz1-fywO.js → mustache-CgTpIEz8.js} +1 -1
- package/dist/client/assets/{named-rule-uses-5dqNKr-I.js → named-rule-uses-B_I9YE7f.js} +1 -1
- package/dist/client/assets/{new-project-dialog-Dw5AGC0_.js → new-project-dialog-CvrV-V2w.js} +1 -1
- package/dist/client/assets/{oauth-callback-CrMwtWWq.js → oauth-callback-C24sI7J7.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DVv7bJ0G.js → oauth-callback-ai-provider-RnzKbWsN.js} +1 -1
- package/dist/client/assets/{onboarding-dFcnQ43S.js → onboarding-DID9r4O7.js} +1 -1
- package/dist/client/assets/{openai-conversation-BPBksfQq.js → openai-conversation-DSk3ETjb.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-p5DZ1J0t.js → optimistic-project-sidebar-views-DpQUpW-I.js} +1 -1
- package/dist/client/assets/{order-monitor-day-DKC4UhpG.js → order-monitor-day-BGEK7Bpo.js} +1 -1
- package/dist/client/assets/{organization-choice-DgNX0px1.js → organization-choice-BHrA1AZQ.js} +1 -1
- package/dist/client/assets/{orgs--Jgqg6Dn.js → orgs-CJ5rh6cM.js} +1 -1
- package/dist/client/assets/{page-seo-form-Ce_NK10C.js → page-seo-form-DzPuUK4t.js} +1 -1
- package/dist/client/assets/{pair-DdbYjyQ3.js → pair-CqDeWXf6.js} +1 -1
- package/dist/client/assets/{parse-sections-oc95T4h7.js → parse-sections-CPumEOlp.js} +1 -1
- package/dist/client/assets/{plan-ZvtmjKe3.js → plan-DpdYL_SC.js} +1 -1
- package/dist/client/assets/{plan-ladder-EdUaionH.js → plan-ladder-Dhy2mlD-.js} +1 -1
- package/dist/client/assets/{popover-BLArxJjU.js → popover--NiW4ds1.js} +1 -1
- package/dist/client/assets/{post-calendar-CbC3_MoD.js → post-calendar-nR3dxdcY.js} +1 -1
- package/dist/client/assets/{post-editor-YM3sgG2e.js → post-editor-DYtyYMlo.js} +1 -1
- package/dist/client/assets/{preview-content-GXFA_X5E.js → preview-content-CmgkQhaE.js} +1 -1
- package/dist/client/assets/{preview-dialog-D26WaaIk.js → preview-dialog-Dm182n0_.js} +1 -1
- package/dist/client/assets/{preview-panel-B_p-C9Al.js → preview-panel-XXLWOdEl.js} +1 -1
- package/dist/client/assets/{preview-tab-Duwq60WH.js → preview-tab-oW6r5QzB.js} +3 -3
- package/dist/client/assets/{product-picker-dialog-f1dTB5f1.js → product-picker-dialog-BpXw9b8F.js} +1 -1
- package/dist/client/assets/{profile-DLFUEAmv.js → profile-D2nKI0hH.js} +1 -1
- package/dist/client/assets/{project-app-view-CnegYwol.js → project-app-view-BCwQq4yH.js} +1 -1
- package/dist/client/assets/project-apps-Dj2CJOnZ.js +1 -0
- package/dist/client/assets/{project-feed-f7HLjRe8.js → project-feed-DNMNyDPx.js} +1 -1
- package/dist/client/assets/{project-icon-PZVlAu2D.js → project-icon-Fuoy9xbW.js} +1 -1
- package/dist/client/assets/project-reports-Cj0tAxbH.js +1 -0
- package/dist/client/assets/project-tasks-BLptZtxw.js +1 -0
- package/dist/client/assets/{projects-BoKvz5fr.js → projects-BVfx1-an.js} +1 -1
- package/dist/client/assets/{projects-empty-state-Cq326GR_.js → projects-empty-state-BGI2AvCV.js} +1 -1
- package/dist/client/assets/{prompts-DvtSj5pm.js → prompts-CxG-l5n6.js} +1 -1
- package/dist/client/assets/record-editor-MLJFEHa6.js +1 -0
- package/dist/client/assets/{redirect-editor-BaZEnl8a.js → redirect-editor-D2KHHydh.js} +1 -1
- package/dist/client/assets/{releases-api-BohVJQUi.js → releases-api-BbVlMuk_.js} +1 -1
- package/dist/client/assets/{reports--iZn8db0.js → reports-Ciw0cmSs.js} +1 -1
- package/dist/client/assets/{reports-onboarding-Cz-2WWBR.js → reports-onboarding-DNfKLuiC.js} +1 -1
- package/dist/client/assets/reports-pbzR9Ttf.js +1 -0
- package/dist/client/assets/{reports-tab-COgTSVf5.js → reports-tab-BefEBqvf.js} +2 -2
- package/dist/client/assets/repositories-BsvHkw06.js +1 -0
- package/dist/client/assets/{repositories-BPLjQabQ.js → repositories-z8wEcK0M.js} +1 -1
- package/dist/client/assets/{repository-binding-Kf_PGfSt.js → repository-binding-0L-NOau4.js} +1 -1
- package/dist/client/assets/{repository-import-picker-DoXIwk7w.js → repository-import-picker-DepdN5-B.js} +1 -1
- package/dist/client/assets/{repository-picker-Ck8gOK4_.js → repository-picker-Dva3lcTN.js} +1 -1
- package/dist/client/assets/{require-capability-9Oz2BfBS.js → require-capability-D2uGPRyV.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cex5NCBT.js → required-auth-layout-CF04eiX-.js} +1 -1
- package/dist/client/assets/{reset-password-DetEygjt.js → reset-password-EsqG_9_N.js} +1 -1
- package/dist/client/assets/{resizable-WLl3kXXs.js → resizable-l4I_T5Kn.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-ByqcINMf.js → resolve-tab-icon-DEw9_uRC.js} +1 -1
- package/dist/client/assets/{review-settings-bGGfBlNt.js → review-settings-D4PRtLEA.js} +1 -1
- package/dist/client/assets/{roles-C_SQvcrV.js → roles-Dg57dBTr.js} +1 -1
- package/dist/client/assets/route-BHiTL7ed.js +1 -0
- package/dist/client/assets/{route-BRjhV7ZN.js → route-D2VIJZi7.js} +1 -1
- package/dist/client/assets/route-D5SW2o-V.js +1 -0
- package/dist/client/assets/{sandbox-lifecycle-context-RGinjzUS.js → sandbox-lifecycle-context-gdz-I2_D.js} +1 -1
- package/dist/client/assets/{schema-0jGA111R.js → schema-4_stGcYx.js} +1 -1
- package/dist/client/assets/{schema-DzkQww7V.js → schema-BQgw-8fk.js} +1 -1
- package/dist/client/assets/{scroll-area-tGpLyLX1.js → scroll-area-CyLybKsS.js} +1 -1
- package/dist/client/assets/{search-input-l1Nxf0a9.js → search-input-CeTAKge4.js} +1 -1
- package/dist/client/assets/{search-toggle-CxATSEKS.js → search-toggle-Cr4iRumB.js} +1 -1
- package/dist/client/assets/{secret-picker-DZfeNjeU.js → secret-picker-n5Ps6wSc.js} +1 -1
- package/dist/client/assets/{secrets-DiQbqnkh.js → secrets-CZjIZYlr.js} +1 -1
- package/dist/client/assets/{section-array-field-CLj6DiG4.js → section-array-field-DU2wvA76.js} +1 -1
- package/dist/client/assets/{sections-D4nfYRrB.js → sections-ZoPCF-bt.js} +1 -1
- package/dist/client/assets/sections-editor-CpNs-v4Y.js +1 -0
- package/dist/client/assets/{select-Dh0RDXSe.js → select-BBgfhGwn.js} +1 -1
- package/dist/client/assets/{select-model-Cmt1TH6i.js → select-model-CWJxxZcQ.js} +1 -1
- package/dist/client/assets/{seo-editor-BMcjQ83E.js → seo-editor-LIAtvw09.js} +1 -1
- package/dist/client/assets/{separator-Bpi7EJ0Z.js → separator-yz9LQvWk.js} +1 -1
- package/dist/client/assets/settings-tab-DgS3Wxee.js +1 -0
- package/dist/client/assets/{sheet-BeB7fiX7.js → sheet-CInqTfvf.js} +1 -1
- package/dist/client/assets/{shell-layout-CNGrbelx.js → shell-layout-Dhack47g.js} +1 -1
- package/dist/client/assets/{site-draft-actions-QoxLdEip.js → site-draft-actions-BKfRt5Kf.js} +6 -6
- package/dist/client/assets/site-draft-view-DQWTYqa5.js +2 -0
- package/dist/client/assets/site-editor-jHYcBntN.js +1 -0
- package/dist/client/assets/{site-editor-toast-BzM8F-5I.js → site-editor-toast-BphhFIx_.js} +1 -1
- package/dist/client/assets/{skills-BFyhQCV2.js → skills-NdjGdK_L.js} +1 -1
- package/dist/client/assets/{slider-BEIpzaR7.js → slider-CjVp545e.js} +1 -1
- package/dist/client/assets/{sortable.esm-DXFyyTP0.js → sortable.esm-CLnROgsp.js} +1 -1
- package/dist/client/assets/{sso-AQP6Ciq2.js → sso-CoZFsJu8.js} +1 -1
- package/dist/client/assets/{suggestion-5McGPh6e.js → suggestion-BJa7UCMt.js} +1 -1
- package/dist/client/assets/{switch-Ba2Gsd2l.js → switch-BuvFN30Y.js} +1 -1
- package/dist/client/assets/{symbol-DhVs0bZH.js → symbol-Dvlt2z4k.js} +1 -1
- package/dist/client/assets/{synced-repos-CMC6m4k2.js → synced-repos-CLcW5MUO.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-BecmvuFT.js → tab-icon-glyph-4xj2Fk17.js} +1 -1
- package/dist/client/assets/{table-up4JHBvu.js → table-DF5_axer.js} +1 -1
- package/dist/client/assets/{tabs-C46_2gJf.js → tabs-DPXakTnY.js} +1 -1
- package/dist/client/assets/{task-assignee-avatar-CdFkE7XN.js → task-assignee-avatar-CLWTu-qp.js} +1 -1
- package/dist/client/assets/{task-board-BCtRCz9S.js → task-board-C3TfKsEu.js} +1 -1
- package/dist/client/assets/{task-route-Y1X7OZ0H.js → task-route-D8G4Pg9E.js} +1 -1
- package/dist/client/assets/{task-status-CSuoeMCO.js → task-status-CR31LKK2.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-B7lSR6tY.js → taskboard-analytics-C8Udie1K.js} +1 -1
- package/dist/client/assets/{tasks-xJwb3MB5.js → tasks-Blq-0J6L.js} +1 -1
- package/dist/client/assets/tasks-C4wpaTB2.js +1 -0
- package/dist/client/assets/{textarea-CTXOHUAm.js → textarea-Dg_yVkeX.js} +1 -1
- package/dist/client/assets/{thread-analytics-Duedqn0y.js → thread-analytics-9I9WwE29.js} +1 -1
- package/dist/client/assets/{thread-intent-BAvAvKIG.js → thread-intent-DmSTHfJV.js} +1 -1
- package/dist/client/assets/{thread-route-5Y36bVJA.js → thread-route-DL6c8KHu.js} +1 -1
- package/dist/client/assets/{thread-route-D-HTU4ms.js → thread-route-DyeAWeVv.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-DaYQzSu-.js → thread-sheet-body-CyVr8d5d.js} +1 -1
- package/dist/client/assets/{time-range-picker-fN9Evhky.js → time-range-picker-CAYhviop.js} +1 -1
- package/dist/client/assets/{toggle-group-B38pdvYb.js → toggle-group-CagcNHou.js} +1 -1
- package/dist/client/assets/{tool-namespace-BCj-Y0g5.js → tool-namespace-AEMn8zEL.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-brf17qwF.js → toolbar-icon-button-BTNIHkHm.js} +1 -1
- package/dist/client/assets/{tooltip-CzDCGEIi.js → tooltip-CkhWwifD.js} +1 -1
- package/dist/client/assets/{tooltipContext-BmuFpL8F.js → tooltipContext-XWgj5YPF.js} +1 -1
- package/dist/client/assets/{track-CFwl4Yaf.js → track-CSaYPuyk.js} +1 -1
- package/dist/client/assets/{types-BEPRfygK.js → types-BBlCCKBH.js} +1 -1
- package/dist/client/assets/{url-slug-W-P-V6ae.js → url-slug-B_Yjxy4g.js} +1 -1
- package/dist/client/assets/{usage-stats-B-bDSRFu.js → usage-stats-Bnq-bwdD.js} +1 -1
- package/dist/client/assets/{use-ai-providers-ZqKycOYQ.js → use-ai-providers-BmOzsYDN.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CvK-hhnp.js → use-apply-named-rule-B2Zt8XIz.js} +1 -1
- package/dist/client/assets/{use-automations-D3-t6dDi.js → use-automations-HMhC6FE5.js} +1 -1
- package/dist/client/assets/{use-autosave-i2Rvz97o.js → use-autosave-D6dco3FM.js} +1 -1
- package/dist/client/assets/{use-chat-layout-state-9bVxCYem.js → use-chat-layout-state-SXC1aBSP.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BM5p8P79.js → use-clock-tick-BzkvK9xF.js} +1 -1
- package/dist/client/assets/{use-connect-companion-a0M1gRGT.js → use-connect-companion-D77Qg9uw.js} +1 -1
- package/dist/client/assets/{use-connection-C6xnl_pH.js → use-connection-CgZBwmOC.js} +1 -1
- package/dist/client/assets/{use-content-sync-tAg8ta4S.js → use-content-sync-Di8d86xo.js} +1 -1
- package/dist/client/assets/{use-copy-BkKCeyGC.js → use-copy-B6jA1hKb.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-Bu3SZepQ.js → use-create-virtual-mcp-YK4tVtgK.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-8Ts_sXo3.js → use-date-fns-locale-CXWxLD_D.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DMiQvxW8.js → use-debounced-autosave-V77TWUAY.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DE8_aoyE.js → use-debounced-value-CgkCbE-q.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DNhIxA1G.js → use-deco-credits-CYakt-79.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-C6Ht-NxL.js → use-decopilot-events-BNl6vZT3.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BJIuoAsL.js → use-delete-connection-B_LhNFqB.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-yhpva385.js → use-deployment-admin-CQqKzTzV.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-C6RW47sS.js → use-fast-preview-draft-url-CtbO1sYj.js} +1 -1
- package/dist/client/assets/{use-file-configs-DTUQ5Hig.js → use-file-configs-Bdi3Zzvl.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-HZQIvZXe.js → use-inbox-feed-BDXrK609.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DUZWngnl.js → use-infinite-scroll-Ce1Cyz0w.js} +1 -1
- package/dist/client/assets/{use-join-requests-B4fxzXiJ.js → use-join-requests-C1STdVOR.js} +1 -1
- package/dist/client/assets/{use-main-panel-tabs-Bx3g8qPg.js → use-main-panel-tabs-DZlakfZ7.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-D6Yk3F2A.js → use-mcp-auth-status-DLGEZPTH.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CgMd9iAw.js → use-mcp-client-NiHnmnpB.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-QvvUKN0H.js → use-mcp-prompts-BpP8rPhI.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-dRnQL8sk.js → use-mcp-tools-DvShHfsn.js} +1 -1
- package/dist/client/assets/{use-mobile-CmqrzeQ2.js → use-mobile-0wDKszAH.js} +1 -1
- package/dist/client/assets/{use-move-blocks-CZU-bgYZ.js → use-move-blocks-BFH4bGqH.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BxC330Nu.js → use-navigate-to-agent-CHgAma_A.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-c4b9_W-b.js → use-open-billing-url-D4G9wMSG.js} +1 -1
- package/dist/client/assets/{use-org-fs-CBQNhgrx.js → use-org-fs-CgDaP3QS.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BpCSmIKb.js → use-org-repo-syncs-ZnbK4UNH.js} +1 -1
- package/dist/client/assets/{use-org-sso-BjyMvUUZ.js → use-org-sso-4bOeKtTK.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CR-IVvZj.js → use-organization-roles-CaIcAuZI.js} +1 -1
- package/dist/client/assets/{use-organization-settings-y-0WXno1.js → use-organization-settings-Bj3c26BX.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-zL6feX1_.js → use-panel-navigate-kG8bT637.js} +1 -1
- package/dist/client/assets/use-project-native-view-presence-BixTQ7MO.js +1 -0
- package/dist/client/assets/{use-project-scope-DtQCf5X8.js → use-project-scope-DQ4byfJ8.js} +1 -1
- package/dist/client/assets/{use-recent-apps-CsecLp6Y.js → use-recent-apps-DnJcepur.js} +1 -1
- package/dist/client/assets/{use-releases-Bn59ANC-.js → use-releases-1u7IRxuv.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-DmS17KTi.js → use-reports-diagnostic-BemHjjuV.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-BkrPzSJm.js → use-sandbox-events-KLt2azet.js} +1 -1
- package/dist/client/assets/{use-secrets-FsfDKvXs.js → use-secrets-BOgeYbQq.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-YJjHRtUw.js → use-section-preview-base-B586nx29.js} +1 -1
- package/dist/client/assets/{use-session-runtime-B1BjekR-.js → use-session-runtime-CJtbf6W0.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-50yzGJzV.js → use-sidebar-collapsed-B__PkJPm.js} +1 -1
- package/dist/client/assets/{use-tags-CZDUybI1.js → use-tags-DlHL5H_y.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-B2Pm02Ek.js → use-task-board-analytics-CDja-5FD.js} +1 -1
- package/dist/client/assets/{use-task-board-events-DGLOhClG.js → use-task-board-events-C6pDc0YD.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-B6JhCfRd.js → use-task-board-item-prs-CNR5PS--.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Cl62kND-.js → use-task-metadata-CIhHGtUG.js} +1 -1
- package/dist/client/assets/{use-thread-analytics-CR3zf5b3.js → use-thread-analytics-Dv9Xhfh-.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-DQFZK-8V.js → use-thread-outputs-DvCpSxoC.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BqRsoJ1h.js +1 -0
- package/dist/client/assets/{useQueries-BKAb_KHa.js → useQueries-BBnVrkV9.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CXNJCW6q.js +1 -0
- package/dist/client/assets/{users-B1TbgHgl.js → users-MhJxqzuf.js} +1 -1
- package/dist/client/assets/{utils-DTNHEqVe.js → utils-LgeHHV8Z.js} +1 -1
- package/dist/client/assets/{variant-calendar-BaZfELT8.js → variant-calendar-BZZsY0pE.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-e7d1QuAB.js → variant-matcher-override-CB3DEYo-.js} +1 -1
- package/dist/client/assets/{virtual-mcp-IZZKCKG6.js → virtual-mcp-BTO3QMrV.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-BvCNV0KD.js → watch-sse-pool-Cg72K5y9.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +393 -389
- package/package.json +1 -1
- package/dist/client/assets/agent-analytics-DQUAv2rU.js +0 -1
- package/dist/client/assets/agent-app-CC8H2_RQ.js +0 -1
- package/dist/client/assets/agent-calendar-BMldRrmG.js +0 -1
- package/dist/client/assets/agent-deck-KP9i8rlb.js +0 -1
- package/dist/client/assets/agent-experiments-CVGDLUGS.js +0 -1
- package/dist/client/assets/agent-library-B9XhNA3y.js +0 -1
- package/dist/client/assets/agent-library-file-DMWQXc7h.js +0 -1
- package/dist/client/assets/agent-monitor-D-nTcMhx.js +0 -1
- package/dist/client/assets/agent-settings-B-Q2xNFl.js +0 -1
- package/dist/client/assets/agent-site-editor-code-DiDoS2Hl.js +0 -2
- package/dist/client/assets/agent-site-editor-content-BL8iQpvi.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-BnzfkMpU.js +0 -1
- package/dist/client/assets/agent-view-BWlsY4B7.js +0 -1
- package/dist/client/assets/api-keys-VKfbZR3P.js +0 -1
- package/dist/client/assets/campaigns-view-DqoAS-BN.js +0 -1
- package/dist/client/assets/cms-settings-editor-BIjSx0Nc.js +0 -1
- package/dist/client/assets/content-tab-CQYmoOq9.js +0 -22
- package/dist/client/assets/experiments-tab-C2tJOVTj.js +0 -1
- package/dist/client/assets/index-BgjLAl1E.css +0 -1
- package/dist/client/assets/library-Bns22mAf.js +0 -1
- package/dist/client/assets/monitoring-B6KSdVsK.js +0 -1
- package/dist/client/assets/named-rule-view-CTYOj6rx.js +0 -1
- package/dist/client/assets/project-apps-BEnCDhRH.js +0 -1
- package/dist/client/assets/project-reports-DwBCSB_E.js +0 -1
- package/dist/client/assets/project-tasks-DC6ktZiN.js +0 -1
- package/dist/client/assets/record-editor-BKwj4lcG.js +0 -1
- package/dist/client/assets/reports-B7Os682y.js +0 -1
- package/dist/client/assets/repositories-BzPPC0PO.js +0 -1
- package/dist/client/assets/route-CrZ0agrx.js +0 -1
- package/dist/client/assets/route-DOcNdWL5.js +0 -1
- package/dist/client/assets/sections-editor-NTS3iIPY.js +0 -1
- package/dist/client/assets/settings-tab-z_Zg1Psn.js +0 -1
- package/dist/client/assets/site-draft-view-DgaAKV3m.js +0 -2
- package/dist/client/assets/site-editor-CShdOJ2B.js +0 -1
- package/dist/client/assets/tasks-BC1mhZoV.js +0 -1
- package/dist/client/assets/use-project-native-view-presence-CzShimrg.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BLBwQpXr.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Dgg4wUTA.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as z,j as i,b as ce,r as ee,hk as ke,h as ge,B as xe,l as ye,t as ae,aM as Pe,aN as De,aO as Ne,aP as ve,bl as Ce,aQ as Se,aR as we,aS as Ae,V as _e,ai as ze,X as ue,a7 as Fe,Y as Ue,Z as Ie}from"./index-CZa3eyGb.js";import{C as $e}from"./index-D5GK2hYV.js";import{A as Me}from"./agent-view-guard-Ckrg4QdJ.js";import{a as Te}from"./Copy01-BQVKjs--.js";import{i as Ee}from"./DotsVertical-D0yivq6N.js";import{b as Oe,a as Re}from"./ZoomOut-I9ktV8DJ.js";import{a as Be}from"./Image01-Ca2zoOmL.js";import{s as Le}from"./Trash01-DAL2eWYn.js";import{i as he}from"./Upload01-3A7TgOQk.js";import{S as Ve}from"./search-input-l1Nxf0a9.js";import{a as qe}from"./repository-binding-Kf_PGfSt.js";import{u as Ge}from"./use-debounced-value-DE8_aoyE.js";import{a as Qe}from"./use-file-configs-DTUQ5Hig.js";import{u as We,a as Ye,e as He,i as Ke,b as be,f as Xe,c as Ze}from"./asset-utils-KcjmG-m6.js";import{m as Je}from"./match-site-slug-config-D3fUJ6vX.js";import{r as et}from"./site-slug-DebpOoQq.js";import{b as tt}from"./thread-route-D-HTU4ms.js";import"./use-mobile-CmqrzeQ2.js";import"./use-sidebar-collapsed-50yzGJzV.js";import"./use-chat-layout-state-9bVxCYem.js";import"./use-panel-navigate-zL6feX1_.js";import"./use-project-scope-DtQCf5X8.js";import"./thread-intent-BAvAvKIG.js";import"./use-mcp-client-CgMd9iAw.js";import"./auth-BZRl-fvJ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BvCNV0KD.js";import"./task-board-BCtRCz9S.js";import"./schema-DzkQww7V.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-D9Dw0iKh.js";import"./AlertCircle-X-2ynYTr.js";import"./Tool01-DZBBNle2.js";import"./ArrowUp-D5ujBFbU.js";import"./ArrowLeft-D5rLbzEv.js";import"./LinkBroken01-DbRdGmca.js";import"./ShoppingBag01-CIHcZyoe.js";import"./Building02-CmwS_4Zd.js";import"./CheckCircle-K7QKF0ga.js";import"./ChevronUp-bhjMH6tk.js";import"./ChevronSelectorVertical-8Zglhuwj.js";import"./UserSquare-C3P5-DPf.js";import"./CreditCard01-DLuzN9Da.js";import"./Globe04-Do87jSl8.js";import"./SwitchHorizontal01-C4b3q3_P.js";import"./Key01-B22TaZal.js";import"./Link01-CKgU9XrQ.js";import"./Minus-DbFMOQp2.js";import"./Monitor01-CfX8nvtP.js";import"./Sun-BQHZ8KXH.js";import"./Play-gY_w5wGM.js";import"./Plus-cZACl5Bj.js";import"./SearchMd-B3lyjcge.js";import"./Users01-CbJgTvJT.js";import"./XClose-B7VCNh_p.js";import"./tooltip-CzDCGEIi.js";import"./index-CJkX47-N.js";import"./toolbar-icon-button-brf17qwF.js";import"./shell-layout-CNGrbelx.js";import"./use-clock-tick-BM5p8P79.js";import"./command-DHvjfMO5.js";import"./index-5Rxgh8df.js";import"./integration-icon-Dg-0enaK.js";import"./project-icon-PZVlAu2D.js";import"./new-project-dialog-Dw5AGC0_.js";import"./label-D_y7huPi.js";import"./repository-import-picker-DoXIwk7w.js";import"./use-navigate-to-agent-BxC330Nu.js";import"./repository-picker-Ck8gOK4_.js";import"./useInfiniteQuery-BLBwQpXr.js";import"./infiniteQueryObserver-Bj1XK-s-.js";import"./collection-search-4jrHPH5z.js";import"./use-organization-settings-y-0WXno1.js";import"./required-auth-layout-Cex5NCBT.js";import"./autosend-Lp9Ownww.js";import"./use-org-sso-BjyMvUUZ.js";import"./sheet-BeB7fiX7.js";import"./resizable-WLl3kXXs.js";import"./use-main-panel-tabs-Bx3g8qPg.js";import"./use-connection-C6xnl_pH.js";import"./use-mcp-tools-dRnQL8sk.js";import"./types-BEPRfygK.js";import"./utils-CVEq3hMx.js";import"./experiments-tab-choice-zawYDgsX.js";import"./index-DGh8fN-O.js";import"./chat-context-B-EalrGD.js";import"./use-decopilot-events-C6Ht-NxL.js";import"./use-ai-providers-ZqKycOYQ.js";import"./location-V0VwTJTt.js";import"./tool-namespace-BCj-Y0g5.js";import"./drawer-C_HOpx0y.js";import"./use-mcp-prompts-QvvUKN0H.js";import"./usage-stats-B-bDSRFu.js";import"./form-sdJe6ZVI.js";import"./markdown-DRSNNxww.js";import"./use-copy-BkKCeyGC.js";import"./input-B305reVY.js";import"./icon-button-CdFqvwVW.js";import"./file-type-icon-DBRx3EE8.js";import"./chat-draft-D3axWnPl.js";import"./use-session-runtime-B1BjekR-.js";import"./select-Dh0RDXSe.js";import"./index-BdQq_4o_.js";import"./tabs-C46_2gJf.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-DNhIxA1G.js";import"./toggle-group-B38pdvYb.js";import"./use-open-billing-url-c4b9_W-b.js";import"./index-C-AP-JX2.js";import"./checkbox-B1NhUIDG.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-BLArxJjU.js";import"./input-UflMOkm2.js";import"./suggestion-5McGPh6e.js";import"./use-org-fs-CBQNhgrx.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-BEbplQ--.js";import"./plan-ladder-EdUaionH.js";import"./add-connection-dialog-Bk02feSt.js";import"./extract-connection-data-zKnn6Dof.js";import"./metadata-D72DunRR.js";import"./connection-DdGNUc6-.js";import"./url-slug-W-P-V6ae.js";import"./connection-card-B5O4Wsbz.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CTXOHUAm.js";import"./schema-0jGA111R.js";import"./connection-form-helpers-DsmTilVU.js";import"./authenticate-and-persist-oauth-DSVaoY9Y.js";import"./mcp-oauth-hGnP00_b.js";import"./mcp-oauth-C4-kW2Qs.js";import"./collection-tabs-BGV0tagg.js";import"./badge-CXzZRklK.js";import"./use-infinite-scroll-DUZWngnl.js";import"./useSuspenseInfiniteQuery-Dgg4wUTA.js";import"./use-task-board-events-DGLOhClG.js";import"./pair-DdbYjyQ3.js";import"./collapsible-IxpT7xWi.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-kU5GlIYH.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DQFZK-8V.js";import"./use-sandbox-events-BkrPzSJm.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-ByqcINMf.js";import"./use-task-metadata-Cl62kND-.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-CzShimrg.js";import"./virtual-mcp-IZZKCKG6.js";function it(r){const e=z.c(6),{virtualMcpId:t}=r,s=qe(t),l=Qe();let o;e[0]!==l||e[1]!==s?(o=Je(l,et(s)),e[0]=l,e[1]=s,e[2]=o):o=e[2];const n=o;if(!n){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(st,{}),e[3]=a):a=e[3],a}let c;return e[4]!==n?(c=i.jsx(ot,{config:n}),e[4]=n,e[5]=c):c=e[5],c}function st(){const r=z.c(12),e=ce();let t;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:i.jsx(Re,{size:20,className:"text-muted-foreground"})}),r[0]=t):t=r[0];let s;r[1]!==e?(s=e("assets.browser.noBucketTitle"),r[1]=e,r[2]=s):s=r[2];let l;r[3]!==s?(l=i.jsx("p",{className:"text-sm font-medium",children:s}),r[3]=s,r[4]=l):l=r[4];let o;r[5]!==e?(o=e("assets.browser.noBucketDescription"),r[5]=e,r[6]=o):o=r[6];let n;r[7]!==o?(n=i.jsx("p",{className:"mt-1 max-w-sm text-xs text-muted-foreground",children:o}),r[7]=o,r[8]=n):n=r[8];let c;return r[9]!==l||r[10]!==n?(c=i.jsxs("div",{className:"flex h-full min-h-0 flex-col items-center justify-center gap-3 p-10 text-center",children:[t,i.jsxs("div",{children:[l,n]})]}),r[9]=l,r[10]=n,r[11]=c):c=r[11],c}function rt(r){return r<0||r<640?2:r<768?3:r<1024?4:5}function lt(r,e){const t=Array.from({length:e},()=>[]);return r.forEach((s,l)=>t[l%e].push(s)),t}function ot(r){const e=z.c(99),{config:t}=r,s=ce(),[l,o]=ee.useState(""),n=Ge(l,300);let c;e[0]!==t.id||e[1]!==n?(c={configId:t.id,search:n},e[0]=t.id,e[1]=n,e[2]=c):c=e[2];const a=We(c),m=Ye(),[y,p]=ee.useState(!1),[d,g]=ee.useState(null),u=ee.useRef(null);let h;e[3]!==t.id||e[4]!==a||e[5]!==s||e[6]!==m?(h=async function(A){if(!A)return;const J=Array.from(A);if(J.length===0)return;const U=[];for(const R of J)try{await m.mutateAsync({configId:t.id,file:R})}catch(I){const _=I;U.push(`${R.name} (${_ instanceof Error?_.message:"upload failed"})`)}await a.refetch(),U.length>0&&ae.error(U.length===J.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:U.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:U.join("; ")}))},e[3]=t.id,e[4]=a,e[5]=s,e[6]=m,e[7]=h):h=e[7];const x=h;let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=function(A){A.preventDefault(),p(!0)},e[8]=f):f=e[8];const j=f;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=function(){p(!1)},e[9]=C):C=e[9];const P=C;let k;e[10]!==x?(k=function(A){A.preventDefault(),A.stopPropagation(),p(!1),x(A.dataTransfer.files)},e[10]=x,e[11]=k):k=e[11];const b=k,[D,S]=ke();let N,v,w,$,M,F;if(e[12]!==t.name||e[13]!==n||e[14]!==S||e[15]!==D||e[16]!==x||e[17]!==y||e[18]!==a.data?.pages||e[19]!==a.isFetching||e[20]!==a.isFetchingNextPage||e[21]!==b||e[22]!==l||e[23]!==s||e[24]!==m.isPending){const A=(a.data?.pages??[]).flatMap(nt),J=lt(A,rt(D)),U=n.trim(),R=l!==n||a.isFetching&&!a.isFetchingNextPage;M="flex h-full min-h-0 flex-col gap-3 p-4";let I;e[31]!==s?(I=s("assets.browser.title"),e[31]=s,e[32]=I):I=e[32];let _;e[33]!==I?(_=i.jsx("h2",{className:"text-sm font-semibold",children:I}),e[33]=I,e[34]=_):_=e[34];let B;e[35]!==t.name||e[36]!==s?(B=s("assets.browser.bucketLabel",{name:t.name}),e[35]=t.name,e[36]=s,e[37]=B):B=e[37];let L;e[38]!==B?(L=i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:B}),e[38]=B,e[39]=L):L=e[39];let V;e[40]!==_||e[41]!==L?(V=i.jsxs("div",{className:"min-w-0",children:[_,L]}),e[40]=_,e[41]=L,e[42]=V):V=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re=()=>u.current?.click(),e[43]=re):re=e[43];let q;e[44]!==m.isPending?(q=m.isPending?i.jsx(ge,{className:"size-3.5"}):i.jsx(he,{size:14}),e[44]=m.isPending,e[45]=q):q=e[45];let G;e[46]!==s||e[47]!==m.isPending?(G=m.isPending?s("filePicker.filePickerDialog.uploading"):s("filePicker.filePickerDialog.dropFilesOrClick"),e[46]=s,e[47]=m.isPending,e[48]=G):G=e[48];let Q;e[49]!==q||e[50]!==G||e[51]!==m.isPending?(Q=i.jsxs(xe,{type:"button",size:"sm",disabled:m.isPending,onClick:re,children:[q,G]}),e[49]=q,e[50]=G,e[51]=m.isPending,e[52]=Q):Q=e[52];let W;e[53]!==x?(W=i.jsx("input",{ref:u,type:"file",multiple:!0,className:"hidden",onChange:ne=>{const pe=Array.from(ne.target.files??[]);ne.target.value="",x(pe)}}),e[53]=x,e[54]=W):W=e[54],e[55]!==V||e[56]!==Q||e[57]!==W?(F=i.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3",children:[V,Q,W]}),e[55]=V,e[56]=Q,e[57]=W,e[58]=F):F=e[58];let Y;e[59]!==s?(Y=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[59]=s,e[60]=Y):Y=e[60],e[61]!==R||e[62]!==l||e[63]!==Y?(N=i.jsx(Ve,{value:l,onChange:o,isSearching:R,placeholder:Y,className:"shrink-0"}),e[61]=R,e[62]=l,e[63]=Y,e[64]=N):N=e[64];let le;e[65]===Symbol.for("react.memo_cache_sentinel")?(le=()=>u.current?.click(),e[65]=le):le=e[65];const me=y&&"border-primary bg-primary/5",fe=m.isPending&&"pointer-events-none opacity-60";let H;e[66]!==me||e[67]!==fe?(H=ye("flex shrink-0 flex-col items-center justify-center gap-1 rounded-xl border border-dashed border-border/60 p-4 text-center transition-colors",me,fe),e[66]=me,e[67]=fe,e[68]=H):H=e[68];let oe;e[69]===Symbol.for("react.memo_cache_sentinel")?(oe=i.jsx(he,{size:16,className:"text-muted-foreground"}),e[69]=oe):oe=e[69];let K;e[70]!==s?(K=s("filePicker.filePickerDialog.dropFilesOrClick"),e[70]=s,e[71]=K):K=e[71];let X;e[72]!==s?(X=s("filePicker.filePickerDialog.uploadSizeLimit"),e[72]=s,e[73]=X):X=e[73];let Z;e[74]!==K||e[75]!==X?(Z=i.jsxs("p",{className:"text-xs text-muted-foreground",children:[K," ",X]}),e[74]=K,e[75]=X,e[76]=Z):Z=e[76],e[77]!==b||e[78]!==H||e[79]!==Z?(v=i.jsxs("button",{type:"button",onClick:le,onDragOver:j,onDragLeave:P,onDrop:b,className:H,children:[oe,Z]}),e[77]=b,e[78]=H,e[79]=Z,e[80]=v):v=e[80],w="min-h-0 flex-1 overflow-y-auto pr-1",$=A.length===0?U?i.jsx(je,{title:s("filePicker.filePickerDialog.noMatches",{query:U}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):i.jsx(je,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):i.jsx("div",{ref:S,className:"flex items-start gap-3",children:J.map((ne,pe)=>i.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:ne.map(de=>i.jsx(at,{item:de,onDelete:()=>g(de)},de.key))},pe))}),e[12]=t.name,e[13]=n,e[14]=S,e[15]=D,e[16]=x,e[17]=y,e[18]=a.data?.pages,e[19]=a.isFetching,e[20]=a.isFetchingNextPage,e[21]=b,e[22]=l,e[23]=s,e[24]=m.isPending,e[25]=N,e[26]=v,e[27]=w,e[28]=$,e[29]=M,e[30]=F}else N=e[25],v=e[26],w=e[27],$=e[28],M=e[29],F=e[30];let T;e[81]!==a||e[82]!==s?(T=a.hasNextPage&&i.jsx("div",{className:"flex justify-center py-4",children:i.jsx(xe,{type:"button",variant:"outline",size:"sm",disabled:a.isFetchingNextPage,onClick:()=>a.fetchNextPage(),children:a.isFetchingNextPage?i.jsxs(i.Fragment,{children:[i.jsx(ge,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[81]=a,e[82]=s,e[83]=T):T=e[83];let E;e[84]!==T||e[85]!==w||e[86]!==$?(E=i.jsxs("div",{className:w,children:[$,T]}),e[84]=T,e[85]=w,e[86]=$,e[87]=E):E=e[87];let te;e[88]===Symbol.for("react.memo_cache_sentinel")?(te=()=>g(null),e[88]=te):te=e[88];let O;e[89]!==t.id||e[90]!==d?(O=i.jsx(ft,{configId:t.id,item:d,onClose:te}),e[89]=t.id,e[90]=d,e[91]=O):O=e[91];let ie;return e[92]!==N||e[93]!==v||e[94]!==E||e[95]!==O||e[96]!==M||e[97]!==F?(ie=i.jsxs("div",{className:M,children:[F,N,v,E,O]}),e[92]=N,e[93]=v,e[94]=E,e[95]=O,e[96]=M,e[97]=F,e[98]=ie):ie=e[98],ie}function nt(r){return r.items}function je(r){const e=z.c(8),{title:t,description:s}=r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:i.jsx(Be,{size:18,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let o;e[1]!==t?(o=i.jsx("p",{className:"text-sm font-medium",children:t}),e[1]=t,e[2]=o):o=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=n):n=e[4];let c;return e[5]!==o||e[6]!==n?(c=i.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[l,o,n]}),e[5]=o,e[6]=n,e[7]=c):c=e[7],c}function at(r){const e=z.c(34),{item:t,onDelete:s}=r;let l;e[0]!==t.key?(l=He(t.key),e[0]=t.key,e[1]=l):l=e[1];const o=l;let n;e[2]!==t.key?(n=Ke(t.key),e[2]=t.key,e[3]=n):n=e[3];const c=n;let a;e[4]!==c||e[5]!==t.key||e[6]!==t.publicUrl?(a=c?i.jsx("img",{src:t.publicUrl,alt:t.key,loading:"lazy",className:"block h-auto w-full",onError:ct}):i.jsx("div",{className:"flex aspect-square items-center justify-center",children:i.jsx(Oe,{size:28,className:"text-muted-foreground"})}),e[4]=c,e[5]=t.key,e[6]=t.publicUrl,e[7]=a):a=e[7];let m;e[8]!==t.key||e[9]!==t.publicUrl||e[10]!==a?(m=i.jsx("a",{href:t.publicUrl,target:"_blank",rel:"noreferrer",title:t.key,className:"block transition hover:ring-2 hover:ring-inset hover:ring-primary",children:a}),e[8]=t.key,e[9]=t.publicUrl,e[10]=a,e[11]=m):m=e[11];const y=t.key;let p;e[12]!==t.key?(p=be(t.key),e[12]=t.key,e[13]=p):p=e[13];let d;e[14]!==t.key||e[15]!==p?(d=i.jsx("p",{className:"truncate text-xs font-medium",title:y,children:p}),e[14]=t.key,e[15]=p,e[16]=d):d=e[16];let g;e[17]!==t.size?(g=Xe(t.size),e[17]=t.size,e[18]=g):g=e[18];let u;e[19]!==o||e[20]!==g?(u=i.jsxs("p",{className:"text-2xs uppercase text-muted-foreground",children:[o," · ",g]}),e[19]=o,e[20]=g,e[21]=u):u=e[21];let h;e[22]!==d||e[23]!==u?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[d,u]}),e[22]=d,e[23]=u,e[24]=h):h=e[24];let x;e[25]!==t||e[26]!==s?(x=i.jsx(mt,{item:t,onDelete:s}),e[25]=t,e[26]=s,e[27]=x):x=e[27];let f;e[28]!==h||e[29]!==x?(f=i.jsxs("div",{className:"flex items-center gap-1 border-t border-border/60 bg-background px-2 py-1.5",children:[h,x]}),e[28]=h,e[29]=x,e[30]=f):f=e[30];let j;return e[31]!==f||e[32]!==m?(j=i.jsxs("div",{className:"group relative flex flex-col overflow-hidden rounded-lg border border-border/60 bg-muted",children:[m,f]}),e[31]=f,e[32]=m,e[33]=j):j=e[33],j}function ct(r){r.target.style.display="none"}function mt(r){const e=z.c(36),{item:t,onDelete:s}=r,l=ce(),[o,n]=ee.useState(!1);let c;e[0]!==t.publicUrl||e[1]!==l?(c=async function(){try{await navigator.clipboard.writeText(t.publicUrl),n(!0),window.setTimeout(()=>n(!1),1500)}catch{ae.error(l("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=t.publicUrl,e[1]=l,e[2]=c):c=e[2];const a=c;let m;e[3]!==l?(m=l("filePicker.filePickerDialog.assetActions"),e[3]=l,e[4]=m):m=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(Ee,{size:14}),e[5]=y):y=e[5];let p;e[6]!==m?(p=i.jsx(_e,{asChild:!0,children:i.jsx(xe,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":m,children:y})}),e[6]=m,e[7]=p):p=e[7];let d;e[8]!==o?(d=o?i.jsx(ze,{size:14}):i.jsx(Te,{size:14}),e[8]=o,e[9]=d):d=e[9];let g;e[10]!==o||e[11]!==l?(g=l(o?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[10]=o,e[11]=l,e[12]=g):g=e[12];let u;e[13]!==a||e[14]!==d||e[15]!==g?(u=i.jsxs(ue,{onClick:a,children:[d,g]}),e[13]=a,e[14]=d,e[15]=g,e[16]=u):u=e[16];const h=t.publicUrl;let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(Fe,{size:14}),e[17]=x):x=e[17];let f;e[18]!==l?(f=l("filePicker.filePickerDialog.openInNewTab"),e[18]=l,e[19]=f):f=e[19];let j;e[20]!==t.publicUrl||e[21]!==f?(j=i.jsx(ue,{asChild:!0,children:i.jsxs("a",{href:h,target:"_blank",rel:"noreferrer",children:[x,f]})}),e[20]=t.publicUrl,e[21]=f,e[22]=j):j=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Le,{size:14}),e[23]=C):C=e[23];let P;e[24]!==l?(P=l("assets.browser.deleteAction"),e[24]=l,e[25]=P):P=e[25];let k;e[26]!==s||e[27]!==P?(k=i.jsxs(ue,{variant:"destructive",onClick:s,children:[C,P]}),e[26]=s,e[27]=P,e[28]=k):k=e[28];let b;e[29]!==j||e[30]!==k||e[31]!==u?(b=i.jsxs(Ue,{align:"end",children:[u,j,k]}),e[29]=j,e[30]=k,e[31]=u,e[32]=b):b=e[32];let D;return e[33]!==b||e[34]!==p?(D=i.jsxs(Ie,{children:[p,b]}),e[33]=b,e[34]=p,e[35]=D):D=e[35],D}function ft(r){const e=z.c(46),{configId:t,item:s,onClose:l}=r,o=ce(),n=Ze();let c;e[0]!==t||e[1]!==n||e[2]!==s||e[3]!==l||e[4]!==o?(c=async function(){if(s)try{await n.mutateAsync({configId:t,key:s.key}),ae.success(o("assets.browser.deleted")),l()}catch{ae.error(o("assets.browser.deleteFailed"))}},e[0]=t,e[1]=n,e[2]=s,e[3]=l,e[4]=o,e[5]=c):c=e[5];const a=c,m=!!s;let y;e[6]!==l?(y=w=>!w&&l(),e[6]=l,e[7]=y):y=e[7];let p;e[8]!==o?(p=o("assets.browser.deleteConfirmTitle"),e[8]=o,e[9]=p):p=e[9];let d;e[10]!==p?(d=i.jsx(Pe,{children:p}),e[10]=p,e[11]=d):d=e[11];let g;e[12]!==s||e[13]!==o?(g=o("assets.browser.deleteConfirmDescription",{name:s?be(s.key):""}),e[12]=s,e[13]=o,e[14]=g):g=e[14];let u;e[15]!==g?(u=i.jsx(De,{children:g}),e[15]=g,e[16]=u):u=e[16];let h;e[17]!==d||e[18]!==u?(h=i.jsxs(Ne,{children:[d,u]}),e[17]=d,e[18]=u,e[19]=h):h=e[19];const x=n.isPending;let f;e[20]!==o?(f=o("assets.browser.deleteCancel"),e[20]=o,e[21]=f):f=e[21];let j;e[22]!==n.isPending||e[23]!==f?(j=i.jsx(ve,{disabled:x,children:f}),e[22]=n.isPending,e[23]=f,e[24]=j):j=e[24];const C=n.isPending;let P;e[25]!==a?(P=w=>{w.preventDefault(),a()},e[25]=a,e[26]=P):P=e[26];let k;e[27]!==n.isPending?(k=n.isPending?i.jsx(ge,{className:"size-3.5"}):null,e[27]=n.isPending,e[28]=k):k=e[28];let b;e[29]!==o?(b=o("assets.browser.deleteConfirm"),e[29]=o,e[30]=b):b=e[30];let D;e[31]!==n.isPending||e[32]!==P||e[33]!==k||e[34]!==b?(D=i.jsxs(Ce,{variant:"destructive",disabled:C,onClick:P,children:[k,b]}),e[31]=n.isPending,e[32]=P,e[33]=k,e[34]=b,e[35]=D):D=e[35];let S;e[36]!==j||e[37]!==D?(S=i.jsxs(Se,{children:[j,D]}),e[36]=j,e[37]=D,e[38]=S):S=e[38];let N;e[39]!==S||e[40]!==h?(N=i.jsxs(we,{children:[h,S]}),e[39]=S,e[40]=h,e[41]=N):N=e[41];let v;return e[42]!==N||e[43]!==m||e[44]!==y?(v=i.jsx(Ae,{open:m,onOpenChange:y,children:N}),e[42]=N,e[43]=m,e[44]=y,e[45]=v):v=e[45],v}function pt(){const r=z.c(2),e=tt();let t;return r[0]!==e?(t=i.jsx(Me,{tabId:"assets",children:i.jsx(it,{virtualMcpId:e})}),r[0]=e,r[1]=t):t=r[1],t}function tr(){const r=z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx($e.Content,{children:i.jsx(pt,{})}),r[0]=e):e=r[0],e}export{tr as default};
|
|
1
|
+
import{c as z,j as i,b as ce,r as ee,hk as ke,h as ge,B as xe,l as ye,t as ae,aM as Pe,aN as De,aO as Ne,aP as ve,bl as Ce,aQ as Se,aR as we,aS as Ae,V as _e,ai as ze,X as ue,a7 as Fe,Y as Ue,Z as Ie}from"./index-dqTonPuB.js";import{C as $e}from"./index-eXjVYv9z.js";import{A as Me}from"./agent-view-guard-stsCu2yk.js";import{a as Te}from"./Copy01-DhHOI-Q9.js";import{i as Ee}from"./DotsVertical-B-InRCR0.js";import{b as Oe,a as Re}from"./ZoomOut-lxtq8ebL.js";import{a as Be}from"./Image01-DKlCpScV.js";import{s as Le}from"./Trash01-BuZ3631A.js";import{i as he}from"./Upload01-Bo2ttnFV.js";import{S as Ve}from"./search-input-CeTAKge4.js";import{a as qe}from"./repository-binding-0L-NOau4.js";import{u as Ge}from"./use-debounced-value-CgkCbE-q.js";import{a as Qe}from"./use-file-configs-Bdi3Zzvl.js";import{u as We,a as Ye,e as He,i as Ke,b as be,f as Xe,c as Ze}from"./asset-utils-C_AVaAoE.js";import{m as Je}from"./match-site-slug-config-D3fUJ6vX.js";import{r as et}from"./site-slug-DebpOoQq.js";import{b as tt}from"./thread-route-DyeAWeVv.js";import"./use-mobile-0wDKszAH.js";import"./use-sidebar-collapsed-B__PkJPm.js";import"./use-chat-layout-state-SXC1aBSP.js";import"./use-panel-navigate-kG8bT637.js";import"./use-project-scope-DQ4byfJ8.js";import"./thread-intent-DmSTHfJV.js";import"./use-mcp-client-NiHnmnpB.js";import"./auth-CrD9p86I.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg72K5y9.js";import"./task-board-C3TfKsEu.js";import"./schema-BQgw-8fk.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-Di1pcjRb.js";import"./AlertCircle-C8rwN6lq.js";import"./Tool01-BxbHHa0T.js";import"./ArrowUp-DOqWtjlR.js";import"./ArrowLeft-DA6W7NwW.js";import"./LinkBroken01-CAJodWFv.js";import"./ShoppingBag01-6U3SUMRX.js";import"./Building02-Do3lJJG5.js";import"./CheckCircle-BC_4MefA.js";import"./ChevronUp-BnMEqZ-7.js";import"./ChevronSelectorVertical-DmnbHDqu.js";import"./UserSquare-DCu-qtdW.js";import"./CreditCard01-Dw2OjkWU.js";import"./Globe04-CtMJQj21.js";import"./SwitchHorizontal01-CxSk-wEa.js";import"./Key01-DBwoRjUY.js";import"./Link01-BBqxtXMI.js";import"./Minus-DiHVm4BN.js";import"./Monitor01-BhbrGCAs.js";import"./Sun-DVWc_O6K.js";import"./Play-BcZ_GeUq.js";import"./Plus-c2_sBI5f.js";import"./SearchMd-CbbZJW9W.js";import"./Users01-BC6qYZnG.js";import"./XClose-DVoCm2qG.js";import"./tooltip-CkhWwifD.js";import"./index-YTZffZ6U.js";import"./toolbar-icon-button-BTNIHkHm.js";import"./shell-layout-Dhack47g.js";import"./use-clock-tick-BzkvK9xF.js";import"./command-sLy5v5Id.js";import"./index-Bi8Dcq6x.js";import"./integration-icon-CadbREtM.js";import"./project-icon-Fuoy9xbW.js";import"./new-project-dialog-CvrV-V2w.js";import"./label-B9vYlzdO.js";import"./repository-import-picker-DepdN5-B.js";import"./use-navigate-to-agent-CHgAma_A.js";import"./repository-picker-Dva3lcTN.js";import"./useInfiniteQuery-BqRsoJ1h.js";import"./infiniteQueryObserver-Dn-uClrW.js";import"./collection-search-DyeQXfCG.js";import"./use-organization-settings-Bj3c26BX.js";import"./required-auth-layout-CF04eiX-.js";import"./autosend-DXH6RsEM.js";import"./use-org-sso-4bOeKtTK.js";import"./sheet-CInqTfvf.js";import"./resizable-l4I_T5Kn.js";import"./use-main-panel-tabs-DZlakfZ7.js";import"./use-connection-CgZBwmOC.js";import"./use-mcp-tools-DvShHfsn.js";import"./types-BBlCCKBH.js";import"./utils-CVEq3hMx.js";import"./experiments-tab-choice-DxQftboi.js";import"./index-B25kGSP3.js";import"./chat-context-QAdvSmpg.js";import"./use-decopilot-events-BNl6vZT3.js";import"./use-ai-providers-BmOzsYDN.js";import"./location-V0VwTJTt.js";import"./tool-namespace-AEMn8zEL.js";import"./drawer-DUy0at62.js";import"./use-mcp-prompts-BpP8rPhI.js";import"./usage-stats-Bnq-bwdD.js";import"./form-C3OwrZbQ.js";import"./markdown-BzS1xvA6.js";import"./use-copy-B6jA1hKb.js";import"./input-ziouS0a7.js";import"./icon-button-rp_0Im0Y.js";import"./file-type-icon-CJ5Cx-FH.js";import"./chat-draft-JWz-JS1X.js";import"./use-session-runtime-CJtbf6W0.js";import"./select-BBgfhGwn.js";import"./index-BdQq_4o_.js";import"./tabs-DPXakTnY.js";import"./active-indicator-CCMhAsc_.js";import"./use-deco-credits-CYakt-79.js";import"./toggle-group-CagcNHou.js";import"./use-open-billing-url-D4G9wMSG.js";import"./index-CwzAm9wC.js";import"./checkbox-6wv08vv8.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover--NiW4ds1.js";import"./input-DsO-XKG3.js";import"./suggestion-BJa7UCMt.js";import"./use-org-fs-CgDaP3QS.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-DIAXEFng.js";import"./plan-ladder-Dhy2mlD-.js";import"./add-connection-dialog-Cr3ZfKtA.js";import"./extract-connection-data-C4s2gh-W.js";import"./metadata-D72DunRR.js";import"./connection-LyoIrQvL.js";import"./url-slug-B_Yjxy4g.js";import"./connection-card-C90049z-.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Dg_yVkeX.js";import"./schema-4_stGcYx.js";import"./connection-form-helpers-BzLwdyrN.js";import"./authenticate-and-persist-oauth-C8UpgkvH.js";import"./mcp-oauth-BiBbnx8b.js";import"./mcp-oauth-CzTstmr6.js";import"./collection-tabs-D4LYnWMJ.js";import"./badge-DNQVmTxF.js";import"./use-infinite-scroll-Ce1Cyz0w.js";import"./useSuspenseInfiniteQuery-CXNJCW6q.js";import"./use-task-board-events-C6pDc0YD.js";import"./pair-CqDeWXf6.js";import"./collapsible-C8jYd33t.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Dsd5J6Kh.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DvCpSxoC.js";import"./use-sandbox-events-KLt2azet.js";import"./sandbox-url-D3mC8qhT.js";import"./resolve-tab-icon-DEw9_uRC.js";import"./use-task-metadata-CIhHGtUG.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-BixTQ7MO.js";import"./virtual-mcp-BTO3QMrV.js";function it(r){const e=z.c(6),{virtualMcpId:t}=r,s=qe(t),l=Qe();let o;e[0]!==l||e[1]!==s?(o=Je(l,et(s)),e[0]=l,e[1]=s,e[2]=o):o=e[2];const n=o;if(!n){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(st,{}),e[3]=a):a=e[3],a}let c;return e[4]!==n?(c=i.jsx(ot,{config:n}),e[4]=n,e[5]=c):c=e[5],c}function st(){const r=z.c(12),e=ce();let t;r[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex size-12 items-center justify-center rounded-full bg-muted",children:i.jsx(Re,{size:20,className:"text-muted-foreground"})}),r[0]=t):t=r[0];let s;r[1]!==e?(s=e("assets.browser.noBucketTitle"),r[1]=e,r[2]=s):s=r[2];let l;r[3]!==s?(l=i.jsx("p",{className:"text-sm font-medium",children:s}),r[3]=s,r[4]=l):l=r[4];let o;r[5]!==e?(o=e("assets.browser.noBucketDescription"),r[5]=e,r[6]=o):o=r[6];let n;r[7]!==o?(n=i.jsx("p",{className:"mt-1 max-w-sm text-xs text-muted-foreground",children:o}),r[7]=o,r[8]=n):n=r[8];let c;return r[9]!==l||r[10]!==n?(c=i.jsxs("div",{className:"flex h-full min-h-0 flex-col items-center justify-center gap-3 p-10 text-center",children:[t,i.jsxs("div",{children:[l,n]})]}),r[9]=l,r[10]=n,r[11]=c):c=r[11],c}function rt(r){return r<0||r<640?2:r<768?3:r<1024?4:5}function lt(r,e){const t=Array.from({length:e},()=>[]);return r.forEach((s,l)=>t[l%e].push(s)),t}function ot(r){const e=z.c(99),{config:t}=r,s=ce(),[l,o]=ee.useState(""),n=Ge(l,300);let c;e[0]!==t.id||e[1]!==n?(c={configId:t.id,search:n},e[0]=t.id,e[1]=n,e[2]=c):c=e[2];const a=We(c),m=Ye(),[y,p]=ee.useState(!1),[d,g]=ee.useState(null),u=ee.useRef(null);let h;e[3]!==t.id||e[4]!==a||e[5]!==s||e[6]!==m?(h=async function(A){if(!A)return;const J=Array.from(A);if(J.length===0)return;const U=[];for(const R of J)try{await m.mutateAsync({configId:t.id,file:R})}catch(I){const _=I;U.push(`${R.name} (${_ instanceof Error?_.message:"upload failed"})`)}await a.refetch(),U.length>0&&ae.error(U.length===J.length?s("filePicker.filePickerDialog.uploadFailedAll",{errors:U.join("; ")}):s("filePicker.filePickerDialog.uploadFailedSome",{errors:U.join("; ")}))},e[3]=t.id,e[4]=a,e[5]=s,e[6]=m,e[7]=h):h=e[7];const x=h;let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=function(A){A.preventDefault(),p(!0)},e[8]=f):f=e[8];const j=f;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=function(){p(!1)},e[9]=C):C=e[9];const P=C;let k;e[10]!==x?(k=function(A){A.preventDefault(),A.stopPropagation(),p(!1),x(A.dataTransfer.files)},e[10]=x,e[11]=k):k=e[11];const b=k,[D,S]=ke();let N,v,w,$,M,F;if(e[12]!==t.name||e[13]!==n||e[14]!==S||e[15]!==D||e[16]!==x||e[17]!==y||e[18]!==a.data?.pages||e[19]!==a.isFetching||e[20]!==a.isFetchingNextPage||e[21]!==b||e[22]!==l||e[23]!==s||e[24]!==m.isPending){const A=(a.data?.pages??[]).flatMap(nt),J=lt(A,rt(D)),U=n.trim(),R=l!==n||a.isFetching&&!a.isFetchingNextPage;M="flex h-full min-h-0 flex-col gap-3 p-4";let I;e[31]!==s?(I=s("assets.browser.title"),e[31]=s,e[32]=I):I=e[32];let _;e[33]!==I?(_=i.jsx("h2",{className:"text-sm font-semibold",children:I}),e[33]=I,e[34]=_):_=e[34];let B;e[35]!==t.name||e[36]!==s?(B=s("assets.browser.bucketLabel",{name:t.name}),e[35]=t.name,e[36]=s,e[37]=B):B=e[37];let L;e[38]!==B?(L=i.jsx("p",{className:"truncate text-xs text-muted-foreground",children:B}),e[38]=B,e[39]=L):L=e[39];let V;e[40]!==_||e[41]!==L?(V=i.jsxs("div",{className:"min-w-0",children:[_,L]}),e[40]=_,e[41]=L,e[42]=V):V=e[42];let re;e[43]===Symbol.for("react.memo_cache_sentinel")?(re=()=>u.current?.click(),e[43]=re):re=e[43];let q;e[44]!==m.isPending?(q=m.isPending?i.jsx(ge,{className:"size-3.5"}):i.jsx(he,{size:14}),e[44]=m.isPending,e[45]=q):q=e[45];let G;e[46]!==s||e[47]!==m.isPending?(G=m.isPending?s("filePicker.filePickerDialog.uploading"):s("filePicker.filePickerDialog.dropFilesOrClick"),e[46]=s,e[47]=m.isPending,e[48]=G):G=e[48];let Q;e[49]!==q||e[50]!==G||e[51]!==m.isPending?(Q=i.jsxs(xe,{type:"button",size:"sm",disabled:m.isPending,onClick:re,children:[q,G]}),e[49]=q,e[50]=G,e[51]=m.isPending,e[52]=Q):Q=e[52];let W;e[53]!==x?(W=i.jsx("input",{ref:u,type:"file",multiple:!0,className:"hidden",onChange:ne=>{const pe=Array.from(ne.target.files??[]);ne.target.value="",x(pe)}}),e[53]=x,e[54]=W):W=e[54],e[55]!==V||e[56]!==Q||e[57]!==W?(F=i.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-3",children:[V,Q,W]}),e[55]=V,e[56]=Q,e[57]=W,e[58]=F):F=e[58];let Y;e[59]!==s?(Y=s("filePicker.filePickerDialog.searchFilesPlaceholder"),e[59]=s,e[60]=Y):Y=e[60],e[61]!==R||e[62]!==l||e[63]!==Y?(N=i.jsx(Ve,{value:l,onChange:o,isSearching:R,placeholder:Y,className:"shrink-0"}),e[61]=R,e[62]=l,e[63]=Y,e[64]=N):N=e[64];let le;e[65]===Symbol.for("react.memo_cache_sentinel")?(le=()=>u.current?.click(),e[65]=le):le=e[65];const me=y&&"border-primary bg-primary/5",fe=m.isPending&&"pointer-events-none opacity-60";let H;e[66]!==me||e[67]!==fe?(H=ye("flex shrink-0 flex-col items-center justify-center gap-1 rounded-xl border border-dashed border-border/60 p-4 text-center transition-colors",me,fe),e[66]=me,e[67]=fe,e[68]=H):H=e[68];let oe;e[69]===Symbol.for("react.memo_cache_sentinel")?(oe=i.jsx(he,{size:16,className:"text-muted-foreground"}),e[69]=oe):oe=e[69];let K;e[70]!==s?(K=s("filePicker.filePickerDialog.dropFilesOrClick"),e[70]=s,e[71]=K):K=e[71];let X;e[72]!==s?(X=s("filePicker.filePickerDialog.uploadSizeLimit"),e[72]=s,e[73]=X):X=e[73];let Z;e[74]!==K||e[75]!==X?(Z=i.jsxs("p",{className:"text-xs text-muted-foreground",children:[K," ",X]}),e[74]=K,e[75]=X,e[76]=Z):Z=e[76],e[77]!==b||e[78]!==H||e[79]!==Z?(v=i.jsxs("button",{type:"button",onClick:le,onDragOver:j,onDragLeave:P,onDrop:b,className:H,children:[oe,Z]}),e[77]=b,e[78]=H,e[79]=Z,e[80]=v):v=e[80],w="min-h-0 flex-1 overflow-y-auto pr-1",$=A.length===0?U?i.jsx(je,{title:s("filePicker.filePickerDialog.noMatches",{query:U}),description:s("filePicker.filePickerDialog.tryDifferentSearchOrLoadMore")}):i.jsx(je,{title:s("filePicker.filePickerDialog.noFilesYet"),description:s("filePicker.filePickerDialog.dropFileToGetStarted")}):i.jsx("div",{ref:S,className:"flex items-start gap-3",children:J.map((ne,pe)=>i.jsx("div",{className:"flex min-w-0 flex-1 flex-col gap-3",children:ne.map(de=>i.jsx(at,{item:de,onDelete:()=>g(de)},de.key))},pe))}),e[12]=t.name,e[13]=n,e[14]=S,e[15]=D,e[16]=x,e[17]=y,e[18]=a.data?.pages,e[19]=a.isFetching,e[20]=a.isFetchingNextPage,e[21]=b,e[22]=l,e[23]=s,e[24]=m.isPending,e[25]=N,e[26]=v,e[27]=w,e[28]=$,e[29]=M,e[30]=F}else N=e[25],v=e[26],w=e[27],$=e[28],M=e[29],F=e[30];let T;e[81]!==a||e[82]!==s?(T=a.hasNextPage&&i.jsx("div",{className:"flex justify-center py-4",children:i.jsx(xe,{type:"button",variant:"outline",size:"sm",disabled:a.isFetchingNextPage,onClick:()=>a.fetchNextPage(),children:a.isFetchingNextPage?i.jsxs(i.Fragment,{children:[i.jsx(ge,{className:"size-3.5"}),s("filePicker.filePickerDialog.loading")]}):s("filePicker.filePickerDialog.loadMore")})}),e[81]=a,e[82]=s,e[83]=T):T=e[83];let E;e[84]!==T||e[85]!==w||e[86]!==$?(E=i.jsxs("div",{className:w,children:[$,T]}),e[84]=T,e[85]=w,e[86]=$,e[87]=E):E=e[87];let te;e[88]===Symbol.for("react.memo_cache_sentinel")?(te=()=>g(null),e[88]=te):te=e[88];let O;e[89]!==t.id||e[90]!==d?(O=i.jsx(ft,{configId:t.id,item:d,onClose:te}),e[89]=t.id,e[90]=d,e[91]=O):O=e[91];let ie;return e[92]!==N||e[93]!==v||e[94]!==E||e[95]!==O||e[96]!==M||e[97]!==F?(ie=i.jsxs("div",{className:M,children:[F,N,v,E,O]}),e[92]=N,e[93]=v,e[94]=E,e[95]=O,e[96]=M,e[97]=F,e[98]=ie):ie=e[98],ie}function nt(r){return r.items}function je(r){const e=z.c(8),{title:t,description:s}=r;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:i.jsx(Be,{size:18,className:"text-muted-foreground"})}),e[0]=l):l=e[0];let o;e[1]!==t?(o=i.jsx("p",{className:"text-sm font-medium",children:t}),e[1]=t,e[2]=o):o=e[2];let n;e[3]!==s?(n=i.jsx("p",{className:"text-xs text-muted-foreground",children:s}),e[3]=s,e[4]=n):n=e[4];let c;return e[5]!==o||e[6]!==n?(c=i.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[l,o,n]}),e[5]=o,e[6]=n,e[7]=c):c=e[7],c}function at(r){const e=z.c(34),{item:t,onDelete:s}=r;let l;e[0]!==t.key?(l=He(t.key),e[0]=t.key,e[1]=l):l=e[1];const o=l;let n;e[2]!==t.key?(n=Ke(t.key),e[2]=t.key,e[3]=n):n=e[3];const c=n;let a;e[4]!==c||e[5]!==t.key||e[6]!==t.publicUrl?(a=c?i.jsx("img",{src:t.publicUrl,alt:t.key,loading:"lazy",className:"block h-auto w-full",onError:ct}):i.jsx("div",{className:"flex aspect-square items-center justify-center",children:i.jsx(Oe,{size:28,className:"text-muted-foreground"})}),e[4]=c,e[5]=t.key,e[6]=t.publicUrl,e[7]=a):a=e[7];let m;e[8]!==t.key||e[9]!==t.publicUrl||e[10]!==a?(m=i.jsx("a",{href:t.publicUrl,target:"_blank",rel:"noreferrer",title:t.key,className:"block transition hover:ring-2 hover:ring-inset hover:ring-primary",children:a}),e[8]=t.key,e[9]=t.publicUrl,e[10]=a,e[11]=m):m=e[11];const y=t.key;let p;e[12]!==t.key?(p=be(t.key),e[12]=t.key,e[13]=p):p=e[13];let d;e[14]!==t.key||e[15]!==p?(d=i.jsx("p",{className:"truncate text-xs font-medium",title:y,children:p}),e[14]=t.key,e[15]=p,e[16]=d):d=e[16];let g;e[17]!==t.size?(g=Xe(t.size),e[17]=t.size,e[18]=g):g=e[18];let u;e[19]!==o||e[20]!==g?(u=i.jsxs("p",{className:"text-2xs uppercase text-muted-foreground",children:[o," · ",g]}),e[19]=o,e[20]=g,e[21]=u):u=e[21];let h;e[22]!==d||e[23]!==u?(h=i.jsxs("div",{className:"min-w-0 flex-1",children:[d,u]}),e[22]=d,e[23]=u,e[24]=h):h=e[24];let x;e[25]!==t||e[26]!==s?(x=i.jsx(mt,{item:t,onDelete:s}),e[25]=t,e[26]=s,e[27]=x):x=e[27];let f;e[28]!==h||e[29]!==x?(f=i.jsxs("div",{className:"flex items-center gap-1 border-t border-border/60 bg-background px-2 py-1.5",children:[h,x]}),e[28]=h,e[29]=x,e[30]=f):f=e[30];let j;return e[31]!==f||e[32]!==m?(j=i.jsxs("div",{className:"group relative flex flex-col overflow-hidden rounded-lg border border-border/60 bg-muted",children:[m,f]}),e[31]=f,e[32]=m,e[33]=j):j=e[33],j}function ct(r){r.target.style.display="none"}function mt(r){const e=z.c(36),{item:t,onDelete:s}=r,l=ce(),[o,n]=ee.useState(!1);let c;e[0]!==t.publicUrl||e[1]!==l?(c=async function(){try{await navigator.clipboard.writeText(t.publicUrl),n(!0),window.setTimeout(()=>n(!1),1500)}catch{ae.error(l("filePicker.filePickerDialog.failedToCopyUrl"))}},e[0]=t.publicUrl,e[1]=l,e[2]=c):c=e[2];const a=c;let m;e[3]!==l?(m=l("filePicker.filePickerDialog.assetActions"),e[3]=l,e[4]=m):m=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx(Ee,{size:14}),e[5]=y):y=e[5];let p;e[6]!==m?(p=i.jsx(_e,{asChild:!0,children:i.jsx(xe,{type:"button",variant:"ghost",size:"icon-sm",className:"shrink-0","aria-label":m,children:y})}),e[6]=m,e[7]=p):p=e[7];let d;e[8]!==o?(d=o?i.jsx(ze,{size:14}):i.jsx(Te,{size:14}),e[8]=o,e[9]=d):d=e[9];let g;e[10]!==o||e[11]!==l?(g=l(o?"filePicker.filePickerDialog.copied":"filePicker.filePickerDialog.copyUrl"),e[10]=o,e[11]=l,e[12]=g):g=e[12];let u;e[13]!==a||e[14]!==d||e[15]!==g?(u=i.jsxs(ue,{onClick:a,children:[d,g]}),e[13]=a,e[14]=d,e[15]=g,e[16]=u):u=e[16];const h=t.publicUrl;let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=i.jsx(Fe,{size:14}),e[17]=x):x=e[17];let f;e[18]!==l?(f=l("filePicker.filePickerDialog.openInNewTab"),e[18]=l,e[19]=f):f=e[19];let j;e[20]!==t.publicUrl||e[21]!==f?(j=i.jsx(ue,{asChild:!0,children:i.jsxs("a",{href:h,target:"_blank",rel:"noreferrer",children:[x,f]})}),e[20]=t.publicUrl,e[21]=f,e[22]=j):j=e[22];let C;e[23]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Le,{size:14}),e[23]=C):C=e[23];let P;e[24]!==l?(P=l("assets.browser.deleteAction"),e[24]=l,e[25]=P):P=e[25];let k;e[26]!==s||e[27]!==P?(k=i.jsxs(ue,{variant:"destructive",onClick:s,children:[C,P]}),e[26]=s,e[27]=P,e[28]=k):k=e[28];let b;e[29]!==j||e[30]!==k||e[31]!==u?(b=i.jsxs(Ue,{align:"end",children:[u,j,k]}),e[29]=j,e[30]=k,e[31]=u,e[32]=b):b=e[32];let D;return e[33]!==b||e[34]!==p?(D=i.jsxs(Ie,{children:[p,b]}),e[33]=b,e[34]=p,e[35]=D):D=e[35],D}function ft(r){const e=z.c(46),{configId:t,item:s,onClose:l}=r,o=ce(),n=Ze();let c;e[0]!==t||e[1]!==n||e[2]!==s||e[3]!==l||e[4]!==o?(c=async function(){if(s)try{await n.mutateAsync({configId:t,key:s.key}),ae.success(o("assets.browser.deleted")),l()}catch{ae.error(o("assets.browser.deleteFailed"))}},e[0]=t,e[1]=n,e[2]=s,e[3]=l,e[4]=o,e[5]=c):c=e[5];const a=c,m=!!s;let y;e[6]!==l?(y=w=>!w&&l(),e[6]=l,e[7]=y):y=e[7];let p;e[8]!==o?(p=o("assets.browser.deleteConfirmTitle"),e[8]=o,e[9]=p):p=e[9];let d;e[10]!==p?(d=i.jsx(Pe,{children:p}),e[10]=p,e[11]=d):d=e[11];let g;e[12]!==s||e[13]!==o?(g=o("assets.browser.deleteConfirmDescription",{name:s?be(s.key):""}),e[12]=s,e[13]=o,e[14]=g):g=e[14];let u;e[15]!==g?(u=i.jsx(De,{children:g}),e[15]=g,e[16]=u):u=e[16];let h;e[17]!==d||e[18]!==u?(h=i.jsxs(Ne,{children:[d,u]}),e[17]=d,e[18]=u,e[19]=h):h=e[19];const x=n.isPending;let f;e[20]!==o?(f=o("assets.browser.deleteCancel"),e[20]=o,e[21]=f):f=e[21];let j;e[22]!==n.isPending||e[23]!==f?(j=i.jsx(ve,{disabled:x,children:f}),e[22]=n.isPending,e[23]=f,e[24]=j):j=e[24];const C=n.isPending;let P;e[25]!==a?(P=w=>{w.preventDefault(),a()},e[25]=a,e[26]=P):P=e[26];let k;e[27]!==n.isPending?(k=n.isPending?i.jsx(ge,{className:"size-3.5"}):null,e[27]=n.isPending,e[28]=k):k=e[28];let b;e[29]!==o?(b=o("assets.browser.deleteConfirm"),e[29]=o,e[30]=b):b=e[30];let D;e[31]!==n.isPending||e[32]!==P||e[33]!==k||e[34]!==b?(D=i.jsxs(Ce,{variant:"destructive",disabled:C,onClick:P,children:[k,b]}),e[31]=n.isPending,e[32]=P,e[33]=k,e[34]=b,e[35]=D):D=e[35];let S;e[36]!==j||e[37]!==D?(S=i.jsxs(Se,{children:[j,D]}),e[36]=j,e[37]=D,e[38]=S):S=e[38];let N;e[39]!==S||e[40]!==h?(N=i.jsxs(we,{children:[h,S]}),e[39]=S,e[40]=h,e[41]=N):N=e[41];let v;return e[42]!==N||e[43]!==m||e[44]!==y?(v=i.jsx(Ae,{open:m,onOpenChange:y,children:N}),e[42]=N,e[43]=m,e[44]=y,e[45]=v):v=e[45],v}function pt(){const r=z.c(2),e=tt();let t;return r[0]!==e?(t=i.jsx(Me,{tabId:"assets",children:i.jsx(it,{virtualMcpId:e})}),r[0]=e,r[1]=t):t=r[1],t}function tr(){const r=z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx($e.Content,{children:i.jsx(pt,{})}),r[0]=e):e=r[0],e}export{tr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et,v as tt,w as st,x as ot,aY as at,y as nt,t as X,bA as es,Z as ts,V as ss,Y as os,aw as as,au as ns,av as is,X as Ee,b8 as rs,h as Le,aM as pt,aN as xt,aO as gt,aP as ht,bl as jt,aQ as yt,aR as bt,aS as vt,C as Ke,aJ as ls,c5 as Ct,I as Nt,c6 as cs,ao as ds,b2 as Ze,n as Xe,f as ms}from"./index-CZa3eyGb.js";import{C as us}from"./index-D5GK2hYV.js";import{b as it,P as fs,a as ps,a6 as xs,k as St,ax as gs,X as kt,ay as hs,f as js,W as Me,az as zt}from"./agent-icon-D9Dw0iKh.js";import{n as Tt}from"./ShoppingBag01-CIHcZyoe.js";import{t as rt}from"./ChevronUp-bhjMH6tk.js";import{e as ys}from"./UserSquare-C3P5-DPf.js";import{d as lt,b as Ot,t as Et}from"./Tool01-DZBBNle2.js";import{a as bs}from"./Image01-Ca2zoOmL.js";import{i as vs}from"./SearchMd-B3lyjcge.js";import{B as Kt}from"./badge-CXzZRklK.js";import{C as Ft}from"./checkbox-B1NhUIDG.js";import{S as ct}from"./switch-Ba2Gsd2l.js";import{a as Mt,b as Rt,P as Lt}from"./popover-BLArxJjU.js";import{C as Cs,a as wt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-DHvjfMO5.js";import{g as ws,s as Ds}from"./tool-namespace-BCj-Y0g5.js";import{u as dt}from"./use-connection-C6xnl_pH.js";import{u as _s}from"./use-mcp-client-CgMd9iAw.js";import{u as Is}from"./use-mcp-tools-dRnQL8sk.js";import{I as Ps}from"./integration-icon-Dg-0enaK.js";import{M as As}from"./select-model-Cmt1TH6i.js";import{u as $s}from"./use-ai-providers-ZqKycOYQ.js";import{U as zs,b as Os}from"./build-improve-prompt-doc-BuwT-s1U.js";import{a as ve,c as Es,d as Ks}from"./use-automations-D3-t6dDi.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-B-EalrGD.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-IxpT7xWi.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-CzDCGEIi.js";import{a as Js}from"./shell-layout-CNGrbelx.js";import{i as Vt}from"./ArrowLeft-D5rLbzEv.js";import{i as Xs}from"./ArrowUp-D5ujBFbU.js";import{s as Ys}from"./Trash01-DAL2eWYn.js";import{s as mt}from"./XClose-B7VCNh_p.js";import{u as Dt}from"./use-debounced-autosave-DMiQvxW8.js";import{T as Qs,a as Zs}from"./input-UflMOkm2.js";import{u as qs,a as eo,J as Ut}from"./jira-icon-LHSQ0THI.js";import{s as to}from"./Plus-cZACl5Bj.js";import{i as ut}from"./ZoomOut-I9ktV8DJ.js";import{l as We,H as so}from"./config-Tv6nMoGu.js";import{C as oo}from"./task-board-BCtRCz9S.js";import{M as Wt}from"./multi-select-BXPlQfny.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-Dh0RDXSe.js";import{c as ao,a as no,T as _t}from"./tabs-C46_2gJf.js";import{a as Ye}from"./Copy01-BQVKjs--.js";import{MonacoCodeEditor as io}from"./monaco-editor-hax50RkV.js";import{A as ro}from"./automation-runs-B9CF82zY.js";import{C as lo}from"./collection-tabs-BGV0tagg.js";import{a as co}from"./use-panel-navigate-zL6feX1_.js";import"./use-mobile-CmqrzeQ2.js";import"./use-sidebar-collapsed-50yzGJzV.js";import"./use-chat-layout-state-9bVxCYem.js";import"./thread-route-D-HTU4ms.js";import"./thread-intent-BAvAvKIG.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BvCNV0KD.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-brf17qwF.js";import"./sheet-BeB7fiX7.js";import"./resizable-WLl3kXXs.js";import"./use-project-scope-DtQCf5X8.js";import"./repository-binding-Kf_PGfSt.js";import"./AlertCircle-X-2ynYTr.js";import"./LinkBroken01-DbRdGmca.js";import"./Building02-CmwS_4Zd.js";import"./CheckCircle-K7QKF0ga.js";import"./ChevronSelectorVertical-8Zglhuwj.js";import"./CreditCard01-DLuzN9Da.js";import"./DotsVertical-D0yivq6N.js";import"./Globe04-Do87jSl8.js";import"./SwitchHorizontal01-C4b3q3_P.js";import"./Key01-B22TaZal.js";import"./Link01-CKgU9XrQ.js";import"./Minus-DbFMOQp2.js";import"./Monitor01-CfX8nvtP.js";import"./Sun-BQHZ8KXH.js";import"./Play-gY_w5wGM.js";import"./Upload01-3A7TgOQk.js";import"./Users01-CbJgTvJT.js";import"./index-5Rxgh8df.js";import"./auth-BZRl-fvJ.js";import"./drawer-C_HOpx0y.js";import"./index-C-AP-JX2.js";import"./ai-providers-logos-DD3qZ33J.js";import"./autosend-Lp9Ownww.js";import"./use-decopilot-events-C6Ht-NxL.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-y-0WXno1.js";import"./schema-DzkQww7V.js";import"./index-CJkX47-N.js";import"./use-clock-tick-BM5p8P79.js";import"./project-icon-PZVlAu2D.js";import"./new-project-dialog-Dw5AGC0_.js";import"./label-D_y7huPi.js";import"./repository-import-picker-DoXIwk7w.js";import"./use-navigate-to-agent-BxC330Nu.js";import"./repository-picker-Ck8gOK4_.js";import"./useInfiniteQuery-BLBwQpXr.js";import"./infiniteQueryObserver-Bj1XK-s-.js";import"./collection-search-4jrHPH5z.js";import"./use-debounced-value-DE8_aoyE.js";import"./required-auth-layout-Cex5NCBT.js";import"./use-org-sso-BjyMvUUZ.js";import"./suggestion-5McGPh6e.js";import"./usage-stats-B-bDSRFu.js";import"./form-sdJe6ZVI.js";import"./utils-CVEq3hMx.js";import"./markdown-DRSNNxww.js";import"./use-copy-BkKCeyGC.js";import"./use-mcp-prompts-QvvUKN0H.js";import"./use-org-fs-CBQNhgrx.js";import"./core.esm-9HSn5uPZ.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-BdrieXEx.js";import"./table-up4JHBvu.js";import"./empty-state-Cmr3S21S.js";import"./use-infinite-scroll-DUZWngnl.js";import"./task-status-CSuoeMCO.js";import"./thread-sheet-body-DaYQzSu-.js";import"./useSuspenseInfiniteQuery-Dgg4wUTA.js";import"./pair-DdbYjyQ3.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-kU5GlIYH.js";import"./types-BEPRfygK.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DQFZK-8V.js";import"./file-type-icon-DBRx3EE8.js";const Qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Et},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=q.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=Qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=Qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=Qe[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:At("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=q.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(As,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Zt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:Ot},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=q.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function Pt(r){const e=q.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(Ps,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=q.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,P;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Y=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const O=ws(I._meta)??"__other__",Z=Ds(I.name,O==="__other__"?void 0:O),A=I.title,xe=A&&A!==I.name?A:go(Z);H.has(O)||H.set(O,{clientId:O,conn:Y.get(O),tools:[]}),H.get(O).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),z=I=>a(J.every(O=>I.has(O))?null:[...I]),ae=I=>{const O=new Set(V);O.has(I)?O.delete(I):O.add(I),z(O)},ne=(I,O)=>{const Z=new Set(V);for(const A of I)O?Z.add(A):Z.delete(A);z(Z)};y=Lt,P=o,v=j;let Q;e[26]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Q):Q=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let E;e[49]!==a?(E=()=>a([]),e[49]=a,e[50]=E):E=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==E||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:E,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=E,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const O=I.tools.map(bo),Z=O.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Z,total:O.length,onToggle:()=>ne(O,Z!==O.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:i(A.titleKey),description:i(A.descriptionKey),leading:t.jsx(A.icon,{size:16,className:"text-muted-foreground"})},A.name))},I.key)}),W.map(I=>{const O=I.tools.map(yo),Z=O.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Z,total:O.length,onToggle:()=>ne(O,Z!==O.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:A.display,description:A.description},A.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=P}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],P=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==P?(F=t.jsxs(y,{open:P,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=P,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>qe.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Po({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:At("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Ao=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Ao(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function zo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Po,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
|
|
1
|
+
import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et,v as tt,w as st,x as ot,aY as at,y as nt,t as X,bA as es,Z as ts,V as ss,Y as os,aw as as,au as ns,av as is,X as Ee,b8 as rs,h as Le,aM as pt,aN as xt,aO as gt,aP as ht,bl as jt,aQ as yt,aR as bt,aS as vt,C as Ke,aJ as ls,c5 as Ct,I as Nt,c6 as cs,ao as ds,b2 as Ze,n as Xe,f as ms}from"./index-dqTonPuB.js";import{C as us}from"./index-eXjVYv9z.js";import{b as it,P as fs,a as ps,a4 as xs,k as St,av as gs,V as kt,aw as hs,f as js,U as Me,ax as Ot}from"./agent-icon-Di1pcjRb.js";import{n as Tt}from"./ShoppingBag01-6U3SUMRX.js";import{t as rt}from"./ChevronUp-BnMEqZ-7.js";import{e as ys}from"./UserSquare-DCu-qtdW.js";import{d as lt,b as zt,t as Et}from"./Tool01-BxbHHa0T.js";import{a as bs}from"./Image01-DKlCpScV.js";import{i as vs}from"./SearchMd-CbbZJW9W.js";import{B as Kt}from"./badge-DNQVmTxF.js";import{C as Ft}from"./checkbox-6wv08vv8.js";import{S as ct}from"./switch-BuvFN30Y.js";import{a as Mt,b as Rt,P as Lt}from"./popover--NiW4ds1.js";import{C as Cs,a as wt,b as Ns,d as Ss,e as ks,c as Ts}from"./command-sLy5v5Id.js";import{g as ws,s as Ds}from"./tool-namespace-AEMn8zEL.js";import{u as dt}from"./use-connection-CgZBwmOC.js";import{u as _s}from"./use-mcp-client-NiHnmnpB.js";import{u as Is}from"./use-mcp-tools-DvShHfsn.js";import{I as Ps}from"./integration-icon-CadbREtM.js";import{M as As}from"./select-model-CWJxxZcQ.js";import{u as $s}from"./use-ai-providers-BmOzsYDN.js";import{U as Os,b as zs}from"./build-improve-prompt-doc-DDR2Aibs.js";import{a as ve,c as Es,d as Ks}from"./use-automations-HMhC6FE5.js";import{c as Fs,b as Ms,h as Rs,t as Ls}from"./chat-context-QAdvSmpg.js";import{b as Vs,C as Us,a as Ws}from"./collapsible-C8jYd33t.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-CkhWwifD.js";import{a as Js}from"./shell-layout-Dhack47g.js";import{i as Vt}from"./ArrowLeft-DA6W7NwW.js";import{i as Xs}from"./ArrowUp-DOqWtjlR.js";import{s as Ys}from"./Trash01-BuZ3631A.js";import{s as mt}from"./XClose-DVoCm2qG.js";import{u as Dt}from"./use-debounced-autosave-V77TWUAY.js";import{T as Qs,a as Zs}from"./input-DsO-XKG3.js";import{u as qs,a as eo,J as Ut}from"./jira-icon-7MgMLks3.js";import{s as to}from"./Plus-c2_sBI5f.js";import{i as ut}from"./ZoomOut-lxtq8ebL.js";import{l as We,H as so}from"./config-Cbcgp9UG.js";import{C as oo}from"./task-board-C3TfKsEu.js";import{M as Wt}from"./multi-select-BRyAnutb.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-BBgfhGwn.js";import{c as ao,a as no,T as _t}from"./tabs-DPXakTnY.js";import{a as Ye}from"./Copy01-DhHOI-Q9.js";import{MonacoCodeEditor as io}from"./monaco-editor-Dqd6OMNL.js";import{A as ro}from"./automation-runs-DWryzRp5.js";import{C as lo}from"./collection-tabs-D4LYnWMJ.js";import{a as co}from"./use-panel-navigate-kG8bT637.js";import"./use-mobile-0wDKszAH.js";import"./use-sidebar-collapsed-B__PkJPm.js";import"./use-chat-layout-state-SXC1aBSP.js";import"./thread-route-DyeAWeVv.js";import"./thread-intent-DmSTHfJV.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg72K5y9.js";import"./slugify-CEUa2lfQ.js";import"./toolbar-icon-button-BTNIHkHm.js";import"./sheet-CInqTfvf.js";import"./resizable-l4I_T5Kn.js";import"./use-project-scope-DQ4byfJ8.js";import"./repository-binding-0L-NOau4.js";import"./AlertCircle-C8rwN6lq.js";import"./LinkBroken01-CAJodWFv.js";import"./Building02-Do3lJJG5.js";import"./CheckCircle-BC_4MefA.js";import"./ChevronSelectorVertical-DmnbHDqu.js";import"./CreditCard01-Dw2OjkWU.js";import"./DotsVertical-B-InRCR0.js";import"./Globe04-CtMJQj21.js";import"./SwitchHorizontal01-CxSk-wEa.js";import"./Key01-DBwoRjUY.js";import"./Link01-BBqxtXMI.js";import"./Minus-DiHVm4BN.js";import"./Monitor01-BhbrGCAs.js";import"./Sun-DVWc_O6K.js";import"./Play-BcZ_GeUq.js";import"./Upload01-Bo2ttnFV.js";import"./Users01-BC6qYZnG.js";import"./index-Bi8Dcq6x.js";import"./auth-CrD9p86I.js";import"./drawer-DUy0at62.js";import"./index-CwzAm9wC.js";import"./ai-providers-logos-DD3qZ33J.js";import"./autosend-DXH6RsEM.js";import"./use-decopilot-events-BNl6vZT3.js";import"./location-V0VwTJTt.js";import"./use-organization-settings-Bj3c26BX.js";import"./schema-BQgw-8fk.js";import"./index-YTZffZ6U.js";import"./use-clock-tick-BzkvK9xF.js";import"./project-icon-Fuoy9xbW.js";import"./new-project-dialog-CvrV-V2w.js";import"./label-B9vYlzdO.js";import"./repository-import-picker-DepdN5-B.js";import"./use-navigate-to-agent-CHgAma_A.js";import"./repository-picker-Dva3lcTN.js";import"./useInfiniteQuery-BqRsoJ1h.js";import"./infiniteQueryObserver-Dn-uClrW.js";import"./collection-search-DyeQXfCG.js";import"./use-debounced-value-CgkCbE-q.js";import"./required-auth-layout-CF04eiX-.js";import"./use-org-sso-4bOeKtTK.js";import"./suggestion-BJa7UCMt.js";import"./usage-stats-Bnq-bwdD.js";import"./form-C3OwrZbQ.js";import"./utils-CVEq3hMx.js";import"./markdown-BzS1xvA6.js";import"./use-copy-B6jA1hKb.js";import"./use-mcp-prompts-BpP8rPhI.js";import"./use-org-fs-CgDaP3QS.js";import"./core.esm-BjMa39GU.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-CZ2vZ5JJ.js";import"./table-DF5_axer.js";import"./empty-state-BG-ZsMM5.js";import"./use-infinite-scroll-Ce1Cyz0w.js";import"./task-status-CR31LKK2.js";import"./thread-sheet-body-CyVr8d5d.js";import"./useSuspenseInfiniteQuery-CXNJCW6q.js";import"./pair-CqDeWXf6.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-Dsd5J6Kh.js";import"./types-BBlCCKBH.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./use-thread-outputs-DvCpSxoC.js";import"./file-type-icon-CJ5Cx-FH.js";const Qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:Et},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=q.c(19),{tier:s,onSelect:n}=r,a=ee(),[i,c]=w.useState(!1),o=Qe[s].icon;let j;e[0]!==o?(j=t.jsx(o,{size:14,className:"text-muted-foreground"}),e[0]=o,e[1]=j):j=e[1];const d=Qe[s];let m;e[2]!==a||e[3]!==d.labelKey?(m=a(d.labelKey),e[2]=a,e[3]=d.labelKey,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[5]=x):x=e[5];let f;e[6]!==j||e[7]!==m?(f=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[j,m,x]})}),e[6]=j,e[7]=m,e[8]=f):f=e[8];let g;e[9]!==n||e[10]!==a||e[11]!==s?(g=mo.map(p=>{const l=Qe[p],y=l.icon;return t.jsxs("button",{type:"button",onClick:()=>{n(p),c(!1)},className:At("flex items-start gap-2 px-2 py-1.5 rounded-lg text-left hover:bg-accent"),children:[t.jsx(y,{size:16,className:"shrink-0 text-muted-foreground mt-0.5"}),t.jsxs("div",{className:"flex-1",children:[t.jsx("div",{className:"text-sm",children:a(l.labelKey)}),t.jsx("div",{className:"text-xs text-muted-foreground",children:a(l.subtitleKey)})]}),p===s&&t.jsx(qt,{size:14,className:"text-foreground mt-0.5"})]},p)}),e[9]=n,e[10]=a,e[11]=s,e[12]=g):g=e[12];let u;e[13]!==g?(u=t.jsx(Rt,{align:"start",className:"p-1 w-64",children:t.jsx("div",{className:"flex flex-col",children:g})}),e[13]=g,e[14]=u):u=e[14];let h;return e[15]!==i||e[16]!==f||e[17]!==u?(h=t.jsxs(Lt,{open:i,onOpenChange:c,children:[f,u]}),e[15]=i,e[16]=f,e[17]=u,e[18]=h):h=e[18],h}function fo(r){const e=q.c(27),{tier:s,onTierChange:n,override:a,onOverrideChange:i}=r,c=ee(),[o,j]=w.useState(a!==null);let d;e[0]!==c?(d=c("automations.automationConfig.modelLabel"),e[0]=c,e[1]=d):d=e[1];let m;e[2]!==d?(m=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:d}),e[2]=d,e[3]=m):m=e[3];let x;e[4]!==i||e[5]!==n||e[6]!==a||e[7]!==c||e[8]!==s||e[9]!==o?(x=o?t.jsx(w.Suspense,{fallback:t.jsx(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:c("automations.automationConfig.loadingModels")}),children:t.jsx(po,{override:a,onOverrideChange:i})}):t.jsx(uo,{tier:s,onSelect:n}),e[4]=i,e[5]=n,e[6]=a,e[7]=c,e[8]=s,e[9]=o,e[10]=x):x=e[10];let f;e[11]!==i?(f=y=>{j(y),y||i(null)},e[11]=i,e[12]=f):f=e[12];let g;e[13]!==f||e[14]!==o?(g=t.jsx(ct,{checked:o,onCheckedChange:f,className:"cursor-pointer"}),e[13]=f,e[14]=o,e[15]=g):g=e[15];let u;e[16]!==c?(u=c("automations.automationConfig.specificModel"),e[16]=c,e[17]=u):u=e[17];let h;e[18]!==g||e[19]!==u?(h=t.jsxs("label",{className:"flex items-center gap-2 text-xs text-muted-foreground cursor-pointer select-none",children:[g,u]}),e[18]=g,e[19]=u,e[20]=h):h=e[20];let p;e[21]!==x||e[22]!==h?(p=t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[x,h]}),e[21]=x,e[22]=h,e[23]=p):p=e[23];let l;return e[24]!==m||e[25]!==p?(l=t.jsxs("div",{className:"flex flex-col gap-2",children:[m,p]}),e[24]=m,e[25]=p,e[26]=l):l=e[26],l}function po(r){const e=q.c(25),{override:s,onOverrideChange:n}=r,a=ee(),i=$s(),c=i[0]?.id??null;let o;e[0]!==c||e[1]!==i||e[2]!==s?.credentialId?(o=i.some(l=>l.id===s?.credentialId)?s?.credentialId??null:c,e[0]=c,e[1]=i,e[2]=s?.credentialId,e[3]=o):o=e[3];const[j,d]=w.useState(o);let m;e[4]!==j||e[5]!==c||e[6]!==i?(m=i.some(l=>l.id===j)?j:c,e[4]=j,e[5]=c,e[6]=i,e[7]=m):m=e[7];const x=m;let f;e[8]!==i||e[9]!==s?(f=s&&i.some(l=>l.id===s.credentialId)?{modelId:s.modelId,title:s.title||s.modelId,keyId:s.credentialId,providerId:"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,e[8]=i,e[9]=s,e[10]=f):f=e[10];const g=f;if(i.length===0){let l;e[11]!==a?(l=a("automations.automationConfig.connectAiProviderHint"),e[11]=a,e[12]=l):l=e[12];let y;return e[13]!==l?(y=t.jsx("span",{className:"text-xs text-muted-foreground italic",children:l}),e[13]=l,e[14]=y):y=e[14],y}let u;e[15]!==a?(u=a("automations.automationConfig.pickModelPlaceholder"),e[15]=a,e[16]=u):u=e[16];let h;e[17]!==x||e[18]!==n?(h=l=>{const y=l.keyId??x??"";d(y),n({modelId:l.modelId,credentialId:y,title:l.title??l.modelId})},e[17]=x,e[18]=n,e[19]=h):h=e[19];let p;return e[20]!==x||e[21]!==g||e[22]!==u||e[23]!==h?(p=t.jsx("div",{className:"w-fit max-w-full",children:t.jsx(As,{variant:"bordered",placeholder:u,model:g,credentialId:x,onCredentialChange:d,onModelChange:h})}),e[20]=x,e[21]=g,e[22]=u,e[23]=h,e[24]=p):p=e[24],p}const Bt=[{key:"capabilities",headingKey:"automations.automationConfig.builtinCapabilities",icon:lt,tools:[{name:"web_search",titleKey:"automations.automationConfig.toolWebSearch",descriptionKey:"automations.automationConfig.toolWebSearchDesc",icon:it},{name:"generate_image",titleKey:"automations.automationConfig.toolGenerateImage",descriptionKey:"automations.automationConfig.toolGenerateImageDesc",icon:bs},{name:"subtask",titleKey:"automations.automationConfig.toolSubtask",descriptionKey:"automations.automationConfig.toolSubtaskDesc",icon:Zt},{name:"user_ask",titleKey:"automations.automationConfig.toolAskUser",descriptionKey:"automations.automationConfig.toolAskUserDesc",icon:fs}]},{key:"files",headingKey:"automations.automationConfig.filesCode",icon:St,tools:[{name:"read",titleKey:"automations.automationConfig.toolReadFile",descriptionKey:"automations.automationConfig.toolReadFileDesc",icon:ps},{name:"write",titleKey:"automations.automationConfig.toolWriteFile",descriptionKey:"automations.automationConfig.toolWriteFileDesc",icon:zt},{name:"edit",titleKey:"automations.automationConfig.toolEditFile",descriptionKey:"automations.automationConfig.toolEditFileDesc",icon:xs},{name:"grep",titleKey:"automations.automationConfig.toolSearchContent",descriptionKey:"automations.automationConfig.toolSearchContentDesc",icon:vs},{name:"glob",titleKey:"automations.automationConfig.toolFindFiles",descriptionKey:"automations.automationConfig.toolFindFilesDesc",icon:St},{name:"bash",titleKey:"automations.automationConfig.toolRunCommand",descriptionKey:"automations.automationConfig.toolRunCommandDesc",icon:gs}]},{key:"context",headingKey:"automations.automationConfig.context",icon:kt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:kt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:Tt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:Tt}]}],xo=Bt.flatMap(r=>r.tools.map(e=>e.name));function go(r){const e=r.replace(/[_-]+/g," ").trim();return e?e.toLowerCase().replace(/\b\w/g,s=>s.toUpperCase()):r}function ho(r){const e=q.c(12),{agentId:s,value:n,onChange:a}=r,i=ee();let c;e[0]!==i?(c=i("automations.automationConfig.toolsLabel"),e[0]=i,e[1]=c):c=e[1];let o;e[2]!==c?(o=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:c}),e[2]=c,e[3]=o):o=e[3];let j;e[4]!==s||e[5]!==a||e[6]!==i||e[7]!==n?(j=s?t.jsx(w.Suspense,{fallback:t.jsxs(B,{variant:"outline",size:"sm",disabled:!0,className:"w-fit",children:[t.jsx(lt,{size:14}),i("automations.automationConfig.loadingTools")]}),children:t.jsx(jo,{agentId:s,value:n,onChange:a})}):t.jsx("span",{className:"text-xs text-muted-foreground italic",children:i("automations.automationConfig.pickAgentFirst")}),e[4]=s,e[5]=a,e[6]=i,e[7]=n,e[8]=j):j=e[8];let d;return e[9]!==o||e[10]!==j?(d=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,j]}),e[9]=o,e[10]=j,e[11]=d):d=e[11],d}function It(r){const e=q.c(17),{value:s,checked:n,onToggle:a,title:i,description:c,leading:o}=r;let j;e[0]!==n?(j=t.jsx(Ft,{checked:n,className:"pointer-events-none mt-0.5"}),e[0]=n,e[1]=j):j=e[1];let d;e[2]!==o?(d=o&&t.jsx("span",{className:"mt-px shrink-0",children:o}),e[2]=o,e[3]=d):d=e[3];let m;e[4]!==i?(m=t.jsx("span",{className:"truncate text-sm leading-tight",children:i}),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==c?(x=c&&t.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:c}),e[6]=c,e[7]=x):x=e[7];let f;e[8]!==m||e[9]!==x?(f=t.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[m,x]}),e[8]=m,e[9]=x,e[10]=f):f=e[10];let g;return e[11]!==a||e[12]!==j||e[13]!==d||e[14]!==f||e[15]!==s?(g=t.jsxs(Ns,{value:s,onSelect:a,className:"items-start gap-2.5 py-2",children:[j,d,f]}),e[11]=a,e[12]=j,e[13]=d,e[14]=f,e[15]=s,e[16]=g):g=e[16],g}function Pt(r){const e=q.c(27),{conn:s,label:n,icon:a,on:i,total:c,onToggle:o}=r,j=ee(),d=i===c;let m;e[0]!==a||e[1]!==s?(m=s?t.jsx(Ps,{icon:s.icon,name:s.title,size:"2xs"}):a?t.jsx(a,{size:14,className:"text-muted-foreground"}):t.jsx(ys,{size:14,className:"text-muted-foreground"}),e[0]=a,e[1]=s,e[2]=m):m=e[2];let x;e[3]!==s?.title||e[4]!==n||e[5]!==j?(x=s?.title??n??j("automations.automationConfig.otherTools"),e[3]=s?.title,e[4]=n,e[5]=j,e[6]=x):x=e[6];let f;e[7]!==x?(f=t.jsx("span",{className:"truncate",children:x}),e[7]=x,e[8]=f):f=e[8];let g;e[9]!==i||e[10]!==c?(g=t.jsxs("span",{className:"text-2xs font-normal tabular-nums text-muted-foreground/70",children:[i,"/",c]}),e[9]=i,e[10]=c,e[11]=g):g=e[11];let u;e[12]!==o?(u=v=>{v.stopPropagation(),o()},e[12]=o,e[13]=u):u=e[13];let h;e[14]!==d||e[15]!==j?(h=j(d?"automations.automationConfig.none":"automations.automationConfig.all"),e[14]=d,e[15]=j,e[16]=h):h=e[16];let p;e[17]!==u||e[18]!==h?(p=t.jsx("button",{type:"button",onClick:u,className:"text-2xs font-medium text-primary hover:underline",children:h}),e[17]=u,e[18]=h,e[19]=p):p=e[19];let l;e[20]!==g||e[21]!==p?(l=t.jsxs("span",{className:"ml-auto flex items-center gap-2",children:[g,p]}),e[20]=g,e[21]=p,e[22]=l):l=e[22];let y;return e[23]!==m||e[24]!==f||e[25]!==l?(y=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f,l]}),e[23]=m,e[24]=f,e[25]=l,e[26]=y):y=e[26],y}function jo(r){const e=q.c(83),{agentId:s,value:n,onChange:a}=r,i=ee(),{org:c}=$t(),[o,j]=w.useState(!1);let d;e[0]!==s||e[1]!==c.id||e[2]!==c.slug?(d={connectionId:s,orgId:c.id,orgSlug:c.slug},e[0]=s,e[1]=c.id,e[2]=c.slug,e[3]=d):d=e[3];const m=_s(d);let x;e[4]!==m?(x={client:m},e[4]=m,e[5]=x):x=e[5];const{data:f,isLoading:g}=Is(x),u=dt();let h,p,l,y,v,N,S,b,T,D,_,k,P;if(e[6]!==u||e[7]!==f?.tools||e[8]!==g||e[9]!==a||e[10]!==o||e[11]!==i||e[12]!==n){const Y=new Map(u.map(No)),H=new Map;for(const I of f?.tools??[]){const z=ws(I._meta)??"__other__",Z=Ds(I.name,z==="__other__"?void 0:z),A=I.title,xe=A&&A!==I.name?A:go(Z);H.has(z)||H.set(z,{clientId:z,conn:Y.get(z),tools:[]}),H.get(z).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],V=n===null?new Set(J):new Set(n),U=J.every(I=>V.has(I)),O=I=>a(J.every(z=>I.has(z))?null:[...I]),ae=I=>{const z=new Set(V);z.has(I)?z.delete(I):z.add(I),O(z)},ne=(I,z)=>{const Z=new Set(V);for(const A of I)z?Z.add(A):Z.delete(A);O(Z)};y=Lt,P=o,v=j;let Q;e[26]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(lt,{size:14,className:"text-muted-foreground"}),e[26]=Q):Q=e[26];let ie;e[27]!==U||e[28]!==i?(ie=i(U?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=U,e[28]=i,e[29]=ie):ie=e[29];const ue=!U&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[V.size,"/",J.length]});let me;e[30]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(rt,{size:14,className:"text-muted-foreground"}),e[30]=me):me=e[30],e[31]!==ie||e[32]!==ue?(N=t.jsx(Mt,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",className:"w-fit gap-1.5",children:[Q,ie,ue,me]})}),e[31]=ie,e[32]=ue,e[33]=N):N=e[33],l=Rt,_="p-0 w-80",k="start",p=Ss;let te;e[34]!==i?(te=i("automations.automationConfig.searchToolsPlaceholder"),e[34]=i,e[35]=te):te=e[35],e[36]!==te?(T=t.jsx(ks,{placeholder:te}),e[36]=te,e[37]=T):T=e[37];const fe=U?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:V.size,total:J.length});let se;e[38]!==fe?(se=t.jsx("span",{className:"text-xs text-muted-foreground",children:fe}),e[38]=fe,e[39]=se):se=e[39];let re;e[40]!==a?(re=()=>a(null),e[40]=a,e[41]=re):re=e[41];let le;e[42]!==i?(le=i("automations.automationConfig.selectAll"),e[42]=i,e[43]=le):le=e[43];let C;e[44]!==U||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:U,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=U,e[45]=re,e[46]=le,e[47]=C):C=e[47];let M;e[48]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[48]=M):M=e[48];let E;e[49]!==a?(E=()=>a([]),e[49]=a,e[50]=E):E=e[50];const pe=V.size===0;let oe;e[51]!==i?(oe=i("automations.automationConfig.clear"),e[51]=i,e[52]=oe):oe=e[52];let ce;e[53]!==E||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:E,disabled:pe,className:"text-xs font-medium text-muted-foreground hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:oe}),e[53]=E,e[54]=pe,e[55]=oe,e[56]=ce):ce=e[56];let de;e[57]!==C||e[58]!==ce?(de=t.jsxs("div",{className:"flex items-center gap-2",children:[C,M,ce]}),e[57]=C,e[58]=ce,e[59]=de):de=e[59],e[60]!==se||e[61]!==de?(D=t.jsxs("div",{className:"flex items-center justify-between border-b px-3 py-2",children:[se,de]}),e[60]=se,e[61]=de,e[62]=D):D=e[62],h=Ts,S="max-h-80",b=g?t.jsx("div",{className:"px-3 py-6 text-center text-xs text-muted-foreground",children:i("automations.automationConfig.loadingTools")}):t.jsxs(t.Fragment,{children:[t.jsx(Cs,{children:i("automations.automationConfig.noToolsFound")}),Bt.map(I=>{const z=I.tools.map(bo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:i(A.titleKey),description:i(A.descriptionKey),leading:t.jsx(A.icon,{size:16,className:"text-muted-foreground"})},A.name))},I.key)}),W.map(I=>{const z=I.tools.map(yo),Z=z.filter(A=>V.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Z,total:z.length,onToggle:()=>ne(z,Z!==z.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:V.has(A.name),onToggle:()=>ae(A.name),title:A.display,description:A.description},A.name))},I.clientId)})]}),e[6]=u,e[7]=f?.tools,e[8]=g,e[9]=a,e[10]=o,e[11]=i,e[12]=n,e[13]=h,e[14]=p,e[15]=l,e[16]=y,e[17]=v,e[18]=N,e[19]=S,e[20]=b,e[21]=T,e[22]=D,e[23]=_,e[24]=k,e[25]=P}else h=e[13],p=e[14],l=e[15],y=e[16],v=e[17],N=e[18],S=e[19],b=e[20],T=e[21],D=e[22],_=e[23],k=e[24],P=e[25];let $;e[63]!==h||e[64]!==S||e[65]!==b?($=t.jsx(h,{className:S,children:b}),e[63]=h,e[64]=S,e[65]=b,e[66]=$):$=e[66];let R;e[67]!==p||e[68]!==$||e[69]!==T||e[70]!==D?(R=t.jsxs(p,{children:[T,D,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=D,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==_||e[75]!==k?(K=t.jsx(l,{className:_,align:k,children:R}),e[72]=l,e[73]=R,e[74]=_,e[75]=k,e[76]=K):K=e[76];let F;return e[77]!==y||e[78]!==v||e[79]!==N||e[80]!==K||e[81]!==P?(F=t.jsxs(y,{open:P,onOpenChange:v,children:[N,K]}),e[77]=y,e[78]=v,e[79]=N,e[80]=K,e[81]=P,e[82]=F):F=e[82],F}function yo(r){return r.name}function bo(r){return r.name}function vo(r){return r.name}function Co(r,e){return(r.conn?.title??r.clientId).localeCompare(e.conn?.title??e.clientId)}function No(r){return[r.id,r]}function Re(r){const e=r.trim().split(/\s+/);return e.length!==5?!1:e.every(s=>/^[\d*/,-]+$/.test(s))}function So(r){if(!r)return"Unknown schedule";const e=r.trim();if(e==="* * * * *")return"Every minute";if(e==="0 * * * *")return"Every hour";if(e==="0 0 * * *")return"Every day";if(e==="0 0 * * 1")return"Every week";const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return`Every ${s[1]} minutes`;const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return`Every ${n[1]} hours`;const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);if(a){const o=parseInt(a[1]??"1");return o%7===0?`Every ${o/7} weeks`:`Every ${o} days`}const i=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+\*$/);if(i){const o=(i[2]??"0").padStart(2,"0"),j=(i[1]??"0").padStart(2,"0");return`Every day at ${o}:${j} UTC`}const c=e.match(/^(\d+)\s+(\d+)\s+\*\s+\*\s+(\d)$/);if(c){const j=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][parseInt(c[3]??"0")]??"day",d=(c[2]??"0").padStart(2,"0"),m=(c[1]??"0").padStart(2,"0");return`Every ${j} at ${d}:${m} UTC`}return r}function ko(r,e){const s=Math.max(1,r);switch(e){case"minutes":return s===1?"* * * * *":`*/${s} * * * *`;case"hours":return s===1?"0 * * * *":`0 */${s} * * *`;case"days":return s===1?"0 0 * * *":`0 0 */${s} * *`;case"weeks":return s===1?"0 0 * * 1":`0 0 */${s*7} * *`}}function To(r){const e=r.trim();if(e==="* * * * *")return{count:1,unit:"minutes"};if(e==="0 * * * *")return{count:1,unit:"hours"};if(e==="0 0 * * *")return{count:1,unit:"days"};if(e==="0 0 * * 1")return{count:1,unit:"weeks"};const s=e.match(/^\*\/(\d+)\s+\*\s+\*\s+\*\s+\*$/);if(s)return{count:parseInt(s[1]),unit:"minutes"};const n=e.match(/^0\s+\*\/(\d+)\s+\*\s+\*\s+\*$/);if(n)return{count:parseInt(n[1]),unit:"hours"};const a=e.match(/^0\s+0\s+\*\/(\d+)\s+\*\s+\*$/);return a?{count:parseInt(a[1]),unit:"days"}:null}function wo(r,e){return e===1?{minutes:"minute",hours:"hour",days:"day",weeks:"week"}[r]??r:r}const Do=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],qe=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],_o=r=>qe.some(e=>e===r),Io=r=>Gt.some(e=>e===r);function Po({automationId:r,open:e,onOpenChange:s}){const n=ee(),{triggerAdd:a}=ve(),[i,c]=w.useState("in_progress"),[o,j]=w.useState("any"),[d,m]=w.useState([]),x=qe.filter(l=>l!==i),f=d.filter(l=>l!==i),g=o!=="statuses"||f.length>0,u=l=>{l||(c("in_progress"),j("any"),m([])),s(l)},h=async()=>{try{await a.mutateAsync({automation_id:r,type:"board_column_transition",column_key:i,from:o==="statuses"?{kind:o,statuses:f}:{kind:o}}),X.success(n("automations.addStarterPopover.starterAdded")),u(!1)}catch(l){X.error(l instanceof Error?l.message:n("automations.addStarterPopover.failedAddStarter"))}},p=l=>n(l==="any"?"automations.columnTransitionDialog.fromAny":l==="earlier"?"automations.columnTransitionDialog.fromEarlier":l==="later"?"automations.columnTransitionDialog.fromLater":"automations.columnTransitionDialog.fromColumns");return t.jsx(et,{open:e,onOpenChange:u,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:n("automations.columnTransitionDialog.title")}),t.jsx(at,{children:n("automations.columnTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.column")}),t.jsxs(ge,{value:i,onValueChange:l=>{_o(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:qe.map(l=>{const{label:y,visual:v}=We(l,n),N=v.icon;return t.jsxs(be,{value:l,children:[t.jsx(N,{size:14,className:At("shrink-0",v.iconClassName)}),y]},l)})})]})]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n("automations.columnTransitionDialog.origin")}),t.jsxs(ge,{value:o,onValueChange:l=>{Io(l)&&j(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Gt.map(l=>t.jsx(be,{value:l,children:p(l)},l))})]}),o==="statuses"&&t.jsx(Wt,{options:x.map(l=>({label:We(l,n).label,value:l})),defaultValue:f,onValueChange:m,placeholder:n("automations.columnTransitionDialog.columnsPlaceholder"),modalPopover:!0,className:"max-w-none"},i)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:n("automations.columnTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>u(!1),children:n("automations.columnTransitionDialog.cancel")}),t.jsx(B,{disabled:!g||a.isPending,onClick:h,children:n("automations.columnTransitionDialog.add")})]})]})})}const Ht=["any","earlier","later","statuses"],Ao=r=>Ht.some(e=>e===r);function $o({automationId:r,boardId:e,open:s,onOpenChange:n}){const a=ee(),{triggerAdd:i}=ve(),c=qs(s?e:null),[o,j]=w.useState(null),[d,m]=w.useState("any"),[x,f]=w.useState([]),g=(c.data??[]).flatMap(b=>b.statuses.map(T=>({column:b.name,status:T}))),u=o??g[0]?.status??null,h=g.map(b=>b.status).filter(b=>b!==u),p=x.filter(b=>b!==u),l=u!==null&&(d!=="statuses"||p.length>0),y=b=>{b||(j(null),m("any"),f([])),n(b)},v=async()=>{if(u)try{await i.mutateAsync({automation_id:r,type:"jira_transition",jira_status:u,from:d==="statuses"?{kind:d,statuses:p}:{kind:d}}),X.success(a("automations.addStarterPopover.starterAdded")),y(!1)}catch(b){X.error(b instanceof Error?b.message:a("automations.addStarterPopover.failedAddStarter"))}},N=b=>a(b==="any"?"automations.jiraTransitionDialog.fromAny":b==="earlier"?"automations.jiraTransitionDialog.fromEarlier":b==="later"?"automations.jiraTransitionDialog.fromLater":"automations.jiraTransitionDialog.fromStatuses");let S;return c.isPending?S=t.jsx(es,{className:"h-9 w-full"}):c.isError||g.length===0?S=t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.noStatuses")}):S=t.jsxs(ge,{value:u??void 0,onValueChange:j,children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:g.map(b=>t.jsxs(be,{value:b.status,children:[b.status,b.column!==b.status&&t.jsx("span",{className:"text-muted-foreground",children:b.column})]},b.status))})]}),t.jsx(et,{open:s,onOpenChange:y,children:t.jsxs(tt,{className:"max-w-md",children:[t.jsxs(st,{children:[t.jsx(ot,{children:a("automations.jiraTransitionDialog.title")}),t.jsx(at,{children:a("automations.jiraTransitionDialog.description")})]}),t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.status")}),S]}),t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:a("automations.jiraTransitionDialog.origin")}),t.jsxs(ge,{value:d,onValueChange:b=>{Ao(b)&&m(b)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ht.map(b=>t.jsx(be,{value:b,children:N(b)},b))})]}),d==="statuses"&&t.jsx(Wt,{options:h.map(b=>({label:b,value:b})),defaultValue:p,onValueChange:f,placeholder:a("automations.jiraTransitionDialog.statusesPlaceholder"),modalPopover:!0,className:"max-w-none"},u)]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:a("automations.jiraTransitionDialog.help")})]}),t.jsxs(nt,{children:[t.jsx(B,{variant:"ghost",onClick:()=>y(!1),children:a("automations.jiraTransitionDialog.cancel")}),t.jsx(B,{disabled:!l||i.isPending,onClick:v,children:a("automations.jiraTransitionDialog.add")})]})]})})}function Oo({automationId:r,open:e,onOpenChange:s,onCustomSelect:n,onEventSelect:a,onWebhookCreated:i}){const c=ee(),{triggerAdd:o}=ve(),[j,d]=w.useState(!1),[m,x]=w.useState(!1),[f,g]=w.useState(!1),u=eo().data?.boardId??null,h=e??j,p=v=>{s?s(v):d(v)},l=async v=>{try{await o.mutateAsync({automation_id:r,type:"cron",cron_expression:v}),X.success(c("automations.addStarterPopover.starterAdded")),p(!1)}catch(N){const S=N instanceof Error?N.message:c("automations.addStarterPopover.failedAddStarter");X.error(S)}},y=async()=>{try{const v=await o.mutateAsync({automation_id:r,type:"webhook"});p(!1),v.webhook?i?.(v.webhook):X.success(c("automations.addStarterPopover.webhookStarterAdded"))}catch(v){const N=v instanceof Error?v.message:c("automations.addStarterPopover.failedAddWebhookStarter");X.error(N)}};return t.jsxs(t.Fragment,{children:[t.jsxs(ts,{open:h,onOpenChange:p,children:[t.jsx(ss,{asChild:!0,children:t.jsxs(B,{variant:"outline",size:"sm",children:[t.jsx(to,{size:14}),c("automations.addStarterPopover.addStarter")]})}),t.jsxs(os,{align:"end",className:"w-[240px]",children:[t.jsxs(as,{children:[t.jsxs(ns,{className:"gap-2.5",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.every")]}),t.jsx(is,{className:"w-[160px]",children:Do.map(v=>t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>l(v.cron),disabled:o.isPending,children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.everyUnit",{unit:v.label})]},v.cron))})]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),n?.()},children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.customCron")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),a?.()},children:[t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.event")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),x(!0)},children:[t.jsx(Ot,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.cardEntersColumn")]}),u&&t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Ut,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(Ee,{className:"gap-2.5",onSelect:()=>{y()},disabled:o.isPending,children:[t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}),c("automations.addStarterPopover.webhook")]})]})]}),t.jsx(Po,{automationId:r,open:m,onOpenChange:x}),u&&t.jsx($o,{automationId:r,boardId:u,open:f,onOpenChange:g})]})}function Jt(r){const e=q.c(39),{open:s,onOpenChange:n,url:a,token:i,title:c,description:o}=r,j=c===void 0?"Webhook ready":c,d=o===void 0?"Send a POST to this URL with the bearer token to fire the automation. The token is shown once — copy it now.":o,m=ee(),[x,f]=w.useState(null),[g,u]=w.useState("curl"),[h,p]=w.useState("header"),l=w.useId();let y;e[0]!==m?(y=async(W,G)=>{try{await navigator.clipboard.writeText(W),f(G),X.success(m("automations.webhookSecretDialog.copied")),setTimeout(()=>f(null),1500)}catch{X.error(m("automations.webhookSecretDialog.failedCopy"))}},e[0]=m,e[1]=y):y=e[1];const v=y;let N;e[2]!==h||e[3]!==i||e[4]!==a?(N=a&&i&&h==="url"?`${a.replace(/\/$/,"")}/${i}`:a??"",e[2]=h,e[3]=i,e[4]=a,e[5]=N):N=e[5];const S=N,b=a&&i?h==="header"?`curl -X POST "${S}" \\
|
|
2
2
|
-H "Authorization: Bearer ${i}" \\
|
|
3
3
|
-H "Content-Type: application/json" \\
|
|
4
4
|
-d '{"hello":"world"}'`:`curl -X POST "${S}" \\
|
|
@@ -16,5 +16,5 @@ import{aD as Zt,c as q,b as ee,r as w,j as t,B,ai as qt,l as At,a4 as $t,D as et
|
|
|
16
16
|
"Content-Type": "application/json",
|
|
17
17
|
},
|
|
18
18
|
body: JSON.stringify({ hello: "world" }),
|
|
19
|
-
});`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let P;e[10]!==_||e[11]!==k?(P=t.jsxs(st,{children:[_,k]}),e[10]=_,e[11]=k,e[12]=P):P=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==a?($=a&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(Ye,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(Ye,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(_t,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(_t,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(Ye,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(io,{code:D,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=a,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let Y;e[31]!==F||e[32]!==P||e[33]!==$?(Y=t.jsxs(tt,{className:"max-w-lg",children:[P,$,F]}),e[31]=F,e[32]=P,e[33]=$,e[34]=Y):Y=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==Y?(H=t.jsx(et,{open:s,onOpenChange:n,children:Y}),e[35]=n,e[36]=s,e[37]=Y,e[38]=H):H=e[38],H}async function Oo(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:a,removeTrigger:i}=r,c=await a({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(o){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),o}}function Xt(r){const e=q.c(153),{trigger:s,automationId:n,connectionName:a,readOnly:i}=r,c=i===void 0?!1:i,o=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?To(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",P=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==o||e[3]!==s.type?(R=s.type==="board_pr_ready"?o("automations.triggerCard.prReady"):s.type==="linked_chat_run"?o("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?o("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?o("automations.triggerCard.chatPrOpened"):null,e[2]=o,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let Y;e[5]!==n||e[6]!==d||e[7]!==o||e[8]!==s.id?(Y=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(o("automations.triggerCard.starterRemoved"))}catch{X.error(o("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=o,e[8]=s.id,e[9]=Y):Y=e[9];const H=Y;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>Oo({cronExpression:L,automationId:n,oldTriggerId:s.id,addTrigger:Fe=>j.mutateAsync(Fe),removeTrigger:Fe=>d.mutateAsync(Fe)}),e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==o||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=o,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==o||e[23]!==s.id?(U=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch{X.error(o("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=o,e[23]=s.id,e[24]=U):U=e[24];const z=U;let ae;e[25]!==y||e[26]!==G||e[27]!==o||e[28]!==s.cron_expression?(ae=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=ko(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=o,e[28]=s.cron_expression,e[29]=ae):ae=e[29];const ne=ae;let Q;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==P||e[34]!==K?(Q=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(zt,{size:14,className:"text-muted-foreground shrink-0"}):P?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=P,e[34]=K,e[35]=Q):Q=e[35];let ie;e[36]!==a||e[37]!==v||e[38]!==T||e[39]!==ne||e[40]!==V||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==_||e[47]!==P||e[48]!==K||e[49]!==o||e[50]!==s.column_key||e[51]!==s.cron_expression||e[52]!==s.event_type||e[53]!==s.from||e[54]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?So(s.cron_expression??""):$?o("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",o).label}):K||(F?o("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):P?o("automations.triggerCard.webhookPostToFire"):`${s.event_type}${a?` · ${a}`:""}`)}),$&&t.jsx(Ko,{from:s.from}),F&&t.jsx(Fo,{from:s.from}),!k&&!P&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Eo).join(", ")})]}),e[36]=a,e[37]=v,e[38]=T,e[39]=ne,e[40]=V,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=_,e[47]=P,e[48]=K,e[49]=o,e[50]=s.column_key,e[51]=s.cron_expression,e[52]=s.event_type,e[53]=s.from,e[54]=s.params,e[55]=ie):ie=e[55];let ue;e[56]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=_,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==o||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.editSchedule"),onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(Ot,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=o,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==P||e[65]!==o?(te=P&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",title:o("automations.triggerCard.rotateToken"),"aria-label":o("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=P,e[65]=o,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==o?(fe=!c&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=o,e[69]=fe):fe=e[69];let se;e[70]!==ue||e[71]!==me||e[72]!==te||e[73]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[70]=ue,e[71]=me,e[72]=te,e[73]=fe,e[74]=se):se=e[74];let re;e[75]!==ie||e[76]!==se||e[77]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 surface group",children:[Q,ie,se]}),e[75]=ie,e[76]=se,e[77]=Q,e[78]=re):re=e[78];let le;e[79]!==o?(le=o("automations.triggerCard.removeStarter"),e[79]=o,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(pt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==o?(M=o("automations.triggerCard.confirmRemoveStarter"),e[83]=o,e[84]=M):M=e[84];let E;e[85]!==M?(E=t.jsx(xt,{children:M}),e[85]=M,e[86]=E):E=e[86];let pe;e[87]!==C||e[88]!==E?(pe=t.jsxs(gt,{children:[C,E]}),e[87]=C,e[88]=E,e[89]=pe):pe=e[89];let oe;e[90]!==o?(oe=o("automations.triggerCard.cancel"),e[90]=o,e[91]=oe):oe=e[91];let ce;e[92]!==oe?(ce=t.jsx(ht,{children:oe}),e[92]=oe,e[93]=ce):ce=e[93];let de;e[94]!==o?(de=o("automations.triggerCard.remove"),e[94]=o,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(jt,{onClick:H,variant:"destructive",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let O;e[99]!==ce||e[100]!==I?(O=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=O):O=e[101];let Z;e[102]!==pe||e[103]!==O?(Z=t.jsxs(bt,{children:[pe,O]}),e[102]=pe,e[103]=O,e[104]=Z):Z=e[104];let A;e[105]!==x||e[106]!==Z?(A=t.jsx(vt,{open:x,onOpenChange:f,children:Z}),e[105]=x,e[106]=Z,e[107]=A):A=e[107];let xe;e[108]!==o?(xe=o("automations.triggerCard.rotateWebhookToken"),e[108]=o,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(pt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==o?(Ne=o("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=o,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(xt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(gt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==o?(Te=o("automations.triggerCard.cancel"),e[119]=o,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(ht,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let De;e[123]!==o?(De=o("automations.triggerCard.rotate"),e[123]=o,e[124]=De):De=e[124];let _e;e[125]!==z||e[126]!==De?(_e=t.jsx(jt,{onClick:z,children:De}),e[125]=z,e[126]=De,e[127]=_e):_e=e[127];let Ie;e[128]!==we||e[129]!==_e?(Ie=t.jsxs(yt,{children:[we,_e]}),e[128]=we,e[129]=_e,e[130]=Ie):Ie=e[130];let Pe;e[131]!==ke||e[132]!==Ie?(Pe=t.jsxs(bt,{children:[ke,Ie]}),e[131]=ke,e[132]=Ie,e[133]=Pe):Pe=e[133];let Ae;e[134]!==g||e[135]!==Pe?(Ae=t.jsx(vt,{open:g,onOpenChange:u,children:Pe}),e[134]=g,e[135]=Pe,e[136]=Ae):Ae=e[136];const Be=h!==null;let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=L=>{L||p(null)},e[137]=Ve):Ve=e[137];const Ge=h?.url??null,He=h?.token??null;let $e;e[138]!==o?($e=o("automations.triggerCard.newWebhookToken"),e[138]=o,e[139]=$e):$e=e[139];let ze;e[140]!==o?(ze=o("automations.triggerCard.newWebhookTokenDescription"),e[140]=o,e[141]=ze):ze=e[141];let Oe;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==ze?(Oe=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:ze}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=ze,e[147]=Oe):Oe=e[147];let Ue;return e[148]!==re||e[149]!==A||e[150]!==Ae||e[151]!==Oe?(Ue=t.jsxs(t.Fragment,{children:[re,A,Ae,Oe]}),e[148]=re,e[149]=A,e[150]=Ae,e[151]=Oe,e[152]=Ue):Ue=e[152],Ue}function Eo(r){const[e,s]=r;return`${e}: ${s}`}function Ko(r){const e=q.c(10),{from:s}=r,n=ee();let a;e[0]!==s||e[1]!==n?(a=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>We(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=a):a=e[2];const i=a;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let o;e[5]!==i||e[6]!==c?(o=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=o):o=e[7];const j=o.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Fo(r){const e=q.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let a;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(a=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=a):a=e[3];let i;return e[4]!==a?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:a}),e[4]=a,e[5]=i):i=e[5],i}function Mo(r){const e=q.c(70),{automationId:s,onDone:n}=r,a=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[o,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Es(o);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==o||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==a||e[10]!==c||e[11]!==h){const _=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==a?(k=async()=>{if(!(!o||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:o,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:o,event_type:d}),X.success(a("automations.eventTriggerForm.successAdded")),n()}catch{X.error(a("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=o,e[21]=d,e[22]=n,e[23]=f,e[24]=a,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 surface";let P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=P):P=e[26];let $;e[27]!==a?($=a("automations.eventTriggerForm.title"),e[27]=a,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[P,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const Y=o??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=U=>{j(U),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==a?(W=a("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=a,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==a||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:a("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Vo),e[42]=a,e[43]=c,e[44]=J):J=e[44];let V;e[45]!==J?(V=t.jsx(ye,{children:J}),e[45]=J,e[46]=V):V=e[46],e[47]!==Y||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,V]}),e[47]=Y,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==o||e[52]!==d||e[53]!==p||e[54]!==a||e[55]!==h?(S=o&&t.jsxs(ge,{value:d??"",onValueChange:U=>{m(U),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),a("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??a("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Lo)})]}),e[51]=o,e[52]=d,e[53]=p,e[54]=a,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(U=>{const[z,ae]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[z,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[z]??"",onValueChange:ne=>g(Q=>({...Q,[z]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectParamPlaceholder",{key:z})})}),t.jsx(ye,{children:ae.enum.map(Ro)})]}):t.jsx("input",{type:"text",value:f[z]??"",onChange:ne=>g(Q=>({...Q,[z]:ne.target.value})),placeholder:ae.description??z,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus-ring"})]},z)})}),e[2]=u,e[3]=s,e[4]=o,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=a,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==o||e[59]!==d||e[60]!==l||e[61]!==a?(T=o&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):a("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=o,e[59]=d,e[60]=l,e[61]=a,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=D):D=e[69],D}function Ro(r){return t.jsx(be,{value:r,children:r},r)}function Lo(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function Vo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Wo(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const a of e.fields)n.add(a);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Bo({automationId:r,automation:e,onBack:s,onDelete:n}){const a=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:o,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[D,_]=w.useState(""),[k,P]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[Y,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(E=>E.type==="text").map(E=>E.text).join(`
|
|
20
|
-
`);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:Os({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,z=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=z.watch("active"),[ne,Q]=w.useReducer(Wo,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Q({type:"reset"}))},ue=async()=>{const C=z.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const E=z.getValues(),pe=z.control._defaultValues;z.reset(E,{keepValues:!0});const oe=W;G(!1);const ce={tier:E.tier,...E.modelOverride?{modelId:E.modelOverride.modelId,credentialId:E.modelOverride.credentialId,modelTitle:E.modelOverride.title}:{}},de={id:r,name:E.name,active:E.active,models:ce,tools:E.tools,maxAgentSteps:E.maxAgentSteps,messages:Ls(p),temperature:0};try{await o.mutateAsync(de)}catch{return z.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Q({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=Dt({save:ue}),{schedule:fe,flush:se}=Dt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=z.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Y){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(a("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),a("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:z.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:a("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Ys,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:z.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(zs,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.starter")}),t.jsx(zo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),P(!1),_("")},onEventSelect:()=>{P(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[a("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:a("automations.automationDetail.addStarter")})," ",a("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),_("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Mo,{automationId:r,onDone:()=>P(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(Et,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Qs,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Zs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(fo,{tier:z.watch("tier"),onTierChange:C=>z.setValue("tier",C,{shouldDirty:!0}),override:z.watch("modelOverride"),onOverrideChange:C=>z.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:z.watch("tools"),onChange:C=>z.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:z.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),E=M===""?null:Number(M);z.setValue("maxAgentSteps",E===null||Number.isNaN(E)?null:E,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:a}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let o;e[4]!==c?(o=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(ct,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const Yt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Qt(r){const e=Yt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ho(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Jo);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Qt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==a?(x=Yt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Jo(){return Qt("30d")}function Xo(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ze,{}),e[2]=i):i=e[2];let c;return e[3]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Yo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function Yo(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ze,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let P;return e[5]!==k?(P=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=P):P=e[6],P}let x;e[7]!==i.triggers?(x=i.triggers.map(Qo),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Ze,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function Qo(r){return r.id}function Zo(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Xo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function ji(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Zo,{})}),r[0]=e):e=r[0],e}export{ji as default};
|
|
19
|
+
});`:"",D=g==="curl"?b:T;let _;e[6]!==j?(_=t.jsx(ot,{children:j}),e[6]=j,e[7]=_):_=e[7];let k;e[8]!==d?(k=t.jsx(at,{children:d}),e[8]=d,e[9]=k):k=e[9];let P;e[10]!==_||e[11]!==k?(P=t.jsxs(st,{children:[_,k]}),e[10]=_,e[11]=k,e[12]=P):P=e[12];let $;e[13]!==h||e[14]!==x||e[15]!==v||e[16]!==S||e[17]!==g||e[18]!==D||e[19]!==m||e[20]!==i||e[21]!==l||e[22]!==a?($=a&&i?t.jsxs("div",{className:"flex flex-col gap-3 min-w-0",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.url")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:S}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(S,"url"),children:[t.jsx(Ye,{size:13}),m(x==="url"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.tokenLabel")}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("code",{className:"flex-1 min-w-0 text-xs font-mono bg-muted rounded-md px-2 py-1.5 truncate",children:i}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(i,"token"),children:[t.jsx(Ye,{size:13}),m(x==="token"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]})]}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:m("automations.webhookSecretDialog.snippet")}),t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(ao,{value:g,onValueChange:W=>u(W),children:t.jsxs(no,{className:"h-8 p-[2px]",children:[t.jsx(_t,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(_t,{value:"fetch",className:"h-7 px-2.5 text-xs",children:"fetch"})]})}),t.jsxs("label",{htmlFor:l,className:"flex items-center gap-1.5 text-xs text-muted-foreground cursor-pointer select-none",children:[t.jsx(Ft,{id:l,checked:h==="url",onCheckedChange:W=>p(W?"url":"header")}),m("automations.webhookSecretDialog.tokenInUrl")]})]}),t.jsxs(B,{size:"sm",variant:"outline",onClick:()=>v(D,"example"),children:[t.jsx(Ye,{size:13}),m(x==="example"?"automations.webhookSecretDialog.copied":"automations.webhookSecretDialog.copy")]})]}),t.jsx("div",{className:"rounded-md border overflow-hidden min-w-0",children:t.jsx(io,{code:D,language:g==="curl"?"shell":"typescript",readOnly:!0,disableDiagnostics:!0,height:180})})]})]}):null,e[13]=h,e[14]=x,e[15]=v,e[16]=S,e[17]=g,e[18]=D,e[19]=m,e[20]=i,e[21]=l,e[22]=a,e[23]=$):$=e[23];let R;e[24]!==n?(R=()=>n(!1),e[24]=n,e[25]=R):R=e[25];let K;e[26]!==m?(K=m("automations.webhookSecretDialog.done"),e[26]=m,e[27]=K):K=e[27];let F;e[28]!==K||e[29]!==R?(F=t.jsx(nt,{children:t.jsx(B,{onClick:R,children:K})}),e[28]=K,e[29]=R,e[30]=F):F=e[30];let Y;e[31]!==F||e[32]!==P||e[33]!==$?(Y=t.jsxs(tt,{className:"max-w-lg",children:[P,$,F]}),e[31]=F,e[32]=P,e[33]=$,e[34]=Y):Y=e[34];let H;return e[35]!==n||e[36]!==s||e[37]!==Y?(H=t.jsx(et,{open:s,onOpenChange:n,children:Y}),e[35]=n,e[36]=s,e[37]=Y,e[38]=H):H=e[38],H}async function zo(r){const{cronExpression:e,automationId:s,oldTriggerId:n,addTrigger:a,removeTrigger:i}=r,c=await a({automation_id:s,type:"cron",cron_expression:e});try{await i({trigger_id:n,automation_id:s})}catch(o){throw await i({trigger_id:c.id,automation_id:s}).catch(()=>{}),o}}function Xt(r){const e=q.c(153),{trigger:s,automationId:n,connectionName:a,readOnly:i}=r,c=i===void 0?!1:i,o=ee(),{triggerAdd:j,triggerRemove:d,triggerRotateToken:m}=ve(),[x,f]=w.useState(!1),[g,u]=w.useState(!1),[h,p]=w.useState(null);let l;e[0]!==s.cron_expression?(l=s.cron_expression?To(s.cron_expression):null,e[0]=s.cron_expression,e[1]=l):l=e[1];const y=l,[v,N]=w.useState(y?.count??1),[S,b]=w.useState(!1),[T,D]=w.useState(s.cron_expression??""),_=d.isPending||j.isPending||m.isPending,k=s.type==="cron",P=s.type==="webhook",$=s.type==="board_column_transition";let R;e[2]!==o||e[3]!==s.type?(R=s.type==="board_pr_ready"?o("automations.triggerCard.prReady"):s.type==="linked_chat_run"?o("automations.triggerCard.linkedChatRun"):s.type==="board_pr_merged"?o("automations.triggerCard.prMerged"):s.type==="chat_pr_opened"?o("automations.triggerCard.chatPrOpened"):null,e[2]=o,e[3]=s.type,e[4]=R):R=e[4];const K=R,F=s.type==="jira_transition";let Y;e[5]!==n||e[6]!==d||e[7]!==o||e[8]!==s.id?(Y=async()=>{try{await d.mutateAsync({trigger_id:s.id,automation_id:n}),X.success(o("automations.triggerCard.starterRemoved"))}catch{X.error(o("automations.triggerCard.failedToRemoveStarter"))}f(!1)},e[5]=n,e[6]=d,e[7]=o,e[8]=s.id,e[9]=Y):Y=e[9];const H=Y;let W;e[10]!==j||e[11]!==n||e[12]!==d||e[13]!==s.id?(W=L=>zo({cronExpression:L,automationId:n,oldTriggerId:s.id,addTrigger:Fe=>j.mutateAsync(Fe),removeTrigger:Fe=>d.mutateAsync(Fe)}),e[10]=j,e[11]=n,e[12]=d,e[13]=s.id,e[14]=W):W=e[14];const G=W;let J;e[15]!==T||e[16]!==G||e[17]!==o||e[18]!==s.cron_expression?(J=async()=>{const L=T.trim();if(!L||!Re(L)||L===s.cron_expression){b(!1),D(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),D(s.cron_expression??""),b(!1)}},e[15]=T,e[16]=G,e[17]=o,e[18]=s.cron_expression,e[19]=J):J=e[19];const V=J;let U;e[20]!==n||e[21]!==m||e[22]!==o||e[23]!==s.id?(U=async()=>{u(!1);try{const L=await m.mutateAsync({trigger_id:s.id,automation_id:n});p({url:L.url,token:L.token})}catch{X.error(o("automations.triggerCard.failedToRotateToken"))}},e[20]=n,e[21]=m,e[22]=o,e[23]=s.id,e[24]=U):U=e[24];const O=U;let ae;e[25]!==y||e[26]!==G||e[27]!==o||e[28]!==s.cron_expression?(ae=async L=>{if(!y)return;const Fe=y.unit==="minutes"?5:1,Je=Math.max(Fe,L);Je!==L&&N(Je);const ft=ko(Je,y.unit);if(ft!==s.cron_expression)try{await G(ft)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),N(y.count)}},e[25]=y,e[26]=G,e[27]=o,e[28]=s.cron_expression,e[29]=ae):ae=e[29];const ne=ae;let Q;e[30]!==$||e[31]!==k||e[32]!==F||e[33]!==P||e[34]!==K?(Q=k?t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}):F?t.jsx(Ut,{size:14,className:"shrink-0"}):$||K?t.jsx(Ot,{size:14,className:"text-muted-foreground shrink-0"}):P?t.jsx(it,{size:14,className:"text-muted-foreground shrink-0"}):t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[30]=$,e[31]=k,e[32]=F,e[33]=P,e[34]=K,e[35]=Q):Q=e[35];let ie;e[36]!==a||e[37]!==v||e[38]!==T||e[39]!==ne||e[40]!==V||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==_||e[47]!==P||e[48]!==K||e[49]!==o||e[50]!==s.column_key||e[51]!==s.cron_expression||e[52]!==s.event_type||e[53]!==s.from||e[54]!==s.params?(ie=y&&k?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-sm text-muted-foreground",children:o("automations.triggerCard.every")}),t.jsx("input",{type:"number",min:y.unit==="minutes"?5:1,value:v,onChange:L=>N(parseInt(L.target.value)||1),onBlur:()=>ne(v),onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&N(y.count)},disabled:_,className:"w-12 text-center text-sm h-7 border border-border rounded-md bg-background px-1 focus-ring"}),t.jsx("span",{className:"text-sm",children:wo(y.unit,v)})]}):k&&S?t.jsxs(t.Fragment,{children:[t.jsx("input",{type:"text",value:T,onChange:L=>D(L.target.value),onBlur:V,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),D(s.cron_expression??""))},className:"flex-1 text-sm font-mono bg-transparent outline-none",autoFocus:!0}),T&&!Re(T)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:o("automations.triggerCard.invalid")})]}):t.jsxs("div",{className:"flex flex-col gap-0.5 flex-1 min-w-0",children:[t.jsx("span",{className:"text-sm font-mono text-xs text-muted-foreground truncate",children:k?So(s.cron_expression??""):$?o("automations.triggerCard.cardEntersColumn",{lane:We(s.column_key??"",o).label}):K||(F?o("automations.triggerCard.issueEntersJiraStatus",{status:s.column_key??""}):P?o("automations.triggerCard.webhookPostToFire"):`${s.event_type}${a?` · ${a}`:""}`)}),$&&t.jsx(Ko,{from:s.from}),F&&t.jsx(Fo,{from:s.from}),!k&&!P&&!$&&!K&&!F&&s.params&&Object.keys(s.params).length>0&&t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:Object.entries(s.params).map(Eo).join(", ")})]}),e[36]=a,e[37]=v,e[38]=T,e[39]=ne,e[40]=V,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=_,e[47]=P,e[48]=K,e[49]=o,e[50]=s.column_key,e[51]=s.cron_expression,e[52]=s.event_type,e[53]=s.from,e[54]=s.params,e[55]=ie):ie=e[55];let ue;e[56]!==_?(ue=_&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=_,e[57]=ue):ue=e[57];let me;e[58]!==y||e[59]!==k||e[60]!==S||e[61]!==o||e[62]!==s.cron_expression?(me=k&&!y&&!S&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.editSchedule"),onClick:()=>{D(s.cron_expression??""),b(!0)},children:t.jsx(zt,{size:13,className:"text-muted-foreground"})}),e[58]=y,e[59]=k,e[60]=S,e[61]=o,e[62]=s.cron_expression,e[63]=me):me=e[63];let te;e[64]!==P||e[65]!==o?(te=P&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",title:o("automations.triggerCard.rotateToken"),"aria-label":o("automations.triggerCard.rotateToken"),onClick:()=>u(!0),children:t.jsx(rs,{size:13,className:"text-muted-foreground"})}),e[64]=P,e[65]=o,e[66]=te):te=e[66];let fe;e[67]!==c||e[68]!==o?(fe=!c&&t.jsx(B,{variant:"ghost",size:"icon-sm",className:"opacity-0 group-hover:opacity-100 transition-opacity","aria-label":o("automations.triggerCard.removeStarter"),onClick:()=>f(!0),children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),e[67]=c,e[68]=o,e[69]=fe):fe=e[69];let se;e[70]!==ue||e[71]!==me||e[72]!==te||e[73]!==fe?(se=t.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[ue,me,te,fe]}),e[70]=ue,e[71]=me,e[72]=te,e[73]=fe,e[74]=se):se=e[74];let re;e[75]!==ie||e[76]!==se||e[77]!==Q?(re=t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 surface group",children:[Q,ie,se]}),e[75]=ie,e[76]=se,e[77]=Q,e[78]=re):re=e[78];let le;e[79]!==o?(le=o("automations.triggerCard.removeStarter"),e[79]=o,e[80]=le):le=e[80];let C;e[81]!==le?(C=t.jsx(pt,{children:le}),e[81]=le,e[82]=C):C=e[82];let M;e[83]!==o?(M=o("automations.triggerCard.confirmRemoveStarter"),e[83]=o,e[84]=M):M=e[84];let E;e[85]!==M?(E=t.jsx(xt,{children:M}),e[85]=M,e[86]=E):E=e[86];let pe;e[87]!==C||e[88]!==E?(pe=t.jsxs(gt,{children:[C,E]}),e[87]=C,e[88]=E,e[89]=pe):pe=e[89];let oe;e[90]!==o?(oe=o("automations.triggerCard.cancel"),e[90]=o,e[91]=oe):oe=e[91];let ce;e[92]!==oe?(ce=t.jsx(ht,{children:oe}),e[92]=oe,e[93]=ce):ce=e[93];let de;e[94]!==o?(de=o("automations.triggerCard.remove"),e[94]=o,e[95]=de):de=e[95];let I;e[96]!==H||e[97]!==de?(I=t.jsx(jt,{onClick:H,variant:"destructive",children:de}),e[96]=H,e[97]=de,e[98]=I):I=e[98];let z;e[99]!==ce||e[100]!==I?(z=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=z):z=e[101];let Z;e[102]!==pe||e[103]!==z?(Z=t.jsxs(bt,{children:[pe,z]}),e[102]=pe,e[103]=z,e[104]=Z):Z=e[104];let A;e[105]!==x||e[106]!==Z?(A=t.jsx(vt,{open:x,onOpenChange:f,children:Z}),e[105]=x,e[106]=Z,e[107]=A):A=e[107];let xe;e[108]!==o?(xe=o("automations.triggerCard.rotateWebhookToken"),e[108]=o,e[109]=xe):xe=e[109];let Ce;e[110]!==xe?(Ce=t.jsx(pt,{children:xe}),e[110]=xe,e[111]=Ce):Ce=e[111];let Ne;e[112]!==o?(Ne=o("automations.triggerCard.rotateWebhookTokenDescription"),e[112]=o,e[113]=Ne):Ne=e[113];let Se;e[114]!==Ne?(Se=t.jsx(xt,{children:Ne}),e[114]=Ne,e[115]=Se):Se=e[115];let ke;e[116]!==Ce||e[117]!==Se?(ke=t.jsxs(gt,{children:[Ce,Se]}),e[116]=Ce,e[117]=Se,e[118]=ke):ke=e[118];let Te;e[119]!==o?(Te=o("automations.triggerCard.cancel"),e[119]=o,e[120]=Te):Te=e[120];let we;e[121]!==Te?(we=t.jsx(ht,{children:Te}),e[121]=Te,e[122]=we):we=e[122];let De;e[123]!==o?(De=o("automations.triggerCard.rotate"),e[123]=o,e[124]=De):De=e[124];let _e;e[125]!==O||e[126]!==De?(_e=t.jsx(jt,{onClick:O,children:De}),e[125]=O,e[126]=De,e[127]=_e):_e=e[127];let Ie;e[128]!==we||e[129]!==_e?(Ie=t.jsxs(yt,{children:[we,_e]}),e[128]=we,e[129]=_e,e[130]=Ie):Ie=e[130];let Pe;e[131]!==ke||e[132]!==Ie?(Pe=t.jsxs(bt,{children:[ke,Ie]}),e[131]=ke,e[132]=Ie,e[133]=Pe):Pe=e[133];let Ae;e[134]!==g||e[135]!==Pe?(Ae=t.jsx(vt,{open:g,onOpenChange:u,children:Pe}),e[134]=g,e[135]=Pe,e[136]=Ae):Ae=e[136];const Be=h!==null;let Ve;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ve=L=>{L||p(null)},e[137]=Ve):Ve=e[137];const Ge=h?.url??null,He=h?.token??null;let $e;e[138]!==o?($e=o("automations.triggerCard.newWebhookToken"),e[138]=o,e[139]=$e):$e=e[139];let Oe;e[140]!==o?(Oe=o("automations.triggerCard.newWebhookTokenDescription"),e[140]=o,e[141]=Oe):Oe=e[141];let ze;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Oe?(ze=t.jsx(Jt,{open:Be,onOpenChange:Ve,url:Ge,token:He,title:$e,description:Oe}),e[142]=Be,e[143]=Ge,e[144]=He,e[145]=$e,e[146]=Oe,e[147]=ze):ze=e[147];let Ue;return e[148]!==re||e[149]!==A||e[150]!==Ae||e[151]!==ze?(Ue=t.jsxs(t.Fragment,{children:[re,A,Ae,ze]}),e[148]=re,e[149]=A,e[150]=Ae,e[151]=ze,e[152]=Ue):Ue=e[152],Ue}function Eo(r){const[e,s]=r;return`${e}: ${s}`}function Ko(r){const e=q.c(10),{from:s}=r,n=ee();let a;e[0]!==s||e[1]!==n?(a=!s||s.kind==="any"?null:s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.map(m=>We(m,n).label).join(", ")}):null,e[0]=s,e[1]=n,e[2]=a):a=e[2];const i=a;let c;e[3]!==n?(c=n("automations.triggerCard.unownedOnly"),e[3]=n,e[4]=c):c=e[4];let o;e[5]!==i||e[6]!==c?(o=[i,c].filter(Boolean),e[5]=i,e[6]=c,e[7]=o):o=e[7];const j=o.join(" · ");let d;return e[8]!==j?(d=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:j}),e[8]=j,e[9]=d):d=e[9],d}function Fo(r){const e=q.c(6),{from:s}=r,n=ee();if(!s||s.kind==="any")return null;let a;e[0]!==s.kind||e[1]!==s.statuses||e[2]!==n?(a=s.kind==="earlier"?n("automations.triggerCard.fromEarlier"):s.kind==="later"?n("automations.triggerCard.fromLater"):s.kind==="statuses"?n("automations.triggerCard.fromColumns",{columns:s.statuses.join(", ")}):null,e[0]=s.kind,e[1]=s.statuses,e[2]=n,e[3]=a):a=e[3];let i;return e[4]!==a?(i=t.jsx("span",{className:"text-xs text-muted-foreground/60 truncate",children:a}),e[4]=a,e[5]=i):i=e[5],i}function Mo(r){const e=q.c(70),{automationId:s,onDone:n}=r,a=ee();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={binding:"TRIGGER"},e[0]=i):i=e[0];const c=dt(i),[o,j]=w.useState(),[d,m]=w.useState();let x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x={},e[1]=x):x=e[1];const[f,g]=w.useState(x),{triggerAdd:u}=ve(),{data:h,isLoading:p}=Es(o);let l,y,v,N,S,b;if(e[2]!==u||e[3]!==s||e[4]!==o||e[5]!==d||e[6]!==p||e[7]!==n||e[8]!==f||e[9]!==a||e[10]!==c||e[11]!==h){const _=h?.find(U=>U.type===d);let k;e[18]!==u||e[19]!==s||e[20]!==o||e[21]!==d||e[22]!==n||e[23]!==f||e[24]!==a?(k=async()=>{if(!(!o||!d))try{await u.mutateAsync({automation_id:s,type:"event",event_type:d,connection_id:o,params:f}),Ke("automation_trigger_added",{automation_id:s,trigger_type:"event",connection_id:o,event_type:d}),X.success(a("automations.eventTriggerForm.successAdded")),n()}catch{X.error(a("automations.eventTriggerForm.errorFailed"))}},e[18]=u,e[19]=s,e[20]=o,e[21]=d,e[22]=n,e[23]=f,e[24]=a,e[25]=k):k=e[25],l=k,y="flex flex-col gap-3 px-3 py-3 surface";let P;e[26]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ut,{size:14,className:"text-muted-foreground shrink-0"}),e[26]=P):P=e[26];let $;e[27]!==a?($=a("automations.eventTriggerForm.title"),e[27]=a,e[28]=$):$=e[28];let R;e[29]!==$?(R=t.jsx("span",{className:"text-sm font-medium",children:$}),e[29]=$,e[30]=R):R=e[30];let K;e[31]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(mt,{size:13}),e[31]=K):K=e[31];let F;e[32]!==n?(F=t.jsx("button",{type:"button",className:"ml-auto shrink-0 p-0.5 text-muted-foreground hover:text-foreground rounded-lg",onClick:n,children:K}),e[32]=n,e[33]=F):F=e[33],e[34]!==R||e[35]!==F?(v=t.jsxs("div",{className:"flex items-center gap-2",children:[P,R,F]}),e[34]=R,e[35]=F,e[36]=v):v=e[36];const Y=o??"";let H;e[37]===Symbol.for("react.memo_cache_sentinel")?(H=U=>{j(U),m(void 0),g({})},e[37]=H):H=e[37];let W;e[38]!==a?(W=a("automations.eventTriggerForm.selectConnectionPlaceholder"),e[38]=a,e[39]=W):W=e[39];let G;e[40]!==W?(G=t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:W})}),e[40]=W,e[41]=G):G=e[41];let J;e[42]!==a||e[43]!==c?(J=c.length===0?t.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:a("automations.eventTriggerForm.noConnectionsWithTrigger")}):c.map(Vo),e[42]=a,e[43]=c,e[44]=J):J=e[44];let V;e[45]!==J?(V=t.jsx(ye,{children:J}),e[45]=J,e[46]=V):V=e[46],e[47]!==Y||e[48]!==G||e[49]!==V?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,V]}),e[47]=Y,e[48]=G,e[49]=V,e[50]=N):N=e[50],e[51]!==o||e[52]!==d||e[53]!==p||e[54]!==a||e[55]!==h?(S=o&&t.jsxs(ge,{value:d??"",onValueChange:U=>{m(U),g({})},children:[t.jsx(he,{className:"w-full",children:p?t.jsxs("span",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx(Le,{className:"size-[13px]"}),a("automations.eventTriggerForm.loadingEvents")]}):t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectEventTypePlaceholder"),children:d??a("automations.eventTriggerForm.selectEventTypePlaceholder")})}),t.jsx(ye,{children:h?.map(Lo)})]}),e[51]=o,e[52]=d,e[53]=p,e[54]=a,e[55]=h,e[56]=S):S=e[56],b=_?.paramsSchema&&Object.keys(_.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(_.paramsSchema).map(U=>{const[O,ae]=U;return t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsxs("label",{className:"text-xs text-muted-foreground",children:[O,ae.description&&t.jsxs("span",{className:"text-muted-foreground/60",children:[" ","— ",ae.description]})]}),ae.enum?t.jsxs(ge,{value:f[O]??"",onValueChange:ne=>g(Q=>({...Q,[O]:ne})),children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{placeholder:a("automations.eventTriggerForm.selectParamPlaceholder",{key:O})})}),t.jsx(ye,{children:ae.enum.map(Ro)})]}):t.jsx("input",{type:"text",value:f[O]??"",onChange:ne=>g(Q=>({...Q,[O]:ne.target.value})),placeholder:ae.description??O,className:"text-sm border border-border rounded-md bg-background px-2 py-1.5 focus-ring"})]},O)})}),e[2]=u,e[3]=s,e[4]=o,e[5]=d,e[6]=p,e[7]=n,e[8]=f,e[9]=a,e[10]=c,e[11]=h,e[12]=l,e[13]=y,e[14]=v,e[15]=N,e[16]=S,e[17]=b}else l=e[12],y=e[13],v=e[14],N=e[15],S=e[16],b=e[17];let T;e[57]!==u||e[58]!==o||e[59]!==d||e[60]!==l||e[61]!==a?(T=o&&d&&t.jsx(B,{size:"sm",onClick:l,disabled:u.isPending,children:u.isPending?t.jsx(Le,{className:"size-[13px]"}):a("automations.eventTriggerForm.addTriggerButton")}),e[57]=u,e[58]=o,e[59]=d,e[60]=l,e[61]=a,e[62]=T):T=e[62];let D;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(D=t.jsxs("div",{className:y,children:[v,N,S,b,T]}),e[63]=y,e[64]=v,e[65]=N,e[66]=S,e[67]=b,e[68]=T,e[69]=D):D=e[69],D}function Ro(r){return t.jsx(be,{value:r,children:r},r)}function Lo(r){return t.jsx(be,{value:r.type,children:t.jsxs("div",{className:"flex flex-col",children:[t.jsx("span",{children:r.type}),t.jsx("span",{className:"text-xs text-muted-foreground",children:r.description})]})},r.type)}function Vo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Uo=30;function Wo(r,e){switch(e.type){case"accumulate":{const s=r??{start:e.now,fields:new Set,saveCount:0},n=new Set(s.fields);for(const a of e.fields)n.add(a);return{...s,fields:n,saveCount:s.saveCount+1}}case"reset":return null}}function Bo({automationId:r,automation:e,onBack:s,onDelete:n}){const a=ee(),i=e.virtual_mcp_id,{org:c}=$t(),{update:o,triggerAdd:j,run:d}=ve(),m=dt(),x=new Map(m.map(C=>[C.id,C.title])),{openTask:f}=Fs(),{openSidePanel:g}=Js(),{sendMessage:u}=Ms(),h=e.messages?.[0]?.metadata?.tiptapDoc??void 0,[p,l]=w.useState(h),[y,v]=w.useState(!1),[N,S]=w.useState(!1),[b,T]=w.useState(!1),[D,_]=w.useState(""),[k,P]=w.useState(!1),[$,R]=w.useState(null),[K,F]=w.useState(!1),[Y,H]=w.useState(!1),[W,G]=w.useState(!1),J=async()=>{if(K)return;const M=Rs(p).filter(E=>E.type==="text").map(E=>E.text).join(`
|
|
20
|
+
`);if(M.trim()){F(!0);try{se(),Ke("automation_improve_clicked",{automation_id:r,agent_id:i,instructions_length:M.length}),g(),await u({tiptapDoc:zs({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},V=e.models?.tier??"smart",U=e.models?.modelId&&e.models?.credentialId?{modelId:e.models.modelId,credentialId:e.models.credentialId,title:e.models.modelTitle??e.models.modelId}:null,O=ls({defaultValues:{name:e.name,active:e.active,tier:V,modelOverride:U,tools:e.tools??null,maxAgentSteps:e.maxAgentSteps??null}}),ae=O.watch("active"),[ne,Q]=w.useReducer(Wo,null),ie=()=>{ne!==null&&(Ke("automation_updated",{automation_id:r,agent_id:i,fields:Array.from(ne.fields),save_count:ne.saveCount,edit_duration_ms:Date.now()-ne.start}),Q({type:"reset"}))},ue=async()=>{const C=O.control._formState.dirtyFields,M=Object.keys(C);if(M.length===0&&!W)return!0;const E=O.getValues(),pe=O.control._defaultValues;O.reset(E,{keepValues:!0});const oe=W;G(!1);const ce={tier:E.tier,...E.modelOverride?{modelId:E.modelOverride.modelId,credentialId:E.modelOverride.credentialId,modelTitle:E.modelOverride.title}:{}},de={id:r,name:E.name,active:E.active,models:ce,tools:E.tools,maxAgentSteps:E.maxAgentSteps,messages:Ls(p),temperature:0};try{await o.mutateAsync(de)}catch{return O.reset(pe,{keepValues:!0}),oe&&G(!0),!1}const I=[...M];return oe&&I.push("messages"),Q({type:"accumulate",now:Date.now(),fields:I}),fe(),!0},{schedule:me,flush:te}=Dt({save:ue}),{schedule:fe,flush:se}=Dt({delayMs:3e4,save:async()=>ie()});w.useEffect(()=>{const C=O.watch(()=>me());return()=>C.unsubscribe()},[]);const re=C=>{if(l(C),!Y){H(!0);return}G(!0),me()},le=async()=>{Ke("automation_test_clicked",{automation_id:r,agent_id:i});const C=await te();if(se(),!!C){if(!p){X.error(a("automations.automationDetail.noInstructionsConfigured"));return}try{const M=await d.mutateAsync(r);M.threadId&&(g(),f(M.threadId))}catch{}}};return t.jsxs(t.Fragment,{children:[s&&t.jsx("div",{className:"flex items-center pb-4 shrink-0",children:t.jsxs(B,{variant:"ghost",size:"sm",onClick:s,children:[t.jsx(Vt,{size:14}),a("automations.automationDetail.backToList")]})}),t.jsxs("div",{className:"flex flex-col gap-8",children:[t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[t.jsx(Ct,{control:O.control,name:"name",render:({field:C})=>t.jsx(Nt,{...C,placeholder:a("automations.automationDetail.automationNamePlaceholder"),className:"border border-transparent shadow-none px-0 text-lg font-medium h-auto focus-visible:ring-0 focus-visible:border-border bg-transparent flex-1",style:{boxShadow:"none"}})}),n&&t.jsx(B,{variant:"ghost-destructive",size:"icon",className:"shrink-0",onClick:n,children:t.jsx(Ys,{size:14})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Ct,{control:O.control,name:"active",render:({field:C})=>t.jsx(ct,{checked:C.value,onCheckedChange:M=>{C.onChange(M),te()},className:"cursor-pointer"})}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a(ae?"automations.automationDetail.active":"automations.automationDetail.inactive")}),t.jsx("span",{className:"text-muted-foreground/50 text-sm",children:"·"}),t.jsx(Os,{id:e.created_by,size:"2xs",className:"text-sm text-muted-foreground"})]})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.starter")}),t.jsx(Oo,{automationId:r,open:y,onOpenChange:v,onCustomSelect:()=>{T(!0),P(!1),_("")},onEventSelect:()=>{P(!0),T(!1)},onWebhookCreated:C=>{Ke("automation_trigger_added",{automation_id:r,trigger_type:"webhook"}),R(C)}})]}),e.triggers.length===0&&!b?t.jsx("div",{className:"rounded-lg border border-dashed border-border px-4 py-6 text-center",children:t.jsxs("p",{className:"text-sm text-muted-foreground",children:[a("automations.automationDetail.whenShouldRun")," ",t.jsx("button",{type:"button",className:"text-foreground underline underline-offset-2 cursor-pointer hover:text-foreground/80 transition-colors",onClick:()=>v(!0),children:a("automations.automationDetail.addStarter")})," ",a("automations.automationDetail.toGetGoing")]})}):t.jsx("div",{className:"flex flex-col gap-2",children:e.triggers.map(C=>t.jsx(Xt,{trigger:C,automationId:r,connectionName:C.connection_id?x.get(C.connection_id):void 0},C.id))}),b&&t.jsxs("div",{className:"flex items-center gap-2.5 px-3 py-2.5 rounded-lg border border-border bg-background group",children:[t.jsx(Me,{size:14,className:"text-muted-foreground shrink-0"}),t.jsx("input",{type:"text",value:D,onChange:C=>_(C.target.value),onBlur:async()=>{const C=D.trim();if(!(!C||!Re(C)))try{await j.mutateAsync({automation_id:r,type:"cron",cron_expression:C}),Ke("automation_trigger_added",{automation_id:r,trigger_type:"cron"}),X.success(a("automations.automationDetail.starterAdded")),T(!1),_("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=D.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),_(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),D&&!Re(D)&&t.jsx("span",{className:"text-xs text-muted-foreground/60 shrink-0",children:a("automations.automationDetail.invalid")}),j.isPending&&t.jsx(Le,{className:"size-[13px] text-muted-foreground shrink-0"}),t.jsx("button",{type:"button",className:"shrink-0 p-0.5 text-muted-foreground opacity-0 group-hover:opacity-100 hover:text-foreground transition-opacity rounded-lg",onClick:()=>{T(!1),_("")},children:t.jsx(mt,{size:13})})]}),k&&t.jsx(w.Suspense,{fallback:t.jsxs("div",{className:"flex items-center gap-2 px-3 py-3 rounded-lg border border-border bg-background",children:[t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),t.jsx("span",{className:"text-sm text-muted-foreground",children:a("automations.automationDetail.loadingConnections")})]}),children:t.jsx(Mo,{automationId:r,onDone:()=>P(!1)})}),t.jsx(Jt,{open:$!==null,onOpenChange:C=>{C||R(null)},url:$?.url??null,token:$?.token??null})]}),t.jsxs("div",{className:"flex flex-col gap-2.5",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.instructions")}),t.jsxs(B,{variant:"outline",size:"sm",className:"gap-1.5",disabled:K||!p,onClick:J,children:[t.jsx(Et,{size:13}),a("automations.automationDetail.improve")]})]}),t.jsx(Qs,{tiptapDoc:p,setTiptapDoc:re,placeholder:a("automations.automationDetail.instructionsPlaceholder"),children:t.jsxs("div",{className:"rounded-xl border border-border min-h-[120px] flex flex-col",children:[t.jsx(Zs,{virtualMcpId:i||null,className:"max-h-[45vh]"}),t.jsx("div",{className:"@container/chat-bottom flex items-center justify-end gap-1.5 p-2.5",children:t.jsxs(Bs,{children:[t.jsx(Gs,{asChild:!0,children:t.jsxs(B,{type:"button",variant:"default",className:"gap-1.5",onClick:le,disabled:!i,children:[t.jsx(Xs,{size:16}),a("automations.automationDetail.test")]})}),t.jsx(Hs,{children:a("automations.automationDetail.testAutomation")})]})})]})})]}),t.jsxs(Vs,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Us,{className:"group flex w-fit cursor-pointer items-center gap-1.5",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.advanced")}),t.jsx(rt,{size:14,className:"text-muted-foreground/60 transition-transform group-data-[state=open]:rotate-180"})]}),t.jsxs(Ws,{className:"flex flex-col gap-5 pt-0.5",children:[t.jsx(fo,{tier:O.watch("tier"),onTierChange:C=>O.setValue("tier",C,{shouldDirty:!0}),override:O.watch("modelOverride"),onOverrideChange:C=>O.setValue("modelOverride",C,{shouldDirty:!0})}),t.jsx(ho,{agentId:i||null,value:O.watch("tools"),onChange:C=>O.setValue("tools",C,{shouldDirty:!0})}),t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:a("automations.automationDetail.maxSteps")}),t.jsx(Nt,{type:"number",min:1,max:100,className:"w-40",placeholder:a("automations.automationDetail.maxStepsPlaceholder",{default:Uo}),value:O.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),E=M===""?null:Number(M);O.setValue("maxAgentSteps",E===null||Number.isNaN(E)?null:E,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=q.c(55),{automation:s}=r,n=ee(),{update:a}=ve();let i;e[0]!==s.name?(i=t.jsx("h2",{className:"text-lg font-medium text-foreground",children:s.name}),e[0]=s.name,e[1]=i):i=e[1];let c;e[2]!==n?(c=n("automations.builtin.badge"),e[2]=n,e[3]=c):c=e[3];let o;e[4]!==c?(o=t.jsx(Kt,{variant:"muted",children:c}),e[4]=c,e[5]=o):o=e[5];let j;e[6]!==i||e[7]!==o?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[i,o]}),e[6]=i,e[7]=o,e[8]=j):j=e[8];let d;e[9]!==s.id||e[10]!==a?(d=_=>a.mutate({id:s.id,active:_}),e[9]=s.id,e[10]=a,e[11]=d):d=e[11];let m;e[12]!==s.active||e[13]!==d||e[14]!==a.isPending?(m=t.jsx(ct,{checked:s.active,disabled:a.isPending,onCheckedChange:d,className:"cursor-pointer"}),e[12]=s.active,e[13]=d,e[14]=a.isPending,e[15]=m):m=e[15];let x;e[16]!==s.active||e[17]!==n?(x=s.active?n("automations.automationDetail.active"):n("automations.automationDetail.inactive"),e[16]=s.active,e[17]=n,e[18]=x):x=e[18];let f;e[19]!==x?(f=t.jsx("span",{className:"text-sm text-muted-foreground",children:x}),e[19]=x,e[20]=f):f=e[20];let g;e[21]!==m||e[22]!==f?(g=t.jsxs("div",{className:"flex items-center gap-2",children:[m,f]}),e[21]=m,e[22]=f,e[23]=g):g=e[23];let u;e[24]!==j||e[25]!==g?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[j,g]}),e[24]=j,e[25]=g,e[26]=u):u=e[26];let h;e[27]!==n?(h=n("automations.automationDetail.starter"),e[27]=n,e[28]=h):h=e[28];let p;e[29]!==h?(p=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:h}),e[29]=h,e[30]=p):p=e[30];let l;if(e[31]!==s.id||e[32]!==s.triggers){let _;e[34]!==s.id?(_=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=_):_=e[35],l=s.triggers.map(_),e[31]=s.id,e[32]=s.triggers,e[33]=l}else l=e[33];let y;e[36]!==p||e[37]!==l?(y=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[p,l]}),e[36]=p,e[37]=l,e[38]=y):y=e[38];let v;e[39]!==n?(v=n("automations.automationDetail.instructions"),e[39]=n,e[40]=v):v=e[40];let N;e[41]!==v?(N=t.jsx("span",{className:"text-xs font-semibold text-muted-foreground/60",children:v}),e[41]=v,e[42]=N):N=e[42];let S;e[43]!==s.system_key||e[44]!==n?(S=s.system_key==="implementer"?n("automations.builtin.implementerDescription"):s.system_key==="reviewer"?n("automations.builtin.reviewerDescription"):s.system_key==="linked_chats"?n("automations.builtin.linkedChatsDescription"):s.system_key==="pr_merged"?n("automations.builtin.prMergedDescription"):s.system_key==="chat_pr"?n("automations.builtin.chatPrDescription"):n("automations.builtin.description"),e[43]=s.system_key,e[44]=n,e[45]=S):S=e[45];let b;e[46]!==S?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:S}),e[46]=S,e[47]=b):b=e[47];let T;e[48]!==N||e[49]!==b?(T=t.jsxs("div",{className:"flex flex-col gap-2.5",children:[N,b]}),e[48]=N,e[49]=b,e[50]=T):T=e[50];let D;return e[51]!==u||e[52]!==y||e[53]!==T?(D=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=D):D=e[54],D}const Yt=[{key:"24h",labelKey:"mainPanelTabs.automationTab.last24hours",ms:1440*60*1e3},{key:"7d",labelKey:"mainPanelTabs.automationTab.last7days",ms:10080*60*1e3},{key:"30d",labelKey:"mainPanelTabs.automationTab.last30days",ms:720*60*60*1e3}];function Qt(r){const e=Yt.find(n=>n.key===r).ms,s=Date.now();return{startDate:new Date(s-e).toISOString(),endDate:new Date(s).toISOString()}}function Ho(r){const e=q.c(16),{automationId:s,triggerIds:n}=r,a=ee(),[i,c]=w.useState("30d"),[o,j]=w.useState(Jo);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=p=>{const l=p;c(l),j(Qt(l))},e[0]=d):d=e[0];let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(he,{className:"w-44",children:t.jsx(je,{})}),e[1]=m):m=e[1];let x;e[2]!==a?(x=Yt.map(p=>t.jsx(be,{value:p.key,children:a(p.labelKey)},p.key)),e[2]=a,e[3]=x):x=e[3];let f;e[4]!==x?(f=t.jsx(ye,{children:x}),e[4]=x,e[5]=f):f=e[5];let g;e[6]!==f||e[7]!==i?(g=t.jsx("div",{className:"flex items-center justify-end",children:t.jsxs(ge,{value:i,onValueChange:d,children:[m,f]})}),e[6]=f,e[7]=i,e[8]=g):g=e[8];let u;e[9]!==s||e[10]!==o||e[11]!==n?(u=t.jsx(ro,{automationId:s,triggerIds:n,range:o}),e[9]=s,e[10]=o,e[11]=n,e[12]=u):u=e[12];let h;return e[13]!==g||e[14]!==u?(h=t.jsxs("div",{className:"flex flex-col gap-5",children:[g,u]}),e[13]=g,e[14]=u,e[15]=h):h=e[15],h}function Jo(){return Qt("30d")}function Xo(r){const e=q.c(5),{tabId:s}=r;let n;e[0]!==s?(n=ds(s),e[0]=s,e[1]=n):n=e[1];const a=n;if(!a)return null;let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ze,{}),e[2]=i):i=e[2];let c;return e[3]!==a.id?(c=t.jsx(w.Suspense,{fallback:i,children:t.jsx(Yo,{id:a.id})}),e[3]=a.id,e[4]=c):c=e[4],c}function Yo(r){const e=q.c(41),{id:s}=r,n=ee(),{openPanel:a}=co(),{data:i,isLoading:c}=Ks(s),[o,j]=w.useState("settings");let d;e[0]!==a?(d=()=>a("automations"),e[0]=a,e[1]=d):d=e[1];const m=d;if(c){let k;return e[2]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Ze,{}),e[2]=k):k=e[2],k}if(!i){let k;e[3]!==n?(k=n("mainPanelTabs.automationTab.automationNotFound"),e[3]=n,e[4]=k):k=e[4];let P;return e[5]!==k?(P=t.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:k}),e[5]=k,e[6]=P):P=e[6],P}let x;e[7]!==i.triggers?(x=i.triggers.map(Qo),e[7]=i.triggers,e[8]=x):x=e[8];const f=x;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Vt,{size:14}),e[9]=g):g=e[9];let u;e[10]!==n?(u=n("mainPanelTabs.automationTab.backToList"),e[10]=n,e[11]=u):u=e[11];let h;e[12]!==m||e[13]!==u?(h=t.jsxs(B,{variant:"ghost",size:"sm",onClick:m,children:[g,u]}),e[12]=m,e[13]=u,e[14]=h):h=e[14];let p;e[15]!==n?(p=n("mainPanelTabs.automationTab.settings"),e[15]=n,e[16]=p):p=e[16];let l;e[17]!==p?(l={id:"settings",label:p},e[17]=p,e[18]=l):l=e[18];let y;e[19]!==n?(y=n("mainPanelTabs.automationTab.runs"),e[19]=n,e[20]=y):y=e[20];let v;e[21]!==y?(v={id:"runs",label:y},e[21]=y,e[22]=v):v=e[22];let N;e[23]!==l||e[24]!==v?(N=[l,v],e[23]=l,e[24]=v,e[25]=N):N=e[25];let S;e[26]===Symbol.for("react.memo_cache_sentinel")?(S=k=>j(k),e[26]=S):S=e[26];let b;e[27]!==N||e[28]!==o?(b=t.jsx(lo,{placement:"page",tabs:N,activeTab:o,onTabChange:S}),e[27]=N,e[28]=o,e[29]=b):b=e[29];let T;e[30]!==b||e[31]!==h?(T=t.jsxs("div",{className:"flex items-center justify-between pb-4 shrink-0",children:[h,b]}),e[30]=b,e[31]=h,e[32]=T):T=e[32];let D;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(D=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Ze,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=D):D=e[37];let _;return e[38]!==T||e[39]!==D?(_=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,D]})})}),e[38]=T,e[39]=D,e[40]=_):_=e[40],_}function Qo(r){return r.id}function Zo(){const r=q.c(3);let e;r[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},r[0]=e):e=r[0];const{automationId:s}=ms(e);let n;return r[1]!==s?(n=s?t.jsx(Xo,{tabId:`automation:${s}`}):null,r[1]=s,r[2]=n):n=r[2],n}function ji(){const r=q.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Zo,{})}),r[0]=e):e=r[0],e}export{ji as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,b as O,r as G,j as e,n as m,C as Q,B as F,b2 as U}from"./index-
|
|
1
|
+
import{c as S,b as O,r as G,j as e,n as m,C as Q,B as F,b2 as U}from"./index-dqTonPuB.js";import{C as W}from"./index-eXjVYv9z.js";import{s as X}from"./Plus-c2_sBI5f.js";import{F as Y}from"./agent-icon-Di1pcjRb.js";import{i as V}from"./ZoomOut-lxtq8ebL.js";import{S as Z}from"./search-input-CeTAKge4.js";import{E as $}from"./empty-state-BG-ZsMM5.js";import{u as tt,a as et,b as it}from"./use-automations-HMhC6FE5.js";import{a as ot}from"./use-panel-navigate-kG8bT637.js";import{A as st}from"./automation-list-row-xTorJPTy.js";import{b as rt}from"./thread-route-DyeAWeVv.js";import"./use-mobile-0wDKszAH.js";import"./use-sidebar-collapsed-B__PkJPm.js";import"./use-chat-layout-state-SXC1aBSP.js";import"./thread-intent-DmSTHfJV.js";import"./use-mcp-client-NiHnmnpB.js";import"./auth-CrD9p86I.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-Cg72K5y9.js";import"./task-board-C3TfKsEu.js";import"./schema-BQgw-8fk.js";import"./slugify-CEUa2lfQ.js";import"./tooltip-CkhWwifD.js";import"./index-YTZffZ6U.js";import"./toolbar-icon-button-BTNIHkHm.js";import"./shell-layout-Dhack47g.js";import"./Building02-Do3lJJG5.js";import"./UserSquare-DCu-qtdW.js";import"./XClose-DVoCm2qG.js";import"./use-project-scope-DQ4byfJ8.js";import"./repository-binding-0L-NOau4.js";import"./CheckCircle-BC_4MefA.js";import"./Monitor01-BhbrGCAs.js";import"./use-clock-tick-BzkvK9xF.js";import"./Tool01-BxbHHa0T.js";import"./command-sLy5v5Id.js";import"./index-Bi8Dcq6x.js";import"./SearchMd-CbbZJW9W.js";import"./integration-icon-CadbREtM.js";import"./LinkBroken01-CAJodWFv.js";import"./project-icon-Fuoy9xbW.js";import"./new-project-dialog-CvrV-V2w.js";import"./ArrowLeft-DA6W7NwW.js";import"./label-B9vYlzdO.js";import"./repository-import-picker-DepdN5-B.js";import"./use-navigate-to-agent-CHgAma_A.js";import"./repository-picker-Dva3lcTN.js";import"./useInfiniteQuery-BqRsoJ1h.js";import"./infiniteQueryObserver-Dn-uClrW.js";import"./collection-search-DyeQXfCG.js";import"./ShoppingBag01-6U3SUMRX.js";import"./use-debounced-value-CgkCbE-q.js";import"./use-organization-settings-Bj3c26BX.js";import"./required-auth-layout-CF04eiX-.js";import"./autosend-DXH6RsEM.js";import"./use-org-sso-4bOeKtTK.js";import"./sheet-CInqTfvf.js";import"./resizable-l4I_T5Kn.js";import"./AlertCircle-C8rwN6lq.js";import"./ArrowUp-DOqWtjlR.js";import"./ChevronUp-BnMEqZ-7.js";import"./ChevronSelectorVertical-DmnbHDqu.js";import"./Copy01-DhHOI-Q9.js";import"./CreditCard01-Dw2OjkWU.js";import"./DotsVertical-B-InRCR0.js";import"./Image01-DKlCpScV.js";import"./Globe04-CtMJQj21.js";import"./SwitchHorizontal01-CxSk-wEa.js";import"./Key01-DBwoRjUY.js";import"./Link01-BBqxtXMI.js";import"./Minus-DiHVm4BN.js";import"./Sun-DVWc_O6K.js";import"./Play-BcZ_GeUq.js";import"./Trash01-BuZ3631A.js";import"./Upload01-Bo2ttnFV.js";import"./Users01-BC6qYZnG.js";import"./badge-DNQVmTxF.js";function nt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function mt(o){const t=S.c(45),{virtualMcpId:r}=o,i=O(),{openPanel:n}=ot(),{data:D,error:M}=tt(r),v=D===void 0?[]:D,{create:y}=et(),[_,H]=G.useState("");if(M&&nt(M)){let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=e.jsx(Y,{size:48,className:"text-muted-foreground"}),t[0]=s):s=t[0];let x;t[1]!==i?(x=i("automations.setupRequired.title"),t[1]=i,t[2]=x):x=t[2];let h;t[3]!==i?(h=i("automations.setupRequired.description"),t[3]=i,t[4]=h):h=t[4];let j;t[5]!==n?(j=()=>n("settings"),t[5]=n,t[6]=j):j=t[6];let g;t[7]!==i?(g=i("automations.setupRequired.goToSetup"),t[7]=i,t[8]=g):g=t[8];let C;t[9]!==j||t[10]!==g?(C=e.jsx(F,{size:"sm",onClick:j,children:g}),t[9]=j,t[10]=g,t[11]=C):C=t[11];let N;return t[12]!==x||t[13]!==h||t[14]!==C?(N=e.jsx(m,{children:e.jsx(m.Content,{children:e.jsx(m.Container,{children:e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:s,title:x,description:h,actions:C})})})})}),t[12]=x,t[13]=h,t[14]=C,t[15]=N):N=t[15],N}const J=_.toLowerCase(),q=v.filter(s=>s.name.toLowerCase().includes(J));let w;t[16]!==n?(w=s=>n(`automation:${s}`),t[16]=n,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:r,existing_count:v.length});const s=await y.mutateAsync(it(r));B(s.id)},K=y.isPending;let b;t[18]===Symbol.for("react.memo_cache_sentinel")?(b=e.jsx(X,{size:14}),t[18]=b):b=t[18];let a;t[19]!==i?(a=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=a):a=t[20];let A;t[21]!==y.isPending||t[22]!==R||t[23]!==a?(A=e.jsxs(F,{size:"sm",onClick:R,disabled:K,children:[b,a]}),t[21]=y.isPending,t[22]=R,t[23]=a,t[24]=A):A=t[24];const P=A,T=m,E=m,k=m;let l;t[25]!==i?(l=i("automations.automationsList.title"),t[25]=i,t[26]=l):l=t[26];let c;t[27]!==P||t[28]!==l?(c=e.jsx(m.Title,{actions:P,children:l}),t[27]=P,t[28]=l,t[29]=c):c=t[29];const z=v.length>0&&e.jsx(Z,{value:_,onChange:H,placeholder:i("automations.automationsList.searchPlaceholder"),className:"w-full md:w-[375px]"});let p;t[30]!==z?(p=e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-3",children:z}),t[30]=z,t[31]=p):p=t[31];let u;t[32]!==c||t[33]!==p?(u=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,p]}),t[32]=c,t[33]=p,t[34]=u):u=t[34];const I=v.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(V,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.emptyTitle"),description:i("automations.automationsList.emptyDescription"),actions:!1})}):q.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx($,{image:e.jsx(V,{size:48,className:"text-muted-foreground"}),title:i("automations.automationsList.noResultsTitle"),description:i("automations.automationsList.noResultsDescription",{search:_})})}):e.jsx("div",{className:"mt-6 flex flex-col divide-y divide-border overflow-hidden rounded-xl bg-card shadow-edge",children:q.map(s=>e.jsx(st,{automation:s,onClick:()=>B(s.id)},s.id))});let d;t[35]!==u||t[36]!==I||t[37]!==k.Container?(d=e.jsxs(k.Container,{children:[u,I]}),t[35]=u,t[36]=I,t[37]=k.Container,t[38]=d):d=t[38];let f;t[39]!==d||t[40]!==E.Content?(f=e.jsx(E.Content,{children:d}),t[39]=d,t[40]=E.Content,t[41]=f):f=t[41];let L;return t[42]!==T||t[43]!==f?(L=e.jsx(T,{children:f}),t[42]=T,t[43]=f,t[44]=L):L=t[44],L}function at(o){const t=S.c(3),{virtualMcpId:r}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let n;return t[1]!==r?(n=e.jsx(G.Suspense,{fallback:i,children:e.jsx(mt,{virtualMcpId:r})}),t[1]=r,t[2]=n):n=t[2],n}function lt(){const o=S.c(2),t=rt();let r;return o[0]!==t?(r=e.jsx(at,{virtualMcpId:t}),o[0]=t,o[1]=r):r=o[1],r}function ze(){const o=S.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(W.Content,{children:e.jsx(lt,{})}),o[0]=t):t=o[0],t}export{ze as default};
|