decocms 4.102.0 → 4.103.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C_nk91tH.js → AlertCircle-F-nIELvZ.js} +1 -1
- package/dist/client/assets/{AreaChart-CmrBd_oc.js → AreaChart-DJEldSaM.js} +1 -1
- package/dist/client/assets/{ArrowRight-x5eFsUyE.js → ArrowRight-Bk1ZMFTO.js} +1 -1
- package/dist/client/assets/{ArrowUp-B_NkVhQy.js → ArrowUp-CUt4kr8s.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-Bjz3wM7_.js → ArrowUpRight-BW81CJcv.js} +1 -1
- package/dist/client/assets/{Check-CmXcFUFA.js → Check-BSU1gPpA.js} +1 -1
- package/dist/client/assets/{CheckCircle-GzoutZzh.js → CheckCircle-DKLFzh24.js} +1 -1
- package/dist/client/assets/{ChevronDown-BU2ru4r_.js → ChevronDown-BZ3MHXqQ.js} +1 -1
- package/dist/client/assets/{ChevronRight-BLHTQ9Db.js → ChevronRight-D3rgicSl.js} +1 -1
- package/dist/client/assets/{ChevronUp-3FMqPib6.js → ChevronUp-BkAN1rCx.js} +1 -1
- package/dist/client/assets/{Copy01-BzXUnxIt.js → Copy01-nbvZgNAo.js} +1 -1
- package/dist/client/assets/{DotsVertical-BXRC3vMY.js → DotsVertical-BOwIfQcg.js} +1 -1
- package/dist/client/assets/{Eye-DZiWXjzc.js → Eye-Djs0fd53.js} +1 -1
- package/dist/client/assets/{FilterLines-Dw3b3U6U.js → FilterLines-BGlG-WiF.js} +1 -1
- package/dist/client/assets/{Globe01-Ct1oKJdh.js → Globe01-ghdMK3aY.js} +1 -1
- package/dist/client/assets/{Globe04-BiqYhKIv.js → Globe04-E9ylFGMp.js} +1 -1
- package/dist/client/assets/{HardDrive-DV_SLLYZ.js → HardDrive-CoOYj4jC.js} +1 -1
- package/dist/client/assets/{Image01-BoP1xUXy.js → Image01-BrLhRzbI.js} +1 -1
- package/dist/client/assets/{Key01-C1HipuOz.js → Key01-CJOMUFhB.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CxYJNTGI.js → LayoutLeft-CK7-vcXv.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CGrGeU4Q.js → LinkExternal01-LfVqtO37.js} +1 -1
- package/dist/client/assets/{Monitor01-C6zpq4qC.js → Monitor01-D5ss1Gc3.js} +1 -1
- package/dist/client/assets/{Package-nklzvxt3.js → Package-CXWzyzlC.js} +1 -1
- package/dist/client/assets/{Palette-vt3KT1N3.js → Palette-T_e3oUZE.js} +1 -1
- package/dist/client/assets/{Play-C8mWR1Az.js → Play-DNIGFnHN.js} +1 -1
- package/dist/client/assets/{Plus-7RPIQWLb.js → Plus-DQjuXapr.js} +1 -1
- package/dist/client/assets/{SearchLg-CWLjZme7.js → SearchLg-BYzGBrH1.js} +1 -1
- package/dist/client/assets/{SearchMd-4O6fg9oW.js → SearchMd-DczJHeiV.js} +1 -1
- package/dist/client/assets/{Settings02-DU8SxETa.js → Settings02-5y64gXEx.js} +1 -1
- package/dist/client/assets/{Shield01-oWOP2zLR.js → Shield01-CIuJJ6t7.js} +1 -1
- package/dist/client/assets/{Star01-kfwc8V_o.js → Star01-Wl07KwZt.js} +1 -1
- package/dist/client/assets/{Stars01-C1l0RlUa.js → Stars01-C_4YltHN.js} +1 -1
- package/dist/client/assets/{Stars02-C3tFxKGI.js → Stars02-Ct0lTW0s.js} +1 -1
- package/dist/client/assets/{Sun-CkVbwhKo.js → Sun-CQrN2jz-.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BP51S8DS.js → SwitchHorizontal01-DUVTefVn.js} +1 -1
- package/dist/client/assets/{Tool01-DE3j460t.js → Tool01-BD3PslC4.js} +1 -1
- package/dist/client/assets/{Tool02-BQUR2DKB.js → Tool02-baA4k7Bq.js} +1 -1
- package/dist/client/assets/{Trash01-cB1sS901.js → Trash01-DnJH0mla.js} +1 -1
- package/dist/client/assets/{TrendUp01-Ddu99xHU.js → TrendUp01-CDPK2sNN.js} +1 -1
- package/dist/client/assets/{Upload01-CYVHio4I.js → Upload01-DKnpOJ58.js} +1 -1
- package/dist/client/assets/{User01-CtR14f1U.js → User01-D0bvNe-5.js} +1 -1
- package/dist/client/assets/{Users01-BqyJARKJ.js → Users01-D7M9juVv.js} +1 -1
- package/dist/client/assets/{Users03-CQdAxDaw.js → Users03-kmkERvNy.js} +1 -1
- package/dist/client/assets/{X-CAmHDMPk.js → X-B3bgMihG.js} +1 -1
- package/dist/client/assets/{XCircle-CANBtGHI.js → XCircle-PsZ_qAbt.js} +1 -1
- package/dist/client/assets/{XClose-BAfFl7aF.js → XClose-jhAYc5ZK.js} +1 -1
- package/dist/client/assets/{Zap-YiLxlwec.js → Zap-CDhtxNMS.js} +1 -1
- package/dist/client/assets/{ZapSquare-DkWTs6ms.js → ZapSquare-CB8iirZ5.js} +1 -1
- package/dist/client/assets/{ZoomOut-C_3JH0WD.js → ZoomOut-CTFVHNoT.js} +1 -1
- package/dist/client/assets/{access-gate-D9ZNkrgA.js → access-gate-QjtSJHfg.js} +1 -1
- package/dist/client/assets/{add-section-modal-D-r-HB6h.js → add-section-modal-B2Y8r1yI.js} +1 -1
- package/dist/client/assets/{agent-icon-VQci6jYK.js → agent-icon-7XCeB3vG.js} +1 -1
- package/dist/client/assets/{agents-list-BBAnTAXz.js → agents-list-Bwpe9kCO.js} +1 -1
- package/dist/client/assets/{ai-providers-CfWuGi9h.js → ai-providers-BNsfQ58N.js} +1 -1
- package/dist/client/assets/{alert-DqafSjaL.js → alert-Bt2d8KUl.js} +1 -1
- package/dist/client/assets/{alert-dialog-GMDN2a2p.js → alert-dialog-Cm39xt9v.js} +3 -3
- package/dist/client/assets/app-editor-DqI7dbRt.js +1 -0
- package/dist/client/assets/{auth-D3hjVX0I.js → auth-B_jV6gHz.js} +1 -1
- package/dist/client/assets/{auth-catchall-DCIWbV2r.js → auth-catchall-DuDKLQT-.js} +1 -1
- package/dist/client/assets/{auth-entry-CzwaudQl.js → auth-entry-C13vX7FJ.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B15UCYf9.js → auth-split-layout-Ca2d-n5Q.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-B6DLU1uJ.js → authenticate-and-persist-oauth-DM2B2dKL.js} +1 -1
- package/dist/client/assets/{automation-list-row-C69OPCMn.js → automation-list-row-DY0aEk3A.js} +1 -1
- package/dist/client/assets/{automation-runs-jf4CQyxT.js → automation-runs-r6cm37j3.js} +14 -14
- package/dist/client/assets/{automations-38lwJ0Pb.js → automations-P_4tnnte.js} +1 -1
- package/dist/client/assets/{autosend-CrLNAcK4.js → autosend-FVeUSLzf.js} +1 -1
- package/dist/client/assets/{avatar-DGoq0KTj.js → avatar-C7dPcds6.js} +1 -1
- package/dist/client/assets/{badge-ICotptLx.js → badge-2AvnjY-c.js} +1 -1
- package/dist/client/assets/{block-document-_k2vMK-w.js → block-document-B37CG5O0.js} +1 -1
- package/dist/client/assets/{brand-context-B9pILASi.js → brand-context-CApWF3GW.js} +1 -1
- package/dist/client/assets/{buckets-DwIjpZ7F.js → buckets-vrL2uet-.js} +1 -1
- package/dist/client/assets/bulk-category-panel-B0wPs_c9.js +1 -0
- package/dist/client/assets/{calendar-BFIHiiFD.js → calendar-BrDB6OlS.js} +1 -1
- package/dist/client/assets/{capability-load-error-CghFcLQ5.js → capability-load-error-Ds3GfoNi.js} +1 -1
- package/dist/client/assets/{card-DeRX92PE.js → card-DBdtISPE.js} +1 -1
- package/dist/client/assets/category-editor-uIOjNNbm.js +1 -0
- package/dist/client/assets/{chat-context-B9cQc_h3.js → chat-context-ClGwv1m6.js} +1 -1
- package/dist/client/assets/{checkbox-CvYv_Km6.js → checkbox-BYxjJHWY.js} +1 -1
- package/dist/client/assets/{cli-auth-success-DbrcSaQM.js → cli-auth-success-72NJ2gv7.js} +1 -1
- package/dist/client/assets/{collection-detail-D_jZAWBQ.js → collection-detail-CKj_Y0ab.js} +1 -1
- package/dist/client/assets/{collection-display-button-C91SGRBy.js → collection-display-button-B6_CPKRH.js} +1 -1
- package/dist/client/assets/{collection-search-tV8cd3K2.js → collection-search-DHKmAT0Q.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-B0sW2nuq.js → collection-table-wrapper-WJkKLyPu.js} +1 -1
- package/dist/client/assets/{collection-tabs-CORSMF6h.js → collection-tabs-DnavY9E9.js} +1 -1
- package/dist/client/assets/{command-BOlKzV0V.js → command-dJWNPnE-.js} +1 -1
- package/dist/client/assets/commerce-onboarding-Rcr8DNXm.js +1 -0
- package/dist/client/assets/{companions-core-oBQaybV8.js → companions-core-D_GBUdA3.js} +1 -1
- package/dist/client/assets/{connect-DoEAuWku.js → connect-U9MkwOJm.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-dbCJQTWC.js → connect-desktop-dialog-BdNFP4Rl.js} +1 -1
- package/dist/client/assets/{connection-card-NrIXzO1v.js → connection-card-CFNUc4Va.js} +1 -1
- package/dist/client/assets/{connection-detail-DJ_6dzel.js → connection-detail-zPOUWPes.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-Dq97qH29.js → connection-form-helpers-C3JFgR88.js} +1 -1
- package/dist/client/assets/{connections-DJIWkSt4.js → connections-DM1AOnB1.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DNUfg0HV.js → decopilot-sse-pool-B5uCrIJ3.js} +1 -1
- package/dist/client/assets/{dialog-CtcL8Rge.js → dialog-DkeXsjIG.js} +1 -1
- package/dist/client/assets/{domain-settings-CENW7GQu.js → domain-settings-CEcg_xJG.js} +1 -1
- package/dist/client/assets/{drawer-C31EzZAL.js → drawer-CPbDRmEI.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BqJxwxsq.js → dropdown-menu-Cj77lvco.js} +1 -1
- package/dist/client/assets/{empty-state-BoA_YW3D.js → empty-state-C_3dbHYZ.js} +1 -1
- package/dist/client/assets/{extract-connection-data--_aU5sYg.js → extract-connection-data-D1XDYy6R.js} +1 -1
- package/dist/client/assets/file-explorer-MRDUkUy_.js +2 -0
- package/dist/client/assets/{file-type-icon-BqEXVrTQ.js → file-type-icon-CiqXwNbA.js} +1 -1
- package/dist/client/assets/{files-Bye5Bbv6.js → files-C4Pd-cZs.js} +1 -1
- package/dist/client/assets/{form-B5plGGFv.js → form-CoQyJTm3.js} +1 -1
- package/dist/client/assets/{general-Jd2yB-b8.js → general-BV3FETkL.js} +1 -1
- package/dist/client/assets/github-repo-picker-BTBfRBRp.js +1 -0
- package/dist/client/assets/{hooks-v_4liDIo.js → hooks-ZOujQIPi.js} +1 -1
- package/dist/client/assets/{index-Chb0IZth.js → index-BRY4PqTN.js} +1 -1
- package/dist/client/assets/{index-Bnc4IoFE.js → index-BT2RV7TE.js} +28 -28
- package/dist/client/assets/{index-DA5rV0RV.js → index-BysNoRzG.js} +1 -1
- package/dist/client/assets/index-CaCZsopB.js +1 -0
- package/dist/client/assets/{index-BzyW0JhV.js → index-CeW312Ew.js} +1 -1
- package/dist/client/assets/{index-Bpt5-Vj-.js → index-ClWwNLBW.js} +1 -1
- package/dist/client/assets/{index-82forbXV.js → index-CrLCcvSA.js} +1 -1
- package/dist/client/assets/{index-yINFUQcR.js → index-D0DGDKY8.js} +1 -1
- package/dist/client/assets/{index-Dt1PB5Sc.js → index-Drpi_xJk.js} +1 -1
- package/dist/client/assets/{index-CmUMOI85.js → index-DtF8w5YB.js} +3 -3
- package/dist/client/assets/{index-BnE6Altg.js → index-biph9Mg3.js} +1 -1
- package/dist/client/assets/index-iNViTLuR.js +8 -0
- package/dist/client/assets/{index-BAxO0Mwx.js → index-nAGNMIsn.js} +1 -1
- package/dist/client/assets/{index-redirect--8WvwlkD.js → index-redirect-BE86PyEj.js} +1 -1
- package/dist/client/assets/{input-Cf6f3BmN.js → input-BJaQlIkQ.js} +1 -1
- package/dist/client/assets/{integration-icon-dAGuZlLn.js → integration-icon-DqBJmXwH.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DHMIvCZa.js → invite-member-dialog-B-jR_42f.js} +1 -1
- package/dist/client/assets/{label-VkdXgHd7.js → label-BRfWNwY9.js} +1 -1
- package/dist/client/assets/{layout-Ci8_KpkR.js → layout-B4_8jgkb.js} +1 -1
- package/dist/client/assets/{login-DYMzVGTT.js → login-B8Zi5Dzn.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DUnhZRN8.js → mcp-oauth-CUU17Y_Q.js} +1 -1
- package/dist/client/assets/{members-C_dKp9cE.js → members-CL82nEg-.js} +1 -1
- package/dist/client/assets/{monaco-editor-Du7tJEjc.js → monaco-editor-AD0vNwrp.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-CGa_Hf8X.js → monitoring-stats-row-CxfC60QJ.js} +1 -1
- package/dist/client/assets/{multi-select-CKCzXjXB.js → multi-select-HwcAwXE1.js} +1 -1
- package/dist/client/assets/{oauth-callback-YH1uSwt3.js → oauth-callback-DCJNGEHF.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CfCAwFe_.js → oauth-callback-ai-provider-hdONyHkA.js} +1 -1
- package/dist/client/assets/{onboarding-BOzlNnjb.js → onboarding-DqZKxu8P.js} +1 -1
- package/dist/client/assets/{org-install-Bh_jspMI.js → org-install-Cv3EfACC.js} +1 -1
- package/dist/client/assets/{org-layout-phPHQXN7.js → org-layout-D4OBQ69U.js} +1 -1
- package/dist/client/assets/{organization-choice-b-1zF0V4.js → organization-choice-BbpCr5cp.js} +1 -1
- package/dist/client/assets/{orgs-BNj-B7ZU.js → orgs-CAOU3qQt.js} +1 -1
- package/dist/client/assets/{page-seo-form-DEBPMXNg.js → page-seo-form-CKm6eQ8l.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CgW2llAr.js +1 -0
- package/dist/client/assets/{popover-RUk1Jxx9.js → popover-DDYqMej5.js} +1 -1
- package/dist/client/assets/post-editor-BZJTuV-1.js +1 -0
- package/dist/client/assets/{primitives-DjhzqWF2.js → primitives-BfrShC-T.js} +1 -1
- package/dist/client/assets/{profile-zgo76jeb.js → profile-5ouMfiKl.js} +1 -1
- package/dist/client/assets/project-app-view-SSUFba_F.js +1 -0
- package/dist/client/assets/record-editor-dNmwuBxf.js +1 -0
- package/dist/client/assets/redirect-editor-B-fBtZvK.js +1 -0
- package/dist/client/assets/registry-CfbSpBAl.js +2 -0
- package/dist/client/assets/{registry-layout-BYEc0-pE.js → registry-layout-BL4mQUxZ.js} +1 -1
- package/dist/client/assets/{reports-DKgwgjGZ.js → reports-C1ZA4Sxj.js} +1 -1
- package/dist/client/assets/{require-capability-tPbQgnBt.js → require-capability-ePkMhKR4.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Bw_23wtD.js → required-auth-layout-B-q3Os-W.js} +1 -1
- package/dist/client/assets/{reset-password-C_05Hu8v.js → reset-password-CkZQqZAq.js} +1 -1
- package/dist/client/assets/{roles-BVMrqSER.js → roles-CGm6QXiM.js} +1 -1
- package/dist/client/assets/{search-input-D1vvih4b.js → search-input-D01mHzeI.js} +1 -1
- package/dist/client/assets/{secrets-BLPRuVeZ.js → secrets-CXs4yFTE.js} +1 -1
- package/dist/client/assets/{sections-editor-qd7Dwqwc.js → sections-editor-DOVv0HtG.js} +2 -2
- package/dist/client/assets/{select-DQl8Nkd-.js → select-l8rRnAxU.js} +1 -1
- package/dist/client/assets/{select-model-DDvi29I3.js → select-model-CptapDof.js} +1 -1
- package/dist/client/assets/self-tool-result-CCXe7iau.js +1 -0
- package/dist/client/assets/seo-editor-BiIDN8tQ.js +1 -0
- package/dist/client/assets/{settings-layout-Bn989CC7.js → settings-layout-DXpX-Kgg.js} +1 -1
- package/dist/client/assets/{settings-section-BUqk0nQQ.js → settings-section-DR-ExjJR.js} +1 -1
- package/dist/client/assets/{shell-controls-B8ZbVsnA.js → shell-controls-B8x37lJX.js} +1 -1
- package/dist/client/assets/{shell-layout-_h-q07bi.js → shell-layout-QrpfsE-4.js} +1 -1
- package/dist/client/assets/{sidebar-CCp56Env.js → sidebar-BwAn3u-G.js} +1 -1
- package/dist/client/assets/{skeleton-BOpN06w4.js → skeleton-Ds3pH_nx.js} +1 -1
- package/dist/client/assets/{sso-BkvAY4e8.js → sso-CaN2ItfH.js} +1 -1
- package/dist/client/assets/{store-CMf550pL.js → store-BzZQxqPv.js} +1 -1
- package/dist/client/assets/store-registry-BYwL1N-r.js +2 -0
- package/dist/client/assets/{studio-tools-BVRXDcEz.js → studio-tools-DP6GO_QA.js} +1 -1
- package/dist/client/assets/{switch-BM-HDdky.js → switch-BhmWwQQD.js} +1 -1
- package/dist/client/assets/{table-zJH1gBbm.js → table-gVGKRop2.js} +1 -1
- package/dist/client/assets/{tabs-CELqSRxW.js → tabs-tDbuBA8I.js} +1 -1
- package/dist/client/assets/{textarea-PL3tBRfL.js → textarea-SvI_2oXm.js} +1 -1
- package/dist/client/assets/{toggle-group-DSJnwILX.js → toggle-group-Cx12Z7I9.js} +1 -1
- package/dist/client/assets/{toolbar-XFnqI6aL.js → toolbar-C-ksd6Dc.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-Drpylp7y.js → toolbar-icon-button-D7EQHXfM.js} +1 -1
- package/dist/client/assets/{tooltip-DLvHocW9.js → tooltip-Dyq08ZoZ.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DB0PWqc_.js → use-ai-providers-B2Q_XNL4.js} +1 -1
- package/dist/client/assets/{use-api-keys-dCJwGqEj.js → use-api-keys-Eoho6S_g.js} +1 -1
- package/dist/client/assets/{use-automations-DHjQTH3C.js → use-automations-Dvcuv-oX.js} +1 -1
- package/dist/client/assets/{use-autosave-BbOXI1wB.js → use-autosave-BYiqQ7IK.js} +1 -1
- package/dist/client/assets/{use-capability-ZRZyXZT2.js → use-capability-OzQzwSuo.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DeftYEin.js → use-clock-tick-BXpCV5ke.js} +1 -1
- package/dist/client/assets/{use-connection-BvbWEpu1.js → use-connection-nFv1cpU3.js} +1 -1
- package/dist/client/assets/{use-copy-_PBbl_ae.js → use-copy-Cv6CdoL-.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CsZebPFO.js → use-create-virtual-mcp-DpcX4D_C.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-DpFFxhds.js → use-debounced-autosave-eaxWrko0.js} +1 -1
- package/dist/client/assets/{use-debounced-value-RZv6Czrq.js → use-debounced-value-BLrMS53b.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CPmWdsys.js → use-deco-credits-nl4J07pt.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-Bp76K5aB.js → use-decopilot-events-CB4Qr5To.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DM4ddJG8.js → use-delete-connection-D8PPN_O0.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-CzIxD_pk.js → use-deployment-admin-D_C2_rvt.js} +1 -1
- package/dist/client/assets/{use-file-configs-CIAOsadi.js → use-file-configs-Bhk6jeL3.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-UBZNLC2q.js → use-infinite-scroll-CNk3Y3Lx.js} +1 -1
- package/dist/client/assets/{use-join-requests-Df1KaVAV.js → use-join-requests-Dx7miDMc.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-xCpfo047.js → use-mcp-auth-status-NtrU9280.js} +1 -1
- package/dist/client/assets/{use-mcp-client-FpSZFiJp.js → use-mcp-client-Of0mQsz0.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-Bfgi1tbs.js → use-mcp-tools-Babv4-zM.js} +1 -1
- package/dist/client/assets/{use-members-CUYuiUkk.js → use-members-Hr3gXbdY.js} +1 -1
- package/dist/client/assets/{use-mobile-Bwjx_QMs.js → use-mobile-B1-kYinm.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-Dlk0IC9Q.js → use-navigate-to-agent-BSo5QaWT.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-B6uCBHg4.js → use-org-auth-client-DDG4NV0M.js} +1 -1
- package/dist/client/assets/{use-org-sso-BhLu2IJL.js → use-org-sso-DV9SutYM.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DRWNxAn0.js → use-organization-roles-BPS8uosH.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CNDPvDWL.js → use-organization-settings-CCDf6oVk.js} +1 -1
- package/dist/client/assets/{use-registry-app-8Rk9qQRz.js → use-registry-app-DIbShjgf.js} +1 -1
- package/dist/client/assets/{use-registry-connections-Bp9WZcYU.js → use-registry-connections-DyeO9cxD.js} +1 -1
- package/dist/client/assets/{use-secrets-C2xWkrG-.js → use-secrets-DyjvwK-E.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Cil-9RHI.js → use-status-sounds-_oN1d87R.js} +1 -1
- package/dist/client/assets/{use-view-mode-Dtt2tGe0.js → use-view-mode-CGw-QiCY.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BO12Buo0.js → use-virtual-mcp-CR-YqO8b.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-xNesiXWq.js +1 -0
- package/dist/client/assets/useQueries-D6xq6JyG.js +1 -0
- package/dist/client/assets/{useRouterState-Sf-Gnpuq.js → useRouterState-CVZzkhif.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C5U_Hj6n.js +1 -0
- package/dist/client/assets/{users-C1aTmE5Y.js → users-DN9egflf.js} +1 -1
- package/dist/client/assets/{variant-calendar-D_jp21Fc.js → variant-calendar-CAMwNx5g.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-CdCRem0B.js → view-mode-toggle-CLNasoHP.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +2 -2
- package/package.json +1 -1
- package/dist/client/assets/app-editor-CdS1tGJ2.js +0 -1
- package/dist/client/assets/bulk-category-panel-7Z7LJBC2.js +0 -1
- package/dist/client/assets/category-editor-DHD2RkWu.js +0 -1
- package/dist/client/assets/commerce-onboarding-BkltthW8.js +0 -1
- package/dist/client/assets/file-explorer-Dd9gHOUu.js +0 -2
- package/dist/client/assets/github-repo-picker-Cy6gXTqi.js +0 -1
- package/dist/client/assets/index-BqJMq6o8.js +0 -1
- package/dist/client/assets/index-C-7MA5rL.js +0 -8
- package/dist/client/assets/page-seo-sheet-CMU3RR2I.js +0 -1
- package/dist/client/assets/post-editor-BYA6kioK.js +0 -1
- package/dist/client/assets/project-app-view-CaeNKaZB.js +0 -1
- package/dist/client/assets/record-editor-3_i-4UK5.js +0 -1
- package/dist/client/assets/redirect-editor-C87YqCVU.js +0 -1
- package/dist/client/assets/registry-Xj97xqvk.js +0 -2
- package/dist/client/assets/self-tool-result-DgDO0CYL.js +0 -1
- package/dist/client/assets/seo-editor-wLb7dDyd.js +0 -1
- package/dist/client/assets/store-registry-DwtUD-KU.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C3F84whK.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CHz5LFPW.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,d as ie,F as J,b as B,G as Ms,j as s,B as ce,r as G,E as at,H as Ts,v as Ut,a as oe,x as Ps,K as Wt,e as st,q as Y,I as Ge,m as U,J as Ds,M as Es,P as Fs,R as Rs,U as Ls,s as Gs,t as ee,w as Bs,k as Kt,f as ct,u as Be,L as qt,V as Hs,W as Us,X as Ws,n as Ks,Y as qs,O as Vs,Z as Ys}from"./index-CmUMOI85.js";import{u as de,S as dt,a as mt,b as te,c as Q,d as W,e as Vt,f as Xs,g as Yt,h as Qs,i as Ae,j as Js,k as Zs,l as en}from"./sidebar-CCp56Env.js";import{u as ut}from"./use-mobile-Bwjx_QMs.js";import{C as tn,p as Qe,s as sn,b as nn,S as on,d as ln,e as rn,c as an,n as cn}from"./self-tool-result-DgDO0CYL.js";import{f as dn,b as ft,e as pt,g as mn,d as Xt,h as Qt,a as Jt}from"./dialog-CtcL8Rge.js";import{f as un}from"./tab-id-BijBBRwE.js";import{C as fn,W as Zt,g as pn,u as es,S as ts,a as Re,i as hn,b as xn}from"./use-mcp-client-FpSZFiJp.js";import{i as ht}from"./ArrowRight-x5eFsUyE.js";import{S as le}from"./skeleton-BOpN06w4.js";import{i as ss}from"./LayoutLeft-CxYJNTGI.js";import{t as xt}from"./ChevronDown-BU2ru4r_.js";import{T as fe,a as pe,b as he,c as ns}from"./tooltip-DLvHocW9.js";import{u as os,a as gt}from"./use-virtual-mcp-BO12Buo0.js";import{A as be,t as ls,a as gn,i as bn,b as St,c as jn,d as vn,e as is,f as _t,s as yn,g as Sn,h as _n}from"./agent-icon-VQci6jYK.js";import{P as ke,a as He,b as Ue}from"./popover-RUk1Jxx9.js";import{i as Oe}from"./Check-CmXcFUFA.js";import{s as Me}from"./Plus-7RPIQWLb.js";import{i as rs}from"./SearchMd-4O6fg9oW.js";import{s as Cn}from"./XClose-BAfFl7aF.js";import{A as Nn,a as wn,b as kn,c as An,d as In,e as zn,f as $n}from"./alert-dialog-GMDN2a2p.js";import{F as On,a as Mn,b as Tn,c as Pn,d as Dn,e as En,f as Fn}from"./form-B5plGGFv.js";import{I as Rn}from"./input-Cf6f3BmN.js";import{S as Ln,u as Gn,C as Bn}from"./chat-context-B9cQc_h3.js";import{T as je}from"./toolbar-icon-button-Drpylp7y.js";import{D as as,a as cs,b as ds}from"./drawer-C31EzZAL.js";import{G as Hn}from"./use-registry-app-8Rk9qQRz.js";import{G as Un}from"./github-repo-picker-Cy6gXTqi.js";import{u as ms,a as bt,b as Wn,T as Kn}from"./hooks-v_4liDIo.js";import{r as qn,u as jt,f as Vn}from"./shell-layout-_h-q07bi.js";import{u as Yn,g as Xn,a as Qn,b as Jn,S as us}from"./use-navigate-to-agent-Dlk0IC9Q.js";import{g as Zn,a as fs,u as eo,A as to,b as so}from"./use-deco-credits-CPmWdsys.js";import{f as no}from"./reusable-new-chat-CouMjkYR.js";import{A as nt}from"./avatar-DGoq0KTj.js";import{a as ot}from"./Copy01-BzXUnxIt.js";import{n as oo,i as lo}from"./Globe01-Ct1oKJdh.js";import{i as io}from"./ZoomOut-C_3JH0WD.js";import{n as ro}from"./LinkExternal01-CGrGeU4Q.js";import{i as Ct,a as ao}from"./ZapSquare-DkWTs6ms.js";import{i as lt}from"./Monitor01-C6zpq4qC.js";import{n as co,a as mo}from"./Sun-CkVbwhKo.js";import{a as We}from"./Settings02-DU8SxETa.js";import{i as uo}from"./Shield01-oWOP2zLR.js";import{a as fo}from"./Users03-CQdAxDaw.js";import{u as po}from"./use-deployment-admin-CzIxD_pk.js";import"./index-yINFUQcR.js";import{a as ps}from"./XCircle-CANBtGHI.js";import{I as hs}from"./invite-member-dialog-DHMIvCZa.js";import{u as Nt}from"./use-copy-_PBbl_ae.js";import{m as ho,u as xo,c as go}from"./use-api-keys-dCJwGqEj.js";import{v as bo,C as wt}from"./connect-desktop-dialog-dbCJQTWC.js";import{u as Ke}from"./use-organization-settings-CNDPvDWL.js";import{i as jo}from"./FilterLines-Dw3b3U6U.js";import{T as vo,a as yo}from"./toggle-group-DSJnwILX.js";import{C as So,a as _o,b as Co,c as No,d as wo}from"./command-BOlKzV0V.js";import{u as xs}from"./studio-tools-BVRXDcEz.js";import{i as gs}from"./Zap-YiLxlwec.js";import{S as bs,M as ko}from"./shell-controls-B8ZbVsnA.js";import{n as Ao}from"./Stars02-C3tFxKGI.js";import{g as Io,u as zo,S as $o}from"./use-clock-tick-DeftYEin.js";import{a as Oo}from"./format-time-BnbuEtat.js";import{i as Mo}from"./ChevronRight-BLHTQ9Db.js";import{T as Z}from"./toolbar-XFnqI6aL.js";import"./X-CAmHDMPk.js";import"./integration-icon-dAGuZlLn.js";import"./Tool02-BQUR2DKB.js";import"./CheckCircle-GzoutZzh.js";import"./companions-core-oBQaybV8.js";import"./extract-connection-data--_aU5sYg.js";import"./github-repo-scope-DjMZbiKa.js";import"./Eye-DZiWXjzc.js";import"./use-debounced-value-RZv6Czrq.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./authenticate-and-persist-oauth-B6DLU1uJ.js";import"./mcp-oauth-DUnhZRN8.js";import"./auth-D3hjVX0I.js";import"./ArrowUpRight-Bjz3wM7_.js";import"./AlertCircle-C_nk91tH.js";import"./Tool01-DE3j460t.js";import"./ArrowUp-B_NkVhQy.js";import"./TrendUp01-Ddu99xHU.js";import"./ChevronUp-3FMqPib6.js";import"./DotsVertical-BXRC3vMY.js";import"./Star01-kfwc8V_o.js";import"./Globe04-BiqYhKIv.js";import"./SwitchHorizontal01-BP51S8DS.js";import"./HardDrive-DV_SLLYZ.js";import"./Image01-BoP1xUXy.js";import"./Key01-C1HipuOz.js";import"./Package-nklzvxt3.js";import"./Palette-vt3KT1N3.js";import"./Play-C8mWR1Az.js";import"./SearchLg-CWLjZme7.js";import"./Stars01-C1l0RlUa.js";import"./Trash01-cB1sS901.js";import"./Upload01-CYVHio4I.js";import"./User01-CtR14f1U.js";import"./Users01-BqyJARKJ.js";import"./label-VkdXgHd7.js";import"./autosend-CrLNAcK4.js";import"./use-ai-providers-DB0PWqc_.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-Bp76K5aB.js";import"./decopilot-sse-pool-DNUfg0HV.js";import"./backoff-CrEUbyZT.js";import"./use-mcp-tools-Bfgi1tbs.js";import"./collection-search-tV8cd3K2.js";import"./use-connection-BvbWEpu1.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-Bw_23wtD.js";import"./use-org-sso-BhLu2IJL.js";import"./connection-card-NrIXzO1v.js";import"./use-registry-connections-Bp9WZcYU.js";import"./useInfiniteQuery-C3F84whK.js";import"./use-infinite-scroll-UBZNLC2q.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-DeRX92PE.js";import"./select-DQl8Nkd-.js";import"./textarea-PL3tBRfL.js";import"./connection-form-helpers-Dq97qH29.js";import"./collection-tabs-CORSMF6h.js";import"./badge-ICotptLx.js";import"./useSuspenseInfiniteQuery-CHz5LFPW.js";import"./use-org-auth-client-B6uCBHg4.js";import"./use-organization-roles-DRWNxAn0.js";import"./index-82forbXV.js";import"./differenceInSeconds-NQ4PDo0z.js";function To(t){const e=z.c(22),{siteUrl:n}=t,l=ie(),{org:o}=J(),i=B();let r;e[0]!==l||e[1]!==o.id||e[2]!==o.slug?(r=()=>{localStorage.setItem(Ms.sidebarOpen(),JSON.stringify(!1)),l({to:"/$org/$taskId",params:{org:o.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:pn(o.id),main:un(Zt.COMMERCE_DISCOVERY(o.id),fn),sidepanel:0}})},e[0]=l,e[1]=o.id,e[2]=o.slug,e[3]=r):r=e[3];const a=r;let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(dn,{className:"bg-black/15 backdrop-blur-sm"}),e[4]=d):d=e[4];let c;e[5]!==i?(c=i("routes.commerceOnboarding.connectModal.dialogTitle"),e[5]=i,e[6]=c):c=e[6];let m;e[7]!==c?(m=s.jsx(ft,{className:"sr-only",children:c}),e[7]=c,e[8]=m):m=e[8];let u;e[9]!==a||e[10]!==i?(u=()=>s.jsxs("div",{className:"grid gap-4 p-6",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:i("routes.commerceOnboarding.connectModal.loadError")}),s.jsxs(ce,{type:"button",size:"xl",className:"w-full",onClick:a,children:[i("routes.commerceOnboarding.connectModal.continueButton"),s.jsx(ht,{size:18})]})]}),e[9]=a,e[10]=i,e[11]=u):u=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(tn,{}),e[12]=f):f=e[12];let p;e[13]!==a||e[14]!==n?(p=s.jsx(G.Suspense,{fallback:f,children:s.jsx(Fo,{siteUrlFromUrl:n,onComplete:a})}),e[13]=a,e[14]=n,e[15]=p):p=e[15];let h;e[16]!==u||e[17]!==p?(h=s.jsx(at,{fallback:u,children:p}),e[16]=u,e[17]=p,e[18]=h):h=e[18];let g;return e[19]!==m||e[20]!==h?(g=s.jsx(pt,{open:!0,children:s.jsxs(mn,{children:[d,s.jsxs(Ts,{"data-slot":"commerce-connect-modal",onEscapeKeyDown:Eo,onPointerDownOutside:Do,onInteractOutside:Po,className:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 flex h-[calc(100dvh-1rem)] w-full max-w-[calc(100%-1rem)] translate-x-[-50%] translate-y-[-50%] flex-col overflow-hidden rounded-2xl border p-0 shadow-md duration-200 sm:max-w-lg md:h-auto md:max-h-[calc(100dvh-2rem)] lg:max-h-[calc(100dvh-4rem)] lg:max-w-5xl",children:[m,h]})]})}),e[19]=m,e[20]=h,e[21]=g):g=e[21],g}function Po(t){return t.preventDefault()}function Do(t){return t.preventDefault()}function Eo(t){return t.preventDefault()}function Fo({siteUrlFromUrl:t,onComplete:e}){const n=B(),[l]=Ut(),{org:o}=J(),{data:i}=oe.useSession(),r=Zt.COMMERCE_DISCOVERY(o.id),a=es({connectionId:ts,orgId:o.id,orgSlug:o.slug}),c=Ps({queryKey:Wt.commerceDiscoveryConnection(o.id,r),queryFn:async()=>{const v=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:r}});return Qe(v)},retry:!1}).data.item,m=typeof c?.metadata?.siteUrl=="string"?c.metadata.siteUrl:void 0,u=t||m,f=sn(u),[p,h]=G.useState(!0),[g,x]=G.useState(null),b=st({mutationFn:async v=>Qe(await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:v}})),retry:!1}),j=st({mutationFn:async v=>Qe(await a.callTool({name:"COMMERCE_DISCOVERY_RUN",arguments:{siteUrl:v}})),retry:!1}),S=nn({siteUrl:u,email:i?.user?.email,locale:l.language}),y=async()=>{x(null),Y("commerce_onboarding_open_report_clicked",{domain:f??void 0,organization_id:o.id});const v=u?cn(u):null;if(v?.ok)try{let C=await j.mutateAsync(v.value);if(C.triggered||(Y("commerce_onboarding_run_reclaim",{domain:f??void 0,organization_id:o.id,reason:C.reason??"not_upgraded"}),await b.mutateAsync(v.value),C=await j.mutateAsync(v.value)),!C.triggered){Y("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C.reason??"not_triggered"}),x(n("routes.commerceOnboarding.connectModal.couldNotGenerateReport"));return}}catch(C){Y("commerce_onboarding_run_failed",{domain:f??void 0,organization_id:o.id,error:C instanceof Error?C.message:String(C)}),x(n("routes.commerceOnboarding.connectModal.somethingWentWrong"));return}e()};return s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-4 p-4 lg:gap-6 lg:bg-sidebar lg:p-10",children:[f?s.jsx(on,{host:f}):null,s.jsx(ln,{org:o,cdConnectionId:r,siteUrl:u,onReadinessChange:h}),s.jsxs("div",{className:"flex shrink-0 flex-col gap-3",children:[s.jsx(rn,{href:S,orgId:o.id,className:"lg:hidden"}),g?s.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:g}):null,s.jsxs(ce,{type:"button",size:"xl",className:"w-full rounded-2xl text-base font-medium whitespace-normal h-auto py-3",onClick:()=>{y()},disabled:j.isPending||!p,children:[j.isPending?n("routes.commerceOnboarding.connectModal.openingReport"):n(p?"routes.commerceOnboarding.connectModal.viewFullReport":"routes.commerceOnboarding.connectModal.connectToolToContinue"),!j.isPending&&p?s.jsx(ht,{size:18}):null]})]})]}),s.jsx("aside",{className:"hidden lg:flex lg:w-[380px] lg:shrink-0 lg:items-center lg:justify-center lg:overflow-y-auto lg:border-l lg:border-border lg:bg-muted",children:s.jsx(an,{href:S,orgId:o.id})})]})}function Ro(t){const e=z.c(11),{onPointerDown:n,onDoubleClick:l}=t,o=B(),{state:i,isMobile:r}=de();if(r||i==="collapsed")return null;let a;e[0]!==o?(a=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=a):a=e[1];let d;e[2]!==o?(d=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=d):d=e[3];let c,m;e[4]===Symbol.for("react.memo_cache_sentinel")?(c={left:"var(--sidebar-width)"},m=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),e[4]=c,e[5]=m):(c=e[4],m=e[5]);let u;return e[6]!==l||e[7]!==n||e[8]!==a||e[9]!==d?(u=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":a,title:d,onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:c,children:m}),e[6]=l,e[7]=n,e[8]=a,e[9]=d,e[10]=u):u=e[10],u}const vt=240,Lo=400,Go="sidebar.width";function Ie(t){return Math.max(vt,Math.min(Lo,t))}function Bo(){const t=z.c(11),[e,n]=Ge(Go,Ho),l=G.useRef(null);let o;t[0]!==n||t[1]!==e?(o=m=>{m.preventDefault();const u=m.clientX,f=Ie(e),p=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=p?Array.from(p.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const b of h)b.style.transition="none";const g=b=>{const j=Ie(f+(b.clientX-u));p?.style.setProperty("--sidebar-width",`${j}px`)},x=b=>{const j=Ie(f+(b.clientX-u));n(j);for(const S of h)S.style.transition="";window.removeEventListener("pointermove",g),window.removeEventListener("pointerup",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",g),window.addEventListener("pointerup",x)},t[0]=n,t[1]=e,t[2]=o):o=t[2];const i=o;let r;t[3]!==n?(r=()=>{n(vt)},t[3]=n,t[4]=r):r=t[4];const a=r;let d;t[5]!==e?(d=Ie(e),t[5]=e,t[6]=d):d=t[6];let c;return t[7]!==i||t[8]!==a||t[9]!==d?(c={width:d,wrapperRef:l,onStartResize:i,resetWidth:a},t[7]=i,t[8]=a,t[9]=d,t[10]=c):c=t[10],c}function Ho(t){return typeof t=="number"?Ie(t):vt}function js(){return[]}function vs(t){const e=z.c(3),{children:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=l):l=e[0];let o;return e[1]!==n?(o=s.jsxs(dt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(mt,{children:s.jsx(te,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=o):o=e[2],o}function ys(t){const e=z.c(18),{item:n}=t,{isMobile:l,setOpenMobile:o}=de();let i;e[0]!==l||e[1]!==n||e[2]!==o?(i=()=>{Y("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&o(!1)},e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3];const r=i,a=n.key,d=n.isActive&&"z-10";let c;e[4]!==d?(c=U(d),e[4]=d,e[5]=c):c=e[5];let m;e[6]!==n.label?(m=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=m):m=e[7];let u;e[8]!==r||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==m?(u=s.jsxs(Q,{onClick:r,isActive:n.isActive,tooltip:n.label,children:[n.icon,m]}),e[8]=r,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=m,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(W,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Uo(t){const e=z.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Vt,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=n.group.label,o=n.group.defaultExpanded;let i;e[2]!==n.group.items?(i=n.group.items.map(Ko),e[2]=n.group.items,e[3]=i):i=e[3];let r;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==i?(r=s.jsx(vs,{label:l,defaultExpanded:o,children:i}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=i,e[7]=r):r=e[7],r}case"items":{let l;e[8]!==n.items?(l=n.items.map(Wo),e[8]=n.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(dt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(mt,{children:s.jsx(te,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}case"custom":return n.content}}function Wo(t){return s.jsx(ys,{item:t},t.key)}function Ko(t){return s.jsx(ys,{item:t},t.key)}function qo(t){const e=z.c(17),{sections:n,footer:l,additionalContent:o,header:i,variant:r,contentClassName:a}=t,d=r===void 0?"sidebar":r;let c;e[0]!==i?(c=i&&s.jsx(Xs,{className:"sidebar-titlebar wco-drag shrink-0 h-12 flex flex-row items-center px-2 py-0 group-data-[collapsible=icon]/sidebar:hidden",children:i}),e[0]=i,e[1]=c):c=e[1];let m;e[2]!==a?(m=U("flex flex-col flex-1 px-2 pb-2 gap-0.5",a),e[2]=a,e[3]=m):m=e[3];let u;e[4]!==n?(u=n.map(Vo),e[4]=n,e[5]=u):u=e[5];let f;e[6]!==o?(f=o&&s.jsx("div",{className:"flex flex-col flex-1 min-h-0 group-data-[state=collapsed]/sidebar:mt-1 group-data-[state=expanded]/sidebar:mt-2",children:o}),e[6]=o,e[7]=f):f=e[7];let p;e[8]!==m||e[9]!==u||e[10]!==f?(p=s.jsxs(Yt,{className:m,children:[u,f]}),e[8]=m,e[9]=u,e[10]=f,e[11]=p):p=e[11];let h;return e[12]!==l||e[13]!==c||e[14]!==p||e[15]!==d?(h=s.jsxs(Qs,{variant:d,children:[c,p,l]}),e[12]=l,e[13]=c,e[14]=p,e[15]=d,e[16]=h):h=e[16],h}function Vo(t,e){return s.jsx(Uo,{section:t},e)}function Ss(t){const e=z.c(2);let n;return e[0]!==t?(n=s.jsx(qo,{...t}),e[0]=t,e[1]=n):n=e[1],n}Ss.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(le,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function kt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Yo=Ds({name:Es().min(2,"Organization name is required")});function Xo(t){const e=z.c(66),{open:n,onOpenChange:l}=t,o=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Fs(Yo),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Rs(i);let a;e[1]!==o?(a=async D=>{const T=kt(D.name);if(!T)throw new Error(o("common.createOrganizationDialog.invalidSlug"));const E=await oe.organization.create({name:D.name,slug:T});if(E?.error)throw new Error(E.error.message||o("common.createOrganizationDialog.failedToCreate"));const H=E?.data?.slug??T;if(!H)throw new Error(o("common.createOrganizationDialog.failedToCreate"));return{orgSlug:H}},e[1]=o,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=Qo,e[3]=d):d=e[3];let c;e[4]!==a?(c={mutationFn:a,onSuccess:d},e[4]=a,e[5]=c):c=e[5];const m=st(c);let u;e[6]!==m.error||e[7]!==o?(u=m.error instanceof Error?m.error.message:m.error?o("common.createOrganizationDialog.failedToCreateGeneric"):null,e[6]=m.error,e[7]=o,e[8]=u):u=e[8];const f=u;let p;e[9]!==o?(p=o("common.createOrganizationDialog.title"),e[9]=o,e[10]=p):p=e[10];let h;e[11]!==p?(h=s.jsx(Nn,{children:p}),e[11]=p,e[12]=h):h=e[12];let g;e[13]!==o?(g=o("common.createOrganizationDialog.description"),e[13]=o,e[14]=g):g=e[14];let x;e[15]!==g?(x=s.jsx(wn,{children:g}),e[15]=g,e[16]=x):x=e[16];let b;e[17]!==h||e[18]!==x?(b=s.jsxs(kn,{children:[h,x]}),e[17]=h,e[18]=x,e[19]=b):b=e[19];let j;if(e[20]!==m||e[21]!==r){let D;e[23]!==m?(D=T=>m.mutateAsync(T),e[23]=m,e[24]=D):D=e[24],j=r.handleSubmit(D),e[20]=m,e[21]=r,e[22]=j}else j=e[22];let S;e[25]!==r.formState.isSubmitting||e[26]!==o?(S=D=>{const{field:T}=D;return s.jsxs(Tn,{children:[s.jsx(Pn,{children:o("common.createOrganizationDialog.nameLabel")}),s.jsx(Dn,{children:s.jsx(Rn,{...T,placeholder:o("common.createOrganizationDialog.namePlaceholder"),disabled:r.formState.isSubmitting})}),s.jsx(En,{children:o("common.createOrganizationDialog.nameDescription")}),T.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[o("common.createOrganizationDialog.urlLabel")," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",kt(T.value)]})]}),s.jsx(Fn,{})]})},e[25]=r.formState.isSubmitting,e[26]=o,e[27]=S):S=e[27];let y;e[28]!==r.control||e[29]!==S?(y=s.jsx(On,{control:r.control,name:"name",render:S}),e[28]=r.control,e[29]=S,e[30]=y):y=e[30];let v;e[31]!==f?(v=f&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:f}),e[31]=f,e[32]=v):v=e[32];const C=r.formState.isSubmitting;let N;e[33]!==m||e[34]!==r?(N=()=>{m.reset(),r.reset()},e[33]=m,e[34]=r,e[35]=N):N=e[35];let _;e[36]!==o?(_=o("common.createOrganizationDialog.cancel"),e[36]=o,e[37]=_):_=e[37];let w;e[38]!==r.formState.isSubmitting||e[39]!==N||e[40]!==_?(w=s.jsx(An,{disabled:C,onClick:N,children:_}),e[38]=r.formState.isSubmitting,e[39]=N,e[40]=_,e[41]=w):w=e[41];const I=!r.formState.isValid||r.formState.isSubmitting;let $;e[42]!==r.formState.isSubmitting||e[43]!==o?($=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Ln,{size:"xs"})," ",o("common.createOrganizationDialog.creating")]}):o("common.createOrganizationDialog.createButton"),e[42]=r.formState.isSubmitting,e[43]=o,e[44]=$):$=e[44];let k;e[45]!==I||e[46]!==$?(k=s.jsx(ce,{type:"submit",variant:"default",disabled:I,children:$}),e[45]=I,e[46]=$,e[47]=k):k=e[47];let O;e[48]!==w||e[49]!==k?(O=s.jsxs(In,{children:[w,k]}),e[48]=w,e[49]=k,e[50]=O):O=e[50];let A;e[51]!==j||e[52]!==y||e[53]!==v||e[54]!==O?(A=s.jsxs("form",{className:"space-y-6",onSubmit:j,autoComplete:"off",children:[y,v,O]}),e[51]=j,e[52]=y,e[53]=v,e[54]=O,e[55]=A):A=e[55];let M;e[56]!==r||e[57]!==A?(M=s.jsx(Mn,{...r,children:A}),e[56]=r,e[57]=A,e[58]=M):M=e[58];let F;e[59]!==b||e[60]!==M?(F=s.jsxs(zn,{children:[b,M]}),e[59]=b,e[60]=M,e[61]=F):F=e[61];let R;return e[62]!==l||e[63]!==n||e[64]!==F?(R=s.jsx($n,{open:n,onOpenChange:l,children:F}),e[62]=l,e[63]=n,e[64]=F,e[65]=R):R=e[65],R}function Qo(t){const{orgSlug:e}=t;window.location.href=`/${e}`}function _s(){const t=G.useContext(Ls),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date),refetch:()=>n?.()}}function Jo(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function qe(t){const e=z.c(13),{org:n,size:l}=t,o=l===void 0?"sm":l,i=o==="xs"?"size-5":"size-6",r=o==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=U(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let d;e[2]!==n.logo||e[3]!==n.name?(d=n.logo?void 0:Jo(n.name),e[2]=n.logo,e[3]=n.name,e[4]=d):d=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==r?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:U("font-semibold leading-none",r),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=r,e[8]=c):c=e[8];let m;return e[9]!==a||e[10]!==d||e[11]!==c?(m=s.jsx("div",{className:a,style:d,children:c}),e[9]=a,e[10]=d,e[11]=c,e[12]=m):m=e[12],m}function Zo({invitation:t,onChanged:e}){const n=B(),[l,o]=G.useState(!1),i=t.organizationName??n("header.orgSwitcher.unknownOrganization"),r=async()=>{o(!0);try{const c=await oe.organization.acceptInvitation({invitationId:t.id});if(c.error){ee.error(c.error.message),o(!1);return}}catch{ee.error(n("header.orgSwitcher.failedToAcceptInvitation")),o(!1);return}ee.success(n("header.orgSwitcher.joined",{name:i})),Bs();let d;try{d=(await oe.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=d?`/${d}`:"/"},a=async()=>{o(!0);try{const d=await oe.organization.rejectInvitation({invitationId:t.id});if(d.error){ee.error(d.error.message),o(!1);return}ee.success(n("header.orgSwitcher.invitationDeclined")),o(!1),e()}catch{ee.error(n("header.orgSwitcher.failedToDeclineInvitation")),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 rounded-md border border-dashed border-border px-3 py-2.5",children:[s.jsx(qe,{org:{name:i},size:"sm"}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"truncate text-sm font-medium",children:i}),s.jsx("p",{className:"truncate text-xs text-muted-foreground",children:n("header.orgSwitcher.invitedToJoin")})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(ce,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:l,children:n("header.orgSwitcher.accept")}),s.jsx(ce,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:a,disabled:l,"aria-label":n("header.orgSwitcher.declineInvitationTo",{name:i}),children:s.jsx(Cn,{size:14})})]})]})}function el(t){const e=z.c(32),{orgParam:n,onSelectOrg:l,onCreateOrg:o}=t,i=B(),{data:r}=Gs(),{invitations:a,refetch:d}=_s();let c;e[0]!==n?(c=(A,M)=>A.slug===n?-1:M.slug===n?1:A.name.localeCompare(M.name),e[0]=n,e[1]=c):c=e[1];const m=[...r??[]].sort(c),[u,f]=G.useState(""),p=u.toLowerCase(),h=p?m.filter(A=>A.name.toLowerCase().includes(p)||A.slug.toLowerCase().includes(p)):m;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=g):g=e[2];let x;e[3]===Symbol.for("react.memo_cache_sentinel")?(x=A=>f(A.target.value),e[3]=x):x=e[3];let b;e[4]!==u?(b=A=>A.key==="Escape"&&u&&f(""),e[4]=u,e[5]=b):b=e[5];let j;e[6]!==i?(j=i("header.orgSwitcher.searchOrganizations"),e[6]=i,e[7]=j):j=e[7];let S;e[8]!==u||e[9]!==b||e[10]!==j?(S=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:u,onChange:x,onKeyDown:b,placeholder:j,className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[8]=u,e[9]=b,e[10]=j,e[11]=S):S=e[11];let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Me,{size:16}),e[12]=y):y=e[12];let v;e[13]!==o?(v=s.jsx("button",{type:"button",onClick:o,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:y}),e[13]=o,e[14]=v):v=e[14];let C;e[15]!==S||e[16]!==v?(C=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[g,S,v]}),e[15]=S,e[16]=v,e[17]=C):C=e[17];const N="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let _;e[18]!==a||e[19]!==u||e[20]!==d?(_=!u&&a.map(A=>s.jsx(Zo,{invitation:A,onChanged:d},A.id)),e[18]=a,e[19]=u,e[20]=d,e[21]=_):_=e[21];const w=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:u?i("header.orgSwitcher.noOrganizationsMatch",{query:u}):i("header.orgSwitcher.noOrganizationsAvailable")});let I;e[22]!==l||e[23]!==n?(I=A=>s.jsxs("button",{type:"button",onClick:()=>l(A.slug),className:U("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",A.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(qe,{org:A,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:A.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:A.slug})]}),A.slug===n&&s.jsx(Oe,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},A.id),e[22]=l,e[23]=n,e[24]=I):I=e[24];const $=h.map(I);let k;e[25]!==_||e[26]!==w||e[27]!==$?(k=s.jsxs("div",{className:N,children:[_,w,$]}),e[25]=_,e[26]=w,e[27]=$,e[28]=k):k=e[28];let O;return e[29]!==k||e[30]!==C?(O=s.jsxs(s.Fragment,{children:[C,k]}),e[29]=k,e[30]=C,e[31]=O):O=e[31],O}function Cs(t){const e=z.c(22),{trigger:n,orgParam:l,align:o,side:i}=t,r=o===void 0?"start":o,a=i===void 0?"bottom":i,d=ie(),[c,m]=G.useState(!1),[u,f]=G.useState(!1);let p;e[0]!==n?(p=s.jsx(ke,{asChild:!0,children:n}),e[0]=n,e[1]=p):p=e[1];const h=String(c);let g;e[2]!==d?(g=C=>{m(!1),d({to:"/$org",params:{org:C}})},e[2]=d,e[3]=g):g=e[3];let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=()=>{m(!1),f(!0)},e[4]=x):x=e[4];let b;e[5]!==l||e[6]!==h||e[7]!==g?(b=s.jsx(el,{orgParam:l,onSelectOrg:g,onCreateOrg:x},h),e[5]=l,e[6]=h,e[7]=g,e[8]=b):b=e[8];let j;e[9]!==r||e[10]!==a||e[11]!==b?(j=s.jsx(He,{side:a,align:r,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:sl,onCloseAutoFocus:tl,children:b}),e[9]=r,e[10]=a,e[11]=b,e[12]=j):j=e[12];let S;e[13]!==c||e[14]!==p||e[15]!==j?(S=s.jsxs(Ue,{open:c,onOpenChange:m,children:[p,j]}),e[13]=c,e[14]=p,e[15]=j,e[16]=S):S=e[16];let y;e[17]!==u?(y=s.jsx(Xo,{open:u,onOpenChange:f}),e[17]=u,e[18]=y):y=e[18];let v;return e[19]!==y||e[20]!==S?(v=s.jsxs(s.Fragment,{children:[S,y]}),e[19]=y,e[20]=S,e[21]=v):v=e[21],v}function tl(t){return t.preventDefault()}function sl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function nl(t){const e=z.c(21),{value:n,onChange:l,placeholder:o,onKeyDown:i,className:r,isSearching:a,disabled:d}=t,c=o===void 0?"Search...":o;let m;e[0]!==r?(m=U("shrink-0 w-full border-b border-border h-12",r),e[0]=r,e[1]=m):m=e[1];const u=d?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=U("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let p;e[4]!==a?(p=a?s.jsx(Kt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(rs,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=p):p=e[5];let h;e[6]!==l?(h=j=>l(j.target.value),e[6]=l,e[7]=h):h=e[7];let g;e[8]!==d||e[9]!==i||e[10]!==c||e[11]!==h||e[12]!==n?(g=s.jsx("input",{type:"text",value:n,onChange:h,onKeyDown:i,placeholder:c,disabled:d,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=d,e[9]=i,e[10]=c,e[11]=h,e[12]=n,e[13]=g):g=e[13];let x;e[14]!==f||e[15]!==p||e[16]!==g?(x=s.jsxs("label",{className:f,children:[p,g]}),e[14]=f,e[15]=p,e[16]=g,e[17]=x):x=e[17];let b;return e[18]!==m||e[19]!==x?(b=s.jsx("div",{className:m,children:x}),e[18]=m,e[19]=x,e[20]=b):b=e[20],b}function ol(t){const e=z.c(6),{value:n,onChange:l}=t,o=B();let i;e[0]!==o?(i=o("sidebar.agentsSection.searchAgents"),e[0]=o,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i||e[4]!==n?(r=s.jsx(nl,{value:n,onChange:l,placeholder:i}),e[2]=l,e[3]=i,e[4]=n,e[5]=r):r=e[5],r}function ll(){const t=z.c(4),e=B();let n;t[0]!==e?(n=e("sidebar.agentsSection.noAgentsFound"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:n}),t[2]=n,t[3]=l):l=t[3],l}function il(t){const e=z.c(10),{org:n,onClose:l}=t,o=B();let i;e[0]!==n.slug?(i={org:n.slug},e[0]=n.slug,e[1]=i):i=e[1];let r;e[2]!==l?(r=()=>l(),e[2]=l,e[3]=r):r=e[3];let a;e[4]!==o?(a=o("sidebar.agentsSection.seeAllAgents"),e[4]=o,e[5]=a):a=e[5];let d;return e[6]!==i||e[7]!==r||e[8]!==a?(d=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(qt,{to:"/$org/settings/agents",params:i,onClick:r,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:a})}),e[6]=i,e[7]=r,e[8]=a,e[9]=d):d=e[9],d}function rl(){const t=z.c(4),e=B();let n;t[0]!==e?(n=e("sidebar.agentsSection.agents"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx(Ns,{children:n}),t[2]=n,t[3]=l):l=t[3],l}function al(t){const e=z.c(11),{onImportFromGithub:n}=t,l=B();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Hn,{className:"size-3.5"}),e[0]=o):o=e[0];let i;e[1]!==l?(i=l("sidebar.agentsSection.import"),e[1]=l,e[2]=i):i=e[2];let r;e[3]!==n||e[4]!==i?(r=s.jsxs("button",{type:"button",onClick:n,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:[o,i]}),e[3]=n,e[4]=i,e[5]=r):r=e[5];let a;e[6]!==l?(a=l("sidebar.agentsSection.codeAgents"),e[6]=l,e[7]=a):a=e[7];let d;return e[8]!==r||e[9]!==a?(d=s.jsx(Ns,{action:r,children:a}),e[8]=r,e[9]=a,e[10]=d):d=e[10],d}function cl(t){const e=z.c(11),{setOpen:n,emptyCtaClass:l}=t,o=B();let i;e[0]!==o?(i=o("sidebar.agentsSection.browseAgents"),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==l?(r=U(l),e[2]=l,e[3]=r):r=e[3];let a;e[4]!==n?(a=()=>{Y("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[4]=n,e[5]=a):a=e[5];let d;e[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Me,{className:"size-4"}),e[6]=d):d=e[6];let c;return e[7]!==i||e[8]!==r||e[9]!==a?(c=s.jsx(je,{"aria-label":i,className:r,onClick:a,children:d}),e[7]=i,e[8]=r,e[9]=a,e[10]=c):c=e[10],c}function dl(t){const e=z.c(17),{setOpen:n,highlightEmpty:l,emptyCtaClass:o}=t,i=B();let r;e[0]!==l||e[1]!==i?(r=l?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=l,e[1]=i,e[2]=r):r=e[2];let a;e[3]!==o?(a=U(o),e[3]=o,e[4]=a):a=e[4];let d;e[5]!==n?(d=()=>{Y("agent_browser_opened",{surface:"mobile_drawer"}),n(!0)},e[5]=n,e[6]=d):d=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Me,{}),e[7]=c):c=e[7];let m;e[8]!==i?(m=i("sidebar.agentsSection.newAgent"),e[8]=i,e[9]=m):m=e[9];let u;e[10]!==m?(u=s.jsx("span",{children:m}),e[10]=m,e[11]=u):u=e[11];let f;return e[12]!==r||e[13]!==a||e[14]!==d||e[15]!==u?(f=s.jsx(W,{children:s.jsxs(Q,{tooltip:r,className:a,onClick:d,children:[c,u]})}),e[12]=r,e[13]=a,e[14]=d,e[15]=u,e[16]=f):f=e[16],f}function ml(){const t=z.c(4),e=B();let n;t[0]!==e?(n=e("sidebar.agentsSection.browseAgents"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx(ds,{className:"sr-only",children:n}),t[2]=n,t[3]=l):l=t[3],l}function ul(t){const e=z.c(8),{emptyCtaClass:n}=t,l=B();let o;e[0]!==l?(o=l("sidebar.agentsSection.browseAgents"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==n?(i=U(n),e[2]=n,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Me,{className:"size-4"}),e[4]=r):r=e[4];let a;return e[5]!==o||e[6]!==i?(a=s.jsx(je,{"aria-label":o,className:i,children:r}),e[5]=o,e[6]=i,e[7]=a):a=e[7],a}function fl(t){const e=z.c(19),{wrapEmptyHint:n,highlightEmpty:l,emptyCtaClass:o}=t,i=B();let r;e[0]!==l||e[1]!==i?(r=l?void 0:i("sidebar.agentsSection.browseAgents"),e[0]=l,e[1]=i,e[2]=r):r=e[2];let a;e[3]!==o?(a=U(o),e[3]=o,e[4]=a):a=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Me,{}),e[5]=d):d=e[5];let c;e[6]!==i?(c=i("sidebar.agentsSection.newAgent"),e[6]=i,e[7]=c):c=e[7];let m;e[8]!==c?(m=s.jsx("span",{children:c}),e[8]=c,e[9]=m):m=e[9];let u;e[10]!==r||e[11]!==a||e[12]!==m?(u=s.jsx(ke,{asChild:!0,children:s.jsxs(Q,{tooltip:r,className:a,children:[d,m]})}),e[10]=r,e[11]=a,e[12]=m,e[13]=u):u=e[13];let f;e[14]!==u||e[15]!==n?(f=n(u),e[14]=u,e[15]=n,e[16]=f):f=e[16];let p;return e[17]!==f?(p=s.jsx(W,{children:f}),e[17]=f,e[18]=p):p=e[18],p}function pl(t){const e=z.c(9),{children:n}=t,l=B();let o;e[0]!==n?(o=s.jsx(fe,{asChild:!0,children:n}),e[0]=n,e[1]=o):o=e[1];let i;e[2]!==l?(i=l("sidebar.agentsSection.selectAnExistingAgent"),e[2]=l,e[3]=i):i=e[3];let r;e[4]!==i?(r=s.jsx(pe,{side:"right",sideOffset:8,children:i}),e[4]=i,e[5]=r):r=e[5];let a;return e[6]!==o||e[7]!==r?(a=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[o,r]}),e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function hl(t){const e=ie(),{create:n}=ms(),{locator:l}=J(),o=ct({strict:!1}),i=Be({strict:!1});return async r=>{const a=crypto.randomUUID(),d=r===i.virtualmcpid?qn(t,l,o.taskId??""):null;try{await n({id:a,virtual_mcp_id:r,...d?{branch:d}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:r}})}}function Je(t){const e=z.c(20),{agent:n,selected:l,onClick:o}=t,i=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let r;e[0]!==i?(r=U("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]=r):r=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(be,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[2]=n.icon,e[3]=n.title,e[4]=a):a=e[4];let d;e[5]!==n.title?(d=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=d):d=e[6];let c;e[7]!==n.description?(c=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.description}),e[7]=n.description,e[8]=c):c=e[8];let m;e[9]!==d||e[10]!==c?(m=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,c]}),e[9]=d,e[10]=c,e[11]=m):m=e[11];let u;e[12]!==l?(u=l&&s.jsx(Oe,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==o||e[15]!==r||e[16]!==a||e[17]!==m||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m,u]}),e[14]=o,e[15]=r,e[16]=a,e[17]=m,e[18]=u,e[19]=f):f=e[19],f}function Ns(t){const e=z.c(5),{children:n,action:l}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==o?(i=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[o,l]}),e[2]=l,e[3]=o,e[4]=i):i=e[4],i}function xl(t){const e=z.c(23),{onClose:n,onSelectAgent:l,selectedAgentId:o,onImportFromGithub:i}=t,[r,a]=G.useState(""),d=os(),c=d??[],{org:m}=J(),{data:u}=oe.useSession(),f=u?.user?.id??"anon",p=Xn(d),h=Qn(),g=hl(m.slug),x=Zn(d),b=r.toLowerCase(),j=c.filter(vl).filter(L=>!x.has(L.id)).filter(jl).filter(L=>!r||L.title.toLowerCase().includes(b)),S=j.filter(bl),y=j.filter(gl),v=Re(m.id),C=!r||v.title.toLowerCase().includes(b),N=!!(l&&C);let _;e[0]!==n||e[1]!==l?(_=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=_):_=e[2];const w=_,I=L=>{if(l){l(L.id),n(),a("");return}Jn({orgId:m.id,userId:f},L.id,p),h(),n(),a(""),g(L.id)},$="flex flex-col max-h-[min(640px,80dvh)]";let k;e[3]!==r?(k=s.jsx(ol,{value:r,onChange:a}),e[3]=r,e[4]=k):k=e[4];const O="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",A=l&&C&&v&&s.jsx(Je,{agent:v,selected:!o||o===v.id,onClick:w}),M=(S.length>0||!r)&&s.jsx(al,{onImportFromGithub:i}),F=S.map(L=>s.jsx(Je,{agent:L,selected:l?o===L.id:void 0,onClick:()=>I(L)},L.id)),R=y.length>0&&s.jsx(rl,{}),D=y.map(L=>s.jsx(Je,{agent:L,selected:l?o===L.id:void 0,onClick:()=>I(L)},L.id));let T;e[5]!==N||e[6]!==r||e[7]!==j.length?(T=j.length===0&&!N&&r&&s.jsx(ll,{}),e[5]=N,e[6]=r,e[7]=j.length,e[8]=T):T=e[8];let E;e[9]!==T||e[10]!==A||e[11]!==M||e[12]!==F||e[13]!==R||e[14]!==D?(E=s.jsxs("div",{className:O,children:[A,M,F,R,D,T]}),e[9]=T,e[10]=A,e[11]=M,e[12]=F,e[13]=R,e[14]=D,e[15]=E):E=e[15];let H;e[16]!==n||e[17]!==m?(H=s.jsx(il,{org:m,onClose:n}),e[16]=n,e[17]=m,e[18]=H):H=e[18];let q;return e[19]!==E||e[20]!==H||e[21]!==k?(q=s.jsxs("div",{className:$,children:[k,E,H]}),e[19]=E,e[20]=H,e[21]=k,e[22]=q):q=e[22],q}function gl(t){return!fs(t.metadata)}function bl(t){return fs(t.metadata)}function jl(t){return!xn(t.id)}function vl(t){return!hn(t.id)}function yl(t){const e=z.c(31);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{compact:l,trigger:o,onSelectAgent:i,selectedAgentId:r,side:a,align:d}=n,c=l===void 0?!1:l,m=a===void 0?"right":a,u=d===void 0?"start":d,[f,p]=G.useState(!1),[h,g]=G.useState(!1),x=ut(),{setOpenMobile:b}=de(),j=Yn(),S=j?"border border-border":void 0;let y;e[2]!==j?(y=M=>j?s.jsx(pl,{children:M}):M,e[2]=j,e[3]=y):y=e[3];const v=y;let C;e[4]!==x||e[5]!==b?(C=()=>{p(!1),x&&b(!1)},e[4]=x,e[5]=b,e[6]=C):C=e[6];const N=C;let _;e[7]!==N?(_=()=>{N(),g(!0)},e[7]=N,e[8]=_):_=e[8];const w=_;let I;e[9]!==N||e[10]!==w||e[11]!==i||e[12]!==f||e[13]!==r?(I=f&&s.jsx(G.Suspense,{fallback:s.jsx("div",{className:"flex items-center justify-center py-8",children:s.jsx(le,{className:"h-4 w-24"})}),children:s.jsx(xl,{onClose:N,onSelectAgent:i,selectedAgentId:r,onImportFromGithub:w})}),e[9]=N,e[10]=w,e[11]=i,e[12]=f,e[13]=r,e[14]=I):I=e[14];const $=I;let k;e[15]!==u||e[16]!==c||e[17]!==S||e[18]!==j||e[19]!==x||e[20]!==f||e[21]!==$||e[22]!==m||e[23]!==o||e[24]!==v?(k=x?s.jsxs(s.Fragment,{children:[o?s.jsx("button",{type:"button",onClick:()=>p(!0),className:"contents",children:o}):c?v(s.jsx(cl,{setOpen:p,emptyCtaClass:S})):s.jsx(dl,{setOpen:p,highlightEmpty:j,emptyCtaClass:S}),s.jsx(as,{open:f,onOpenChange:p,direction:"bottom",children:s.jsxs(cs,{className:"max-h-[85dvh] p-0",children:[s.jsx(ml,{}),$]})})]}):s.jsxs(Ue,{open:f,onOpenChange:M=>{M&&!f&&Y("agent_browser_opened",{surface:"desktop_popover"}),p(M)},children:[o?s.jsx(ke,{asChild:!0,children:o}):c?v(s.jsx(ke,{asChild:!0,children:s.jsx(ul,{emptyCtaClass:S})})):s.jsx(fl,{wrapEmptyHint:v,highlightEmpty:j,emptyCtaClass:S}),s.jsx(He,{className:"w-[380px] p-0 overflow-hidden",side:m,align:u,children:$})]}),e[15]=u,e[16]=c,e[17]=S,e[18]=j,e[19]=x,e[20]=f,e[21]=$,e[22]=m,e[23]=o,e[24]=v,e[25]=k):k=e[25];let O;e[26]!==h?(O=s.jsx(Un,{open:h,onOpenChange:g,mode:"agent"}),e[26]=h,e[27]=O):O=e[27];let A;return e[28]!==O||e[29]!==k?(A=s.jsxs(s.Fragment,{children:[k,O]}),e[28]=O,e[29]=k,e[30]=A):A=e[30],A}const Sl="wco-no-drag 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 _l(t){const e=z.c(19),{agentId:n,fallback:l,onOpenHome:o,onPick:i}=t,r=gt(n)??l??null,a=r?.title??"Super Agent",d=`Open ${a} home`,c=r?.icon??null;let m;e[0]!==c||e[1]!==a?(m=s.jsx(be,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=m):m=e[2];let u;e[3]!==o||e[4]!==d||e[5]!==m?(u=s.jsx("button",{type:"button",onClick:o,"aria-label":d,className:"wco-no-drag 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:m}),e[3]=o,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[8rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=p):p=e[9];let h;e[10]!==f?(h=s.jsxs("button",{type:"button",className:Sl,children:[f,p]}),e[10]=f,e[11]=h):h=e[11];let g;e[12]!==n||e[13]!==i||e[14]!==h?(g=s.jsx(yl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:i,trigger:h}),e[12]=n,e[13]=i,e[14]=h,e[15]=g):g=e[15];let x;return e[16]!==u||e[17]!==g?(x=s.jsxs("div",{className:"flex min-w-0 items-center gap-0",children:[u,g]}),e[16]=u,e[17]=g,e[18]=x):x=e[18],x}function it(t){const e=z.c(26);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{showName:l}=n,{org:o}=J(),{state:i,isMobile:r}=de(),a=_s().invitations.length>0,d=i==="collapsed"||r,c=a?`${o.name} — switch organization (pending invitation)`:`${o.name} — switch organization`;let m;e[2]!==o?(m=s.jsx(qe,{org:o,size:"sm"}),e[2]=o,e[3]=m):m=e[3];let u;e[4]!==a||e[5]!==d?(u=a&&s.jsx("span",{className:U("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",d?"-top-1":"top-1/2 -translate-y-1/2")}),e[4]=a,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==m||e[8]!==u?(f=s.jsxs("span",{className:"relative inline-flex",children:[m,u]}),e[7]=m,e[8]=u,e[9]=f):f=e[9];let p;e[10]!==o.name||e[11]!==l?(p=l&&s.jsx("span",{className:"truncate text-sm font-medium text-foreground max-w-[10rem]",children:o.name}),e[10]=o.name,e[11]=l,e[12]=p):p=e[12];let h;e[13]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(xt,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[13]=h):h=e[13];let g;e[14]!==c||e[15]!==f||e[16]!==p?(g=s.jsx(fe,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":c,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-lg pl-[5px] pr-1.5 py-1.5 hover:bg-accent/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:[f,p,h]})}),e[14]=c,e[15]=f,e[16]=p,e[17]=g):g=e[17];let x;e[18]!==o.slug||e[19]!==g?(x=s.jsx(Cs,{orgParam:o.slug,trigger:g}),e[18]=o.slug,e[19]=g,e[20]=x):x=e[20];let b;e[21]!==o.name?(b=s.jsx(pe,{side:"bottom",children:o.name}),e[21]=o.name,e[22]=b):b=e[22];let j;return e[23]!==b||e[24]!==x?(j=s.jsxs(he,{children:[x,b]}),e[23]=b,e[24]=x,e[25]=j):j=e[25],j}function Ve(t){const e=z.c(24);let n;e[0]!==t?(n=t===void 0?{}:t,e[0]=t,e[1]=n):n=e[1];const{onNavigate:l}=n,{org:o}=J(),i=ie();let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[2]=r):r=e[2];const a=ct(r);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[3]=d):d=e[3];const c=Be(d),{threads:m}=bt(),{data:u}=oe.useSession(),{setTaskId:f,createNewTask:p}=jt();let h;e[4]!==o.id?(h=Re(o.id),e[4]=o.id,e[5]=h):h=e[5];const g=h,x=g.id,b=a.taskId?c.virtualmcpid??x:x;let j;e[6]!==p||e[7]!==x||e[8]!==i||e[9]!==l||e[10]!==o.slug||e[11]!==u?.user?.id||e[12]!==f||e[13]!==m?(j=_=>{if(!_||_===x){i({to:"/$org",params:{org:o.slug}}),l?.();return}const w=no(m,_,u?.user?.id);w?f(w.id,_):p(_),l?.()},e[6]=p,e[7]=x,e[8]=i,e[9]=l,e[10]=o.slug,e[11]=u?.user?.id,e[12]=f,e[13]=m,e[14]=j):j=e[14];const S=j;let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),e[15]=y):y=e[15];const v=b===x?g:void 0;let C;e[16]!==b||e[17]!==S?(C=()=>S(b),e[16]=b,e[17]=S,e[18]=C):C=e[18];let N;return e[19]!==b||e[20]!==S||e[21]!==v||e[22]!==C?(N=s.jsx(G.Suspense,{fallback:y,children:s.jsx(_l,{agentId:b,fallback:v,onOpenHome:C,onPick:S})}),e[19]=b,e[20]=S,e[21]=v,e[22]=C,e[23]=N):N=e[23],N}function At(t){const e=z.c(18),{item:n,onClose:l}=t,o=n.isActive&&"z-10";let i;e[0]!==o?(i=U(o),e[0]=o,e[1]=i):i=e[1];let r;e[2]!==n||e[3]!==l?(r=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=r):r=e[4];let a;e[5]!==n.icon?(a=s.jsx("span",{className:"[&>svg]:size-5 shrink-0",children:n.icon}),e[5]=n.icon,e[6]=a):a=e[6];let d;e[7]!==n.label?(d=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=d):d=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==r||e[12]!==a||e[13]!==d?(c=s.jsxs(Q,{onClick:r,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,d]}),e[9]=n.isActive,e[10]=n.label,e[11]=r,e[12]=a,e[13]=d,e[14]=c):c=e[14];let m;return e[15]!==i||e[16]!==c?(m=s.jsx(W,{className:i,children:c}),e[15]=i,e[16]=c,e[17]=m):m=e[17],m}function Cl(t){const e=z.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Vt,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=n.group.label,i=n.group.defaultExpanded;let r;if(e[2]!==l||e[3]!==n.group.items){let d;e[5]!==l?(d=c=>s.jsx(At,{item:c,onClose:l},c.key),e[5]=l,e[6]=d):d=e[6],r=n.group.items.map(d),e[2]=l,e[3]=n.group.items,e[4]=r}else r=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==r?(a=s.jsx(vs,{label:o,defaultExpanded:i,children:r}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=r,e[10]=a):a=e[10],a}case"items":{let o;if(e[11]!==l||e[12]!==n.items){let r;e[14]!==l?(r=a=>s.jsx(At,{item:a,onClose:l},a.key),e[14]=l,e[15]=r):r=e[15],o=n.items.map(r),e[11]=l,e[12]=n.items,e[13]=o}else o=e[13];let i;return e[16]!==o?(i=s.jsx(dt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(mt,{children:s.jsx(te,{className:"gap-1.5",children:o})})}),e[16]=o,e[17]=i):i=e[17],i}case"custom":return n.content}}function Nl(t){const e=z.c(27),{sections:n,onClose:l,footer:o,additionalContent:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(it,{}),e[0]=r):r=e[0];let a;e[1]!==l?(a=s.jsx(Ve,{onNavigate:l}),e[1]=l,e[2]=a):a=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1"}),e[3]=d):d=e[3];const c=B();let m;e[4]!==c?(m=c("sidebar.navigationMobile.closeSidebar"),e[4]=c,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ss,{size:16}),e[6]=u):u=e[6];let f;e[7]!==l||e[8]!==m?(f=s.jsx(je,{onClick:l,"aria-label":m,children:u}),e[7]=l,e[8]=m,e[9]=f):f=e[9];let p;e[10]!==a||e[11]!==f?(p=s.jsxs("div",{className:"flex h-12 shrink-0 items-center gap-0.5 px-1.5",children:[r,a,d,f]}),e[10]=a,e[11]=f,e[12]=p):p=e[12];let h;if(e[13]!==l||e[14]!==n){let j;e[16]!==l?(j=(S,y)=>s.jsx(Cl,{section:S,onClose:l},y),e[16]=l,e[17]=j):j=e[17],h=n.map(j),e[13]=l,e[14]=n,e[15]=h}else h=e[15];let g;e[18]!==i?(g=i&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:i}),e[18]=i,e[19]=g):g=e[19];let x;e[20]!==g||e[21]!==h?(x=s.jsxs(Yt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[h,g]}),e[20]=g,e[21]=h,e[22]=x):x=e[22];let b;return e[23]!==o||e[24]!==x||e[25]!==p?(b=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[p,x,o]}),e[23]=o,e[24]=x,e[25]=p,e[26]=b):b=e[26],b}function we(t){const e=z.c(26),{item:n,onClose:l}=t;let o;e[0]!==n.className?(o=U("flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",n.className),e[0]=n.className,e[1]=o):o=e[1];const i=o;if(n.href){const m=n.external?"_blank":void 0,u=n.external?"noopener noreferrer":void 0;let f;e[2]!==n.icon?(f=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[2]=n.icon,e[3]=f):f=e[3];let p;e[4]!==n.label?(p=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=p):p=e[5];let h;return e[6]!==i||e[7]!==n.href||e[8]!==l||e[9]!==m||e[10]!==u||e[11]!==f||e[12]!==p?(h=s.jsxs("a",{href:n.href,target:m,rel:u,className:i,onClick:l,children:[f,p]}),e[6]=i,e[7]=n.href,e[8]=l,e[9]=m,e[10]=u,e[11]=f,e[12]=p,e[13]=h):h=e[13],h}let r;e[14]!==n||e[15]!==l?(r=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=r):r=e[16];let a;e[17]!==n.icon?(a=s.jsx("span",{className:"shrink-0 text-muted-foreground",children:n.icon}),e[17]=n.icon,e[18]=a):a=e[18];let d;e[19]!==n.label?(d=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=d):d=e[20];let c;return e[21]!==i||e[22]!==r||e[23]!==a||e[24]!==d?(c=s.jsxs("button",{type:"button",onClick:r,className:i,children:[a,d]}),e[21]=i,e[22]=r,e[23]=a,e[24]=d,e[25]=c):c=e[25],c}function wl(){const t=z.c(4),e=B();let n;t[0]!==e?(n=e("common.accountPopover.impersonating"),t[0]=e,t[1]=n):n=t[1];let l;return t[2]!==n?(l=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-warning/10 px-2 py-0.5 text-[10px] font-medium text-warning",children:n}),t[2]=n,t[3]=l):l=t[3],l}function It(t){const e=z.c(38),{user:n,userImage:l,isImpersonating:o,isMobile:i}=t,r=B(),a=i?"py-4 border-b border-border":"py-3 mx-1 mt-1";let d;e[0]!==a?(d=U("flex items-center gap-3 px-4",a),e[0]=a,e[1]=d):d=e[1];const c=n?.name??"U";let m;e[2]!==c||e[3]!==l?(m=s.jsx(nt,{url:l,fallback:c,shape:"circle",size:"sm",className:"shrink-0"}),e[2]=c,e[3]=l,e[4]=m):m=e[4];let u;e[5]!==r||e[6]!==n?.name?(u=n?.name??r("common.accountPopover.defaultUserName"),e[5]=r,e[6]=n?.name,e[7]=u):u=e[7];let f;e[8]!==u?(f=s.jsx("p",{className:"text-sm font-medium truncate",children:u}),e[8]=u,e[9]=f):f=e[9];let p;e[10]!==o?(p=o&&s.jsx(wl,{}),e[10]=o,e[11]=p):p=e[11];let h;e[12]!==f||e[13]!==p?(h=s.jsxs("div",{className:"flex items-center gap-2",children:[f,p]}),e[12]=f,e[13]=p,e[14]=h):h=e[14];const g=n?.email;let x;e[15]!==g?(x=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:g}),e[15]=g,e[16]=x):x=e[16];let b;e[17]!==x||e[18]!==h?(b=s.jsxs("div",{className:"flex-1 min-w-0",children:[h,x]}),e[17]=x,e[18]=h,e[19]=b):b=e[19];let j;e[20]!==r||e[21]!==n?(j=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(()=>{ee.success(r("common.accountPopover.userIdCopied"))})},e[20]=r,e[21]=n,e[22]=j):j=e[22];let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(ot,{size:14}),e[23]=S):S=e[23];let y;e[24]!==j?(y=s.jsx(fe,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:j,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:S})}),e[24]=j,e[25]=y):y=e[25];let v;e[26]!==r?(v=r("common.accountPopover.copyUserId"),e[26]=r,e[27]=v):v=e[27];let C;e[28]!==v?(C=s.jsx(pe,{side:"right",children:s.jsx("p",{className:"text-xs",children:v})}),e[28]=v,e[29]=C):C=e[29];let N;e[30]!==y||e[31]!==C?(N=s.jsx(ns,{delayDuration:300,children:s.jsxs(he,{children:[y,C]})}),e[30]=y,e[31]=C,e[32]=N):N=e[32];let _;return e[33]!==b||e[34]!==N||e[35]!==d||e[36]!==m?(_=s.jsxs("div",{className:d,children:[m,b,N]}),e[33]=b,e[34]=N,e[35]=d,e[36]=m,e[37]=_):_=e[37],_}function zt(t){const e=z.c(35),{themeOptions:n,preferences:l,setPreferences:o,isMobile:i}=t,r=B(),a=i?"size-8":"size-7",d=i?"px-3 py-3":"px-2 py-1.5";let c;e[0]!==d?(c=U("flex items-center justify-between border-t border-border/50",d),e[0]=d,e[1]=c):c=e[1];let m;if(e[2]!==a||e[3]!==l.theme||e[4]!==o||e[5]!==n){let v;e[7]!==a||e[8]!==l.theme||e[9]!==o?(v=C=>{const{value:N,icon:_,label:w}=C;return s.jsx("button",{type:"button","aria-label":w,onClick:()=>o(I=>({...I,theme:N})),className:U(a,"rounded-md flex items-center justify-center transition-colors",l.theme===N?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:_},N)},e[7]=a,e[8]=l.theme,e[9]=o,e[10]=v):v=e[10],m=n.map(v),e[2]=a,e[3]=l.theme,e[4]=o,e[5]=n,e[6]=m}else m=e[6];let u;e[11]!==m?(u=s.jsx("div",{className:"flex items-center gap-0.5",children:m}),e[11]=m,e[12]=u):u=e[12];let f;e[13]!==l.enableSounds||e[14]!==r?(f=l.enableSounds?r("common.accountPopover.disableSounds"):r("common.accountPopover.enableSounds"),e[13]=l.enableSounds,e[14]=r,e[15]=f):f=e[15];let p;e[16]!==o?(p=()=>o(kl),e[16]=o,e[17]=p):p=e[17];const h=l.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let g;e[18]!==a||e[19]!==h?(g=U(a,"rounded-md flex items-center justify-center transition-colors",h),e[18]=a,e[19]=h,e[20]=g):g=e[20];let x;e[21]!==l.enableSounds?(x=l.enableSounds?s.jsx(gn,{size:14}):s.jsx(bn,{size:14}),e[21]=l.enableSounds,e[22]=x):x=e[22];let b;e[23]!==f||e[24]!==p||e[25]!==g||e[26]!==x?(b=s.jsx("button",{type:"button","aria-label":f,onClick:p,className:g,children:x}),e[23]=f,e[24]=p,e[25]=g,e[26]=x,e[27]=b):b=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.102.0"]}),e[28]=j):j=e[28];let S;e[29]!==b?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[29]=b,e[30]=S):S=e[30];let y;return e[31]!==S||e[32]!==c||e[33]!==u?(y=s.jsxs("div",{className:c,children:[u,S]}),e[31]=S,e[32]=c,e[33]=u,e[34]=y):y=e[34],y}function kl(t){return{...t,enableSounds:!t.enableSounds}}function $t(t){const e=z.c(54),{user:n,userImage:l,menuItems:o,signOutItem:i,stopImpersonatingItem:r,isImpersonating:a,themeOptions:d,preferences:c,setPreferences:m,close:u,isMobile:f}=t;if(f){let y;e[0]!==a||e[1]!==n||e[2]!==l?(y=s.jsx(It,{user:n,userImage:l,isImpersonating:a,isMobile:!0}),e[0]=a,e[1]=n,e[2]=l,e[3]=y):y=e[3];let v;if(e[4]!==u||e[5]!==o){let $;e[7]!==u?($=k=>s.jsx(we,{item:k,onClose:u},k.key),e[7]=u,e[8]=$):$=e[8],v=o.map($),e[4]=u,e[5]=o,e[6]=v}else v=e[6];let C;e[9]!==u||e[10]!==r?(C=r&&s.jsx(we,{item:r,onClose:u}),e[9]=u,e[10]=r,e[11]=C):C=e[11];let N;e[12]!==u||e[13]!==i?(N=s.jsx(we,{item:i,onClose:u}),e[12]=u,e[13]=i,e[14]=N):N=e[14];let _;e[15]!==v||e[16]!==C||e[17]!==N?(_=s.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto",children:s.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[v,C,N]})}),e[15]=v,e[16]=C,e[17]=N,e[18]=_):_=e[18];let w;e[19]!==c||e[20]!==m||e[21]!==d?(w=s.jsx(zt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!0}),e[19]=c,e[20]=m,e[21]=d,e[22]=w):w=e[22];let I;return e[23]!==y||e[24]!==_||e[25]!==w?(I=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[y,_,w]}),e[23]=y,e[24]=_,e[25]=w,e[26]=I):I=e[26],I}let p;e[27]!==a||e[28]!==n||e[29]!==l?(p=s.jsx(It,{user:n,userImage:l,isImpersonating:a,isMobile:!1}),e[27]=a,e[28]=n,e[29]=l,e[30]=p):p=e[30];let h;if(e[31]!==u||e[32]!==o){let y;e[34]!==u?(y=v=>s.jsx(we,{item:v,onClose:u},v.key),e[34]=u,e[35]=y):y=e[35],h=o.map(y),e[31]=u,e[32]=o,e[33]=h}else h=e[33];let g;e[36]!==u||e[37]!==r?(g=r&&s.jsx(we,{item:r,onClose:u}),e[36]=u,e[37]=r,e[38]=g):g=e[38];let x;e[39]!==u||e[40]!==i?(x=s.jsx(we,{item:i,onClose:u}),e[39]=u,e[40]=i,e[41]=x):x=e[41];let b;e[42]!==h||e[43]!==g||e[44]!==x?(b=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[h,g,x]}),e[42]=h,e[43]=g,e[44]=x,e[45]=b):b=e[45];let j;e[46]!==c||e[47]!==m||e[48]!==d?(j=s.jsx(zt,{themeOptions:d,preferences:c,setPreferences:m,isMobile:!1}),e[46]=c,e[47]=m,e[48]=d,e[49]=j):j=e[49];let S;return e[50]!==p||e[51]!==b||e[52]!==j?(S=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[p,b,j]})}),e[50]=p,e[51]=b,e[52]=j,e[53]=S):S=e[53],S}function ze(){const t=z.c(99),e=B(),{data:n}=oe.useSession(),{org:l}=J(),o=ie();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const a=Hs(i)?.params.org,[d,c]=Ut(),m=ut(),{isAdmin:u}=po(),[f,p]=G.useState(!1),h=n?.user,g=h?.image,x=!!n?.session?.impersonatedBy;let b;t[1]===Symbol.for("react.memo_cache_sentinel")?(b=()=>p(!1),t[1]=b):b=t[1];const j=b;let S;t[2]!==e?(S=e("common.accountPopover.preferences"),t[2]=e,t[3]=S):S=t[3];let y;t[4]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(We,{size:16}),t[4]=y):y=t[4];let v;t[5]!==o||t[6]!==a?(v=()=>{o({to:"/$org/settings/profile",params:{org:a??""}})},t[5]=o,t[6]=a,t[7]=v):v=t[7];let C;t[8]!==S||t[9]!==v?(C={key:"preferences",label:S,icon:y,onClick:v},t[8]=S,t[9]=v,t[10]=C):C=t[10];let N;t[11]!==l||t[12]!==o||t[13]!==e?(N=l?[{key:"install-app",label:e("common.accountPopover.addToHomeScreen"),icon:s.jsx(oo,{size:16}),onClick:()=>{o({to:"/$org/install",params:{org:l.slug}})}},{key:"connect-clients",label:"Connect to Agents",icon:s.jsx(ro,{size:16}),onClick:()=>{o({to:"/$org/settings/connect",params:{org:l.slug}})}}]:[],t[11]=l,t[12]=o,t[13]=e,t[14]=N):N=t[14];let _;t[15]!==e?(_=e("common.accountPopover.termsOfUse"),t[15]=e,t[16]=_):_=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(io,{size:16}),t[17]=w):w=t[17];let I;t[18]!==_?(I={key:"terms",label:_,icon:w,href:"https://www.decocms.com/terms-of-use",external:!0},t[18]=_,t[19]=I):I=t[19];let $;t[20]!==e?($=e("common.accountPopover.privacyPolicy"),t[20]=e,t[21]=$):$=t[21];let k;t[22]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(uo,{size:16}),t[22]=k):k=t[22];let O;t[23]!==$?(O={key:"privacy",label:$,icon:k,href:"https://www.decocms.com/privacy-policy",external:!0},t[23]=$,t[24]=O):O=t[24];let A;t[25]!==e?(A=e("common.accountPopover.githubRepo"),t[25]=e,t[26]=A):A=t[26];let M;t[27]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(Us,{className:"w-4 h-4"}),t[27]=M):M=t[27];let F;t[28]!==A?(F={key:"github",label:A,icon:M,href:"https://github.com/decocms/studio",external:!0},t[28]=A,t[29]=F):F=t[29];let R;t[30]!==e?(R=e("common.accountPopover.community"),t[30]=e,t[31]=R):R=t[31];let D;t[32]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(fo,{size:16}),t[32]=D):D=t[32];let T;t[33]!==R?(T={key:"community",label:R,icon:D,href:"https://decocms.com/discord",external:!0},t[33]=R,t[34]=T):T=t[34];let E;t[35]!==e?(E=e("common.accountPopover.homepage"),t[35]=e,t[36]=E):E=t[36];let H;t[37]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(lo,{size:16}),t[37]=H):H=t[37];let q;t[38]!==E?(q={key:"homepage",label:E,icon:H,href:"https://decocms.com",external:!0},t[38]=E,t[39]=q):q=t[39];let L;t[40]!==u||t[41]!==o||t[42]!==e?(L=u?[{key:"admin-dashboard",label:e("common.accountPopover.adminDashboard"),icon:s.jsx(ls,{size:16}),onClick:()=>o({to:"/_admin"}),className:"text-warning"}]:[],t[40]=u,t[41]=o,t[42]=e,t[43]=L):L=t[43];let se;t[44]!==O||t[45]!==F||t[46]!==T||t[47]!==q||t[48]!==L||t[49]!==C||t[50]!==N||t[51]!==I?(se=[C,...N,I,O,F,T,q,...L],t[44]=O,t[45]=F,t[46]=T,t[47]=q,t[48]=L,t[49]=C,t[50]=N,t[51]=I,t[52]=se):se=t[52];const me=se;let re;t[53]!==e?(re=e("common.accountPopover.signOut"),t[53]=e,t[54]=re):re=t[54];let ue;t[55]===Symbol.for("react.memo_cache_sentinel")?(ue=s.jsx(Ct,{size:16}),t[55]=ue):ue=t[55];let ve;t[56]!==re?(ve={key:"logout",label:re,icon:ue,onClick:Il},t[56]=re,t[57]=ve):ve=t[57];const ye=ve;let Se;t[58]!==x||t[59]!==e?(Se=x?{key:"stop-impersonating",label:e("common.accountPopover.stopImpersonation"),icon:s.jsx(Ct,{size:16}),onClick:async()=>{const{error:yt}=await oe.admin.stopImpersonating();if(yt){ee.error(yt.message||e("common.accountPopover.failedToStopImpersonation"));return}window.location.href="/"},className:"text-warning"}:null,t[58]=x,t[59]=e,t[60]=Se):Se=t[60];const _e=Se;let Ce;t[61]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(co,{size:14}),t[61]=Ce):Ce=t[61];let xe;t[62]!==e?(xe=e("common.accountPopover.lightTheme"),t[62]=e,t[63]=xe):xe=t[63];let ne;t[64]!==xe?(ne={value:"light",icon:Ce,label:xe},t[64]=xe,t[65]=ne):ne=t[65];let Ne;t[66]===Symbol.for("react.memo_cache_sentinel")?(Ne=s.jsx(mo,{size:14}),t[66]=Ne):Ne=t[66];let ae;t[67]!==e?(ae=e("common.accountPopover.darkTheme"),t[67]=e,t[68]=ae):ae=t[68];let P;t[69]!==ae?(P={value:"dark",icon:Ne,label:ae},t[69]=ae,t[70]=P):P=t[70];let K;t[71]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(lt,{size:14}),t[71]=K):K=t[71];let X;t[72]!==e?(X=e("common.accountPopover.systemTheme"),t[72]=e,t[73]=X):X=t[73];let V;t[74]!==X?(V={value:"system",icon:K,label:X},t[74]=X,t[75]=V):V=t[75];let ge;t[76]!==ne||t[77]!==P||t[78]!==V?(ge=[ne,P,V],t[76]=ne,t[77]=P,t[78]=V,t[79]=ge):ge=t[79];const Xe=ge;let Te;t[80]!==x||t[81]!==m||t[82]!==me||t[83]!==d||t[84]!==c||t[85]!==ye||t[86]!==_e||t[87]!==Xe||t[88]!==h||t[89]!==g?(Te={user:h,userImage:g,menuItems:me,signOutItem:ye,stopImpersonatingItem:_e,isImpersonating:x,themeOptions:Xe,preferences:d,setPreferences:c,close:j,isMobile:m},t[80]=x,t[81]=m,t[82]=me,t[83]=d,t[84]=c,t[85]=ye,t[86]=_e,t[87]=Xe,t[88]=h,t[89]=g,t[90]=Te):Te=t[90];const Pe=Te;let De;return t[91]!==x||t[92]!==m||t[93]!==f||t[94]!==Pe||t[95]!==e||t[96]!==h?.name||t[97]!==g?(De=s.jsx(s.Fragment,{children:m?s.jsxs(as,{open:f,onOpenChange:p,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>p(!0),className:U("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",x&&"border-2 border-dashed border-warning"),children:[s.jsx(nt,{url:g,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]}),s.jsxs(cs,{className:"h-[80dvh] p-0",children:[s.jsx(ds,{className:"sr-only",children:e("common.accountPopover.account")}),s.jsx($t,{...Pe})]})]}):s.jsxs(Ue,{open:f,onOpenChange:p,children:[s.jsx(ke,{asChild:!0,children:s.jsxs(Q,{tooltip:h?.name??e("common.accountPopover.defaultAccountLabel"),className:U("rounded-md",x&&"border-2 border-dashed border-warning"),children:[s.jsx(nt,{url:g,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??e("common.accountPopover.defaultAccountLabel")})]})}),s.jsx(He,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Al,children:s.jsx($t,{...Pe})})]})}),t[91]=x,t[92]=m,t[93]=f,t[94]=Pe,t[95]=e,t[96]=h?.name,t[97]=g,t[98]=De):De=t[98],De}function Al(t){return t.preventDefault()}function Il(){Y("signed_out",{source:"account_popover"}),Ws(),oe.signOut()}const zl=["Browse and edit your Library files","Run your agents","Enable and call any MCP tool in this org"],$l="Connect: ";function Ol(){return typeof window>"u"?"unknown host":window.location.hostname}function Ml(t){const e=z.c(45),{onClose:n}=t,{org:l}=J();let o;e[0]!==l.slug?(o=ho(l.slug),e[0]=l.slug,e[1]=o):o=e[1];const i=o,r=xo(),[a,d]=G.useState(null),c=Nt(),m=Nt();let u;e[2]!==r||e[3]!==l.slug?(u=()=>{r.mutate({name:`${$l}Claude Code on ${Ol()}`,permissions:{"*":["*"]}},{onSuccess:F=>{const R=go(l.slug,F.key);d(R),Y("connect_studio_generate",{target:"claude-code"}),navigator.clipboard?.writeText(R).then(El,Dl)},onError:Pl})},e[2]=r,e[3]=l.slug,e[4]=u):u=e[4];const f=u;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"size-8 rounded-lg bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(ps,{size:17})}),e[5]=p):p=e[5];let h;e[6]!==l.name?(h=s.jsxs(ft,{className:"flex items-center gap-2.5",children:[p,"Connect ",l.name," to Claude"]}),e[6]=l.name,e[7]=h):h=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Qt,{children:"Hand Claude this org's MCP endpoint. Once linked, Claude can:"}),e[8]=g):g=e[8];let x;e[9]!==h?(x=s.jsxs(Jt,{children:[h,g]}),e[9]=h,e[10]=x):x=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("ul",{className:"flex flex-col gap-2 text-sm",children:zl.map(Tl)}),e[11]=b):b=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(St,{size:15,className:"text-muted-foreground"}),e[12]=j):j=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[j,"Claude Code",s.jsx("span",{className:"ml-auto text-[11px] font-medium text-special uppercase tracking-wide",children:"Recommended"})]}),e[13]=S):S=e[13];let y;e[14]!==a||e[15]!==c||e[16]!==r.isPending||e[17]!==f?(y=s.jsxs("section",{className:"rounded-xl border border-border bg-muted/30 p-4 flex flex-col gap-3",children:[S,a?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-lg border border-border bg-background p-3 max-h-32 overflow-y-auto",children:s.jsx("code",{className:"text-xs leading-relaxed break-all font-mono text-foreground/90 whitespace-pre-wrap",children:a})}),s.jsxs(ce,{size:"sm",className:"gap-1.5 self-start",onClick:()=>{c.handleCopy(a),Y("connect_studio_copy",{target:"claude-code"}),ee.success("Command copied — paste it in your terminal")},children:[c.copied?s.jsx(Oe,{size:14}):s.jsx(ot,{size:14}),c.copied?"Copied":"Copy command"]}),s.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-warning/40 bg-warning/10 px-3 py-2",children:[s.jsx(ls,{size:14,className:"text-warning shrink-0 mt-0.5"}),s.jsxs("p",{className:"text-xs leading-relaxed text-foreground/80",children:["No login step — this command embeds a"," ",s.jsx("span",{className:"font-medium text-foreground",children:"full-access token"}),". Treat it like a password; revoke it any time in Settings → Connect."]})]})]}):s.jsxs(s.Fragment,{children:[s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"One command, no browser login. We'll mint a scoped access token and embed it so Claude Code connects instantly."}),s.jsxs(ce,{size:"sm",className:"gap-1.5 self-start",disabled:r.isPending,onClick:f,children:[s.jsx(St,{size:14}),r.isPending?"Generating…":"Generate connect command"]})]})]}),e[14]=a,e[15]=c,e[16]=r.isPending,e[17]=f,e[18]=y):y=e[18];let v,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[s.jsx(jn,{size:15,className:"text-muted-foreground"}),"Claude Desktop or claude.ai"]}),C=s.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"Add a custom connector in Settings → Connectors and paste this URL. Claude signs in with OAuth on first use."}),e[19]=v,e[20]=C):(v=e[19],C=e[20]);let N;e[21]!==i?(N=s.jsx("code",{className:"text-xs flex-1 min-w-0 truncate font-mono text-foreground/90",children:i}),e[21]=i,e[22]=N):N=e[22];let _;e[23]!==i||e[24]!==m?(_=()=>{m.handleCopy(i),Y("connect_studio_copy",{target:"claude-connector"})},e[23]=i,e[24]=m,e[25]=_):_=e[25];let w;e[26]!==m.copied?(w=m.copied?s.jsx(Oe,{size:14}):s.jsx(ot,{size:14}),e[26]=m.copied,e[27]=w):w=e[27];let I;e[28]!==_||e[29]!==w?(I=s.jsx(ce,{variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"Copy URL",onClick:_,children:w}),e[28]=_,e[29]=w,e[30]=I):I=e[30];let $;e[31]!==N||e[32]!==I?($=s.jsxs("section",{className:"flex flex-col gap-2.5",children:[v,C,s.jsxs("div",{className:"flex items-center gap-2 rounded-lg border border-border bg-muted/30 pl-3 pr-1.5 py-1.5 min-w-0",children:[N,I]})]}),e[31]=N,e[32]=I,e[33]=$):$=e[33];let k;e[34]!==l.slug?(k={org:l.slug},e[34]=l.slug,e[35]=k):k=e[35];let O;e[36]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(ht,{size:12}),e[36]=O):O=e[36];let A;e[37]!==n||e[38]!==k?(A=s.jsx("div",{className:"flex items-center border-t border-border pt-3",children:s.jsx(ce,{asChild:!0,variant:"link",size:"sm",className:"px-0 text-xs gap-1",children:s.jsxs(qt,{to:"/$org/settings/connect",params:k,onClick:n,children:["More clients & API keys ",O]})})}),e[37]=n,e[38]=k,e[39]=A):A=e[39];let M;return e[40]!==y||e[41]!==$||e[42]!==A||e[43]!==x?(M=s.jsxs("div",{className:"flex flex-col gap-4 min-w-0",children:[x,b,y,$,A]}),e[40]=y,e[41]=$,e[42]=A,e[43]=x,e[44]=M):M=e[44],M}function Tl(t){return s.jsxs("li",{className:"flex items-center gap-2.5",children:[s.jsx("span",{className:"size-4 rounded-full bg-special/15 text-special flex items-center justify-center shrink-0",children:s.jsx(Oe,{size:11,strokeWidth:3})}),s.jsx("span",{className:"text-foreground",children:t})]},t)}function Pl(t){return ee.error(t.message)}function Dl(){return ee.success("Command ready — copy it below")}function El(){return ee.success("Command copied — paste it in your terminal")}function Fl(t){const e=z.c(6),{open:n,onOpenChange:l}=t;let o;e[0]!==l?(o=s.jsx(Xt,{className:"max-w-lg gap-4",children:s.jsx(Ml,{onClose:()=>l(!1)})}),e[0]=l,e[1]=o):o=e[1];let i;return e[2]!==l||e[3]!==n||e[4]!==o?(i=s.jsx(pt,{open:n,onOpenChange:l,children:o}),e[2]=l,e[3]=n,e[4]=o,e[5]=i):i=e[5],i}function $e(t){const e=z.c(50),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,o=B(),i=Gn(),[r,a]=G.useState(!1);let d,c;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online||e[4]!==o){const y=bo(i.capabilities,o);let v;e[7]!==i.online||e[8]!==o?(v=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectDesktop"),e[7]=i.online,e[8]=o,e[9]=v):v=e[9],d=v,c=i.online?s.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[s.jsx("span",{className:"font-medium",children:i.hostname??i.machineId??o("header.linkedDesktopIndicator.desktopLinked")}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?o("header.linkedDesktopIndicator.availableCapabilities",{capabilities:y.join(", ")}):o("header.linkedDesktopIndicator.noCliAgents")})]}):s.jsx("span",{className:"text-xs",children:o("header.linkedDesktopIndicator.desktopDisconnected")}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=o,e[5]=d,e[6]=c}else d=e[5],c=e[6];const m=c;if(l==="full"){let y,v;e[10]===Symbol.for("react.memo_cache_sentinel")?(y=()=>a(!0),v=s.jsx(lt,{}),e[10]=y,e[11]=v):(y=e[10],v=e[11]);let C;e[12]!==d?(C=s.jsx("span",{children:d}),e[12]=d,e[13]=C):C=e[13];let N;e[14]!==i.online?(N=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[14]=i.online,e[15]=N):N=e[15];let _;e[16]!==d||e[17]!==C||e[18]!==N?(_=s.jsx(fe,{asChild:!0,children:s.jsxs(Q,{tooltip:d,onClick:y,children:[v,C,N]})}),e[16]=d,e[17]=C,e[18]=N,e[19]=_):_=e[19];let w;e[20]!==m?(w=s.jsx(pe,{side:"right",children:m}),e[20]=m,e[21]=w):w=e[21];let I;e[22]!==_||e[23]!==w?(I=s.jsxs(he,{children:[_,w]}),e[22]=_,e[23]=w,e[24]=I):I=e[24];let $;e[25]!==r?($=s.jsx(wt,{open:r,onOpenChange:a}),e[25]=r,e[26]=$):$=e[26];let k;return e[27]!==$||e[28]!==I?(k=s.jsxs(s.Fragment,{children:[I,$]}),e[27]=$,e[28]=I,e[29]=k):k=e[29],k}let u;e[30]===Symbol.for("react.memo_cache_sentinel")?(u=()=>a(!0),e[30]=u):u=e[30];let f;e[31]!==i.online||e[32]!==o?(f=i.online?o("header.linkedDesktopIndicator.desktopLinked"):o("header.linkedDesktopIndicator.connectYourDesktop"),e[31]=i.online,e[32]=o,e[33]=f):f=e[33];let p;e[34]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(lt,{size:16}),e[34]=p):p=e[34];let h;e[35]!==i.online?(h=i.online&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[35]=i.online,e[36]=h):h=e[36];let g;e[37]!==f||e[38]!==h?(g=s.jsx(fe,{asChild:!0,children:s.jsxs(je,{onClick:u,"aria-label":f,children:[p,h]})}),e[37]=f,e[38]=h,e[39]=g):g=e[39];let x;e[40]!==m?(x=s.jsx(pe,{side:"bottom",children:m}),e[40]=m,e[41]=x):x=e[41];let b;e[42]!==g||e[43]!==x?(b=s.jsxs(he,{children:[g,x]}),e[42]=g,e[43]=x,e[44]=b):b=e[44];let j;e[45]!==r?(j=s.jsx(wt,{open:r,onOpenChange:a}),e[45]=r,e[46]=j):j=e[46];let S;return e[47]!==j||e[48]!==b?(S=s.jsxs(s.Fragment,{children:[b,j]}),e[47]=j,e[48]=b,e[49]=S):S=e[49],S}class Rl extends G.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Ll(t){return t<=1?"text-destructive":t<=5?"text-warning":"text-foreground/70"}function Gl(){const t=z.c(17),e=ie(),{org:n}=J(),{hasDecoKey:l,balanceDollars:o}=eo();if(!l)return null;let i;t[0]!==o?(i=o!=null?`Credits: $${o.toFixed(2)}`:"Credits",t[0]=o,t[1]=i):i=t[1];let r;t[2]!==o?(r=U(o!=null&&Ll(o)),t[2]=o,t[3]=r):r=t[3];let a;t[4]!==e||t[5]!==n.slug?(a=()=>e({to:"/$org/settings/ai-providers",params:{org:n.slug}}),t[4]=e,t[5]=n.slug,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(vn,{}),t[7]=d):d=t[7];let c;t[8]!==o?(c=o!=null?`$${o.toFixed(2)}`:"Credits",t[8]=o,t[9]=c):c=t[9];let m;t[10]!==c?(m=s.jsx("span",{children:c}),t[10]=c,t[11]=m):m=t[11];let u;return t[12]!==i||t[13]!==r||t[14]!==a||t[15]!==m?(u=s.jsx(te,{children:s.jsx(W,{children:s.jsxs(Q,{tooltip:i,className:r,onClick:a,children:[d,m]})})}),t[12]=i,t[13]=r,t[14]=a,t[15]=m,t[16]=u):u=t[16],u}function Ot(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Rl,{children:s.jsx(G.Suspense,{fallback:null,children:s.jsx(Gl,{})})}),t[0]=e):e=t[0],e}function Ze(){const t=z.c(14),e=B(),n=ie(),{org:l}=J();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(We,{}),t[5]=r):r=t[5];let a;t[6]!==e?(a=e("sidebar.sidebarFooter.settings"),t[6]=e,t[7]=a):a=t[7];let d;t[8]!==a?(d=s.jsx("span",{children:a}),t[8]=a,t[9]=d):d=t[9];let c;return t[10]!==o||t[11]!==i||t[12]!==d?(c=s.jsxs(Q,{tooltip:o,onClick:i,children:[r,d]}),t[10]=o,t[11]=i,t[12]=d,t[13]=c):c=t[13],c}function Bl(){const t=z.c(9),e=B(),n=ie(),{org:l}=J();let o;t[0]!==e?(o=e("sidebar.sidebarFooter.settings"),t[0]=e,t[1]=o):o=t[1];let i;t[2]!==n||t[3]!==l.slug?(i=()=>n({to:"/$org/settings",params:{org:l.slug}}),t[2]=n,t[3]=l.slug,t[4]=i):i=t[4];let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(We,{size:15}),t[5]=r):r=t[5];let a;return t[6]!==o||t[7]!==i?(a=s.jsx("button",{type:"button","aria-label":o,onClick:i,className:"shrink-0 flex items-center justify-center size-7 rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",children:r}),t[6]=o,t[7]=i,t[8]=a):a=t[8],a}function Mt(){const t=z.c(33),e=B(),[n,l]=G.useState(!1),[o,i]=G.useState(!1);let r;t[0]!==e?(r=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=r):r=t[1];let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(is,{}),t[2]=a):a=t[2];let d;t[3]!==e?(d=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=d):d=t[4];let c;t[5]!==d?(c=s.jsx("span",{children:d}),t[5]=d,t[6]=c):c=t[6];let m;t[7]!==r||t[8]!==c?(m=s.jsx(W,{children:s.jsx(hs,{trigger:s.jsxs(Q,{tooltip:r,children:[a,c]})})}),t[7]=r,t[8]=c,t[9]=m):m=t[9];let u;t[10]!==e?(u=e("sidebar.sidebarFooter.addConnection"),t[10]=e,t[11]=u):u=t[11];let f,p;t[12]===Symbol.for("react.memo_cache_sentinel")?(f=()=>l(!0),p=s.jsx(ao,{}),t[12]=f,t[13]=p):(f=t[12],p=t[13]);let h;t[14]!==e?(h=e("sidebar.sidebarFooter.addConnection"),t[14]=e,t[15]=h):h=t[15];let g;t[16]!==h?(g=s.jsx("span",{children:h}),t[16]=h,t[17]=g):g=t[17];let x;t[18]!==u||t[19]!==g?(x=s.jsx(W,{children:s.jsxs(Q,{tooltip:u,onClick:f,children:[p,g]})}),t[18]=u,t[19]=g,t[20]=x):x=t[20];let b;t[21]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(W,{children:s.jsxs(Q,{tooltip:"Connect to Claude",onClick:()=>{Y("connect_studio_opened",{source:"sidebar_footer"}),i(!0)},children:[s.jsx(ps,{}),s.jsx("span",{children:"Connect to Claude"})]})}),t[21]=b):b=t[21];let j;t[22]!==x||t[23]!==m?(j=s.jsxs(te,{className:"gap-0.5",children:[m,x,b]}),t[22]=x,t[23]=m,t[24]=j):j=t[24];let S;t[25]!==n?(S=s.jsx(to,{open:n,onOpenChange:l,mode:"browse"}),t[25]=n,t[26]=S):S=t[26];let y;t[27]!==o?(y=s.jsx(Fl,{open:o,onOpenChange:i}),t[27]=o,t[28]=y):y=t[28];let v;return t[29]!==j||t[30]!==S||t[31]!==y?(v=s.jsxs(s.Fragment,{children:[j,S,y]}),t[29]=j,t[30]=S,t[31]=y,t[32]=v):v=t[32],v}function Tt(){const t=z.c(10),e=B();let n;t[0]!==e?(n=e("sidebar.sidebarFooter.inviteMembers"),t[0]=e,t[1]=n):n=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(is,{}),t[2]=l):l=t[2];let o;t[3]!==e?(o=e("sidebar.sidebarFooter.inviteMembers"),t[3]=e,t[4]=o):o=t[4];let i;t[5]!==o?(i=s.jsx("span",{children:o}),t[5]=o,t[6]=i):i=t[6];let r;return t[7]!==n||t[8]!==i?(r=s.jsx(te,{className:"gap-0.5",children:s.jsx(W,{children:s.jsx(hs,{trigger:s.jsxs(Q,{tooltip:n,children:[l,i]})})})}),t[7]=n,t[8]=i,t[9]=r):r=t[9],r}function Hl(){const t=z.c(17),{state:e}=de(),n=e==="collapsed";if(Ke()){if(n){let f;t[0]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Tt,{}),t[0]=f):f=t[0];let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(W,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx($e,{})})}),t[1]=p):p=t[1];let h;t[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(W,{children:s.jsx(Ze,{})}),t[2]=h):h=t[2];let g;return t[3]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsxs(Ae,{className:"px-2 pb-3 gap-1",children:[f,s.jsxs(te,{children:[p,h,s.jsx(W,{children:s.jsx(ze,{})})]})]}),t[3]=g):g=t[3],g}let c;t[4]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Tt,{}),t[4]=c):c=t[4];let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(W,{children:s.jsx($e,{variant:"full"})}),t[5]=m):m=t[5];let u;return t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs(Ae,{className:"px-2 pb-3 gap-0.5",children:[c,s.jsxs(te,{className:"gap-0.5",children:[m,s.jsx(W,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(ze,{})}),s.jsx(Bl,{})]})})]})]}),t[6]=u):u=t[6],u}if(n){let c,m;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Mt,{}),m=s.jsx(Ot,{}),t[7]=c,t[8]=m):(c=t[7],m=t[8]);let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(W,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx($e,{})})}),t[9]=u):u=t[9];let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(W,{children:s.jsx(Ze,{})}),t[10]=f):f=t[10];let p;return t[11]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(Ae,{className:"px-2 pb-3 gap-1",children:[c,m,s.jsxs(te,{children:[u,f,s.jsx(W,{children:s.jsx(ze,{})})]})]}),t[11]=p):p=t[11],p}let o,i;t[12]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Mt,{}),i=s.jsx(Ot,{}),t[12]=o,t[13]=i):(o=t[12],i=t[13]);let r;t[14]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(W,{children:s.jsx($e,{variant:"full"})}),t[14]=r):r=t[14];let a;t[15]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(W,{children:s.jsx(Ze,{})}),t[15]=a):a=t[15];let d;return t[16]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsxs(Ae,{className:"px-2 pb-3 gap-0.5",children:[o,i,s.jsxs(te,{className:"gap-0.5",children:[r,a,s.jsx(W,{children:s.jsx(ze,{})})]})]}),t[16]=d):d=t[16],d}function Ul(){const t=z.c(11),e=B(),n=ie(),{org:l}=J(),{setOpenMobile:o}=de();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(te,{children:s.jsx(W,{children:s.jsx(ze,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e?(r=e("sidebar.sidebarFooterMobile.settings"),t[1]=e,t[2]=r):r=t[2];let a;t[3]!==n||t[4]!==l.slug||t[5]!==o?(a=()=>{n({to:"/$org/settings",params:{org:l.slug}}),o(!1)},t[3]=n,t[4]=l.slug,t[5]=o,t[6]=a):a=t[6];let d;t[7]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(We,{className:"size-4"}),t[7]=d):d=t[7];let c;return t[8]!==r||t[9]!==a?(c=s.jsx(Ae,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(je,{"aria-label":r,onClick:a,children:d})]})}),t[8]=r,t[9]=a,t[10]=c):c=t[10],c}function Pt(t){const e=z.c(15),{className:n,wrapperClassName:l,children:o}=t,[i,r]=G.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=b=>{b&&r(b.scrollHeight>b.clientHeight+1)},e[0]=a):a=e[0];const d=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=b=>{const j=b.currentTarget;r(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const m=c;let u;e[2]!==l?(u=U("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==o||e[5]!==n?(f=s.jsx("div",{ref:d,onScroll:m,className:n,children:o}),e[4]=o,e[5]=n,e[6]=f):f=e[6];const p=i?"opacity-100":"opacity-0";let h;e[7]!==p?(h=U("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",p),e[7]=p,e[8]=h):h=e[8];let g;e[9]!==h?(g=s.jsx("div",{"aria-hidden":!0,className:h}),e[9]=h,e[10]=g):g=e[10];let x;return e[11]!==u||e[12]!==f||e[13]!==g?(x=s.jsxs("div",{className:u,children:[f,g]}),e[11]=u,e[12]=f,e[13]=g,e[14]=x):x=e[14],x}function Wl(t){const e=z.c(9),{virtualMcpId:n,size:l,showAutomationBadge:o}=t,i=l===void 0?"sm":l,r=B();let a;e[0]!==i||e[1]!==n?(a=n?s.jsx(Kl,{virtualMcpId:n,size:i}):s.jsx(be,{icon:null,name:"?",size:i}),e[0]=i,e[1]=n,e[2]=a):a=e[2];let d;e[3]!==o||e[4]!==r?(d=o&&s.jsx("span",{"aria-label":r("tasksPanel.mcpAvatar.automationTriggered"),className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:s.jsx(gs,{size:10,className:"text-white"})}),e[3]=o,e[4]=r,e[5]=d):d=e[5];let c;return e[6]!==a||e[7]!==d?(c=s.jsxs("div",{className:"relative shrink-0",children:[a,d]}),e[6]=a,e[7]=d,e[8]=c):c=e[8],c}function Kl(t){const e=z.c(6),{virtualMcpId:n,size:l}=t,o=gt(n);if(!o){let a;return e[0]!==l?(a=s.jsx(be,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const i=o.icon??null;let r;return e[2]!==o.title||e[3]!==l||e[4]!==i?(r=s.jsx(be,{icon:i,name:o.title,size:l}),e[2]=o.title,e[3]=l,e[4]=i,e[5]=r):r=e[5],r}function Dt(t){const e=z.c(53),{open:n,onOpenChange:l}=t,[o,i]=G.useState(""),{org:r}=J(),{setTaskId:a}=jt(),d=xs(),c=B();let m,u,f;e[0]!==r.id||e[1]!==o?(f=o.trim(),u=Ks,m=Wt.globalSearch(r.id,f),e[0]=r.id,e[1]=o,e[2]=m,e[3]=u,e[4]=f):(m=e[2],u=e[3],f=e[4]);const p=n&&f.length>0;let h;e[5]!==d||e[6]!==f?(h=async()=>await d.call("GLOBAL_SEARCH",{query:f,limit:20}),e[5]=d,e[6]=f,e[7]=h):h=e[7];let g;e[8]!==m||e[9]!==p||e[10]!==h?(g={queryKey:m,enabled:p,queryFn:h,staleTime:1e4},e[8]=m,e[9]=p,e[10]=h,e[11]=g):g=e[11];const{data:x,isFetching:b}=u(g);let j;e[12]!==x?.items?(j=x?.items??[],e[12]=x?.items,e[13]=j):j=e[13];const S=j;let y;e[14]!==l?(y=E=>{E||i(""),l(E)},e[14]=l,e[15]=y):y=e[15];const v=y;let C;e[16]!==v||e[17]!==a?(C=E=>{v(!1),a(E.id,E.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=C):C=e[18];const N=C;let _;e[19]!==c?(_=c("tasksPanel.globalSearchDialog.title"),e[19]=c,e[20]=_):_=e[20];let w;e[21]!==_?(w=s.jsx(ft,{children:_}),e[21]=_,e[22]=w):w=e[22];let I;e[23]!==c?(I=c("tasksPanel.globalSearchDialog.description"),e[23]=c,e[24]=I):I=e[24];let $;e[25]!==I?($=s.jsx(Qt,{children:I}),e[25]=I,e[26]=$):$=e[26];let k;e[27]!==w||e[28]!==$?(k=s.jsxs(Jt,{className:"sr-only",children:[w,$]}),e[27]=w,e[28]=$,e[29]=k):k=e[29];let O;e[30]!==c?(O=c("tasksPanel.globalSearchDialog.placeholder"),e[30]=c,e[31]=O):O=e[31];let A;e[32]!==o||e[33]!==O?(A=s.jsx(Co,{value:o,onValueChange:i,placeholder:O}),e[32]=o,e[33]=O,e[34]=A):A=e[34];let M;e[35]!==N||e[36]!==b||e[37]!==S||e[38]!==c||e[39]!==f?(M=f?b&&S.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.searching")}):S.length===0?s.jsx(So,{children:c("tasksPanel.globalSearchDialog.noResults")}):S.map(E=>E.type==="thread"?s.jsxs(_o,{value:`thread:${E.id}:${E.title}`,onSelect:()=>N(E),className:"gap-2.5",children:[s.jsx(Wl,{virtualMcpId:E.virtual_mcp_id,size:"xs"}),s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("div",{className:"text-sm text-foreground truncate",children:E.title||c("tasksPanel.globalSearchDialog.untitledChat")})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(E.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${E.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:c("tasksPanel.globalSearchDialog.startTyping")}),e[35]=N,e[36]=b,e[37]=S,e[38]=c,e[39]=f,e[40]=M):M=e[40];let F;e[41]!==M?(F=s.jsx(No,{children:M}),e[41]=M,e[42]=F):F=e[42];let R;e[43]!==A||e[44]!==F?(R=s.jsxs(wo,{shouldFilter:!1,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:[A,F]}),e[43]=A,e[44]=F,e[45]=R):R=e[45];let D;e[46]!==k||e[47]!==R?(D=s.jsxs(Xt,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[k,R]}),e[46]=k,e[47]=R,e[48]=D):D=e[48];let T;return e[49]!==v||e[50]!==n||e[51]!==D?(T=s.jsx(pt,{open:n,onOpenChange:v,children:D}),e[49]=v,e[50]=n,e[51]=D,e[52]=T):T=e[52],T}function ql(t){return t==="ephemeral"||t.startsWith("thread:")}function ws(t){const e=z.c(45),{task:n,isActive:l,onClick:o,onArchive:i,showAutomationBadge:r,showAgentIcon:a,hideStatusIdle:d,indented:c}=t,m=B(),u=Io(n.status),f=u.icon,p=n.metadata?.kind==="tool_call_run",h=gt(p?void 0:n.virtual_mcp_id);let g;e[0]!==h?(g=so(h),e[0]=h,e[1]=g):g=e[1];const x=g;zo(6e4);const b=r||!!n.trigger_id,j=n.id,S="button",y=0;let v;e[2]!==o?(v=H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),o())},e[2]=o,e[3]=v):v=e[3];const C=c?"-ml-4 pl-6":"pl-[7px]",N=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let _;e[4]!==C||e[5]!==N?(_=U("group/row flex items-center gap-2 py-1.5 rounded-md cursor-pointer transition-colors",C,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",N),e[4]=C,e[5]=N,e[6]=_):_=e[6];let w;e[7]!==p||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(w=a&&!p&&s.jsx(be,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=p,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=w):w=e[11];let I;e[12]!==b||e[13]!==m?(I=b&&s.jsx(gs,{size:12,"aria-label":m("tasksPanel.taskRow.automationTriggered"),className:"shrink-0 text-blue-500"}),e[12]=b,e[13]=m,e[14]=I):I=e[14];let $;e[15]!==m||e[16]!==n.title?($=n.title||m("tasksPanel.taskRow.untitledTask"),e[15]=m,e[16]=n.title,e[17]=$):$=e[17];let k;e[18]!==$?(k=s.jsx("div",{className:"text-sm text-foreground truncate",children:$}),e[18]=$,e[19]=k):k=e[19];let O;e[20]!==I||e[21]!==k?(O=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[I,k]}),e[20]=I,e[21]=k,e[22]=O):O=e[22];let A;e[23]!==x||e[24]!==l||e[25]!==n.branch||e[26]!==n.updated_at?(A=n.updated_at&&s.jsxs("div",{className:U("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!ql(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):x?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[x.owner,"/",x.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Oo(new Date(n.updated_at))})]}),e[23]=x,e[24]=l,e[25]=n.branch,e[26]=n.updated_at,e[27]=A):A=e[27];let M;e[28]!==O||e[29]!==A?(M=s.jsxs("div",{className:"flex-1 min-w-0",children:[O,A]}),e[28]=O,e[29]=A,e[30]=M):M=e[30];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",R=!d&&s.jsx("span",{className:U("[grid-area:slot] flex size-8 items-center justify-center pointer-events-none transition-opacity",i&&"group-hover/row:opacity-0"),"aria-label":m("tasksPanel.taskRow.statusLabel",{status:u.label}),children:s.jsx(f,{size:14,className:U(u.iconClassName,n.status==="in_progress"&&"animate-spin")})});let D;e[31]!==i||e[32]!==m?(D=i&&s.jsxs(he,{children:[s.jsx(fe,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":m("tasksPanel.taskRow.archiveTask"),onClick:H=>{H.stopPropagation(),i()},className:"[grid-area:slot] opacity-0 pointer-events-none group-hover/row:opacity-100 group-hover/row:pointer-events-auto focus-visible:opacity-100 focus-visible:pointer-events-auto transition-opacity flex size-8 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50",children:s.jsx(qs,{size:14})})}),s.jsx(pe,{side:"right",children:m("tasksPanel.taskRow.archive")})]}),e[31]=i,e[32]=m,e[33]=D):D=e[33];let T;e[34]!==R||e[35]!==D?(T=s.jsxs("div",{className:F,children:[R,D]}),e[34]=R,e[35]=D,e[36]=T):T=e[36];let E;return e[37]!==o||e[38]!==M||e[39]!==T||e[40]!==v||e[41]!==_||e[42]!==w||e[43]!==n.id?(E=s.jsxs("div",{"data-task-id":j,role:S,tabIndex:y,onClick:o,onKeyDown:v,className:_,children:[w,M,T]}),e[37]=o,e[38]=M,e[39]=T,e[40]=v,e[41]=_,e[42]=w,e[43]=n.id,e[44]=E):E=e[44],E}const Et=["requires_action","in_progress","failed","expired","completed"];function Vl(t){const e=new Map(Et.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Et.map(n=>({status:n,threads:e.get(n)}))}const Yl="sidebar.group.expanded.";function Xl(t,e){const n=z.c(3),[l,o]=Ge(`${Yl}${t}`,e);let i;return n[0]!==l||n[1]!==o?(i=[l,o],n[0]=l,n[1]=o,n[2]=i):i=n[2],i}function ks(t){const e=z.c(18),{onClick:n,isFetching:l,indented:o}=t,i=B();let r;e[0]!==i?(r=i("sidebar.showMoreButton.ariaLabel"),e[0]=i,e[1]=r):r=e[1];const a=o?"-ml-4 pl-6 pr-2":"px-2";let d;e[2]!==a?(d=U("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",a,"hover:bg-accent/60 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50","transition-colors disabled:cursor-progress disabled:opacity-60"),e[2]=a,e[3]=d):d=e[3];let c;e[4]!==l?(c=l&&s.jsx(Kt,{size:14,className:"animate-spin"}),e[4]=l,e[5]=c):c=e[5];let m;e[6]!==l||e[7]!==i?(m=i(l?"sidebar.showMoreButton.loading":"sidebar.showMoreButton.showMore"),e[6]=l,e[7]=i,e[8]=m):m=e[8];let u;e[9]!==m?(u=s.jsx("span",{children:m}),e[9]=m,e[10]=u):u=e[10];let f;return e[11]!==l||e[12]!==n||e[13]!==r||e[14]!==d||e[15]!==c||e[16]!==u?(f=s.jsxs("button",{type:"button","aria-label":r,onClick:n,disabled:l,className:d,children:[c,u]}),e[11]=l,e[12]=n,e[13]=r,e[14]=d,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ql(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function Jl(t){return t.member==="mine"&&!t.currentUserId}const As=4;let Fe=0;const rt=[];function Zl(){for(;Fe<As&&rt.length>0;){const t=rt.shift();t&&t()}}function Is(t){return new Promise((e,n)=>{const l=()=>{Fe++,t().then(e,n).finally(()=>{Fe--,Zl()})};Fe<As?l():rt.push(l)})}const Ye=10;function Ft(t,e,n,l,o){const i={hidden:!1};l.member==="mine"&&l.currentUserId&&(i.created_by=l.currentUserId),l.type==="automation"&&(i.has_trigger=!0),l.type==="manual"&&(i.has_trigger=!1);const r={where:i,limit:o,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return r.status=e,r}function ei(t,e,n,l){let o=0;for(const i of t)zs(i,e,n,l)&&o++;return o}function et(t,e,n,l){return ei(t,e,n,l)}function ti(t,e){return!!(t>=Ye||t===0&&e)}function Rt(t,e){return t<e}function si(t,e){return e===!1?!1:e===!0?!0:t}function zs(t,e,n,l){return!(t.hidden||(t.status??"completed")!==n||l.member==="mine"&&l.currentUserId&&t.created_by!==l.currentUserId||l.type==="automation"&&!t.trigger_id||l.type==="manual"&&t.trigger_id)}const Le=new Map,Ee=new Map;function ni(t,e){return e?t>=Ye?!0:null:!1}function Lt(t){return Le.get(t)}function oi(t,e){Le.set(t,e)}function li(t,e,n){const l=Le.get(t);if(l!==void 0){n(l);return}let o=Ee.get(t);o||(o=Is(e).then(i=>(Le.set(t,i),Ee.delete(t),i)).catch(()=>(Ee.delete(t),Promise.reject(new Error("group probe failed")))),Ee.set(t,o)),o.then(n,()=>n(!1))}function Gt(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ye,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function ii(t,e,n,l,o){let i=0;for(const r of t)e.has(r.id)||zs(r,n,l,o)&&i++;return i}function ri(t,e,n,l){const o=z.c(8),{org:i}=J(),r=Ql(i.id,t,e,n);let a;o[0]!==n?(a=Jl(n),o[0]=n,o[1]=a):a=o[1];const d=a,[c,m]=G.useState({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==r&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:null,serverHasMore:null});const u=Wn(),{threads:f,hasMore:p}=bt(),h=et(f,t,e,n),g=ti(h,p),x=ni(h,p),b=xs();if(c.identity===r&&c.serverHasMore===null){const N=x??Lt(r);N!==void 0&&m({isFetching:!1,isProbing:!1,identity:r,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!d&&c.identity===r&&c.serverHasMore===null&&x===null&&Lt(r)===void 0&&c.probeSubscribedIdentity!==r&&(m(N=>N.identity===r?{...N,isProbing:!0,probeSubscribedIdentity:r}:N),li(r,async()=>{const N=Ft(t,e,0,n,1),_=await b.call("COLLECTION_THREADS_LIST",N),{totalCount:w}=Gt(_),I=et(u.threads.get(),t,e,n);return w===void 0?!1:Rt(I,w)},N=>{m(_=>_.identity!==r?_:{..._,isProbing:!1,serverHasMore:N})}));const S=async function(){if(c.isFetching||c.isProbing||d)return;const _=r;m(w=>w.identity===_?{...w,isFetching:!0}:w);try{const w=et(f,t,e,n),I=Ft(t,e,w,n,Ye),$=await Is(()=>b.call("COLLECTION_THREADS_LIST",I)),{items:k,hasMore:O,totalCount:A}=Gt($),M=new Set(f.map(ai)),F=ii(k,M,t,e,n),R=w;u.mergeThreads(k),m(D=>{if(D.identity!==_)return D;let T;return A!==void 0?T=Rt(R+F,A):T=k.length===0||F===0?!1:O,oi(_,T),{...D,isFetching:!1,serverHasMore:T}})}catch(w){const I=w,$=I instanceof Error?I.message:String(I);ee.error(`Could not load more tasks: ${$}`),m(k=>k.identity===_?{...k,isFetching:!1}:k)}},y=c.isFetching||c.isProbing,v=!d&&!y&&si(g,c.serverHasMore);let C;return o[2]!==y||o[3]!==S||o[4]!==v||o[5]!==c.isProbing||o[6]!==c.serverHasMore?(C={hasMore:v,isFetching:y,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:S},o[2]=y,o[3]=S,o[4]=v,o[5]=c.isProbing,o[6]=c.serverHasMore,o[7]=C):C=o[7],C}function ai(t){return t.id}function ci(t){const e=z.c(20),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,{isFetching:c,isProbing:m,loadMore:u,hasMore:f,serverHasMore:p}=ri("status",n,d),[h,g]=G.useState(!1);!h&&l.length===0&&p===!0&&!c&&!m&&(g(!0),queueMicrotask(()=>{u()}));let x;if(e[0]!==o||e[1]!==a||e[2]!==d||e[3]!==r||e[4]!==i||e[5]!==l){let S;e[7]!==o||e[8]!==a||e[9]!==d||e[10]!==r||e[11]!==i?(S=y=>s.jsx(ws,{task:y,isActive:o===y.id,onClick:()=>i(y),onArchive:a&&y.created_by===d.currentUserId?()=>r(y):void 0,showAutomationBadge:!!y.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},y.id),e[7]=o,e[8]=a,e[9]=d,e[10]=r,e[11]=i,e[12]=S):S=e[12],x=l.map(S),e[0]=o,e[1]=a,e[2]=d,e[3]=r,e[4]=i,e[5]=l,e[6]=x}else x=e[6];let b;e[13]!==f||e[14]!==c||e[15]!==u?(b=(f||c)&&s.jsx(ks,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=b):b=e[16];let j;return e[17]!==x||e[18]!==b?(j=s.jsxs(s.Fragment,{children:[x,b]}),e[17]=x,e[18]=b,e[19]=j):j=e[19],j}function di(t){const e=z.c(36),{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d}=t,c=$o[n],m=c.icon,[u,f]=Xl(`status-${n}`,!1);let p;e[0]!==u||e[1]!==f?(p=function(){f(!u)},e[0]=u,e[1]=f,e[2]=p):p=e[2];const h=p;let g;e[3]!==h?(g=_=>{_.target===_.currentTarget&&(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),h())},e[3]=h,e[4]=g):g=e[4];let x;e[5]!==m||e[6]!==c.iconClassName?(x=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(m,{size:12,className:c.iconClassName})}),e[5]=m,e[6]=c.iconClassName,e[7]=x):x=e[7];let b;e[8]!==u?(b=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-muted-foreground opacity-0 transition-opacity group-hover/group:opacity-100",children:u?s.jsx(xt,{size:14}):s.jsx(Mo,{size:14})}),e[8]=u,e[9]=b):b=e[9];let j;e[10]!==x||e[11]!==b?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[x,b]}),e[10]=x,e[11]=b,e[12]=j):j=e[12];let S;e[13]!==c.label?(S=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=S):S=e[14];let y;e[15]!==l.length?(y=s.jsx("div",{className:"size-5 shrink-0 flex items-center justify-center",children:s.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:l.length})}),e[15]=l.length,e[16]=y):y=e[16];let v;e[17]!==u||e[18]!==h||e[19]!==g||e[20]!==j||e[21]!==S||e[22]!==y?(v=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:h,onKeyDown:g,className:"group/group flex items-center gap-2 px-2 py-1.5 rounded-md text-sm font-medium text-foreground cursor-pointer hover:bg-accent/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 transition-colors",children:[j,S,y]}),e[17]=u,e[18]=h,e[19]=g,e[20]=j,e[21]=S,e[22]=y,e[23]=v):v=e[23];let C;e[24]!==o||e[25]!==a||e[26]!==u||e[27]!==d||e[28]!==r||e[29]!==i||e[30]!==n||e[31]!==l?(C=u&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:s.jsx(ci,{status:n,threads:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:a,filters:d})}),e[24]=o,e[25]=a,e[26]=u,e[27]=d,e[28]=r,e[29]=i,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==v||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[v,C]}),e[33]=v,e[34]=C,e[35]=N):N=e[35],N}function Bt(t){const e=z.c(38),{threads:n,groupBy:l,activeTaskId:o,onSelectTask:i,onArchiveTask:r,filters:a,hasMore:d,isFetchingMore:c,onLoadMore:m,filtersActive:u}=t;if(n.length===0&&!d&&!c){let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ao,{className:"size-6 opacity-60"}),e[0]=x):x=e[0];const b=u?"No chats match your filters":"No chats yet";let j;return e[1]!==b?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[x,s.jsx("p",{className:"text-sm",children:b})]}),e[1]=b,e[2]=j):j=e[2],j}const f=n.length>1||d;if(l==="status"){let x;if(e[3]!==o||e[4]!==f||e[5]!==a||e[6]!==r||e[7]!==i||e[8]!==n){let j;e[10]!==o||e[11]!==f||e[12]!==a||e[13]!==r||e[14]!==i?(j=S=>s.jsx(di,{status:S.status,threads:S.threads,activeTaskId:o,onSelectTask:i,onArchiveTask:r,canArchive:f,filters:a},S.status),e[10]=o,e[11]=f,e[12]=a,e[13]=r,e[14]=i,e[15]=j):j=e[15],x=Vl(n).map(j),e[3]=o,e[4]=f,e[5]=a,e[6]=r,e[7]=i,e[8]=n,e[9]=x}else x=e[9];let b;return e[16]!==x?(b=s.jsx(s.Fragment,{children:x}),e[16]=x,e[17]=b):b=e[17],b}let p;if(e[18]!==o||e[19]!==f||e[20]!==a||e[21]!==r||e[22]!==i||e[23]!==n){let x;e[25]!==o||e[26]!==f||e[27]!==a||e[28]!==r||e[29]!==i?(x=b=>s.jsx(ws,{task:b,isActive:o===b.id,onClick:()=>i(b),onArchive:f&&b.created_by===a.currentUserId?()=>r(b):void 0,showAutomationBadge:!!b.trigger_id,showAgentIcon:!0},b.id),e[25]=o,e[26]=f,e[27]=a,e[28]=r,e[29]=i,e[30]=x):x=e[30],p=n.map(x),e[18]=o,e[19]=f,e[20]=a,e[21]=r,e[22]=i,e[23]=n,e[24]=p}else p=e[24];let h;e[31]!==d||e[32]!==c||e[33]!==m?(h=(d||c)&&s.jsx(ks,{onClick:m,isFetching:c}),e[31]=d,e[32]=c,e[33]=m,e[34]=h):h=e[34];let g;return e[35]!==p||e[36]!==h?(g=s.jsxs(s.Fragment,{children:[p,h]}),e[35]=p,e[36]=h,e[37]=g):g=e[37],g}function mi(t,e,n){if(!n)return;const l=t.findIndex(o=>o.id===e);if(l!==-1){for(let o=l+1;o<t.length;o++){const i=t[o];if(i?.created_by===n)return i}for(let o=l-1;o>=0;o--){const i=t[o];if(i?.created_by===n)return i}}}function Ht(t){const e=z.c(17),{label:n,onClick:l,active:o,children:i}=t,[r,a]=G.useState(!1);let d,c,m,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=()=>a(!0),c=()=>a(!1),m=()=>a(!0),u=()=>a(!1),e[0]=d,e[1]=c,e[2]=m,e[3]=u):(d=e[0],c=e[1],m=e[2],u=e[3]);const f=o&&"bg-sidebar-accent text-foreground";let p;e[4]!==f?(p=U("md:size-[34px] rounded-lg",f),e[4]=f,e[5]=p):p=e[5];let h;e[6]!==i||e[7]!==n||e[8]!==l||e[9]!==p?(h=s.jsx(fe,{asChild:!0,children:s.jsx(je,{"aria-label":n,onClick:l,onPointerEnter:d,onPointerLeave:c,onFocus:m,onBlur:u,className:p,children:i})}),e[6]=i,e[7]=n,e[8]=l,e[9]=p,e[10]=h):h=e[10];let g;e[11]!==n?(g=s.jsx(pe,{side:"bottom",children:n}),e[11]=n,e[12]=g):g=e[12];let x;return e[13]!==r||e[14]!==h||e[15]!==g?(x=s.jsxs(he,{open:r,children:[h,g]}),e[13]=r,e[14]=h,e[15]=g,e[16]=x):x=e[16],x}function tt(t){const e=z.c(13),{label:n,value:l,onChange:o,options:i}=t;let r;e[0]!==n?(r=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==o?(a=u=>u&&o(u),e[2]=o,e[3]=a):a=e[3];let d;e[4]!==i?(d=i.map(ui),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==a||e[7]!==d||e[8]!==l?(c=s.jsx(yo,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:d}),e[6]=a,e[7]=d,e[8]=l,e[9]=c):c=e[9];let m;return e[10]!==r||e[11]!==c?(m=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r,c]}),e[10]=r,e[11]=c,e[12]=m):m=e[12],m}function ui(t){return s.jsxs(vo,{value:t.value,className:"h-6 gap-1.5 rounded-md border border-transparent px-2 text-xs font-medium text-muted-foreground hover:bg-transparent data-[state=on]:border-border data-[state=on]:bg-background data-[state=on]:text-foreground data-[state=on]:shadow-sm",children:[t.icon,t.label]},t.value)}function $s({onNavigate:t}={}){const e=B(),{data:n}=oe.useSession(),l=n?.user?.id,{org:o}=J(),i=es({connectionId:ts,orgId:o.id,orgSlug:o.slug}),r=Re(o.id).id,a=os(),{threads:d,hasMore:c,isFetchingMore:m,fetchNextPage:u}=bt(),f=d.filter(P=>!P.hidden),{hide:p,setScope:h}=ms(),g=ie(),{setTaskId:x,createNewTask:b}=jt(),j=ct({strict:!1}),S=Be({strict:!1}),y=j.taskId??null,v=S.virtualmcpid??d.find(P=>P.id===y)?.virtual_mcp_id??null,C=()=>{t?.()},N=[...f].sort((P,K)=>(K.updated_at??"").localeCompare(P.updated_at??"")),[_,w]=G.useState("all"),[I,$]=G.useState("flat"),[k,O]=Ge("sidebar-threads-scope-all",!1),[A,M]=G.useState(!1),[F,R]=G.useState(!1),D={type:_,member:"mine",currentUserId:l??null},T={};k||(T.created_by="me"),h(T);const E=P=>l?P.filter(K=>K.created_by===l):[],H=P=>_==="automation"?P.filter(K=>!!K.trigger_id):_==="manual"?P.filter(K=>!K.trigger_id):P,q=E(N),L=H(q),se=H(N),me=k?se:L,re=P=>{if(l&&P.created_by&&P.created_by!==l)return;const K=P.id===y;if(p(P.id),Vn(P.id),!K)return;const X=mi(me,P.id,l);C(),X?x(X.id,X.virtual_mcp_id):g({to:"/$org",params:{org:o.slug}})},ue=P=>{C(),x(P.id,P.virtual_mcp_id)},ve=async P=>{try{const K=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:P,limit:1,offset:0}});return((K.structuredContent??K).items?.length??0)===0}catch{return!1}},ye=async()=>{const P=v??r;Y("sidebar_new_thread_clicked",{virtual_mcp_id:P});const K=q.find(X=>X.virtual_mcp_id===P&&X.title==="New chat");if(K&&await ve(K.id)){C(),x(K.id,P);return}C(),b(P)},{state:Se,isMobile:_e,toggleSidebar:Ce}=de();if(Se==="collapsed"&&!_e){const P=Re(o.id),K=new Map((a??[]).map(V=>[V.id,V])),X=V=>(V?K.get(V):void 0)??(V===r?P:void 0);return s.jsxs("div",{className:"flex flex-col min-h-0 flex-1 -mt-1 w-[calc(var(--sidebar-width-icon)-1rem)]",children:[s.jsx("div",{className:"flex h-12 shrink-0 items-center justify-center",children:s.jsx(Cs,{orgParam:o.slug,side:"right",align:"start",trigger:s.jsx(Q,{tooltip:o.name,children:s.jsx(qe,{org:o,size:"sm"})})})}),s.jsxs(te,{className:"mt-2 min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(W,{children:s.jsx(Q,{"aria-label":e("sidebar.taskGroupsList.toggleSidebar"),tooltip:e("sidebar.taskGroupsList.toggleSidebar"),onClick:Ce,children:s.jsx(ss,{size:16})})}),s.jsx(W,{children:s.jsx(Q,{"aria-label":e("sidebar.taskGroupsList.newChat"),tooltip:e("sidebar.taskGroupsList.newChat"),onClick:()=>{ye()},children:s.jsx(_t,{size:16})})}),me.map(V=>{const ge=X(V.virtual_mcp_id);return s.jsx(W,{children:s.jsx(Q,{"aria-label":V.title||e("sidebar.taskGroupsList.newChat"),tooltip:V.title||e("sidebar.taskGroupsList.newChat"),isActive:V.id===y,onClick:()=>ue(V),children:s.jsx(be,{icon:ge?.icon??null,name:ge?.title??"Agent",size:"xs"})})},V.id)})]})]})}const ne=I!=="flat"||_!=="all"||k===!0,Ne=s.jsxs(Ue,{children:[s.jsxs(he,{children:[s.jsx(fe,{asChild:!0,children:s.jsx(ke,{asChild:!0,children:s.jsxs(je,{"aria-label":e("sidebar.taskGroupsList.filterChats"),active:ne,className:"md:size-[34px] rounded-lg",children:[s.jsx(jo,{size:16}),ne&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(pe,{side:"bottom",children:e("sidebar.taskGroupsList.filterChats")})]}),s.jsxs(He,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(tt,{label:e("sidebar.taskGroupsList.filterView"),value:I,onChange:P=>{Y("tasks_panel_group_by_changed",{to_value:P}),$(P)},options:[{value:"flat",label:e("sidebar.taskGroupsList.viewList"),icon:s.jsx(yn,{size:13})},{value:"status",label:e("sidebar.taskGroupsList.viewStatus"),icon:s.jsx(Sn,{size:13})}]}),s.jsx(tt,{label:e("sidebar.taskGroupsList.filterType"),value:_,onChange:P=>{Y("tasks_panel_filter_changed",{to_value:P}),w(P)},options:[{value:"all",label:e("sidebar.taskGroupsList.typeAll")},{value:"manual",label:e("sidebar.taskGroupsList.typeChats")},{value:"automation",label:e("sidebar.taskGroupsList.typeAuto")}]}),s.jsx(tt,{label:e("sidebar.taskGroupsList.filterScope"),value:k?"team":"mine",onChange:P=>O(P==="team"),options:[{value:"mine",label:e("sidebar.taskGroupsList.scopeMine")},{value:"team",label:e("sidebar.taskGroupsList.scopeTeam")}]})]})]}),ae=P=>s.jsx(ns,{delayDuration:300,children:s.jsxs("div",{className:U("shrink-0 flex items-center justify-between",P?"h-10":"h-10 md:h-[34px] mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!P&&s.jsx(bs,{className:"md:size-[34px] rounded-lg"}),Ne]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(Ht,{label:e("sidebar.taskGroupsList.searchChats"),onClick:()=>{Y("tasks_panel_search_opened"),R(!0),M(!0)},children:s.jsx(_n,{size:16})}),s.jsx(Ht,{label:e("sidebar.taskGroupsList.newChat"),onClick:()=>{ye()},children:s.jsx(_t,{size:16})})]})]})});return _e?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ae(!0),s.jsx(Pt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain px-1 h-full",children:s.jsx(Bt,{threads:me,groupBy:I,activeTaskId:y,onSelectTask:ue,onArchiveTask:re,filters:D,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:ne})}),F&&s.jsx(Dt,{open:A,onOpenChange:M})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[ae(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Pt,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Bt,{threads:me,groupBy:I,activeTaskId:y,onSelectTask:ue,onArchiveTask:re,filters:D,hasMore:c,isFetchingMore:m,onLoadMore:()=>{u()},filtersActive:ne})})}),F&&s.jsx(Dt,{open:A,onOpenChange:M})]})}const fi=5,pi=[{nameWidth:"w-24",taskRows:2},{nameWidth:"w-28",taskRows:0},{nameWidth:"w-20",taskRows:1},{nameWidth:"w-32",taskRows:0},{nameWidth:"w-24",taskRows:0}];function Os(){const t=z.c(3),{state:e}=de();if(e==="collapsed"){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:fi}).map(gi)}),t[0]=o):o=t[0],o}let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"shrink-0 px-1 h-10 md:h-7 mb-2 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"}),s.jsx(le,{className:"size-6 rounded-md"})]}),s.jsx(le,{className:"h-6 w-20 rounded-md"})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[n,s.jsx("div",{className:"flex flex-col gap-0.5",children:pi.map(hi)})]}),t[2]=l):l=t[2],l}function hi(t,e){return s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5",children:[s.jsx(le,{className:"size-5 rounded-full shrink-0"}),s.jsx(le,{className:U("h-3",t.nameWidth,"rounded-sm")})]}),t.taskRows>0&&s.jsx("div",{className:"flex flex-col gap-0.5 pb-1 pl-4",children:Array.from({length:t.taskRows}).map(xi)})]},e)}function xi(t,e){return s.jsx("div",{className:"flex items-center gap-2 px-2 py-1.5",children:s.jsx(le,{className:"h-3 flex-1 rounded-sm"})},e)}function gi(t,e){return s.jsx(le,{className:"size-10 rounded-lg mx-auto"},e)}function bi(){const t=z.c(2);if(Ke()){let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(it,{showName:!0}),t[0]=l):l=t[0],l}let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(s.Fragment,{children:[s.jsx(it,{}),s.jsx(Ve,{})]}),t[1]=n):n=t[1],n}function ji(){const t=z.c(5),e=js();let n,l;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Hl,{}),l=s.jsx(bi,{}),t[0]=n,t[1]=l):(n=t[0],l=t[1]);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(at,{children:s.jsx(G.Suspense,{fallback:s.jsx(Os,{}),children:s.jsx($s,{})})}),t[2]=o):o=t[2];let i;return t[3]!==e?(i=s.jsx(us,{children:s.jsx(Ss,{sections:e,footer:n,header:l,additionalContent:o})}),t[3]=e,t[4]=i):i=t[4],i}function vi(t){const e=z.c(8),{onClose:n}=t,l=js();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ul,{}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Os,{}),e[1]=i):i=e[1];let r;e[2]!==n?(r=s.jsx(at,{children:s.jsx(G.Suspense,{fallback:i,children:s.jsx($s,{onNavigate:n})})}),e[2]=n,e[3]=r):r=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==r?(a=s.jsx(us,{children:s.jsx(Nl,{sections:l,onClose:n,footer:o,additionalContent:r})}),e[4]=n,e[5]=l,e[6]=r,e[7]=a):a=e[7],a}const yi="sidebar.open";function Si(){const t=z.c(1),{state:e}=de(),n=Ke();if(e!=="collapsed"||n)return null;let l;return t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ve,{}),t[0]=l):l=t[0],l}function _i(){const t=z.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ys,{}),t[0]=e):e=t[0],e}function Ua(){const t=z.c(43),e=ut(),n=Ke();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},t[0]=l):l=t[0];const{connect:o,siteUrl:i}=Be(l),r=o==="1",[a,d]=Ge(yi,!1),{width:c,wrapperRef:m,onStartResize:u,resetWidth:f}=Bo(),p=!e;let h,g;t[1]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsxs(Z.LeftColumn,{children:[s.jsx(Si,{}),s.jsx(Z.TogglesSlot,{})]}),g=s.jsx(Z.CenterSlot,{}),t[1]=h,t[2]=g):(h=t[1],g=t[2]);let x;t[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs(Z.Header,{children:[h,g,s.jsxs(Z.RightColumn,{children:[s.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end items-center gap-0.5",children:s.jsx(Z.TabsSlot,{})}),s.jsx(Z.RightSlot,{})]})]}),t[3]=x):x=t[3];const b=x;let j;t[4]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(bs,{}),t[4]=j):j=t[4];let S;t[5]!==n?(S=!n&&s.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:s.jsx(Ve,{})}),t[5]=n,t[6]=S):S=t[6];let y,v,C,N,_;t[7]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx($e,{}),C=s.jsx(Z.TogglesSlot,{}),N=s.jsx(Z.TabsSlot,{className:"shrink-0"}),_=s.jsx(Z.CenterSlot,{}),y=s.jsx(Z.RightSlot,{}),t[7]=y,t[8]=v,t[9]=C,t[10]=N,t[11]=_):(y=t[7],v=t[8],C=t[9],N=t[10],_=t[11]);let w;t[12]!==S?(w=s.jsx(Z.Header,{className:"grid-cols-1 px-1",children:s.jsxs("div",{className:"flex w-full min-w-0 items-center gap-1",children:[j,S,v,C,N,_,y]})}),t[12]=S,t[13]=w):w=t[13];const I=w;let $;t[14]===Symbol.for("react.memo_cache_sentinel")?($={background:"transparent",containerType:"inline-size"},t[14]=$):$=t[14];let k;t[15]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Js,{className:"flex flex-col min-h-0",style:$,children:s.jsx("div",{className:"flex flex-col h-full min-h-0",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:s.jsx(G.Suspense,{fallback:s.jsx(_i,{}),children:s.jsx(Vs,{})})})})}),t[15]=k):k=t[15];const O=k,A=!p&&(e?I:b),M=`${c}px`;let F;t[16]!==M?(F={"--sidebar-width":M,"--sidebar-width-icon":"3.125rem"},t[16]=M,t[17]=F):F=t[17];const R=F;let D;t[18]!==e||t[19]!==u||t[20]!==f?(D=!e&&s.jsxs(s.Fragment,{children:[s.jsx(ji,{}),s.jsx(Ro,{onPointerDown:u,onDoubleClick:f})]}),t[18]=e,t[19]=u,t[20]=f,t[21]=D):D=t[21];let T;t[22]!==p?(T=p?s.jsxs("div",{className:"flex flex-col flex-1 min-w-0 min-h-0 h-full",children:[b,O]}):O,t[22]=p,t[23]=T):T=t[23];let E;t[24]!==R||t[25]!==D||t[26]!==T||t[27]!==m?(E=s.jsxs(Zs,{ref:m,className:"flex-1 bg-sidebar relative min-h-0",style:R,children:[D,T]}),t[24]=R,t[25]=D,t[26]=T,t[27]=m,t[28]=E):E=t[28];let H;t[29]!==e?(H=e&&s.jsx(ko,{renderSidebar:Ci}),t[29]=e,t[30]=H):H=t[30];let q;t[31]!==i||t[32]!==r?(q=r&&s.jsx(To,{siteUrl:i}),t[31]=i,t[32]=r,t[33]=q):q=t[33];let L;t[34]!==A||t[35]!==E||t[36]!==H||t[37]!==q?(L=s.jsx(Bn,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[A,E,H,q]})}),t[34]=A,t[35]=E,t[36]=H,t[37]=q,t[38]=L):L=t[38];let se;return t[39]!==d||t[40]!==a||t[41]!==L?(se=s.jsx(Kn,{children:s.jsx(Z.Provider,{children:s.jsx(en,{open:a,onOpenChange:d,children:L})})}),t[39]=d,t[40]=a,t[41]=L,t[42]=se):se=t[42],se}function Ci(t){const{onClose:e}=t;return s.jsx("div",{className:"flex h-full",children:s.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:s.jsx(vi,{onClose:e})})})}export{Ua as default};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bnc4IoFE.js","assets/index-CmUMOI85.js","assets/index-BfpiUr3Z.css","assets/ArrowUp-B_NkVhQy.js","assets/chat-context-B9cQc_h3.js","assets/autosend-CrLNAcK4.js","assets/hooks-v_4liDIo.js","assets/use-mcp-client-FpSZFiJp.js","assets/auth-D3hjVX0I.js","assets/decopilot-sse-pool-DNUfg0HV.js","assets/backoff-CrEUbyZT.js","assets/delay-CnY5UFtP.js","assets/studio-tools-BVRXDcEz.js","assets/use-virtual-mcp-BO12Buo0.js","assets/use-ai-providers-DB0PWqc_.js","assets/location-BpLtHjTZ.js","assets/tab-id-BijBBRwE.js","assets/use-decopilot-events-Bp76K5aB.js","assets/use-organization-settings-CNDPvDWL.js","assets/automation-runs-jf4CQyxT.js","assets/select-DQl8Nkd-.js","assets/tooltip-DLvHocW9.js","assets/Check-CmXcFUFA.js","assets/ChevronDown-BU2ru4r_.js","assets/ChevronUp-3FMqPib6.js","assets/useInfiniteQuery-C3F84whK.js","assets/use-infinite-scroll-UBZNLC2q.js","assets/use-connection-BvbWEpu1.js","assets/card-DeRX92PE.js","assets/sidebar-CCp56Env.js","assets/LayoutLeft-CxYJNTGI.js","assets/use-mobile-Bwjx_QMs.js","assets/X-CAmHDMPk.js","assets/table-zJH1gBbm.js","assets/empty-state-BoA_YW3D.js","assets/use-members-CUYuiUkk.js","assets/use-org-auth-client-B6uCBHg4.js","assets/use-clock-tick-DeftYEin.js","assets/AlertCircle-C_nk91tH.js","assets/CheckCircle-GzoutZzh.js","assets/DotsVertical-BXRC3vMY.js","assets/agent-icon-VQci6jYK.js","assets/Tool01-DE3j460t.js","assets/Settings02-DU8SxETa.js","assets/Tool02-BQUR2DKB.js","assets/ArrowRight-x5eFsUyE.js","assets/ArrowUpRight-Bjz3wM7_.js","assets/TrendUp01-Ddu99xHU.js","assets/ZapSquare-DkWTs6ms.js","assets/ZoomOut-C_3JH0WD.js","assets/Users03-CQdAxDaw.js","assets/ChevronRight-BLHTQ9Db.js","assets/Stars02-C3tFxKGI.js","assets/Copy01-BzXUnxIt.js","assets/Globe01-Ct1oKJdh.js","assets/Eye-DZiWXjzc.js","assets/FilterLines-Dw3b3U6U.js","assets/Star01-kfwc8V_o.js","assets/Globe04-BiqYhKIv.js","assets/SwitchHorizontal01-BP51S8DS.js","assets/HardDrive-DV_SLLYZ.js","assets/Image01-BoP1xUXy.js","assets/Key01-C1HipuOz.js","assets/XCircle-CANBtGHI.js","assets/LinkExternal01-CGrGeU4Q.js","assets/Monitor01-C6zpq4qC.js","assets/Sun-CkVbwhKo.js","assets/Package-nklzvxt3.js","assets/Palette-vt3KT1N3.js","assets/Play-C8mWR1Az.js","assets/Plus-7RPIQWLb.js","assets/SearchLg-CWLjZme7.js","assets/SearchMd-4O6fg9oW.js","assets/Shield01-oWOP2zLR.js","assets/Stars01-C1l0RlUa.js","assets/Trash01-cB1sS901.js","assets/Upload01-CYVHio4I.js","assets/User01-CtR14f1U.js","assets/Users01-BqyJARKJ.js","assets/XClose-BAfFl7aF.js","assets/Zap-YiLxlwec.js","assets/use-automations-DHjQTH3C.js","assets/useSuspenseInfiniteQuery-CHz5LFPW.js","assets/avatar-DGoq0KTj.js","assets/format-time-BnbuEtat.js","assets/differenceInSeconds-NQ4PDo0z.js","assets/use-copy-_PBbl_ae.js","assets/file-type-icon-BqEXVrTQ.js","assets/dialog-CtcL8Rge.js","assets/monaco-editor-Du7tJEjc.js","assets/index-Bpt5-Vj-.js","assets/index-DA5rV0RV.js","assets/calendar-BFIHiiFD.js","assets/shell-layout-_h-q07bi.js","assets/required-auth-layout-Bw_23wtD.js","assets/use-org-sso-BhLu2IJL.js","assets/integration-icon-dAGuZlLn.js","assets/use-navigate-to-agent-Dlk0IC9Q.js","assets/reusable-new-chat-CouMjkYR.js","assets/AreaChart-CmrBd_oc.js","assets/form-B5plGGFv.js","assets/label-VkdXgHd7.js","assets/input-Cf6f3BmN.js","assets/drawer-C31EzZAL.js","assets/collection-search-tV8cd3K2.js","assets/tabs-CELqSRxW.js","assets/toggle-group-DSJnwILX.js","assets/use-deco-credits-CPmWdsys.js","assets/extract-connection-data--_aU5sYg.js","assets/connection-card-NrIXzO1v.js","assets/use-registry-connections-Bp9WZcYU.js","assets/retry-CErkP7V6.js","assets/connection-slug-eyAPH6o3.js","assets/textarea-PL3tBRfL.js","assets/connection-form-helpers-Dq97qH29.js","assets/authenticate-and-persist-oauth-B6DLU1uJ.js","assets/mcp-oauth-DUnhZRN8.js","assets/collection-tabs-CORSMF6h.js","assets/badge-ICotptLx.js","assets/connect-desktop-dialog-dbCJQTWC.js","assets/select-model-DDvi29I3.js","assets/checkbox-CvYv_Km6.js","assets/skeleton-BOpN06w4.js","assets/ai-providers-logos-DD3qZ33J.js","assets/settings-section-BUqk0nQQ.js","assets/get-initials-D-f_fDFw.js","assets/command-BOlKzV0V.js","assets/index-82forbXV.js","assets/popover-RUk1Jxx9.js","assets/use-mcp-tools-Bfgi1tbs.js","assets/dropdown-menu-BqJxwxsq.js","assets/index-Dt1PB5Sc.js","assets/alert-dialog-GMDN2a2p.js","assets/toolbar-XFnqI6aL.js","assets/use-debounced-value-RZv6Czrq.js","assets/question-004-sINsf4GQ.js","assets/use-status-sounds-Cil-9RHI.js","assets/use-capability-ZRZyXZT2.js","assets/toolbar-icon-button-Drpylp7y.js","assets/pt-BR-CLy76QW2.js","assets/use-mcp-auth-status-xCpfo047.js","assets/use-debounced-autosave-DpFFxhds.js","assets/index-BnE6Altg.js","assets/search-input-D1vvih4b.js","assets/switch-BM-HDdky.js","assets/use-registry-app-8Rk9qQRz.js","assets/github-repo-picker-Cy6gXTqi.js","assets/provision-repo-scoped-github-connection-2iDn-wQ1.js","assets/github-repo-scope-DjMZbiKa.js","assets/use-secrets-C2xWkrG-.js","assets/use-file-configs-CIAOsadi.js","assets/automation-list-row-C69OPCMn.js","assets/index-DDGTF8rc.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{G as Ys,r as B,c as L,x as Vs,K as Nt,F as Ye,n as kt,a as Hs,o as Zt,t as St,ad as Ws,m as Y,j as s,e as Bt,b as se,B as Ne,E as Xs,d as js,q as ds,k as es,u as Js,aY as Zs}from"./index-CmUMOI85.js";import{g as ze}from"./get-initials-D-f_fDFw.js";import{A as Fe}from"./avatar-DGoq0KTj.js";import{au as ts,V as en,e as ks,av as tn,f as sn,ao as Ns,aw as nn,ax as an,n as Tt,Y as wt,q as vs,as as ln}from"./agent-icon-VQci6jYK.js";import{i as rn}from"./SwitchHorizontal01-BP51S8DS.js";import{s as ss}from"./Plus-7RPIQWLb.js";import{P as Et,b as At,a as $t}from"./popover-RUk1Jxx9.js";import{W as on,m as us,S as Ss,C as Ds,g as cn,u as dn,h as un,a as fn}from"./use-mcp-client-FpSZFiJp.js";import{u as mn,G as gn}from"./use-registry-app-8Rk9qQRz.js";import{d as ns,e as as,b as ls,h as xn,a as pn,c as hn}from"./dialog-CtcL8Rge.js";import{b as yn,u as bn}from"./use-connection-BvbWEpu1.js";import{g as jn}from"./github-repo-scope-DjMZbiKa.js";import{a as kn}from"./authenticate-and-persist-oauth-B6DLU1uJ.js";import{e as Nn}from"./extract-connection-data--_aU5sYg.js";import{a as ws}from"./use-members-CUYuiUkk.js";import{u as Lt}from"./studio-tools-BVRXDcEz.js";import{t as vn,T as Sn,S as Qe}from"./decopilot-sse-pool-DNUfg0HV.js";import{u as Dn}from"./use-decopilot-events-Bp76K5aB.js";import{a as wn}from"./format-time-BnbuEtat.js";import{i as Cs}from"./AlertCircle-C_nk91tH.js";import{i as rs}from"./CheckCircle-GzoutZzh.js";import{i as Cn}from"./DotsVertical-BXRC3vMY.js";import{s as _n}from"./Eye-DZiWXjzc.js";import{a as vt,D as Ot,b as zt,c as Ft}from"./dropdown-menu-BqJxwxsq.js";import{P as Vt,a as In,D as Bn,j as Tn,k as En,C as An,c as $n}from"./calendar-BFIHiiFD.js";import{u as On}from"./use-copy-_PBbl_ae.js";import{i as zn}from"./Check-CmXcFUFA.js";import{i as Fn}from"./ChevronRight-BLHTQ9Db.js";import{a as Rn}from"./Copy01-BzXUnxIt.js";import{n as Pn}from"./LinkExternal01-CGrGeU4Q.js";import{i as fs}from"./X-CAmHDMPk.js";import{b as _s,C as Is,a as Ge,e as Rt,d as Bs,c as Ts}from"./command-BOlKzV0V.js";import{s as Ht}from"./User01-CtR14f1U.js";import{g as Ln,b as qn,e as Mn,f as Kn,a as Un,D as Gn}from"./drawer-C31EzZAL.js";import{t as os}from"./ChevronDown-BU2ru4r_.js";import{i as Es}from"./FilterLines-Dw3b3U6U.js";import{s as Qn}from"./TrendUp01-Ddu99xHU.js";import{u as Yn}from"./shell-layout-_h-q07bi.js";import{u as Vn}from"./hooks-v_4liDIo.js";import{u as Hn}from"./use-organization-settings-CNDPvDWL.js";import{i as As}from"./ArrowRight-x5eFsUyE.js";import{f as Wn}from"./tab-id-BijBBRwE.js";import{u as Wt}from"./companions-core-oBQaybV8.js";function Xn(t){return!t||!t.content||t.content.length===0?!0:t.content.every(e=>e.type==="paragraph"?!e.content||e.content.length===0?!0:e.content.every(n=>n.type==="hardBreak"||n.type==="text"&&(!n.text||n.text.trim()==="")):!1)}const er="__home__";function is(t,e){return Ys.chatDraft(t,e)}function Jn(t){if(!t)return null;let e;try{e=JSON.parse(t)}catch{return null}if(!e||typeof e!="object"||typeof e.updatedAt!="number")return null;const n=e.tiptapDoc;return!n||typeof n!="object"||n.type!=="doc"||!Array.isArray(n.content)?null:n}function Zn(t,e,n,o,a){const l=is(e,n);if(Xn(o)){t.removeItem(l);return}const r={tiptapDoc:o,updatedAt:Date.now()},i=JSON.stringify(r);try{t.setItem(l,i)}catch(d){if(ea(d)){const m=new TextEncoder().encode(i).byteLength;a?.onQuotaExceeded?.({docSizeBytes:m});return}throw d}}function tr(t,e,n){const o=is(e,n),a=t.getItem(o),l=Jn(a);return a!==null&&l===null&&t.removeItem(o),l}function sr(t,e,n){t.removeItem(is(e,n))}function ea(t){if(!t||typeof t!="object")return!1;const e=t.name;return e==="QuotaExceededError"||e==="NS_ERROR_DOM_QUOTA_REACHED"}function ta(t){var e;const{char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:i}=t,d=o&&!a,m=En(n),x=new RegExp(`\\s${m}$`),c=r?"^":"",g=a?"":m,f=d?new RegExp(`${c}${m}.*?(?=\\s${g}|$)`,"gm"):new RegExp(`${c}(?:^)?${m}[^\\s${g}]*`,"gm"),h=((e=i.nodeBefore)==null?void 0:e.isText)&&i.nodeBefore.text;if(!h)return null;const y=i.pos-h.length,p=Array.from(h.matchAll(f)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const b=p.input.slice(Math.max(0,p.index-1),p.index),u=new RegExp(`^[${l?.join("")}\0]?$`).test(b);if(l!==null&&!u)return null;const j=y+p.index;let N=j+p[0].length;return d&&x.test(h.slice(N-1,N+1))&&(p[0]+=" ",N+=1),j<i.pos&&N>=i.pos?{range:{from:j,to:N},query:p[0].slice(n.length),text:p[0]}:null}var sa=new Vt("suggestion");function na({pluginKey:t=sa,editor:e,char:n="@",allowSpaces:o=!1,allowToIncludeChar:a=!1,allowedPrefixes:l=[" "],startOfLine:r=!1,decorationTag:i="span",decorationClass:d="suggestion",decorationContent:m="",decorationEmptyClass:x="is-empty",command:c=()=>null,items:g=()=>[],render:f=()=>({}),allow:h=()=>!0,findSuggestionMatch:y=ta,shouldShow:p}){let b;const u=f?.(),j=()=>{const v=e.state.selection.$anchor.pos,D=e.view.coordsAtPos(v),{top:C,right:_,bottom:I,left:T}=D;try{return new DOMRect(T,C,_-T,I-C)}catch{return null}},N=(v,D)=>D?()=>{const C=t.getState(e.state),_=C?.decorationId,I=v.dom.querySelector(`[data-decoration-id="${_}"]`);return I?.getBoundingClientRect()||null}:j;function S(v,D){var C;try{const I=t.getState(v.state),T=I?.decorationId?v.dom.querySelector(`[data-decoration-id="${I.decorationId}"]`):null,A={editor:e,range:I?.range||{from:0,to:0},query:I?.query||null,text:I?.text||null,items:[],command:K=>c({editor:e,range:I?.range||{from:0,to:0},props:K}),decorationNode:T,clientRect:N(v,T)};(C=u?.onExit)==null||C.call(u,A)}catch{}const _=v.state.tr.setMeta(D,{exit:!0});v.dispatch(_)}const k=new In({key:t,view(){return{update:async(v,D)=>{var C,_,I,T,A,K,U;const w=(C=this.key)==null?void 0:C.getState(D),E=(_=this.key)==null?void 0:_.getState(v.state),$=w.active&&E.active&&w.range.from!==E.range.from,V=!w.active&&E.active,W=w.active&&!E.active,F=!V&&!W&&w.query!==E.query,X=V||$&&F,J=F||$,R=W||$&&F;if(!X&&!J&&!R)return;const P=R&&!X?w:E,H=v.dom.querySelector(`[data-decoration-id="${P.decorationId}"]`);b={editor:e,range:P.range,query:P.query,text:P.text,items:[],command:G=>c({editor:e,range:P.range,props:G}),decorationNode:H,clientRect:N(v,H)},X&&((I=u?.onBeforeStart)==null||I.call(u,b)),J&&((T=u?.onBeforeUpdate)==null||T.call(u,b)),(J||X)&&(b.items=await g({editor:e,query:P.query})),R&&((A=u?.onExit)==null||A.call(u,b)),J&&((K=u?.onUpdate)==null||K.call(u,b)),X&&((U=u?.onStart)==null||U.call(u,b))},destroy:()=>{var v;b&&((v=u?.onExit)==null||v.call(u,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(v,D,C,_){const{isEditable:I}=e,{composing:T}=e.view,{selection:A}=v,{empty:K,from:U}=A,w={...D},E=v.getMeta(t);if(E&&E.exit)return w.active=!1,w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null,w;if(w.composing=T,I&&(K||e.view.composing)){(U<D.range.from||U>D.range.to)&&!T&&!D.composing&&(w.active=!1);const $=y({char:n,allowSpaces:o,allowToIncludeChar:a,allowedPrefixes:l,startOfLine:r,$position:A.$from}),V=`id_${Math.floor(Math.random()*4294967295)}`;$&&h({editor:e,state:_,range:$.range,isActive:D.active})&&(!p||p({editor:e,range:$.range,query:$.query,text:$.text,transaction:v}))?(w.active=!0,w.decorationId=D.decorationId?D.decorationId:V,w.range=$.range,w.query=$.query,w.text=$.text):w.active=!1}else w.active=!1;return w.active||(w.decorationId=null,w.range={from:0,to:0},w.query=null,w.text=null),w}},props:{handleKeyDown(v,D){var C,_,I,T;const{active:A,range:K}=k.getState(v.state);if(!A)return!1;if(D.key==="Escape"||D.key==="Esc"){const w=k.getState(v.state),E=(C=b?.decorationNode)!=null?C:null,$=E??(w?.decorationId?v.dom.querySelector(`[data-decoration-id="${w.decorationId}"]`):null);if(((_=u?.onKeyDown)==null?void 0:_.call(u,{view:v,event:D,range:w.range}))||!1)return!0;const W={editor:e,range:w.range,query:w.query,text:w.text,items:[],command:F=>c({editor:e,range:w.range,props:F}),decorationNode:$,clientRect:$?()=>$.getBoundingClientRect()||null:null};return(I=u?.onExit)==null||I.call(u,W),S(v,t),!0}return((T=u?.onKeyDown)==null?void 0:T.call(u,{view:v,event:D,range:K}))||!1},decorations(v){const{active:D,range:C,decorationId:_,query:I}=k.getState(v);if(!D)return null;const T=!I?.length,A=[d];return T&&A.push(x),Bn.create(v.doc,[Tn.inline(C.from,C.to,{nodeName:i,class:A.join(" "),"data-decoration-id":_,"data-decoration-content":m})])}}});return k}function aa(t){const e=L.c(24),{editor:n,query:o,items:a,onSelect:l,onClose:r}=t,[i,d]=B.useState(0),m=B.useRef(a),x=B.useRef(i),c=B.useRef(l),g=B.useRef(r),f=B.useDeferredValue(o);let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{d(0)},e[0]=h):h=e[0];let y;e[1]!==f?(y=[f],e[1]=f,e[2]=y):y=e[2],B.useEffect(h,y);let p,b;e[3]!==a.length||e[4]!==i?(p=()=>{i>=a.length&&a.length>0&&d(0)},b=[a.length,i],e[3]=a.length,e[4]=i,e[5]=p,e[6]=b):(p=e[5],b=e[6]),B.useEffect(p,b);let u,j;e[7]!==a?(u=()=>{m.current=a},j=[a],e[7]=a,e[8]=u,e[9]=j):(u=e[8],j=e[9]),B.useEffect(u,j);let N,S;e[10]!==i?(N=()=>{x.current=i},S=[i],e[10]=i,e[11]=N,e[12]=S):(N=e[11],S=e[12]),B.useEffect(N,S);let k,v;e[13]!==l?(v=()=>{c.current=l},k=[l],e[13]=l,e[14]=k,e[15]=v):(k=e[14],v=e[15]),B.useEffect(v,k);let D,C;e[16]!==r?(D=()=>{g.current=r},C=[r],e[16]=r,e[17]=D,e[18]=C):(D=e[17],C=e[18]),B.useEffect(D,C);let _,I;e[19]!==n?(_=()=>{if(n?.isDestroyed)return;let K;try{K=n.view.dom}catch{return}if(!K)return;const U=E=>{const $=m.current;if(!$.length)return!1;const V=()=>d(F=>(F+1)%$.length),W=()=>d(F=>(F-1+$.length)%$.length);switch(E.key){case"ArrowUp":return E.preventDefault(),W(),!0;case"ArrowDown":return E.preventDefault(),V(),!0;case"Tab":return E.preventDefault(),E.shiftKey?W():V(),!0;case"Home":return E.preventDefault(),d(0),!0;case"End":return E.preventDefault(),d($.length-1),!0;case"Enter":{if(E.isComposing)return!1;E.preventDefault();const F=x.current;return F!==-1&&$[F]&&c.current?.($[F],F),!0}case"Escape":return E.preventDefault(),g.current?.(),!0;default:return!1}},w=E=>{U(E)};return K.addEventListener("keydown",w,!0),()=>{K?.removeEventListener("keydown",w,!0)}},I=[n],e[19]=n,e[20]=_,e[21]=I):(_=e[20],I=e[21]),B.useEffect(_,I);const T=a.length?i:void 0;let A;return e[22]!==T?(A={selectedIndex:T,setSelectedIndex:d},e[22]=T,e[23]=A):A=e[23],A}function la(t,e){switch(e.type){case"SET_SELECTED_ITEM":return{...t,selectedItem:e.payload};case"ON_START":return{...t,open:!0,selectedItem:null,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_UPDATE":return{...t,element:e.payload.element,query:e.payload.query,range:e.payload.range};case"ON_EXIT":return{open:!1,element:null,query:"",range:null,selectedItem:null};default:return t}}const ra=B.createContext(void 0);function oa(){const t=B.useContext(ra);if(!t)throw new Error("useSuggestionContext must be used within a SuggestionContext.Provider");return t}function nr(t){const e=L.c(16),{editor:n,char:o,pluginKey:a,allow:l,onOpenChange:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={open:!1,element:null,query:"",range:null,selectedItem:null},e[0]=i):i=e[0];const[d,m]=B.useReducer(la,i);let x;e[1]!==r?(x=y=>{r?.(y)},e[1]=r,e[2]=x):x=e[2];const c=B.useEffectEvent(x);let g;e[3]!==o||e[4]!==l||e[5]!==n||e[6]!==c||e[7]!==a?(g=()=>{if(n?.isDestroyed)return;const y=a instanceof Vt?a:new Vt(a);n.state.plugins.find(u=>u.spec.key===y)&&n.unregisterPlugin(y);const b=na({pluginKey:y,editor:n,char:o,allow(u){const j=n.state.doc.resolve(u.range.from);for(let N=j.depth;N>0;N--)if(j.node(N).type.name==="image")return!1;return!(l&&!l(u))},command(){},render:()=>({onStart:u=>{m({type:"ON_START",payload:{element:u.decorationNode??null,query:u.query,range:u.range}}),c(!0)},onUpdate:u=>{m({type:"ON_UPDATE",payload:{element:u.decorationNode??null,query:u.query,range:u.range}})},onKeyDown:u=>u.event.key==="Escape"?(m({type:"ON_EXIT"}),!0):!1,onExit:()=>{m({type:"ON_EXIT"}),c(!1)}}),items:ia});return n.registerPlugin(b),()=>{n?.isDestroyed||n.unregisterPlugin(y)}},e[3]=o,e[4]=l,e[5]=n,e[6]=c,e[7]=a,e[8]=g):g=e[8];let f;e[9]!==o||e[10]!==l||e[11]!==n||e[12]!==a?(f=[n,a,o,m,l],e[9]=o,e[10]=l,e[11]=n,e[12]=a,e[13]=f):f=e[13],B.useEffect(g,f);let h;return e[14]!==d?(h={state:d,dispatch:m},e[14]=d,e[15]=h):h=e[15],h}function ia(){return[]}function ar({editor:t,queryKey:e,queryFn:n,onSelect:o}){const{state:a,dispatch:l}=oa(),r=B.useDeferredValue(a.query),{data:i}=Vs({queryKey:Nt.suggestionItems(e,a.open,r),queryFn:()=>a.open?n({query:r}):[]}),d=()=>{l({type:"ON_EXIT"})},m=async(c,g)=>{if(!(a.selectedItem!==null||!a.range)){l({type:"SET_SELECTED_ITEM",payload:c});try{const{view:f}=t,y=f.state.selection.$to.nodeAfter?.text?.startsWith(" "),p=a.range?{...a.range}:{from:0,to:0};y&&a.range&&(p.to+=1),await o({range:p,item:c})===!1?l({type:"SET_SELECTED_ITEM",payload:null}):d()}catch{d()}}},{selectedIndex:x}=aa({editor:t,query:r,items:i,onSelect:m,onClose:d});return{selectedItem:a.selectedItem,items:i,selectedIndex:x,close:d,onSelect:m}}function ca(t){return t?t.run_in_progress?"generating":t.scanned_at?"ready":"none":"none"}const da=2e4;function ua(t){if(typeof t!="string"||!t)return null;try{return new URL(t).hostname||null}catch{return null}}function fa(){const t=L.c(17),{org:e}=Ye(),n=on.COMMERCE_DISCOVERY(e.id);let o;t[0]!==e.id||t[1]!==e.slug?(o=us({connectionId:Ss,orgId:e.id,orgSlug:e.slug}),t[0]=e.id,t[1]=e.slug,t[2]=o):o=t[2];const{data:a}=kt(o),r=kt({queryKey:Nt.commerceDiscoveryConnection(e.id,n),enabled:!!a,retry:!1,staleTime:6e4,queryFn:async()=>{if(!a)throw new Error("selfClient not ready");const j=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:n}});return Wt(j)}}).data?.item??null,{data:i}=kt({...us({connectionId:n,orgId:e.id,orgSlug:e.slug}),enabled:!!r}),d=Nt.commerceDiscoveryDiagnostic(e.id,n),m=!!i;let x;t[3]!==i?(x=async()=>{if(!i)throw new Error("cdClient not ready");const j=await i.callTool({name:Ds,arguments:{}});return Wt(j).diagnostic??null},t[3]=i,t[4]=x):x=t[4];let c;t[5]!==d||t[6]!==m||t[7]!==x?(c={queryKey:d,enabled:m,retry:1,refetchInterval:ma,queryFn:x},t[5]=d,t[6]=m,t[7]=x,t[8]=c):c=t[8];const g=kt(c),f=g.data??null,h=g.isSuccess,y=r?.metadata?.siteUrl;let p;t[9]!==y?(p=ua(y),t[9]=y,t[10]=p):p=t[10];const b=i??null;let u;return t[11]!==n||t[12]!==g.isSuccess||t[13]!==f||t[14]!==p||t[15]!==b?(u={diagnostic:f,isSuccess:h,host:p,connectionId:n,cdClient:b},t[11]=n,t[12]=g.isSuccess,t[13]=f,t[14]=p,t[15]=b,t[16]=u):u=t[16],u}function ma(t){return t.state.status!=="error"&&ca(t.state.data)==="generating"?da:!1}function ga(t,e){return{to:"/$org/$taskId",params:{org:t.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:cn(t.id),main:Wn(e,Ds)}}}function xa(t){const{org:e}=Ye(),{data:n}=Hs.useSession(),o=yn(),a=Zt(),l=dn({connectionId:Ss,orgId:e.id,orgSlug:e.slug}),[r,i]=B.useState(!1),d=mn(t,{enabled:!1});return{connect:async()=>{if(!(r||!n?.user?.id||!e)){i(!0);try{const x=d.data??(await d.refetch()).data;if(!x){St.error("Could not find this integration in the registry");return}const c=Nn(x,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url){St.error("This integration has no connection method available");return}const g=c.app_name?await pa(l,c.app_name):null,f=!g,h=g?.id??(await o.create.mutateAsync(c)).id,y=await kn({connectionId:h,orgId:e.id,orgSlug:e.slug,persistFallback:p=>o.update.mutateAsync({id:h,data:{connection_token:p}}).then(()=>{})});if(y.ran&&!y.ok){if(f)try{await o.delete.mutateAsync(h)}catch{}St.error(`Authentication failed: ${y.error??"no token"}`);return}Ws(a,e.id),St.success(f?"Connected successfully":"Already connected")}catch(x){St.error(`Failed to connect: ${x instanceof Error?x.message:String(x)}`)}finally{i(!1)}}},isConnecting:r}}async function pa(t,e){return(await t.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{where:{field:["app_name"],operator:"eq",value:e},limit:1}})).structuredContent?.items?.[0]??null}function Me(t){const e=L.c(8),{size:n,className:o}=t,a=n===void 0?16:n;let l;e[0]!==a?(l={width:a,height:a},e[0]=a,e[1]=l):l=e[1];let r;e[2]!==o?(r=Y("shrink-0 rounded-full object-cover",o),e[2]=o,e[3]=r):r=e[3];let i;return e[4]!==a||e[5]!==l||e[6]!==r?(i=s.jsx("img",{src:un,alt:"Super Agent",width:a,height:a,style:l,className:r}),e[4]=a,e[5]=l,e[6]=r,e[7]=i):i=e[7],i}const ms=()=>0;function ha(t){const{orgSlug:e,enabled:n=!0,onUpdate:o,onDelete:a}=t,l=B.useRef(o);l.current=o;const r=B.useRef(a);r.current=a;const i=B.useRef(null),d=B.useRef(n),m=B.useRef(e);(!i.current||d.current!==n||m.current!==e)&&(d.current=n,m.current=e,i.current=c=>{if(!n||!e)return()=>{};const g=f=>{let h;try{h=JSON.parse(f.data)}catch{return}h.data&&(f.type===Sn?r.current?.(h.data.id):l.current(h.data)),c()};return vn.subscribe(e,g)}),B.useSyncExternalStore(i.current,ms,ms)}function ya(){const t=L.c(27),{org:e,locator:n}=Ye(),o=Lt(),a=Zt();let l;t[0]!==n?(l=Nt.taskBoardItems(n),t[0]=n,t[1]=l):l=t[1];const r=l;let i;t[2]!==o?(i=async()=>(await o.call("TASK_BOARD_ITEM_LIST",{})).items,t[2]=o,t[3]=i):i=t[3];let d;t[4]!==r||t[5]!==i?(d={queryKey:r,queryFn:i},t[4]=r,t[5]=i,t[6]=d):d=t[6];const m=kt(d);let x,c;t[7]!==a||t[8]!==r?(x=b=>{a.setQueryData(r,u=>{const j=u??[],N=b;return j.some(S=>S.id===N.id)?j.map(S=>S.id===N.id?N:S):[N,...j]})},c=b=>{a.setQueryData(r,u=>u?.filter(j=>j.id!==b))},t[7]=a,t[8]=r,t[9]=x,t[10]=c):(x=t[9],c=t[10]);let g;t[11]!==e.slug||t[12]!==x||t[13]!==c?(g={orgSlug:e.slug,onUpdate:x,onDelete:c},t[11]=e.slug,t[12]=x,t[13]=c,t[14]=g):g=t[14],ha(g);let f;t[15]!==a||t[16]!==r?(f=b=>{const u=b.subject,j=b.data.status;a.setQueryData(r,N=>N?.map(S=>S.threads.some(k=>k.threadId===u)?{...S,threads:S.threads.map(k=>k.threadId===u?{...k,status:j}:k)}:S))},t[15]=a,t[16]=r,t[17]=f):f=t[17];let h;t[18]!==e.slug||t[19]!==f?(h={orgSlug:e.slug,onTaskStatus:f},t[18]=e.slug,t[19]=f,t[20]=h):h=t[20],Dn(h);let y;t[21]!==m.data?(y=m.data??[],t[21]=m.data,t[22]=y):y=t[22];let p;return t[23]!==m.error||t[24]!==m.isLoading||t[25]!==y?(p={items:y,isLoading:m.isLoading,error:m.error},t[23]=m.error,t[24]=m.isLoading,t[25]=y,t[26]=p):p=t[26],p}function ba(){const t=L.c(36),{locator:e}=Ye(),n=Lt(),o=Zt();let a;t[0]!==e?(a=Nt.taskBoardItems(e),t[0]=e,t[1]=a):a=t[1];const l=a;let r;t[2]!==o||t[3]!==l?(r=()=>o.invalidateQueries({queryKey:l}),t[2]=o,t[3]=l,t[4]=r):r=t[4];const i=r;let d;t[5]!==n?(d=v=>n.call("TASK_BOARD_ITEM_CREATE",v),t[5]=n,t[6]=d):d=t[6];let m;t[7]!==i||t[8]!==d?(m={mutationFn:d,onSuccess:i},t[7]=i,t[8]=d,t[9]=m):m=t[9];const x=Bt(m);let c;t[10]!==n?(c=v=>n.call("TASK_BOARD_ITEM_UPDATE",v),t[10]=n,t[11]=c):c=t[11];let g,f;t[12]!==o||t[13]!==l?(g=async v=>{await o.cancelQueries({queryKey:l});const D=o.getQueryData(l);return o.setQueryData(l,C=>C?.map(_=>_.id===v.id?{..._,...v}:_)),{previous:D}},f=(v,D,C)=>{C?.previous&&o.setQueryData(l,C.previous)},t[12]=o,t[13]=l,t[14]=g,t[15]=f):(g=t[14],f=t[15]);let h;t[16]!==i||t[17]!==c||t[18]!==g||t[19]!==f?(h={mutationFn:c,onMutate:g,onError:f,onSettled:i},t[16]=i,t[17]=c,t[18]=g,t[19]=f,t[20]=h):h=t[20];const y=Bt(h);let p;t[21]!==n?(p=v=>n.call("TASK_BOARD_ITEM_DELETE",{id:v}),t[21]=n,t[22]=p):p=t[22];let b;t[23]!==i||t[24]!==p?(b={mutationFn:p,onSuccess:i},t[23]=i,t[24]=p,t[25]=b):b=t[25];const u=Bt(b);let j;t[26]!==n?(j=v=>n.call("TASK_BOARD_ITEM_UPDATE",v),t[26]=n,t[27]=j):j=t[27];let N;t[28]!==i||t[29]!==j?(N={mutationFn:j,onSuccess:i},t[28]=i,t[29]=j,t[30]=N):N=t[30];const S=Bt(N);let k;return t[31]!==x||t[32]!==S||t[33]!==u||t[34]!==y?(k={create:x,update:y,remove:u,link:S},t[31]=x,t[32]=S,t[33]=u,t[34]=y,t[35]=k):k=t[35],k}function Xt(t){return t.threads.some(e=>e.status==="requires_action")}function ja(t){return t.threads[0]}const $s=["triage","todo","in_progress","in_review","done"],$e={triage:{labelKey:"taskBoard.config.statusBacklog",icon:Cs,iconClassName:"text-muted-foreground"},todo:{labelKey:"taskBoard.config.statusTodo",icon:Cn,iconClassName:"text-muted-foreground"},in_progress:{labelKey:"taskBoard.config.statusInProgress",icon:ts,iconClassName:"text-primary"},in_review:{labelKey:"taskBoard.config.statusInReview",icon:_n,iconClassName:"text-warning"},done:{labelKey:"taskBoard.config.statusDone",icon:rs,iconClassName:"text-success"}},Os=["none","low","medium","high","urgent"],Oe={none:{labelKey:"taskBoard.config.priorityNone",flagClassName:"text-muted-foreground",dotClassName:"border border-muted-foreground/50"},low:{labelKey:"taskBoard.config.priorityLow",flagClassName:"text-muted-foreground",dotClassName:"bg-muted-foreground/40"},medium:{labelKey:"taskBoard.config.priorityMedium",flagClassName:"text-blue-500",dotClassName:"bg-blue-500"},high:{labelKey:"taskBoard.config.priorityHigh",flagClassName:"text-warning",dotClassName:"bg-warning"},urgent:{labelKey:"taskBoard.config.priorityUrgent",flagClassName:"text-destructive",dotClassName:"bg-destructive"}};function ka(t){const e=L.c(10),{locator:n}=Ye(),o=Lt();let a;e[0]!==t||e[1]!==n?(a=Nt.taskBoardItemPrs(n,t??""),e[0]=t,e[1]=n,e[2]=a):a=e[2];const l=!!t;let r;e[3]!==t||e[4]!==o?(r=async()=>(await o.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:t})).prs,e[3]=t,e[4]=o,e[5]=r):r=e[5];let i;return e[6]!==a||e[7]!==l||e[8]!==r?(i={queryKey:a,enabled:l,queryFn:r},e[6]=a,e[7]=l,e[8]=r,e[9]=i):i=e[9],kt(i)}function zs(t){const e=L.c(27),{members:n,onSelect:o}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(_s,{placeholder:"Assign to…",className:"h-9"}),e[0]=a):a=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Is,{children:"No members found."}),e[1]=l):l=e[1];let r;e[2]!==o?(r=()=>o(Qe),e[2]=o,e[3]=r):r=e[3];let i,d;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Me,{size:16}),d=s.jsx("span",{className:"truncate",children:"Super Agent"}),e[4]=i,e[5]=d):(i=e[4],d=e[5]);let m;e[6]!==r?(m=s.jsxs(Ge,{value:"Super Agent",onSelect:r,className:"gap-2",children:[i,d]}),e[6]=r,e[7]=m):m=e[7];let x;e[8]!==o?(x=()=>o(null),e[8]=o,e[9]=x):x=e[9];let c,g;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),g=s.jsx("span",{className:"truncate",children:"Unassigned"}),e[10]=c,e[11]=g):(c=e[10],g=e[11]);let f;e[12]!==x?(f=s.jsxs(Ge,{value:"Unassigned",onSelect:x,className:"gap-2",children:[c,g]}),e[12]=x,e[13]=f):f=e[13];let h;e[14]!==f||e[15]!==m?(h=s.jsxs(Rt,{children:[m,f]}),e[14]=f,e[15]=m,e[16]=h):h=e[16];let y;if(e[17]!==n||e[18]!==o){let u;e[20]!==o?(u=j=>s.jsxs(Ge,{value:j.user?.name??j.userId,onSelect:()=>o(j.userId),className:"gap-2",children:[s.jsx(Fe,{url:j.user?.image??void 0,fallback:ze(j.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:j.user?.name??j.userId})]},j.userId),e[20]=o,e[21]=u):u=e[21],y=n.map(u),e[17]=n,e[18]=o,e[19]=y}else y=e[19];let p;e[22]!==y?(p=s.jsx(Rt,{heading:"Members",children:y}),e[22]=y,e[23]=p):p=e[23];let b;return e[24]!==h||e[25]!==p?(b=s.jsxs(Bs,{children:[a,s.jsxs(Ts,{children:[l,h,p]})]}),e[24]=h,e[25]=p,e[26]=b):b=e[26],b}function Na(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59).toISOString()}function gs(t){if(!t)return null;const e=new Date(t);return Number.isNaN(e.getTime())?null:e}const va=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"}),Dt="inline-flex h-9 items-center justify-start gap-2 rounded-lg border border-border px-3 text-sm font-medium text-foreground transition-colors hover:bg-muted sm:border-transparent";function Sa(t){const e=L.c(199),{open:n,onClose:o,item:a,defaultStatus:l,onSubmit:r,onDelete:i,onOpenThread:d,onNewChat:m,isSaving:x}=t,c=se(),{data:g}=ws(),f=g?.data?.members??[],{handleCopy:h,copied:y}=On(),[p,b]=B.useState(a?.title??""),[u,j]=B.useState(a?.description??""),[N,S]=B.useState(a?.status??l??"triage"),[k,v]=B.useState(a?.priority??"medium"),[D,C]=B.useState(a?.assigneeId??null),_=a?.dueDate;let I;e[0]!==_?(I=gs(_),e[0]=_,e[1]=I):I=e[1];const[T,A]=B.useState(I),[K,U]=B.useState(!1),[w,E]=B.useState(!1);let $;e[2]!==l||e[3]!==a?.assigneeId||e[4]!==a?.description||e[5]!==a?.dueDate||e[6]!==a?.priority||e[7]!==a?.status||e[8]!==a?.title||e[9]!==C||e[10]!==A?($=()=>{b(a?.title??""),j(a?.description??""),S(a?.status??l??"triage"),v(a?.priority??"medium"),C(a?.assigneeId??null),A(gs(a?.dueDate))},e[2]=l,e[3]=a?.assigneeId,e[4]=a?.description,e[5]=a?.dueDate,e[6]=a?.priority,e[7]=a?.status,e[8]=a?.title,e[9]=C,e[10]=A,e[11]=$):$=e[11];const V=$;let W;e[12]!==o||e[13]!==V?(W=()=>{o(),V()},e[12]=o,e[13]=V,e[14]=W):W=e[14];const F=W;let X;e[15]!==D||e[16]!==u||e[17]!==T||e[18]!==r||e[19]!==k||e[20]!==N||e[21]!==p?(X=()=>{const O=p.trim();O&&r({title:O,description:u.trim()||null,status:N,priority:k,assigneeId:D,dueDate:T?Na(T):null})},e[15]=D,e[16]=u,e[17]=T,e[18]=r,e[19]=k,e[20]=N,e[21]=p,e[22]=X):X=e[22];const J=X,R=D===Qe;let P;e[23]!==D?(P=O=>O.userId===D,e[23]=D,e[24]=P):P=e[24];const H=f.find(P),G=a?.assignedBy?f.find(O=>O.userId===a.assignedBy):void 0,te=$e[N].icon,ne=as;let z;e[25]!==F?(z=O=>!O&&F(),e[25]=F,e[26]=z):z=e[26];const q=ns,je="flex max-h-[90vh] flex-col gap-0 overflow-hidden rounded-2xl p-0 sm:h-[85vh] sm:max-h-[640px] sm:max-w-[850px]",ke="hidden";let ae;e[27]!==a||e[28]!==c?(ae=c(a?"taskBoard.taskDialog.editTaskTitle":"taskBoard.taskDialog.newTaskTitle"),e[27]=a,e[28]=c,e[29]=ae):ae=e[29];let Z;e[30]!==ae?(Z=s.jsx(ls,{className:"sr-only",children:ae}),e[30]=ae,e[31]=Z):Z=e[31];let ee;e[32]!==c?(ee=c("taskBoard.taskDialog.closeAriaLabel"),e[32]=c,e[33]=ee):ee=e[33];let re;e[34]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(fs,{size:16}),e[34]=re):re=e[34];let oe;e[35]!==F||e[36]!==ee?(oe=s.jsx("button",{type:"button","aria-label":ee,onClick:F,className:"absolute right-2.5 top-2.5 z-10 flex size-10 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:re}),e[35]=F,e[36]=ee,e[37]=oe):oe=e[37];const Re="flex min-h-0 flex-1 flex-col overflow-y-auto sm:flex-row sm:overflow-hidden";let ve;e[38]===Symbol.for("react.memo_cache_sentinel")?(ve=O=>{b(O.target.value),O.target.style.height="auto",O.target.style.height=`${O.target.scrollHeight}px`},e[38]=ve):ve=e[38];let Se;e[39]!==c?(Se=c("taskBoard.taskDialog.taskTitlePlaceholder"),e[39]=c,e[40]=Se):Se=e[40];let M;e[41]!==Se||e[42]!==p?(M=s.jsx("textarea",{ref:wa,value:p,onChange:ve,onKeyDown:Da,placeholder:Se,autoFocus:!0,rows:1,className:"w-full resize-none overflow-hidden border-0 bg-transparent text-xl font-medium leading-snug text-foreground outline-none placeholder:text-foreground/30"}),e[41]=Se,e[42]=p,e[43]=M):M=e[43];let ie;e[44]===Symbol.for("react.memo_cache_sentinel")?(ie=O=>j(O.target.value),e[44]=ie):ie=e[44];let le;e[45]!==c?(le=c("taskBoard.taskDialog.descriptionPlaceholder"),e[45]=c,e[46]=le):le=e[46];let Ce;e[47]!==u||e[48]!==le?(Ce=s.jsx("textarea",{value:u,onChange:ie,placeholder:le,className:"min-h-[96px] w-full flex-1 resize-none border-0 bg-transparent text-[15px] leading-relaxed text-foreground outline-none placeholder:text-muted-foreground/50 sm:min-h-[120px]"}),e[47]=u,e[48]=le,e[49]=Ce):Ce=e[49];let ce;e[50]!==y||e[51]!==u||e[52]!==h||e[53]!==c?(ce=u&&s.jsx(Ne,{type:"button",variant:"ghost",size:"icon","aria-label":c("taskBoard.taskDialog.copyDescriptionAriaLabel"),className:"absolute right-0 top-0 size-7 text-muted-foreground opacity-0 transition-opacity hover:text-foreground group-hover:opacity-100",onClick:()=>h(u),children:y?s.jsx(zn,{size:14}):s.jsx(Rn,{size:14})}),e[50]=y,e[51]=u,e[52]=h,e[53]=c,e[54]=ce):ce=e[54];let _e;e[55]!==Ce||e[56]!==ce?(_e=s.jsxs("div",{className:"group relative flex flex-1 flex-col",children:[Ce,ce]}),e[55]=Ce,e[56]=ce,e[57]=_e):_e=e[57];const Pe=a&&a.threads.length>0&&s.jsx("div",{className:"flex flex-col gap-2",children:a.threads.map(O=>s.jsx(Ca,{thread:O,startedBy:G??H,onOpen:d},O.threadId))});let Ke;e[58]!==a?(Ke=a?.id&&s.jsx(Ba,{itemId:a.id}),e[58]=a,e[59]=Ke):Ke=e[59];let Ae;e[60]!==M||e[61]!==_e||e[62]!==Pe||e[63]!==Ke?(Ae=s.jsxs("div",{className:"flex min-w-0 flex-col gap-6 p-6 sm:flex-1 sm:overflow-y-auto sm:p-8",children:[M,_e,Pe,Ke]}),e[60]=M,e[61]=_e,e[62]=Pe,e[63]=Ke,e[64]=Ae):Ae=e[64];const Ve="flex w-full shrink-0 flex-col gap-4 border-t border-border p-6 sm:w-[220px] sm:border-t-0 sm:border-l sm:px-6 sm:py-10";let de;e[65]!==c?(de=c("taskBoard.taskDialog.propertiesLabel"),e[65]=c,e[66]=de):de=e[66];let ue;e[67]!==de?(ue=s.jsx("span",{className:"hidden px-3 text-sm text-muted-foreground sm:block",children:de}),e[67]=de,e[68]=ue):ue=e[68];const Le="flex flex-wrap gap-2 sm:flex-col",Ie=$e[N];let Be;e[69]!==te||e[70]!==Ie.iconClassName?(Be=s.jsx(te,{size:16,className:Ie.iconClassName}),e[69]=te,e[70]=Ie.iconClassName,e[71]=Be):Be=e[71];const qe=$e[N];let fe;e[72]!==c||e[73]!==qe.labelKey?(fe=c(qe.labelKey),e[72]=c,e[73]=qe.labelKey,e[74]=fe):fe=e[74];let me;e[75]!==Be||e[76]!==fe?(me=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:Dt,children:[Be,fe]})}),e[75]=Be,e[76]=fe,e[77]=me):me=e[77];let Te;e[78]!==c?(Te=$s.map(O=>{const Qs=$e[O].icon;return s.jsxs(vt,{onSelect:()=>S(O),className:"gap-2",children:[s.jsx(Qs,{size:16,className:$e[O].iconClassName}),c($e[O].labelKey)]},O)}),e[78]=c,e[79]=Te):Te=e[79];let De;e[80]!==Te?(De=s.jsx(zt,{align:"start",className:"w-44",children:Te}),e[80]=Te,e[81]=De):De=e[81];let ge;e[82]!==me||e[83]!==De?(ge=s.jsxs(Ft,{children:[me,De]}),e[82]=me,e[83]=De,e[84]=ge):ge=e[84];const Ee=k==="none"&&"text-muted-foreground";let xe;e[85]!==Ee?(xe=Y(Dt,Ee),e[85]=Ee,e[86]=xe):xe=e[86];let we;e[87]!==k||e[88]!==c?(we=k==="none"?s.jsxs(s.Fragment,{children:[s.jsx(en,{size:16}),c("taskBoard.taskDialog.setPriorityButton")]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[k].dotClassName)}),c(Oe[k].labelKey)]}),e[87]=k,e[88]=c,e[89]=we):we=e[89];let pe;e[90]!==xe||e[91]!==we?(pe=s.jsx(Ot,{asChild:!0,children:s.jsx("button",{type:"button",className:xe,children:we})}),e[90]=xe,e[91]=we,e[92]=pe):pe=e[92];let he;e[93]!==c?(he=Os.map(O=>s.jsxs(vt,{onSelect:()=>v(O),children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[O].dotClassName)}),c(Oe[O].labelKey)]},O)),e[93]=c,e[94]=he):he=e[94];let ye;e[95]!==he?(ye=s.jsx(zt,{align:"start",className:"w-40",children:he}),e[95]=he,e[96]=ye):ye=e[96];let be;e[97]!==pe||e[98]!==ye?(be=s.jsxs(Ft,{children:[pe,ye]}),e[97]=pe,e[98]=ye,e[99]=be):be=e[99];const Q="flex flex-col",Ue=At,Ks=!0,Mt=Et,Us=!0,Gs="button",Kt=!D&&"text-muted-foreground";let He;e[100]!==Kt?(He=Y(Dt,Kt),e[100]=Kt,e[101]=He):He=e[101];const Ut=R&&G?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"hidden items-center gap-2 sm:flex",children:[s.jsx(Fe,{url:G.user?.image??void 0,fallback:ze(G.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:G.user?.name??c("taskBoard.taskDialog.superAgentDefaultName")})]}),s.jsxs("span",{className:"flex items-center gap-2 sm:hidden",children:[s.jsxs("span",{className:"inline-flex items-center",children:[s.jsx(Fe,{url:G.user?.image??void 0,fallback:ze(G.user?.name),shape:"circle",size:"2xs",className:"-mr-1.5 ring-2 ring-background"}),s.jsx(Me,{size:16,className:"ring-2 ring-background"})]}),c("taskBoard.taskDialog.superAgentLabel")]})]}):R?s.jsxs(s.Fragment,{children:[s.jsx(Me,{size:16}),c("taskBoard.taskDialog.superAgentLabel")]}):H?s.jsxs(s.Fragment,{children:[s.jsx(Fe,{url:H.user?.image??void 0,fallback:ze(H.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:H.user?.name??c("taskBoard.taskDialog.unassignedLabel")})]}):s.jsxs(s.Fragment,{children:[s.jsx(ks,{size:16,className:"text-muted-foreground"}),c("taskBoard.taskDialog.assignButton")]});let We;e[102]!==He||e[103]!==Ut?(We=s.jsx("button",{type:Gs,className:He,children:Ut}),e[102]=He,e[103]=Ut,e[104]=We):We=e[104];let Xe;e[105]!==Mt||e[106]!==We?(Xe=s.jsx(Mt,{asChild:Us,children:We}),e[105]=Mt,e[106]=We,e[107]=Xe):Xe=e[107];let Je;e[108]!==C||e[109]!==E?(Je=O=>{C(O),E(!1)},e[108]=C,e[109]=E,e[110]=Je):Je=e[110];let Ze;e[111]!==f||e[112]!==Je?(Ze=s.jsx($t,{align:"start",className:"w-56 p-0",children:s.jsx(zs,{members:f,onSelect:Je})}),e[111]=f,e[112]=Je,e[113]=Ze):Ze=e[113];let et;e[114]!==Ue||e[115]!==w||e[116]!==E||e[117]!==Xe||e[118]!==Ze?(et=s.jsxs(Ue,{open:w,onOpenChange:E,modal:Ks,children:[Xe,Ze]}),e[114]=Ue,e[115]=w,e[116]=E,e[117]=Xe,e[118]=Ze,e[119]=et):et=e[119];let tt;e[120]!==G||e[121]!==R||e[122]!==c?(tt=R&&G&&s.jsxs("div",{className:"relative mt-1.5 hidden items-center pl-5 sm:flex",children:[s.jsx("span",{className:"absolute -top-1.5 left-5 h-[calc(50%+0.375rem)] w-2.5 rounded-bl-md border-b border-l border-border"}),s.jsxs("span",{className:Y(Dt,"pointer-events-none"),children:[s.jsx(Me,{size:16}),c("taskBoard.taskDialog.superAgentLabel")]})]}),e[120]=G,e[121]=R,e[122]=c,e[123]=tt):tt=e[123];let st;e[124]!==et||e[125]!==tt?(st=s.jsxs("div",{className:Q,children:[et,tt]}),e[124]=et,e[125]=tt,e[126]=st):st=e[126];const Gt=!T&&"text-muted-foreground";let nt;e[127]!==Gt?(nt=Y(Dt,Gt),e[127]=Gt,e[128]=nt):nt=e[128];let Ct;e[129]===Symbol.for("react.memo_cache_sentinel")?(Ct=s.jsx(wt,{size:16,className:"text-muted-foreground"}),e[129]=Ct):Ct=e[129];let at;e[130]!==T||e[131]!==c?(at=T?va.format(T):c("taskBoard.taskDialog.dueDateLabel"),e[130]=T,e[131]=c,e[132]=at):at=e[132];let lt;e[133]!==T||e[134]!==A||e[135]!==c?(lt=T&&s.jsx("span",{role:"button",tabIndex:0,"aria-label":c("taskBoard.taskDialog.clearDueDateAriaLabel"),className:"-mr-1 ml-0.5 flex size-4 items-center justify-center rounded-sm text-muted-foreground hover:bg-muted hover:text-foreground",onClick:O=>{O.stopPropagation(),A(null)},onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),O.stopPropagation(),A(null))},children:s.jsx(fs,{size:12})}),e[133]=T,e[134]=A,e[135]=c,e[136]=lt):lt=e[136];let rt;e[137]!==nt||e[138]!==at||e[139]!==lt?(rt=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:nt,children:[Ct,at,lt]})}),e[137]=nt,e[138]=at,e[139]=lt,e[140]=rt):rt=e[140];const Qt=T??void 0;let ot;e[141]!==A||e[142]!==U?(ot=O=>{A(O??null),O&&U(!1)},e[141]=A,e[142]=U,e[143]=ot):ot=e[143];let it;e[144]!==Qt||e[145]!==ot?(it=s.jsx($t,{className:"w-auto p-0",align:"start",children:s.jsx(An,{mode:"single",selected:Qt,onSelect:ot,initialFocus:!0})}),e[144]=Qt,e[145]=ot,e[146]=it):it=e[146];let ct;e[147]!==K||e[148]!==U||e[149]!==rt||e[150]!==it?(ct=s.jsxs(At,{open:K,onOpenChange:U,children:[rt,it]}),e[147]=K,e[148]=U,e[149]=rt,e[150]=it,e[151]=ct):ct=e[151];let dt;e[152]!==ge||e[153]!==be||e[154]!==st||e[155]!==ct?(dt=s.jsxs("div",{className:Le,children:[ge,be,st,ct]}),e[152]=ge,e[153]=be,e[154]=st,e[155]=ct,e[156]=dt):dt=e[156];let ut;e[157]!==ue||e[158]!==dt?(ut=s.jsxs("div",{className:Ve,children:[ue,dt]}),e[157]=ue,e[158]=dt,e[159]=ut):ut=e[159];let ft;e[160]!==Ae||e[161]!==ut?(ft=s.jsxs("div",{className:Re,children:[Ae,ut]}),e[160]=Ae,e[161]=ut,e[162]=ft):ft=e[162];let mt;e[163]!==a||e[164]!==i||e[165]!==c?(mt=a&&i?s.jsx(Ne,{variant:"ghost",size:"icon","aria-label":c("taskBoard.taskDialog.deleteTaskAriaLabel"),className:"size-10 text-muted-foreground hover:text-destructive",onClick:i,children:s.jsx(tn,{size:16})}):s.jsx("span",{}),e[163]=a,e[164]=i,e[165]=c,e[166]=mt):mt=e[166];let gt;e[167]!==a||e[168]!==m||e[169]!==c?(gt=a&&m&&s.jsxs(Ne,{variant:"outline",size:"sm",onClick:m,children:[s.jsx(sn,{size:16}),c("taskBoard.taskDialog.newChatButton")]}),e[167]=a,e[168]=m,e[169]=c,e[170]=gt):gt=e[170];let xt;e[171]!==x||e[172]!==p?(xt=!p.trim()||x,e[171]=x,e[172]=p,e[173]=xt):xt=e[173];let _t;e[174]===Symbol.for("react.memo_cache_sentinel")?(_t=s.jsx(ss,{size:16}),e[174]=_t):_t=e[174];let pt;e[175]!==a||e[176]!==c?(pt=c(a?"taskBoard.taskDialog.saveButton":"taskBoard.taskDialog.createTaskButton"),e[175]=a,e[176]=c,e[177]=pt):pt=e[177];let ht;e[178]!==J||e[179]!==xt||e[180]!==pt?(ht=s.jsxs(Ne,{size:"sm",disabled:xt,onClick:J,children:[_t,pt]}),e[178]=J,e[179]=xt,e[180]=pt,e[181]=ht):ht=e[181];let yt;e[182]!==gt||e[183]!==ht?(yt=s.jsxs("div",{className:"flex items-center gap-2",children:[gt,ht]}),e[182]=gt,e[183]=ht,e[184]=yt):yt=e[184];let bt;e[185]!==mt||e[186]!==yt?(bt=s.jsxs("div",{className:"flex h-16 items-center justify-between border-t border-border px-4",children:[mt,yt]}),e[185]=mt,e[186]=yt,e[187]=bt):bt=e[187];let jt;e[188]!==q||e[189]!==Z||e[190]!==oe||e[191]!==ft||e[192]!==bt?(jt=s.jsxs(q,{className:je,closeButtonClassName:ke,children:[Z,oe,ft,bt]}),e[188]=q,e[189]=Z,e[190]=oe,e[191]=ft,e[192]=bt,e[193]=jt):jt=e[193];let It;return e[194]!==ne||e[195]!==n||e[196]!==z||e[197]!==jt?(It=s.jsx(ne,{open:n,onOpenChange:z,children:jt}),e[194]=ne,e[195]=n,e[196]=z,e[197]=jt,e[198]=It):It=e[198],It}function Da(t){t.key==="Enter"&&t.preventDefault()}function wa(t){t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)}function Ca(t){const e=L.c(17),{thread:n,startedBy:o,onOpen:a}=t,l=se();let r;if(e[0]!==a||e[1]!==o||e[2]!==l||e[3]!==n){const i={failed:{label:l("taskBoard.taskDialog.threadStatusError"),className:"text-destructive",icon:nn},requires_action:{label:l("taskBoard.taskDialog.threadStatusNeedsInput"),className:"text-warning",icon:Ns},in_progress:{label:l("taskBoard.taskDialog.threadStatusRunning"),className:"text-primary",icon:ts,spin:!0},completed:{label:l("taskBoard.taskDialog.threadStatusCompleted"),className:"text-success",icon:rs},expired:{label:l("taskBoard.taskDialog.threadStatusExpired"),className:"text-muted-foreground",icon:Cs}},d=n.status?i[n.status]:null,m=n.lastMessage;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Me,{size:16}),e[5]=x):x=e[5];let c;e[6]!==l||e[7]!==n.title?(c=n.title||l("taskBoard.taskDialog.superAgentDefaultName"),e[6]=l,e[7]=n.title,e[8]=c):c=e[8];let g;e[9]!==c?(g=s.jsx("span",{className:"truncate text-sm text-foreground",children:c}),e[9]=c,e[10]=g):g=e[10];let f;e[11]!==o||e[12]!==l?(f=o&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-sm text-muted-foreground/50",children:l("taskBoard.taskDialog.startedByLabel")}),s.jsx(Fe,{url:o.user?.image??void 0,fallback:ze(o.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate text-sm text-foreground",children:o.user?.name??l("taskBoard.taskDialog.someoneLabel")})]}),e[11]=o,e[12]=l,e[13]=f):f=e[13];let h;e[14]!==g||e[15]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[x,g,f]}),e[14]=g,e[15]=f,e[16]=h):h=e[16],r=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[h,d&&s.jsxs("button",{type:"button",disabled:!a,onClick:()=>a?.(n),className:"flex items-center gap-2 border-t border-border px-4 py-2 text-left transition-colors enabled:hover:bg-muted disabled:cursor-default",children:[s.jsxs("span",{className:Y("flex items-center gap-1.5",d.className),children:[s.jsx(d.icon,{size:16,className:Y(d.spin&&"animate-spin")}),s.jsx("span",{className:"text-sm",children:d.label})]}),m&&s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:m}),a&&s.jsx(Fn,{size:16,className:"ml-auto shrink-0 text-muted-foreground"})]})]}),e[0]=a,e[1]=o,e[2]=l,e[3]=n,e[4]=r}else r=e[4];return r}function _a(t,e){return t.merged?{label:e("taskBoard.taskDialog.prStateMerged"),className:"text-special",icon:an}:t.state==="closed"?{label:e("taskBoard.taskDialog.prStateClosed"),className:"text-destructive",icon:Tt}:t.draft?{label:e("taskBoard.taskDialog.prStateDraft"),className:"text-muted-foreground",icon:Tt}:{label:e("taskBoard.taskDialog.prStateOpen"),className:"text-success",icon:Tt}}function Ia(t){const e=L.c(39),{pr:n}=t,o=se();let a,l,r,i,d,m,x,c;if(e[0]!==n||e[1]!==o){l=_a(n,o);let k;e[10]!==n.body?(k=n.body?.trim(),e[10]=n.body,e[11]=k):k=e[11],a=k,d=n.url,m="_blank",x="noreferrer",c="flex flex-col gap-1 border-t border-border px-4 py-2 transition-colors hover:bg-muted",i="flex items-center gap-2",r=Y("flex items-center gap-1.5",l.className),e[0]=n,e[1]=o,e[2]=a,e[3]=l,e[4]=r,e[5]=i,e[6]=d,e[7]=m,e[8]=x,e[9]=c}else a=e[2],l=e[3],r=e[4],i=e[5],d=e[6],m=e[7],x=e[8],c=e[9];let g;e[12]!==l.icon?(g=s.jsx(l.icon,{size:16}),e[12]=l.icon,e[13]=g):g=e[13];let f;e[14]!==l.label?(f=s.jsx("span",{className:"text-sm",children:l.label}),e[14]=l.label,e[15]=f):f=e[15];let h;e[16]!==r||e[17]!==g||e[18]!==f?(h=s.jsxs("span",{className:r,children:[g,f]}),e[16]=r,e[17]=g,e[18]=f,e[19]=h):h=e[19];const y=n.title??`${n.repoOwner}/${n.repoName}`;let p;e[20]!==y?(p=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:y}),e[20]=y,e[21]=p):p=e[21];let b;e[22]!==n.number?(b=s.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["#",n.number]}),e[22]=n.number,e[23]=b):b=e[23];let u;e[24]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pn,{size:16,className:"shrink-0 text-muted-foreground"}),e[24]=u):u=e[24];let j;e[25]!==p||e[26]!==b||e[27]!==i||e[28]!==h?(j=s.jsxs("span",{className:i,children:[h,p,b,u]}),e[25]=p,e[26]=b,e[27]=i,e[28]=h,e[29]=j):j=e[29];let N;e[30]!==a?(N=a?s.jsx("span",{className:"line-clamp-3 whitespace-pre-line text-xs text-muted-foreground",children:a}):null,e[30]=a,e[31]=N):N=e[31];let S;return e[32]!==j||e[33]!==N||e[34]!==d||e[35]!==m||e[36]!==x||e[37]!==c?(S=s.jsxs("a",{href:d,target:m,rel:x,className:c,children:[j,N]}),e[32]=j,e[33]=N,e[34]=d,e[35]=m,e[36]=x,e[37]=c,e[38]=S):S=e[38],S}function Ba(t){const e=L.c(11),{itemId:n}=t,o=se(),{data:a,isLoading:l}=ka(n);if(!l&&(!a||a.length===0))return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Tt,{size:16,className:"text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==o?(i=o("taskBoard.taskDialog.pullRequestsLabel"),e[1]=o,e[2]=i):i=e[2];let d;e[3]!==i?(d=s.jsxs("div",{className:"flex items-center gap-2 px-4 py-3.5",children:[r,s.jsx("span",{className:"text-sm text-foreground",children:i})]}),e[3]=i,e[4]=d):d=e[4];let m;e[5]!==a||e[6]!==o?(m=a?a.map(Ta):s.jsxs("div",{className:"flex items-center gap-2 border-t border-border px-4 py-2 text-sm text-muted-foreground",children:[s.jsx(ts,{size:16,className:"animate-spin"}),s.jsx("span",{children:o("taskBoard.taskDialog.loadingLabel")})]}),e[5]=a,e[6]=o,e[7]=m):m=e[7];let x;return e[8]!==d||e[9]!==m?(x=s.jsxs("div",{className:"flex flex-col overflow-hidden rounded-lg border border-border",children:[d,m]}),e[8]=d,e[9]=m,e[10]=x):x=e[10],x}function Ta(t){return s.jsx(Ia,{pr:t},t.url)}function Ea(t,e=[]){const n=[[`# Task: ${t.title}`,t.description?.trim()].filter(Boolean).join(`
|
|
3
|
-
|
|
4
|
-
`)];if(e.length>0){const o=e.map(a=>{const l=a.merged?"merged":a.state??(a.draft?"draft":"open"),r=a.title?.trim()||`${a.repoOwner}/${a.repoName}`;return`- #${a.number} ${r} [${l}] ${a.url}`});n.push(["## Linked pull requests",...o].join(`
|
|
5
|
-
`))}if(t.threads.length>0){const o=t.threads.map(a=>{const l=a.title?.trim()||"Untitled chat";return a.status?`- ${l} [${a.status}]`:`- ${l}`});n.push(["## Other chats on this task",...o].join(`
|
|
6
|
-
`))}return n.join(`
|
|
7
|
-
|
|
8
|
-
`)}const Jt="__unassigned__",Pt={assignee:null,priority:null,due:null};function Aa(t){return t.assignee!==null||t.priority!==null||t.due!==null}function $a(t){return(t.assignee!==null?1:0)+(t.priority!==null?1:0)+(t.due!==null?1:0)}const Oa=864e5;function za(t,e){const n=new Date(t),o=new Date(e);return n.getFullYear()===o.getFullYear()&&n.getMonth()===o.getMonth()&&n.getDate()===o.getDate()}function Fa(t,e){if(e.assignee!==null){if(e.assignee===Jt){if(t.assigneeId!==null)return!1}else if(t.assigneeId!==e.assignee)return!1}if(e.priority!==null&&t.priority!==e.priority)return!1;if(e.due!==null)if(e.due==="none"){if(t.dueDate)return!1}else{if(!t.dueDate)return!1;const n=new Date(t.dueDate).getTime(),o=Date.now();if(e.due==="overdue"&&n>=o||e.due==="today"&&!za(n,o)||e.due==="week"&&(n<o||n>o+7*Oa))return!1}return!0}const xs={overdue:"taskBoard.taskFilters.dueDateFilterOverdue",today:"taskBoard.taskFilters.dueDateFilterDueToday",week:"taskBoard.taskFilters.dueDateFilterDueThisWeek",none:"taskBoard.taskFilters.dueDateFilterNoDueDate"};function qt(t,e=!1){return Y("inline-flex h-8 items-center gap-1.5 rounded-lg border px-2.5 text-xs font-medium outline-none transition-colors",e&&"h-10 w-full justify-start px-3 text-sm",t?"border-transparent bg-accent text-foreground":"border-border text-muted-foreground hover:bg-muted/60 hover:text-foreground")}function Ra(t){const e=L.c(95),{value:n,members:o,onChange:a,block:l}=t,r=se(),[i,d]=B.useState(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ht,{size:14,className:"shrink-0"}),e[0]=m):m=e[0];let x=m,c;e[1]!==r?(c=r("taskBoard.taskFilters.assigneeLabel"),e[1]=r,e[2]=c):c=e[2];let g=c;if(n===Jt){let z;e[3]!==r?(z=r("taskBoard.taskFilters.assigneeUnassigned"),e[3]=r,e[4]=z):z=e[4],g=z}else if(n===Qe){let z;e[5]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Me,{size:14}),e[5]=z):z=e[5],x=z;let q;e[6]!==r?(q=r("taskBoard.taskFilters.assigneeSuperAgent"),e[6]=r,e[7]=q):q=e[7],g=q}else if(n){let z,q,je,ke;if(e[8]!==o||e[9]!==n){let ee;e[14]!==n?(ee=re=>re.userId===n,e[14]=n,e[15]=ee):ee=e[15],q=o.find(ee),z=Fe,je=q?.user?.image??void 0,ke=ze(q?.user?.name),e[8]=o,e[9]=n,e[10]=z,e[11]=q,e[12]=je,e[13]=ke}else z=e[10],q=e[11],je=e[12],ke=e[13];let ae;e[16]!==z||e[17]!==je||e[18]!==ke?(ae=s.jsx(z,{url:je,fallback:ke,shape:"circle",size:"2xs"}),e[16]=z,e[17]=je,e[18]=ke,e[19]=ae):ae=e[19],x=ae;let Z;e[20]!==q?.user?.name||e[21]!==r?(Z=q?.user?.name??r("taskBoard.taskFilters.assigneeMember"),e[20]=q?.user?.name,e[21]=r,e[22]=Z):Z=e[22],g=Z}let f;e[23]!==a?(f=z=>{a(z),d(!1)},e[23]=a,e[24]=f):f=e[24];const h=f,y=n!==null;let p;e[25]!==l||e[26]!==y?(p=qt(y,l),e[25]=l,e[26]=y,e[27]=p):p=e[27];const b=p,u=l&&"ml-auto";let j;e[28]!==u?(j=Y("shrink-0 opacity-60",u),e[28]=u,e[29]=j):j=e[29];const N=j;let S;e[30]!==g?(S=s.jsx("span",{className:"max-w-[10rem] truncate",children:g}),e[30]=g,e[31]=S):S=e[31];let k;e[32]!==N?(k=s.jsx(os,{size:12,className:N}),e[32]=N,e[33]=k):k=e[33];let v;e[34]!==x||e[35]!==S||e[36]!==k||e[37]!==b?(v=s.jsx(Et,{asChild:!0,children:s.jsxs("button",{type:"button",className:b,children:[x,S,k]})}),e[34]=x,e[35]=S,e[36]=k,e[37]=b,e[38]=v):v=e[38];let D;e[39]!==r?(D=r("taskBoard.taskFilters.assigneeFilterPlaceholder"),e[39]=r,e[40]=D):D=e[40];let C;e[41]!==D?(C=s.jsx(_s,{placeholder:D,className:"h-9"}),e[41]=D,e[42]=C):C=e[42];let _;e[43]!==r?(_=r("taskBoard.taskFilters.assigneeNoMembersFound"),e[43]=r,e[44]=_):_=e[44];let I;e[45]!==_?(I=s.jsx(Is,{children:_}),e[45]=_,e[46]=I):I=e[46];let T;e[47]!==h?(T=()=>h(null),e[47]=h,e[48]=T):T=e[48];let A;e[49]!==r?(A=r("taskBoard.taskFilters.assigneeAnyone"),e[49]=r,e[50]=A):A=e[50];let K;e[51]!==T||e[52]!==A?(K=s.jsx(Ge,{value:"Anyone",onSelect:T,children:A}),e[51]=T,e[52]=A,e[53]=K):K=e[53];let U;e[54]!==h?(U=()=>h(Jt),e[54]=h,e[55]=U):U=e[55];let w;e[56]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(Ht,{size:16,className:"text-muted-foreground"}),e[56]=w):w=e[56];let E;e[57]!==r?(E=r("taskBoard.taskFilters.assigneeUnassigned"),e[57]=r,e[58]=E):E=e[58];let $;e[59]!==U||e[60]!==E?($=s.jsxs(Ge,{value:"Unassigned",onSelect:U,className:"gap-2",children:[w,E]}),e[59]=U,e[60]=E,e[61]=$):$=e[61];let V;e[62]!==h?(V=()=>h(Qe),e[62]=h,e[63]=V):V=e[63];let W;e[64]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(Me,{size:16}),e[64]=W):W=e[64];let F;e[65]!==r?(F=r("taskBoard.taskFilters.assigneeSuperAgent"),e[65]=r,e[66]=F):F=e[66];let X;e[67]!==V||e[68]!==F?(X=s.jsxs(Ge,{value:"Super Agent",onSelect:V,className:"gap-2",children:[W,F]}),e[67]=V,e[68]=F,e[69]=X):X=e[69];let J;e[70]!==K||e[71]!==$||e[72]!==X?(J=s.jsxs(Rt,{children:[K,$,X]}),e[70]=K,e[71]=$,e[72]=X,e[73]=J):J=e[73];let R;e[74]!==r?(R=r("taskBoard.taskFilters.assigneeGroupMembers"),e[74]=r,e[75]=R):R=e[75];let P;if(e[76]!==o||e[77]!==h){let z;e[79]!==h?(z=q=>s.jsxs(Ge,{value:q.user?.name??q.userId,onSelect:()=>h(q.userId),className:"gap-2",children:[s.jsx(Fe,{url:q.user?.image??void 0,fallback:ze(q.user?.name),shape:"circle",size:"2xs"}),s.jsx("span",{className:"truncate",children:q.user?.name??q.userId})]},q.userId),e[79]=h,e[80]=z):z=e[80],P=o.map(z),e[76]=o,e[77]=h,e[78]=P}else P=e[78];let H;e[81]!==R||e[82]!==P?(H=s.jsx(Rt,{heading:R,children:P}),e[81]=R,e[82]=P,e[83]=H):H=e[83];let G;e[84]!==I||e[85]!==J||e[86]!==H?(G=s.jsxs(Ts,{children:[I,J,H]}),e[84]=I,e[85]=J,e[86]=H,e[87]=G):G=e[87];let te;e[88]!==C||e[89]!==G?(te=s.jsx($t,{align:"start",className:"w-56 p-0",children:s.jsxs(Bs,{children:[C,G]})}),e[88]=C,e[89]=G,e[90]=te):te=e[90];let ne;return e[91]!==i||e[92]!==v||e[93]!==te?(ne=s.jsxs(At,{open:i,onOpenChange:d,children:[v,te]}),e[91]=i,e[92]=v,e[93]=te,e[94]=ne):ne=e[94],ne}function Pa(t){const e=L.c(33),{value:n,onChange:o,block:a}=t,l=se(),r=n!==null;let i;e[0]!==a||e[1]!==r?(i=qt(r,a),e[0]=a,e[1]=r,e[2]=i):i=e[2];const d=i,m=a&&"ml-auto";let x;e[3]!==m?(x=Y("shrink-0 opacity-60",m),e[3]=m,e[4]=x):x=e[4];const c=x;let g;e[5]!==n?(g=n?s.jsx("span",{className:Y("size-2 shrink-0 rounded-full",Oe[n].dotClassName)}):s.jsx(Qn,{size:14,className:"shrink-0"}),e[5]=n,e[6]=g):g=e[6];let f;e[7]!==l||e[8]!==n?(f=l(n?Oe[n].labelKey:"taskBoard.taskFilters.priorityLabel"),e[7]=l,e[8]=n,e[9]=f):f=e[9];let h;e[10]!==c?(h=s.jsx(os,{size:12,className:c}),e[10]=c,e[11]=h):h=e[11];let y;e[12]!==g||e[13]!==f||e[14]!==h||e[15]!==d?(y=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,children:[g,f,h]})}),e[12]=g,e[13]=f,e[14]=h,e[15]=d,e[16]=y):y=e[16];let p;e[17]!==o?(p=()=>o(null),e[17]=o,e[18]=p):p=e[18];let b;e[19]!==l?(b=l("taskBoard.taskFilters.priorityAnyPriority"),e[19]=l,e[20]=b):b=e[20];let u;e[21]!==b||e[22]!==p?(u=s.jsx(vt,{onSelect:p,children:b}),e[21]=b,e[22]=p,e[23]=u):u=e[23];let j;e[24]!==o||e[25]!==l?(j=Os.map(k=>s.jsxs(vt,{onSelect:()=>o(k),className:"gap-2",children:[s.jsx("span",{className:Y("size-2 rounded-full",Oe[k].dotClassName)}),l(Oe[k].labelKey)]},k)),e[24]=o,e[25]=l,e[26]=j):j=e[26];let N;e[27]!==u||e[28]!==j?(N=s.jsxs(zt,{align:"start",className:"w-40",children:[u,j]}),e[27]=u,e[28]=j,e[29]=N):N=e[29];let S;return e[30]!==N||e[31]!==y?(S=s.jsxs(Ft,{children:[y,N]}),e[30]=N,e[31]=y,e[32]=S):S=e[32],S}function La(t){const e=L.c(35),{value:n,onChange:o,block:a}=t,l=se();let r;e[0]!==l||e[1]!==n?(r=n?l(xs[n]):void 0,e[0]=l,e[1]=n,e[2]=r):r=e[2];const i=r,d=n!==null;let m;e[3]!==a||e[4]!==d?(m=qt(d,a),e[3]=a,e[4]=d,e[5]=m):m=e[5];const x=m,c=a&&"ml-auto";let g;e[6]!==c?(g=Y("shrink-0 opacity-60",c),e[6]=c,e[7]=g):g=e[7];const f=g;let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(wt,{size:14,className:"shrink-0"}),e[8]=h):h=e[8];let y;e[9]!==i||e[10]!==l?(y=i??l("taskBoard.taskFilters.dueDateLabel"),e[9]=i,e[10]=l,e[11]=y):y=e[11];let p;e[12]!==f?(p=s.jsx(os,{size:12,className:f}),e[12]=f,e[13]=p):p=e[13];let b;e[14]!==y||e[15]!==p||e[16]!==x?(b=s.jsx(Ot,{asChild:!0,children:s.jsxs("button",{type:"button",className:x,children:[h,y,p]})}),e[14]=y,e[15]=p,e[16]=x,e[17]=b):b=e[17];let u;e[18]!==o?(u=()=>o(null),e[18]=o,e[19]=u):u=e[19];let j;e[20]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(wt,{size:16,className:"text-muted-foreground"}),e[20]=j):j=e[20];let N;e[21]!==l?(N=l("taskBoard.taskFilters.dueDateAnyTime"),e[21]=l,e[22]=N):N=e[22];let S;e[23]!==u||e[24]!==N?(S=s.jsxs(vt,{onSelect:u,className:"gap-2",children:[j,N]}),e[23]=u,e[24]=N,e[25]=S):S=e[25];let k;e[26]!==o||e[27]!==l?(k=Object.entries(xs).map(C=>{const[_,I]=C,T=_==="overdue";return s.jsxs(vt,{onSelect:()=>o(_),className:Y("gap-2",T&&"text-destructive"),children:[s.jsx(wt,{size:16,className:Y("shrink-0",T?"text-destructive":"text-muted-foreground")}),l(I)]},_)}),e[26]=o,e[27]=l,e[28]=k):k=e[28];let v;e[29]!==S||e[30]!==k?(v=s.jsxs(zt,{align:"start",className:"w-44",children:[S,k]}),e[29]=S,e[30]=k,e[31]=v):v=e[31];let D;return e[32]!==v||e[33]!==b?(D=s.jsxs(Ft,{children:[b,v]}),e[32]=v,e[33]=b,e[34]=D):D=e[34],D}function Fs(t){const e=L.c(26),{filters:n,members:o,onChange:a,block:l}=t;let r;e[0]!==n||e[1]!==a?(r=f=>a({...n,assignee:f}),e[0]=n,e[1]=a,e[2]=r):r=e[2];let i;e[3]!==l||e[4]!==n.assignee||e[5]!==o||e[6]!==r?(i=s.jsx(Ra,{block:l,value:n.assignee,members:o,onChange:r}),e[3]=l,e[4]=n.assignee,e[5]=o,e[6]=r,e[7]=i):i=e[7];let d;e[8]!==n||e[9]!==a?(d=f=>a({...n,priority:f}),e[8]=n,e[9]=a,e[10]=d):d=e[10];let m;e[11]!==l||e[12]!==n.priority||e[13]!==d?(m=s.jsx(Pa,{block:l,value:n.priority,onChange:d}),e[11]=l,e[12]=n.priority,e[13]=d,e[14]=m):m=e[14];let x;e[15]!==n||e[16]!==a?(x=f=>a({...n,due:f}),e[15]=n,e[16]=a,e[17]=x):x=e[17];let c;e[18]!==l||e[19]!==n.due||e[20]!==x?(c=s.jsx(La,{block:l,value:n.due,onChange:x}),e[18]=l,e[19]=n.due,e[20]=x,e[21]=c):c=e[21];let g;return e[22]!==i||e[23]!==m||e[24]!==c?(g=s.jsxs(s.Fragment,{children:[i,m,c]}),e[22]=i,e[23]=m,e[24]=c,e[25]=g):g=e[25],g}function qa(t){const e=L.c(12),{filters:n,members:o,onChange:a}=t,l=se();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Es,{size:16,className:"mr-0.5 shrink-0 text-muted-foreground"}),e[0]=r):r=e[0];let i;e[1]!==n||e[2]!==o||e[3]!==a?(i=s.jsx(Fs,{filters:n,members:o,onChange:a}),e[1]=n,e[2]=o,e[3]=a,e[4]=i):i=e[4];let d;e[5]!==n||e[6]!==a||e[7]!==l?(d=Aa(n)&&s.jsx("button",{type:"button",onClick:()=>a(Pt),className:"ml-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground",children:l("taskBoard.taskFilters.clearButton")}),e[5]=n,e[6]=a,e[7]=l,e[8]=d):d=e[8];let m;return e[9]!==i||e[10]!==d?(m=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r,i,d]}),e[9]=i,e[10]=d,e[11]=m):m=e[11],m}function Ma(t){const e=L.c(38),{filters:n,members:o,onChange:a}=t,l=se(),[r,i]=B.useState(!1),d=$a(n),m=d>0;let x;e[0]!==m?(x=qt(m),e[0]=m,e[1]=x):x=e[1];const c=x;let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Es,{size:14,className:"shrink-0"}),e[2]=g):g=e[2];let f;e[3]!==l?(f=l("taskBoard.taskFilters.filterDrawerButtonLabel"),e[3]=l,e[4]=f):f=e[4];let h;e[5]!==d?(h=d>0&&s.jsx("span",{className:"ml-0.5 flex size-4 items-center justify-center rounded-full bg-foreground text-[10px] font-semibold text-background",children:d}),e[5]=d,e[6]=h):h=e[6];let y;e[7]!==f||e[8]!==h||e[9]!==c?(y=s.jsx(Ln,{asChild:!0,children:s.jsxs("button",{type:"button",className:c,children:[g,f,h]})}),e[7]=f,e[8]=h,e[9]=c,e[10]=y):y=e[10];let p;e[11]!==l?(p=l("taskBoard.taskFilters.filterDrawerTitle"),e[11]=l,e[12]=p):p=e[12];let b;e[13]!==p?(b=s.jsx(qn,{className:"px-4 pt-4 text-base font-medium text-foreground",children:p}),e[13]=p,e[14]=b):b=e[14];let u;e[15]!==n||e[16]!==o||e[17]!==a?(u=s.jsx("div",{className:"flex flex-col gap-2 p-4",children:s.jsx(Fs,{block:!0,filters:n,members:o,onChange:a})}),e[15]=n,e[16]=o,e[17]=a,e[18]=u):u=e[18];let j;e[19]!==d||e[20]!==a||e[21]!==l?(j=d>0&&s.jsx(Ne,{variant:"outline",className:"flex-1",onClick:()=>a(Pt),children:l("taskBoard.taskFilters.clearAllButton")}),e[19]=d,e[20]=a,e[21]=l,e[22]=j):j=e[22];let N;e[23]!==l?(N=l("taskBoard.taskFilters.doneButton"),e[23]=l,e[24]=N):N=e[24];let S;e[25]!==N?(S=s.jsx(Mn,{asChild:!0,children:s.jsx(Ne,{className:"flex-1",children:N})}),e[25]=N,e[26]=S):S=e[26];let k;e[27]!==j||e[28]!==S?(k=s.jsxs(Kn,{className:"flex-row gap-2",children:[j,S]}),e[27]=j,e[28]=S,e[29]=k):k=e[29];let v;e[30]!==k||e[31]!==b||e[32]!==u?(v=s.jsxs(Un,{className:"p-0",children:[b,u,k]}),e[30]=k,e[31]=b,e[32]=u,e[33]=v):v=e[33];let D;return e[34]!==r||e[35]!==v||e[36]!==y?(D=s.jsxs(Gn,{open:r,onOpenChange:i,direction:"bottom",children:[y,v]}),e[34]=r,e[35]=v,e[36]=y,e[37]=D):D=e[37],D}const ps=380,Ka=90,hs=5,Ua="cubic-bezier(0.22, 0.61, 0.36, 1)",Ga=8;function Qa(t,e){const n=B.useRef(new Map);B.useLayoutEffect(()=>{const o=t.current;if(!o)return;const a=o.querySelectorAll("[data-flip-id]"),l=n.current,r=new Map,i=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)").matches,d=[];for(const g of a){const f=g.dataset.flipId;if(!f)continue;const h=g.getBoundingClientRect();r.set(f,h);const y=l.get(f);if(!y)continue;const p=y.left-h.left,b=y.top-h.top;(p||b)&&d.push({el:g,dx:p,dy:b,lane:Math.abs(p)>Ga})}if(n.current=r,i||d.length===0)return;for(const g of d){const f=g.lane?` rotate(${g.dx>0?hs:-hs}deg)`:"";g.el.style.transition="none",g.el.style.transform=`translate(${g.dx}px, ${g.dy}px)${f}`,g.lane&&(g.el.style.zIndex="10")}let m=0;const x=[],c=requestAnimationFrame(()=>{for(const g of d){const f=g.lane?m++*Ka:0;g.el.style.transition=`transform ${ps}ms ${Ua} ${f}ms`,g.el.style.transform="",x.push(window.setTimeout(()=>{g.el.style.transition="",g.el.style.transform="",g.el.style.zIndex=""},ps+f+30))}});return()=>{cancelAnimationFrame(c);for(const g of x)clearTimeout(g)}},[e,t])}const Ya="https://decoims.com/image?src=decocms%2F7263a67f-fb83-410b-a5f2-e54e87deaaac%2Freport-kanban.png&quality=original&fit=cover",Va=["Todas as tarefas do diagnóstico, priorizadas no seu quadro","Um relatório recorrente do seu site, sempre atualizado","O agente resolve cada tarefa e deixa pronta para a sua revisão"],ys={price:"R$ 99",anchor:"R$ 499"};function Ha(t){const e=L.c(5),{onOpen:n}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-success/10",children:s.jsx(vs,{size:16,className:"text-success"})}),e[0]=o):o=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3 sm:items-center",children:[o,s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:"Seu plano de ação está a um clique"}),s.jsx("span",{className:"text-sm text-muted-foreground",children:"Desbloqueie o diagnóstico completo e as tarefas entram aqui, da maior prioridade para a menor."})]})]}),e[1]=a):a=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(As,{size:16}),e[2]=l):l=e[2];let r;return e[3]!==n?(r=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl bg-card p-4 card-shadow sm:flex-row sm:items-center sm:gap-4",children:[a,s.jsxs(Ne,{size:"sm",onClick:n,className:"w-full gap-2 sm:w-auto sm:shrink-0",children:["Desbloquear diagnóstico",l]})]}),e[3]=n,e[4]=r):r=e[4],r}function Wa({open:t,onOpenChange:e,cdClient:n,onExpired:o}){const[a,l]=B.useState(!1),r=async()=>{if(!n){o();return}l(!0);try{const i=await n.callTool({name:"start_checkout",arguments:{}}),{url:d}=Wt(i);if(new URL(d).protocol!=="https:")throw new Error("unsafe checkout url");window.open(d,"_blank","noopener,noreferrer"),e(!1)}catch{o()}finally{l(!1)}};return s.jsx(as,{open:t,onOpenChange:e,children:s.jsxs(ns,{className:"gap-0 p-3 sm:max-w-[500px]",closeButtonClassName:"z-10 rounded-full bg-background/70 p-1 text-foreground backdrop-blur transition-colors hover:bg-background",children:[s.jsx("div",{className:"overflow-hidden rounded-xl bg-muted",children:s.jsx("img",{src:Ya,alt:"Prévia do seu quadro de tarefas desbloqueado",className:"h-[208px] w-full object-cover object-left-top"})}),s.jsxs("div",{className:"flex flex-col gap-7 px-3 pb-3 pt-7",children:[s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ls,{className:"text-xl font-semibold text-foreground",children:"Desbloqueie seu plano de trabalho"}),s.jsx("ul",{className:"flex flex-col gap-3.5",children:Va.map(i=>s.jsxs("li",{className:"flex items-start gap-3 text-sm",children:[s.jsx(rs,{size:18,className:"mt-0.5 shrink-0 text-success","aria-hidden":!0}),s.jsx("span",{className:"leading-snug text-foreground",children:i})]},i))})]}),s.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[s.jsxs("div",{className:"flex items-baseline gap-2",children:[s.jsx("span",{className:"text-2xl font-semibold text-foreground",children:ys.price}),s.jsx("span",{className:"text-sm text-muted-foreground line-through",children:ys.anchor})]}),s.jsxs("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[s.jsx(Ne,{variant:"ghost",onClick:()=>e(!1),disabled:a,className:"order-2 w-full sm:order-none sm:w-auto",children:"Explorar"}),s.jsxs(Ne,{onClick:r,disabled:a,className:"order-1 w-full gap-2 sm:order-none sm:w-auto",children:[a?s.jsx(es,{size:16,className:"animate-spin"}):null,"Desbloquear diagnóstico",!a&&s.jsx(As,{size:16})]})]})]})]})]})})}function Yt(t){return`board-paywall-seen:${t}`}function Xa(){const t=L.c(26),{org:e}=Ye(),n=js(),{diagnostic:o,cdClient:a,connectionId:l}=fa();let r;t[0]!==e.id?(r=()=>({orgId:e.id,open:!sessionStorage.getItem(Yt(e.id))}),t[0]=e.id,t[1]=r):r=t[1];const[i,d]=B.useState(r);let m;t[2]!==i.open||t[3]!==i.orgId||t[4]!==e.id?(m=i.orgId===e.id?i.open:!sessionStorage.getItem(Yt(e.id)),t[2]=i.open,t[3]=i.orgId,t[4]=e.id,t[5]=m):m=t[5];const x=m;if(!o?.locked)return null;let c;t[6]!==e.id?(c=N=>d({orgId:e.id,open:N}),t[6]=e.id,t[7]=c):c=t[7];const g=c;let f;t[8]!==e.id||t[9]!==g?(f=N=>{g(N),N||sessionStorage.setItem(Yt(e.id),"1")},t[8]=e.id,t[9]=g,t[10]=f):f=t[10];const h=f;let y;t[11]!==l||t[12]!==n||t[13]!==e?(y=()=>{ds("board_paywall_report_opened",{organization_id:e.id}),n(ga(e,l))},t[11]=l,t[12]=n,t[13]=e,t[14]=y):y=t[14];const p=y;let b;t[15]!==e.id||t[16]!==g?(b=s.jsx(Ha,{onOpen:()=>{ds("board_paywall_banner_clicked",{organization_id:e.id}),g(!0)}}),t[15]=e.id,t[16]=g,t[17]=b):b=t[17];let u;t[18]!==a||t[19]!==h||t[20]!==x||t[21]!==p?(u=s.jsx(Wa,{open:x,onOpenChange:h,cdClient:a,onExpired:p}),t[18]=a,t[19]=h,t[20]=x,t[21]=p,t[22]=u):u=t[22];let j;return t[23]!==b||t[24]!==u?(j=s.jsxs(s.Fragment,{children:[b,u]}),t[23]=b,t[24]=u,t[25]=j):j=t[25],j}function Ja(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Xs,{fallback:null,children:s.jsx(Xa,{})}),t[0]=e):e=t[0],e}Zs(()=>import("./index-Bnc4IoFE.js").then(t=>t.b4),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152])).catch(()=>{});function Za(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:s.jsx("div",{className:"h-full p-0.5 pt-0.25",children:s.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:s.jsx(Ms,{})})})}),t[0]=e):e=t[0],e}const el=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric"});function tl(t){const e=new Date(t),n=e.getTime()<Date.now();return{label:el.format(e),overdue:n}}const cs="inline-flex items-center gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs font-medium text-muted-foreground";function Rs(){const t=L.c(9),e=se();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=Y(cs,"border-warning/30 text-warning"),t[0]=n):n=t[0];let o;t[1]!==e?(o=e("taskBoard.taskBoard.blockedBadgeTitle"),t[1]=e,t[2]=o):o=t[2];let a;t[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ns,{size:14}),t[3]=a):a=t[3];let l;t[4]!==e?(l=e("taskBoard.taskBoard.needsInput"),t[4]=e,t[5]=l):l=t[5];let r;return t[6]!==o||t[7]!==l?(r=s.jsxs("span",{className:n,title:o,children:[a,l]}),t[6]=o,t[7]=l,t[8]=r):r=t[8],r}function Ps(t){const e=L.c(10),{priority:n}=t,o=se(),a=Oe[n];let l;e[0]!==a.dotClassName?(l=Y("size-2 rounded-full",a.dotClassName),e[0]=a.dotClassName,e[1]=l):l=e[1];let r;e[2]!==l?(r=s.jsx("span",{className:l}),e[2]=l,e[3]=r):r=e[3];let i;e[4]!==a.labelKey||e[5]!==o?(i=o(a.labelKey),e[4]=a.labelKey,e[5]=o,e[6]=i):i=e[6];let d;return e[7]!==r||e[8]!==i?(d=s.jsxs("span",{className:cs,children:[r,i]}),e[7]=r,e[8]=i,e[9]=d):d=e[9],d}function Ls(t){const e=L.c(7),{iso:n}=t;let o,a;if(e[0]!==n){const{label:i,overdue:d}=tl(n);o=i,a=Y(cs,d&&"border-destructive/30 text-destructive"),e[0]=n,e[1]=o,e[2]=a}else o=e[1],a=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(wt,{size:14}),e[3]=l):l=e[3];let r;return e[4]!==o||e[5]!==a?(r=s.jsxs("span",{className:a,children:[l,o]}),e[4]=o,e[5]=a,e[6]=r):r=e[6],r}function qs(t){const e=L.c(24),{item:n,assignee:o,assignedBy:a,members:l,onAssign:r}=t,i=se(),[d,m]=B.useState(!1);if(n.assigneeId===Qe){let y;e[0]!==a||e[1]!==i?(y=a?.user?.name?i("taskBoard.taskBoard.assignedToSuperAgentBy",{name:a.user.name}):i("taskBoard.taskBoard.assignedToSuperAgent"),e[0]=a,e[1]=i,e[2]=y):y=e[2];let p;e[3]!==a?(p=a&&s.jsx(Fe,{url:a.user?.image??void 0,fallback:ze(a.user?.name),shape:"circle",size:"xs",className:"-mr-2 ring-2 ring-background"}),e[3]=a,e[4]=p):p=e[4];let b;e[5]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Me,{size:20,className:"ring-2 ring-background"}),e[5]=b):b=e[5];let u;return e[6]!==y||e[7]!==p?(u=s.jsxs("span",{className:"inline-flex items-center",title:y,children:[p,b]}),e[6]=y,e[7]=p,e[8]=u):u=e[8],u}if(o){const y=o.user?.image??void 0,p=o.user?.name;let b;e[9]!==p?(b=ze(p),e[9]=p,e[10]=b):b=e[10];let u;return e[11]!==y||e[12]!==b?(u=s.jsx(Fe,{url:y,fallback:b,shape:"circle",size:"xs"}),e[11]=y,e[12]=b,e[13]=u):u=e[13],u}if(!r||!l?.length)return null;let x;e[14]===Symbol.for("react.memo_cache_sentinel")?(x=y=>{y.stopPropagation(),m(!0)},e[14]=x):x=e[14];let c;e[15]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Et,{asChild:!0,children:s.jsx("button",{type:"button",title:"Assign",onClick:x,className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-dashed border-muted-foreground/40 text-muted-foreground/40 transition-colors hover:border-muted-foreground hover:text-muted-foreground",children:s.jsx(ks,{size:13})})}),e[15]=c):c=e[15];let g;e[16]!==r?(g=y=>{r(y),m(!1)},e[16]=r,e[17]=g):g=e[17];let f;e[18]!==l||e[19]!==g?(f=s.jsx($t,{className:"w-56 p-0",align:"end",side:"bottom",onClick:sl,children:s.jsx(zs,{members:l,onSelect:g})}),e[18]=l,e[19]=g,e[20]=f):f=e[20];let h;return e[21]!==d||e[22]!==f?(h=s.jsxs(At,{open:d,onOpenChange:m,children:[c,f]}),e[21]=d,e[22]=f,e[23]=h):h=e[23],h}function sl(t){return t.stopPropagation()}function Ms(){const t=L.c(124),e=se(),{items:n,isLoading:o}=ya(),a=ba(),l=Hn();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={slug:"mcp-github"},t[0]=r):r=t[0];const i=bn(r);let d;t[1]!==i?(d=jn(i),t[1]=i,t[2]=d):d=t[2];const m=d.length>0,[x,c]=B.useState(!1),{data:g}=ws();let f,h;t[3]!==g?.data?.members?(f=g?.data?.members??[],h=new Map(f.map(ll)),t[3]=g?.data?.members,t[4]=f,t[5]=h):(f=t[4],h=t[5]);const y=h,[p,b]=B.useState("board"),[u,j]=B.useState(Pt),[N,S]=B.useState(!1),[k,v]=B.useState(null),[D,C]=B.useState(null),{setTaskId:_}=Yn(),{create:I}=Vn(),T=Lt(),{org:A,locator:K}=Ye(),U=js();let w;t[6]===Symbol.for("react.memo_cache_sentinel")?(w={strict:!1},t[6]=w):w=t[6];const{task:E}=Js(w);let $;t[7]!==E||t[8]!==n?($=E?n.find(M=>M.id===E)??null:null,t[7]=E,t[8]=n,t[9]=$):$=t[9];const V=$;let W;t[10]!==E||t[11]!==U||t[12]!==A?(W=()=>{E&&U({to:"/$org/board",params:{org:A.slug},search:{},replace:!0})},t[10]=E,t[11]=U,t[12]=A,t[13]=W):W=t[13];const F=W;let X;t[14]!==a||t[15]!==I||t[16]!==K||t[17]!==A||t[18]!==_||t[19]!==T?(X=async M=>{const ie=crypto.randomUUID(),le=fn(A.id).id,Ce=await T.call("TASK_BOARD_ITEM_PRS_GET",{taskBoardItemId:M.id}).then(al).catch(nl),ce=Ea(M,Ce),_e={type:"doc",content:[{type:"paragraph",content:[$n({id:M.id,name:M.title,char:"@",kind:"task",metadata:{title:M.title,description:M.description,context:ce}}),{type:"text",text:" "}]}]};Zn(sessionStorage,K,ie,_e),S(!1);try{await I({id:ie,virtual_mcp_id:le}),await a.link.mutateAsync({id:M.id,linkThreadId:ie})}catch{}_(ie,le)},t[14]=a,t[15]=I,t[16]=K,t[17]=A,t[18]=_,t[19]=T,t[20]=X):X=t[20];const J=X;let R,P,H,G,te,ne,z;if(t[21]!==a||t[22]!==F||t[23]!==V||t[24]!==N||t[25]!==k||t[26]!==u||t[27]!==m||t[28]!==o||t[29]!==n||t[30]!==p||t[31]!==y||t[32]!==f||t[33]!==l||t[34]!==e){te=Symbol.for("react.early_return_sentinel");e:{let M;t[42]!==u?(M=Q=>Fa(Q,u),t[42]=u,t[43]=M):M=t[43];const ie=n.filter(M);let le;t[44]===Symbol.for("react.memo_cache_sentinel")?(le=()=>{v(null),C(null),S(!0)},t[44]=le):le=t[44];const Ce=le;let ce;t[45]===Symbol.for("react.memo_cache_sentinel")?(ce=Q=>{v(null),C(Q),S(!0)},t[45]=ce):ce=t[45];const _e=ce;let Pe;t[46]===Symbol.for("react.memo_cache_sentinel")?(Pe=Q=>{v(Q),S(!0)},t[46]=Pe):Pe=t[46];const Ae=Pe;R=k??V,H=N||!!V;let Ve;if(t[47]!==F?(Ve=()=>{S(!1),v(null),C(null),F()},t[47]=F,t[48]=Ve):Ve=t[48],P=Ve,o&&n.length===0){let Q;t[49]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx("div",{className:"flex flex-1 items-center justify-center",children:s.jsx(es,{size:20,className:"animate-spin text-muted-foreground"})}),t[49]=Q):Q=t[49],te=Q;break e}ne="flex min-h-0 flex-1 flex-col";let de;t[50]!==e?(de=e("taskBoard.taskBoard.tasksTitle"),t[50]=e,t[51]=de):de=t[51];let ue;t[52]!==de?(ue=s.jsx("h1",{className:"text-xl font-medium text-foreground",children:de}),t[52]=de,t[53]=ue):ue=t[53];let Le;t[54]!==l?(Le=l&&s.jsx(Ja,{}),t[54]=l,t[55]=Le):Le=t[55];let Ie;t[56]!==u||t[57]!==n.length||t[58]!==f?(Ie=n.length>0&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"sm:hidden",children:s.jsx(Ma,{filters:u,members:f,onChange:j})}),s.jsx("div",{className:"hidden sm:block",children:s.jsx(qa,{filters:u,members:f,onChange:j})})]}),t[56]=u,t[57]=n.length,t[58]=f,t[59]=Ie):Ie=t[59];const Be=p==="list";let qe;t[60]===Symbol.for("react.memo_cache_sentinel")?(qe=()=>b("list"),t[60]=qe):qe=t[60];let fe;t[61]!==e?(fe=e("common.taskBoard.listView"),t[61]=e,t[62]=fe):fe=t[62];let me;t[63]!==Be||t[64]!==fe?(me=s.jsx(bs,{active:Be,onClick:qe,icon:rn,label:fe}),t[63]=Be,t[64]=fe,t[65]=me):me=t[65];const Te=p==="board";let De;t[66]===Symbol.for("react.memo_cache_sentinel")?(De=()=>b("board"),t[66]=De):De=t[66];let ge;t[67]!==e?(ge=e("common.taskBoard.boardView"),t[67]=e,t[68]=ge):ge=t[68];let Ee;t[69]!==Te||t[70]!==ge?(Ee=s.jsx(bs,{active:Te,onClick:De,icon:ln,label:ge}),t[69]=Te,t[70]=ge,t[71]=Ee):Ee=t[71];let xe;t[72]!==me||t[73]!==Ee?(xe=s.jsxs("div",{className:"inline-flex rounded-lg bg-muted p-0.5",children:[me,Ee]}),t[72]=me,t[73]=Ee,t[74]=xe):xe=t[74];let we;t[75]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(ss,{size:16}),t[75]=we):we=t[75];let pe;t[76]!==e?(pe=e("taskBoard.taskBoard.newTask"),t[76]=e,t[77]=pe):pe=t[77];let he;t[78]!==pe?(he=s.jsxs(Ne,{size:"sm",onClick:Ce,children:[we,pe]}),t[78]=pe,t[79]=he):he=t[79];let ye;t[80]!==xe||t[81]!==he?(ye=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[xe,he]}),t[80]=xe,t[81]=he,t[82]=ye):ye=t[82];let be;t[83]!==Ie||t[84]!==ye?(be=s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[Ie,ye]}),t[83]=Ie,t[84]=ye,t[85]=be):be=t[85],t[86]!==ue||t[87]!==Le||t[88]!==be?(z=s.jsxs("div",{className:"mx-auto flex w-full max-w-[1680px] flex-col gap-4 px-4 pt-6 sm:px-8 sm:pt-8",children:[ue,Le,be]}),t[86]=ue,t[87]=Le,t[88]=be,t[89]=z):z=t[89],G=n.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsx("div",{className:"rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:e("taskBoard.taskBoard.noTasksYet")})}):ie.length===0?s.jsx("div",{className:"mx-auto w-full max-w-[1680px] px-4 pt-6 sm:px-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl bg-card px-4 py-12 text-center text-sm text-muted-foreground card-shadow",children:[e("taskBoard.taskBoard.noTasksMatch"),s.jsx(Ne,{variant:"outline",size:"sm",onClick:()=>j(Pt),children:e("taskBoard.taskBoard.clearFilters")})]})}):p==="board"?s.jsx(ol,{items:ie,members:f,memberByUserId:y,onOpen:Ae,onCreate:_e,onMove:(Q,Ue)=>a.update.mutate({id:Q,status:Ue}),onAssign:(Q,Ue)=>a.update.mutate({id:Q,assigneeId:Ue??void 0}),onAutoFix:l?Q=>{if(!m){c(!0);return}a.update.mutate({id:Q.id,assigneeId:Qe})}:void 0}):s.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto px-4 pt-6 pb-16 sm:px-8",children:s.jsx("div",{className:"mx-auto flex max-w-[820px] flex-col gap-2",children:ie.map(Q=>s.jsx(dl,{item:Q,assignee:Q.assigneeId?y.get(Q.assigneeId):void 0,assignedBy:Q.assignedBy?y.get(Q.assignedBy):void 0,onOpen:()=>Ae(Q)},Q.id))})})}t[21]=a,t[22]=F,t[23]=V,t[24]=N,t[25]=k,t[26]=u,t[27]=m,t[28]=o,t[29]=n,t[30]=p,t[31]=y,t[32]=f,t[33]=l,t[34]=e,t[35]=R,t[36]=P,t[37]=H,t[38]=G,t[39]=te,t[40]=ne,t[41]=z}else R=t[35],P=t[36],H=t[37],G=t[38],te=t[39],ne=t[40],z=t[41];if(te!==Symbol.for("react.early_return_sentinel"))return te;const q=H?R?.id??`new-${D??"default"}`:"closed",je=R??void 0,ke=D??void 0,ae=a.create.isPending||a.update.isPending;let Z;t[90]!==a.create||t[91]!==a.update||t[92]!==R||t[93]!==P?(Z=M=>{R?a.update.mutate({id:R.id,...M}):a.create.mutate(M),P()},t[90]=a.create,t[91]=a.update,t[92]=R,t[93]=P,t[94]=Z):Z=t[94];let ee;t[95]!==a.remove||t[96]!==R||t[97]!==P?(ee=R?()=>{a.remove.mutate(R.id),P()}:void 0,t[95]=a.remove,t[96]=R,t[97]=P,t[98]=ee):ee=t[98];let re;t[99]!==R||t[100]!==J?(re=R?()=>{J(R)}:void 0,t[99]=R,t[100]=J,t[101]=re):re=t[101];let oe;t[102]!==P||t[103]!==_?(oe=M=>{M.virtualMcpId&&(P(),_(M.threadId,M.virtualMcpId,{main:M.hasPreview?"preview":"board"}))},t[102]=P,t[103]=_,t[104]=oe):oe=t[104];let Re;t[105]!==P||t[106]!==H||t[107]!==q||t[108]!==je||t[109]!==ke||t[110]!==ae||t[111]!==Z||t[112]!==ee||t[113]!==re||t[114]!==oe?(Re=s.jsx(Sa,{open:H,onClose:P,item:je,defaultStatus:ke,isSaving:ae,onSubmit:Z,onDelete:ee,onNewChat:re,onOpenThread:oe},q),t[105]=P,t[106]=H,t[107]=q,t[108]=je,t[109]=ke,t[110]=ae,t[111]=Z,t[112]=ee,t[113]=re,t[114]=oe,t[115]=Re):Re=t[115];let ve;t[116]!==x?(ve=s.jsx(rl,{open:x,onOpenChange:c}),t[116]=x,t[117]=ve):ve=t[117];let Se;return t[118]!==G||t[119]!==Re||t[120]!==ve||t[121]!==ne||t[122]!==z?(Se=s.jsxs("div",{className:ne,children:[z,G,Re,ve]}),t[118]=G,t[119]=Re,t[120]=ve,t[121]=ne,t[122]=z,t[123]=Se):Se=t[123],Se}function nl(){return[]}function al(t){return t.prs}function ll(t){return[t.userId,t]}function rl(t){const e=L.c(30),{open:n,onOpenChange:o}=t,a=se(),{connect:l,isConnecting:r}=xa("deco/mcp-github");let i;e[0]!==a?(i=a("taskBoard.taskBoard.connectGithubTitle"),e[0]=a,e[1]=i):i=e[1];let d;e[2]!==i?(d=s.jsx(ls,{children:i}),e[2]=i,e[3]=d):d=e[3];let m;e[4]!==a?(m=a("taskBoard.taskBoard.connectGithubDescription"),e[4]=a,e[5]=m):m=e[5];let x;e[6]!==m?(x=s.jsx(xn,{children:m}),e[6]=m,e[7]=x):x=e[7];let c;e[8]!==d||e[9]!==x?(c=s.jsxs(pn,{children:[d,x]}),e[8]=d,e[9]=x,e[10]=c):c=e[10];let g;e[11]!==l||e[12]!==o?(g=async()=>{await l(),o(!1)},e[11]=l,e[12]=o,e[13]=g):g=e[13];let f;e[14]!==r?(f=r?s.jsx(es,{size:16,className:"animate-spin"}):s.jsx(gn,{className:"size-4"}),e[14]=r,e[15]=f):f=e[15];let h;e[16]!==a?(h=a("taskBoard.taskBoard.connectGithubButton"),e[16]=a,e[17]=h):h=e[17];let y;e[18]!==r||e[19]!==g||e[20]!==f||e[21]!==h?(y=s.jsx(hn,{children:s.jsxs(Ne,{onClick:g,disabled:r,className:"gap-2",children:[f,h]})}),e[18]=r,e[19]=g,e[20]=f,e[21]=h,e[22]=y):y=e[22];let p;e[23]!==c||e[24]!==y?(p=s.jsxs(ns,{className:"sm:max-w-md",children:[c,y]}),e[23]=c,e[24]=y,e[25]=p):p=e[25];let b;return e[26]!==o||e[27]!==n||e[28]!==p?(b=s.jsx(as,{open:n,onOpenChange:o,children:p}),e[26]=o,e[27]=n,e[28]=p,e[29]=b):b=e[29],b}function bs(t){const e=L.c(14),{active:n,onClick:o,icon:a,label:l}=t,r=se();let i;e[0]!==l||e[1]!==r?(i=r("taskBoard.taskBoard.layoutViewAriaLabel",{label:l}),e[0]=l,e[1]=r,e[2]=i):i=e[2];const d=n?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground";let m;e[3]!==d?(m=Y("flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors",d),e[3]=d,e[4]=m):m=e[4];let x;e[5]!==a?(x=s.jsx(a,{size:14}),e[5]=a,e[6]=x):x=e[6];let c;return e[7]!==n||e[8]!==l||e[9]!==o||e[10]!==i||e[11]!==m||e[12]!==x?(c=s.jsxs("button",{type:"button",onClick:o,"aria-label":i,"aria-pressed":n,className:m,children:[x,l]}),e[7]=n,e[8]=l,e[9]=o,e[10]=i,e[11]=m,e[12]=x,e[13]=c):c=e[13],c}function ol(t){const e=L.c(15),{items:n,members:o,memberByUserId:a,onOpen:l,onCreate:r,onMove:i,onAutoFix:d,onAssign:m}=t,x=se(),[c,g]=B.useState(null),f=B.useRef(null);let h;e[0]!==n?(h=n.map(il).join(","),e[0]=n,e[1]=h):h=e[1],Qa(f,h);let p;e[2]!==n||e[3]!==a||e[4]!==o||e[5]!==m||e[6]!==d||e[7]!==r||e[8]!==i||e[9]!==l||e[10]!==c||e[11]!==x?(p=$s.map(u=>{const j=n.filter(k=>k.status===u),N=$e[u],S=N.icon;return s.jsxs("div",{onDragOver:k=>{k.preventDefault(),g(u)},onDragLeave:k=>{k.currentTarget.contains(k.relatedTarget)||g(null)},onDrop:k=>{k.preventDefault();const v=k.dataTransfer.getData("text/plain");v&&i(v,u),g(null)},className:Y("flex w-[300px] shrink-0 flex-col rounded-xl p-1 transition-colors",c===u&&"bg-muted/50"),children:[s.jsxs("div",{className:"sticky top-0 z-10 flex items-center gap-2 bg-background px-2 py-1.5",children:[s.jsx(S,{size:15,className:Y("shrink-0",N.iconClassName)}),s.jsx("span",{className:"text-sm font-medium text-foreground",children:x(N.labelKey)}),s.jsx("span",{className:"rounded-md bg-muted px-1.5 text-[11px] font-medium text-muted-foreground",children:j.length}),s.jsx("button",{type:"button","aria-label":x("taskBoard.taskBoard.newTaskInLaneAriaLabel",{lane:x(N.labelKey)}),title:x("taskBoard.taskBoard.newTaskInLaneTitle",{lane:x(N.labelKey)}),onClick:()=>r(u),className:"ml-auto flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",children:s.jsx(ss,{size:15})})]}),s.jsx("div",{className:"flex min-h-12 flex-col gap-2 pt-1",children:j.map(k=>s.jsx(cl,{item:k,assignee:k.assigneeId?a.get(k.assigneeId):void 0,assignedBy:k.assignedBy?a.get(k.assignedBy):void 0,members:o,onOpen:()=>l(k),onAutoFix:d?()=>d(k):void 0,onAssign:m?v=>m(k.id,v):void 0},k.id))})]},u)}),e[2]=n,e[3]=a,e[4]=o,e[5]=m,e[6]=d,e[7]=r,e[8]=i,e[9]=l,e[10]=c,e[11]=x,e[12]=p):p=e[12];let b;return e[13]!==p?(b=s.jsx("div",{ref:f,className:"min-h-0 flex-1 overflow-x-auto overflow-y-auto",children:s.jsx("div",{className:"mx-auto flex w-full max-w-[1680px] gap-3 px-4 pt-6 pb-16 sm:px-8",children:p})}),e[13]=p,e[14]=b):b=e[14],b}function il(t){return`${t.id}:${t.status}`}function cl(t){const e=L.c(36),{item:n,assignee:o,assignedBy:a,members:l,onOpen:r,onAutoFix:i,onAssign:d}=t,m=se(),x=$e[n.status],c=x.icon,g=ja(n)?.lastMessage,f=i&&(n.status==="triage"||n.status==="todo")&&n.assigneeId!==Qe,h=n.id;let y;e[0]!==n.id?(y=_=>{_.dataTransfer.setData("text/plain",n.id),_.dataTransfer.effectAllowed="move"},e[0]=n.id,e[1]=y):y=e[1];const p=n.title;let b;e[2]!==x.iconClassName?(b=Y("mt-px shrink-0",x.iconClassName),e[2]=x.iconClassName,e[3]=b):b=e[3];let u;e[4]!==c||e[5]!==b?(u=s.jsx(c,{size:16,className:b}),e[4]=c,e[5]=b,e[6]=u):u=e[6];let j;e[7]!==n.title?(j=s.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium leading-snug text-foreground line-clamp-2",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let N;e[9]!==a||e[10]!==o||e[11]!==n||e[12]!==l||e[13]!==d?(N=s.jsx(qs,{item:n,assignee:o,assignedBy:a,members:l,onAssign:d}),e[9]=a,e[10]=o,e[11]=n,e[12]=l,e[13]=d,e[14]=N):N=e[14];let S;e[15]!==u||e[16]!==j||e[17]!==N?(S=s.jsxs("div",{className:"flex items-start gap-2",children:[u,j,N]}),e[15]=u,e[16]=j,e[17]=N,e[18]=S):S=e[18];let k;e[19]!==g?(k=g&&s.jsx("p",{className:"line-clamp-2 pl-6 text-xs leading-snug text-muted-foreground",children:g}),e[19]=g,e[20]=k):k=e[20];let v;e[21]!==n?(v=(Xt(n)||n.priority!=="none"||!!n.dueDate)&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pl-6",children:[Xt(n)&&s.jsx(Rs,{}),n.priority!=="none"&&s.jsx(Ps,{priority:n.priority}),n.dueDate&&s.jsx(Ls,{iso:n.dueDate})]}),e[21]=n,e[22]=v):v=e[22];let D;e[23]!==i||e[24]!==f||e[25]!==m?(D=f&&s.jsxs("button",{type:"button",onClick:_=>{_.stopPropagation(),i()},className:"flex items-center gap-1.5 self-end rounded-md border border-border bg-background px-2 py-1 text-xs font-medium text-foreground transition-colors hover:bg-accent",children:[s.jsx(vs,{size:12}),m("taskBoard.taskBoard.autoFix")]}),e[23]=i,e[24]=f,e[25]=m,e[26]=D):D=e[26];let C;return e[27]!==n.id||e[28]!==n.title||e[29]!==r||e[30]!==v||e[31]!==D||e[32]!==y||e[33]!==S||e[34]!==k?(C=s.jsxs("button",{type:"button",draggable:!0,"data-flip-id":h,onDragStart:y,onClick:r,className:"group flex cursor-grab flex-col gap-2 rounded-xl bg-card px-3 py-2.5 text-left card-shadow transition-colors will-change-transform hover:bg-accent/60 active:cursor-grabbing",title:p,children:[S,k,v,D]}),e[27]=n.id,e[28]=n.title,e[29]=r,e[30]=v,e[31]=D,e[32]=y,e[33]=S,e[34]=k,e[35]=C):C=e[35],C}function dl(t){const e=L.c(30),{item:n,assignee:o,assignedBy:a,onOpen:l}=t,r=$e[n.status],i=r.icon;let d;e[0]!==r.iconClassName?(d=Y("shrink-0",r.iconClassName),e[0]=r.iconClassName,e[1]=d):d=e[1];let m;e[2]!==i||e[3]!==d?(m=s.jsx(i,{size:16,className:d}),e[2]=i,e[3]=d,e[4]=m):m=e[4];let x;e[5]!==n.title?(x=s.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium text-foreground",children:n.title}),e[5]=n.title,e[6]=x):x=e[6];let c;e[7]!==n?(c=Xt(n)&&s.jsx(Rs,{}),e[7]=n,e[8]=c):c=e[8];let g;e[9]!==n.priority?(g=n.priority!=="none"&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ps,{priority:n.priority})}),e[9]=n.priority,e[10]=g):g=e[10];let f;e[11]!==n.dueDate?(f=n.dueDate&&s.jsx("span",{className:"hidden sm:inline-flex",children:s.jsx(Ls,{iso:n.dueDate})}),e[11]=n.dueDate,e[12]=f):f=e[12];let h;e[13]!==a||e[14]!==o||e[15]!==n?(h=s.jsx(qs,{item:n,assignee:o,assignedBy:a}),e[13]=a,e[14]=o,e[15]=n,e[16]=h):h=e[16];let y;e[17]!==n.createdAt?(y=wn(new Date(n.createdAt)),e[17]=n.createdAt,e[18]=y):y=e[18];let p;e[19]!==y?(p=s.jsx("span",{className:"hidden shrink-0 text-[11px] text-muted-foreground/70 sm:inline",children:y}),e[19]=y,e[20]=p):p=e[20];let b;return e[21]!==l||e[22]!==m||e[23]!==x||e[24]!==c||e[25]!==g||e[26]!==f||e[27]!==h||e[28]!==p?(b=s.jsxs("button",{type:"button",onClick:l,className:"flex items-center gap-3 rounded-xl bg-card px-4 py-3 text-left card-shadow transition-colors hover:bg-accent/60",children:[m,x,c,g,f,h,p]}),e[21]=l,e[22]=m,e[23]=x,e[24]=c,e[25]=g,e[26]=f,e[27]=h,e[28]=p,e[29]=b):b=e[29],b}const lr=Object.freeze(Object.defineProperty({__proto__:null,TaskBoardPage:Ms,default:Za},Symbol.toStringTag,{value:"Module"}));export{er as H,Oe as P,ra as S,Sa as T,oa as a,ar as b,sr as c,fa as d,ca as e,ga as f,xa as g,ya as h,Xn as i,ba as j,$e as k,Me as l,Ms as m,lr as n,tr as r,nr as u,Zn as w};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,k as rt}from"./index-CmUMOI85.js";import{m as mt,o as pt,p as st,q as at}from"./sidebar-CCp56Env.js";import{m as nt}from"./automation-runs-jf4CQyxT.js";import{r as lt,u as ct,a as dt,b as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-DEBPMXNg.js";import{r as xt}from"./index-Bnc4IoFE.js";import"./LayoutLeft-CxYJNTGI.js";import"./use-mobile-Bwjx_QMs.js";import"./X-CAmHDMPk.js";import"./tooltip-DLvHocW9.js";import"./select-DQl8Nkd-.js";import"./Check-CmXcFUFA.js";import"./ChevronDown-BU2ru4r_.js";import"./ChevronUp-3FMqPib6.js";import"./useInfiniteQuery-C3F84whK.js";import"./use-infinite-scroll-UBZNLC2q.js";import"./use-connection-BvbWEpu1.js";import"./use-mcp-client-FpSZFiJp.js";import"./auth-D3hjVX0I.js";import"./use-virtual-mcp-BO12Buo0.js";import"./card-DeRX92PE.js";import"./table-zJH1gBbm.js";import"./empty-state-BoA_YW3D.js";import"./use-members-CUYuiUkk.js";import"./use-org-auth-client-B6uCBHg4.js";import"./use-clock-tick-DeftYEin.js";import"./AlertCircle-C_nk91tH.js";import"./CheckCircle-GzoutZzh.js";import"./DotsVertical-BXRC3vMY.js";import"./agent-icon-VQci6jYK.js";import"./Tool01-DE3j460t.js";import"./ArrowUp-B_NkVhQy.js";import"./Settings02-DU8SxETa.js";import"./Tool02-BQUR2DKB.js";import"./ArrowRight-x5eFsUyE.js";import"./ArrowUpRight-Bjz3wM7_.js";import"./TrendUp01-Ddu99xHU.js";import"./ZapSquare-DkWTs6ms.js";import"./ZoomOut-C_3JH0WD.js";import"./Users03-CQdAxDaw.js";import"./ChevronRight-BLHTQ9Db.js";import"./Stars02-C3tFxKGI.js";import"./Copy01-BzXUnxIt.js";import"./Globe01-Ct1oKJdh.js";import"./Eye-DZiWXjzc.js";import"./FilterLines-Dw3b3U6U.js";import"./Star01-kfwc8V_o.js";import"./Globe04-BiqYhKIv.js";import"./SwitchHorizontal01-BP51S8DS.js";import"./HardDrive-DV_SLLYZ.js";import"./Image01-BoP1xUXy.js";import"./Key01-C1HipuOz.js";import"./XCircle-CANBtGHI.js";import"./LinkExternal01-CGrGeU4Q.js";import"./Monitor01-C6zpq4qC.js";import"./Sun-CkVbwhKo.js";import"./Package-nklzvxt3.js";import"./Palette-vt3KT1N3.js";import"./Play-C8mWR1Az.js";import"./Plus-7RPIQWLb.js";import"./SearchLg-CWLjZme7.js";import"./SearchMd-4O6fg9oW.js";import"./Shield01-oWOP2zLR.js";import"./Stars01-C1l0RlUa.js";import"./Trash01-cB1sS901.js";import"./Upload01-CYVHio4I.js";import"./User01-CtR14f1U.js";import"./Users01-BqyJARKJ.js";import"./XClose-BAfFl7aF.js";import"./Zap-YiLxlwec.js";import"./use-automations-DHjQTH3C.js";import"./studio-tools-BVRXDcEz.js";import"./useSuspenseInfiniteQuery-CHz5LFPW.js";import"./avatar-DGoq0KTj.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-_PBbl_ae.js";import"./file-type-icon-BqEXVrTQ.js";import"./dialog-CtcL8Rge.js";import"./tab-id-BijBBRwE.js";import"./hooks-v_4liDIo.js";import"./decopilot-sse-pool-DNUfg0HV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-B9cQc_h3.js";import"./autosend-CrLNAcK4.js";import"./use-ai-providers-DB0PWqc_.js";import"./location-BpLtHjTZ.js";import"./use-decopilot-events-Bp76K5aB.js";import"./use-organization-settings-CNDPvDWL.js";import"./monaco-editor-Du7tJEjc.js";import"./index-Bpt5-Vj-.js";import"./index-DA5rV0RV.js";import"./calendar-BFIHiiFD.js";import"./shell-layout-_h-q07bi.js";import"./required-auth-layout-Bw_23wtD.js";import"./use-org-sso-BhLu2IJL.js";import"./integration-icon-dAGuZlLn.js";import"./use-navigate-to-agent-Dlk0IC9Q.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CmrBd_oc.js";import"./form-B5plGGFv.js";import"./label-VkdXgHd7.js";import"./input-Cf6f3BmN.js";import"./switch-BM-HDdky.js";import"./drawer-C31EzZAL.js";import"./collection-search-tV8cd3K2.js";import"./index-C-7MA5rL.js";import"./get-initials-D-f_fDFw.js";import"./popover-RUk1Jxx9.js";import"./use-registry-app-8Rk9qQRz.js";import"./use-mcp-tools-Bfgi1tbs.js";import"./github-repo-scope-DjMZbiKa.js";import"./authenticate-and-persist-oauth-B6DLU1uJ.js";import"./mcp-oauth-DUnhZRN8.js";import"./extract-connection-data--_aU5sYg.js";import"./dropdown-menu-BqJxwxsq.js";import"./command-BOlKzV0V.js";import"./index-82forbXV.js";import"./companions-core-oBQaybV8.js";import"./tabs-CELqSRxW.js";import"./toggle-group-DSJnwILX.js";import"./use-deco-credits-CPmWdsys.js";import"./connection-card-NrIXzO1v.js";import"./use-registry-connections-Bp9WZcYU.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PL3tBRfL.js";import"./connection-form-helpers-Dq97qH29.js";import"./collection-tabs-CORSMF6h.js";import"./badge-ICotptLx.js";import"./connect-desktop-dialog-dbCJQTWC.js";import"./select-model-DDvi29I3.js";import"./checkbox-CvYv_Km6.js";import"./skeleton-BOpN06w4.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BUqk0nQQ.js";import"./index-Dt1PB5Sc.js";import"./alert-dialog-GMDN2a2p.js";import"./toolbar-XFnqI6aL.js";import"./use-debounced-value-RZv6Czrq.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-Cil-9RHI.js";import"./use-capability-ZRZyXZT2.js";import"./toolbar-icon-button-Drpylp7y.js";import"./pt-BR-CLy76QW2.js";import"./use-mcp-auth-status-xCpfo047.js";import"./use-debounced-autosave-DpFFxhds.js";import"./index-BnE6Altg.js";import"./search-input-D1vvih4b.js";import"./github-repo-picker-Cy6gXTqi.js";import"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import"./use-secrets-C2xWkrG-.js";import"./use-file-configs-CIAOsadi.js";import"./automation-list-row-C69OPCMn.js";function ui(u){const t=it.c(46),{open:k,onOpenChange:N,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),P=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(P),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==P&&(Z(P),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==N?(F=r=>{r||K(),N(r)},t[6]=K,t[7]=N,t[8]=F):F=t[8];const q=F,z=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,A=m.kind==="site"&&o&&n,B=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const H=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const $=O;let l;t[13]!==z?(l=e.jsx(mt,{className:"text-sm font-semibold",children:z}),t[13]=z,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==$||t[22]!==H||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==B||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==A||t[37]!==_?(S=!o||!T&&!A?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:B}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:H,onBumpFormKey:$}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=$,t[22]=H,t[23]=M,t[24]=v,t[25]=h,t[26]=B,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=A,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==q||t[43]!==k||t[44]!==f?(b=e.jsx(at,{open:k,onOpenChange:q,children:f}),t[42]=q,t[43]=k,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{ui as SeoSheet};
|