decocms 4.601.0 → 4.602.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DsrPAFxJ.js → AlertCircle-B4BiejsA.js} +1 -1
- package/dist/client/assets/{AreaChart-Dapr1lDG.js → AreaChart-KuZY2lVT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-CedOhlJl.js → ArrowLeft-DpoZP_fX.js} +1 -1
- package/dist/client/assets/{ArrowRight-D31ooF9_.js → ArrowRight-waHzto0g.js} +1 -1
- package/dist/client/assets/{ArrowUp-O_SFXcX4.js → ArrowUp-C2dE69W7.js} +1 -1
- package/dist/client/assets/{BookOpen01-hQOgpoT0.js → BookOpen01-Det9naRR.js} +1 -1
- package/dist/client/assets/{CartesianChart-U1wUiTwj.js → CartesianChart-BN-yZqL0.js} +1 -1
- package/dist/client/assets/{CategoricalChart-CUg_BAiA.js → CategoricalChart-D9Euwg-G.js} +1 -1
- package/dist/client/assets/{CheckCircle-C5F-vu0b.js → CheckCircle-BNEuJPHU.js} +1 -1
- package/dist/client/assets/{ChevronDown-XAF5UTWS.js → ChevronDown-_sr4up4D.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-BgyFVvCt.js → ChevronSelectorVertical-Ddl6sDao.js} +1 -1
- package/dist/client/assets/{ChevronUp-DXb5SN9G.js → ChevronUp-CK7Ad_mD.js} +1 -1
- package/dist/client/assets/{CreditCard01-V_X-1km6.js → CreditCard01-DaUYIK4F.js} +1 -1
- package/dist/client/assets/{Eye-DKA9KO8s.js → Eye-CYtkFg_6.js} +1 -1
- package/dist/client/assets/{File02-CWJddKT5.js → File02-Dj9EXPDT.js} +1 -1
- package/dist/client/assets/{Fingerprint04-DnZul7lc.js → Fingerprint04-kauf3nbZ.js} +1 -1
- package/dist/client/assets/{Globe04-Bkkv-44s.js → Globe04-YQZG_Qbl.js} +1 -1
- package/dist/client/assets/{Image01-w45LU6DD.js → Image01-ChEwjYSJ.js} +1 -1
- package/dist/client/assets/{Key01-hOPkG93k.js → Key01-DPAOwUET.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C3gp1GTI.js → LayoutLeft-DUieRSDJ.js} +1 -1
- package/dist/client/assets/{LinkBroken01-DXQIXK4a.js → LinkBroken01-jFeLEleD.js} +1 -1
- package/dist/client/assets/{MessageCircle01-CBwz3pkx.js → MessageCircle01-Cf5Qa_r1.js} +1 -1
- package/dist/client/assets/{Minus-C6nnb5U7.js → Minus-DVAnrb98.js} +1 -1
- package/dist/client/assets/{Monitor01-D5ASDXL3.js → Monitor01-D5to20Na.js} +1 -1
- package/dist/client/assets/{Play-BE2Gbr5-.js → Play-DBG3GXxW.js} +1 -1
- package/dist/client/assets/{Plus-BKnmVwDY.js → Plus-BEFFoW2D.js} +1 -1
- package/dist/client/assets/{ReferenceLine-cN7qvaot.js → ReferenceLine-B0MbZ3gg.js} +1 -1
- package/dist/client/assets/{SearchMd-BdbsDxg8.js → SearchMd-BVX4smTx.js} +1 -1
- package/dist/client/assets/{ShoppingBag01-D0FD1HPP.js → ShoppingBag01-Bvm3sWvz.js} +1 -1
- package/dist/client/assets/{Sun-DAly365K.js → Sun-D2fDzKM6.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BoKcCD1g.js → SwitchHorizontal01-CgqtVqHH.js} +1 -1
- package/dist/client/assets/{Tool01-B-fgmM-0.js → Tool01-B97c8idL.js} +1 -1
- package/dist/client/assets/{Tooltip-DkaZU76c.js → Tooltip-Dc_sC0mP.js} +1 -1
- package/dist/client/assets/{Trash01-Dzo6NInS.js → Trash01-Bi3fjf_i.js} +1 -1
- package/dist/client/assets/{Upload01-DQgVu-9N.js → Upload01-B0N1cyeo.js} +1 -1
- package/dist/client/assets/{UserCheck01-BMORoWuy.js → UserCheck01-CjBhJIbn.js} +1 -1
- package/dist/client/assets/{UserSquare-BUy12Lbf.js → UserSquare-D0WQA2_a.js} +1 -1
- package/dist/client/assets/{Users01-t7brRFdK.js → Users01-CNLWTh0g.js} +1 -1
- package/dist/client/assets/{XClose-Bze4d5nj.js → XClose-CUoBDo4j.js} +1 -1
- package/dist/client/assets/{Zap-BiLLX5O9.js → Zap-D5Q1SF5c.js} +1 -1
- package/dist/client/assets/{access-gate-Cdu8oC60.js → access-gate-B0i3LdD3.js} +1 -1
- package/dist/client/assets/{add-connection-dialog-BXLWFF1K.js → add-connection-dialog-QaQFm_sJ.js} +1 -1
- package/dist/client/assets/agent-app-CfZ2_qAg.js +1 -0
- package/dist/client/assets/{agent-assets-B14KImOx.js → agent-assets-Ci2UQ3kI.js} +1 -1
- package/dist/client/assets/{agent-automation-BeOuFVQx.js → agent-automation-Nh9VJD4K.js} +3 -3
- package/dist/client/assets/{agent-automations-6VI96Fi7.js → agent-automations-BqhkNuFU.js} +1 -1
- package/dist/client/assets/agent-blog-Dqo7yXQe.js +2 -0
- package/dist/client/assets/agent-blog-post-DRqbdGm9.js +2 -0
- package/dist/client/assets/agent-business-case-CAQgqun2.js +1 -0
- package/dist/client/assets/{agent-calendar-DN3eHKvu.js → agent-calendar-C_2UFnlZ.js} +1 -1
- package/dist/client/assets/{agent-capabilities-BYxoy39x.js → agent-capabilities-O4jivf-X.js} +1 -1
- package/dist/client/assets/{agent-connect-sources-B_QZIQuo.js → agent-connect-sources-e12r6R6U.js} +1 -1
- package/dist/client/assets/agent-deck-B7f0cKPF.js +1 -0
- package/dist/client/assets/{agent-e2e-VAu4Qx7U.js → agent-e2e-JJXAQruo.js} +1 -1
- package/dist/client/assets/agent-experiments-BBLc6sXg.js +1 -0
- package/dist/client/assets/agent-file-D8sDhpVS.js +1 -0
- package/dist/client/assets/{agent-hosting-ClHLlWGR.js → agent-hosting-_9l_P5l2.js} +1 -1
- package/dist/client/assets/{agent-icon-BD0ZSOtG.js → agent-icon-y2SKybSP.js} +1 -1
- package/dist/client/assets/agent-library-DEBDdT7D.js +1 -0
- package/dist/client/assets/agent-library-file-DL3_cgBw.js +1 -0
- package/dist/client/assets/agent-overview-jQZh1dQH.js +1 -0
- package/dist/client/assets/{agent-releases-hQDgEh8C.js → agent-releases-DNsRG5FD.js} +2 -2
- package/dist/client/assets/agent-settings-C47TLRPM.js +1 -0
- package/dist/client/assets/{agent-site-editor-HTEY5crd.js → agent-site-editor-B7tCcSvo.js} +1 -1
- package/dist/client/assets/agent-site-editor-code-DPz3ZIvH.js +2 -0
- package/dist/client/assets/agent-site-editor-content-COxClvme.js +1 -0
- package/dist/client/assets/agent-site-editor-preview-CAin8bHi.js +1 -0
- package/dist/client/assets/agent-view-DkUvvSxM.js +1 -0
- package/dist/client/assets/{agent-view-guard-BdBdhwzP.js → agent-view-guard-CHMCp4na.js} +1 -1
- package/dist/client/assets/ai-providers-DSfUDWX0.js +1 -0
- package/dist/client/assets/{alert-CuyuxCBB.js → alert-565fy8M1.js} +1 -1
- package/dist/client/assets/{analytics-sections-C5mQGdAt.js → analytics-sections-CEmkg_2B.js} +1 -1
- package/dist/client/assets/{api-keys-Dk8HB9Wv.js → api-keys-Bz1LryNm.js} +1 -1
- package/dist/client/assets/api-keys-dDDIaFES.js +1 -0
- package/dist/client/assets/app-editor-eBT6vuSI.js +1 -0
- package/dist/client/assets/{asset-utils-CtdzkGeJ.js → asset-utils-BDk7TImr.js} +1 -1
- package/dist/client/assets/{auth-CAOOT2we.js → auth-D7Uu7n_e.js} +1 -1
- package/dist/client/assets/{auth-catchall-CV4sAhsc.js → auth-catchall-C_afKPwz.js} +1 -1
- package/dist/client/assets/{auth-entry-DH5zjA3N.js → auth-entry-CrTd5O-K.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DagqHqlo.js → auth-split-layout-n4Rc1SQ7.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-8D6qGyYY.js → authenticate-and-persist-oauth-C7CYUnX8.js} +1 -1
- package/dist/client/assets/{automation-list-row-Cdv28_DW.js → automation-list-row-CUaTcT3h.js} +1 -1
- package/dist/client/assets/{automation-runs-DV0vxgsZ.js → automation-runs-C6tWYqF5.js} +1 -1
- package/dist/client/assets/{automations-BKHxUskh.js → automations-f99KCPWc.js} +1 -1
- package/dist/client/assets/{badge-BokVussq.js → badge-CdntSWLw.js} +1 -1
- package/dist/client/assets/{block-document-wEV3Rzyg.js → block-document-dwVjY8ei.js} +1 -1
- package/dist/client/assets/{blocks-preview-workspace-context-D5wvrN3Q.js → blocks-preview-workspace-context-Dn_RDSoz.js} +1 -1
- package/dist/client/assets/{blocks-tab-states-Dg2hewP6.js → blocks-tab-states-clMxtmY8.js} +1 -1
- package/dist/client/assets/{blog-preview-url-DojRzjkz.js → blog-preview-url-BxEndwKO.js} +1 -1
- package/dist/client/assets/{blog-schema-Dsa0bBQd.js → blog-schema-C2rs0u9l.js} +1 -1
- package/dist/client/assets/{blog-source-gate-D0uj7z1Z.js → blog-source-gate-BXEDNt3_.js} +1 -1
- package/dist/client/assets/{blog-view-gate-B3wlo8FI.js → blog-view-gate-BEqdtyeU.js} +1 -1
- package/dist/client/assets/{buckets-BDCq2-7b.js → buckets-CYYLsl9x.js} +1 -1
- package/dist/client/assets/{build-improve-prompt-doc-L7dFyzUW.js → build-improve-prompt-doc-DkcwrW0T.js} +1 -1
- package/dist/client/assets/{calendar-BiZh8nNR.js → calendar-CQCK8RMi.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dma-JUvI.js → capability-load-error-xI_9h3pT.js} +1 -1
- package/dist/client/assets/category-editor-C7K4UFzc.js +1 -0
- package/dist/client/assets/{category-tree-DAVAIQah.js → category-tree-k_En3Ghr.js} +1 -1
- package/dist/client/assets/{chart-oTSIWppX.js → chart-ymFJV291.js} +2 -2
- package/dist/client/assets/chat-context-3o15fH-n.js +44 -0
- package/dist/client/assets/{chat-draft-CyZX0c2K.js → chat-draft-DkTLJIsD.js} +1 -1
- package/dist/client/assets/{checkbox-lB4BY1Fl.js → checkbox-DG0VRyZt.js} +1 -1
- package/dist/client/assets/{choose-editor-XmdROGh-.js → choose-editor-BuYE419X.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CdBY3aKl.js → cli-auth-success-kFD_vr-8.js} +1 -1
- package/dist/client/assets/cms-settings-editor-CAjj_23i.js +1 -0
- package/dist/client/assets/{cms-store-drafts-6uS5wCqC.js → cms-store-drafts-JEUeezAR.js} +1 -1
- package/dist/client/assets/{collapsible-DOENRXml.js → collapsible-CUOhSps5.js} +1 -1
- package/dist/client/assets/collection-detail-BpgRZNNv.js +1 -0
- package/dist/client/assets/{collection-display-button-BPkwEbCH.js → collection-display-button-DmC5C_DJ.js} +1 -1
- package/dist/client/assets/{collection-search-CIcbLnU-.js → collection-search-gjXSkcT8.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BPjSO-Mu.js → collection-table-wrapper-CzCDnwLo.js} +1 -1
- package/dist/client/assets/{collection-tabs-DRGUwBWl.js → collection-tabs-COt6y1YG.js} +1 -1
- package/dist/client/assets/{combobox-klxrcVPh.js → combobox-CH-LlA2d.js} +1 -1
- package/dist/client/assets/{command-B6aoeD_0.js → command-BvXS_hwC.js} +1 -1
- package/dist/client/assets/{companion-mcps-section-C1_BKNh7.js → companion-mcps-section-hLgHegzh.js} +1 -1
- package/dist/client/assets/{config-C5d81tv3.js → config-Bn2m6WJs.js} +1 -1
- package/dist/client/assets/{connect-UzjTwqG8.js → connect-D3u8EgEX.js} +3 -3
- package/dist/client/assets/{connect-key-DHs0GcpL.js → connect-key-txW2Hv5F.js} +1 -1
- package/dist/client/assets/{connect-layout-DQICz-4S.js → connect-layout-BkGodyIz.js} +1 -1
- package/dist/client/assets/{connect-source-dialog-CtUb95qE.js → connect-source-dialog-Fx070D3z.js} +1 -1
- package/dist/client/assets/{connection-B5tcoD6Y.js → connection-D4RX46wh.js} +1 -1
- package/dist/client/assets/{connection-card-BjRa9KdK.js → connection-card-DTpr3C0a.js} +1 -1
- package/dist/client/assets/{connection-detail-BoCe1E05.js → connection-detail-CKts1Pg1.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-K5ERTNyH.js → connection-form-helpers-Bk5WpOzS.js} +1 -1
- package/dist/client/assets/{connection-slug-Db3zbztV.js → connection-slug-BuWfvd-P.js} +1 -1
- package/dist/client/assets/{connections-j54TKze_.js → connections-qrxxtSxS.js} +1 -1
- package/dist/client/assets/{content-changes-r32OQ0Qx.js → content-changes-Dwsp4uvc.js} +1 -1
- package/dist/client/assets/{content-tab-Dx0W8ww1.js → content-tab-BoA46Vo_.js} +3 -3
- package/dist/client/assets/{context-B_P3yNhX.js → context-D6GeU9Zr.js} +1 -1
- package/dist/client/assets/{context-menu-O40xDnBW.js → context-menu-C28rrpwS.js} +1 -1
- package/dist/client/assets/{context-shell-CKLcTSN8.js → context-shell-BhsO74A1.js} +3 -3
- package/dist/client/assets/{create-organization-dialog-CaERm748.js → create-organization-dialog-WTgE1zLj.js} +1 -1
- package/dist/client/assets/{daily-pulse-D7zCFcba.js → daily-pulse-D5hqtiss.js} +1 -1
- package/dist/client/assets/{delete-copy-DclWOxJf.js → delete-copy-B6vUu2FZ.js} +1 -1
- package/dist/client/assets/{device-hint-_2FV49Jq.js → device-hint-BDXdRFQX.js} +1 -1
- package/dist/client/assets/{discover-CZzwsVT9.js → discover-BPJ5kKLU.js} +1 -1
- package/dist/client/assets/{domain-settings-ke-gnI4j.js → domain-settings-DAwNAh0_.js} +1 -1
- package/dist/client/assets/{drawer-DDbBWwDY.js → drawer-Co6CTMtJ.js} +1 -1
- package/dist/client/assets/{editor-mY53R5_b.js → editor-Dzcpm7rQ.js} +1 -1
- package/dist/client/assets/{editor-classes-DMMsOfQ5.js → editor-classes-BO4PtG02.js} +1 -1
- package/dist/client/assets/{empty-state-p1vSClM-.js → empty-state-BfnU_rAm.js} +1 -1
- package/dist/client/assets/{empty-state-CggWUtV0.js → empty-state-BlV47Moy.js} +1 -1
- package/dist/client/assets/{experiments-tab-choice-CryrzQ8P.js → experiments-tab-choice-BVnYtxf9.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bt_vhJBm.js → extract-connection-data-CTwhrI6L.js} +1 -1
- package/dist/client/assets/{feature-gate-Cz5hKu7-.js → feature-gate-CRmt1R7b.js} +1 -1
- package/dist/client/assets/{feature-paywall-Oz5CQKMH.js → feature-paywall-B2EmZsmT.js} +1 -1
- package/dist/client/assets/file-explorer-Bc2WuOJf.js +2 -0
- package/dist/client/assets/{file-preview-DtdQDSA8.js → file-preview-XajyFvxK.js} +1 -1
- package/dist/client/assets/{file-share-button-b3hJY3DP.js → file-share-button-DDpEu_Ts.js} +1 -1
- package/dist/client/assets/{file-type-icon-CRJv2Oya.js → file-type-icon-zloL09QV.js} +1 -1
- package/dist/client/assets/{folder-icon-6zXs6_0W.js → folder-icon-Cu1TcGzz.js} +1 -1
- package/dist/client/assets/{form-BH-D2Xbc.js → form-CDXejFhy.js} +1 -1
- package/dist/client/assets/{frame-navigation-DJy09yVU.js → frame-navigation-DKa5FPxb.js} +1 -1
- package/dist/client/assets/{gateway-client-BLgU4Dju.js → gateway-client-D6U4MBNC.js} +1 -1
- package/dist/client/assets/{general-BiAxKW5-.js → general-CQTaUkvR.js} +1 -1
- package/dist/client/assets/{github-icon-CF41Lxe4.js → github-icon-QoDNyjsW.js} +1 -1
- package/dist/client/assets/{held-block-view-Dfl9wQs4.js → held-block-view-D9gMtmL4.js} +1 -1
- package/dist/client/assets/{home-C27mjZB6.js → home--jqwm4Ku.js} +1 -1
- package/dist/client/assets/{home-overview-Csl5CaCE.js → home-overview-CqfgDa-3.js} +1 -1
- package/dist/client/assets/{hosted-reconcile-CyRopTfU.js → hosted-reconcile-Dgr_RAK2.js} +1 -1
- package/dist/client/assets/{icon-button-aDOfVADH.js → icon-button-BZOKf7Ue.js} +1 -1
- package/dist/client/assets/{index-BSBShudg.js → index-0O8gsl-7.js} +1 -1
- package/dist/client/assets/{index-BLFbZEvm.js → index-AYfJDRJw.js} +1 -1
- package/dist/client/assets/{index-D-pDCAfc.js → index-B26-jaFe.js} +1 -1
- package/dist/client/assets/{index-CVh3nTdm.js → index-BcNAVbXw.js} +1 -1
- package/dist/client/assets/{index-R3Ci7Tyg.js → index-C08yFDSB.js} +1 -1
- package/dist/client/assets/{index-CG6_ih5n.js → index-C75j3Sf-.js} +1 -1
- package/dist/client/assets/{index-BYqLsTt6.js → index-CGuDb95W.js} +1 -1
- package/dist/client/assets/{index-Dkqdsk1p.js → index-CMosAuta.js} +1 -1
- package/dist/client/assets/{index-BnCCUie5.js → index-CUTEHf7n.js} +41 -41
- package/dist/client/assets/{index-CK1nf_IS.js → index-Cd1_o-mb.js} +1 -1
- package/dist/client/assets/{index-gWKkX5Rl.js → index-CfzIzecT.js} +1 -1
- package/dist/client/assets/{index-BbtKtnc4.js → index-CnTDG57D.js} +1 -1
- package/dist/client/assets/{index-DcVM6F6g.js → index-Cu54PMEU.js} +1 -1
- package/dist/client/assets/{index-DaEXpIdD.js → index-D2ZLBdth.js} +1 -1
- package/dist/client/assets/{index-lCnbr_EL.js → index-Dc3vpBAe.js} +1 -1
- package/dist/client/assets/index-DqzmkMvh.css +1 -0
- package/dist/client/assets/{index-9QVz6jZ3.js → index-dYHd0KJA.js} +1 -1
- package/dist/client/assets/{index-redirect-AYWav9v_.js → index-redirect-CjNUMjXF.js} +1 -1
- package/dist/client/assets/{index-DJ1RObgi.js → index-teg9xGJw.js} +2 -2
- package/dist/client/assets/{infiniteQueryObserver-BESu79F_.js → infiniteQueryObserver-DN-l8Mqm.js} +1 -1
- package/dist/client/assets/{infra-billing-OdiaxSrm.js → infra-billing-DJ_xLQlG.js} +1 -1
- package/dist/client/assets/{input-CSgytoq8.js → input-IAYjK7lR.js} +3 -3
- package/dist/client/assets/{input-CnbV56LU.js → input-e3Q-tVUa.js} +1 -1
- package/dist/client/assets/{integration-icon-HGkwXGCE.js → integration-icon-BRVzdEXf.js} +1 -1
- package/dist/client/assets/{item-actions-lpogT0_c.js → item-actions-B4eKhNFa.js} +1 -1
- package/dist/client/assets/{jira-icon-DP_Xet8r.js → jira-icon-BnOlExTt.js} +1 -1
- package/dist/client/assets/{label-lULQ_A7o.js → label-qad8ROdP.js} +1 -1
- package/dist/client/assets/{layout-DzpCXiHJ.js → layout-D0Rywy_R.js} +1 -1
- package/dist/client/assets/{legacy-admin-welcome-dialog-BbrICcUL.js → legacy-admin-welcome-dialog-CXj5rtpz.js} +1 -1
- package/dist/client/assets/{legacy-agents-deep-CLHrkPSZ.js → legacy-agents-deep-JA5mOvHG.js} +1 -1
- package/dist/client/assets/{legacy-main-redirect-BXLMALYE.js → legacy-main-redirect-BOQhVVaF.js} +1 -1
- package/dist/client/assets/{library-tab-BAvPApZ2.js → library-tab-LAu1Ggsf.js} +3 -3
- package/dist/client/assets/library-umU-1FuW.js +1 -0
- package/dist/client/assets/{login-C6qn4lFX.js → login-M7zYPzKO.js} +1 -1
- package/dist/client/assets/{markdown-CGY8-6pe.js → markdown-BhLg-Zjp.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-CUByroKt.js → mcp-app-renderer-DrwYcKK7.js} +2 -2
- package/dist/client/assets/{mcp-oauth-CNwlsiuW.js → mcp-oauth-CAZv4B3x.js} +1 -1
- package/dist/client/assets/{mcp-oauth-plOgy5je.js → mcp-oauth-CqsxDqXO.js} +1 -1
- package/dist/client/assets/{members-CTzlB1Po.js → members-Bs-E2Sob.js} +1 -1
- package/dist/client/assets/{memory-Co29q3kr.js → memory-CSe1SzIo.js} +2 -2
- package/dist/client/assets/{mock-board-BK103f-5.js → mock-board-DVrSNZfW.js} +3 -3
- package/dist/client/assets/{monaco-editor-Dque6-sU.js → monaco-editor-Cmq9PYT5.js} +1 -1
- package/dist/client/assets/{monitoring-Dr84BM9D.js → monitoring-D2aojvYm.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-C3iriTtI.js → monitoring-stats-row-BoP1mTEb.js} +1 -1
- package/dist/client/assets/{multi-select-D7W8lcOJ.js → multi-select-C_FYq5kZ.js} +1 -1
- package/dist/client/assets/{mustache-CrAZ8U_1.js → mustache-8wbk5neB.js} +1 -1
- package/dist/client/assets/{named-rule-step-Dgb864IM.js → named-rule-step-D4anrrdN.js} +1 -1
- package/dist/client/assets/{named-rule-view-sIPvEpDh.js → named-rule-view-f0iw3ATx.js} +1 -1
- package/dist/client/assets/{new-project-dialog-ByQdLyIC.js → new-project-dialog-CVc657qA.js} +1 -1
- package/dist/client/assets/{new-project-store-D_NVgRYa.js → new-project-store-ehAJK4hL.js} +1 -1
- package/dist/client/assets/{oauth-callback-n_ofTSik.js → oauth-callback-B9em2Y8Z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-844F5Pm-.js → oauth-callback-ai-provider-Cb2kYh4X.js} +1 -1
- package/dist/client/assets/{oauth-consent-BBnMG2-4.js → oauth-consent-wow8JHEK.js} +1 -1
- package/dist/client/assets/{onboarding-B0hRyyh8.js → onboarding-BHjqSyxW.js} +1 -1
- package/dist/client/assets/{openai-conversation-CNN-nXlE.js → openai-conversation-DQ21FiVA.js} +1 -1
- package/dist/client/assets/{optimistic-project-sidebar-views-rtGCdpad.js → optimistic-project-sidebar-views-D735mKes.js} +1 -1
- package/dist/client/assets/{order-monitor-day-BiYOHUYn.js → order-monitor-day-D8KmCDvZ.js} +1 -1
- package/dist/client/assets/{organization-choice-L_HRcCiy.js → organization-choice-e20yr5bu.js} +1 -1
- package/dist/client/assets/{orgs-0krnPH_v.js → orgs-DC1K_oci.js} +1 -1
- package/dist/client/assets/{own-accounts-section-BVAzgeDY.js → own-accounts-section-DZjXH8uG.js} +1 -1
- package/dist/client/assets/{pair-DsI-lHdT.js → pair-B6XGEO8o.js} +1 -1
- package/dist/client/assets/{parse-sections-hseH5db1.js → parse-sections-Cd3eqhNU.js} +2 -2
- package/dist/client/assets/plan-BG9a6OTV.js +1 -0
- package/dist/client/assets/{plan-ladder-C-WCSJHB.js → plan-ladder-uOWkvedM.js} +1 -1
- package/dist/client/assets/plan-page-BxOjjyOQ.js +2 -0
- package/dist/client/assets/{plan-usage-card-e3Inrh2V.js → plan-usage-card-EE0IInE1.js} +2 -2
- package/dist/client/assets/{popover-BRb_ARAW.js → popover-t4wJ-TtS.js} +1 -1
- package/dist/client/assets/post-calendar-VNdLJQb0.js +1 -0
- package/dist/client/assets/{post-editor-BFReRfgq.js → post-editor-zOtVODsc.js} +2 -2
- package/dist/client/assets/{preview-content-J6DD6Phq.js → preview-content-Bhl5Jk0E.js} +1 -1
- package/dist/client/assets/{preview-dialog-DW7YaN-k.js → preview-dialog-Denmgj-d.js} +1 -1
- package/dist/client/assets/{preview-panel-BZVDqW1t.js → preview-panel-JUqjzsve.js} +1 -1
- package/dist/client/assets/{preview-tab-B18crp0w.js → preview-tab-COr6U59M.js} +3 -3
- package/dist/client/assets/{primitives-Jv205PzW.js → primitives-Dq7WtxY4.js} +1 -1
- package/dist/client/assets/{product-picker-dialog-WVTmsrbO.js → product-picker-dialog-DkguIJb9.js} +1 -1
- package/dist/client/assets/{profile-ExksEkWJ.js → profile-Clqb7jMX.js} +1 -1
- package/dist/client/assets/project-app-view-CY3LztLj.js +1 -0
- package/dist/client/assets/{project-apps-Dq4vYhCx.js → project-apps-BZHu6ziG.js} +1 -1
- package/dist/client/assets/{project-icon-lQ2qF_x7.js → project-icon-4S0TtqeC.js} +1 -1
- package/dist/client/assets/{project-index-DLyQghfD.js → project-index-CbwxAZlc.js} +1 -1
- package/dist/client/assets/project-reports-By6qiMKj.js +1 -0
- package/dist/client/assets/project-tasks-DhoozPsk.js +1 -0
- package/dist/client/assets/{projects-BLpymsux.js → projects-Df_L915V.js} +1 -1
- package/dist/client/assets/{projects-empty-state-BaIWyt1k.js → projects-empty-state-Di4qGPL3.js} +1 -1
- package/dist/client/assets/{prompts-DqWsUv18.js → prompts-CCfcFfEL.js} +1 -1
- package/dist/client/assets/record-editor-BYF0WYdX.js +1 -0
- package/dist/client/assets/redirect-editor-CIZjHsWK.js +1 -0
- package/dist/client/assets/{reports-GEVy4scF.js → reports-C6sfy-vt.js} +1 -1
- package/dist/client/assets/reports-Dkc8wRTo.js +1 -0
- package/dist/client/assets/{reports-onboarding-PwDuCGot.js → reports-onboarding-CvX7O5fR.js} +1 -1
- package/dist/client/assets/reports-tab-CqA9qzwy.js +2 -0
- package/dist/client/assets/repositories-B6GGh3Gl.js +1 -0
- package/dist/client/assets/{repositories-DcAWRYEG.js → repositories-DwI8wNdv.js} +1 -1
- package/dist/client/assets/{repository-binding-jAJl13i7.js → repository-binding-DyxjotEQ.js} +1 -1
- package/dist/client/assets/{repository-picker-Dl56cEjR.js → repository-picker-Diifpqm3.js} +1 -1
- package/dist/client/assets/{require-capability-l9KXJ8gu.js → require-capability-GNq4582r.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BDvRMhJJ.js → required-auth-layout-CVH6Kpuo.js} +1 -1
- package/dist/client/assets/{reset-password-eiJh4KkN.js → reset-password-Cv2a-_UY.js} +1 -1
- package/dist/client/assets/{resizable-ClPiju3x.js → resizable-DtQVeM4U.js} +1 -1
- package/dist/client/assets/{resolve-tab-icon-DTloknxI.js → resolve-tab-icon-Dd4QQOMZ.js} +1 -1
- package/dist/client/assets/{review-settings-CoWj5_Sd.js → review-settings-BFzl2biB.js} +1 -1
- package/dist/client/assets/{role-color-Zk9mTPP5.js → role-color-DuywbXFk.js} +1 -1
- package/dist/client/assets/{roles-CinXaOYO.js → roles-BXlx9LX-.js} +1 -1
- package/dist/client/assets/{route-GLw4hirY.js → route-BzAiKNmd.js} +1 -1
- package/dist/client/assets/{route-B7cdRc0W.js → route-CI04i3RU.js} +1 -1
- package/dist/client/assets/route-CiYCzoQC.js +1 -0
- package/dist/client/assets/{route-page-header-CvcqckN2.js → route-page-header-Dyzw28fO.js} +1 -1
- package/dist/client/assets/{sandbox-git-api-C3NvU1dn.js → sandbox-git-api-BHkz0_nl.js} +1 -1
- package/dist/client/assets/{sandbox-lifecycle-context-2HGtol3n.js → sandbox-lifecycle-context-D6WWTBdt.js} +1 -1
- package/dist/client/assets/{save-status-fItkkD30.js → save-status-Cgw9Hlp4.js} +1 -1
- package/dist/client/assets/{schema-DCQWc58B.js → schema-AdvpV9XD.js} +1 -1
- package/dist/client/assets/{schema-DjQz4gZw.js → schema-rfxhIdnI.js} +1 -1
- package/dist/client/assets/{scroll-area-iXdNHDzI.js → scroll-area-CRlFqWco.js} +1 -1
- package/dist/client/assets/{search-input-CplQR3Cf.js → search-input-DaJb5UpE.js} +1 -1
- package/dist/client/assets/{search-toggle-C8627ghw.js → search-toggle-MXPrTy3O.js} +1 -1
- package/dist/client/assets/{secret-picker-CM6Voy-R.js → secret-picker-Ct5n_id9.js} +1 -1
- package/dist/client/assets/{secrets-Cd-UdZBn.js → secrets-DrDOFUSP.js} +1 -1
- package/dist/client/assets/{section-array-field-zrTNtrKa.js → section-array-field-ZEOag6le.js} +1 -1
- package/dist/client/assets/{sections-Bf6DQ73k.js → sections-D3dG_Sv7.js} +1 -1
- package/dist/client/assets/sections-editor-DhtnmFJg.js +1 -0
- package/dist/client/assets/{select-BtcP8R6V.js → select-CXHAcNGT.js} +1 -1
- package/dist/client/assets/{select-model-DwiCQMgW.js → select-model-BGmlexh2.js} +1 -1
- package/dist/client/assets/{seo-editor-DF_qOadV.js → seo-editor-D6SXZS-u.js} +1 -1
- package/dist/client/assets/{separator-DNJRj3WX.js → separator-BmldSaZv.js} +1 -1
- package/dist/client/assets/{session-runtime-CmPJqc9T.js → session-runtime-DRkG9ReZ.js} +1 -1
- package/dist/client/assets/settings-tab-DLt79LWg.js +1 -0
- package/dist/client/assets/{sheet-VKdIybCR.js → sheet-DwYwF5Xe.js} +1 -1
- package/dist/client/assets/{shell-layout-_zkxSyWx.js → shell-layout-bVoP9kOD.js} +1 -1
- package/dist/client/assets/{site-draft-actions-CPaVy3_v.js → site-draft-actions-Dd2WZL1s.js} +1 -1
- package/dist/client/assets/{site-draft-view-BXUPDUfS.js → site-draft-view-CHYH9tQq.js} +1 -1
- package/dist/client/assets/site-editor-aI9Dau3o.js +1 -0
- package/dist/client/assets/{site-editor-toast-BOt_nyVl.js → site-editor-toast-BCn8hYHZ.js} +1 -1
- package/dist/client/assets/{skills-D9sHunPO.js → skills-CX729VjK.js} +1 -1
- package/dist/client/assets/{slider-C25v9BTx.js → slider-BdrBFFmy.js} +1 -1
- package/dist/client/assets/{sortable.esm-BzZJdDzX.js → sortable.esm-Dv7GaG48.js} +1 -1
- package/dist/client/assets/{sso-ecVMQ9jD.js → sso-CipUmxZh.js} +1 -1
- package/dist/client/assets/{suggestion-DGpHBXVl.js → suggestion-7L8A3fQy.js} +2 -2
- package/dist/client/assets/{super-agent-icon-uexFm4rX.js → super-agent-icon-VCx3p9dd.js} +1 -1
- package/dist/client/assets/{switch-BxHf2yQ-.js → switch-CQr_229Y.js} +1 -1
- package/dist/client/assets/{synced-repos-GTp0Tp98.js → synced-repos-BdIctOIX.js} +1 -1
- package/dist/client/assets/{tab-icon-glyph-CmTv0jS2.js → tab-icon-glyph-C6KuwbV2.js} +1 -1
- package/dist/client/assets/{table-B3gHsFFi.js → table-5d9iQpdi.js} +1 -1
- package/dist/client/assets/{tabs-a_oEe7Hq.js → tabs-DEsdaVKa.js} +1 -1
- package/dist/client/assets/{task-board-Cq4D_eE2.js → task-board-ZELaPSpv.js} +1 -1
- package/dist/client/assets/{task-key-DSN1bgDn.js → task-key-ChxtLgH2.js} +2 -2
- package/dist/client/assets/{task-route-CN_gUoQw.js → task-route-hUi3-h4J.js} +1 -1
- package/dist/client/assets/{task-status-uc1jZinE.js → task-status-Dofkb2xp.js} +1 -1
- package/dist/client/assets/{taskboard-analytics-D9X1HIOU.js → taskboard-analytics-Bj-GjLdA.js} +1 -1
- package/dist/client/assets/tasks-BWiWGgqJ.js +1 -0
- package/dist/client/assets/{tasks-D4EVJa15.js → tasks-DsqIy_fY.js} +3 -3
- package/dist/client/assets/{textarea-zTqVKq38.js → textarea-J2V-aUg9.js} +1 -1
- package/dist/client/assets/thread-analytics-3idb3D-k.js +1 -0
- package/dist/client/assets/{thread-button-DDF681E7.js → thread-button-8lhq8YVG.js} +1 -1
- package/dist/client/assets/{thread-intent-D0RsO42v.js → thread-intent-C-4a46Zs.js} +1 -1
- package/dist/client/assets/thread-route-BazgFB6Z.js +1 -0
- package/dist/client/assets/{thread-route-OiQ4LagC.js → thread-route-hABZCF2d.js} +1 -1
- package/dist/client/assets/{thread-sheet-body-RQ9p2vpU.js → thread-sheet-body-BeKCfAHB.js} +1 -1
- package/dist/client/assets/{time-range-picker-k6buFvRQ.js → time-range-picker-Bs9UQrVS.js} +1 -1
- package/dist/client/assets/{toggle-group-_l9tZet4.js → toggle-group-BSy9ppTS.js} +1 -1
- package/dist/client/assets/{tool-set-selector-C3ePfweB.js → tool-set-selector-CtmnThz8.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-DutdVdtc.js → toolbar-icon-button-C4Or2Ut1.js} +1 -1
- package/dist/client/assets/{tooltip-icVvNMtU.js → tooltip-BtQY7me6.js} +1 -1
- package/dist/client/assets/{tooltipContext-DMKNZNxg.js → tooltipContext-BbkLIEo5.js} +1 -1
- package/dist/client/assets/{track-BQg0fgIs.js → track-PksxcDl8.js} +1 -1
- package/dist/client/assets/{types-Cng3BN1u.js → types-B29zOSVo.js} +1 -1
- package/dist/client/assets/{url-slug-DRUvKyIF.js → url-slug-5tJR8vZd.js} +1 -1
- package/dist/client/assets/{usage-stats-DWbg5Exa.js → usage-stats-DJ1VHc0T.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Dc5ouLPu.js → use-ai-providers-Dya2oYuM.js} +1 -1
- package/dist/client/assets/{use-api-keys-BYFPWyCw.js → use-api-keys-B_9Rq7TJ.js} +1 -1
- package/dist/client/assets/{use-apply-named-rule-CWMngrVu.js → use-apply-named-rule-7lCiFUZu.js} +1 -1
- package/dist/client/assets/use-ask-in-chat-CuHn_eJY.js +1 -0
- package/dist/client/assets/{use-automations-B4Bhr7bk.js → use-automations-BpMr2z_i.js} +1 -1
- package/dist/client/assets/{use-autosave-fAM8w3an.js → use-autosave-Dg5clSHS.js} +1 -1
- package/dist/client/assets/use-blocks-v8-project-ovX-kkwX.js +1 -0
- package/dist/client/assets/use-blog-view-CpUCE6TS.js +1 -0
- package/dist/client/assets/{use-chat-layout-state-Cos1I2jf.js → use-chat-layout-state-B6O7bs0d.js} +1 -1
- package/dist/client/assets/{use-cms-publish-actions-ltMAkIJx.js → use-cms-publish-actions-B7gEo4o7.js} +1 -1
- package/dist/client/assets/{use-connect-companion-BT1ouC_-.js → use-connect-companion-DgHT9TTS.js} +1 -1
- package/dist/client/assets/{use-connection-BD6Z_Y5K.js → use-connection-BAk2dsuv.js} +1 -1
- package/dist/client/assets/{use-content-sync-Cb62T6_k.js → use-content-sync-4eASTxdJ.js} +1 -1
- package/dist/client/assets/{use-copy-bpFrGd2i.js → use-copy-DPZUA7Gr.js} +1 -1
- package/dist/client/assets/{use-current-view-dWMur2yx.js → use-current-view-SFKgOLYn.js} +1 -1
- package/dist/client/assets/{use-date-fns-locale-DoBx_LGd.js → use-date-fns-locale-Bd88zbns.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-KNzjtiuc.js → use-debounced-autosave-CQQwGbl2.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Bt1SAjKD.js → use-debounced-value-C75ZQTZG.js} +1 -1
- package/dist/client/assets/{use-deco-credits-DpY6G1b0.js → use-deco-credits-DzCgvsqG.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BkY_xbdd.js → use-decopilot-events-B93IJnco.js} +1 -1
- package/dist/client/assets/{use-delete-block-CheMFR3A.js → use-delete-block-CtnkMpgb.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CKGanNPY.js → use-delete-connection-B_EqAmPm.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dfxu4f7O.js → use-deployment-admin-DYC3wY2X.js} +1 -1
- package/dist/client/assets/{use-entitlements-CdeJE9gN.js → use-entitlements-DH1D5a0L.js} +1 -1
- package/dist/client/assets/{use-fast-preview-draft-url-DtyjKSU5.js → use-fast-preview-draft-url-CY0fb2LM.js} +1 -1
- package/dist/client/assets/{use-file-configs-D73DTOfD.js → use-file-configs-BiSZZuuf.js} +1 -1
- package/dist/client/assets/{use-id-selection-obkznx-t.js → use-id-selection-VNg6UPHp.js} +1 -1
- package/dist/client/assets/{use-in-settings-BZ1un7LI.js → use-in-settings-Dv_cwy92.js} +1 -1
- package/dist/client/assets/{use-inbox-feed-BKbu_K0U.js → use-inbox-feed-Cdppe1Es.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C-tY72ik.js → use-infinite-scroll-BGl4Rgru.js} +1 -1
- package/dist/client/assets/{use-join-requests-CtDU3gH1.js → use-join-requests-CWbWtDgg.js} +1 -1
- package/dist/client/assets/use-main-panel-tabs-CCz7Ktbi.js +1 -0
- package/dist/client/assets/{use-mcp-auth-status-Dh_dzOju.js → use-mcp-auth-status-Ca77VI4X.js} +1 -1
- package/dist/client/assets/{use-mcp-client-BwusBux_.js → use-mcp-client-BVU34o8K.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-dcqD5yo7.js → use-mcp-prompts-CCB1WHsd.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DTHRiLyJ.js → use-mcp-tools-DagGRrIt.js} +1 -1
- package/dist/client/assets/{use-mobile-Dr7bjUPW.js → use-mobile-LSpSJcPd.js} +1 -1
- package/dist/client/assets/{use-move-blocks-BchWtT9J.js → use-move-blocks-C_L5dYiU.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-C7EFO95N.js → use-navigate-to-agent-fspVUy0_.js} +1 -1
- package/dist/client/assets/{use-never-published-BJ0Sec7F.js → use-never-published-Ch6taPxS.js} +1 -1
- package/dist/client/assets/{use-org-fs-Cl00WlUa.js → use-org-fs-CYycA4iA.js} +1 -1
- package/dist/client/assets/{use-org-notice-CEMI0cuO.js → use-org-notice-B0u21Cu1.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-C-GJnNCq.js → use-org-repo-syncs-BHsdmb-p.js} +1 -1
- package/dist/client/assets/{use-org-sso-DfMcUb6-.js → use-org-sso-DZUFYVRN.js} +1 -1
- package/dist/client/assets/{use-organization-settings-D5A7oppe.js → use-organization-settings-C-YWM0uD.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-CeualaFM.js → use-panel-navigate-Dcxy731-.js} +1 -1
- package/dist/client/assets/{use-project-native-view-presence-BkMPZcTq.js → use-project-native-view-presence-tfOMrkxo.js} +1 -1
- package/dist/client/assets/{use-project-scope-BF7ZsFcz.js → use-project-scope-3Q37Eln5.js} +1 -1
- package/dist/client/assets/{use-recent-apps-C79qm7dy.js → use-recent-apps-BJuzSKH-.js} +1 -1
- package/dist/client/assets/{use-reports-diagnostic-Bujt5v8X.js → use-reports-diagnostic-C7haZBH4.js} +1 -1
- package/dist/client/assets/{use-sandbox-events-Dxu1WRP5.js → use-sandbox-events-p6STSWE5.js} +1 -1
- package/dist/client/assets/{use-secrets-B8xKko9Q.js → use-secrets-GgVI8oKj.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BHMbHnTX.js → use-section-preview-base-M6_vC4eP.js} +1 -1
- package/dist/client/assets/{use-sidebar-collapsed-DXR2L5hj.js → use-sidebar-collapsed-BjLeIURU.js} +1 -1
- package/dist/client/assets/{use-tags-CedvYB82.js → use-tags-B4229aWw.js} +1 -1
- package/dist/client/assets/{use-task-board-analytics-BW_T7Ca1.js → use-task-board-analytics---dDdKFB.js} +1 -1
- package/dist/client/assets/{use-task-board-item-prs-BZA3OZnP.js → use-task-board-item-prs-WHlIf_av.js} +1 -1
- package/dist/client/assets/{use-task-board-items-C_bU9rPT.js → use-task-board-items-BFsmDyZa.js} +1 -1
- package/dist/client/assets/{use-task-board-prompts-CcoEQzvX.js → use-task-board-prompts-Dwu6_vIJ.js} +1 -1
- package/dist/client/assets/{use-task-metadata-Uc6KpwV0.js → use-task-metadata-CUi2_x3B.js} +1 -1
- package/dist/client/assets/{use-thread-outputs-BA8sXOAO.js → use-thread-outputs-DYau24LH.js} +1 -1
- package/dist/client/assets/{use-view-draft-kind-CXGnqfWm.js → use-view-draft-kind-DECgwRep.js} +1 -1
- package/dist/client/assets/{use-voice-input-D-qISUx2.js → use-voice-input-Ta8CFXyw.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dmz76p-1.js +1 -0
- package/dist/client/assets/{useQueries-D7JkV3ct.js → useQueries-CcshDhiG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BnvO_4S5.js +1 -0
- package/dist/client/assets/{users-CwLfeaay.js → users-BFBeKe01.js} +1 -1
- package/dist/client/assets/{utils-BRIj6V6X.js → utils-VRJjHnOC.js} +1 -1
- package/dist/client/assets/{variant-calendar-BcSA72WZ.js → variant-calendar-y7ldyxeY.js} +1 -1
- package/dist/client/assets/{variant-matcher-override-BBUsuGmz.js → variant-matcher-override-ZGKfLyll.js} +1 -1
- package/dist/client/assets/{view-header-BN75VYPA.js → view-header-BZr0Ea-N.js} +1 -1
- package/dist/client/assets/{virtual-mcp-DKvO0DMw.js → virtual-mcp-BNBTH_8N.js} +1 -1
- package/dist/client/assets/{watch-sse-pool-DyaAZ7A6.js → watch-sse-pool-BqAScN4r.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/server.js +767 -767
- package/package.json +1 -1
- package/dist/client/assets/agent-app-BO2_ZSNA.js +0 -1
- package/dist/client/assets/agent-blog-DAiV8LqN.js +0 -2
- package/dist/client/assets/agent-blog-post-yArTClEg.js +0 -2
- package/dist/client/assets/agent-deck-DH7nWYL9.js +0 -1
- package/dist/client/assets/agent-experiments-B3XxdY47.js +0 -1
- package/dist/client/assets/agent-file-CQYoQXcJ.js +0 -1
- package/dist/client/assets/agent-library-eZkcynPr.js +0 -1
- package/dist/client/assets/agent-library-file-Lfg-_zk4.js +0 -1
- package/dist/client/assets/agent-overview-zkuZWtuu.js +0 -1
- package/dist/client/assets/agent-settings-DGW5ynO-.js +0 -1
- package/dist/client/assets/agent-site-editor-code-BFTaZp9U.js +0 -2
- package/dist/client/assets/agent-site-editor-content-Bq8S29ir.js +0 -1
- package/dist/client/assets/agent-site-editor-preview-CysA03B1.js +0 -1
- package/dist/client/assets/agent-view-BSAwaXZW.js +0 -1
- package/dist/client/assets/ai-providers-CsRRMbMW.js +0 -1
- package/dist/client/assets/api-keys-BeLmv07-.js +0 -1
- package/dist/client/assets/app-editor-Di6FUBiQ.js +0 -1
- package/dist/client/assets/category-editor-DMYUciDu.js +0 -1
- package/dist/client/assets/chat-context-Ch3kSDW6.js +0 -44
- package/dist/client/assets/cms-settings-editor-uHQKjBzs.js +0 -1
- package/dist/client/assets/collection-detail-BMxo-5Da.js +0 -1
- package/dist/client/assets/file-explorer-9ZRRCtWn.js +0 -2
- package/dist/client/assets/index-MLo7YobU.css +0 -1
- package/dist/client/assets/library-Di4WLoyl.js +0 -1
- package/dist/client/assets/plan-Dbk6n6oc.js +0 -1
- package/dist/client/assets/post-calendar-FOg81-Hf.js +0 -1
- package/dist/client/assets/project-app-view-DYjXsvCO.js +0 -1
- package/dist/client/assets/project-reports-zcYSzvNj.js +0 -1
- package/dist/client/assets/project-tasks-Bstu3wnq.js +0 -1
- package/dist/client/assets/record-editor-DZ6ycUdu.js +0 -1
- package/dist/client/assets/redirect-editor-Bl0trZ6p.js +0 -1
- package/dist/client/assets/reports-Cf0wUdBY.js +0 -1
- package/dist/client/assets/reports-tab-Cqf8JAAn.js +0 -2
- package/dist/client/assets/repositories-CVy9O_L4.js +0 -1
- package/dist/client/assets/route-BGhG4fQ5.js +0 -1
- package/dist/client/assets/sections-editor-Pqk7XVI9.js +0 -1
- package/dist/client/assets/settings-tab-DKnvOUqa.js +0 -1
- package/dist/client/assets/site-editor-BK9ubq9u.js +0 -1
- package/dist/client/assets/tasks-ZCniX70O.js +0 -1
- package/dist/client/assets/thread-analytics-Be5gTmM1.js +0 -1
- package/dist/client/assets/thread-route-tsFk8naa.js +0 -1
- package/dist/client/assets/use-ask-in-chat-goVXl_NF.js +0 -1
- package/dist/client/assets/use-blocks-v8-project-CCC2DOox.js +0 -1
- package/dist/client/assets/use-blog-view-DFNaVcP9.js +0 -1
- package/dist/client/assets/use-main-panel-tabs-DH8ex3Zd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BWskAF2M.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-BQ0JDyFJ.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dO as Qt,c as Z,b as ee,r as w,j as t,B,aY as Zt,m as At,a6 as $t,D as et,v as tt,w as st,x as ot,aU as at,y as nt,t as X,e0 as es,_ as ts,X as ss,Z as os,ar as as,ap as ns,aq as is,Y as ze,b6 as rs,h as Le,aJ as pt,aK as xt,aL as gt,aM as ht,b9 as jt,aN as yt,aO as bt,aP as vt,E as Ke,aG as ls,e8 as Ct,I as Nt,hq as cs,al as ds,b7 as Qe,n as Xe,f as ms}from"./index-BnCCUie5.js";import{ChatLayout as us}from"./index-gWKkX5Rl.js";import{b as it,v as fs,a as ps,Z as xs,k as St,ay as gs,ab as hs,g as js,a$ as Ot,e as Ye}from"./agent-icon-BD0ZSOtG.js";import{n as kt}from"./BookOpen01-hQOgpoT0.js";import{t as rt}from"./ChevronDown-XAF5UTWS.js";import{f as ys}from"./UserSquare-BUy12Lbf.js";import{s as Tt}from"./File02-CWJddKT5.js";import{f as lt,b as Et,t as zt}from"./Tool01-B-fgmM-0.js";import{a as bs}from"./Image01-w45LU6DD.js";import{i as vs}from"./SearchMd-BdbsDxg8.js";import{B as Kt}from"./badge-BokVussq.js";import{C as Ft}from"./checkbox-lB4BY1Fl.js";import{S as ct}from"./switch-BxHf2yQ-.js";import{a as Mt,b as Rt,P as Lt}from"./popover-BRb_ARAW.js";import{C as Cs,e as wt,b as Ns,f as Ss,a as ks,c as Ts}from"./command-B6aoeD_0.js";import{g as ws,a as _s}from"./gateway-client-BLgU4Dju.js";import{b as dt}from"./use-connection-BD6Z_Y5K.js";import{u as Ds}from"./use-mcp-client-BwusBux_.js";import{u as Is}from"./use-mcp-tools-DTHRiLyJ.js";import{I as Ps}from"./integration-icon-HGkwXGCE.js";import{M as As}from"./select-model-DwiCQMgW.js";import{u as $s}from"./use-ai-providers-Dc5ouLPu.js";import{U as Os,b as Es}from"./build-improve-prompt-doc-L7dFyzUW.js";import{a as ve,c as zs,d as Ks}from"./use-automations-B4Bhr7bk.js";import{c as Fs,b as Ms,P as Rs,Q as Ls}from"./chat-context-Ch3kSDW6.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-DOENRXml.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-icVvNMtU.js";import{u as Js}from"./shell-layout-_zkxSyWx.js";import{i as Ut}from"./ArrowLeft-CedOhlJl.js";import{i as Xs}from"./ArrowUp-O_SFXcX4.js";import{s as Me}from"./UserCheck01-BMORoWuy.js";import{s as Ys}from"./Trash01-Dzo6NInS.js";import{s as mt}from"./XClose-Bze4d5nj.js";import{u as _t}from"./use-debounced-autosave-KNzjtiuc.js";import{T as qs,a as Qs}from"./input-CnbV56LU.js";import{u as Zs,a as eo,J as Vt}from"./jira-icon-DP_Xet8r.js";import{s as to}from"./Plus-BKnmVwDY.js";import{i as ut}from"./Zap-BiLLX5O9.js";import{l as We,H as so}from"./config-C5d81tv3.js";import{C as oo}from"./task-board-Cq4D_eE2.js";import{M as Wt}from"./multi-select-D7W8lcOJ.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-BtcP8R6V.js";import{b as ao,a as no,T as Dt}from"./tabs-a_oEe7Hq.js";import{MonacoCodeEditor as io}from"./monaco-editor-Dque6-sU.js";import{A as ro}from"./automation-runs-DV0vxgsZ.js";import{C as lo}from"./collection-tabs-DRGUwBWl.js";import{a as co}from"./use-panel-navigate-CeualaFM.js";import"./use-mobile-Dr7bjUPW.js";import"./MessageCircle01-CBwz3pkx.js";import"./thread-button-DDF681E7.js";import"./use-sidebar-collapsed-DXR2L5hj.js";import"./sheet-VKdIybCR.js";import"./use-chat-layout-state-Cos1I2jf.js";import"./toolbar-icon-button-DutdVdtc.js";import"./use-in-settings-BZ1un7LI.js";import"./resizable-ClPiju3x.js";import"./route-page-header-CvcqckN2.js";import"./LayoutLeft-C3gp1GTI.js";import"./use-project-scope-BF7ZsFcz.js";import"./repository-binding-jAJl13i7.js";import"./use-current-view-dWMur2yx.js";import"./thread-route-OiQ4LagC.js";import"./index-R3Ci7Tyg.js";import"./auth-CAOOT2we.js";import"./AlertCircle-DsrPAFxJ.js";import"./ArrowRight-D31ooF9_.js";import"./Globe04-Bkkv-44s.js";import"./CheckCircle-C5F-vu0b.js";import"./ChevronSelectorVertical-BgyFVvCt.js";import"./ChevronUp-DXb5SN9G.js";import"./LinkBroken01-DXQIXK4a.js";import"./CreditCard01-V_X-1km6.js";import"./SwitchHorizontal01-BoKcCD1g.js";import"./Eye-DKA9KO8s.js";import"./Fingerprint04-DnZul7lc.js";import"./Key01-hOPkG93k.js";import"./Minus-C6nnb5U7.js";import"./Monitor01-D5ASDXL3.js";import"./Sun-DAly365K.js";import"./Play-BE2Gbr5-.js";import"./ShoppingBag01-D0FD1HPP.js";import"./Upload01-DQgVu-9N.js";import"./Users01-t7brRFdK.js";import"./index-9QVz6jZ3.js";import"./drawer-DDbBWwDY.js";import"./index-D-pDCAfc.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./use-entitlements-CdeJE9gN.js";import"./use-view-draft-kind-CXGnqfWm.js";import"./use-blog-view-DFNaVcP9.js";import"./use-organization-settings-D5A7oppe.js";import"./schema-DCQWc58B.js";import"./thread-intent-D0RsO42v.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-DyaAZ7A6.js";import"./session-runtime-CmPJqc9T.js";import"./use-decopilot-events-BkY_xbdd.js";import"./use-deployment-admin-Dfxu4f7O.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-CEMI0cuO.js";import"./project-icon-lQ2qF_x7.js";import"./use-navigate-to-agent-C7EFO95N.js";import"./use-debounced-value-Bt1SAjKD.js";import"./new-project-dialog-ByQdLyIC.js";import"./label-lULQ_A7o.js";import"./repository-picker-Dl56cEjR.js";import"./github-icon-CF41Lxe4.js";import"./useInfiniteQuery-BWskAF2M.js";import"./infiniteQueryObserver-BESu79F_.js";import"./collection-search-CIcbLnU-.js";import"./new-project-store-D_NVgRYa.js";import"./legacy-admin-welcome-dialog-BbrICcUL.js";import"./required-auth-layout-BDvRMhJJ.js";import"./use-org-sso-DfMcUb6-.js";import"./suggestion-DGpHBXVl.js";import"./usage-stats-DWbg5Exa.js";import"./utils-CVEq3hMx.js";import"./markdown-CGY8-6pe.js";import"./use-copy-bpFrGd2i.js";import"./form-BH-D2Xbc.js";import"./use-mcp-prompts-dcqD5yo7.js";import"./use-org-fs-Cl00WlUa.js";import"./task-key-DSN1bgDn.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-mY53R5_b.js";import"./table-B3gHsFFi.js";import"./empty-state-p1vSClM-.js";import"./use-id-selection-obkznx-t.js";import"./use-infinite-scroll-C-tY72ik.js";import"./task-status-uc1jZinE.js";import"./thread-sheet-body-RQ9p2vpU.js";import"./useSuspenseInfiniteQuery-BQ0JDyFJ.js";import"./pair-DsI-lHdT.js";import"./use-task-board-items-C_bU9rPT.js";import"./task-route-CN_gUoQw.js";import"./project-index-DLyQghfD.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CUByroKt.js";import"./types-Cng3BN1u.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-BA8sXOAO.js";import"./file-type-icon-CRJv2Oya.js";const qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:zt},thinking:{labelKey:"automations.automationConfig.tierThinking",subtitleKey:"automations.automationConfig.tierThinkingSubtitle",icon:hs}},mo=["fast","smart","thinking"];function uo(r){const e=Z.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(Zt,{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=Z.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=Z.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:Qt},{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:Et},{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:Tt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:Tt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:kt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:kt}]}],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=Z.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=Z.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=Z.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=Z.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=Ds(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 E=ws(I._meta)??"__other__",Q=_s(I.name,E==="__other__"?void 0:E),A=I.title,xe=A&&A!==I.name?A:go(Q);H.has(E)||H.set(E,{clientId:E,conn:Y.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],U=n===null?new Set(J):new Set(n),V=J.every(I=>U.has(I)),O=I=>a(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(U);E.has(I)?E.delete(I):E.add(I),O(E)},ne=(I,E)=>{const Q=new Set(U);for(const A of I)E?Q.add(A):Q.delete(A);O(Q)};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]!==V||e[28]!==i?(ie=i(V?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=V,e[28]=i,e[29]=ie):ie=e[29];const ue=!V&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[U.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,D="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=V?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:U.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]!==V||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:V,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=V,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 z;e[49]!==a?(z=()=>a([]),e[49]=a,e[50]=z):z=e[50];const pe=U.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]!==z||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:z,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]=z,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?(_=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]=_):_=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 E=I.tools.map(bo),Q=E.filter(A=>U.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:U.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 E=I.tools.map(yo),Q=E.filter(A=>U.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Q,total:E.length,onToggle:()=>ne(E,Q!==E.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:U.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]=_,e[23]=D,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],_=e[22],D=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]!==_?(R=t.jsxs(p,{children:[T,_,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=_,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==D||e[75]!==k?(K=t.jsx(l,{className:D,align:k,children:R}),e[72]=l,e[73]=R,e[74]=D,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 _o=[{label:"5 minutes",cron:"*/5 * * * *"},{label:"Hour",cron:"0 * * * *"},{label:"Day",cron:"0 0 * * *"},{label:"Week",cron:"0 0 * * 1"}],Ze=oo.filter(r=>!so.includes(r)),Gt=["any","earlier","later","statuses"],Do=r=>Ze.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=Ze.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=>{Do(l)&&c(l)},children:[t.jsx(he,{className:"w-full",children:t.jsx(je,{})}),t.jsx(ye,{children:Ze.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=Zs(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:_o.map(v=>t.jsxs(ze,{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(ze,{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(ze,{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(ze,{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(ze,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Vt,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(ze,{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=Z.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{dO as Zt,c as q,b as ee,r as w,j as t,B,aY as qt,m as At,a6 as $t,D as et,v as tt,w as st,x as ot,aU as at,y as nt,t as X,e0 as es,_ as ts,X as ss,Z as os,ar as as,ap as ns,aq as is,Y as ze,b6 as rs,h as Le,aJ as pt,aK as xt,aL as gt,aM as ht,b9 as jt,aN as yt,aO as bt,aP as vt,E as Ke,aG as ls,e8 as Ct,I as Nt,hs as cs,al as ds,b7 as Ze,n as Xe,f as ms}from"./index-CUTEHf7n.js";import{ChatLayout as us}from"./index-CfzIzecT.js";import{b as it,v as fs,a as ps,Z as xs,k as St,ay as gs,ab as hs,g as js,a$ as Ot,e as Ye}from"./agent-icon-y2SKybSP.js";import{n as kt}from"./BookOpen01-Det9naRR.js";import{t as rt}from"./ChevronDown-_sr4up4D.js";import{f as ys}from"./UserSquare-D0WQA2_a.js";import{s as Tt}from"./File02-Dj9EXPDT.js";import{f as lt,b as Et,t as zt}from"./Tool01-B97c8idL.js";import{a as bs}from"./Image01-ChEwjYSJ.js";import{i as vs}from"./SearchMd-BVX4smTx.js";import{B as Kt}from"./badge-CdntSWLw.js";import{C as Ft}from"./checkbox-DG0VRyZt.js";import{S as ct}from"./switch-CQr_229Y.js";import{a as Mt,b as Rt,P as Lt}from"./popover-t4wJ-TtS.js";import{C as Cs,e as wt,b as Ns,f as Ss,a as ks,c as Ts}from"./command-BvXS_hwC.js";import{g as ws,a as _s}from"./gateway-client-D6U4MBNC.js";import{b as dt}from"./use-connection-BAk2dsuv.js";import{u as Ds}from"./use-mcp-client-BVU34o8K.js";import{u as Is}from"./use-mcp-tools-DagGRrIt.js";import{I as Ps}from"./integration-icon-BRVzdEXf.js";import{M as As}from"./select-model-BGmlexh2.js";import{u as $s}from"./use-ai-providers-Dya2oYuM.js";import{U as Os,b as Es}from"./build-improve-prompt-doc-DkcwrW0T.js";import{a as ve,c as zs,d as Ks}from"./use-automations-BpMr2z_i.js";import{c as Fs,b as Ms,P as Rs,Q as Ls}from"./chat-context-3o15fH-n.js";import{b as Us,C as Vs,a as Ws}from"./collapsible-CUOhSps5.js";import{c as Bs,T as Gs,a as Hs}from"./tooltip-BtQY7me6.js";import{u as Js}from"./shell-layout-bVoP9kOD.js";import{i as Ut}from"./ArrowLeft-DpoZP_fX.js";import{i as Xs}from"./ArrowUp-C2dE69W7.js";import{s as Me}from"./UserCheck01-CjBhJIbn.js";import{s as Ys}from"./Trash01-Bi3fjf_i.js";import{s as mt}from"./XClose-CUoBDo4j.js";import{u as _t}from"./use-debounced-autosave-CQQwGbl2.js";import{T as Qs,a as Zs}from"./input-e3Q-tVUa.js";import{u as qs,a as eo,J as Vt}from"./jira-icon-BnOlExTt.js";import{s as to}from"./Plus-BEFFoW2D.js";import{i as ut}from"./Zap-D5Q1SF5c.js";import{l as We,H as so}from"./config-Bn2m6WJs.js";import{C as oo}from"./task-board-ZELaPSpv.js";import{M as Wt}from"./multi-select-C_FYq5kZ.js";import{S as ge,b as he,a as je,d as ye,c as be}from"./select-CXHAcNGT.js";import{b as ao,a as no,T as Dt}from"./tabs-DEsdaVKa.js";import{MonacoCodeEditor as io}from"./monaco-editor-Cmq9PYT5.js";import{A as ro}from"./automation-runs-C6tWYqF5.js";import{C as lo}from"./collection-tabs-COt6y1YG.js";import{a as co}from"./use-panel-navigate-Dcxy731-.js";import"./use-mobile-LSpSJcPd.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./thread-button-8lhq8YVG.js";import"./use-sidebar-collapsed-BjLeIURU.js";import"./sheet-DwYwF5Xe.js";import"./use-chat-layout-state-B6O7bs0d.js";import"./toolbar-icon-button-C4Or2Ut1.js";import"./use-in-settings-Dv_cwy92.js";import"./resizable-DtQVeM4U.js";import"./route-page-header-Dyzw28fO.js";import"./LayoutLeft-DUieRSDJ.js";import"./use-project-scope-3Q37Eln5.js";import"./repository-binding-DyxjotEQ.js";import"./use-current-view-SFKgOLYn.js";import"./thread-route-hABZCF2d.js";import"./index-C08yFDSB.js";import"./auth-D7Uu7n_e.js";import"./AlertCircle-B4BiejsA.js";import"./ArrowRight-waHzto0g.js";import"./Globe04-YQZG_Qbl.js";import"./CheckCircle-BNEuJPHU.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./ChevronUp-CK7Ad_mD.js";import"./LinkBroken01-jFeLEleD.js";import"./CreditCard01-DaUYIK4F.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Eye-CYtkFg_6.js";import"./Fingerprint04-kauf3nbZ.js";import"./Key01-DPAOwUET.js";import"./Minus-DVAnrb98.js";import"./Monitor01-D5to20Na.js";import"./Sun-D2fDzKM6.js";import"./Play-DBG3GXxW.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./Upload01-B0N1cyeo.js";import"./Users01-CNLWTh0g.js";import"./index-dYHd0KJA.js";import"./drawer-Co6CTMtJ.js";import"./index-B26-jaFe.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./use-entitlements-DH1D5a0L.js";import"./use-view-draft-kind-DECgwRep.js";import"./use-blog-view-CpUCE6TS.js";import"./use-organization-settings-C-YWM0uD.js";import"./schema-AdvpV9XD.js";import"./thread-intent-C-4a46Zs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqAScN4r.js";import"./session-runtime-DRkG9ReZ.js";import"./use-decopilot-events-B93IJnco.js";import"./use-org-fs-CYycA4iA.js";import"./useInfiniteQuery-Dmz76p-1.js";import"./infiniteQueryObserver-DN-l8Mqm.js";import"./use-deployment-admin-DYC3wY2X.js";import"./admin-fetch-BhTJlAsX.js";import"./use-org-notice-B0u21Cu1.js";import"./project-icon-4S0TtqeC.js";import"./use-navigate-to-agent-fspVUy0_.js";import"./use-debounced-value-C75ZQTZG.js";import"./new-project-dialog-CVc657qA.js";import"./label-qad8ROdP.js";import"./repository-picker-Diifpqm3.js";import"./github-icon-QoDNyjsW.js";import"./collection-search-gjXSkcT8.js";import"./new-project-store-ehAJK4hL.js";import"./legacy-admin-welcome-dialog-CXj5rtpz.js";import"./required-auth-layout-CVH6Kpuo.js";import"./use-org-sso-DZUFYVRN.js";import"./suggestion-7L8A3fQy.js";import"./usage-stats-DJ1VHc0T.js";import"./utils-CVEq3hMx.js";import"./markdown-BhLg-Zjp.js";import"./use-copy-DPZUA7Gr.js";import"./form-CDXejFhy.js";import"./use-mcp-prompts-CCB1WHsd.js";import"./task-key-ChxtLgH2.js";import"./index-BdQq_4o_.js";import"./active-indicator-CCMhAsc_.js";import"./editor-Dzcpm7rQ.js";import"./table-5d9iQpdi.js";import"./empty-state-BfnU_rAm.js";import"./use-id-selection-VNg6UPHp.js";import"./use-infinite-scroll-BGl4Rgru.js";import"./task-status-Dofkb2xp.js";import"./thread-sheet-body-BeKCfAHB.js";import"./useSuspenseInfiniteQuery-BnvO_4S5.js";import"./pair-B6XGEO8o.js";import"./use-task-board-items-BFsmDyZa.js";import"./task-route-hUi3-h4J.js";import"./project-index-CbwxAZlc.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DrwYcKK7.js";import"./types-B29zOSVo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-DYau24LH.js";import"./file-type-icon-zloL09QV.js";const Qe={fast:{labelKey:"automations.automationConfig.tierFast",subtitleKey:"automations.automationConfig.tierFastSubtitle",icon:js},smart:{labelKey:"automations.automationConfig.tierSmart",subtitleKey:"automations.automationConfig.tierSmartSubtitle",icon:zt},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:Et},{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:Tt,tools:[{name:"read_resource",titleKey:"automations.automationConfig.toolReadResource",descriptionKey:"automations.automationConfig.toolReadResourceDesc",icon:Tt},{name:"read_prompt",titleKey:"automations.automationConfig.toolReadPrompt",descriptionKey:"automations.automationConfig.toolReadPromptDesc",icon:kt},{name:"skill",titleKey:"automations.automationConfig.toolLoadSkill",descriptionKey:"automations.automationConfig.toolLoadSkillDesc",icon:kt}]}],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=Ds(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 E=ws(I._meta)??"__other__",Z=_s(I.name,E==="__other__"?void 0:E),A=I.title,xe=A&&A!==I.name?A:go(Z);H.has(E)||H.set(E,{clientId:E,conn:Y.get(E),tools:[]}),H.get(E).tools.push({name:I.name,display:xe,description:I.description})}const W=[...H.values()].sort(Co),G=(f?.tools??[]).map(vo),J=[...xo,...G],U=n===null?new Set(J):new Set(n),V=J.every(I=>U.has(I)),O=I=>a(J.every(E=>I.has(E))?null:[...I]),ae=I=>{const E=new Set(U);E.has(I)?E.delete(I):E.add(I),O(E)},ne=(I,E)=>{const Z=new Set(U);for(const A of I)E?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]!==V||e[28]!==i?(ie=i(V?"automations.automationConfig.allTools":"automations.automationConfig.tools"),e[27]=V,e[28]=i,e[29]=ie):ie=e[29];const ue=!V&&t.jsxs(Kt,{variant:"secondary",className:"ml-0.5 tabular-nums",children:[U.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,D="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=V?i("automations.automationConfig.allToolsEnabled",{count:J.length}):i("automations.automationConfig.toolsEnabledCount",{enabled:U.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]!==V||e[45]!==re||e[46]!==le?(C=t.jsx("button",{type:"button",onClick:re,disabled:V,className:"text-xs font-medium text-primary hover:underline disabled:cursor-default disabled:opacity-40 disabled:no-underline",children:le}),e[44]=V,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 z;e[49]!==a?(z=()=>a([]),e[49]=a,e[50]=z):z=e[50];const pe=U.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]!==z||e[54]!==pe||e[55]!==oe?(ce=t.jsx("button",{type:"button",onClick:z,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]=z,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?(_=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]=_):_=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 E=I.tools.map(bo),Z=E.filter(A=>U.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{label:i(I.headingKey),icon:I.icon,on:Z,total:E.length,onToggle:()=>ne(E,Z!==E.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${i(A.titleKey)} ${A.name}`,checked:U.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 E=I.tools.map(yo),Z=E.filter(A=>U.has(A)).length;return t.jsx(wt,{heading:t.jsx(Pt,{conn:I.conn,on:Z,total:E.length,onToggle:()=>ne(E,Z!==E.length)}),children:I.tools.map(A=>t.jsx(It,{value:`${A.display} ${A.name} ${I.conn?.title??""}`,checked:U.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]=_,e[23]=D,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],_=e[22],D=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]!==_?(R=t.jsxs(p,{children:[T,_,$]}),e[67]=p,e[68]=$,e[69]=T,e[70]=_,e[71]=R):R=e[71];let K;e[72]!==l||e[73]!==R||e[74]!==D||e[75]!==k?(K=t.jsx(l,{className:D,align:k,children:R}),e[72]=l,e[73]=R,e[74]=D,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 _o=[{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"],Do=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=>{Do(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:_o.map(v=>t.jsxs(ze,{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(ze,{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(ze,{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(ze,{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(ze,{className:"gap-2.5",onSelect:()=>{p(!1),g(!0)},children:[t.jsx(Vt,{size:14,className:"shrink-0"}),c("automations.addStarterPopover.jiraIssueEntersStatus")]}),t.jsxs(ze,{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{dO as Qt,c as Z,b as ee,r as w,j as t,B,aY as Zt,m as At,a6 as $t,D as et
|
|
|
16
16
|
"Content-Type": "application/json",
|
|
17
17
|
},
|
|
18
18
|
body: JSON.stringify({ hello: "world" }),
|
|
19
|
-
});`:"",_=g==="curl"?b:T;let D;e[6]!==j?(D=t.jsx(ot,{children:j}),e[6]=j,e[7]=D):D=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]!==D||e[11]!==k?(P=t.jsxs(st,{children:[D,k]}),e[10]=D,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]!==_||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(Dt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(Dt,{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(_,"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:_,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]=_,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 Eo(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=Z.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,_]=w.useState(s.cron_expression??""),D=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"):s.type==="card_mention"?o("automations.triggerCard.cardMention"):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=>Eo({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),_(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),_(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 U=J;let V;e[20]!==n||e[21]!==m||e[22]!==o||e[23]!==s.id?(V=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]=V):V=e[24];const O=V;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(Vt,{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]!==U||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==D||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:D,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=>_(L.target.value),onBlur:U,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),_(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(zo).join(", ")})]}),e[36]=a,e[37]=v,e[38]=T,e[39]=ne,e[40]=U,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=D,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]!==D?(ue=D&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=D,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:()=>{_(s.cron_expression??""),b(!0)},children:t.jsx(Et,{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 z;e[85]!==M?(z=t.jsx(xt,{children:M}),e[85]=M,e[86]=z):z=e[86];let pe;e[87]!==C||e[88]!==z?(pe=t.jsxs(gt,{children:[C,z]}),e[87]=C,e[88]=z,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 E;e[99]!==ce||e[100]!==I?(E=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=E):E=e[101];let Q;e[102]!==pe||e[103]!==E?(Q=t.jsxs(bt,{children:[pe,E]}),e[102]=pe,e[103]=E,e[104]=Q):Q=e[104];let A;e[105]!==x||e[106]!==Q?(A=t.jsx(vt,{open:x,onOpenChange:f,children:Q}),e[105]=x,e[106]=Q,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 _e;e[123]!==o?(_e=o("automations.triggerCard.rotate"),e[123]=o,e[124]=_e):_e=e[124];let De;e[125]!==O||e[126]!==_e?(De=t.jsx(jt,{onClick:O,children:_e}),e[125]=O,e[126]=_e,e[127]=De):De=e[127];let Ie;e[128]!==we||e[129]!==De?(Ie=t.jsxs(yt,{children:[we,De]}),e[128]=we,e[129]=De,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 Ue;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ue=L=>{L||p(null)},e[137]=Ue):Ue=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 Ee;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Oe?(Ee=t.jsx(Jt,{open:Be,onOpenChange:Ue,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]=Ee):Ee=e[147];let Ve;return e[148]!==re||e[149]!==A||e[150]!==Ae||e[151]!==Ee?(Ve=t.jsxs(t.Fragment,{children:[re,A,Ae,Ee]}),e[148]=re,e[149]=A,e[150]=Ae,e[151]=Ee,e[152]=Ve):Ve=e[152],Ve}function zo(r){const[e,s]=r;return`${e}: ${s}`}function Ko(r){const e=Z.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=Z.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=Z.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}=zs(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 D=h?.find(V=>V.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=V=>{j(V),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(Uo),e[42]=a,e[43]=c,e[44]=J):J=e[44];let U;e[45]!==J?(U=t.jsx(ye,{children:J}),e[45]=J,e[46]=U):U=e[46],e[47]!==Y||e[48]!==G||e[49]!==U?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,U]}),e[47]=Y,e[48]=G,e[49]=U,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:V=>{m(V),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=D?.paramsSchema&&Object.keys(D.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(D.paramsSchema).map(V=>{const[O,ae]=V;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 _;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(_=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]=_):_=e[69],_}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 Uo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Vo=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(z=>z.type==="text").map(z=>z.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:Es({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},U=e.models?.tier??"smart",V=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:U,modelOverride:V,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 z=O.getValues(),pe=O.control._defaultValues;O.reset(z,{keepValues:!0});const oe=W;G(!1);const ce={tier:z.tier,...z.modelOverride?{modelId:z.modelOverride.modelId,credentialId:z.modelOverride.credentialId,modelTitle:z.modelOverride.title}:{}},de={id:r,name:z.name,active:z.active,models:ce,tools:z.tools,maxAgentSteps:z.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}=_t({save:ue}),{schedule:fe,flush:se}=_t({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(Ut,{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),D("")},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:_,onChange:C=>D(C.target.value),onBlur:async()=>{const C=_.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),D("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=_.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),D(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),_&&!Re(_)&&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),D("")},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(zt,{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(Qs,{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(Us,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Vs,{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:Vo}),value:O.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),z=M===""?null:Number(M);O.setValue("maxAgentSteps",z===null||Number.isNaN(z)?null:z,{shouldDirty:!0})}})]})]})]})]})]})}function Go(r){const e=Z.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=D=>a.mutate({id:s.id,active:D}),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 D;e[34]!==s.id?(D=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=D):D=e[35],l=s.triggers.map(D),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"):s.system_key==="agent_mentions"?n("automations.builtin.mentionsDescription"):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 _;return e[51]!==u||e[52]!==y||e[53]!==T?(_=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=_):_=e[54],_}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=Z.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=Z.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(Qe,{}),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=Z.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(Qe,{}),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(Ut,{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 _;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(_=o==="settings"?i.system_key?t.jsx(Go,{automation:i}):t.jsx(Bo,{automationId:s,automation:i}):t.jsx(w.Suspense,{fallback:t.jsx(Qe,{}),children:t.jsx(Ho,{automationId:s,triggerIds:f})}),e[33]=i,e[34]=s,e[35]=o,e[36]=f,e[37]=_):_=e[37];let D;return e[38]!==T||e[39]!==_?(D=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,_]})})}),e[38]=T,e[39]=_,e[40]=D):D=e[40],D}function qo(r){return r.id}function Qo(){const r=Z.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 Ki(){const r=Z.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(us.Content,{children:t.jsx(Qo,{})}),r[0]=e):e=r[0],e}export{Ki as default};
|
|
19
|
+
});`:"",_=g==="curl"?b:T;let D;e[6]!==j?(D=t.jsx(ot,{children:j}),e[6]=j,e[7]=D):D=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]!==D||e[11]!==k?(P=t.jsxs(st,{children:[D,k]}),e[10]=D,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]!==_||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(Dt,{value:"curl",className:"h-7 px-2.5 text-xs",children:"curl"}),t.jsx(Dt,{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(_,"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:_,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]=_,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 Eo(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,_]=w.useState(s.cron_expression??""),D=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"):s.type==="card_mention"?o("automations.triggerCard.cardMention"):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=>Eo({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),_(s.cron_expression??"");return}try{await G(L),b(!1)}catch{X.error(o("automations.triggerCard.failedToUpdateStarter")),_(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 U=J;let V;e[20]!==n||e[21]!==m||e[22]!==o||e[23]!==s.id?(V=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]=V):V=e[24];const O=V;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(Vt,{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]!==U||e[41]!==y||e[42]!==$||e[43]!==k||e[44]!==S||e[45]!==F||e[46]!==D||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:D,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=>_(L.target.value),onBlur:U,onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&(b(!1),_(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(zo).join(", ")})]}),e[36]=a,e[37]=v,e[38]=T,e[39]=ne,e[40]=U,e[41]=y,e[42]=$,e[43]=k,e[44]=S,e[45]=F,e[46]=D,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]!==D?(ue=D&&t.jsx(Le,{className:"size-[13px] text-muted-foreground"}),e[56]=D,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:()=>{_(s.cron_expression??""),b(!0)},children:t.jsx(Et,{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 z;e[85]!==M?(z=t.jsx(xt,{children:M}),e[85]=M,e[86]=z):z=e[86];let pe;e[87]!==C||e[88]!==z?(pe=t.jsxs(gt,{children:[C,z]}),e[87]=C,e[88]=z,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 E;e[99]!==ce||e[100]!==I?(E=t.jsxs(yt,{children:[ce,I]}),e[99]=ce,e[100]=I,e[101]=E):E=e[101];let Z;e[102]!==pe||e[103]!==E?(Z=t.jsxs(bt,{children:[pe,E]}),e[102]=pe,e[103]=E,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 _e;e[123]!==o?(_e=o("automations.triggerCard.rotate"),e[123]=o,e[124]=_e):_e=e[124];let De;e[125]!==O||e[126]!==_e?(De=t.jsx(jt,{onClick:O,children:_e}),e[125]=O,e[126]=_e,e[127]=De):De=e[127];let Ie;e[128]!==we||e[129]!==De?(Ie=t.jsxs(yt,{children:[we,De]}),e[128]=we,e[129]=De,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 Ue;e[137]===Symbol.for("react.memo_cache_sentinel")?(Ue=L=>{L||p(null)},e[137]=Ue):Ue=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 Ee;e[142]!==Be||e[143]!==Ge||e[144]!==He||e[145]!==$e||e[146]!==Oe?(Ee=t.jsx(Jt,{open:Be,onOpenChange:Ue,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]=Ee):Ee=e[147];let Ve;return e[148]!==re||e[149]!==A||e[150]!==Ae||e[151]!==Ee?(Ve=t.jsxs(t.Fragment,{children:[re,A,Ae,Ee]}),e[148]=re,e[149]=A,e[150]=Ae,e[151]=Ee,e[152]=Ve):Ve=e[152],Ve}function zo(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}=zs(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 D=h?.find(V=>V.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=V=>{j(V),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(Uo),e[42]=a,e[43]=c,e[44]=J):J=e[44];let U;e[45]!==J?(U=t.jsx(ye,{children:J}),e[45]=J,e[46]=U):U=e[46],e[47]!==Y||e[48]!==G||e[49]!==U?(N=t.jsxs(ge,{value:Y,onValueChange:H,children:[G,U]}),e[47]=Y,e[48]=G,e[49]=U,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:V=>{m(V),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=D?.paramsSchema&&Object.keys(D.paramsSchema).length>0&&t.jsx("div",{className:"flex flex-col gap-2",children:Object.entries(D.paramsSchema).map(V=>{const[O,ae]=V;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 _;return e[63]!==y||e[64]!==v||e[65]!==N||e[66]!==S||e[67]!==b||e[68]!==T?(_=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]=_):_=e[69],_}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 Uo(r){return t.jsx(be,{value:r.id,children:r.title},r.id)}const Vo=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(z=>z.type==="text").map(z=>z.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:Es({managerAgentId:cs.AUTOMATION_MANAGER(c.id),managerName:"Automation Manager",kind:"automation",id:r,instructions:M})})}finally{F(!1)}}},U=e.models?.tier??"smart",V=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:U,modelOverride:V,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 z=O.getValues(),pe=O.control._defaultValues;O.reset(z,{keepValues:!0});const oe=W;G(!1);const ce={tier:z.tier,...z.modelOverride?{modelId:z.modelOverride.modelId,credentialId:z.modelOverride.credentialId,modelTitle:z.modelOverride.title}:{}},de={id:r,name:z.name,active:z.active,models:ce,tools:z.tools,maxAgentSteps:z.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}=_t({save:ue}),{schedule:fe,flush:se}=_t({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(Ut,{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),D("")},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:_,onChange:C=>D(C.target.value),onBlur:async()=>{const C=_.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),D("")}catch{X.error(a("automations.automationDetail.failedToAddStarter"))}},onKeyDown:async C=>{const M=_.trim();C.key==="Enter"&&M&&Re(M)&&C.target.blur(),C.key==="Escape"&&(T(!1),D(""))},placeholder:"0 9 * * 1-5",className:"flex-1 text-sm font-mono bg-transparent outline-none placeholder:text-muted-foreground/40",autoFocus:!0}),_&&!Re(_)&&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),D("")},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(zt,{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(Us,{open:N,onOpenChange:S,className:"flex flex-col gap-2.5",children:[t.jsxs(Vs,{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:Vo}),value:O.watch("maxAgentSteps")??"",onChange:C=>{const M=C.target.value.trim(),z=M===""?null:Number(M);O.setValue("maxAgentSteps",z===null||Number.isNaN(z)?null:z,{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=D=>a.mutate({id:s.id,active:D}),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 D;e[34]!==s.id?(D=k=>t.jsx(Xt,{trigger:k,automationId:s.id,readOnly:!0},k.id),e[34]=s.id,e[35]=D):D=e[35],l=s.triggers.map(D),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"):s.system_key==="agent_mentions"?n("automations.builtin.mentionsDescription"):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 _;return e[51]!==u||e[52]!==y||e[53]!==T?(_=t.jsxs("div",{className:"flex flex-col gap-8",children:[u,y,T]}),e[51]=u,e[52]=y,e[53]=T,e[54]=_):_=e[54],_}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(Ut,{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 _;e[33]!==i||e[34]!==s||e[35]!==o||e[36]!==f?(_=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]=_):_=e[37];let D;return e[38]!==T||e[39]!==_?(D=t.jsx(Xe,{children:t.jsx(Xe.Content,{children:t.jsxs(Xe.Container,{children:[T,_]})})}),e[38]=T,e[39]=_,e[40]=D):D=e[40],D}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 Ki(){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{Ki as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as S,b as O,r as G,j as e,n as a,E as Q,B as V,b7 as U}from"./index-
|
|
1
|
+
import{c as S,b as O,r as G,j as e,n as a,E as Q,B as V,b7 as U}from"./index-CUTEHf7n.js";import{ChatLayout as W}from"./index-CfzIzecT.js";import{s as X}from"./Plus-BEFFoW2D.js";import{a as Y}from"./UserCheck01-CjBhJIbn.js";import{i as F}from"./Zap-D5Q1SF5c.js";import{S as Z}from"./search-input-DaJb5UpE.js";import{E as $}from"./empty-state-BfnU_rAm.js";import{u as tt,a as et,b as it}from"./use-automations-BpMr2z_i.js";import{a as ot}from"./use-panel-navigate-Dcxy731-.js";import{A as st}from"./automation-list-row-CUaTcT3h.js";import{c as nt}from"./thread-route-hABZCF2d.js";import"./use-mobile-LSpSJcPd.js";import"./tooltip-BtQY7me6.js";import"./index-C08yFDSB.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./XClose-CUoBDo4j.js";import"./thread-button-8lhq8YVG.js";import"./use-sidebar-collapsed-BjLeIURU.js";import"./sheet-DwYwF5Xe.js";import"./use-chat-layout-state-B6O7bs0d.js";import"./toolbar-icon-button-C4Or2Ut1.js";import"./use-in-settings-Dv_cwy92.js";import"./resizable-DtQVeM4U.js";import"./route-page-header-Dyzw28fO.js";import"./LayoutLeft-DUieRSDJ.js";import"./use-project-scope-3Q37Eln5.js";import"./repository-binding-DyxjotEQ.js";import"./use-mcp-client-BVU34o8K.js";import"./auth-D7Uu7n_e.js";import"./use-current-view-SFKgOLYn.js";import"./SearchMd-BVX4smTx.js";import"./badge-CdntSWLw.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Trash01-Bi3fjf_i.js";import"./agent-icon-y2SKybSP.js";import"./AlertCircle-B4BiejsA.js";import"./Tool01-B97c8idL.js";import"./ArrowUp-C2dE69W7.js";import"./ArrowLeft-DpoZP_fX.js";import"./ArrowRight-waHzto0g.js";import"./BookOpen01-Det9naRR.js";import"./Globe04-YQZG_Qbl.js";import"./CheckCircle-BNEuJPHU.js";import"./ChevronDown-_sr4up4D.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./ChevronUp-CK7Ad_mD.js";import"./UserSquare-D0WQA2_a.js";import"./LinkBroken01-jFeLEleD.js";import"./CreditCard01-DaUYIK4F.js";import"./File02-Dj9EXPDT.js";import"./Eye-CYtkFg_6.js";import"./Fingerprint04-kauf3nbZ.js";import"./Image01-ChEwjYSJ.js";import"./Key01-DPAOwUET.js";import"./Minus-DVAnrb98.js";import"./Monitor01-D5to20Na.js";import"./Sun-D2fDzKM6.js";import"./Play-DBG3GXxW.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./Upload01-B0N1cyeo.js";import"./Users01-CNLWTh0g.js";function rt(o){if(!(o instanceof Error))return!1;const t=o.message.toLowerCase();return t.includes("relation")&&t.includes("does not exist")}function at(o){const t=S.c(45),{virtualMcpId:n}=o,i=O(),{openPanel:r}=ot(),{data:D,error:M}=tt(n),v=D===void 0?[]:D,{create:y}=et(),[_,H]=G.useState("");if(M&&rt(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]!==r?(j=()=>r("settings"),t[5]=r,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(V,{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(a,{children:e.jsx(a.Content,{children:e.jsx(a.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]!==r?(w=s=>r(`automation:${s}`),t[16]=r,t[17]=w):w=t[17];const B=w,R=async()=>{if(y.isPending)return;Q("automation_new_clicked",{virtual_mcp_id:n,existing_count:v.length});const s=await y.mutateAsync(it(n));B(s.id)},K=y.isPending;let A;t[18]===Symbol.for("react.memo_cache_sentinel")?(A=e.jsx(X,{size:14}),t[18]=A):A=t[18];let m;t[19]!==i?(m=i("automations.automationsList.newAutomation"),t[19]=i,t[20]=m):m=t[20];let L;t[21]!==y.isPending||t[22]!==R||t[23]!==m?(L=e.jsxs(V,{size:"sm",onClick:R,disabled:K,children:[A,m]}),t[21]=y.isPending,t[22]=R,t[23]=m,t[24]=L):L=t[24];const P=L,E=a,T=a,k=a;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(a.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(F,{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(F,{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]!==T.Content?(f=e.jsx(T.Content,{children:d}),t[39]=d,t[40]=T.Content,t[41]=f):f=t[41];let b;return t[42]!==E||t[43]!==f?(b=e.jsx(E,{children:f}),t[42]=E,t[43]=f,t[44]=b):b=t[44],b}function mt(o){const t=S.c(3),{virtualMcpId:n}=o;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=e.jsx(U,{}),t[0]=i):i=t[0];let r;return t[1]!==n?(r=e.jsx(G.Suspense,{fallback:i,children:e.jsx(at,{virtualMcpId:n})}),t[1]=n,t[2]=r):r=t[2],r}function lt(){const o=S.c(2),t=nt();let n;return o[0]!==t?(n=e.jsx(mt,{virtualMcpId:t}),o[0]=t,o[1]=n):n=o[1],n}function je(){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{je as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/post-calendar-VNdLJQb0.js","assets/index-CUTEHf7n.js","assets/index-DqzmkMvh.css","assets/agent-icon-y2SKybSP.js","assets/AlertCircle-B4BiejsA.js","assets/UserCheck01-CjBhJIbn.js","assets/Tool01-B97c8idL.js","assets/ArrowUp-C2dE69W7.js","assets/ArrowLeft-DpoZP_fX.js","assets/ArrowRight-waHzto0g.js","assets/BookOpen01-Det9naRR.js","assets/Globe04-YQZG_Qbl.js","assets/CheckCircle-BNEuJPHU.js","assets/ChevronDown-_sr4up4D.js","assets/ChevronSelectorVertical-Ddl6sDao.js","assets/ChevronUp-CK7Ad_mD.js","assets/UserSquare-D0WQA2_a.js","assets/LinkBroken01-jFeLEleD.js","assets/CreditCard01-DaUYIK4F.js","assets/File02-Dj9EXPDT.js","assets/MessageCircle01-Cf5Qa_r1.js","assets/SwitchHorizontal01-CgqtVqHH.js","assets/Eye-CYtkFg_6.js","assets/Fingerprint04-kauf3nbZ.js","assets/Image01-ChEwjYSJ.js","assets/Key01-DPAOwUET.js","assets/LayoutLeft-DUieRSDJ.js","assets/Minus-DVAnrb98.js","assets/Monitor01-D5to20Na.js","assets/Sun-D2fDzKM6.js","assets/Play-DBG3GXxW.js","assets/Plus-BEFFoW2D.js","assets/SearchMd-BVX4smTx.js","assets/ShoppingBag01-Bvm3sWvz.js","assets/Trash01-Bi3fjf_i.js","assets/Upload01-B0N1cyeo.js","assets/Users01-CNLWTh0g.js","assets/XClose-CUoBDo4j.js","assets/Zap-D5Q1SF5c.js","assets/scroll-area-CRlFqWco.js","assets/index-BdQq_4o_.js","assets/date-utils-CrvIKg-s.js","assets/category-tree-k_En3Ghr.js","assets/sandbox-start-errors-BK_aDCyt.js","assets/pair-B6XGEO8o.js","assets/collapsible-CUOhSps5.js","assets/use-copy-DPZUA7Gr.js","assets/usage-stats-DJ1VHc0T.js","assets/utils-CVEq3hMx.js","assets/markdown-BhLg-Zjp.js","assets/chat-context-3o15fH-n.js","assets/use-panel-navigate-Dcxy731-.js","assets/thread-route-hABZCF2d.js","assets/use-project-scope-3Q37Eln5.js","assets/repository-binding-DyxjotEQ.js","assets/use-mcp-client-BVU34o8K.js","assets/auth-D7Uu7n_e.js","assets/use-view-draft-kind-DECgwRep.js","assets/use-blog-view-CpUCE6TS.js","assets/use-organization-settings-C-YWM0uD.js","assets/schema-AdvpV9XD.js","assets/task-board-ZELaPSpv.js","assets/thread-intent-C-4a46Zs.js","assets/delay-CnY5UFtP.js","assets/backoff-CrEUbyZT.js","assets/watch-sse-pool-BqAScN4r.js","assets/session-runtime-DRkG9ReZ.js","assets/use-entitlements-DH1D5a0L.js","assets/use-ai-providers-Dya2oYuM.js","assets/use-current-view-SFKgOLYn.js","assets/use-in-settings-Dv_cwy92.js","assets/use-decopilot-events-B93IJnco.js","assets/use-org-fs-CYycA4iA.js","assets/useInfiniteQuery-Dmz76p-1.js","assets/infiniteQueryObserver-DN-l8Mqm.js","assets/use-mobile-LSpSJcPd.js","assets/tooltip-BtQY7me6.js","assets/index-C08yFDSB.js","assets/gateway-client-D6U4MBNC.js","assets/form-CDXejFhy.js","assets/label-qad8ROdP.js","assets/task-key-ChxtLgH2.js","assets/use-task-board-items-BFsmDyZa.js","assets/config-Bn2m6WJs.js","assets/task-route-hUi3-h4J.js","assets/project-index-CbwxAZlc.js","assets/shell-layout-bVoP9kOD.js","assets/use-deployment-admin-DYC3wY2X.js","assets/admin-fetch-BhTJlAsX.js","assets/use-org-notice-B0u21Cu1.js","assets/command-BvXS_hwC.js","assets/index-dYHd0KJA.js","assets/integration-icon-BRVzdEXf.js","assets/project-icon-4S0TtqeC.js","assets/use-navigate-to-agent-fspVUy0_.js","assets/use-debounced-value-C75ZQTZG.js","assets/new-project-dialog-CVc657qA.js","assets/repository-picker-Diifpqm3.js","assets/github-icon-QoDNyjsW.js","assets/collection-search-gjXSkcT8.js","assets/new-project-store-ehAJK4hL.js","assets/legacy-admin-welcome-dialog-CXj5rtpz.js","assets/drawer-Co6CTMtJ.js","assets/required-auth-layout-CVH6Kpuo.js","assets/use-org-sso-DZUFYVRN.js","assets/shell-layout-CE2Eihra.css","assets/content-blocks-o63cs2vh.js","assets/mcp-app-renderer-DrwYcKK7.js","assets/types-B29zOSVo.js","assets/omit-server-managed-metadata-L5IhjRZB.js","assets/sheet-DwYwF5Xe.js","assets/use-connection-BAk2dsuv.js","assets/use-mcp-prompts-CCB1WHsd.js","assets/use-thread-outputs-DYau24LH.js","assets/file-type-icon-zloL09QV.js","assets/section-array-field-ZEOag6le.js","assets/blocks-tab-states-clMxtmY8.js","assets/site-editor-toast-BCn8hYHZ.js","assets/content-changes-Dwsp4uvc.js","assets/sandbox-url-D3mC8qhT.js","assets/use-sandbox-events-p6STSWE5.js","assets/use-blocks-v8-project-ovX-kkwX.js","assets/use-voice-input-Ta8CFXyw.js","assets/popover-t4wJ-TtS.js","assets/index-B26-jaFe.js","assets/checkbox-DG0VRyZt.js","assets/select-CXHAcNGT.js","assets/ai-providers-logos-DD3qZ33J.js","assets/openai-compatible-presets-BKGfVqEx.js","assets/utils-VRJjHnOC.js","assets/sandbox-git-api-BHkz0_nl.js","assets/empty-state-BfnU_rAm.js","assets/item-actions-B4eKhNFa.js","assets/badge-CdntSWLw.js","assets/empty-state-BlV47Moy.js","assets/delete-copy-B6vUu2FZ.js","assets/use-never-published-Ch6taPxS.js","assets/hosted-reconcile-Dgr_RAK2.js","assets/search-input-DaJb5UpE.js","assets/tabs-DEsdaVKa.js","assets/active-indicator-CCMhAsc_.js","assets/use-file-configs-BiSZZuuf.js","assets/asset-utils-BDk7TImr.js","assets/index-Dc3vpBAe.js","assets/match-site-slug-config-B47_xZCi.js","assets/textarea-J2V-aUg9.js","assets/primitives-Dq7WtxY4.js","assets/use-move-blocks-C_L5dYiU.js","assets/monaco-editor-Cmq9PYT5.js","assets/editor-Dzcpm7rQ.js","assets/record-editor-BYF0WYdX.js","assets/save-status-Cgw9Hlp4.js","assets/switch-CQr_229Y.js","assets/toggle-group-BSy9ppTS.js","assets/blog-schema-C2rs0u9l.js","assets/held-block-view-D9gMtmL4.js","assets/calendar-CQCK8RMi.js","assets/editor-classes-BO4PtG02.js","assets/sortable.esm-Dv7GaG48.js","assets/named-rule-step-D4anrrdN.js","assets/slider-BdrBFFmy.js","assets/index-CGuDb95W.js","assets/tooltipContext-BbkLIEo5.js","assets/CategoricalChart-D9Euwg-G.js","assets/index-CnTDG57D.js","assets/combobox-CH-LlA2d.js","assets/use-autosave-Dg5clSHS.js","assets/category-editor-C7K4UFzc.js","assets/blog-preview-url-BxEndwKO.js","assets/use-fast-preview-draft-url-CY0fb2LM.js","assets/block-document-dwVjY8ei.js","assets/suggestion-7L8A3fQy.js","assets/product-picker-dialog-DkguIJb9.js","assets/index-C75j3Sf-.js","assets/context-D6GeU9Zr.js","assets/index-0O8gsl-7.js","assets/icon-button-BZOKf7Ue.js","assets/use-delete-block-CtnkMpgb.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as X,b as ie,j as t,r as M,b8 as oe,h as ae,aP as xe,aO as be,aL as ye,aJ as ve,aK as ke,aN as Ce,aM as je,b9 as _e,m as we,ba as Se,bb as Pe,t as T,B as Be,d as De,f as Ae,u as Ne,$ as le,bc as Ee}from"./index-CUTEHf7n.js";import{ChatLayout as Re}from"./index-CfzIzecT.js";import{S as Te}from"./site-draft-actions-Dd2WZL1s.js";import{F as $e}from"./feature-gate-CRmt1R7b.js";import{i as ne}from"./File02-Dj9EXPDT.js";import{s as Ie}from"./Plus-BEFFoW2D.js";import{s as Le,a as Ke}from"./UserSquare-D0WQA2_a.js";import{c as ce}from"./UserCheck01-CjBhJIbn.js";import{t as me}from"./Users01-CNLWTh0g.js";import{S as Ve}from"./scroll-area-CRlFqWco.js";import{T as Me,a as Fe,c as Oe}from"./tooltip-BtQY7me6.js";import{u as ze,a as Ge,d as Ue}from"./delete-copy-B6vUu2FZ.js";import{u as We,a as Qe,k as Z}from"./use-never-published-Ch6taPxS.js";import{u as qe}from"./use-delete-block-CtnkMpgb.js";import{d as He,f as Je}from"./site-editor-toast-BCn8hYHZ.js";import{C as J,u as Xe,P as Ye,L as Ze,I as et,a as tt,s as ot,r as st}from"./item-actions-B4eKhNFa.js";import{i as rt,B as te,s as it,E as at,o as lt,c as nt,m as ct,b as ee,g as se,e as mt,a as re,l as pt,r as dt,d as ut,f as ft,u as gt}from"./category-tree-k_En3Ghr.js";import{u as ht}from"./primitives-Dq7WtxY4.js";import{F as xt}from"./agent-icon-y2SKybSP.js";import{B as bt,a as yt}from"./blog-source-gate-BXEDNt3_.js";import{r as vt}from"./use-panel-navigate-Dcxy731-.js";import{c as kt}from"./thread-route-hABZCF2d.js";import{A as Ct}from"./agent-view-guard-CHMCp4na.js";import{a as jt}from"./blog-view-gate-BEqdtyeU.js";import"./use-mobile-LSpSJcPd.js";import"./MessageCircle01-Cf5Qa_r1.js";import"./XClose-CUoBDo4j.js";import"./thread-button-8lhq8YVG.js";import"./use-sidebar-collapsed-BjLeIURU.js";import"./sheet-DwYwF5Xe.js";import"./use-chat-layout-state-B6O7bs0d.js";import"./toolbar-icon-button-C4Or2Ut1.js";import"./use-in-settings-Dv_cwy92.js";import"./resizable-DtQVeM4U.js";import"./route-page-header-Dyzw28fO.js";import"./LayoutLeft-DUieRSDJ.js";import"./use-project-scope-3Q37Eln5.js";import"./repository-binding-DyxjotEQ.js";import"./use-mcp-client-BVU34o8K.js";import"./auth-D7Uu7n_e.js";import"./use-current-view-SFKgOLYn.js";import"./separator-BmldSaZv.js";import"./chat-context-3o15fH-n.js";import"./use-view-draft-kind-DECgwRep.js";import"./use-blog-view-CpUCE6TS.js";import"./use-organization-settings-C-YWM0uD.js";import"./schema-AdvpV9XD.js";import"./task-board-ZELaPSpv.js";import"./thread-intent-C-4a46Zs.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-BqAScN4r.js";import"./session-runtime-DRkG9ReZ.js";import"./use-entitlements-DH1D5a0L.js";import"./use-ai-providers-Dya2oYuM.js";import"./use-decopilot-events-B93IJnco.js";import"./use-org-fs-CYycA4iA.js";import"./useInfiniteQuery-Dmz76p-1.js";import"./infiniteQueryObserver-DN-l8Mqm.js";import"./use-org-notice-B0u21Cu1.js";import"./popover-t4wJ-TtS.js";import"./command-BvXS_hwC.js";import"./index-dYHd0KJA.js";import"./SearchMd-BVX4smTx.js";import"./tabs-DEsdaVKa.js";import"./active-indicator-CCMhAsc_.js";import"./ChevronDown-_sr4up4D.js";import"./SwitchHorizontal01-CgqtVqHH.js";import"./Tool01-B97c8idL.js";import"./Trash01-Bi3fjf_i.js";import"./use-voice-input-Ta8CFXyw.js";import"./drawer-Co6CTMtJ.js";import"./index-B26-jaFe.js";import"./checkbox-DG0VRyZt.js";import"./Minus-DVAnrb98.js";import"./select-CXHAcNGT.js";import"./index-BdQq_4o_.js";import"./index-C08yFDSB.js";import"./ChevronUp-CK7Ad_mD.js";import"./ArrowLeft-DpoZP_fX.js";import"./ChevronSelectorVertical-Ddl6sDao.js";import"./Key01-DPAOwUET.js";import"./ai-providers-logos-DD3qZ33J.js";import"./openai-compatible-presets-BKGfVqEx.js";import"./Monitor01-D5to20Na.js";import"./AlertCircle-B4BiejsA.js";import"./Eye-CYtkFg_6.js";import"./Image01-ChEwjYSJ.js";import"./use-debounced-value-C75ZQTZG.js";import"./shell-layout-bVoP9kOD.js";import"./Globe04-YQZG_Qbl.js";import"./use-deployment-admin-DYC3wY2X.js";import"./admin-fetch-BhTJlAsX.js";import"./CheckCircle-BNEuJPHU.js";import"./Zap-D5Q1SF5c.js";import"./integration-icon-BRVzdEXf.js";import"./LinkBroken01-jFeLEleD.js";import"./project-icon-4S0TtqeC.js";import"./use-navigate-to-agent-fspVUy0_.js";import"./new-project-dialog-CVc657qA.js";import"./label-qad8ROdP.js";import"./repository-picker-Diifpqm3.js";import"./github-icon-QoDNyjsW.js";import"./collection-search-gjXSkcT8.js";import"./BookOpen01-Det9naRR.js";import"./ShoppingBag01-Bvm3sWvz.js";import"./new-project-store-ehAJK4hL.js";import"./legacy-admin-welcome-dialog-CXj5rtpz.js";import"./required-auth-layout-CVH6Kpuo.js";import"./use-org-sso-DZUFYVRN.js";import"./cms-store-drafts-JEUeezAR.js";import"./serial-task-queue-CGOeQgpr.js";import"./virtual-mcp-BNBTH_8N.js";import"./url-slug-5tJR8vZd.js";import"./use-blocks-v8-project-ovX-kkwX.js";import"./content-changes-Dwsp4uvc.js";import"./use-fast-preview-draft-url-CY0fb2LM.js";import"./blocks-tab-states-clMxtmY8.js";import"./sandbox-url-D3mC8qhT.js";import"./empty-state-BfnU_rAm.js";import"./index-D2ZLBdth.js";import"./ArrowUp-C2dE69W7.js";import"./input-IAYjK7lR.js";import"./usage-stats-DJ1VHc0T.js";import"./utils-CVEq3hMx.js";import"./markdown-BhLg-Zjp.js";import"./use-copy-DPZUA7Gr.js";import"./gateway-client-D6U4MBNC.js";import"./form-CDXejFhy.js";import"./icon-button-BZOKf7Ue.js";import"./file-type-icon-zloL09QV.js";import"./chat-draft-DkTLJIsD.js";import"./ArrowRight-waHzto0g.js";import"./Upload01-B0N1cyeo.js";import"./use-deco-credits-DzCgvsqG.js";import"./toggle-group-BSy9ppTS.js";import"./input-e3Q-tVUa.js";import"./suggestion-7L8A3fQy.js";import"./use-mcp-prompts-CCB1WHsd.js";import"./question-004-sINsf4GQ.js";import"./feature-paywall-B2EmZsmT.js";import"./plan-ladder-uOWkvedM.js";import"./add-connection-dialog-QaQFm_sJ.js";import"./extract-connection-data-CTwhrI6L.js";import"./metadata-D72DunRR.js";import"./connection-D4RX46wh.js";import"./connection-card-DTpr3C0a.js";import"./connection-slug-BuWfvd-P.js";import"./textarea-J2V-aUg9.js";import"./use-connection-BAk2dsuv.js";import"./schema-rfxhIdnI.js";import"./connection-form-helpers-Bk5WpOzS.js";import"./authenticate-and-persist-oauth-C7CYUnX8.js";import"./mcp-oauth-CAZv4B3x.js";import"./mcp-oauth-CqsxDqXO.js";import"./collection-tabs-COt6y1YG.js";import"./badge-CdntSWLw.js";import"./use-infinite-scroll-BGl4Rgru.js";import"./useSuspenseInfiniteQuery-BnvO_4S5.js";import"./use-task-board-items-BFsmDyZa.js";import"./pair-B6XGEO8o.js";import"./collapsible-CUOhSps5.js";import"./task-key-ChxtLgH2.js";import"./config-Bn2m6WJs.js";import"./task-route-hUi3-h4J.js";import"./project-index-CbwxAZlc.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DrwYcKK7.js";import"./types-B29zOSVo.js";import"./omit-server-managed-metadata-L5IhjRZB.js";import"./use-thread-outputs-DYau24LH.js";import"./agent-capabilities-O4jivf-X.js";import"./use-cms-publish-actions-B7gEo4o7.js";import"./use-content-sync-4eASTxdJ.js";import"./sandbox-git-api-BHkz0_nl.js";import"./utils-VRJjHnOC.js";import"./device-hint-BDXdRFQX.js";import"./alert-565fy8M1.js";import"./section-array-field-ZEOag6le.js";import"./editor-Dzcpm7rQ.js";import"./save-changes-debug-nBi-n9eV.js";import"./use-sandbox-events-p6STSWE5.js";import"./sandbox-lifecycle-context-D6WWTBdt.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./index-Dc3vpBAe.js";import"./hosted-reconcile-Dgr_RAK2.js";import"./search-input-DaJb5UpE.js";import"./use-file-configs-BiSZZuuf.js";import"./asset-utils-BDk7TImr.js";import"./date-utils-CrvIKg-s.js";import"./empty-state-BlV47Moy.js";import"./match-site-slug-config-B47_xZCi.js";import"./monaco-editor-Cmq9PYT5.js";import"./Play-DBG3GXxW.js";import"./use-move-blocks-C_L5dYiU.js";import"./CreditCard01-DaUYIK4F.js";import"./Fingerprint04-kauf3nbZ.js";import"./Sun-D2fDzKM6.js";import"./blog-preview-url-BxEndwKO.js";import"./use-main-panel-tabs-CCz7Ktbi.js";import"./use-mcp-tools-DagGRrIt.js";import"./resolve-tab-icon-Dd4QQOMZ.js";import"./use-task-metadata-CUi2_x3B.js";import"./preview-source-BsRLGWUP.js";import"./use-project-native-view-presence-tfOMrkxo.js";function _t(i){const e=X.c(53),{active:a,counts:g,showContext:v,onSelect:n}=i,o=ie();let d;e[0]!==o?(d=o("sandbox.collectionsSidebar.blog"),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==d?(c=t.jsx("div",{className:"flex h-12 shrink-0 items-center border-b px-3",children:t.jsx("span",{className:"text-sm font-medium",children:d})}),e[2]=d,e[3]=c):c=e[3];let u;e[4]!==a||e[5]!==n||e[6]!==v||e[7]!==o?(u=v&&t.jsx(J,{icon:Le,label:o("sandbox.collectionsSidebar.context"),active:a==="context",onClick:()=>n("context")}),e[4]=a,e[5]=n,e[6]=v,e[7]=o,e[8]=u):u=e[8];let s;e[9]!==o?(s=o("sandbox.collectionsSidebar.posts"),e[9]=o,e[10]=s):s=e[10];const j=a==="posts";let x;e[11]!==n?(x=()=>n("posts"),e[11]=n,e[12]=x):x=e[12];let b;e[13]!==g.posts||e[14]!==s||e[15]!==j||e[16]!==x?(b=t.jsx(J,{icon:ne,label:s,count:g.posts,active:j,onClick:x}),e[13]=g.posts,e[14]=s,e[15]=j,e[16]=x,e[17]=b):b=e[17];let y;e[18]!==o?(y=o("sandbox.collectionsSidebar.authors"),e[18]=o,e[19]=y):y=e[19];const k=a==="authors";let l;e[20]!==n?(l=()=>n("authors"),e[20]=n,e[21]=l):l=e[21];let m;e[22]!==g.authors||e[23]!==l||e[24]!==y||e[25]!==k?(m=t.jsx(J,{icon:me,label:y,count:g.authors,active:k,onClick:l}),e[22]=g.authors,e[23]=l,e[24]=y,e[25]=k,e[26]=m):m=e[26];let h;e[27]!==o?(h=o("sandbox.collectionsSidebar.categories"),e[27]=o,e[28]=h):h=e[28];const f=a==="categories";let S;e[29]!==n?(S=()=>n("categories"),e[29]=n,e[30]=S):S=e[30];let A;e[31]!==g.categories||e[32]!==h||e[33]!==f||e[34]!==S?(A=t.jsx(J,{icon:ce,label:h,count:g.categories,active:f,onClick:S}),e[31]=g.categories,e[32]=h,e[33]=f,e[34]=S,e[35]=A):A=e[35];let N;e[36]!==o?(N=o("sandbox.collectionsSidebar.postSchedule"),e[36]=o,e[37]=N):N=e[37];const U=a==="post-schedule";let D;e[38]!==n?(D=()=>n("post-schedule"),e[38]=n,e[39]=D):D=e[39];let B;e[40]!==N||e[41]!==U||e[42]!==D?(B=t.jsx(J,{icon:xt,label:N,active:U,onClick:D}),e[40]=N,e[41]=U,e[42]=D,e[43]=B):B=e[43];let E;e[44]!==m||e[45]!==A||e[46]!==B||e[47]!==u||e[48]!==b?(E=t.jsxs("nav",{className:"flex flex-col gap-0.5 p-1.5",children:[u,b,m,A,B]}),e[44]=m,e[45]=A,e[46]=B,e[47]=u,e[48]=b,e[49]=E):E=e[49];let C;return e[50]!==c||e[51]!==E?(C=t.jsxs("div",{className:"flex w-[208px] shrink-0 flex-col border-r",children:[c,E]}),e[50]=c,e[51]=E,e[52]=C):C=e[52],C}const wt=M.lazy(()=>oe(()=>import("./post-calendar-VNdLJQb0.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149])).then(i=>({default:i.PostCalendar}))),St=M.lazy(()=>oe(()=>import("./record-editor-BYF0WYdX.js"),__vite__mapDeps([150,1,2,80,126,40,77,13,15,145,151,24,34,35,136,122,66,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,68,69,70,71,72,73,74,123,102,76,75,3,4,5,6,7,8,9,10,11,12,14,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,36,37,38,124,125,127,128,117,118,119,120,121,129,130,137,116,131,138,139,140,95,141,142,47,48,49,46,78,79,152,153,144,42,43,44,45,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,154,155,156,157,158,159,160,161,162,163,164,165,39,146,147,166])).then(i=>({default:i.RecordEditor}))),Pt=M.lazy(()=>oe(()=>import("./category-editor-C7K4UFzc.js"),__vite__mapDeps([167,1,2,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,4,9,19,16,80,126,40,77,13,15,154,5,155,136,122,123,102,76,75,3,6,7,8,10,11,12,14,17,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,124,125,127,128,117,118,119,120,121,129,130,137,116,131,138,139,140,95,141,142,47,48,49,46,78,79,151,152,153,144,156,145,157,81,158,42,43,44,45,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,159,160,161,162,163,164,165,39,168,147,169,166,170,135,143,171,146,172,173])).then(i=>({default:i.CategoryEditor}))),Bt=M.lazy(()=>oe(()=>import("./context-D6GeU9Zr.js"),__vite__mapDeps([174,1,2,137,117,118,54,55,56,64,119,50,51,52,53,57,58,59,60,61,62,63,65,66,67,68,69,70,71,72,73,74,120,121,122,123,102,76,77,75,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,124,125,126,40,127,128,129,130,116,131,133,80,152,145,135,47,48,49,46,78,79,136,138,139,140,95,141,142,42,43,44,45,81,82,83,84,85,86,87,88,89,90,91,92,93,94,96,97,98,99,100,101,103,104,105,106,107,108,109,110,111,112,113,114,115,143,166,151,153,144,146,147,175,157,171,173,176,177,156,172])).then(i=>({default:i.BlogContext})));function Dt(i){return i==="authors"||i==="categories"}function At({context:i,collection:e,item:a,onOpenCollection:g,onSelectItem:v,onOpenPost:n}){const o=ie(),{orgSlug:d,virtualMcpId:c,branch:u,decofile:s,meta:j,sitePreviewUrl:x,hostedDraft:b}=i,y=ze(),k=Ge(c),l=Pe(e,y),m=We({orgSlug:d,virtualMcpId:c,branch:u}),h=qe({orgSlug:d,virtualMcpId:c,branch:u}),f=m.v8,S=He({orgSlug:d,virtualMcpId:c,branch:u}),A=Je(b?{orgSlug:d,virtualMcpId:c,branch:u}:null,rt),N=Qe({orgSlug:d,virtualMcpId:c,branch:u}),[U,D]=M.useState(""),[B,E]=M.useState("list"),[C,$]=M.useState(null),W=o("sandbox.contentBrowser.deleteDialog.title",{noun:C?te[C.kind]:"item"}),K=C?o(Ue("block",b,{neverPublished:N(C.key)}),{label:C.label}):null,V=Xe(K===null?null:{title:W,description:K},b),[F,O]=M.useState(l);F!==l&&(O(l),D(""));const P=ht({orgSlug:d,virtualMcpId:c,branch:u,decofile:s}),z=it(s),pe={posts:z.posts.length,authors:z.authors.length,categories:z.categories.length},de=async r=>{const _=se(s,r),I=ee(_,r,mt(r,{legacyContent:k}));try{const p=await m.mutateAsync({blockKey:_,data:I,...f?{create:!0}:{}});Z(p)||T.success(`Created ${te[r]}`),v(_)}catch(p){T.error(p instanceof Error?p.message:"Could not create")}},ue=async r=>{const _=p=>{if(!p)return T.error("Record not found."),null;const w=se(s,r.kind),R=r.kind==="posts"?"title":"name",L={...structuredClone(re(p,r.kind)),[R]:`${r.label} (copy)`};if(r.kind==="categories"){const q=z.categories.map(Q=>Q.slug??"").filter(Boolean);L.slug=gt(String(L.slug??""),q)}return{key:w,payload:L}},I=f?null:_(s[r.key]);try{const p=f?_(await S(s,r.key)):I;if(!p)return;const{key:w,payload:R}=p,L=await m.mutateAsync({blockKey:w,data:ee(w,r.kind,R),...f?{create:!0}:{}});Z(L)||T.success(`Duplicated "${r.label}"`),v(w)}catch(p){T.error(p instanceof Error?p.message:"Duplicate failed")}},fe=async r=>{const _=se(s,"posts"),I=ee(_,"posts",ot(r,{legacyContent:k}));try{const p=await m.mutateAsync({blockKey:_,data:I,...f?{create:!0}:{}});Z(p)||T.success(o("sandbox.postCalendar.createdScheduledPost")),n(_)}catch(p){T.error(p instanceof Error?p.message:o("sandbox.postCalendar.couldNotCreate"))}},ge=async(r,_)=>{const I=w=>{const R=w?st(re(w,"posts"),_):null;return R?{source:w,payload:R}:(T.error(o("sandbox.postCalendar.onlyScheduledCanMove")),null)},p=f?null:I(s[r]);try{const w=f?I(await S(s,r)):p;if(!w)return;const{source:R,payload:L}=w;await m.mutateAsync({blockKey:r,data:ee(r,"posts",L),...f?{base:{value:R,fromCache:!0}}:{}})}catch(w){T.error(w instanceof Error?w.message:o("sandbox.postCalendar.couldNotReschedule"))}},he=async()=>{if(!C)return;const{kind:r,key:_,label:I}=C;try{const p=f?await S(s,_):r==="categories"?s[_]:void 0;if(f&&!p)throw new Error(o("sectionsEditor.hosted.blockLoadFailed"));if(r==="categories"){const R=re(p,"categories").slug,L=typeof R=="string"?R:"";if(L){const q=f?{...s}:s;if(f){const Q=await Promise.all(A.map(async G=>[G,await S(s,G)]));for(const[G,H]of Q)H?q[G]=H:delete q[G]}for(const{key:Q,payload:G}of pt(q)){const H=dt(G,L);H!==G&&await m.mutateAsync({blockKey:Q,data:ut(Q,ft(H)),...f?{base:{value:q[Q],fromCache:!0}}:{}})}}}const w=await h.mutateAsync({blockKey:_,...f?{base:{value:p}}:{}});if($(null),Z(w))return;T.success(`Deleted "${I}"`),a===_&&v(void 0)}catch(p){T.error(p instanceof Error?p.message:"Delete failed")}},Y=h.isPending||m.isPending;return t.jsxs("div",{className:"flex h-full w-full",children:[t.jsx(_t,{active:l,counts:pe,showContext:y,onSelect:g}),Dt(l)&&t.jsx(Nt,{kind:l,entries:z[l],searchQuery:U,onSearchChange:D,selectedKey:a,onSelect:r=>v(r),onCreate:()=>{de(l)},onDuplicate:r=>{ue(r)},onDelete:$}),t.jsx("div",{className:"min-w-0 flex-1",children:t.jsx(M.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(ae,{className:"size-5 text-muted-foreground"})}),children:l==="context"?t.jsx(Bt,{orgSlug:d,virtualMcpId:c,branch:u,decofile:s,meta:j}):l==="post-schedule"?t.jsx(wt,{decofile:s,isCreating:m.isPending,onCreate:r=>{fe(r)},onReschedule:(r,_)=>{ge(r,_)},onSelect:n}):l==="posts"?t.jsx(Ye,{orgSlug:d,virtualMcpId:c,branch:u,decofile:s,view:B,onViewChange:E,onOpen:n,move:P,meta:j}):a?l==="categories"?t.jsx(Pt,{orgSlug:d,virtualMcpId:c,branch:u,blockKey:a,block:s[a],decofile:s,meta:j,onManagePosts:()=>g("posts"),onOpenPost:n,previewBaseUrl:x,fastPreviewActive:i.fastPreviewActive},`category:${a}`):t.jsx(St,{orgSlug:d,virtualMcpId:c,branch:u,kind:"authors",blockKey:a,block:s[a],meta:j,decofile:s},`authors:${a}`):t.jsx(at,{title:`Select ${l==="authors"?"an author":"a category"} to edit`,description:'Pick an item from the list, or click "+" to create one.'})})}),t.jsx(xe,{open:!!C,onOpenChange:r=>{!r&&!Y&&$(null)},children:t.jsxs(be,{children:[t.jsxs(ye,{children:[t.jsx(ve,{children:V?.title??W}),t.jsx(ke,{children:V?.description??null})]}),t.jsxs(Ce,{children:[t.jsx(je,{disabled:Y,children:o("sandbox.contentBrowser.deleteDialog.cancel")}),t.jsx(_e,{onClick:r=>{r.preventDefault(),he()},disabled:Y,className:we(Se({variant:"destructive"})),children:Y?t.jsxs(t.Fragment,{children:[t.jsx(ae,{className:"size-3.5"}),o("sandbox.contentBrowser.deleteDialog.deleting")]}):o("sandbox.contentBrowser.deleteDialog.delete")})]})]})})]})}function Nt(i){const e=X.c(46),{kind:a,entries:g,searchQuery:v,onSearchChange:n,selectedKey:o,onSelect:d,onCreate:c,onDuplicate:u,onDelete:s}=i,j=ie();let x,b,y,k,l,m;if(e[0]!==g||e[1]!==a||e[2]!==c||e[3]!==s||e[4]!==u||e[5]!==n||e[6]!==d||e[7]!==v||e[8]!==o||e[9]!==j){const A=v.toLowerCase(),N=g.filter(O=>!A||O.label.toLowerCase().includes(A)||O.subtitle.toLowerCase().includes(A)),U=a==="categories"&&!A?lt(N):N.map(Rt),D=`Search ${a}…`,B=`Create new ${te[a]}`;l="flex w-[300px] min-h-0 shrink-0 flex-col border-r";let E;e[16]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Ke,{size:14,className:"shrink-0 text-muted-foreground","aria-hidden":!0}),e[16]=E):E=e[16];let C;e[17]!==n?(C=O=>n(O.target.value),e[17]=n,e[18]=C):C=e[18];let $;e[19]!==D||e[20]!==v||e[21]!==C?($=t.jsxs("div",{className:"flex flex-1 items-center gap-2 pl-1",children:[E,t.jsx("input",{type:"text",value:v,onChange:C,placeholder:D,"aria-label":D,className:"w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground"})]}),e[19]=D,e[20]=v,e[21]=C,e[22]=$):$=e[22];let W;e[23]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsx(Ie,{size:16}),e[23]=W):W=e[23];let K;e[24]!==B||e[25]!==c?(K=t.jsx(Me,{asChild:!0,children:t.jsx(Be,{variant:"ghost",size:"icon",onClick:c,"aria-label":B,children:W})}),e[24]=B,e[25]=c,e[26]=K):K=e[26];let V;e[27]!==B?(V=t.jsx(Fe,{children:B}),e[27]=B,e[28]=V):V=e[28];let F;e[29]!==K||e[30]!==V?(F=t.jsxs(Oe,{children:[K,V]}),e[29]=K,e[30]=V,e[31]=F):F=e[31],e[32]!==F||e[33]!==$?(m=t.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-1 border-b px-2",children:[$,F]}),e[32]=F,e[33]=$,e[34]=m):m=e[34],x=Ve,k="min-h-0 flex-1",b="p-1",y=N.length===0?t.jsx(Ze,{hasItems:g.length>0,emptyLabel:`No ${a} yet.`,emptyHint:`Click "+" to create your first ${te[a]}.`}):U.map(O=>{const{entry:P,depth:z}=O;return t.jsx("div",{style:{paddingLeft:z*16},children:t.jsx(et,{icon:P.kind==="posts"?ne:P.kind==="authors"?me:ce,title:P.label,invalid:P.missing.length>0,invalidReason:P.missing.length>0?j("sandbox.itemRow.missingFields",{fields:ct(P.missing,j)}):void 0,warning:P.duplicateName,warningReason:j("sandbox.itemRow.duplicateName"),subtitle:z>0?nt(P.slug??"",N).map(Et).join(" / "):P.subtitle,active:o===P.key,onClick:()=>d(P.key),menu:t.jsx(tt,{onDuplicate:()=>u(P),onDelete:()=>s(P)})})},P.key)}),e[0]=g,e[1]=a,e[2]=c,e[3]=s,e[4]=u,e[5]=n,e[6]=d,e[7]=v,e[8]=o,e[9]=j,e[10]=x,e[11]=b,e[12]=y,e[13]=k,e[14]=l,e[15]=m}else x=e[10],b=e[11],y=e[12],k=e[13],l=e[14],m=e[15];let h;e[35]!==b||e[36]!==y?(h=t.jsx("div",{className:b,children:y}),e[35]=b,e[36]=y,e[37]=h):h=e[37];let f;e[38]!==x||e[39]!==k||e[40]!==h?(f=t.jsx(x,{className:k,children:h}),e[38]=x,e[39]=k,e[40]=h,e[41]=f):f=e[41];let S;return e[42]!==l||e[43]!==m||e[44]!==f?(S=t.jsxs("div",{className:l,children:[m,f]}),e[42]=l,e[43]=m,e[44]=f,e[45]=S):S=e[45],S}function Et(i){return i.slug}function Rt(i){return{entry:i,depth:0}}function Tt(i){const e=X.c(17),{virtualMcpId:a}=i,g=De();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={strict:!1},e[0]=v):v=e[0];const n=Ae(v);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},e[1]=o):o=e[1];const d=Ne(o),c=d.blogCollection??"posts",u=n.org??"",s=n.agentId??"";let j;e[2]!==u||e[3]!==s?(j={org:u,agentId:s},e[2]=u,e[3]=s,e[4]=j):j=e[4];const x=j;let b;e[5]!==g||e[6]!==x?(b=m=>{g({to:le.blog,params:x,search:h=>({...h,...m}),replace:!0})},e[5]=g,e[6]=x,e[7]=b):b=e[7];const y=b;let k;e[8]!==c||e[9]!==g||e[10]!==x||e[11]!==d.blogItem||e[12]!==y?(k=t.jsx(bt,{children:m=>t.jsx(At,{context:m,collection:c,item:d.blogItem,onOpenCollection:h=>y({blogCollection:h,blogItem:void 0}),onSelectItem:h=>y({blogItem:h}),onOpenPost:h=>{g({to:le.blogPost,params:{...x,postId:Ee(h)},search:$t})}})}),e[8]=c,e[9]=g,e[10]=x,e[11]=d.blogItem,e[12]=y,e[13]=k):k=e[13];let l;return e[14]!==k||e[15]!==a?(l=t.jsx(yt,{virtualMcpId:a,children:k}),e[14]=k,e[15]=a,e[16]=l):l=e[16],l}function $t(i){return vt({previous:i,destination:"agent"})}function It(){const i=X.c(2),e=kt();let a;return i[0]!==e?(a=t.jsx(jt,{children:t.jsx(Ct,{tabId:"blog",children:t.jsx($e,{feature:"cms",children:t.jsx(Tt,{virtualMcpId:e})})})}),i[0]=e,i[1]=a):a=i[1],a}function Pi(){const i=X.c(1);let e;return i[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Re.Content,{actions:t.jsx(Te,{}),children:t.jsx(It,{})}),i[0]=e):e=i[0],e}export{Pi as default};
|