decocms 3.28.3 → 3.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-C4TQxCvt.js → AlertCircle-CIkJ_tva.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D_F85AmM.js → ArrowUpRight-DjtsYmlk.js} +1 -1
- package/dist/client/assets/{Check-pmcSX7Ds.js → Check-DZ5PZYLO.js} +1 -1
- package/dist/client/assets/{CheckCircle-3ECsT-zB.js → CheckCircle-DyJzuYoS.js} +1 -1
- package/dist/client/assets/{ChevronDown-C4k7LIxV.js → ChevronDown-CGeYjJAK.js} +1 -1
- package/dist/client/assets/{ChevronLeft-BJhNWHOk.js → ChevronLeft-DWiixe45.js} +1 -1
- package/dist/client/assets/{ChevronRight-BNY74L1V.js → ChevronRight-Bm_e-tIB.js} +1 -1
- package/dist/client/assets/{ChevronUp-BYoitSH0.js → ChevronUp-BCv26pBY.js} +1 -1
- package/dist/client/assets/{Container-DkRkONtL.js → Container-DNJNU1b4.js} +1 -1
- package/dist/client/assets/{DotsVertical-DJtuELuQ.js → DotsVertical-CqB_Aadi.js} +1 -1
- package/dist/client/assets/{Eye-TeLMkAIt.js → Eye-MkeUTfT3.js} +1 -1
- package/dist/client/assets/{FilterLines-C7Uh3aPq.js → FilterLines-CfVg89f7.js} +1 -1
- package/dist/client/assets/{Globe01-DcV1IvQc.js → Globe01-xZhhj276.js} +1 -1
- package/dist/client/assets/{HardDrive-hauprmZ4.js → HardDrive-CtdIy8yR.js} +1 -1
- package/dist/client/assets/{Key01-BhvQgQvA.js → Key01-CXIWciFj.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CCjwztft.js → LayoutLeft-CJ48TbRA.js} +1 -1
- package/dist/client/assets/{LinkExternal01-C-EuIQk5.js → LinkExternal01-Bi6In-BW.js} +1 -1
- package/dist/client/assets/{Monitor01-C0AyFDoy.js → Monitor01-CsSfQSQt.js} +1 -1
- package/dist/client/assets/{Palette-B6fuauoi.js → Palette-CmO3ZuPu.js} +1 -1
- package/dist/client/assets/{Play-DwlSKe5K.js → Play-CQ97sIka.js} +1 -1
- package/dist/client/assets/{Plus-DgMianxx.js → Plus-CTho-g8m.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-BZNxVpdM.js → RefreshCcw01-D1X4YmG3.js} +1 -1
- package/dist/client/assets/{SearchMd-BX7CdT-X.js → SearchMd-BVJBwCEd.js} +1 -1
- package/dist/client/assets/{Settings02-QpROtTDF.js → Settings02-Cqx4N2is.js} +1 -1
- package/dist/client/assets/{Shield01-EBH9mxXN.js → Shield01-D5OMek_B.js} +1 -1
- package/dist/client/assets/{Star01-B0KVVYi_.js → Star01-4yFjK6bh.js} +1 -1
- package/dist/client/assets/{Stars01-C-cJK68D.js → Stars01-DWbsIFJF.js} +1 -1
- package/dist/client/assets/{Stars02-CjwPUV9S.js → Stars02-BLn35DBB.js} +1 -1
- package/dist/client/assets/{Sun-DmvZNVcY.js → Sun-FelsR2hx.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DXvf2f9m.js → SwitchHorizontal01-Bsjx9paN.js} +1 -1
- package/dist/client/assets/{Tool01-B3oBdSEQ.js → Tool01-BxT6lP7E.js} +1 -1
- package/dist/client/assets/{Trash01-BMVrAqxq.js → Trash01-BczIIm5v.js} +1 -1
- package/dist/client/assets/{Upload01-CVliSV9e.js → Upload01-nIFiyRcG.js} +1 -1
- package/dist/client/assets/{User01-BVUfnIdT.js → User01-CamUMrWb.js} +1 -1
- package/dist/client/assets/{Users01-D-4KurdS.js → Users01-CgFieXMp.js} +1 -1
- package/dist/client/assets/{Users03-v_ItRW5T.js → Users03-DT_R5tz6.js} +1 -1
- package/dist/client/assets/{X-4DUZJqa0.js → X-CRg5TH_Y.js} +1 -1
- package/dist/client/assets/{XCircle-BzRD1Jd9.js → XCircle-DkwGk6Y1.js} +1 -1
- package/dist/client/assets/{XClose-Cu1koOKq.js → XClose-D72Lt3NI.js} +1 -1
- package/dist/client/assets/{Zap-3U1K5cTy.js → Zap-B-Fg7TEp.js} +1 -1
- package/dist/client/assets/{ZapSquare-C5IO5ouL.js → ZapSquare-BqiIusHB.js} +1 -1
- package/dist/client/assets/{ZoomOut-BYuR8aeQ.js → ZoomOut-zDFXRspK.js} +1 -1
- package/dist/client/assets/{access-gate-mN3wzjy_.js → access-gate-SfXPQWUj.js} +1 -1
- package/dist/client/assets/{accordion-D9YwMIzO.js → accordion-DKdXwYYc.js} +1 -1
- package/dist/client/assets/add-section-modal-rFZJepGX.js +1 -0
- package/dist/client/assets/{agent-capabilities-BOO0rztH.js → agent-capabilities-QxThXvgQ.js} +1 -1
- package/dist/client/assets/{agent-icon-T0Pj37EB.js → agent-icon-C_8D2J-7.js} +1 -1
- package/dist/client/assets/{agent-icons-DEflXPpL.js → agent-icons-DozoyM-L.js} +1 -1
- package/dist/client/assets/{agents-list-DcBcC4gm.js → agents-list-C0ILdC1R.js} +1 -1
- package/dist/client/assets/{ai-providers-BprJeZ5N.js → ai-providers-BQNg7G2z.js} +1 -1
- package/dist/client/assets/{alert-C4vjqJ0t.js → alert-Csb33_9v.js} +1 -1
- package/dist/client/assets/{alert-dialog-Dwxfxg1i.js → alert-dialog-CbYM4jmz.js} +1 -1
- package/dist/client/assets/app-editor-D3p9xZvL.js +1 -0
- package/dist/client/assets/{auth-catchall-CcUR97ei.js → auth-catchall-tRl-mCnV.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Qe3dXBW8.js → auth-split-layout-CRIa8lnq.js} +1 -1
- package/dist/client/assets/{automation-list-row-Q13E2qM_.js → automation-list-row-DaUVjzEO.js} +1 -1
- package/dist/client/assets/{automation-runs-D-mua2nd.js → automation-runs-ByMFrYpg.js} +1 -1
- package/dist/client/assets/{automations-BwxgjQEx.js → automations-DOHjwNUR.js} +1 -1
- package/dist/client/assets/{avatar-Cv8RAhQG.js → avatar-Bf_YMKWh.js} +1 -1
- package/dist/client/assets/{badge-f4YWnZL0.js → badge-Di1xo__6.js} +1 -1
- package/dist/client/assets/{brand-context-qJJ2F933.js → brand-context-DVFnuzc3.js} +1 -1
- package/dist/client/assets/{buckets-CS3zpcgH.js → buckets-BKqAOUQL.js} +1 -1
- package/dist/client/assets/{calendar-CHyA12cZ.js → calendar-BvlrJX6s.js} +1 -1
- package/dist/client/assets/{capability-load-error-CJeUoRGW.js → capability-load-error-NgXOd2ZO.js} +1 -1
- package/dist/client/assets/{card-BW8XcmNf.js → card-CWqz0DaV.js} +1 -1
- package/dist/client/assets/{chat-context-CAanIJU3.js → chat-context-BoAn6xWM.js} +1 -1
- package/dist/client/assets/{checkbox-CNj9E_s7.js → checkbox-C5cEV_DH.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Cbid5ewl.js → cli-auth-success-Da-trtdE.js} +1 -1
- package/dist/client/assets/{collection-detail-7Kcq6B0O.js → collection-detail-K9T_V-NT.js} +1 -1
- package/dist/client/assets/{collection-display-button-Dtw31ugJ.js → collection-display-button-BAYgV8vn.js} +1 -1
- package/dist/client/assets/{collection-search-DMK1eBHh.js → collection-search-Bk4YcOKu.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DTywOitX.js → collection-table-wrapper-DRe15D6A.js} +1 -1
- package/dist/client/assets/{collection-tabs-DP-FMzzd.js → collection-tabs-CSSbV4je.js} +1 -1
- package/dist/client/assets/{collections-FCb6t5rG.js → collections-CG_8shjq.js} +1 -1
- package/dist/client/assets/{command-CXvlGLCD.js → command-CFpCNmCF.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-BgQ9OeQZ.js → connect-desktop-dialog-BIhfHnnr.js} +1 -1
- package/dist/client/assets/{connection-card-B5wplSNn.js → connection-card-B1-pvTAQ.js} +1 -1
- package/dist/client/assets/{connection-detail-DRTbW7EB.js → connection-detail-Bh5oWdyn.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-o4WBNnQu.js → connection-form-helpers-oVYdKzFk.js} +1 -1
- package/dist/client/assets/{connections-x91ehTOk.js → connections-Dp3XGEkZ.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-Bmfj-SDf.js → decopilot-sse-pool-CJ_QbSiL.js} +1 -1
- package/dist/client/assets/{dialog-B5s00-oF.js → dialog-DzWL-NrT.js} +1 -1
- package/dist/client/assets/{domain-settings-PFlBJKW2.js → domain-settings-DJD9U4sU.js} +1 -1
- package/dist/client/assets/{drawer-LPSuQTOw.js → drawer-BLGCEP9S.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BaJFpb9J.js → dropdown-menu-YzbwHIxx.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-BsJxVywv.js → dynamic-plugin-layout-BB8gWDVj.js} +1 -1
- package/dist/client/assets/{empty-state-D7YGvge3.js → empty-state-CEcNMd77.js} +1 -1
- package/dist/client/assets/{empty-state-ZXtUjdxe.js → empty-state-DfOA7oYG.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DgoDS4_Y.js → extract-connection-data-DzgWcXVA.js} +1 -1
- package/dist/client/assets/{features-D9_I78r2.js → features-CIhQ9FPK.js} +1 -1
- package/dist/client/assets/file-explorer-Dp5sNAMl.js +2 -0
- package/dist/client/assets/{file-type-icon-CDc_izX0.js → file-type-icon-9WcINLx3.js} +1 -1
- package/dist/client/assets/{files-CrKfgrGV.js → files-CfinSi-B.js} +1 -1
- package/dist/client/assets/{form-BLgBgnav.js → form-DK41bruw.js} +1 -1
- package/dist/client/assets/{general-D_FdDl2h.js → general-BUSEsa-r.js} +1 -1
- package/dist/client/assets/{generate-id-DXj8sIGx.js → generate-id-DOxNmKSl.js} +1 -1
- package/dist/client/assets/{github-repo-picker-CAK6NZTZ.js → github-repo-picker-BJ45Iuw_.js} +1 -1
- package/dist/client/assets/{header-tab-button-DPplseth.js → header-tab-button-BDD5kZQa.js} +1 -1
- package/dist/client/assets/{hover-card-QfPMM7-7.js → hover-card-C0gmU-KR.js} +1 -1
- package/dist/client/assets/{image-field-J2UR9SMx.js → image-field-CNdkpe4-.js} +1 -1
- package/dist/client/assets/{index-XhpNNRDn.js → index-4CkRjwqB.js} +1 -1
- package/dist/client/assets/{index-CJt7pypa.js → index-B6yJwY9r.js} +1 -1
- package/dist/client/assets/{index-C5jlCV2I.js → index-Bw6dLXGR.js} +1 -1
- package/dist/client/assets/{index-BnTkC4uZ.js → index-CH6_c02Q.js} +1 -1
- package/dist/client/assets/{index-CIYOHhZQ.js → index-CRk3na1v.js} +1 -1
- package/dist/client/assets/index-CZ9iD_kA.js +1 -0
- package/dist/client/assets/{index-vLnKQzUP.js → index-CghQMTVW.js} +1 -1
- package/dist/client/assets/{index-DOoAabap.js → index-CpG2_v8p.js} +3 -3
- package/dist/client/assets/{index-GEjv2UZA.js → index-D-Er7K2V.js} +1 -1
- package/dist/client/assets/{index-Dp7xqa9S.js → index-Dd5x1Ugx.js} +1 -1
- package/dist/client/assets/{index-CeAw691B.js → index-DdTSg63X.js} +4 -4
- package/dist/client/assets/{index-BFL9nnAw.js → index-DzNLTQFE.js} +1 -1
- package/dist/client/assets/index-PP1_jM4a.js +1 -0
- package/dist/client/assets/{index-DKWQ7z_t.js → index-Vm79zSBa.js} +1 -1
- package/dist/client/assets/{index-B6FehCUO.js → index-rP7Vi9h6.js} +1 -1
- package/dist/client/assets/{index-redirect-C2dwmlAm.js → index-redirect-B5KfXttx.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-DApjSDt2.js → infiniteQueryObserver-DKFzmh7N.js} +1 -1
- package/dist/client/assets/{input-OGtZJjEE.js → input-BWjbzzQM.js} +1 -1
- package/dist/client/assets/{integration-icon-ChFvmc9D.js → integration-icon-Jhe4mXPc.js} +1 -1
- package/dist/client/assets/{label-DTe8NzB0.js → label-BD30ND7M.js} +1 -1
- package/dist/client/assets/{layout-BWEcMi1N.js → layout-CshuPuNT.js} +1 -1
- package/dist/client/assets/{login-Co2pcu6Z.js → login-xvknfGAE.js} +1 -1
- package/dist/client/assets/{members-B_NiZgeY.js → members-B-0d8UVK.js} +1 -1
- package/dist/client/assets/{monaco-editor-xVGWgwtQ.js → monaco-editor-CO97GxVj.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-ByVvV2ie.js → monitoring-stats-row-Cfw3-iQJ.js} +1 -1
- package/dist/client/assets/{oauth-callback-BDILuE_I.js → oauth-callback-OP1K2cBS.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DShAsuGx.js → oauth-callback-ai-provider-AV6p2GPf.js} +1 -1
- package/dist/client/assets/{onboarding-CmxDxoER.js → onboarding-BydTnX4J.js} +1 -1
- package/dist/client/assets/{org-install-DR2-zloB.js → org-install-By9f70v3.js} +1 -1
- package/dist/client/assets/{org-layout-BuB_tEV_.js → org-layout-Cuv0PXEZ.js} +1 -1
- package/dist/client/assets/{org-plugin-layout-CoO0eSJj.js → org-plugin-layout-D6ftiJr2.js} +1 -1
- package/dist/client/assets/{page-seo-form-BJ2P33W_.js → page-seo-form-D0J4BsJd.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Q7Y1gsuc.js +1 -0
- package/dist/client/assets/pair-D1IR0Baq.js +46 -0
- package/dist/client/assets/{plugin-empty-state-L3VuPQzd.js → plugin-empty-state-CTifOpyh.js} +1 -1
- package/dist/client/assets/{plugin-header-nh1rjw6P.js → plugin-header-D63WcJTf.js} +1 -1
- package/dist/client/assets/{plugin-layout-CQVjD7pK.js → plugin-layout-DIqP9Bzh.js} +1 -1
- package/dist/client/assets/{popover-C0XpZKfX.js → popover-w66kr7qI.js} +1 -1
- package/dist/client/assets/{post-editor-Ujefbll0.js → post-editor-CcNc2iwJ.js} +1 -1
- package/dist/client/assets/{primitives-DdUgHbcn.js → primitives-CXAphNCy.js} +1 -1
- package/dist/client/assets/{profile-Bc5pUfle.js → profile-DPgEYebY.js} +1 -1
- package/dist/client/assets/project-app-view-B73O2qLq.js +1 -0
- package/dist/client/assets/record-editor-hFUcPDs2.js +1 -0
- package/dist/client/assets/registry-CSai7Qf3.js +2 -0
- package/dist/client/assets/{registry-layout-YlO9r3lS.js → registry-layout-CpOLAjVd.js} +1 -1
- package/dist/client/assets/{require-capability-BQvim5O5.js → require-capability-BJrX_rPe.js} +1 -1
- package/dist/client/assets/{required-auth-layout-Dvpx0uYK.js → required-auth-layout-CzrHHdU9.js} +1 -1
- package/dist/client/assets/{reset-password-BxhQ1r_k.js → reset-password-XeANzZ8O.js} +1 -1
- package/dist/client/assets/{resizable-JcKp4uhd.js → resizable-B8hoAXbl.js} +1 -1
- package/dist/client/assets/{roles-gWoW_w7Z.js → roles-CfBRlxaX.js} +1 -1
- package/dist/client/assets/save-referenced-block-MdHBsKGI.js +1 -0
- package/dist/client/assets/{save-status-BWSP_gRJ.js → save-status-Ds8Nwo0Y.js} +1 -1
- package/dist/client/assets/{schema-form-CHT4Cc-z.js → schema-form-914BofiG.js} +1 -1
- package/dist/client/assets/{scroll-area-DOidgWV9.js → scroll-area-CFrtCBLi.js} +1 -1
- package/dist/client/assets/{search-input-BRLbSyxE.js → search-input-BXsljctW.js} +1 -1
- package/dist/client/assets/{secrets-C4h-YogY.js → secrets-Dh_eQg6Y.js} +1 -1
- package/dist/client/assets/{sections-editor-BRulELYR.js → sections-editor-Cy1_wyqm.js} +1 -1
- package/dist/client/assets/{select-DtexK_z5.js → select-B0qONt_m.js} +1 -1
- package/dist/client/assets/{select-model-AblBAcYY.js → select-model-DV1J8lbW.js} +1 -1
- package/dist/client/assets/seo-editor-xn4RyB29.js +1 -0
- package/dist/client/assets/{settings-layout-DFrFdd-Y.js → settings-layout-DagPHYsX.js} +1 -1
- package/dist/client/assets/{settings-section-CKNefgVO.js → settings-section-ByFuwsko.js} +1 -1
- package/dist/client/assets/{sheet-Ds2u6iNE.js → sheet-BlMfZj2L.js} +1 -1
- package/dist/client/assets/{shell-controls-TpzVn2KN.js → shell-controls-URBQR3Oa.js} +1 -1
- package/dist/client/assets/{shell-layout-BHmrKjJ7.js → shell-layout-NuYzN-Gn.js} +1 -1
- package/dist/client/assets/shell-route-loading-DCVHDrWy.js +1 -0
- package/dist/client/assets/{sidebar-B8xglaCl.js → sidebar-DceLItg8.js} +1 -1
- package/dist/client/assets/{skeleton-DXwBFrmR.js → skeleton-07IZijZM.js} +1 -1
- package/dist/client/assets/{sortable.esm-BKxlC02W.js → sortable.esm-CzY2WOGE.js} +1 -1
- package/dist/client/assets/{spinner-BiM6tNa6.js → spinner-B8QiOf4h.js} +1 -1
- package/dist/client/assets/{sso-CBrsX3zV.js → sso-CwWhDCFg.js} +1 -1
- package/dist/client/assets/{store-Csvq01ry.js → store-D9gP4byy.js} +1 -1
- package/dist/client/assets/store-registry-Bu6pBKfc.js +2 -0
- package/dist/client/assets/{studio-tools-CKvJG16E.js → studio-tools-Cly5ZCG3.js} +1 -1
- package/dist/client/assets/{switch-C11gJmy6.js → switch-BJt48css.js} +1 -1
- package/dist/client/assets/{tab-id-5WB0EpeZ.js → tab-id-Cgg9_UqF.js} +1 -1
- package/dist/client/assets/{table-9jRKIUhw.js → table-3evUHy3g.js} +1 -1
- package/dist/client/assets/{tabs-BYvmM5A_.js → tabs-B1x7Fe-S.js} +1 -1
- package/dist/client/assets/{task-status-CvxTf2VK.js → task-status-F5X71Or6.js} +1 -1
- package/dist/client/assets/{textarea-Ds5imYZm.js → textarea-CgmDS1mc.js} +1 -1
- package/dist/client/assets/{toggle-group-BmE5kRMT.js → toggle-group-DVdH8zGh.js} +1 -1
- package/dist/client/assets/{toolbar-ZRWeSQFu.js → toolbar-CXAxzeUh.js} +1 -1
- package/dist/client/assets/{tools-list-CnTK9CuR.js → tools-list-B226mv7W.js} +1 -1
- package/dist/client/assets/{tooltip-DjQW44FW.js → tooltip-D5r7nYKO.js} +1 -1
- package/dist/client/assets/{types-Dc5cEQpH.js → types-DIAQ40QE.js} +1 -1
- package/dist/client/assets/{use-ai-providers-XhZCg1_E.js → use-ai-providers-BMK8G5pd.js} +1 -1
- package/dist/client/assets/{use-automations-i7RRg3se.js → use-automations-CqVVjbv4.js} +1 -1
- package/dist/client/assets/{use-capability-DzFqA_ML.js → use-capability-Dp-xHWqY.js} +1 -1
- package/dist/client/assets/use-clock-tick-Dkz_tj-X.js +1 -0
- package/dist/client/assets/{use-collections-YdlS5GS5.js → use-collections-dzWuZTM5.js} +1 -1
- package/dist/client/assets/{use-connection-gDoBL3iK.js → use-connection-CbBvGv-y.js} +1 -1
- package/dist/client/assets/{use-copy-BPFzc0Dk.js → use-copy-CP7WU0J2.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DcKYoquB.js → use-create-virtual-mcp-Dz02gDB8.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-Dc2f-IpJ.js → use-debounced-autosave-7E-JkkEV.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CEg_2cre.js → use-delete-connection-daNvL5F7.js} +1 -1
- package/dist/client/assets/{use-file-configs-JiatUQs-.js → use-file-configs-CzOp0gY1.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-p2B5TchE.js → use-infinite-scroll-Dz0Ju18S.js} +1 -1
- package/dist/client/assets/{use-list-state-D6tqpIP2.js → use-list-state-Cf00xLLl.js} +1 -1
- package/dist/client/assets/{use-mcp-client-DnwBQgtt.js → use-mcp-client-BDuQ-DKr.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-Clc-WOtL.js → use-mcp-prompts-BfczuqQ1.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BQmNGmmp.js → use-mcp-tools-xqS_ta53.js} +1 -1
- package/dist/client/assets/{use-members-U2A7MOWt.js → use-members-DH5dae5S.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DGKOJZZo.js → use-navigate-to-agent-CLdhXO-i.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-BtA9q92Y.js → use-org-auth-client-BwDW-s0s.js} +1 -1
- package/dist/client/assets/{use-org-sso-C7W79uGy.js → use-org-sso-BO0DGPVQ.js} +1 -1
- package/dist/client/assets/{use-organization-roles-F5igVlxZ.js → use-organization-roles-ZTYugFdP.js} +1 -1
- package/dist/client/assets/{use-organization-settings-79qw4RP3.js → use-organization-settings-ofRxNgFR.js} +1 -1
- package/dist/client/assets/{use-registry-connections-B7ROIw00.js → use-registry-connections-Clpq_83P.js} +1 -1
- package/dist/client/assets/{use-secrets-BZWXRb4X.js → use-secrets-CjbHuNwC.js} +1 -1
- package/dist/client/assets/{use-status-sounds-ZKWD8wXu.js → use-status-sounds-BQhIBN31.js} +1 -1
- package/dist/client/assets/{use-view-mode-DozvbNbv.js → use-view-mode-CjoQ3b4F.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-B4ctZV2V.js → use-virtual-mcp-BOy7A3-I.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-BA4Q5DOk.js +1 -0
- package/dist/client/assets/{useRouterState-VKNXuMDL.js → useRouterState-BIyanAgq.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-PHI3OnKC.js +1 -0
- package/dist/client/assets/{user-oT5nEq50.js → user-DjbLcTMi.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-C_ukyuBD.js → view-mode-toggle-DnMmKH1O.js} +1 -1
- package/dist/client/assets/{workflow-BpAUD1S2.js → workflow-D0yr6HGh.js} +1 -1
- package/dist/client/assets/workflow-detail-BCL21zFy.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/add-section-modal-D1xFmKc0.js +0 -1
- package/dist/client/assets/app-editor-BxDGPID0.js +0 -1
- package/dist/client/assets/file-explorer-DRoGrOQX.js +0 -2
- package/dist/client/assets/format-time-Cy7tTmZp.js +0 -1
- package/dist/client/assets/index-4e2CTVL7.js +0 -1
- package/dist/client/assets/index-DzDUNutB.js +0 -1
- package/dist/client/assets/page-seo-sheet-CqPtJlao.js +0 -1
- package/dist/client/assets/pair-CuPAm5Bi.js +0 -39
- package/dist/client/assets/project-app-view-YyQnhq2c.js +0 -1
- package/dist/client/assets/record-editor-nBvi-yPi.js +0 -1
- package/dist/client/assets/registry-BWNT0mI6.js +0 -2
- package/dist/client/assets/save-referenced-block-EoD0JuD1.js +0 -1
- package/dist/client/assets/seo-editor-1rtm8KlY.js +0 -1
- package/dist/client/assets/shell-route-loading-DxGBys3x.js +0 -1
- package/dist/client/assets/store-registry-Bt2ovs6q.js +0 -2
- package/dist/client/assets/useInfiniteQuery-qWamWTas.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CDj1xolJ.js +0 -1
- package/dist/client/assets/workflow-detail-DNlVdn_V.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as n,j as i,cz as u,c,bE as m,de as x,df as j,cA as N,cB as b,dg as p,dh as h}from"./index-
|
|
1
|
+
import{e as n,j as i,cz as u,c,bE as m,de as x,df as j,cA as N,cB as b,dg as p,dh as h}from"./index-CpG2_v8p.js";import{i as D}from"./X-CRg5TH_Y.js";function _(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(u,{"data-slot":"dialog",...t}),e[2]=t,e[3]=s):s=e[3],s}function k(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(h,{"data-slot":"dialog-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function v(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(N,{"data-slot":"dialog-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function w(l){const e=n.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(p,{"data-slot":"dialog-close",...t}),e[2]=t,e[3]=s):s=e[3],s}function y(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/45 backdrop-blur-[0.15px]",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(b,{"data-slot":"dialog-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function $(l){const e=n.c(6),{className:t}=l;let s;e[0]!==t?(s=c("cursor-pointer ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground","absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2","focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[0]=t,e[1]=s):s=e[1];let a,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(D,{}),o=i.jsx("span",{className:"sr-only",children:"Close"}),e[2]=a,e[3]=o):(a=e[2],o=e[3]);let r;return e[4]!==s?(r=i.jsxs(p,{className:s,children:[a,o]}),e[4]=s,e[5]=r):r=e[5],r}function T(l){const e=n.c(15);let t,s,a,o;e[0]!==l?({className:s,children:t,closeButtonClassName:a,...o}=l,e[0]=l,e[1]=t,e[2]=s,e[3]=a,e[4]=o):(t=e[1],s=e[2],a=e[3],o=e[4]);let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(y,{}),e[5]=r):r=e[5];let d;e[6]!==s?(d=c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-md duration-200 sm:max-w-lg",s),e[6]=s,e[7]=d):d=e[7];let f;e[8]!==a?(f=i.jsx($,{className:a}),e[8]=a,e[9]=f):f=e[9];let g;return e[10]!==t||e[11]!==o||e[12]!==d||e[13]!==f?(g=i.jsxs(v,{"data-slot":"dialog-portal",children:[r,i.jsxs(m,{"data-slot":"dialog-content",className:d,...o,children:[t,f]})]}),e[10]=t,e[11]=o,e[12]=d,e[13]=f,e[14]=g):g=e[14],g}function B(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function E(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx("div",{"data-slot":"dialog-footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function R(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-lg leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(x,{"data-slot":"dialog-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}function O(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(j,{"data-slot":"dialog-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{_ as D,T as a,B as b,R as c,E as d,O as e,w as f,v as g,y as h,k as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as Z,q as L,b as Q,G as B,K as k,n as U,a as P,j as s,B as q,t as z,o as h}from"./index-
|
|
1
|
+
import{e as Z,q as L,b as Q,G as B,K as k,n as U,a as P,j as s,B as q,t as z,o as h}from"./index-CpG2_v8p.js";import{u as $}from"./studio-tools-Cly5ZCG3.js";import{S as Y}from"./switch-BJt48css.js";import{S as H,a as v,b as M}from"./settings-section-ByFuwsko.js";function ei(){const i=Z.c(59),{org:e}=L(),{data:J}=Q.useSession(),R=B(),a=$();let r;i[0]!==e.id?(r=k.organizationDomain(e.id),i[0]=e.id,i[1]=r):r=i[1];let d;i[2]!==a?(d=()=>a.call("ORGANIZATION_DOMAIN_GET",{}),i[2]=a,i[3]=d):d=i[3];let A;i[4]!==r||i[5]!==d?(A={queryKey:r,queryFn:d},i[4]=r,i[5]=d,i[6]=A):A=i[6];const{data:G,isPending:K}=U(A),T=J?.user?.email??"";let x;i[7]!==T?(x=T.split("@")[1]?.toLowerCase()??"",i[7]=T,i[8]=x):x=i[8];const n=x,o=G?.domain??null,w=G?.autoJoinEnabled??!1,F=n&&n!==o;let C;i[9]!==e.id||i[10]!==R?(C=()=>R.invalidateQueries({queryKey:k.organizationDomain(e.id)}),i[9]=e.id,i[10]=R,i[11]=C):C=i[11];const l=C;let c;i[12]!==a||i[13]!==n?(c=()=>a.call("ORGANIZATION_DOMAIN_SET",{domain:n,autoJoinEnabled:!1}),i[12]=a,i[13]=n,i[14]=c):c=i[14];let m;i[15]!==l||i[16]!==e.id||i[17]!==n?(m=()=>{z("organization_domain_claimed",{organization_id:e.id,email_domain:n}),l(),h.success("Domain claimed")},i[15]=l,i[16]=e.id,i[17]=n,i[18]=m):m=i[18];let u;i[19]!==e.id||i[20]!==n?(u=t=>{z("organization_domain_claim_failed",{organization_id:e.id,email_domain:n,error:t instanceof Error?t.message:String(t)}),h.error(t instanceof Error?t.message:"Failed to claim domain")},i[19]=e.id,i[20]=n,i[21]=u):u=i[21];let D;i[22]!==c||i[23]!==m||i[24]!==u?(D={mutationFn:c,onSuccess:m,onError:u},i[22]=c,i[23]=m,i[24]=u,i[25]=D):D=i[25];const p=P(D);let g;i[26]!==a?(g=()=>a.call("ORGANIZATION_DOMAIN_CLEAR",{}),i[26]=a,i[27]=g):g=i[27];let f;i[28]!==o||i[29]!==l||i[30]!==e.id?(f=()=>{z("organization_domain_cleared",{organization_id:e.id,email_domain:o}),l(),h.success("Domain removed")},i[28]=o,i[29]=l,i[30]=e.id,i[31]=f):f=i[31];let _;i[32]!==o||i[33]!==e.id?(_=t=>{z("organization_domain_clear_failed",{organization_id:e.id,email_domain:o,error:t instanceof Error?t.message:String(t)}),h.error(t instanceof Error?t.message:"Failed to remove domain")},i[32]=o,i[33]=e.id,i[34]=_):_=i[34];let I;i[35]!==f||i[36]!==_||i[37]!==g?(I={mutationFn:g,onSuccess:f,onError:_},i[35]=f,i[36]=_,i[37]=g,i[38]=I):I=i[38];const N=P(I);let E;i[39]!==o||i[40]!==e.id||i[41]!==a?(E=async t=>{if(o)return z("organization_auto_join_toggled",{organization_id:e.id,enabled:t}),a.call("ORGANIZATION_DOMAIN_UPDATE",{autoJoinEnabled:t})},i[39]=o,i[40]=e.id,i[41]=a,i[42]=E):E=i[42];let j;i[43]!==l?(j=()=>{l(),h.success("Auto-join setting updated")},i[43]=l,i[44]=j):j=i[44];let S;i[45]!==e.id?(S=t=>{z("organization_auto_join_toggle_failed",{organization_id:e.id,error:t instanceof Error?t.message:String(t)}),h.error(t instanceof Error?t.message:"Failed to update auto-join")},i[45]=e.id,i[46]=S):S=i[46];let O;i[47]!==E||i[48]!==j||i[49]!==S?(O={mutationFn:E,onSuccess:j,onError:S},i[47]=E,i[48]=j,i[49]=S,i[50]=O):O=i[50];const y=P(O);if(K)return null;let b;return i[51]!==w||i[52]!==F||i[53]!==N||i[54]!==o||i[55]!==p||i[56]!==y||i[57]!==n?(b=s.jsx(H,{title:"Email domain",children:o?s.jsxs(v,{children:[s.jsx(M,{title:o,description:"Claimed domain",action:s.jsx(q,{variant:"outline",size:"sm",onClick:()=>N.mutate(),disabled:N.isPending,children:"Remove"})}),s.jsx(M,{title:"Auto-join",description:`Users with @${o} emails will automatically join this organization on signup.`,action:s.jsx(Y,{checked:w,onCheckedChange:t=>y.mutate(t),disabled:y.isPending})})]}):F?s.jsx(v,{children:s.jsx(M,{title:n,description:"Let new users with matching emails auto-join this org.",action:s.jsx(q,{size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:p.isPending?"Claiming...":"Claim domain"})})}):s.jsx(v,{children:s.jsx(M,{title:"No domain detected",description:"Sign in with a corporate email to claim a domain for your organization."})})}),i[51]=w,i[52]=F,i[53]=N,i[54]=o,i[55]=p,i[56]=y,i[57]=n,i[58]=b):b=i[58],b}export{ei as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as d,j as s,co as i,c}from"./index-
|
|
1
|
+
import{e as d,j as s,co as i,c}from"./index-CpG2_v8p.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{D,g as a,x as b,h as c,N as d,b as e,j as f,v as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as c,j as i,dI as f,dJ as m,c as u,dK as g,dL as x,dM as v,dN as b,dO as h,dP as w,dQ as j,dR as N,dS as z,dT as _,dU as y,dV as p}from"./index-
|
|
1
|
+
import{e as c,j as i,dI as f,dJ as m,c as u,dK as g,dL as x,dM as v,dN as b,dO as h,dP as w,dQ as j,dR as N,dS as z,dT as _,dU as y,dV as p}from"./index-CpG2_v8p.js";import{i as $}from"./Check-DZ5PZYLO.js";import{i as D}from"./ChevronRight-Bm_e-tIB.js";import{a as M}from"./DotsVertical-CqB_Aadi.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function O(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function E(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function G(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function J(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function K(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function Q(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function U(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function V(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{C as D,T as a,L as b,O as c,Q as d,U as e,V as f,K as g,G as h,P as i,J as j,E as k};
|
package/dist/client/assets/{dynamic-plugin-layout-BsJxVywv.js → dynamic-plugin-layout-BB8gWDVj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as p,g as d,cm as l,j as s,O as u}from"./index-
|
|
1
|
+
import{e as p,g as d,cm as l,j as s,O as u}from"./index-CpG2_v8p.js";import{P as c}from"./plugin-layout-DIqP9Bzh.js";import"./use-connection-CbBvGv-y.js";import"./use-collections-dzWuZTM5.js";import"./use-mcp-client-BDuQ-DKr.js";import"./studio-tools-Cly5ZCG3.js";import"./Settings02-Cqx4N2is.js";import"./index-Vm79zSBa.js";import"./sidebar-DceLItg8.js";import"./LayoutLeft-CJ48TbRA.js";import"./tooltip-D5r7nYKO.js";import"./sheet-BlMfZj2L.js";import"./X-CRg5TH_Y.js";function $(){const e=p.c(10);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$taskId/$pluginId"},e[0]=n):n=e[0];const{pluginId:a}=d(n);let i;e[1]!==a?(i=l.find(r=>r.id===a),e[1]=a,e[2]=i):i=e[2];const t=i;if(t?.renderHeader&&t?.renderEmptyState&&t?.bindingName){let r;return e[3]!==t.bindingName||e[4]!==t.renderEmptyState||e[5]!==t.renderHeader?(r=s.jsx(c,{bindingName:t.bindingName,renderHeader:t.renderHeader,renderEmptyState:t.renderEmptyState}),e[3]=t.bindingName,e[4]=t.renderEmptyState,e[5]=t.renderHeader,e[6]=r):r=e[6],r}const o=t?.LayoutComponent;if(!o){let r;return e[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(u,{}),e[7]=r):r=e[7],r}let m;return e[8]!==o?(m=s.jsx(o,{}),e[8]=o,e[9]=m):m=e[9],m}export{$ as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as v,c as N,j as t}from"./index-
|
|
1
|
+
import{e as v,c as N,j as t}from"./index-CpG2_v8p.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,c as h,j as t,B as g}from"./index-
|
|
1
|
+
import{e as b,c as h,j as t,B as g}from"./index-CpG2_v8p.js";function y(N){const e=b.c(21),{icon:o,illustration:a,title:u,description:d,buttonProps:s,buttonComponent:x,className:j,children:p}=N;let l;e[0]!==j?(l=h("flex flex-col items-center justify-center py-16 text-center",j),e[0]=j,e[1]=l):l=e[1];let i;e[2]!==o||e[3]!==a?(i=a?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:a}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=a,e[4]=i):i=e[4];let n;e[5]!==u?(n=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:u}),e[5]=u,e[6]=n):n=e[6];let c;e[7]!==d?(c=d&&t.jsx("div",{className:"text-sm text-muted-foreground",children:d}),e[7]=d,e[8]=c):c=e[8];let r;e[9]!==n||e[10]!==c?(r=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[n,c]}),e[9]=n,e[10]=c,e[11]=r):r=e[11];let m;e[12]!==x||e[13]!==s?(m=(x??s)&&t.jsx("div",{className:"mt-4",children:x??(s&&t.jsx(g,{size:"sm",className:h(s?.className),...s}))}),e[12]=x,e[13]=s,e[14]=m):m=e[14];let f;return e[15]!==p||e[16]!==l||e[17]!==i||e[18]!==r||e[19]!==m?(f=t.jsxs("div",{className:l,children:[i,r,m,p]}),e[15]=p,e[16]=l,e[17]=i,e[18]=r,e[19]=m,e[20]=f):f=e[20],f}export{y as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as O}from"./generate-id-
|
|
1
|
+
import{g as O}from"./generate-id-DOxNmKSl.js";import"./index-CpG2_v8p.js";import{W as T,c as x}from"./use-mcp-client-BDuQ-DKr.js";const U="mcp.mesh";function H(e){if(!e)return null;const t=typeof e=="string"?e:e.url;if(!t)return null;const n=t.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function L(e){const t=H(e);if(!t)return null;const n=`https://github.com/${t.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function Y(e,t){return e===T.REGISTRY(t)||e===T.COMMUNITY_REGISTRY(t)}function F(e,t){return Y(e,t)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function q(e){if(!e)return[];const t=[];for(const n of e){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}t.push(...a)}return t}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(e){return e?D[e]??e.toUpperCase():null}function B(e){if(!e)return[];if(Array.isArray(e))return e;if(typeof e=="object"&&e!==null){const t=Object.keys(e).find(n=>Array.isArray(e[n]));if(t)return e[t]}return[]}async function J(e,t,n,a,r){const o=await x({connectionId:e,orgId:t,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}function j(e){return e._meta?.["mcp.mesh"]?.appName||e.server?.name||null}function K(e){if(!e?.url)return"Unknown";try{return new URL(e.url).hostname}catch{return e.url}}function $(e){const t=e?.identifier||e?.name;return t?t.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Q(e,t,n,a){const r=e.server,o=e._meta?.[U],s=new Date().toISOString(),I=o?.friendlyName||o?.friendly_name||e.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,C=r?.icons?.[0]?.src||L(r?.repository)||null,i=o?.oauth_config,R=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,P=o?.configuration_state,v=o?.configuration_scopes,w=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],d=r?.remotes??[],A=a?.packageIndex??0,S=a?.remoteIndex??0,y=p.length>0&&a?.packageIndex!==void 0,c=y?p[A]:null,l=y?null:d[S];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const N=d.length>1,M=p.length>1;let g="";c&&M?g=` (${$(c)})`:l&&N&&(g=` (${K(l)})`);const E=I+g;return{id:O("conn"),title:E,description:k,icon:C,app_name:j(e),app_id:o?.id||e.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:R,configuration_state:P??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:e.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:w},created_at:s,updated_at:s,created_by:n,organization_id:t,tools:null,bindings:null,status:"inactive"}}export{L as a,B as b,J as c,Q as e,q as f,j as g,F as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as b,q as k,G as q,cm as P,j as n,cn as E,b7 as R,K as S,o as K}from"./index-
|
|
1
|
+
import{e as b,q as k,G as q,cm as P,j as n,cn as E,b7 as R,K as S,o as K}from"./index-CpG2_v8p.js";import{P as j}from"./index-Vm79zSBa.js";import{d as _}from"./use-organization-settings-ofRxNgFR.js";import{S as I}from"./switch-BJt48css.js";import{n as Q}from"./Container-DNJNU1b4.js";import{b as w,S as z,a as F,c as N}from"./settings-section-ByFuwsko.js";import{R as T}from"./require-capability-BJrX_rPe.js";import"./sidebar-DceLItg8.js";import"./LayoutLeft-CJ48TbRA.js";import"./tooltip-D5r7nYKO.js";import"./sheet-BlMfZj2L.js";import"./X-CRg5TH_Y.js";import"./use-mcp-client-BDuQ-DKr.js";import"./card-CWqz0DaV.js";import"./ArrowUpRight-DjtsYmlk.js";import"./use-capability-Dp-xHWqY.js";import"./access-gate-SfXPQWUj.js";import"./capability-load-error-NgXOd2ZO.js";function U(){const e=b.c(17),{org:t,project:s}=k(),r=q();let d;e[0]!==s.enabledPlugins?(d=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=d):d=e[1];const a=d,l=_();let m;e[2]!==t||e[3]!==s.slug||e[4]!==r?(m=()=>{r.invalidateQueries({queryKey:S.project(t.id,s.slug)}),r.invalidateQueries({queryKey:S.projects(t.id)}),r.invalidateQueries({predicate:i=>{const o=i.queryKey;return o[1]===t.id&&o[3]==="collection"&&o[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=r,e[5]=m):m=e[5];const x=m;let p;e[6]!==x||e[7]!==l||e[8]!==a?(p=(i,o)=>{const u=new Set(a);o?u.add(i):u.delete(i),l.mutate({enabled_plugins:Array.from(u)},{onSuccess:x,onError:G})},e[6]=x,e[7]=l,e[8]=a,e[9]=p):p=e[9];const g=p,y=D,C=A;if(P.length===0){let i;return e[10]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=i):i=e[10],i}let c;e[11]!==g||e[12]!==l||e[13]!==a?(c=P.map(i=>{const o=y(i.id),u=C(i.id),h=a.includes(i.id);return n.jsx(w,{title:o?.label??i.id,description:u??void 0,icon:n.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:o?.icon??n.jsx(Q,{size:14})}),onClick:()=>!l.isPending&&g(i.id,!h),action:n.jsx(I,{checked:h,onCheckedChange:v=>g(i.id,v),disabled:l.isPending,onClick:$})},i.id)}),e[11]=g,e[12]=l,e[13]=a,e[14]=c):c=e[14];let f;return e[15]!==c?(f=n.jsx(z,{children:n.jsx(F,{children:c})}),e[15]=c,e[16]=f):f=e[16],f}function $(e){return e.stopPropagation()}function A(e){return P.find(s=>s.id===e)?.description??null}function D(e){const t=E.find(r=>r.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=R.find(r=>r.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function G(e){K.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function M(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(j,{children:n.jsx(j.Content,{children:n.jsx(j.Body,{children:n.jsxs(N,{children:[n.jsx(j.Title,{children:"Plugins"}),n.jsx(U,{})]})})})}),e[0]=t):t=e[0],t}function ae(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(T,{capability:"org:manage",area:"plugins",children:n.jsx(M,{})}),e[0]=t):t=e[0],t}export{ae as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{e as Ke,r as l,j as i,l as re,B as fe,c as Ve,G as ut,o as $,K as Te}from"./index-CpG2_v8p.js";import{F as mt,l as pt}from"./index-D-Er7K2V.js";import{_ as ht,ar as xt,as as gt,at as ae,au as yt,H as $e}from"./agent-icon-C_8D2J-7.js";import{a as wt}from"./Tool01-BxT6lP7E.js";import{s as jt}from"./XClose-D72Lt3NI.js";import{S as bt}from"./scroll-area-CFrtCBLi.js";import{b as Re,T as Oe,a as ze}from"./tooltip-D5r7nYKO.js";import{A as vt,a as Ct,b as Nt,c as St,d as Dt,e as kt,f as Ft,g as Lt}from"./alert-dialog-CbYM4jmz.js";import{a as Et}from"./chat-context-BoAn6xWM.js";import{u as Pt}from"./shell-layout-NuYzN-Gn.js";import{a7 as le,a8 as Ae,a9 as Tt}from"./index-DdTSg63X.js";import{c as $t,e as Rt,b as Ot,d as zt,a as At,D as Wt}from"./dialog-DzWL-NrT.js";import{I as We}from"./input-BWjbzzQM.js";import{C as It,c as _,d as Ie,e as Mt,f as Kt}from"./shell-route-loading-DCVHDrWy.js";import{t as Vt}from"./ChevronDown-CGeYjJAK.js";import{i as Bt}from"./ChevronRight-Bm_e-tIB.js";import{i as Gt}from"./ZoomOut-zDFXRspK.js";import{E as qt,q as Me,r as he,s as Qt,t as Ut,v as Ht,w as M,x as ce,g as xe,y as ge,z as Jt,A as Xt,B as ye,C as de,D as we,G as Yt,I as Zt}from"./header-tab-button-BDD5kZQa.js";import"./AlertCircle-CIkJ_tva.js";import"./SwitchHorizontal01-Bsjx9paN.js";import"./RefreshCcw01-D1X4YmG3.js";import"./XCircle-DkwGk6Y1.js";import"./ArrowUpRight-DjtsYmlk.js";import"./ZapSquare-BqiIusHB.js";import"./Users03-DT_R5tz6.js";import"./CheckCircle-DyJzuYoS.js";import"./Check-DZ5PZYLO.js";import"./ChevronLeft-DWiixe45.js";import"./ChevronUp-BCv26pBY.js";import"./DotsVertical-CqB_Aadi.js";import"./Container-DNJNU1b4.js";import"./Eye-MkeUTfT3.js";import"./Globe01-xZhhj276.js";import"./FilterLines-CfVg89f7.js";import"./Star01-4yFjK6bh.js";import"./Palette-CmO3ZuPu.js";import"./HardDrive-CtdIy8yR.js";import"./Stars02-BLn35DBB.js";import"./Key01-CXIWciFj.js";import"./LayoutLeft-CJ48TbRA.js";import"./LinkExternal01-Bi6In-BW.js";import"./Monitor01-CsSfQSQt.js";import"./Sun-FelsR2hx.js";import"./Play-CQ97sIka.js";import"./Plus-CTho-g8m.js";import"./SearchMd-BVJBwCEd.js";import"./Settings02-Cqx4N2is.js";import"./Shield01-D5OMek_B.js";import"./Stars01-DWbsIFJF.js";import"./Trash01-BczIIm5v.js";import"./Upload01-nIFiyRcG.js";import"./User01-CamUMrWb.js";import"./Users01-CgFieXMp.js";import"./X-CRg5TH_Y.js";import"./Zap-B-Fg7TEp.js";import"./select-B0qONt_m.js";import"./tab-id-Cgg9_UqF.js";import"./use-mcp-client-BDuQ-DKr.js";import"./decopilot-sse-pool-CJ_QbSiL.js";import"./create-sse-subscription-BS5983N4.js";import"./studio-tools-Cly5ZCG3.js";import"./use-virtual-mcp-BOy7A3-I.js";import"./use-collections-dzWuZTM5.js";import"./use-ai-providers-BMK8G5pd.js";import"./use-organization-settings-ofRxNgFR.js";import"./avatar-Bf_YMKWh.js";import"./required-auth-layout-CzrHHdU9.js";import"./useRouterState-BIyanAgq.js";import"./use-org-sso-BO0DGPVQ.js";import"./agent-capabilities-QxThXvgQ.js";import"./pair-D1IR0Baq.js";import"./use-clock-tick-Dkz_tj-X.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CP7WU0J2.js";import"./file-type-icon-9WcINLx3.js";import"./content-blocks-o63cs2vh.js";import"./types-DIAQ40QE.js";import"./integration-icon-Jhe4mXPc.js";import"./use-navigate-to-agent-CLdhXO-i.js";import"./use-connection-CbBvGv-y.js";import"./use-mcp-prompts-BfczuqQ1.js";import"./form-DK41bruw.js";import"./label-BD30ND7M.js";import"./spinner-B8QiOf4h.js";import"./drawer-BLGCEP9S.js";import"./collection-search-Bk4YcOKu.js";import"./tabs-B1x7Fe-S.js";import"./toggle-group-DVdH8zGh.js";import"./connect-desktop-dialog-BIhfHnnr.js";import"./agent-icons-DozoyM-L.js";import"./checkbox-C5cEV_DH.js";import"./skeleton-07IZijZM.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-ByFuwsko.js";import"./card-CWqz0DaV.js";import"./popover-w66kr7qI.js";import"./command-CFpCNmCF.js";import"./index-rP7Vi9h6.js";import"./useInfiniteQuery-BA4Q5DOk.js";import"./infiniteQueryObserver-DKFzmh7N.js";import"./sortable.esm-CzY2WOGE.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-B1-pvTAQ.js";import"./use-registry-connections-Clpq_83P.js";import"./extract-connection-data-DzgWcXVA.js";import"./generate-id-DOxNmKSl.js";import"./collections-CG_8shjq.js";import"./collection-tabs-CSSbV4je.js";import"./badge-Di1xo__6.js";import"./textarea-CgmDS1mc.js";import"./connection-form-helpers-oVYdKzFk.js";import"./use-infinite-scroll-Dz0Ju18S.js";import"./useSuspenseInfiniteQuery-PHI3OnKC.js";import"./index-B6yJwY9r.js";import"./dropdown-menu-YzbwHIxx.js";import"./question-004-sINsf4GQ.js";import"./sidebar-DceLItg8.js";import"./sheet-BlMfZj2L.js";import"./use-status-sounds-BQhIBN31.js";import"./empty-state-CEcNMd77.js";import"./toolbar-CXAxzeUh.js";import"./resizable-B8hoAXbl.js";import"./use-mcp-tools-xqS_ta53.js";import"./use-capability-Dp-xHWqY.js";import"./user-DjbLcTMi.js";import"./tools-list-B226mv7W.js";import"./switch-BJt48css.js";import"./use-debounced-autosave-7E-JkkEV.js";import"./index-Vm79zSBa.js";import"./search-input-BXsljctW.js";import"./use-secrets-CjbHuNwC.js";import"./github-repo-picker-BJ45Iuw_.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./accordion-DKdXwYYc.js";import"./view-mode-toggle-DnMmKH1O.js";import"./select-model-DV1J8lbW.js";import"./use-automations-CqVVjbv4.js";import"./monaco-editor-CO97GxVj.js";import"./automation-runs-ByMFrYpg.js";import"./table-3evUHy3g.js";import"./use-members-DH5dae5S.js";import"./use-org-auth-client-BwDW-s0s.js";import"./task-status-F5X71Or6.js";import"./automation-list-row-DaUVjzEO.js";import"./use-create-virtual-mcp-Dz02gDB8.js";import"./index-CghQMTVW.js";import"./hover-card-C0gmU-KR.js";const _t={"new-file":{title:"New File",description:"Enter a name for the new file.",submit:"Create",placeholder:"filename.ts"},"new-folder":{title:"New Folder",description:"Enter a name for the new folder.",submit:"Create",placeholder:"folder-name"},rename:{title:"Rename",description:"Enter a new name for this item.",submit:"Rename",placeholder:"new-name"}};function en(y){const e=Ke.c(51),{open:c,mode:K,initialName:X,parentLabel:Q,isPending:A,onSubmit:V,onOpenChange:P}=y,W=X===void 0?"":X,o=A===void 0?!1:A,[p,R]=l.useState(W),[I,B]=l.useState(c),f=_t[K];c!==I&&(B(c),c&&R(W));let F;e[0]!==o||e[1]!==P?(F=E=>{!E&&!o&&P(!1)},e[0]=o,e[1]=P,e[2]=F):F=e[2];const U=F;let G;e[3]!==o||e[4]!==p||e[5]!==V?(G=async E=>{E.preventDefault();const z=p.trim();!z||o||await V(z)},e[3]=o,e[4]=p,e[5]=V,e[6]=G):G=e[6];const q=G;let L;e[7]!==f.title?(L=i.jsx($t,{children:f.title}),e[7]=f.title,e[8]=L):L=e[8];let N;e[9]!==f.description?(N=i.jsx(Rt,{children:f.description}),e[9]=f.description,e[10]=N):N=e[10];let O;e[11]!==L||e[12]!==N?(O=i.jsxs(Ot,{children:[L,N]}),e[11]=L,e[12]=N,e[13]=O):O=e[13];let S;e[14]!==Q?(S=Q&&i.jsxs("div",{className:"space-y-1.5",children:[i.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Location"}),i.jsx(We,{value:Q,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[14]=Q,e[15]=S):S=e[15];let D;e[16]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:"Name"}),e[16]=D):D=e[16];let j;e[17]===Symbol.for("react.memo_cache_sentinel")?(j=E=>R(E.target.value),e[17]=j):j=e[17];let b;e[18]!==f.placeholder||e[19]!==o||e[20]!==p?(b=i.jsxs("div",{className:"space-y-1.5",children:[D,i.jsx(We,{id:"file-explorer-name",value:p,onChange:j,placeholder:f.placeholder,autoFocus:!0,disabled:o})]}),e[18]=f.placeholder,e[19]=o,e[20]=p,e[21]=b):b=e[21];let h;e[22]!==b||e[23]!==S?(h=i.jsxs("div",{className:"space-y-4 py-4",children:[S,b]}),e[22]=b,e[23]=S,e[24]=h):h=e[24];let x;e[25]!==P?(x=()=>P(!1),e[25]=P,e[26]=x):x=e[26];let v;e[27]!==o||e[28]!==x?(v=i.jsx(fe,{type:"button",variant:"outline",onClick:x,disabled:o,children:"Cancel"}),e[27]=o,e[28]=x,e[29]=v):v=e[29];let C;e[30]!==o||e[31]!==p?(C=!p.trim()||o,e[30]=o,e[31]=p,e[32]=C):C=e[32];let u;e[33]!==f.submit||e[34]!==o?(u=o?i.jsxs(i.Fragment,{children:[i.jsx(re,{size:14,className:"animate-spin"}),"Saving…"]}):f.submit,e[33]=f.submit,e[34]=o,e[35]=u):u=e[35];let k;e[36]!==C||e[37]!==u?(k=i.jsx(fe,{type:"submit",disabled:C,children:u}),e[36]=C,e[37]=u,e[38]=k):k=e[38];let m;e[39]!==v||e[40]!==k?(m=i.jsxs(zt,{children:[v,k]}),e[39]=v,e[40]=k,e[41]=m):m=e[41];let g;e[42]!==q||e[43]!==h||e[44]!==m||e[45]!==O?(g=i.jsx(At,{className:"sm:max-w-md",children:i.jsxs("form",{onSubmit:q,children:[O,h,m]})}),e[42]=q,e[43]=h,e[44]=m,e[45]=O,e[46]=g):g=e[46];let T;return e[47]!==U||e[48]!==c||e[49]!==g?(T=i.jsx(Wt,{open:c,onOpenChange:U,children:g}),e[47]=U,e[48]=c,e[49]=g,e[50]=T):T=e[50],T}const tn="#d9a441";function nn(y){const e=Ke.c(45),{node:c,depth:K,isExpanded:X,isSelected:Q,isLoading:A,fileVisual:V,onOpen:P,onSelect:W,onNewFile:o,onNewFolder:p,onCopyPath:R,onCopyRelativePath:I,onRename:B,onDelete:f}=y,F=A===void 0?!1:A,U=c.kind==="directory",{Icon:G,color:q}=V,L=Q&&"bg-accent";let N;e[0]!==L?(N=Ve("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",L),e[0]=L,e[1]=N):N=e[1];const O=`${K*14+8}px`;let S;e[2]!==O?(S={paddingLeft:O},e[2]=O,e[3]=S):S=e[3];let D;e[4]!==P||e[5]!==W?(D=()=>{W(),P()},e[4]=P,e[5]=W,e[6]=D):D=e[6];let j;e[7]!==G||e[8]!==q||e[9]!==U||e[10]!==X||e[11]!==F?(j=U?i.jsxs(i.Fragment,{children:[F?i.jsx(re,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):X?i.jsx(Vt,{size:14,className:"shrink-0 text-muted-foreground"}):i.jsx(Bt,{size:14,className:"shrink-0 text-muted-foreground"}),i.jsx(Gt,{size:16,className:"shrink-0",style:{color:tn}})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"w-3.5 shrink-0"}),i.jsx(G,{size:16,className:"shrink-0",style:{color:q}})]}),e[7]=G,e[8]=q,e[9]=U,e[10]=X,e[11]=F,e[12]=j):j=e[12];let b;e[13]!==c.name?(b=i.jsx("span",{className:"truncate",children:c.name}),e[13]=c.name,e[14]=b):b=e[14];let h;e[15]!==N||e[16]!==S||e[17]!==D||e[18]!==j||e[19]!==b?(h=i.jsx(It,{asChild:!0,children:i.jsxs("button",{type:"button",className:N,style:S,onClick:D,children:[j,b]})}),e[15]=N,e[16]=S,e[17]=D,e[18]=j,e[19]=b,e[20]=h):h=e[20];let x;e[21]!==o?(x=i.jsx(_,{onSelect:o,children:"New File"}),e[21]=o,e[22]=x):x=e[22];let v;e[23]!==p?(v=i.jsx(_,{onSelect:p,children:"New Folder"}),e[23]=p,e[24]=v):v=e[24];let C;e[25]===Symbol.for("react.memo_cache_sentinel")?(C=i.jsx(Ie,{}),e[25]=C):C=e[25];let u;e[26]!==R?(u=i.jsx(_,{onSelect:R,children:"Copy Path"}),e[26]=R,e[27]=u):u=e[27];let k;e[28]!==I?(k=i.jsx(_,{onSelect:I,children:"Copy Relative Path"}),e[28]=I,e[29]=k):k=e[29];let m;e[30]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ie,{}),e[30]=m):m=e[30];let g;e[31]!==B?(g=i.jsx(_,{onSelect:B,children:"Rename"}),e[31]=B,e[32]=g):g=e[32];let T;e[33]!==f?(T=i.jsx(_,{variant:"destructive",onSelect:f,children:"Delete"}),e[33]=f,e[34]=T):T=e[34];let E;e[35]!==x||e[36]!==v||e[37]!==u||e[38]!==k||e[39]!==g||e[40]!==T?(E=i.jsxs(Mt,{className:"w-52",children:[x,v,C,u,k,m,g,T]}),e[35]=x,e[36]=v,e[37]=u,e[38]=k,e[39]=g,e[40]=T,e[41]=E):E=e[41];let z;return e[42]!==E||e[43]!==h?(z=i.jsxs(Kt,{children:[h,E]}),e[42]=E,e[43]=h,e[44]=z):z=e[44],z}pt.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function je(y,e,c,K){return`/api/${y}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(c)}/${K}`}function rn(y){const e=M(y);return!e||e.includes("..")||e.includes("\\")?!1:e.startsWith(".deco/blocks/")||!e.startsWith("/")&&!e.includes("://")}const sn="#94a3b8";function on(y){const e=y.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?{Icon:ae,color:"#3b82f6"}:e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?{Icon:ae,color:"#d9a441"}:e.endsWith(".json")?{Icon:yt,color:"#cb9b3f"}:e.endsWith(".css")||e.endsWith(".scss")?{Icon:ae,color:"#06b6d4"}:e.endsWith(".html")||e.endsWith(".xml")?{Icon:ae,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(e)?{Icon:wt,color:"#a855f7"}:e.endsWith(".md")||e.endsWith(".mdx")?{Icon:$e,color:"#64748b"}:{Icon:$e,color:sn}}function Qi({orgSlug:y,virtualMcpId:e,branch:c,openPath:K}){const[X,Q]=l.useState({files:[],directories:[],truncated:!1}),{files:A,directories:V}=X,[P,W]=l.useState(new Set),[o,p]=l.useState(null),[R,I]=l.useState(null),[B,f]=l.useState([]),[F,U]=l.useState(""),[G,q]=l.useState(!1),[L,N]=l.useState(!1),[,O]=l.useState(new Set),[S,D]=l.useState(new Set),j=l.useRef(0),b=l.useRef(null),h=l.useRef(new Set),x=l.useRef(new Map);function v(t){O(n=>{const r=typeof t=="function"?t(n):t;return h.current=r,r})}const[C,u]=l.useState(new Map),k=l.useRef(null),[m,g]=l.useState(null),{sendMessage:T}=Et(),{setChatOpen:E}=Pt(),z=ut(),[w,H]=l.useState(null),[J,ue]=l.useState(null),[ee,ie]=l.useState(!1);async function te(t,n){const r=await fetch(je(y,e,c,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const s=await r.json().catch(()=>({}));throw new Error(s.error??`Request failed (${r.status})`)}return r.json()}async function se(){z.invalidateQueries({queryKey:Ae(y,e,c)})}function be(t,n){navigator.clipboard.writeText(n).then(()=>$.success(`${t} copied`),()=>$.error(`Failed to copy ${t.toLowerCase()}`))}function Be(t){const n=Yt(t);if(!n)return;const r=`${y}/${e}/${c}`;z.setQueryData(Te.decofile(r),s=>{if(!s)return s;const{[n]:a,...d}=s;return d}),z.invalidateQueries({queryKey:Te.liveMeta(r)})}function Ge(t){const n=t.kind==="file"?[t.path]:A.filter(r=>r.startsWith(".deco/blocks/")).map(r=>ce(r)).filter(r=>r===t.path||r.startsWith(`${t.path}/`));for(const r of n)Be(r)}function qe(t){const n=ce(t);return B.filter(r=>{if(r!==n&&!r.startsWith(`${n}/`))return!1;const s=C.get(r);return!!(s?.loaded&&s.editorValue!==s.savedContent)})}function ve(t){f(n=>n.map(r=>t(r)).filter(r=>r!==null)),p(n=>n&&t(n)),u(n=>{const r=new Map;for(const[s,a]of n){const d=t(s);d&&r.set(d,a)}return r}),I(n=>{if(!n)return n;const r=t(n.path);return r?r===n.path?n:{...n,path:r,name:r.split("/").pop()??r}:null})}function Qe(t){const n=ce(t);I(r=>r&&(r.path===n||r.path.startsWith(`${n}/`)?null:r)),ve(r=>r===n||r.startsWith(`${n}/`)?null:r)}async function Ue(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);await te("write",{path:M(n),content:""}),await ne(),await se(),H(null),me(n)}async function He(t){if(!w)return;const n=de(w.parentDir,t);if(we(n,A,V))throw new Error(`"${t}" already exists`);const r=M(n);await te("mkdir",{path:r}),Q(s=>({...s,directories:s.directories.includes(r)?s.directories:[...s.directories,r]})),await ne(),await se(),H(null),W(s=>{const a=new Set(s);for(const d of he(n))a.add(d);return a.add(n),a}),I({name:t,path:n,kind:"directory",children:[]})}async function Je(t){if(!w)return;const n=w.node.path,r=ye(n),s=de(r,t);if(s===n){H(null);return}if(we(s,A,V))throw new Error(`"${t}" already exists`);await te("rename",{from:M(n),to:M(s)}),ve(a=>a===n?s:a.startsWith(`${n}/`)?de(s,a.slice(n.length+1)):a),await ne(),await se(),H(null)}async function Xe(t){ie(!0);try{await te("unlink",{path:M(t.path),recursive:t.kind==="directory"}),Ge(t),Qe(t.path),await ne(),await se(),ue(null),$.success(`Deleted "${t.name}"`)}catch(n){$.error(n instanceof Error?n.message:"Delete failed")}finally{ie(!1)}}async function Ye(t){const n=Xt(t);if(n){$.error(n);return}ie(!0);try{w?.mode==="new-file"?(await Ue(t),$.success(`Created "${t}"`)):w?.mode==="new-folder"?(await He(t),$.success(`Created folder "${t}"`)):w?.mode==="rename"&&(await Je(t),$.success(`Renamed to "${t}"`))}catch(r){$.error(r instanceof Error?r.message:"Operation failed")}finally{ie(!1)}}const Ce=l.useRef(!1);Ce.current||(Ce.current=!0,b.current=ne());const[Ze,_e]=l.useState(null);if(K&&K!==Ze){_e(K);const t=K;queueMicrotask(()=>{rn(t)&&me(t).catch(n=>{$.error(n instanceof Error?n.message:"Failed to open file")})})}async function Ne(t){const n=await te("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Se(t,n,r){if(r!==j.current)return!1;let s=!1;return Q(a=>{const d=n?Zt(a.files,a.directories,t,a.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return s=!!d.truncated,{files:d.files,directories:d.directories,truncated:s}}),s&&$.warning("File list truncated — some files may be hidden"),s}async function et(t){const n=x.current.get(t);if(n)return n;const r=j.current,s=(async()=>{const a=await Ne({pattern:"**/*",path:M(t),limit:Me}),d=Se(a,!0,r);return!d&&r===j.current&&v(Y=>{const oe=new Set(Y);return oe.add(t),oe}),d})();x.current.set(t,s);try{return await s}finally{x.current.delete(t)}}async function De(t){if(!ge(t,h.current))return!1;D(n=>new Set(n).add(t));try{return await et(t)}finally{D(n=>{const r=new Set(n);return r.delete(t),r})}}async function tt(t){const n=new Set(h.current);for(const r of he(t)){if(!ge(r,n))continue;if(await De(r))throw new Error("Folder listing truncated — expand again to load more");n.add(r)}}async function ne(){const t=++j.current;x.current.clear(),q(!0),v(new Set),W(new Set),D(new Set);try{const n=await Ne({pattern:"**/*",limit:Me,maxDepth:qt});Se(n,!1,t),N(!0)}catch{L&&$.error("Failed to refresh file tree")}finally{q(!1)}}async function ke(t){if(!C.get(t)?.loaded){u(r=>{const s=new Map(r);return s.set(t,{savedContent:"",editorValue:"",loaded:!1}),s});try{const r=await fetch(je(y,e,c,"read"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),full:!0})});if(!r.ok)return;const s=await r.json(),a=Jt(s.content??"");u(d=>{const Y=new Map(d);return Y.set(t,{savedContent:a,editorValue:a,loaded:!0}),Y})}catch{}}}async function nt(t,n){try{const r=await fetch(je(y,e,c,"write"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:M(t),content:n})});if(!r.ok){le("file save failed",{path:t,status:r.status});return}le("file saved via sandbox /write",{path:t}),z.invalidateQueries({queryKey:Ae(y,e,c)});try{const s=await Tt(y,e,c);le("git status after save",s)}catch(s){le("git status after save failed",{path:t,error:s instanceof Error?s.message:String(s)})}u(s=>{const a=new Map(s),d=a.get(t);return d&&a.set(t,{...d,savedContent:n}),a})}catch{}}function rt(t){p(t),I({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),g(null),B.includes(t)||f(n=>[...n,t]),ke(t)}function it(t){f(n=>{const r=n.filter(s=>s!==t);return o===t&&p(r[r.length-1]??null),r}),u(n=>{const r=new Map(n);return r.delete(t),r})}function Fe(t){W(n=>{const r=new Set(n);return r.has(t)?r.delete(t):r.add(t),r})}async function st(t){if(ge(t,h.current))try{if(await De(t))return}catch(n){$.error(n instanceof Error?n.message:"Failed to load folder");return}Fe(t)}async function ot(t,n){if(n){Fe(t);return}await st(t)}async function me(t){await b.current,await tt(t);const n=he(t);W(r=>{const s=new Set(r);for(const a of n)s.add(a);return s}),rt(t)}function at(){return R?.kind==="directory"?R.path:R?.kind==="file"?ye(R.path):o?ye(o):"/"}function Le(t){const n=at();H({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const lt=Qt(A,V),Ee=Ut(lt,P),Pe=F?Ee.filter(t=>t.node.name.toLowerCase().includes(F.toLowerCase())):Ee,Z=o?C.get(o):null,ct=Z?.loaded&&Z.editorValue!==Z.savedContent,pe=J?qe(J.path):[],dt=(t,n)=>{k.current=t,t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!o)return;const r=t.getValue();await nt(o,r)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const r=t.getSelection(),s=t.getModel();if(!r||!s||!o)return;const a=s.getValueInRange(r);g({filePath:o,lineStart:r.startLineNumber,lineEnd:r.endLineNumber,selectedCode:a})})};function ft(t){if(!m)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${m.filePath}\``,`**Lines:** ${m.lineStart}–${m.lineEnd}`];if(m.selectedCode){const r=xe(m.filePath),s=m.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+r,s,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),E(!0),T({parts:[{type:"text",text:n.join(`
|
|
2
|
+
`)}]}),g(null)}return G&&!L?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[i.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[i.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[i.jsxs("div",{className:"relative min-w-0 flex-1",children:[i.jsx(ht,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),i.jsx("input",{type:"text",value:F,onChange:t=>U(t.target.value),placeholder:"Search files...","aria-label":"Search files",className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New file",onClick:()=>Le("new-file"),children:i.jsx(xt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New file"})]}),i.jsxs(Re,{children:[i.jsx(Oe,{asChild:!0,children:i.jsx(fe,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":"New folder",onClick:()=>Le("new-folder"),children:i.jsx(gt,{size:14})})}),i.jsx(ze,{side:"bottom",children:"New folder"})]})]}),i.jsx(bt,{className:"flex-1",children:i.jsxs("div",{className:"py-1",children:[Pe.map(t=>{const{node:n,depth:r}=t,s=n.kind==="directory",a=P.has(n.path),d=R?.path===n.path,Y=Ht(n.path,n.kind),oe=s&&S.has(n.path);return i.jsx(nn,{node:n,depth:r,isExpanded:a,isSelected:d,isLoading:oe,fileVisual:on(n.name),onSelect:()=>I(n),onOpen:()=>{s?ot(n.path,a):me(n.path)},onNewFile:()=>H({mode:"new-file",node:n,parentDir:Y}),onNewFolder:()=>H({mode:"new-folder",node:n,parentDir:Y}),onCopyPath:()=>be("Path",ce(n.path)),onCopyRelativePath:()=>be("Relative path",M(n.path)),onRename:()=>H({mode:"rename",node:n,parentDir:Y}),onDelete:()=>ue(n)},n.path)}),L&&Pe.length===0&&i.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:F?`No files match "${F}"`:"No files found"})]})})]}),i.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[B.length>0&&i.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:B.map(t=>{const n=C.get(t),r=n?.loaded&&n.editorValue!==n.savedContent,s=o===t,a=t.split("/").pop()??t;return i.jsxs("div",{className:Ve("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",s?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{p(t),ke(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":s,children:[i.jsx("span",{className:"truncate max-w-32",children:a}),r&&i.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),i.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:d=>{d.stopPropagation(),it(t)},children:i.jsx(jt,{size:12})})]},t)})}),m&&i.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:i.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const r=t.currentTarget.elements.namedItem("askAiInput");r.value.trim()&&ft(r.value)},children:[i.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:"Ask the AI...",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&g(null)}}),i.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:"Send",children:i.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[i.jsx("title",{children:"Send"}),i.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),i.jsx("div",{className:"flex-1 overflow-hidden",children:o&&Z?.loaded?i.jsx(mt,{language:xe(o),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:Z.editorValue,path:o,onChange:t=>{const n=o;n&&u(r=>{const s=new Map(r),a=s.get(n);return a&&s.set(n,{...a,editorValue:t??""}),s})},onMount:dt,loading:i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},o):o&&!Z?.loaded?i.jsx("div",{className:"flex items-center justify-center h-full w-full",children:i.jsx(re,{size:20,className:"animate-spin text-muted-foreground"})}):i.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:"Select a file to edit"})}),o&&i.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[i.jsx("span",{className:"truncate",children:o}),i.jsxs("span",{children:[ct?"Modified":"Saved"," ·"," ",xe(o)]})]})]}),i.jsx(en,{open:w!==null,mode:w?.mode??"new-file",initialName:w?.mode==="rename"?w.node.name:"",parentLabel:w&&w.mode!=="rename"?w.parentDir==="/"?"/":M(w.parentDir):void 0,isPending:ee,onSubmit:Ye,onOpenChange:t=>{!t&&!ee&&H(null)}}),i.jsx(vt,{open:J!==null,onOpenChange:t=>{!t&&!ee&&ue(null)},children:i.jsxs(Ct,{children:[i.jsxs(Nt,{children:[i.jsxs(St,{children:["Delete ",J?.kind==="directory"?"folder":"file","?"]}),i.jsxs(Dt,{children:["This will permanently delete"," ",i.jsx("span",{className:"font-mono",children:J?.name}),J?.kind==="directory"?" and everything inside it.":".",pe.length>0&&i.jsxs(i.Fragment,{children:[" ",pe.length===1?"One open file has unsaved changes that will be lost.":`${pe.length} open files have unsaved changes that will be lost.`]})]})]}),i.jsxs(kt,{children:[i.jsx(Ft,{disabled:ee,children:"Cancel"}),i.jsx(Lt,{disabled:ee||!J,onClick:t=>{t.preventDefault(),J&&Xe(J)},children:"Delete"})]})]})})]})}export{Qi as FileExplorer};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bC as zl,j as $,b5 as st,bD as zn,r as ut,bE as p0,c as f0,e as Tt,B as Hb}from"./index-
|
|
1
|
+
import{bC as zl,j as $,b5 as st,bD as zn,r as ut,bE as p0,c as f0,e as Tt,B as Hb}from"./index-CpG2_v8p.js";import{i as qb}from"./Check-DZ5PZYLO.js";import{a as Gb}from"./Eye-MkeUTfT3.js";import{D as g0,g as m0,h as h0,c as b0}from"./dialog-DzWL-NrT.js";import{n as E0}from"./Globe01-xZhhj276.js";import{g as T0,n as S0}from"./ZoomOut-zDFXRspK.js";function jl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Nt=jl();function $b(e){Nt=e}var ln={exec:()=>null};function le(e,t=""){let n=typeof e=="string"?e:e.source;const r={replace:(a,i)=>{let o=typeof i=="string"?i:i.source;return o=o.replace(xe.caret,"$1"),n=n.replace(a,o),r},getRegex:()=>new RegExp(n,t)};return r}var xe={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},y0=/^(?:[ \t]*(?:\n|$))+/,A0=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,_0=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,_n=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,I0=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vl=/(?:[*+-]|\d{1,9}[.)])/,zb=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,jb=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),k0=le(zb).replace(/bull/g,Vl).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,R0=/^[^\n]+/,Wl=/(?!\s*\])(?:\\.|[^\[\]\\])+/,N0=le(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Wl).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),C0=le(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Vl).getRegex(),er="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Kl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,v0=le("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Kl).replace("tag",er).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Vb=le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),w0=le(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Vb).getRegex(),Xl={blockquote:w0,code:A0,def:N0,fences:_0,heading:I0,hr:_n,html:v0,lheading:jb,list:C0,newline:y0,paragraph:Vb,table:ln,text:R0},Dc=le("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex(),x0={...Xl,lheading:k0,table:Dc,paragraph:le(Yl).replace("hr",_n).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Dc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",er).getRegex()},O0={...Xl,html:le(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Kl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ln,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:le(Yl).replace("hr",_n).replace("heading",` *#{1,6} *[^
|
|
2
2
|
]`).replace("lheading",jb).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},L0=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,D0=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Yb=/^( {2,}|\\)\n(?!\s*$)/,M0=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,tr=/[\p{P}\p{S}]/u,Zl=/[\s\p{P}\p{S}]/u,Wb=/[^\s\p{P}\p{S}]/u,P0=le(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zl).getRegex(),Kb=/(?!~)[\p{P}\p{S}]/u,F0=/(?!~)[\s\p{P}\p{S}]/u,B0=/(?:[^\s\p{P}\p{S}]|~)/u,U0=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,Xb=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,H0=le(Xb,"u").replace(/punct/g,tr).getRegex(),q0=le(Xb,"u").replace(/punct/g,Kb).getRegex(),Zb="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",G0=le(Zb,"gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),$0=le(Zb,"gu").replace(/notPunctSpace/g,B0).replace(/punctSpace/g,F0).replace(/punct/g,Kb).getRegex(),z0=le("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Wb).replace(/punctSpace/g,Zl).replace(/punct/g,tr).getRegex(),j0=le(/\\(punct)/,"gu").replace(/punct/g,tr).getRegex(),V0=le(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Y0=le(Kl).replace("(?:-->|$)","-->").getRegex(),W0=le("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Y0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),jn=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,K0=le(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",jn).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Qb=le(/^!?\[(label)\]\[(ref)\]/).replace("label",jn).replace("ref",Wl).getRegex(),Jb=le(/^!?\[(ref)\](?:\[\])?/).replace("ref",Wl).getRegex(),X0=le("reflink|nolink(?!\\()","g").replace("reflink",Qb).replace("nolink",Jb).getRegex(),Ql={_backpedal:ln,anyPunctuation:j0,autolink:V0,blockSkip:U0,br:Yb,code:D0,del:ln,emStrongLDelim:H0,emStrongRDelimAst:G0,emStrongRDelimUnd:z0,escape:L0,link:K0,nolink:Jb,punctuation:P0,reflink:Qb,reflinkSearch:X0,tag:W0,text:M0,url:ln},Z0={...Ql,link:le(/^!?\[(label)\]\((.*?)\)/).replace("label",jn).getRegex(),reflink:le(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",jn).getRegex()},_l={...Ql,emStrongRDelimAst:$0,emStrongLDelim:q0,url:le(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Q0={..._l,br:le(Yb).replace("{2,}","*").getRegex(),text:le(_l.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},xn={normal:Xl,gfm:x0,pedantic:O0},Jt={normal:Ql,gfm:_l,breaks:Q0,pedantic:Z0},J0={"&":"&","<":"<",">":">",'"':""","'":"'"},Mc=e=>J0[e];function Ze(e,t){if(t){if(xe.escapeTest.test(e))return e.replace(xe.escapeReplace,Mc)}else if(xe.escapeTestNoEncode.test(e))return e.replace(xe.escapeReplaceNoEncode,Mc);return e}function Pc(e){try{e=encodeURI(e).replace(xe.percentDecode,"%")}catch{return null}return e}function Fc(e,t){const n=e.replace(xe.findPipe,(i,o,s)=>{let u=!1,l=o;for(;--l>=0&&s[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(xe.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(xe.slashPipe,"|");return r}function en(e,t,n){const r=e.length;if(r===0)return"";let a=0;for(;a<r&&e.charAt(r-a-1)===t;)a++;return e.slice(0,r-a)}function eS(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Bc(e,t,n,r,a){const i=t.href,o=t.title||null,s=e[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,u}function tS(e,t,n){const r=e.match(n.other.indentCodeCompensation);if(r===null)return t;const a=r[1];return t.split(`
|
|
3
3
|
`).map(i=>{const o=i.match(n.other.beginningSpace);if(o===null)return i;const[s]=o;return s.length>=a.length?i.slice(a.length):i}).join(`
|
|
4
4
|
`)}var Vn=class{options;rules;lexer;constructor(e){this.options=e||Nt}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:en(n,`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as a,g as o,j as i,N as l}from"./index-
|
|
1
|
+
import{e as a,g as o,j as i,N as l}from"./index-CpG2_v8p.js";function m(){const e=a.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{org:r}=o(t);let s;return e[1]!==r?(s=i.jsx(l,{to:"/$org/files",params:{org:r},replace:!0}),e[1]=r,e[2]=s):s=e[2],s}export{m as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cD as C,e as f,j as c,D as j,r as d,c as p,bn as b,cE as v,cF as h}from"./index-
|
|
1
|
+
import{cD as C,e as f,j as c,D as j,r as d,c as p,bn as b,cE as v,cF as h}from"./index-CpG2_v8p.js";import{L as N}from"./label-BD30ND7M.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as M,q as B,G as U,H as Q,I as H,a as $,t as P,o as D,K as I,j as n,D as L,T as Y,W as k,e as E,r as T,B as Z,L as q,a4 as W}from"./index-
|
|
1
|
+
import{f as M,q as B,G as U,H as Q,I as H,a as $,t as P,o as D,K as I,j as n,D as L,T as Y,W as k,e as E,r as T,B as Z,L as q,a4 as W}from"./index-CpG2_v8p.js";import{P as N}from"./index-Vm79zSBa.js";import{u as J}from"./use-org-auth-client-BwDW-s0s.js";import{u as X}from"./use-debounced-autosave-7E-JkkEV.js";import{A as ee}from"./avatar-Bf_YMKWh.js";import{I as V}from"./input-BWjbzzQM.js";import{S as G,a as K,b as A,c as te}from"./settings-section-ByFuwsko.js";import{D as ne}from"./domain-settings-DJD9U4sU.js";import{u as ae}from"./studio-tools-Cly5ZCG3.js";import{c as se,b as oe,d as ie,f as re,e as le,g as ce,a as ue,A as de}from"./alert-dialog-CbYM4jmz.js";import{R as me}from"./require-capability-BJrX_rPe.js";import"./sidebar-DceLItg8.js";import"./LayoutLeft-CJ48TbRA.js";import"./tooltip-D5r7nYKO.js";import"./sheet-BlMfZj2L.js";import"./X-CRg5TH_Y.js";import"./User01-CamUMrWb.js";import"./card-CWqz0DaV.js";import"./ArrowUpRight-DjtsYmlk.js";import"./switch-BJt48css.js";import"./use-capability-Dp-xHWqY.js";import"./access-gate-SfXPQWUj.js";import"./capability-load-error-NgXOd2ZO.js";const ge=Y({name:k().min(1,"Name is required").max(255,"Name is too long"),slug:k().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:k().optional()});function fe(e){const t=E.c(13),{value:v,onChange:h,name:o,disabled:d}=e,m=T.useRef(null);let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=()=>m.current?.click(),t[0]=l):l=t[0];const r=l;let c;t[1]!==h?(c=x=>{const j=x.target.files?.[0];if(!j)return;if(j.size>2097152){D.error("Image must be smaller than 2MB");return}const u=new FileReader;u.onerror=pe,u.onloadend=()=>{u.result&&h(u.result),m.current&&(m.current.value="")},u.readAsDataURL(j)},t[1]=h,t[2]=c):c=t[2];const a=c;let s;t[3]!==d||t[4]!==a?(s=n.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:a,className:"hidden",disabled:d}),t[3]=d,t[4]=a,t[5]=s):s=t[5];const i=v||void 0,p=o??"?";let g;t[6]!==i||t[7]!==p?(g=n.jsx(ee,{url:i,fallback:p,shape:"square",size:"base"}),t[6]=i,t[7]=p,t[8]=g):g=t[8];let f;return t[9]!==d||t[10]!==s||t[11]!==g?(f=n.jsxs("button",{type:"button",onClick:r,disabled:d,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[s,g]}),t[9]=d,t[10]=s,t[11]=g,t[12]=f):f=t[12],f}function pe(){return D.error("Failed to read image")}function he(){const e=M(),{org:t}=B(),v=J(),h=U(),o=Q({resolver:H(ge),values:{name:t.name??"",slug:t.slug??"",logo:t.logo??""}}),d=$({mutationFn:async a=>{const s={name:a.name,slug:a.slug};a.logo&&(s.logo=a.logo);const i=await v.organization.update({data:s});if(i?.error)throw new Error(i.error.message||"Failed to update organization");return i},onSuccess:(a,s)=>{P("organization_settings_updated",{organization_id:t.id,fields:Object.keys(s)}),h.invalidateQueries({queryKey:I.organizations()}),h.invalidateQueries({queryKey:I.activeOrganization(t.slug)}),D.success("Organization updated successfully"),a?.data?.slug&&a.data.slug!==t.slug&&e({to:"/$org/settings/general",params:{org:a.data.slug}})},onError:(a,s)=>{P("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(s),error:a instanceof Error?a.message:String(a)}),D.error(a instanceof Error?a.message:"Failed to update organization")}}),{schedule:m,flush:l}=X({save:async()=>{const a=o.control._formState.dirtyFields;if(Object.keys(a).length===0||!await o.trigger())return;const i=o.getValues(),p=o.control._defaultValues;o.reset(i,{keepValues:!0});try{await d.mutateAsync(i)}catch{o.reset(p,{keepValues:!0})}}}),r=o.formState.errors,c=typeof window<"u"?`${window.location.host}/`:"";return n.jsx(G,{children:n.jsxs(K,{children:[n.jsx(A,{title:"Logo",description:"Recommended size is 256x256px",action:n.jsx(fe,{value:o.watch("logo"),onChange:a=>{o.setValue("logo",a??"",{shouldDirty:!0}),l()},name:o.watch("name")})}),n.jsx(A,{title:"Name",action:n.jsx(L,{control:o.control,name:"name",render:({field:a})=>n.jsx(V,{id:"org-name",...a,onChange:s=>{a.onChange(s),m()},onBlur:()=>{a.onBlur(),l()},placeholder:"Organization name",className:"w-[280px]"})})}),n.jsx(A,{title:"URL",action:n.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[c&&n.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:c}),n.jsx(L,{control:o.control,name:"slug",render:({field:a})=>n.jsx("input",{id:"org-slug",value:a.value??"",name:a.name,ref:a.ref,placeholder:"my-organization",className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:s=>{const i=s.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",i,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{a.onBlur(),l()}})})]})}),(r.name||r.slug||r.logo)&&n.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&n.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&n.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&n.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]})]})})}function xe(){const e=E.c(42),{org:t}=B(),[v,h]=T.useState(!1),[o,d]=T.useState(""),m=ae();let l;e[0]!==t.id||e[1]!==m?(l=async()=>{await m.call("ORGANIZATION_DELETE",{id:t.id})},e[0]=t.id,e[1]=m,e[2]=l):l=e[2];let r;e[3]!==t.id||e[4]!==t.slug?(r=()=>{P("organization_deleted",{organization_id:t.id}),localStorage.getItem(q.lastOrgSlug())===t.slug&&localStorage.removeItem(q.lastOrgSlug()),W(),D.success("Organization deleted"),window.location.href="/"},e[3]=t.id,e[4]=t.slug,e[5]=r):r=e[5];let c;e[6]!==l||e[7]!==r?(c={mutationFn:l,onSuccess:r,onError:je},e[6]=l,e[7]=r,e[8]=c):c=e[8];const a=$(c);let s;e[9]===Symbol.for("react.memo_cache_sentinel")?(s=()=>h(!0),e[9]=s):s=e[9];let i;e[10]!==a.isPending?(i=n.jsx(G,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:n.jsx(K,{className:"border-destructive/40",children:n.jsx(A,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:n.jsx(Z,{variant:"destructive",size:"sm",onClick:s,disabled:a.isPending,children:"Delete"})})})}),e[10]=a.isPending,e[11]=i):i=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=O=>{h(O),O||d("")},e[12]=p):p=e[12];let g;e[13]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx(se,{children:"Delete Organization?"}),e[13]=g):g=e[13];let f;e[14]!==t.name?(f=n.jsxs("p",{children:["This will permanently delete all data associated with"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name}),". This action cannot be undone."]}),e[14]=t.name,e[15]=f):f=e[15];let x;e[16]!==t.name?(x=n.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",n.jsx("span",{className:"font-medium text-foreground",children:t.name})," ","to confirm:"]}),e[16]=t.name,e[17]=x):x=e[17];let j;e[18]===Symbol.for("react.memo_cache_sentinel")?(j=O=>d(O.target.value),e[18]=j):j=e[18];let u;e[19]!==o||e[20]!==t.name?(u=n.jsx(V,{value:o,onChange:j,placeholder:t.name,autoFocus:!0}),e[19]=o,e[20]=t.name,e[21]=u):u=e[21];let y;e[22]!==u||e[23]!==f||e[24]!==x?(y=n.jsxs(oe,{children:[g,n.jsx(ie,{asChild:!0,children:n.jsxs("div",{children:[f,x,u]})})]}),e[22]=u,e[23]=f,e[24]=x,e[25]=y):y=e[25];let w;e[26]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(re,{children:"Cancel"}),e[26]=w):w=e[26];let b;e[27]!==a?(b=()=>a.mutate(),e[27]=a,e[28]=b):b=e[28];const F=o!==t.name||a.isPending,R=a.isPending?"Deleting…":"Delete organization";let S;e[29]!==b||e[30]!==F||e[31]!==R?(S=n.jsxs(le,{children:[w,n.jsx(ce,{onClick:b,disabled:F,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:R})]}),e[29]=b,e[30]=F,e[31]=R,e[32]=S):S=e[32];let z;e[33]!==y||e[34]!==S?(z=n.jsxs(ue,{children:[y,S]}),e[33]=y,e[34]=S,e[35]=z):z=e[35];let C;e[36]!==v||e[37]!==z?(C=n.jsx(de,{open:v,onOpenChange:p,children:z}),e[36]=v,e[37]=z,e[38]=C):C=e[38];let _;return e[39]!==C||e[40]!==i?(_=n.jsxs(n.Fragment,{children:[i,C]}),e[39]=C,e[40]=i,e[41]=_):_=e[41],_}function je(e){D.error(e instanceof Error?e.message:"Failed to delete organization")}function ve(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(N,{children:n.jsx(N.Content,{children:n.jsx(N.Body,{children:n.jsxs(te,{children:[n.jsx(N.Title,{children:"Organization"}),n.jsx(he,{}),n.jsx(ne,{}),n.jsx(xe,{})]})})})}),e[0]=t):t=e[0],t}function Ge(){const e=E.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(me,{capability:"org:manage",area:"general settings",children:n.jsx(ve,{})}),e[0]=t):t=e[0],t}export{Ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as a}from"./collections-
|
|
1
|
+
import{B as a}from"./collections-CG_8shjq.js";import{cr as o}from"./index-CpG2_v8p.js";const m=o(a,{target:"draft-7"});let n="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",l=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=n[r[t]&63];return e};function s(t){return`${t}_${l()}`}export{m as B,s as g};
|
package/dist/client/assets/{github-repo-picker-CAK6NZTZ.js → github-repo-picker-BJ45Iuw_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as $,j as t,q as J,b as he,G as ae,r as L,M as ke,J as Re,R as ie,n as xe,K as U,a as be,t as oe,o as D,B as se,c as V,l as Y,s as Ae,F as Oe}from"./index-
|
|
1
|
+
import{e as $,j as t,q as J,b as he,G as ae,r as L,M as ke,J as Re,R as ie,n as xe,K as U,a as be,t as oe,o as D,B as se,c as V,l as Y,s as Ae,F as Oe}from"./index-CpG2_v8p.js";import{b as Ge}from"./use-virtual-mcp-BOy7A3-I.js";import{k as le}from"./use-navigate-to-agent-CLdhXO-i.js";import{b as Le,u as ye}from"./use-connection-CbBvGv-y.js";import{W as Pe,u as H,a as ce}from"./use-mcp-client-BDuQ-DKr.js";import{D as we,a as Ce,b as Ie,c as Ne,d as $e}from"./dialog-DzWL-NrT.js";import{i as ue}from"./RefreshCcw01-D1X4YmG3.js";import{C as je}from"./collection-search-Bk4YcOKu.js";import{C as pe}from"./checkbox-C5cEV_DH.js";import{n as He}from"./agent-icon-C_8D2J-7.js";import{u as Me}from"./use-mcp-tools-xqS_ta53.js";import{e as De}from"./extract-connection-data-DzgWcXVA.js";const Ue=`<svg width="74" height="84" viewBox="0 0 74 84" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
2
|
<path d="M63.4462 15.3005C63.1414 15.2764 57.2333 15.1845 57.2333 15.1845C57.2333 15.1845 52.2906 10.3849 51.8019 9.89426C51.6127 9.71981 51.3729 9.60981 51.1172 9.58008V83.0253L73.2664 77.5175C73.2664 77.5175 64.2277 16.3953 64.1696 15.9772C64.1417 15.7997 64.055 15.6366 63.9235 15.5139C63.7919 15.3913 63.6255 15.3162 63.4462 15.3005Z" fill="#171717"/>
|
|
3
3
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M32.748 0.00356357C34.8334 -0.0568526 36.5759 0.651298 37.9307 2.10122C38.0276 2.20613 38.1209 2.31463 38.2109 2.42544L38.2354 2.42349C38.4434 2.40657 38.6494 2.38638 38.8574 2.38638H38.8672C41.9831 2.3913 44.5571 4.16796 46.3184 7.527C46.8023 8.4621 47.2004 9.43976 47.5068 10.4469L49.9883 9.67837C50.3609 9.56961 51.315 9.42163 51.8037 9.90981L51.9922 82.3883L51.1162 83.0387L0 74.1979C0.0195597 74.0466 6.09952 27.0238 6.3291 25.3629C6.63636 23.1661 6.70922 23.0933 9.03906 22.361L16.957 19.9079C17.4531 16.377 19.1884 11.8165 21.4746 8.18423C24.7237 3.02487 28.7273 0.119714 32.748 0.00356357ZM38.8408 26.7077C38.8133 26.694 36.5926 25.6009 32.2842 25.8747C21.032 26.5853 15.9341 34.4515 16.4229 42.2213C17.0059 51.4485 26.2283 51.1199 26.584 56.734C26.6686 58.0922 25.8271 60.0114 23.4658 60.1588C19.8562 60.3883 15.3438 56.9831 15.3438 56.9831L13.6191 64.3249C13.6191 64.3249 18.1021 69.1296 26.2432 68.6149C33.027 68.1895 37.7351 62.759 37.2344 54.8249C36.5981 44.7397 25.2729 43.7966 25.002 39.4948C24.9512 38.7038 25.0055 35.556 29.9932 35.2418C33.3786 35.0279 36.2354 36.3195 36.2666 36.3336L38.8408 26.7077ZM32.8262 2.6813C26.6181 2.86014 21.2028 12.5587 19.8213 19.0211L26.8311 16.8512C27.6101 12.7476 29.5648 8.48928 32.1221 5.74868C33.0162 4.76667 34.0719 3.94401 35.2432 3.31704H35.2451C34.5654 2.87005 33.7695 2.66203 32.8262 2.6813ZM36.9775 5.46548C35.7921 5.95366 34.7952 6.80972 34.0791 7.57583C32.1608 9.63716 30.5951 12.7807 29.7725 15.9391L38.3057 13.2956C38.3322 11.0721 38.0904 7.7854 36.9775 5.46548ZM39.7568 5.14907C40.7052 7.59721 40.9505 10.4321 40.9795 12.4694L44.9473 11.2389C44.3133 9.17981 42.8075 5.72907 39.7568 5.14907Z" fill="#393939"/>
|
|
4
4
|
</svg>`,Fe=`data:image/svg+xml,${encodeURIComponent(Ue)}`,Nt={title:"New Website",description:"Website cloned from a public template",url:"https://github.com/decocms/webapp-template",owner:"decocms",name:"webapp-template"},jt={title:"Shopify Headless Store",description:"Shopify Headless Store cloned from a public template",url:"https://github.com/Shopify/hydrogen-demo-store",owner:"Shopify",name:"hydrogen-demo-store",icon:Fe};function St(){const o=$.c(6),e=Ge(),n=le();let s;o[0]!==e.create||o[1]!==n?(s=async r=>{const f=await e.create.mutateAsync({title:r.title,description:r.description,icon:r.icon??null,status:"active",pinned:!1,connections:[],metadata:{githubRepo:{url:r.url,owner:r.owner,name:r.name},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}}});return f.id&&n(f.id),f},o[0]=e.create,o[1]=n,o[2]=s):s=o[2];const l=s;let i;return o[3]!==e.create.isPending||o[4]!==l?(i={createFromTemplate:l,isCreating:e.create.isPending},o[3]=e.create.isPending,o[4]=l,o[5]=i):i=o[5],i}function F(o){const e=$.c(4),{size:n,className:s}=o;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=l):l=e[0];let i;return e[1]!==s||e[2]!==n?(i=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:s,children:l}),e[1]=s,e[2]=n,e[3]=i):i=e[3],i}function ze(o,e){const n=$.c(12),{org:s}=J();let l;n[0]!==s.id?(l=Pe.REGISTRY(s.id),n[0]=s.id,n[1]=l):l=n[1];const i=l;let r;n[2]!==s.id||n[3]!==s.slug||n[4]!==i?(r={connectionId:i,orgId:s.id,orgSlug:s.slug},n[2]=s.id,n[3]=s.slug,n[4]=i,n[5]=r):r=n[5];const f=H(r);let b;n[6]!==o?(b={name:o},n[6]=o,n[7]=b):b=n[7];const a=e?.enabled??!0;let C;return n[8]!==f||n[9]!==b||n[10]!==a?(C={client:f,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:b,enabled:a,staleTime:3e5,select:qe},n[8]=f,n[9]=b,n[10]=a,n[11]=C):C=n[11],Me(C)}function qe(o){return o.structuredContent?.item??null}const Be="deco/mcp-github";function Se(o){const{org:e}=J(),{data:n}=he.useSession(),s=Le(),l=ae(),[i,r]=L.useState("idle"),[f,b]=L.useState(null),[a,C]=L.useState(null),{data:h,isLoading:m}=ze(Be,{enabled:o.enabled}),x=L.useRef(!1);o.enabled&&h&&!m&&!x.current&&n?.user?.id&&i==="idle"&&(x.current=!0,N());async function N(){if(!(!h||!n?.user?.id||!e))try{r("installing"),b(null);const p=De(h,e.id,n.user.id,{remoteIndex:0});if(!p.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:w}=await s.create.mutateAsync(p);r("authenticating");const j=new URL(`/api/${e.slug}/mcp/${w}`,window.location.origin),d=await ke({url:j.href,token:null,orgId:e.id});if(d.supportsOAuth&&!d.isAuthenticated){const{token:S,tokenInfo:c,error:v}=await Re({connectionId:w,orgSlug:e.slug,scope:"offline_access"});if(v||!S){try{await s.delete.mutateAsync(w)}catch{}throw new Error(v??"No token received from GitHub")}if(c)try{(await fetch(`/api/${e.slug}/connections/${w}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:c.accessToken,refreshToken:c.refreshToken,expiresIn:c.expiresIn,scope:c.scope,clientId:c.clientId,clientSecret:c.clientSecret,tokenEndpoint:c.tokenEndpoint})})).ok||await s.update.mutateAsync({id:w,data:{connection_token:S}})}catch{await s.update.mutateAsync({id:w,data:{connection_token:S}})}}ie(l,e.id),C(p),r("ready")}catch(p){b(p instanceof Error?p.message:String(p)),r("error")}}function y(){r("idle"),b(null),C(null),x.current=!1}return o.enabled&&m&&i==="idle"?{status:"installing",error:null,connection:null,retry:y}:{status:i,error:f,connection:a,retry:y}}const Ve="deco-sites";function Ke(o){if(!o||typeof o!="object")return null;const e=o.github;if(!e||typeof e!="object")return null;const n=e.owner,s=e.repo;return typeof n!="string"||typeof s!="string"||n.length===0||s.length===0?null:{owner:n,repo:s}}function Qe(o,e){const n=e?Ke(e):null,s=n?.owner??Ve,l=n?.repo??o;return{owner:s,name:l,url:`https://github.com/${s}/${l}`}}const K={contents:"write",metadata:"read",pull_requests:"write",issues:"write"};function Je(o){if(!o||typeof o!="object"||Array.isArray(o))return K;const e=o;return Object.values(e).some(n=>typeof n!="string")?K:e}function Ye(o){if(!(typeof o!="number"||!Number.isFinite(o)||!Number.isInteger(o)||o<=0))return o}function We(o){const e=o.metadata?.repoScope;if(!e||typeof e.installationId!="number"||!Number.isFinite(e.installationId)||!Number.isInteger(e.installationId)||e.installationId<=0||typeof e.owner!="string"||typeof e.repo!="string"||e.owner.length===0||e.repo.length===0)return null;const n=Ye(e.repositoryId);return{sourceConnectionId:typeof e.sourceConnectionId=="string"?e.sourceConnectionId:void 0,installationId:e.installationId,repositoryId:n,owner:e.owner,repo:e.repo,permissions:Je(e.permissions),grantProvider:e.grantProvider==="github-mcp"?"github-mcp":void 0}}function ve(o){return o.filter(e=>We(e)===null)}async function Ee(o,e){const s=(await o({name:"GITHUB_LIST_USER_ORGS",arguments:{connectionId:e}})).content?.[0]?.text;if(!s)throw new Error("No response from GITHUB_LIST_USER_ORGS");try{return JSON.parse(s)}catch{throw new Error("Invalid response from GITHUB_LIST_USER_ORGS")}}function Ze(o,e){const n=e.toLowerCase();return o.find(s=>s.login.toLowerCase()===n)}const ge="GitHub MCP did not return refreshable repo grant metadata";function q(o){if(typeof o!="string")return null;const e=o.trim();return e.length>0?e:null}function Xe(o){try{const e=new URL(o);return(e.protocol==="http:"||e.protocol==="https:")&&!e.username&&!e.password}catch{return!1}}function et(o){return typeof o=="number"&&Number.isFinite(o)&&Number.isInteger(o)&&o>0?o:void 0}async function Te(o){const{orgSlug:e,sourceConnection:n,installationId:s,owner:l,repo:i,githubCallTool:r,selfCallTool:f}=o,b=await r({name:"MINT_REPO_TOKEN",arguments:{installationId:s,owner:l,repo:i,permissions:K}}),a=b.structuredContent;if(b.isError||!a?.token){const A=b.content?.find(T=>T.type==="text")?.text;throw new Error(A?`Failed to mint a repo-scoped GitHub token: ${A}`:"Failed to mint a repo-scoped GitHub token")}const C=q(a.refreshToken),h=q(a.tokenEndpoint),m=q(a.clientId);if(!C||!h||!m)throw new Error(ge);if(!Xe(h))throw new Error(ge);const x=q(a.repository?.owner),N=q(a.repository?.name),y="GitHub MCP returned refresh metadata for a different repository";if(a.repository?.owner!==void 0&&(!x||x.toLowerCase()!==l.toLowerCase()))throw new Error(y);if(a.repository?.name!==void 0&&(!N||N.toLowerCase()!==i.toLowerCase()))throw new Error(y);const p=et(a.repository?.id),I=a.expiresAt?Date.parse(a.expiresAt):NaN,w=Number.isFinite(I)?Math.max(0,Math.floor((I-Date.now())/1e3)):null,d=(typeof a.expiresIn=="number"&&Number.isFinite(a.expiresIn)&&Number.isInteger(a.expiresIn)&&a.expiresIn>0?a.expiresIn:null)??w,S=await f({name:"COLLECTION_CONNECTIONS_CREATE",arguments:{data:{title:`GitHub: ${l}/${i}`,description:`Repo-scoped GitHub access for ${l}/${i}`,icon:n.icon,app_name:n.app_name,app_id:n.app_id,connection_type:n.connection_type,connection_url:n.connection_url,metadata:{repoScope:{installationId:s,repositoryId:p,owner:l,repo:i,permissions:K,grantProvider:"github-mcp"}}}}}),c=S.structuredContent??S,v=c.item?.id??c.id;if(!v)throw new Error("Failed to create the repo-scoped GitHub connection");if(!(await fetch(`/api/${e}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:a.token,refreshToken:C,expiresIn:d,scope:a.scope??null,clientId:m,tokenEndpoint:h})})).ok)throw await f({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:v,force:!0}}).catch(()=>{}),new Error("Failed to persist the repo-scoped token");return{childConnectionId:v}}function tt(o){return o.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function nt(o){const e=await fetch(`/api/${o}/deco-sites`);if(!e.ok){const n=await e.json().catch(()=>({}));throw new Error(n.error??`Failed to load sites (${e.status})`)}return e.json()}function vt({open:o,onOpenChange:e,onBack:n}){const{org:s}=J(),l=le(),i=ae(),{data:r}=he.useSession(),[f,b]=L.useState(null),[a,C]=L.useState(null),[h,m]=L.useState(""),x=H({connectionId:ce,orgId:s.id,orgSlug:s.slug}),N=ye({slug:"mcp-github"}),y=ve(N),p=Se({enabled:o&&y.length===0}),I=y.length===1?y[0]??null:a,w=y.length>1&&!I,j=H({connectionId:I?.id??"",orgId:s.id,orgSlug:s.slug}),d=o&&y.length===0&&(p.status==="installing"||p.status==="authenticating"||p.status==="idle"),{data:S,isLoading:c,error:v}=xe({queryKey:U.decoSites(r?.user?.email),queryFn:()=>nt(s.slug),enabled:o&&!!r?.user?.email,staleTime:6e4,retry:!1}),O=S?.sites??[],A=u=>{u||(b(null),C(null),m("")),e(u)},T=O.filter(u=>u.name.toLowerCase().includes(h.toLowerCase())||(u.domains?.[0]?.domain?.toLowerCase().includes(h.toLowerCase())??!1)),g=!f||T.some(u=>u.name===f),k=be({mutationFn:async u=>{if(!I)throw new Error("GitHub is not connected. Complete GitHub setup and try again.");oe("deco_site_import_started",{site_name:u});const{installations:R,appSlug:_}=await Ee(P=>x.callTool(P),I.id),G=O.find(P=>P.name===u);if(!G)throw new Error("Selected site is no longer available");const E=Qe(u,G.metadata),z=Ze(R,E.owner);if(!z){const P=_?`https://github.com/apps/${_}/installations/new`:"https://github.com/settings/installations";throw new Error(`Install the GitHub App on the "${E.owner}" organization to import this site. ${P}`)}let W=null,Z=null,X=null;const _e=async()=>{X&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:X}}).catch(()=>{}),Z&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:Z,force:!0}}).catch(()=>{}),W&&await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:W,force:!0}}).catch(()=>{})};try{const P=await fetch(`/api/${s.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:u})}),ee=await P.json().catch(()=>({}));if(!P.ok)throw new Error(ee.error??`Failed to create connection (${P.status})`);const M=ee.connId;if(!M)throw new Error("Server did not return a connection ID");W=M;const{childConnectionId:te}=await Te({orgSlug:s.slug,sourceConnection:I,installationId:z.installationId,owner:E.owner,repo:E.name,githubCallTool:ne=>j.callTool(ne),selfCallTool:ne=>x.callTool(ne)});Z=te;const de=ee.icon??null,me=tt(u),fe=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:u,description:"Imported from deco.cx",pinned:!1,icon:de??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],githubRepo:{owner:E.owner,name:E.name,url:E.url,installationId:z.installationId,connectionId:te},ui:{banner:null,bannerColor:"#22C55E",icon:de,themeColor:"#22C55E",slug:me,pinnedViews:[{connectionId:M,toolName:"fetch_assets",label:"Assets",icon:null},{connectionId:M,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:M},{connection_id:te}]}}}),B=fe.structuredContent??fe;if(!B.item?.id)throw new Error("Failed to create the imported agent");return X=B.item.id,{slug:me,virtualMcpId:B.item.id,connId:M,item:B.item}}catch(P){throw await _e(),P}},onSuccess:({slug:u,virtualMcpId:R,item:_})=>{oe("deco_site_import_succeeded",{site_name:_.title,virtual_mcp_id:R,slug:u}),i.setQueryData(U.collectionItem(x,s.id,"","VIRTUAL_MCP",R),{item:_}),i.invalidateQueries({predicate:G=>{const E=G.queryKey;return E[1]===s.id&&E[3]==="collection"&&E[4]==="VIRTUAL_MCP"}}),i.invalidateQueries({queryKey:U.projects(s.id)}),D.success(`Imported ${u} from deco.cx`),A(!1),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),l(R)},onError:u=>{oe("deco_site_import_failed",{error:u instanceof Error?u.message:"Unknown error"}),D.error("Import failed: "+(u instanceof Error?u.message:"Unknown error"))}});return t.jsx(we,{open:o,onOpenChange:A,children:t.jsxs(Ce,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:"Import from deco.cx"})}),t.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[n&&t.jsx("button",{type:"button",onClick:n,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":"Go back",children:t.jsx(ue,{size:18})}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Import from deco.cx"})]}),t.jsx("div",{children:t.jsx(je,{value:h,onChange:m,placeholder:"Search sites...",onKeyDown:u=>{u.key==="Escape"&&m("")}})}),t.jsxs("div",{className:"pb-0 min-h-[300px]",children:[p.status==="error"&&t.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[t.jsx("p",{className:"text-sm text-destructive",children:p.error??"Failed to connect GitHub"}),t.jsx(se,{variant:"outline",size:"sm",onClick:p.retry,children:"Retry GitHub setup"})]}),d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Setting up GitHub connection..."}),w&&!d&&p.status!=="error"&&t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-8 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a GitHub connection"})}),y.map(u=>t.jsxs("button",{type:"button",onClick:()=>C(u),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[u.icon?t.jsx("img",{src:u.icon,alt:u.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:u.title})]},u.id))]}),c&&!d&&p.status!=="error"&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"Loading sites..."}),!c&&!d&&!w&&p.status!=="error"&&!v&&O.length===0&&t.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:"No sites found for this account."}),!c&&!d&&!w&&p.status!=="error"&&O.length>0&&t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[T.length===0&&t.jsxs("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:["No sites match “",h,"”"]}),T.map(u=>{const R=u.domains?.find(G=>G.production)?.domain??u.domains?.[0]?.domain,_=f===u.name;return t.jsxs("button",{type:"button",onClick:()=>b(u.name),className:V("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",_?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[t.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:u.thumb_url?t.jsx("img",{src:u.thumb_url,alt:u.name,className:"w-full h-full object-cover",loading:"lazy"}):t.jsx("div",{className:"w-full h-full bg-muted"})}),t.jsxs("div",{className:"px-4 py-3",children:[t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:u.name}),R&&t.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:R})]})]},u.name)})]})]}),t.jsxs($e,{className:"px-8 py-5 border-t border-border",children:[t.jsx(se,{variant:"outline",onClick:()=>A(!1),disabled:k.isPending,children:"Cancel"}),t.jsx(se,{disabled:!f||!g||k.isPending||c||d||w||!I||p.status==="error",onClick:()=>f&&k.mutate(f),children:k.isPending?"Importing...":"Import"})]})]})})}function ot(o,e){const n=$.c(4),[s,l]=L.useState(o);let i,r;return n[0]!==e||n[1]!==o?(i=()=>{const f=setTimeout(()=>l(o),e);return()=>clearTimeout(f)},r=[o,e],n[0]=e,n[1]=o,n[2]=i,n[3]=r):(i=n[2],r=n[3]),L.useEffect(i,r),s}const Q=[{key:"auto-respond-to-issues",triggerType:"github.issues.opened",nameSuffix:"auto-respond to issues",label:"Auto-respond to new issues",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A new GitHub issue has been opened in ${o}/${e}. Read the issue, explore relevant code, create a branch, implement the fix, and open a PR referencing the issue number.`},{key:"review-incoming-prs",triggerType:"github.pull_request.opened",nameSuffix:"review incoming PRs",label:"Review incoming pull requests",defaultEnabled:!0,instructions:({owner:o,name:e})=>`A pull request was opened in ${o}/${e}. Read the diff, summarize what changed, flag risks (security, perf, breaking changes), and leave a review comment.`},{key:"note-merged-prs",triggerType:"github.pull_request.closed",nameSuffix:"note merged/closed PRs",label:"Note merged or closed PRs",defaultEnabled:!1,instructions:({owner:o,name:e})=>`A pull request was closed in ${o}/${e}. If it was merged, update changelog/release notes as appropriate.`}];function st(o,e){const n=new Set;if(o.paramsSchema)for(const l of Object.keys(o.paramsSchema))n.add(l);if(Array.isArray(o.params))for(const l of o.params)n.add(l.name);else if(o.params&&typeof o.params=="object")for(const l of Object.keys(o.params))n.add(l);if(n.has("repo"))return{repo:`${e.owner}/${e.name}`};const s={};return n.has("owner")&&(s.owner=e.owner),n.has("name")&&(s.name=e.name),n.has("repository")&&(s.repository=`${e.owner}/${e.name}`),s}async function rt({githubCallTool:o,selfCallTool:e,virtualMcpId:n,repo:s,connectionId:l,selectedKeys:i}){const r=await o({name:"TRIGGER_LIST",arguments:{}}),f=r.structuredContent??r,b=new Map((f.triggers??[]).map(m=>[m.type,m])),a=Q.filter(m=>i.has(m.key)),C=await Promise.allSettled(a.map(async m=>{const x=b.get(m.triggerType);if(!x)throw new Error(`Trigger ${m.triggerType} not exposed`);const N=await e({name:"AUTOMATION_CREATE",arguments:{name:`${s.name}: ${m.nameSuffix}`,virtual_mcp_id:n,messages:m.instructions(s),active:!0}}),y=(N.structuredContent??N).id;if(!y)throw new Error(`AUTOMATION_CREATE returned no id for ${m.key}`);await e({name:"AUTOMATION_TRIGGER_ADD",arguments:{automation_id:y,type:"event",connection_id:l,event_type:m.triggerType,params:st(x,s)}})})),h=C.filter(m=>m.status==="rejected").length;return h>0&&console.error("Some GitHub automations failed to set up:",C.filter(m=>m.status==="rejected")),{total:C.length,failed:h}}function Et(o){const e=$.c(22),{open:n,onOpenChange:s,title:l,hideAutoRespondCheckbox:i,onImportComplete:r}=o,f=l===void 0?"Import from GitHub":l,b=i===void 0?!1:i,[a,C]=L.useState(null);let h;e[0]!==f?(h=t.jsx(Ie,{className:"sr-only",children:t.jsx(Ne,{children:f})}),e[0]=f,e[1]=h):h=e[1];let m;e[2]!==a||e[3]!==f?(m=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:a?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>C(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":"Back to accounts",children:t.jsx(ue,{size:16})}),t.jsx("img",{src:a.avatarUrl,alt:a.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:a.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(F,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:f})]})}),e[2]=a,e[3]=f,e[4]=m):m=e[4];let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=x):x=e[5];let N;e[6]!==s?(N=()=>s(!1),e[6]=s,e[7]=N):N=e[7];let y;e[8]!==b||e[9]!==r||e[10]!==n||e[11]!==a||e[12]!==N?(y=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(L.Suspense,{fallback:x,children:t.jsx(it,{open:n,onComplete:N,selectedInstallation:a,onSelectInstallation:C,hideAutoRespondCheckbox:b,onImportComplete:r})})}),e[8]=b,e[9]=r,e[10]=n,e[11]=a,e[12]=N,e[13]=y):y=e[13];let p;e[14]!==h||e[15]!==m||e[16]!==y?(p=t.jsxs(Ce,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[h,m,y]}),e[14]=h,e[15]=m,e[16]=y,e[17]=p):p=e[17];let I;return e[18]!==s||e[19]!==n||e[20]!==p?(I=t.jsx(we,{open:n,onOpenChange:s,children:p}),e[18]=s,e[19]=n,e[20]=p,e[21]=I):I=e[21],I}function it({open:o,onComplete:e,selectedInstallation:n,onSelectInstallation:s,hideAutoRespondCheckbox:l,onImportComplete:i}){const{org:r}=J(),f=ae(),b=le(),[a,C]=L.useState(null),[h,m]=L.useState(!0),[x,N]=L.useState(()=>new Set(Q.filter(g=>g.defaultEnabled).map(g=>g.key))),y=Q.filter(g=>g.defaultEnabled).map(g=>g.key),p=l?new Set(y):h?x:new Set,I=ye({slug:"mcp-github"}),w=ve(I),j=Se({enabled:o&&w.length===0}),d=w.length===1?w[0]??null:a,S=H({connectionId:d?.id??"",orgId:r.id,orgSlug:r.slug}),c=H({connectionId:ce,orgId:r.id,orgSlug:r.slug}),v=async(g,k)=>{try{const R=await S.callTool({name:"get_file_contents",arguments:{owner:g.owner,repo:g.name,path:k}});if(R.isError)return null;const G=R.content?.find(E=>E.type==="resource")?.resource?.text;if(!G)return null;try{const E=JSON.parse(G);return typeof E=="string"?E:JSON.stringify(E)}catch{return G}}catch{return null}},O=(g,k)=>{Promise.all([v(k,"AGENTS.md"),v(k,"CLAUDE.md")]).then(async([u,R])=>{const _=u??R??null;_&&(await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:g,data:{metadata:{instructions:_}}}}),ie(f,r.id))}).catch(u=>{console.error("GitHub instructions fetch failed:",u)})},A=async({virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R})=>{const{total:_,failed:G}=await rt({githubCallTool:E=>S.callTool(E),selfCallTool:E=>c.callTool(E),virtualMcpId:g,repo:k,connectionId:u,selectedKeys:R});G>0&&D.warning(`Set up ${_-G}/${_} GitHub automations. Add the rest from the automations view.`)},T=be({mutationFn:async g=>{if(!d||!n)throw new Error("No GitHub connection or installation");const k=n.installationId,{childConnectionId:u}=await Te({orgSlug:r.slug,sourceConnection:d,installationId:k,owner:g.owner,repo:g.name,githubCallTool:_=>S.callTool(_),selfCallTool:_=>c.callTool(_)});let R=null;try{const _=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:g.name,description:g.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:g.owner,name:g.name,url:g.url,installationId:k,connectionId:u},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:u}]}}}),G=_.structuredContent??_,E=G.item?.id;if(!G.item||!E)throw new Error("Failed to create the imported agent");return R=E,p.size>0&&await A({virtualMcpId:E,repo:g,connectionId:u,selectedKeys:p}).catch(z=>{console.error("Failed to set up GitHub automations:",z),D.warning("Imported repo, but failed to set up GitHub automations. You can add triggers manually from the automations view.")}),{virtualMcpId:E,repo:g,connectionId:u,item:G.item}}catch(_){throw R&&await c.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:R}}).catch(()=>{}),await c.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:u,force:!0}}).catch(()=>{}),_}},onSuccess:({virtualMcpId:g,repo:k,connectionId:u,item:R})=>{if(f.setQueryData(U.collectionItem(c,r.id,"","VIRTUAL_MCP",g),{item:R}),ie(f,r.id),O(g,k),i){i({virtualMcpId:g,repo:k,connectionId:u});return}D.success(`Imported ${k.name} from GitHub`),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),b(g)},onError:g=>{D.error("Failed to import repo: "+(g instanceof Error?g.message:"Unknown error"))}});return j.status==="installing"||j.status==="authenticating"?t.jsx(re,{status:j.status,error:null,retry:j.retry}):j.status==="error"?t.jsx(re,{status:"error",error:j.error,retry:j.retry}):w.length===0&&j.status==="idle"?t.jsx(re,{status:"installing",error:null,retry:j.retry}):w.length>1&&!d?t.jsxs("div",{className:"flex flex-col py-2",children:[t.jsx("div",{className:"px-4 py-2",children:t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Select a connection"})}),w.map(g=>t.jsxs("button",{type:"button",onClick:()=>C(g),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[g.icon?t.jsx("img",{src:g.icon,alt:g.title,className:"size-7 rounded-full shrink-0"}):t.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:t.jsx(F,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:g.title})]},g.id))]}):d?n?t.jsx(lt,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:g=>T.mutate(g),isSaving:T.isPending,autoRespondEnabled:h,onAutoRespondChange:m,selectedAutomationKeys:x,onAutomationKeysChange:N,hideAutoRespondCheckbox:l}):t.jsx(at,{connectionId:d.id,orgId:r.id,orgSlug:r.slug,onSelect:s,showBackButton:w.length>1,onBack:()=>C(null)}):null}function at(o){const e=$.c(31),{connectionId:n,orgId:s,orgSlug:l,onSelect:i,showBackButton:r,onBack:f}=o;let b;e[0]!==s||e[1]!==l?(b={connectionId:ce,orgId:s,orgSlug:l},e[0]=s,e[1]=l,e[2]=b):b=e[2];const a=H(b);let C;e[3]!==n||e[4]!==s?(C=U.githubUserOrgs(s,n),e[3]=n,e[4]=s,e[5]=C):C=e[5];let h;e[6]!==n||e[7]!==a?(h=()=>Ee(c=>a.callTool(c),n),e[6]=n,e[7]=a,e[8]=h):h=e[8];let m;e[9]!==C||e[10]!==h?(m={queryKey:C,queryFn:h},e[9]=C,e[10]=h,e[11]=m):m=e[11];const x=xe(m);if(x.isLoading){let c;return e[12]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[12]=c):c=e[12],c}if(x.isError){let c;return e[13]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-destructive",children:"Failed to load GitHub accounts"})}),e[13]=c):c=e[13],c}const N=x.data;if(!N)return null;let y;e[14]!==f||e[15]!==r?(y=r&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:f,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),"Change connection"]})}),e[14]=f,e[15]=r,e[16]=y):y=e[16];let p;if(e[17]!==N.installations||e[18]!==i){let c;e[20]!==i?(c=v=>t.jsxs("button",{type:"button",onClick:()=>i(v),className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left group",children:[t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-7 rounded-full shrink-0 ring-1 ring-border"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium leading-none",children:v.login}),v.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:"Personal account"})]}),t.jsx("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:"Select →"})]},v.installationId),e[20]=i,e[21]=c):c=e[21],p=N.installations.map(c),e[17]=N.installations,e[18]=i,e[19]=p}else p=e[19];let I;e[22]!==p?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:p}),e[22]=p,e[23]=I):I=e[23];const w=N.appSlug?`https://github.com/apps/${N.appSlug}/installations/new`:"https://github.com/settings/installations";let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"underline underline-offset-2",children:"Install the GitHub App"}),e[24]=j):j=e[24];let d;e[25]!==w?(d=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:["Account not listed?"," ",j]})}),e[25]=w,e[26]=d):d=e[26];let S;return e[27]!==d||e[28]!==y||e[29]!==I?(S=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,I,d]}),e[27]=d,e[28]=y,e[29]=I,e[30]=S):S=e[30],S}function lt(o){const e=$.c(27),{connectionId:n,orgId:s,orgSlug:l,installation:i,onSelectRepo:r,isSaving:f,autoRespondEnabled:b,onAutoRespondChange:a,selectedAutomationKeys:C,onAutomationKeysChange:h,hideAutoRespondCheckbox:m}=o,[x,N]=L.useState(""),y=ot(x,300),p=L.useDeferredValue(y),I=x!==p;let w;e[0]!==I||e[1]!==x?(w=t.jsx(je,{placeholder:"Search repositories...",value:x,onChange:N,isSearching:I}),e[0]=I,e[1]=x,e[2]=w):w=e[2];const j=I?"opacity-40":"opacity-100";let d;e[3]!==j?(d=V("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",j),e[3]=j,e[4]=d):d=e[4];let S;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Y,{size:18,className:"animate-spin text-muted-foreground"})}),e[5]=S):S=e[5];let c;e[6]!==n||e[7]!==p||e[8]!==i||e[9]!==f||e[10]!==r||e[11]!==s||e[12]!==l?(c=t.jsx(L.Suspense,{fallback:S,children:t.jsx(ct,{connectionId:n,orgId:s,orgSlug:l,installation:i,query:p,onSelectRepo:r,isSaving:f})}),e[6]=n,e[7]=p,e[8]=i,e[9]=f,e[10]=r,e[11]=s,e[12]=l,e[13]=c):c=e[13];let v;e[14]!==d||e[15]!==c?(v=t.jsx("div",{className:d,children:c}),e[14]=d,e[15]=c,e[16]=v):v=e[16];let O;e[17]!==b||e[18]!==m||e[19]!==a||e[20]!==h||e[21]!==C?(O=!m&&t.jsxs("div",{className:"border-t border-border shrink-0",children:[t.jsxs("label",{className:"flex items-center gap-2 px-4 py-3 cursor-pointer select-none",children:[t.jsx(pe,{checked:b,onCheckedChange:T=>a(T===!0)}),t.jsx("span",{className:"text-xs text-foreground",children:"Set up GitHub automations for this repo"})]}),b&&t.jsx("div",{className:"px-4 pb-3 pl-9 flex flex-col gap-1.5",children:Q.map(T=>t.jsxs("label",{className:"flex items-center gap-2 cursor-pointer select-none",children:[t.jsx(pe,{checked:C.has(T.key),onCheckedChange:g=>{const k=new Set(C);g===!0?k.add(T.key):k.delete(T.key),h(k)}}),t.jsx("span",{className:"text-xs text-muted-foreground",children:T.label})]},T.key))})]}),e[17]=b,e[18]=m,e[19]=a,e[20]=h,e[21]=C,e[22]=O):O=e[22];let A;return e[23]!==w||e[24]!==v||e[25]!==O?(A=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[w,v,O]}),e[23]=w,e[24]=v,e[25]=O,e[26]=A):A=e[26],A}function ct(o){const e=$.c(29),{connectionId:n,orgId:s,orgSlug:l,installation:i,query:r,onSelectRepo:f,isSaving:b}=o;let a;e[0]!==n||e[1]!==s||e[2]!==l?(a={connectionId:n,orgId:s,orgSlug:l},e[0]=n,e[1]=s,e[2]=l,e[3]=a):a=e[3];const C=H(a),h=i.type==="User"?"user":"org",m=r?`${h}:${i.login} ${r} in:name`:`${h}:${i.login}`;let x;e[4]!==n||e[5]!==i.login||e[6]!==s||e[7]!==r?(x=U.githubOrgRepos(s,n,i.login,r),e[4]=n,e[5]=i.login,e[6]=s,e[7]=r,e[8]=x):x=e[8];let N;e[9]!==C||e[10]!==m?(N=async j=>{const{signal:d}=j,c=(await C.callTool({name:"search_repositories",arguments:{query:m,page:1,perPage:30}},void 0,{signal:d})).content?.[0]?.text;if(!c)throw new Error("No response from search_repositories");return(JSON.parse(c).items??[]).map(ut)},e[9]=C,e[10]=m,e[11]=N):N=e[11];let y;e[12]!==x||e[13]!==N?(y={queryKey:x,queryFn:N},e[12]=x,e[13]=N,e[14]=y):y=e[14];const{data:p}=Ae(y);if(p.length===0){let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("p",{className:"text-sm text-muted-foreground",children:"No repositories found"}),e[15]=j):j=e[15];let d;e[16]!==r?(d=r&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:"Try a different search term"}),e[16]=r,e[17]=d):d=e[17];let S;return e[18]!==d?(S=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[j,d]}),e[18]=d,e[19]=S):S=e[19],S}let I;if(e[20]!==b||e[21]!==f||e[22]!==p){let j;e[24]!==b||e[25]!==f?(j=d=>t.jsxs("button",{type:"button",onClick:()=>f(d),disabled:b,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(F,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:d.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[d.private?t.jsx(Oe,{size:10}):t.jsx(He,{size:10}),d.private?"Private":"Public"]})]},d.fullName),e[24]=b,e[25]=f,e[26]=j):j=e[26],I=p.map(j),e[20]=b,e[21]=f,e[22]=p,e[23]=I}else I=e[23];let w;return e[27]!==I?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:I}),e[27]=I,e[28]=w):w=e[28],w}function ut(o){return{name:o.name,fullName:o.full_name,owner:o.full_name.split("/")[0]??"",url:o.html_url,private:o.private,description:o.description,updatedAt:o.updated_at}}function re(o){const e=$.c(33),{status:n,error:s,retry:l}=o;if(n==="error"){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-destructive"})}),e[0]=c):c=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("p",{className:"text-sm font-medium",children:"Connection failed"}),e[1]=v):v=e[1];const O=s??"Something went wrong while connecting to GitHub.";let A;e[2]!==O?(A=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:O})]}),e[2]=O,e[3]=A):A=e[3];let T;e[4]!==l?(T=t.jsx("button",{type:"button",onClick:l,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:"Try again"}),e[4]=l,e[5]=T):T=e[5];let g;return e[6]!==A||e[7]!==T?(g=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[c,A,T]}),e[6]=A,e[7]=T,e[8]=g):g=e[8],g}const i=n==="authenticating";let r;e[9]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(F,{className:"size-5 text-foreground"})}),e[9]=r):r=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(Y,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[10]=f):f=e[10];const b=i?"Authenticating with GitHub":"Setting up GitHub";let a;e[11]!==b?(a=t.jsx("p",{className:"text-sm font-medium",children:b}),e[11]=b,e[12]=a):a=e[12];const C=i?"Complete the OAuth flow in your browser":"Installing the GitHub connection...";let h;e[13]!==C?(h=t.jsx("p",{className:"text-xs text-muted-foreground",children:C}),e[13]=C,e[14]=h):h=e[14];let m;e[15]!==a||e[16]!==h?(m=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[a,h]}),e[15]=a,e[16]=h,e[17]=m):m=e[17];const x=i?"bg-muted-foreground/30":"bg-foreground animate-pulse";let N;e[18]!==x?(N=V("size-1.5 rounded-full",x),e[18]=x,e[19]=N):N=e[19];let y;e[20]!==N?(y=t.jsx("span",{className:N}),e[20]=N,e[21]=y):y=e[21];const p=i?"bg-foreground animate-pulse":"bg-muted-foreground/30";let I;e[22]!==p?(I=V("size-1.5 rounded-full",p),e[22]=p,e[23]=I):I=e[23];let w;e[24]!==I?(w=t.jsx("span",{className:I}),e[24]=I,e[25]=w):w=e[25];let j;e[26]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[26]=j):j=e[26];let d;e[27]!==y||e[28]!==w?(d=t.jsxs("div",{className:"flex items-center gap-1.5",children:[y,w,j]}),e[27]=y,e[28]=w,e[29]=d):d=e[29];let S;return e[30]!==d||e[31]!==m?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[f,m,d]}),e[30]=d,e[31]=m,e[32]=S):S=e[32],S}export{F as G,jt as H,vt as I,Fe as S,Nt as W,Et as a,St as u};
|