decocms 4.329.9 → 4.330.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-C3LoifMU.js → AlertCircle-jy0frqbf.js} +1 -1
- package/dist/client/assets/{AreaChart-CDm5bL_P.js → AreaChart-B1x8DVFG.js} +1 -1
- package/dist/client/assets/{ArrowLeft-B1xlMMf7.js → ArrowLeft-BUQYrPiB.js} +1 -1
- package/dist/client/assets/{ArrowUp-ClAJQium.js → ArrowUp-Avwdkd90.js} +1 -1
- package/dist/client/assets/{Check-CRib0DYD.js → Check-CxhsqO-U.js} +1 -1
- package/dist/client/assets/{CheckCircle-CqjXQQar.js → CheckCircle-FHm0D3iO.js} +1 -1
- package/dist/client/assets/{ChevronRight-D1ZP1lTE.js → ChevronRight-BiHn5vM-.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-CtALiTfe.js → ChevronSelectorVertical-BbRv2olL.js} +1 -1
- package/dist/client/assets/{ChevronUp-DMr_Wd-m.js → ChevronUp-DKezAGzO.js} +1 -1
- package/dist/client/assets/{Copy01-CqZdC3Iz.js → Copy01-Bmz39xbH.js} +1 -1
- package/dist/client/assets/{CreditCard01-B_93t25t.js → CreditCard01-C5e5Hx42.js} +1 -1
- package/dist/client/assets/{DotsVertical-Cm1eM3WR.js → DotsVertical-8AlMAR5c.js} +1 -1
- package/dist/client/assets/{Download01-DWG0sleJ.js → Download01-CPeLy8ol.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-C6tA_A4b.js → ErrorBarContext-3LhkDp4X.js} +1 -1
- package/dist/client/assets/{Eye-DTZwtLhN.js → Eye-DusgBAO3.js} +1 -1
- package/dist/client/assets/{GitBranch01-CaAHRAAs.js → GitBranch01-CfVfwURq.js} +1 -1
- package/dist/client/assets/{Globe01-DLIxci_G.js → Globe01-wWGdeE3H.js} +1 -1
- package/dist/client/assets/{HardDrive-Uu4_IDmh.js → HardDrive-CA1tnjg8.js} +1 -1
- package/dist/client/assets/{Image01-uIGiropd.js → Image01-DYzKv2ko.js} +1 -1
- package/dist/client/assets/{Key01-rPnY8MXp.js → Key01-CGEDvfUF.js} +1 -1
- package/dist/client/assets/{Link01-BR5WsLAe.js → Link01-DXelhbvI.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DmLtBDzc.js → LinkExternal01-DNSJJFeL.js} +1 -1
- package/dist/client/assets/{Monitor01-BdeUVVjA.js → Monitor01-CH4zCn1-.js} +1 -1
- package/dist/client/assets/{Package-dd8Ej5fp.js → Package-Z0p4dNPa.js} +1 -1
- package/dist/client/assets/{Palette-DeAY5oYq.js → Palette-3dQlQIWI.js} +1 -1
- package/dist/client/assets/{Play-Btz8ch8N.js → Play-DsDbYPnC.js} +1 -1
- package/dist/client/assets/{Plus-DuAHW1Gi.js → Plus-sgFP0HSc.js} +1 -1
- package/dist/client/assets/{SearchMd-DwtkgExc.js → SearchMd-DUxlDNtX.js} +1 -1
- package/dist/client/assets/{Sector-CQ1UQxx5.js → Sector-B74hc5Ef.js} +1 -1
- package/dist/client/assets/{Settings02-BBjxFEhG.js → Settings02-BiZT44gx.js} +1 -1
- package/dist/client/assets/{Share07-BqnpVx68.js → Share07-BUsrOXMs.js} +1 -1
- package/dist/client/assets/{Shield01-D5teTWzy.js → Shield01-BkWJSg7j.js} +1 -1
- package/dist/client/assets/{Stars01-_V6kPVkS.js → Stars01-D42AB0fG.js} +1 -1
- package/dist/client/assets/{Sun-CN8rCL7E.js → Sun-CCthEe37.js} +1 -1
- package/dist/client/assets/{Tool01-Cfifxqbk.js → Tool01-Bww8mLXx.js} +1 -1
- package/dist/client/assets/{Tool02-DbxYQXJB.js → Tool02-CMTwSQ00.js} +1 -1
- package/dist/client/assets/{Trash01-CeiHA_Cf.js → Trash01-Cy8JukTX.js} +1 -1
- package/dist/client/assets/{TrendUp01-wKu74L0k.js → TrendUp01-C1Wh3jCv.js} +1 -1
- package/dist/client/assets/{Upload01-CHJWPT7q.js → Upload01-Vx_sWXby.js} +1 -1
- package/dist/client/assets/{User01-BDiBNFRN.js → User01-wgouKLSs.js} +1 -1
- package/dist/client/assets/{UserSquare-BKKMbWcC.js → UserSquare-1xv6DUe1.js} +1 -1
- package/dist/client/assets/{Users01-DTNX_nQZ.js → Users01-C6KwtT99.js} +1 -1
- package/dist/client/assets/{Users03-Et2Iq-LT.js → Users03-EPnVo0bB.js} +1 -1
- package/dist/client/assets/{XCircle-C8jIOZwA.js → XCircle-DiB9hL7i.js} +1 -1
- package/dist/client/assets/{XClose-Xm8e9o2O.js → XClose-C1xUyQZv.js} +1 -1
- package/dist/client/assets/{Zap-CydiGRzM.js → Zap-DSXl6Hp2.js} +1 -1
- package/dist/client/assets/{ZoomOut-wA1AxiJ4.js → ZoomOut-C-2R5l8I.js} +1 -1
- package/dist/client/assets/{access-gate-Cq4IMSa2.js → access-gate-BdiZftQz.js} +1 -1
- package/dist/client/assets/{agent-icon-CPE8YyuT.js → agent-icon-CyHpCstK.js} +1 -1
- package/dist/client/assets/agents-list-KDoq76g0.js +1 -0
- package/dist/client/assets/ai-providers-BrVf1e6J.js +1 -0
- package/dist/client/assets/{alert-1d_si55t.js → alert-CFsymptD.js} +1 -1
- package/dist/client/assets/{alert-dialog-DD8gmLEV.js → alert-dialog-DW1zmq7a.js} +1 -1
- package/dist/client/assets/{analytics-tab-DL1OjuDO.js → analytics-tab-BlBfbh2a.js} +1 -1
- package/dist/client/assets/api-keys-D3sWWgsA.js +1 -0
- package/dist/client/assets/{api-keys-CpAxzi4a.js → api-keys-S2LvxycO.js} +1 -1
- package/dist/client/assets/app-editor-DFmDheE3.js +1 -0
- package/dist/client/assets/{auth-CKSU3JsT.js → auth-DgZXO_E8.js} +1 -1
- package/dist/client/assets/{auth-catchall-BsTYpTDz.js → auth-catchall-BpojlvjI.js} +1 -1
- package/dist/client/assets/{auth-entry-OOarbR_P.js → auth-entry-DB4_abZA.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BTGfNyXQ.js → auth-split-layout-DsZoXTVd.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-05_Aj2HR.js → authenticate-and-persist-oauth-BXQocgtU.js} +1 -1
- package/dist/client/assets/{automation-list-row-DZHqRqWd.js → automation-list-row-C5K4rGy8.js} +1 -1
- package/dist/client/assets/{automation-runs-3ggKqNs7.js → automation-runs-CbmnlhbC.js} +1 -1
- package/dist/client/assets/automations-DlejsTXn.js +1 -0
- package/dist/client/assets/{avatar-BS0IyPAV.js → avatar-BHNnQU49.js} +1 -1
- package/dist/client/assets/{badge-CtAQawYl.js → badge-Df0POpHX.js} +1 -1
- package/dist/client/assets/{block-document-CjZVKj0w.js → block-document-C9jm1koE.js} +1 -1
- package/dist/client/assets/{breadcrumb-BCL2Kwa4.js → breadcrumb-EUBB2GC0.js} +1 -1
- package/dist/client/assets/{buckets-CtppbAIz.js → buckets-B_HtmkX0.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DKLu3ji6.js → bulk-category-panel-WadLNqYR.js} +1 -1
- package/dist/client/assets/{capability-load-error-DIIALIs2.js → capability-load-error-D_PjnnSN.js} +1 -1
- package/dist/client/assets/{cards-CBsYAM47.js → cards-gW-s4zlH.js} +1 -1
- package/dist/client/assets/category-editor-Dsjpm8Rs.js +1 -0
- package/dist/client/assets/{cdn-tab-BMufGN6k.js → cdn-tab-OVIvDZML.js} +1 -1
- package/dist/client/assets/{chart-DpOfrAMr.js → chart-CQ4Em7wn.js} +1 -1
- package/dist/client/assets/chat-context-DPbGstfa.js +35 -0
- package/dist/client/assets/{checkbox-BXjIirqE.js → checkbox-CUAxY5xy.js} +1 -1
- package/dist/client/assets/{choose-editor-4sfwDsGQ.js → choose-editor-CqIcKKAC.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CwHUCiHn.js → cli-auth-success-osB4eK21.js} +1 -1
- package/dist/client/assets/{client-icons-D4B8Mz13.js → client-icons-ErQpUWbT.js} +1 -1
- package/dist/client/assets/collection-detail-D3FBmEm5.js +1 -0
- package/dist/client/assets/{collection-display-button-BioCX_AB.js → collection-display-button-AMsRk-So.js} +1 -1
- package/dist/client/assets/{collection-search-DO_p4EqG.js → collection-search-C22mEeLw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-C7uBo59c.js → collection-table-wrapper-BJ3Neq9J.js} +1 -1
- package/dist/client/assets/{collection-tabs-FQDiUPHt.js → collection-tabs-DTwxsscI.js} +1 -1
- package/dist/client/assets/{command-DeVA58FJ.js → command-CRqAgH1a.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BKX7YdsD.js → commerce-onboarding-B6_VUkvw.js} +1 -1
- package/dist/client/assets/{connect-BRY5NS1A.js → connect-CxVuoW2Z.js} +1 -1
- package/dist/client/assets/{connect-layout-CZzvRMqx.js → connect-layout-sj45J0Mr.js} +1 -1
- package/dist/client/assets/{connection-CtWb4rTZ.js → connection-BWzxBGaR.js} +1 -1
- package/dist/client/assets/{connection-card-sSkeOh9M.js → connection-card-FOWu6o2x.js} +1 -1
- package/dist/client/assets/connection-detail-CiSJLPae.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CjCc6frD.js → connection-form-helpers-tCou3o46.js} +1 -1
- package/dist/client/assets/{connections-Ce1XTF4A.js → connections-DBSoZzyn.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-C_kWgH_k.js → create-organization-dialog-Crs_YDp8.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Dc_oXr8h.js → decopilot-sse-pool-BrId94vM.js} +1 -1
- package/dist/client/assets/{dialog-BIFznZm3.js → dialog-BdUmjS4-.js} +1 -1
- package/dist/client/assets/{domain-settings-2op7kQxI.js → domain-settings-CTbN1J2P.js} +1 -1
- package/dist/client/assets/{drawer-CtAdPy7J.js → drawer-D36n-WIv.js} +1 -1
- package/dist/client/assets/{dropdown-menu-C37VfJ59.js → dropdown-menu-Dn-LBZem.js} +1 -1
- package/dist/client/assets/e2e-tab--nH1lXQP.js +1 -0
- package/dist/client/assets/{editor-DyArv3FJ.js → editor-CyAR_I_A.js} +1 -1
- package/dist/client/assets/{empty-state-DSmLsgCN.js → empty-state-DLmWbVUB.js} +1 -1
- package/dist/client/assets/{empty-state--OBkbBal.js → empty-state-DxSmwhAQ.js} +1 -1
- package/dist/client/assets/{extract-connection-data-wF3Br-pC.js → extract-connection-data-B1I5FGQh.js} +1 -1
- package/dist/client/assets/file-explorer-Cbb3XtE4.js +2 -0
- package/dist/client/assets/{file-type-icon-CX9ORitn.js → file-type-icon-CVdgx22A.js} +1 -1
- package/dist/client/assets/{folder-icon-BUAMuIJo.js → folder-icon-D_WY3arE.js} +1 -1
- package/dist/client/assets/{form-CK_lIk7s.js → form-BvhSFZHb.js} +1 -1
- package/dist/client/assets/{general-uOO6AYK8.js → general-WcU5fWyG.js} +1 -1
- package/dist/client/assets/{github-repo-picker-TX2CWT3P.js → github-repo-picker-Cz94q9dS.js} +1 -1
- package/dist/client/assets/hooks-SuxNrCzM.js +15 -0
- package/dist/client/assets/{hosting-tab-DTF_9cjU.js → hosting-tab-Vlb9Z9ng.js} +1 -1
- package/dist/client/assets/index-5qx3FSW_.js +1 -0
- package/dist/client/assets/{index-BaLS9mjA.js → index-B18-trnw.js} +1 -1
- package/dist/client/assets/{index-C1ThefqC.js → index-BKZihWQd.js} +1 -1
- package/dist/client/assets/index-Ba4EfV0C.js +1 -0
- package/dist/client/assets/{index-zmYpYC9e.js → index-BjTjNr_G.js} +1 -1
- package/dist/client/assets/index-BqRfxAzW.css +1 -0
- package/dist/client/assets/{index-ClRahW5l.js → index-BxLEr4iz.js} +1 -1
- package/dist/client/assets/{index-9xpznWaq.js → index-CWs8c_71.js} +1 -1
- package/dist/client/assets/index-Cd2r3_aA.js +823 -0
- package/dist/client/assets/{index-CMu2jKL9.js → index-D87zQKXw.js} +2 -2
- package/dist/client/assets/{index-DIoG5Nzm.js → index-lSAvH_rL.js} +7 -7
- package/dist/client/assets/{index-redirect-DSiIg2Aa.js → index-redirect-BL62_A_W.js} +1 -1
- package/dist/client/assets/{infra-billing-69mIk1VP.js → infra-billing-jIqLmoI5.js} +1 -1
- package/dist/client/assets/{input-B3ER89GU.js → input-BdcqHmsD.js} +1 -1
- package/dist/client/assets/{integration-icon-Dhw6uO2L.js → integration-icon-DTTuvbMM.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-8SU0VJal.js → invite-member-dialog-BW87V_xF.js} +1 -1
- package/dist/client/assets/{label-BCOu20U5.js → label-DFynpq17.js} +1 -1
- package/dist/client/assets/{layout-Cvs_I42t.js → layout-CF6grxfQ.js} +1 -1
- package/dist/client/assets/{login-P7bQsRN6.js → login-DtED1ahd.js} +1 -1
- package/dist/client/assets/{markdown-B1UHHM2w.js → markdown-t8p7flD6.js} +1 -1
- package/dist/client/assets/{mcp-oauth-3DlwOsvC.js → mcp-oauth-DomiX3XJ.js} +1 -1
- package/dist/client/assets/{members-PuWi75Iq.js → members-Ctc7ayH9.js} +1 -1
- package/dist/client/assets/{monaco-editor-C35vQ6TU.js → monaco-editor-mHVc8yep.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-Cyyvr64v.js → monitoring-stats-row-CL1X09To.js} +1 -1
- package/dist/client/assets/{multi-select-CSpGSNnV.js → multi-select-Tgem-Hhf.js} +1 -1
- package/dist/client/assets/{oauth-callback-H6KXAZUX.js → oauth-callback-GxJ6DISd.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bnd7NmMV.js → oauth-callback-ai-provider-Dgp581R5.js} +1 -1
- package/dist/client/assets/{onboarding-Ci8NOzEM.js → onboarding-CItp4Z7f.js} +1 -1
- package/dist/client/assets/org-layout-D6ojmqyV.js +1 -0
- package/dist/client/assets/{organization-choice-CCvKP5-m.js → organization-choice-CKJgJUKz.js} +1 -1
- package/dist/client/assets/{orgs-Fs1TSSXd.js → orgs-B2ojCkix.js} +1 -1
- package/dist/client/assets/page-seo-form-w8HjBh5r.js +1 -0
- package/dist/client/assets/{popover-CMt7ScML.js → popover-DqoSLPyP.js} +1 -1
- package/dist/client/assets/post-calendar-09DAXKhm.js +1 -0
- package/dist/client/assets/post-editor-D5yb1Jd9.js +1 -0
- package/dist/client/assets/{primitives-CGvINqkE.js → primitives-DTr9rusv.js} +1 -1
- package/dist/client/assets/{profile-CHhLzHqm.js → profile-DQHF82sh.js} +1 -1
- package/dist/client/assets/project-app-view-BON2Qo3G.js +1 -0
- package/dist/client/assets/{project-icon-zQ71aK6_.js → project-icon-BIuwk_d_.js} +1 -1
- package/dist/client/assets/{prompts-Dxu8B2jv.js → prompts-DBh87Nh-.js} +1 -1
- package/dist/client/assets/record-editor-Dfnjy26m.js +1 -0
- package/dist/client/assets/redirect-editor-Dx846JCn.js +1 -0
- package/dist/client/assets/registry-DtIvqOVY.js +2 -0
- package/dist/client/assets/{registry-layout-C968nUGe.js → registry-layout-DSBGNtl3.js} +1 -1
- package/dist/client/assets/{reports-DGXzAhUl.js → reports-DXwcd3N8.js} +1 -1
- package/dist/client/assets/{require-capability-D-jq44dD.js → require-capability-BRvSlC3v.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Cb1jXi5Q.js → required-auth-layout-DFpZjgWz.js} +1 -1
- package/dist/client/assets/{reset-password-ClAymL8k.js → reset-password-CSt7aD-W.js} +1 -1
- package/dist/client/assets/{review-settings-hu-gYYYY.js → review-settings-ll1dG96m.js} +1 -1
- package/dist/client/assets/{roles-C2D1oNwm.js → roles-BkIPtp-o.js} +1 -1
- package/dist/client/assets/{schema-Dk7DmR5a.js → schema-CnLqwTPD.js} +1 -1
- package/dist/client/assets/{scroll-area-DBm8Zg_x.js → scroll-area-PP_r4msI.js} +1 -1
- package/dist/client/assets/{search-input-C33OeTuG.js → search-input-DfOXuzww.js} +1 -1
- package/dist/client/assets/{secrets-BcRhexXX.js → secrets-5A0vK4C0.js} +1 -1
- package/dist/client/assets/sections-editor-Dm7uM18_.js +2 -0
- package/dist/client/assets/{select-O-Se58mM.js → select-DX41f4VA.js} +1 -1
- package/dist/client/assets/{select-model-Cd6ICjyE.js → select-model-DtEtPkIv.js} +1 -1
- package/dist/client/assets/{self-tool-result-BhjRI4OY.js → self-tool-result-CdKMJCXt.js} +1 -1
- package/dist/client/assets/seo-editor-aQO3Fni3.js +1 -0
- package/dist/client/assets/settings-layout-CeJtjB19.js +1 -0
- package/dist/client/assets/{settings-sidebar-CQ1aAA-S.js → settings-sidebar-q0M_1AHR.js} +1 -1
- package/dist/client/assets/{shell-controls-BlbYUBa1.js → shell-controls-C6dFl2EC.js} +1 -1
- package/dist/client/assets/shell-layout-gA5hZo5F.js +1 -0
- package/dist/client/assets/{skill-preview-DTwyXcxp.js → skill-preview-DXO3ykC1.js} +1 -1
- package/dist/client/assets/{skills-CQg-jY0q.js → skills-BYoh3bJo.js} +1 -1
- package/dist/client/assets/{sso-BTGZw929.js → sso-BI0wGWNb.js} +1 -1
- package/dist/client/assets/store-registry-UiEHPHdI.js +2 -0
- package/dist/client/assets/{store-Duwv96-m.js → store-w5DiLQdh.js} +1 -1
- package/dist/client/assets/{switch-DN6L7pZ8.js → switch-DW4RRppR.js} +1 -1
- package/dist/client/assets/synced-repos-DGuZHHJX.js +1 -0
- package/dist/client/assets/{table-DGED2-oV.js → table-Cc0JpHRt.js} +1 -1
- package/dist/client/assets/{tabs-qHv1d8oo.js → tabs-C_0yZwsZ.js} +1 -1
- package/dist/client/assets/{task-board-k97eyP2H.js → task-board-DkI8yDIf.js} +1 -1
- package/dist/client/assets/task-route-jBzYs7u0.js +1 -0
- package/dist/client/assets/{tasks-O1E9rRmi.js → tasks-_uhom2KC.js} +1 -1
- package/dist/client/assets/{textarea-BbMVdhTn.js → textarea-Dyj892-C.js} +1 -1
- package/dist/client/assets/thread-intent-Bbkl_NvG.js +1 -0
- package/dist/client/assets/thread-route-C9hr7yjZ.js +1 -0
- package/dist/client/assets/{toggle-group-qR7WwCzn.js → toggle-group-DuOU3Yna.js} +1 -1
- package/dist/client/assets/{toolbar-BPBaAXqU.js → toolbar-DIlFGJBQ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BJozCrFv.js → toolbar-icon-button-CGvKs4Hb.js} +1 -1
- package/dist/client/assets/{track-CG4JE7lp.js → track-BQLynX7D.js} +1 -1
- package/dist/client/assets/{types-CFUtvqwZ.js → types-yL1rZwC2.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DL0YRrHe.js → use-ai-providers-C4A-yG8S.js} +1 -1
- package/dist/client/assets/{use-automations-Ds4HjjM1.js → use-automations-D1LLY7GK.js} +1 -1
- package/dist/client/assets/{use-autosave-BUi_34XG.js → use-autosave-S3BS9dJB.js} +1 -1
- package/dist/client/assets/{use-connection-1ZElPQlS.js → use-connection-DIMvnEsW.js} +1 -1
- package/dist/client/assets/{use-copy-DwaiWxiT.js → use-copy-CDL_kFPB.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DBiPMj7Z.js → use-create-virtual-mcp-BZjj2wtD.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CrlGGbA0.js → use-debounced-autosave-ClxVXQPW.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BkHp8ZQC.js → use-debounced-value-BTGahjD6.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D2a6ajEJ.js → use-decopilot-events-qYtca9N_.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B379gXvX.js → use-delete-connection-DArfbR_g.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CfDE9qIF.js → use-deployment-admin-DZgxyu-a.js} +1 -1
- package/dist/client/assets/{use-destination-route-BlILx1Gc.js → use-destination-route-CTNH3xDX.js} +1 -1
- package/dist/client/assets/{use-file-configs-BfdHEl9C.js → use-file-configs-C93nUH97.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-DwV9LPlS.js → use-infinite-scroll-DeU5Rpn4.js} +1 -1
- package/dist/client/assets/{use-join-requests-CETprio3.js → use-join-requests-DSWsS1rN.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-DeDl63Lc.js → use-mcp-auth-status-upTMow-Z.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Da8e-_d8.js → use-mcp-client-llSiXbX8.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-CLFow0WP.js → use-mcp-prompts-BOxAK29u.js} +1 -1
- package/dist/client/assets/{use-members-DlyrPYOE.js → use-members-D_V3G9Gd.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-BooqwyPz.js +5 -0
- package/dist/client/assets/{use-org-auth-client-BfsZ-M6z.js → use-org-auth-client-BWThb-V9.js} +1 -1
- package/dist/client/assets/{use-org-sso-J995Ng6-.js → use-org-sso-DJzTKHrH.js} +1 -1
- package/dist/client/assets/{use-organization-roles-EQ3qWfHU.js → use-organization-roles-CrdtsKsA.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DenVKwFP.js → use-organization-settings-BfIVlNk5.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-xY92PiXA.js → use-panel-navigate-yCX_W63n.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BTqpii1e.js → use-registry-connections-8jKgVSu8.js} +1 -1
- package/dist/client/assets/{use-secrets-Dn6GUcMj.js → use-secrets-CHDcCDFt.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-OA2RwVZn.js → use-section-preview-base-Bnck9XZi.js} +1 -1
- package/dist/client/assets/{use-status-sounds-C0H9gTlC.js → use-status-sounds-D3Nv9moR.js} +1 -1
- package/dist/client/assets/{use-tags-Dj5fhd_Z.js → use-tags-Bjvv3Ict.js} +1 -1
- package/dist/client/assets/{use-view-mode-8gUnp8xY.js → use-view-mode-Bj7dvmOc.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BdzzM_-Q.js → use-virtual-mcp-C5WBYfhP.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DO69sta5.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BqTEtPhA.js +1 -0
- package/dist/client/assets/{users-Ct5OViZj.js → users-8qyHeXl2.js} +1 -1
- package/dist/client/assets/variant-calendar-CoASsVeg.js +1 -0
- package/dist/client/assets/{view-mode-toggle-Bnltru_2.js → view-mode-toggle-BOnt9KuJ.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agents-list-Dtmme4F_.js +0 -1
- package/dist/client/assets/ai-providers-BZazhfxl.js +0 -1
- package/dist/client/assets/api-keys-DJrTLD2M.js +0 -1
- package/dist/client/assets/app-editor-DRQY_wGe.js +0 -1
- package/dist/client/assets/automations-BlLAqIe8.js +0 -1
- package/dist/client/assets/category-editor-Bm8XKvhm.js +0 -1
- package/dist/client/assets/chat-context-DylitU6A.js +0 -35
- package/dist/client/assets/collection-detail-DHhSzlUe.js +0 -1
- package/dist/client/assets/connection-detail-DFoIn0E6.js +0 -1
- package/dist/client/assets/download-app-dialog-BA4Zg8f-.js +0 -1
- package/dist/client/assets/e2e-tab-WXvENx_8.js +0 -1
- package/dist/client/assets/file-explorer-Tz4oZVnj.js +0 -2
- package/dist/client/assets/hooks-Dv3PpADk.js +0 -15
- package/dist/client/assets/index-DN9-7YC2.css +0 -1
- package/dist/client/assets/index-DrWCPBsu.js +0 -1
- package/dist/client/assets/index-EEBcPxzK.js +0 -823
- package/dist/client/assets/index-d_2S8ony.js +0 -1
- package/dist/client/assets/org-layout-DElTO9q0.js +0 -1
- package/dist/client/assets/page-seo-form-DIStXbQF.js +0 -1
- package/dist/client/assets/post-calendar-BXASG_XF.js +0 -1
- package/dist/client/assets/post-editor-usPnnznb.js +0 -1
- package/dist/client/assets/project-app-view-DKsoF9KE.js +0 -1
- package/dist/client/assets/record-editor-fS_XUrDG.js +0 -1
- package/dist/client/assets/redirect-editor-B0GL2-VI.js +0 -1
- package/dist/client/assets/registry-BaeKs9f0.js +0 -2
- package/dist/client/assets/sections-editor-Dz0cOD7v.js +0 -2
- package/dist/client/assets/seo-editor-BUIpJLVV.js +0 -1
- package/dist/client/assets/settings-layout-CSkBbDyt.js +0 -1
- package/dist/client/assets/shell-layout-C_TEKmkm.js +0 -1
- package/dist/client/assets/store-registry-CjeaHFsT.js +0 -2
- package/dist/client/assets/synced-repos-C_ygkA-Z.js +0 -1
- package/dist/client/assets/task-route-BERNM1EV.js +0 -1
- package/dist/client/assets/use-navigate-to-agent-EQeauX1Q.js +0 -5
- package/dist/client/assets/useInfiniteQuery-C_Sj0Ine.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DjGFzQWy.js +0 -1
- package/dist/client/assets/variant-calendar-D0qqLCLI.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as te,j as s,dt as ye,b as ue,r as ce,B as ee,l as je,t as ae,b4 as be}from"./index-lSAvH_rL.js";import{s as ge}from"./Plus-sgFP0HSc.js";import{c as Re,d as ve,b as Se,f as De,g as Ne,e as _e,a as Ce,A as Pe}from"./alert-dialog-DW1zmq7a.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-BdUmjS4-.js";import{I as Ie}from"./input-BdcqHmsD.js";import{G as xe,a as $e}from"./github-repo-picker-Cz94q9dS.js";import{a as Fe,d as Te,h as Ge,t as He}from"./cards-gW-s4zlH.js";import{R as Be}from"./require-capability-BRvSlC3v.js";import"./collection-search-C22mEeLw.js";import"./SearchMd-DUxlDNtX.js";import"./use-debounced-value-BTGahjD6.js";import"./use-connection-DIMvnEsW.js";import"./use-mcp-client-llSiXbX8.js";import"./constants-DNuUCxmW.js";import"./auth-DgZXO_E8.js";import"./authenticate-and-persist-oauth-BXQocgtU.js";import"./mcp-oauth-DomiX3XJ.js";import"./ArrowLeft-BUQYrPiB.js";import"./LinkExternal01-DNSJJFeL.js";import"./Share07-BUsrOXMs.js";import"./use-navigate-to-agent-BooqwyPz.js";import"./use-destination-route-CTNH3xDX.js";import"./use-virtual-mcp-C5WBYfhP.js";import"./hooks-SuxNrCzM.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BrId94vM.js";import"./task-board-DkI8yDIf.js";import"./schema-CnLqwTPD.js";import"./thread-intent-Bbkl_NvG.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-COLY3wWI.js";import"./extract-connection-data-B1I5FGQh.js";import"./metadata-dUsYcpuu.js";import"./connection-BWzxBGaR.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./folder-icon-D_WY3arE.js";import"./Eye-DusgBAO3.js";import"./DotsVertical-8AlMAR5c.js";import"./Download01-CPeLy8ol.js";import"./Globe01-wWGdeE3H.js";import"./Key01-CGEDvfUF.js";import"./Palette-3dQlQIWI.js";import"./Trash01-Cy8JukTX.js";import"./Zap-DSXl6Hp2.js";import"./dropdown-menu-Dn-LBZem.js";import"./Check-CxhsqO-U.js";import"./ChevronRight-BiHn5vM-.js";import"./file-type-icon-CVdgx22A.js";import"./access-gate-BdiZftQz.js";import"./capability-load-error-D_PjnnSN.js";function qe(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^[.-]+|[.-]+$/g,"").slice(0,128)}function Le(e,t){return e.lastSyncError?{label:e.lastSyncError,error:!0}:e.lastSyncedAt?{label:t("library.syncedRepos.syncedAgo",{ago:He(e.lastSyncedAt)}),error:!1}:{label:t("library.syncedRepos.waitingFirstSync"),error:!1}}function Ve(e){const t=te.c(32),{config:l,onRemove:i}=e,c=ue();let u;t[0]!==l||t[1]!==c?(u=Le(l,c),t[0]=l,t[1]=c,t[2]=u):u=t[2];const p=u;let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:s.jsx(xe,{size:16,className:"text-muted-foreground"})}),t[3]=o):o=t[3];let a;t[4]!==l.repoName||t[5]!==l.repoOwner?(a=s.jsxs("span",{className:"font-medium text-sm truncate",children:[l.repoOwner,"/",l.repoName]}),t[4]=l.repoName,t[5]=l.repoOwner,t[6]=a):a=t[6];let n;t[7]!==l.ref?(n=s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:["@",l.ref]}),t[7]=l.ref,t[8]=n):n=t[8];let g;t[9]!==a||t[10]!==n?(g=s.jsxs("div",{className:"flex items-center gap-2",children:[a,n]}),t[9]=a,t[10]=n,t[11]=g):g=t[11];const m=p.error?"text-destructive":"text-muted-foreground";let d;t[12]!==m?(d=je("text-xs mt-0.5 truncate",m),t[12]=m,t[13]=d):d=t[13];let f;t[14]!==l.volume||t[15]!==c?(f=c("settings.syncedRepos.rowSubtitle",{volume:l.volume}),t[14]=l.volume,t[15]=c,t[16]=f):f=t[16];let y;t[17]!==p.label||t[18]!==d||t[19]!==f?(y=s.jsxs("p",{className:d,children:[f," ·"," ",p.label]}),t[17]=p.label,t[18]=d,t[19]=f,t[20]=y):y=t[20];let x;t[21]!==g||t[22]!==y?(x=s.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[o,s.jsxs("div",{className:"min-w-0",children:[g,y]})]}),t[21]=g,t[22]=y,t[23]=x):x=t[23];let j;t[24]!==c?(j=c("settings.syncedRepos.remove"),t[24]=c,t[25]=j):j=t[25];let h;t[26]!==i||t[27]!==j?(h=s.jsx(ee,{variant:"outline",size:"sm",onClick:i,children:j}),t[26]=i,t[27]=j,t[28]=h):h=t[28];let b;return t[29]!==x||t[30]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[x,h]}),t[29]=x,t[30]=h,t[31]=b):b=t[31],b}function Je(e){const t=te.c(21),{onAdd:l}=e,i=ue();let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:s.jsx(xe,{size:20,className:"text-muted-foreground"})}),t[0]=c):c=t[0];let u;t[1]!==i?(u=i("settings.syncedRepos.emptyTitle"),t[1]=i,t[2]=u):u=t[2];let p;t[3]!==u?(p=s.jsx("p",{className:"font-medium text-sm",children:u}),t[3]=u,t[4]=p):p=t[4];let o;t[5]!==i?(o=i("settings.syncedRepos.emptyDescription"),t[5]=i,t[6]=o):o=t[6];let a;t[7]!==o?(a=s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:o}),t[7]=o,t[8]=a):a=t[8];let n;t[9]!==p||t[10]!==a?(n=s.jsxs("div",{children:[p,a]}),t[9]=p,t[10]=a,t[11]=n):n=t[11];let g;t[12]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(ge,{size:14}),t[12]=g):g=t[12];let m;t[13]!==i?(m=i("settings.syncedRepos.addRepo"),t[13]=i,t[14]=m):m=t[14];let d;t[15]!==l||t[16]!==m?(d=s.jsxs(ee,{onClick:l,size:"sm",className:"mt-2",children:[g,m]}),t[15]=l,t[16]=m,t[17]=d):d=t[17];let f;return t[18]!==n||t[19]!==d?(f=s.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[c,n,d]}),t[18]=n,t[19]=d,t[20]=f):f=t[20],f}function Ke(){const e=te.c(107),t=ue(),l=Fe(),i=Te(),c=Ge(),[u,p]=ce.useState(!1),[o,a]=ce.useState(null),[n,g]=ce.useState(""),[m,d]=ce.useState(null);let f;e[0]!==i||e[1]!==o||e[2]!==t||e[3]!==n?(f=function(){!o||!n.trim()||i.mutate({connectionId:o.connectionId,volume:n.trim()},{onSuccess:R=>{a(null),ae.success(t("settings.syncedRepos.created",{volume:R.volume}))},onError:R=>{ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed"))}})},e[0]=i,e[1]=o,e[2]=t,e[3]=n,e[4]=f):f=e[4];const y=f;let x;e[5]!==m||e[6]!==c||e[7]!==t?(x=function(){m&&c.mutate(m.id,{onSuccess:()=>ae.success(t("settings.syncedRepos.removed")),onError:R=>ae.error(R instanceof Error?R.message:t("settings.syncedRepos.failed")),onSettled:()=>d(null)})},e[5]=m,e[6]=c,e[7]=t,e[8]=x):x=e[8];const j=x;if(l.isPending){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(be,{className:"h-32 w-full"}),e[9]=r):r=e[9],r}let h;e[10]!==l.data?(h=l.data??[],e[10]=l.data,e[11]=h):h=e[11];const b=h;let v;e[12]!==t?(v=t("settings.syncedRepos.pageDescription"),e[12]=t,e[13]=v):v=e[13];let S;e[14]!==v?(S=s.jsx("p",{className:"text-sm text-muted-foreground",children:v}),e[14]=v,e[15]=S):S=e[15];let D;e[16]!==b||e[17]!==t?(D=b.length===0?s.jsx(Je,{onAdd:()=>p(!0)}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"flex items-center justify-end",children:s.jsxs(ee,{onClick:()=>p(!0),size:"sm",children:[s.jsx(ge,{size:14}),t("settings.syncedRepos.addRepo")]})}),s.jsx("section",{className:"rounded-2xl border border-border/60 bg-background px-5 py-2",children:b.map(r=>s.jsx(Ve,{config:r,onRemove:()=>d(r)},r.id))})]}),e[16]=b,e[17]=t,e[18]=D):D=e[18];let N;e[19]!==t?(N=t("settings.syncedRepos.pickerTitle"),e[19]=t,e[20]=N):N=e[20];let se;e[21]===Symbol.for("react.memo_cache_sentinel")?(se=r=>{p(!1),a(r),g(qe(r.repo.name))},e[21]=se):se=e[21];let _;e[22]!==u||e[23]!==N?(_=s.jsx($e,{mode:"connection",open:u,onOpenChange:p,title:N,onImportComplete:se}),e[22]=u,e[23]=N,e[24]=_):_=e[24];const me=o!==null;let ie;e[25]===Symbol.for("react.memo_cache_sentinel")?(ie=r=>{r||a(null)},e[25]=ie):ie=e[25];let C;e[26]!==t?(C=t("settings.syncedRepos.nameDialogTitle"),e[26]=t,e[27]=C):C=e[27];let P;e[28]!==C?(P=s.jsx(Ae,{children:C}),e[28]=C,e[29]=P):P=e[29];const de=o?`${o.repo.owner}/${o.repo.name}`:"";let A;e[30]!==t||e[31]!==de?(A=t("settings.syncedRepos.nameDialogDescription",{repo:de}),e[30]=t,e[31]=de,e[32]=A):A=e[32];let k;e[33]!==A?(k=s.jsx(ke,{children:A}),e[33]=A,e[34]=k):k=e[34];let w;e[35]!==P||e[36]!==k?(w=s.jsxs(we,{children:[P,k]}),e[35]=P,e[36]=k,e[37]=w):w=e[37];let le;e[38]===Symbol.for("react.memo_cache_sentinel")?(le=r=>g(r.target.value),e[38]=le):le=e[38];let O;e[39]!==t?(O=t("settings.syncedRepos.namePlaceholder"),e[39]=t,e[40]=O):O=e[40];let z;e[41]!==O||e[42]!==n?(z=s.jsx(Ie,{value:n,onChange:le,placeholder:O,autoFocus:!0}),e[41]=O,e[42]=n,e[43]=z):z=e[43];let ne;e[44]===Symbol.for("react.memo_cache_sentinel")?(ne=()=>a(null),e[44]=ne):ne=e[44];const he=i.isPending;let E;e[45]!==t?(E=t("settings.syncedRepos.cancel"),e[45]=t,e[46]=E):E=e[46];let I;e[47]!==i.isPending||e[48]!==E?(I=s.jsx(ee,{variant:"outline",onClick:ne,disabled:he,children:E}),e[47]=i.isPending,e[48]=E,e[49]=I):I=e[49];let $;e[50]!==i.isPending||e[51]!==n?($=!n.trim()||i.isPending,e[50]=i.isPending,e[51]=n,e[52]=$):$=e[52];let F;e[53]!==i.isPending||e[54]!==t?(F=i.isPending?t("settings.syncedRepos.creating"):t("settings.syncedRepos.create"),e[53]=i.isPending,e[54]=t,e[55]=F):F=e[55];let T;e[56]!==y||e[57]!==$||e[58]!==F?(T=s.jsx(ee,{disabled:$,onClick:y,children:F}),e[56]=y,e[57]=$,e[58]=F,e[59]=T):T=e[59];let G;e[60]!==I||e[61]!==T?(G=s.jsxs(Oe,{children:[I,T]}),e[60]=I,e[61]=T,e[62]=G):G=e[62];let H;e[63]!==w||e[64]!==z||e[65]!==G?(H=s.jsxs(ze,{className:"sm:max-w-sm",children:[w,z,G]}),e[63]=w,e[64]=z,e[65]=G,e[66]=H):H=e[66];let B;e[67]!==H||e[68]!==me?(B=s.jsx(Ee,{open:me,onOpenChange:ie,children:H}),e[67]=H,e[68]=me,e[69]=B):B=e[69];const pe=m!==null;let oe;e[70]===Symbol.for("react.memo_cache_sentinel")?(oe=r=>{r||d(null)},e[70]=oe):oe=e[70];const fe=m?.volume??"";let q;e[71]!==t||e[72]!==fe?(q=t("settings.syncedRepos.removeTitle",{volume:fe}),e[71]=t,e[72]=fe,e[73]=q):q=e[73];let L;e[74]!==q?(L=s.jsx(Re,{children:q}),e[74]=q,e[75]=L):L=e[75];let V;e[76]!==t?(V=t("settings.syncedRepos.removeDescription"),e[76]=t,e[77]=V):V=e[77];let J;e[78]!==V?(J=s.jsx(ve,{children:V}),e[78]=V,e[79]=J):J=e[79];let K;e[80]!==L||e[81]!==J?(K=s.jsxs(Se,{children:[L,J]}),e[80]=L,e[81]=J,e[82]=K):K=e[82];let M;e[83]!==t?(M=t("settings.syncedRepos.cancel"),e[83]=t,e[84]=M):M=e[84];let Q;e[85]!==M?(Q=s.jsx(De,{children:M}),e[85]=M,e[86]=Q):Q=e[86];let U;e[87]!==t?(U=t("settings.syncedRepos.remove"),e[87]=t,e[88]=U):U=e[88];let W;e[89]!==j||e[90]!==U?(W=s.jsx(Ne,{onClick:j,children:U}),e[89]=j,e[90]=U,e[91]=W):W=e[91];let X;e[92]!==Q||e[93]!==W?(X=s.jsxs(_e,{children:[Q,W]}),e[92]=Q,e[93]=W,e[94]=X):X=e[94];let Y;e[95]!==K||e[96]!==X?(Y=s.jsxs(Ce,{children:[K,X]}),e[95]=K,e[96]=X,e[97]=Y):Y=e[97];let Z;e[98]!==pe||e[99]!==Y?(Z=s.jsx(Pe,{open:pe,onOpenChange:oe,children:Y}),e[98]=pe,e[99]=Y,e[100]=Z):Z=e[100];let re;return e[101]!==B||e[102]!==S||e[103]!==Z||e[104]!==D||e[105]!==_?(re=s.jsxs(s.Fragment,{children:[S,D,_,B,Z]}),e[101]=B,e[102]=S,e[103]=Z,e[104]=D,e[105]=_,e[106]=re):re=e[106],re}function Me(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ye,{group:"storage",children:s.jsx(Ke,{})}),e[0]=t):t=e[0],t}function Jt(){const e=te.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Be,{capability:"file-configs:manage",area:"files",children:s.jsx(Me,{})}),e[0]=t):t=e[0],t}export{Jt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,l as i,j as r}from"./index-
|
|
1
|
+
import{c,l as i,j as r}from"./index-lSAvH_rL.js";function d(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-card rounded-xl card-shadow overflow-hidden",children:r.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-card",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function x(o){const e=c.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap text-sm [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=r.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{x as T,p as a,b,d as c,m as d,f as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as v,j as d,du as k,bm as p,bs as T,dv as y,bo as M,br as P,bp as S,bt as F,dw as V,cG as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,du as k,bm as p,bs as T,dv as y,bo as M,br as P,bp as S,bt as F,dw as V,cG as D,c as x,l as g}from"./index-lSAvH_rL.js";var m="Tabs",[G]=M(m,[y]),w=y(),[L,h]=G(m),C=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,onValueChange:r,defaultValue:s,orientation:o="horizontal",dir:i,activationMode:l="automatic",...f}=n,u=P(i),[c,b]=S({prop:t,onChange:r,defaultProp:s??"",caller:m});return d.jsx(L,{scope:a,baseId:F(),value:c,onValueChange:b,orientation:o,dir:u,activationMode:l,children:d.jsx(p.div,{dir:u,"data-orientation":o,...f,ref:e})})});C.displayName=m;var N="TabsList",j=v.forwardRef((n,e)=>{const{__scopeTabs:a,loop:t=!0,...r}=n,s=h(N,a),o=w(a);return d.jsx(V,{asChild:!0,...o,orientation:s.orientation,dir:s.dir,loop:t,children:d.jsx(p.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:e})})});j.displayName=N;var I="TabsTrigger",_=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,disabled:r=!1,...s}=n,o=h(I,a),i=w(a),l=E(o.baseId,t),f=$(o.baseId,t),u=t===o.value;return d.jsx(k,{asChild:!0,...i,focusable:!r,active:u,children:d.jsx(p.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":f,"data-state":u?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:e,onMouseDown:T(n.onMouseDown,c=>{!r&&c.button===0&&c.ctrlKey===!1?o.onValueChange(t):c.preventDefault()}),onKeyDown:T(n.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&o.onValueChange(t)}),onFocus:T(n.onFocus,()=>{const c=o.activationMode!=="manual";!u&&!r&&c&&o.onValueChange(t)})})})});_.displayName=I;var R="TabsContent",A=v.forwardRef((n,e)=>{const{__scopeTabs:a,value:t,forceMount:r,children:s,...o}=n,i=h(R,a),l=E(i.baseId,t),f=$(i.baseId,t),u=t===i.value,c=v.useRef(u);return v.useEffect(()=>{const b=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(b)},[]),d.jsx(D,{present:r||u,children:({present:b})=>d.jsx(p.div,{"data-state":u?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!b,id:f,tabIndex:0,...o,ref:e,style:{...n.style,animationDuration:c.current?"0s":void 0},children:b&&s})})});A.displayName=R;function E(n,e){return`${n}-trigger-${e}`}function $(n,e){return`${n}-content-${e}`}var z=C,K=j,B=_,q=A;function O(n){const e=x.c(10);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r===void 0?"pill":r;let o;e[4]!==a?(o=g("flex flex-col gap-2",a),e[4]=a,e[5]=o):o=e[5];let i;return e[6]!==t||e[7]!==o||e[8]!==s?(i=d.jsx(z,{"data-slot":"tabs","data-variant":s,className:o,...t}),e[6]=t,e[7]=o,e[8]=s,e[9]=i):i=e[9],i}function J(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex h-[52px] items-center border-b border-border":s==="canvas"?"flex h-10 items-center bg-background relative":"bg-muted text-muted-foreground inline-flex h-10 w-fit items-center justify-center rounded-xl p-[3px]";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(K,{"data-slot":"tabs-list","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function Q(n){const e=x.c(11);let a,t,r;e[0]!==n?({className:a,variant:r,...t}=n,e[0]=n,e[1]=a,e[2]=t,e[3]=r):(a=e[1],t=e[2],r=e[3]);const s=r||"pill",o=s==="underline"?"flex items-center h-full px-3 relative text-sm whitespace-nowrap border-b-2 mb-[-1px] transition-all text-muted-foreground border-transparent hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-primary disabled:pointer-events-none disabled:opacity-50":s==="canvas"?"flex items-center h-full px-3 gap-2.5 text-sm whitespace-nowrap transition-all border-r border-b border-border [&>*]:opacity-50 data-[state=active]:[&>*]:opacity-100 data-[state=active]:border-b-0 last:border-r-0 disabled:pointer-events-none max-w-2xs":"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-lg border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";let i;e[4]!==a||e[5]!==o?(i=g(o,a),e[4]=a,e[5]=o,e[6]=i):i=e[6];let l;return e[7]!==s||e[8]!==t||e[9]!==i?(l=d.jsx(B,{"data-slot":"tabs-trigger","data-variant":s,className:i,...t}),e[7]=s,e[8]=t,e[9]=i,e[10]=l):l=e[10],l}function U(n){const e=x.c(8);let a,t;e[0]!==n?({className:a,...t}=n,e[0]=n,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let r;e[3]!==a?(r=g("flex-1 outline-none h-full",a),e[3]=a,e[4]=r):r=e[4];let s;return e[5]!==t||e[6]!==r?(s=d.jsx(q,{"data-slot":"tabs-content",className:r,...t}),e[5]=t,e[6]=r,e[7]=s):s=e[7],s}export{U as T,O as a,Q as b,J as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as s}from"./schema-
|
|
1
|
+
import{o as s}from"./schema-CnLqwTPD.js";const u="super-agent",i=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=i[0];function T(e){return i[e%i.length]??c}function l(e){return e.createdBy==="system"}const w="chore",A=["reviewer"],_={reviewer:"Reviewer"},d=["QA Agent","Code Reviewer"];function p(e){return e?.reviewer_enabled===void 0&&e?.qa_agent_enabled===!1&&e?.code_reviewer_enabled===!1?!1:s(e,"reviewer_enabled")}const R=["triage","todo","in_progress","in_review","approved","merged","post_deploy_validation","done","archived"],g=["approved","merged","post_deploy_validation"];function S(e,t){return e?[_[t],...d].some(r=>e.startsWith(`${r}:`)):!1}function E(e,t){if(t)return new Date(t).getTime();let r=0;for(const n of e)n.action==="status_changed"&&n.data?.to==="in_review"&&(r=Math.max(r,new Date(n.occurredAt).getTime()));return r}function v(e,t){const r=E(e,t.cycleStartedAt),n=new Map;for(const a of e){if(a.action!=="review_approved"&&a.action!=="review_changes_requested"||new Date(a.occurredAt).getTime()<r)continue;const o=a.data??{};if(o.reviewer==="reviewer")if(a.action==="review_approved"){if(t?.verifiedOnly&&o.verified!==!0)continue;n.set("reviewer","approved")}else n.set("reviewer","changes_requested")}return n}function D(e,t,r){if(t.length===0)return!1;const n=v(e,r);return t.every(a=>n.get(a)==="approved")}const L="task-board.item.updated",m="task-board.item.deleted",C=4e3;export{R as C,w as D,A as R,u as S,m as T,D as a,S as b,c,g as d,L as e,C as f,l as i,T as n,p as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{bV as Us,c as O,l as J,j as n,h as Qe,r as G,I as ss,G as Gs,o as oe,b as Q,b4 as Hs,W as le,d as ns,a6 as os,_ as is,L as Qs,a1 as Le,a2 as Me,a4 as Re,a as Dt,F as qs,aq as Ws,ar as Ys,B as ye,t as de,H as Xs,J as Js,K as fe,n as at,a7 as At,m as lt,bu as Zs,e as Oe,bk as en,ap as tn}from"./index-lSAvH_rL.js";import{c as rs,u as sn,d as as}from"./thread-route-C9hr7yjZ.js";import{t as Ge}from"./ChevronUp-DKezAGzO.js";import{A as ls,N as nn,s as jt,aI as on,aJ as rn,aK as Kt,aL as an,t as ln,aM as cn,a6 as dn,aN as un,p as fn,aO as mn,a4 as bt,a3 as pn,aa as gn}from"./agent-icon-CyHpCstK.js";import{a as cs,i as hn,e as xn,S as jn,f as bn}from"./constants-DNuUCxmW.js";import{a as Tt,u as yn}from"./use-virtual-mcp-C5WBYfhP.js";import{g as vn,p as Cn,r as kn}from"./github-repo-COLY3wWI.js";import{l as Nn,j as Sn,q as wn}from"./use-navigate-to-agent-BooqwyPz.js";import{T as ds}from"./toolbar-icon-button-CGvKs4Hb.js";import{P as ct,a as Ue,b as dt}from"./popover-DqoSLPyP.js";import{D as It,a as Bt,b as Ft,c as _n,e as Dn,f as us,g as fs,d as An}from"./drawer-D36n-WIv.js";import{i as Tn}from"./SearchMd-DUxlDNtX.js";import{i as qe}from"./Check-CxhsqO-U.js";import{s as Ye}from"./Plus-sgFP0HSc.js";import{G as ms,a as In}from"./github-repo-picker-Cz94q9dS.js";import{g as Bn,u as Fn,b as ps}from"./hooks-SuxNrCzM.js";import{g as Pn,b as gs,P as En}from"./project-icon-BIuwk_d_.js";import{u as hs}from"./shell-layout-gA5hZo5F.js";import{d as Vn}from"./thread-intent-Bbkl_NvG.js";import{C as $n}from"./collection-search-C22mEeLw.js";import{g as On,b as Ln,a as Mn,e as Rn}from"./extract-connection-data-B1I5FGQh.js";import{u as xs,a as js,g as Kn,C as yt}from"./connection-card-FOWu6o2x.js";import{D as bs,b as ys,c as vs,d as Cs,h as zn,e as Un}from"./dialog-BdUmjS4-.js";import{d as pe,a as ge,e as he,b as xe,c as je,F as zt}from"./form-BvhSFZHb.js";import{I as Se}from"./input-BdcqHmsD.js";import{S as Gn,a as Hn,b as Qn,c as qn,d as He}from"./select-DX41f4VA.js";import{T as Wn}from"./textarea-Dyj892-C.js";import{b as ks}from"./use-connection-DIMvnEsW.js";import{n as ot,a as vt,i as Ns}from"./Tool02-CMTwSQ00.js";import{b as Yn,d as Xn}from"./UserSquare-1xv6DUe1.js";import{s as Jn}from"./XClose-C1xUyQZv.js";import{c as Zn,i as et,a as Ut,E as eo,p as to,b as so,d as no}from"./connection-form-helpers-tCou3o46.js";import{a as Ct}from"./authenticate-and-persist-oauth-BXQocgtU.js";import{g as oo}from"./connection-slug-CITJ0kGN.js";import{C as io}from"./collection-tabs-DTwxsscI.js";import{u as Gt}from"./use-infinite-scroll-DeU5Rpn4.js";import{B as tt}from"./badge-Df0POpHX.js";import{u as ro}from"./useSuspenseInfiniteQuery-BqTEtPhA.js";import{u as ao}from"./use-mcp-client-llSiXbX8.js";import{g as it}from"./metadata-dUsYcpuu.js";import{u as lo}from"./use-ai-providers-C4A-yG8S.js";import{a as co}from"./use-file-configs-C93nUH97.js";import{d as uo}from"./use-organization-settings-BfIVlNk5.js";import{r as fo}from"./site-slug-uya6Wp4-.js";import{T as mo,C as Pt,c as po,d as go,S as Nt}from"./task-board-DkI8yDIf.js";import{t as ho}from"./decopilot-sse-pool-BrId94vM.js";import{u as xo}from"./use-decopilot-events-qYtca9N_.js";import{A as Ht}from"./avatar-BHNnQU49.js";import{h as rt,D as Ss,b as ws,g as _s,c as Ds}from"./dropdown-menu-Dn-LBZem.js";import{e as Ke,a as Et,c as Vt,d as Ce,b as $t,C as Ot}from"./command-CRqAgH1a.js";import{s as jo}from"./TrendUp01-C1Wh3jCv.js";import{a as bo}from"./Settings02-BiZT44gx.js";import{s as Qt}from"./User01-wgouKLSs.js";import{g as qt}from"./get-initials-D-f_fDFw.js";import{i as yo}from"./AlertCircle-jy0frqbf.js";import{i as vo}from"./CheckCircle-FHm0D3iO.js";import{a as As}from"./DotsVertical-8AlMAR5c.js";import{s as Co}from"./Eye-DusgBAO3.js";import{i as ko}from"./Shield01-BkWJSg7j.js";const No=Us("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);function So(t){return(t??"").normalize("NFKD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"user"}function wo(t){return t?.name||t?.email?.split("@")[0]||void 0}function _o(t){const e=So(t),s=Date.now().toString(36).split("").reverse().join("");return`${e}-${s}`}function Do(t){const e=O.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:r,className:i,isSearching:c,disabled:l}=t,f=a===void 0?"Search...":a;let u;e[0]!==i?(u=J("shrink-0 w-full border-b border-border h-12",i),e[0]=i,e[1]=u):u=e[1];const m=l?"cursor-not-allowed opacity-50":"cursor-text";let d;e[2]!==m?(d=J("flex items-center gap-2.5 h-12 px-4",m),e[2]=m,e[3]=d):d=e[3];let p;e[4]!==c?(p=c?n.jsx(Qe,{className:"size-4 text-muted-foreground shrink-0"}):n.jsx(Tn,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=p):p=e[5];let h;e[6]!==o?(h=N=>o(N.target.value),e[6]=o,e[7]=h):h=e[7];let g;e[8]!==l||e[9]!==r||e[10]!==f||e[11]!==h||e[12]!==s?(g=n.jsx("input",{type:"text",value:s,onChange:h,onKeyDown:r,placeholder:f,disabled:l,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=l,e[9]=r,e[10]=f,e[11]=h,e[12]=s,e[13]=g):g=e[13];let x;e[14]!==d||e[15]!==p||e[16]!==g?(x=n.jsxs("label",{className:d,children:[p,g]}),e[14]=d,e[15]=p,e[16]=g,e[17]=x):x=e[17];let j;return e[18]!==u||e[19]!==x?(j=n.jsx("div",{className:u,children:x}),e[18]=u,e[19]=x,e[20]=j):j=e[20],j}function Ao(t,e,s){if(!s)return null;const o=Bn(t,e);return o?o.threads.get().find(r=>r.id===s)?.branch??null:null}const Ts=G.createContext(null);function ma(t){const e=O.c(5),{children:s}=t,[o,a]=G.useState(!1);let r;e[0]!==o?(r={empty:o,setEmpty:a},e[0]=o,e[1]=r):r=e[1];let i;return e[2]!==s||e[3]!==r?(i=n.jsx(Ts.Provider,{value:r,children:s}),e[2]=s,e[3]=r,e[4]=i):i=e[4],i}function To(){return G.useContext(Ts)?.empty??!1}function Io(t){const e=O.c(6),{value:s,onChange:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=r):r=e[1];let i;return e[2]!==o||e[3]!==r||e[4]!==s?(i=n.jsx(Do,{value:s,onChange:o,placeholder:r}),e[2]=o,e[3]=r,e[4]=s,e[5]=i):i=e[5],i}function Bo(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Fo(t){const e=O.c(10),{org:s,onClose:o}=t,a=Q();let r;e[0]!==s.slug?(r={org:s.slug},e[0]=s.slug,e[1]=r):r=e[1];let i;e[2]!==o?(i=()=>o(),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let l;return e[6]!==r||e[7]!==i||e[8]!==c?(l=n.jsx("div",{className:"border-t border-border px-3 py-2.5",children:n.jsx(Qs,{to:"/$org/settings/agents",params:r,onClick:i,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=r,e[7]=i,e[8]=c,e[9]=l):l=e[9],l}function Po(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Is,{children:s}),t[2]=s,t[3]=o):o=t[3],o}function Eo(t){const e=O.c(11),{onImportFromGithub:s}=t,o=Q();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ms,{className:"size-3.5"}),e[0]=a):a=e[0];let r;e[1]!==o?(r=o("sidebar.agentsSection.import"),e[1]=o,e[2]=r):r=e[2];let i;e[3]!==s||e[4]!==r?(i=n.jsxs("button",{type:"button",onClick:s,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:[a,r]}),e[3]=s,e[4]=r,e[5]=i):i=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let l;return e[8]!==i||e[9]!==c?(l=n.jsx(Is,{action:i,children:c}),e[8]=i,e[9]=c,e[10]=l):l=e[10],l}function Vo(t){const e=O.c(11),{setOpen:s,emptyCtaClass:o}=t,a=Q();let r;e[0]!==a?(r=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J(o),e[2]=o,e[3]=i):i=e[3];let c;e[4]!==s?(c=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let l;e[6]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{className:"size-4"}),e[6]=l):l=e[6];let f;return e[7]!==r||e[8]!==i||e[9]!==c?(f=n.jsx(ds,{"aria-label":r,className:i,onClick:c,children:l}),e[7]=r,e[8]=i,e[9]=c,e[10]=f):f=e[10],f}function $o(t){const e=O.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]!==s?(l=()=>{oe("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=l):l=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ye,{}),e[7]=f):f=e[7];let u;e[8]!==r?(u=r("sidebar.agentsSection.newAgent"),e[8]=r,e[9]=u):u=e[9];let m;e[10]!==u?(m=n.jsx("span",{children:u}),e[10]=u,e[11]=m):m=e[11];let d;return e[12]!==i||e[13]!==c||e[14]!==l||e[15]!==m?(d=n.jsx(os,{children:n.jsxs(is,{tooltip:i,className:c,onClick:l,children:[f,m]})}),e[12]=i,e[13]=c,e[14]=l,e[15]=m,e[16]=d):d=e[16],d}function Oo(){const t=O.c(4),e=Q();let s;t[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=s):s=t[1];let o;return t[2]!==s?(o=n.jsx(Ft,{className:"sr-only",children:s}),t[2]=s,t[3]=o):o=t[3],o}function Lo(t){const e=O.c(8),{emptyCtaClass:s}=t,o=Q();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let r;e[2]!==s?(r=J(s),e[2]=s,e[3]=r):r=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ye,{className:"size-4"}),e[4]=i):i=e[4];let c;return e[5]!==a||e[6]!==r?(c=n.jsx(ds,{"aria-label":a,className:r,children:i}),e[5]=a,e[6]=r,e[7]=c):c=e[7],c}function Mo(t){const e=O.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=t,r=Q();let i;e[0]!==o||e[1]!==r?(i=o?void 0:r("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=r,e[2]=i):i=e[2];let c;e[3]!==a?(c=J(a),e[3]=a,e[4]=c):c=e[4];let l;e[5]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(Ye,{}),e[5]=l):l=e[5];let f;e[6]!==r?(f=r("sidebar.agentsSection.newAgent"),e[6]=r,e[7]=f):f=e[7];let u;e[8]!==f?(u=n.jsx("span",{children:f}),e[8]=f,e[9]=u):u=e[9];let m;e[10]!==i||e[11]!==c||e[12]!==u?(m=n.jsx(Ue,{asChild:!0,children:n.jsxs(is,{tooltip:i,className:c,children:[l,u]})}),e[10]=i,e[11]=c,e[12]=u,e[13]=m):m=e[13];let d;e[14]!==m||e[15]!==s?(d=s(m),e[14]=m,e[15]=s,e[16]=d):d=e[16];let p;return e[17]!==d?(p=n.jsx(os,{children:d}),e[17]=d,e[18]=p):p=e[18],p}function Ro(t){const e=O.c(9),{children:s}=t,o=Q();let a;e[0]!==s?(a=n.jsx(Le,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let r;e[2]!==o?(r=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=r):r=e[3];let i;e[4]!==r?(i=n.jsx(Me,{side:"right",sideOffset:8,children:r}),e[4]=r,e[5]=i):i=e[5];let c;return e[6]!==a||e[7]!==i?(c=n.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[a,i]}),e[6]=a,e[7]=i,e[8]=c):c=e[8],c}function Ko(t){const e=ns(),{create:s}=Fn(),{locator:o}=le(),a=rs(),r=sn();return async i=>{const c=crypto.randomUUID(),l=i===r?Ao(t,o,a??""):null;try{await s({id:c,virtual_mcp_id:i,...l?{branch:l}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:c},search:{virtualmcpid:i}})}}function kt(t){const e=O.c(20),{agent:s,selected:o,onClick:a}=t,r=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let i;e[0]!==r?(i=J("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=i):i=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=n.jsx(ls,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[2]=s.icon,e[3]=s.title,e[4]=c):c=e[4];let l;e[5]!==s.title?(l=n.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=l):l=e[6];let f;e[7]!==s.description?(f=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=f):f=e[8];let u;e[9]!==l||e[10]!==f?(u=n.jsxs("div",{className:"flex-1 min-w-0",children:[l,f]}),e[9]=l,e[10]=f,e[11]=u):u=e[11];let m;e[12]!==o?(m=o&&n.jsx(qe,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=m):m=e[13];let d;return e[14]!==a||e[15]!==i||e[16]!==c||e[17]!==u||e[18]!==m?(d=n.jsxs("button",{type:"button",onClick:a,className:i,children:[c,u,m]}),e[14]=a,e[15]=i,e[16]=c,e[17]=u,e[18]=m,e[19]=d):d=e[19],d}function Is(t){const e=O.c(5),{children:s,action:o}=t;let a;e[0]!==s?(a=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let r;return e[2]!==o||e[3]!==a?(r=n.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[a,o]}),e[2]=o,e[3]=a,e[4]=r):r=e[4],r}function zo(t){const e=O.c(43),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:r}=t,[i,c]=G.useState(""),l=G.useDeferredValue(i),f=l||void 0;let u;e[0]!==f?(u={searchTerm:f},e[0]=f,e[1]=u):u=e[1];const m=Tt(u),d=m??[],{org:p}=le(),h=Ko(p.slug),g=Pn(m),x=l.toLowerCase(),j=d.filter(Qo).filter(z=>!g.has(z.id)).filter(Ho),N=j.filter(Go),y=j.filter(Uo),v=cs(p.id),C=!l||v.title.toLowerCase().includes(x),k=!!(o&&C);let D;e[2]!==s||e[3]!==o?(D=()=>{o?.(null),s(),c("")},e[2]=s,e[3]=o,e[4]=D):D=e[4];const b=D;let w;e[5]!==h||e[6]!==s||e[7]!==o?(w=z=>{if(o){o(z.id),s(),c("");return}s(),c(""),h(z.id)},e[5]=h,e[6]=s,e[7]=o,e[8]=w):w=e[8];const _=w,I="flex flex-col max-h-[min(640px,80dvh)]";let P;e[9]!==i?(P=n.jsx(Io,{value:i,onChange:c}),e[9]=i,e[10]=P):P=e[10];const S="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let A;e[11]!==v||e[12]!==o||e[13]!==b||e[14]!==a||e[15]!==C?(A=o&&C&&v&&n.jsx(kt,{agent:v,selected:!a||a===v.id,onClick:b}),e[11]=v,e[12]=o,e[13]=b,e[14]=a,e[15]=C,e[16]=A):A=e[16];const T=(N.length>0||!l)&&n.jsx(Eo,{onImportFromGithub:r});let R;e[17]!==_||e[18]!==o||e[19]!==a?(R=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[17]=_,e[18]=o,e[19]=a,e[20]=R):R=e[20];const E=N.map(R),B=y.length>0&&n.jsx(Po,{});let L;e[21]!==_||e[22]!==o||e[23]!==a?(L=z=>n.jsx(kt,{agent:z,selected:o?a===z.id:void 0,onClick:()=>_(z)},z.id),e[21]=_,e[22]=o,e[23]=a,e[24]=L):L=e[24];const q=y.map(L);let F;e[25]!==k||e[26]!==l||e[27]!==j.length?(F=j.length===0&&!k&&l&&n.jsx(Bo,{}),e[25]=k,e[26]=l,e[27]=j.length,e[28]=F):F=e[28];let U;e[29]!==E||e[30]!==B||e[31]!==q||e[32]!==F||e[33]!==A||e[34]!==T?(U=n.jsxs("div",{className:S,children:[A,T,E,B,q,F]}),e[29]=E,e[30]=B,e[31]=q,e[32]=F,e[33]=A,e[34]=T,e[35]=U):U=e[35];let $;e[36]!==s||e[37]!==p?($=n.jsx(Fo,{org:p,onClose:s}),e[36]=s,e[37]=p,e[38]=$):$=e[38];let H;return e[39]!==U||e[40]!==$||e[41]!==P?(H=n.jsxs("div",{className:I,children:[P,U,$]}),e[39]=U,e[40]=$,e[41]=P,e[42]=H):H=e[42],H}function Uo(t){return!gs(t.metadata)}function Go(t){return gs(t.metadata)}function Ho(t){return!xn(t.id)}function Qo(t){return!hn(t.id)}function qo(t){const e=O.c(14),{compact:s,trigger:o,onSelectAgent:a,selectedAgentId:r,side:i,align:c}=t===void 0?{}:t,l=s===void 0?!1:s,f=i===void 0?"right":i,u=c===void 0?"start":c,[m,d]=G.useState(!1),[p,h]=G.useState(!1),g=ss(),{setOpenMobile:x}=Gs(),j=To(),N=j?"border border-border":void 0;let y;e[0]!==j?(y=S=>j?n.jsx(Ro,{children:S}):S,e[0]=j,e[1]=y):y=e[1];const v=y;let C;e[2]!==g||e[3]!==x?(C=()=>{d(!1),g&&x(!1)},e[2]=g,e[3]=x,e[4]=C):C=e[4];const k=C;let D;e[5]!==k||e[6]!==h?(D=()=>{k(),h(!0)},e[5]=k,e[6]=h,e[7]=D):D=e[7];const b=D,w=m&&n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Hs,{className:"h-4 w-24"})}),children:n.jsx(zo,{onClose:k,onSelectAgent:a,selectedAgentId:r,onImportFromGithub:b})}),_=g?n.jsxs(n.Fragment,{children:[o?G.cloneElement(o,{onClick:S=>{o.props.onClick?.(S),d(!0)}}):l?v(n.jsx(Vo,{setOpen:d,emptyCtaClass:N})):n.jsx($o,{setOpen:d,highlightEmpty:j,emptyCtaClass:N}),n.jsx(It,{open:m,onOpenChange:d,direction:"bottom",children:n.jsxs(Bt,{className:"max-h-[85dvh] p-0",children:[n.jsx(Oo,{}),w]})})]}):n.jsxs(ct,{open:m,onOpenChange:S=>{S&&!m&&oe("agent_browser_opened",{surface:"desktop_popover"}),d(S)},children:[o?n.jsx(Ue,{asChild:!0,children:o}):l?v(n.jsx(Ue,{asChild:!0,children:n.jsx(Lo,{emptyCtaClass:N})})):n.jsx(Mo,{wrapEmptyHint:v,highlightEmpty:j,emptyCtaClass:N}),n.jsx(dt,{className:"w-[380px] p-0 overflow-hidden",side:f,align:u,children:w})]});let I;e[8]!==p||e[9]!==h?(I=n.jsx(In,{open:p,onOpenChange:h,mode:"agent"}),e[8]=p,e[9]=h,e[10]=I):I=e[10];let P;return e[11]!==_||e[12]!==I?(P=n.jsxs(n.Fragment,{children:[_,I]}),e[11]=_,e[12]=I,e[13]=P):P=e[13],P}function Wo(){const t=O.c(2),e=Tt()??[];let s;return t[0]!==e?(s=o=>{if(!o)return;const a=e.find(r=>r.id===o);return a?Vn(a.metadata):void 0},t[0]=e,t[1]=s):s=t[1],s}const Yo="inline-flex items-center gap-1.5 min-w-0 rounded-md pl-1 pr-2 py-1.5 text-sm text-foreground hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50";function Xo(t){const e=O.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:r}=t,i=Q(),c=yn(s)??o??null;let l,f,u,m,d;e[0]!==c?.title||e[1]!==a||e[2]!==i?(d=c?.title??i("header.shellBreadcrumb.superAgentDefaultName"),m="flex min-w-0 items-center gap-0",l="button",f=a,u=i("header.shellBreadcrumb.openAgentHome",{name:d}),e[0]=c?.title,e[1]=a,e[2]=i,e[3]=l,e[4]=f,e[5]=u,e[6]=m,e[7]=d):(l=e[3],f=e[4],u=e[5],m=e[6],d=e[7]);const p=c?.icon??null;let h;e[8]!==p||e[9]!==d?(h=n.jsx(ls,{icon:p,name:d,size:"xs"}),e[8]=p,e[9]=d,e[10]=h):h=e[10];let g;e[11]!==l||e[12]!==f||e[13]!==u||e[14]!==h?(g=n.jsx("button",{type:l,onClick:f,"aria-label":u,className:"flex items-center shrink-0 rounded-md p-1 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:h}),e[11]=l,e[12]=f,e[13]=u,e[14]=h,e[15]=g):g=e[15];let x;e[16]!==d?(x=n.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:d}),e[16]=d,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=j):j=e[18];let N;e[19]!==x?(N=n.jsxs("button",{type:"button",className:Yo,children:[x,j]}),e[19]=x,e[20]=N):N=e[20];let y;e[21]!==s||e[22]!==r||e[23]!==N?(y=n.jsx(qo,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:r,trigger:N}),e[21]=s,e[22]=r,e[23]=N,e[24]=y):y=e[24];let v;return e[25]!==y||e[26]!==m||e[27]!==g?(v=n.jsxs("div",{className:m,children:[g,y]}),e[25]=y,e[26]=m,e[27]=g,e[28]=v):v=e[28],v}function pa(t){const e=O.c(23);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=le(),{threads:r}=ps(),i=Tt(),{data:c}=Dt.useSession(),{setTaskId:l,createNewTask:f}=hs(),u=Wo(),m=Nn(void 0,null);let d;e[2]!==a.id?(d=cs(a.id),e[2]=a.id,e[3]=d):d=e[3];const p=d,h=p.id,g=as();let x;e[4]!==i||e[5]!==m||e[6]!==f||e[7]!==h||e[8]!==o||e[9]!==u||e[10]!==c?.user||e[11]!==l||e[12]!==r?(x=k=>{const D=k??h,b=(i??[]).find(I=>I.id===D),w=Sn(b),_=wn(r,D,c?.user?.id,u(D),!!(b&&vn(b)),{knownBranches:new Set([m,...(b?.metadata?.releases??[]).map(Jo)]),draftsMode:w,baseBranch:m});_?l(_.id,D):f(D,w?_o(wo(c?.user)):void 0),o?.()},e[4]=i,e[5]=m,e[6]=f,e[7]=h,e[8]=o,e[9]=u,e[10]=c?.user,e[11]=l,e[12]=r,e[13]=x):x=e[13];const j=x;let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[14]=N):N=e[14];const y=g===h?p:void 0;let v;e[15]!==g||e[16]!==j?(v=()=>j(g),e[15]=g,e[16]=j,e[17]=v):v=e[17];let C;return e[18]!==g||e[19]!==j||e[20]!==y||e[21]!==v?(C=n.jsx(G.Suspense,{fallback:N,children:n.jsx(Xo,{agentId:g,fallback:y,onOpenHome:v,onPick:j})}),e[18]=g,e[19]=j,e[20]=y,e[21]=v,e[22]=C):C=e[22],C}function Jo(t){return t.branch}function ga(){const t=O.c(20),e=Q(),{threads:s}=ps(),{createNewTask:o}=hs(),a=as(),r=rs();let i;t[0]!==r||t[1]!==s?(i=s.find(x=>x.id===r)?.branch??null,t[0]=r,t[1]=s,t[2]=i):i=t[2];const c=i;let l;t[3]!==a||t[4]!==o||t[5]!==c?(l=()=>{o(a,c)},t[3]=a,t[4]=o,t[5]=c,t[6]=l):l=t[6];const f=l;let u;t[7]!==e?(u=e("sidebar.taskGroupsList.newChat"),t[7]=e,t[8]=u):u=t[8];let m;t[9]===Symbol.for("react.memo_cache_sentinel")?(m=n.jsx(nn,{size:16}),t[9]=m):m=t[9];let d;t[10]!==f||t[11]!==u?(d=n.jsx(Le,{asChild:!0,children:n.jsx("button",{type:"button",onClick:f,"aria-label":u,className:"flex shrink-0 items-center rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:m})}),t[10]=f,t[11]=u,t[12]=d):d=t[12];let p;t[13]!==e?(p=e("sidebar.taskGroupsList.newChat"),t[13]=e,t[14]=p):p=t[14];let h;t[15]!==p?(h=n.jsx(Me,{side:"bottom",children:p}),t[15]=p,t[16]=h):h=t[16];let g;return t[17]!==d||t[18]!==h?(g=n.jsxs(Re,{children:[d,h]}),t[17]=d,t[18]=h,t[19]=g):g=t[19],g}function Zo({open:t,onOpenChange:e,onCreated:s}){const o=Q(),{org:a}=le(),{data:r}=Dt.useSession(),{stdioEnabled:i}=qs(),c=ss(),l=ks(),f=xs(),m=js(f,"").items,d=Ws({resolver:Ys(Zn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),p=d.watch("ui_type"),h=d.watch("connection_url"),g=d.watch("npx_package"),x=et({uiType:p,connectionUrl:h??"",npxPackage:g??""})??Ut({uiType:p,connectionUrl:h??"",registryItems:m}),j=b=>{const w=b.trim();if(!w)return;const _=!!d.formState.dirtyFields.title,I=!!d.formState.dirtyFields.description,P=!!d.formState.dirtyFields.env_vars,S=T=>{if(T&&(!_&&!d.getValues("title").trim()&&T.title&&d.setValue("title",T.title,{shouldDirty:!1}),!I&&!(d.getValues("description")??"").trim()&&T.description&&d.setValue("description",T.description,{shouldDirty:!1}),!P&&T.envVarKeys?.length)){const R=d.getValues("env_vars")??[],E=new Set(R.map(L=>L.key)),B=T.envVarKeys.filter(L=>!E.has(L));B.length>0&&d.setValue("env_vars",[...R,...B.map(L=>({key:L,value:""}))],{shouldDirty:!0})}},A=to(w);if(A&&i){d.setValue("ui_type","NPX",{shouldDirty:!0}),d.setValue("npx_package",A.packageName,{shouldDirty:!0}),d.setValue("connection_url","",{shouldDirty:!0}),d.setValue("connection_token",null,{shouldDirty:!0}),S(et({uiType:"NPX",npxPackage:A.packageName}));return}if(w.startsWith("http://")||w.startsWith("https://")){const T=p==="HTTP"||p==="SSE"||p==="Websocket"?p:"HTTP";d.setValue("ui_type",T,{shouldDirty:!0}),d.setValue("connection_url",w,{shouldDirty:!0}),S(et({uiType:T,connectionUrl:w})??Ut({uiType:T,connectionUrl:w,registryItems:m}));return}p==="NPX"&&S(et({uiType:"NPX",npxPackage:w}))},N=b=>{b||d.reset(),e(b)},y=async b=>{let w,_=null,I=null,P=null;b.ui_type==="NPX"?(w="STDIO",_="",P=so(b.npx_package||"",b.env_vars||[])):b.ui_type==="STDIO"?(w="STDIO",_="",P=no(b.stdio_command||"",b.stdio_args||"",b.stdio_cwd,b.env_vars||[])):(w=b.ui_type,_=b.connection_url||"",I=b.connection_token||null);const S=On("conn");try{await l.create.mutateAsync({id:S,title:b.title,description:b.description||null,connection_type:w,connection_url:_,connection_token:I,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:a.id,icon:b.icon??null,app_name:null,app_id:null,connection_headers:P,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),d.reset(),e(!1),s?.(S)}catch{de.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},v=o("connections.createConnectionDialog.title"),C=o("connections.createConnectionDialog.description"),k=d.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),D=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(pe,{control:d.control,name:"ui_type",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.typeLabel")}),n.jsxs(Gn,{value:b.value,onValueChange:b.onChange,children:[n.jsx(xe,{children:n.jsx(Hn,{children:n.jsx(Qn,{})})}),n.jsxs(qn,{children:[n.jsx(He,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),n.jsx(He,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),n.jsx(He,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(jt,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),i&&n.jsxs(n.Fragment,{children:[n.jsx(He,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(ot,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),n.jsx(He,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Yn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),n.jsx(je,{})]})}),p==="NPX"&&n.jsx(pe,{control:d.control,name:"npx_package",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.npmPackageLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("npx_package",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),p==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(pe,{control:d.control,name:"stdio_command",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.commandLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"stdio_args",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.argumentsLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...b,value:b.value??""})}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"stdio_cwd",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...b,value:b.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),n.jsx(je,{})]})})]}),(p==="NPX"||p==="STDIO")&&n.jsx(pe,{control:d.control,name:"env_vars",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),n.jsx(xe,{children:n.jsx(eo,{value:b.value??[],onChange:b.onChange})}),n.jsx(je,{})]})}),p!=="NPX"&&p!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(pe,{control:d.control,name:"connection_url",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.urlLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...b,value:b.value??"",onPaste:w=>{const _=w.clipboardData.getData("text");_&&(w.preventDefault(),d.setValue("connection_url",_.trim(),{shouldDirty:!0}),j(_))},onBlur:w=>{j(w.target.value),b.onBlur()}})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"connection_token",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:x?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),n.jsx(xe,{children:n.jsx(Se,{type:"password",placeholder:x?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...b,value:b.value??""})}),x?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[x.token.helperText,x.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:o("connections.createConnectionDialog.openGitHubPatSettings")})]})]}),n.jsx(je,{})]})})]}),n.jsx(pe,{control:d.control,name:"title",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.nameLabel")}),n.jsx(xe,{children:n.jsx(Se,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...b})}),n.jsx(je,{})]})}),n.jsx(pe,{control:d.control,name:"description",render:({field:b})=>n.jsxs(ge,{children:[n.jsx(he,{children:o("connections.createConnectionDialog.descriptionLabel")}),n.jsx(xe,{children:n.jsx(Wn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...b,value:b.value??""})}),n.jsx(je,{})]})})]});return c?n.jsx(It,{open:t,onOpenChange:N,children:n.jsxs(Bt,{className:"max-h-[90vh]",children:[n.jsx(_n,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Ft,{children:v}),n.jsx(Dn,{className:"mt-1",children:C})]}),n.jsx(us,{asChild:!0,children:n.jsx(ye,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Jn,{size:16})})})]})}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:D}),n.jsx(fs,{children:n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):n.jsx(bs,{open:t,onOpenChange:N,children:n.jsxs(ys,{className:"sm:max-w-[525px]",children:[n.jsxs(vs,{children:[n.jsx(Cs,{children:v}),n.jsx(zn,{children:C})]}),n.jsx(zt,{...d,children:n.jsxs("form",{onSubmit:d.handleSubmit(y),children:[n.jsx("div",{className:"py-4",children:D}),n.jsxs(Un,{children:[n.jsx(ye,{type:"button",variant:"outline",onClick:()=>N(!1),children:o("connections.createConnectionDialog.cancelButton")}),n.jsx(ye,{type:"submit",disabled:d.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function ei(t){const e=O.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:r,onCloneAndAdd:i,onConnectAndAdd:c,connectingItemId:l,search:f,onCreateConnection:u,onBrowseNavigate:m,defaultTab:d}=t,p=s===void 0?"add":s,h=d===void 0?"connected":d,g=Q(),{org:x}=le(),j=G.useDeferredValue(f),N=f!==j;let y;e[0]!==j?(y=j.trim().toLowerCase(),e[0]=j,e[1]=y):y=e[1];const v=y;let C;e[2]!==h?(C=V=>V??h,e[2]=h,e[3]=C):C=e[3];const[k,D]=Xs(Js.connectionsTab(x.slug)+(h==="all"?":home-modal":":agent-modal"),C);let b;e[4]!==k||e[5]!==D?(b=V=>{V!==k&&oe("connections_dialog_tab_changed",{to_tab:V}),D(V)},e[4]=k,e[5]=D,e[6]=b):b=e[6];const w=b;let _;e[7]!==x.id||e[8]!==x.slug?(_={connectionId:jn,orgId:x.id,orgSlug:x.slug},e[7]=x.id,e[8]=x.slug,e[9]=_):_=e[9];const I=ao(_),P=j?.trim().split(/\s+/).filter(Boolean)??[],S=P.length>0?{operator:"or",conditions:P.flatMap(li)}:void 0,A={...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:R,fetchNextPage:E,hasNextPage:B,isFetchingNextPage:L}=ro({queryKey:fe.collectionListInfinite(I,x.id,"","CONNECTIONS",T),queryFn:async V=>{const{pageParam:X}=V,be=X===void 0?0:X;return(await I.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...S&&{where:S},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:be}})).structuredContent},initialPageParam:0,getNextPageParam:ri,staleTime:3e4}),q=R?.pages.flatMap(ii)??[],F=Kn(q),U=new Set(q.filter(oi).map(ni)),$=xs(),H=js($,j),z=Gt(H.loadMore,H.hasMore,H.isLoadingMore),se=Gt(E,B??!1,L),W=k==="all"||!!v,ie=W?H.items.filter(V=>{const X=Ln(V);if(X&&U.has(X))return!1;if(!v)return!0;const be=it(V._meta),ke=[V.title,V.description,V.name,V.server?.title,V.server?.description,V.server?.name,be?.friendly_name,be?.friendlyName].filter(Boolean).join(" ").toLowerCase();return P.some(me=>ke.includes(me.toLowerCase()))}):[],Z=ie.filter(si),ee=ie.filter(ti);let te;e[10]!==a?(te=V=>V.some(X=>a.has(X.id)),e[10]=a,e[11]=te):te=e[11];const ne=te;let re;e[12]!==a||e[13]!==o||e[14]!==l||e[15]!==ne||e[16]!==p||e[17]!==r||e[18]!==m||e[19]!==i||e[20]!==g?(re=(V,X,be,ke,me)=>{const Ze=ne(me),$e=me.find(Ne=>!a.has(Ne.id)),ce=me[0];if(p==="browse"){const Ne=oo(ce);return n.jsx(yt,{connection:{title:X,icon:be,description:me.length>1?`${me.length} instances`:ke??void 0},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",g("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{oe("connection_browse_clicked",{app_name:ce.app_name??null,connection_id:ce.id,instances_count:me.length}),m?.(Ne)}},V)}return n.jsx(yt,{connection:{title:X,icon:be,description:ke},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[Ze&&n.jsxs(tt,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(qe,{size:11})," ",g("virtualMcp.connectionDialogContent.added")]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),$e?(oe("connection_add_clicked",{action:"use_existing",app_name:ce.app_name??null,connection_id:$e.id}),o&&oe("agent_connection_attached",{agent_id:o,connection_id:$e.id,app_name:ce.app_name??null,mode:"existing"}),r($e.id)):(oe("connection_add_clicked",{action:"clone",app_name:ce.app_name??null,base_connection_id:ce.id}),i(ce))},children:g("virtualMcp.connectionDialogContent.add")})]})},V)},e[12]=a,e[13]=o,e[14]=l,e[15]=ne,e[16]=p,e[17]=r,e[18]=m,e[19]=i,e[20]=g,e[21]=re):re=e[21];const M=re;let K;e[22]!==l||e[23]!==p||e[24]!==c||e[25]!==g?(K=V=>{const X=it(V._meta),be=X?.friendlyName||X?.friendly_name||V.server?.title||V.title||V.server?.name||V.name||V.id||"",ke=V.server?.description||V.description||null,me=V.server?.icons?.[0]?.src||Mn(V.server?.repository)||null,Ze=X?.official===!0,$e=X?.verified===!0,ce=X?.owner==="deco";return n.jsx(yt,{connection:{title:be,description:ke,icon:me},fallbackIcon:n.jsx(ot,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[ce&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:n.jsx("img",{src:"/logos/deco logo.svg",alt:g("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),n.jsx(Me,{children:g("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ce&&Ze&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:g("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ce&&!Ze&&$e&&n.jsxs(Re,{children:[n.jsx(Le,{asChild:!0,children:n.jsx(tt,{variant:"outline",size:"icon",children:n.jsx(vt,{})})}),n.jsx(Me,{children:g("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),n.jsx(ye,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:Ne=>{Ne.stopPropagation(),oe("connection_add_clicked",{action:"connect_new",registry_item_id:V.id,app_name:X?.friendlyName||V.server?.name||V.name||null}),c(V)},children:l===V.id?n.jsx(Qe,{className:"size-3.5"}):g(p==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${V.id}`)},e[22]=l,e[23]=p,e[24]=c,e[25]=g,e[26]=K):K=e[26];const ae=K;let Y;e[27]!==k||e[28]!==w||e[29]!==u||e[30]!==v||e[31]!==g?(Y=!v&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(io,{tabs:[{id:"all",label:g("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:g("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:k,onTabChange:V=>w(V)}),n.jsxs(ye,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{oe("connections_dialog_custom_clicked"),u()},children:[n.jsx(Ye,{size:12}),g("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=k,e[28]=w,e[29]=u,e[30]=v,e[31]=g,e[32]=Y):Y=e[32];const ve=N&&"opacity-50 pointer-events-none";let ue;e[33]!==ve?(ue=J("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=ue):ue=e[34];const De="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Ae;e[35]!==M?(Ae=V=>{if(V.type==="group")return M(V.key,V.title,V.icon,null,V.connections);const X=V.connection;return M(X.id,X.title,X.icon,X.description??null,[X])},e[35]=M,e[36]=Ae):Ae=e[36];const mt=F.map(Ae);let Te;e[37]!==se?(Te=n.jsx("div",{ref:se,className:"col-span-full h-1"}),e[37]=se,e[38]=Te):Te=e[38];let Ie;e[39]!==L?(Ie=L&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[39]=L,e[40]=Ie):Ie=e[40];const pt=W&&Z.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(vt,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionVerified")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),gt=W&&Z.map(ae),ht=W&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:g("virtualMcp.connectionDialogContent.sectionAllConnections")}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),xt=W&&ee.map(ae);let Be;e[41]!==z||e[42]!==$||e[43]!==W?(Be=W&&$.length>0&&n.jsx("div",{ref:z,className:"col-span-full h-1"}),e[41]=z,e[42]=$,e[43]=W,e[44]=Be):Be=e[44];let Fe;e[45]!==H.isLoadingMore||e[46]!==W?(Fe=W&&H.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),e[45]=H.isLoadingMore,e[46]=W,e[47]=Fe):Fe=e[47];let Pe;e[48]!==mt||e[49]!==Te||e[50]!==Ie||e[51]!==pt||e[52]!==gt||e[53]!==ht||e[54]!==xt||e[55]!==Be||e[56]!==Fe?(Pe=n.jsxs("div",{className:De,children:[mt,Te,Ie,pt,gt,ht,xt,Be,Fe]}),e[48]=mt,e[49]=Te,e[50]=Ie,e[51]=pt,e[52]=gt,e[53]=ht,e[54]=xt,e[55]=Be,e[56]=Fe,e[57]=Pe):Pe=e[57];let Ee;e[58]!==k||e[59]!==F.length||e[60]!==ee||e[61]!==f||e[62]!==g||e[63]!==Z?(Ee=F.length===0&&Z.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:f?g("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:f}):g(k==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=k,e[59]=F.length,e[60]=ee,e[61]=f,e[62]=g,e[63]=Z,e[64]=Ee):Ee=e[64];let Ve;e[65]!==ue||e[66]!==Pe||e[67]!==Ee?(Ve=n.jsxs("div",{className:ue,children:[Pe,Ee]}),e[65]=ue,e[66]=Pe,e[67]=Ee,e[68]=Ve):Ve=e[68];let Je;return e[69]!==Y||e[70]!==Ve?(Je=n.jsxs(n.Fragment,{children:[Y,Ve]}),e[69]=Y,e[70]=Ve,e[71]=Je):Je=e[71],Je}function ti(t){return!t.verified&&!it(t._meta)?.verified&&!t.meta?.verified}function si(t){return t.verified||it(t._meta)?.verified||t.meta?.verified}function ni(t){return t.app_name}function oi(t){return t.app_name}function ii(t){return t?.items??[]}function ri(t,e){if(t?.hasMore)return e.reduce(ai,0)}function ai(t,e){return t+(e?.items?.length??0)}function li(t){return[{field:["title"],operator:"contains",value:t},{field:["description"],operator:"contains",value:t}]}function ha({open:t,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const r=Q(),i=a.mode??"add",c="agentId"in a?a.agentId:void 0,l="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,f="onAdd"in a&&a.onAdd?a.onAdd:S=>{},u=(S,A,T)=>{c&&oe("agent_connection_attached",{agent_id:c,connection_id:S,app_name:A,mode:T})},[m,d]=G.useState(null),[p,h]=G.useState(o),[g,x]=G.useState(!1),[j,N]=G.useState(t);t!==j&&(N(t),t&&h(o));const{org:y}=le(),{data:v}=Dt.useSession(),C=ks(),k=at(),D=ns(),b=S=>{e(!1),D({to:"/$org/settings/connections/$appSlug",params:{org:y.slug,appSlug:S}})},w=()=>{k.invalidateQueries({predicate:S=>{const A=S.queryKey;return A[1]===y.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},_=async(S,A)=>{oe("connection_oauth_succeeded",{connection_id:S,flow:A});const T=new URL(`/api/${y.slug}/mcp/${S}`,window.location.origin);await k.invalidateQueries({queryKey:fe.isMCPAuthenticated(T.href,null)}),w()},I=async S=>{d(S.app_name??S.id);try{const T=`${S.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,E=(await C.create.mutateAsync({title:T,description:S.description??null,connection_type:S.connection_type,connection_url:S.connection_url??null,connection_token:null,icon:S.icon??null,app_name:S.app_name??null,app_id:S.app_id??null,connection_headers:S.connection_headers??null})).id,B=await Ct({connectionId:E,orgId:y.id,orgSlug:y.slug,persistFallback:L=>C.update.mutateAsync({id:E,data:{connection_token:L}}).then(()=>{})});if(B.ran&&!B.ok){oe("connection_oauth_failed",{connection_id:E,flow:"clone",error:B.error??"no_token"}),de.error(r("virtualMcp.addConnectionDialog.authenticationFailedError",{error:B.error??"no token received"})),await C.delete.mutateAsync(E);return}B.ran&&await _(E,"clone"),u(E,S.app_name??null,"clone"),f(E)}catch(A){console.error("Failed to add connection:",A),de.error(r("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{d(null)}},P=async S=>{if(!(!y||!v?.user?.id)){d(S.id);try{const A=Rn(S,y.id,v.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",R=!!A.connection_url,E=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!R&&!E){de.error(r("virtualMcp.addConnectionDialog.mcpServerConnectionError")),d(null);return}const{id:B}=await C.create.mutateAsync(A),L=await Ct({connectionId:B,orgId:y.id,orgSlug:y.slug,persistFallback:q=>C.update.mutateAsync({id:B,data:{connection_token:q}}).then(()=>{})});if(L.ran&&!L.ok){oe("connection_oauth_failed",{connection_id:B,flow:"connect_new",error:L.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:L.error??"no token received"})}),u(B,A.app_name??null,"new"),f(B);return}L.ran?(await _(B,"connect_new"),de.success(r("virtualMcp.addConnectionDialog.connectedAuthenticated"))):de.success(r("virtualMcp.addConnectionDialog.connected")),u(B,A.app_name??null,"new"),f(B)}catch(A){console.error("Failed to connect:",A),de.error(r("virtualMcp.addConnectionDialog.failedToConnect"))}finally{d(null)}}};return n.jsxs(bs,{open:t,onOpenChange:e,children:[n.jsxs(ys,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(vs,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Cs,{className:"text-base font-semibold",children:r(i==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx($n,{value:p,onChange:h,placeholder:r("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),n.jsx(G.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Qe,{className:"size-6 text-muted-foreground"})}),children:n.jsx(ei,{mode:i,agentId:c,addedConnectionIds:l,onAdd:f,onCloneAndAdd:I,onConnectAndAdd:P,connectingItemId:m,search:p,onCreateConnection:()=>x(!0),onBrowseNavigate:b,defaultTab:s})})]}),n.jsx(Zo,{open:g,onOpenChange:x,onCreated:async S=>{x(!1);const A=await Ct({connectionId:S,orgId:y.id,orgSlug:y.slug,persistFallback:T=>C.update.mutateAsync({id:S,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){oe("connection_oauth_failed",{connection_id:S,flow:"custom_create",error:A.error??"no_token"}),de.warning(r("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:r("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),u(S,null,"custom"),f(S),e(!1);return}A.ran&&await _(S,"custom_create"),u(S,null,"custom"),f(S),e(!1)}})]})}const Wt=new Map;function xa(){const{org:t}=le(),e=At(),s=lo(),o=s.find(x=>x.providerId==="deco"),{data:a,isLoading:r,refetch:i,isFetching:c}=lt({queryKey:fe.aiProviderCredits(t.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),l=a?.balanceCents??null,f=l!=null?l/100:null,u=G.useRef(new Map);if(l!=null){const x=Wt.get(t.id);u.current.get(t.id)&&x!=null&&l>x&&oe("credits_topped_up_detected",{organization_id:t.id,delta_cents:l-x,previous_balance_cents:x,new_balance_cents:l}),Wt.set(t.id,l),u.current.set(t.id,!0)}const m=!!o,d=l!=null&&l>0,p=l!=null&&l===0,h=l!=null&&l===200,g=s.length>0&&s.every(x=>x.providerId==="deco");return{hasDecoKey:m,decoKeyId:o?.id??null,balanceCents:l,balanceDollars:f,hasCredits:d,isZeroBalance:p,isInitialFreeCredit:h,hasOnlyDecoProvider:g,isLoading:r,isFetching:c,refetch:i}}const ci=4,di="TASK";function ui(t){return t.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,ci)||di}function fi(t,e){return e==null?null:`${ui(t)}-${String(e).padStart(2,"0")}`}const mi=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function pi(t){const e=mi.exec(t.trim())?.[1];return e===void 0?null:Number(e)}function Yt(t){const e=O.c(8),{size:s,className:o}=t,a=s===void 0?16:s;let r;e[0]!==a?(r={width:a,height:a},e[0]=a,e[1]=r):r=e[1];let i;e[2]!==o?(i=J("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=i):i=e[3];let c;return e[4]!==a||e[5]!==r||e[6]!==i?(c=n.jsx("img",{src:bn,alt:"Super Agent",width:a,height:a,style:r,className:i}),e[4]=a,e[5]=r,e[6]=i,e[7]=c):c=e[7],c}const Xe=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations"],gi=["overview","reports","board","site-editor"],Lt=1,hi=["assets","hosting","e2e","analytics","cdn"];function ja(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const o=e?.id===t?e:s?.id===t?s:null;return{project:o,resolvedScopeId:o?t:null}}function ba(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function Bs(t,e){const s=new Set(t??[]);if(e!==Lt)for(const o of gi)s.add(o);return Xe.filter(o=>s.has(o))}function xi(t){return Xe.some(e=>e===t)}function ji(t){return hi.some(e=>e===t)}function bi(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,automations:!0}}function ya(t,e,s){const o=bi(e,s);return t?o:{...o,overview:!0,reports:!0,board:!0}}function va(t,e,s){const o=new Set(Bs(t,s));return Xe.filter(a=>e[a]&&o.has(a))}function Ca(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function ka(t){return Xe.filter(e=>t[e])}function yi(t,e,s){return!xi(t)||e[t]?!1:ji(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function Na(t,e,s,o,a){return yi(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!o.includes("content")||t==="code"&&a&&!o.includes("code")}function Sa(t,e,s,o){const a=new Set(Bs(t,o));return s?a.add(e):a.delete(e),Xe.filter(r=>a.has(r))}function We(t,e){return fe.optimisticProjectSidebarViews(t,e)}function st(t){return typeof t=="object"&&t!==null}function Fs(t,e){return t[1]===e&&t[3]==="collection"&&t[4]==="VIRTUAL_MCP"}function vi(t,e){if(!st(t))return t;if("item"in t&&st(t.item)&&t.item.id===e.id)return{...t,item:e};if(!("structuredContent"in t)||!st(t.structuredContent))return t;const s=t.structuredContent.items;if(!Array.isArray(s))return t;let o=!1;const a=s.map(r=>!st(r)||r.id!==e.id?r:(o=!0,e));return o?{...t,structuredContent:{...t.structuredContent,items:a}}:t}function wa(t,e,s){t.setQueriesData({predicate:o=>Fs(o.queryKey,e)},o=>vi(o,s))}function _a(t,e,s){const o=t.getQueriesData({predicate:a=>Fs(a.queryKey,e)&&a.queryKey[5]===s});for(const[,a]of o)if(a?.item?.id===s)return a.item;return null}function Mt(t,e,s){return t.getQueryData(We(e,s))??null}function Ci(t,e){if(e)return{sidebarViews:[...e.views],sidebarViewsVersion:Lt};const s=t?.sidebarViews;return{sidebarViews:s===null?null:s?[...s]:void 0,sidebarViewsVersion:t?.sidebarViewsVersion}}function Da(t,e,s){return e?{sidebarViews:[...e.views],sidebarViewsVersion:Lt}:s===void 0?{sidebarViews:t.sidebarViews===null?null:t.sidebarViews?[...t.sidebarViews]:void 0,sidebarViewsVersion:t.sidebarViewsVersion}:Ci(s,null)}function ki(t,e,s,o,a){const r=Mt(t,e,s),i={revision:(r?.revision??0)+1,views:[...o],rollbackViews:r?[...r.rollbackViews]:[...a]};return t.setQueryData(We(e,s),i),{revision:i.revision,views:[...i.views],persistedViews:[...i.rollbackViews]}}function Ni(t,e,s){const o=Mt(t,e,s);return o?{revision:o.revision,views:[...o.views],persistedViews:[...o.rollbackViews]}:null}function Ps(t,e){const s=new Set(t),o=new Set(e);return s.size===o.size&&[...s].every(a=>o.has(a))}function Aa(t){return t?!Ps(t.views,t.persistedViews):!1}function Si(t,e,s,{snapshot:o,saved:a,authoritativeViews:r}){if(!o)return{settledLatest:!1,reconciledViews:null};const i=Mt(t,e,s);if(!i||o.revision>i.revision)return{settledLatest:!1,reconciledViews:null};const c=r!==void 0?[...r]:a?[...o.views]:null,l={...i,rollbackViews:c??i.rollbackViews};return l.rollbackViews!==i.rollbackViews&&t.setQueryData(We(e,s),l),o.revision!==i.revision?{settledLatest:!1,reconciledViews:null}:(t.setQueryData(We(e,s),null),{settledLatest:!0,reconciledViews:a?c&&!Ps(c,o.views)?c:null:[...l.rollbackViews]})}function Ta(t){const e=O.c(5),{org:s}=le(),o=t??"";let a;e[0]!==s.id||e[1]!==o?(a=We(s.id,o),e[0]=s.id,e[1]=o,e[2]=a):a=e[2];let r;e[3]!==a?(r={queryKey:a,queryFn:wi,enabled:!1,staleTime:Number.POSITIVE_INFINITY},e[3]=a,e[4]=r):r=e[4];const{data:i}=lt(r);return i?.views}async function wi(){return null}function Ia(t){const e=O.c(4),{org:s}=le(),o=at();let a;return e[0]!==s||e[1]!==o||e[2]!==t?(a={stage:(r,i)=>ki(o,s.id,t,r,i),snapshot:()=>Ni(o,s.id,t),settle:r=>Si(o,s.id,t,r)},e[0]=s,e[1]=o,e[2]=t,e[3]=a):a=e[3],a}function _i(t,e){if(!e)return null;const s=e.toLowerCase();return t.find(o=>{const a=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}function Ba(t){const e=O.c(10),{org:s}=le(),o=Zs(),a=uo(),r=co(),i=fo(t),c=o.hostingEnabled===!0,l=o.monitorEnabled===!0||o.auth.localMode===!0,f=(c||l)&&!!i,u=lt({queryKey:fe.hostingAccess(s.slug,i??""),queryFn:async()=>{const C=await fetch(`/api/${s.slug}/hosting/${encodeURIComponent(i??"")}/access`);return C.ok?await C.json():{owned:!1,canWrite:!1}},enabled:f,staleTime:6e4}),m=u.data?.owned===!0,d=!!_i(r.data?.configs??[],i),p=c&&m&&a.hosting,h=c&&m&&a.e2e,g=c&&m&&a.analytics,x=l&&m&&a.monitor;let j;e[0]!==d||e[1]!==p||e[2]!==h||e[3]!==g||e[4]!==x?(j={assets:d,hosting:p,e2e:h,analytics:g,cdn:x},e[0]=d,e[1]=p,e[2]=h,e[3]=g,e[4]=x,e[5]=j):j=e[5];const N=!!i&&r.isPending,y=f&&u.isPending;let v;return e[6]!==j||e[7]!==N||e[8]!==y?(v={presence:j,assetsPending:N,siteAccessPending:y},e[6]=j,e[7]=N,e[8]=y,e[9]=v):v=e[9],v}const Xt=()=>0;function Di(t){const{orgSlug:e,enabled:s=!0,onUpdate:o,onDelete:a,onResync:r}=t,i=G.useRef(o);i.current=o;const c=G.useRef(a);c.current=a;const l=G.useRef(r);l.current=r;const f=G.useRef(null),u=G.useRef(s),m=G.useRef(e);(!f.current||u.current!==s||m.current!==e)&&(u.current=s,m.current=e,f.current=p=>{if(!s||!e)return()=>{};const h=g=>{let x;try{x=JSON.parse(g.data)}catch{return}x.data&&(g.type===mo?c.current?.(x.data.id):i.current(x.data)),p()};return ho.subscribe(e,h,()=>l.current?.())}),G.useSyncExternalStore(f.current,Xt,Xt)}function Ai(t,e){return{queryKey:fe.taskBoardItems(t),refetchInterval:6e4,queryFn:async()=>{const{items:s}=await e.call("TASK_BOARD_ITEM_LIST",{});return{items:s}}}}function Ti(){const t=O.c(21),{org:e,locator:s}=le(),o=at();let a;t[0]!==s?(a=fe.taskBoardItems(s),t[0]=s,t[1]=a):a=t[1];const r=a;let i;t[2]!==s||t[3]!==o||t[4]!==r?(i=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.some(h=>h.id===d.id)?p.items.map(h=>h.id===d.id?d:h):[d,...p.items]}),o.invalidateQueries({queryKey:fe.taskBoardActivity(s,d.id)})},t[2]=s,t[3]=o,t[4]=r,t[5]=i):i=t[5];let c,l;t[6]!==o||t[7]!==r?(c=()=>{o.invalidateQueries({queryKey:r})},l=d=>{o.cancelQueries({queryKey:r}),o.setQueryData(r,p=>p&&{...p,items:p.items.filter(h=>h.id!==d)})},t[6]=o,t[7]=r,t[8]=c,t[9]=l):(c=t[8],l=t[9]);let f;t[10]!==e.slug||t[11]!==i||t[12]!==c||t[13]!==l?(f={orgSlug:e.slug,onUpdate:i,onResync:c,onDelete:l},t[10]=e.slug,t[11]=i,t[12]=c,t[13]=l,t[14]=f):f=t[14],Di(f);let u;t[15]!==o||t[16]!==r?(u=d=>{const p=d.subject,h=d.data.status;o.cancelQueries({queryKey:r}),o.setQueryData(r,g=>g&&{...g,items:g.items.map(x=>x.threads.some(j=>j.threadId===p)?{...x,threads:x.threads.map(j=>j.threadId===p?{...j,status:h}:j)}:x)})},t[15]=o,t[16]=r,t[17]=u):u=t[17];let m;t[18]!==e.slug||t[19]!==u?(m={orgSlug:e.slug,onTaskStatus:u},t[18]=e.slug,t[19]=u,t[20]=m):m=t[20],xo(m)}function Fa(){const t=O.c(9),{locator:e}=le(),s=At();let o;t[0]!==e||t[1]!==s?(o=Ai(e,s),t[0]=e,t[1]=s,t[2]=o):o=t[2];const a=lt(o);Ti();let r;t[3]!==a.data?.items?(r=a.data?.items??[],t[3]=a.data?.items,t[4]=r):r=t[4];let i;return t[5]!==a.error||t[6]!==a.isLoading||t[7]!==r?(i={items:r,isLoading:a.isLoading,error:a.error},t[5]=a.error,t[6]=a.isLoading,t[7]=r,t[8]=i):i=t[8],i}function Pa(){const t=O.c(70),{org:e,locator:s}=le(),o=At(),a=at(),r=Q();let i;t[0]!==s?(i=fe.taskBoardItems(s),t[0]=s,t[1]=i):i=t[1];const c=i;let l;t[2]!==a||t[3]!==c?(l=()=>a.invalidateQueries({queryKey:c}),t[2]=a,t[3]=c,t[4]=l):l=t[4];const f=l;let u;t[5]!==o?(u=F=>o.call("TASK_BOARD_ITEM_CREATE",F),t[5]=o,t[6]=u):u=t[6];let m;t[7]!==f||t[8]!==u?(m={mutationFn:u,onSuccess:f},t[7]=f,t[8]=u,t[9]=m):m=t[9];const d=Oe(m);let p;t[10]!==o?(p=F=>o.call("TASK_BOARD_ITEM_UPDATE",F),t[10]=o,t[11]=p):p=t[11];let h;t[12]!==a||t[13]!==c?(h=async F=>{await a.cancelQueries({queryKey:c});const U=a.getQueryData(c);return a.setQueryData(c,$=>$&&{...$,items:$.items.map(H=>H.id===F.id?{...H,...F}:H)}),{previous:U}},t[12]=a,t[13]=c,t[14]=h):h=t[14];let g;t[15]!==e?(g=(F,U)=>{U.status==="done"&&oe("task_marked_done",{organization_id:e.id,task_board_item_id:U.id})},t[15]=e,t[16]=g):g=t[16];let x;t[17]!==a||t[18]!==c?(x=(F,U,$)=>{$?.previous&&a.setQueryData(c,$.previous)},t[17]=a,t[18]=c,t[19]=x):x=t[19];let j;t[20]!==f||t[21]!==s||t[22]!==a?(j=(F,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[20]=f,t[21]=s,t[22]=a,t[23]=j):j=t[23];let N;t[24]!==p||t[25]!==h||t[26]!==g||t[27]!==x||t[28]!==j?(N={mutationFn:p,onMutate:h,onSuccess:g,onError:x,onSettled:j},t[24]=p,t[25]=h,t[26]=g,t[27]=x,t[28]=j,t[29]=N):N=t[29];const y=Oe(N);let v;t[30]!==o?(v=F=>o.call("TASK_BOARD_ITEM_DELETE",{id:F}),t[30]=o,t[31]=v):v=t[31];let C;t[32]!==f||t[33]!==r?(C=F=>{de.error(F instanceof Error&&F.message?F.message:r("taskBoard.taskBoard.deleteError")),f()},t[32]=f,t[33]=r,t[34]=C):C=t[34];let k;t[35]!==f||t[36]!==v||t[37]!==C?(k={mutationFn:v,onSuccess:f,onError:C},t[35]=f,t[36]=v,t[37]=C,t[38]=k):k=t[38];const D=Oe(k);let b;t[39]!==o?(b=async F=>{const U=await Promise.allSettled(F.map($=>o.call("TASK_BOARD_ITEM_DELETE",{id:$})));return{total:F.length,failed:U.filter(Ii).length}},t[39]=o,t[40]=b):b=t[40];let w,_;t[41]!==r?(w=F=>{const{total:U,failed:$}=F;$!==0&&de.error(r("taskBoard.taskBoard.deleteBulkError",{failed:String($),total:String(U)}))},_=()=>de.error(r("taskBoard.taskBoard.deleteError")),t[41]=r,t[42]=w,t[43]=_):(w=t[42],_=t[43]);let I;t[44]!==f||t[45]!==b||t[46]!==w||t[47]!==_?(I={mutationFn:b,onSuccess:w,onError:_,onSettled:f},t[44]=f,t[45]=b,t[46]=w,t[47]=_,t[48]=I):I=t[48];const P=Oe(I);let S;t[49]!==o?(S=F=>o.call("TASK_BOARD_ITEM_UPDATE",F),t[49]=o,t[50]=S):S=t[50];let A;t[51]!==f||t[52]!==S?(A={mutationFn:S,onSuccess:f},t[51]=f,t[52]=S,t[53]=A):A=t[53];const T=Oe(A);let R;t[54]!==o?(R=F=>o.call("TASK_BOARD_ITEM_RERUN",F),t[54]=o,t[55]=R):R=t[55];let E;t[56]!==f||t[57]!==s||t[58]!==a?(E=(F,U,$)=>{f(),a.invalidateQueries({queryKey:fe.taskBoardActivity(s,$.id)})},t[56]=f,t[57]=s,t[58]=a,t[59]=E):E=t[59];let B;t[60]!==R||t[61]!==E?(B={mutationFn:R,onSettled:E},t[60]=R,t[61]=E,t[62]=B):B=t[62];const L=Oe(B);let q;return t[63]!==d||t[64]!==T||t[65]!==D||t[66]!==P||t[67]!==L||t[68]!==y?(q={create:d,update:y,remove:D,removeMany:P,link:T,rerun:L},t[63]=d,t[64]=T,t[65]=D,t[66]=P,t[67]=L,t[68]=y,t[69]=q):q=t[69],q}function Ii(t){return t.status==="rejected"}const Bi=["ended_after_delivery","superseded"];function Fi(t){return!!t&&Bi.includes(t)}function Ea(t){return!(t.action==="status_changed"&&typeof t.data?.retry=="number")}function Va(t){return t.failureKind!=="superseded"}function Es(t){return t.threads.some(e=>e.status==="requires_action")}function $a(t){return t.status==="in_review"&&!t.assigneeId}function Oa(t){return Es(t)}function La(t){return t.status==="in_progress"&&Es(t)?"text-warning animate-pulse":$s(t.status).iconClassName}function Ma(t){return t.threads.some(s=>s.status==="in_progress")?"running":t.threads.some(s=>s.status==="failed"&&!Fi(s.failureKind))?"failed":null}function Ra(t,e,s){const o=t.findIndex(u=>u.id===s),a=e===s?t[o+1]?.id??null:e,r=t.filter(u=>u.id!==s),i=a?r.findIndex(u=>u.id===a):-1,c=i===-1?r.length:i,l=r[c-1],f=r[c];return l&&f?(l.sortOrder+f.sortOrder)/2:l?l.sortOrder+1:f?f.sortOrder-1:0}function Ka(t,e){return Array.from({length:e},(s,o)=>t-(e-1-o)*1e-4)}const Pi=["archived"],Vs={triage:{labelKey:"taskBoard.config.statusBacklog",icon:yo,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:As,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:dn,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:Co,iconClassName:"text-warning"},approved:{labelKey:"taskBoard.config.statusApproved",icon:cn,iconClassName:"text-success"},merged:{labelKey:"taskBoard.config.statusMerged",icon:Xn,iconClassName:"text-primary"},post_deploy_validation:{labelKey:"taskBoard.config.statusPostDeployValidation",icon:ln,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:vo,iconClassName:"text-success"},archived:{labelKey:"taskBoard.config.statusArchived",icon:en,iconClassName:"text-muted-foreground"}},Ei={icon:As,iconClassName:"text-muted-foreground"},Vi=Vs;function $s(t){return Vi[t]??Ei}function za(t,e){const s=Vs[t];return{label:s?e(s.labelKey):t,visual:$s(t)}}const Ua=["bug","feature","chore","spike","security"],Ga={bug:{labelKey:"taskBoard.config.typeBug",icon:No,iconClassName:"text-destructive"},feature:{labelKey:"taskBoard.config.typeFeature",icon:mn,iconClassName:"text-success"},chore:{labelKey:"taskBoard.config.typeChore",icon:fn,iconClassName:"text-muted-foreground"},spike:{labelKey:"taskBoard.config.typeSpike",icon:un,iconClassName:"text-yellow-500"},security:{labelKey:"taskBoard.config.typeSecurity",icon:ko,iconClassName:"text-purple-500"}};function St(t){return go.includes(t)}function Ha(t){return Pt.filter(e=>t||!St(e))}function Qa({deliveryEnabled:t,shownLanes:e,occupied:s}){const o=Pt.filter(i=>t||!St(i)||s.includes(i)),a=o.filter(i=>Pi.includes(i)||!t&&St(i)),r=a.filter(i=>!e.includes(i));return{lanes:o.filter(i=>!r.includes(i)),hidden:r,hideable:a}}const Jt="lane:";function $i(t){return Pt.includes(t)}function qa({overId:t,statusOf:e}){if(t===void 0)return null;const s=String(t),o=s.startsWith(Jt)?s.slice(Jt.length):e(s);return o!==void 0&&$i(o)?o:null}const Oi=["none","low","medium","high","urgent"],nt={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50",icon:Kt,iconClassName:"text-muted-foreground/40"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40",icon:an,iconClassName:"text-muted-foreground"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500",icon:Kt,iconClassName:"text-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning",icon:rn,iconClassName:"text-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive",icon:on,iconClassName:"text-destructive"}};function Wa(t,e=Date.now()){const s=new Date(t).getTime();return Number.isNaN(s)?null:s<e?"overdue":s-e<=Li*864e5?"soon":null}const Li=3;function Zt(t){return`color-mix(in oklab, ${t??po} var(--user-color-strength), transparent)`}function Os(t){return t?.projects.length===1?t.projects[0]:void 0}function Mi(t){return Os(t)?t.repo:t.projects.length>1?t.projects.map(e=>e.title).join(", "):null}function Ls(t){const e=O.c(6),{entry:s}=t;let o;e[0]!==s?(o=Os(s),e[0]=s,e[1]=o):o=e[1];const a=o;if(a){let i;return e[2]!==a.icon||e[3]!==a.title?(i=n.jsx(En,{icon:a.icon,name:a.title}),e[2]=a.icon,e[3]=a.title,e[4]=i):i=e[4],i}let r;return e[5]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center",children:n.jsx(ms,{className:"size-3"})}),e[5]=r):r=e[5],r}function Ri(t){const e=O.c(14),{entry:s}=t;let o;e[0]!==s?(o=Mi(s),e[0]=s,e[1]=o):o=e[1];const a=o;let r;e[2]!==s?(r=n.jsx(Ls,{entry:s}),e[2]=s,e[3]=r):r=e[3];let i;e[4]!==s.title?(i=n.jsx("span",{className:"truncate",children:s.title}),e[4]=s.title,e[5]=i):i=e[5];let c;e[6]!==a?(c=a&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:a}),e[6]=a,e[7]=c):c=e[7];let l;e[8]!==i||e[9]!==c?(l=n.jsxs("span",{className:"flex min-w-0 flex-1 flex-col",children:[i,c]}),e[8]=i,e[9]=c,e[10]=l):l=e[10];let f;return e[11]!==r||e[12]!==l?(f=n.jsxs(n.Fragment,{children:[r,l]}),e[11]=r,e[12]=l,e[13]=f):f=e[13],f}const ut="__no_repo__";function we(t){return(t??"").trim().toLowerCase()}function Ki(t,e){const s=(t.created_at??"").localeCompare(e.created_at??"");return s!==0?s:t.id.localeCompare(e.id)}function zi(t){return t.projects.length===1?t.projects[0]?.title??t.repo??t.id:t.repo??t.id}function Ya(t,e=[]){const s=new Map,o=new Map,a=[],r=u=>{const m=we(u),d=s.get(m);if(d)return d;const p={id:m,kind:"repo",repo:u.trim(),title:u.trim(),projects:[]};return s.set(m,p),p};for(const u of t){const m=Cn(u);if(m){const p=r(m);p.projects.push(u),o.set(u.id,p);continue}const d={id:u.id,kind:"project",repo:null,title:u.title,projects:[u]};a.push(d),o.set(u.id,d)}for(const u of e){const m=(u??"").trim();m&&r(m)}for(const u of s.values())u.projects.sort(Ki),u.title=zi(u);const i=[...s.values()].filter(u=>u.projects.length>0),c=[...s.values()].filter(u=>u.projects.length===0),l=(u,m)=>u.title.localeCompare(m.title),f=[...[...i,...a].sort(l),...c.sort(l)];return{entries:f,byId:new Map(f.map(u=>[u.id,u])),byRepo:s,byProject:o}}function wt(t,e){for(const o of t.threads??[]){const a=o.virtualMcpId?e.byProject.get(o.virtualMcpId):void 0;if(a)return a}const s=we(t.repo);return(s?e.byRepo.get(s):void 0)??null}function Ui(t,e){const s=wt(t,e);if(!s)return[];if(s.projects.length<=1)return s.projects;for(const o of t.threads??[]){const a=o.virtualMcpId?s.projects.find(r=>r.id===o.virtualMcpId):void 0;if(a)return[a]}return s.projects}function Xa(t,e){const s=Ui(t,e);return s.length===1?s[0]??null:null}function Rt(t,e){return e.byId.get(t)??e.byRepo.get(we(t))??e.byProject.get(t)}function Ms(t,e,s){if(e===null)return!0;if(e===ut)return wt(t,s)===null;const o=Rt(e,s);return o?o.repo&&we(t.repo)===we(o.repo)?!0:wt(t,s)===o:e.includes("/")?we(t.repo)===we(e):!0}function ft(t,e){return t===null?!1:t===ut?!0:!!Rt(t,e)||t.includes("/")}function Ja(t,e,s){return e===null?null:Ms(t,e,s)?e:null}function Za(t){return t.entries.filter(e=>e.repo!==null&&(e.projects.length===0||e.projects.some(s=>kn(s).status!=="detached")))}const _t="__unassigned__",ze="__any__",Rs={assignee:null,priority:null,due:null,tags:[],project:null,search:""};function Gi(t,e){return t.assignee!==null||t.priority!==null||t.due!==null||t.tags.length>0||ft(t.project,e)||t.search.trim()!==""}function Hi(t,e){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)+(t.tags.length>0?1:0)+(ft(t.project,e)?1:0)+(t.search.trim()!==""?1:0)}const Qi=864e5;function qi(t,e){const s=new Date(t),o=new Date(e);return s.getFullYear()===o.getFullYear()&&s.getMonth()===o.getMonth()&&s.getDate()===o.getDate()}function Ks(t,e){const s=t.trim();return s===""?!1:e!=null&&pi(s)===e}function Wi(t,e){return t.assigneeId===e?!0:t.assigneeId===Nt&&t.assignedBy===e}function el(t,e,s){const o=e.search.trim().toLowerCase();if(o!==""&&!`${t.title} ${t.description??""}`.toLowerCase().includes(o)&&!Ks(o,t.keySeq))return!1;if(e.assignee!==null){if(e.assignee===_t){if(t.assigneeId!==null)return!1}else if(!Wi(t,e.assignee))return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const a=new Date(t.dueDate).getTime(),r=Date.now();if(e.due==="overdue"&&a>=r||e.due==="today"&&!qi(a,r)||e.due==="week"&&(a<r||a>r+7*Qi))return!1}if(e.tags.length>0){const a=t.tags.map(r=>r.id);if(!e.tags.some(r=>a.includes(r)))return!1}return!!Ms(t,e.project,s)}const es={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function _e(t,e=!1){return J("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors focus-visible:border-ring focus-visible:ring-[2px] focus-visible:ring-ring/20",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Yi(t){const e=O.c(107),{value:s,members:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Qt,{size:14,className:"shrink-0"}),e[0]=f):f=e[0];let u=f,m;e[1]!==i?(m=i("taskBoard.taskFilters.assigneeLabel"),e[1]=i,e[2]=m):m=e[2];let d=m;if(s===_t){let M;e[3]!==i?(M=i("taskBoard.taskFilters.assigneeUnassigned"),e[3]=i,e[4]=M):M=e[4],d=M}else if(s===Nt){let M;e[5]===Symbol.for("react.memo_cache_sentinel")?(M=n.jsx(Yt,{size:14}),e[5]=M):M=e[5],u=M;let K;e[6]!==i?(K=i("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=i,e[7]=K):K=e[7],d=K}else if(s){let M,K,ae,Y;if(e[8]!==o||e[9]!==s){let De;e[14]!==s?(De=Ae=>Ae.userId===s,e[14]=s,e[15]=De):De=e[15],K=o.find(De),M=Ht,ae=K?.user?.image??void 0,Y=qt(K?.user?.name),e[8]=o,e[9]=s,e[10]=M,e[11]=K,e[12]=ae,e[13]=Y}else M=e[10],K=e[11],ae=e[12],Y=e[13];let ve;e[16]!==M||e[17]!==ae||e[18]!==Y?(ve=n.jsx(M,{url:ae,fallback:Y,shape:"circle",size:"2xs"}),e[16]=M,e[17]=ae,e[18]=Y,e[19]=ve):ve=e[19],u=ve;let ue;e[20]!==K?.user?.name||e[21]!==i?(ue=K?.user?.name??i("taskBoard.taskFilters.assigneeMember"),e[20]=K?.user?.name,e[21]=i,e[22]=ue):ue=e[22],d=ue}let p;e[23]!==a?(p=M=>{a(M),l(!1)},e[23]=a,e[24]=p):p=e[24];const h=p,g=s!==null;let x;e[25]!==r||e[26]!==g?(x=_e(g,r),e[25]=r,e[26]=g,e[27]=x):x=e[27];const j=x,N=r&&"ml-auto";let y;e[28]!==N?(y=J("shrink-0 opacity-60",N),e[28]=N,e[29]=y):y=e[29];const v=y;let C;e[30]!==d?(C=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[30]=d,e[31]=C):C=e[31];let k;e[32]!==v?(k=n.jsx(Ge,{size:12,className:v}),e[32]=v,e[33]=k):k=e[33];let D;e[34]!==u||e[35]!==C||e[36]!==k||e[37]!==j?(D=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:j,children:[u,C,k]})}),e[34]=u,e[35]=C,e[36]=k,e[37]=j,e[38]=D):D=e[38];let b;e[39]!==i?(b=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=i,e[40]=b):b=e[40];let w;e[41]!==i?(w=i("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=i,e[42]=w):w=e[42];let _;e[43]!==b||e[44]!==w?(_=n.jsx(Et,{placeholder:b,"aria-label":w,className:"h-9"}),e[43]=b,e[44]=w,e[45]=_):_=e[45];let I;e[46]!==i?(I=i("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=i,e[47]=I):I=e[47];let P;e[48]!==I?(P=n.jsx(Vt,{children:I}),e[48]=I,e[49]=P):P=e[49];let S;e[50]!==i?(S=i("taskBoard.taskFilters.assigneeAnyone"),e[50]=i,e[51]=S):S=e[51];let A;e[52]!==h?(A=()=>h(null),e[52]=h,e[53]=A):A=e[53];let T;e[54]!==i?(T=i("taskBoard.taskFilters.assigneeAnyone"),e[54]=i,e[55]=T):T=e[55];let R;e[56]!==S||e[57]!==A||e[58]!==T?(R=n.jsx(Ce,{value:S,onSelect:A,children:T}),e[56]=S,e[57]=A,e[58]=T,e[59]=R):R=e[59];let E;e[60]!==i?(E=i("taskBoard.taskFilters.assigneeUnassigned"),e[60]=i,e[61]=E):E=e[61];let B;e[62]!==h?(B=()=>h(_t),e[62]=h,e[63]=B):B=e[63];let L;e[64]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(Qt,{size:16,className:"text-muted-foreground"}),e[64]=L):L=e[64];let q;e[65]!==i?(q=i("taskBoard.taskFilters.assigneeUnassigned"),e[65]=i,e[66]=q):q=e[66];let F;e[67]!==E||e[68]!==B||e[69]!==q?(F=n.jsxs(Ce,{value:E,onSelect:B,className:"gap-2",children:[L,q]}),e[67]=E,e[68]=B,e[69]=q,e[70]=F):F=e[70];let U;e[71]!==i?(U=i("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=i,e[72]=U):U=e[72];let $;e[73]!==h?($=()=>h(Nt),e[73]=h,e[74]=$):$=e[74];let H;e[75]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(Yt,{size:16}),e[75]=H):H=e[75];let z;e[76]!==i?(z=i("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=i,e[77]=z):z=e[77];let se;e[78]!==U||e[79]!==$||e[80]!==z?(se=n.jsxs(Ce,{value:U,onSelect:$,className:"gap-2",children:[H,z]}),e[78]=U,e[79]=$,e[80]=z,e[81]=se):se=e[81];let W;e[82]!==R||e[83]!==F||e[84]!==se?(W=n.jsxs(Ke,{children:[R,F,se]}),e[82]=R,e[83]=F,e[84]=se,e[85]=W):W=e[85];let ie;e[86]!==i?(ie=i("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=i,e[87]=ie):ie=e[87];let Z;if(e[88]!==o||e[89]!==h){let M;e[91]!==h?(M=K=>n.jsxs(Ce,{value:K.user?.name??K.userId,onSelect:()=>h(K.userId),className:"gap-2",children:[n.jsx(Ht,{url:K.user?.image??void 0,fallback:qt(K.user?.name),shape:"circle",size:"2xs"}),n.jsx("span",{className:"truncate",children:K.user?.name??K.userId})]},K.userId),e[91]=h,e[92]=M):M=e[92],Z=o.map(M),e[88]=o,e[89]=h,e[90]=Z}else Z=e[90];let ee;e[93]!==ie||e[94]!==Z?(ee=n.jsx(Ke,{heading:ie,children:Z}),e[93]=ie,e[94]=Z,e[95]=ee):ee=e[95];let te;e[96]!==P||e[97]!==W||e[98]!==ee?(te=n.jsxs($t,{children:[P,W,ee]}),e[96]=P,e[97]=W,e[98]=ee,e[99]=te):te=e[99];let ne;e[100]!==_||e[101]!==te?(ne=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[_,te]})}),e[100]=_,e[101]=te,e[102]=ne):ne=e[102];let re;return e[103]!==c||e[104]!==D||e[105]!==ne?(re=n.jsxs(ct,{open:c,onOpenChange:l,children:[D,ne]}),e[103]=c,e[104]=D,e[105]=ne,e[106]=re):re=e[106],re}function Xi(t){const e=O.c(33),{value:s,onChange:o,block:a}=t,r=Q(),i=s!==null;let c;e[0]!==a||e[1]!==i?(c=_e(i,a),e[0]=a,e[1]=i,e[2]=c):c=e[2];const l=c,f=a&&"ml-auto";let u;e[3]!==f?(u=J("shrink-0 opacity-60",f),e[3]=f,e[4]=u):u=e[4];const m=u;let d;e[5]!==s?(d=s?n.jsx("span",{className:J("size-2 shrink-0 rounded-full",nt[s].dotClassName)}):n.jsx(jo,{size:14,className:"shrink-0"}),e[5]=s,e[6]=d):d=e[6];let p;e[7]!==r||e[8]!==s?(p=r(s?nt[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=r,e[8]=s,e[9]=p):p=e[9];let h;e[10]!==m?(h=n.jsx(Ge,{size:12,className:m}),e[10]=m,e[11]=h):h=e[11];let g;e[12]!==d||e[13]!==p||e[14]!==h||e[15]!==l?(g=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:l,children:[d,p,h]})}),e[12]=d,e[13]=p,e[14]=h,e[15]=l,e[16]=g):g=e[16];const x=s??ze;let j;e[17]!==o?(j=D=>o(D===ze?null:D),e[17]=o,e[18]=j):j=e[18];let N;e[19]!==r?(N=r("taskBoard.taskFilters.priorityAnyPriority"),e[19]=r,e[20]=N):N=e[20];let y;e[21]!==N?(y=n.jsx(rt,{value:ze,children:N}),e[21]=N,e[22]=y):y=e[22];let v;e[23]!==r?(v=Oi.map(D=>n.jsxs(rt,{value:D,className:"gap-2",children:[n.jsx("span",{className:J("size-2 rounded-full",nt[D].dotClassName)}),r(nt[D].labelKey)]},D)),e[23]=r,e[24]=v):v=e[24];let C;e[25]!==j||e[26]!==y||e[27]!==v||e[28]!==x?(C=n.jsx(ws,{align:"start",className:"w-40",children:n.jsxs(_s,{value:x,onValueChange:j,children:[y,v]})}),e[25]=j,e[26]=y,e[27]=v,e[28]=x,e[29]=C):C=e[29];let k;return e[30]!==C||e[31]!==g?(k=n.jsxs(Ds,{children:[g,C]}),e[30]=C,e[31]=g,e[32]=k):k=e[32],k}function Ji(t){const e=O.c(35),{value:s,onChange:o,block:a}=t,r=Q();let i;e[0]!==r||e[1]!==s?(i=s?r(es[s]):void 0,e[0]=r,e[1]=s,e[2]=i):i=e[2];const c=i,l=s!==null;let f;e[3]!==a||e[4]!==l?(f=_e(l,a),e[3]=a,e[4]=l,e[5]=f):f=e[5];const u=f,m=a&&"ml-auto";let d;e[6]!==m?(d=J("shrink-0 opacity-60",m),e[6]=m,e[7]=d):d=e[7];const p=d;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx(bt,{size:14,className:"shrink-0"}),e[8]=h):h=e[8];let g;e[9]!==c||e[10]!==r?(g=c??r("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=r,e[11]=g):g=e[11];let x;e[12]!==p?(x=n.jsx(Ge,{size:12,className:p}),e[12]=p,e[13]=x):x=e[13];let j;e[14]!==g||e[15]!==x||e[16]!==u?(j=n.jsx(Ss,{asChild:!0,children:n.jsxs("button",{type:"button",className:u,children:[h,g,x]})}),e[14]=g,e[15]=x,e[16]=u,e[17]=j):j=e[17];const N=s??ze;let y;e[18]!==o?(y=_=>o(_===ze?null:_),e[18]=o,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(bt,{size:16,className:"text-muted-foreground"}),e[20]=v):v=e[20];let C;e[21]!==r?(C=r("taskBoard.taskFilters.dueDateAnyTime"),e[21]=r,e[22]=C):C=e[22];let k;e[23]!==C?(k=n.jsxs(rt,{value:ze,className:"gap-2",children:[v,C]}),e[23]=C,e[24]=k):k=e[24];let D;e[25]!==r?(D=Object.entries(es).map(_=>{const[I,P]=_,S=I==="overdue";return n.jsxs(rt,{value:I,className:J("gap-2",S&&"text-destructive"),children:[n.jsx(bt,{size:16,className:J("shrink-0",S?"text-destructive":"text-muted-foreground")}),r(P)]},I)}),e[25]=r,e[26]=D):D=e[26];let b;e[27]!==N||e[28]!==y||e[29]!==k||e[30]!==D?(b=n.jsx(ws,{align:"start",className:"w-44",children:n.jsxs(_s,{value:N,onValueChange:y,children:[k,D]})}),e[27]=N,e[28]=y,e[29]=k,e[30]=D,e[31]=b):b=e[31];let w;return e[32]!==b||e[33]!==j?(w=n.jsxs(Ds,{children:[j,b]}),e[32]=b,e[33]=j,e[34]=w):w=e[34],w}function Zi(t){const e=O.c(56),{value:s,tags:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f;e[0]!==a||e[1]!==s?(f=E=>a(s.includes(E)?s.filter(B=>B!==E):[...s,E]),e[0]=a,e[1]=s,e[2]=f):f=e[2];const u=f;let m;e[3]!==i||e[4]!==o||e[5]!==s[0]||e[6]!==s.length?(m=s.length===0?i("taskBoard.taskFilters.tagsLabel"):s.length===1?o.find(E=>E.id===s[0])?.name??i("taskBoard.taskFilters.tagsLabel"):i("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=i,e[4]=o,e[5]=s[0],e[6]=s.length,e[7]=m):m=e[7];const d=m,p=s.length>0;let h;e[8]!==r||e[9]!==p?(h=_e(p,r),e[8]=r,e[9]=p,e[10]=h):h=e[10];const g=h,x=r&&"ml-auto";let j;e[11]!==x?(j=J("shrink-0 opacity-60",x),e[11]=x,e[12]=j):j=e[12];const N=j;let y;e[13]!==o||e[14]!==s[0]||e[15]!==s.length?(y=s.length===1?n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(o.find(E=>E.id===s[0])?.color)}}):n.jsx(pn,{size:14,className:"shrink-0"}),e[13]=o,e[14]=s[0],e[15]=s.length,e[16]=y):y=e[16];let v;e[17]!==d?(v=n.jsx("span",{className:"max-w-[10rem] truncate",children:d}),e[17]=d,e[18]=v):v=e[18];let C;e[19]!==N?(C=n.jsx(Ge,{size:12,className:N}),e[19]=N,e[20]=C):C=e[20];let k;e[21]!==y||e[22]!==v||e[23]!==C||e[24]!==g?(k=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:g,children:[y,v,C]})}),e[21]=y,e[22]=v,e[23]=C,e[24]=g,e[25]=k):k=e[25];let D;e[26]!==i?(D=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=i,e[27]=D):D=e[27];let b;e[28]!==i?(b=i("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=i,e[29]=b):b=e[29];let w;e[30]!==D||e[31]!==b?(w=n.jsx(Et,{placeholder:D,"aria-label":b,className:"h-9"}),e[30]=D,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==i?(_=i("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=i,e[34]=_):_=e[34];let I;e[35]!==_?(I=n.jsx(Vt,{children:_}),e[35]=_,e[36]=I):I=e[36];let P;if(e[37]!==o||e[38]!==u||e[39]!==s){let E;e[41]!==u||e[42]!==s?(E=B=>n.jsxs(Ce,{value:B.name,onSelect:()=>u(B.id),className:"gap-2",children:[n.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Zt(B.color)}}),n.jsx("span",{className:"flex-1 truncate",children:B.name}),s.includes(B.id)&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"})]},B.id),e[41]=u,e[42]=s,e[43]=E):E=e[43],P=o.map(E),e[37]=o,e[38]=u,e[39]=s,e[40]=P}else P=e[40];let S;e[44]!==P?(S=n.jsx(Ke,{children:P}),e[44]=P,e[45]=S):S=e[45];let A;e[46]!==I||e[47]!==S?(A=n.jsxs($t,{children:[I,S]}),e[46]=I,e[47]=S,e[48]=A):A=e[48];let T;e[49]!==w||e[50]!==A?(T=n.jsx(dt,{align:"start",className:"w-56 p-0",children:n.jsxs(Ot,{children:[w,A]})}),e[49]=w,e[50]=A,e[51]=T):T=e[51];let R;return e[52]!==c||e[53]!==k||e[54]!==T?(R=n.jsxs(ct,{open:c,onOpenChange:l,children:[k,T]}),e[52]=c,e[53]=k,e[54]=T,e[55]=R):R=e[55],R}function ts(t){const e=O.c(11),{entry:s,selected:o,onSelect:a}=t,r=s.id,i=s.title;let c;e[0]!==s.projects?(c=s.projects.map(er).join(" "),e[0]=s.projects,e[1]=c):c=e[1];const l=`${r} ${i} ${s.repo??""} ${c}`;let f;e[2]!==s?(f=n.jsx(Ri,{entry:s}),e[2]=s,e[3]=f):f=e[3];let u;e[4]!==o?(u=o&&n.jsx(qe,{size:14,className:"shrink-0 text-foreground"}),e[4]=o,e[5]=u):u=e[5];let m;return e[6]!==a||e[7]!==l||e[8]!==f||e[9]!==u?(m=n.jsxs(Ce,{value:l,onSelect:a,className:"gap-2",children:[f,u]}),e[6]=a,e[7]=l,e[8]=f,e[9]=u,e[10]=m):m=e[10],m}function er(t){return t.title}function tr(t,e,s,o){return t===null||!s?o("taskBoard.taskFilters.projectLabel"):t===ut?o("taskBoard.taskFilters.projectNone"):e?.title??t}function sr(t){const e=O.c(90),{value:s,index:o,onChange:a,block:r}=t,i=Q(),[c,l]=G.useState(!1);let f,u,m,d,p,h,g,x,j,N,y,v,C,k;if(e[0]!==r||e[1]!==o||e[2]!==a||e[3]!==c||e[4]!==i||e[5]!==s){const I=s===null?void 0:Rt(s,o),P=ft(s,o),S=tr(s,I,P,i);let A;e[20]!==a?(A=Y=>{a(Y),l(!1)},e[20]=a,e[21]=A):A=e[21];const T=A,R=o.entries.filter(or),E=o.entries.filter(nr),B=_e(P,r),L=r&&"ml-auto";let q;e[22]!==L?(q=J("shrink-0 opacity-60",L),e[22]=L,e[23]=q):q=e[23];const F=q;d=ct,C=c,k=l;const U=P?I:void 0;let $;e[24]!==U?($=n.jsx(Ls,{entry:U}),e[24]=U,e[25]=$):$=e[25];let H;e[26]!==S?(H=n.jsx("span",{className:"max-w-[12rem] truncate",children:S}),e[26]=S,e[27]=H):H=e[27];let z;e[28]!==F?(z=n.jsx(Ge,{size:12,className:F}),e[28]=F,e[29]=z):z=e[29],e[30]!==$||e[31]!==H||e[32]!==z||e[33]!==B?(h=n.jsx(Ue,{asChild:!0,children:n.jsxs("button",{type:"button",className:B,children:[$,H,z]})}),e[30]=$,e[31]=H,e[32]=z,e[33]=B,e[34]=h):h=e[34],m=dt,y="start",v="w-72 p-0",u=Ot;let se;e[35]!==i?(se=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[35]=i,e[36]=se):se=e[36];let W;e[37]!==i?(W=i("taskBoard.taskFilters.projectFilterPlaceholder"),e[37]=i,e[38]=W):W=e[38],e[39]!==se||e[40]!==W?(N=n.jsx(Et,{placeholder:se,"aria-label":W,className:"h-9"}),e[39]=se,e[40]=W,e[41]=N):N=e[41],f=$t;let ie;e[42]!==i?(ie=i("taskBoard.taskFilters.projectNoneFound"),e[42]=i,e[43]=ie):ie=e[43],e[44]!==ie?(p=n.jsx(Vt,{children:ie}),e[44]=ie,e[45]=p):p=e[45];let Z;e[46]!==i?(Z=i("taskBoard.taskFilters.projectAny"),e[46]=i,e[47]=Z):Z=e[47];let ee;e[48]!==T?(ee=()=>T(null),e[48]=T,e[49]=ee):ee=e[49];let te;e[50]!==i?(te=i("taskBoard.taskFilters.projectAny"),e[50]=i,e[51]=te):te=e[51];let ne;e[52]!==Z||e[53]!==ee||e[54]!==te?(ne=n.jsx(Ce,{value:Z,onSelect:ee,children:te}),e[52]=Z,e[53]=ee,e[54]=te,e[55]=ne):ne=e[55];let re;e[56]!==i?(re=i("taskBoard.taskFilters.projectNone"),e[56]=i,e[57]=re):re=e[57];let M;e[58]!==T?(M=()=>T(ut),e[58]=T,e[59]=M):M=e[59];let K;e[60]!==i?(K=i("taskBoard.taskFilters.projectNone"),e[60]=i,e[61]=K):K=e[61];let ae;e[62]!==re||e[63]!==M||e[64]!==K?(ae=n.jsx(Ce,{value:re,onSelect:M,children:K}),e[62]=re,e[63]=M,e[64]=K,e[65]=ae):ae=e[65],e[66]!==ne||e[67]!==ae?(g=n.jsxs(Ke,{children:[ne,ae]}),e[66]=ne,e[67]=ae,e[68]=g):g=e[68],x=R.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupProjects"),children:R.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),j=E.length>0&&n.jsx(Ke,{heading:i("taskBoard.taskFilters.projectGroupRepos"),children:E.map(Y=>n.jsx(ts,{entry:Y,selected:I===Y,onSelect:()=>T(Y.id)},Y.id))}),e[0]=r,e[1]=o,e[2]=a,e[3]=c,e[4]=i,e[5]=s,e[6]=f,e[7]=u,e[8]=m,e[9]=d,e[10]=p,e[11]=h,e[12]=g,e[13]=x,e[14]=j,e[15]=N,e[16]=y,e[17]=v,e[18]=C,e[19]=k}else f=e[6],u=e[7],m=e[8],d=e[9],p=e[10],h=e[11],g=e[12],x=e[13],j=e[14],N=e[15],y=e[16],v=e[17],C=e[18],k=e[19];let D;e[69]!==f||e[70]!==p||e[71]!==g||e[72]!==x||e[73]!==j?(D=n.jsxs(f,{children:[p,g,x,j]}),e[69]=f,e[70]=p,e[71]=g,e[72]=x,e[73]=j,e[74]=D):D=e[74];let b;e[75]!==u||e[76]!==D||e[77]!==N?(b=n.jsxs(u,{children:[N,D]}),e[75]=u,e[76]=D,e[77]=N,e[78]=b):b=e[78];let w;e[79]!==m||e[80]!==b||e[81]!==y||e[82]!==v?(w=n.jsx(m,{align:y,className:v,children:b}),e[79]=m,e[80]=b,e[81]=y,e[82]=v,e[83]=w):w=e[83];let _;return e[84]!==d||e[85]!==h||e[86]!==w||e[87]!==C||e[88]!==k?(_=n.jsxs(d,{open:C,onOpenChange:k,children:[h,w]}),e[84]=d,e[85]=h,e[86]=w,e[87]=C,e[88]=k,e[89]=_):_=e[89],_}function nr(t){return t.projects.length===0}function or(t){return t.projects.length>0}function ir(t){const e=O.c(25),{value:s,onChange:o,block:a}=t,r=Q(),[i,c]=G.useState(s!==""),[l,f]=G.useState(!1),[u,m]=G.useState(s);s!==u&&(m(s),s===""&&!l&&c(!1));const d=i||a,p=d?"w-32 sm:w-44":"w-8 px-0 justify-center",h=a&&"h-10 w-full px-3 text-sm sm:w-full";let g;e[0]!==p||e[1]!==h?(g=J("inline-flex h-8 shrink-0 items-center gap-1.5 overflow-hidden rounded-lg border border-border px-2.5 text-xs text-foreground transition-all duration-200 ease-out",p,h),e[0]=p,e[1]=h,e[2]=g):g=e[2];let x;e[3]!==r?(x=r("taskBoard.taskFilters.searchLabel"),e[3]=r,e[4]=x):x=e[4];let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=()=>c(!0),e[5]=j):j=e[5];let N;e[6]===Symbol.for("react.memo_cache_sentinel")?(N=n.jsx(gn,{size:14}),e[6]=N):N=e[6];let y;e[7]!==x?(y=n.jsx("button",{type:"button","aria-label":x,onClick:j,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:N}),e[7]=x,e[8]=y):y=e[8];let v;e[9]!==a||e[10]!==d||e[11]!==o||e[12]!==r||e[13]!==s?(v=d&&n.jsx("input",{autoFocus:!a,value:s,onChange:D=>o(D.target.value),onFocus:()=>f(!0),onBlur:()=>{f(!1),s===""&&c(!1)},placeholder:r("taskBoard.taskFilters.searchPlaceholder"),"aria-label":r("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=a,e[10]=d,e[11]=o,e[12]=r,e[13]=s,e[14]=v):v=e[14];let C;e[15]!==a||e[16]!==o||e[17]!==r||e[18]!==s?(C=s!==""&&n.jsx("button",{type:"button","aria-label":r("taskBoard.taskFilters.searchClearLabel"),onMouseDown:rr,onClick:()=>{o(""),a||c(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:n.jsx(tn,{size:14})}),e[15]=a,e[16]=o,e[17]=r,e[18]=s,e[19]=C):C=e[19];let k;return e[20]!==g||e[21]!==y||e[22]!==v||e[23]!==C?(k=n.jsxs("div",{className:g,children:[y,v,C]}),e[20]=g,e[21]=y,e[22]=v,e[23]=C,e[24]=k):k=e[24],k}function rr(t){return t.preventDefault()}function ar(t){const e=O.c(20),{block:s,onClick:o}=t,a=Q();let r;e[0]!==a?(r=a("taskBoard.taskFilters.boardSettingsLabel"),e[0]=a,e[1]=r):r=e[1];const i=r;let c;e[2]!==s?(c=J(_e(!1,s),s?"h-10 w-full":"w-8 justify-center px-0"),e[2]=s,e[3]=c):c=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(bo,{size:14,className:"shrink-0"}),e[4]=l):l=e[4];let f;e[5]!==s||e[6]!==i?(f=s&&n.jsx("span",{children:i}),e[5]=s,e[6]=i,e[7]=f):f=e[7];let u;e[8]!==i||e[9]!==o||e[10]!==c||e[11]!==f?(u=n.jsxs("button",{type:"button",onClick:o,"aria-label":i,className:c,children:[l,f]}),e[8]=i,e[9]=o,e[10]=c,e[11]=f,e[12]=u):u=e[12];const m=u;if(s)return m;let d;e[13]!==m?(d=n.jsx(Le,{asChild:!0,children:m}),e[13]=m,e[14]=d):d=e[14];let p;e[15]!==i?(p=n.jsx(Me,{side:"top",children:i}),e[15]=i,e[16]=p):p=e[16];let h;return e[17]!==d||e[18]!==p?(h=n.jsxs(Re,{children:[d,p]}),e[17]=d,e[18]=p,e[19]=h):h=e[19],h}function zs(t){const e=O.c(53),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c,block:l}=t;let f;e[0]!==s||e[1]!==i?(f=k=>i({...s,search:k}),e[0]=s,e[1]=i,e[2]=f):f=e[2];let u;e[3]!==l||e[4]!==s.search||e[5]!==f?(u=n.jsx(ir,{block:l,value:s.search,onChange:f}),e[3]=l,e[4]=s.search,e[5]=f,e[6]=u):u=e[6];let m;e[7]!==s||e[8]!==i?(m=k=>i({...s,assignee:k}),e[7]=s,e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l||e[11]!==s.assignee||e[12]!==o||e[13]!==m?(d=n.jsx(Yi,{block:l,value:s.assignee,members:o,onChange:m}),e[10]=l,e[11]=s.assignee,e[12]=o,e[13]=m,e[14]=d):d=e[14];let p;e[15]!==s||e[16]!==i?(p=k=>i({...s,priority:k}),e[15]=s,e[16]=i,e[17]=p):p=e[17];let h;e[18]!==l||e[19]!==s.priority||e[20]!==p?(h=n.jsx(Xi,{block:l,value:s.priority,onChange:p}),e[18]=l,e[19]=s.priority,e[20]=p,e[21]=h):h=e[21];let g;e[22]!==s||e[23]!==i?(g=k=>i({...s,due:k}),e[22]=s,e[23]=i,e[24]=g):g=e[24];let x;e[25]!==l||e[26]!==s.due||e[27]!==g?(x=n.jsx(Ji,{block:l,value:s.due,onChange:g}),e[25]=l,e[26]=s.due,e[27]=g,e[28]=x):x=e[28];let j;e[29]!==s||e[30]!==i?(j=k=>i({...s,tags:k}),e[29]=s,e[30]=i,e[31]=j):j=e[31];let N;e[32]!==l||e[33]!==s.tags||e[34]!==j||e[35]!==a?(N=n.jsx(Zi,{block:l,value:s.tags,tags:a,onChange:j}),e[32]=l,e[33]=s.tags,e[34]=j,e[35]=a,e[36]=N):N=e[36];let y;e[37]!==l||e[38]!==s||e[39]!==r||e[40]!==i?(y=(r.entries.length>0||ft(s.project,r))&&n.jsx(sr,{block:l,value:s.project,index:r,onChange:k=>i({...s,project:k})}),e[37]=l,e[38]=s,e[39]=r,e[40]=i,e[41]=y):y=e[41];let v;e[42]!==l||e[43]!==c?(v=n.jsx(ar,{block:l,onClick:c}),e[42]=l,e[43]=c,e[44]=v):v=e[44];let C;return e[45]!==N||e[46]!==y||e[47]!==v||e[48]!==u||e[49]!==d||e[50]!==h||e[51]!==x?(C=n.jsxs(n.Fragment,{children:[u,d,h,x,N,y,v]}),e[45]=N,e[46]=y,e[47]=v,e[48]=u,e[49]=d,e[50]=h,e[51]=x,e[52]=C):C=e[52],C}function tl(t){const e=O.c(16),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=n.jsx(Ns,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=f):f=e[0];let u;e[1]!==s||e[2]!==r||e[3]!==o||e[4]!==i||e[5]!==c||e[6]!==a?(u=n.jsx(zs,{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}),e[1]=s,e[2]=r,e[3]=o,e[4]=i,e[5]=c,e[6]=a,e[7]=u):u=e[7];let m;e[8]!==s||e[9]!==r||e[10]!==i||e[11]!==l?(m=Gi(s,r)&&n.jsx("button",{type:"button",onClick:()=>i(Rs),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[8]=s,e[9]=r,e[10]=i,e[11]=l,e[12]=m):m=e[12];let d;return e[13]!==u||e[14]!==m?(d=n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[f,u,m]}),e[13]=u,e[14]=m,e[15]=d):d=e[15],d}function sl(t){const e=O.c(41),{filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c}=t,l=Q(),[f,u]=G.useState(!1),m=Hi(s,r),d=m>0;let p;e[0]!==d?(p=_e(d),e[0]=d,e[1]=p):p=e[1];const h=p;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(Ns,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let x;e[3]!==l?(x=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=x):x=e[4];let j;e[5]!==m?(j=m>0&&n.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:m}),e[5]=m,e[6]=j):j=e[6];let N;e[7]!==x||e[8]!==j||e[9]!==h?(N=n.jsx(An,{asChild:!0,children:n.jsxs("button",{type:"button",className:h,children:[g,x,j]})}),e[7]=x,e[8]=j,e[9]=h,e[10]=N):N=e[10];let y;e[11]!==l?(y=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=y):y=e[12];let v;e[13]!==y?(v=n.jsx(Ft,{className:"px-4 pt-4 text-base font-medium text-foreground",children:y}),e[13]=y,e[14]=v):v=e[14];let C;e[15]!==s||e[16]!==r||e[17]!==o||e[18]!==i||e[19]!==c||e[20]!==a?(C=n.jsx("div",{className:"flex flex-col gap-2 p-4",children:n.jsx(zs,{block:!0,filters:s,members:o,tags:a,index:r,onChange:i,onOpenBoardSettings:c})}),e[15]=s,e[16]=r,e[17]=o,e[18]=i,e[19]=c,e[20]=a,e[21]=C):C=e[21];let k;e[22]!==m||e[23]!==i||e[24]!==l?(k=m>0&&n.jsx(ye,{variant:"outline",className:"flex-1",onClick:()=>i(Rs),children:l("taskBoard.taskFilters.clearAllButton")}),e[22]=m,e[23]=i,e[24]=l,e[25]=k):k=e[25];let D;e[26]!==l?(D=l("taskBoard.taskFilters.doneButton"),e[26]=l,e[27]=D):D=e[27];let b;e[28]!==D?(b=n.jsx(us,{asChild:!0,children:n.jsx(ye,{className:"flex-1",children:D})}),e[28]=D,e[29]=b):b=e[29];let w;e[30]!==k||e[31]!==b?(w=n.jsxs(fs,{className:"flex-row gap-2",children:[k,b]}),e[30]=k,e[31]=b,e[32]=w):w=e[32];let _;e[33]!==w||e[34]!==v||e[35]!==C?(_=n.jsxs(Bt,{className:"p-0",children:[v,C,w]}),e[33]=w,e[34]=v,e[35]=C,e[36]=_):_=e[36];let I;return e[37]!==f||e[38]!==_||e[39]!==N?(I=n.jsxs(It,{open:f,onOpenChange:u,direction:"bottom",children:[N,_]}),e[37]=f,e[38]=_,e[39]=N,e[40]=I):I=e[40],I}function nl(t,e){return fi(t,e.keySeq)??e.id}function ol(t,e){const s=e?.trim();if(s)return t.find(o=>Ks(s,o.keySeq))??t.find(o=>o.id===s)}export{Ea as $,ha as A,wo as B,Aa as C,_a as D,Da as E,wa as F,Fs as G,Lt as H,Ti as I,wt as J,Xa as K,za as L,nt as M,Rt as N,Pa as O,hi as P,Oi as Q,Ua as R,Yt as S,Ga as T,Zt as U,Za as V,La as W,$s as X,Ha as Y,Ls as Z,Ri as _,Ta as a,Va as a0,Fi as a1,Vs as a2,Fa as a3,ol as a4,sl as a5,tl as a6,Ka as a7,Qa as a8,Rs as a9,Ma as aa,Oa as ab,Jt as ac,Ra as ad,qa as ae,el as af,Pi as ag,Ja as ah,Wa as ai,_i as aj,Wo as ak,ga as al,Ba as b,Ya as c,Ui as d,Bs as e,nl as f,$a as g,Ai as h,Es as i,ma as j,pa as k,ja as l,ya as m,Na as n,yi as o,bi as p,Ia as q,ba as r,va as s,fi as t,xa as u,ka as v,Sa as w,Ca as x,Ci as y,_o as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as N,r as J,j as a,l as W,B as H,W as U,a7 as z,K as G,m as V,n as te,e as se,b as K,b4 as ie,t as q,dq as Z,dr as Q,dp as re,P as X,ds as fe,p as ue}from"./index-DIoG5Nzm.js";import{I as ee}from"./input-B3ER89GU.js";import{i as oe}from"./Check-CRib0DYD.js";import{i as ce}from"./ChevronSelectorVertical-CtALiTfe.js";import{s as ge}from"./Plus-DuAHW1Gi.js";import{s as pe}from"./Trash01-CeiHA_Cf.js";import{a as xe,c as je,d as he,e as be,b as ye,C as Se}from"./command-DeVA58FJ.js";import{a as ve,P as Ne,b as Te}from"./popover-CMt7ScML.js";import{S as we}from"./switch-DN6L7pZ8.js";import{T as de}from"./textarea-BbMVdhTn.js";import{c as _e,d as Ce,b as Pe,f as Ae,g as ke,e as Ie,a as Re,A as Ee}from"./alert-dialog-DD8gmLEV.js";import{R as Oe,A as $e}from"./review-settings-hu-gYYYY.js";import{f as De}from"./task-board-k97eyP2H.js";import{R as Be}from"./require-capability-D-jq44dD.js";import"./index-9xpznWaq.js";import"./dialog-BIFznZm3.js";import"./SearchMd-DwtkgExc.js";import"./UserSquare-BKKMbWcC.js";import"./GitBranch01-CaAHRAAs.js";import"./use-organization-settings-DenVKwFP.js";import"./constants-DNuUCxmW.js";import"./schema-Dk7DmR5a.js";import"./access-gate-Cq4IMSa2.js";import"./capability-load-error-DIIALIs2.js";function Fe(t){const e=N.c(41),{options:n,value:s,onChange:i,placeholder:l,triggerClassName:r,contentClassName:o,width:u,renderTrigger:f,renderItem:d,emptyMessage:c,searchPlaceholder:m,filter:g}=t,p=l===void 0?"Select...":l,b=u===void 0?"w-[200px]":u,j=c===void 0?"No results found.":c,x=m===void 0?"Search...":m;let h;e[0]!==s?(h=L=>L.value===s,e[0]=s,e[1]=h):h=e[1];const y=n.find(h),[S,v]=J.useState(!1),T=Ne,w=ve,P=!0,_=f?a.jsx("div",{className:W("cursor-pointer",r),children:f(y)}):a.jsxs(H,{variant:"outline",role:"combobox",className:W("justify-between",b,r),children:[y?y.label:p,a.jsx(ce,{className:"opacity-50"})]});let C;e[2]!==w||e[3]!==_?(C=a.jsx(w,{asChild:P,children:_}),e[2]=w,e[3]=_,e[4]=C):C=e[4];let A;e[5]!==o?(A=W("p-0",o),e[5]=o,e[6]=A):A=e[6];let D;e[7]===Symbol.for("react.memo_cache_sentinel")?(D={width:"var(--radix-popover-trigger-width)"},e[7]=D):D=e[7];let B;e[8]!==x?(B=a.jsx(xe,{placeholder:x,className:"h-9"}),e[8]=x,e[9]=B):B=e[9];let I;e[10]!==j?(I=a.jsx(je,{children:j}),e[10]=j,e[11]=I):I=e[11];let R;if(e[12]!==i||e[13]!==n||e[14]!==d||e[15]!==v||e[16]!==s){let L;e[18]!==i||e[19]!==d||e[20]!==v||e[21]!==s?(L=k=>{const ne=s===k.value;return a.jsx(he,{value:k.label,onSelect:()=>{i(k.value===s?"":k.value),v(!1)},children:d?d(k,ne):a.jsxs(a.Fragment,{children:[k.label,a.jsx(oe,{className:W("ml-auto",ne?"opacity-100":"opacity-0")})]})},k.value)},e[18]=i,e[19]=d,e[20]=v,e[21]=s,e[22]=L):L=e[22],R=n.map(L),e[12]=i,e[13]=n,e[14]=d,e[15]=v,e[16]=s,e[17]=R}else R=e[17];let E;e[23]!==R?(E=a.jsx(be,{children:R}),e[23]=R,e[24]=E):E=e[24];let M;e[25]!==I||e[26]!==E?(M=a.jsxs(ye,{children:[I,E]}),e[25]=I,e[26]=E,e[27]=M):M=e[27];let O;e[28]!==g||e[29]!==B||e[30]!==M?(O=a.jsxs(Se,{filter:g,children:[B,M]}),e[28]=g,e[29]=B,e[30]=M,e[31]=O):O=e[31];let $;e[32]!==O||e[33]!==A?($=a.jsx(Te,{className:A,style:D,children:O}),e[32]=O,e[33]=A,e[34]=$):$=e[34];let F;return e[35]!==T||e[36]!==S||e[37]!==v||e[38]!==$||e[39]!==C?(F=a.jsxs(T,{open:S,onOpenChange:v,children:[C,$]}),e[35]=T,e[36]=S,e[37]=v,e[38]=$,e[39]=C,e[40]=F):F=e[40],F}function Le(t){const e=N.c(4),{size:n,className:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=i):i=e[0];let l;return e[1]!==s||e[2]!==n?(l=a.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:s,children:i}),e[1]=s,e[2]=n,e[3]=l):l=e[3],l}function me(t){const e=t.projectName?.replace(/\s+/g," ").trim(),n=t.name.trim();return e?{primary:e,secondary:[n,t.projectKey].filter(Boolean).join(" · ")}:{primary:n,secondary:t.projectKey??""}}function qe(t){const{primary:e,secondary:n}=me(t);return[e,n,`#${t.id}`].filter(Boolean).join(" ")}function ae(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}function Ke(t,e){const n=ae(e).trim();if(!n)return 1;const s=ae(t);return n.split(/\s+/).every(i=>s.includes(i))?1:0}function Me(){const t=N.c(7),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.jiraIntegration(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=n,t[3]=i):i=t[3];let l;return t[4]!==s||t[5]!==i?(l={queryKey:s,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],V(l)}function le(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>(await n.call("JIRA_INTEGRATION_UPSERT",o)).integration,t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Je(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=()=>n.call("JIRA_INTEGRATION_DELETE",{}),t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Ue(t){const e=N.c(8),{org:n}=U(),s=z();let i;e[0]!==n.id?(i=G.jiraBoards(n.id),e[0]=n.id,e[1]=i):i=e[1];let l;e[2]!==s?(l=async()=>(await s.call("JIRA_BOARDS_LIST",{})).boards,e[2]=s,e[3]=l):l=e[3];let r;return e[4]!==t||e[5]!==i||e[6]!==l?(r={queryKey:i,enabled:t,staleTime:6e4,queryFn:l},e[4]=t,e[5]=i,e[6]=l,e[7]=r):r=e[7],V(r)}function ze(t){const e=N.c(10),{org:n}=U(),s=z();let i;e[0]!==t||e[1]!==n.id?(i=G.jiraBoardColumns(n.id,t),e[0]=t,e[1]=n.id,e[2]=i):i=e[2];const l=t!==null;let r;e[3]!==t||e[4]!==s?(r=async()=>(await s.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=s,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==l||e[8]!==r?(o={queryKey:i,enabled:l,staleTime:6e4,queryFn:r},e[6]=i,e[7]=l,e[8]=r,e[9]=o):o=e[9],V(o)}function Ge(){const t=N.c(7),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.jiraAutomations(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=n,t[3]=i):i=t[3];let l;return t[4]!==s||t[5]!==i?(l={queryKey:s,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],V(l)}function He(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>{if(o.prompt===null){await n.call("JIRA_AUTOMATION_DELETE",{jiraStatus:o.jiraStatus});return}await n.call("JIRA_AUTOMATION_UPSERT",{jiraStatus:o.jiraStatus,prompt:o.prompt.trim()===""?void 0:o.prompt})},t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraAutomations(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Qe(){const t=N.c(12),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=n,t[3]=i):i=t[3];let l;t[4]!==s||t[5]!==i?(l={queryKey:s,staleTime:6e4,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6];const r=V(l);let o;t[7]!==r.data?(o=r.data?.find(We)?.prompt??"",t[7]=r.data,t[8]=o):o=t[8];let u;return t[9]!==r.isPending||t[10]!==o?(u={prompt:o,isPending:r.isPending},t[9]=r.isPending,t[10]=o,t[11]=u):u=t[11],u}function We(t){return t.columnKey===null}function Ve(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>{const u=o.trim();if(!u){await n.call("TASK_BOARD_PROMPT_DELETE",{});return}await n.call("TASK_BOARD_PROMPT_UPSERT",{prompt:u})},t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Ye(){const t=N.c(16),e=K(),{prompt:n,isPending:s}=Qe(),i=Ve(),[l,r]=J.useState(n),[o,u]=J.useState(n);o!==n&&(u(n),r(n));let f;t[0]!==e?(f=e("settings.taskPrompt.title"),t[0]=e,t[1]=f):f=t[1];let d;t[2]!==e?(d=e("settings.taskPrompt.fieldLabel"),t[2]=e,t[3]=d):d=t[3];let c;t[4]!==l||t[5]!==s||t[6]!==n||t[7]!==i||t[8]!==e?(c=s?a.jsx(ie,{className:"h-44 w-full"}):a.jsxs("div",{className:"flex flex-col items-start gap-2",children:[a.jsx(de,{value:l,rows:10,maxLength:De,placeholder:e("settings.taskPrompt.placeholder"),onChange:p=>r(p.target.value)}),a.jsx(H,{size:"sm",disabled:l===n||i.isPending,onClick:()=>i.mutate(l,{onSuccess:()=>q.success(e("settings.taskPrompt.saved")),onError:()=>q.error(e("settings.taskPrompt.failed"))}),children:e("settings.taskPrompt.save")})]}),t[4]=l,t[5]=s,t[6]=n,t[7]=i,t[8]=e,t[9]=c):c=t[9];let m;t[10]!==d||t[11]!==c?(m=a.jsx(Z,{children:a.jsx(Q,{title:d,children:c})}),t[10]=d,t[11]=c,t[12]=m):m=t[12];let g;return t[13]!==f||t[14]!==m?(g=a.jsx(re,{title:f,children:m}),t[13]=f,t[14]=m,t[15]=g):g=t[15],g}function Y(t,e){return t instanceof Error?t.message:e}const Xe="https://id.atlassian.com/manage-profile/security/api-tokens";function Ze(t){const e=N.c(7),{stepKeys:n}=t,s=K();let i;if(e[0]!==n||e[1]!==s){let r;e[3]!==s?(r=o=>a.jsx("li",{children:s(o)},o),e[3]=s,e[4]=r):r=e[4],i=n.map(r),e[0]=n,e[1]=s,e[2]=i}else i=e[2];let l;return e[5]!==i?(l=a.jsx("ol",{className:"list-decimal pl-5 flex flex-col gap-1 text-xs text-muted-foreground",children:i}),e[5]=i,e[6]=l):l=e[6],l}function et(){const t=N.c(69),e=K(),n=le(),[s,i]=J.useState(""),[l,r]=J.useState(""),[o,u]=J.useState("");let f;t[0]!==o||t[1]!==l||t[2]!==s?(f=s.trim()!==""&&l.trim()!==""&&o.trim()!=="",t[0]=o,t[1]=l,t[2]=s,t[3]=f):f=t[3];const d=f;let c;t[4]!==e?(c=e("settings.jira.siteLabel"),t[4]=e,t[5]=c):c=t[5];let m;t[6]!==c?(m=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:c}),t[6]=c,t[7]=m):m=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=k=>i(k.target.value),t[8]=g):g=t[8];let p;t[9]!==e?(p=e("settings.jira.sitePlaceholder"),t[9]=e,t[10]=p):p=t[10];let b;t[11]!==s||t[12]!==p?(b=a.jsx(ee,{value:s,onChange:g,placeholder:p,autoComplete:"off"}),t[11]=s,t[12]=p,t[13]=b):b=t[13];let j;t[14]!==m||t[15]!==b?(j=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,b]}),t[14]=m,t[15]=b,t[16]=j):j=t[16];let x;t[17]!==e?(x=e("settings.jira.emailLabel"),t[17]=e,t[18]=x):x=t[18];let h;t[19]!==x?(h=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:x}),t[19]=x,t[20]=h):h=t[20];let y;t[21]===Symbol.for("react.memo_cache_sentinel")?(y=k=>r(k.target.value),t[21]=y):y=t[21];let S;t[22]!==e?(S=e("settings.jira.emailPlaceholder"),t[22]=e,t[23]=S):S=t[23];let v;t[24]!==l||t[25]!==S?(v=a.jsx(ee,{value:l,onChange:y,placeholder:S,autoComplete:"off"}),t[24]=l,t[25]=S,t[26]=v):v=t[26];let T;t[27]!==v||t[28]!==h?(T=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,v]}),t[27]=v,t[28]=h,t[29]=T):T=t[29];let w;t[30]!==e?(w=e("settings.jira.tokenLabel"),t[30]=e,t[31]=w):w=t[31];let P;t[32]!==w?(P=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:w}),t[32]=w,t[33]=P):P=t[33];let _;t[34]!==e?(_=e("settings.jira.createTokenLink"),t[34]=e,t[35]=_):_=t[35];let C;t[36]===Symbol.for("react.memo_cache_sentinel")?(C=a.jsx(ue,{size:12}),t[36]=C):C=t[36];let A;t[37]!==_?(A=a.jsxs("a",{href:Xe,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-xs text-foreground hover:underline",children:[_,C]}),t[37]=_,t[38]=A):A=t[38];let D;t[39]!==P||t[40]!==A?(D=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P,A]}),t[39]=P,t[40]=A,t[41]=D):D=t[41];let B;t[42]===Symbol.for("react.memo_cache_sentinel")?(B=k=>u(k.target.value),t[42]=B):B=t[42];let I;t[43]!==e?(I=e("settings.jira.tokenPlaceholder"),t[43]=e,t[44]=I):I=t[44];let R;t[45]!==o||t[46]!==I?(R=a.jsx(ee,{type:"password",value:o,onChange:B,placeholder:I,autoComplete:"off"}),t[45]=o,t[46]=I,t[47]=R):R=t[47];let E;t[48]!==D||t[49]!==R?(E=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[D,R]}),t[48]=D,t[49]=R,t[50]=E):E=t[50];const M=!d||n.isPending;let O;t[51]!==o||t[52]!==l||t[53]!==s||t[54]!==e||t[55]!==n?(O=()=>n.mutate({siteUrl:s.trim(),email:l.trim(),apiToken:o.trim()},{onSuccess:()=>q.success(e("settings.jira.connected")),onError:k=>q.error(Y(k,e("settings.jira.connectFailed")))}),t[51]=o,t[52]=l,t[53]=s,t[54]=e,t[55]=n,t[56]=O):O=t[56];let $;t[57]!==e||t[58]!==n.isPending?($=n.isPending?e("settings.jira.connecting"):e("settings.jira.connect"),t[57]=e,t[58]=n.isPending,t[59]=$):$=t[59];let F;t[60]!==M||t[61]!==O||t[62]!==$?(F=a.jsx(H,{size:"sm",className:"w-fit",disabled:M,onClick:O,children:$}),t[60]=M,t[61]=O,t[62]=$,t[63]=F):F=t[63];let L;return t[64]!==T||t[65]!==E||t[66]!==F||t[67]!==j?(L=a.jsxs("div",{className:"flex flex-col gap-4 mt-3 max-w-md",children:[j,T,E,F]}),t[64]=T,t[65]=E,t[66]=F,t[67]=j,t[68]=L):L=t[68],L}function tt(t){const e=N.c(44),{integration:n}=t,s=K(),i=Je(),[l,r]=J.useState(!1),o=n.siteUrl,u=n.email;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),e[0]=f):f=e[0];let d;e[1]!==s?(d=s("settings.jira.disconnect"),e[1]=s,e[2]=d):d=e[2];let c;e[3]!==d?(c=a.jsx(H,{variant:"outline",size:"sm",onClick:f,children:d}),e[3]=d,e[4]=c):c=e[4];let m;e[5]!==n.email||e[6]!==n.siteUrl||e[7]!==c?(m=a.jsx(Q,{title:o,description:u,action:c}),e[5]=n.email,e[6]=n.siteUrl,e[7]=c,e[8]=m):m=e[8];let g;e[9]!==s?(g=s("settings.jira.disconnectTitle"),e[9]=s,e[10]=g):g=e[10];let p;e[11]!==g?(p=a.jsx(_e,{children:g}),e[11]=g,e[12]=p):p=e[12];let b;e[13]!==s?(b=s("settings.jira.disconnectDescription"),e[13]=s,e[14]=b):b=e[14];let j;e[15]!==b?(j=a.jsx(Ce,{children:b}),e[15]=b,e[16]=j):j=e[16];let x;e[17]!==j||e[18]!==p?(x=a.jsxs(Pe,{children:[p,j]}),e[17]=j,e[18]=p,e[19]=x):x=e[19];let h;e[20]!==s?(h=s("settings.jira.cancel"),e[20]=s,e[21]=h):h=e[21];let y;e[22]!==h?(y=a.jsx(Ae,{children:h}),e[22]=h,e[23]=y):y=e[23];let S;e[24]!==i||e[25]!==s?(S=()=>i.mutate(void 0,{onSuccess:()=>q.success(s("settings.jira.disconnected")),onError:A=>q.error(Y(A,s("settings.jira.saveFailed")))}),e[24]=i,e[25]=s,e[26]=S):S=e[26];let v;e[27]!==s?(v=s("settings.jira.disconnect"),e[27]=s,e[28]=v):v=e[28];let T;e[29]!==S||e[30]!==v?(T=a.jsx(ke,{onClick:S,children:v}),e[29]=S,e[30]=v,e[31]=T):T=e[31];let w;e[32]!==y||e[33]!==T?(w=a.jsxs(Ie,{children:[y,T]}),e[32]=y,e[33]=T,e[34]=w):w=e[34];let P;e[35]!==x||e[36]!==w?(P=a.jsxs(Re,{children:[x,w]}),e[35]=x,e[36]=w,e[37]=P):P=e[37];let _;e[38]!==l||e[39]!==P?(_=a.jsx(Ee,{open:l,onOpenChange:r,children:P}),e[38]=l,e[39]=P,e[40]=_):_=e[40];let C;return e[41]!==_||e[42]!==m?(C=a.jsxs(a.Fragment,{children:[m,_]}),e[41]=_,e[42]=m,e[43]=C):C=e[43],C}function st(t){const e=N.c(36),{integration:n}=t,s=K(),i=le(),l=Ue(!0);let r,o;e[0]!==l.data||e[1]!==n.boardId||e[2]!==n.boardName?(r=(l.data??[]).map(lt),o=n.boardId?r.find(y=>y.value===n.boardId)?.primary??n.boardName??n.boardId:null,e[0]=l.data,e[1]=n.boardId,e[2]=n.boardName,e[3]=r,e[4]=o):(r=e[3],o=e[4]);const u=o;let f;e[5]!==s?(f=s("settings.jira.boardLabel"),e[5]=s,e[6]=f):f=e[6];let d;e[7]!==s?(d=s("settings.jira.boardDescription"),e[7]=s,e[8]=d):d=e[8];const c=n.boardId??"";let m;e[9]!==s?(m=s("settings.jira.boardPlaceholder"),e[9]=s,e[10]=m):m=e[10];let g;e[11]!==s?(g=s("settings.jira.boardSearchPlaceholder"),e[11]=s,e[12]=g):g=e[12];let p;e[13]!==l.isPending||e[14]!==s?(p=l.isPending?s("settings.jira.loadingBoards"):s("settings.jira.noBoardsMatch"),e[13]=l.isPending,e[14]=s,e[15]=p):p=e[15];let b;e[16]!==u||e[17]!==s?(b=()=>a.jsxs(H,{variant:"outline",role:"combobox",className:"w-72 justify-between font-normal",children:[a.jsx("span",{className:"truncate",children:u??s("settings.jira.boardPlaceholder")}),a.jsx(ce,{className:"opacity-50 shrink-0"})]}),e[16]=u,e[17]=s,e[18]=b):b=e[18];let j;e[19]!==r||e[20]!==n.boardId||e[21]!==s||e[22]!==i?(j=y=>{!y||y===n.boardId||i.mutate({boardId:y,boardName:r.find(S=>S.value===y)?.primary??null},{onError:S=>q.error(Y(S,s("settings.jira.saveFailed")))})},e[19]=r,e[20]=n.boardId,e[21]=s,e[22]=i,e[23]=j):j=e[23];let x;e[24]!==r||e[25]!==c||e[26]!==m||e[27]!==g||e[28]!==p||e[29]!==b||e[30]!==j?(x=a.jsx(Fe,{options:r,value:c,width:"w-72",triggerClassName:"shrink-0",placeholder:m,searchPlaceholder:g,filter:Ke,emptyMessage:p,renderTrigger:b,renderItem:it,onChange:j}),e[24]=r,e[25]=c,e[26]=m,e[27]=g,e[28]=p,e[29]=b,e[30]=j,e[31]=x):x=e[31];let h;return e[32]!==x||e[33]!==f||e[34]!==d?(h=a.jsx(Q,{title:f,description:d,action:x}),e[32]=x,e[33]=f,e[34]=d,e[35]=h):h=e[35],h}function it(t,e){return a.jsxs("div",{className:"flex items-start gap-2 min-w-0 w-full",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate",children:t.primary}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.secondary})]}),a.jsx(oe,{className:W("mt-0.5 shrink-0",e?"opacity-100":"opacity-0")})]})}function lt(t){const{primary:e,secondary:n}=me(t);return{value:String(t.id),label:qe(t),primary:e,secondary:n}}function nt(t){const e=N.c(30),{boardId:n}=t,s=K(),i=ze(n),l=Ge();let r;if(i.isPending||l.isPending){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(ie,{className:"h-40 w-full"}),e[0]=c):c=e[0],r=c}else if(i.isError){let c;e[1]!==s?(c=s("settings.jira.columnsFailed"),e[1]=s,e[2]=c):c=e[2];let m;e[3]!==c?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[3]=c,e[4]=m):m=e[4],r=m}else if((i.data??[]).length===0){let c;e[5]!==s?(c=s("settings.jira.noColumnsYet"),e[5]=s,e[6]=c):c=e[6];let m;e[7]!==c?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[7]=c,e[8]=m):m=e[8],r=m}else{let c;e[9]!==l.data?(c=new Map((l.data??[]).map(at)),e[9]=l.data,e[10]=c):c=e[10];const m=c;let g;e[11]!==i.data?(g=i.data??[],e[11]=i.data,e[12]=g):g=e[12];let p;if(e[13]!==m||e[14]!==g){let j;e[16]!==m?(j=x=>x.statuses.map(h=>a.jsx(rt,{columnName:x.name,status:h,showStatus:h!==x.name||x.statuses.length>1,hasAutomation:m.has(h),prompt:m.get(h)??null},`${x.name}:${h}`)),e[16]=m,e[17]=j):j=e[17],p=g.flatMap(j),e[13]=m,e[14]=g,e[15]=p}else p=e[15];let b;e[18]!==p?(b=a.jsx("div",{className:"flex w-full flex-col gap-3",children:p}),e[18]=p,e[19]=b):b=e[19],r=b}let o;e[20]!==s?(o=s("settings.jira.automationsLabel"),e[20]=s,e[21]=o):o=e[21];let u;e[22]!==s?(u=s("settings.jira.automationsDescription"),e[22]=s,e[23]=u):u=e[23];let f;e[24]!==r?(f=a.jsx("div",{className:"mt-3",children:r}),e[24]=r,e[25]=f):f=e[25];let d;return e[26]!==o||e[27]!==u||e[28]!==f?(d=a.jsx(Q,{title:o,description:u,children:f}),e[26]=o,e[27]=u,e[28]=f,e[29]=d):d=e[29],d}function at(t){return[t.jiraStatus,t.prompt]}function rt(t){const e=N.c(22),{columnName:n,status:s,showStatus:i,hasAutomation:l,prompt:r}=t,o=K(),u=He(),[f,d]=J.useState(r??""),[c,m]=J.useState(r);c!==r&&(m(r),d(r??""));let g;e[0]!==u||e[1]!==s||e[2]!==o?(g=S=>u.mutate({jiraStatus:s,prompt:S},{onError:v=>q.error(Y(v,o("settings.jira.saveFailed")))}),e[0]=u,e[1]=s,e[2]=o,e[3]=g):g=e[3];const p=g;let b;e[4]!==n?(b=a.jsx("span",{className:"truncate text-sm font-medium",children:n}),e[4]=n,e[5]=b):b=e[5];let j;e[6]!==i||e[7]!==s?(j=i&&a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s}),e[6]=i,e[7]=s,e[8]=j):j=e[8];let x;e[9]!==b||e[10]!==j?(x=a.jsxs("div",{className:"flex flex-col min-w-0",children:[b,j]}),e[9]=b,e[10]=j,e[11]=x):x=e[11];let h;e[12]!==f||e[13]!==l||e[14]!==r||e[15]!==p||e[16]!==s||e[17]!==o?(h=l?a.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted/40 p-2.5",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-xs font-medium",children:o("settings.jira.automationOn")}),a.jsx(H,{variant:"ghost",size:"sm","aria-label":o("settings.jira.removeAriaLabel",{status:s}),onClick:()=>p(null),children:a.jsx(pe,{size:14})})]}),a.jsx(de,{value:f,rows:2,placeholder:o("settings.jira.promptPlaceholder"),onChange:S=>d(S.target.value),onBlur:()=>{f!==(r??"")&&p(f)},"data-jira-automation-prompt":s}),a.jsx("p",{className:"text-xs text-muted-foreground",children:o("settings.jira.promptHelp")})]}):a.jsxs(H,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>p(""),children:[a.jsx(ge,{size:14}),o("settings.jira.addAutomation")]}),e[12]=f,e[13]=l,e[14]=r,e[15]=p,e[16]=s,e[17]=o,e[18]=h):h=e[18];let y;return e[19]!==x||e[20]!==h?(y=a.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border p-3",children:[x,h]}),e[19]=x,e[20]=h,e[21]=y):y=e[21],y}function ot(t){const e=N.c(16),{integration:n}=t,s=K(),i=le();let l;e[0]!==s?(l=s("settings.jira.enabledLabel"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==s?(r=s("settings.jira.enabledDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==n.boardId||e[5]!==s||e[6]!==i?(o=d=>{if(d&&!n.boardId){q.error(s("settings.jira.enableRequirements"));return}i.mutate({enabled:d},{onError:c=>q.error(Y(c,s("settings.jira.saveFailed")))})},e[4]=n.boardId,e[5]=s,e[6]=i,e[7]=o):o=e[7];let u;e[8]!==n.enabled||e[9]!==o||e[10]!==i.isPending?(u=a.jsx(we,{checked:n.enabled,disabled:i.isPending,onCheckedChange:o}),e[8]=n.enabled,e[9]=o,e[10]=i.isPending,e[11]=u):u=e[11];let f;return e[12]!==l||e[13]!==r||e[14]!==u?(f=a.jsx(Q,{title:l,description:r,action:u}),e[12]=l,e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function ct(t){const e=N.c(24),{integration:n}=t,s=K(),i=`${window.location.origin}/api/_jira/webhook/${n.webhookSecret}`;let l;e[0]!==s?(l=s("settings.jira.webhookTitle"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==s?(r=s("settings.jira.webhookDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==i?(o=a.jsx(ee,{readOnly:!0,value:i,className:"font-mono text-xs"}),e[4]=i,e[5]=o):o=e[5];let u;e[6]!==s||e[7]!==i?(u=()=>{navigator.clipboard.writeText(i),q.success(s("settings.jira.webhookCopied"))},e[6]=s,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==s?(f=s("settings.jira.webhookCopy"),e[9]=s,e[10]=f):f=e[10];let d;e[11]!==u||e[12]!==f?(d=a.jsx(H,{variant:"outline",size:"sm",className:"shrink-0",onClick:u,children:f}),e[11]=u,e[12]=f,e[13]=d):d=e[13];let c;e[14]!==o||e[15]!==d?(c=a.jsxs("div",{className:"flex items-center gap-2",children:[o,d]}),e[14]=o,e[15]=d,e[16]=c):c=e[16];let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Ze,{stepKeys:["settings.jira.webhookStep1","settings.jira.webhookStep2","settings.jira.webhookStep3","settings.jira.webhookStep4","settings.jira.webhookStep5"]}),e[17]=m):m=e[17];let g;e[18]!==c?(g=a.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[c,m]}),e[18]=c,e[19]=g):g=e[19];let p;return e[20]!==l||e[21]!==r||e[22]!==g?(p=a.jsx(Q,{title:l,description:r,children:g}),e[20]=l,e[21]=r,e[22]=g,e[23]=p):p=e[23],p}function dt(){const t=N.c(23),e=K(),n=Me();if(n.isPending){let d;return t[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(Z,{children:a.jsx("div",{className:"p-4",children:a.jsx(ie,{className:"h-40 w-full"})})}),t[0]=d):d=t[0],d}if(!n.data){let d;t[1]!==e?(d=e("settings.jira.connectTitle"),t[1]=e,t[2]=d):d=t[2];let c;t[3]!==e?(c=e("settings.jira.connectDescription"),t[3]=e,t[4]=c):c=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(et,{}),t[5]=m):m=t[5];let g;return t[6]!==d||t[7]!==c?(g=a.jsx(Z,{children:a.jsx(Q,{title:d,description:c,children:m})}),t[6]=d,t[7]=c,t[8]=g):g=t[8],g}const s=n.data;let i,l;t[9]!==s?(i=a.jsx(tt,{integration:s}),l=a.jsx(st,{integration:s}),t[9]=s,t[10]=i,t[11]=l):(i=t[10],l=t[11]);let r;t[12]!==s.boardId?(r=s.boardId&&a.jsx(nt,{boardId:s.boardId}),t[12]=s.boardId,t[13]=r):r=t[13];let o,u;t[14]!==s?(o=a.jsx(ot,{integration:s}),u=a.jsx(ct,{integration:s}),t[14]=s,t[15]=o,t[16]=u):(o=t[15],u=t[16]);let f;return t[17]!==i||t[18]!==l||t[19]!==r||t[20]!==o||t[21]!==u?(f=a.jsxs(Z,{children:[i,l,r,o,u]}),t[17]=i,t[18]=l,t[19]=r,t[20]=o,t[21]=u,t[22]=f):f=t[22],f}function mt(){const t=N.c(18),e=K();let n;t[0]!==e?(n=e("settings.nav.tasks"),t[0]=e,t[1]=n):n=t[1];let s;t[2]!==n?(s=a.jsx(X.Title,{children:n}),t[2]=n,t[3]=s):s=t[3];let i,l,r;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Oe,{}),l=a.jsx(Ye,{}),r=a.jsx($e,{}),t[4]=i,t[5]=l,t[6]=r):(i=t[4],l=t[5],r=t[6]);let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(Le,{size:18}),t[7]=o):o=t[7];let u;t[8]!==e?(u=e("settings.jira.sectionTitle"),t[8]=e,t[9]=u):u=t[9];let f;t[10]!==u?(f=a.jsxs("span",{className:"flex items-center gap-2",children:[o,u]}),t[10]=u,t[11]=f):f=t[11];let d;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(dt,{}),t[12]=d):d=t[12];let c;t[13]!==f?(c=a.jsx(re,{title:f,children:d}),t[13]=f,t[14]=c):c=t[14];let m;return t[15]!==s||t[16]!==c?(m=a.jsx(X,{children:a.jsx(X.Content,{children:a.jsx(X.Body,{children:a.jsxs(fe,{children:[s,i,l,r,c]})})})}),t[15]=s,t[16]=c,t[17]=m):m=t[17],m}function Dt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Be,{capability:"org:manage",area:"settings",children:a.jsx(mt,{})}),t[0]=e):e=t[0],e}export{Dt as default};
|
|
1
|
+
import{c as N,r as J,j as a,l as W,B as H,W as U,a7 as z,K as G,m as V,n as te,e as se,b as K,b4 as ie,t as q,dq as Z,dr as Q,dp as re,P as X,ds as fe,p as ue}from"./index-lSAvH_rL.js";import{I as ee}from"./input-BdcqHmsD.js";import{i as oe}from"./Check-CxhsqO-U.js";import{i as ce}from"./ChevronSelectorVertical-BbRv2olL.js";import{s as ge}from"./Plus-sgFP0HSc.js";import{s as pe}from"./Trash01-Cy8JukTX.js";import{a as xe,c as je,d as he,e as be,b as ye,C as Se}from"./command-CRqAgH1a.js";import{a as ve,P as Ne,b as Te}from"./popover-DqoSLPyP.js";import{S as we}from"./switch-DW4RRppR.js";import{T as de}from"./textarea-Dyj892-C.js";import{c as _e,d as Ce,b as Pe,f as Ae,g as ke,e as Ie,a as Re,A as Ee}from"./alert-dialog-DW1zmq7a.js";import{R as Oe,A as $e}from"./review-settings-ll1dG96m.js";import{f as De}from"./task-board-DkI8yDIf.js";import{R as Be}from"./require-capability-BRvSlC3v.js";import"./index-CWs8c_71.js";import"./dialog-BdUmjS4-.js";import"./SearchMd-DUxlDNtX.js";import"./UserSquare-1xv6DUe1.js";import"./GitBranch01-CfVfwURq.js";import"./use-organization-settings-BfIVlNk5.js";import"./constants-DNuUCxmW.js";import"./schema-CnLqwTPD.js";import"./access-gate-BdiZftQz.js";import"./capability-load-error-D_PjnnSN.js";function Fe(t){const e=N.c(41),{options:n,value:s,onChange:i,placeholder:l,triggerClassName:r,contentClassName:o,width:u,renderTrigger:f,renderItem:d,emptyMessage:c,searchPlaceholder:m,filter:g}=t,p=l===void 0?"Select...":l,b=u===void 0?"w-[200px]":u,j=c===void 0?"No results found.":c,x=m===void 0?"Search...":m;let h;e[0]!==s?(h=L=>L.value===s,e[0]=s,e[1]=h):h=e[1];const y=n.find(h),[S,v]=J.useState(!1),T=Ne,w=ve,P=!0,_=f?a.jsx("div",{className:W("cursor-pointer",r),children:f(y)}):a.jsxs(H,{variant:"outline",role:"combobox",className:W("justify-between",b,r),children:[y?y.label:p,a.jsx(ce,{className:"opacity-50"})]});let C;e[2]!==w||e[3]!==_?(C=a.jsx(w,{asChild:P,children:_}),e[2]=w,e[3]=_,e[4]=C):C=e[4];let A;e[5]!==o?(A=W("p-0",o),e[5]=o,e[6]=A):A=e[6];let D;e[7]===Symbol.for("react.memo_cache_sentinel")?(D={width:"var(--radix-popover-trigger-width)"},e[7]=D):D=e[7];let B;e[8]!==x?(B=a.jsx(xe,{placeholder:x,className:"h-9"}),e[8]=x,e[9]=B):B=e[9];let I;e[10]!==j?(I=a.jsx(je,{children:j}),e[10]=j,e[11]=I):I=e[11];let R;if(e[12]!==i||e[13]!==n||e[14]!==d||e[15]!==v||e[16]!==s){let L;e[18]!==i||e[19]!==d||e[20]!==v||e[21]!==s?(L=k=>{const ne=s===k.value;return a.jsx(he,{value:k.label,onSelect:()=>{i(k.value===s?"":k.value),v(!1)},children:d?d(k,ne):a.jsxs(a.Fragment,{children:[k.label,a.jsx(oe,{className:W("ml-auto",ne?"opacity-100":"opacity-0")})]})},k.value)},e[18]=i,e[19]=d,e[20]=v,e[21]=s,e[22]=L):L=e[22],R=n.map(L),e[12]=i,e[13]=n,e[14]=d,e[15]=v,e[16]=s,e[17]=R}else R=e[17];let E;e[23]!==R?(E=a.jsx(be,{children:R}),e[23]=R,e[24]=E):E=e[24];let M;e[25]!==I||e[26]!==E?(M=a.jsxs(ye,{children:[I,E]}),e[25]=I,e[26]=E,e[27]=M):M=e[27];let O;e[28]!==g||e[29]!==B||e[30]!==M?(O=a.jsxs(Se,{filter:g,children:[B,M]}),e[28]=g,e[29]=B,e[30]=M,e[31]=O):O=e[31];let $;e[32]!==O||e[33]!==A?($=a.jsx(Te,{className:A,style:D,children:O}),e[32]=O,e[33]=A,e[34]=$):$=e[34];let F;return e[35]!==T||e[36]!==S||e[37]!==v||e[38]!==$||e[39]!==C?(F=a.jsxs(T,{open:S,onOpenChange:v,children:[C,$]}),e[35]=T,e[36]=S,e[37]=v,e[38]=$,e[39]=C,e[40]=F):F=e[40],F}function Le(t){const e=N.c(4),{size:n,className:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("path",{d:"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0z"}),e[0]=i):i=e[0];let l;return e[1]!==s||e[2]!==n?(l=a.jsx("svg",{width:n,height:n,viewBox:"0 0 24 24",fill:"#2684FF","aria-hidden":"true",className:s,children:i}),e[1]=s,e[2]=n,e[3]=l):l=e[3],l}function me(t){const e=t.projectName?.replace(/\s+/g," ").trim(),n=t.name.trim();return e?{primary:e,secondary:[n,t.projectKey].filter(Boolean).join(" · ")}:{primary:n,secondary:t.projectKey??""}}function qe(t){const{primary:e,secondary:n}=me(t);return[e,n,`#${t.id}`].filter(Boolean).join(" ")}function ae(t){return t.normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").toLowerCase()}function Ke(t,e){const n=ae(e).trim();if(!n)return 1;const s=ae(t);return n.split(/\s+/).every(i=>s.includes(i))?1:0}function Me(){const t=N.c(7),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.jiraIntegration(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("JIRA_INTEGRATION_GET",{})).integration,t[2]=n,t[3]=i):i=t[3];let l;return t[4]!==s||t[5]!==i?(l={queryKey:s,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],V(l)}function le(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>(await n.call("JIRA_INTEGRATION_UPSERT",o)).integration,t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Je(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=()=>n.call("JIRA_INTEGRATION_DELETE",{}),t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraIntegration(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Ue(t){const e=N.c(8),{org:n}=U(),s=z();let i;e[0]!==n.id?(i=G.jiraBoards(n.id),e[0]=n.id,e[1]=i):i=e[1];let l;e[2]!==s?(l=async()=>(await s.call("JIRA_BOARDS_LIST",{})).boards,e[2]=s,e[3]=l):l=e[3];let r;return e[4]!==t||e[5]!==i||e[6]!==l?(r={queryKey:i,enabled:t,staleTime:6e4,queryFn:l},e[4]=t,e[5]=i,e[6]=l,e[7]=r):r=e[7],V(r)}function ze(t){const e=N.c(10),{org:n}=U(),s=z();let i;e[0]!==t||e[1]!==n.id?(i=G.jiraBoardColumns(n.id,t),e[0]=t,e[1]=n.id,e[2]=i):i=e[2];const l=t!==null;let r;e[3]!==t||e[4]!==s?(r=async()=>(await s.call("JIRA_BOARD_COLUMNS_LIST",{boardId:t??""})).columns,e[3]=t,e[4]=s,e[5]=r):r=e[5];let o;return e[6]!==i||e[7]!==l||e[8]!==r?(o={queryKey:i,enabled:l,staleTime:6e4,queryFn:r},e[6]=i,e[7]=l,e[8]=r,e[9]=o):o=e[9],V(o)}function Ge(){const t=N.c(7),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.jiraAutomations(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("JIRA_AUTOMATION_LIST",{})).automations,t[2]=n,t[3]=i):i=t[3];let l;return t[4]!==s||t[5]!==i?(l={queryKey:s,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6],V(l)}function He(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>{if(o.prompt===null){await n.call("JIRA_AUTOMATION_DELETE",{jiraStatus:o.jiraStatus});return}await n.call("JIRA_AUTOMATION_UPSERT",{jiraStatus:o.jiraStatus,prompt:o.prompt.trim()===""?void 0:o.prompt})},t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.jiraAutomations(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Qe(){const t=N.c(12),{org:e}=U(),n=z();let s;t[0]!==e.id?(s=G.taskBoardPrompts(e.id),t[0]=e.id,t[1]=s):s=t[1];let i;t[2]!==n?(i=async()=>(await n.call("TASK_BOARD_PROMPT_LIST",{})).prompts,t[2]=n,t[3]=i):i=t[3];let l;t[4]!==s||t[5]!==i?(l={queryKey:s,staleTime:6e4,queryFn:i},t[4]=s,t[5]=i,t[6]=l):l=t[6];const r=V(l);let o;t[7]!==r.data?(o=r.data?.find(We)?.prompt??"",t[7]=r.data,t[8]=o):o=t[8];let u;return t[9]!==r.isPending||t[10]!==o?(u={prompt:o,isPending:r.isPending},t[9]=r.isPending,t[10]=o,t[11]=u):u=t[11],u}function We(t){return t.columnKey===null}function Ve(){const t=N.c(8),{org:e}=U(),n=z(),s=te();let i;t[0]!==n?(i=async o=>{const u=o.trim();if(!u){await n.call("TASK_BOARD_PROMPT_DELETE",{});return}await n.call("TASK_BOARD_PROMPT_UPSERT",{prompt:u})},t[0]=n,t[1]=i):i=t[1];let l;t[2]!==e||t[3]!==s?(l=()=>s.invalidateQueries({queryKey:G.taskBoardPrompts(e.id)}),t[2]=e,t[3]=s,t[4]=l):l=t[4];let r;return t[5]!==i||t[6]!==l?(r={mutationFn:i,onSettled:l},t[5]=i,t[6]=l,t[7]=r):r=t[7],se(r)}function Ye(){const t=N.c(16),e=K(),{prompt:n,isPending:s}=Qe(),i=Ve(),[l,r]=J.useState(n),[o,u]=J.useState(n);o!==n&&(u(n),r(n));let f;t[0]!==e?(f=e("settings.taskPrompt.title"),t[0]=e,t[1]=f):f=t[1];let d;t[2]!==e?(d=e("settings.taskPrompt.fieldLabel"),t[2]=e,t[3]=d):d=t[3];let c;t[4]!==l||t[5]!==s||t[6]!==n||t[7]!==i||t[8]!==e?(c=s?a.jsx(ie,{className:"h-44 w-full"}):a.jsxs("div",{className:"flex flex-col items-start gap-2",children:[a.jsx(de,{value:l,rows:10,maxLength:De,placeholder:e("settings.taskPrompt.placeholder"),onChange:p=>r(p.target.value)}),a.jsx(H,{size:"sm",disabled:l===n||i.isPending,onClick:()=>i.mutate(l,{onSuccess:()=>q.success(e("settings.taskPrompt.saved")),onError:()=>q.error(e("settings.taskPrompt.failed"))}),children:e("settings.taskPrompt.save")})]}),t[4]=l,t[5]=s,t[6]=n,t[7]=i,t[8]=e,t[9]=c):c=t[9];let m;t[10]!==d||t[11]!==c?(m=a.jsx(Z,{children:a.jsx(Q,{title:d,children:c})}),t[10]=d,t[11]=c,t[12]=m):m=t[12];let g;return t[13]!==f||t[14]!==m?(g=a.jsx(re,{title:f,children:m}),t[13]=f,t[14]=m,t[15]=g):g=t[15],g}function Y(t,e){return t instanceof Error?t.message:e}const Xe="https://id.atlassian.com/manage-profile/security/api-tokens";function Ze(t){const e=N.c(7),{stepKeys:n}=t,s=K();let i;if(e[0]!==n||e[1]!==s){let r;e[3]!==s?(r=o=>a.jsx("li",{children:s(o)},o),e[3]=s,e[4]=r):r=e[4],i=n.map(r),e[0]=n,e[1]=s,e[2]=i}else i=e[2];let l;return e[5]!==i?(l=a.jsx("ol",{className:"list-decimal pl-5 flex flex-col gap-1 text-xs text-muted-foreground",children:i}),e[5]=i,e[6]=l):l=e[6],l}function et(){const t=N.c(69),e=K(),n=le(),[s,i]=J.useState(""),[l,r]=J.useState(""),[o,u]=J.useState("");let f;t[0]!==o||t[1]!==l||t[2]!==s?(f=s.trim()!==""&&l.trim()!==""&&o.trim()!=="",t[0]=o,t[1]=l,t[2]=s,t[3]=f):f=t[3];const d=f;let c;t[4]!==e?(c=e("settings.jira.siteLabel"),t[4]=e,t[5]=c):c=t[5];let m;t[6]!==c?(m=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:c}),t[6]=c,t[7]=m):m=t[7];let g;t[8]===Symbol.for("react.memo_cache_sentinel")?(g=k=>i(k.target.value),t[8]=g):g=t[8];let p;t[9]!==e?(p=e("settings.jira.sitePlaceholder"),t[9]=e,t[10]=p):p=t[10];let b;t[11]!==s||t[12]!==p?(b=a.jsx(ee,{value:s,onChange:g,placeholder:p,autoComplete:"off"}),t[11]=s,t[12]=p,t[13]=b):b=t[13];let j;t[14]!==m||t[15]!==b?(j=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,b]}),t[14]=m,t[15]=b,t[16]=j):j=t[16];let x;t[17]!==e?(x=e("settings.jira.emailLabel"),t[17]=e,t[18]=x):x=t[18];let h;t[19]!==x?(h=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:x}),t[19]=x,t[20]=h):h=t[20];let y;t[21]===Symbol.for("react.memo_cache_sentinel")?(y=k=>r(k.target.value),t[21]=y):y=t[21];let S;t[22]!==e?(S=e("settings.jira.emailPlaceholder"),t[22]=e,t[23]=S):S=t[23];let v;t[24]!==l||t[25]!==S?(v=a.jsx(ee,{value:l,onChange:y,placeholder:S,autoComplete:"off"}),t[24]=l,t[25]=S,t[26]=v):v=t[26];let T;t[27]!==v||t[28]!==h?(T=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[h,v]}),t[27]=v,t[28]=h,t[29]=T):T=t[29];let w;t[30]!==e?(w=e("settings.jira.tokenLabel"),t[30]=e,t[31]=w):w=t[31];let P;t[32]!==w?(P=a.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:w}),t[32]=w,t[33]=P):P=t[33];let _;t[34]!==e?(_=e("settings.jira.createTokenLink"),t[34]=e,t[35]=_):_=t[35];let C;t[36]===Symbol.for("react.memo_cache_sentinel")?(C=a.jsx(ue,{size:12}),t[36]=C):C=t[36];let A;t[37]!==_?(A=a.jsxs("a",{href:Xe,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-0.5 text-xs text-foreground hover:underline",children:[_,C]}),t[37]=_,t[38]=A):A=t[38];let D;t[39]!==P||t[40]!==A?(D=a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[P,A]}),t[39]=P,t[40]=A,t[41]=D):D=t[41];let B;t[42]===Symbol.for("react.memo_cache_sentinel")?(B=k=>u(k.target.value),t[42]=B):B=t[42];let I;t[43]!==e?(I=e("settings.jira.tokenPlaceholder"),t[43]=e,t[44]=I):I=t[44];let R;t[45]!==o||t[46]!==I?(R=a.jsx(ee,{type:"password",value:o,onChange:B,placeholder:I,autoComplete:"off"}),t[45]=o,t[46]=I,t[47]=R):R=t[47];let E;t[48]!==D||t[49]!==R?(E=a.jsxs("div",{className:"flex flex-col gap-1.5",children:[D,R]}),t[48]=D,t[49]=R,t[50]=E):E=t[50];const M=!d||n.isPending;let O;t[51]!==o||t[52]!==l||t[53]!==s||t[54]!==e||t[55]!==n?(O=()=>n.mutate({siteUrl:s.trim(),email:l.trim(),apiToken:o.trim()},{onSuccess:()=>q.success(e("settings.jira.connected")),onError:k=>q.error(Y(k,e("settings.jira.connectFailed")))}),t[51]=o,t[52]=l,t[53]=s,t[54]=e,t[55]=n,t[56]=O):O=t[56];let $;t[57]!==e||t[58]!==n.isPending?($=n.isPending?e("settings.jira.connecting"):e("settings.jira.connect"),t[57]=e,t[58]=n.isPending,t[59]=$):$=t[59];let F;t[60]!==M||t[61]!==O||t[62]!==$?(F=a.jsx(H,{size:"sm",className:"w-fit",disabled:M,onClick:O,children:$}),t[60]=M,t[61]=O,t[62]=$,t[63]=F):F=t[63];let L;return t[64]!==T||t[65]!==E||t[66]!==F||t[67]!==j?(L=a.jsxs("div",{className:"flex flex-col gap-4 mt-3 max-w-md",children:[j,T,E,F]}),t[64]=T,t[65]=E,t[66]=F,t[67]=j,t[68]=L):L=t[68],L}function tt(t){const e=N.c(44),{integration:n}=t,s=K(),i=Je(),[l,r]=J.useState(!1),o=n.siteUrl,u=n.email;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>r(!0),e[0]=f):f=e[0];let d;e[1]!==s?(d=s("settings.jira.disconnect"),e[1]=s,e[2]=d):d=e[2];let c;e[3]!==d?(c=a.jsx(H,{variant:"outline",size:"sm",onClick:f,children:d}),e[3]=d,e[4]=c):c=e[4];let m;e[5]!==n.email||e[6]!==n.siteUrl||e[7]!==c?(m=a.jsx(Q,{title:o,description:u,action:c}),e[5]=n.email,e[6]=n.siteUrl,e[7]=c,e[8]=m):m=e[8];let g;e[9]!==s?(g=s("settings.jira.disconnectTitle"),e[9]=s,e[10]=g):g=e[10];let p;e[11]!==g?(p=a.jsx(_e,{children:g}),e[11]=g,e[12]=p):p=e[12];let b;e[13]!==s?(b=s("settings.jira.disconnectDescription"),e[13]=s,e[14]=b):b=e[14];let j;e[15]!==b?(j=a.jsx(Ce,{children:b}),e[15]=b,e[16]=j):j=e[16];let x;e[17]!==j||e[18]!==p?(x=a.jsxs(Pe,{children:[p,j]}),e[17]=j,e[18]=p,e[19]=x):x=e[19];let h;e[20]!==s?(h=s("settings.jira.cancel"),e[20]=s,e[21]=h):h=e[21];let y;e[22]!==h?(y=a.jsx(Ae,{children:h}),e[22]=h,e[23]=y):y=e[23];let S;e[24]!==i||e[25]!==s?(S=()=>i.mutate(void 0,{onSuccess:()=>q.success(s("settings.jira.disconnected")),onError:A=>q.error(Y(A,s("settings.jira.saveFailed")))}),e[24]=i,e[25]=s,e[26]=S):S=e[26];let v;e[27]!==s?(v=s("settings.jira.disconnect"),e[27]=s,e[28]=v):v=e[28];let T;e[29]!==S||e[30]!==v?(T=a.jsx(ke,{onClick:S,children:v}),e[29]=S,e[30]=v,e[31]=T):T=e[31];let w;e[32]!==y||e[33]!==T?(w=a.jsxs(Ie,{children:[y,T]}),e[32]=y,e[33]=T,e[34]=w):w=e[34];let P;e[35]!==x||e[36]!==w?(P=a.jsxs(Re,{children:[x,w]}),e[35]=x,e[36]=w,e[37]=P):P=e[37];let _;e[38]!==l||e[39]!==P?(_=a.jsx(Ee,{open:l,onOpenChange:r,children:P}),e[38]=l,e[39]=P,e[40]=_):_=e[40];let C;return e[41]!==_||e[42]!==m?(C=a.jsxs(a.Fragment,{children:[m,_]}),e[41]=_,e[42]=m,e[43]=C):C=e[43],C}function st(t){const e=N.c(36),{integration:n}=t,s=K(),i=le(),l=Ue(!0);let r,o;e[0]!==l.data||e[1]!==n.boardId||e[2]!==n.boardName?(r=(l.data??[]).map(lt),o=n.boardId?r.find(y=>y.value===n.boardId)?.primary??n.boardName??n.boardId:null,e[0]=l.data,e[1]=n.boardId,e[2]=n.boardName,e[3]=r,e[4]=o):(r=e[3],o=e[4]);const u=o;let f;e[5]!==s?(f=s("settings.jira.boardLabel"),e[5]=s,e[6]=f):f=e[6];let d;e[7]!==s?(d=s("settings.jira.boardDescription"),e[7]=s,e[8]=d):d=e[8];const c=n.boardId??"";let m;e[9]!==s?(m=s("settings.jira.boardPlaceholder"),e[9]=s,e[10]=m):m=e[10];let g;e[11]!==s?(g=s("settings.jira.boardSearchPlaceholder"),e[11]=s,e[12]=g):g=e[12];let p;e[13]!==l.isPending||e[14]!==s?(p=l.isPending?s("settings.jira.loadingBoards"):s("settings.jira.noBoardsMatch"),e[13]=l.isPending,e[14]=s,e[15]=p):p=e[15];let b;e[16]!==u||e[17]!==s?(b=()=>a.jsxs(H,{variant:"outline",role:"combobox",className:"w-72 justify-between font-normal",children:[a.jsx("span",{className:"truncate",children:u??s("settings.jira.boardPlaceholder")}),a.jsx(ce,{className:"opacity-50 shrink-0"})]}),e[16]=u,e[17]=s,e[18]=b):b=e[18];let j;e[19]!==r||e[20]!==n.boardId||e[21]!==s||e[22]!==i?(j=y=>{!y||y===n.boardId||i.mutate({boardId:y,boardName:r.find(S=>S.value===y)?.primary??null},{onError:S=>q.error(Y(S,s("settings.jira.saveFailed")))})},e[19]=r,e[20]=n.boardId,e[21]=s,e[22]=i,e[23]=j):j=e[23];let x;e[24]!==r||e[25]!==c||e[26]!==m||e[27]!==g||e[28]!==p||e[29]!==b||e[30]!==j?(x=a.jsx(Fe,{options:r,value:c,width:"w-72",triggerClassName:"shrink-0",placeholder:m,searchPlaceholder:g,filter:Ke,emptyMessage:p,renderTrigger:b,renderItem:it,onChange:j}),e[24]=r,e[25]=c,e[26]=m,e[27]=g,e[28]=p,e[29]=b,e[30]=j,e[31]=x):x=e[31];let h;return e[32]!==x||e[33]!==f||e[34]!==d?(h=a.jsx(Q,{title:f,description:d,action:x}),e[32]=x,e[33]=f,e[34]=d,e[35]=h):h=e[35],h}function it(t,e){return a.jsxs("div",{className:"flex items-start gap-2 min-w-0 w-full",children:[a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:"truncate",children:t.primary}),a.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.secondary})]}),a.jsx(oe,{className:W("mt-0.5 shrink-0",e?"opacity-100":"opacity-0")})]})}function lt(t){const{primary:e,secondary:n}=me(t);return{value:String(t.id),label:qe(t),primary:e,secondary:n}}function nt(t){const e=N.c(30),{boardId:n}=t,s=K(),i=ze(n),l=Ge();let r;if(i.isPending||l.isPending){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(ie,{className:"h-40 w-full"}),e[0]=c):c=e[0],r=c}else if(i.isError){let c;e[1]!==s?(c=s("settings.jira.columnsFailed"),e[1]=s,e[2]=c):c=e[2];let m;e[3]!==c?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[3]=c,e[4]=m):m=e[4],r=m}else if((i.data??[]).length===0){let c;e[5]!==s?(c=s("settings.jira.noColumnsYet"),e[5]=s,e[6]=c):c=e[6];let m;e[7]!==c?(m=a.jsx("p",{className:"text-xs text-muted-foreground",children:c}),e[7]=c,e[8]=m):m=e[8],r=m}else{let c;e[9]!==l.data?(c=new Map((l.data??[]).map(at)),e[9]=l.data,e[10]=c):c=e[10];const m=c;let g;e[11]!==i.data?(g=i.data??[],e[11]=i.data,e[12]=g):g=e[12];let p;if(e[13]!==m||e[14]!==g){let j;e[16]!==m?(j=x=>x.statuses.map(h=>a.jsx(rt,{columnName:x.name,status:h,showStatus:h!==x.name||x.statuses.length>1,hasAutomation:m.has(h),prompt:m.get(h)??null},`${x.name}:${h}`)),e[16]=m,e[17]=j):j=e[17],p=g.flatMap(j),e[13]=m,e[14]=g,e[15]=p}else p=e[15];let b;e[18]!==p?(b=a.jsx("div",{className:"flex w-full flex-col gap-3",children:p}),e[18]=p,e[19]=b):b=e[19],r=b}let o;e[20]!==s?(o=s("settings.jira.automationsLabel"),e[20]=s,e[21]=o):o=e[21];let u;e[22]!==s?(u=s("settings.jira.automationsDescription"),e[22]=s,e[23]=u):u=e[23];let f;e[24]!==r?(f=a.jsx("div",{className:"mt-3",children:r}),e[24]=r,e[25]=f):f=e[25];let d;return e[26]!==o||e[27]!==u||e[28]!==f?(d=a.jsx(Q,{title:o,description:u,children:f}),e[26]=o,e[27]=u,e[28]=f,e[29]=d):d=e[29],d}function at(t){return[t.jiraStatus,t.prompt]}function rt(t){const e=N.c(22),{columnName:n,status:s,showStatus:i,hasAutomation:l,prompt:r}=t,o=K(),u=He(),[f,d]=J.useState(r??""),[c,m]=J.useState(r);c!==r&&(m(r),d(r??""));let g;e[0]!==u||e[1]!==s||e[2]!==o?(g=S=>u.mutate({jiraStatus:s,prompt:S},{onError:v=>q.error(Y(v,o("settings.jira.saveFailed")))}),e[0]=u,e[1]=s,e[2]=o,e[3]=g):g=e[3];const p=g;let b;e[4]!==n?(b=a.jsx("span",{className:"truncate text-sm font-medium",children:n}),e[4]=n,e[5]=b):b=e[5];let j;e[6]!==i||e[7]!==s?(j=i&&a.jsx("span",{className:"truncate text-xs text-muted-foreground",children:s}),e[6]=i,e[7]=s,e[8]=j):j=e[8];let x;e[9]!==b||e[10]!==j?(x=a.jsxs("div",{className:"flex flex-col min-w-0",children:[b,j]}),e[9]=b,e[10]=j,e[11]=x):x=e[11];let h;e[12]!==f||e[13]!==l||e[14]!==r||e[15]!==p||e[16]!==s||e[17]!==o?(h=l?a.jsxs("div",{className:"flex flex-col gap-2 rounded-lg bg-muted/40 p-2.5",children:[a.jsxs("div",{className:"flex items-center justify-between gap-2",children:[a.jsx("span",{className:"text-xs font-medium",children:o("settings.jira.automationOn")}),a.jsx(H,{variant:"ghost",size:"sm","aria-label":o("settings.jira.removeAriaLabel",{status:s}),onClick:()=>p(null),children:a.jsx(pe,{size:14})})]}),a.jsx(de,{value:f,rows:2,placeholder:o("settings.jira.promptPlaceholder"),onChange:S=>d(S.target.value),onBlur:()=>{f!==(r??"")&&p(f)},"data-jira-automation-prompt":s}),a.jsx("p",{className:"text-xs text-muted-foreground",children:o("settings.jira.promptHelp")})]}):a.jsxs(H,{variant:"outline",size:"sm",className:"w-fit",onClick:()=>p(""),children:[a.jsx(ge,{size:14}),o("settings.jira.addAutomation")]}),e[12]=f,e[13]=l,e[14]=r,e[15]=p,e[16]=s,e[17]=o,e[18]=h):h=e[18];let y;return e[19]!==x||e[20]!==h?(y=a.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border p-3",children:[x,h]}),e[19]=x,e[20]=h,e[21]=y):y=e[21],y}function ot(t){const e=N.c(16),{integration:n}=t,s=K(),i=le();let l;e[0]!==s?(l=s("settings.jira.enabledLabel"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==s?(r=s("settings.jira.enabledDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==n.boardId||e[5]!==s||e[6]!==i?(o=d=>{if(d&&!n.boardId){q.error(s("settings.jira.enableRequirements"));return}i.mutate({enabled:d},{onError:c=>q.error(Y(c,s("settings.jira.saveFailed")))})},e[4]=n.boardId,e[5]=s,e[6]=i,e[7]=o):o=e[7];let u;e[8]!==n.enabled||e[9]!==o||e[10]!==i.isPending?(u=a.jsx(we,{checked:n.enabled,disabled:i.isPending,onCheckedChange:o}),e[8]=n.enabled,e[9]=o,e[10]=i.isPending,e[11]=u):u=e[11];let f;return e[12]!==l||e[13]!==r||e[14]!==u?(f=a.jsx(Q,{title:l,description:r,action:u}),e[12]=l,e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function ct(t){const e=N.c(24),{integration:n}=t,s=K(),i=`${window.location.origin}/api/_jira/webhook/${n.webhookSecret}`;let l;e[0]!==s?(l=s("settings.jira.webhookTitle"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==s?(r=s("settings.jira.webhookDescription"),e[2]=s,e[3]=r):r=e[3];let o;e[4]!==i?(o=a.jsx(ee,{readOnly:!0,value:i,className:"font-mono text-xs"}),e[4]=i,e[5]=o):o=e[5];let u;e[6]!==s||e[7]!==i?(u=()=>{navigator.clipboard.writeText(i),q.success(s("settings.jira.webhookCopied"))},e[6]=s,e[7]=i,e[8]=u):u=e[8];let f;e[9]!==s?(f=s("settings.jira.webhookCopy"),e[9]=s,e[10]=f):f=e[10];let d;e[11]!==u||e[12]!==f?(d=a.jsx(H,{variant:"outline",size:"sm",className:"shrink-0",onClick:u,children:f}),e[11]=u,e[12]=f,e[13]=d):d=e[13];let c;e[14]!==o||e[15]!==d?(c=a.jsxs("div",{className:"flex items-center gap-2",children:[o,d]}),e[14]=o,e[15]=d,e[16]=c):c=e[16];let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Ze,{stepKeys:["settings.jira.webhookStep1","settings.jira.webhookStep2","settings.jira.webhookStep3","settings.jira.webhookStep4","settings.jira.webhookStep5"]}),e[17]=m):m=e[17];let g;e[18]!==c?(g=a.jsxs("div",{className:"flex flex-col gap-3 mt-3",children:[c,m]}),e[18]=c,e[19]=g):g=e[19];let p;return e[20]!==l||e[21]!==r||e[22]!==g?(p=a.jsx(Q,{title:l,description:r,children:g}),e[20]=l,e[21]=r,e[22]=g,e[23]=p):p=e[23],p}function dt(){const t=N.c(23),e=K(),n=Me();if(n.isPending){let d;return t[0]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(Z,{children:a.jsx("div",{className:"p-4",children:a.jsx(ie,{className:"h-40 w-full"})})}),t[0]=d):d=t[0],d}if(!n.data){let d;t[1]!==e?(d=e("settings.jira.connectTitle"),t[1]=e,t[2]=d):d=t[2];let c;t[3]!==e?(c=e("settings.jira.connectDescription"),t[3]=e,t[4]=c):c=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(et,{}),t[5]=m):m=t[5];let g;return t[6]!==d||t[7]!==c?(g=a.jsx(Z,{children:a.jsx(Q,{title:d,description:c,children:m})}),t[6]=d,t[7]=c,t[8]=g):g=t[8],g}const s=n.data;let i,l;t[9]!==s?(i=a.jsx(tt,{integration:s}),l=a.jsx(st,{integration:s}),t[9]=s,t[10]=i,t[11]=l):(i=t[10],l=t[11]);let r;t[12]!==s.boardId?(r=s.boardId&&a.jsx(nt,{boardId:s.boardId}),t[12]=s.boardId,t[13]=r):r=t[13];let o,u;t[14]!==s?(o=a.jsx(ot,{integration:s}),u=a.jsx(ct,{integration:s}),t[14]=s,t[15]=o,t[16]=u):(o=t[15],u=t[16]);let f;return t[17]!==i||t[18]!==l||t[19]!==r||t[20]!==o||t[21]!==u?(f=a.jsxs(Z,{children:[i,l,r,o,u]}),t[17]=i,t[18]=l,t[19]=r,t[20]=o,t[21]=u,t[22]=f):f=t[22],f}function mt(){const t=N.c(18),e=K();let n;t[0]!==e?(n=e("settings.nav.tasks"),t[0]=e,t[1]=n):n=t[1];let s;t[2]!==n?(s=a.jsx(X.Title,{children:n}),t[2]=n,t[3]=s):s=t[3];let i,l,r;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(Oe,{}),l=a.jsx(Ye,{}),r=a.jsx($e,{}),t[4]=i,t[5]=l,t[6]=r):(i=t[4],l=t[5],r=t[6]);let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=a.jsx(Le,{size:18}),t[7]=o):o=t[7];let u;t[8]!==e?(u=e("settings.jira.sectionTitle"),t[8]=e,t[9]=u):u=t[9];let f;t[10]!==u?(f=a.jsxs("span",{className:"flex items-center gap-2",children:[o,u]}),t[10]=u,t[11]=f):f=t[11];let d;t[12]===Symbol.for("react.memo_cache_sentinel")?(d=a.jsx(dt,{}),t[12]=d):d=t[12];let c;t[13]!==f?(c=a.jsx(re,{title:f,children:d}),t[13]=f,t[14]=c):c=t[14];let m;return t[15]!==s||t[16]!==c?(m=a.jsx(X,{children:a.jsx(X.Content,{children:a.jsx(X.Body,{children:a.jsxs(fe,{children:[s,i,l,r,c]})})})}),t[15]=s,t[16]=c,t[17]=m):m=t[17],m}function Dt(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx(Be,{capability:"org:manage",area:"settings",children:a.jsx(mt,{})}),t[0]=e):e=t[0],e}export{Dt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o,l,j as n}from"./index-
|
|
1
|
+
import{c as o,l,j as n}from"./index-lSAvH_rL.js";function c(s){const e=o.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=l("placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex field-sizing-content min-h-16 w-full rounded-xl bg-background dark:bg-input/30 px-3 py-2 text-sm transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:cursor-not-allowed disabled:opacity-50",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=n.jsx("textarea",{"data-slot":"textarea",className:t,...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as h}from"./slugify-CEUa2lfQ.js";import{J as m}from"./index-lSAvH_rL.js";function c(r){const t=r?.trim();if(!t)return null;try{const n=new URL(t);return n.protocol!=="http:"&&n.protocol!=="https:"?null:n.href}catch{return null}}function d(r){return c(r?.previewServerUrl)??c(r?.productionUrl)}function I(r){return r?.find(t=>t.production)?.domain??r?.[0]?.domain}function p(r){const t=r?.trim();if(!t)return null;const n=/^https?:\/\//i.test(t)?t:`https://${t}`;return c(n)}function S(r){const t=h(r??"");return t?p(`${t}.deco.site`):null}function l(r){return r==="cms"||r==="sandbox"?r:null}function w(r){return!!d(r)&&r?.fastPreview===!0}function y(r){return w(r)?"cms":"sandbox"}function T(r,t){return l(r?.runtime)??y(t)}function a(r,t){return m.chatThreadIntent(r,t)}function U(r,t,n,e){if(!(!e.runtime&&!e.branch))try{r.setItem(a(t,n),JSON.stringify(e))}catch{}}function g(r,t,n){try{r.removeItem(a(t,n))}catch{}}function P(r,t,n){const e=a(t,n);let u=null;try{u=r.getItem(e),r.removeItem(e)}catch{return{}}if(!u)return{};let i;try{i=JSON.parse(u)}catch{return{}}if(!i||typeof i!="object")return{};const o=i,s=l(o.runtime),f=typeof o.branch=="string"&&o.branch?o.branch:void 0;return{...s?{runtime:s}:{},...f?{branch:f}:{}}}export{d as a,p as b,P as c,y as d,g as e,S as f,I as g,l as p,T as r,c as s,U as w};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as y,b as T,j as i,B as L,r as O,J as U,u as k,f as D,W as E,d as V,Z as H,y as z,dy as B}from"./index-lSAvH_rL.js";import{d as J,h as K,c as F,b as G,D as W}from"./dialog-BdUmjS4-.js";import{i as Y}from"./Check-CxhsqO-U.js";import{a as Q}from"./Copy01-Bmz39xbH.js";import{n as X}from"./Download01-CPeLy8ol.js";import{u as M,D as j}from"./use-destination-route-CTNH3xDX.js";import{a as $}from"./constants-DNuUCxmW.js";const Z="https://github.com/decocms/studio/releases";function q(){return`curl -fsSL ${window.location.origin}/install.sh | sh`}function ee(e){return`https://github.com/decocms/studio/releases/download/native-v${e}/deco-${e}-linux-x86_64.AppImage`}function we(){return typeof navigator<"u"&&/Mac/.test(navigator.platform)&&!("ontouchend"in document)}function te(){return typeof navigator<"u"&&/Linux/.test(navigator.platform)&&!/Android/.test(navigator.userAgent)&&!("ontouchend"in document)}async function ne(e,t){if(!e)return!1;try{return await e.writeText(t),!0}catch{return!1}}function P(e){const t=y.c(12),{copiedLabel:n}=e,s=T(),[o,r]=O.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=q(),t[0]=l):l=t[0];const a=l;let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("code",{className:"block rounded-md border bg-muted px-3 py-2.5 font-mono text-xs leading-relaxed break-all whitespace-pre-wrap select-all",children:a}),t[1]=c):c=t[1];let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{ne(navigator.clipboard,a).then(p=>{p&&(r(!0),setTimeout(()=>r(!1),2e3))})},t[2]=d):d=t[2];let u;t[3]!==o?(u=o?i.jsx(Y,{size:16}):i.jsx(Q,{size:16}),t[3]=o,t[4]=u):u=t[4];let f;t[5]!==o||t[6]!==n||t[7]!==s?(f=o?n:s("downloadApp.copyLabel"),t[5]=o,t[6]=n,t[7]=s,t[8]=f):f=t[8];let m;return t[9]!==u||t[10]!==f?(m=i.jsxs("div",{className:"flex flex-col gap-3",children:[c,i.jsxs(L,{type:"button",className:"w-full gap-2",onClick:d,children:[u,f]})]}),t[9]=u,t[10]=f,t[11]=m):m=t[11],m}function oe(){const e=y.c(18),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabel"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.terminalHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.appleSiliconNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;return e[15]!==s||e[16]!==c?(d=i.jsxs(i.Fragment,{children:[s,c]}),e[15]=s,e[16]=c,e[17]=d):d=e[17],d}function se(){const e=y.c(42),t=T();let n;e[0]!==t?(n=t("downloadApp.copiedLabelLinux"),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==n?(s=i.jsx(P,{copiedLabel:n}),e[2]=n,e[3]=s):s=e[3];let o;e[4]!==t?(o=t("downloadApp.linuxInstallerHint"),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==o?(r=i.jsx("p",{children:o}),e[6]=o,e[7]=r):r=e[7];let l;e[8]!==t?(l=t("downloadApp.linuxArchNote"),e[8]=t,e[9]=l):l=e[9];let a;e[10]!==l?(a=i.jsx("p",{children:l}),e[10]=l,e[11]=a):a=e[11];let c;e[12]!==r||e[13]!==a?(c=i.jsxs("div",{className:"flex flex-col gap-1 text-xs text-muted-foreground",children:[r,a]}),e[12]=r,e[13]=a,e[14]=c):c=e[14];let d;e[15]!==t?(d=t("downloadApp.linuxDirectDownloadHint"),e[15]=t,e[16]=d):d=e[16];let u;e[17]!==d?(u=i.jsx("p",{children:d}),e[17]=d,e[18]=u):u=e[18];let f;e[19]===Symbol.for("react.memo_cache_sentinel")?(f=ee("4.330.0"),e[19]=f):f=e[19];let m;e[20]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(X,{size:14}),e[20]=m):m=e[20];let p;e[21]!==t?(p=t("downloadApp.downloadAppImage"),e[21]=t,e[22]=p):p=e[22];let h;e[23]!==p?(h=i.jsx(L,{asChild:!0,variant:"outline",size:"sm",className:"gap-2",children:i.jsxs("a",{href:f,rel:"noreferrer",children:[m,p]})}),e[23]=p,e[24]=h):h=e[24];let S;e[25]!==t?(S=t("downloadApp.linuxChmodHint"),e[25]=t,e[26]=S):S=e[26];let I;e[27]!==S?(I=i.jsx("p",{children:S}),e[27]=S,e[28]=I):I=e[28];let g;e[29]!==t?(g=t("downloadApp.allReleases"),e[29]=t,e[30]=g):g=e[30];let x;e[31]!==g?(x=i.jsx("a",{href:Z,target:"_blank",rel:"noreferrer",className:"underline-offset-2 hover:text-foreground hover:underline",children:g}),e[31]=g,e[32]=x):x=e[32];let A;e[33]!==h||e[34]!==I||e[35]!==x||e[36]!==u?(A=i.jsxs("div",{className:"flex flex-col items-start gap-2 border-t pt-4 text-xs text-muted-foreground",children:[u,h,I,x]}),e[33]=h,e[34]=I,e[35]=x,e[36]=u,e[37]=A):A=e[37];let _;return e[38]!==s||e[39]!==A||e[40]!==c?(_=i.jsxs(i.Fragment,{children:[s,c,A]}),e[38]=s,e[39]=A,e[40]=c,e[41]=_):_=e[41],_}function je(e){const t=y.c(19),{open:n,onOpenChange:s}=e,o=T();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=te(),t[0]=r):r=t[0];const l=r;let a;t[1]!==o?(a=o("downloadApp.title"),t[1]=o,t[2]=a):a=t[2];let c;t[3]!==a?(c=i.jsx(J,{children:a}),t[3]=a,t[4]=c):c=t[4];let d;t[5]!==o?(d=o(l?"downloadApp.linuxDescription":"downloadApp.description"),t[5]=o,t[6]=d):d=t[6];let u;t[7]!==d?(u=i.jsx(K,{children:d}),t[7]=d,t[8]=u):u=t[8];let f;t[9]!==c||t[10]!==u?(f=i.jsxs(F,{children:[c,u]}),t[9]=c,t[10]=u,t[11]=f):f=t[11];let m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=l?i.jsx(se,{}):i.jsx(oe,{}),t[12]=m):m=t[12];let p;t[13]!==f?(p=i.jsxs(G,{className:"sm:max-w-md",children:[f,m]}),t[13]=f,t[14]=p):p=t[14];let h;return t[15]!==s||t[16]!==n||t[17]!==p?(h=i.jsx(W,{open:n,onOpenChange:s,children:p}),t[15]=s,t[16]=n,t[17]=p,t[18]=h):h=t[18],h}const re=1e4,Te="true",R=2;function N(e,t){return U.chatAutosend(e,t)}function ae(e){return e==="pending"||e==="sending"}function le(e){if(!e)return null;let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!="object")return null;const n=t;let s=0;n.status==="sending"?s=n.retryAt===void 0?1:R:n.retryAt!==void 0&&(s=1);const o=n.attempt===void 0?s:n.attempt;return typeof n.createdAt!="number"||typeof n.message!="object"||!ae(n.status)||n.retryAt!==void 0&&typeof n.retryAt!="number"||typeof o!="number"||!Number.isInteger(o)||o<0||o>R?null:{...t,attempt:o}}function De(e,t,n,s,o=Date.now()){const r={message:s,createdAt:o,status:"pending",attempt:0};return e.setItem(N(t,n),JSON.stringify(r)),r}function ie(e,t,n){const s=N(t,n),o=le(e.getItem(s));return o||(e.removeItem(s),null)}function Ne(e,t,n,s=Date.now()){const o=N(t,n),r=ie(e,t,n);if(!r||r.status!=="pending")return null;if(r.attempt>=R)return e.removeItem(o),null;const l=r.retryAt??r.createdAt;if(s-l>=re)return e.removeItem(o),null;const a={...r,status:"sending",attempt:r.attempt+1};return e.setItem(o,JSON.stringify(a)),{message:a.message,createdAt:a.createdAt,attempt:a.attempt}}function Re(e,t,n){e.removeItem(N(t,n))}const ce="/shell/$org/org-shell/agent-shell";function de(e){return e.threadInSearch||!e.threadId?{to:"."}:{to:"/$org/$taskId",params:{org:e.orgSlug,taskId:e.threadId}}}function ue(e){return e.taskIdParam??e.threadSearch??null}function ke(){const e=y.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const o=k(s);let r;return e[2]!==n.taskId||e[3]!==o.thread?(r=ue({taskIdParam:n.taskId,threadSearch:o.thread}),e[2]=n.taskId,e[3]=o.thread,e[4]=r):r=e[4],r}function fe(e){return(e.onAgentsRoute||e.onHomeRoute||e.legacyRoute)&&e.virtualMcpIdSearch||void 0}function me(){const e=y.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0],D(t).taskId!==void 0}function pe(){const e=y.c(6);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=k(t),s=M(),o=me(),r=s===j.agents,l=s===j.home;let a;return e[1]!==o||e[2]!==n.virtualmcpid||e[3]!==r||e[4]!==l?(a=fe({virtualMcpIdSearch:n.virtualmcpid,onAgentsRoute:r,onHomeRoute:l,legacyRoute:o}),e[1]=o,e[2]=n.virtualmcpid,e[3]=r,e[4]=l,e[5]=a):a=e[5],a}function Le(){const e=y.c(3),{org:t}=E(),n=pe();let s;return e[0]!==t||e[1]!==n?(s=n??$(t.id).id,e[0]=t,e[1]=n,e[2]=s):s=e[2],s}function he(e){const{virtualmcpid:t,...n}=e.changes;return{...e.prev,...n,thread:e.threadId}}function Ee(e){return e.routeAgentId??e.threadVirtualMcpId??null}function ge(e){if(e.targetVirtualMcpId===void 0)return{kind:"stay",project:e.currentProject};const t=e.targetVirtualMcpId===e.decopilotId?void 0:e.targetVirtualMcpId;return t!==void 0&&e.currentProject===void 0?{kind:"relocate",project:t}:{kind:"stay",project:t}}function xe(){const e=y.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const n=D(t);let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s={from:ce,shouldThrow:!1},e[1]=s):s=e[1],!!H(s)&&n.taskId===void 0}function Me(){const e=y.c(12),t=V();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const s=D(n),o=xe(),{org:r}=E(),l=s.org??"",a=M()===j.agents;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},e[1]=c):c=e[1];const d=k(c),u=a?d.virtualmcpid:void 0,f=s.panel;let m;e[2]!==r.id?(m=$(r.id),e[2]=r.id,e[3]=m):m=e[3];const p=m.id;let h;return e[4]!==f||e[5]!==u||e[6]!==p||e[7]!==t||e[8]!==a||e[9]!==l||e[10]!==o?(h=(S,I,g)=>{const x=de({threadInSearch:o,orgSlug:l,threadId:S}),A=g?.replace??!1;if(x.to==="/$org/$taskId")return t({to:x.to,params:x.params,search:I,replace:A});const _=ge({currentProject:u,targetVirtualMcpId:g?.virtualMcpId,decopilotId:p}),w=g?.view&&g.view.tabId!==void 0?z(g.view.tabId):g?.view?{panel:void 0,payload:B()}:null,C=_.kind==="relocate"&&!a,b=v=>he({prev:C?{sidepanel:v.sidepanel}:v,changes:{...I(v),...w?.payload??{}},threadId:S});return _.kind==="relocate"?t({to:j.agents,params:{org:l,panel:w?w.panel:f},search:v=>({...typeof b=="function"?b(v):b,virtualmcpid:_.project}),replace:A}):t({to:".",params:v=>w?{...v,panel:w.panel}:v,search:v=>({...typeof b=="function"?b(v):b,...a?{virtualmcpid:_.project}:{}}),replace:A})},e[4]=f,e[5]=u,e[6]=p,e[7]=t,e[8]=a,e[9]=l,e[10]=o,e[11]=h):h=e[11],h}export{Te as A,je as D,te as a,Me as b,ke as c,Le as d,Ne as e,Re as f,we as i,Ee as r,pe as u,De as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as x,bp as b,j as c,bm as m,bs as k,b9 as p,du as M,dv as T,br as S,dw as A,bo as F,bC as $,c as C,l as P}from"./index-
|
|
1
|
+
import{r as x,bp as b,j as c,bm as m,bs as k,b9 as p,du as M,dv as T,br as S,dw as A,bo as F,bC as $,c as C,l as P}from"./index-lSAvH_rL.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:k(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(V=>V!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,H]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=H(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),L=h,U=N;const q=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),E=x.createContext({size:"default",variant:"default"});function K(r){const e=C.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=P("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(E.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(L,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=C.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(E),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=P(q({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(U,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{K as T,Q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as r,r as f,j as c,l as T,aB as g}from"./index-
|
|
1
|
+
import{c as r,r as f,j as c,l as T,aB as g}from"./index-lSAvH_rL.js";const h=f.createContext(null);function m(){const l=f.use(h);if(!l)throw new Error("Toolbar.* must be used inside <Toolbar>");return l}function E(l){const e=r.c(8),{children:t}=l,[s,n]=f.useState(null),[o,a]=f.useState(null),[x,j]=f.useState(null),[b,p]=f.useState(null);let u;e[0]!==x||e[1]!==b||e[2]!==o||e[3]!==s?(u={togglesEl:s,setTogglesEl:n,tabsEl:o,setTabsEl:a,centerEl:x,setCenterEl:j,rightEl:b,setRightEl:p},e[0]=x,e[1]=b,e[2]=o,e[3]=s,e[4]=u):u=e[4];let d;return e[5]!==t||e[6]!==u?(d=c.jsx(h,{value:u,children:t}),e[5]=t,e[6]=u,e[7]=d):d=e[7],d}function i(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx(E,{children:c.jsx("div",{className:"flex flex-col h-full min-h-0",children:t})}),e[0]=t,e[1]=s):s=e[1],s}function C(l){const e=r.c(10);let t,s,n;e[0]!==l?({children:t,className:s,...n}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=n):(t=e[1],s=e[2],n=e[3]);let o;e[4]!==s?(o=T("relative z-10 shrink-0 grid grid-cols-3 items-center pl-1 pr-2 h-12 bg-sidebar",s),e[4]=s,e[5]=o):o=e[5];let a;return e[6]!==t||e[7]!==n||e[8]!==o?(a=c.jsx("div",{className:o,...n,children:t}),e[6]=t,e[7]=n,e[8]=o,e[9]=a):a=e[9],a}function v(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:t}),e[0]=t,e[1]=s):s=e[1],s}function S(l){const e=r.c(2),{children:t}=l;let s;return e[0]!==t?(s=c.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:t}),e[0]=t,e[1]=s):s=e[1],s}function N(){const l=r.c(2),{setCenterEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),l[0]=e,l[1]=t):t=l[1],t}function $(l){const e=r.c(3),{children:t}=l,{centerEl:s}=m();if(!s)return null;let n;return e[0]!==s||e[1]!==t?(n=g.createPortal(t,s),e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function R(l){const e=r.c(5),{className:t}=l,{setTabsEl:s}=m();let n;e[0]!==t?(n=T("shrink-0 flex items-center",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function w(l){const e=r.c(3),{children:t}=l,{tabsEl:s}=m();if(!s)return null;let n;return e[0]!==t||e[1]!==s?(n=g.createPortal(t,s),e[0]=t,e[1]=s,e[2]=n):n=e[2],n}function y(l){const e=r.c(5),{className:t}=l,{setTogglesEl:s}=m();let n;e[0]!==t?(n=T("contents",t),e[0]=t,e[1]=n):n=e[1];let o;return e[2]!==s||e[3]!==n?(o=c.jsx("div",{ref:s,className:n}),e[2]=s,e[3]=n,e[4]=o):o=e[4],o}function P(){const l=r.c(2),{setRightEl:e}=m();let t;return l[0]!==e?(t=c.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),l[0]=e,l[1]=t):t=l[1],t}i.Provider=E;i.Header=C;i.LeftColumn=v;i.RightColumn=S;i.CenterSlot=N;i.Center=$;i.TabsSlot=R;i.Tabs=w;i.TogglesSlot=y;i.RightSlot=P;export{i as T};
|
package/dist/client/assets/{toolbar-icon-button-BJozCrFv.js → toolbar-icon-button-CGvKs4Hb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,l as u,j as b}from"./index-
|
|
1
|
+
import{c as f,l as u,j as b}from"./index-lSAvH_rL.js";const d="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease]",d,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground")}function g(n){const e=f.c(14);let o,s,t,r,c;e[0]!==n?({active:o,className:s,ref:r,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=r,e[5]=c):(o=e[1],s=e[2],t=e[3],r=e[4],c=e[5]);const a=c===void 0?"button":c;let i;e[6]!==o||e[7]!==s?(i=u("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md","max-md:[&_svg]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=i):i=e[8];let l;return e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==a?(l=b.jsx("button",{ref:r,type:a,className:i,...t}),e[9]=t,e[10]=r,e[11]=i,e[12]=a,e[13]=l):l=e[13],l}export{d as I,g as T,m as p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as _,T as l}from"./index-
|
|
1
|
+
import{q as _,T as l}from"./index-lSAvH_rL.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ce as p,aj as t,ak as v,ag as a,c$ as q,ae as s,ah as g,af as u,am as h,ao as x,cc as O,d0 as fe,d1 as be,d2 as B,d3 as j,d4 as ye,d5 as ve,d6 as $,d7 as _e,d8 as He,d9 as Me,da as ke,db as Pe,dc as qe,dd as Te,de as Ie,cq as Ee,df as Le,dg as ze,dh as Ae,di as De,dj as Ue,dk as Ne,dl as Oe,co as je,r as oe,c as V,j as y,dm as Be,dn as $e,o as Ve,v as Fe,l as se,h as We}from"./index-
|
|
1
|
+
import{ce as p,aj as t,ak as v,ag as a,c$ as q,ae as s,ah as g,af as u,am as h,ao as x,cc as O,d0 as fe,d1 as be,d2 as B,d3 as j,d4 as ye,d5 as ve,d6 as $,d7 as _e,d8 as He,d9 as Me,da as ke,db as Pe,dc as qe,dd as Te,de as Ie,cq as Ee,df as Le,dg as ze,dh as Ae,di as De,dj as Ue,dk as Ne,dl as Oe,co as je,r as oe,c as V,j as y,dm as Be,dn as $e,o as Ve,v as Fe,l as se,h as We}from"./index-lSAvH_rL.js";import{P as Ke}from"./use-mcp-client-llSiXbX8.js";const ce=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ze(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ye(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,l=r.match(n);if(l){const f=(l.index??0)+l[0].length;return r.slice(0,f)+`
|
|
2
2
|
`+i+r.slice(f)}const c=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,d=r.match(c);if(d){const f=(d.index??0)+d[0].length;return r.slice(0,f)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|