decocms 4.320.0 → 4.321.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-DZjE_Y0H.js → AlertCircle-DTA-xmN8.js} +1 -1
- package/dist/client/assets/{AreaChart-DIFD2336.js → AreaChart-DWzH4cl2.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BsR-6m6j.js → ArrowLeft-DJHyaGVg.js} +1 -1
- package/dist/client/assets/{ArrowUp-UBHjzAp-.js → ArrowUp-B56zz92l.js} +1 -1
- package/dist/client/assets/{Check-CA6oOwnk.js → Check-yANPvlWH.js} +1 -1
- package/dist/client/assets/{CheckCircle-BaphLiUh.js → CheckCircle-CEm5M3Tl.js} +1 -1
- package/dist/client/assets/{ChevronRight-C1PKtWq_.js → ChevronRight-D_8iRnVD.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-uLPnhvHf.js → ChevronSelectorVertical-CDr8Ovfg.js} +1 -1
- package/dist/client/assets/{ChevronUp-BWJ43Ad_.js → ChevronUp-D9JVuW7G.js} +1 -1
- package/dist/client/assets/{Copy01-DHhdbM_J.js → Copy01-ZnkwptEM.js} +1 -1
- package/dist/client/assets/{CreditCard01-BewJRmPb.js → CreditCard01-DBOo-aYq.js} +1 -1
- package/dist/client/assets/{DotsVertical-CuAwCaPW.js → DotsVertical-mvRvTh6x.js} +1 -1
- package/dist/client/assets/{Download01-R47mE7bD.js → Download01-CeBHR-fX.js} +1 -1
- package/dist/client/assets/{ErrorBarContext-eD_UIVvY.js → ErrorBarContext-CMbUifoM.js} +1 -1
- package/dist/client/assets/{Eye-D3bCBJMo.js → Eye-ggEjyhYq.js} +1 -1
- package/dist/client/assets/{GitBranch01-CjfnHX9l.js → GitBranch01-DZEodcVR.js} +1 -1
- package/dist/client/assets/{Globe01-DeCmIrD5.js → Globe01-Dj13xfTI.js} +1 -1
- package/dist/client/assets/{HardDrive-BpRcIm2Z.js → HardDrive-Bkrrs0FV.js} +1 -1
- package/dist/client/assets/{Image01-CStOAxG7.js → Image01-DfTbYbFE.js} +1 -1
- package/dist/client/assets/{Key01-ICcTBF9U.js → Key01-BBxtRrGm.js} +1 -1
- package/dist/client/assets/{Link01-CLzBJa_Z.js → Link01-DUUbBvGo.js} +1 -1
- package/dist/client/assets/{LinkExternal01-w2j8lCTU.js → LinkExternal01-61qG-hFo.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-CbuTs0EA.js → LockUnlocked01-BfX9zVyU.js} +1 -1
- package/dist/client/assets/{Monitor01-CMjB6a1I.js → Monitor01-Cvj67Ryv.js} +1 -1
- package/dist/client/assets/{Package-BOH9DZQ0.js → Package-B4jzjbE8.js} +1 -1
- package/dist/client/assets/{Palette-CVvoWFYM.js → Palette-CXReGsk_.js} +1 -1
- package/dist/client/assets/{Play-Bn8_HZzx.js → Play-kr1GKsAc.js} +1 -1
- package/dist/client/assets/{Plus-DZ-r7ICl.js → Plus-Bz1cAYCY.js} +1 -1
- package/dist/client/assets/{SearchMd-BpXAT-eZ.js → SearchMd-DN6cu6SZ.js} +1 -1
- package/dist/client/assets/{Sector-fzRIcAmV.js → Sector-DidaJ4gW.js} +1 -1
- package/dist/client/assets/{Settings02-CkPf5bSQ.js → Settings02-C39ViKVB.js} +1 -1
- package/dist/client/assets/{Share07-P3qF7VX0.js → Share07-vMCtuazW.js} +1 -1
- package/dist/client/assets/{Shield01-BhVJtpaL.js → Shield01-SPzOFIU1.js} +1 -1
- package/dist/client/assets/{Stars01-Dxt-GRKF.js → Stars01-q62Ogx-P.js} +1 -1
- package/dist/client/assets/{Sun-ZKlmnxLK.js → Sun-B3CG15-H.js} +1 -1
- package/dist/client/assets/{ThumbsUp-BFZZTKVU.js → ThumbsUp-DV6K5Csu.js} +1 -1
- package/dist/client/assets/{Tool01-Cz6q9HPW.js → Tool01-DP3BW23e.js} +1 -1
- package/dist/client/assets/{Tool02-Dh-KcCDo.js → Tool02-DT-zZ1ks.js} +1 -1
- package/dist/client/assets/{Trash01-BDaDkc_-.js → Trash01-D5j2YoAs.js} +1 -1
- package/dist/client/assets/{TrendUp01-gaB_ebZy.js → TrendUp01-CaNIYwx8.js} +1 -1
- package/dist/client/assets/{Upload01-BaOVc9nV.js → Upload01-DSJ1fWRp.js} +1 -1
- package/dist/client/assets/{User01-CvjutW7d.js → User01-Bq-AsdvG.js} +1 -1
- package/dist/client/assets/{UserSquare-DXupINNG.js → UserSquare-DGuYrk9Q.js} +1 -1
- package/dist/client/assets/{Users01-BYJLxdvv.js → Users01-CS6rfCga.js} +1 -1
- package/dist/client/assets/{Users03-DOh7pHdk.js → Users03-BnbWbfJy.js} +1 -1
- package/dist/client/assets/{XCircle-DQV3a8ui.js → XCircle-Dlv7pZja.js} +1 -1
- package/dist/client/assets/{XClose-Dciq0-47.js → XClose-BNIppwTn.js} +1 -1
- package/dist/client/assets/{Zap-BeDIMc43.js → Zap-CywbYsFI.js} +1 -1
- package/dist/client/assets/{ZoomOut-C3_0q9Na.js → ZoomOut-jLe5z2Gu.js} +1 -1
- package/dist/client/assets/{access-gate-asM9jXYM.js → access-gate-CgF7Ajgl.js} +1 -1
- package/dist/client/assets/{agent-icon-C7HwxMy2.js → agent-icon-D-9pJpLD.js} +1 -1
- package/dist/client/assets/{agents-list-BDCETOyD.js → agents-list-Bp5Z7NYF.js} +1 -1
- package/dist/client/assets/{ai-providers-DAeDnbZL.js → ai-providers-BxXtxvrC.js} +1 -1
- package/dist/client/assets/{alert-kAvO_IQi.js → alert-DlKRUXrR.js} +1 -1
- package/dist/client/assets/{alert-dialog-1uO7Q1_D.js → alert-dialog-D3FLXTEj.js} +1 -1
- package/dist/client/assets/{analytics-tab-DGo7bHoB.js → analytics-tab-BfjNGR6F.js} +1 -1
- package/dist/client/assets/api-keys-DpAgTJhn.js +1 -0
- package/dist/client/assets/{api-keys-BMnD4InK.js → api-keys-DyNVpi-W.js} +1 -1
- package/dist/client/assets/app-editor-Zo3b9Buj.js +1 -0
- package/dist/client/assets/{auth-CyxtW7VU.js → auth-CeWlFDdC.js} +1 -1
- package/dist/client/assets/{auth-catchall-BgPXl6l7.js → auth-catchall-D7POTu6Q.js} +1 -1
- package/dist/client/assets/{auth-entry-itFULZ8Z.js → auth-entry-COCcX5A_.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BsnYR-yK.js → auth-split-layout-BG8u1Dhb.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BH26XKT9.js → authenticate-and-persist-oauth-CxGKh8aj.js} +1 -1
- package/dist/client/assets/{automation-list-row-fcDYKNgJ.js → automation-list-row-Dr9aH5cl.js} +1 -1
- package/dist/client/assets/{automation-runs-BPY4nydY.js → automation-runs-D-MsqDZA.js} +1 -1
- package/dist/client/assets/{automations-BfJlUnUa.js → automations-DmzNjC10.js} +1 -1
- package/dist/client/assets/{avatar-CxjMK0xh.js → avatar-CsipcR4h.js} +1 -1
- package/dist/client/assets/{badge-Dx14P1uf.js → badge-Cr2fQRq8.js} +1 -1
- package/dist/client/assets/{block-document-6TSCP-wD.js → block-document-CPpzuDJ1.js} +1 -1
- package/dist/client/assets/{breadcrumb-B9-pZnD9.js → breadcrumb-BOw37uby.js} +1 -1
- package/dist/client/assets/{buckets-Dtq5LgxY.js → buckets-BhMvQpB6.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-Clsi9QbK.js → bulk-category-panel-lgnUhRZs.js} +1 -1
- package/dist/client/assets/{capability-load-error-CUNqj87m.js → capability-load-error-D2I8YlS5.js} +1 -1
- package/dist/client/assets/{cards-BLVEB5RL.js → cards-Ckz_jSmB.js} +1 -1
- package/dist/client/assets/{category-editor-DmSBVcZu.js → category-editor-CUeNF_8r.js} +1 -1
- package/dist/client/assets/{cdn-tab-CBrImPtE.js → cdn-tab-EuSTLp5_.js} +1 -1
- package/dist/client/assets/{chart-DlBzaqfk.js → chart-BIwqiDqG.js} +1 -1
- package/dist/client/assets/{chat-context-mKzm57ri.js → chat-context-oSgRN_kR.js} +1 -1
- package/dist/client/assets/{checkbox-BtMOjQuM.js → checkbox-DRf1c0rh.js} +1 -1
- package/dist/client/assets/{choose-editor-CorMEUQ9.js → choose-editor-Pdurttdh.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DgbatUEd.js → cli-auth-success-CAWRFjR6.js} +1 -1
- package/dist/client/assets/{client-icons-D7u-J_pd.js → client-icons-BFT3ByhX.js} +1 -1
- package/dist/client/assets/{collection-detail-GCT3_w-Q.js → collection-detail-B9Md04g8.js} +1 -1
- package/dist/client/assets/{collection-display-button-CUDW0vsP.js → collection-display-button-DWOMOsAO.js} +1 -1
- package/dist/client/assets/{collection-search-DytvMFFj.js → collection-search-lJZ_AiYh.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-jnHSZP_b.js → collection-table-wrapper-DvYmVRqQ.js} +1 -1
- package/dist/client/assets/{collection-tabs-F2v4cUxR.js → collection-tabs-BCClisiC.js} +1 -1
- package/dist/client/assets/{command-CeKckObX.js → command-BvTOvAwX.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-CLnMQurr.js → commerce-onboarding-BVfRsUSf.js} +1 -1
- package/dist/client/assets/{config-DAEl2Fwz.js → config-ykFar5kq.js} +1 -1
- package/dist/client/assets/{connect-URRIS0oz.js → connect-C2gWPZrC.js} +1 -1
- package/dist/client/assets/{connect-layout-CmmdxzFu.js → connect-layout-DPz52OVW.js} +1 -1
- package/dist/client/assets/{connection-card-D3s_4e6c.js → connection-card-CLVO7gWM.js} +1 -1
- package/dist/client/assets/{connection-detail-DkuBO-o6.js → connection-detail-BUdncL7r.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CgOgzhG0.js → connection-form-helpers-BhB23GqA.js} +1 -1
- package/dist/client/assets/{connection-f2REUt95.js → connection-q0Pvw2B2.js} +1 -1
- package/dist/client/assets/{connections-DWVrQ0vB.js → connections-B8VbHw_f.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-DUT9TDnz.js → create-organization-dialog-CfcRT_JW.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CugtSLrr.js → decopilot-sse-pool-_NQmGFbS.js} +1 -1
- package/dist/client/assets/{dialog-CCRr4CCv.js → dialog-C7M7JvTo.js} +1 -1
- package/dist/client/assets/{domain-settings-BDk0JrwV.js → domain-settings-9aEPBIWO.js} +1 -1
- package/dist/client/assets/{drawer-EJ0baEzN.js → drawer-CMB3kWdd.js} +1 -1
- package/dist/client/assets/{dropdown-menu-iq7an5CR.js → dropdown-menu-D4_fxfOo.js} +1 -1
- package/dist/client/assets/{e2e-tab-DaxRZwTM.js → e2e-tab-C_eFWdmQ.js} +1 -1
- package/dist/client/assets/{editor-CLQxxGs0.js → editor-D9KXkL69.js} +1 -1
- package/dist/client/assets/{empty-state-sOUWi52v.js → empty-state-CMqWP7WN.js} +1 -1
- package/dist/client/assets/{empty-state-B-hkvNGZ.js → empty-state-CXTU0Gr5.js} +1 -1
- package/dist/client/assets/{extract-connection-data-Bgz74dk7.js → extract-connection-data-D_rrQk5k.js} +1 -1
- package/dist/client/assets/{file-explorer-DL2c5OeX.js → file-explorer-_NdkqYe1.js} +1 -1
- package/dist/client/assets/{file-type-icon-BZyWvek2.js → file-type-icon-BnnSdDsH.js} +1 -1
- package/dist/client/assets/{folder-icon-oUyx5_4o.js → folder-icon-DlTz7QPL.js} +1 -1
- package/dist/client/assets/{form-CJy6gOK9.js → form-kmhrAcMq.js} +1 -1
- package/dist/client/assets/{general-CpyZsf17.js → general-Ds56K9tp.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BNDot8ZD.js → github-repo-picker-CG5N8uO0.js} +1 -1
- package/dist/client/assets/{hooks-Ba0JKlx2.js → hooks-D05F-stG.js} +1 -1
- package/dist/client/assets/{hosting-tab-DNw8iXPA.js → hosting-tab-r6isx4QP.js} +1 -1
- package/dist/client/assets/{index-iMHThdI5.js → index-B8v6bpri.js} +2 -2
- package/dist/client/assets/{index-DyCofZuZ.js → index-BSbcWYFA.js} +1 -1
- package/dist/client/assets/{index-De2AiSst.js → index-BWEmC9U0.js} +57 -57
- package/dist/client/assets/{index-B3BkyrSZ.js → index-BoKx8Diy.js} +1 -1
- package/dist/client/assets/{index-cHwobFpD.js → index-Br8dpGPA.js} +1 -1
- package/dist/client/assets/{index-IILVq28E.js → index-BsAjbvxf.js} +1 -1
- package/dist/client/assets/{index-CZz8FtjU.js → index-CgPdM9sX.js} +1 -1
- package/dist/client/assets/{index-tM1x2fLe.js → index-CthsQzIN.js} +1 -1
- package/dist/client/assets/{index-DPb8WR51.js → index-DY3dr3k9.js} +1 -1
- package/dist/client/assets/index-DxxWRegm.css +1 -0
- package/dist/client/assets/{index-CFf7ypk5.js → index-M-Ir9x4g.js} +1 -1
- package/dist/client/assets/{index-redirect-BCAa2bPs.js → index-redirect-CUiCthS_.js} +1 -1
- package/dist/client/assets/{infra-billing-DyPww6_T.js → infra-billing-DhUuoMMN.js} +1 -1
- package/dist/client/assets/{input-CbnXHcO6.js → input-DW2ahhtH.js} +1 -1
- package/dist/client/assets/{integration-icon-C0qvOPer.js → integration-icon-B89DtTTF.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-C5n5eTov.js → invite-member-dialog-BVqSRdPq.js} +1 -1
- package/dist/client/assets/{label-DRWhO--x.js → label-BhS7vsEg.js} +1 -1
- package/dist/client/assets/{layout-kSadgve2.js → layout-CCn5VLb4.js} +1 -1
- package/dist/client/assets/{login-xbLijAW2.js → login-DUuhqIbA.js} +1 -1
- package/dist/client/assets/{markdown-22Db80L5.js → markdown-C3hAzezL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-EeLwp5eX.js → mcp-oauth-DLj5d3Vy.js} +1 -1
- package/dist/client/assets/{members-oSmXDq3z.js → members-DwYXjhhh.js} +1 -1
- package/dist/client/assets/{monaco-editor-CZowCy14.js → monaco-editor-Vy_rhpBS.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CJCndUnv.js → monitoring-stats-row-D_d5RjHF.js} +1 -1
- package/dist/client/assets/{multi-select-Cj-97iNR.js → multi-select-peQ8D8Pu.js} +1 -1
- package/dist/client/assets/{oauth-callback-DSFqfe09.js → oauth-callback-D4zEQe6g.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Bwn4b05z.js → oauth-callback-ai-provider-9a41pxZK.js} +1 -1
- package/dist/client/assets/{onboarding-DLx1hdsY.js → onboarding-CUeeEM4A.js} +1 -1
- package/dist/client/assets/org-layout-C14JwsL-.js +1 -0
- package/dist/client/assets/{organization-choice-C5KwMY-x.js → organization-choice-CufRbPCe.js} +1 -1
- package/dist/client/assets/{orgs-D23D7LG1.js → orgs-DOJ311_K.js} +1 -1
- package/dist/client/assets/page-seo-form-Bzm5UnJ9.js +1 -0
- package/dist/client/assets/{popover-BYvt0bxB.js → popover-t_ZIm7eh.js} +1 -1
- package/dist/client/assets/{post-calendar-H3AIoZ0y.js → post-calendar-Bmj9kbgm.js} +1 -1
- package/dist/client/assets/{post-editor-DVZgxPIm.js → post-editor-B04BBFsL.js} +1 -1
- package/dist/client/assets/{primitives-B_XA7nYX.js → primitives-B8PIMqZF.js} +1 -1
- package/dist/client/assets/{profile-CFxhdDQq.js → profile-2ky8_NJs.js} +1 -1
- package/dist/client/assets/{project-app-view-M4vM1Rym.js → project-app-view-CPyowKnA.js} +1 -1
- package/dist/client/assets/{prompts-fZ1o4zpB.js → prompts-DF_PvFvF.js} +1 -1
- package/dist/client/assets/record-editor-CdeH0PSN.js +1 -0
- package/dist/client/assets/redirect-editor-DNQScjsS.js +1 -0
- package/dist/client/assets/registry-DXjIrXbl.js +2 -0
- package/dist/client/assets/{registry-layout-BzRjJS6o.js → registry-layout-CxgAdcGY.js} +1 -1
- package/dist/client/assets/{reports-DfMErjxR.js → reports-Cfr_ooDi.js} +1 -1
- package/dist/client/assets/{require-capability-BeFbF8pl.js → require-capability-C3U03ONf.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DKUUs0wv.js → required-auth-layout-BFd3YKM1.js} +1 -1
- package/dist/client/assets/{reset-password-4AF23Xvh.js → reset-password-CB7WpCLR.js} +1 -1
- package/dist/client/assets/{review-settings-_vscni8V.js → review-settings-BWlNqIKi.js} +1 -1
- package/dist/client/assets/{roles-Hc7gjchO.js → roles-BypxpQys.js} +1 -1
- package/dist/client/assets/{schema-CalSBGUA.js → schema-BuoIK2NM.js} +1 -1
- package/dist/client/assets/{scroll-area-DmdvWjmC.js → scroll-area-CF5KP4xT.js} +1 -1
- package/dist/client/assets/{search-input-aRZQtrr1.js → search-input-l9JmQN1V.js} +1 -1
- package/dist/client/assets/{secrets-rcSAU0MH.js → secrets-mUX1ZJSA.js} +1 -1
- package/dist/client/assets/sections-editor-DkA5v4Ou.js +2 -0
- package/dist/client/assets/{select-DVuboUqa.js → select-BeM39jjH.js} +1 -1
- package/dist/client/assets/{select-model-C1B_bzfv.js → select-model-rW6YwKIw.js} +1 -1
- package/dist/client/assets/{self-tool-result-DDDE2dgE.js → self-tool-result-BOY_ezHR.js} +1 -1
- package/dist/client/assets/{seo-editor-45deCW0B.js → seo-editor-ARl87ZpS.js} +1 -1
- package/dist/client/assets/settings-layout-DYs5pwaZ.js +1 -0
- package/dist/client/assets/settings-sidebar-qm5r11nz.js +1 -0
- package/dist/client/assets/{shell-controls-kOkRLWtG.js → shell-controls-Dtx9w7-l.js} +1 -1
- package/dist/client/assets/{shell-layout-fxaPPTq-.js → shell-layout-CGFwfHMp.js} +1 -1
- package/dist/client/assets/{skill-preview-bjmuW_A1.js → skill-preview-hysKC1kO.js} +1 -1
- package/dist/client/assets/{skills-0J4B09Ux.js → skills-C7wLCrdg.js} +1 -1
- package/dist/client/assets/{sso-D-lMBKRN.js → sso-b4d7V5F8.js} +1 -1
- package/dist/client/assets/{store-Bzve1GXV.js → store-BPxn9mDU.js} +1 -1
- package/dist/client/assets/store-registry-BtXrmEhT.js +2 -0
- package/dist/client/assets/{switch-D5j2S-4i.js → switch-BTJg1O9U.js} +1 -1
- package/dist/client/assets/{synced-repos-CL7kgLGW.js → synced-repos-iq5etoTM.js} +1 -1
- package/dist/client/assets/{table-Bdl9_Fhf.js → table-B_EStcLQ.js} +1 -1
- package/dist/client/assets/{tabs-CJeYzOxp.js → tabs-BjBxcmhp.js} +1 -1
- package/dist/client/assets/{task-board-2M_cICbv.js → task-board-BHMys9hW.js} +1 -1
- package/dist/client/assets/{task-route-CheWHifs.js → task-route-r-W3qHvB.js} +1 -1
- package/dist/client/assets/{tasks-CkY0zKmU.js → tasks-Dz1vfh1l.js} +1 -1
- package/dist/client/assets/{textarea-CQu-QtAR.js → textarea-ByOwMVOP.js} +1 -1
- package/dist/client/assets/{thread-intent-D8J4loNV.js → thread-intent-DeAJERp8.js} +1 -1
- package/dist/client/assets/{thread-route-CYrRQzf6.js → thread-route-JP_jBQl2.js} +1 -1
- package/dist/client/assets/{toggle-group-B5yffd6B.js → toggle-group-BQMbtzfI.js} +1 -1
- package/dist/client/assets/{toolbar-BYn6hWQJ.js → toolbar-CR_lIJhX.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-V4uX1cT4.js → toolbar-icon-button-CyVRuDcs.js} +1 -1
- package/dist/client/assets/{track-DqsuBc-w.js → track-BzrD-gEE.js} +1 -1
- package/dist/client/assets/{types-CSh-_-A-.js → types-DdehnnVY.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DNmUp1KH.js → use-ai-providers-VRUuTRhq.js} +1 -1
- package/dist/client/assets/{use-automations-BAS2bqab.js → use-automations-1X67KfoT.js} +1 -1
- package/dist/client/assets/{use-autosave-DAzXy6V3.js → use-autosave-DCQJH_gL.js} +1 -1
- package/dist/client/assets/{use-connection-BIoGt2fV.js → use-connection-C-dhEQVr.js} +1 -1
- package/dist/client/assets/{use-copy-Bqne_Qou.js → use-copy-B1L1W9s2.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5jE4Qbf.js → use-create-virtual-mcp-DiQNHYEZ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-kIKO71Tg.js → use-debounced-autosave-BMYZ2YGs.js} +1 -1
- package/dist/client/assets/{use-debounced-value-B8nRETfv.js → use-debounced-value-D1N9FCWc.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Du05HBL-.js → use-decopilot-events-q6jF3KyR.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B9swLPMU.js → use-delete-connection-DjOX5zhj.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BlhXkuuE.js → use-deployment-admin-DnmqgnN7.js} +1 -1
- package/dist/client/assets/{use-destination-route-BjLqPQzR.js → use-destination-route-BZnZlxip.js} +1 -1
- package/dist/client/assets/{use-file-configs-BWXflqeG.js → use-file-configs-RNJYyxdo.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-CKdXAA8A.js → use-infinite-scroll-BkUvStlN.js} +1 -1
- package/dist/client/assets/{use-join-requests-BKm-Euhh.js → use-join-requests-D243QYrm.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BBJKM7f_.js → use-mcp-auth-status-B_NYbaoD.js} +1 -1
- package/dist/client/assets/{use-mcp-client-Cb-7Tc46.js → use-mcp-client-DJ3fa1xp.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-B4teZ13r.js → use-mcp-prompts-EDCEFkva.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-yMcjeDP1.js → use-mcp-tools-CSF0Nzff.js} +1 -1
- package/dist/client/assets/{use-members-BfBQJknB.js → use-members-CfnD8M7u.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BagpOb6G.js → use-navigate-to-agent-Bfd85iwi.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B4SqGhOd.js → use-org-auth-client-C0QDcwVK.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-OgvPGokO.js → use-org-repo-syncs-D_mgvf_i.js} +1 -1
- package/dist/client/assets/{use-org-sso-BOX8tS6G.js → use-org-sso-DMI8WwP0.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DWjijF9p.js → use-organization-roles-D8aZ-ZR_.js} +1 -1
- package/dist/client/assets/{use-organization-settings-LGG-1duj.js → use-organization-settings-BA2lxbR3.js} +1 -1
- package/dist/client/assets/{use-panel-navigate-BbrwVdUf.js → use-panel-navigate-Bd6QXiJy.js} +1 -1
- package/dist/client/assets/{use-project-scope-BJGCHDw2.js → use-project-scope-l_KFftl6.js} +1 -1
- package/dist/client/assets/{use-registry-connections-AvU1e53j.js → use-registry-connections-DXPYxL2r.js} +1 -1
- package/dist/client/assets/{use-secrets-C7MTfbp9.js → use-secrets-Bgkr4W3S.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CNJRRsrA.js → use-section-preview-base-BV3vay05.js} +1 -1
- package/dist/client/assets/{use-status-sounds-yJcdYzkO.js → use-status-sounds-BBTrZxa1.js} +1 -1
- package/dist/client/assets/{use-tags-CIfiPRHF.js → use-tags-CehLjUea.js} +1 -1
- package/dist/client/assets/{use-view-mode-C34ZcfuA.js → use-view-mode-DhfDSglh.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DfwA3vbI.js → use-virtual-mcp-7JAczJJM.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CVCgU7w5.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-BONtGFny.js +1 -0
- package/dist/client/assets/{users-BNFV8Nap.js → users-DlROvta_.js} +1 -1
- package/dist/client/assets/{variant-calendar-CRmTwjv7.js → variant-calendar-BL03vejT.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CCqJfRrB.js → view-mode-toggle-DITqQxrp.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/api-keys-BLJwaRIG.js +0 -1
- package/dist/client/assets/app-editor-3ukfAjBA.js +0 -1
- package/dist/client/assets/index-owpBJsp0.css +0 -1
- package/dist/client/assets/org-layout-gpkA9U-U.js +0 -1
- package/dist/client/assets/page-seo-form-BI1ZnjGb.js +0 -1
- package/dist/client/assets/record-editor-7dypTFm2.js +0 -1
- package/dist/client/assets/redirect-editor-BRzcJWDt.js +0 -1
- package/dist/client/assets/registry-DcsfzNo4.js +0 -2
- package/dist/client/assets/sections-editor-DCp2vwD_.js +0 -2
- package/dist/client/assets/settings-layout-BSdBJN-5.js +0 -1
- package/dist/client/assets/settings-sidebar-CYw8r_vv.js +0 -1
- package/dist/client/assets/store-registry-BM8xhd8d.js +0 -2
- package/dist/client/assets/useInfiniteQuery-9JeN2e62.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-tto2zjOo.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as J,b as Z,j as i,P as te,r as V,dt as ue,b6 as pe,E as xe,W as Se,n as he,ds as H,B as X,d as ye,f as je,o as ae,K as ve,dr as ie,dq as re,e as Ce,t as ge}from"./index-iMHThdI5.js";import{i as be}from"./AlertCircle-DZjE_Y0H.js";import{i as _e}from"./ChevronRight-C1PKtWq_.js";import{s as Re}from"./Plus-DZ-r7ICl.js";import{s as ke}from"./Trash01-BDaDkc_-.js";import{I as ne}from"./input-CbnXHcO6.js";import{S as de}from"./switch-D5j2S-4i.js";import{A as me}from"./avatar-CxjMK0xh.js";import{P as Ne,a as Pe,b as Te}from"./popover-BYvt0bxB.js";import{b as fe}from"./use-connection-BIoGt2fV.js";import{W as le}from"./constants-DNuUCxmW.js";import{u as we}from"./use-registry-connections-AvU1e53j.js";import{h as Ae,k as ze}from"./use-organization-settings-LGG-1duj.js";import{R as Ee}from"./require-capability-BeFbF8pl.js";import"./User01-CvjutW7d.js";import"./use-mcp-client-Cb-7Tc46.js";import"./auth-CyxtW7VU.js";import"./schema-CalSBGUA.js";import"./task-board-2M_cICbv.js";import"./access-gate-asM9jXYM.js";import"./capability-load-error-CUNqj87m.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(be,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,p]=V.useState(""),[a,A]=V.useState(""),[x,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==x||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=x,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let S;e[9]!==s?(S=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=S):S=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==S?(m={mutationFn:j,onSuccess:d,onError:S},e[11]=j,e[12]=d,e[13]=S,e[14]=m):m=e[14];const{mutate:v,isPending:g}=Ce(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let u;e[19]===Symbol.for("react.memo_cache_sentinel")?(u=y=>p(y.target.value),e[19]=u):u=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(ne,{placeholder:f,value:r,onChange:u,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let Y;e[30]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>A(y.target.value),e[30]=Y):Y=e[30];let q;e[31]!==U||e[32]!==a?(q=i.jsx(ne,{placeholder:U,value:a,onChange:Y,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=q):q=e[33];let B;e[34]!==F||e[35]!==q?(B=i.jsx(H,{title:F,action:q}),e[34]=F,e[35]=q,e[36]=B):B=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=y=>_(y.target.value),e[43]=O):O=e[43];let M;e[44]!==E||e[45]!==x?(M=i.jsx(ne,{type:"password",placeholder:E,value:x,onChange:O,className:"w-[280px]"}),e[44]=E,e[45]=x,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==B||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,B,I,w]}),e[69]=B,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:p,href:a}=t,A=Z(),x=ye();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=je(_);let d;e[1]!==o||e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==j?(d=()=>{a?x({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=x,e[4]=r,e[5]=j,e[6]=d):d=e[6];const S=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==p||e[11]!==A?(v=p&&i.jsxs(Ne,{children:[i.jsx(Pe,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(ke,{size:14})})}),i.jsx(Te,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),p()},children:A("settings.orgStore.remove")})]})})]}),e[10]=p,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(_e,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let u;e[20]!==v||e[21]!==h||e[22]!==f?(u=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=u):u=e[23];let C;return e[24]!==c||e[25]!==S||e[26]!==l||e[27]!==m||e[28]!==u?(C=i.jsx(H,{title:l,description:c,onClick:S,icon:m,action:u}),e[24]=c,e[25]=S,e[26]=l,e[27]=m,e[28]=u,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=Se(),c=we(),s=fe(),o=Ae(),{mutateAsync:r}=ze(),p=he(),[a,A]=V.useState(!1);let x,_,j,d,S,m;if(t[0]!==s||t[1]!==l.id||t[2]!==p||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=le.REGISTRY(l.id),u=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=le.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,Y=le.SELF(l.id),q=new Set([f,C,"community-registry",Y]),B=c.filter(n=>!q.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==p?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),p.invalidateQueries({queryKey:ve.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=p,t[20]=E):E=t[20];const O=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:u(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(S=i.jsx(re,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=S):S=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(Re,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==u?(y=u("self"),t[43]=u,t[44]=y):y=t[44];let W;t[45]!==b?(W=n=>b("self",n),t[45]=b,t[46]=W):W=t[46];let G;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==W?(G=i.jsx(se,{name:w,description:$,enabled:y,onToggle:W,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=W,t[51]=G):G=t[51];let ee;t[52]!==O||t[53]!==b||t[54]!==u||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:u(n.id),onToggle:K=>b(n.id,K),onDelete:()=>O(n.id)},n.id),t[52]=O,t[53]=b,t[54]=u,t[55]=e,t[56]=ee):ee=t[56];const oe=B.map(ee);let Q;t[57]!==G||t[58]!==oe?(Q=i.jsxs(ie,{children:[G,oe]}),t[57]=G,t[58]=oe,t[59]=Q):Q=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==Q?(m=i.jsxs(re,{title:L,actions:P,children:[T,Q]}),t[60]=L,t[61]=P,t[62]=T,t[63]=Q,t[64]=m):m=t[64],_=re,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],x=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:u(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=p,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=x,t[9]=_,t[10]=j,t[11]=d,t[12]=S,t[13]=m}else x=t[8],_=t[9],j=t[10],d=t[11],S=t[12],m=t[13];let v;t[67]!==x||t[68]!==j?(v=i.jsx(x,{children:j}),t[67]=x,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==S||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[S,m,g]}),t[74]=S,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:x}=A;return i.jsx(Me,{error:x??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(pe,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let p;t[8]!==o?(p=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ue,{children:[o,r]})})})})}),t[8]=o,t[9]=p):p=t[9];let a;return t[10]!==l||t[11]!==p?(a=i.jsx(xe,{fallback:l,children:p}),t[10]=l,t[11]=p,t[12]=a):a=t[12],a}function at(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{at as default};
|
|
1
|
+
import{c as J,b as Z,j as i,P as te,r as V,dt as ue,b6 as pe,E as xe,W as Se,n as he,ds as H,B as X,d as ye,f as je,o as ae,K as ve,dr as ie,dq as re,e as Ce,t as ge}from"./index-B8v6bpri.js";import{i as be}from"./AlertCircle-DTA-xmN8.js";import{i as _e}from"./ChevronRight-D_8iRnVD.js";import{s as Re}from"./Plus-Bz1cAYCY.js";import{s as ke}from"./Trash01-D5j2YoAs.js";import{I as ne}from"./input-DW2ahhtH.js";import{S as de}from"./switch-BTJg1O9U.js";import{A as me}from"./avatar-CsipcR4h.js";import{P as Ne,a as Pe,b as Te}from"./popover-t_ZIm7eh.js";import{b as fe}from"./use-connection-C-dhEQVr.js";import{W as le}from"./constants-DNuUCxmW.js";import{u as we}from"./use-registry-connections-DXPYxL2r.js";import{h as Ae,k as ze}from"./use-organization-settings-BA2lxbR3.js";import{R as Ee}from"./require-capability-C3U03ONf.js";import"./User01-Bq-AsdvG.js";import"./use-mcp-client-DJ3fa1xp.js";import"./auth-CeWlFDdC.js";import"./schema-BuoIK2NM.js";import"./task-board-BHMys9hW.js";import"./access-gate-CgF7Ajgl.js";import"./capability-load-error-D2I8YlS5.js";function Me(t){const e=J.c(6),{error:l}=t,c=Z();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx(be,{size:16}),e[0]=s):s=e[0];let o;e[1]!==c?(o=c("settings.orgStore.failedLoadStoreSettings"),e[1]=c,e[2]=o):o=e[2];let r;return e[3]!==l.message||e[4]!==o?(r=i.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[s,i.jsxs("span",{className:"text-sm font-medium",children:[o," ",l.message]})]}),e[3]=l.message,e[4]=o,e[5]=r):r=e[5],r}function $e(t){const e=J.c(74),{onCancel:l,onSuccess:c}=t,s=Z(),o=fe(),[r,p]=V.useState(""),[a,A]=V.useState(""),[x,_]=V.useState("");let j;e[0]!==o||e[1]!==r||e[2]!==s||e[3]!==x||e[4]!==a?(j=async()=>(await o.create.mutateAsync({title:r||s("settings.orgStore.privateRegistry"),description:s("settings.orgStore.privateMcpRegistry"),connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=s,e[3]=x,e[4]=a,e[5]=j):j=e[5];let d;e[6]!==c||e[7]!==s?(d=y=>{ae("store_private_registry_added",{connection_id:y}),ge.success(s("settings.orgStore.privateRegistryAdded")),c(y)},e[6]=c,e[7]=s,e[8]=d):d=e[8];let S;e[9]!==s?(S=y=>{ge.error(s("settings.orgStore.failedAddRegistry",{error:y.message}))},e[9]=s,e[10]=S):S=e[10];let m;e[11]!==j||e[12]!==d||e[13]!==S?(m={mutationFn:j,onSuccess:d,onError:S},e[11]=j,e[12]=d,e[13]=S,e[14]=m):m=e[14];const{mutate:v,isPending:g}=Ce(m);let h;e[15]!==s?(h=s("settings.orgStore.nameLabel"),e[15]=s,e[16]=h):h=e[16];let f;e[17]!==s?(f=s("settings.orgStore.namePlaceholder"),e[17]=s,e[18]=f):f=e[18];let u;e[19]===Symbol.for("react.memo_cache_sentinel")?(u=y=>p(y.target.value),e[19]=u):u=e[19];let C;e[20]!==r||e[21]!==f?(C=i.jsx(ne,{placeholder:f,value:r,onChange:u,className:"w-[280px]"}),e[20]=r,e[21]=f,e[22]=C):C=e[22];let R;e[23]!==h||e[24]!==C?(R=i.jsx(H,{title:h,action:C}),e[23]=h,e[24]=C,e[25]=R):R=e[25];let F;e[26]!==s?(F=s("settings.orgStore.registryUrlLabel"),e[26]=s,e[27]=F):F=e[27];let U;e[28]!==s?(U=s("settings.orgStore.registryUrlPlaceholder"),e[28]=s,e[29]=U):U=e[29];let Y;e[30]===Symbol.for("react.memo_cache_sentinel")?(Y=y=>A(y.target.value),e[30]=Y):Y=e[30];let q;e[31]!==U||e[32]!==a?(q=i.jsx(ne,{placeholder:U,value:a,onChange:Y,className:"w-[280px]"}),e[31]=U,e[32]=a,e[33]=q):q=e[33];let B;e[34]!==F||e[35]!==q?(B=i.jsx(H,{title:F,action:q}),e[34]=F,e[35]=q,e[36]=B):B=e[36];let z;e[37]!==s?(z=s("settings.orgStore.authTokenLabel"),e[37]=s,e[38]=z):z=e[38];let b;e[39]!==s?(b=s("settings.orgStore.optional"),e[39]=s,e[40]=b):b=e[40];let E;e[41]!==s?(E=s("settings.orgStore.authTokenPlaceholder"),e[41]=s,e[42]=E):E=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=y=>_(y.target.value),e[43]=O):O=e[43];let M;e[44]!==E||e[45]!==x?(M=i.jsx(ne,{type:"password",placeholder:E,value:x,onChange:O,className:"w-[280px]"}),e[44]=E,e[45]=x,e[46]=M):M=e[46];let I;e[47]!==z||e[48]!==b||e[49]!==M?(I=i.jsx(H,{title:z,description:b,action:M}),e[47]=z,e[48]=b,e[49]=M,e[50]=I):I=e[50];let k;e[51]!==s?(k=s("settings.orgStore.cancel"),e[51]=s,e[52]=k):k=e[52];let D;e[53]!==g||e[54]!==l||e[55]!==k?(D=i.jsx(X,{variant:"ghost",size:"sm",onClick:l,disabled:g,children:k}),e[53]=g,e[54]=l,e[55]=k,e[56]=D):D=e[56];let N;e[57]!==v?(N=()=>v(),e[57]=v,e[58]=N):N=e[58];const L=!a||g;let P;e[59]!==g||e[60]!==s?(P=s(g?"settings.orgStore.adding":"settings.orgStore.addRegistry"),e[59]=g,e[60]=s,e[61]=P):P=e[61];let T;e[62]!==N||e[63]!==L||e[64]!==P?(T=i.jsx(X,{size:"sm",onClick:N,disabled:L,children:P}),e[62]=N,e[63]=L,e[64]=P,e[65]=T):T=e[65];let w;e[66]!==D||e[67]!==T?(w=i.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[D,T]}),e[66]=D,e[67]=T,e[68]=w):w=e[68];let $;return e[69]!==B||e[70]!==I||e[71]!==w||e[72]!==R?($=i.jsxs(ie,{children:[R,B,I,w]}),e[69]=B,e[70]=I,e[71]=w,e[72]=R,e[73]=$):$=e[73],$}function se(t){const e=J.c(30),{name:l,description:c,icon:s,enabled:o,onToggle:r,onDelete:p,href:a}=t,A=Z(),x=ye();let _;e[0]===Symbol.for("react.memo_cache_sentinel")?(_={from:"/shell/$org"},e[0]=_):_=e[0];const{org:j}=je(_);let d;e[1]!==o||e[2]!==a||e[3]!==x||e[4]!==r||e[5]!==j?(d=()=>{a?x({to:a,params:{org:j}}):r(!o)},e[1]=o,e[2]=a,e[3]=x,e[4]=r,e[5]=j,e[6]=d):d=e[6];const S=d;let m;e[7]!==s||e[8]!==l?(m=s?i.jsx("img",{src:s,alt:l,className:"size-8 rounded-md object-contain"}):i.jsx(me,{fallback:l.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=s,e[8]=l,e[9]=m):m=e[9];let v;e[10]!==p||e[11]!==A?(v=p&&i.jsxs(Ne,{children:[i.jsx(Pe,{asChild:!0,children:i.jsx(X,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ie,children:i.jsx(ke,{size:14})})}),i.jsx(Te,{className:"w-auto p-2",align:"end",children:i.jsxs("div",{className:"flex flex-col gap-2",children:[i.jsx("p",{className:"text-xs font-medium",children:A("settings.orgStore.removeRegistry")}),i.jsx(X,{variant:"destructive",size:"xs",onClick:R=>{R.stopPropagation(),p()},children:A("settings.orgStore.remove")})]})})]}),e[10]=p,e[11]=A,e[12]=v):v=e[12];let g;e[13]!==r?(g=R=>r(R),e[13]=r,e[14]=g):g=e[14];let h;e[15]!==o||e[16]!==g?(h=i.jsx(de,{checked:o,onClick:Fe,onCheckedChange:g}),e[15]=o,e[16]=g,e[17]=h):h=e[17];let f;e[18]!==a?(f=a&&i.jsx(_e,{size:14,className:"text-muted-foreground"}),e[18]=a,e[19]=f):f=e[19];let u;e[20]!==v||e[21]!==h||e[22]!==f?(u=i.jsxs("div",{className:"flex items-center gap-2",children:[v,h,f]}),e[20]=v,e[21]=h,e[22]=f,e[23]=u):u=e[23];let C;return e[24]!==c||e[25]!==S||e[26]!==l||e[27]!==m||e[28]!==u?(C=i.jsx(H,{title:l,description:c,onClick:S,icon:m,action:u}),e[24]=c,e[25]=S,e[26]=l,e[27]=m,e[28]=u,e[29]=C):C=e[29],C}function Fe(t){return t.stopPropagation()}function Ie(t){return t.stopPropagation()}function De(){const t=J.c(78),e=Z(),{org:l}=Se(),c=we(),s=fe(),o=Ae(),{mutateAsync:r}=ze(),p=he(),[a,A]=V.useState(!1);let x,_,j,d,S,m;if(t[0]!==s||t[1]!==l.id||t[2]!==p||t[3]!==o||t[4]!==c||t[5]!==a||t[6]!==e||t[7]!==r){const f=le.REGISTRY(l.id),u=n=>{if(!o)return n===f;const K=o.registries[n];return K?K.enabled:n===f},C=le.COMMUNITY_REGISTRY(l.id),R=c.find(n=>n.id===f),F=c.find(n=>n.id===C||n.id==="community-registry"),U=F?.id??C,Y=le.SELF(l.id),q=new Set([f,C,"community-registry",Y]),B=c.filter(n=>!q.has(n.id));let z;t[14]!==o||t[15]!==r?(z=async(n,K)=>{ae("store_registry_toggled",{connection_id:n,enabled:K});const ce=o??{registries:{},blockedMcps:[]};await r({...ce,registries:{...ce.registries,[n]:{enabled:K}}})},t[14]=o,t[15]=r,t[16]=z):z=t[16];const b=z;let E;t[17]!==s||t[18]!==l.id||t[19]!==p?(E=async n=>{ae("store_private_registry_removed",{connection_id:n}),await s.delete.mutateAsync(n),p.invalidateQueries({queryKey:ve.organizationSettings(l.id)})},t[17]=s,t[18]=l.id,t[19]=p,t[20]=E):E=t[20];const O=E;let M;t[21]!==o||t[22]!==r?(M=async n=>{A(!1);const K=o??{registries:{},blockedMcps:[]};await r({...K,registries:{...K.registries,[n]:{enabled:!0}}})},t[21]=o,t[22]=r,t[23]=M):M=t[23];const I=M;let k;t[24]!==e?(k=e("settings.orgStore.decoStoreSection"),t[24]=e,t[25]=k):k=t[25];const D=R?i.jsx(se,{name:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.decoStoreDescription"),icon:R.icon,enabled:u(f),onToggle:n=>b(f,n)}):i.jsx(H,{title:e("settings.orgStore.decoStoreName"),description:e("settings.orgStore.connectionNotFound")});let N;t[26]!==D?(N=i.jsx(ie,{children:D}),t[26]=D,t[27]=N):N=t[27],t[28]!==k||t[29]!==N?(S=i.jsx(re,{title:k,children:N}),t[28]=k,t[29]=N,t[30]=S):S=t[30];let L;t[31]!==e?(L=e("settings.orgStore.privateRegistriesSection"),t[31]=e,t[32]=L):L=t[32];let P;t[33]!==a||t[34]!==e?(P=a?void 0:i.jsxs(X,{variant:"outline",size:"sm",onClick:()=>A(!0),children:[i.jsx(Re,{size:14}),e("settings.orgStore.addRegistry")]}),t[33]=a,t[34]=e,t[35]=P):P=t[35];let T;t[36]!==I||t[37]!==a?(T=a&&i.jsx($e,{onCancel:()=>A(!1),onSuccess:I}),t[36]=I,t[37]=a,t[38]=T):T=t[38];let w;t[39]!==e?(w=e("settings.orgStore.privateRegistry"),t[39]=e,t[40]=w):w=t[40];let $;t[41]!==e?($=e("settings.orgStore.privateRegistryDescription"),t[41]=e,t[42]=$):$=t[42];let y;t[43]!==u?(y=u("self"),t[43]=u,t[44]=y):y=t[44];let W;t[45]!==b?(W=n=>b("self",n),t[45]=b,t[46]=W):W=t[46];let G;t[47]!==w||t[48]!==$||t[49]!==y||t[50]!==W?(G=i.jsx(se,{name:w,description:$,enabled:y,onToggle:W,href:"/$org/settings/store/registry"}),t[47]=w,t[48]=$,t[49]=y,t[50]=W,t[51]=G):G=t[51];let ee;t[52]!==O||t[53]!==b||t[54]!==u||t[55]!==e?(ee=n=>i.jsx(se,{name:n.title,description:n.description??e("settings.orgStore.privateMcpRegistry"),icon:n.icon,enabled:u(n.id),onToggle:K=>b(n.id,K),onDelete:()=>O(n.id)},n.id),t[52]=O,t[53]=b,t[54]=u,t[55]=e,t[56]=ee):ee=t[56];const oe=B.map(ee);let Q;t[57]!==G||t[58]!==oe?(Q=i.jsxs(ie,{children:[G,oe]}),t[57]=G,t[58]=oe,t[59]=Q):Q=t[59],t[60]!==L||t[61]!==P||t[62]!==T||t[63]!==Q?(m=i.jsxs(re,{title:L,actions:P,children:[T,Q]}),t[60]=L,t[61]=P,t[62]=T,t[63]=Q,t[64]=m):m=t[64],_=re,t[65]!==e?(d=e("settings.orgStore.communitySection"),t[65]=e,t[66]=d):d=t[66],x=ie,j=F?i.jsx(se,{name:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryDescription"),icon:F.icon,enabled:u(U),onToggle:n=>b(U,n)}):i.jsx(H,{title:e("settings.orgStore.mcpRegistry"),description:e("settings.orgStore.communityRegistryNotAdded"),icon:i.jsx(me,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:i.jsx(de,{checked:!1,disabled:!0,onCheckedChange:Le})}),t[0]=s,t[1]=l.id,t[2]=p,t[3]=o,t[4]=c,t[5]=a,t[6]=e,t[7]=r,t[8]=x,t[9]=_,t[10]=j,t[11]=d,t[12]=S,t[13]=m}else x=t[8],_=t[9],j=t[10],d=t[11],S=t[12],m=t[13];let v;t[67]!==x||t[68]!==j?(v=i.jsx(x,{children:j}),t[67]=x,t[68]=j,t[69]=v):v=t[69];let g;t[70]!==_||t[71]!==d||t[72]!==v?(g=i.jsx(_,{title:d,children:v}),t[70]=_,t[71]=d,t[72]=v,t[73]=g):g=t[73];let h;return t[74]!==S||t[75]!==m||t[76]!==g?(h=i.jsxs(i.Fragment,{children:[S,m,g]}),t[74]=S,t[75]=m,t[76]=g,t[77]=h):h=t[77],h}function Le(){}function Ke(){const t=J.c(13),e=Z();let l;t[0]!==e?(l=A=>{const{error:x}=A;return i.jsx(Me,{error:x??new Error(e("settings.orgStore.failedLoadStoreSettings"))})},t[0]=e,t[1]=l):l=t[1];let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(pe,{className:"h-64 w-full"}),t[2]=c):c=t[2];let s;t[3]!==e?(s=e("settings.orgStore.pageTitle"),t[3]=e,t[4]=s):s=t[4];let o;t[5]!==s?(o=i.jsx(te.Title,{children:s}),t[5]=s,t[6]=o):o=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(De,{}),t[7]=r):r=t[7];let p;t[8]!==o?(p=i.jsx(V.Suspense,{fallback:c,children:i.jsx(te,{children:i.jsx(te.Content,{children:i.jsx(te.Body,{children:i.jsxs(ue,{children:[o,r]})})})})}),t[8]=o,t[9]=p):p=t[9];let a;return t[10]!==l||t[11]!==p?(a=i.jsx(xe,{fallback:l,children:p}),t[10]=l,t[11]=p,t[12]=a):a=t[12],a}function at(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx(Ee,{capability:"registry:manage",area:"the store",children:i.jsx(Ke,{})}),t[0]=e):e=t[0],e}export{at as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-CxgAdcGY.js","assets/index-B8v6bpri.js","assets/index-DxxWRegm.css","assets/Tool02-DT-zZ1ks.js","assets/CheckCircle-CEm5M3Tl.js","assets/Settings02-C39ViKVB.js","assets/use-mcp-client-DJ3fa1xp.js","assets/constants-DNuUCxmW.js","assets/auth-CeWlFDdC.js","assets/useInfiniteQuery-CVCgU7w5.js","assets/use-infinite-scroll-BkUvStlN.js","assets/badge-Cr2fQRq8.js","assets/input-DW2ahhtH.js","assets/dropdown-menu-D4_fxfOo.js","assets/Check-yANPvlWH.js","assets/ChevronRight-D_8iRnVD.js","assets/DotsVertical-mvRvTh6x.js","assets/table-B_EStcLQ.js","assets/toggle-group-BQMbtzfI.js","assets/use-view-mode-DhfDSglh.js","assets/Globe01-Dj13xfTI.js","assets/SearchMd-DN6cu6SZ.js","assets/dialog-C7M7JvTo.js","assets/AlertCircle-DTA-xmN8.js","assets/Download01-CeBHR-fX.js","assets/Upload01-DSJ1fWRp.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-D3FLXTEj.js","assets/Trash01-D5j2YoAs.js","assets/label-BhS7vsEg.js","assets/select-BeM39jjH.js","assets/ChevronUp-D9JVuW7G.js","assets/switch-BTJg1O9U.js","assets/textarea-ByOwMVOP.js","assets/ArrowLeft-DJHyaGVg.js","assets/XCircle-Dlv7pZja.js","assets/Link01-DUUbBvGo.js","assets/safe-image-url-D5z803Ot.js","assets/checkbox-DRf1c0rh.js","assets/Eye-ggEjyhYq.js","assets/LinkExternal01-61qG-hFo.js","assets/use-copy-B1L1W9s2.js","assets/Copy01-ZnkwptEM.js","assets/Key01-BBxtRrGm.js","assets/Plus-Bz1cAYCY.js","assets/mcp-oauth-DLj5d3Vy.js","assets/Play-kr1GKsAc.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{c as n,d as c,f as m,j as t,h as f,r as l,bn as p}from"./index-B8v6bpri.js";import{R as u}from"./require-capability-C3U03ONf.js";import"./access-gate-CgF7Ajgl.js";import"./capability-load-error-D2I8YlS5.js";const g=l.lazy(()=>p(()=>import("./registry-layout-CxgAdcGY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46])));function h(){const e=n.c(5),i=c();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=m(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{className:"size-5 text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as i,bo as C,bs as y,br as T,bu as I,cD as M,cC as H,bq as q,c as z,l as g}from"./index-
|
|
1
|
+
import{r as c,j as i,bo as C,bs as y,br as T,bu as I,cD as M,cC as H,bq as q,c as z,l as g}from"./index-B8v6bpri.js";var m="Switch",[A]=q(m),[U,D]=A(m),E=c.forwardRef((a,e)=>{const{__scopeSwitch:t,name:r,checked:s,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=a,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:s,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs(U,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(a.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(_,{control:p,bubbles:!x.current,name:r,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",R=c.forwardRef((a,e)=>{const{__scopeSwitch:t,...r}=a,s=D(P,t);return i.jsx(C.span,{"data-state":j(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});R.displayName=P;var L="SwitchBubbleInput",_=c.forwardRef(({__scopeSwitch:a,control:e,checked:t,bubbles:r=!0,...s},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:r});h.call(l,t),l.dispatchEvent(v)}},[u,t,r]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...s,tabIndex:-1,ref:d,style:{...s.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});_.displayName=L;function j(a){return a?"checked":"unchecked"}var O=E,$=R;function W(a){const e=z.c(9);let t,r;e[0]!==a?({className:t,...r}=a,e[0]=a,e[1]=t,e[2]=r):(t=e[1],r=e[2]);let s;e[3]!==t?(s=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/20 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[2px] disabled:opacity-50",t),e[3]=t,e[4]=s):s=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx($,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==r||e[7]!==s?(o=i.jsx(O,{"data-slot":"switch",className:s,...r,children:n}),e[6]=r,e[7]=s,e[8]=o):o=e[8],o}export{W as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as te,j as s,du as ye,b as ue,r as ce,B as ee,l as je,t as ae,b6 as be}from"./index-iMHThdI5.js";import{s as ge}from"./Plus-DZ-r7ICl.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-1uO7Q1_D.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-CCRr4CCv.js";import{I as Ie}from"./input-CbnXHcO6.js";import{G as xe,a as $e}from"./github-repo-picker-BNDot8ZD.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-OgvPGokO.js";import{t as He}from"./cards-BLVEB5RL.js";import{R as Be}from"./require-capability-BeFbF8pl.js";import"./collection-search-DytvMFFj.js";import"./SearchMd-BpXAT-eZ.js";import"./use-debounced-value-B8nRETfv.js";import"./use-connection-BIoGt2fV.js";import"./use-mcp-client-Cb-7Tc46.js";import"./constants-DNuUCxmW.js";import"./auth-CyxtW7VU.js";import"./authenticate-and-persist-oauth-BH26XKT9.js";import"./mcp-oauth-EeLwp5eX.js";import"./ArrowLeft-BsR-6m6j.js";import"./LinkExternal01-w2j8lCTU.js";import"./LockUnlocked01-CbuTs0EA.js";import"./use-mcp-tools-yMcjeDP1.js";import"./extract-connection-data-Bgz74dk7.js";import"./metadata-dUsYcpuu.js";import"./connection-f2REUt95.js";import"./use-navigate-to-agent-BagpOb6G.js";import"./use-destination-route-BjLqPQzR.js";import"./use-virtual-mcp-DfwA3vbI.js";import"./hooks-Ba0JKlx2.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-CugtSLrr.js";import"./task-board-2M_cICbv.js";import"./schema-CalSBGUA.js";import"./thread-intent-D8J4loNV.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./folder-icon-oUyx5_4o.js";import"./Eye-D3bCBJMo.js";import"./DotsVertical-CuAwCaPW.js";import"./Download01-R47mE7bD.js";import"./Share07-P3qF7VX0.js";import"./Globe01-DeCmIrD5.js";import"./Key01-ICcTBF9U.js";import"./Palette-CVvoWFYM.js";import"./Trash01-BDaDkc_-.js";import"./Zap-BeDIMc43.js";import"./dropdown-menu-iq7an5CR.js";import"./Check-CA6oOwnk.js";import"./ChevronRight-C1PKtWq_.js";import"./file-type-icon-BZyWvek2.js";import"./access-gate-asM9jXYM.js";import"./capability-load-error-CUNqj87m.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 Qt(){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{Qt as default};
|
|
1
|
+
import{c as te,j as s,du as ye,b as ue,r as ce,B as ee,l as je,t as ae,b6 as be}from"./index-B8v6bpri.js";import{s as ge}from"./Plus-Bz1cAYCY.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-D3FLXTEj.js";import{d as Ae,h as ke,c as we,e as Oe,b as ze,D as Ee}from"./dialog-C7M7JvTo.js";import{I as Ie}from"./input-DW2ahhtH.js";import{G as xe,a as $e}from"./github-repo-picker-CG5N8uO0.js";import{u as Fe,b as Te,c as Ge}from"./use-org-repo-syncs-D_mgvf_i.js";import{t as He}from"./cards-Ckz_jSmB.js";import{R as Be}from"./require-capability-C3U03ONf.js";import"./collection-search-lJZ_AiYh.js";import"./SearchMd-DN6cu6SZ.js";import"./use-debounced-value-D1N9FCWc.js";import"./use-connection-C-dhEQVr.js";import"./use-mcp-client-DJ3fa1xp.js";import"./constants-DNuUCxmW.js";import"./auth-CeWlFDdC.js";import"./authenticate-and-persist-oauth-CxGKh8aj.js";import"./mcp-oauth-DLj5d3Vy.js";import"./ArrowLeft-DJHyaGVg.js";import"./LinkExternal01-61qG-hFo.js";import"./LockUnlocked01-BfX9zVyU.js";import"./use-mcp-tools-CSF0Nzff.js";import"./extract-connection-data-D_rrQk5k.js";import"./metadata-dUsYcpuu.js";import"./connection-q0Pvw2B2.js";import"./use-navigate-to-agent-Bfd85iwi.js";import"./use-destination-route-BZnZlxip.js";import"./use-virtual-mcp-7JAczJJM.js";import"./hooks-D05F-stG.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-_NQmGFbS.js";import"./task-board-BHMys9hW.js";import"./schema-BuoIK2NM.js";import"./thread-intent-DeAJERp8.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BpKUwJal.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./folder-icon-DlTz7QPL.js";import"./Eye-ggEjyhYq.js";import"./DotsVertical-mvRvTh6x.js";import"./Download01-CeBHR-fX.js";import"./Share07-vMCtuazW.js";import"./Globe01-Dj13xfTI.js";import"./Key01-BBxtRrGm.js";import"./Palette-CXReGsk_.js";import"./Trash01-D5j2YoAs.js";import"./Zap-CywbYsFI.js";import"./dropdown-menu-D4_fxfOo.js";import"./Check-yANPvlWH.js";import"./ChevronRight-D_8iRnVD.js";import"./file-type-icon-BnnSdDsH.js";import"./access-gate-CgF7Ajgl.js";import"./capability-load-error-D2I8YlS5.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 Qt(){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{Qt 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-B8v6bpri.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,dv as k,bo as p,bu as T,dw as y,bq as M,bt as P,br as S,bv as F,dx as V,cH as D,c as x,l as g}from"./index-
|
|
1
|
+
import{r as v,j as d,dv as k,bo as p,bu as T,dw as y,bq as M,bt as P,br as S,bv as F,dx as V,cH as D,c as x,l as g}from"./index-B8v6bpri.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,q=_,B=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(q,{"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(B,{"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-BuoIK2NM.js";const v="super-agent",i=["#9ca3af","#ef4444","#f97316","#f59e0b","#22c55e","#3b82f6","#a855f7","#ec4899"],c=i[0];function T(e){return i[e%i.length]??c}function w(e){return e.createdBy==="system"}const l="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=["approved","merged","post_deploy_validation"];function D(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 f(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 S(e,t,r){if(t.length===0)return!1;const n=f(e,r);return t.every(a=>n.get(a)==="approved")}const g="task-board.item.updated",L="task-board.item.deleted",m=4e3;export{l as D,A as R,v as S,g as T,S as a,D as b,L as c,c as d,R as e,m as f,w as i,T as n,p as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as M,l as q,j as t,h as Ge,r as Q,I as Wt,G as Cs,o as Z,b as K,b6 as ks,W as we,d as Xt,a6 as Yt,_ as qt,L as ys,a1 as ze,a2 as Ee,a4 as Re,a as bt,F as Ns,ar as Ss,as as _s,B as je,t as xe,H as ws,J as Ds,K as vt,n as As,a7 as Fs,m as Is,ap as Ts}from"./index-iMHThdI5.js";import{c as Qt,u as Bs,d as Jt}from"./thread-route-CYrRQzf6.js";import{t as De}from"./ChevronUp-BWJ43Ad_.js";import{A as Zt,L as Ps,s as ct,a3 as dt,a2 as Ls,a1 as $s,a8 as Ms}from"./agent-icon-C7HwxMy2.js";import{a as es,i as Os,e as zs,S as Es,f as Rs}from"./constants-DNuUCxmW.js";import{b as Ct,u as Vs}from"./use-virtual-mcp-DfwA3vbI.js";import{g as Ks}from"./github-repo-BpKUwJal.js";import{T as ts}from"./toolbar-icon-button-V4uX1cT4.js";import{P as st,a as Ve,b as nt}from"./popover-BYvt0bxB.js";import{D as kt,a as yt,b as Nt,c as Gs,e as Hs,f as ss,g as ns,d as Us}from"./drawer-EJ0baEzN.js";import{i as Ws}from"./SearchMd-BpXAT-eZ.js";import{i as He}from"./Check-CA6oOwnk.js";import{s as We}from"./Plus-DZ-r7ICl.js";import{G as ht,a as Xs}from"./github-repo-picker-BNDot8ZD.js";import{g as Ys,u as qs,b as ls}from"./hooks-Ba0JKlx2.js";import{g as Qs,b as os}from"./use-project-scope-BJGCHDw2.js";import{b as Js,c as Zs,a as en}from"./use-navigate-to-agent-BagpOb6G.js";import{u as is}from"./shell-layout-fxaPPTq-.js";import{d as tn}from"./thread-intent-D8J4loNV.js";import{C as sn}from"./collection-search-DytvMFFj.js";import{g as nn,b as ln,a as on,e as an}from"./extract-connection-data-Bgz74dk7.js";import{u as as,a as rs,g as rn,C as ut}from"./connection-card-D3s_4e6c.js";import{D as cs,b as ds,c as us,d as fs,h as cn,e as dn}from"./dialog-CCRr4CCv.js";import{d as re,a as ce,e as de,b as ue,c as fe,F as Pt}from"./form-CJy6gOK9.js";import{I as Se}from"./input-CbnXHcO6.js";import{S as un,a as fn,b as mn,c as pn,d as Ke}from"./select-DVuboUqa.js";import{T as hn}from"./textarea-CQu-QtAR.js";import{b as ms}from"./use-connection-BIoGt2fV.js";import{n as Ze,a as ft,i as ps}from"./Tool02-Dh-KcCDo.js";import{b as gn}from"./UserSquare-DXupINNG.js";import{s as xn}from"./XClose-Dciq0-47.js";import{c as jn,i as qe,a as Lt,E as bn,p as vn,b as Cn,d as kn}from"./connection-form-helpers-CgOgzhG0.js";import{a as mt}from"./authenticate-and-persist-oauth-BH26XKT9.js";import{g as yn}from"./connection-slug-CITJ0kGN.js";import{C as Nn}from"./collection-tabs-F2v4cUxR.js";import{u as $t}from"./use-infinite-scroll-CKdXAA8A.js";import{B as Qe}from"./badge-Dx14P1uf.js";import{u as Sn}from"./useSuspenseInfiniteQuery-tto2zjOo.js";import{u as _n}from"./use-mcp-client-Cb-7Tc46.js";import{g as et}from"./metadata-dUsYcpuu.js";import{u as wn}from"./use-ai-providers-DNmUp1KH.js";import{A as Mt}from"./avatar-CxjMK0xh.js";import{h as _e,D as St,b as _t,g as wt,c as Dt}from"./dropdown-menu-iq7an5CR.js";import{a as At,c as Ft,d as Ce,e as Ue,b as It,C as Tt}from"./command-CeKckObX.js";import{s as Dn}from"./TrendUp01-gaB_ebZy.js";import{a as An}from"./Settings02-CkPf5bSQ.js";import{s as Ot}from"./User01-CvjutW7d.js";import{g as zt}from"./get-initials-D-f_fDFw.js";import{P as Je,d as Fn,f as Et,j as In}from"./config-DAEl2Fwz.js";import{S as gt}from"./task-board-2M_cICbv.js";function Tn(n){const e=M.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:c,disabled:u}=n,d=a===void 0?"Search...":a;let p;e[0]!==l?(p=q("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=p):p=e[1];const x=u?"cursor-not-allowed opacity-50":"cursor-text";let r;e[2]!==x?(r=q("flex items-center gap-2.5 h-12 px-4",x),e[2]=x,e[3]=r):r=e[3];let f;e[4]!==c?(f=c?t.jsx(Ge,{className:"size-4 text-muted-foreground shrink-0"}):t.jsx(Ws,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=f):f=e[5];let g;e[6]!==o?(g=S=>o(S.target.value),e[6]=o,e[7]=g):g=e[7];let h;e[8]!==u||e[9]!==i||e[10]!==d||e[11]!==g||e[12]!==s?(h=t.jsx("input",{type:"text",value:s,onChange:g,onKeyDown:i,placeholder:d,disabled:u,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=u,e[9]=i,e[10]=d,e[11]=g,e[12]=s,e[13]=h):h=e[13];let j;e[14]!==r||e[15]!==f||e[16]!==h?(j=t.jsxs("label",{className:r,children:[f,h]}),e[14]=r,e[15]=f,e[16]=h,e[17]=j):j=e[17];let y;return e[18]!==p||e[19]!==j?(y=t.jsx("div",{className:p,children:j}),e[18]=p,e[19]=j,e[20]=y):y=e[20],y}function Bn(n,e,s){if(!s)return null;const o=Ys(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function Pn(n){const e=M.c(6),{value:s,onChange:o}=n,a=K();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(Tn,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function Ln(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function $n(n){const e=M.c(10),{org:s,onClose:o}=n,a=K();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let u;return e[6]!==i||e[7]!==l||e[8]!==c?(u=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(ys,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=i,e[7]=l,e[8]=c,e[9]=u):u=e[9],u}function Mn(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(hs,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function On(n){const e=M.c(11),{onImportFromGithub:s}=n,o=K();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(ht,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.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,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==l||e[9]!==c?(u=t.jsx(hs,{action:l,children:c}),e[8]=l,e[9]=c,e[10]=u):u=e[10],u}function zn(n){const e=M.c(11),{setOpen:s,emptyCtaClass:o}=n,a=K();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=q(o),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==s?(c=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{className:"size-4"}),e[6]=u):u=e[6];let d;return e[7]!==i||e[8]!==l||e[9]!==c?(d=t.jsx(ts,{"aria-label":i,className:l,onClick:c,children:u}),e[7]=i,e[8]=l,e[9]=c,e[10]=d):d=e[10],d}function En(n){const e=M.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=K();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let u;e[5]!==s?(u=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=u):u=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(We,{}),e[7]=d):d=e[7];let p;e[8]!==i?(p=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=p):p=e[9];let x;e[10]!==p?(x=t.jsx("span",{children:p}),e[10]=p,e[11]=x):x=e[11];let r;return e[12]!==l||e[13]!==c||e[14]!==u||e[15]!==x?(r=t.jsx(Yt,{children:t.jsxs(qt,{tooltip:l,className:c,onClick:u,children:[d,x]})}),e[12]=l,e[13]=c,e[14]=u,e[15]=x,e[16]=r):r=e[16],r}function Rn(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Nt,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Vn(n){const e=M.c(8),{emptyCtaClass:s}=n,o=K();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=q(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(We,{className:"size-4"}),e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==i?(c=t.jsx(ts,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Kn(n){const e=M.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=K();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{}),e[5]=u):u=e[5];let d;e[6]!==i?(d=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=d):d=e[7];let p;e[8]!==d?(p=t.jsx("span",{children:d}),e[8]=d,e[9]=p):p=e[9];let x;e[10]!==l||e[11]!==c||e[12]!==p?(x=t.jsx(Ve,{asChild:!0,children:t.jsxs(qt,{tooltip:l,className:c,children:[u,p]})}),e[10]=l,e[11]=c,e[12]=p,e[13]=x):x=e[13];let r;e[14]!==x||e[15]!==s?(r=s(x),e[14]=x,e[15]=s,e[16]=r):r=e[16];let f;return e[17]!==r?(f=t.jsx(Yt,{children:r}),e[17]=r,e[18]=f):f=e[18],f}function Gn(n){const e=M.c(9),{children:s}=n,o=K();let a;e[0]!==s?(a=t.jsx(ze,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(Ee,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==a||e[7]!==l?(c=t.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=c):c=e[8],c}function Hn(n){const e=Xt(),{create:s}=qs(),{locator:o}=we(),a=Qt(),i=Bs();return async l=>{const c=crypto.randomUUID(),u=l===i?Bn(n,o,a??""):null;try{await s({id:c,virtual_mcp_id:l,...u?{branch:u}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:c},search:{virtualmcpid:l}})}}function pt(n){const e=M.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(Zt,{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 u;e[5]!==s.title?(u=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=u):u=e[6];let d;e[7]!==s.description?(d=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=d):d=e[8];let p;e[9]!==u||e[10]!==d?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,d]}),e[9]=u,e[10]=d,e[11]=p):p=e[11];let x;e[12]!==o?(x=o&&t.jsx(He,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=x):x=e[13];let r;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==p||e[18]!==x?(r=t.jsxs("button",{type:"button",onClick:a,className:l,children:[c,p,x]}),e[14]=a,e[15]=l,e[16]=c,e[17]=p,e[18]=x,e[19]=r):r=e[19],r}function hs(n){const e=M.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.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]=i):i=e[4],i}function Un(n){const e=M.c(44),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,c]=Q.useState(""),u=Q.useDeferredValue(l),d=u||void 0;let p;e[0]!==d?(p={searchTerm:d},e[0]=d,e[1]=p):p=e[1];const x=Ct(p),r=x??[],{org:f}=we(),g=Zs(),h=Hn(f.slug),j=Qs(x),y=u.toLowerCase(),S=r.filter(qn).filter(O=>!j.has(O.id)).filter(Yn),v=S.filter(Xn),N=S.filter(Wn),C=es(f.id),k=!u||C.title.toLowerCase().includes(y),w=!!(o&&k);let m;e[2]!==s||e[3]!==o?(m=()=>{o?.(null),s(),c("")},e[2]=s,e[3]=o,e[4]=m):m=e[4];const _=m;let D;e[5]!==g||e[6]!==h||e[7]!==s||e[8]!==o?(D=O=>{if(o){o(O.id),s(),c("");return}g(),s(),c(""),h(O.id)},e[5]=g,e[6]=h,e[7]=s,e[8]=o,e[9]=D):D=e[9];const F=D,I="flex flex-col max-h-[min(640px,80dvh)]";let b;e[10]!==l?(b=t.jsx(Pn,{value:l,onChange:c}),e[10]=l,e[11]=b):b=e[11];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let T;e[12]!==C||e[13]!==o||e[14]!==_||e[15]!==a||e[16]!==k?(T=o&&k&&C&&t.jsx(pt,{agent:C,selected:!a||a===C.id,onClick:_}),e[12]=C,e[13]=o,e[14]=_,e[15]=a,e[16]=k,e[17]=T):T=e[17];const z=(v.length>0||!u)&&t.jsx(On,{onImportFromGithub:i});let L;e[18]!==F||e[19]!==o||e[20]!==a?(L=O=>t.jsx(pt,{agent:O,selected:o?a===O.id:void 0,onClick:()=>F(O)},O.id),e[18]=F,e[19]=o,e[20]=a,e[21]=L):L=e[21];const P=v.map(L),$=N.length>0&&t.jsx(Mn,{});let U;e[22]!==F||e[23]!==o||e[24]!==a?(U=O=>t.jsx(pt,{agent:O,selected:o?a===O.id:void 0,onClick:()=>F(O)},O.id),e[22]=F,e[23]=o,e[24]=a,e[25]=U):U=e[25];const X=N.map(U);let Y;e[26]!==w||e[27]!==u||e[28]!==S.length?(Y=S.length===0&&!w&&u&&t.jsx(Ln,{}),e[26]=w,e[27]=u,e[28]=S.length,e[29]=Y):Y=e[29];let G;e[30]!==P||e[31]!==$||e[32]!==X||e[33]!==Y||e[34]!==T||e[35]!==z?(G=t.jsxs("div",{className:A,children:[T,z,P,$,X,Y]}),e[30]=P,e[31]=$,e[32]=X,e[33]=Y,e[34]=T,e[35]=z,e[36]=G):G=e[36];let V;e[37]!==s||e[38]!==f?(V=t.jsx($n,{org:f,onClose:s}),e[37]=s,e[38]=f,e[39]=V):V=e[39];let J;return e[40]!==G||e[41]!==V||e[42]!==b?(J=t.jsxs("div",{className:I,children:[b,G,V]}),e[40]=G,e[41]=V,e[42]=b,e[43]=J):J=e[43],J}function Wn(n){return!os(n.metadata)}function Xn(n){return os(n.metadata)}function Yn(n){return!zs(n.id)}function qn(n){return!Os(n.id)}function Qn(n){const e=M.c(14),{compact:s,trigger:o,onSelectAgent:a,selectedAgentId:i,side:l,align:c}=n===void 0?{}:n,u=s===void 0?!1:s,d=l===void 0?"right":l,p=c===void 0?"start":c,[x,r]=Q.useState(!1),[f,g]=Q.useState(!1),h=Wt(),{setOpenMobile:j}=Cs(),y=Js(),S=y?"border border-border":void 0;let v;e[0]!==y?(v=b=>y?t.jsx(Gn,{children:b}):b,e[0]=y,e[1]=v):v=e[1];const N=v;let C;e[2]!==h||e[3]!==j?(C=()=>{r(!1),h&&j(!1)},e[2]=h,e[3]=j,e[4]=C):C=e[4];const k=C;let w;e[5]!==k||e[6]!==g?(w=()=>{k(),g(!0)},e[5]=k,e[6]=g,e[7]=w):w=e[7];const m=w,_=x&&t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(ks,{className:"h-4 w-24"})}),children:t.jsx(Un,{onClose:k,onSelectAgent:a,selectedAgentId:i,onImportFromGithub:m})}),D=h?t.jsxs(t.Fragment,{children:[o?Q.cloneElement(o,{onClick:b=>{o.props.onClick?.(b),r(!0)}}):u?N(t.jsx(zn,{setOpen:r,emptyCtaClass:S})):t.jsx(En,{setOpen:r,highlightEmpty:y,emptyCtaClass:S}),t.jsx(kt,{open:x,onOpenChange:r,direction:"bottom",children:t.jsxs(yt,{className:"max-h-[85dvh] p-0",children:[t.jsx(Rn,{}),_]})})]}):t.jsxs(st,{open:x,onOpenChange:b=>{b&&!x&&Z("agent_browser_opened",{surface:"desktop_popover"}),r(b)},children:[o?t.jsx(Ve,{asChild:!0,children:o}):u?N(t.jsx(Ve,{asChild:!0,children:t.jsx(Vn,{emptyCtaClass:S})})):t.jsx(Kn,{wrapEmptyHint:N,highlightEmpty:y,emptyCtaClass:S}),t.jsx(nt,{className:"w-[380px] p-0 overflow-hidden",side:d,align:p,children:_})]});let F;e[8]!==f||e[9]!==g?(F=t.jsx(Xs,{open:f,onOpenChange:g,mode:"agent"}),e[8]=f,e[9]=g,e[10]=F):F=e[10];let I;return e[11]!==D||e[12]!==F?(I=t.jsxs(t.Fragment,{children:[D,F]}),e[11]=D,e[12]=F,e[13]=I):I=e[13],I}function Jn(){const n=M.c(2),e=Ct()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?tn(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Zn="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 el(n){const e=M.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=K(),c=Vs(s)??o??null;let u,d,p,x,r;e[0]!==c?.title||e[1]!==a||e[2]!==l?(r=c?.title??l("header.shellBreadcrumb.superAgentDefaultName"),x="flex min-w-0 items-center gap-0",u="button",d=a,p=l("header.shellBreadcrumb.openAgentHome",{name:r}),e[0]=c?.title,e[1]=a,e[2]=l,e[3]=u,e[4]=d,e[5]=p,e[6]=x,e[7]=r):(u=e[3],d=e[4],p=e[5],x=e[6],r=e[7]);const f=c?.icon??null;let g;e[8]!==f||e[9]!==r?(g=t.jsx(Zt,{icon:f,name:r,size:"xs"}),e[8]=f,e[9]=r,e[10]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==p||e[14]!==g?(h=t.jsx("button",{type:u,onClick:d,"aria-label":p,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:g}),e[11]=u,e[12]=d,e[13]=p,e[14]=g,e[15]=h):h=e[15];let j;e[16]!==r?(j=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:r}),e[16]=r,e[17]=j):j=e[17];let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=y):y=e[18];let S;e[19]!==j?(S=t.jsxs("button",{type:"button",className:Zn,children:[j,y]}),e[19]=j,e[20]=S):S=e[20];let v;e[21]!==s||e[22]!==i||e[23]!==S?(v=t.jsx(Qn,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:S}),e[21]=s,e[22]=i,e[23]=S,e[24]=v):v=e[24];let N;return e[25]!==v||e[26]!==x||e[27]!==h?(N=t.jsxs("div",{className:x,children:[h,v]}),e[25]=v,e[26]=x,e[27]=h,e[28]=N):N=e[28],N}function Ao(n){const e=M.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=we(),{threads:i}=ls(),l=Ct(),{data:c}=bt.useSession(),{setTaskId:u,createNewTask:d}=is(),p=Jn();let x;e[2]!==a.id?(x=es(a.id),e[2]=a.id,e[3]=x):x=e[3];const r=x,f=r.id,g=Jt();let h;e[4]!==l||e[5]!==d||e[6]!==f||e[7]!==o||e[8]!==p||e[9]!==c?.user?.id||e[10]!==u||e[11]!==i?(h=C=>{const k=C??f,w=(l??[]).find(_=>_.id===k),m=en(i,k,c?.user?.id,p(k),!!(w&&Ks(w)));m?u(m.id,k):d(k),o?.()},e[4]=l,e[5]=d,e[6]=f,e[7]=o,e[8]=p,e[9]=c?.user?.id,e[10]=u,e[11]=i,e[12]=h):h=e[12];const j=h;let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=y):y=e[13];const S=g===f?r:void 0;let v;e[14]!==g||e[15]!==j?(v=()=>j(g),e[14]=g,e[15]=j,e[16]=v):v=e[16];let N;return e[17]!==g||e[18]!==j||e[19]!==S||e[20]!==v?(N=t.jsx(Q.Suspense,{fallback:y,children:t.jsx(el,{agentId:g,fallback:S,onOpenHome:v,onPick:j})}),e[17]=g,e[18]=j,e[19]=S,e[20]=v,e[21]=N):N=e[21],N}function Fo(){const n=M.c(20),e=K(),{threads:s}=ls(),{createNewTask:o}=is(),a=Jt(),i=Qt();let l;n[0]!==i||n[1]!==s?(l=s.find(j=>j.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const c=l;let u;n[3]!==a||n[4]!==o||n[5]!==c?(u=()=>{o(a,c)},n[3]=a,n[4]=o,n[5]=c,n[6]=u):u=n[6];const d=u;let p;n[7]!==e?(p=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=p):p=n[8];let x;n[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ps,{size:16}),n[9]=x):x=n[9];let r;n[10]!==d||n[11]!==p?(r=t.jsx(ze,{asChild:!0,children:t.jsx("button",{type:"button",onClick:d,"aria-label":p,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:x})}),n[10]=d,n[11]=p,n[12]=r):r=n[12];let f;n[13]!==e?(f=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=f):f=n[14];let g;n[15]!==f?(g=t.jsx(Ee,{side:"bottom",children:f}),n[15]=f,n[16]=g):g=n[16];let h;return n[17]!==r||n[18]!==g?(h=t.jsxs(Re,{children:[r,g]}),n[17]=r,n[18]=g,n[19]=h):h=n[19],h}function tl({open:n,onOpenChange:e,onCreated:s}){const o=K(),{org:a}=we(),{data:i}=bt.useSession(),{stdioEnabled:l}=Ns(),c=Wt(),u=ms(),d=as(),x=rs(d,"").items,r=Ss({resolver:_s(jn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=r.watch("ui_type"),g=r.watch("connection_url"),h=r.watch("npx_package"),j=qe({uiType:f,connectionUrl:g??"",npxPackage:h??""})??Lt({uiType:f,connectionUrl:g??"",registryItems:x}),y=m=>{const _=m.trim();if(!_)return;const D=!!r.formState.dirtyFields.title,F=!!r.formState.dirtyFields.description,I=!!r.formState.dirtyFields.env_vars,b=T=>{if(T&&(!D&&!r.getValues("title").trim()&&T.title&&r.setValue("title",T.title,{shouldDirty:!1}),!F&&!(r.getValues("description")??"").trim()&&T.description&&r.setValue("description",T.description,{shouldDirty:!1}),!I&&T.envVarKeys?.length)){const z=r.getValues("env_vars")??[],L=new Set(z.map($=>$.key)),P=T.envVarKeys.filter($=>!L.has($));P.length>0&&r.setValue("env_vars",[...z,...P.map($=>({key:$,value:""}))],{shouldDirty:!0})}},A=vn(_);if(A&&l){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",A.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),b(qe({uiType:"NPX",npxPackage:A.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const T=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";r.setValue("ui_type",T,{shouldDirty:!0}),r.setValue("connection_url",_,{shouldDirty:!0}),b(qe({uiType:T,connectionUrl:_})??Lt({uiType:T,connectionUrl:_,registryItems:x}));return}f==="NPX"&&b(qe({uiType:"NPX",npxPackage:_}))},S=m=>{m||r.reset(),e(m)},v=async m=>{let _,D=null,F=null,I=null;m.ui_type==="NPX"?(_="STDIO",D="",I=Cn(m.npx_package||"",m.env_vars||[])):m.ui_type==="STDIO"?(_="STDIO",D="",I=kn(m.stdio_command||"",m.stdio_args||"",m.stdio_cwd,m.env_vars||[])):(_=m.ui_type,D=m.connection_url||"",F=m.connection_token||null);const b=nn("conn");try{await u.create.mutateAsync({id:b,title:m.title,description:m.description||null,connection_type:_,connection_url:D,connection_token:F,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:m.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),r.reset(),e(!1),s?.(b)}catch{xe.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},N=o("connections.createConnectionDialog.title"),C=o("connections.createConnectionDialog.description"),k=r.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),w=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(re,{control:r.control,name:"ui_type",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(un,{value:m.value,onValueChange:m.onChange,children:[t.jsx(ue,{children:t.jsx(fn,{children:t.jsx(mn,{})})}),t.jsxs(pn,{children:[t.jsx(Ke,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(Ke,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(Ke,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(Ke,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(Ke,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(fe,{})]})}),f==="NPX"&&t.jsx(re,{control:r.control,name:"npx_package",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...m,value:m.value??"",onPaste:_=>{const D=_.clipboardData.getData("text");D&&(_.preventDefault(),r.setValue("npx_package",D.trim(),{shouldDirty:!0}),y(D))},onBlur:_=>{y(_.target.value),m.onBlur()}})}),t.jsx(fe,{})]})}),f==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(re,{control:r.control,name:"stdio_command",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...m,value:m.value??""})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"stdio_args",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...m,value:m.value??""})}),t.jsx(fe,{})]})})]}),t.jsx(re,{control:r.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...m,value:m.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(fe,{})]})})]}),(f==="NPX"||f==="STDIO")&&t.jsx(re,{control:r.control,name:"env_vars",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(ue,{children:t.jsx(bn,{value:m.value??[],onChange:m.onChange})}),t.jsx(fe,{})]})}),f!=="NPX"&&f!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(re,{control:r.control,name:"connection_url",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...m,value:m.value??"",onPaste:_=>{const D=_.clipboardData.getData("text");D&&(_.preventDefault(),r.setValue("connection_url",D.trim(),{shouldDirty:!0}),y(D))},onBlur:_=>{y(_.target.value),m.onBlur()}})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"connection_token",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:j?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(ue,{children:t.jsx(Se,{type:"password",placeholder:j?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...m,value:m.value??""})}),j?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.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")})]})]}),t.jsx(fe,{})]})})]}),t.jsx(re,{control:r.control,name:"title",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...m})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"description",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(ue,{children:t.jsx(hn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...m,value:m.value??""})}),t.jsx(fe,{})]})})]});return c?t.jsx(kt,{open:n,onOpenChange:S,children:t.jsxs(yt,{className:"max-h-[90vh]",children:[t.jsx(Gs,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Nt,{children:N}),t.jsx(Hs,{className:"mt-1",children:C})]}),t.jsx(ss,{asChild:!0,children:t.jsx(je,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(xn,{size:16})})})]})}),t.jsx(Pt,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(v),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:w}),t.jsx(ns,{children:t.jsx(je,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):t.jsx(cs,{open:n,onOpenChange:S,children:t.jsxs(ds,{className:"sm:max-w-[525px]",children:[t.jsxs(us,{children:[t.jsx(fs,{children:N}),t.jsx(cn,{children:C})]}),t.jsx(Pt,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(v),children:[t.jsx("div",{className:"py-4",children:w}),t.jsxs(dn,{children:[t.jsx(je,{type:"button",variant:"outline",onClick:()=>S(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(je,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function sl(n){const e=M.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:c,connectingItemId:u,search:d,onCreateConnection:p,onBrowseNavigate:x,defaultTab:r}=n,f=s===void 0?"add":s,g=r===void 0?"connected":r,h=K(),{org:j}=we(),y=Q.useDeferredValue(d),S=d!==y;let v;e[0]!==y?(v=y.trim().toLowerCase(),e[0]=y,e[1]=v):v=e[1];const N=v;let C;e[2]!==g?(C=B=>B??g,e[2]=g,e[3]=C):C=e[3];const[k,w]=ws(Ds.connectionsTab(j.slug)+(g==="all"?":home-modal":":agent-modal"),C);let m;e[4]!==k||e[5]!==w?(m=B=>{B!==k&&Z("connections_dialog_tab_changed",{to_tab:B}),w(B)},e[4]=k,e[5]=w,e[6]=m):m=e[6];const _=m;let D;e[7]!==j.id||e[8]!==j.slug?(D={connectionId:Es,orgId:j.id,orgSlug:j.slug},e[7]=j.id,e[8]=j.slug,e[9]=D):D=e[9];const F=_n(D),I=y?.trim().split(/\s+/).filter(Boolean)??[],b=I.length>0?{operator:"or",conditions:I.flatMap(dl)}:void 0,A={...b&&{where:b},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:z,fetchNextPage:L,hasNextPage:P,isFetchingNextPage:$}=Sn({queryKey:vt.collectionListInfinite(F,j.id,"","CONNECTIONS",T),queryFn:async B=>{const{pageParam:W}=B,ge=W===void 0?0:W;return(await F.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...b&&{where:b},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:ge}})).structuredContent},initialPageParam:0,getNextPageParam:rl,staleTime:3e4}),U=z?.pages.flatMap(al)??[],X=rn(U),Y=new Set(U.filter(il).map(ol)),G=as(),V=rs(G,y),J=$t(V.loadMore,V.hasMore,V.isLoadingMore),O=$t(L,P??!1,$),H=k==="all"||!!N,me=H?V.items.filter(B=>{const W=ln(B);if(W&&Y.has(W))return!1;if(!N)return!0;const ge=et(B._meta),ye=[B.title,B.description,B.name,B.server?.title,B.server?.description,B.server?.name,ge?.friendly_name,ge?.friendlyName].filter(Boolean).join(" ").toLowerCase();return I.some(ae=>ye.includes(ae.toLowerCase()))}):[],te=me.filter(ll),se=me.filter(nl);let le;e[10]!==a?(le=B=>B.some(W=>a.has(W.id)),e[10]=a,e[11]=le):le=e[11];const ie=le;let pe;e[12]!==a||e[13]!==o||e[14]!==u||e[15]!==ie||e[16]!==f||e[17]!==i||e[18]!==x||e[19]!==l||e[20]!==h?(pe=(B,W,ge,ye,ae)=>{const Ye=ie(ae),Oe=ae.find(Ne=>!a.has(Ne.id)),ne=ae[0];if(f==="browse"){const Ne=yn(ne);return t.jsx(ut,{connection:{title:W,icon:ge,description:ae.length>1?`${ae.length} instances`:ye??void 0},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Qe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(He,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{Z("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:ae.length}),x?.(Ne)}},B)}return t.jsx(ut,{connection:{title:W,icon:ge,description:ye},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Ye&&t.jsxs(Qe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(He,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),t.jsx(je,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:u!==null,onClick:Ne=>{Ne.stopPropagation(),Oe?(Z("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Oe.id}),o&&Z("agent_connection_attached",{agent_id:o,connection_id:Oe.id,app_name:ne.app_name??null,mode:"existing"}),i(Oe.id)):(Z("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),l(ne))},children:h("virtualMcp.connectionDialogContent.add")})]})},B)},e[12]=a,e[13]=o,e[14]=u,e[15]=ie,e[16]=f,e[17]=i,e[18]=x,e[19]=l,e[20]=h,e[21]=pe):pe=e[21];const E=pe;let R;e[22]!==u||e[23]!==f||e[24]!==c||e[25]!==h?(R=B=>{const W=et(B._meta),ge=W?.friendlyName||W?.friendly_name||B.server?.title||B.title||B.server?.name||B.name||B.id||"",ye=B.server?.description||B.description||null,ae=B.server?.icons?.[0]?.src||on(B.server?.repository)||null,Ye=W?.official===!0,Oe=W?.verified===!0,ne=W?.owner==="deco";return t.jsx(ut,{connection:{title:ge,description:ye,icon:ae},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ne&&Ye&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx(Qe,{variant:"outline",size:"icon",children:t.jsx(ft,{})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ne&&!Ye&&Oe&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx(Qe,{variant:"outline",size:"icon",children:t.jsx(ft,{})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(je,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:u!==null,onClick:Ne=>{Ne.stopPropagation(),Z("connection_add_clicked",{action:"connect_new",registry_item_id:B.id,app_name:W?.friendlyName||B.server?.name||B.name||null}),c(B)},children:u===B.id?t.jsx(Ge,{className:"size-3.5"}):h(f==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${B.id}`)},e[22]=u,e[23]=f,e[24]=c,e[25]=h,e[26]=R):R=e[26];const he=R;let ee;e[27]!==k||e[28]!==_||e[29]!==p||e[30]!==N||e[31]!==h?(ee=!N&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(Nn,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:k,onTabChange:B=>_(B)}),t.jsxs(je,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Z("connections_dialog_custom_clicked"),p()},children:[t.jsx(We,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=k,e[28]=_,e[29]=p,e[30]=N,e[31]=h,e[32]=ee):ee=e[32];const ve=S&&"opacity-50 pointer-events-none";let oe;e[33]!==ve?(oe=q("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=oe):oe=e[34];const Ae="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Fe;e[35]!==E?(Fe=B=>{if(B.type==="group")return E(B.key,B.title,B.icon,null,B.connections);const W=B.connection;return E(W.id,W.title,W.icon,W.description??null,[W])},e[35]=E,e[36]=Fe):Fe=e[36];const lt=X.map(Fe);let Ie;e[37]!==O?(Ie=t.jsx("div",{ref:O,className:"col-span-full h-1"}),e[37]=O,e[38]=Ie):Ie=e[38];let Te;e[39]!==$?(Te=$&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),e[39]=$,e[40]=Te):Te=e[40];const ot=H&&te.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(ft,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=H&&te.map(he),at=H&&se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),rt=H&&se.map(he);let Be;e[41]!==J||e[42]!==G||e[43]!==H?(Be=H&&G.length>0&&t.jsx("div",{ref:J,className:"col-span-full h-1"}),e[41]=J,e[42]=G,e[43]=H,e[44]=Be):Be=e[44];let Pe;e[45]!==V.isLoadingMore||e[46]!==H?(Pe=H&&V.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),e[45]=V.isLoadingMore,e[46]=H,e[47]=Pe):Pe=e[47];let Le;e[48]!==lt||e[49]!==Ie||e[50]!==Te||e[51]!==ot||e[52]!==it||e[53]!==at||e[54]!==rt||e[55]!==Be||e[56]!==Pe?(Le=t.jsxs("div",{className:Ae,children:[lt,Ie,Te,ot,it,at,rt,Be,Pe]}),e[48]=lt,e[49]=Ie,e[50]=Te,e[51]=ot,e[52]=it,e[53]=at,e[54]=rt,e[55]=Be,e[56]=Pe,e[57]=Le):Le=e[57];let $e;e[58]!==k||e[59]!==X.length||e[60]!==se||e[61]!==d||e[62]!==h||e[63]!==te?($e=X.length===0&&te.length===0&&se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:d?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:d}):h(k==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=k,e[59]=X.length,e[60]=se,e[61]=d,e[62]=h,e[63]=te,e[64]=$e):$e=e[64];let Me;e[65]!==oe||e[66]!==Le||e[67]!==$e?(Me=t.jsxs("div",{className:oe,children:[Le,$e]}),e[65]=oe,e[66]=Le,e[67]=$e,e[68]=Me):Me=e[68];let Xe;return e[69]!==ee||e[70]!==Me?(Xe=t.jsxs(t.Fragment,{children:[ee,Me]}),e[69]=ee,e[70]=Me,e[71]=Xe):Xe=e[71],Xe}function nl(n){return!n.verified&&!et(n._meta)?.verified&&!n.meta?.verified}function ll(n){return n.verified||et(n._meta)?.verified||n.meta?.verified}function ol(n){return n.app_name}function il(n){return n.app_name}function al(n){return n?.items??[]}function rl(n,e){if(n?.hasMore)return e.reduce(cl,0)}function cl(n,e){return n+(e?.items?.length??0)}function dl(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Io({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=K(),l=a.mode??"add",c="agentId"in a?a.agentId:void 0,u="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,d="onAdd"in a&&a.onAdd?a.onAdd:b=>{},p=(b,A,T)=>{c&&Z("agent_connection_attached",{agent_id:c,connection_id:b,app_name:A,mode:T})},[x,r]=Q.useState(null),[f,g]=Q.useState(o),[h,j]=Q.useState(!1),[y,S]=Q.useState(n);n!==y&&(S(n),n&&g(o));const{org:v}=we(),{data:N}=bt.useSession(),C=ms(),k=As(),w=Xt(),m=b=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},_=()=>{k.invalidateQueries({predicate:b=>{const A=b.queryKey;return A[1]===v.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},D=async(b,A)=>{Z("connection_oauth_succeeded",{connection_id:b,flow:A});const T=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await k.invalidateQueries({queryKey:vt.isMCPAuthenticated(T.href,null)}),_()},F=async b=>{r(b.app_name??b.id);try{const T=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,L=(await C.create.mutateAsync({title:T,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,P=await mt({connectionId:L,orgId:v.id,orgSlug:v.slug,persistFallback:$=>C.update.mutateAsync({id:L,data:{connection_token:$}}).then(()=>{})});if(P.ran&&!P.ok){Z("connection_oauth_failed",{connection_id:L,flow:"clone",error:P.error??"no_token"}),xe.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:P.error??"no token received"})),await C.delete.mutateAsync(L);return}P.ran&&await D(L,"clone"),p(L,b.app_name??null,"clone"),d(L)}catch(A){console.error("Failed to add connection:",A),xe.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{r(null)}},I=async b=>{if(!(!v||!N?.user?.id)){r(b.id);try{const A=an(b,v.id,N.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",z=!!A.connection_url,L=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!z&&!L){xe.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),r(null);return}const{id:P}=await C.create.mutateAsync(A),$=await mt({connectionId:P,orgId:v.id,orgSlug:v.slug,persistFallback:U=>C.update.mutateAsync({id:P,data:{connection_token:U}}).then(()=>{})});if($.ran&&!$.ok){Z("connection_oauth_failed",{connection_id:P,flow:"connect_new",error:$.error??"no_token"}),xe.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:$.error??"no token received"})}),p(P,A.app_name??null,"new"),d(P);return}$.ran?(await D(P,"connect_new"),xe.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):xe.success(i("virtualMcp.addConnectionDialog.connected")),p(P,A.app_name??null,"new"),d(P)}catch(A){console.error("Failed to connect:",A),xe.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{r(null)}}};return t.jsxs(cs,{open:n,onOpenChange:e,children:[t.jsxs(ds,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(us,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(fs,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(sn,{value:f,onChange:g,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),children:t.jsx(sl,{mode:l,agentId:c,addedConnectionIds:u,onAdd:d,onCloneAndAdd:F,onConnectAndAdd:I,connectingItemId:x,search:f,onCreateConnection:()=>j(!0),onBrowseNavigate:m,defaultTab:s})})]}),t.jsx(tl,{open:h,onOpenChange:j,onCreated:async b=>{j(!1);const A=await mt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:T=>C.update.mutateAsync({id:b,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){Z("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:A.error??"no_token"}),xe.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),p(b,null,"custom"),d(b),e(!1);return}A.ran&&await D(b,"custom_create"),p(b,null,"custom"),d(b),e(!1)}})]})}const Rt=new Map;function To(){const{org:n}=we(),e=Fs(),s=wn(),o=s.find(j=>j.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:c}=Is({queryKey:vt.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),u=a?.balanceCents??null,d=u!=null?u/100:null,p=Q.useRef(new Map);if(u!=null){const j=Rt.get(n.id);p.current.get(n.id)&&j!=null&&u>j&&Z("credits_topped_up_detected",{organization_id:n.id,delta_cents:u-j,previous_balance_cents:j,new_balance_cents:u}),Rt.set(n.id,u),p.current.set(n.id,!0)}const x=!!o,r=u!=null&&u>0,f=u!=null&&u===0,g=u!=null&&u===200,h=s.length>0&&s.every(j=>j.providerId==="deco");return{hasDecoKey:x,decoKeyId:o?.id??null,balanceCents:u,balanceDollars:d,hasCredits:r,isZeroBalance:f,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:i,isFetching:c,refetch:l}}const ul=4,fl="TASK";function ml(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,ul)||fl}function pl(n,e,s){const o=s?.trim();return o||(e==null?null:`${ml(n)}-${String(e).padStart(2,"0")}`)}const hl=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function Vt(n){const e=hl.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function Kt(n){const e=M.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=q("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let c;return e[4]!==a||e[5]!==i||e[6]!==l?(c=t.jsx("img",{src:Rs,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=c):c=e[7],c}function Bo(n,e){if(!e)return null;const s=e.toLowerCase();return n.find(o=>{const a=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}const Gt={active:0,future:1,closed:2};function Ht(n){if(!n.startsAt)return null;const e=Date.parse(n.startsAt);return Number.isNaN(e)?null:e}function gl(n,e){const s=Gt[n.state]-Gt[e.state];if(s!==0)return s;const o=Ht(n),a=Ht(e);if(o===null||a===null){if(o!==a)return o===null?1:-1}else if(o!==a)return n.state==="closed"?a-o:o-a;return n.name.localeCompare(e.name)||n.id.localeCompare(e.id)}function Bt(n){return n.filter(s=>s.state==="active").sort(gl)[0]?.id??null}const xt="__unassigned__",jt="__no_repo__",tt="backlog",gs="all",be="__any__",xs={assignee:null,priority:null,due:null,tags:[],repo:null,sprint:null,search:""};function Po(n,e){return n===gs?null:n===tt||n!==null&&e.some(s=>s.id===n)?n:Bt(e)}function js(n,e){return n.sprint!==null&&n.sprint!==e}function xl(n,e){return n.assignee!==null||n.priority!==null||n.due!==null||n.tags.length>0||n.repo!==null||js(n,e)||n.search.trim()!==""}function jl(n,e){return(n.assignee!==null?1:0)+(n.priority!==null?1:0)+(n.due!==null?1:0)+(n.tags.length>0?1:0)+(n.repo!==null?1:0)+(js(n,e)?1:0)+(n.search.trim()!==""?1:0)}const bl=864e5;function vl(n,e){const s=new Date(n),o=new Date(e);return s.getFullYear()===o.getFullYear()&&s.getMonth()===o.getMonth()&&s.getDate()===o.getDate()}const Cl=/^0*(\d+)$/;function bs(n,e,s){const o=n.trim();if(o==="")return!1;const a=s?.trim();if(a){if(o.toLowerCase()===a.toLowerCase())return!0;const i=Cl.exec(o)?.[1];return i!==void 0&&Number(i)===Vt(a)}return e!=null&&Vt(o)===e}function kl(n,e){return n.assigneeId===e?!0:n.assigneeId===gt&&n.assignedBy===e}function Lo(n,e){const s=e.search.trim().toLowerCase();if(s!==""&&!`${n.title} ${n.description??""}`.toLowerCase().includes(s)&&!bs(s,n.keySeq,n.jiraIssueKey))return!1;if(e.assignee!==null){if(e.assignee===xt){if(n.assigneeId!==null)return!1}else if(!kl(n,e.assignee))return!1}if(e.priority!==null&&n.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(n.dueDate)return!1}else{if(!n.dueDate)return!1;const o=new Date(n.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&o>=a||e.due==="today"&&!vl(o,a)||e.due==="week"&&(o<a||o>a+7*bl))return!1}if(e.tags.length>0){const o=n.tags.map(a=>a.id);if(!e.tags.some(a=>o.includes(a)))return!1}if(e.repo!==null){if(e.repo===jt){if(n.repo!=null)return!1}else if(n.repo?.toLowerCase()!==e.repo.toLowerCase())return!1}if(e.sprint!==null){if(e.sprint===tt){if(n.sprintId!=null)return!1}else if(n.sprintId!==e.sprint)return!1}return!0}const Ut={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function ke(n,e=!1){return q("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",n?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function yl(n){const e=M.c(107),{value:s,members:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ot,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let p=d,x;e[1]!==l?(x=l("taskBoard.taskFilters.assigneeLabel"),e[1]=l,e[2]=x):x=e[2];let r=x;if(s===xt){let E;e[3]!==l?(E=l("taskBoard.taskFilters.assigneeUnassigned"),e[3]=l,e[4]=E):E=e[4],r=E}else if(s===gt){let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Kt,{size:14}),e[5]=E):E=e[5],p=E;let R;e[6]!==l?(R=l("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=l,e[7]=R):R=e[7],r=R}else if(s){let E,R,he,ee;if(e[8]!==o||e[9]!==s){let Ae;e[14]!==s?(Ae=Fe=>Fe.userId===s,e[14]=s,e[15]=Ae):Ae=e[15],R=o.find(Ae),E=Mt,he=R?.user?.image??void 0,ee=zt(R?.user?.name),e[8]=o,e[9]=s,e[10]=E,e[11]=R,e[12]=he,e[13]=ee}else E=e[10],R=e[11],he=e[12],ee=e[13];let ve;e[16]!==E||e[17]!==he||e[18]!==ee?(ve=t.jsx(E,{url:he,fallback:ee,shape:"circle",size:"2xs"}),e[16]=E,e[17]=he,e[18]=ee,e[19]=ve):ve=e[19],p=ve;let oe;e[20]!==R?.user?.name||e[21]!==l?(oe=R?.user?.name??l("taskBoard.taskFilters.assigneeMember"),e[20]=R?.user?.name,e[21]=l,e[22]=oe):oe=e[22],r=oe}let f;e[23]!==a?(f=E=>{a(E),u(!1)},e[23]=a,e[24]=f):f=e[24];const g=f,h=s!==null;let j;e[25]!==i||e[26]!==h?(j=ke(h,i),e[25]=i,e[26]=h,e[27]=j):j=e[27];const y=j,S=i&&"ml-auto";let v;e[28]!==S?(v=q("shrink-0 opacity-60",S),e[28]=S,e[29]=v):v=e[29];const N=v;let C;e[30]!==r?(C=t.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[30]=r,e[31]=C):C=e[31];let k;e[32]!==N?(k=t.jsx(De,{size:12,className:N}),e[32]=N,e[33]=k):k=e[33];let w;e[34]!==p||e[35]!==C||e[36]!==k||e[37]!==y?(w=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:y,children:[p,C,k]})}),e[34]=p,e[35]=C,e[36]=k,e[37]=y,e[38]=w):w=e[38];let m;e[39]!==l?(m=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=l,e[40]=m):m=e[40];let _;e[41]!==l?(_=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=l,e[42]=_):_=e[42];let D;e[43]!==m||e[44]!==_?(D=t.jsx(At,{placeholder:m,"aria-label":_,className:"h-9"}),e[43]=m,e[44]=_,e[45]=D):D=e[45];let F;e[46]!==l?(F=l("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=l,e[47]=F):F=e[47];let I;e[48]!==F?(I=t.jsx(Ft,{children:F}),e[48]=F,e[49]=I):I=e[49];let b;e[50]!==l?(b=l("taskBoard.taskFilters.assigneeAnyone"),e[50]=l,e[51]=b):b=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==l?(T=l("taskBoard.taskFilters.assigneeAnyone"),e[54]=l,e[55]=T):T=e[55];let z;e[56]!==b||e[57]!==A||e[58]!==T?(z=t.jsx(Ce,{value:b,onSelect:A,children:T}),e[56]=b,e[57]=A,e[58]=T,e[59]=z):z=e[59];let L;e[60]!==l?(L=l("taskBoard.taskFilters.assigneeUnassigned"),e[60]=l,e[61]=L):L=e[61];let P;e[62]!==g?(P=()=>g(xt),e[62]=g,e[63]=P):P=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Ot,{size:16,className:"text-muted-foreground"}),e[64]=$):$=e[64];let U;e[65]!==l?(U=l("taskBoard.taskFilters.assigneeUnassigned"),e[65]=l,e[66]=U):U=e[66];let X;e[67]!==L||e[68]!==P||e[69]!==U?(X=t.jsxs(Ce,{value:L,onSelect:P,className:"gap-2",children:[$,U]}),e[67]=L,e[68]=P,e[69]=U,e[70]=X):X=e[70];let Y;e[71]!==l?(Y=l("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=l,e[72]=Y):Y=e[72];let G;e[73]!==g?(G=()=>g(gt),e[73]=g,e[74]=G):G=e[74];let V;e[75]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(Kt,{size:16}),e[75]=V):V=e[75];let J;e[76]!==l?(J=l("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=l,e[77]=J):J=e[77];let O;e[78]!==Y||e[79]!==G||e[80]!==J?(O=t.jsxs(Ce,{value:Y,onSelect:G,className:"gap-2",children:[V,J]}),e[78]=Y,e[79]=G,e[80]=J,e[81]=O):O=e[81];let H;e[82]!==z||e[83]!==X||e[84]!==O?(H=t.jsxs(Ue,{children:[z,X,O]}),e[82]=z,e[83]=X,e[84]=O,e[85]=H):H=e[85];let me;e[86]!==l?(me=l("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=l,e[87]=me):me=e[87];let te;if(e[88]!==o||e[89]!==g){let E;e[91]!==g?(E=R=>t.jsxs(Ce,{value:R.user?.name??R.userId,onSelect:()=>g(R.userId),className:"gap-2",children:[t.jsx(Mt,{url:R.user?.image??void 0,fallback:zt(R.user?.name),shape:"circle",size:"2xs"}),t.jsx("span",{className:"truncate",children:R.user?.name??R.userId})]},R.userId),e[91]=g,e[92]=E):E=e[92],te=o.map(E),e[88]=o,e[89]=g,e[90]=te}else te=e[90];let se;e[93]!==me||e[94]!==te?(se=t.jsx(Ue,{heading:me,children:te}),e[93]=me,e[94]=te,e[95]=se):se=e[95];let le;e[96]!==I||e[97]!==H||e[98]!==se?(le=t.jsxs(It,{children:[I,H,se]}),e[96]=I,e[97]=H,e[98]=se,e[99]=le):le=e[99];let ie;e[100]!==D||e[101]!==le?(ie=t.jsx(nt,{align:"start",className:"w-56 p-0",children:t.jsxs(Tt,{children:[D,le]})}),e[100]=D,e[101]=le,e[102]=ie):ie=e[102];let pe;return e[103]!==c||e[104]!==w||e[105]!==ie?(pe=t.jsxs(st,{open:c,onOpenChange:u,children:[w,ie]}),e[103]=c,e[104]=w,e[105]=ie,e[106]=pe):pe=e[106],pe}function Nl(n){const e=M.c(33),{value:s,onChange:o,block:a}=n,i=K(),l=s!==null;let c;e[0]!==a||e[1]!==l?(c=ke(l,a),e[0]=a,e[1]=l,e[2]=c):c=e[2];const u=c,d=a&&"ml-auto";let p;e[3]!==d?(p=q("shrink-0 opacity-60",d),e[3]=d,e[4]=p):p=e[4];const x=p;let r;e[5]!==s?(r=s?t.jsx("span",{className:q("size-2 shrink-0 rounded-full",Je[s].dotClassName)}):t.jsx(Dn,{size:14,className:"shrink-0"}),e[5]=s,e[6]=r):r=e[6];let f;e[7]!==i||e[8]!==s?(f=i(s?Je[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=i,e[8]=s,e[9]=f):f=e[9];let g;e[10]!==x?(g=t.jsx(De,{size:12,className:x}),e[10]=x,e[11]=g):g=e[11];let h;e[12]!==r||e[13]!==f||e[14]!==g||e[15]!==u?(h=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:u,children:[r,f,g]})}),e[12]=r,e[13]=f,e[14]=g,e[15]=u,e[16]=h):h=e[16];const j=s??be;let y;e[17]!==o?(y=w=>o(w===be?null:w),e[17]=o,e[18]=y):y=e[18];let S;e[19]!==i?(S=i("taskBoard.taskFilters.priorityAnyPriority"),e[19]=i,e[20]=S):S=e[20];let v;e[21]!==S?(v=t.jsx(_e,{value:be,children:S}),e[21]=S,e[22]=v):v=e[22];let N;e[23]!==i?(N=Fn.map(w=>t.jsxs(_e,{value:w,className:"gap-2",children:[t.jsx("span",{className:q("size-2 rounded-full",Je[w].dotClassName)}),i(Je[w].labelKey)]},w)),e[23]=i,e[24]=N):N=e[24];let C;e[25]!==y||e[26]!==v||e[27]!==N||e[28]!==j?(C=t.jsx(_t,{align:"start",className:"w-40",children:t.jsxs(wt,{value:j,onValueChange:y,children:[v,N]})}),e[25]=y,e[26]=v,e[27]=N,e[28]=j,e[29]=C):C=e[29];let k;return e[30]!==C||e[31]!==h?(k=t.jsxs(Dt,{children:[h,C]}),e[30]=C,e[31]=h,e[32]=k):k=e[32],k}function Sl(n){const e=M.c(35),{value:s,onChange:o,block:a}=n,i=K();let l;e[0]!==i||e[1]!==s?(l=s?i(Ut[s]):void 0,e[0]=i,e[1]=s,e[2]=l):l=e[2];const c=l,u=s!==null;let d;e[3]!==a||e[4]!==u?(d=ke(u,a),e[3]=a,e[4]=u,e[5]=d):d=e[5];const p=d,x=a&&"ml-auto";let r;e[6]!==x?(r=q("shrink-0 opacity-60",x),e[6]=x,e[7]=r):r=e[7];const f=r;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(dt,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==c||e[10]!==i?(h=c??i("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=i,e[11]=h):h=e[11];let j;e[12]!==f?(j=t.jsx(De,{size:12,className:f}),e[12]=f,e[13]=j):j=e[13];let y;e[14]!==h||e[15]!==j||e[16]!==p?(y=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:p,children:[g,h,j]})}),e[14]=h,e[15]=j,e[16]=p,e[17]=y):y=e[17];const S=s??be;let v;e[18]!==o?(v=D=>o(D===be?null:D),e[18]=o,e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(dt,{size:16,className:"text-muted-foreground"}),e[20]=N):N=e[20];let C;e[21]!==i?(C=i("taskBoard.taskFilters.dueDateAnyTime"),e[21]=i,e[22]=C):C=e[22];let k;e[23]!==C?(k=t.jsxs(_e,{value:be,className:"gap-2",children:[N,C]}),e[23]=C,e[24]=k):k=e[24];let w;e[25]!==i?(w=Object.entries(Ut).map(D=>{const[F,I]=D,b=F==="overdue";return t.jsxs(_e,{value:F,className:q("gap-2",b&&"text-destructive"),children:[t.jsx(dt,{size:16,className:q("shrink-0",b?"text-destructive":"text-muted-foreground")}),i(I)]},F)}),e[25]=i,e[26]=w):w=e[26];let m;e[27]!==S||e[28]!==v||e[29]!==k||e[30]!==w?(m=t.jsx(_t,{align:"start",className:"w-44",children:t.jsxs(wt,{value:S,onValueChange:v,children:[k,w]})}),e[27]=S,e[28]=v,e[29]=k,e[30]=w,e[31]=m):m=e[31];let _;return e[32]!==m||e[33]!==y?(_=t.jsxs(Dt,{children:[y,m]}),e[32]=m,e[33]=y,e[34]=_):_=e[34],_}function _l(n){const e=M.c(56),{value:s,tags:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]!==a||e[1]!==s?(d=L=>a(s.includes(L)?s.filter(P=>P!==L):[...s,L]),e[0]=a,e[1]=s,e[2]=d):d=e[2];const p=d;let x;e[3]!==l||e[4]!==o||e[5]!==s[0]||e[6]!==s.length?(x=s.length===0?l("taskBoard.taskFilters.tagsLabel"):s.length===1?o.find(L=>L.id===s[0])?.name??l("taskBoard.taskFilters.tagsLabel"):l("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=l,e[4]=o,e[5]=s[0],e[6]=s.length,e[7]=x):x=e[7];const r=x,f=s.length>0;let g;e[8]!==i||e[9]!==f?(g=ke(f,i),e[8]=i,e[9]=f,e[10]=g):g=e[10];const h=g,j=i&&"ml-auto";let y;e[11]!==j?(y=q("shrink-0 opacity-60",j),e[11]=j,e[12]=y):y=e[12];const S=y;let v;e[13]!==o||e[14]!==s[0]||e[15]!==s.length?(v=s.length===1?t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Et(o.find(L=>L.id===s[0])?.color)}}):t.jsx(Ls,{size:14,className:"shrink-0"}),e[13]=o,e[14]=s[0],e[15]=s.length,e[16]=v):v=e[16];let N;e[17]!==r?(N=t.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[17]=r,e[18]=N):N=e[18];let C;e[19]!==S?(C=t.jsx(De,{size:12,className:S}),e[19]=S,e[20]=C):C=e[20];let k;e[21]!==v||e[22]!==N||e[23]!==C||e[24]!==h?(k=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:h,children:[v,N,C]})}),e[21]=v,e[22]=N,e[23]=C,e[24]=h,e[25]=k):k=e[25];let w;e[26]!==l?(w=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=l,e[27]=w):w=e[27];let m;e[28]!==l?(m=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=l,e[29]=m):m=e[29];let _;e[30]!==w||e[31]!==m?(_=t.jsx(At,{placeholder:w,"aria-label":m,className:"h-9"}),e[30]=w,e[31]=m,e[32]=_):_=e[32];let D;e[33]!==l?(D=l("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=l,e[34]=D):D=e[34];let F;e[35]!==D?(F=t.jsx(Ft,{children:D}),e[35]=D,e[36]=F):F=e[36];let I;if(e[37]!==o||e[38]!==p||e[39]!==s){let L;e[41]!==p||e[42]!==s?(L=P=>t.jsxs(Ce,{value:P.name,onSelect:()=>p(P.id),className:"gap-2",children:[t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Et(P.color)}}),t.jsx("span",{className:"flex-1 truncate",children:P.name}),s.includes(P.id)&&t.jsx(He,{size:14,className:"shrink-0 text-foreground"})]},P.id),e[41]=p,e[42]=s,e[43]=L):L=e[43],I=o.map(L),e[37]=o,e[38]=p,e[39]=s,e[40]=I}else I=e[40];let b;e[44]!==I?(b=t.jsx(Ue,{children:I}),e[44]=I,e[45]=b):b=e[45];let A;e[46]!==F||e[47]!==b?(A=t.jsxs(It,{children:[F,b]}),e[46]=F,e[47]=b,e[48]=A):A=e[48];let T;e[49]!==_||e[50]!==A?(T=t.jsx(nt,{align:"start",className:"w-56 p-0",children:t.jsxs(Tt,{children:[_,A]})}),e[49]=_,e[50]=A,e[51]=T):T=e[51];let z;return e[52]!==c||e[53]!==k||e[54]!==T?(z=t.jsxs(st,{open:c,onOpenChange:u,children:[k,T]}),e[52]=c,e[53]=k,e[54]=T,e[55]=z):z=e[55],z}function wl(n){const e=M.c(73),{value:s,repos:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]!==l||e[1]!==s?(d=s===null?l("taskBoard.taskFilters.repoLabel"):s===jt?l("taskBoard.taskFilters.repoNoRepo"):s,e[0]=l,e[1]=s,e[2]=d):d=e[2];const p=d;let x;e[3]!==a?(x=O=>{a(O),u(!1)},e[3]=a,e[4]=x):x=e[4];const r=x,f=s!==null;let g;e[5]!==i||e[6]!==f?(g=ke(f,i),e[5]=i,e[6]=f,e[7]=g):g=e[7];const h=g,j=i&&"ml-auto";let y;e[8]!==j?(y=q("shrink-0 opacity-60",j),e[8]=j,e[9]=y):y=e[9];const S=y;let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ht,{className:"size-3.5 shrink-0"}),e[10]=v):v=e[10];let N;e[11]!==p?(N=t.jsx("span",{className:"max-w-[12rem] truncate",children:p}),e[11]=p,e[12]=N):N=e[12];let C;e[13]!==S?(C=t.jsx(De,{size:12,className:S}),e[13]=S,e[14]=C):C=e[14];let k;e[15]!==N||e[16]!==C||e[17]!==h?(k=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:h,children:[v,N,C]})}),e[15]=N,e[16]=C,e[17]=h,e[18]=k):k=e[18];let w;e[19]!==l?(w=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[19]=l,e[20]=w):w=e[20];let m;e[21]!==l?(m=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[21]=l,e[22]=m):m=e[22];let _;e[23]!==w||e[24]!==m?(_=t.jsx(At,{placeholder:w,"aria-label":m,className:"h-9"}),e[23]=w,e[24]=m,e[25]=_):_=e[25];let D;e[26]!==l?(D=l("taskBoard.taskFilters.repoNoReposFound"),e[26]=l,e[27]=D):D=e[27];let F;e[28]!==D?(F=t.jsx(Ft,{children:D}),e[28]=D,e[29]=F):F=e[29];let I;e[30]!==l?(I=l("taskBoard.taskFilters.repoAnyRepo"),e[30]=l,e[31]=I):I=e[31];let b;e[32]!==r?(b=()=>r(null),e[32]=r,e[33]=b):b=e[33];let A;e[34]!==l?(A=l("taskBoard.taskFilters.repoAnyRepo"),e[34]=l,e[35]=A):A=e[35];let T;e[36]!==I||e[37]!==b||e[38]!==A?(T=t.jsx(Ce,{value:I,onSelect:b,children:A}),e[36]=I,e[37]=b,e[38]=A,e[39]=T):T=e[39];let z;e[40]!==l?(z=l("taskBoard.taskFilters.repoNoRepo"),e[40]=l,e[41]=z):z=e[41];let L;e[42]!==r?(L=()=>r(jt),e[42]=r,e[43]=L):L=e[43];let P;e[44]!==l?(P=l("taskBoard.taskFilters.repoNoRepo"),e[44]=l,e[45]=P):P=e[45];let $;e[46]!==z||e[47]!==L||e[48]!==P?($=t.jsx(Ce,{value:z,onSelect:L,children:P}),e[46]=z,e[47]=L,e[48]=P,e[49]=$):$=e[49];let U;e[50]!==T||e[51]!==$?(U=t.jsxs(Ue,{children:[T,$]}),e[50]=T,e[51]=$,e[52]=U):U=e[52];let X;if(e[53]!==o||e[54]!==r||e[55]!==s){let O;e[57]!==r||e[58]!==s?(O=H=>t.jsxs(Ce,{value:H,onSelect:()=>r(H),className:"gap-2",children:[t.jsx(ht,{className:"size-4 shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:H}),s===H&&t.jsx(He,{size:14,className:"shrink-0 text-foreground"})]},H),e[57]=r,e[58]=s,e[59]=O):O=e[59],X=o.map(O),e[53]=o,e[54]=r,e[55]=s,e[56]=X}else X=e[56];let Y;e[60]!==X?(Y=t.jsx(Ue,{children:X}),e[60]=X,e[61]=Y):Y=e[61];let G;e[62]!==F||e[63]!==U||e[64]!==Y?(G=t.jsxs(It,{children:[F,U,Y]}),e[62]=F,e[63]=U,e[64]=Y,e[65]=G):G=e[65];let V;e[66]!==_||e[67]!==G?(V=t.jsx(nt,{align:"start",className:"w-64 p-0",children:t.jsxs(Tt,{children:[_,G]})}),e[66]=_,e[67]=G,e[68]=V):V=e[68];let J;return e[69]!==c||e[70]!==k||e[71]!==V?(J=t.jsxs(st,{open:c,onOpenChange:u,children:[k,V]}),e[69]=c,e[70]=k,e[71]=V,e[72]=J):J=e[72],J}function Dl(n){const e=M.c(45),{value:s,sprints:o,onChange:a,block:i}=n,l=K();let c;if(e[0]!==o||e[1]!==s){let b;e[3]!==s?(b=A=>A.id===s,e[3]=s,e[4]=b):b=e[4],c=o.find(b),e[0]=o,e[1]=s,e[2]=c}else c=e[2];const u=c;let d;e[5]!==u?.name||e[6]!==l||e[7]!==s?(d=s===null?l("taskBoard.taskFilters.sprintLabel"):s===tt?l("taskBoard.taskFilters.sprintBacklog"):u?.name??l("taskBoard.taskFilters.sprintLabel"),e[5]=u?.name,e[6]=l,e[7]=s,e[8]=d):d=e[8];const p=d,x=s!==null;let r;e[9]!==i||e[10]!==x?(r=ke(x,i),e[9]=i,e[10]=x,e[11]=r):r=e[11];const f=r,g=i&&"ml-auto";let h;e[12]!==g?(h=q("shrink-0 opacity-60",g),e[12]=g,e[13]=h):h=e[13];const j=h;let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx($s,{size:14,className:"shrink-0"}),e[14]=y):y=e[14];let S;e[15]!==j?(S=t.jsx(De,{size:12,className:j}),e[15]=j,e[16]=S):S=e[16];let v;e[17]!==p||e[18]!==S||e[19]!==f?(v=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:f,children:[y,p,S]})}),e[17]=p,e[18]=S,e[19]=f,e[20]=v):v=e[20];const N=s===null?be:s;let C;e[21]!==a?(C=b=>a(b===be?gs:b),e[21]=a,e[22]=C):C=e[22];let k;e[23]!==l?(k=l("taskBoard.taskFilters.sprintAnySprint"),e[23]=l,e[24]=k):k=e[24];let w;e[25]!==k?(w=t.jsx(_e,{value:be,children:k}),e[25]=k,e[26]=w):w=e[26];let m;e[27]!==l?(m=l("taskBoard.taskFilters.sprintBacklog"),e[27]=l,e[28]=m):m=e[28];let _;e[29]!==m?(_=t.jsx(_e,{value:tt,children:m}),e[29]=m,e[30]=_):_=e[30];let D;if(e[31]!==o||e[32]!==l){let b;e[34]!==l?(b=A=>t.jsxs(_e,{value:A.id,children:[t.jsx("span",{className:"truncate",children:A.name}),t.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:A.state==="active"?l("taskBoard.taskFilters.sprintCurrent"):In(A)})]},A.id),e[34]=l,e[35]=b):b=e[35],D=o.map(b),e[31]=o,e[32]=l,e[33]=D}else D=e[33];let F;e[36]!==N||e[37]!==C||e[38]!==w||e[39]!==_||e[40]!==D?(F=t.jsx(_t,{align:"start",className:"max-h-80 w-72 overflow-y-auto",children:t.jsxs(wt,{value:N,onValueChange:C,children:[w,_,D]})}),e[36]=N,e[37]=C,e[38]=w,e[39]=_,e[40]=D,e[41]=F):F=e[41];let I;return e[42]!==F||e[43]!==v?(I=t.jsxs(Dt,{children:[v,F]}),e[42]=F,e[43]=v,e[44]=I):I=e[44],I}function Al(n){const e=M.c(25),{value:s,onChange:o,block:a}=n,i=K(),[l,c]=Q.useState(s!==""),[u,d]=Q.useState(!1),[p,x]=Q.useState(s);s!==p&&(x(s),s===""&&!u&&c(!1));const r=l||a,f=r?"w-32 sm:w-44":"w-8 px-0 justify-center",g=a&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==f||e[1]!==g?(h=q("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",f,g),e[0]=f,e[1]=g,e[2]=h):h=e[2];let j;e[3]!==i?(j=i("taskBoard.taskFilters.searchLabel"),e[3]=i,e[4]=j):j=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>c(!0),e[5]=y):y=e[5];let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ms,{size:14}),e[6]=S):S=e[6];let v;e[7]!==j?(v=t.jsx("button",{type:"button","aria-label":j,onClick:y,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:S}),e[7]=j,e[8]=v):v=e[8];let N;e[9]!==a||e[10]!==r||e[11]!==o||e[12]!==i||e[13]!==s?(N=r&&t.jsx("input",{autoFocus:!a,value:s,onChange:w=>o(w.target.value),onFocus:()=>d(!0),onBlur:()=>{d(!1),s===""&&c(!1)},placeholder:i("taskBoard.taskFilters.searchPlaceholder"),"aria-label":i("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=a,e[10]=r,e[11]=o,e[12]=i,e[13]=s,e[14]=N):N=e[14];let C;e[15]!==a||e[16]!==o||e[17]!==i||e[18]!==s?(C=s!==""&&t.jsx("button",{type:"button","aria-label":i("taskBoard.taskFilters.searchClearLabel"),onMouseDown:Fl,onClick:()=>{o(""),a||c(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:t.jsx(Ts,{size:14})}),e[15]=a,e[16]=o,e[17]=i,e[18]=s,e[19]=C):C=e[19];let k;return e[20]!==h||e[21]!==v||e[22]!==N||e[23]!==C?(k=t.jsxs("div",{className:h,children:[v,N,C]}),e[20]=h,e[21]=v,e[22]=N,e[23]=C,e[24]=k):k=e[24],k}function Fl(n){return n.preventDefault()}function Il(n){const e=M.c(20),{block:s,onClick:o}=n,a=K();let i;e[0]!==a?(i=a("taskBoard.taskFilters.boardSettingsLabel"),e[0]=a,e[1]=i):i=e[1];const l=i;let c;e[2]!==s?(c=q(ke(!1,s),s?"h-10 w-full":"w-8 justify-center px-0"),e[2]=s,e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(An,{size:14,className:"shrink-0"}),e[4]=u):u=e[4];let d;e[5]!==s||e[6]!==l?(d=s&&t.jsx("span",{children:l}),e[5]=s,e[6]=l,e[7]=d):d=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==c||e[11]!==d?(p=t.jsxs("button",{type:"button",onClick:o,"aria-label":l,className:c,children:[u,d]}),e[8]=l,e[9]=o,e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=p;if(s)return x;let r;e[13]!==x?(r=t.jsx(ze,{asChild:!0,children:x}),e[13]=x,e[14]=r):r=e[14];let f;e[15]!==l?(f=t.jsx(Ee,{side:"top",children:l}),e[15]=l,e[16]=f):f=e[16];let g;return e[17]!==r||e[18]!==f?(g=t.jsxs(Re,{children:[r,f]}),e[17]=r,e[18]=f,e[19]=g):g=e[19],g}function vs(n){const e=M.c(59),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u,block:d}=n;let p;e[0]!==s||e[1]!==c?(p=m=>c({...s,search:m}),e[0]=s,e[1]=c,e[2]=p):p=e[2];let x;e[3]!==d||e[4]!==s.search||e[5]!==p?(x=t.jsx(Al,{block:d,value:s.search,onChange:p}),e[3]=d,e[4]=s.search,e[5]=p,e[6]=x):x=e[6];let r;e[7]!==s||e[8]!==c?(r=m=>c({...s,assignee:m}),e[7]=s,e[8]=c,e[9]=r):r=e[9];let f;e[10]!==d||e[11]!==s.assignee||e[12]!==o||e[13]!==r?(f=t.jsx(yl,{block:d,value:s.assignee,members:o,onChange:r}),e[10]=d,e[11]=s.assignee,e[12]=o,e[13]=r,e[14]=f):f=e[14];let g;e[15]!==s||e[16]!==c?(g=m=>c({...s,priority:m}),e[15]=s,e[16]=c,e[17]=g):g=e[17];let h;e[18]!==d||e[19]!==s.priority||e[20]!==g?(h=t.jsx(Nl,{block:d,value:s.priority,onChange:g}),e[18]=d,e[19]=s.priority,e[20]=g,e[21]=h):h=e[21];let j;e[22]!==s||e[23]!==c?(j=m=>c({...s,due:m}),e[22]=s,e[23]=c,e[24]=j):j=e[24];let y;e[25]!==d||e[26]!==s.due||e[27]!==j?(y=t.jsx(Sl,{block:d,value:s.due,onChange:j}),e[25]=d,e[26]=s.due,e[27]=j,e[28]=y):y=e[28];let S;e[29]!==s||e[30]!==c?(S=m=>c({...s,tags:m}),e[29]=s,e[30]=c,e[31]=S):S=e[31];let v;e[32]!==d||e[33]!==s.tags||e[34]!==S||e[35]!==a?(v=t.jsx(_l,{block:d,value:s.tags,tags:a,onChange:S}),e[32]=d,e[33]=s.tags,e[34]=S,e[35]=a,e[36]=v):v=e[36];let N;e[37]!==d||e[38]!==s||e[39]!==c||e[40]!==i?(N=(i.length>0||s.repo!==null)&&t.jsx(wl,{block:d,value:s.repo,repos:i,onChange:m=>c({...s,repo:m})}),e[37]=d,e[38]=s,e[39]=c,e[40]=i,e[41]=N):N=e[41];let C;e[42]!==d||e[43]!==s||e[44]!==c||e[45]!==l?(C=(l.length>0||s.sprint!==null)&&t.jsx(Dl,{block:d,value:s.sprint,sprints:l,onChange:m=>c({...s,sprint:m})}),e[42]=d,e[43]=s,e[44]=c,e[45]=l,e[46]=C):C=e[46];let k;e[47]!==d||e[48]!==u?(k=t.jsx(Il,{block:d,onClick:u}),e[47]=d,e[48]=u,e[49]=k):k=e[49];let w;return e[50]!==v||e[51]!==N||e[52]!==C||e[53]!==k||e[54]!==x||e[55]!==f||e[56]!==h||e[57]!==y?(w=t.jsxs(t.Fragment,{children:[x,f,h,y,v,N,C,k]}),e[50]=v,e[51]=N,e[52]=C,e[53]=k,e[54]=x,e[55]=f,e[56]=h,e[57]=y,e[58]=w):w=e[58],w}function $o(n){const e=M.c(17),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}=n,d=K();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ps,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=p):p=e[0];let x;e[1]!==s||e[2]!==o||e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==a?(x=t.jsx(vs,{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}),e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=a,e[8]=x):x=e[8];let r;e[9]!==s||e[10]!==c||e[11]!==l||e[12]!==d?(r=xl(s,Bt(l))&&t.jsx("button",{type:"button",onClick:()=>c(xs),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:d("taskBoard.taskFilters.clearButton")}),e[9]=s,e[10]=c,e[11]=l,e[12]=d,e[13]=r):r=e[13];let f;return e[14]!==x||e[15]!==r?(f=t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p,x,r]}),e[14]=x,e[15]=r,e[16]=f):f=e[16],f}function Mo(n){const e=M.c(45),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}=n,d=K(),[p,x]=Q.useState(!1);let r;e[0]!==s||e[1]!==l?(r=jl(s,Bt(l)),e[0]=s,e[1]=l,e[2]=r):r=e[2];const f=r,g=f>0;let h;e[3]!==g?(h=ke(g),e[3]=g,e[4]=h):h=e[4];const j=h;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ps,{size:14,className:"shrink-0"}),e[5]=y):y=e[5];let S;e[6]!==d?(S=d("taskBoard.taskFilters.filterDrawerButtonLabel"),e[6]=d,e[7]=S):S=e[7];let v;e[8]!==f?(v=f>0&&t.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:f}),e[8]=f,e[9]=v):v=e[9];let N;e[10]!==S||e[11]!==v||e[12]!==j?(N=t.jsx(Us,{asChild:!0,children:t.jsxs("button",{type:"button",className:j,children:[y,S,v]})}),e[10]=S,e[11]=v,e[12]=j,e[13]=N):N=e[13];let C;e[14]!==d?(C=d("taskBoard.taskFilters.filterDrawerTitle"),e[14]=d,e[15]=C):C=e[15];let k;e[16]!==C?(k=t.jsx(Nt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:C}),e[16]=C,e[17]=k):k=e[17];let w;e[18]!==s||e[19]!==o||e[20]!==c||e[21]!==u||e[22]!==i||e[23]!==l||e[24]!==a?(w=t.jsx("div",{className:"flex flex-col gap-2 p-4",children:t.jsx(vs,{block:!0,filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u})}),e[18]=s,e[19]=o,e[20]=c,e[21]=u,e[22]=i,e[23]=l,e[24]=a,e[25]=w):w=e[25];let m;e[26]!==f||e[27]!==c||e[28]!==d?(m=f>0&&t.jsx(je,{variant:"outline",className:"flex-1",onClick:()=>c(xs),children:d("taskBoard.taskFilters.clearAllButton")}),e[26]=f,e[27]=c,e[28]=d,e[29]=m):m=e[29];let _;e[30]!==d?(_=d("taskBoard.taskFilters.doneButton"),e[30]=d,e[31]=_):_=e[31];let D;e[32]!==_?(D=t.jsx(ss,{asChild:!0,children:t.jsx(je,{className:"flex-1",children:_})}),e[32]=_,e[33]=D):D=e[33];let F;e[34]!==m||e[35]!==D?(F=t.jsxs(ns,{className:"flex-row gap-2",children:[m,D]}),e[34]=m,e[35]=D,e[36]=F):F=e[36];let I;e[37]!==w||e[38]!==F||e[39]!==k?(I=t.jsxs(yt,{className:"p-0",children:[k,w,F]}),e[37]=w,e[38]=F,e[39]=k,e[40]=I):I=e[40];let b;return e[41]!==p||e[42]!==I||e[43]!==N?(b=t.jsxs(kt,{open:p,onOpenChange:x,direction:"bottom",children:[N,I]}),e[41]=p,e[42]=I,e[43]=N,e[44]=b):b=e[44],b}function Oo(n,e){return pl(n,e.keySeq,e.jiraIssueKey)??e.id}function zo(n,e){const s=e?.trim();if(!s)return;const o=s.toLowerCase();return n.find(a=>a.jiraIssueKey?.trim().toLowerCase()===o)??n.find(a=>bs(s,a.keySeq,a.jiraIssueKey))??n.find(a=>a.id===s)}export{Io as A,xs as E,Fo as N,Kt as S,Mo as T,Oo as a,Ao as b,$o as c,Lo as d,Jn as e,zo as f,Bo as m,Po as r,pl as t,To as u};
|
|
1
|
+
import{c as M,l as q,j as t,h as Ge,r as Q,I as Wt,G as Cs,o as Z,b as K,b6 as ks,W as we,d as Xt,a6 as Yt,_ as qt,L as ys,a1 as ze,a2 as Ee,a4 as Re,a as bt,F as Ns,ar as Ss,as as _s,B as je,t as xe,H as ws,J as Ds,K as vt,n as As,a7 as Fs,m as Is,ap as Ts}from"./index-B8v6bpri.js";import{c as Qt,u as Bs,d as Jt}from"./thread-route-JP_jBQl2.js";import{t as De}from"./ChevronUp-D9JVuW7G.js";import{A as Zt,L as Ps,s as ct,a3 as dt,a2 as Ls,a1 as $s,a8 as Ms}from"./agent-icon-D-9pJpLD.js";import{a as es,i as Os,e as zs,S as Es,f as Rs}from"./constants-DNuUCxmW.js";import{b as Ct,u as Vs}from"./use-virtual-mcp-7JAczJJM.js";import{g as Ks}from"./github-repo-BpKUwJal.js";import{T as ts}from"./toolbar-icon-button-CyVRuDcs.js";import{P as st,a as Ve,b as nt}from"./popover-t_ZIm7eh.js";import{D as kt,a as yt,b as Nt,c as Gs,e as Hs,f as ss,g as ns,d as Us}from"./drawer-CMB3kWdd.js";import{i as Ws}from"./SearchMd-DN6cu6SZ.js";import{i as He}from"./Check-yANPvlWH.js";import{s as We}from"./Plus-Bz1cAYCY.js";import{G as ht,a as Xs}from"./github-repo-picker-CG5N8uO0.js";import{g as Ys,u as qs,b as ls}from"./hooks-D05F-stG.js";import{g as Qs,b as os}from"./use-project-scope-l_KFftl6.js";import{b as Js,c as Zs,a as en}from"./use-navigate-to-agent-Bfd85iwi.js";import{u as is}from"./shell-layout-CGFwfHMp.js";import{d as tn}from"./thread-intent-DeAJERp8.js";import{C as sn}from"./collection-search-lJZ_AiYh.js";import{g as nn,b as ln,a as on,e as an}from"./extract-connection-data-D_rrQk5k.js";import{u as as,a as rs,g as rn,C as ut}from"./connection-card-CLVO7gWM.js";import{D as cs,b as ds,c as us,d as fs,h as cn,e as dn}from"./dialog-C7M7JvTo.js";import{d as re,a as ce,e as de,b as ue,c as fe,F as Pt}from"./form-kmhrAcMq.js";import{I as Se}from"./input-DW2ahhtH.js";import{S as un,a as fn,b as mn,c as pn,d as Ke}from"./select-BeM39jjH.js";import{T as hn}from"./textarea-ByOwMVOP.js";import{b as ms}from"./use-connection-C-dhEQVr.js";import{n as Ze,a as ft,i as ps}from"./Tool02-DT-zZ1ks.js";import{b as gn}from"./UserSquare-DGuYrk9Q.js";import{s as xn}from"./XClose-BNIppwTn.js";import{c as jn,i as qe,a as Lt,E as bn,p as vn,b as Cn,d as kn}from"./connection-form-helpers-BhB23GqA.js";import{a as mt}from"./authenticate-and-persist-oauth-CxGKh8aj.js";import{g as yn}from"./connection-slug-CITJ0kGN.js";import{C as Nn}from"./collection-tabs-BCClisiC.js";import{u as $t}from"./use-infinite-scroll-BkUvStlN.js";import{B as Qe}from"./badge-Cr2fQRq8.js";import{u as Sn}from"./useSuspenseInfiniteQuery-BONtGFny.js";import{u as _n}from"./use-mcp-client-DJ3fa1xp.js";import{g as et}from"./metadata-dUsYcpuu.js";import{u as wn}from"./use-ai-providers-VRUuTRhq.js";import{A as Mt}from"./avatar-CsipcR4h.js";import{h as _e,D as St,b as _t,g as wt,c as Dt}from"./dropdown-menu-D4_fxfOo.js";import{a as At,c as Ft,d as Ce,e as Ue,b as It,C as Tt}from"./command-BvTOvAwX.js";import{s as Dn}from"./TrendUp01-CaNIYwx8.js";import{a as An}from"./Settings02-C39ViKVB.js";import{s as Ot}from"./User01-Bq-AsdvG.js";import{g as zt}from"./get-initials-D-f_fDFw.js";import{P as Je,d as Fn,f as Et,j as In}from"./config-ykFar5kq.js";import{S as gt}from"./task-board-BHMys9hW.js";function Tn(n){const e=M.c(21),{value:s,onChange:o,placeholder:a,onKeyDown:i,className:l,isSearching:c,disabled:u}=n,d=a===void 0?"Search...":a;let p;e[0]!==l?(p=q("shrink-0 w-full border-b border-border h-12",l),e[0]=l,e[1]=p):p=e[1];const x=u?"cursor-not-allowed opacity-50":"cursor-text";let r;e[2]!==x?(r=q("flex items-center gap-2.5 h-12 px-4",x),e[2]=x,e[3]=r):r=e[3];let f;e[4]!==c?(f=c?t.jsx(Ge,{className:"size-4 text-muted-foreground shrink-0"}):t.jsx(Ws,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=c,e[5]=f):f=e[5];let g;e[6]!==o?(g=S=>o(S.target.value),e[6]=o,e[7]=g):g=e[7];let h;e[8]!==u||e[9]!==i||e[10]!==d||e[11]!==g||e[12]!==s?(h=t.jsx("input",{type:"text",value:s,onChange:g,onKeyDown:i,placeholder:d,disabled:u,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=u,e[9]=i,e[10]=d,e[11]=g,e[12]=s,e[13]=h):h=e[13];let j;e[14]!==r||e[15]!==f||e[16]!==h?(j=t.jsxs("label",{className:r,children:[f,h]}),e[14]=r,e[15]=f,e[16]=h,e[17]=j):j=e[17];let y;return e[18]!==p||e[19]!==j?(y=t.jsx("div",{className:p,children:j}),e[18]=p,e[19]=j,e[20]=y):y=e[20],y}function Bn(n,e,s){if(!s)return null;const o=Ys(n,e);return o?o.threads.get().find(i=>i.id===s)?.branch??null:null}function Pn(n){const e=M.c(6),{value:s,onChange:o}=n,a=K();let i;e[0]!==a?(i=a("sidebar.agentsSection.searchAgents"),e[0]=a,e[1]=i):i=e[1];let l;return e[2]!==o||e[3]!==i||e[4]!==s?(l=t.jsx(Tn,{value:s,onChange:o,placeholder:i}),e[2]=o,e[3]=i,e[4]=s,e[5]=l):l=e[5],l}function Ln(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.noAgentsFound"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:s}),n[2]=s,n[3]=o):o=n[3],o}function $n(n){const e=M.c(10),{org:s,onClose:o}=n,a=K();let i;e[0]!==s.slug?(i={org:s.slug},e[0]=s.slug,e[1]=i):i=e[1];let l;e[2]!==o?(l=()=>o(),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==a?(c=a("sidebar.agentsSection.seeAllAgents"),e[4]=a,e[5]=c):c=e[5];let u;return e[6]!==i||e[7]!==l||e[8]!==c?(u=t.jsx("div",{className:"border-t border-border px-3 py-2.5",children:t.jsx(ys,{to:"/$org/settings/agents",params:i,onClick:l,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:c})}),e[6]=i,e[7]=l,e[8]=c,e[9]=u):u=e[9],u}function Mn(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.agents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(hs,{children:s}),n[2]=s,n[3]=o):o=n[3],o}function On(n){const e=M.c(11),{onImportFromGithub:s}=n,o=K();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(ht,{className:"size-3.5"}),e[0]=a):a=e[0];let i;e[1]!==o?(i=o("sidebar.agentsSection.import"),e[1]=o,e[2]=i):i=e[2];let l;e[3]!==s||e[4]!==i?(l=t.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,i]}),e[3]=s,e[4]=i,e[5]=l):l=e[5];let c;e[6]!==o?(c=o("sidebar.agentsSection.codeAgents"),e[6]=o,e[7]=c):c=e[7];let u;return e[8]!==l||e[9]!==c?(u=t.jsx(hs,{action:l,children:c}),e[8]=l,e[9]=c,e[10]=u):u=e[10],u}function zn(n){const e=M.c(11),{setOpen:s,emptyCtaClass:o}=n,a=K();let i;e[0]!==a?(i=a("sidebar.agentsSection.browseAgents"),e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=q(o),e[2]=o,e[3]=l):l=e[3];let c;e[4]!==s?(c=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[4]=s,e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{className:"size-4"}),e[6]=u):u=e[6];let d;return e[7]!==i||e[8]!==l||e[9]!==c?(d=t.jsx(ts,{"aria-label":i,className:l,onClick:c,children:u}),e[7]=i,e[8]=l,e[9]=c,e[10]=d):d=e[10],d}function En(n){const e=M.c(17),{setOpen:s,highlightEmpty:o,emptyCtaClass:a}=n,i=K();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let u;e[5]!==s?(u=()=>{Z("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},e[5]=s,e[6]=u):u=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(We,{}),e[7]=d):d=e[7];let p;e[8]!==i?(p=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=p):p=e[9];let x;e[10]!==p?(x=t.jsx("span",{children:p}),e[10]=p,e[11]=x):x=e[11];let r;return e[12]!==l||e[13]!==c||e[14]!==u||e[15]!==x?(r=t.jsx(Yt,{children:t.jsxs(qt,{tooltip:l,className:c,onClick:u,children:[d,x]})}),e[12]=l,e[13]=c,e[14]=u,e[15]=x,e[16]=r):r=e[16],r}function Rn(){const n=M.c(4),e=K();let s;n[0]!==e?(s=e("sidebar.agentsSection.browseAgents"),n[0]=e,n[1]=s):s=n[1];let o;return n[2]!==s?(o=t.jsx(Nt,{className:"sr-only",children:s}),n[2]=s,n[3]=o):o=n[3],o}function Vn(n){const e=M.c(8),{emptyCtaClass:s}=n,o=K();let a;e[0]!==o?(a=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=a):a=e[1];let i;e[2]!==s?(i=q(s),e[2]=s,e[3]=i):i=e[3];let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(We,{className:"size-4"}),e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==i?(c=t.jsx(ts,{"aria-label":a,className:i,children:l}),e[5]=a,e[6]=i,e[7]=c):c=e[7],c}function Kn(n){const e=M.c(19),{wrapEmptyHint:s,highlightEmpty:o,emptyCtaClass:a}=n,i=K();let l;e[0]!==o||e[1]!==i?(l=o?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i,e[2]=l):l=e[2];let c;e[3]!==a?(c=q(a),e[3]=a,e[4]=c):c=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(We,{}),e[5]=u):u=e[5];let d;e[6]!==i?(d=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=d):d=e[7];let p;e[8]!==d?(p=t.jsx("span",{children:d}),e[8]=d,e[9]=p):p=e[9];let x;e[10]!==l||e[11]!==c||e[12]!==p?(x=t.jsx(Ve,{asChild:!0,children:t.jsxs(qt,{tooltip:l,className:c,children:[u,p]})}),e[10]=l,e[11]=c,e[12]=p,e[13]=x):x=e[13];let r;e[14]!==x||e[15]!==s?(r=s(x),e[14]=x,e[15]=s,e[16]=r):r=e[16];let f;return e[17]!==r?(f=t.jsx(Yt,{children:r}),e[17]=r,e[18]=f):f=e[18],f}function Gn(n){const e=M.c(9),{children:s}=n,o=K();let a;e[0]!==s?(a=t.jsx(ze,{asChild:!0,children:s}),e[0]=s,e[1]=a):a=e[1];let i;e[2]!==o?(i=o("sidebar.agentsSection.selectAnExistingAgent"),e[2]=o,e[3]=i):i=e[3];let l;e[4]!==i?(l=t.jsx(Ee,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==a||e[7]!==l?(c=t.jsxs(Re,{defaultOpen:!0,delayDuration:0,children:[a,l]}),e[6]=a,e[7]=l,e[8]=c):c=e[8],c}function Hn(n){const e=Xt(),{create:s}=qs(),{locator:o}=we(),a=Qt(),i=Bs();return async l=>{const c=crypto.randomUUID(),u=l===i?Bn(n,o,a??""):null;try{await s({id:c,virtual_mcp_id:l,...u?{branch:u}:{}})}catch{}e({to:"/$org/$taskId",params:{org:n,taskId:c},search:{virtualmcpid:l}})}}function pt(n){const e=M.c(20),{agent:s,selected:o,onClick:a}=n,i=o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let l;e[0]!==i?(l=q("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",i),e[0]=i,e[1]=l):l=e[1];let c;e[2]!==s.icon||e[3]!==s.title?(c=t.jsx(Zt,{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 u;e[5]!==s.title?(u=t.jsx("p",{className:"text-sm font-medium truncate",children:s.title}),e[5]=s.title,e[6]=u):u=e[6];let d;e[7]!==s.description?(d=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:s.description}),e[7]=s.description,e[8]=d):d=e[8];let p;e[9]!==u||e[10]!==d?(p=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,d]}),e[9]=u,e[10]=d,e[11]=p):p=e[11];let x;e[12]!==o?(x=o&&t.jsx(He,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=o,e[13]=x):x=e[13];let r;return e[14]!==a||e[15]!==l||e[16]!==c||e[17]!==p||e[18]!==x?(r=t.jsxs("button",{type:"button",onClick:a,className:l,children:[c,p,x]}),e[14]=a,e[15]=l,e[16]=c,e[17]=p,e[18]=x,e[19]=r):r=e[19],r}function hs(n){const e=M.c(5),{children:s,action:o}=n;let a;e[0]!==s?(a=t.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:s}),e[0]=s,e[1]=a):a=e[1];let i;return e[2]!==o||e[3]!==a?(i=t.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]=i):i=e[4],i}function Un(n){const e=M.c(44),{onClose:s,onSelectAgent:o,selectedAgentId:a,onImportFromGithub:i}=n,[l,c]=Q.useState(""),u=Q.useDeferredValue(l),d=u||void 0;let p;e[0]!==d?(p={searchTerm:d},e[0]=d,e[1]=p):p=e[1];const x=Ct(p),r=x??[],{org:f}=we(),g=Zs(),h=Hn(f.slug),j=Qs(x),y=u.toLowerCase(),S=r.filter(qn).filter(O=>!j.has(O.id)).filter(Yn),v=S.filter(Xn),N=S.filter(Wn),C=es(f.id),k=!u||C.title.toLowerCase().includes(y),w=!!(o&&k);let m;e[2]!==s||e[3]!==o?(m=()=>{o?.(null),s(),c("")},e[2]=s,e[3]=o,e[4]=m):m=e[4];const _=m;let D;e[5]!==g||e[6]!==h||e[7]!==s||e[8]!==o?(D=O=>{if(o){o(O.id),s(),c("");return}g(),s(),c(""),h(O.id)},e[5]=g,e[6]=h,e[7]=s,e[8]=o,e[9]=D):D=e[9];const F=D,I="flex flex-col max-h-[min(640px,80dvh)]";let b;e[10]!==l?(b=t.jsx(Pn,{value:l,onChange:c}),e[10]=l,e[11]=b):b=e[11];const A="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5";let T;e[12]!==C||e[13]!==o||e[14]!==_||e[15]!==a||e[16]!==k?(T=o&&k&&C&&t.jsx(pt,{agent:C,selected:!a||a===C.id,onClick:_}),e[12]=C,e[13]=o,e[14]=_,e[15]=a,e[16]=k,e[17]=T):T=e[17];const z=(v.length>0||!u)&&t.jsx(On,{onImportFromGithub:i});let L;e[18]!==F||e[19]!==o||e[20]!==a?(L=O=>t.jsx(pt,{agent:O,selected:o?a===O.id:void 0,onClick:()=>F(O)},O.id),e[18]=F,e[19]=o,e[20]=a,e[21]=L):L=e[21];const P=v.map(L),$=N.length>0&&t.jsx(Mn,{});let U;e[22]!==F||e[23]!==o||e[24]!==a?(U=O=>t.jsx(pt,{agent:O,selected:o?a===O.id:void 0,onClick:()=>F(O)},O.id),e[22]=F,e[23]=o,e[24]=a,e[25]=U):U=e[25];const X=N.map(U);let Y;e[26]!==w||e[27]!==u||e[28]!==S.length?(Y=S.length===0&&!w&&u&&t.jsx(Ln,{}),e[26]=w,e[27]=u,e[28]=S.length,e[29]=Y):Y=e[29];let G;e[30]!==P||e[31]!==$||e[32]!==X||e[33]!==Y||e[34]!==T||e[35]!==z?(G=t.jsxs("div",{className:A,children:[T,z,P,$,X,Y]}),e[30]=P,e[31]=$,e[32]=X,e[33]=Y,e[34]=T,e[35]=z,e[36]=G):G=e[36];let V;e[37]!==s||e[38]!==f?(V=t.jsx($n,{org:f,onClose:s}),e[37]=s,e[38]=f,e[39]=V):V=e[39];let J;return e[40]!==G||e[41]!==V||e[42]!==b?(J=t.jsxs("div",{className:I,children:[b,G,V]}),e[40]=G,e[41]=V,e[42]=b,e[43]=J):J=e[43],J}function Wn(n){return!os(n.metadata)}function Xn(n){return os(n.metadata)}function Yn(n){return!zs(n.id)}function qn(n){return!Os(n.id)}function Qn(n){const e=M.c(14),{compact:s,trigger:o,onSelectAgent:a,selectedAgentId:i,side:l,align:c}=n===void 0?{}:n,u=s===void 0?!1:s,d=l===void 0?"right":l,p=c===void 0?"start":c,[x,r]=Q.useState(!1),[f,g]=Q.useState(!1),h=Wt(),{setOpenMobile:j}=Cs(),y=Js(),S=y?"border border-border":void 0;let v;e[0]!==y?(v=b=>y?t.jsx(Gn,{children:b}):b,e[0]=y,e[1]=v):v=e[1];const N=v;let C;e[2]!==h||e[3]!==j?(C=()=>{r(!1),h&&j(!1)},e[2]=h,e[3]=j,e[4]=C):C=e[4];const k=C;let w;e[5]!==k||e[6]!==g?(w=()=>{k(),g(!0)},e[5]=k,e[6]=g,e[7]=w):w=e[7];const m=w,_=x&&t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center py-8",children:t.jsx(ks,{className:"h-4 w-24"})}),children:t.jsx(Un,{onClose:k,onSelectAgent:a,selectedAgentId:i,onImportFromGithub:m})}),D=h?t.jsxs(t.Fragment,{children:[o?Q.cloneElement(o,{onClick:b=>{o.props.onClick?.(b),r(!0)}}):u?N(t.jsx(zn,{setOpen:r,emptyCtaClass:S})):t.jsx(En,{setOpen:r,highlightEmpty:y,emptyCtaClass:S}),t.jsx(kt,{open:x,onOpenChange:r,direction:"bottom",children:t.jsxs(yt,{className:"max-h-[85dvh] p-0",children:[t.jsx(Rn,{}),_]})})]}):t.jsxs(st,{open:x,onOpenChange:b=>{b&&!x&&Z("agent_browser_opened",{surface:"desktop_popover"}),r(b)},children:[o?t.jsx(Ve,{asChild:!0,children:o}):u?N(t.jsx(Ve,{asChild:!0,children:t.jsx(Vn,{emptyCtaClass:S})})):t.jsx(Kn,{wrapEmptyHint:N,highlightEmpty:y,emptyCtaClass:S}),t.jsx(nt,{className:"w-[380px] p-0 overflow-hidden",side:d,align:p,children:_})]});let F;e[8]!==f||e[9]!==g?(F=t.jsx(Xs,{open:f,onOpenChange:g,mode:"agent"}),e[8]=f,e[9]=g,e[10]=F):F=e[10];let I;return e[11]!==D||e[12]!==F?(I=t.jsxs(t.Fragment,{children:[D,F]}),e[11]=D,e[12]=F,e[13]=I):I=e[13],I}function Jn(){const n=M.c(2),e=Ct()??[];let s;return n[0]!==e?(s=o=>{if(!o)return;const a=e.find(i=>i.id===o);return a?tn(a.metadata):void 0},n[0]=e,n[1]=s):s=n[1],s}const Zn="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 el(n){const e=M.c(29),{agentId:s,fallback:o,onOpenHome:a,onPick:i}=n,l=K(),c=Vs(s)??o??null;let u,d,p,x,r;e[0]!==c?.title||e[1]!==a||e[2]!==l?(r=c?.title??l("header.shellBreadcrumb.superAgentDefaultName"),x="flex min-w-0 items-center gap-0",u="button",d=a,p=l("header.shellBreadcrumb.openAgentHome",{name:r}),e[0]=c?.title,e[1]=a,e[2]=l,e[3]=u,e[4]=d,e[5]=p,e[6]=x,e[7]=r):(u=e[3],d=e[4],p=e[5],x=e[6],r=e[7]);const f=c?.icon??null;let g;e[8]!==f||e[9]!==r?(g=t.jsx(Zt,{icon:f,name:r,size:"xs"}),e[8]=f,e[9]=r,e[10]=g):g=e[10];let h;e[11]!==u||e[12]!==d||e[13]!==p||e[14]!==g?(h=t.jsx("button",{type:u,onClick:d,"aria-label":p,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:g}),e[11]=u,e[12]=d,e[13]=p,e[14]=g,e[15]=h):h=e[15];let j;e[16]!==r?(j=t.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:r}),e[16]=r,e[17]=j):j=e[17];let y;e[18]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(De,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[18]=y):y=e[18];let S;e[19]!==j?(S=t.jsxs("button",{type:"button",className:Zn,children:[j,y]}),e[19]=j,e[20]=S):S=e[20];let v;e[21]!==s||e[22]!==i||e[23]!==S?(v=t.jsx(Qn,{side:"bottom",align:"start",selectedAgentId:s,onSelectAgent:i,trigger:S}),e[21]=s,e[22]=i,e[23]=S,e[24]=v):v=e[24];let N;return e[25]!==v||e[26]!==x||e[27]!==h?(N=t.jsxs("div",{className:x,children:[h,v]}),e[25]=v,e[26]=x,e[27]=h,e[28]=N):N=e[28],N}function Ao(n){const e=M.c(22);let s;e[0]!==n?(s=n===void 0?{}:n,e[0]=n,e[1]=s):s=e[1];const{onNavigate:o}=s,{org:a}=we(),{threads:i}=ls(),l=Ct(),{data:c}=bt.useSession(),{setTaskId:u,createNewTask:d}=is(),p=Jn();let x;e[2]!==a.id?(x=es(a.id),e[2]=a.id,e[3]=x):x=e[3];const r=x,f=r.id,g=Jt();let h;e[4]!==l||e[5]!==d||e[6]!==f||e[7]!==o||e[8]!==p||e[9]!==c?.user?.id||e[10]!==u||e[11]!==i?(h=C=>{const k=C??f,w=(l??[]).find(_=>_.id===k),m=en(i,k,c?.user?.id,p(k),!!(w&&Ks(w)));m?u(m.id,k):d(k),o?.()},e[4]=l,e[5]=d,e[6]=f,e[7]=o,e[8]=p,e[9]=c?.user?.id,e[10]=u,e[11]=i,e[12]=h):h=e[12];const j=h;let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[13]=y):y=e[13];const S=g===f?r:void 0;let v;e[14]!==g||e[15]!==j?(v=()=>j(g),e[14]=g,e[15]=j,e[16]=v):v=e[16];let N;return e[17]!==g||e[18]!==j||e[19]!==S||e[20]!==v?(N=t.jsx(Q.Suspense,{fallback:y,children:t.jsx(el,{agentId:g,fallback:S,onOpenHome:v,onPick:j})}),e[17]=g,e[18]=j,e[19]=S,e[20]=v,e[21]=N):N=e[21],N}function Fo(){const n=M.c(20),e=K(),{threads:s}=ls(),{createNewTask:o}=is(),a=Jt(),i=Qt();let l;n[0]!==i||n[1]!==s?(l=s.find(j=>j.id===i)?.branch??null,n[0]=i,n[1]=s,n[2]=l):l=n[2];const c=l;let u;n[3]!==a||n[4]!==o||n[5]!==c?(u=()=>{o(a,c)},n[3]=a,n[4]=o,n[5]=c,n[6]=u):u=n[6];const d=u;let p;n[7]!==e?(p=e("sidebar.taskGroupsList.newChat"),n[7]=e,n[8]=p):p=n[8];let x;n[9]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(Ps,{size:16}),n[9]=x):x=n[9];let r;n[10]!==d||n[11]!==p?(r=t.jsx(ze,{asChild:!0,children:t.jsx("button",{type:"button",onClick:d,"aria-label":p,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:x})}),n[10]=d,n[11]=p,n[12]=r):r=n[12];let f;n[13]!==e?(f=e("sidebar.taskGroupsList.newChat"),n[13]=e,n[14]=f):f=n[14];let g;n[15]!==f?(g=t.jsx(Ee,{side:"bottom",children:f}),n[15]=f,n[16]=g):g=n[16];let h;return n[17]!==r||n[18]!==g?(h=t.jsxs(Re,{children:[r,g]}),n[17]=r,n[18]=g,n[19]=h):h=n[19],h}function tl({open:n,onOpenChange:e,onCreated:s}){const o=K(),{org:a}=we(),{data:i}=bt.useSession(),{stdioEnabled:l}=Ns(),c=Wt(),u=ms(),d=as(),x=rs(d,"").items,r=Ss({resolver:_s(jn),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),f=r.watch("ui_type"),g=r.watch("connection_url"),h=r.watch("npx_package"),j=qe({uiType:f,connectionUrl:g??"",npxPackage:h??""})??Lt({uiType:f,connectionUrl:g??"",registryItems:x}),y=m=>{const _=m.trim();if(!_)return;const D=!!r.formState.dirtyFields.title,F=!!r.formState.dirtyFields.description,I=!!r.formState.dirtyFields.env_vars,b=T=>{if(T&&(!D&&!r.getValues("title").trim()&&T.title&&r.setValue("title",T.title,{shouldDirty:!1}),!F&&!(r.getValues("description")??"").trim()&&T.description&&r.setValue("description",T.description,{shouldDirty:!1}),!I&&T.envVarKeys?.length)){const z=r.getValues("env_vars")??[],L=new Set(z.map($=>$.key)),P=T.envVarKeys.filter($=>!L.has($));P.length>0&&r.setValue("env_vars",[...z,...P.map($=>({key:$,value:""}))],{shouldDirty:!0})}},A=vn(_);if(A&&l){r.setValue("ui_type","NPX",{shouldDirty:!0}),r.setValue("npx_package",A.packageName,{shouldDirty:!0}),r.setValue("connection_url","",{shouldDirty:!0}),r.setValue("connection_token",null,{shouldDirty:!0}),b(qe({uiType:"NPX",npxPackage:A.packageName}));return}if(_.startsWith("http://")||_.startsWith("https://")){const T=f==="HTTP"||f==="SSE"||f==="Websocket"?f:"HTTP";r.setValue("ui_type",T,{shouldDirty:!0}),r.setValue("connection_url",_,{shouldDirty:!0}),b(qe({uiType:T,connectionUrl:_})??Lt({uiType:T,connectionUrl:_,registryItems:x}));return}f==="NPX"&&b(qe({uiType:"NPX",npxPackage:_}))},S=m=>{m||r.reset(),e(m)},v=async m=>{let _,D=null,F=null,I=null;m.ui_type==="NPX"?(_="STDIO",D="",I=Cn(m.npx_package||"",m.env_vars||[])):m.ui_type==="STDIO"?(_="STDIO",D="",I=kn(m.stdio_command||"",m.stdio_args||"",m.stdio_cwd,m.env_vars||[])):(_=m.ui_type,D=m.connection_url||"",F=m.connection_token||null);const b=nn("conn");try{await u.create.mutateAsync({id:b,title:m.title,description:m.description||null,connection_type:_,connection_url:D,connection_token:F,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:i?.user?.id||"system",organization_id:a.id,icon:m.icon??null,app_name:null,app_id:null,connection_headers:I,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),r.reset(),e(!1),s?.(b)}catch{xe.error(o("connections.createConnectionDialog.failedToCreateConnection"))}},N=o("connections.createConnectionDialog.title"),C=o("connections.createConnectionDialog.description"),k=r.formState.isSubmitting?o("connections.createConnectionDialog.saving"):o("connections.createConnectionDialog.createButton"),w=t.jsxs("div",{className:"grid gap-4",children:[t.jsx(re,{control:r.control,name:"ui_type",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.typeLabel")}),t.jsxs(un,{value:m.value,onValueChange:m.onChange,children:[t.jsx(ue,{children:t.jsx(fn,{children:t.jsx(mn,{})})}),t.jsxs(pn,{children:[t.jsx(Ke,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.httpType")]})}),t.jsx(Ke,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.sseType")]})}),t.jsx(Ke,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ct,{className:"w-4 h-4"}),o("connections.createConnectionDialog.websocketType")]})}),l&&t.jsxs(t.Fragment,{children:[t.jsx(Ke,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Ze,{className:"w-4 h-4"}),o("connections.createConnectionDialog.npxPackageType")]})}),t.jsx(Ke,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(gn,{className:"w-4 h-4"}),o("connections.createConnectionDialog.customCommandType")]})})]})]})]}),t.jsx(fe,{})]})}),f==="NPX"&&t.jsx(re,{control:r.control,name:"npx_package",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.npmPackageLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.npmPackagePlaceholder"),...m,value:m.value??"",onPaste:_=>{const D=_.clipboardData.getData("text");D&&(_.preventDefault(),r.setValue("npx_package",D.trim(),{shouldDirty:!0}),y(D))},onBlur:_=>{y(_.target.value),m.onBlur()}})}),t.jsx(fe,{})]})}),f==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[t.jsx(re,{control:r.control,name:"stdio_command",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.commandLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.commandPlaceholder"),...m,value:m.value??""})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"stdio_args",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.argumentsLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.argumentsPlaceholder"),...m,value:m.value??""})}),t.jsx(fe,{})]})})]}),t.jsx(re,{control:r.control,name:"stdio_cwd",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.workingDirectoryLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.workingDirectoryPlaceholder"),...m,value:m.value??""})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:o("connections.createConnectionDialog.workingDirectoryDescription")}),t.jsx(fe,{})]})})]}),(f==="NPX"||f==="STDIO")&&t.jsx(re,{control:r.control,name:"env_vars",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.environmentVariablesLabel")}),t.jsx(ue,{children:t.jsx(bn,{value:m.value??[],onChange:m.onChange})}),t.jsx(fe,{})]})}),f!=="NPX"&&f!=="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsx(re,{control:r.control,name:"connection_url",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.urlLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.urlPlaceholder"),...m,value:m.value??"",onPaste:_=>{const D=_.clipboardData.getData("text");D&&(_.preventDefault(),r.setValue("connection_url",D.trim(),{shouldDirty:!0}),y(D))},onBlur:_=>{y(_.target.value),m.onBlur()}})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"connection_token",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:j?.token?.label??o("connections.createConnectionDialog.tokenLabelDefault")}),t.jsx(ue,{children:t.jsx(Se,{type:"password",placeholder:j?.token?.placeholder??o("connections.createConnectionDialog.tokenPlaceholderDefault"),className:"ph-no-capture",...m,value:m.value??""})}),j?.token?.helperText&&t.jsxs("p",{className:"text-xs text-muted-foreground",children:[j.token.helperText,j.id==="github"&&t.jsxs(t.Fragment,{children:[" ","·"," ",t.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")})]})]}),t.jsx(fe,{})]})})]}),t.jsx(re,{control:r.control,name:"title",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.nameLabel")}),t.jsx(ue,{children:t.jsx(Se,{placeholder:o("connections.createConnectionDialog.namePlaceholder"),...m})}),t.jsx(fe,{})]})}),t.jsx(re,{control:r.control,name:"description",render:({field:m})=>t.jsxs(ce,{children:[t.jsx(de,{children:o("connections.createConnectionDialog.descriptionLabel")}),t.jsx(ue,{children:t.jsx(hn,{placeholder:o("connections.createConnectionDialog.descriptionPlaceholder"),rows:3,...m,value:m.value??""})}),t.jsx(fe,{})]})})]});return c?t.jsx(kt,{open:n,onOpenChange:S,children:t.jsxs(yt,{className:"max-h-[90vh]",children:[t.jsx(Gs,{className:"pb-2",children:t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsxs("div",{className:"flex-1 text-left",children:[t.jsx(Nt,{children:N}),t.jsx(Hs,{className:"mt-1",children:C})]}),t.jsx(ss,{asChild:!0,children:t.jsx(je,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:t.jsx(xn,{size:16})})})]})}),t.jsx(Pt,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(v),children:[t.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:w}),t.jsx(ns,{children:t.jsx(je,{type:"submit",disabled:r.formState.isSubmitting,className:"w-full",children:k})})]})})]})}):t.jsx(cs,{open:n,onOpenChange:S,children:t.jsxs(ds,{className:"sm:max-w-[525px]",children:[t.jsxs(us,{children:[t.jsx(fs,{children:N}),t.jsx(cn,{children:C})]}),t.jsx(Pt,{...r,children:t.jsxs("form",{onSubmit:r.handleSubmit(v),children:[t.jsx("div",{className:"py-4",children:w}),t.jsxs(dn,{children:[t.jsx(je,{type:"button",variant:"outline",onClick:()=>S(!1),children:o("connections.createConnectionDialog.cancelButton")}),t.jsx(je,{type:"submit",disabled:r.formState.isSubmitting,className:"min-w-40",children:k})]})]})})]})})}function sl(n){const e=M.c(72),{mode:s,agentId:o,addedConnectionIds:a,onAdd:i,onCloneAndAdd:l,onConnectAndAdd:c,connectingItemId:u,search:d,onCreateConnection:p,onBrowseNavigate:x,defaultTab:r}=n,f=s===void 0?"add":s,g=r===void 0?"connected":r,h=K(),{org:j}=we(),y=Q.useDeferredValue(d),S=d!==y;let v;e[0]!==y?(v=y.trim().toLowerCase(),e[0]=y,e[1]=v):v=e[1];const N=v;let C;e[2]!==g?(C=B=>B??g,e[2]=g,e[3]=C):C=e[3];const[k,w]=ws(Ds.connectionsTab(j.slug)+(g==="all"?":home-modal":":agent-modal"),C);let m;e[4]!==k||e[5]!==w?(m=B=>{B!==k&&Z("connections_dialog_tab_changed",{to_tab:B}),w(B)},e[4]=k,e[5]=w,e[6]=m):m=e[6];const _=m;let D;e[7]!==j.id||e[8]!==j.slug?(D={connectionId:Es,orgId:j.id,orgSlug:j.slug},e[7]=j.id,e[8]=j.slug,e[9]=D):D=e[9];const F=_n(D),I=y?.trim().split(/\s+/).filter(Boolean)??[],b=I.length>0?{operator:"or",conditions:I.flatMap(dl)}:void 0,A={...b&&{where:b},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},T=JSON.stringify(A),{data:z,fetchNextPage:L,hasNextPage:P,isFetchingNextPage:$}=Sn({queryKey:vt.collectionListInfinite(F,j.id,"","CONNECTIONS",T),queryFn:async B=>{const{pageParam:W}=B,ge=W===void 0?0:W;return(await F.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...b&&{where:b},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:ge}})).structuredContent},initialPageParam:0,getNextPageParam:rl,staleTime:3e4}),U=z?.pages.flatMap(al)??[],X=rn(U),Y=new Set(U.filter(il).map(ol)),G=as(),V=rs(G,y),J=$t(V.loadMore,V.hasMore,V.isLoadingMore),O=$t(L,P??!1,$),H=k==="all"||!!N,me=H?V.items.filter(B=>{const W=ln(B);if(W&&Y.has(W))return!1;if(!N)return!0;const ge=et(B._meta),ye=[B.title,B.description,B.name,B.server?.title,B.server?.description,B.server?.name,ge?.friendly_name,ge?.friendlyName].filter(Boolean).join(" ").toLowerCase();return I.some(ae=>ye.includes(ae.toLowerCase()))}):[],te=me.filter(ll),se=me.filter(nl);let le;e[10]!==a?(le=B=>B.some(W=>a.has(W.id)),e[10]=a,e[11]=le):le=e[11];const ie=le;let pe;e[12]!==a||e[13]!==o||e[14]!==u||e[15]!==ie||e[16]!==f||e[17]!==i||e[18]!==x||e[19]!==l||e[20]!==h?(pe=(B,W,ge,ye,ae)=>{const Ye=ie(ae),Oe=ae.find(Ne=>!a.has(Ne.id)),ne=ae[0];if(f==="browse"){const Ne=yn(ne);return t.jsx(ut,{connection:{title:W,icon:ge,description:ae.length>1?`${ae.length} instances`:ye??void 0},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs(Qe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(He,{size:11})," ",h("virtualMcp.connectionDialogContent.connected")]}),onClick:()=>{Z("connection_browse_clicked",{app_name:ne.app_name??null,connection_id:ne.id,instances_count:ae.length}),x?.(Ne)}},B)}return t.jsx(ut,{connection:{title:W,icon:ge,description:ye},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[Ye&&t.jsxs(Qe,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[t.jsx(He,{size:11})," ",h("virtualMcp.connectionDialogContent.added")]}),t.jsx(je,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:u!==null,onClick:Ne=>{Ne.stopPropagation(),Oe?(Z("connection_add_clicked",{action:"use_existing",app_name:ne.app_name??null,connection_id:Oe.id}),o&&Z("agent_connection_attached",{agent_id:o,connection_id:Oe.id,app_name:ne.app_name??null,mode:"existing"}),i(Oe.id)):(Z("connection_add_clicked",{action:"clone",app_name:ne.app_name??null,base_connection_id:ne.id}),l(ne))},children:h("virtualMcp.connectionDialogContent.add")})]})},B)},e[12]=a,e[13]=o,e[14]=u,e[15]=ie,e[16]=f,e[17]=i,e[18]=x,e[19]=l,e[20]=h,e[21]=pe):pe=e[21];const E=pe;let R;e[22]!==u||e[23]!==f||e[24]!==c||e[25]!==h?(R=B=>{const W=et(B._meta),ge=W?.friendlyName||W?.friendly_name||B.server?.title||B.title||B.server?.name||B.name||B.id||"",ye=B.server?.description||B.description||null,ae=B.server?.icons?.[0]?.src||on(B.server?.repository)||null,Ye=W?.official===!0,Oe=W?.verified===!0,ne=W?.owner==="deco";return t.jsx(ut,{connection:{title:ge,description:ye,icon:ae},fallbackIcon:t.jsx(Ze,{}),headerActionsAlwaysVisible:!0,headerActions:t.jsxs("div",{className:"flex items-center gap-1.5",children:[ne&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx("span",{className:"inline-flex items-center justify-center size-5 rounded-md bg-muted shrink-0",children:t.jsx("img",{src:"/logos/deco logo.svg",alt:h("virtualMcp.connectionDialogContent.madeByDeco"),className:"size-3"})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.builtByDeco")})]}),!ne&&Ye&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx(Qe,{variant:"outline",size:"icon",children:t.jsx(ft,{})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.builtByOfficial")})]}),!ne&&!Ye&&Oe&&t.jsxs(Re,{children:[t.jsx(ze,{asChild:!0,children:t.jsx(Qe,{variant:"outline",size:"icon",children:t.jsx(ft,{})})}),t.jsx(Ee,{children:h("virtualMcp.connectionDialogContent.verifiedByDeco")})]}),t.jsx(je,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:u!==null,onClick:Ne=>{Ne.stopPropagation(),Z("connection_add_clicked",{action:"connect_new",registry_item_id:B.id,app_name:W?.friendlyName||B.server?.name||B.name||null}),c(B)},children:u===B.id?t.jsx(Ge,{className:"size-3.5"}):h(f==="browse"?"virtualMcp.connectionDialogContent.connect":"virtualMcp.connectionDialogContent.add")})]})},`catalog-${B.id}`)},e[22]=u,e[23]=f,e[24]=c,e[25]=h,e[26]=R):R=e[26];const he=R;let ee;e[27]!==k||e[28]!==_||e[29]!==p||e[30]!==N||e[31]!==h?(ee=!N&&t.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[t.jsx(Nn,{tabs:[{id:"all",label:h("virtualMcp.connectionDialogContent.tabAll")},{id:"connected",label:h("virtualMcp.connectionDialogContent.tabConnected")}],activeTab:k,onTabChange:B=>_(B)}),t.jsxs(je,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{Z("connections_dialog_custom_clicked"),p()},children:[t.jsx(We,{size:12}),h("virtualMcp.connectionDialogContent.customConnection")]})]}),e[27]=k,e[28]=_,e[29]=p,e[30]=N,e[31]=h,e[32]=ee):ee=e[32];const ve=S&&"opacity-50 pointer-events-none";let oe;e[33]!==ve?(oe=q("flex-1 overflow-auto p-5 transition-opacity duration-150",ve),e[33]=ve,e[34]=oe):oe=e[34];const Ae="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Fe;e[35]!==E?(Fe=B=>{if(B.type==="group")return E(B.key,B.title,B.icon,null,B.connections);const W=B.connection;return E(W.id,W.title,W.icon,W.description??null,[W])},e[35]=E,e[36]=Fe):Fe=e[36];const lt=X.map(Fe);let Ie;e[37]!==O?(Ie=t.jsx("div",{ref:O,className:"col-span-full h-1"}),e[37]=O,e[38]=Ie):Ie=e[38];let Te;e[39]!==$?(Te=$&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),e[39]=$,e[40]=Te):Te=e[40];const ot=H&&te.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx(ft,{size:13,className:"text-muted-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionVerified")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),it=H&&te.map(he),at=H&&se.length>0&&t.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[t.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:h("virtualMcp.connectionDialogContent.sectionAllConnections")}),t.jsx("div",{className:"flex-1 h-px bg-border"})]}),rt=H&&se.map(he);let Be;e[41]!==J||e[42]!==G||e[43]!==H?(Be=H&&G.length>0&&t.jsx("div",{ref:J,className:"col-span-full h-1"}),e[41]=J,e[42]=G,e[43]=H,e[44]=Be):Be=e[44];let Pe;e[45]!==V.isLoadingMore||e[46]!==H?(Pe=H&&V.isLoadingMore&&t.jsx("div",{className:"col-span-full flex justify-center py-6",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),e[45]=V.isLoadingMore,e[46]=H,e[47]=Pe):Pe=e[47];let Le;e[48]!==lt||e[49]!==Ie||e[50]!==Te||e[51]!==ot||e[52]!==it||e[53]!==at||e[54]!==rt||e[55]!==Be||e[56]!==Pe?(Le=t.jsxs("div",{className:Ae,children:[lt,Ie,Te,ot,it,at,rt,Be,Pe]}),e[48]=lt,e[49]=Ie,e[50]=Te,e[51]=ot,e[52]=it,e[53]=at,e[54]=rt,e[55]=Be,e[56]=Pe,e[57]=Le):Le=e[57];let $e;e[58]!==k||e[59]!==X.length||e[60]!==se||e[61]!==d||e[62]!==h||e[63]!==te?($e=X.length===0&&te.length===0&&se.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:d?h("virtualMcp.connectionDialogContent.emptyStateSearchNoMatch",{search:d}):h(k==="connected"?"virtualMcp.connectionDialogContent.emptyStateNoConnectionsYet":"virtualMcp.connectionDialogContent.emptyStateNoConnectionsAvailable")}),e[58]=k,e[59]=X.length,e[60]=se,e[61]=d,e[62]=h,e[63]=te,e[64]=$e):$e=e[64];let Me;e[65]!==oe||e[66]!==Le||e[67]!==$e?(Me=t.jsxs("div",{className:oe,children:[Le,$e]}),e[65]=oe,e[66]=Le,e[67]=$e,e[68]=Me):Me=e[68];let Xe;return e[69]!==ee||e[70]!==Me?(Xe=t.jsxs(t.Fragment,{children:[ee,Me]}),e[69]=ee,e[70]=Me,e[71]=Xe):Xe=e[71],Xe}function nl(n){return!n.verified&&!et(n._meta)?.verified&&!n.meta?.verified}function ll(n){return n.verified||et(n._meta)?.verified||n.meta?.verified}function ol(n){return n.app_name}function il(n){return n.app_name}function al(n){return n?.items??[]}function rl(n,e){if(n?.hasMore)return e.reduce(cl,0)}function cl(n,e){return n+(e?.items?.length??0)}function dl(n){return[{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}function Io({open:n,onOpenChange:e,defaultTab:s,initialSearch:o="",...a}){const i=K(),l=a.mode??"add",c="agentId"in a?a.agentId:void 0,u="addedConnectionIds"in a?a.addedConnectionIds??new Set:new Set,d="onAdd"in a&&a.onAdd?a.onAdd:b=>{},p=(b,A,T)=>{c&&Z("agent_connection_attached",{agent_id:c,connection_id:b,app_name:A,mode:T})},[x,r]=Q.useState(null),[f,g]=Q.useState(o),[h,j]=Q.useState(!1),[y,S]=Q.useState(n);n!==y&&(S(n),n&&g(o));const{org:v}=we(),{data:N}=bt.useSession(),C=ms(),k=As(),w=Xt(),m=b=>{e(!1),w({to:"/$org/settings/connections/$appSlug",params:{org:v.slug,appSlug:b}})},_=()=>{k.invalidateQueries({predicate:b=>{const A=b.queryKey;return A[1]===v.id&&A[3]==="collection"&&A[4]==="CONNECTIONS"}})},D=async(b,A)=>{Z("connection_oauth_succeeded",{connection_id:b,flow:A});const T=new URL(`/api/${v.slug}/mcp/${b}`,window.location.origin);await k.invalidateQueries({queryKey:vt.isMCPAuthenticated(T.href,null)}),_()},F=async b=>{r(b.app_name??b.id);try{const T=`${b.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,L=(await C.create.mutateAsync({title:T,description:b.description??null,connection_type:b.connection_type,connection_url:b.connection_url??null,connection_token:null,icon:b.icon??null,app_name:b.app_name??null,app_id:b.app_id??null,connection_headers:b.connection_headers??null})).id,P=await mt({connectionId:L,orgId:v.id,orgSlug:v.slug,persistFallback:$=>C.update.mutateAsync({id:L,data:{connection_token:$}}).then(()=>{})});if(P.ran&&!P.ok){Z("connection_oauth_failed",{connection_id:L,flow:"clone",error:P.error??"no_token"}),xe.error(i("virtualMcp.addConnectionDialog.authenticationFailedError",{error:P.error??"no token received"})),await C.delete.mutateAsync(L);return}P.ran&&await D(L,"clone"),p(L,b.app_name??null,"clone"),d(L)}catch(A){console.error("Failed to add connection:",A),xe.error(i("virtualMcp.addConnectionDialog.failedToAddConnection"))}finally{r(null)}},I=async b=>{if(!(!v||!N?.user?.id)){r(b.id);try{const A=an(b,v.id,N.user.id,{remoteIndex:0}),T=A.connection_type==="STDIO",z=!!A.connection_url,L=T&&A.connection_headers&&typeof A.connection_headers=="object"&&"command"in A.connection_headers;if(!z&&!L){xe.error(i("virtualMcp.addConnectionDialog.mcpServerConnectionError")),r(null);return}const{id:P}=await C.create.mutateAsync(A),$=await mt({connectionId:P,orgId:v.id,orgSlug:v.slug,persistFallback:U=>C.update.mutateAsync({id:P,data:{connection_token:U}}).then(()=>{})});if($.ran&&!$.ok){Z("connection_oauth_failed",{connection_id:P,flow:"connect_new",error:$.error??"no_token"}),xe.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:$.error??"no token received"})}),p(P,A.app_name??null,"new"),d(P);return}$.ran?(await D(P,"connect_new"),xe.success(i("virtualMcp.addConnectionDialog.connectedAuthenticated"))):xe.success(i("virtualMcp.addConnectionDialog.connected")),p(P,A.app_name??null,"new"),d(P)}catch(A){console.error("Failed to connect:",A),xe.error(i("virtualMcp.addConnectionDialog.failedToConnect"))}finally{r(null)}}};return t.jsxs(cs,{open:n,onOpenChange:e,children:[t.jsxs(ds,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[t.jsx(us,{className:"px-6 pt-5 pb-0 shrink-0",children:t.jsx(fs,{className:"text-base font-semibold",children:i(l==="browse"?"virtualMcp.addConnectionDialog.connectionsTitle":"virtualMcp.addConnectionDialog.addConnectionTitle")})}),t.jsx("div",{className:"pt-3 shrink-0",children:t.jsx(sn,{value:f,onChange:g,placeholder:i("virtualMcp.addConnectionDialog.searchConnectionsPlaceholder")})}),t.jsx(Q.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Ge,{className:"size-6 text-muted-foreground"})}),children:t.jsx(sl,{mode:l,agentId:c,addedConnectionIds:u,onAdd:d,onCloneAndAdd:F,onConnectAndAdd:I,connectingItemId:x,search:f,onCreateConnection:()=>j(!0),onBrowseNavigate:m,defaultTab:s})})]}),t.jsx(tl,{open:h,onOpenChange:j,onCreated:async b=>{j(!1);const A=await mt({connectionId:b,orgId:v.id,orgSlug:v.slug,persistFallback:T=>C.update.mutateAsync({id:b,data:{connection_token:T}}).then(()=>{})});if(A.ran&&!A.ok){Z("connection_oauth_failed",{connection_id:b,flow:"custom_create",error:A.error??"no_token"}),xe.warning(i("virtualMcp.addConnectionDialog.signInFailedTitle"),{description:i("virtualMcp.addConnectionDialog.signInFailedDescription",{error:A.error??"no token received"})}),p(b,null,"custom"),d(b),e(!1);return}A.ran&&await D(b,"custom_create"),p(b,null,"custom"),d(b),e(!1)}})]})}const Rt=new Map;function To(){const{org:n}=we(),e=Fs(),s=wn(),o=s.find(j=>j.providerId==="deco"),{data:a,isLoading:i,refetch:l,isFetching:c}=Is({queryKey:vt.aiProviderCredits(n.id,"deco"),enabled:!!o,staleTime:6e4,queryFn:async()=>{try{return await e.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}}}),u=a?.balanceCents??null,d=u!=null?u/100:null,p=Q.useRef(new Map);if(u!=null){const j=Rt.get(n.id);p.current.get(n.id)&&j!=null&&u>j&&Z("credits_topped_up_detected",{organization_id:n.id,delta_cents:u-j,previous_balance_cents:j,new_balance_cents:u}),Rt.set(n.id,u),p.current.set(n.id,!0)}const x=!!o,r=u!=null&&u>0,f=u!=null&&u===0,g=u!=null&&u===200,h=s.length>0&&s.every(j=>j.providerId==="deco");return{hasDecoKey:x,decoKeyId:o?.id??null,balanceCents:u,balanceDollars:d,hasCredits:r,isZeroBalance:f,isInitialFreeCredit:g,hasOnlyDecoProvider:h,isLoading:i,isFetching:c,refetch:l}}const ul=4,fl="TASK";function ml(n){return n.replace(/[^a-zA-Z]/g,"").toUpperCase().slice(0,ul)||fl}function pl(n,e,s){const o=s?.trim();return o||(e==null?null:`${ml(n)}-${String(e).padStart(2,"0")}`)}const hl=/^(?:[a-z]{1,8}-)?0*(\d+)$/i;function Vt(n){const e=hl.exec(n.trim())?.[1];return e===void 0?null:Number(e)}function Kt(n){const e=M.c(8),{size:s,className:o}=n,a=s===void 0?16:s;let i;e[0]!==a?(i={width:a,height:a},e[0]=a,e[1]=i):i=e[1];let l;e[2]!==o?(l=q("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=l):l=e[3];let c;return e[4]!==a||e[5]!==i||e[6]!==l?(c=t.jsx("img",{src:Rs,alt:"Super Agent",width:a,height:a,style:i,className:l}),e[4]=a,e[5]=i,e[6]=l,e[7]=c):c=e[7],c}function Bo(n,e){if(!e)return null;const s=e.toLowerCase();return n.find(o=>{const a=o.bucket.toLowerCase();return o.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}const Gt={active:0,future:1,closed:2};function Ht(n){if(!n.startsAt)return null;const e=Date.parse(n.startsAt);return Number.isNaN(e)?null:e}function gl(n,e){const s=Gt[n.state]-Gt[e.state];if(s!==0)return s;const o=Ht(n),a=Ht(e);if(o===null||a===null){if(o!==a)return o===null?1:-1}else if(o!==a)return n.state==="closed"?a-o:o-a;return n.name.localeCompare(e.name)||n.id.localeCompare(e.id)}function Bt(n){return n.filter(s=>s.state==="active").sort(gl)[0]?.id??null}const xt="__unassigned__",jt="__no_repo__",tt="backlog",gs="all",be="__any__",xs={assignee:null,priority:null,due:null,tags:[],repo:null,sprint:null,search:""};function Po(n,e){return n===gs?null:n===tt||n!==null&&e.some(s=>s.id===n)?n:Bt(e)}function js(n,e){return n.sprint!==null&&n.sprint!==e}function xl(n,e){return n.assignee!==null||n.priority!==null||n.due!==null||n.tags.length>0||n.repo!==null||js(n,e)||n.search.trim()!==""}function jl(n,e){return(n.assignee!==null?1:0)+(n.priority!==null?1:0)+(n.due!==null?1:0)+(n.tags.length>0?1:0)+(n.repo!==null?1:0)+(js(n,e)?1:0)+(n.search.trim()!==""?1:0)}const bl=864e5;function vl(n,e){const s=new Date(n),o=new Date(e);return s.getFullYear()===o.getFullYear()&&s.getMonth()===o.getMonth()&&s.getDate()===o.getDate()}const Cl=/^0*(\d+)$/;function bs(n,e,s){const o=n.trim();if(o==="")return!1;const a=s?.trim();if(a){if(o.toLowerCase()===a.toLowerCase())return!0;const i=Cl.exec(o)?.[1];return i!==void 0&&Number(i)===Vt(a)}return e!=null&&Vt(o)===e}function kl(n,e){return n.assigneeId===e?!0:n.assigneeId===gt&&n.assignedBy===e}function Lo(n,e){const s=e.search.trim().toLowerCase();if(s!==""&&!`${n.title} ${n.description??""}`.toLowerCase().includes(s)&&!bs(s,n.keySeq,n.jiraIssueKey))return!1;if(e.assignee!==null){if(e.assignee===xt){if(n.assigneeId!==null)return!1}else if(!kl(n,e.assignee))return!1}if(e.priority!==null&&n.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(n.dueDate)return!1}else{if(!n.dueDate)return!1;const o=new Date(n.dueDate).getTime(),a=Date.now();if(e.due==="overdue"&&o>=a||e.due==="today"&&!vl(o,a)||e.due==="week"&&(o<a||o>a+7*bl))return!1}if(e.tags.length>0){const o=n.tags.map(a=>a.id);if(!e.tags.some(a=>o.includes(a)))return!1}if(e.repo!==null){if(e.repo===jt){if(n.repo!=null)return!1}else if(n.repo?.toLowerCase()!==e.repo.toLowerCase())return!1}if(e.sprint!==null){if(e.sprint===tt){if(n.sprintId!=null)return!1}else if(n.sprintId!==e.sprint)return!1}return!0}const Ut={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function ke(n,e=!1){return q("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",n?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function yl(n){const e=M.c(107),{value:s,members:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ot,{size:14,className:"shrink-0"}),e[0]=d):d=e[0];let p=d,x;e[1]!==l?(x=l("taskBoard.taskFilters.assigneeLabel"),e[1]=l,e[2]=x):x=e[2];let r=x;if(s===xt){let E;e[3]!==l?(E=l("taskBoard.taskFilters.assigneeUnassigned"),e[3]=l,e[4]=E):E=e[4],r=E}else if(s===gt){let E;e[5]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Kt,{size:14}),e[5]=E):E=e[5],p=E;let R;e[6]!==l?(R=l("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=l,e[7]=R):R=e[7],r=R}else if(s){let E,R,he,ee;if(e[8]!==o||e[9]!==s){let Ae;e[14]!==s?(Ae=Fe=>Fe.userId===s,e[14]=s,e[15]=Ae):Ae=e[15],R=o.find(Ae),E=Mt,he=R?.user?.image??void 0,ee=zt(R?.user?.name),e[8]=o,e[9]=s,e[10]=E,e[11]=R,e[12]=he,e[13]=ee}else E=e[10],R=e[11],he=e[12],ee=e[13];let ve;e[16]!==E||e[17]!==he||e[18]!==ee?(ve=t.jsx(E,{url:he,fallback:ee,shape:"circle",size:"2xs"}),e[16]=E,e[17]=he,e[18]=ee,e[19]=ve):ve=e[19],p=ve;let oe;e[20]!==R?.user?.name||e[21]!==l?(oe=R?.user?.name??l("taskBoard.taskFilters.assigneeMember"),e[20]=R?.user?.name,e[21]=l,e[22]=oe):oe=e[22],r=oe}let f;e[23]!==a?(f=E=>{a(E),u(!1)},e[23]=a,e[24]=f):f=e[24];const g=f,h=s!==null;let j;e[25]!==i||e[26]!==h?(j=ke(h,i),e[25]=i,e[26]=h,e[27]=j):j=e[27];const y=j,S=i&&"ml-auto";let v;e[28]!==S?(v=q("shrink-0 opacity-60",S),e[28]=S,e[29]=v):v=e[29];const N=v;let C;e[30]!==r?(C=t.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[30]=r,e[31]=C):C=e[31];let k;e[32]!==N?(k=t.jsx(De,{size:12,className:N}),e[32]=N,e[33]=k):k=e[33];let w;e[34]!==p||e[35]!==C||e[36]!==k||e[37]!==y?(w=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:y,children:[p,C,k]})}),e[34]=p,e[35]=C,e[36]=k,e[37]=y,e[38]=w):w=e[38];let m;e[39]!==l?(m=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=l,e[40]=m):m=e[40];let _;e[41]!==l?(_=l("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[41]=l,e[42]=_):_=e[42];let D;e[43]!==m||e[44]!==_?(D=t.jsx(At,{placeholder:m,"aria-label":_,className:"h-9"}),e[43]=m,e[44]=_,e[45]=D):D=e[45];let F;e[46]!==l?(F=l("taskBoard.taskFilters.assigneeNoMembersFound"),e[46]=l,e[47]=F):F=e[47];let I;e[48]!==F?(I=t.jsx(Ft,{children:F}),e[48]=F,e[49]=I):I=e[49];let b;e[50]!==l?(b=l("taskBoard.taskFilters.assigneeAnyone"),e[50]=l,e[51]=b):b=e[51];let A;e[52]!==g?(A=()=>g(null),e[52]=g,e[53]=A):A=e[53];let T;e[54]!==l?(T=l("taskBoard.taskFilters.assigneeAnyone"),e[54]=l,e[55]=T):T=e[55];let z;e[56]!==b||e[57]!==A||e[58]!==T?(z=t.jsx(Ce,{value:b,onSelect:A,children:T}),e[56]=b,e[57]=A,e[58]=T,e[59]=z):z=e[59];let L;e[60]!==l?(L=l("taskBoard.taskFilters.assigneeUnassigned"),e[60]=l,e[61]=L):L=e[61];let P;e[62]!==g?(P=()=>g(xt),e[62]=g,e[63]=P):P=e[63];let $;e[64]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Ot,{size:16,className:"text-muted-foreground"}),e[64]=$):$=e[64];let U;e[65]!==l?(U=l("taskBoard.taskFilters.assigneeUnassigned"),e[65]=l,e[66]=U):U=e[66];let X;e[67]!==L||e[68]!==P||e[69]!==U?(X=t.jsxs(Ce,{value:L,onSelect:P,className:"gap-2",children:[$,U]}),e[67]=L,e[68]=P,e[69]=U,e[70]=X):X=e[70];let Y;e[71]!==l?(Y=l("taskBoard.taskFilters.assigneeSuperAgent"),e[71]=l,e[72]=Y):Y=e[72];let G;e[73]!==g?(G=()=>g(gt),e[73]=g,e[74]=G):G=e[74];let V;e[75]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(Kt,{size:16}),e[75]=V):V=e[75];let J;e[76]!==l?(J=l("taskBoard.taskFilters.assigneeSuperAgent"),e[76]=l,e[77]=J):J=e[77];let O;e[78]!==Y||e[79]!==G||e[80]!==J?(O=t.jsxs(Ce,{value:Y,onSelect:G,className:"gap-2",children:[V,J]}),e[78]=Y,e[79]=G,e[80]=J,e[81]=O):O=e[81];let H;e[82]!==z||e[83]!==X||e[84]!==O?(H=t.jsxs(Ue,{children:[z,X,O]}),e[82]=z,e[83]=X,e[84]=O,e[85]=H):H=e[85];let me;e[86]!==l?(me=l("taskBoard.taskFilters.assigneeGroupMembers"),e[86]=l,e[87]=me):me=e[87];let te;if(e[88]!==o||e[89]!==g){let E;e[91]!==g?(E=R=>t.jsxs(Ce,{value:R.user?.name??R.userId,onSelect:()=>g(R.userId),className:"gap-2",children:[t.jsx(Mt,{url:R.user?.image??void 0,fallback:zt(R.user?.name),shape:"circle",size:"2xs"}),t.jsx("span",{className:"truncate",children:R.user?.name??R.userId})]},R.userId),e[91]=g,e[92]=E):E=e[92],te=o.map(E),e[88]=o,e[89]=g,e[90]=te}else te=e[90];let se;e[93]!==me||e[94]!==te?(se=t.jsx(Ue,{heading:me,children:te}),e[93]=me,e[94]=te,e[95]=se):se=e[95];let le;e[96]!==I||e[97]!==H||e[98]!==se?(le=t.jsxs(It,{children:[I,H,se]}),e[96]=I,e[97]=H,e[98]=se,e[99]=le):le=e[99];let ie;e[100]!==D||e[101]!==le?(ie=t.jsx(nt,{align:"start",className:"w-56 p-0",children:t.jsxs(Tt,{children:[D,le]})}),e[100]=D,e[101]=le,e[102]=ie):ie=e[102];let pe;return e[103]!==c||e[104]!==w||e[105]!==ie?(pe=t.jsxs(st,{open:c,onOpenChange:u,children:[w,ie]}),e[103]=c,e[104]=w,e[105]=ie,e[106]=pe):pe=e[106],pe}function Nl(n){const e=M.c(33),{value:s,onChange:o,block:a}=n,i=K(),l=s!==null;let c;e[0]!==a||e[1]!==l?(c=ke(l,a),e[0]=a,e[1]=l,e[2]=c):c=e[2];const u=c,d=a&&"ml-auto";let p;e[3]!==d?(p=q("shrink-0 opacity-60",d),e[3]=d,e[4]=p):p=e[4];const x=p;let r;e[5]!==s?(r=s?t.jsx("span",{className:q("size-2 shrink-0 rounded-full",Je[s].dotClassName)}):t.jsx(Dn,{size:14,className:"shrink-0"}),e[5]=s,e[6]=r):r=e[6];let f;e[7]!==i||e[8]!==s?(f=i(s?Je[s].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=i,e[8]=s,e[9]=f):f=e[9];let g;e[10]!==x?(g=t.jsx(De,{size:12,className:x}),e[10]=x,e[11]=g):g=e[11];let h;e[12]!==r||e[13]!==f||e[14]!==g||e[15]!==u?(h=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:u,children:[r,f,g]})}),e[12]=r,e[13]=f,e[14]=g,e[15]=u,e[16]=h):h=e[16];const j=s??be;let y;e[17]!==o?(y=w=>o(w===be?null:w),e[17]=o,e[18]=y):y=e[18];let S;e[19]!==i?(S=i("taskBoard.taskFilters.priorityAnyPriority"),e[19]=i,e[20]=S):S=e[20];let v;e[21]!==S?(v=t.jsx(_e,{value:be,children:S}),e[21]=S,e[22]=v):v=e[22];let N;e[23]!==i?(N=Fn.map(w=>t.jsxs(_e,{value:w,className:"gap-2",children:[t.jsx("span",{className:q("size-2 rounded-full",Je[w].dotClassName)}),i(Je[w].labelKey)]},w)),e[23]=i,e[24]=N):N=e[24];let C;e[25]!==y||e[26]!==v||e[27]!==N||e[28]!==j?(C=t.jsx(_t,{align:"start",className:"w-40",children:t.jsxs(wt,{value:j,onValueChange:y,children:[v,N]})}),e[25]=y,e[26]=v,e[27]=N,e[28]=j,e[29]=C):C=e[29];let k;return e[30]!==C||e[31]!==h?(k=t.jsxs(Dt,{children:[h,C]}),e[30]=C,e[31]=h,e[32]=k):k=e[32],k}function Sl(n){const e=M.c(35),{value:s,onChange:o,block:a}=n,i=K();let l;e[0]!==i||e[1]!==s?(l=s?i(Ut[s]):void 0,e[0]=i,e[1]=s,e[2]=l):l=e[2];const c=l,u=s!==null;let d;e[3]!==a||e[4]!==u?(d=ke(u,a),e[3]=a,e[4]=u,e[5]=d):d=e[5];const p=d,x=a&&"ml-auto";let r;e[6]!==x?(r=q("shrink-0 opacity-60",x),e[6]=x,e[7]=r):r=e[7];const f=r;let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(dt,{size:14,className:"shrink-0"}),e[8]=g):g=e[8];let h;e[9]!==c||e[10]!==i?(h=c??i("taskBoard.taskFilters.dueDateLabel"),e[9]=c,e[10]=i,e[11]=h):h=e[11];let j;e[12]!==f?(j=t.jsx(De,{size:12,className:f}),e[12]=f,e[13]=j):j=e[13];let y;e[14]!==h||e[15]!==j||e[16]!==p?(y=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:p,children:[g,h,j]})}),e[14]=h,e[15]=j,e[16]=p,e[17]=y):y=e[17];const S=s??be;let v;e[18]!==o?(v=D=>o(D===be?null:D),e[18]=o,e[19]=v):v=e[19];let N;e[20]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(dt,{size:16,className:"text-muted-foreground"}),e[20]=N):N=e[20];let C;e[21]!==i?(C=i("taskBoard.taskFilters.dueDateAnyTime"),e[21]=i,e[22]=C):C=e[22];let k;e[23]!==C?(k=t.jsxs(_e,{value:be,className:"gap-2",children:[N,C]}),e[23]=C,e[24]=k):k=e[24];let w;e[25]!==i?(w=Object.entries(Ut).map(D=>{const[F,I]=D,b=F==="overdue";return t.jsxs(_e,{value:F,className:q("gap-2",b&&"text-destructive"),children:[t.jsx(dt,{size:16,className:q("shrink-0",b?"text-destructive":"text-muted-foreground")}),i(I)]},F)}),e[25]=i,e[26]=w):w=e[26];let m;e[27]!==S||e[28]!==v||e[29]!==k||e[30]!==w?(m=t.jsx(_t,{align:"start",className:"w-44",children:t.jsxs(wt,{value:S,onValueChange:v,children:[k,w]})}),e[27]=S,e[28]=v,e[29]=k,e[30]=w,e[31]=m):m=e[31];let _;return e[32]!==m||e[33]!==y?(_=t.jsxs(Dt,{children:[y,m]}),e[32]=m,e[33]=y,e[34]=_):_=e[34],_}function _l(n){const e=M.c(56),{value:s,tags:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]!==a||e[1]!==s?(d=L=>a(s.includes(L)?s.filter(P=>P!==L):[...s,L]),e[0]=a,e[1]=s,e[2]=d):d=e[2];const p=d;let x;e[3]!==l||e[4]!==o||e[5]!==s[0]||e[6]!==s.length?(x=s.length===0?l("taskBoard.taskFilters.tagsLabel"):s.length===1?o.find(L=>L.id===s[0])?.name??l("taskBoard.taskFilters.tagsLabel"):l("taskBoard.taskFilters.tagsSelectedCount",{count:s.length}),e[3]=l,e[4]=o,e[5]=s[0],e[6]=s.length,e[7]=x):x=e[7];const r=x,f=s.length>0;let g;e[8]!==i||e[9]!==f?(g=ke(f,i),e[8]=i,e[9]=f,e[10]=g):g=e[10];const h=g,j=i&&"ml-auto";let y;e[11]!==j?(y=q("shrink-0 opacity-60",j),e[11]=j,e[12]=y):y=e[12];const S=y;let v;e[13]!==o||e[14]!==s[0]||e[15]!==s.length?(v=s.length===1?t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Et(o.find(L=>L.id===s[0])?.color)}}):t.jsx(Ls,{size:14,className:"shrink-0"}),e[13]=o,e[14]=s[0],e[15]=s.length,e[16]=v):v=e[16];let N;e[17]!==r?(N=t.jsx("span",{className:"max-w-[10rem] truncate",children:r}),e[17]=r,e[18]=N):N=e[18];let C;e[19]!==S?(C=t.jsx(De,{size:12,className:S}),e[19]=S,e[20]=C):C=e[20];let k;e[21]!==v||e[22]!==N||e[23]!==C||e[24]!==h?(k=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:h,children:[v,N,C]})}),e[21]=v,e[22]=N,e[23]=C,e[24]=h,e[25]=k):k=e[25];let w;e[26]!==l?(w=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[26]=l,e[27]=w):w=e[27];let m;e[28]!==l?(m=l("taskBoard.taskFilters.tagsFilterPlaceholder"),e[28]=l,e[29]=m):m=e[29];let _;e[30]!==w||e[31]!==m?(_=t.jsx(At,{placeholder:w,"aria-label":m,className:"h-9"}),e[30]=w,e[31]=m,e[32]=_):_=e[32];let D;e[33]!==l?(D=l("taskBoard.taskFilters.tagsNoTagsFound"),e[33]=l,e[34]=D):D=e[34];let F;e[35]!==D?(F=t.jsx(Ft,{children:D}),e[35]=D,e[36]=F):F=e[36];let I;if(e[37]!==o||e[38]!==p||e[39]!==s){let L;e[41]!==p||e[42]!==s?(L=P=>t.jsxs(Ce,{value:P.name,onSelect:()=>p(P.id),className:"gap-2",children:[t.jsx("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:Et(P.color)}}),t.jsx("span",{className:"flex-1 truncate",children:P.name}),s.includes(P.id)&&t.jsx(He,{size:14,className:"shrink-0 text-foreground"})]},P.id),e[41]=p,e[42]=s,e[43]=L):L=e[43],I=o.map(L),e[37]=o,e[38]=p,e[39]=s,e[40]=I}else I=e[40];let b;e[44]!==I?(b=t.jsx(Ue,{children:I}),e[44]=I,e[45]=b):b=e[45];let A;e[46]!==F||e[47]!==b?(A=t.jsxs(It,{children:[F,b]}),e[46]=F,e[47]=b,e[48]=A):A=e[48];let T;e[49]!==_||e[50]!==A?(T=t.jsx(nt,{align:"start",className:"w-56 p-0",children:t.jsxs(Tt,{children:[_,A]})}),e[49]=_,e[50]=A,e[51]=T):T=e[51];let z;return e[52]!==c||e[53]!==k||e[54]!==T?(z=t.jsxs(st,{open:c,onOpenChange:u,children:[k,T]}),e[52]=c,e[53]=k,e[54]=T,e[55]=z):z=e[55],z}function wl(n){const e=M.c(73),{value:s,repos:o,onChange:a,block:i}=n,l=K(),[c,u]=Q.useState(!1);let d;e[0]!==l||e[1]!==s?(d=s===null?l("taskBoard.taskFilters.repoLabel"):s===jt?l("taskBoard.taskFilters.repoNoRepo"):s,e[0]=l,e[1]=s,e[2]=d):d=e[2];const p=d;let x;e[3]!==a?(x=O=>{a(O),u(!1)},e[3]=a,e[4]=x):x=e[4];const r=x,f=s!==null;let g;e[5]!==i||e[6]!==f?(g=ke(f,i),e[5]=i,e[6]=f,e[7]=g):g=e[7];const h=g,j=i&&"ml-auto";let y;e[8]!==j?(y=q("shrink-0 opacity-60",j),e[8]=j,e[9]=y):y=e[9];const S=y;let v;e[10]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(ht,{className:"size-3.5 shrink-0"}),e[10]=v):v=e[10];let N;e[11]!==p?(N=t.jsx("span",{className:"max-w-[12rem] truncate",children:p}),e[11]=p,e[12]=N):N=e[12];let C;e[13]!==S?(C=t.jsx(De,{size:12,className:S}),e[13]=S,e[14]=C):C=e[14];let k;e[15]!==N||e[16]!==C||e[17]!==h?(k=t.jsx(Ve,{asChild:!0,children:t.jsxs("button",{type:"button",className:h,children:[v,N,C]})}),e[15]=N,e[16]=C,e[17]=h,e[18]=k):k=e[18];let w;e[19]!==l?(w=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[19]=l,e[20]=w):w=e[20];let m;e[21]!==l?(m=l("taskBoard.taskFilters.repoFilterPlaceholder"),e[21]=l,e[22]=m):m=e[22];let _;e[23]!==w||e[24]!==m?(_=t.jsx(At,{placeholder:w,"aria-label":m,className:"h-9"}),e[23]=w,e[24]=m,e[25]=_):_=e[25];let D;e[26]!==l?(D=l("taskBoard.taskFilters.repoNoReposFound"),e[26]=l,e[27]=D):D=e[27];let F;e[28]!==D?(F=t.jsx(Ft,{children:D}),e[28]=D,e[29]=F):F=e[29];let I;e[30]!==l?(I=l("taskBoard.taskFilters.repoAnyRepo"),e[30]=l,e[31]=I):I=e[31];let b;e[32]!==r?(b=()=>r(null),e[32]=r,e[33]=b):b=e[33];let A;e[34]!==l?(A=l("taskBoard.taskFilters.repoAnyRepo"),e[34]=l,e[35]=A):A=e[35];let T;e[36]!==I||e[37]!==b||e[38]!==A?(T=t.jsx(Ce,{value:I,onSelect:b,children:A}),e[36]=I,e[37]=b,e[38]=A,e[39]=T):T=e[39];let z;e[40]!==l?(z=l("taskBoard.taskFilters.repoNoRepo"),e[40]=l,e[41]=z):z=e[41];let L;e[42]!==r?(L=()=>r(jt),e[42]=r,e[43]=L):L=e[43];let P;e[44]!==l?(P=l("taskBoard.taskFilters.repoNoRepo"),e[44]=l,e[45]=P):P=e[45];let $;e[46]!==z||e[47]!==L||e[48]!==P?($=t.jsx(Ce,{value:z,onSelect:L,children:P}),e[46]=z,e[47]=L,e[48]=P,e[49]=$):$=e[49];let U;e[50]!==T||e[51]!==$?(U=t.jsxs(Ue,{children:[T,$]}),e[50]=T,e[51]=$,e[52]=U):U=e[52];let X;if(e[53]!==o||e[54]!==r||e[55]!==s){let O;e[57]!==r||e[58]!==s?(O=H=>t.jsxs(Ce,{value:H,onSelect:()=>r(H),className:"gap-2",children:[t.jsx(ht,{className:"size-4 shrink-0"}),t.jsx("span",{className:"flex-1 truncate",children:H}),s===H&&t.jsx(He,{size:14,className:"shrink-0 text-foreground"})]},H),e[57]=r,e[58]=s,e[59]=O):O=e[59],X=o.map(O),e[53]=o,e[54]=r,e[55]=s,e[56]=X}else X=e[56];let Y;e[60]!==X?(Y=t.jsx(Ue,{children:X}),e[60]=X,e[61]=Y):Y=e[61];let G;e[62]!==F||e[63]!==U||e[64]!==Y?(G=t.jsxs(It,{children:[F,U,Y]}),e[62]=F,e[63]=U,e[64]=Y,e[65]=G):G=e[65];let V;e[66]!==_||e[67]!==G?(V=t.jsx(nt,{align:"start",className:"w-64 p-0",children:t.jsxs(Tt,{children:[_,G]})}),e[66]=_,e[67]=G,e[68]=V):V=e[68];let J;return e[69]!==c||e[70]!==k||e[71]!==V?(J=t.jsxs(st,{open:c,onOpenChange:u,children:[k,V]}),e[69]=c,e[70]=k,e[71]=V,e[72]=J):J=e[72],J}function Dl(n){const e=M.c(45),{value:s,sprints:o,onChange:a,block:i}=n,l=K();let c;if(e[0]!==o||e[1]!==s){let b;e[3]!==s?(b=A=>A.id===s,e[3]=s,e[4]=b):b=e[4],c=o.find(b),e[0]=o,e[1]=s,e[2]=c}else c=e[2];const u=c;let d;e[5]!==u?.name||e[6]!==l||e[7]!==s?(d=s===null?l("taskBoard.taskFilters.sprintLabel"):s===tt?l("taskBoard.taskFilters.sprintBacklog"):u?.name??l("taskBoard.taskFilters.sprintLabel"),e[5]=u?.name,e[6]=l,e[7]=s,e[8]=d):d=e[8];const p=d,x=s!==null;let r;e[9]!==i||e[10]!==x?(r=ke(x,i),e[9]=i,e[10]=x,e[11]=r):r=e[11];const f=r,g=i&&"ml-auto";let h;e[12]!==g?(h=q("shrink-0 opacity-60",g),e[12]=g,e[13]=h):h=e[13];const j=h;let y;e[14]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx($s,{size:14,className:"shrink-0"}),e[14]=y):y=e[14];let S;e[15]!==j?(S=t.jsx(De,{size:12,className:j}),e[15]=j,e[16]=S):S=e[16];let v;e[17]!==p||e[18]!==S||e[19]!==f?(v=t.jsx(St,{asChild:!0,children:t.jsxs("button",{type:"button",className:f,children:[y,p,S]})}),e[17]=p,e[18]=S,e[19]=f,e[20]=v):v=e[20];const N=s===null?be:s;let C;e[21]!==a?(C=b=>a(b===be?gs:b),e[21]=a,e[22]=C):C=e[22];let k;e[23]!==l?(k=l("taskBoard.taskFilters.sprintAnySprint"),e[23]=l,e[24]=k):k=e[24];let w;e[25]!==k?(w=t.jsx(_e,{value:be,children:k}),e[25]=k,e[26]=w):w=e[26];let m;e[27]!==l?(m=l("taskBoard.taskFilters.sprintBacklog"),e[27]=l,e[28]=m):m=e[28];let _;e[29]!==m?(_=t.jsx(_e,{value:tt,children:m}),e[29]=m,e[30]=_):_=e[30];let D;if(e[31]!==o||e[32]!==l){let b;e[34]!==l?(b=A=>t.jsxs(_e,{value:A.id,children:[t.jsx("span",{className:"truncate",children:A.name}),t.jsx("span",{className:"ml-auto shrink-0 text-muted-foreground",children:A.state==="active"?l("taskBoard.taskFilters.sprintCurrent"):In(A)})]},A.id),e[34]=l,e[35]=b):b=e[35],D=o.map(b),e[31]=o,e[32]=l,e[33]=D}else D=e[33];let F;e[36]!==N||e[37]!==C||e[38]!==w||e[39]!==_||e[40]!==D?(F=t.jsx(_t,{align:"start",className:"max-h-80 w-72 overflow-y-auto",children:t.jsxs(wt,{value:N,onValueChange:C,children:[w,_,D]})}),e[36]=N,e[37]=C,e[38]=w,e[39]=_,e[40]=D,e[41]=F):F=e[41];let I;return e[42]!==F||e[43]!==v?(I=t.jsxs(Dt,{children:[v,F]}),e[42]=F,e[43]=v,e[44]=I):I=e[44],I}function Al(n){const e=M.c(25),{value:s,onChange:o,block:a}=n,i=K(),[l,c]=Q.useState(s!==""),[u,d]=Q.useState(!1),[p,x]=Q.useState(s);s!==p&&(x(s),s===""&&!u&&c(!1));const r=l||a,f=r?"w-32 sm:w-44":"w-8 px-0 justify-center",g=a&&"h-10 w-full px-3 text-sm sm:w-full";let h;e[0]!==f||e[1]!==g?(h=q("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",f,g),e[0]=f,e[1]=g,e[2]=h):h=e[2];let j;e[3]!==i?(j=i("taskBoard.taskFilters.searchLabel"),e[3]=i,e[4]=j):j=e[4];let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=()=>c(!0),e[5]=y):y=e[5];let S;e[6]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(Ms,{size:14}),e[6]=S):S=e[6];let v;e[7]!==j?(v=t.jsx("button",{type:"button","aria-label":j,onClick:y,className:"shrink-0 text-muted-foreground transition-colors hover:text-foreground",children:S}),e[7]=j,e[8]=v):v=e[8];let N;e[9]!==a||e[10]!==r||e[11]!==o||e[12]!==i||e[13]!==s?(N=r&&t.jsx("input",{autoFocus:!a,value:s,onChange:w=>o(w.target.value),onFocus:()=>d(!0),onBlur:()=>{d(!1),s===""&&c(!1)},placeholder:i("taskBoard.taskFilters.searchPlaceholder"),"aria-label":i("taskBoard.taskFilters.searchPlaceholder"),className:"w-full min-w-0 bg-transparent text-xs outline-none placeholder:text-muted-foreground"}),e[9]=a,e[10]=r,e[11]=o,e[12]=i,e[13]=s,e[14]=N):N=e[14];let C;e[15]!==a||e[16]!==o||e[17]!==i||e[18]!==s?(C=s!==""&&t.jsx("button",{type:"button","aria-label":i("taskBoard.taskFilters.searchClearLabel"),onMouseDown:Fl,onClick:()=>{o(""),a||c(!1)},className:"shrink-0 text-muted-foreground hover:text-foreground",children:t.jsx(Ts,{size:14})}),e[15]=a,e[16]=o,e[17]=i,e[18]=s,e[19]=C):C=e[19];let k;return e[20]!==h||e[21]!==v||e[22]!==N||e[23]!==C?(k=t.jsxs("div",{className:h,children:[v,N,C]}),e[20]=h,e[21]=v,e[22]=N,e[23]=C,e[24]=k):k=e[24],k}function Fl(n){return n.preventDefault()}function Il(n){const e=M.c(20),{block:s,onClick:o}=n,a=K();let i;e[0]!==a?(i=a("taskBoard.taskFilters.boardSettingsLabel"),e[0]=a,e[1]=i):i=e[1];const l=i;let c;e[2]!==s?(c=q(ke(!1,s),s?"h-10 w-full":"w-8 justify-center px-0"),e[2]=s,e[3]=c):c=e[3];let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(An,{size:14,className:"shrink-0"}),e[4]=u):u=e[4];let d;e[5]!==s||e[6]!==l?(d=s&&t.jsx("span",{children:l}),e[5]=s,e[6]=l,e[7]=d):d=e[7];let p;e[8]!==l||e[9]!==o||e[10]!==c||e[11]!==d?(p=t.jsxs("button",{type:"button",onClick:o,"aria-label":l,className:c,children:[u,d]}),e[8]=l,e[9]=o,e[10]=c,e[11]=d,e[12]=p):p=e[12];const x=p;if(s)return x;let r;e[13]!==x?(r=t.jsx(ze,{asChild:!0,children:x}),e[13]=x,e[14]=r):r=e[14];let f;e[15]!==l?(f=t.jsx(Ee,{side:"top",children:l}),e[15]=l,e[16]=f):f=e[16];let g;return e[17]!==r||e[18]!==f?(g=t.jsxs(Re,{children:[r,f]}),e[17]=r,e[18]=f,e[19]=g):g=e[19],g}function vs(n){const e=M.c(59),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u,block:d}=n;let p;e[0]!==s||e[1]!==c?(p=m=>c({...s,search:m}),e[0]=s,e[1]=c,e[2]=p):p=e[2];let x;e[3]!==d||e[4]!==s.search||e[5]!==p?(x=t.jsx(Al,{block:d,value:s.search,onChange:p}),e[3]=d,e[4]=s.search,e[5]=p,e[6]=x):x=e[6];let r;e[7]!==s||e[8]!==c?(r=m=>c({...s,assignee:m}),e[7]=s,e[8]=c,e[9]=r):r=e[9];let f;e[10]!==d||e[11]!==s.assignee||e[12]!==o||e[13]!==r?(f=t.jsx(yl,{block:d,value:s.assignee,members:o,onChange:r}),e[10]=d,e[11]=s.assignee,e[12]=o,e[13]=r,e[14]=f):f=e[14];let g;e[15]!==s||e[16]!==c?(g=m=>c({...s,priority:m}),e[15]=s,e[16]=c,e[17]=g):g=e[17];let h;e[18]!==d||e[19]!==s.priority||e[20]!==g?(h=t.jsx(Nl,{block:d,value:s.priority,onChange:g}),e[18]=d,e[19]=s.priority,e[20]=g,e[21]=h):h=e[21];let j;e[22]!==s||e[23]!==c?(j=m=>c({...s,due:m}),e[22]=s,e[23]=c,e[24]=j):j=e[24];let y;e[25]!==d||e[26]!==s.due||e[27]!==j?(y=t.jsx(Sl,{block:d,value:s.due,onChange:j}),e[25]=d,e[26]=s.due,e[27]=j,e[28]=y):y=e[28];let S;e[29]!==s||e[30]!==c?(S=m=>c({...s,tags:m}),e[29]=s,e[30]=c,e[31]=S):S=e[31];let v;e[32]!==d||e[33]!==s.tags||e[34]!==S||e[35]!==a?(v=t.jsx(_l,{block:d,value:s.tags,tags:a,onChange:S}),e[32]=d,e[33]=s.tags,e[34]=S,e[35]=a,e[36]=v):v=e[36];let N;e[37]!==d||e[38]!==s||e[39]!==c||e[40]!==i?(N=(i.length>0||s.repo!==null)&&t.jsx(wl,{block:d,value:s.repo,repos:i,onChange:m=>c({...s,repo:m})}),e[37]=d,e[38]=s,e[39]=c,e[40]=i,e[41]=N):N=e[41];let C;e[42]!==d||e[43]!==s||e[44]!==c||e[45]!==l?(C=(l.length>0||s.sprint!==null)&&t.jsx(Dl,{block:d,value:s.sprint,sprints:l,onChange:m=>c({...s,sprint:m})}),e[42]=d,e[43]=s,e[44]=c,e[45]=l,e[46]=C):C=e[46];let k;e[47]!==d||e[48]!==u?(k=t.jsx(Il,{block:d,onClick:u}),e[47]=d,e[48]=u,e[49]=k):k=e[49];let w;return e[50]!==v||e[51]!==N||e[52]!==C||e[53]!==k||e[54]!==x||e[55]!==f||e[56]!==h||e[57]!==y?(w=t.jsxs(t.Fragment,{children:[x,f,h,y,v,N,C,k]}),e[50]=v,e[51]=N,e[52]=C,e[53]=k,e[54]=x,e[55]=f,e[56]=h,e[57]=y,e[58]=w):w=e[58],w}function $o(n){const e=M.c(17),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}=n,d=K();let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ps,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=p):p=e[0];let x;e[1]!==s||e[2]!==o||e[3]!==c||e[4]!==u||e[5]!==i||e[6]!==l||e[7]!==a?(x=t.jsx(vs,{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}),e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=i,e[6]=l,e[7]=a,e[8]=x):x=e[8];let r;e[9]!==s||e[10]!==c||e[11]!==l||e[12]!==d?(r=xl(s,Bt(l))&&t.jsx("button",{type:"button",onClick:()=>c(xs),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:d("taskBoard.taskFilters.clearButton")}),e[9]=s,e[10]=c,e[11]=l,e[12]=d,e[13]=r):r=e[13];let f;return e[14]!==x||e[15]!==r?(f=t.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[p,x,r]}),e[14]=x,e[15]=r,e[16]=f):f=e[16],f}function Mo(n){const e=M.c(45),{filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u}=n,d=K(),[p,x]=Q.useState(!1);let r;e[0]!==s||e[1]!==l?(r=jl(s,Bt(l)),e[0]=s,e[1]=l,e[2]=r):r=e[2];const f=r,g=f>0;let h;e[3]!==g?(h=ke(g),e[3]=g,e[4]=h):h=e[4];const j=h;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ps,{size:14,className:"shrink-0"}),e[5]=y):y=e[5];let S;e[6]!==d?(S=d("taskBoard.taskFilters.filterDrawerButtonLabel"),e[6]=d,e[7]=S):S=e[7];let v;e[8]!==f?(v=f>0&&t.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:f}),e[8]=f,e[9]=v):v=e[9];let N;e[10]!==S||e[11]!==v||e[12]!==j?(N=t.jsx(Us,{asChild:!0,children:t.jsxs("button",{type:"button",className:j,children:[y,S,v]})}),e[10]=S,e[11]=v,e[12]=j,e[13]=N):N=e[13];let C;e[14]!==d?(C=d("taskBoard.taskFilters.filterDrawerTitle"),e[14]=d,e[15]=C):C=e[15];let k;e[16]!==C?(k=t.jsx(Nt,{className:"px-4 pt-4 text-base font-medium text-foreground",children:C}),e[16]=C,e[17]=k):k=e[17];let w;e[18]!==s||e[19]!==o||e[20]!==c||e[21]!==u||e[22]!==i||e[23]!==l||e[24]!==a?(w=t.jsx("div",{className:"flex flex-col gap-2 p-4",children:t.jsx(vs,{block:!0,filters:s,members:o,tags:a,repos:i,sprints:l,onChange:c,onOpenBoardSettings:u})}),e[18]=s,e[19]=o,e[20]=c,e[21]=u,e[22]=i,e[23]=l,e[24]=a,e[25]=w):w=e[25];let m;e[26]!==f||e[27]!==c||e[28]!==d?(m=f>0&&t.jsx(je,{variant:"outline",className:"flex-1",onClick:()=>c(xs),children:d("taskBoard.taskFilters.clearAllButton")}),e[26]=f,e[27]=c,e[28]=d,e[29]=m):m=e[29];let _;e[30]!==d?(_=d("taskBoard.taskFilters.doneButton"),e[30]=d,e[31]=_):_=e[31];let D;e[32]!==_?(D=t.jsx(ss,{asChild:!0,children:t.jsx(je,{className:"flex-1",children:_})}),e[32]=_,e[33]=D):D=e[33];let F;e[34]!==m||e[35]!==D?(F=t.jsxs(ns,{className:"flex-row gap-2",children:[m,D]}),e[34]=m,e[35]=D,e[36]=F):F=e[36];let I;e[37]!==w||e[38]!==F||e[39]!==k?(I=t.jsxs(yt,{className:"p-0",children:[k,w,F]}),e[37]=w,e[38]=F,e[39]=k,e[40]=I):I=e[40];let b;return e[41]!==p||e[42]!==I||e[43]!==N?(b=t.jsxs(kt,{open:p,onOpenChange:x,direction:"bottom",children:[N,I]}),e[41]=p,e[42]=I,e[43]=N,e[44]=b):b=e[44],b}function Oo(n,e){return pl(n,e.keySeq,e.jiraIssueKey)??e.id}function zo(n,e){const s=e?.trim();if(!s)return;const o=s.toLowerCase();return n.find(a=>a.jiraIssueKey?.trim().toLowerCase()===o)??n.find(a=>bs(s,a.keySeq,a.jiraIssueKey))??n.find(a=>a.id===s)}export{Io as A,xs as E,Fo as N,Kt as S,Mo as T,Oo as a,Ao as b,$o as c,Lo as d,Jn as e,zo as f,Bo as m,Po as r,pl as t,To as u};
|