decocms 4.55.1 → 4.55.2
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-BDUwtS5S.js → AlertCircle-CcXtGoqQ.js} +1 -1
- package/dist/client/assets/{ArrowUp-BulYZ0NH.js → ArrowUp-CNRCgR8Q.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CleBuFoY.js → ArrowUpRight-BWdCB7YX.js} +1 -1
- package/dist/client/assets/{Check-DB5eGUQa.js → Check-CX1NmwB-.js} +1 -1
- package/dist/client/assets/{CheckCircle-BJ2ngopd.js → CheckCircle-CfCHYHY6.js} +1 -1
- package/dist/client/assets/{ChevronDown-DaUTxR-x.js → ChevronDown-KS5srpkl.js} +1 -1
- package/dist/client/assets/{ChevronRight-BV1Ck-G7.js → ChevronRight-Bd4-SXmc.js} +1 -1
- package/dist/client/assets/{ChevronUp-BiBY_QiV.js → ChevronUp-B-Uwu7fw.js} +1 -1
- package/dist/client/assets/{Circle-wpn-PPrt.js → Circle-MFN0Tsse.js} +1 -1
- package/dist/client/assets/{Copy01-B2U8J4cO.js → Copy01-BGQhYs2H.js} +1 -1
- package/dist/client/assets/{DotsVertical-BZnmnSRz.js → DotsVertical-B6hXgmgt.js} +1 -1
- package/dist/client/assets/{Eye-Daggcd8k.js → Eye-BZfXaBie.js} +1 -1
- package/dist/client/assets/{FilterLines-7Nbry9zj.js → FilterLines-BCI7rv8r.js} +1 -1
- package/dist/client/assets/{Globe01-D83b2MJi.js → Globe01-CLVgO104.js} +1 -1
- package/dist/client/assets/{Globe04-D4y7X6cn.js → Globe04-CrLInTji.js} +1 -1
- package/dist/client/assets/{HardDrive-C5i7sgFK.js → HardDrive-B8x7SfiS.js} +1 -1
- package/dist/client/assets/{Key01-6tPvxCwB.js → Key01-CXza1L1L.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BI42upBI.js → LayoutLeft-dKaXj6Up.js} +1 -1
- package/dist/client/assets/{LinkExternal01-D8FNHCTf.js → LinkExternal01-Bhf62yRV.js} +1 -1
- package/dist/client/assets/{List-B6FqRmO-.js → List-B5fwxtta.js} +1 -1
- package/dist/client/assets/{Loading02-uiZiMvHa.js → Loading02-hCCIuqjk.js} +1 -1
- package/dist/client/assets/{Monitor01-4-VmyQbT.js → Monitor01-Dv7c8Lhz.js} +1 -1
- package/dist/client/assets/{Palette-BS9sZ6ym.js → Palette-DMR6BwxC.js} +1 -1
- package/dist/client/assets/{Play-DbxFy7yC.js → Play-D6xPyqX9.js} +1 -1
- package/dist/client/assets/{Plus-COsG7Gqr.js → Plus-CXvrg9fC.js} +1 -1
- package/dist/client/assets/{SearchLg-CW5Yu6P7.js → SearchLg-rQE5go4U.js} +1 -1
- package/dist/client/assets/{SearchMd-B9O2IeP_.js → SearchMd-CBtyUYQr.js} +1 -1
- package/dist/client/assets/{Settings02-DwdYrfUF.js → Settings02-CiCG8FiI.js} +1 -1
- package/dist/client/assets/{Shield01-BgmeVxkd.js → Shield01-DmOTBI68.js} +1 -1
- package/dist/client/assets/{Star01-Czyhtzn3.js → Star01-qwtuVSkw.js} +1 -1
- package/dist/client/assets/{Stars01-BmCnWhnh.js → Stars01-Db5srLOH.js} +1 -1
- package/dist/client/assets/{Stars02-BrKzaeWH.js → Stars02-BZ3cuaIW.js} +1 -1
- package/dist/client/assets/{Sun-aIrEB73x.js → Sun-B8GiYn_a.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CgY8yJsA.js → SwitchHorizontal01-BtnXV7uE.js} +1 -1
- package/dist/client/assets/{Tool01-BW9actDY.js → Tool01-BD6azVda.js} +1 -1
- package/dist/client/assets/{Trash01-COocbXqq.js → Trash01-CU9sEJ6_.js} +1 -1
- package/dist/client/assets/{Upload01-CkDhvN0T.js → Upload01-yhNC04X6.js} +1 -1
- package/dist/client/assets/{User01-BnhLPyUx.js → User01-Ds7LUUkI.js} +1 -1
- package/dist/client/assets/{Users01-HjSrunAC.js → Users01-CF6D_jDZ.js} +1 -1
- package/dist/client/assets/{Users03-B4PRdOYY.js → Users03-BjEMhqHh.js} +1 -1
- package/dist/client/assets/{X-TFOMxEiB.js → X-BMfi6o4s.js} +1 -1
- package/dist/client/assets/{XCircle-DPjKrbEq.js → XCircle-D4fOxK-F.js} +1 -1
- package/dist/client/assets/{XClose-Bt-Ec1r_.js → XClose-bCq3Ew9t.js} +1 -1
- package/dist/client/assets/{Zap-Bk6H8H-h.js → Zap-De1u9KTg.js} +1 -1
- package/dist/client/assets/{ZapSquare-C_S2ndnL.js → ZapSquare-DAQJK06h.js} +1 -1
- package/dist/client/assets/{ZoomOut-BJ3FAn1O.js → ZoomOut-Dq81F7SC.js} +1 -1
- package/dist/client/assets/{access-gate-DElrhDMj.js → access-gate-DRCfAcgn.js} +1 -1
- package/dist/client/assets/{add-section-modal-gqSXZrCu.js → add-section-modal-BUhkJrM4.js} +1 -1
- package/dist/client/assets/{agent-capabilities-NWL735Zx.js → agent-capabilities-FxDJIcJf.js} +1 -1
- package/dist/client/assets/{agent-icon-BfpypHVS.js → agent-icon-BC0EkFq9.js} +1 -1
- package/dist/client/assets/{agents-list-BJVis9B-.js → agents-list-D9Rv8PM0.js} +1 -1
- package/dist/client/assets/{ai-providers-z7dHNR-9.js → ai-providers-MIeHOPA2.js} +1 -1
- package/dist/client/assets/{alert-BO8vNAP1.js → alert-PlLSxABu.js} +1 -1
- package/dist/client/assets/{alert-dialog-Bm_4nxhE.js → alert-dialog-oqpRR0i5.js} +1 -1
- package/dist/client/assets/{app-editor-CSfXztEm.js → app-editor-DdLgFnhW.js} +1 -1
- package/dist/client/assets/{auth-catchall-DwHIDxL0.js → auth-catchall-6ItQGnsS.js} +1 -1
- package/dist/client/assets/{auth-DXRg63uw.js → auth-dTEX6kb5.js} +1 -1
- package/dist/client/assets/{auth-entry-K1L3vN2F.js → auth-entry-CxuMM5eh.js} +1 -1
- package/dist/client/assets/{auth-split-layout-zI_QmVhc.js → auth-split-layout-DHONY4SI.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-DFGDlweO.js → authenticate-and-persist-oauth-rZ83LsiF.js} +1 -1
- package/dist/client/assets/{automation-list-row-CQkIKHVZ.js → automation-list-row-DHDuwMH2.js} +1 -1
- package/dist/client/assets/{automation-runs-AIegbgGj.js → automation-runs-BtN6iCSv.js} +1 -1
- package/dist/client/assets/{automations-BaL1NsK2.js → automations-Cb9H-k_t.js} +1 -1
- package/dist/client/assets/{autosend-DJbreggn.js → autosend-CKoJU4Ck.js} +1 -1
- package/dist/client/assets/{avatar-DfoyNF69.js → avatar-Db8GpDbq.js} +1 -1
- package/dist/client/assets/{badge-Du_TKc4m.js → badge-C45BnVIV.js} +1 -1
- package/dist/client/assets/{block-document-XscKjM0q.js → block-document-DF28D3Zd.js} +1 -1
- package/dist/client/assets/{brand-context-mFTfOpUt.js → brand-context-CZ55SrjA.js} +1 -1
- package/dist/client/assets/{breadcrumb-Dz6oCV8u.js → breadcrumb-s5tTG0hl.js} +1 -1
- package/dist/client/assets/{buckets-BnZTQkBk.js → buckets-CjTSEqie.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CUcPpBgn.js → bulk-category-panel-BcuxRp1p.js} +1 -1
- package/dist/client/assets/{calendar-ybDFqe6g.js → calendar-D0rbD8yo.js} +1 -1
- package/dist/client/assets/{capability-load-error-CxhgIMxm.js → capability-load-error-DxMSthjL.js} +1 -1
- package/dist/client/assets/{card-CNTBCrCx.js → card-LJ8kSXgT.js} +1 -1
- package/dist/client/assets/{category-editor-BOw5ud79.js → category-editor-BtugavDB.js} +1 -1
- package/dist/client/assets/{chat-context-CqpQ25tc.js → chat-context-CgCW1s44.js} +1 -1
- package/dist/client/assets/{checkbox-B8HJuQDs.js → checkbox-Br6j3cjg.js} +1 -1
- package/dist/client/assets/{cli-auth-success-2aN9HLCr.js → cli-auth-success-x5i7QnIF.js} +1 -1
- package/dist/client/assets/{collection-detail-iuEjmkPk.js → collection-detail-D_ACOkgz.js} +1 -1
- package/dist/client/assets/{collection-display-button-D2xvauOR.js → collection-display-button-DT2GcvX9.js} +1 -1
- package/dist/client/assets/{collection-search-V2O21AAd.js → collection-search-CxdA0ags.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CmQLD6zT.js → collection-table-wrapper-CDfRdWjc.js} +1 -1
- package/dist/client/assets/{collection-tabs-DG8NYylT.js → collection-tabs-DWi5PsoD.js} +1 -1
- package/dist/client/assets/{command-B2Y8wzCq.js → command-w-CpTu6X.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BJ-qUqBS.js → commerce-onboarding-Bt5WOviy.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-CaRSrvdt.js → connect-desktop-dialog-C4eYRTXC.js} +1 -1
- package/dist/client/assets/{connection-card-DtM89a-_.js → connection-card-CiptvNXA.js} +1 -1
- package/dist/client/assets/{connection-detail-CQ9_N99x.js → connection-detail-BPQ6CMql.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BA7gRacC.js → connection-form-helpers-D2xyGLtT.js} +1 -1
- package/dist/client/assets/{connections-Bv41votx.js → connections-DJi5H3XI.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-lPdR45KM.js → decopilot-sse-pool-Ck4J1r_W.js} +1 -1
- package/dist/client/assets/{dialog-C5Nn965x.js → dialog-BBhx8z3d.js} +1 -1
- package/dist/client/assets/{domain-settings-wXYqEzyR.js → domain-settings-CDCxitNZ.js} +1 -1
- package/dist/client/assets/{drawer-B7TC077i.js → drawer-CK9sSR4P.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CZ4r73bC.js → dropdown-menu-FFnpbNbn.js} +1 -1
- package/dist/client/assets/{empty-state-3mhPFCK7.js → empty-state-Da7QFTTG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-axDjyOpF.js → extract-connection-data-uCKVS9ah.js} +1 -1
- package/dist/client/assets/{file-explorer-BrS0HxVr.js → file-explorer-DkbBRK3v.js} +1 -1
- package/dist/client/assets/{file-type-icon-plCCEJ4L.js → file-type-icon-BL1xqF4U.js} +1 -1
- package/dist/client/assets/{files-BqFggQVZ.js → files-CazDOk9g.js} +1 -1
- package/dist/client/assets/{form-anR3vhgb.js → form-DmNN75KA.js} +1 -1
- package/dist/client/assets/{general-d1MXITyg.js → general-C8fxJtFm.js} +1 -1
- package/dist/client/assets/{github-repo-picker-BCoxs9CP.js → github-repo-picker-DcWadDWs.js} +1 -1
- package/dist/client/assets/{hooks-DKkPcy1-.js → hooks-C4OpZxwn.js} +1 -1
- package/dist/client/assets/{index-Bqui53Dy.js → index-B1U-Etoj.js} +1 -1
- package/dist/client/assets/{index-B97RypLq.js → index-BcE5merk.js} +1 -1
- package/dist/client/assets/{index-aTJ-c-DE.js → index-BwMYoDmc.js} +1 -1
- package/dist/client/assets/{index-BrgXRA0R.js → index-C2Glre03.js} +1 -1
- package/dist/client/assets/{index-BFaDYNqJ.js → index-CJE0OD8J.js} +1 -1
- package/dist/client/assets/{index-C5FUC1W0.js → index-Cmr9fVtC.js} +3 -3
- package/dist/client/assets/{index-954jyuq5.js → index-D0Edr09-.js} +1 -1
- package/dist/client/assets/{index-Co4UA1uX.js → index-DBPp00VK.js} +5 -5
- package/dist/client/assets/{index-DFYN308n.js → index-DbZQaLKL.js} +1 -1
- package/dist/client/assets/{index-Bek4lSUK.js → index-DpW0prhj.js} +1 -1
- package/dist/client/assets/{index-DhyJpEpA.js → index-DqqBiuye.js} +1 -1
- package/dist/client/assets/{index-B9E_khRT.js → index-DvU95Wpw.js} +1 -1
- package/dist/client/assets/{index-CXLM9TV1.js → index-bcsMMr_-.js} +1 -1
- package/dist/client/assets/{index-CWhtzjUj.js → index-dQvK559x.js} +1 -1
- package/dist/client/assets/{index-redirect-CB1VwnyU.js → index-redirect-zNnp3jmz.js} +1 -1
- package/dist/client/assets/{input-CJ4l0v3D.js → input-C-A5w_UH.js} +1 -1
- package/dist/client/assets/{integration-icon-CTROuUBB.js → integration-icon-860tNqkE.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CoJpKZB9.js → invite-member-dialog-DV2m3tp8.js} +1 -1
- package/dist/client/assets/{label-oBkwKO7Z.js → label-BZOdyySa.js} +1 -1
- package/dist/client/assets/{layout-C2cKdtKe.js → layout-DtdCNxUo.js} +1 -1
- package/dist/client/assets/{login-CZbF7gcX.js → login-z0pDiAZS.js} +1 -1
- package/dist/client/assets/{mcp-oauth-C0dF6SHT.js → mcp-oauth-DRUQRO4U.js} +1 -1
- package/dist/client/assets/{members-B98Ls-G-.js → members-wB9xz-Mq.js} +1 -1
- package/dist/client/assets/{monaco-editor-DOPiiTPw.js → monaco-editor-Cver6-Lh.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DioV_tqK.js → monitoring-stats-row-638tOhJr.js} +1 -1
- package/dist/client/assets/{oauth-callback-D5PCVLxO.js → oauth-callback-DdbQGgcA.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-B-W5iolb.js → oauth-callback-ai-provider-mYpzw2AP.js} +1 -1
- package/dist/client/assets/{onboarding-BgU01AmJ.js → onboarding-CrWz3mEM.js} +1 -1
- package/dist/client/assets/{org-install-DLa2j3RV.js → org-install-D7lwqqzl.js} +1 -1
- package/dist/client/assets/{org-layout-5shSdy7b.js → org-layout-BL7Wmgy6.js} +1 -1
- package/dist/client/assets/{organization-choice-D33OXvWu.js → organization-choice-BIRC3Uze.js} +1 -1
- package/dist/client/assets/{orgs-C740qGAG.js → orgs-Crl6jzVt.js} +1 -1
- package/dist/client/assets/{page-seo-form-DxOAiism.js → page-seo-form-DR2WCjbP.js} +1 -1
- package/dist/client/assets/page-seo-sheet-q5P59ESg.js +1 -0
- package/dist/client/assets/{popover-DHXTNNAp.js → popover-CFWXdIix.js} +1 -1
- package/dist/client/assets/{post-editor-R_dndRJ9.js → post-editor-B3N_roaF.js} +1 -1
- package/dist/client/assets/{primitives-CQS_Gxag.js → primitives-D0jAfj96.js} +1 -1
- package/dist/client/assets/{profile-Byo2SnzO.js → profile-BVYzKael.js} +1 -1
- package/dist/client/assets/project-app-view-DnABY1sA.js +1 -0
- package/dist/client/assets/record-editor-BBh8GLGD.js +1 -0
- package/dist/client/assets/registry-Zd95YFv6.js +2 -0
- package/dist/client/assets/{registry-layout-HPT1W0eu.js → registry-layout-CFR4Lewx.js} +1 -1
- package/dist/client/assets/{require-capability-BfezzNGn.js → require-capability-eTatHm6G.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Do20Bhej.js → required-auth-layout-LndButnr.js} +1 -1
- package/dist/client/assets/{reset-password-DoAhUGKB.js → reset-password-BnbYLexM.js} +1 -1
- package/dist/client/assets/{roles-Cxe8GGGz.js → roles-B_KlrMJW.js} +1 -1
- package/dist/client/assets/{search-input-DYiLvbg2.js → search-input-DFBY0aMb.js} +1 -1
- package/dist/client/assets/{secrets-DXT5ryWv.js → secrets-an0EPS5e.js} +1 -1
- package/dist/client/assets/{sections-editor-D8sMiOvS.js → sections-editor-BCa1vUXH.js} +1 -1
- package/dist/client/assets/{select-ApS9gXla.js → select-8ngurULp.js} +1 -1
- package/dist/client/assets/{select-model-G7Kk8t-x.js → select-model-De5TfZ8e.js} +1 -1
- package/dist/client/assets/{seo-editor-DDAAwLg6.js → seo-editor-Dhr4q3AS.js} +1 -1
- package/dist/client/assets/{settings-layout-CVOj1Bau.js → settings-layout-B3_LtNL-.js} +1 -1
- package/dist/client/assets/{settings-section-DE5E8n2H.js → settings-section-bNUs-Ptd.js} +1 -1
- package/dist/client/assets/{shell-controls-3utEWX_V.js → shell-controls-DQ4lZhGB.js} +1 -1
- package/dist/client/assets/{shell-layout-mFhADY1s.js → shell-layout-BSpOE0i4.js} +1 -1
- package/dist/client/assets/{sidebar-B2PGieUg.js → sidebar-Cnb2d5MG.js} +1 -1
- package/dist/client/assets/{skeleton-BodG_JWp.js → skeleton-Otp-PiPk.js} +1 -1
- package/dist/client/assets/{sso-DxnbOUhE.js → sso-q1bPtOpq.js} +1 -1
- package/dist/client/assets/{store-DHvkmcIs.js → store-BEGU32pt.js} +1 -1
- package/dist/client/assets/store-registry-DETqp1Xi.js +2 -0
- package/dist/client/assets/{studio-tools-YOPWy5Qx.js → studio-tools-CkegyECy.js} +1 -1
- package/dist/client/assets/{switch-Cg1io7Tw.js → switch-Akyd210P.js} +1 -1
- package/dist/client/assets/{table-ad_g_F61.js → table--4F92KNr.js} +1 -1
- package/dist/client/assets/{tabs-DUL0TD1I.js → tabs-CSdZ0I7k.js} +1 -1
- package/dist/client/assets/{textarea-C9TTFCp7.js → textarea-DwmQnfFA.js} +1 -1
- package/dist/client/assets/{toggle-group-CLWtk0Xu.js → toggle-group-Cd0C-H2t.js} +1 -1
- package/dist/client/assets/{toolbar-BMxYF2Y_.js → toolbar-C4RnSevY.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CoiRrHMh.js → toolbar-icon-button-DSL65azN.js} +1 -1
- package/dist/client/assets/{tools-list-CdBkXrDF.js → tools-list-6eeWqsyt.js} +1 -1
- package/dist/client/assets/{tooltip-BWqpT1XS.js → tooltip-DE7cV54t.js} +1 -1
- package/dist/client/assets/{types-DV53-8Y3.js → types-DCJc1W1K.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CFbnuAP3.js → use-ai-providers-CXxrTWkh.js} +1 -1
- package/dist/client/assets/{use-automations-DmPpbFDM.js → use-automations-D6MZQj_2.js} +1 -1
- package/dist/client/assets/{use-capability-DE78fFEA.js → use-capability-BwUamiS-.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DvLCEkec.js → use-clock-tick-kyPAKrWg.js} +1 -1
- package/dist/client/assets/{use-collections-CHDEyicU.js → use-collections-Dn6JgW5j.js} +1 -1
- package/dist/client/assets/{use-connection-CJM8Hxre.js → use-connection-BnigW4NE.js} +1 -1
- package/dist/client/assets/{use-copy-DoYlWtHh.js → use-copy-CSJKKXgZ.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DbJPOJvn.js → use-create-virtual-mcp-BBXc-Oy3.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-nArw7Nhz.js → use-debounced-autosave-wwhbJHqi.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DuuAgPNn.js → use-debounced-value-Cjx1XL4V.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-DIufaMpS.js → use-decopilot-events-DsqAlPOp.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DodHa53r.js → use-delete-connection-DcO1HgE9.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-C-EI96qY.js → use-deployment-admin-ByPJzcud.js} +1 -1
- package/dist/client/assets/{use-file-configs-BwLzVoP-.js → use-file-configs-CS15ad3S.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-Ckd3tvvn.js → use-infinite-scroll-DeVykSdk.js} +1 -1
- package/dist/client/assets/{use-join-requests-B0DZKMrb.js → use-join-requests-C4myQxVf.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CwjH102d.js → use-mcp-client-DYcjT0wq.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D-KHyL5U.js → use-mcp-prompts-COBXBn5M.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CvBZ13DU.js → use-mcp-tools-CCKzPqlu.js} +1 -1
- package/dist/client/assets/{use-members-Ch1vZjfy.js → use-members-DAX7yiUy.js} +1 -1
- package/dist/client/assets/{use-mobile-DCzhJ2b1.js → use-mobile-DNECKnsa.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-B067GrHH.js → use-navigate-to-agent-BvPgxUNO.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-KEEY62U1.js → use-org-auth-client-CE5rvv1w.js} +1 -1
- package/dist/client/assets/{use-org-sso-5xG7Ax71.js → use-org-sso-C7Laq1j3.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DxsExClS.js → use-organization-roles-rYW94hWU.js} +1 -1
- package/dist/client/assets/{use-organization-settings-C4UqBULE.js → use-organization-settings-BcFHWCS7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DQTm-v6U.js → use-registry-connections-BkdIdNIy.js} +1 -1
- package/dist/client/assets/{use-secrets-CuvShZab.js → use-secrets-LngNmEgE.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Dao3SK_W.js → use-status-sounds-BlmBXK5r.js} +1 -1
- package/dist/client/assets/{use-view-mode-BgvdBoTT.js → use-view-mode-D8bT1wmN.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-UO0doLtm.js → use-virtual-mcp-CPGZA-tY.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DFe-wj2v.js +1 -0
- package/dist/client/assets/{useRouterState-DpMncpnU.js → useRouterState-1XTCLSYG.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-DMDA8FJB.js +1 -0
- package/dist/client/assets/{users-CXzxRVR4.js → users-xX82baQ_.js} +1 -1
- package/dist/client/assets/{variant-calendar-C2TWvjXj.js → variant-calendar-s_ri1a7O.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-eUzvftrk.js → view-mode-toggle-CWraumKH.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/page-seo-sheet-B236rPhw.js +0 -1
- package/dist/client/assets/project-app-view-DOjJTfJJ.js +0 -1
- package/dist/client/assets/record-editor-CHfXWHlF.js +0 -1
- package/dist/client/assets/registry-CnZ2VpTv.js +0 -2
- package/dist/client/assets/store-registry-c6M9VcO6.js +0 -2
- package/dist/client/assets/useInfiniteQuery-DmgTOEdd.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-SkGfaXru.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dv as _t,dw as St,bf as R,I as c,dx as de,bl as Ve,bs as It,be as Et,aU as Tt,ac as O,ab as W,a9 as oe,H as _,bg as f,b0 as F,dy as wt,dz as I,aa as Mt,t as ge,c as Ie,r as Y,a1 as At,j as Ot}from"./index-
|
|
1
|
+
import{dv as _t,dw as St,bf as R,I as c,dx as de,bl as Ve,bs as It,be as Et,aU as Tt,ac as O,ab as W,a9 as oe,H as _,bg as f,b0 as F,dy as wt,dz as I,aa as Mt,t as ge,c as Ie,r as Y,a1 as At,j as Ot}from"./index-Cmr9fVtC.js";import{u as Ct}from"./use-mcp-client-DYcjT0wq.js";import{S as Rt}from"./constants-CaIX_f5U.js";import{d as Nt,D as xt}from"./decopilot-sse-pool-Ck4J1r_W.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Me;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Me||(Me={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ae;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ae||(Ae={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var ze="vercel.ai.error",kt=Symbol.for(ze),Oe,Ce,Z=class Je extends(Ce=Error,Oe=kt,Ce){constructor({name:e,message:a,cause:r}){super(a),this[Oe]=!0,this.name=e,this.cause=r}static isInstance(e){return Je.hasMarker(e,ze)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var We="AI_InvalidArgumentError",qe=`vercel.ai.error.${We}`,Lt=Symbol.for(qe),Re,Ne,jt=class extends(Ne=Z,Re=Lt,Ne){constructor({message:t,cause:e,argument:a}){super({name:We,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},He="AI_JSONParseError",Ge=`vercel.ai.error.${He}`,Zt=Symbol.for(Ge),xe,Pe,De=class extends(Pe=Z,xe=Zt,Pe){constructor({text:t,cause:e}){super({name:He,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[xe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Ge)}},Xe="AI_TypeValidationError",Qe=`vercel.ai.error.${Xe}`,$t=Symbol.for(Qe),ke,Le,X=class ve extends(Le=Z,ke=$t,Le){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Xe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Qe)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new jt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ut=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Ft=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function je(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ut.test(t)===!1&&Ft.test(t)===!1?e:Bt(e)}function Bt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function Vt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return je(t)}try{return je(t)}finally{Error.stackTraceLimit=e}}function Ee(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Ee(t)}var zt=Symbol("Let zodToJsonSchema decide on which parser to use"),Ze={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Jt=t=>typeof t=="string"?{...Ze,name:t}:{...Ze,...t};function N(){return{}}function Yt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Wt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function Ke(t,e){return b(t.type._def,e)}var Ht=(t,e)=>b(t.innerType._def,e);function et(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>et(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Gt(t)}}var Gt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Xt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Qt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function Kt(t){return{type:"string",enum:Array.from(t.values)}}var ea=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ta(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ea(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function aa(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function tt(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?sa(t):t}var ra=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function sa(t){let e="";for(let a=0;a<t.length;a++)ra.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:$e(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=$e(e,r)}function $e(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,aK as R}from"./index-
|
|
1
|
+
import{r as a,aK as R}from"./index-Cmr9fVtC.js";function re(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function me(e){if(Array.isArray(e))return e}function be(e,t,r){return(t=Se(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ye(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,c,s=[],f=!0,p=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(f=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);f=!0);}catch(j){p=!0,o=j}finally{try{if(!f&&r.return!=null&&(c=r.return(),Object(c)!==c))return}finally{if(p)throw o}}return s}}function we(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function oe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ne(Object(r),!0).forEach(function(n){be(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ne(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oe(e,t){if(e==null)return{};var r,n,o=je(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function je(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Me(e,t){return me(e)||ye(e,t)||Ee(e,t)||we()}function Pe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Se(e){var t=Pe(e,"string");return typeof t=="symbol"?t:t+""}function Ee(e,t){if(e){if(typeof e=="string")return re(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function Re(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ie(Object(r),!0).forEach(function(n){Re(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ie(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ie(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function A(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function F(e){return{}.toString.call(e).includes("Object")}function Te(e){return!Object.keys(e).length}function D(e){return typeof e=="function"}function Ce(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Le(e,t){return F(t)||P("changeType"),Object.keys(t).some(function(r){return!Ce(e,r)})&&P("changeField"),t}function Ae(e){D(e)||P("selectorType")}function $e(e){D(e)||F(e)||P("handlerType"),F(e)&&Object.values(e).some(function(t){return!D(t)})&&P("handlersType")}function De(e){e||P("initialIsRequired"),F(e)||P("initialType"),Te(e)&&P("initialContent")}function Ve(e,t){throw new Error(e[t]||e.default)}var xe={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},P=A(Ve)(xe),q={changes:Le,selector:Ae,handler:$e,initial:De};function Ne(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};q.initial(e),q.handler(t);var r={current:e},n=A(Fe)(r,t),o=A(ze)(r),i=A(q.changes)(e),c=A(qe)(r);function s(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return q.selector(p),p(r.current)}function f(p){Ie(n,o,i,c)(p)}return[s,f]}function qe(e,t){return D(t)?t(e.current):t}function ze(e,t){return e.current=ae(ae({},e.current),t),t}function Fe(e,t,r){return D(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ue={create:Ne},He={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function We(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var c=arguments.length,s=new Array(c),f=0;f<c;f++)s[f]=arguments[f];return t.apply(r,[].concat(o,s))}}}function Ke(e){return{}.toString.call(e).includes("Object")}function Be(e){return e||ue("configIsRequired"),Ke(e)||ue("configType"),e.urls?(Ge(),{paths:{vs:e.urls.monacoBase}}):e}function Ge(){console.warn(ce.deprecation)}function Ye(e,t){throw new Error(e[t]||e.default)}var ce={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
3
3
|
You are using deprecated way of configuration.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-Cmr9fVtC.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as $,j as s,_ as Ye,r as R,l as D,R as de,$ as As,a0 as Is,a as re,a1 as oe,b as pe,a2 as zs,a3 as $s,t as ie,a4 as Ts,a5 as Ms,K as Os,m as Ps,a6 as Ds,i as Vt,e as ft,u as ht,U as Yt,H as Fs,I as Es,J as Ls,M as Rs,d as Bs,B as rt,a7 as Hs,W as Gs,X as Us,L as Ws,O as qs,a8 as Ks}from"./index-C5FUC1W0.js";import{u as ge,S as xt,a as pt,b as me,c as te,d as X,e as Qt,f as Jt,g as Xs,h as Vs,i as ot,j as Ys,k as Qs,l as Js}from"./sidebar-B2PGieUg.js";import{u as gt}from"./use-mobile-DCzhJ2b1.js";import{S as le}from"./skeleton-BodG_JWp.js";import{i as Zt}from"./LayoutLeft-BI42upBI.js";import{T as je}from"./toolbar-icon-button-CoiRrHMh.js";import{P as Qe,a as Ee,b as Je}from"./popover-DHXTNNAp.js";import{D as es,a as ts,b as ss}from"./drawer-B7TC077i.js";import{A as Ke}from"./avatar-DfoyNF69.js";import{a as ue,b as fe,c as at,T as he}from"./tooltip-BWqpT1XS.js";import{a as Ct}from"./Copy01-B2U8J4cO.js";import{n as Zs,i as en}from"./Globe01-D83b2MJi.js";import{i as tn}from"./ZoomOut-BJ3FAn1O.js";import{i as wt,a as sn}from"./ZapSquare-C_S2ndnL.js";import{i as ct}from"./Monitor01-4-VmyQbT.js";import{n as nn,a as ln}from"./Sun-aIrEB73x.js";import{a as bt}from"./Settings02-DwdYrfUF.js";import{i as rn}from"./Shield01-BgmeVxkd.js";import{b as kt,c as At,d as on,e as an,f as cn,A as ve,g as It,i as dn,s as mn,h as un}from"./agent-icon-BfpypHVS.js";import{a as fn}from"./Users03-B4PRdOYY.js";import{u as hn}from"./use-deployment-admin-C-EI96qY.js";import"./index-B97RypLq.js";import{I as xn}from"./invite-member-dialog-CoJpKZB9.js";import{u as pn,A as gn,g as bn,a as jn,b as ns}from"./agent-capabilities-NWL735Zx.js";import{u as vn,v as yn,C as zt}from"./connect-desktop-dialog-CaRSrvdt.js";import{i as Sn}from"./FilterLines-7Nbry9zj.js";import{T as Nn,a as _n}from"./toggle-group-CLWtk0Xu.js";import{u as Cn}from"./use-mcp-client-CwjH102d.js";import{S as wn,a as Xe,i as kn,b as An}from"./constants-CaIX_f5U.js";import{u as jt,a as is}from"./use-virtual-mcp-UO0doLtm.js";import{u as In,a as vt,b as ls,T as zn}from"./hooks-DKkPcy1-.js";import{u as yt,r as $n}from"./shell-layout-mFhADY1s.js";import{D as Tn,a as Mn,f as On,d as Pn,e as Dn}from"./dialog-C5Nn965x.js";import{C as Fn,a as En,b as Ln,c as Rn,d as Bn}from"./command-B2Y8wzCq.js";import{u as rs}from"./studio-tools-YOPWy5Qx.js";import{i as os}from"./Zap-Bk6H8H-h.js";import{S as as,M as Hn}from"./shell-controls-3utEWX_V.js";import{n as Gn}from"./Stars02-BrKzaeWH.js";import{g as Un,u as Wn,S as qn}from"./use-clock-tick-DvLCEkec.js";import{a as Kn}from"./format-time-BnbuEtat.js";import{t as St}from"./ChevronDown-DaUTxR-x.js";import{i as Xn}from"./ChevronRight-BV1Ck-G7.js";import{S as cs,u as Vn,g as Yn,a as Qn,b as Jn}from"./use-navigate-to-agent-B067GrHH.js";import{S as Zn,C as ei}from"./chat-context-CqpQ25tc.js";import{B as $t,a as ti,b as si}from"./breadcrumb-Dz6oCV8u.js";import{i as ds}from"./Check-DB5eGUQa.js";import{s as Le}from"./Plus-COsG7Gqr.js";import{i as ms}from"./SearchMd-B9O2IeP_.js";import{s as ni}from"./XClose-Bt-Ec1r_.js";import{A as ii,a as li,b as ri,c as oi,d as ai,e as ci,f as di}from"./alert-dialog-Bm_4nxhE.js";import{F as mi,a as ui,b as fi,c as hi,d as xi,f as pi,e as gi}from"./form-anR3vhgb.js";import{I as bi}from"./input-CJ4l0v3D.js";import{G as ji,a as vi}from"./github-repo-picker-BCoxs9CP.js";import{f as yi}from"./reusable-new-chat-CouMjkYR.js";import{T as ee}from"./toolbar-BMxYF2Y_.js";import{u as Si}from"./use-organization-settings-C4UqBULE.js";import"./X-TFOMxEiB.js";import"./User01-BnhLPyUx.js";import"./AlertCircle-BDUwtS5S.js";import"./Tool01-BW9actDY.js";import"./ArrowUp-BulYZ0NH.js";import"./XCircle-DPjKrbEq.js";import"./ArrowUpRight-CleBuFoY.js";import"./Loading02-uiZiMvHa.js";import"./CheckCircle-BJ2ngopd.js";import"./ChevronUp-BiBY_QiV.js";import"./Circle-wpn-PPrt.js";import"./DotsVertical-BZnmnSRz.js";import"./Eye-Daggcd8k.js";import"./Star01-Czyhtzn3.js";import"./Globe04-D4y7X6cn.js";import"./SwitchHorizontal01-CgY8yJsA.js";import"./HardDrive-C5i7sgFK.js";import"./Key01-6tPvxCwB.js";import"./LinkExternal01-D8FNHCTf.js";import"./List-B6FqRmO-.js";import"./Palette-BS9sZ6ym.js";import"./Play-DbxFy7yC.js";import"./SearchLg-CW5Yu6P7.js";import"./Stars01-BmCnWhnh.js";import"./Trash01-COocbXqq.js";import"./Upload01-CkDhvN0T.js";import"./Users01-HjSrunAC.js";import"./select-ApS9gXla.js";import"./textarea-C9TTFCp7.js";import"./use-org-auth-client-KEEY62U1.js";import"./use-organization-roles-DxsExClS.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DtM89a-_.js";import"./use-registry-connections-DQTm-v6U.js";import"./use-connection-CJM8Hxre.js";import"./use-collections-CHDEyicU.js";import"./useInfiniteQuery-DmgTOEdd.js";import"./use-infinite-scroll-Ckd3tvvn.js";import"./extract-connection-data-axDjyOpF.js";import"./card-CNTBCrCx.js";import"./integration-icon-CTROuUBB.js";import"./collection-search-V2O21AAd.js";import"./collection-tabs-DG8NYylT.js";import"./badge-Du_TKc4m.js";import"./connection-form-helpers-BA7gRacC.js";import"./authenticate-and-persist-oauth-DFGDlweO.js";import"./mcp-oauth-C0dF6SHT.js";import"./auth-DXRg63uw.js";import"./useSuspenseInfiniteQuery-SkGfaXru.js";import"./use-ai-providers-CFbnuAP3.js";import"./decopilot-sse-pool-lPdR45KM.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-Do20Bhej.js";import"./autosend-DJbreggn.js";import"./tab-id-bb-jjgGv.js";import"./use-org-sso-5xG7Ax71.js";import"./index-B9E_khRT.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DIufaMpS.js";import"./label-oBkwKO7Z.js";import"./use-debounced-value-DuuAgPNn.js";import"./use-mcp-tools-CvBZ13DU.js";import"./github-installations-D2vHSx02.js";function Ni(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=ge();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=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[0]=o,e[1]=a):(o=e[0],a=e[1]);let m;return e[2]!==l||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=m):m=e[4],m}const Nt=240,_i=400,Ci="sidebar.width";function Re(t){return Math.max(Nt,Math.min(_i,t))}function wi(){const t=$.c(11),[e,n]=Ye(Ci,ki),l=R.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,f=Re(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const j=Re(f+(g.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},p=g=>{const j=Re(f+(g.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(Nt)},t[3]=n,t[4]=o):o=t[4];const a=o;let m;t[5]!==e?(m=Re(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function ki(t){return typeof t=="number"?Re(t):Nt}function us(){return[]}function fs(t){const e=$.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 i;return e[1]!==n?(i=s.jsxs(xt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(pt,{children:s.jsx(me,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function hs(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=ge();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{de("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=D(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(X,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ai(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Qt,{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,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(zi),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(fs,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(Ii),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ii(t){return s.jsx(hs,{item:t},t.key)}function zi(t){return s.jsx(hs,{item:t},t.key)}function $i(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:o}=t,a=r===void 0?"sidebar":r;let m;e[0]!==o?(m=D("flex flex-col flex-1 px-2 pb-2 gap-0.5",o),e[0]=o,e[1]=m):m=e[1];let c;e[2]!==n?(c=n.map(Ti),e[2]=n,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&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:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==m||e[7]!==c||e[8]!==d?(u=s.jsxs(Jt,{className:m,children:[c,d]}),e[6]=m,e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Xs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ti(t,e){return s.jsx(Ai,{section:t},e)}function xs(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx($i,{...t}),e[0]=t,e[1]=n):n=e[1],n}xs.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 Mi(t){const e=$.c(16),{onToggle:n,className:l}=t,r=As().logo??Is,o=typeof r=="string"?r:r.light,a=typeof r=="string"?r:r.dark;let m;e[0]!==l?(m=D("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=m):m=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==a?(d=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==d?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,d]})}),e[6]=c,e[7]=d,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Zt,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(je,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let x;return e[12]!==m||e[13]!==u||e[14]!==h?(x=s.jsxs(Vs,{className:m,children:[u,h]}),e[12]=m,e[13]=u,e[14]=h,e[15]=x):x=e[15],x}function Tt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=D(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=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 m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==m?(c=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(X,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Oi(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let m;e[5]!==l?(m=c=>s.jsx(Tt,{item:c,onClose:l},c.key),e[5]=l,e[6]=m):m=e[6],o=n.group.items.map(m),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(fs,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Tt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function Pi(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(R.Suspense,{fallback:o,children:s.jsx(Mi,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let m;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,x)=>s.jsx(Oi,{section:h,onClose:l},x),e[6]=l,e[7]=f):f=e[7],m=n.map(f),e[3]=l,e[4]=n,e[5]=m}else m=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==m||e[11]!==c?(d=s.jsxs(Jt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[m,c]}),e[10]=m,e[11]=c,e[12]=d):d=e[12];let u;return e[13]!==i||e[14]!==a||e[15]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,d,i]}),e[13]=i,e[14]=a,e[15]=d,e[16]=u):u=e[16],u}function Fe(t){const e=$.c(26),{item:n,onClose:l}=t;let i;e[0]!==n.className?(i=D("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]=i):i=e[1];const r=i;if(n.href){const d=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 h;e[4]!==n.label?(h=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=h):h=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==l||e[9]!==d||e[10]!==u||e[11]!==f||e[12]!==h?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:l,children:[f,h]}),e[6]=r,e[7]=n.href,e[8]=l,e[9]=d,e[10]=u,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}let o;e[14]!==n||e[15]!==l?(o=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=o):o=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 m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m]}),e[21]=r,e[22]=o,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function Mt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-amber-100 dark:bg-amber-500/20 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-400",children:"Impersonating"}),t[0]=e):e=t[0],e}function Ot(t){const e=$.c(144),{user:n,userImage:l,menuItems:i,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:f}=t;if(f){const V=n?.name??"U";let J;e[0]!==V||e[1]!==l?(J=s.jsx(Ke,{url:l,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=l,e[2]=J):J=e[2];const xe=n?.name??"User";let Z;e[3]!==xe?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:xe}),e[3]=xe,e[4]=Z):Z=e[4];let ne;e[5]!==a?(ne=a&&s.jsx(Mt,{}),e[5]=a,e[6]=ne):ne=e[6];let se;e[7]!==Z||e[8]!==ne?(se=s.jsxs("div",{className:"flex items-center gap-2",children:[Z,ne]}),e[7]=Z,e[8]=ne,e[9]=se):se=e[9];const T=n?.email;let G;e[10]!==T?(G=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:T}),e[10]=T,e[11]=G):G=e[11];let Y;e[12]!==se||e[13]!==G?(Y=s.jsxs("div",{className:"flex-1 min-w-0",children:[se,G]}),e[12]=se,e[13]=G,e[14]=Y):Y=e[14];let K;e[15]!==n?(K=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Li)},e[15]=n,e[16]=K):K=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ct,{size:14}),e[17]=be):be=e[17];let Se;e[18]!==K?(Se=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:K,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:be})}),e[18]=K,e[19]=Se):Se=e[19];let Be;e[20]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[20]=Be):Be=e[20];let Ne;e[21]!==Se?(Ne=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[Se,Be]})}),e[21]=Se,e[22]=Ne):Ne=e[22];let _e;e[23]!==Ne||e[24]!==J||e[25]!==Y?(_e=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,Y,Ne]}),e[23]=Ne,e[24]=J,e[25]=Y,e[26]=_e):_e=e[26];let Ce;if(e[27]!==u||e[28]!==i){let ce;e[30]!==u?(ce=Ue=>s.jsx(Fe,{item:Ue,onClose:u},Ue.key),e[30]=u,e[31]=ce):ce=e[31],Ce=i.map(ce),e[27]=u,e[28]=i,e[29]=Ce}else Ce=e[29];let we;e[32]!==u||e[33]!==o?(we=o&&s.jsx(Fe,{item:o,onClose:u}),e[32]=u,e[33]=o,e[34]=we):we=e[34];let ke;e[35]!==u||e[36]!==r?(ke=s.jsx(Fe,{item:r,onClose:u}),e[35]=u,e[36]=r,e[37]=ke):ke=e[37];let Ae;e[38]!==Ce||e[39]!==we||e[40]!==ke?(Ae=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:[Ce,we,ke]})}),e[38]=Ce,e[39]=we,e[40]=ke,e[41]=Ae):Ae=e[41];let Ie;if(e[42]!==c.theme||e[43]!==d||e[44]!==m){let ce;e[46]!==c.theme||e[47]!==d?(ce=Ue=>{const{value:st,icon:Cs,label:ws}=Ue;return s.jsx("button",{type:"button","aria-label":ws,onClick:()=>d(ks=>({...ks,theme:st})),className:D("size-8 rounded-md flex items-center justify-center transition-colors",c.theme===st?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Cs},st)},e[46]=c.theme,e[47]=d,e[48]=ce):ce=e[48],Ie=m.map(ce),e[42]=c.theme,e[43]=d,e[44]=m,e[45]=Ie}else Ie=e[45];let ze;e[49]!==Ie?(ze=s.jsx("div",{className:"flex items-center gap-0.5",children:Ie}),e[49]=Ie,e[50]=ze):ze=e[50];const et=c.enableSounds?"Disable sounds":"Enable sounds";let $e;e[51]!==d?($e=()=>d(Ei),e[51]=d,e[52]=$e):$e=e[52];const tt=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Te;e[53]!==tt?(Te=D("size-8 rounded-md flex items-center justify-center transition-colors",tt),e[53]=tt,e[54]=Te):Te=e[54];let Me;e[55]!==c.enableSounds?(Me=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[55]=c.enableSounds,e[56]=Me):Me=e[56];let Oe;e[57]!==et||e[58]!==$e||e[59]!==Te||e[60]!==Me?(Oe=s.jsx("button",{type:"button","aria-label":et,onClick:$e,className:Te,children:Me}),e[57]=et,e[58]=$e,e[59]=Te,e[60]=Me,e[61]=Oe):Oe=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.55.1"]}),e[62]=He):He=e[62];let Pe;e[63]!==Oe?(Pe=s.jsxs("div",{className:"flex items-center gap-2",children:[Oe,He]}),e[63]=Oe,e[64]=Pe):Pe=e[64];let De;e[65]!==ze||e[66]!==Pe?(De=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ze,Pe]}),e[65]=ze,e[66]=Pe,e[67]=De):De=e[67];let Ge;return e[68]!==_e||e[69]!==Ae||e[70]!==De?(Ge=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[_e,Ae,De]}),e[68]=_e,e[69]=Ae,e[70]=De,e[71]=Ge):Ge=e[71],Ge}const h=n?.name??"U";let x;e[72]!==h||e[73]!==l?(x=s.jsx(Ke,{url:l,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[72]=h,e[73]=l,e[74]=x):x=e[74];const b=n?.name??"User";let p;e[75]!==b?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[75]=b,e[76]=p):p=e[76];let g;e[77]!==a?(g=a&&s.jsx(Mt,{}),e[77]=a,e[78]=g):g=e[78];let j;e[79]!==p||e[80]!==g?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,g]}),e[79]=p,e[80]=g,e[81]=j):j=e[81];const y=n?.email;let v;e[82]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[82]=y,e[83]=v):v=e[83];let w;e[84]!==j||e[85]!==v?(w=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[84]=j,e[85]=v,e[86]=w):w=e[86];let C;e[87]!==n?(C=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fi)},e[87]=n,e[88]=C):C=e[88];let N;e[89]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ct,{size:14}),e[89]=N):N=e[89];let S;e[90]!==C?(S=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:C,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:N})}),e[90]=C,e[91]=S):S=e[91];let A;e[92]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[92]=A):A=e[92];let k;e[93]!==S?(k=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[S,A]})}),e[93]=S,e[94]=k):k=e[94];let z;e[95]!==k||e[96]!==x||e[97]!==w?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[x,w,k]}),e[95]=k,e[96]=x,e[97]=w,e[98]=z):z=e[98];let _;if(e[99]!==u||e[100]!==i){let V;e[102]!==u?(V=J=>s.jsx(Fe,{item:J,onClose:u},J.key),e[102]=u,e[103]=V):V=e[103],_=i.map(V),e[99]=u,e[100]=i,e[101]=_}else _=e[101];let I;e[104]!==u||e[105]!==o?(I=o&&s.jsx(Fe,{item:o,onClose:u}),e[104]=u,e[105]=o,e[106]=I):I=e[106];let O;e[107]!==u||e[108]!==r?(O=s.jsx(Fe,{item:r,onClose:u}),e[107]=u,e[108]=r,e[109]=O):O=e[109];let F;e[110]!==_||e[111]!==I||e[112]!==O?(F=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[_,I,O]}),e[110]=_,e[111]=I,e[112]=O,e[113]=F):F=e[113];let E;if(e[114]!==c.theme||e[115]!==d||e[116]!==m){let V;e[118]!==c.theme||e[119]!==d?(V=J=>{const{value:xe,icon:Z,label:ne}=J;return s.jsx("button",{type:"button","aria-label":ne,onClick:()=>d(se=>({...se,theme:xe})),className:D("size-7 rounded-md flex items-center justify-center transition-colors",c.theme===xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},xe)},e[118]=c.theme,e[119]=d,e[120]=V):V=e[120],E=m.map(V),e[114]=c.theme,e[115]=d,e[116]=m,e[117]=E}else E=e[117];let P;e[121]!==E?(P=s.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[121]=E,e[122]=P):P=e[122];const L=c.enableSounds?"Disable sounds":"Enable sounds";let M;e[123]!==d?(M=()=>d(Di),e[123]=d,e[124]=M):M=e[124];const H=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let q;e[125]!==H?(q=D("size-7 rounded-md flex items-center justify-center transition-colors",H),e[125]=H,e[126]=q):q=e[126];let U;e[127]!==c.enableSounds?(U=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[127]=c.enableSounds,e[128]=U):U=e[128];let W;e[129]!==L||e[130]!==M||e[131]!==q||e[132]!==U?(W=s.jsx("button",{type:"button","aria-label":L,onClick:M,className:q,children:U}),e[129]=L,e[130]=M,e[131]=q,e[132]=U,e[133]=W):W=e[133];let Q;e[134]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.55.1"]}),e[134]=Q):Q=e[134];let B;e[135]!==W?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Q]}),e[135]=W,e[136]=B):B=e[136];let ae;e[137]!==P||e[138]!==B?(ae=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[P,B]}),e[137]=P,e[138]=B,e[139]=ae):ae=e[139];let ye;return e[140]!==z||e[141]!==F||e[142]!==ae?(ye=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[z,F,ae]})}),e[140]=z,e[141]=F,e[142]=ae,e[143]=ye):ye=e[143],ye}function Di(t){return{...t,enableSounds:!t.enableSounds}}function Fi(){ie.success("User ID copied")}function Ei(t){return{...t,enableSounds:!t.enableSounds}}function Li(){ie.success("User ID copied")}function dt(){const t=$.c(43),{data:e}=re.useSession(),{org:n}=oe(),l=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=zs(i)?.params.org,[a,m]=$s(),c=gt(),{isAdmin:d}=hn(),[u,f]=R.useState(!1),h=e?.user,x=h?.image,b=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>f(!1),t[1]=p):p=t[1];const g=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(bt,{size:16}),t[2]=j):j=t[2];let y;t[3]!==l||t[4]!==o?(y={key:"preferences",label:"Preferences",icon:j,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=y):y=t[5];let v;t[6]!==n||t[7]!==l?(v=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Zs,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=v):v=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w={key:"terms",label:"Terms of Use",icon:s.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=w):w=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(rn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={key:"github",label:"decocms/studio",icon:s.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S={key:"community",label:"Community",icon:s.jsx(fn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=S):S=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={key:"homepage",label:"Homepage",icon:s.jsx(en,{size:16}),href:"https://decocms.com",external:!0},t[13]=A):A=t[13];let k;t[14]!==d||t[15]!==l?(k=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(on,{size:16}),onClick:()=>l({to:"/_admin"}),className:"text-amber-700 dark:text-amber-400"}]:[],t[14]=d,t[15]=l,t[16]=k):k=t[16];let z;t[17]!==k||t[18]!==y||t[19]!==v?(z=[y,...v,w,C,N,S,A,...k],t[17]=k,t[18]=y,t[19]=v,t[20]=z):z=t[20];const _=z;let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I={key:"logout",label:"Sign out",icon:s.jsx(wt,{size:16}),onClick:Hi},t[21]=I):I=t[21];const O=I;let F;t[22]!==b?(F=b?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(wt,{size:16}),onClick:Bi,className:"text-amber-700 dark:text-amber-400"}:null,t[22]=b,t[23]=F):F=t[23];const E=F;let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P={value:"light",icon:s.jsx(nn,{size:14}),label:"Light theme"},t[24]=P):P=t[24];let L;t[25]===Symbol.for("react.memo_cache_sentinel")?(L={value:"dark",icon:s.jsx(ln,{size:14}),label:"Dark theme"},t[25]=L):L=t[25];let M;t[26]===Symbol.for("react.memo_cache_sentinel")?(M=[P,L,{value:"system",icon:s.jsx(ct,{size:14}),label:"System theme"}],t[26]=M):M=t[26];const H=M;let q;t[27]!==b||t[28]!==c||t[29]!==_||t[30]!==a||t[31]!==m||t[32]!==E||t[33]!==h||t[34]!==x?(q={user:h,userImage:x,menuItems:_,signOutItem:O,stopImpersonatingItem:E,isImpersonating:b,themeOptions:H,preferences:a,setPreferences:m,close:g,isMobile:c},t[27]=b,t[28]=c,t[29]=_,t[30]=a,t[31]=m,t[32]=E,t[33]=h,t[34]=x,t[35]=q):q=t[35];const U=q;let W;return t[36]!==b||t[37]!==c||t[38]!==u||t[39]!==U||t[40]!==h?.name||t[41]!==x?(W=s.jsx(s.Fragment,{children:c?s.jsxs(es,{open:u,onOpenChange:f,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>f(!0),className:D("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",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),s.jsxs(ts,{className:"h-[80dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Account"}),s.jsx(Ot,{...U})]})]}):s.jsxs(Qe,{open:u,onOpenChange:f,children:[s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:h?.name??"Account",className:D("rounded-md",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]})}),s.jsx(Je,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ri,children:s.jsx(Ot,{...U})})]})}),t[36]=b,t[37]=c,t[38]=u,t[39]=U,t[40]=h?.name,t[41]=x,t[42]=W):W=t[42],W}function Ri(t){return t.preventDefault()}async function Bi(){const{error:t}=await re.admin.stopImpersonating();if(t){ie.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function Hi(){de("signed_out",{source:"account_popover"}),Ms(),re.signOut()}function mt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=vn(),[r,o]=R.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=yn(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=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??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(ct,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==w||e[14]!==C?(N=s.jsx(ue,{asChild:!0,children:s.jsxs(te,{tooltip:a,onClick:y,children:[v,w,C]})}),e[12]=a,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(fe,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(he,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(zt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ct,{size:16}),e[27]=f):f=e[27];let h;e[28]!==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[28]=i.online,e[29]=h):h=e[29];let x;e[30]!==u||e[31]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsxs(je,{onClick:d,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=x):x=e[32];let b;e[33]!==c?(b=s.jsx(fe,{side:"bottom",children:c}),e[33]=c,e[34]=b):b=e[34];let p;e[35]!==x||e[36]!==b?(p=s.jsxs(he,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=p):p=e[37];let g;e[38]!==r?(g=s.jsx(zt,{open:r,onOpenChange:o}),e[38]=r,e[39]=g):g=e[39];let j;return e[40]!==g||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[40]=g,e[41]=p,e[42]=j):j=e[42],j}class Gi extends R.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 Ui(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Wi(){const t=$.c(17),e=pe(),{org:n}=oe(),{hasDecoKey:l,balanceDollars:i}=pn();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=D(i!=null&&Ui(i)),t[2]=i,t[3]=o):o=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 m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(an,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==d?(u=s.jsx(me,{children:s.jsx(X,{children:s.jsxs(te,{tooltip:r,className:o,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function Pt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Gi,{children:s.jsx(R.Suspense,{fallback:null,children:s.jsx(Wi,{})})}),t[0]=e):e=t[0],e}function Dt(){const t=$.c(7),e=pe(),{org:n}=oe();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(bt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(te,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function Ft(){const t=$.c(4),[e,n]=R.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{children:s.jsx(xn,{trigger:s.jsxs(te,{tooltip:"Invite members",children:[s.jsx(cn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(me,{className:"gap-0.5",children:[l,s.jsx(X,{children:s.jsxs(te,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(sn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(gn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function qi(){const t=$.c(10),{state:e}=ge();if(e==="collapsed"){let m,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{}),c=s.jsx(Pt,{}),t[0]=m,t[1]=c):(m=t[0],c=t[1]);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(mt,{})})}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(X,{children:s.jsx(Dt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(ot,{className:"px-2 pb-3 gap-1",children:[m,c,s.jsxs(me,{children:[d,u,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ft,{}),i=s.jsx(Pt,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(X,{children:s.jsx(mt,{variant:"full"})}),t[7]=r):r=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{children:s.jsx(Dt,{})}),t[8]=o):o=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(ot,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(me,{className:"gap-0.5",children:[r,o,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[9]=a):a=t[9],a}function Ki(){const t=$.c(8),e=pe(),{org:n}=oe(),{setOpenMobile:l}=ge();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{children:s.jsx(X,{children:s.jsx(dt,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bt,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(ot,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(je,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function Et(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=R.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&o(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==l?(u=D("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let x;e[7]!==h?(x=D("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==b?(p=s.jsxs("div",{className:u,children:[f,b]}),e[11]=u,e[12]=f,e[13]=b,e[14]=p):p=e[14],p}function Xi(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(Vi,{virtualMcpId:n,size:r}):s.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",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(os,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==o||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=m):m=e[7],m}function Vi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=jt(n);if(!i){let a;return e[0]!==l?(a=s.jsx(ve,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(ve,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function Lt(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=R.useState(""),{org:o}=oe(),{setTaskId:a}=yt(),m=rs();let c,d,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),d=Ps,c=Os.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==m||e[6]!==u?(h=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==h?(x={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:b,isFetching:p}=d(x);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let y;e[14]!==l?(y=I=>{I||r(""),l(I)},e[14]=l,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Tn,{className:"sr-only",children:[s.jsx(Mn,{children:"Search"}),s.jsx(On,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(Ln,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(A=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Fn,{children:"No results."}):j.map(I=>I.type==="thread"?s.jsxs(En,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Xi,{virtualMcpId:I.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:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(Rn,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(Pn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(Bn,{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:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==v||e[33]!==n||e[34]!==z?(_=s.jsx(Dn,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Yi(t){return t==="ephemeral"||t.startsWith("thread:")}function ps(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=Un(n.status),u=d.icon,f=n.metadata?.kind==="tool_call_run",h=jt(f?void 0:n.virtual_mcp_id);let x;e[0]!==h?(x=bn(h),e[0]=h,e[1]=x):x=e[1];const b=x;Wn(6e4);const p=o||!!n.trigger_id,g=n.id,j="button",y=0;let v;e[2]!==i?(v=H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=D("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(S=a&&!f&&s.jsx(ve,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=S):S=e[11];let A;e[12]!==p?(A=p&&s.jsx(os,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==b||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:D("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Yi(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):b?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[b.owner,"/",b.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Kn(new Date(n.updated_at))})]}),e[19]=b,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!m&&s.jsx("span",{className:D("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:D(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let P;e[27]!==r?(P=r&&s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H=>{H.stopPropagation(),r()},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-7 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(Ds,{size:14})})}),s.jsx(fe,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=P):P=e[28];let L;e[29]!==E||e[30]!==P?(L=s.jsxs("div",{className:F,children:[E,P]}),e[29]=E,e[30]=P,e[31]=L):L=e[31];let M;return e[32]!==i||e[33]!==O||e[34]!==L||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(M=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,O,L]}),e[32]=i,e[33]=O,e[34]=L,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=M):M=e[39],M}const Rt=["requires_action","in_progress","failed","expired","completed"];function Qi(t){const e=new Map(Rt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Rt.map(n=>({status:n,threads:e.get(n)}))}const Ji="sidebar.group.expanded.";function Zi(t,e){const n=$.c(3),[l,i]=Ye(`${Ji}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function gs(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=D("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"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[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Vt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const m=l?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function el(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function tl(t){return t.member==="mine"&&!t.currentUserId}const bs=4;let qe=0;const ut=[];function sl(){for(;qe<bs&&ut.length>0;){const t=ut.shift();t&&t()}}function js(t){return new Promise((e,n)=>{const l=()=>{qe++,t().then(e,n).finally(()=>{qe--,sl()})};qe<bs?l():ut.push(l)})}const Ze=10;function Bt(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function nl(t,e,n,l){let i=0;for(const r of t)vs(r,e,n,l)&&i++;return i}function nt(t,e,n,l){return nl(t,e,n,l)}function il(t,e){return!!(t>=Ze||t===0&&e)}function Ht(t,e){return t<e}function ll(t,e){return e===!1?!1:e===!0?!0:t}function vs(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 Ve=new Map,We=new Map;function rl(t,e){return e?t>=Ze?!0:null:!1}function Gt(t){return Ve.get(t)}function ol(t,e){Ve.set(t,e)}function al(t,e,n){const l=Ve.get(t);if(l!==void 0){n(l);return}let i=We.get(t);i||(i=js(e).then(r=>(Ve.set(t,r),We.delete(t),r)).catch(()=>(We.delete(t),Promise.reject(new Error("group probe failed")))),We.set(t,i)),i.then(n,()=>n(!1))}function Ut(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ze,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function cl(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||vs(o,n,l,i)&&r++;return r}function dl(t,e,n,l){const i=$.c(8),{org:r}=oe(),o=el(r.id,t,e,n);let a;i[0]!==n?(a=tl(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=R.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=In(),{threads:f,hasMore:h}=vt(),x=nt(f,t,e,n),b=il(x,h),p=rl(x,h),g=rs();if(c.identity===o&&c.serverHasMore===null){const N=p??Gt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!m&&c.identity===o&&c.serverHasMore===null&&p===null&&Gt(o)===void 0&&c.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),al(o,async()=>{const N=Bt(t,e,0,n,1),S=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ut(S),k=nt(u.threads.get(),t,e,n);return A===void 0?!1:Ht(k,A)},N=>{d(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||m)return;const S=o;d(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=nt(f,t,e,n),k=Bt(t,e,A,n,Ze),z=await js(()=>g.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:O}=Ut(z),F=new Set(f.map(ml)),E=cl(_,F,t,e,n),P=A;u.mergeThreads(_),d(L=>{if(L.identity!==S)return L;let M;return O!==void 0?M=Ht(P+E,O):M=_.length===0||E===0?!1:I,ol(S,M),{...L,isFetching:!1,serverHasMore:M}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);ie.error(`Could not load more tasks: ${z}`),d(_=>_.identity===S?{..._,isFetching:!1}:_)}},v=c.isFetching||c.isProbing,w=!m&&!v&&ll(b,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function ml(t){return t.id}function ul(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:f,serverHasMore:h}=dl("status",n,m),[x,b]=R.useState(!1);!x&&l.length===0&&h===!0&&!c&&!d&&(b(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==o||e[11]!==r?(y=v=>s.jsx(ps,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===m.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=m,e[10]=o,e[11]=r,e[12]=y):y=e[12],p=l.map(y),e[0]=i,e[1]=a,e[2]=m,e[3]=o,e[4]=r,e[5]=l,e[6]=p}else p=e[6];let g;e[13]!==f||e[14]!==c||e[15]!==u?(g=(f||c)&&s.jsx(gs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=g):g=e[16];let j;return e[17]!==p||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[17]=p,e[18]=g,e[19]=j):j=e[19],j}function fl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,c=qn[n],d=c.icon,[u,f]=Zi(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const x=h;let b;e[3]!==x?(b=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=b):b=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let g;e[8]!==u?(g=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(St,{size:14}):s.jsx(Xn,{size:14})}),e[8]=u,e[9]=g):g=e[9];let j;e[10]!==p||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,g]}),e[10]=p,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.length?(v=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]=v):v=e[16];let w;e[17]!==u||e[18]!==x||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:b,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,y,v]}),e[17]=u,e[18]=x,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==o||e[29]!==r||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(ul,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Wt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Gn,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const g=u?"No threads match your filters":"No threads yet";let j;return e[1]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=j):j=e[2],j}const f=n.length>1||m;if(l==="status"){let p;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(fl,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:f,filters:a},y.status),e[10]=i,e[11]=f,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],p=Qi(n).map(j),e[3]=i,e[4]=f,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let g;return e[16]!==p?(g=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=g):g=e[17],g}let h;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==o||e[29]!==r?(p=g=>s.jsx(ps,{task:g,isActive:i===g.id,onClick:()=>r(g),onArchive:f&&g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=i,e[26]=f,e[27]=a,e[28]=o,e[29]=r,e[30]=p):p=e[30],h=n.map(p),e[18]=i,e[19]=f,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(gs,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let b;return e[35]!==h||e[36]!==x?(b=s.jsxs(s.Fragment,{children:[h,x]}),e[35]=h,e[36]=x,e[37]=b):b=e[37],b}function hl(t,e,n){if(!n)return;const l=t.findIndex(i=>i.id===e);if(l!==-1){for(let i=l+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=l-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function qt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=R.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=D(f),e[4]=f,e[5]=h):h=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsx(je,{"aria-label":n,onClick:l,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=h,e[10]=x):x=e[10];let b;e[11]!==n?(b=s.jsx(fe,{side:"bottom",children:n}),e[11]=n,e[12]=b):b=e[12];let p;return e[13]!==o||e[14]!==x||e[15]!==b?(p=s.jsxs(he,{open:o,children:[x,b]}),e[13]=o,e[14]=x,e[15]=b,e[16]=p):p=e[16],p}function it(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(xl),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==l?(c=s.jsx(_n,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=l,e[9]=c):c=e[9];let d;return e[10]!==o||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=d):d=e[12],d}function xl(t){return s.jsxs(Nn,{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 ys({onNavigate:t}={}){const{data:e}=re.useSession(),n=e?.user?.id,{org:l}=oe(),i=Cn({connectionId:wn,orgId:l.id,orgSlug:l.slug}),r=Xe(l.id).id,o=is(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=vt(),u=a.filter(T=>!T.hidden),{hide:f}=ls(),h=pe(),{setTaskId:x,createNewTask:b}=yt(),p=ft({strict:!1}),g=ht({strict:!1}),j=p.taskId??null,y=g.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,G)=>(G.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=R.useState("all"),[S,A]=R.useState("flat"),[k,z]=Ye("sidebar-threads-scope-all",!1),[_,I]=R.useState(!1),[O,F]=R.useState(!1),E={type:C,member:"mine",currentUserId:n??null},P=T=>n?T.filter(G=>G.created_by===n):[],L=T=>C==="automation"?T.filter(G=>!!G.trigger_id):C==="manual"?T.filter(G=>!G.trigger_id):T,M=P(w),H=L(M),q=L(w),U=k?q:H,W=T=>{if(n&&T.created_by&&T.created_by!==n)return;const G=T.id===j;if(f(T.id),!G)return;const Y=hl(U,T.id,n);v(),Y?x(Y.id,Y.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},Q=T=>{v(),x(T.id,T.virtual_mcp_id)},B=async T=>{try{const G=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((G.structuredContent??G).items?.length??0)===0}catch{return!1}},ae=async()=>{const T=y??r;de("sidebar_new_thread_clicked",{virtual_mcp_id:T});const G=M.find(Y=>Y.virtual_mcp_id===T&&Y.title==="New chat");if(G&&await B(G.id)){v(),x(G.id,T);return}v(),b(T)},{state:ye,isMobile:V,toggleSidebar:J}=ge();if(ye==="collapsed"&&!V){const T=Xe(l.id),G=new Map((o??[]).map(K=>[K.id,K])),Y=K=>(K?G.get(K):void 0)??(K===r?T:void 0);return s.jsxs(me,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(X,{children:s.jsx(te,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:J,children:s.jsx(Zt,{size:16})})}),s.jsx(X,{children:s.jsx(te,{tooltip:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})}),U.map(K=>{const be=Y(K.virtual_mcp_id);return s.jsx(X,{children:s.jsx(te,{tooltip:K.title||"New chat",isActive:K.id===j,onClick:()=>Q(K),children:s.jsx(ve,{icon:be?.icon??null,name:be?.title??"Agent",size:"2xs"})})},K.id)})]})}const Z=S!=="flat"||C!=="all"||k===!0,ne=s.jsxs(Qe,{children:[s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx(Ee,{asChild:!0,children:s.jsxs(je,{"aria-label":"Filter threads",active:Z,children:[s.jsx(Sn,{size:16}),Z&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(fe,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Je,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(it,{label:"View",value:S,onChange:T=>{de("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(mn,{size:13})},{value:"status",label:"Status",icon:s.jsx(un,{size:13})}]}),s.jsx(it,{label:"Type",value:C,onChange:T=>{de("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(it,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),se=T=>s.jsx(at,{delayDuration:300,children:s.jsxs("div",{className:D("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(as,{}),ne]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(qt,{label:"Search threads",onClick:()=>{de("tasks_panel_search_opened"),F(!0),I(!0)},children:s.jsx(dn,{size:16})}),s.jsx(qt,{label:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!0),s.jsx(Et,{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(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]})}const pl=5,gl=[{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 Ss(){const t=$.c(3),{state:e}=ge();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:pl}).map(vl)}),t[0]=i):i=t[0],i}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:gl.map(bl)})]}),t[2]=l):l=t[2],l}function bl(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:D("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(jl)})]},e)}function jl(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 vl(t,e){return s.jsx(le,{className:"size-10 rounded-lg mx-auto"},e)}function yl(){const t=$.c(4),e=us();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(qi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:s.jsx(Ss,{}),children:s.jsx(ys,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(cs,{children:s.jsx(xs,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function Sl(t){const e=$.c(8),{onClose:n}=t,l=us();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ki,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ss,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:r,children:s.jsx(ys,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(cs,{children:s.jsx(Pi,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function Ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Nl=Fs({name:Es().min(2,"Organization name is required")});function _l(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Ls(Nl),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Rs(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:wl,onSuccess:Cl},e[1]=o):o=e[1];const a=Bs(o),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ri,{children:[s.jsx(oi,{children:"Create a new organization"}),s.jsx(ai,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],d=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(fi,{children:[s.jsx(hi,{children:"Organization Name"}),s.jsx(xi,{children:s.jsx(bi,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(pi,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",Ns(S.value)]})]}),s.jsx(gi,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(mi,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==m?(h=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let b;e[18]!==r.formState.isSubmitting||e[19]!==x?(b=s.jsx(ii,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=b):b=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let g;e[21]!==r.formState.isSubmitting?(g=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Zn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=g):g=e[22];let j;e[23]!==p||e[24]!==g?(j=s.jsx(rt,{type:"submit",variant:"default",disabled:p,children:g}),e[23]=p,e[24]=g,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==b?(y=s.jsxs(ci,{children:[b,j]}),e[26]=j,e[27]=b,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==d||e[31]!==f||e[32]!==h?(v=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,h,y]}),e[29]=y,e[30]=d,e[31]=f,e[32]=h,e[33]=v):v=e[33];let w;e[34]!==r||e[35]!==v?(w=s.jsxs(li,{children:[c,s.jsx(ui,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(di,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function Cl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function wl(t){const e=Ns(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await re.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function _s(){const t=R.useContext(Hs),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function kl(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 _t(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=D(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:kl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:D("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Al({invitation:t,onChanged:e}){const[n,l]=R.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const m=await re.organization.acceptInvitation({invitationId:t.id});if(m.error){ie.error(m.error.message),l(!1);return}}catch{ie.error("Failed to accept invitation"),l(!1);return}ie.success(`Joined ${i}`),Us();let a;try{a=(await re.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await re.organization.rejectInvitation({invitationId:t.id});if(a.error){ie.error(a.error.message),l(!1);return}ie.success("Invitation declined"),l(!1),e()}catch{ie.error("Failed to decline invitation"),l(!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(_t,{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:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(rt,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(rt,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(ni,{size:14})})]})]})}function Il(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Gs(),{invitations:o,refetch:a}=_s();let m;e[0]!==n?(m=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=R.useState(""),f=d.toLowerCase(),h=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ms,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=_=>u(_.target.value),e[3]=b):b=e[3];let p;e[4]!==d?(p=_=>_.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let g;e[6]!==d||e[7]!==p?(g=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:b,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=g):g=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Le,{size:16}),e[9]=j):j=e[9];let y;e[10]!==i?(y=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==g||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,g,y]}),e[12]=g,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==d||e[17]!==a?(C=!d&&o.map(_=>s.jsx(Al,{invitation:_,onChanged:a},_.id)),e[15]=o,e[16]=d,e[17]=a,e[18]=C):C=e[18];const N=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(_t,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=h.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==v?(z=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=z):z=e[28],z}function zl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,m=pe(),[c,d]=R.useState(!1),[u,f]=R.useState(!1);let h;e[0]!==n?(h=s.jsx(Ee,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const x=String(c);let b;e[2]!==m?(b=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=b):b=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),f(!0)},e[4]=p):p=e[4];let g;e[5]!==l||e[6]!==x||e[7]!==b?(g=s.jsx(Il,{orgParam:l,onSelectOrg:b,onCreateOrg:p},x),e[5]=l,e[6]=x,e[7]=b,e[8]=g):g=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==g?(j=s.jsx(Je,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Tl,onCloseAutoFocus:$l,children:g}),e[9]=o,e[10]=a,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==h||e[15]!==j?(y=s.jsxs(Qe,{open:c,onOpenChange:d,children:[h,j]}),e[13]=c,e[14]=h,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(_l,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function $l(t){return t.preventDefault()}function Tl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Ml(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==o?(d=D("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=D("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(Vt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ms,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=j=>l(j.target.value),e[6]=l,e[7]=x):x=e[7];let b;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(b=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=b):b=e[13];let p;e[14]!==f||e[15]!==h||e[16]!==b?(p=s.jsxs("label",{className:f,children:[h,b]}),e[14]=f,e[15]=h,e[16]=b,e[17]=p):p=e[17];let g;return e[18]!==d||e[19]!==p?(g=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=g):g=e[20],g}const Ol="Select an existing agent";function Pl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ue,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fe,{side:"right",sideOffset:8,children:Ol}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Dl(t){const e=pe(),{create:n}=ls(),{locator:l}=oe(),i=ft({strict:!1}),r=ht({strict:!1});return async o=>{const a=crypto.randomUUID(),m=o===r.virtualmcpid?$n(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function lt(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ve,{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 m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=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 d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==l?(u=l&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==d||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,d,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function Kt(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Fl(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=R.useState(""),m=is(),c=m??[],{org:d}=oe(),{data:u}=re.useSession(),f=u?.user?.id??"anon",h=Yn(m),x=Qn(),b=Dl(d.slug),p=jn(m),g=o.toLowerCase(),j=c.filter(Bl).filter(B=>!p.has(B.id)).filter(Rl).filter(B=>!o||B.title.toLowerCase().includes(g)),y=j.filter(Ll),v=j.filter(El),w=Xe(d.id),C=!o||w.title.toLowerCase().includes(g),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),a("");return}Jn({orgId:d.id,userId:f},B.id,h),x(),n(),a(""),b(B.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==o?(_=s.jsx(Ml,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",O=l&&C&&w&&s.jsx(lt,{agent:w,selected:!i||i===w.id,onClick:A}),F=v.length>0&&s.jsx(Kt,{children:"Agents"}),E=v.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),P=(y.length>0||!o)&&s.jsx(Kt,{action:s.jsxs("button",{type:"button",onClick:r,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:[s.jsx(vi,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),L=y.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let M;e[5]!==N||e[6]!==o||e[7]!==j.length?(M=j.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=j.length,e[8]=M):M=e[8];let H;e[9]!==M||e[10]!==O||e[11]!==F||e[12]!==E||e[13]!==P||e[14]!==L?(H=s.jsxs("div",{className:I,children:[O,F,E,P,L,M]}),e[9]=M,e[10]=O,e[11]=F,e[12]=E,e[13]=P,e[14]=L,e[15]=H):H=e[15];let q;e[16]!==d.slug?(q={org:d.slug},e[16]=d.slug,e[17]=q):q=e[17];let U;e[18]!==n?(U=()=>n(),e[18]=n,e[19]=U):U=e[19];let W;e[20]!==q||e[21]!==U?(W=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ws,{to:"/$org/settings/agents",params:q,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=q,e[21]=U,e[22]=W):W=e[22];let Q;return e[23]!==H||e[24]!==W||e[25]!==_?(Q=s.jsxs("div",{className:z,children:[_,H,W]}),e[23]=H,e[24]=W,e[25]=_,e[26]=Q):Q=e[26],Q}function El(t){return!ns(t.metadata)}function Ll(t){return ns(t.metadata)}function Rl(t){return!An(t.id)}function Bl(t){return!kn(t.id)}function Hl(t){const e=$.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:i,onSelectAgent:r,selectedAgentId:o,side:a,align:m}=n,c=l===void 0?!1:l,d=a===void 0?"right":a,u=m===void 0?"start":m,[f,h]=R.useState(!1),[x,b]=R.useState(!1),p=gt(),{setOpenMobile:g}=ge(),j=Vn(),y=j?"border border-border":void 0;let v;e[2]!==j?(v=F=>j?s.jsx(Pl,{children:F}):F,e[2]=j,e[3]=v):v=e[3];const w=v;let C;e[4]!==p||e[5]!==g?(C=()=>{h(!1),p&&g(!1)},e[4]=p,e[5]=g,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),b(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==o?(k=f&&s.jsx(R.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(Fl,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=o,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==j||e[19]!==p||e[20]!==f||e[21]!==z||e[22]!==d||e[23]!==i||e[24]!==w?(_=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?w(s.jsx(je,{"aria-label":"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(Le,{className:"size-4"})})):s.jsx(X,{children:w(s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(es,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(ts,{className:"max-h-[85dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Qe,{open:f,onOpenChange:F=>{F&&!f&&de("agent_browser_opened",{surface:"desktop_popover"}),h(F)},children:[i?s.jsx(Ee,{asChild:!0,children:i}):c?w(s.jsx(Ee,{asChild:!0,children:s.jsx(je,{"aria-label":"Browse agents",className:D(y),children:s.jsx(Le,{className:"size-4"})})})):s.jsx(X,{children:w(s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Je,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=j,e[19]=p,e[20]=f,e[21]=z,e[22]=d,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==x?(I=s.jsx(ji,{open:x,onOpenChange:b,mode:"agent"}),e[26]=x,e[27]=I):I=e[27];let O;return e[28]!==I||e[29]!==_?(O=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=O):O=e[30],O}const Gl="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-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 Ul(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=jt(n)??l??null,a=o?.title??"Super Agent",m=`Open ${a} home`,c=o?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(ve,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,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:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Gl,children:[f,h]}),e[10]=f,e[11]=x):x=e[11];let b;e[12]!==n||e[13]!==r||e[14]!==x?(b=s.jsx(Hl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=b):b=e[15];let p;return e[16]!==u||e[17]!==b?(p=s.jsxs("div",{className:"flex items-center gap-1",children:[u,b]}),e[16]=u,e[17]=b,e[18]=p):p=e[18],p}function Xt(){const t=$.c(44),{org:e}=oe(),{state:n,isMobile:l}=ge(),i=pe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const o=ft(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const m=ht(a),{threads:c}=vt(),{data:d}=re.useSession(),{setTaskId:u,createNewTask:f}=yt(),h=_s().invitations.length>0,x=n==="collapsed"||l;let b;t[2]!==e.id?(b=Xe(e.id),t[2]=e.id,t[3]=b):b=t[3];const p=b,g=p.id,j=o.taskId?m.virtualmcpid??g:g;let y;t[4]!==f||t[5]!==g||t[6]!==i||t[7]!==e.slug||t[8]!==d?.user?.id||t[9]!==u||t[10]!==c?(y=M=>{if(!M||M===g){i({to:"/$org",params:{org:e.slug}});return}const H=yi(c,M,d?.user?.id);H?u(H.id,M):f(M)},t[4]=f,t[5]=g,t[6]=i,t[7]=e.slug,t[8]=d?.user?.id,t[9]=u,t[10]=c,t[11]=y):y=t[11];const v=y,w=h?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let C;t[12]!==e?(C=s.jsx(_t,{org:e,size:"sm"}),t[12]=e,t[13]=C):C=t[13];let N;t[14]!==h||t[15]!==x?(N=h&&s.jsx("span",{className:D("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",x?"-top-1":"top-1/2 -translate-y-1/2")}),t[14]=h,t[15]=x,t[16]=N):N=t[16];let S;t[17]!==C||t[18]!==N?(S=s.jsxs("span",{className:"relative inline-flex",children:[C,N]}),t[17]=C,t[18]=N,t[19]=S):S=t[19];let A;t[20]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[20]=A):A=t[20];let k;t[21]!==w||t[22]!==S?(k=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":w,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 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:[S,A]})}),t[21]=w,t[22]=S,t[23]=k):k=t[23];let z;t[24]!==e.slug||t[25]!==k?(z=s.jsx(zl,{orgParam:e.slug,trigger:k}),t[24]=e.slug,t[25]=k,t[26]=z):z=t[26];let _;t[27]!==e.name?(_=s.jsx(fe,{side:"bottom",children:e.name}),t[27]=e.name,t[28]=_):_=t[28];let I;t[29]!==z||t[30]!==_?(I=s.jsx($t,{children:s.jsxs(he,{children:[z,_]})}),t[29]=z,t[30]=_,t[31]=I):I=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[32]=O):O=t[32];const F=j===g?p:void 0;let E;t[33]!==j||t[34]!==v?(E=()=>v(j),t[33]=j,t[34]=v,t[35]=E):E=t[35];let P;t[36]!==j||t[37]!==v||t[38]!==F||t[39]!==E?(P=s.jsx($t,{children:s.jsx(R.Suspense,{fallback:O,children:s.jsx(Ul,{agentId:j,fallback:F,onOpenHome:E,onPick:v})})}),t[36]=j,t[37]=v,t[38]=F,t[39]=E,t[40]=P):P=t[40];let L;return t[41]!==I||t[42]!==P?(L=s.jsx(ti,{className:"wco-no-drag",children:s.jsxs(si,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[I,P]})}),t[41]=I,t[42]=P,t[43]=L):L=t[43],L}const Wl="sidebar.open";function ql(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{}),t[0]=e):e=t[0],e}function oa(){const t=$.c(27),e=gt(),n=Si(),[l,i]=Ye(Wl,!1),{width:r,wrapperRef:o,onStartResize:a,resetWidth:m}=wi();let c;t[0]!==e||t[1]!==n?(c=e?s.jsxs(ee.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[!n&&s.jsx(as,{}),!n&&s.jsx(Xt,{}),!n&&s.jsx(mt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ee.TogglesSlot,{}),!n&&s.jsx(ee.TabsSlot,{className:"min-w-0 justify-self-end"})]}),!n&&s.jsx(ee.CenterSlot,{}),!n&&s.jsx(ee.RightSlot,{})]}):s.jsxs(ee.Header,{children:[s.jsxs(ee.LeftColumn,{children:[!n&&s.jsx(Xt,{}),s.jsx(ee.TogglesSlot,{})]}),n?s.jsx("div",{"aria-hidden":!0}):s.jsx(ee.CenterSlot,{}),s.jsx(ee.RightColumn,{children:!n&&s.jsxs(s.Fragment,{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(ee.TabsSlot,{})}),s.jsx(ee.RightSlot,{})]})})]}),t[0]=e,t[1]=n,t[2]=c):c=t[2];const d=`${r}px`;let u;t[3]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[3]=d,t[4]=u):u=t[4];const f=u;let h;t[5]!==e||t[6]!==a||t[7]!==n||t[8]!==m?(h=!e&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(yl,{}),s.jsx(Ni,{onPointerDown:a,onDoubleClick:m})]}),t[5]=e,t[6]=a,t[7]=n,t[8]=m,t[9]=h):h=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[10]=x):x=t[10];let b;t[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ys,{className:"flex flex-col",style:x,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(R.Suspense,{fallback:s.jsx(ql,{}),children:s.jsx(qs,{})})})})}),t[11]=b):b=t[11];let p;t[12]!==f||t[13]!==h||t[14]!==o?(p=s.jsxs(Qs,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:f,children:[h,b]}),t[12]=f,t[13]=h,t[14]=o,t[15]=p):p=t[15];let g;t[16]!==e||t[17]!==n?(g=e&&!n&&s.jsx(Hn,{renderSidebar:Kl}),t[16]=e,t[17]=n,t[18]=g):g=t[18];let j;t[19]!==c||t[20]!==p||t[21]!==g?(j=s.jsx(ei,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,p,g]})}),t[19]=c,t[20]=p,t[21]=g,t[22]=j):j=t[22];let y;return t[23]!==i||t[24]!==l||t[25]!==j?(y=s.jsx(zn,{children:s.jsx(ee.Provider,{children:s.jsx(Js,{open:l,onOpenChange:i,children:j})})}),t[23]=i,t[24]=l,t[25]=j,t[26]=y):y=t[26],y}function Kl(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(Sl,{onClose:e})})})}export{oa as default};
|
|
1
|
+
import{c as $,j as s,_ as Ye,r as R,l as D,R as de,$ as As,a0 as Is,a as re,a1 as oe,b as pe,a2 as zs,a3 as $s,t as ie,a4 as Ts,a5 as Ms,K as Os,m as Ps,a6 as Ds,i as Vt,e as ft,u as ht,U as Yt,H as Fs,I as Es,J as Ls,M as Rs,d as Bs,B as rt,a7 as Hs,W as Gs,X as Us,L as Ws,O as qs,a8 as Ks}from"./index-Cmr9fVtC.js";import{u as ge,S as xt,a as pt,b as me,c as te,d as X,e as Qt,f as Jt,g as Xs,h as Vs,i as ot,j as Ys,k as Qs,l as Js}from"./sidebar-Cnb2d5MG.js";import{u as gt}from"./use-mobile-DNECKnsa.js";import{S as le}from"./skeleton-Otp-PiPk.js";import{i as Zt}from"./LayoutLeft-dKaXj6Up.js";import{T as je}from"./toolbar-icon-button-DSL65azN.js";import{P as Qe,a as Ee,b as Je}from"./popover-CFWXdIix.js";import{D as es,a as ts,b as ss}from"./drawer-CK9sSR4P.js";import{A as Ke}from"./avatar-Db8GpDbq.js";import{a as ue,b as fe,c as at,T as he}from"./tooltip-DE7cV54t.js";import{a as Ct}from"./Copy01-BGQhYs2H.js";import{n as Zs,i as en}from"./Globe01-CLVgO104.js";import{i as tn}from"./ZoomOut-Dq81F7SC.js";import{i as wt,a as sn}from"./ZapSquare-DAQJK06h.js";import{i as ct}from"./Monitor01-Dv7c8Lhz.js";import{n as nn,a as ln}from"./Sun-B8GiYn_a.js";import{a as bt}from"./Settings02-CiCG8FiI.js";import{i as rn}from"./Shield01-DmOTBI68.js";import{b as kt,c as At,d as on,e as an,f as cn,A as ve,g as It,i as dn,s as mn,h as un}from"./agent-icon-BC0EkFq9.js";import{a as fn}from"./Users03-BjEMhqHh.js";import{u as hn}from"./use-deployment-admin-ByPJzcud.js";import"./index-BcE5merk.js";import{I as xn}from"./invite-member-dialog-DV2m3tp8.js";import{u as pn,A as gn,g as bn,a as jn,b as ns}from"./agent-capabilities-FxDJIcJf.js";import{u as vn,v as yn,C as zt}from"./connect-desktop-dialog-C4eYRTXC.js";import{i as Sn}from"./FilterLines-BCI7rv8r.js";import{T as Nn,a as _n}from"./toggle-group-Cd0C-H2t.js";import{u as Cn}from"./use-mcp-client-DYcjT0wq.js";import{S as wn,a as Xe,i as kn,b as An}from"./constants-CaIX_f5U.js";import{u as jt,a as is}from"./use-virtual-mcp-CPGZA-tY.js";import{u as In,a as vt,b as ls,T as zn}from"./hooks-C4OpZxwn.js";import{u as yt,r as $n}from"./shell-layout-BSpOE0i4.js";import{D as Tn,a as Mn,f as On,d as Pn,e as Dn}from"./dialog-BBhx8z3d.js";import{C as Fn,a as En,b as Ln,c as Rn,d as Bn}from"./command-w-CpTu6X.js";import{u as rs}from"./studio-tools-CkegyECy.js";import{i as os}from"./Zap-De1u9KTg.js";import{S as as,M as Hn}from"./shell-controls-DQ4lZhGB.js";import{n as Gn}from"./Stars02-BZ3cuaIW.js";import{g as Un,u as Wn,S as qn}from"./use-clock-tick-kyPAKrWg.js";import{a as Kn}from"./format-time-BnbuEtat.js";import{t as St}from"./ChevronDown-KS5srpkl.js";import{i as Xn}from"./ChevronRight-Bd4-SXmc.js";import{S as cs,u as Vn,g as Yn,a as Qn,b as Jn}from"./use-navigate-to-agent-BvPgxUNO.js";import{S as Zn,C as ei}from"./chat-context-CgCW1s44.js";import{B as $t,a as ti,b as si}from"./breadcrumb-s5tTG0hl.js";import{i as ds}from"./Check-CX1NmwB-.js";import{s as Le}from"./Plus-CXvrg9fC.js";import{i as ms}from"./SearchMd-CBtyUYQr.js";import{s as ni}from"./XClose-bCq3Ew9t.js";import{A as ii,a as li,b as ri,c as oi,d as ai,e as ci,f as di}from"./alert-dialog-oqpRR0i5.js";import{F as mi,a as ui,b as fi,c as hi,d as xi,f as pi,e as gi}from"./form-DmNN75KA.js";import{I as bi}from"./input-C-A5w_UH.js";import{G as ji,a as vi}from"./github-repo-picker-DcWadDWs.js";import{f as yi}from"./reusable-new-chat-CouMjkYR.js";import{T as ee}from"./toolbar-C4RnSevY.js";import{u as Si}from"./use-organization-settings-BcFHWCS7.js";import"./X-BMfi6o4s.js";import"./User01-Ds7LUUkI.js";import"./AlertCircle-CcXtGoqQ.js";import"./Tool01-BD6azVda.js";import"./ArrowUp-CNRCgR8Q.js";import"./XCircle-D4fOxK-F.js";import"./ArrowUpRight-BWdCB7YX.js";import"./Loading02-hCCIuqjk.js";import"./CheckCircle-CfCHYHY6.js";import"./ChevronUp-B-Uwu7fw.js";import"./Circle-MFN0Tsse.js";import"./DotsVertical-B6hXgmgt.js";import"./Eye-BZfXaBie.js";import"./Star01-qwtuVSkw.js";import"./Globe04-CrLInTji.js";import"./SwitchHorizontal01-BtnXV7uE.js";import"./HardDrive-B8x7SfiS.js";import"./Key01-CXza1L1L.js";import"./LinkExternal01-Bhf62yRV.js";import"./List-B5fwxtta.js";import"./Palette-DMR6BwxC.js";import"./Play-D6xPyqX9.js";import"./SearchLg-rQE5go4U.js";import"./Stars01-Db5srLOH.js";import"./Trash01-CU9sEJ6_.js";import"./Upload01-yhNC04X6.js";import"./Users01-CF6D_jDZ.js";import"./select-8ngurULp.js";import"./textarea-DwmQnfFA.js";import"./use-org-auth-client-CE5rvv1w.js";import"./use-organization-roles-rYW94hWU.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CiptvNXA.js";import"./use-registry-connections-BkdIdNIy.js";import"./use-connection-BnigW4NE.js";import"./use-collections-Dn6JgW5j.js";import"./useInfiniteQuery-DFe-wj2v.js";import"./use-infinite-scroll-DeVykSdk.js";import"./extract-connection-data-uCKVS9ah.js";import"./card-LJ8kSXgT.js";import"./integration-icon-860tNqkE.js";import"./collection-search-CxdA0ags.js";import"./collection-tabs-DWi5PsoD.js";import"./badge-C45BnVIV.js";import"./connection-form-helpers-D2xyGLtT.js";import"./authenticate-and-persist-oauth-rZ83LsiF.js";import"./mcp-oauth-DRUQRO4U.js";import"./auth-dTEX6kb5.js";import"./useSuspenseInfiniteQuery-DMDA8FJB.js";import"./use-ai-providers-CXxrTWkh.js";import"./decopilot-sse-pool-Ck4J1r_W.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./required-auth-layout-LndButnr.js";import"./autosend-CKoJU4Ck.js";import"./tab-id-bb-jjgGv.js";import"./use-org-sso-C7Laq1j3.js";import"./index-DvU95Wpw.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-decopilot-events-DsqAlPOp.js";import"./label-BZOdyySa.js";import"./use-debounced-value-Cjx1XL4V.js";import"./use-mcp-tools-CCKzPqlu.js";import"./github-installations-D2vHSx02.js";function Ni(t){const e=$.c(5),{onPointerDown:n,onDoubleClick:l}=t,{state:i,isMobile:r}=ge();if(r||i==="collapsed")return null;let o,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(o={left:"var(--sidebar-width)"},a=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[0]=o,e[1]=a):(o=e[0],a=e[1]);let m;return e[2]!==l||e[3]!==n?(m=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:n,onDoubleClick:l,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:o,children:a}),e[2]=l,e[3]=n,e[4]=m):m=e[4],m}const Nt=240,_i=400,Ci="sidebar.width";function Re(t){return Math.max(Nt,Math.min(_i,t))}function wi(){const t=$.c(11),[e,n]=Ye(Ci,ki),l=R.useRef(null);let i;t[0]!==n||t[1]!==e?(i=d=>{d.preventDefault();const u=d.clientX,f=Re(e),h=l.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),x=h?Array.from(h.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of x)g.style.transition="none";const b=g=>{const j=Re(f+(g.clientX-u));h?.style.setProperty("--sidebar-width",`${j}px`)},p=g=>{const j=Re(f+(g.clientX-u));n(j);for(const y of x)y.style.transition="";window.removeEventListener("pointermove",b),window.removeEventListener("pointerup",p),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",b),window.addEventListener("pointerup",p)},t[0]=n,t[1]=e,t[2]=i):i=t[2];const r=i;let o;t[3]!==n?(o=()=>{n(Nt)},t[3]=n,t[4]=o):o=t[4];const a=o;let m;t[5]!==e?(m=Re(e),t[5]=e,t[6]=m):m=t[6];let c;return t[7]!==r||t[8]!==a||t[9]!==m?(c={width:m,wrapperRef:l,onStartResize:r,resetWidth:a},t[7]=r,t[8]=a,t[9]=m,t[10]=c):c=t[10],c}function ki(t){return typeof t=="number"?Re(t):Nt}function us(){return[]}function fs(t){const e=$.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 i;return e[1]!==n?(i=s.jsxs(xt,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[l,s.jsx(pt,{children:s.jsx(me,{className:"gap-0.5",children:n})})]}),e[1]=n,e[2]=i):i=e[2],i}function hs(t){const e=$.c(18),{item:n}=t,{isMobile:l,setOpenMobile:i}=ge();let r;e[0]!==l||e[1]!==n||e[2]!==i?(r=()=>{de("nav_item_clicked",{nav_key:n.key,nav_label:n.label,is_active:!!n.isActive,is_mobile:l}),n.onClick?.(),l&&i(!1)},e[0]=l,e[1]=n,e[2]=i,e[3]=r):r=e[3];const o=r,a=n.key,m=n.isActive&&"z-10";let c;e[4]!==m?(c=D(m),e[4]=m,e[5]=c):c=e[5];let d;e[6]!==n.label?(d=s.jsx("span",{children:n.label}),e[6]=n.label,e[7]=d):d=e[7];let u;e[8]!==o||e[9]!==n.icon||e[10]!==n.isActive||e[11]!==n.label||e[12]!==d?(u=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,children:[n.icon,d]}),e[8]=o,e[9]=n.icon,e[10]=n.isActive,e[11]=n.label,e[12]=d,e[13]=u):u=e[13];let f;return e[14]!==n.key||e[15]!==c||e[16]!==u?(f=s.jsx(X,{className:c,children:u},a),e[14]=n.key,e[15]=c,e[16]=u,e[17]=f):f=e[17],f}function Ai(t){const e=$.c(12),{section:n}=t;switch(n.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Qt,{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,i=n.group.defaultExpanded;let r;e[2]!==n.group.items?(r=n.group.items.map(zi),e[2]=n.group.items,e[3]=r):r=e[3];let o;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==r?(o=s.jsx(fs,{label:l,defaultExpanded:i,children:r}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=r,e[7]=o):o=e[7],o}case"items":{let l;e[8]!==n.items?(l=n.items.map(Ii),e[8]=n.items,e[9]=l):l=e[9];let i;return e[10]!==l?(i=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:l})})}),e[10]=l,e[11]=i):i=e[11],i}case"custom":return n.content}}function Ii(t){return s.jsx(hs,{item:t},t.key)}function zi(t){return s.jsx(hs,{item:t},t.key)}function $i(t){const e=$.c(14),{sections:n,footer:l,additionalContent:i,variant:r,contentClassName:o}=t,a=r===void 0?"sidebar":r;let m;e[0]!==o?(m=D("flex flex-col flex-1 px-2 pb-2 gap-0.5",o),e[0]=o,e[1]=m):m=e[1];let c;e[2]!==n?(c=n.map(Ti),e[2]=n,e[3]=c):c=e[3];let d;e[4]!==i?(d=i&&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:i}),e[4]=i,e[5]=d):d=e[5];let u;e[6]!==m||e[7]!==c||e[8]!==d?(u=s.jsxs(Jt,{className:m,children:[c,d]}),e[6]=m,e[7]=c,e[8]=d,e[9]=u):u=e[9];let f;return e[10]!==l||e[11]!==u||e[12]!==a?(f=s.jsxs(Xs,{variant:a,children:[u,l]}),e[10]=l,e[11]=u,e[12]=a,e[13]=f):f=e[13],f}function Ti(t,e){return s.jsx(Ai,{section:t},e)}function xs(t){const e=$.c(2);let n;return e[0]!==t?(n=s.jsx($i,{...t}),e[0]=t,e[1]=n):n=e[1],n}xs.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 Mi(t){const e=$.c(16),{onToggle:n,className:l}=t,r=As().logo??Is,o=typeof r=="string"?r:r.light,a=typeof r=="string"?r:r.dark;let m;e[0]!==l?(m=D("flex flex-row items-center gap-2 md:gap-0.5 shrink-0 h-12 pl-1 pr-2 pt-0.25 pb-0","group-data-[collapsible=icon]/sidebar:hidden",l),e[0]=l,e[1]=m):m=e[1];let c;e[2]!==o?(c=s.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),e[2]=o,e[3]=c):c=e[3];let d;e[4]!==a?(d=s.jsx("img",{src:a,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),e[4]=a,e[5]=d):d=e[5];let u;e[6]!==c||e[7]!==d?(u=s.jsx("span",{className:"flex items-center shrink-0 pl-1",children:s.jsxs("span",{className:"flex items-center shrink-0 px-2",children:[c,d]})}),e[6]=c,e[7]=d,e[8]=u):u=e[8];let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Zt,{size:16}),e[9]=f):f=e[9];let h;e[10]!==n?(h=s.jsx(je,{onClick:n,"aria-label":"Toggle sidebar",children:f}),e[10]=n,e[11]=h):h=e[11];let x;return e[12]!==m||e[13]!==u||e[14]!==h?(x=s.jsxs(Vs,{className:m,children:[u,h]}),e[12]=m,e[13]=u,e[14]=h,e[15]=x):x=e[15],x}function Tt(t){const e=$.c(18),{item:n,onClose:l}=t,i=n.isActive&&"z-10";let r;e[0]!==i?(r=D(i),e[0]=i,e[1]=r):r=e[1];let o;e[2]!==n||e[3]!==l?(o=()=>{n.onClick?.(),l()},e[2]=n,e[3]=l,e[4]=o):o=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 m;e[7]!==n.label?(m=s.jsx("span",{children:n.label}),e[7]=n.label,e[8]=m):m=e[8];let c;e[9]!==n.isActive||e[10]!==n.label||e[11]!==o||e[12]!==a||e[13]!==m?(c=s.jsxs(te,{onClick:o,isActive:n.isActive,tooltip:n.label,className:"h-10! text-sm!",children:[a,m]}),e[9]=n.isActive,e[10]=n.label,e[11]=o,e[12]=a,e[13]=m,e[14]=c):c=e[14];let d;return e[15]!==r||e[16]!==c?(d=s.jsx(X,{className:r,children:c}),e[15]=r,e[16]=c,e[17]=d):d=e[17],d}function Oi(t){const e=$.c(18),{section:n,onClose:l}=t;switch(n.type){case"divider":{let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Qt,{className:"my-2"}),e[0]=i):i=e[0],i}case"spacer":{let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1"}),e[1]=i):i=e[1],i}case"group":{const i=n.group.label,r=n.group.defaultExpanded;let o;if(e[2]!==l||e[3]!==n.group.items){let m;e[5]!==l?(m=c=>s.jsx(Tt,{item:c,onClose:l},c.key),e[5]=l,e[6]=m):m=e[6],o=n.group.items.map(m),e[2]=l,e[3]=n.group.items,e[4]=o}else o=e[4];let a;return e[7]!==n.group.defaultExpanded||e[8]!==n.group.label||e[9]!==o?(a=s.jsx(fs,{label:i,defaultExpanded:r,children:o}),e[7]=n.group.defaultExpanded,e[8]=n.group.label,e[9]=o,e[10]=a):a=e[10],a}case"items":{let i;if(e[11]!==l||e[12]!==n.items){let o;e[14]!==l?(o=a=>s.jsx(Tt,{item:a,onClose:l},a.key),e[14]=l,e[15]=o):o=e[15],i=n.items.map(o),e[11]=l,e[12]=n.items,e[13]=i}else i=e[13];let r;return e[16]!==i?(r=s.jsx(xt,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(pt,{children:s.jsx(me,{className:"gap-1.5",children:i})})}),e[16]=i,e[17]=r):r=e[17],r}case"custom":return n.content}}function Pi(t){const e=$.c(17),{sections:n,onClose:l,footer:i,additionalContent:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"h-12 shrink-0"}),e[0]=o):o=e[0];let a;e[1]!==l?(a=s.jsx(R.Suspense,{fallback:o,children:s.jsx(Mi,{onToggle:l})}),e[1]=l,e[2]=a):a=e[2];let m;if(e[3]!==l||e[4]!==n){let f;e[6]!==l?(f=(h,x)=>s.jsx(Oi,{section:h,onClose:l},x),e[6]=l,e[7]=f):f=e[7],m=n.map(f),e[3]=l,e[4]=n,e[5]=m}else m=e[5];let c;e[8]!==r?(c=r&&s.jsx("div",{className:"mt-3 flex flex-col flex-1 min-h-0",children:r}),e[8]=r,e[9]=c):c=e[9];let d;e[10]!==m||e[11]!==c?(d=s.jsxs(Jt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[m,c]}),e[10]=m,e[11]=c,e[12]=d):d=e[12];let u;return e[13]!==i||e[14]!==a||e[15]!==d?(u=s.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[a,d,i]}),e[13]=i,e[14]=a,e[15]=d,e[16]=u):u=e[16],u}function Fe(t){const e=$.c(26),{item:n,onClose:l}=t;let i;e[0]!==n.className?(i=D("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]=i):i=e[1];const r=i;if(n.href){const d=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 h;e[4]!==n.label?(h=s.jsx("span",{className:"flex-1",children:n.label}),e[4]=n.label,e[5]=h):h=e[5];let x;return e[6]!==r||e[7]!==n.href||e[8]!==l||e[9]!==d||e[10]!==u||e[11]!==f||e[12]!==h?(x=s.jsxs("a",{href:n.href,target:d,rel:u,className:r,onClick:l,children:[f,h]}),e[6]=r,e[7]=n.href,e[8]=l,e[9]=d,e[10]=u,e[11]=f,e[12]=h,e[13]=x):x=e[13],x}let o;e[14]!==n||e[15]!==l?(o=()=>{n.onClick?.(),l()},e[14]=n,e[15]=l,e[16]=o):o=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 m;e[19]!==n.label?(m=s.jsx("span",{className:"flex-1",children:n.label}),e[19]=n.label,e[20]=m):m=e[20];let c;return e[21]!==r||e[22]!==o||e[23]!==a||e[24]!==m?(c=s.jsxs("button",{type:"button",onClick:o,className:r,children:[a,m]}),e[21]=r,e[22]=o,e[23]=a,e[24]=m,e[25]=c):c=e[25],c}function Mt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("span",{className:"shrink-0 inline-flex items-center rounded-full bg-amber-100 dark:bg-amber-500/20 px-2 py-0.5 text-[10px] font-medium text-amber-700 dark:text-amber-400",children:"Impersonating"}),t[0]=e):e=t[0],e}function Ot(t){const e=$.c(144),{user:n,userImage:l,menuItems:i,signOutItem:r,stopImpersonatingItem:o,isImpersonating:a,themeOptions:m,preferences:c,setPreferences:d,close:u,isMobile:f}=t;if(f){const V=n?.name??"U";let J;e[0]!==V||e[1]!==l?(J=s.jsx(Ke,{url:l,fallback:V,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=V,e[1]=l,e[2]=J):J=e[2];const xe=n?.name??"User";let Z;e[3]!==xe?(Z=s.jsx("p",{className:"text-sm font-medium truncate",children:xe}),e[3]=xe,e[4]=Z):Z=e[4];let ne;e[5]!==a?(ne=a&&s.jsx(Mt,{}),e[5]=a,e[6]=ne):ne=e[6];let se;e[7]!==Z||e[8]!==ne?(se=s.jsxs("div",{className:"flex items-center gap-2",children:[Z,ne]}),e[7]=Z,e[8]=ne,e[9]=se):se=e[9];const T=n?.email;let G;e[10]!==T?(G=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:T}),e[10]=T,e[11]=G):G=e[11];let Y;e[12]!==se||e[13]!==G?(Y=s.jsxs("div",{className:"flex-1 min-w-0",children:[se,G]}),e[12]=se,e[13]=G,e[14]=Y):Y=e[14];let K;e[15]!==n?(K=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Li)},e[15]=n,e[16]=K):K=e[16];let be;e[17]===Symbol.for("react.memo_cache_sentinel")?(be=s.jsx(Ct,{size:14}),e[17]=be):be=e[17];let Se;e[18]!==K?(Se=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:K,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:be})}),e[18]=K,e[19]=Se):Se=e[19];let Be;e[20]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[20]=Be):Be=e[20];let Ne;e[21]!==Se?(Ne=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[Se,Be]})}),e[21]=Se,e[22]=Ne):Ne=e[22];let _e;e[23]!==Ne||e[24]!==J||e[25]!==Y?(_e=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[J,Y,Ne]}),e[23]=Ne,e[24]=J,e[25]=Y,e[26]=_e):_e=e[26];let Ce;if(e[27]!==u||e[28]!==i){let ce;e[30]!==u?(ce=Ue=>s.jsx(Fe,{item:Ue,onClose:u},Ue.key),e[30]=u,e[31]=ce):ce=e[31],Ce=i.map(ce),e[27]=u,e[28]=i,e[29]=Ce}else Ce=e[29];let we;e[32]!==u||e[33]!==o?(we=o&&s.jsx(Fe,{item:o,onClose:u}),e[32]=u,e[33]=o,e[34]=we):we=e[34];let ke;e[35]!==u||e[36]!==r?(ke=s.jsx(Fe,{item:r,onClose:u}),e[35]=u,e[36]=r,e[37]=ke):ke=e[37];let Ae;e[38]!==Ce||e[39]!==we||e[40]!==ke?(Ae=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:[Ce,we,ke]})}),e[38]=Ce,e[39]=we,e[40]=ke,e[41]=Ae):Ae=e[41];let Ie;if(e[42]!==c.theme||e[43]!==d||e[44]!==m){let ce;e[46]!==c.theme||e[47]!==d?(ce=Ue=>{const{value:st,icon:Cs,label:ws}=Ue;return s.jsx("button",{type:"button","aria-label":ws,onClick:()=>d(ks=>({...ks,theme:st})),className:D("size-8 rounded-md flex items-center justify-center transition-colors",c.theme===st?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Cs},st)},e[46]=c.theme,e[47]=d,e[48]=ce):ce=e[48],Ie=m.map(ce),e[42]=c.theme,e[43]=d,e[44]=m,e[45]=Ie}else Ie=e[45];let ze;e[49]!==Ie?(ze=s.jsx("div",{className:"flex items-center gap-0.5",children:Ie}),e[49]=Ie,e[50]=ze):ze=e[50];const et=c.enableSounds?"Disable sounds":"Enable sounds";let $e;e[51]!==d?($e=()=>d(Ei),e[51]=d,e[52]=$e):$e=e[52];const tt=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Te;e[53]!==tt?(Te=D("size-8 rounded-md flex items-center justify-center transition-colors",tt),e[53]=tt,e[54]=Te):Te=e[54];let Me;e[55]!==c.enableSounds?(Me=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[55]=c.enableSounds,e[56]=Me):Me=e[56];let Oe;e[57]!==et||e[58]!==$e||e[59]!==Te||e[60]!==Me?(Oe=s.jsx("button",{type:"button","aria-label":et,onClick:$e,className:Te,children:Me}),e[57]=et,e[58]=$e,e[59]=Te,e[60]=Me,e[61]=Oe):Oe=e[61];let He;e[62]===Symbol.for("react.memo_cache_sentinel")?(He=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.55.2"]}),e[62]=He):He=e[62];let Pe;e[63]!==Oe?(Pe=s.jsxs("div",{className:"flex items-center gap-2",children:[Oe,He]}),e[63]=Oe,e[64]=Pe):Pe=e[64];let De;e[65]!==ze||e[66]!==Pe?(De=s.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ze,Pe]}),e[65]=ze,e[66]=Pe,e[67]=De):De=e[67];let Ge;return e[68]!==_e||e[69]!==Ae||e[70]!==De?(Ge=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[_e,Ae,De]}),e[68]=_e,e[69]=Ae,e[70]=De,e[71]=Ge):Ge=e[71],Ge}const h=n?.name??"U";let x;e[72]!==h||e[73]!==l?(x=s.jsx(Ke,{url:l,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[72]=h,e[73]=l,e[74]=x):x=e[74];const b=n?.name??"User";let p;e[75]!==b?(p=s.jsx("p",{className:"text-sm font-medium truncate",children:b}),e[75]=b,e[76]=p):p=e[76];let g;e[77]!==a?(g=a&&s.jsx(Mt,{}),e[77]=a,e[78]=g):g=e[78];let j;e[79]!==p||e[80]!==g?(j=s.jsxs("div",{className:"flex items-center gap-2",children:[p,g]}),e[79]=p,e[80]=g,e[81]=j):j=e[81];const y=n?.email;let v;e[82]!==y?(v=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:y}),e[82]=y,e[83]=v):v=e[83];let w;e[84]!==j||e[85]!==v?(w=s.jsxs("div",{className:"flex-1 min-w-0",children:[j,v]}),e[84]=j,e[85]=v,e[86]=w):w=e[86];let C;e[87]!==n?(C=()=>{n?.id&&navigator.clipboard.writeText(n.id).then(Fi)},e[87]=n,e[88]=C):C=e[88];let N;e[89]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Ct,{size:14}),e[89]=N):N=e[89];let S;e[90]!==C?(S=s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button",tabIndex:-1,onClick:C,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:N})}),e[90]=C,e[91]=S):S=e[91];let A;e[92]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(fe,{side:"right",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[92]=A):A=e[92];let k;e[93]!==S?(k=s.jsx(at,{delayDuration:300,children:s.jsxs(he,{children:[S,A]})}),e[93]=S,e[94]=k):k=e[94];let z;e[95]!==k||e[96]!==x||e[97]!==w?(z=s.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[x,w,k]}),e[95]=k,e[96]=x,e[97]=w,e[98]=z):z=e[98];let _;if(e[99]!==u||e[100]!==i){let V;e[102]!==u?(V=J=>s.jsx(Fe,{item:J,onClose:u},J.key),e[102]=u,e[103]=V):V=e[103],_=i.map(V),e[99]=u,e[100]=i,e[101]=_}else _=e[101];let I;e[104]!==u||e[105]!==o?(I=o&&s.jsx(Fe,{item:o,onClose:u}),e[104]=u,e[105]=o,e[106]=I):I=e[106];let O;e[107]!==u||e[108]!==r?(O=s.jsx(Fe,{item:r,onClose:u}),e[107]=u,e[108]=r,e[109]=O):O=e[109];let F;e[110]!==_||e[111]!==I||e[112]!==O?(F=s.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[_,I,O]}),e[110]=_,e[111]=I,e[112]=O,e[113]=F):F=e[113];let E;if(e[114]!==c.theme||e[115]!==d||e[116]!==m){let V;e[118]!==c.theme||e[119]!==d?(V=J=>{const{value:xe,icon:Z,label:ne}=J;return s.jsx("button",{type:"button","aria-label":ne,onClick:()=>d(se=>({...se,theme:xe})),className:D("size-7 rounded-md flex items-center justify-center transition-colors",c.theme===xe?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},xe)},e[118]=c.theme,e[119]=d,e[120]=V):V=e[120],E=m.map(V),e[114]=c.theme,e[115]=d,e[116]=m,e[117]=E}else E=e[117];let P;e[121]!==E?(P=s.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[121]=E,e[122]=P):P=e[122];const L=c.enableSounds?"Disable sounds":"Enable sounds";let M;e[123]!==d?(M=()=>d(Di),e[123]=d,e[124]=M):M=e[124];const H=c.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let q;e[125]!==H?(q=D("size-7 rounded-md flex items-center justify-center transition-colors",H),e[125]=H,e[126]=q):q=e[126];let U;e[127]!==c.enableSounds?(U=c.enableSounds?s.jsx(kt,{size:14}):s.jsx(At,{size:14}),e[127]=c.enableSounds,e[128]=U):U=e[128];let W;e[129]!==L||e[130]!==M||e[131]!==q||e[132]!==U?(W=s.jsx("button",{type:"button","aria-label":L,onClick:M,className:q,children:U}),e[129]=L,e[130]=M,e[131]=q,e[132]=U,e[133]=W):W=e[133];let Q;e[134]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","4.55.2"]}),e[134]=Q):Q=e[134];let B;e[135]!==W?(B=s.jsxs("div",{className:"flex items-center gap-2",children:[W,Q]}),e[135]=W,e[136]=B):B=e[136];let ae;e[137]!==P||e[138]!==B?(ae=s.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[P,B]}),e[137]=P,e[138]=B,e[139]=ae):ae=e[139];let ye;return e[140]!==z||e[141]!==F||e[142]!==ae?(ye=s.jsx("div",{className:"flex w-full flex-col overflow-hidden",children:s.jsxs("div",{className:"flex flex-col",children:[z,F,ae]})}),e[140]=z,e[141]=F,e[142]=ae,e[143]=ye):ye=e[143],ye}function Di(t){return{...t,enableSounds:!t.enableSounds}}function Fi(){ie.success("User ID copied")}function Ei(t){return{...t,enableSounds:!t.enableSounds}}function Li(){ie.success("User ID copied")}function dt(){const t=$.c(43),{data:e}=re.useSession(),{org:n}=oe(),l=pe();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org",shouldThrow:!1},t[0]=i):i=t[0];const o=zs(i)?.params.org,[a,m]=$s(),c=gt(),{isAdmin:d}=hn(),[u,f]=R.useState(!1),h=e?.user,x=h?.image,b=!!e?.session?.impersonatedBy;let p;t[1]===Symbol.for("react.memo_cache_sentinel")?(p=()=>f(!1),t[1]=p):p=t[1];const g=p;let j;t[2]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(bt,{size:16}),t[2]=j):j=t[2];let y;t[3]!==l||t[4]!==o?(y={key:"preferences",label:"Preferences",icon:j,onClick:()=>{l({to:"/$org/settings/profile",params:{org:o??""}})}},t[3]=l,t[4]=o,t[5]=y):y=t[5];let v;t[6]!==n||t[7]!==l?(v=n?[{key:"install-app",label:"Add to Home Screen",icon:s.jsx(Zs,{size:16}),onClick:()=>{l({to:"/$org/install",params:{org:n.slug}})}}]:[],t[6]=n,t[7]=l,t[8]=v):v=t[8];let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w={key:"terms",label:"Terms of Use",icon:s.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[9]=w):w=t[9];let C;t[10]===Symbol.for("react.memo_cache_sentinel")?(C={key:"privacy",label:"Privacy Policy",icon:s.jsx(rn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[10]=C):C=t[10];let N;t[11]===Symbol.for("react.memo_cache_sentinel")?(N={key:"github",label:"decocms/studio",icon:s.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[11]=N):N=t[11];let S;t[12]===Symbol.for("react.memo_cache_sentinel")?(S={key:"community",label:"Community",icon:s.jsx(fn,{size:16}),href:"https://decocms.com/discord",external:!0},t[12]=S):S=t[12];let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A={key:"homepage",label:"Homepage",icon:s.jsx(en,{size:16}),href:"https://decocms.com",external:!0},t[13]=A):A=t[13];let k;t[14]!==d||t[15]!==l?(k=d?[{key:"admin-dashboard",label:"Admin Dashboard",icon:s.jsx(on,{size:16}),onClick:()=>l({to:"/_admin"}),className:"text-amber-700 dark:text-amber-400"}]:[],t[14]=d,t[15]=l,t[16]=k):k=t[16];let z;t[17]!==k||t[18]!==y||t[19]!==v?(z=[y,...v,w,C,N,S,A,...k],t[17]=k,t[18]=y,t[19]=v,t[20]=z):z=t[20];const _=z;let I;t[21]===Symbol.for("react.memo_cache_sentinel")?(I={key:"logout",label:"Sign out",icon:s.jsx(wt,{size:16}),onClick:Hi},t[21]=I):I=t[21];const O=I;let F;t[22]!==b?(F=b?{key:"stop-impersonating",label:"Stop impersonation",icon:s.jsx(wt,{size:16}),onClick:Bi,className:"text-amber-700 dark:text-amber-400"}:null,t[22]=b,t[23]=F):F=t[23];const E=F;let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P={value:"light",icon:s.jsx(nn,{size:14}),label:"Light theme"},t[24]=P):P=t[24];let L;t[25]===Symbol.for("react.memo_cache_sentinel")?(L={value:"dark",icon:s.jsx(ln,{size:14}),label:"Dark theme"},t[25]=L):L=t[25];let M;t[26]===Symbol.for("react.memo_cache_sentinel")?(M=[P,L,{value:"system",icon:s.jsx(ct,{size:14}),label:"System theme"}],t[26]=M):M=t[26];const H=M;let q;t[27]!==b||t[28]!==c||t[29]!==_||t[30]!==a||t[31]!==m||t[32]!==E||t[33]!==h||t[34]!==x?(q={user:h,userImage:x,menuItems:_,signOutItem:O,stopImpersonatingItem:E,isImpersonating:b,themeOptions:H,preferences:a,setPreferences:m,close:g,isMobile:c},t[27]=b,t[28]=c,t[29]=_,t[30]=a,t[31]=m,t[32]=E,t[33]=h,t[34]=x,t[35]=q):q=t[35];const U=q;let W;return t[36]!==b||t[37]!==c||t[38]!==u||t[39]!==U||t[40]!==h?.name||t[41]!==x?(W=s.jsx(s.Fragment,{children:c?s.jsxs(es,{open:u,onOpenChange:f,direction:"bottom",children:[s.jsxs("button",{type:"button",onClick:()=>f(!0),className:D("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",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"2xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),s.jsxs(ts,{className:"h-[80dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Account"}),s.jsx(Ot,{...U})]})]}):s.jsxs(Qe,{open:u,onOpenChange:f,children:[s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:h?.name??"Account",className:D("rounded-md",b&&"border-2 border-dashed border-amber-500"),children:[s.jsx(Ke,{url:x,fallback:h?.name??"U",shape:"circle",size:"xs",className:"shrink-0"}),s.jsx("span",{className:"truncate",children:h?.name??"Account"})]})}),s.jsx(Je,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[280px] p-0 flex flex-col max-h-[520px]",onCloseAutoFocus:Ri,children:s.jsx(Ot,{...U})})]})}),t[36]=b,t[37]=c,t[38]=u,t[39]=U,t[40]=h?.name,t[41]=x,t[42]=W):W=t[42],W}function Ri(t){return t.preventDefault()}async function Bi(){const{error:t}=await re.admin.stopImpersonating();if(t){ie.error(t.message||"Failed to stop impersonation");return}window.location.href="/"}function Hi(){de("signed_out",{source:"account_popover"}),Ms(),re.signOut()}function mt(t){const e=$.c(43),{variant:n}=t===void 0?{}:t,l=n===void 0?"icon":n,i=vn(),[r,o]=R.useState(!1);let a,m;if(e[0]!==i.capabilities||e[1]!==i.hostname||e[2]!==i.machineId||e[3]!==i.online){const y=yn(i.capabilities);a=i.online?"Desktop linked":"Connect desktop",m=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??"Desktop linked"}),s.jsx("span",{className:"text-muted-foreground",children:y.length>0?`Available: ${y.join(", ")}`:"No CLI agents detected"})]}):s.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=i.capabilities,e[1]=i.hostname,e[2]=i.machineId,e[3]=i.online,e[4]=a,e[5]=m}else a=e[4],m=e[5];const c=m;if(l==="full"){let y,v;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=()=>o(!0),v=s.jsx(ct,{}),e[6]=y,e[7]=v):(y=e[6],v=e[7]);let w;e[8]!==a?(w=s.jsx("span",{children:a}),e[8]=a,e[9]=w):w=e[9];let C;e[10]!==i.online?(C=i.online&&s.jsx("span",{className:"ml-auto size-2 rounded-full bg-success animate-pulse"}),e[10]=i.online,e[11]=C):C=e[11];let N;e[12]!==a||e[13]!==w||e[14]!==C?(N=s.jsx(ue,{asChild:!0,children:s.jsxs(te,{tooltip:a,onClick:y,children:[v,w,C]})}),e[12]=a,e[13]=w,e[14]=C,e[15]=N):N=e[15];let S;e[16]!==c?(S=s.jsx(fe,{side:"right",children:c}),e[16]=c,e[17]=S):S=e[17];let A;e[18]!==N||e[19]!==S?(A=s.jsxs(he,{children:[N,S]}),e[18]=N,e[19]=S,e[20]=A):A=e[20];let k;e[21]!==r?(k=s.jsx(zt,{open:r,onOpenChange:o}),e[21]=r,e[22]=k):k=e[22];let z;return e[23]!==k||e[24]!==A?(z=s.jsxs(s.Fragment,{children:[A,k]}),e[23]=k,e[24]=A,e[25]=z):z=e[25],z}let d;e[26]===Symbol.for("react.memo_cache_sentinel")?(d=()=>o(!0),e[26]=d):d=e[26];const u=i.online?"Desktop linked":"Connect your desktop";let f;e[27]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ct,{size:16}),e[27]=f):f=e[27];let h;e[28]!==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[28]=i.online,e[29]=h):h=e[29];let x;e[30]!==u||e[31]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsxs(je,{onClick:d,"aria-label":u,children:[f,h]})}),e[30]=u,e[31]=h,e[32]=x):x=e[32];let b;e[33]!==c?(b=s.jsx(fe,{side:"bottom",children:c}),e[33]=c,e[34]=b):b=e[34];let p;e[35]!==x||e[36]!==b?(p=s.jsxs(he,{children:[x,b]}),e[35]=x,e[36]=b,e[37]=p):p=e[37];let g;e[38]!==r?(g=s.jsx(zt,{open:r,onOpenChange:o}),e[38]=r,e[39]=g):g=e[39];let j;return e[40]!==g||e[41]!==p?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[40]=g,e[41]=p,e[42]=j):j=e[42],j}class Gi extends R.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 Ui(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Wi(){const t=$.c(17),e=pe(),{org:n}=oe(),{hasDecoKey:l,balanceDollars:i}=pn();if(!l)return null;let r;t[0]!==i?(r=i!=null?`Credits: $${i.toFixed(2)}`:"Credits",t[0]=i,t[1]=r):r=t[1];let o;t[2]!==i?(o=D(i!=null&&Ui(i)),t[2]=i,t[3]=o):o=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 m;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(an,{}),t[7]=m):m=t[7];let c;t[8]!==i?(c=i!=null?`$${i.toFixed(2)}`:"Credits",t[8]=i,t[9]=c):c=t[9];let d;t[10]!==c?(d=s.jsx("span",{children:c}),t[10]=c,t[11]=d):d=t[11];let u;return t[12]!==r||t[13]!==o||t[14]!==a||t[15]!==d?(u=s.jsx(me,{children:s.jsx(X,{children:s.jsxs(te,{tooltip:r,className:o,onClick:a,children:[m,d]})})}),t[12]=r,t[13]=o,t[14]=a,t[15]=d,t[16]=u):u=t[16],u}function Pt(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Gi,{children:s.jsx(R.Suspense,{fallback:null,children:s.jsx(Wi,{})})}),t[0]=e):e=t[0],e}function Dt(){const t=$.c(7),e=pe(),{org:n}=oe();let l;t[0]!==e||t[1]!==n.slug?(l=()=>e({to:"/$org/settings",params:{org:n.slug}}),t[0]=e,t[1]=n.slug,t[2]=l):l=t[2];let i,r;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(bt,{}),r=s.jsx("span",{children:"Settings"}),t[3]=i,t[4]=r):(i=t[3],r=t[4]);let o;return t[5]!==l?(o=s.jsxs(te,{tooltip:"Settings",onClick:l,children:[i,r]}),t[5]=l,t[6]=o):o=t[6],o}function Ft(){const t=$.c(4),[e,n]=R.useState(!1);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(X,{children:s.jsx(xn,{trigger:s.jsxs(te,{tooltip:"Invite members",children:[s.jsx(cn,{}),s.jsx("span",{children:"Invite members"})]})})}),t[0]=l):l=t[0];let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(me,{className:"gap-0.5",children:[l,s.jsx(X,{children:s.jsxs(te,{tooltip:"Add connection",onClick:()=>n(!0),children:[s.jsx(sn,{}),s.jsx("span",{children:"Add connection"})]})})]}),t[1]=i):i=t[1];let r;return t[2]!==e?(r=s.jsxs(s.Fragment,{children:[i,s.jsx(gn,{open:e,onOpenChange:n,mode:"browse"})]}),t[2]=e,t[3]=r):r=t[3],r}function qi(){const t=$.c(10),{state:e}=ge();if(e==="collapsed"){let m,c;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Ft,{}),c=s.jsx(Pt,{}),t[0]=m,t[1]=c):(m=t[0],c=t[1]);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(X,{children:s.jsx("div",{className:"flex justify-center",children:s.jsx(mt,{})})}),t[2]=d):d=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(X,{children:s.jsx(Dt,{})}),t[3]=u):u=t[3];let f;return t[4]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs(ot,{className:"px-2 pb-3 gap-1",children:[m,c,s.jsxs(me,{children:[d,u,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[4]=f):f=t[4],f}let l,i;t[5]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ft,{}),i=s.jsx(Pt,{}),t[5]=l,t[6]=i):(l=t[5],i=t[6]);let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(X,{children:s.jsx(mt,{variant:"full"})}),t[7]=r):r=t[7];let o;t[8]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(X,{children:s.jsx(Dt,{})}),t[8]=o):o=t[8];let a;return t[9]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs(ot,{className:"px-2 pb-3 gap-0.5",children:[l,i,s.jsxs(me,{className:"gap-0.5",children:[r,o,s.jsx(X,{children:s.jsx(dt,{})})]})]}),t[9]=a):a=t[9],a}function Ki(){const t=$.c(8),e=pe(),{org:n}=oe(),{setOpenMobile:l}=ge();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(me,{children:s.jsx(X,{children:s.jsx(dt,{})})})}),t[0]=i):i=t[0];let r;t[1]!==e||t[2]!==n.slug||t[3]!==l?(r=()=>{e({to:"/$org/settings",params:{org:n.slug}}),l(!1)},t[1]=e,t[2]=n.slug,t[3]=l,t[4]=r):r=t[4];let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(bt,{className:"size-4"}),t[5]=o):o=t[5];let a;return t[6]!==r?(a=s.jsx(ot,{className:"px-2 pb-3",children:s.jsxs("div",{className:"flex items-center gap-1",children:[i,s.jsx(je,{"aria-label":"Settings",onClick:r,children:o})]})}),t[6]=r,t[7]=a):a=t[7],a}function Et(t){const e=$.c(15),{className:n,wrapperClassName:l,children:i}=t,[r,o]=R.useState(!1);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g=>{g&&o(g.scrollHeight>g.clientHeight+1)},e[0]=a):a=e[0];const m=a;let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=g=>{const j=g.currentTarget;o(j.scrollHeight-j.scrollTop>j.clientHeight+1)},e[1]=c):c=e[1];const d=c;let u;e[2]!==l?(u=D("relative",l),e[2]=l,e[3]=u):u=e[3];let f;e[4]!==i||e[5]!==n?(f=s.jsx("div",{ref:m,onScroll:d,className:n,children:i}),e[4]=i,e[5]=n,e[6]=f):f=e[6];const h=r?"opacity-100":"opacity-0";let x;e[7]!==h?(x=D("pointer-events-none absolute right-0 bottom-0 left-0 h-10 bg-gradient-to-t from-sidebar to-transparent transition-opacity duration-150",h),e[7]=h,e[8]=x):x=e[8];let b;e[9]!==x?(b=s.jsx("div",{"aria-hidden":!0,className:x}),e[9]=x,e[10]=b):b=e[10];let p;return e[11]!==u||e[12]!==f||e[13]!==b?(p=s.jsxs("div",{className:u,children:[f,b]}),e[11]=u,e[12]=f,e[13]=b,e[14]=p):p=e[14],p}function Xi(t){const e=$.c(8),{virtualMcpId:n,size:l,showAutomationBadge:i}=t,r=l===void 0?"sm":l;let o;e[0]!==r||e[1]!==n?(o=n?s.jsx(Vi,{virtualMcpId:n,size:r}):s.jsx(ve,{icon:null,name:"?",size:r}),e[0]=r,e[1]=n,e[2]=o):o=e[2];let a;e[3]!==i?(a=i&&s.jsx("span",{"aria-label":"Automation-triggered",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(os,{size:10,className:"text-white"})}),e[3]=i,e[4]=a):a=e[4];let m;return e[5]!==o||e[6]!==a?(m=s.jsxs("div",{className:"relative shrink-0",children:[o,a]}),e[5]=o,e[6]=a,e[7]=m):m=e[7],m}function Vi(t){const e=$.c(6),{virtualMcpId:n,size:l}=t,i=jt(n);if(!i){let a;return e[0]!==l?(a=s.jsx(ve,{icon:null,name:"?",size:l}),e[0]=l,e[1]=a):a=e[1],a}const r=i.icon??null;let o;return e[2]!==i.title||e[3]!==l||e[4]!==r?(o=s.jsx(ve,{icon:r,name:i.title,size:l}),e[2]=i.title,e[3]=l,e[4]=r,e[5]=o):o=e[5],o}function Lt(t){const e=$.c(36),{open:n,onOpenChange:l}=t,[i,r]=R.useState(""),{org:o}=oe(),{setTaskId:a}=yt(),m=rs();let c,d,u;e[0]!==o.id||e[1]!==i?(u=i.trim(),d=Ps,c=Os.globalSearch(o.id,u),e[0]=o.id,e[1]=i,e[2]=c,e[3]=d,e[4]=u):(c=e[2],d=e[3],u=e[4]);const f=n&&u.length>0;let h;e[5]!==m||e[6]!==u?(h=async()=>await m.call("GLOBAL_SEARCH",{query:u,limit:20}),e[5]=m,e[6]=u,e[7]=h):h=e[7];let x;e[8]!==c||e[9]!==f||e[10]!==h?(x={queryKey:c,enabled:f,queryFn:h,staleTime:1e4},e[8]=c,e[9]=f,e[10]=h,e[11]=x):x=e[11];const{data:b,isFetching:p}=d(x);let g;e[12]!==b?.items?(g=b?.items??[],e[12]=b?.items,e[13]=g):g=e[13];const j=g;let y;e[14]!==l?(y=I=>{I||r(""),l(I)},e[14]=l,e[15]=y):y=e[15];const v=y;let w;e[16]!==v||e[17]!==a?(w=I=>{v(!1),a(I.id,I.virtual_mcp_id??void 0)},e[16]=v,e[17]=a,e[18]=w):w=e[18];const C=w;let N;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(Tn,{className:"sr-only",children:[s.jsx(Mn,{children:"Search"}),s.jsx(On,{children:"Search across your organization's resources."})]}),e[19]=N):N=e[19];let S;e[20]!==i?(S=s.jsx(Ln,{value:i,onValueChange:r,placeholder:"Search..."}),e[20]=i,e[21]=S):S=e[21];let A;e[22]!==C||e[23]!==p||e[24]!==j||e[25]!==u?(A=u?p&&j.length===0?s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Searching…"}):j.length===0?s.jsx(Fn,{children:"No results."}):j.map(I=>I.type==="thread"?s.jsxs(En,{value:`thread:${I.id}:${I.title}`,onSelect:()=>C(I),className:"gap-2.5",children:[s.jsx(Xi,{virtualMcpId:I.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:I.title||"Untitled thread"})}),s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:new Date(I.updated_at).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},`thread:${I.id}`):null):s.jsx("div",{className:"py-6 text-center text-sm text-muted-foreground",children:"Start typing to search."}),e[22]=C,e[23]=p,e[24]=j,e[25]=u,e[26]=A):A=e[26];let k;e[27]!==A?(k=s.jsx(Rn,{children:A}),e[27]=A,e[28]=k):k=e[28];let z;e[29]!==S||e[30]!==k?(z=s.jsxs(Pn,{className:"overflow-hidden p-0",closeButtonClassName:"hidden",children:[N,s.jsxs(Bn,{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:[S,k]})]}),e[29]=S,e[30]=k,e[31]=z):z=e[31];let _;return e[32]!==v||e[33]!==n||e[34]!==z?(_=s.jsx(Dn,{open:n,onOpenChange:v,children:z}),e[32]=v,e[33]=n,e[34]=z,e[35]=_):_=e[35],_}function Yi(t){return t==="ephemeral"||t.startsWith("thread:")}function ps(t){const e=$.c(40),{task:n,isActive:l,onClick:i,onArchive:r,showAutomationBadge:o,showAgentIcon:a,hideStatusIdle:m,indented:c}=t,d=Un(n.status),u=d.icon,f=n.metadata?.kind==="tool_call_run",h=jt(f?void 0:n.virtual_mcp_id);let x;e[0]!==h?(x=bn(h),e[0]=h,e[1]=x):x=e[1];const b=x;Wn(6e4);const p=o||!!n.trigger_id,g=n.id,j="button",y=0;let v;e[2]!==i?(v=H=>{H.target===H.currentTarget&&(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),i())},e[2]=i,e[3]=v):v=e[3];const w=c?"-ml-4 pl-6":"pl-2",C=l?"bg-accent text-accent-foreground":"hover:bg-accent/60";let N;e[4]!==w||e[5]!==C?(N=D("group/row flex items-center gap-2 py-1.5 pr-2 rounded-md cursor-pointer transition-colors",w,"focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",C),e[4]=w,e[5]=C,e[6]=N):N=e[6];let S;e[7]!==f||e[8]!==a||e[9]!==h?.icon||e[10]!==h?.title?(S=a&&!f&&s.jsx(ve,{icon:h?.icon??null,name:h?.title??"?",size:"2xs"}),e[7]=f,e[8]=a,e[9]=h?.icon,e[10]=h?.title,e[11]=S):S=e[11];let A;e[12]!==p?(A=p&&s.jsx(os,{size:12,"aria-label":"Automation-triggered",className:"shrink-0 text-blue-500"}),e[12]=p,e[13]=A):A=e[13];const k=n.title||"Untitled task";let z;e[14]!==k?(z=s.jsx("div",{className:"text-sm text-foreground truncate",children:k}),e[14]=k,e[15]=z):z=e[15];let _;e[16]!==A||e[17]!==z?(_=s.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[A,z]}),e[16]=A,e[17]=z,e[18]=_):_=e[18];let I;e[19]!==b||e[20]!==l||e[21]!==n.branch||e[22]!==n.updated_at?(I=n.updated_at&&s.jsxs("div",{className:D("flex items-center gap-1 text-[11px] min-w-0",l?"text-accent-foreground/70":"text-muted-foreground/60"),children:[n.branch&&!Yi(n.branch)?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"truncate font-mono",children:n.branch}),s.jsx("span",{className:"shrink-0",children:"·"})]}):b?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"truncate",children:[b.owner,"/",b.name]}),s.jsx("span",{className:"shrink-0",children:"·"})]}):null,s.jsx("span",{className:"shrink-0",children:Kn(new Date(n.updated_at))})]}),e[19]=b,e[20]=l,e[21]=n.branch,e[22]=n.updated_at,e[23]=I):I=e[23];let O;e[24]!==_||e[25]!==I?(O=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,I]}),e[24]=_,e[25]=I,e[26]=O):O=e[26];const F="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",E=!m&&s.jsx("span",{className:D("[grid-area:slot] flex size-7 items-center justify-center pointer-events-none transition-opacity",r&&"group-hover/row:opacity-0"),"aria-label":d.label,children:s.jsx(u,{size:14,className:D(d.iconClassName,n.status==="in_progress"&&"animate-spin")})});let P;e[27]!==r?(P=r&&s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":"Archive task",onClick:H=>{H.stopPropagation(),r()},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-7 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(Ds,{size:14})})}),s.jsx(fe,{side:"right",children:"Archive"})]}),e[27]=r,e[28]=P):P=e[28];let L;e[29]!==E||e[30]!==P?(L=s.jsxs("div",{className:F,children:[E,P]}),e[29]=E,e[30]=P,e[31]=L):L=e[31];let M;return e[32]!==i||e[33]!==O||e[34]!==L||e[35]!==v||e[36]!==N||e[37]!==S||e[38]!==n.id?(M=s.jsxs("div",{"data-task-id":g,role:j,tabIndex:y,onClick:i,onKeyDown:v,className:N,children:[S,O,L]}),e[32]=i,e[33]=O,e[34]=L,e[35]=v,e[36]=N,e[37]=S,e[38]=n.id,e[39]=M):M=e[39],M}const Rt=["requires_action","in_progress","failed","expired","completed"];function Qi(t){const e=new Map(Rt.map(n=>[n,[]]));for(const n of t){const l=n.status??"completed";(e.get(l)??e.get("completed")).push(n)}return Rt.map(n=>({status:n,threads:e.get(n)}))}const Ji="sidebar.group.expanded.";function Zi(t,e){const n=$.c(3),[l,i]=Ye(`${Ji}${t}`,e);let r;return n[0]!==l||n[1]!==i?(r=[l,i],n[0]=l,n[1]=i,n[2]=r):r=n[2],r}function gs(t){const e=$.c(12),{onClick:n,isFetching:l,indented:i}=t,r=i?"-ml-4 pl-6 pr-2":"px-2";let o;e[0]!==r?(o=D("flex items-center gap-2 py-1.5 rounded-md text-sm text-muted-foreground",r,"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[0]=r,e[1]=o):o=e[1];let a;e[2]!==l?(a=l&&s.jsx(Vt,{size:14,className:"animate-spin"}),e[2]=l,e[3]=a):a=e[3];const m=l?"Loading…":"Show more";let c;e[4]!==m?(c=s.jsx("span",{children:m}),e[4]=m,e[5]=c):c=e[5];let d;return e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==a||e[10]!==c?(d=s.jsxs("button",{type:"button","aria-label":"Show more tasks",onClick:n,disabled:l,className:o,children:[a,c]}),e[6]=l,e[7]=n,e[8]=o,e[9]=a,e[10]=c,e[11]=d):d=e[11],d}function el(t,e,n,l){return[t,e,n,l.type,l.member,l.currentUserId??""].join("|")}function tl(t){return t.member==="mine"&&!t.currentUserId}const bs=4;let qe=0;const ut=[];function sl(){for(;qe<bs&&ut.length>0;){const t=ut.shift();t&&t()}}function js(t){return new Promise((e,n)=>{const l=()=>{qe++,t().then(e,n).finally(()=>{qe--,sl()})};qe<bs?l():ut.push(l)})}const Ze=10;function Bt(t,e,n,l,i){const r={hidden:!1};l.member==="mine"&&l.currentUserId&&(r.created_by=l.currentUserId),l.type==="automation"&&(r.has_trigger=!0),l.type==="manual"&&(r.has_trigger=!1);const o={where:r,limit:i,offset:n,orderBy:[{field:["updated_at"],direction:"desc"}]};return o.status=e,o}function nl(t,e,n,l){let i=0;for(const r of t)vs(r,e,n,l)&&i++;return i}function nt(t,e,n,l){return nl(t,e,n,l)}function il(t,e){return!!(t>=Ze||t===0&&e)}function Ht(t,e){return t<e}function ll(t,e){return e===!1?!1:e===!0?!0:t}function vs(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 Ve=new Map,We=new Map;function rl(t,e){return e?t>=Ze?!0:null:!1}function Gt(t){return Ve.get(t)}function ol(t,e){Ve.set(t,e)}function al(t,e,n){const l=Ve.get(t);if(l!==void 0){n(l);return}let i=We.get(t);i||(i=js(e).then(r=>(Ve.set(t,r),We.delete(t),r)).catch(()=>(We.delete(t),Promise.reject(new Error("group probe failed")))),We.set(t,i)),i.then(n,()=>n(!1))}function Ut(t){const e=t,n=Array.isArray(e.items)?e.items:[];return{items:n,hasMore:e.hasMore??n.length===Ze,totalCount:typeof e.totalCount=="number"?e.totalCount:void 0}}function cl(t,e,n,l,i){let r=0;for(const o of t)e.has(o.id)||vs(o,n,l,i)&&r++;return r}function dl(t,e,n,l){const i=$.c(8),{org:r}=oe(),o=el(r.id,t,e,n);let a;i[0]!==n?(a=tl(n),i[0]=n,i[1]=a):a=i[1];const m=a,[c,d]=R.useState({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});c.identity!==o&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:null,serverHasMore:null});const u=In(),{threads:f,hasMore:h}=vt(),x=nt(f,t,e,n),b=il(x,h),p=rl(x,h),g=rs();if(c.identity===o&&c.serverHasMore===null){const N=p??Gt(o);N!==void 0&&d({isFetching:!1,isProbing:!1,identity:o,probeSubscribedIdentity:c.probeSubscribedIdentity,serverHasMore:N})}!m&&c.identity===o&&c.serverHasMore===null&&p===null&&Gt(o)===void 0&&c.probeSubscribedIdentity!==o&&(d(N=>N.identity===o?{...N,isProbing:!0,probeSubscribedIdentity:o}:N),al(o,async()=>{const N=Bt(t,e,0,n,1),S=await g.call("COLLECTION_THREADS_LIST",N),{totalCount:A}=Ut(S),k=nt(u.threads.get(),t,e,n);return A===void 0?!1:Ht(k,A)},N=>{d(S=>S.identity!==o?S:{...S,isProbing:!1,serverHasMore:N})}));const y=async function(){if(c.isFetching||c.isProbing||m)return;const S=o;d(A=>A.identity===S?{...A,isFetching:!0}:A);try{const A=nt(f,t,e,n),k=Bt(t,e,A,n,Ze),z=await js(()=>g.call("COLLECTION_THREADS_LIST",k)),{items:_,hasMore:I,totalCount:O}=Ut(z),F=new Set(f.map(ml)),E=cl(_,F,t,e,n),P=A;u.mergeThreads(_),d(L=>{if(L.identity!==S)return L;let M;return O!==void 0?M=Ht(P+E,O):M=_.length===0||E===0?!1:I,ol(S,M),{...L,isFetching:!1,serverHasMore:M}})}catch(A){const k=A,z=k instanceof Error?k.message:String(k);ie.error(`Could not load more tasks: ${z}`),d(_=>_.identity===S?{..._,isFetching:!1}:_)}},v=c.isFetching||c.isProbing,w=!m&&!v&&ll(b,c.serverHasMore);let C;return i[2]!==v||i[3]!==y||i[4]!==w||i[5]!==c.isProbing||i[6]!==c.serverHasMore?(C={hasMore:w,isFetching:v,isProbing:c.isProbing,serverHasMore:c.serverHasMore,loadMore:y},i[2]=v,i[3]=y,i[4]=w,i[5]=c.isProbing,i[6]=c.serverHasMore,i[7]=C):C=i[7],C}function ml(t){return t.id}function ul(t){const e=$.c(20),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,{isFetching:c,isProbing:d,loadMore:u,hasMore:f,serverHasMore:h}=dl("status",n,m),[x,b]=R.useState(!1);!x&&l.length===0&&h===!0&&!c&&!d&&(b(!0),queueMicrotask(()=>{u()}));let p;if(e[0]!==i||e[1]!==a||e[2]!==m||e[3]!==o||e[4]!==r||e[5]!==l){let y;e[7]!==i||e[8]!==a||e[9]!==m||e[10]!==o||e[11]!==r?(y=v=>s.jsx(ps,{task:v,isActive:i===v.id,onClick:()=>r(v),onArchive:a&&v.created_by===m.currentUserId?()=>o(v):void 0,showAutomationBadge:!!v.trigger_id,showAgentIcon:!0,hideStatusIdle:!0,indented:!0},v.id),e[7]=i,e[8]=a,e[9]=m,e[10]=o,e[11]=r,e[12]=y):y=e[12],p=l.map(y),e[0]=i,e[1]=a,e[2]=m,e[3]=o,e[4]=r,e[5]=l,e[6]=p}else p=e[6];let g;e[13]!==f||e[14]!==c||e[15]!==u?(g=(f||c)&&s.jsx(gs,{onClick:()=>{u()},isFetching:c,indented:!0}),e[13]=f,e[14]=c,e[15]=u,e[16]=g):g=e[16];let j;return e[17]!==p||e[18]!==g?(j=s.jsxs(s.Fragment,{children:[p,g]}),e[17]=p,e[18]=g,e[19]=j):j=e[19],j}function fl(t){const e=$.c(36),{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m}=t,c=qn[n],d=c.icon,[u,f]=Zi(`status-${n}`,!1);let h;e[0]!==u||e[1]!==f?(h=function(){f(!u)},e[0]=u,e[1]=f,e[2]=h):h=e[2];const x=h;let b;e[3]!==x?(b=S=>{S.target===S.currentTarget&&(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),x())},e[3]=x,e[4]=b):b=e[4];let p;e[5]!==d||e[6]!==c.iconClassName?(p=s.jsx("span",{className:"absolute inset-0 flex items-center justify-center transition-opacity group-hover/group:opacity-0",children:s.jsx(d,{size:12,className:c.iconClassName})}),e[5]=d,e[6]=c.iconClassName,e[7]=p):p=e[7];let g;e[8]!==u?(g=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(St,{size:14}):s.jsx(Xn,{size:14})}),e[8]=u,e[9]=g):g=e[9];let j;e[10]!==p||e[11]!==g?(j=s.jsxs("div",{className:"relative size-5 shrink-0 flex items-center justify-center",children:[p,g]}),e[10]=p,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c.label?(y=s.jsx("span",{className:"flex-1 truncate",children:c.label}),e[13]=c.label,e[14]=y):y=e[14];let v;e[15]!==l.length?(v=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]=v):v=e[16];let w;e[17]!==u||e[18]!==x||e[19]!==b||e[20]!==j||e[21]!==y||e[22]!==v?(w=s.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":u,onClick:x,onKeyDown:b,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,y,v]}),e[17]=u,e[18]=x,e[19]=b,e[20]=j,e[21]=y,e[22]=v,e[23]=w):w=e[23];let C;e[24]!==i||e[25]!==a||e[26]!==u||e[27]!==m||e[28]!==o||e[29]!==r||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(ul,{status:n,threads:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:a,filters:m})}),e[24]=i,e[25]=a,e[26]=u,e[27]=m,e[28]=o,e[29]=r,e[30]=n,e[31]=l,e[32]=C):C=e[32];let N;return e[33]!==w||e[34]!==C?(N=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[w,C]}),e[33]=w,e[34]=C,e[35]=N):N=e[35],N}function Wt(t){const e=$.c(38),{threads:n,groupBy:l,activeTaskId:i,onSelectTask:r,onArchiveTask:o,filters:a,hasMore:m,isFetchingMore:c,onLoadMore:d,filtersActive:u}=t;if(n.length===0&&!m&&!c){let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Gn,{className:"size-6 opacity-60"}),e[0]=p):p=e[0];const g=u?"No threads match your filters":"No threads yet";let j;return e[1]!==g?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 px-4 py-12 text-center text-muted-foreground",children:[p,s.jsx("p",{className:"text-sm",children:g})]}),e[1]=g,e[2]=j):j=e[2],j}const f=n.length>1||m;if(l==="status"){let p;if(e[3]!==i||e[4]!==f||e[5]!==a||e[6]!==o||e[7]!==r||e[8]!==n){let j;e[10]!==i||e[11]!==f||e[12]!==a||e[13]!==o||e[14]!==r?(j=y=>s.jsx(fl,{status:y.status,threads:y.threads,activeTaskId:i,onSelectTask:r,onArchiveTask:o,canArchive:f,filters:a},y.status),e[10]=i,e[11]=f,e[12]=a,e[13]=o,e[14]=r,e[15]=j):j=e[15],p=Qi(n).map(j),e[3]=i,e[4]=f,e[5]=a,e[6]=o,e[7]=r,e[8]=n,e[9]=p}else p=e[9];let g;return e[16]!==p?(g=s.jsx(s.Fragment,{children:p}),e[16]=p,e[17]=g):g=e[17],g}let h;if(e[18]!==i||e[19]!==f||e[20]!==a||e[21]!==o||e[22]!==r||e[23]!==n){let p;e[25]!==i||e[26]!==f||e[27]!==a||e[28]!==o||e[29]!==r?(p=g=>s.jsx(ps,{task:g,isActive:i===g.id,onClick:()=>r(g),onArchive:f&&g.created_by===a.currentUserId?()=>o(g):void 0,showAutomationBadge:!!g.trigger_id,showAgentIcon:!0},g.id),e[25]=i,e[26]=f,e[27]=a,e[28]=o,e[29]=r,e[30]=p):p=e[30],h=n.map(p),e[18]=i,e[19]=f,e[20]=a,e[21]=o,e[22]=r,e[23]=n,e[24]=h}else h=e[24];let x;e[31]!==m||e[32]!==c||e[33]!==d?(x=(m||c)&&s.jsx(gs,{onClick:d,isFetching:c}),e[31]=m,e[32]=c,e[33]=d,e[34]=x):x=e[34];let b;return e[35]!==h||e[36]!==x?(b=s.jsxs(s.Fragment,{children:[h,x]}),e[35]=h,e[36]=x,e[37]=b):b=e[37],b}function hl(t,e,n){if(!n)return;const l=t.findIndex(i=>i.id===e);if(l!==-1){for(let i=l+1;i<t.length;i++){const r=t[i];if(r?.created_by===n)return r}for(let i=l-1;i>=0;i--){const r=t[i];if(r?.created_by===n)return r}}}function qt(t){const e=$.c(17),{label:n,onClick:l,active:i,children:r}=t,[o,a]=R.useState(!1);let m,c,d,u;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>a(!0),c=()=>a(!1),d=()=>a(!0),u=()=>a(!1),e[0]=m,e[1]=c,e[2]=d,e[3]=u):(m=e[0],c=e[1],d=e[2],u=e[3]);const f=i&&"bg-sidebar-accent text-foreground";let h;e[4]!==f?(h=D(f),e[4]=f,e[5]=h):h=e[5];let x;e[6]!==r||e[7]!==n||e[8]!==l||e[9]!==h?(x=s.jsx(ue,{asChild:!0,children:s.jsx(je,{"aria-label":n,onClick:l,onPointerEnter:m,onPointerLeave:c,onFocus:d,onBlur:u,className:h,children:r})}),e[6]=r,e[7]=n,e[8]=l,e[9]=h,e[10]=x):x=e[10];let b;e[11]!==n?(b=s.jsx(fe,{side:"bottom",children:n}),e[11]=n,e[12]=b):b=e[12];let p;return e[13]!==o||e[14]!==x||e[15]!==b?(p=s.jsxs(he,{open:o,children:[x,b]}),e[13]=o,e[14]=x,e[15]=b,e[16]=p):p=e[16],p}function it(t){const e=$.c(13),{label:n,value:l,onChange:i,options:r}=t;let o;e[0]!==n?(o=s.jsx("span",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=o):o=e[1];let a;e[2]!==i?(a=u=>u&&i(u),e[2]=i,e[3]=a):a=e[3];let m;e[4]!==r?(m=r.map(xl),e[4]=r,e[5]=m):m=e[5];let c;e[6]!==a||e[7]!==m||e[8]!==l?(c=s.jsx(_n,{type:"single",size:"sm",value:l,onValueChange:a,className:"gap-0.5 rounded-lg border border-border bg-muted/50 p-0.5",children:m}),e[6]=a,e[7]=m,e[8]=l,e[9]=c):c=e[9];let d;return e[10]!==o||e[11]!==c?(d=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o,c]}),e[10]=o,e[11]=c,e[12]=d):d=e[12],d}function xl(t){return s.jsxs(Nn,{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 ys({onNavigate:t}={}){const{data:e}=re.useSession(),n=e?.user?.id,{org:l}=oe(),i=Cn({connectionId:wn,orgId:l.id,orgSlug:l.slug}),r=Xe(l.id).id,o=is(),{threads:a,hasMore:m,isFetchingMore:c,fetchNextPage:d}=vt(),u=a.filter(T=>!T.hidden),{hide:f}=ls(),h=pe(),{setTaskId:x,createNewTask:b}=yt(),p=ft({strict:!1}),g=ht({strict:!1}),j=p.taskId??null,y=g.virtualmcpid??a.find(T=>T.id===j)?.virtual_mcp_id??null,v=()=>{t?.()},w=[...u].sort((T,G)=>(G.updated_at??"").localeCompare(T.updated_at??"")),[C,N]=R.useState("all"),[S,A]=R.useState("flat"),[k,z]=Ye("sidebar-threads-scope-all",!1),[_,I]=R.useState(!1),[O,F]=R.useState(!1),E={type:C,member:"mine",currentUserId:n??null},P=T=>n?T.filter(G=>G.created_by===n):[],L=T=>C==="automation"?T.filter(G=>!!G.trigger_id):C==="manual"?T.filter(G=>!G.trigger_id):T,M=P(w),H=L(M),q=L(w),U=k?q:H,W=T=>{if(n&&T.created_by&&T.created_by!==n)return;const G=T.id===j;if(f(T.id),!G)return;const Y=hl(U,T.id,n);v(),Y?x(Y.id,Y.virtual_mcp_id):h({to:"/$org",params:{org:l.slug}})},Q=T=>{v(),x(T.id,T.virtual_mcp_id)},B=async T=>{try{const G=await i.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:T,limit:1,offset:0}});return((G.structuredContent??G).items?.length??0)===0}catch{return!1}},ae=async()=>{const T=y??r;de("sidebar_new_thread_clicked",{virtual_mcp_id:T});const G=M.find(Y=>Y.virtual_mcp_id===T&&Y.title==="New chat");if(G&&await B(G.id)){v(),x(G.id,T);return}v(),b(T)},{state:ye,isMobile:V,toggleSidebar:J}=ge();if(ye==="collapsed"&&!V){const T=Xe(l.id),G=new Map((o??[]).map(K=>[K.id,K])),Y=K=>(K?G.get(K):void 0)??(K===r?T:void 0);return s.jsxs(me,{className:"min-h-0 gap-1.5 overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[s.jsx(X,{children:s.jsx(te,{"aria-label":"Toggle sidebar",tooltip:"Toggle sidebar",onClick:J,children:s.jsx(Zt,{size:16})})}),s.jsx(X,{children:s.jsx(te,{tooltip:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})}),U.map(K=>{const be=Y(K.virtual_mcp_id);return s.jsx(X,{children:s.jsx(te,{tooltip:K.title||"New chat",isActive:K.id===j,onClick:()=>Q(K),children:s.jsx(ve,{icon:be?.icon??null,name:be?.title??"Agent",size:"2xs"})})},K.id)})]})}const Z=S!=="flat"||C!=="all"||k===!0,ne=s.jsxs(Qe,{children:[s.jsxs(he,{children:[s.jsx(ue,{asChild:!0,children:s.jsx(Ee,{asChild:!0,children:s.jsxs(je,{"aria-label":"Filter threads",active:Z,children:[s.jsx(Sn,{size:16}),Z&&s.jsx("span",{className:"absolute right-1 top-1 size-1.5 rounded-full bg-primary ring-2 ring-sidebar"})]})})}),s.jsx(fe,{side:"bottom",children:"Filter threads"})]}),s.jsxs(Je,{align:"start",className:"w-64 flex flex-col gap-3 p-3",children:[s.jsx(it,{label:"View",value:S,onChange:T=>{de("tasks_panel_group_by_changed",{to_value:T}),A(T)},options:[{value:"flat",label:"List",icon:s.jsx(mn,{size:13})},{value:"status",label:"Status",icon:s.jsx(un,{size:13})}]}),s.jsx(it,{label:"Type",value:C,onChange:T=>{de("tasks_panel_filter_changed",{to_value:T}),N(T)},options:[{value:"all",label:"All"},{value:"manual",label:"Chats"},{value:"automation",label:"Auto"}]}),s.jsx(it,{label:"Scope",value:k?"team":"mine",onChange:T=>z(T==="team"),options:[{value:"mine",label:"Mine"},{value:"team",label:"Team"}]})]})]}),se=T=>s.jsx(at,{delayDuration:300,children:s.jsxs("div",{className:D("shrink-0 px-1 flex items-center justify-between",T?"h-10":"h-10 md:h-7 mb-2"),children:[s.jsxs("div",{className:"flex items-center gap-0.5",children:[!T&&s.jsx(as,{}),ne]}),s.jsxs("div",{className:"flex items-center gap-0.5",children:[s.jsx(qt,{label:"Search threads",onClick:()=>{de("tasks_panel_search_opened"),F(!0),I(!0)},children:s.jsx(dn,{size:16})}),s.jsx(qt,{label:"New thread",onClick:()=>{ae()},children:s.jsx(It,{size:16})})]})]})});return V?s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!0),s.jsx(Et,{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(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]}):s.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[se(!1),s.jsx("div",{className:"flex-1 min-h-0 flex flex-col gap-0.5 -mr-2 pr-2",children:s.jsx(Et,{wrapperClassName:"flex-1 min-h-0",className:"flex flex-col gap-0.5 overflow-y-auto overscroll-contain h-full",children:s.jsx(Wt,{threads:U,groupBy:S,activeTaskId:j,onSelectTask:Q,onArchiveTask:W,filters:E,hasMore:m,isFetchingMore:c,onLoadMore:()=>{d()},filtersActive:Z})})}),O&&s.jsx(Lt,{open:_,onOpenChange:I})]})}const pl=5,gl=[{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 Ss(){const t=$.c(3),{state:e}=ge();if(e==="collapsed"){let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("div",{className:"flex flex-col gap-1.5",children:Array.from({length:pl}).map(vl)}),t[0]=i):i=t[0],i}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:gl.map(bl)})]}),t[2]=l):l=t[2],l}function bl(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:D("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(jl)})]},e)}function jl(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 vl(t,e){return s.jsx(le,{className:"size-10 rounded-lg mx-auto"},e)}function yl(){const t=$.c(4),e=us();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(qi,{}),t[0]=n):n=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:s.jsx(Ss,{}),children:s.jsx(ys,{})})}),t[1]=l):l=t[1];let i;return t[2]!==e?(i=s.jsx(cs,{children:s.jsx(xs,{sections:e,footer:n,additionalContent:l})}),t[2]=e,t[3]=i):i=t[3],i}function Sl(t){const e=$.c(8),{onClose:n}=t,l=us();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ki,{}),e[0]=i):i=e[0];let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ss,{}),e[1]=r):r=e[1];let o;e[2]!==n?(o=s.jsx(Yt,{children:s.jsx(R.Suspense,{fallback:r,children:s.jsx(ys,{onNavigate:n})})}),e[2]=n,e[3]=o):o=e[3];let a;return e[4]!==n||e[5]!==l||e[6]!==o?(a=s.jsx(cs,{children:s.jsx(Pi,{sections:l,onClose:n,footer:i,additionalContent:o})}),e[4]=n,e[5]=l,e[6]=o,e[7]=a):a=e[7],a}function Ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Nl=Fs({name:Es().min(2,"Organization name is required")});function _l(t){const e=$.c(41),{open:n,onOpenChange:l}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={resolver:Ls(Nl),defaultValues:{name:""}},e[0]=i):i=e[0];const r=Rs(i);let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o={mutationFn:wl,onSuccess:Cl},e[1]=o):o=e[1];const a=Bs(o),m=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(ri,{children:[s.jsx(oi,{children:"Create a new organization"}),s.jsx(ai,{children:"Set up a new organization to collaborate with others."})]}),e[2]=c):c=e[2];let d;if(e[3]!==a||e[4]!==r){let N;e[6]!==a?(N=S=>a.mutateAsync(S),e[6]=a,e[7]=N):N=e[7],d=r.handleSubmit(N),e[3]=a,e[4]=r,e[5]=d}else d=e[5];let u;e[8]!==r.formState.isSubmitting?(u=N=>{const{field:S}=N;return s.jsxs(fi,{children:[s.jsx(hi,{children:"Organization Name"}),s.jsx(xi,{children:s.jsx(bi,{...S,placeholder:"Acme Inc.",disabled:r.formState.isSubmitting})}),s.jsx(pi,{children:"The name of your company or organization"}),S.value&&s.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",s.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",Ns(S.value)]})]}),s.jsx(gi,{})]})},e[8]=r.formState.isSubmitting,e[9]=u):u=e[9];let f;e[10]!==r.control||e[11]!==u?(f=s.jsx(mi,{control:r.control,name:"name",render:u}),e[10]=r.control,e[11]=u,e[12]=f):f=e[12];let h;e[13]!==m?(h=m&&s.jsx("div",{className:"text-destructive text-sm mt-2",children:m}),e[13]=m,e[14]=h):h=e[14];let x;e[15]!==a||e[16]!==r?(x=()=>{a.reset(),r.reset()},e[15]=a,e[16]=r,e[17]=x):x=e[17];let b;e[18]!==r.formState.isSubmitting||e[19]!==x?(b=s.jsx(ii,{disabled:r.formState.isSubmitting,onClick:x,children:"Cancel"}),e[18]=r.formState.isSubmitting,e[19]=x,e[20]=b):b=e[20];const p=!r.formState.isValid||r.formState.isSubmitting;let g;e[21]!==r.formState.isSubmitting?(g=r.formState.isSubmitting?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(Zn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=r.formState.isSubmitting,e[22]=g):g=e[22];let j;e[23]!==p||e[24]!==g?(j=s.jsx(rt,{type:"submit",variant:"default",disabled:p,children:g}),e[23]=p,e[24]=g,e[25]=j):j=e[25];let y;e[26]!==j||e[27]!==b?(y=s.jsxs(ci,{children:[b,j]}),e[26]=j,e[27]=b,e[28]=y):y=e[28];let v;e[29]!==y||e[30]!==d||e[31]!==f||e[32]!==h?(v=s.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,h,y]}),e[29]=y,e[30]=d,e[31]=f,e[32]=h,e[33]=v):v=e[33];let w;e[34]!==r||e[35]!==v?(w=s.jsxs(li,{children:[c,s.jsx(ui,{...r,children:v})]}),e[34]=r,e[35]=v,e[36]=w):w=e[36];let C;return e[37]!==l||e[38]!==n||e[39]!==w?(C=s.jsx(di,{open:n,onOpenChange:l,children:w}),e[37]=l,e[38]=n,e[39]=w,e[40]=C):C=e[40],C}function Cl(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function wl(t){const e=Ns(t.name);if(!e)throw new Error("Organization slug is invalid");const n=await re.organization.create({name:t.name,slug:e});if(n?.error)throw new Error(n.error.message||"Failed to create organization");const l=n?.data?.slug??e;if(!l)throw new Error("Failed to create organization");return{orgSlug:l}}function _s(){const t=R.useContext(Hs),{data:e,refetch:n}=t.hooks.useListUserInvitations();return{invitations:(e??[]).filter(i=>i.status==="pending"&&new Date(i.expiresAt)>new Date),refetch:()=>n?.()}}function kl(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 _t(t){const e=$.c(13),{org:n,size:l}=t,i=l===void 0?"sm":l,r=i==="xs"?"size-5":"size-6",o=i==="xs"?"text-[9px]":"text-xs";let a;e[0]!==r?(a=D(r,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=r,e[1]=a):a=e[1];let m;e[2]!==n.logo||e[3]!==n.name?(m=n.logo?void 0:kl(n.name),e[2]=n.logo,e[3]=n.name,e[4]=m):m=e[4];let c;e[5]!==n.logo||e[6]!==n.name||e[7]!==o?(c=n.logo?s.jsx("img",{src:n.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:D("font-semibold leading-none",o),children:n.name.slice(0,2).toUpperCase()}),e[5]=n.logo,e[6]=n.name,e[7]=o,e[8]=c):c=e[8];let d;return e[9]!==a||e[10]!==m||e[11]!==c?(d=s.jsx("div",{className:a,style:m,children:c}),e[9]=a,e[10]=m,e[11]=c,e[12]=d):d=e[12],d}function Al({invitation:t,onChanged:e}){const[n,l]=R.useState(!1),i=t.organizationName??"Unknown organization",r=async()=>{l(!0);try{const m=await re.organization.acceptInvitation({invitationId:t.id});if(m.error){ie.error(m.error.message),l(!1);return}}catch{ie.error("Failed to accept invitation"),l(!1);return}ie.success(`Joined ${i}`),Us();let a;try{a=(await re.organization.getFullOrganization({query:{organizationId:t.organizationId}}))?.data?.slug}catch{}window.location.href=a?`/${a}`:"/"},o=async()=>{l(!0);try{const a=await re.organization.rejectInvitation({invitationId:t.id});if(a.error){ie.error(a.error.message),l(!1);return}ie.success("Invitation declined"),l(!1),e()}catch{ie.error("Failed to decline invitation"),l(!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(_t,{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:"Invited to join"})]}),s.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[s.jsx(rt,{size:"sm",variant:"default",className:"h-7 text-xs",onClick:r,disabled:n,children:"Accept"}),s.jsx(rt,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground",onClick:o,disabled:n,"aria-label":`Decline invitation to ${i}`,children:s.jsx(ni,{size:14})})]})]})}function Il(t){const e=$.c(29),{orgParam:n,onSelectOrg:l,onCreateOrg:i}=t,{data:r}=Gs(),{invitations:o,refetch:a}=_s();let m;e[0]!==n?(m=(_,I)=>_.slug===n?-1:I.slug===n?1:_.name.localeCompare(I.name),e[0]=n,e[1]=m):m=e[1];const c=[...r??[]].sort(m),[d,u]=R.useState(""),f=d.toLowerCase(),h=f?c.filter(_=>_.name.toLowerCase().includes(f)||_.slug.toLowerCase().includes(f)):c;let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ms,{size:16,className:"shrink-0 text-muted-foreground/60"}),e[2]=x):x=e[2];let b;e[3]===Symbol.for("react.memo_cache_sentinel")?(b=_=>u(_.target.value),e[3]=b):b=e[3];let p;e[4]!==d?(p=_=>_.key==="Escape"&&d&&u(""),e[4]=d,e[5]=p):p=e[5];let g;e[6]!==d||e[7]!==p?(g=s.jsx("input",{"data-org-switcher-search":!0,autoFocus:!0,type:"text",value:d,onChange:b,onKeyDown:p,placeholder:"Search organizations...",className:"flex-1 min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground/60"}),e[6]=d,e[7]=p,e[8]=g):g=e[8];let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Le,{size:16}),e[9]=j):j=e[9];let y;e[10]!==i?(y=s.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:j}),e[10]=i,e[11]=y):y=e[11];let v;e[12]!==g||e[13]!==y?(v=s.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 border-b border-border/50",children:[x,g,y]}),e[12]=g,e[13]=y,e[14]=v):v=e[14];const w="flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1";let C;e[15]!==o||e[16]!==d||e[17]!==a?(C=!d&&o.map(_=>s.jsx(Al,{invitation:_,onChanged:a},_.id)),e[15]=o,e[16]=d,e[17]=a,e[18]=C):C=e[18];const N=h.length===0&&s.jsx("p",{className:"px-3 py-4 text-sm text-muted-foreground/60 text-center",children:d?`No organizations match "${d}"`:"No organizations available"});let S;e[19]!==l||e[20]!==n?(S=_=>s.jsxs("button",{type:"button",onClick:()=>l(_.slug),className:D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",_.slug===n?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[s.jsx(_t,{org:_,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:_.name}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:_.slug})]}),_.slug===n&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},_.id),e[19]=l,e[20]=n,e[21]=S):S=e[21];const A=h.map(S);let k;e[22]!==C||e[23]!==N||e[24]!==A?(k=s.jsxs("div",{className:w,children:[C,N,A]}),e[22]=C,e[23]=N,e[24]=A,e[25]=k):k=e[25];let z;return e[26]!==k||e[27]!==v?(z=s.jsxs(s.Fragment,{children:[v,k]}),e[26]=k,e[27]=v,e[28]=z):z=e[28],z}function zl(t){const e=$.c(22),{trigger:n,orgParam:l,align:i,side:r}=t,o=i===void 0?"start":i,a=r===void 0?"bottom":r,m=pe(),[c,d]=R.useState(!1),[u,f]=R.useState(!1);let h;e[0]!==n?(h=s.jsx(Ee,{asChild:!0,children:n}),e[0]=n,e[1]=h):h=e[1];const x=String(c);let b;e[2]!==m?(b=C=>{d(!1),m({to:"/$org",params:{org:C}})},e[2]=m,e[3]=b):b=e[3];let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=()=>{d(!1),f(!0)},e[4]=p):p=e[4];let g;e[5]!==l||e[6]!==x||e[7]!==b?(g=s.jsx(Il,{orgParam:l,onSelectOrg:b,onCreateOrg:p},x),e[5]=l,e[6]=x,e[7]=b,e[8]=g):g=e[8];let j;e[9]!==o||e[10]!==a||e[11]!==g?(j=s.jsx(Je,{side:a,align:o,sideOffset:8,collisionPadding:16,className:"w-[300px] p-0 flex flex-col max-h-[440px]",onOpenAutoFocus:Tl,onCloseAutoFocus:$l,children:g}),e[9]=o,e[10]=a,e[11]=g,e[12]=j):j=e[12];let y;e[13]!==c||e[14]!==h||e[15]!==j?(y=s.jsxs(Qe,{open:c,onOpenChange:d,children:[h,j]}),e[13]=c,e[14]=h,e[15]=j,e[16]=y):y=e[16];let v;e[17]!==u?(v=s.jsx(_l,{open:u,onOpenChange:f}),e[17]=u,e[18]=v):v=e[18];let w;return e[19]!==v||e[20]!==y?(w=s.jsxs(s.Fragment,{children:[y,v]}),e[19]=v,e[20]=y,e[21]=w):w=e[21],w}function $l(t){return t.preventDefault()}function Tl(t){t.preventDefault(),t.currentTarget?.querySelector("[data-org-switcher-search]")?.focus()}function Ml(t){const e=$.c(21),{value:n,onChange:l,placeholder:i,onKeyDown:r,className:o,isSearching:a,disabled:m}=t,c=i===void 0?"Search...":i;let d;e[0]!==o?(d=D("shrink-0 w-full border-b border-border h-12",o),e[0]=o,e[1]=d):d=e[1];const u=m?"cursor-not-allowed opacity-50":"cursor-text";let f;e[2]!==u?(f=D("flex items-center gap-2.5 h-12 px-4",u),e[2]=u,e[3]=f):f=e[3];let h;e[4]!==a?(h=a?s.jsx(Vt,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):s.jsx(ms,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=a,e[5]=h):h=e[5];let x;e[6]!==l?(x=j=>l(j.target.value),e[6]=l,e[7]=x):x=e[7];let b;e[8]!==m||e[9]!==r||e[10]!==c||e[11]!==x||e[12]!==n?(b=s.jsx("input",{type:"text",value:n,onChange:x,onKeyDown:r,placeholder:c,disabled:m,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=m,e[9]=r,e[10]=c,e[11]=x,e[12]=n,e[13]=b):b=e[13];let p;e[14]!==f||e[15]!==h||e[16]!==b?(p=s.jsxs("label",{className:f,children:[h,b]}),e[14]=f,e[15]=h,e[16]=b,e[17]=p):p=e[17];let g;return e[18]!==d||e[19]!==p?(g=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=g):g=e[20],g}const Ol="Select an existing agent";function Pl(t){const e=$.c(5),{children:n}=t;let l;e[0]!==n?(l=s.jsx(ue,{asChild:!0,children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(fe,{side:"right",sideOffset:8,children:Ol}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=s.jsxs(he,{defaultOpen:!0,delayDuration:0,children:[l,i]}),e[3]=l,e[4]=r):r=e[4],r}function Dl(t){const e=pe(),{create:n}=ls(),{locator:l}=oe(),i=ft({strict:!1}),r=ht({strict:!1});return async o=>{const a=crypto.randomUUID(),m=o===r.virtualmcpid?$n(t,l,i.taskId??""):null;try{await n({id:a,virtual_mcp_id:o,...m?{branch:m}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:a},search:{virtualmcpid:o}})}}function lt(t){const e=$.c(20),{agent:n,selected:l,onClick:i}=t,r=l?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50";let o;e[0]!==r?(o=D("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",r),e[0]=r,e[1]=o):o=e[1];let a;e[2]!==n.icon||e[3]!==n.title?(a=s.jsx(ve,{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 m;e[5]!==n.title?(m=s.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[5]=n.title,e[6]=m):m=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 d;e[9]!==m||e[10]!==c?(d=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,c]}),e[9]=m,e[10]=c,e[11]=d):d=e[11];let u;e[12]!==l?(u=l&&s.jsx(ds,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[12]=l,e[13]=u):u=e[13];let f;return e[14]!==i||e[15]!==o||e[16]!==a||e[17]!==d||e[18]!==u?(f=s.jsxs("button",{type:"button",onClick:i,className:o,children:[a,d,u]}),e[14]=i,e[15]=o,e[16]=a,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function Kt(t){const e=$.c(5),{children:n,action:l}=t;let i;e[0]!==n?(i=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1];let r;return e[2]!==l||e[3]!==i?(r=s.jsxs("div",{className:"flex items-center justify-between px-3 pb-1 pt-2",children:[i,l]}),e[2]=l,e[3]=i,e[4]=r):r=e[4],r}function Fl(t){const e=$.c(27),{onClose:n,onSelectAgent:l,selectedAgentId:i,onImportFromGithub:r}=t,[o,a]=R.useState(""),m=is(),c=m??[],{org:d}=oe(),{data:u}=re.useSession(),f=u?.user?.id??"anon",h=Yn(m),x=Qn(),b=Dl(d.slug),p=jn(m),g=o.toLowerCase(),j=c.filter(Bl).filter(B=>!p.has(B.id)).filter(Rl).filter(B=>!o||B.title.toLowerCase().includes(g)),y=j.filter(Ll),v=j.filter(El),w=Xe(d.id),C=!o||w.title.toLowerCase().includes(g),N=!!(l&&C);let S;e[0]!==n||e[1]!==l?(S=()=>{l?.(null),n(),a("")},e[0]=n,e[1]=l,e[2]=S):S=e[2];const A=S,k=B=>{if(l){l(B.id),n(),a("");return}Jn({orgId:d.id,userId:f},B.id,h),x(),n(),a(""),b(B.id)},z="flex flex-col max-h-[min(640px,80dvh)]";let _;e[3]!==o?(_=s.jsx(Ml,{value:o,onChange:a,placeholder:"Search agents..."}),e[3]=o,e[4]=_):_=e[4];const I="overflow-y-auto flex-1 min-h-0 p-1.5 flex flex-col gap-0.5",O=l&&C&&w&&s.jsx(lt,{agent:w,selected:!i||i===w.id,onClick:A}),F=v.length>0&&s.jsx(Kt,{children:"Agents"}),E=v.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id)),P=(y.length>0||!o)&&s.jsx(Kt,{action:s.jsxs("button",{type:"button",onClick:r,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:[s.jsx(vi,{className:"size-3.5"}),"Import"]}),children:"Code Agents"}),L=y.map(B=>s.jsx(lt,{agent:B,selected:l?i===B.id:void 0,onClick:()=>k(B)},B.id));let M;e[5]!==N||e[6]!==o||e[7]!==j.length?(M=j.length===0&&!N&&o&&s.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:"No agents found"}),e[5]=N,e[6]=o,e[7]=j.length,e[8]=M):M=e[8];let H;e[9]!==M||e[10]!==O||e[11]!==F||e[12]!==E||e[13]!==P||e[14]!==L?(H=s.jsxs("div",{className:I,children:[O,F,E,P,L,M]}),e[9]=M,e[10]=O,e[11]=F,e[12]=E,e[13]=P,e[14]=L,e[15]=H):H=e[15];let q;e[16]!==d.slug?(q={org:d.slug},e[16]=d.slug,e[17]=q):q=e[17];let U;e[18]!==n?(U=()=>n(),e[18]=n,e[19]=U):U=e[19];let W;e[20]!==q||e[21]!==U?(W=s.jsx("div",{className:"border-t border-border px-3 py-2.5",children:s.jsx(Ws,{to:"/$org/settings/agents",params:q,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[20]=q,e[21]=U,e[22]=W):W=e[22];let Q;return e[23]!==H||e[24]!==W||e[25]!==_?(Q=s.jsxs("div",{className:z,children:[_,H,W]}),e[23]=H,e[24]=W,e[25]=_,e[26]=Q):Q=e[26],Q}function El(t){return!ns(t.metadata)}function Ll(t){return ns(t.metadata)}function Rl(t){return!An(t.id)}function Bl(t){return!kn(t.id)}function Hl(t){const e=$.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:i,onSelectAgent:r,selectedAgentId:o,side:a,align:m}=n,c=l===void 0?!1:l,d=a===void 0?"right":a,u=m===void 0?"start":m,[f,h]=R.useState(!1),[x,b]=R.useState(!1),p=gt(),{setOpenMobile:g}=ge(),j=Vn(),y=j?"border border-border":void 0;let v;e[2]!==j?(v=F=>j?s.jsx(Pl,{children:F}):F,e[2]=j,e[3]=v):v=e[3];const w=v;let C;e[4]!==p||e[5]!==g?(C=()=>{h(!1),p&&g(!1)},e[4]=p,e[5]=g,e[6]=C):C=e[6];const N=C;let S;e[7]!==N?(S=()=>{N(),b(!0)},e[7]=N,e[8]=S):S=e[8];const A=S;let k;e[9]!==N||e[10]!==A||e[11]!==r||e[12]!==f||e[13]!==o?(k=f&&s.jsx(R.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(Fl,{onClose:N,onSelectAgent:r,selectedAgentId:o,onImportFromGithub:A})}),e[9]=N,e[10]=A,e[11]=r,e[12]=f,e[13]=o,e[14]=k):k=e[14];const z=k;let _;e[15]!==u||e[16]!==c||e[17]!==y||e[18]!==j||e[19]!==p||e[20]!==f||e[21]!==z||e[22]!==d||e[23]!==i||e[24]!==w?(_=p?s.jsxs(s.Fragment,{children:[i?s.jsx("button",{type:"button",onClick:()=>h(!0),className:"contents",children:i}):c?w(s.jsx(je,{"aria-label":"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:s.jsx(Le,{className:"size-4"})})):s.jsx(X,{children:w(s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),onClick:()=>{de("agent_browser_opened",{surface:"mobile_drawer"}),h(!0)},children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]}))}),s.jsx(es,{open:f,onOpenChange:h,direction:"bottom",children:s.jsxs(ts,{className:"max-h-[85dvh] p-0",children:[s.jsx(ss,{className:"sr-only",children:"Browse agents"}),z]})})]}):s.jsxs(Qe,{open:f,onOpenChange:F=>{F&&!f&&de("agent_browser_opened",{surface:"desktop_popover"}),h(F)},children:[i?s.jsx(Ee,{asChild:!0,children:i}):c?w(s.jsx(Ee,{asChild:!0,children:s.jsx(je,{"aria-label":"Browse agents",className:D(y),children:s.jsx(Le,{className:"size-4"})})})):s.jsx(X,{children:w(s.jsx(Ee,{asChild:!0,children:s.jsxs(te,{tooltip:j?void 0:"Browse agents",className:D(y),children:[s.jsx(Le,{}),s.jsx("span",{children:"New agent"})]})}))}),s.jsx(Je,{className:"w-[380px] p-0 overflow-hidden",side:d,align:u,children:z})]}),e[15]=u,e[16]=c,e[17]=y,e[18]=j,e[19]=p,e[20]=f,e[21]=z,e[22]=d,e[23]=i,e[24]=w,e[25]=_):_=e[25];let I;e[26]!==x?(I=s.jsx(ji,{open:x,onOpenChange:b,mode:"agent"}),e[26]=x,e[27]=I):I=e[27];let O;return e[28]!==I||e[29]!==_?(O=s.jsxs(s.Fragment,{children:[_,I]}),e[28]=I,e[29]=_,e[30]=O):O=e[30],O}const Gl="wco-no-drag inline-flex items-center gap-1.5 min-w-0 rounded-md px-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 Ul(t){const e=$.c(19),{agentId:n,fallback:l,onOpenHome:i,onPick:r}=t,o=jt(n)??l??null,a=o?.title??"Super Agent",m=`Open ${a} home`,c=o?.icon??null;let d;e[0]!==c||e[1]!==a?(d=s.jsx(ve,{icon:c,name:a,size:"xs"}),e[0]=c,e[1]=a,e[2]=d):d=e[2];let u;e[3]!==i||e[4]!==m||e[5]!==d?(u=s.jsx("button",{type:"button",onClick:i,"aria-label":m,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:d}),e[3]=i,e[4]=m,e[5]=d,e[6]=u):u=e[6];let f;e[7]!==a?(f=s.jsx("span",{className:"truncate font-medium max-w-[10rem]",children:a}),e[7]=a,e[8]=f):f=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),e[9]=h):h=e[9];let x;e[10]!==f?(x=s.jsxs("button",{type:"button",className:Gl,children:[f,h]}),e[10]=f,e[11]=x):x=e[11];let b;e[12]!==n||e[13]!==r||e[14]!==x?(b=s.jsx(Hl,{side:"bottom",align:"start",selectedAgentId:n,onSelectAgent:r,trigger:x}),e[12]=n,e[13]=r,e[14]=x,e[15]=b):b=e[15];let p;return e[16]!==u||e[17]!==b?(p=s.jsxs("div",{className:"flex items-center gap-1",children:[u,b]}),e[16]=u,e[17]=b,e[18]=p):p=e[18],p}function Xt(){const t=$.c(44),{org:e}=oe(),{state:n,isMobile:l}=ge(),i=pe();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},t[0]=r):r=t[0];const o=ft(r);let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a={strict:!1},t[1]=a):a=t[1];const m=ht(a),{threads:c}=vt(),{data:d}=re.useSession(),{setTaskId:u,createNewTask:f}=yt(),h=_s().invitations.length>0,x=n==="collapsed"||l;let b;t[2]!==e.id?(b=Xe(e.id),t[2]=e.id,t[3]=b):b=t[3];const p=b,g=p.id,j=o.taskId?m.virtualmcpid??g:g;let y;t[4]!==f||t[5]!==g||t[6]!==i||t[7]!==e.slug||t[8]!==d?.user?.id||t[9]!==u||t[10]!==c?(y=M=>{if(!M||M===g){i({to:"/$org",params:{org:e.slug}});return}const H=yi(c,M,d?.user?.id);H?u(H.id,M):f(M)},t[4]=f,t[5]=g,t[6]=i,t[7]=e.slug,t[8]=d?.user?.id,t[9]=u,t[10]=c,t[11]=y):y=t[11];const v=y,w=h?`${e.name} — switch organization (pending invitation)`:`${e.name} — switch organization`;let C;t[12]!==e?(C=s.jsx(_t,{org:e,size:"sm"}),t[12]=e,t[13]=C):C=t[13];let N;t[14]!==h||t[15]!==x?(N=h&&s.jsx("span",{className:D("absolute -right-1 size-2.5 rounded-full bg-destructive ring-2 ring-background",x?"-top-1":"top-1/2 -translate-y-1/2")}),t[14]=h,t[15]=x,t[16]=N):N=t[16];let S;t[17]!==C||t[18]!==N?(S=s.jsxs("span",{className:"relative inline-flex",children:[C,N]}),t[17]=C,t[18]=N,t[19]=S):S=t[19];let A;t[20]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(St,{size:14,className:"shrink-0 text-muted-foreground opacity-70"}),t[20]=A):A=t[20];let k;t[21]!==w||t[22]!==S?(k=s.jsx(ue,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":w,className:"wco-no-drag flex items-center gap-1.5 shrink-0 rounded-md pl-3 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:[S,A]})}),t[21]=w,t[22]=S,t[23]=k):k=t[23];let z;t[24]!==e.slug||t[25]!==k?(z=s.jsx(zl,{orgParam:e.slug,trigger:k}),t[24]=e.slug,t[25]=k,t[26]=z):z=t[26];let _;t[27]!==e.name?(_=s.jsx(fe,{side:"bottom",children:e.name}),t[27]=e.name,t[28]=_):_=t[28];let I;t[29]!==z||t[30]!==_?(I=s.jsx($t,{children:s.jsxs(he,{children:[z,_]})}),t[29]=z,t[30]=_,t[31]=I):I=t[31];let O;t[32]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("span",{className:"h-5 w-24 rounded bg-muted animate-pulse"}),t[32]=O):O=t[32];const F=j===g?p:void 0;let E;t[33]!==j||t[34]!==v?(E=()=>v(j),t[33]=j,t[34]=v,t[35]=E):E=t[35];let P;t[36]!==j||t[37]!==v||t[38]!==F||t[39]!==E?(P=s.jsx($t,{children:s.jsx(R.Suspense,{fallback:O,children:s.jsx(Ul,{agentId:j,fallback:F,onOpenHome:E,onPick:v})})}),t[36]=j,t[37]=v,t[38]=F,t[39]=E,t[40]=P):P=t[40];let L;return t[41]!==I||t[42]!==P?(L=s.jsx(ti,{className:"wco-no-drag",children:s.jsxs(si,{className:"flex-nowrap gap-1.5 sm:gap-1.5",children:[I,P]})}),t[41]=I,t[42]=P,t[43]=L):L=t[43],L}const Wl="sidebar.open";function ql(){const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Ks,{}),t[0]=e):e=t[0],e}function oa(){const t=$.c(27),e=gt(),n=Si(),[l,i]=Ye(Wl,!1),{width:r,wrapperRef:o,onStartResize:a,resetWidth:m}=wi();let c;t[0]!==e||t[1]!==n?(c=e?s.jsxs(ee.Header,{className:"grid-cols-1 px-1 pr-1",children:[s.jsxs("div",{className:"grid w-full grid-cols-[auto_auto_auto_1fr_auto_auto] items-center gap-2",children:[!n&&s.jsx(as,{}),!n&&s.jsx(Xt,{}),!n&&s.jsx(mt,{}),s.jsx("div",{"aria-hidden":!0,className:"min-w-0"}),s.jsx(ee.TogglesSlot,{}),!n&&s.jsx(ee.TabsSlot,{className:"min-w-0 justify-self-end"})]}),!n&&s.jsx(ee.CenterSlot,{}),!n&&s.jsx(ee.RightSlot,{})]}):s.jsxs(ee.Header,{children:[s.jsxs(ee.LeftColumn,{children:[!n&&s.jsx(Xt,{}),s.jsx(ee.TogglesSlot,{})]}),n?s.jsx("div",{"aria-hidden":!0}):s.jsx(ee.CenterSlot,{}),s.jsx(ee.RightColumn,{children:!n&&s.jsxs(s.Fragment,{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(ee.TabsSlot,{})}),s.jsx(ee.RightSlot,{})]})})]}),t[0]=e,t[1]=n,t[2]=c):c=t[2];const d=`${r}px`;let u;t[3]!==d?(u={"--sidebar-width":d,"--sidebar-width-icon":"3.5rem"},t[3]=d,t[4]=u):u=t[4];const f=u;let h;t[5]!==e||t[6]!==a||t[7]!==n||t[8]!==m?(h=!e&&!n&&s.jsxs(s.Fragment,{children:[s.jsx(yl,{}),s.jsx(Ni,{onPointerDown:a,onDoubleClick:m})]}),t[5]=e,t[6]=a,t[7]=n,t[8]=m,t[9]=h):h=t[9];let x;t[10]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},t[10]=x):x=t[10];let b;t[11]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ys,{className:"flex flex-col",style:x,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(R.Suspense,{fallback:s.jsx(ql,{}),children:s.jsx(qs,{})})})})}),t[11]=b):b=t[11];let p;t[12]!==f||t[13]!==h||t[14]!==o?(p=s.jsxs(Qs,{ref:o,className:"flex-1 bg-sidebar relative min-h-0",style:f,children:[h,b]}),t[12]=f,t[13]=h,t[14]=o,t[15]=p):p=t[15];let g;t[16]!==e||t[17]!==n?(g=e&&!n&&s.jsx(Hn,{renderSidebar:Kl}),t[16]=e,t[17]=n,t[18]=g):g=t[18];let j;t[19]!==c||t[20]!==p||t[21]!==g?(j=s.jsx(ei,{children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[c,p,g]})}),t[19]=c,t[20]=p,t[21]=g,t[22]=j):j=t[22];let y;return t[23]!==i||t[24]!==l||t[25]!==j?(y=s.jsx(zn,{children:s.jsx(ee.Provider,{children:s.jsx(Js,{open:l,onOpenChange:i,children:j})})}),t[23]=i,t[24]=l,t[25]=j,t[26]=y):y=t[26],y}function Kl(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(Sl,{onClose:e})})})}export{oa as default};
|