decocms 4.99.4 → 4.99.6
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-C7MslaLR.js → AlertCircle-HDf1SdMp.js} +1 -1
- package/dist/client/assets/{AreaChart-BTuJ9KfA.js → AreaChart-DBzjQPAs.js} +1 -1
- package/dist/client/assets/{ArrowRight-BcxHvBZl.js → ArrowRight-BJXle-0w.js} +1 -1
- package/dist/client/assets/{ArrowUp-Dx5p-RmC.js → ArrowUp-Dh0BiOXI.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DZ3-lzXp.js → ArrowUpRight-CrR71a1A.js} +1 -1
- package/dist/client/assets/{Check-Btldp1zg.js → Check-B1cADIUI.js} +1 -1
- package/dist/client/assets/{CheckCircle-BuQjG5TK.js → CheckCircle-f1iSH8hB.js} +1 -1
- package/dist/client/assets/{ChevronDown-l_A3M_wf.js → ChevronDown-DOs1UnZr.js} +1 -1
- package/dist/client/assets/{ChevronRight-BIspaBbu.js → ChevronRight-CgFu9sdx.js} +1 -1
- package/dist/client/assets/{ChevronUp-CbWj-JPO.js → ChevronUp-uAvdnVUd.js} +1 -1
- package/dist/client/assets/{Copy01-CaG2A2wm.js → Copy01-CV7iKrTC.js} +1 -1
- package/dist/client/assets/{DotsVertical-BegrkRAd.js → DotsVertical-f9H8H7Yb.js} +1 -1
- package/dist/client/assets/{Eye-n7F3_pH4.js → Eye-8j1uMBcI.js} +1 -1
- package/dist/client/assets/{FilterLines-D74fcuno.js → FilterLines-Ds7Z0X1H.js} +1 -1
- package/dist/client/assets/{Globe01-BUN-6dPc.js → Globe01-Du8VyJAD.js} +1 -1
- package/dist/client/assets/{Globe04-OC3kWxEd.js → Globe04-Dimrs46t.js} +1 -1
- package/dist/client/assets/{HardDrive-sPxi9cVE.js → HardDrive-Beq8HBY2.js} +1 -1
- package/dist/client/assets/{Image01-DOKZLS3n.js → Image01-DuaEC9og.js} +1 -1
- package/dist/client/assets/{Key01-BOkUeTGR.js → Key01-B--Re1k8.js} +1 -1
- package/dist/client/assets/{LayoutLeft-C0Cux1Fk.js → LayoutLeft-B5BM6eYc.js} +1 -1
- package/dist/client/assets/{LinkExternal01-DCsltjSv.js → LinkExternal01-BPFggp-6.js} +1 -1
- package/dist/client/assets/{Monitor01-CDwcd_zn.js → Monitor01-o18BZ9Nq.js} +1 -1
- package/dist/client/assets/{Package-ChEjJzRf.js → Package-BLDWt75n.js} +1 -1
- package/dist/client/assets/{Palette-BtxFGIye.js → Palette-C8bNRhGz.js} +1 -1
- package/dist/client/assets/{Play-DCNHEpbv.js → Play-D0L6Enqs.js} +1 -1
- package/dist/client/assets/{Plus-BWpeDIiC.js → Plus-DUMrP_Ye.js} +1 -1
- package/dist/client/assets/{SearchLg-BAFos4ti.js → SearchLg-Ge42HxvE.js} +1 -1
- package/dist/client/assets/{SearchMd-D5PMm26-.js → SearchMd-CFyBBHfV.js} +1 -1
- package/dist/client/assets/{Settings02-CETfKPeQ.js → Settings02-DxZuRsR8.js} +1 -1
- package/dist/client/assets/{Shield01-CaJG0J3f.js → Shield01-CutJo3UY.js} +1 -1
- package/dist/client/assets/{Star01-E3H8ZPcr.js → Star01-CZAUM9Rj.js} +1 -1
- package/dist/client/assets/{Stars01-CPSc8KBd.js → Stars01-B_bdJu2V.js} +1 -1
- package/dist/client/assets/{Stars02-ai2IOE66.js → Stars02-B4KvaZbQ.js} +1 -1
- package/dist/client/assets/{Sun-M3urxdUJ.js → Sun-b3BoDZ0m.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Bs5gwvDo.js → SwitchHorizontal01-DbZ_R8He.js} +1 -1
- package/dist/client/assets/{Tool01-D8Lh-5Kv.js → Tool01-JzwwChx7.js} +1 -1
- package/dist/client/assets/{Tool02-DWpcCeVk.js → Tool02-BkVxB69y.js} +1 -1
- package/dist/client/assets/{Trash01-BunOPvOH.js → Trash01-D-qZT79D.js} +1 -1
- package/dist/client/assets/{TrendUp01-DRBQwzJp.js → TrendUp01-MT2Z0dNu.js} +1 -1
- package/dist/client/assets/{Upload01-BKoh1Eu-.js → Upload01-D7dMZnFJ.js} +1 -1
- package/dist/client/assets/{User01-CfQjQb3O.js → User01-bt6Gy-BV.js} +1 -1
- package/dist/client/assets/{Users01-1qAiw5kv.js → Users01-CNmhIaTz.js} +1 -1
- package/dist/client/assets/{Users03-CFoRyG6w.js → Users03-BCiyVfPw.js} +1 -1
- package/dist/client/assets/{X-DefYjaiC.js → X-BwgP8F_p.js} +1 -1
- package/dist/client/assets/{XCircle-CSTEYaFt.js → XCircle-BHeraOqs.js} +1 -1
- package/dist/client/assets/{XClose-dktsudpR.js → XClose-Dnedv7ma.js} +1 -1
- package/dist/client/assets/{Zap-DKyNws_D.js → Zap-DGqev4qD.js} +1 -1
- package/dist/client/assets/{ZapSquare-uV_3SRZQ.js → ZapSquare-CSfVZjJP.js} +1 -1
- package/dist/client/assets/{ZoomOut-BYn_nuTa.js → ZoomOut-DtCIp_Rd.js} +1 -1
- package/dist/client/assets/{access-gate-CrIPbIcm.js → access-gate-Cv5FQA3e.js} +1 -1
- package/dist/client/assets/{add-section-modal-mlLl5feN.js → add-section-modal-BNTtmHap.js} +1 -1
- package/dist/client/assets/{agent-icon-DPj46qz4.js → agent-icon-BBGul_4P.js} +1 -1
- package/dist/client/assets/{agents-list-BPZ-7q6f.js → agents-list-Cf_qC56x.js} +1 -1
- package/dist/client/assets/{ai-providers-JySJkbSR.js → ai-providers-CCPYS5wZ.js} +1 -1
- package/dist/client/assets/{alert-dialog-D05um7oC.js → alert-dialog-Sv185C7F.js} +1 -1
- package/dist/client/assets/{alert-jjMCqhWY.js → alert-wrF4ZDG3.js} +1 -1
- package/dist/client/assets/{app-editor-DxBJbEVO.js → app-editor-B8dT0Kia.js} +1 -1
- package/dist/client/assets/{auth-BuYROqYP.js → auth-BBubLRKd.js} +1 -1
- package/dist/client/assets/{auth-catchall-DRSSIoFG.js → auth-catchall-B5UgKNAb.js} +1 -1
- package/dist/client/assets/{auth-entry-lkwKiMpv.js → auth-entry-1VUyHyCT.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Be2wbR6N.js → auth-split-layout-B46TSGwg.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-CYhnPvSD.js → authenticate-and-persist-oauth-D70Ev7Pq.js} +1 -1
- package/dist/client/assets/{automation-list-row-CkVMCd1b.js → automation-list-row-D-Em_vg3.js} +1 -1
- package/dist/client/assets/{automation-runs-B_KWcbT8.js → automation-runs-CB1lTVmc.js} +1 -1
- package/dist/client/assets/{automations-Bp7YUGVd.js → automations-AKtrHhfS.js} +1 -1
- package/dist/client/assets/{autosend-C3KvfWIZ.js → autosend-ImAM0A4d.js} +1 -1
- package/dist/client/assets/{avatar-BZVXAJYd.js → avatar-D8al7KMh.js} +1 -1
- package/dist/client/assets/{badge-BP8obAYN.js → badge-YUqxaABo.js} +1 -1
- package/dist/client/assets/block-document-P359pXUh.js +3 -0
- package/dist/client/assets/{brand-context-Xq1jc6-g.js → brand-context-GbWTV-Rh.js} +1 -1
- package/dist/client/assets/{buckets-B1oIOPxV.js → buckets-DUC1zECY.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CX4yequ8.js → bulk-category-panel-Dx_mdZmw.js} +1 -1
- package/dist/client/assets/{calendar-BqryvOsJ.js → calendar-CX4gw4AA.js} +2 -2
- package/dist/client/assets/{capability-load-error-BKIWgBVB.js → capability-load-error-yNSE1JhI.js} +1 -1
- package/dist/client/assets/{card-DsawJB79.js → card-C5WOx1dB.js} +1 -1
- package/dist/client/assets/{category-editor-_9aftiUj.js → category-editor-CimNpKLA.js} +1 -1
- package/dist/client/assets/{chat-context-CdcAuDUS.js → chat-context-Cl7WM-Kk.js} +1 -1
- package/dist/client/assets/{checkbox-1NHA6ags.js → checkbox-Bd1cxc3D.js} +1 -1
- package/dist/client/assets/{cli-auth-success-B52wNL2V.js → cli-auth-success-CyDCKAa0.js} +1 -1
- package/dist/client/assets/{collection-detail-BfHxFPCW.js → collection-detail-DIGzTuHX.js} +1 -1
- package/dist/client/assets/{collection-display-button-CARi-X__.js → collection-display-button-k5YlFt6U.js} +1 -1
- package/dist/client/assets/{collection-search-EZ_TgeOx.js → collection-search-B-jJ03ES.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-ntW_kap4.js → collection-table-wrapper-CnR5SxrW.js} +1 -1
- package/dist/client/assets/{collection-tabs-DexOABMQ.js → collection-tabs-BaRPNn2c.js} +1 -1
- package/dist/client/assets/{command-CSe-uHrh.js → command-Ddw_RlcV.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-ggTPgfmk.js → commerce-onboarding-BZivueu2.js} +1 -1
- package/dist/client/assets/{companions-core-QrJolxkg.js → companions-core-BufblIGl.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-S8cCvTaK.js → connect-desktop-dialog-D5TVd_Au.js} +1 -1
- package/dist/client/assets/{connect-B_xZYpLA.js → connect-yZ08DB7o.js} +1 -1
- package/dist/client/assets/{connection-card-BXqR2l1c.js → connection-card-B_Iz6s2X.js} +1 -1
- package/dist/client/assets/connection-detail-CKYFHqF0.js +1 -0
- package/dist/client/assets/{connection-form-helpers-CfHSjpL2.js → connection-form-helpers-D2TX4f4T.js} +1 -1
- package/dist/client/assets/{connections-DuBuf_K7.js → connections-Xw4BwABx.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-SqtdCkZ4.js → decopilot-sse-pool-DB9TgyZI.js} +1 -1
- package/dist/client/assets/{dialog-dfAy2TTt.js → dialog-kRue8TNr.js} +1 -1
- package/dist/client/assets/{domain-settings-CKc4FNZk.js → domain-settings-DoxrFsSM.js} +1 -1
- package/dist/client/assets/{drawer-BhtgSPao.js → drawer-C5ymga6c.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BxpmNkvj.js → dropdown-menu-BJ5MFfne.js} +1 -1
- package/dist/client/assets/{empty-state-Wdt305BC.js → empty-state-BHgtc18x.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CUPY4h8x.js → extract-connection-data-ClzMQ_W6.js} +1 -1
- package/dist/client/assets/{file-explorer-DvSJunYy.js → file-explorer-Cy3bPhN_.js} +1 -1
- package/dist/client/assets/{file-type-icon-BIP3n6ye.js → file-type-icon-CZ6YgmjJ.js} +1 -1
- package/dist/client/assets/{files-zAd-2EvH.js → files-BHVssS7B.js} +1 -1
- package/dist/client/assets/{form-CF3RjQBx.js → form-BG6IhVis.js} +1 -1
- package/dist/client/assets/{general-DXlHAo7g.js → general-C_v9u7xU.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Cq0j6Fer.js → github-repo-picker-Blw8OC-v.js} +1 -1
- package/dist/client/assets/{hooks-yHiQMJ5W.js → hooks-0cQl1oMF.js} +1 -1
- package/dist/client/assets/{index-h2Txlgmb.js → index-B7kfkue_.js} +3 -3
- package/dist/client/assets/{index-BIkMD2a1.js → index-CHJez2Ew.js} +1 -1
- package/dist/client/assets/{index-BMpEXBXM.js → index-CR8EVYLu.js} +1 -1
- package/dist/client/assets/{index-BB0l7D8W.js → index-Ckas4buh.js} +1 -1
- package/dist/client/assets/{index-BMv4jCYv.js → index-CnaMAXeJ.js} +1 -1
- package/dist/client/assets/{index-CPD_qiK-.js → index-CzL8HqfG.js} +1 -1
- package/dist/client/assets/{index-CetUKuua.js → index-D0Q1X1Pg.js} +1 -1
- package/dist/client/assets/{index-xMAThnJ3.js → index-D8UtC1tD.js} +3 -3
- package/dist/client/assets/{index-BitSPwcw.js → index-DDQXtrIQ.js} +1 -1
- package/dist/client/assets/{index-CsnXc5Et.js → index-DKNbamty.js} +5 -5
- package/dist/client/assets/{index-CRaj4we8.js → index-DcLbVCcI.js} +1 -1
- package/dist/client/assets/{index-8CSCdJSN.js → index-IaCzeKVy.js} +1 -1
- package/dist/client/assets/{index-redirect-CGMmT7Ut.js → index-redirect-C_RNv9yf.js} +1 -1
- package/dist/client/assets/{index-CYQEaXdg.js → index-wiK91-B7.js} +1 -1
- package/dist/client/assets/{index-CHOirrNp.js → index-zkg8YPmA.js} +1 -1
- package/dist/client/assets/{input-u9ojR0Jk.js → input-BnwhVFLX.js} +1 -1
- package/dist/client/assets/{integration-icon-BMvzy0w5.js → integration-icon-VR8DMR4b.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-BT6zttg7.js → invite-member-dialog-CWwQTuXZ.js} +1 -1
- package/dist/client/assets/{label-7U_jcH3x.js → label-TRynenvJ.js} +1 -1
- package/dist/client/assets/{layout-DwuWA2A3.js → layout-DfeXmrJu.js} +1 -1
- package/dist/client/assets/{login-DjRzz0_j.js → login-nlskvzQb.js} +1 -1
- package/dist/client/assets/{mcp-oauth-Det9HVTR.js → mcp-oauth-BG5wWyRd.js} +1 -1
- package/dist/client/assets/{members-Ct31LEsu.js → members-QllQbnCX.js} +1 -1
- package/dist/client/assets/{monaco-editor-GkkiGiO2.js → monaco-editor-DsjIA8fo.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-oSpt-0Nf.js → monitoring-stats-row-2KzUqM86.js} +1 -1
- package/dist/client/assets/{multi-select-CQorHX_C.js → multi-select-xGcytaXl.js} +1 -1
- package/dist/client/assets/{oauth-callback-B4eBU_O3.js → oauth-callback-B92gYhx8.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BcADfU57.js → oauth-callback-ai-provider-BCEDTYeS.js} +1 -1
- package/dist/client/assets/{onboarding-COoWUwjK.js → onboarding-Bc316OQB.js} +1 -1
- package/dist/client/assets/{org-install-DPiHB5gc.js → org-install-C9yApjyE.js} +1 -1
- package/dist/client/assets/{org-layout-IDVVMg-8.js → org-layout-CY596W8J.js} +1 -1
- package/dist/client/assets/{organization-choice-CTkHG9wB.js → organization-choice-Ckt6XIDd.js} +1 -1
- package/dist/client/assets/{orgs-BEVouQN2.js → orgs-g4M2D4al.js} +1 -1
- package/dist/client/assets/{page-seo-form-CgTRO54t.js → page-seo-form-BiRcVo3c.js} +1 -1
- package/dist/client/assets/page-seo-sheet-DojhcVrt.js +1 -0
- package/dist/client/assets/{popover-DeNJXOxs.js → popover-COj_IB75.js} +1 -1
- package/dist/client/assets/{post-editor-BC_EqG95.js → post-editor-CJ-l76wn.js} +1 -1
- package/dist/client/assets/{primitives-DW_xJ0XY.js → primitives-DfC5MU6Q.js} +1 -1
- package/dist/client/assets/{profile-B6LJKYaV.js → profile-P5f67Py6.js} +1 -1
- package/dist/client/assets/project-app-view-25PzzkII.js +1 -0
- package/dist/client/assets/record-editor-DXSyFVIm.js +1 -0
- package/dist/client/assets/{redirect-editor-BR4k4dU-.js → redirect-editor-C-fmVHTG.js} +1 -1
- package/dist/client/assets/registry-N5G9bX4u.js +2 -0
- package/dist/client/assets/{registry-layout-DdpD2Ry7.js → registry-layout-w51rnIhZ.js} +4 -4
- package/dist/client/assets/{reports-BqaJMLUV.js → reports-BHr7CcO3.js} +1 -1
- package/dist/client/assets/{require-capability-c3gGgAdr.js → require-capability-CkAszDrz.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DreE2Dff.js → required-auth-layout-D_Ki2P9p.js} +1 -1
- package/dist/client/assets/{reset-password-BLNw7U5H.js → reset-password-BJ8F97rm.js} +1 -1
- package/dist/client/assets/{roles-COJ501I0.js → roles-B5o9PX2m.js} +1 -1
- package/dist/client/assets/{search-input-mUDoQdXW.js → search-input-ehuup_3i.js} +1 -1
- package/dist/client/assets/{secrets-B7kBoBlY.js → secrets-C9ktuE8d.js} +1 -1
- package/dist/client/assets/{sections-editor-CkxSPNTY.js → sections-editor-Bko-kTwr.js} +1 -1
- package/dist/client/assets/{select-Dwl6tgyc.js → select-Ci7RZSzd.js} +1 -1
- package/dist/client/assets/{select-model-5fuU93qG.js → select-model-DZjxvBCc.js} +1 -1
- package/dist/client/assets/{self-tool-result-ClGvUSzE.js → self-tool-result-D-j89huE.js} +1 -1
- package/dist/client/assets/{seo-editor-4m4pHaJn.js → seo-editor-DJASP0bv.js} +1 -1
- package/dist/client/assets/{settings-layout-CEhhqr5X.js → settings-layout-BvSHkcpC.js} +1 -1
- package/dist/client/assets/{settings-section-8wzuI0e2.js → settings-section-Bzc6Rwbg.js} +1 -1
- package/dist/client/assets/{shell-controls-QkO6fUAg.js → shell-controls-xCDOGRzp.js} +1 -1
- package/dist/client/assets/{shell-layout-D1cDRvrL.js → shell-layout-P3HlCDDi.js} +1 -1
- package/dist/client/assets/{sidebar-B6ruAgp1.js → sidebar-DDMN0UUa.js} +1 -1
- package/dist/client/assets/{skeleton-AlkG0Gdf.js → skeleton-DHDS9MkE.js} +1 -1
- package/dist/client/assets/{sso-CXey7xHX.js → sso-Cg1P8i1A.js} +1 -1
- package/dist/client/assets/{store-DtsPgCIa.js → store-DXEGdfs5.js} +1 -1
- package/dist/client/assets/store-registry-BtFwNRWl.js +2 -0
- package/dist/client/assets/{studio-tools-CwZ4ZBgT.js → studio-tools-BVcfAbEY.js} +1 -1
- package/dist/client/assets/{switch-6H8FKWGB.js → switch-CdvvL6Gj.js} +1 -1
- package/dist/client/assets/{table-CXPm9nhx.js → table-CvG1Gt8e.js} +1 -1
- package/dist/client/assets/{tabs-7TkasHGl.js → tabs-vn5ztDQe.js} +1 -1
- package/dist/client/assets/{textarea-DrzR5udY.js → textarea-C13lpBK6.js} +1 -1
- package/dist/client/assets/{toggle-group-DcCG_z_S.js → toggle-group-iWDs0t6l.js} +1 -1
- package/dist/client/assets/{toolbar-Dwqw-NGi.js → toolbar-DjroajCZ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-BANxrES2.js → toolbar-icon-button-D_f12kyv.js} +1 -1
- package/dist/client/assets/{tooltip-Cx4iVbBS.js → tooltip-pFADIDzq.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CNxbdOdh.js → use-ai-providers-DE2cntMZ.js} +1 -1
- package/dist/client/assets/{use-api-keys-C_mORge4.js → use-api-keys-CdT5TGLj.js} +1 -1
- package/dist/client/assets/{use-automations-CRPUaRnG.js → use-automations-BaNT9vbM.js} +1 -1
- package/dist/client/assets/{use-autosave-C2LdWtX4.js → use-autosave-CJ2PTNPq.js} +1 -1
- package/dist/client/assets/{use-capability-DDoizOsm.js → use-capability-D-q43BYn.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BXUEdeXU.js → use-clock-tick-D6EuNXOr.js} +1 -1
- package/dist/client/assets/{use-connection-CRf-DTB0.js → use-connection-DBbVSDXt.js} +1 -1
- package/dist/client/assets/{use-copy-BIvcisP7.js → use-copy-BsTmY8gA.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-5RZTzNZt.js → use-create-virtual-mcp--SK7XprO.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BZzQGoBJ.js → use-debounced-autosave-BlXZElQ8.js} +1 -1
- package/dist/client/assets/{use-debounced-value-C5_koqkI.js → use-debounced-value-TGJ8SdlV.js} +1 -1
- package/dist/client/assets/{use-deco-credits-a2tWMbhr.js → use-deco-credits-CeNu-Ko2.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-D4WclKO1.js → use-decopilot-events-8bs5w4AD.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DvDrdj8E.js → use-delete-connection-BAH-lugN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BY9aiNeW.js → use-deployment-admin-DgtqQkNf.js} +1 -1
- package/dist/client/assets/{use-file-configs-rAeCy2m6.js → use-file-configs-BJFdEtoj.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-5JOaC6HH.js → use-infinite-scroll-CISSXTkf.js} +1 -1
- package/dist/client/assets/{use-join-requests-Dk8eY_ir.js → use-join-requests-CRQ-VsRM.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-Cti2GrcA.js → use-mcp-auth-status-basL1SDv.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CxJl6URN.js → use-mcp-client-B8-Q-EhH.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CZl6XrZ7.js → use-mcp-tools-Sji4g0bw.js} +1 -1
- package/dist/client/assets/{use-members-BDKlfbtq.js → use-members-C870Ysbt.js} +1 -1
- package/dist/client/assets/{use-mobile-CljsORKC.js → use-mobile-DNW0WYD1.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CfNAtLX9.js → use-navigate-to-agent-DWTvxd5x.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-WFmIGMAp.js → use-org-auth-client-D3-pn0NR.js} +1 -1
- package/dist/client/assets/{use-org-sso-CdqzH40J.js → use-org-sso-DragB5KD.js} +1 -1
- package/dist/client/assets/{use-organization-roles-snr9TURY.js → use-organization-roles-D7tyvF0D.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CPH24cID.js → use-organization-settings-Dp3mUEWr.js} +1 -1
- package/dist/client/assets/{use-registry-app-B5yOQbYF.js → use-registry-app-BAuEL7m7.js} +1 -1
- package/dist/client/assets/{use-registry-connections-DOp_CmU_.js → use-registry-connections-CrWYgFxG.js} +1 -1
- package/dist/client/assets/{use-secrets-BngqMQYW.js → use-secrets-CW6BSksG.js} +1 -1
- package/dist/client/assets/{use-status-sounds-Csty195w.js → use-status-sounds-CqVy5a-3.js} +1 -1
- package/dist/client/assets/{use-view-mode--DcXGci1.js → use-view-mode-DAFg7BUY.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C9595_o4.js → use-virtual-mcp-v_IAAgB6.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-CwrdnI4P.js +1 -0
- package/dist/client/assets/{useRouterState-B5E07hul.js → useRouterState-DpM9fYmi.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-RIEYysq5.js +1 -0
- package/dist/client/assets/{users-B8tx5ZHD.js → users-CPbgbhr1.js} +1 -1
- package/dist/client/assets/{variant-calendar-Sp_Pw0W3.js → variant-calendar-DcP4ErMU.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DFicmu5N.js → view-mode-toggle-Bs001eF7.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/block-document-BIOalMD-.js +0 -3
- package/dist/client/assets/connection-detail-BR7vqb17.js +0 -1
- package/dist/client/assets/page-seo-sheet-ZXZqYZeH.js +0 -1
- package/dist/client/assets/project-app-view-CIBx6iGT.js +0 -1
- package/dist/client/assets/record-editor-DDua03Aj.js +0 -1
- package/dist/client/assets/registry-BZHylcQg.js +0 -2
- package/dist/client/assets/store-registry-XsXH60Bx.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BUdwW0Ym.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CPYBdW4F.js +0 -1
package/dist/client/assets/{github-repo-picker-Cq0j6Fer.js → github-repo-picker-Blw8OC-v.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{F as ee,a as re,o as X,r as z,ad as V,c as M,b as $,j as t,k as Q,e as te,t as K,dY as ae,K as q,n as ce,m as Y,B as ue,w as de,y as me}from"./index-xMAThnJ3.js";import{a as fe,b as ge,d as xe,e as pe}from"./dialog-dfAy2TTt.js";import{C as he}from"./collection-search-EZ_TgeOx.js";import{u as be}from"./use-debounced-value-C5_koqkI.js";import{b as ne,u as ye}from"./use-connection-CRf-DTB0.js";import{u as J,S as se}from"./use-mcp-client-CxJl6URN.js";import{a as oe}from"./authenticate-and-persist-oauth-CYhnPvSD.js";import{b as ie}from"./Settings02-CETfKPeQ.js";import{Q as je}from"./agent-icon-DPj46qz4.js";import{u as Ne,G as H}from"./use-registry-app-B5yOQbYF.js";import{e as ve}from"./extract-connection-data-CUPY4h8x.js";import{c as ke}from"./use-navigate-to-agent-CfNAtLX9.js";import{p as Z,f as Ce}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as we}from"./github-repo-scope-DjMZbiKa.js";const Re="deco/mcp-github";function Se(P){const{org:e}=ee(),{data:a}=re.useSession(),p=ne(),k=X(),[o,d]=z.useState("idle"),[i,s]=z.useState(null),[f,v]=z.useState(null),{data:b,isLoading:C}=Ne(Re,{enabled:P.enabled}),c=z.useRef(!1);P.enabled&&b&&!C&&!c.current&&a?.user?.id&&o==="idle"&&(c.current=!0,l());async function l(){if(!(!b||!a?.user?.id||!e))try{d("installing"),s(null);const u=ve(b,e.id,a.user.id,{remoteIndex:0});if(!u.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await p.create.mutateAsync(u);d("authenticating");const h=await oe({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:m=>p.update.mutateAsync({id:g,data:{connection_token:m}}).then(()=>{})});if(h.ran&&!h.ok){try{await p.delete.mutateAsync(g)}catch{}throw new Error(h.error&&h.error!=="no token received"?h.error:"No token received from GitHub")}V(k,e.id),v(u),d("ready")}catch(u){s(u instanceof Error?u.message:String(u)),d("error")}}function r(){d("idle"),s(null),v(null),c.current=!1}return P.enabled&&C&&o==="idle"?{status:"installing",error:null,connection:null,retry:r}:{status:o,error:i,connection:f,retry:r}}function Ke(P){const e=M.c(27),{open:a,onOpenChange:p,title:k,onImportComplete:o,mode:d}=P,i=d===void 0?"agent":d,s=$();let f;e[0]!==i||e[1]!==s||e[2]!==k?(f=k??s(i==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=i,e[1]=s,e[2]=k,e[3]=f):f=e[3];const v=f,[b,C]=z.useState(null);let c;e[4]!==v?(c=t.jsx(fe,{className:"sr-only",children:t.jsx(ge,{children:v})}),e[4]=v,e[5]=c):c=e[5];let l;e[6]!==v||e[7]!==b||e[8]!==s?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?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":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ie,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(H,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v})]})}),e[6]=v,e[7]=b,e[8]=s,e[9]=l):l=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=r):r=e[10];let u;e[11]!==p?(u=()=>p(!1),e[11]=p,e[12]=u):u=e[12];let x;e[13]!==i||e[14]!==o||e[15]!==a||e[16]!==b||e[17]!==u?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(z.Suspense,{fallback:r,children:t.jsx(Pe,{open:a,onComplete:u,selectedInstallation:b,onSelectInstallation:C,onImportComplete:o,mode:i})})}),e[13]=i,e[14]=o,e[15]=a,e[16]=b,e[17]=u,e[18]=x):x=e[18];let g;e[19]!==c||e[20]!==l||e[21]!==x?(g=t.jsxs(xe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[c,l,x]}),e[19]=c,e[20]=l,e[21]=x,e[22]=g):g=e[22];let h;return e[23]!==p||e[24]!==a||e[25]!==g?(h=t.jsx(pe,{open:a,onOpenChange:p,children:g}),e[23]=p,e[24]=a,e[25]=g,e[26]=h):h=e[26],h}function Pe({open:P,onComplete:e,selectedInstallation:a,onSelectInstallation:p,onImportComplete:k,mode:o="agent"}){const d=$(),{org:i}=ee(),s=X(),f=ke(),[v,b]=z.useState(null),C=ye({slug:"mcp-github"}),c=we(C),l=Se({enabled:P&&c.length===0}),r=c.length===1?c[0]??null:v,u=J({connectionId:r?.id??"",orgId:i.id,orgSlug:i.slug}),x=J({connectionId:se,orgId:i.id,orgSlug:i.slug}),g=async(n,y)=>{try{const w=await u.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:y}});if(w.isError)return null;const S=w.content?.find(I=>I.type==="resource")?.resource?.text;if(!S)return null;try{const I=JSON.parse(S);return typeof I=="string"?I:JSON.stringify(I)}catch{return S}}catch{return null}},h=(n,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([j,w])=>{const R=j??w??null;R&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:R}}}}),V(s,i.id))}).catch(j=>{console.error("GitHub instructions fetch failed:",j)})},m=te({mutationFn:async n=>{if(!r||!a)throw new Error("No GitHub connection or installation");const y=a.installationId;if(o==="connection"){const{childConnectionId:R}=await Z({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:S=>u.callTool(S),selfCallTool:S=>x.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:R,item:null}}const{childConnectionId:j}=await Z({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:R=>u.callTool(R),selfCallTool:R=>x.callTool(R)});let w=null;try{const R=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:y,connectionId:j},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:j}]}}}),S=R.structuredContent??R,I=S.item?.id;if(!S.item||!I)throw new Error("Failed to create the imported agent");return w=I,{virtualMcpId:I,repo:n,connectionId:j,item:S.item}}catch(R){throw w&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:w}}).catch(()=>{}),await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:j,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:n,repo:y,connectionId:j,item:w})=>{if(o==="connection"||!n||!w){V(s,i.id),ae(s,i.id),K.success(d("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(q.collectionItem(x,i.id,"","VIRTUAL_MCP",n),{item:w}),V(s,i.id),h(n,y),k){k({virtualMcpId:n,repo:y,connectionId:j});return}K.success(d("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),f(n)},onError:n=>{K.error(d("common.githubRepoPicker.failedImport",{error:n instanceof Error?n.message:d("common.githubRepoPicker.unknownError")}))}});return l.status==="installing"||l.status==="authenticating"?t.jsx(W,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx(W,{status:"error",error:l.error,retry:l.retry}):c.length===0&&l.status==="idle"?t.jsx(W,{status:"installing",error:null,retry:l.retry}):c.length>1&&!r?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:d("common.githubRepoPicker.selectConnection")})}),c.map(n=>t.jsxs("button",{type:"button",onClick:()=>b(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.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(H,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):r?a?t.jsx(Te,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,installation:a,onSelectRepo:n=>m.mutate(n),isSaving:m.isPending}):t.jsx(Ie,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,onSelect:p,showBackButton:c.length>1,onBack:()=>b(null)}):null}function Ie(P){const e=M.c(75),{connectionId:a,orgId:p,orgSlug:k,onSelect:o,showBackButton:d,onBack:i}=P,s=$();let f;e[0]!==p||e[1]!==k?(f={connectionId:se,orgId:p,orgSlug:k},e[0]=p,e[1]=k,e[2]=f):f=e[2];const v=J(f),b=X(),C=ne();let c;e[3]!==a||e[4]!==p?(c=q.githubUserOrgs(p,a),e[3]=a,e[4]=p,e[5]=c):c=e[5];let l;e[6]!==a||e[7]!==v?(l=()=>Ce(N=>v.callTool(N),a),e[6]=a,e[7]=v,e[8]=l):l=e[8];let r;e[9]!==c||e[10]!==l?(r={queryKey:c,queryFn:l},e[9]=c,e[10]=l,e[11]=r):r=e[11];const u=ce(r);let x;e[12]!==C||e[13]!==a||e[14]!==u||e[15]!==p||e[16]!==k||e[17]!==b?(x=async()=>{const N=await oe({connectionId:a,orgId:p,orgSlug:k,persistFallback:L=>C.update.mutateAsync({id:a,data:{connection_token:L}}).then(Ee)});if(N.ran&&!N.ok)throw new Error(N.error??"no token received");const E=new URL(`/api/${k}/mcp/${a}`,window.location.origin);await b.invalidateQueries({queryKey:q.isMCPAuthenticated(E.href,null)}),await b.invalidateQueries({queryKey:q.mcpClientPrefix()}),await u.refetch()},e[12]=C,e[13]=a,e[14]=u,e[15]=p,e[16]=k,e[17]=b,e[18]=x):x=e[18];let g;e[19]!==s?(g=N=>{K.error(s("common.githubRepoPicker.failedReconnect",{error:N instanceof Error?N.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let h;e[21]!==x||e[22]!==g?(h={mutationFn:x,onError:g},e[21]=x,e[22]=g,e[23]=h):h=e[23];const m=te(h);if(u.isLoading){let N;return e[24]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=N):N=e[24],N}if(u.isError){let N;e[25]!==s?(N=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=N):N=e[26];let E;e[27]!==N?(E=t.jsx("p",{className:"text-sm text-destructive",children:N}),e[27]=N,e[28]=E):E=e[28];let L;e[29]!==s?(L=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=L):L=e[30];let G;e[31]!==L?(G=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:L}),e[31]=L,e[32]=G):G=e[32];let O;e[33]!==m?(O=()=>m.mutate(),e[33]=m,e[34]=O):O=e[34];const le=m.isPending;let U;e[35]!==m.isPending?(U=m.isPending?t.jsx(Q,{size:14,className:"animate-spin"}):t.jsx(H,{className:"size-3.5"}),e[35]=m.isPending,e[36]=U):U=e[36];let F;e[37]!==s?(F=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=F):F=e[38];let D;e[39]!==m.isPending||e[40]!==O||e[41]!==U||e[42]!==F?(D=t.jsxs(ue,{type:"button",variant:"outline",size:"sm",onClick:O,disabled:le,children:[U,F]}),e[39]=m.isPending,e[40]=O,e[41]=U,e[42]=F,e[43]=D):D=e[43];let B;return e[44]!==G||e[45]!==D||e[46]!==E?(B=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[E,G,D]}),e[44]=G,e[45]=D,e[46]=E,e[47]=B):B=e[47],B}const n=u.data;if(!n)return null;let y;e[48]!==i||e[49]!==d||e[50]!==s?(y=d&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ie,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=i,e[49]=d,e[50]=s,e[51]=y):y=e[51];let j;if(e[52]!==n.installations||e[53]!==o||e[54]!==s){let N;e[56]!==o||e[57]!==s?(N=E=>t.jsxs("button",{type:"button",onClick:()=>o(E),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:E.avatarUrl,alt:E.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:E.login}),E.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},E.installationId),e[56]=o,e[57]=s,e[58]=N):N=e[58],j=n.installations.map(N),e[52]=n.installations,e[53]=o,e[54]=s,e[55]=j}else j=e[55];let w;e[59]!==j?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:j}),e[59]=j,e[60]=w):w=e[60];const R=n.appSlug?`https://github.com/apps/${n.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[61]!==s?(S=s("common.githubRepoPicker.accountNotListed"),e[61]=s,e[62]=S):S=e[62];let I;e[63]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[63]=s,e[64]=I):I=e[64];let T;e[65]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[65]=I,e[66]=T):T=e[66];let A;e[67]!==R||e[68]!==S||e[69]!==T?(A=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:R,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[S," ",T]})}),e[67]=R,e[68]=S,e[69]=T,e[70]=A):A=e[70];let _;return e[71]!==w||e[72]!==A||e[73]!==y?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,w,A]}),e[71]=w,e[72]=A,e[73]=y,e[74]=_):_=e[74],_}function Ee(){}function Te(P){const e=M.c(23),{connectionId:a,orgId:p,orgSlug:k,installation:o,onSelectRepo:d,isSaving:i}=P,s=$(),[f,v]=z.useState(""),b=be(f,300),C=z.useDeferredValue(b),c=f!==C;let l;e[0]!==s?(l=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==c||e[3]!==f||e[4]!==l?(r=t.jsx(he,{placeholder:l,value:f,onChange:v,isSearching:c}),e[2]=c,e[3]=f,e[4]=l,e[5]=r):r=e[5];const u=c?"opacity-40":"opacity-100";let x;e[6]!==u?(x=Y("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[6]=u,e[7]=x):x=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let h;e[9]!==a||e[10]!==C||e[11]!==o||e[12]!==i||e[13]!==d||e[14]!==p||e[15]!==k?(h=t.jsx(z.Suspense,{fallback:g,children:t.jsx(Ae,{connectionId:a,orgId:p,orgSlug:k,installation:o,query:C,onSelectRepo:d,isSaving:i})}),e[9]=a,e[10]=C,e[11]=o,e[12]=i,e[13]=d,e[14]=p,e[15]=k,e[16]=h):h=e[16];let m;e[17]!==x||e[18]!==h?(m=t.jsx("div",{className:x,children:h}),e[17]=x,e[18]=h,e[19]=m):m=e[19];let n;return e[20]!==r||e[21]!==m?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r,m]}),e[20]=r,e[21]=m,e[22]=n):n=e[22],n}function Ae(P){const e=M.c(36),{connectionId:a,orgId:p,orgSlug:k,installation:o,query:d,onSelectRepo:i,isSaving:s}=P,f=$();let v;e[0]!==a||e[1]!==p||e[2]!==k?(v={connectionId:a,orgId:p,orgSlug:k},e[0]=a,e[1]=p,e[2]=k,e[3]=v):v=e[3];const b=J(v),C=o.type==="User"?"user":"org",c=d?`${C}:${o.login} ${d} in:name`:`${C}:${o.login}`;let l;e[4]!==a||e[5]!==o.login||e[6]!==p||e[7]!==d?(l=q.githubOrgRepos(p,a,o.login,d),e[4]=a,e[5]=o.login,e[6]=p,e[7]=d,e[8]=l):l=e[8];let r;e[9]!==b||e[10]!==c?(r=async m=>{const{signal:n}=m,j=(await b.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!j)throw new Error("No response from search_repositories");return(JSON.parse(j).items??[]).map(_e)},e[9]=b,e[10]=c,e[11]=r):r=e[11];let u;e[12]!==l||e[13]!==r?(u={queryKey:l,queryFn:r},e[12]=l,e[13]=r,e[14]=u):u=e[14];const{data:x}=de(u);if(x.length===0){let m;e[15]!==f?(m=f("common.githubRepoPicker.noRepositoriesFound"),e[15]=f,e[16]=m):m=e[16];let n;e[17]!==m?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[17]=m,e[18]=n):n=e[18];let y;e[19]!==d||e[20]!==f?(y=d&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:f("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=d,e[20]=f,e[21]=y):y=e[21];let j;return e[22]!==n||e[23]!==y?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,y]}),e[22]=n,e[23]=y,e[24]=j):j=e[24],j}let g;if(e[25]!==s||e[26]!==i||e[27]!==x||e[28]!==f){let m;e[30]!==s||e[31]!==i||e[32]!==f?(m=n=>t.jsxs("button",{type:"button",onClick:()=>i(n),disabled:s,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(H,{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:n.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:[n.private?t.jsx(me,{size:10}):t.jsx(je,{size:10}),n.private?f("common.githubRepoPicker.private"):f("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=i,e[32]=f,e[33]=m):m=e[33],g=x.map(m),e[25]=s,e[26]=i,e[27]=x,e[28]=f,e[29]=g}else g=e[29];let h;return e[34]!==g?(h=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=h):h=e[35],h}function _e(P){return{name:P.name,fullName:P.full_name,owner:P.full_name.split("/")[0]??"",url:P.html_url,private:P.private,description:P.description,updatedAt:P.updated_at}}function W(P){const e=M.c(51),{status:a,error:p,retry:k}=P,o=$();if(a==="error"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-destructive"})}),e[0]=j):j=e[0];let w;e[1]!==o?(w=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=w):w=e[2];let R;e[3]!==w?(R=t.jsx("p",{className:"text-sm font-medium",children:w}),e[3]=w,e[4]=R):R=e[4];let S;e[5]!==p||e[6]!==o?(S=p??o("common.githubRepoPicker.somethingWentWrong"),e[5]=p,e[6]=o,e[7]=S):S=e[7];let I;e[8]!==S?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let A;e[13]!==o?(A=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=A):A=e[14];let _;e[15]!==k||e[16]!==A?(_=t.jsx("button",{type:"button",onClick:k,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:A}),e[15]=k,e[16]=A,e[17]=_):_=e[17];let N;return e[18]!==T||e[19]!==_?(N=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[j,T,_]}),e[18]=T,e[19]=_,e[20]=N):N=e[20],N}const d=a==="authenticating";let i;e[21]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-foreground"})}),e[21]=i):i=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[i,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(Q,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let f;e[23]!==d||e[24]!==o?(f=o(d?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=d,e[24]=o,e[25]=f):f=e[25];let v;e[26]!==f?(v=t.jsx("p",{className:"text-sm font-medium",children:f}),e[26]=f,e[27]=v):v=e[27];let b;e[28]!==d||e[29]!==o?(b=o(d?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=d,e[29]=o,e[30]=b):b=e[30];let C;e[31]!==b?(C=t.jsx("p",{className:"text-xs text-muted-foreground",children:b}),e[31]=b,e[32]=C):C=e[32];let c;e[33]!==v||e[34]!==C?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,C]}),e[33]=v,e[34]=C,e[35]=c):c=e[35];const l=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let r;e[36]!==l?(r=Y("size-1.5 rounded-full",l),e[36]=l,e[37]=r):r=e[37];let u;e[38]!==r?(u=t.jsx("span",{className:r}),e[38]=r,e[39]=u):u=e[39];const x=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==x?(g=Y("size-1.5 rounded-full",x),e[40]=x,e[41]=g):g=e[41];let h;e[42]!==g?(h=t.jsx("span",{className:g}),e[42]=g,e[43]=h):h=e[43];let m;e[44]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=m):m=e[44];let n;e[45]!==u||e[46]!==h?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[u,h,m]}),e[45]=u,e[46]=h,e[47]=n):n=e[47];let y;return e[48]!==n||e[49]!==c?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,c,n]}),e[48]=n,e[49]=c,e[50]=y):y=e[50],y}export{Ke as G,Se as u};
|
|
1
|
+
import{F as ee,a as re,o as X,r as z,ad as V,c as M,b as $,j as t,k as Q,e as te,t as K,dY as ae,K as q,n as ce,m as Y,B as ue,w as de,y as me}from"./index-D8UtC1tD.js";import{a as fe,b as ge,d as xe,e as pe}from"./dialog-kRue8TNr.js";import{C as he}from"./collection-search-B-jJ03ES.js";import{u as be}from"./use-debounced-value-TGJ8SdlV.js";import{b as ne,u as ye}from"./use-connection-DBbVSDXt.js";import{u as J,S as se}from"./use-mcp-client-B8-Q-EhH.js";import{a as oe}from"./authenticate-and-persist-oauth-D70Ev7Pq.js";import{b as ie}from"./Settings02-DxZuRsR8.js";import{Q as je}from"./agent-icon-BBGul_4P.js";import{u as Ne,G as H}from"./use-registry-app-BAuEL7m7.js";import{e as ve}from"./extract-connection-data-ClzMQ_W6.js";import{c as ke}from"./use-navigate-to-agent-DWTvxd5x.js";import{p as Z,f as Ce}from"./provision-repo-scoped-github-connection-2iDn-wQ1.js";import{g as we}from"./github-repo-scope-DjMZbiKa.js";const Re="deco/mcp-github";function Se(P){const{org:e}=ee(),{data:a}=re.useSession(),p=ne(),k=X(),[o,d]=z.useState("idle"),[i,s]=z.useState(null),[f,v]=z.useState(null),{data:b,isLoading:C}=Ne(Re,{enabled:P.enabled}),c=z.useRef(!1);P.enabled&&b&&!C&&!c.current&&a?.user?.id&&o==="idle"&&(c.current=!0,l());async function l(){if(!(!b||!a?.user?.id||!e))try{d("installing"),s(null);const u=ve(b,e.id,a.user.id,{remoteIndex:0});if(!u.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await p.create.mutateAsync(u);d("authenticating");const h=await oe({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:m=>p.update.mutateAsync({id:g,data:{connection_token:m}}).then(()=>{})});if(h.ran&&!h.ok){try{await p.delete.mutateAsync(g)}catch{}throw new Error(h.error&&h.error!=="no token received"?h.error:"No token received from GitHub")}V(k,e.id),v(u),d("ready")}catch(u){s(u instanceof Error?u.message:String(u)),d("error")}}function r(){d("idle"),s(null),v(null),c.current=!1}return P.enabled&&C&&o==="idle"?{status:"installing",error:null,connection:null,retry:r}:{status:o,error:i,connection:f,retry:r}}function Ke(P){const e=M.c(27),{open:a,onOpenChange:p,title:k,onImportComplete:o,mode:d}=P,i=d===void 0?"agent":d,s=$();let f;e[0]!==i||e[1]!==s||e[2]!==k?(f=k??s(i==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=i,e[1]=s,e[2]=k,e[3]=f):f=e[3];const v=f,[b,C]=z.useState(null);let c;e[4]!==v?(c=t.jsx(fe,{className:"sr-only",children:t.jsx(ge,{children:v})}),e[4]=v,e[5]=c):c=e[5];let l;e[6]!==v||e[7]!==b||e[8]!==s?(l=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:b?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":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(ie,{size:16})}),t.jsx("img",{src:b.avatarUrl,alt:b.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:b.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(H,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v})]})}),e[6]=v,e[7]=b,e[8]=s,e[9]=l):l=e[9];let r;e[10]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=r):r=e[10];let u;e[11]!==p?(u=()=>p(!1),e[11]=p,e[12]=u):u=e[12];let x;e[13]!==i||e[14]!==o||e[15]!==a||e[16]!==b||e[17]!==u?(x=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(z.Suspense,{fallback:r,children:t.jsx(Pe,{open:a,onComplete:u,selectedInstallation:b,onSelectInstallation:C,onImportComplete:o,mode:i})})}),e[13]=i,e[14]=o,e[15]=a,e[16]=b,e[17]=u,e[18]=x):x=e[18];let g;e[19]!==c||e[20]!==l||e[21]!==x?(g=t.jsxs(xe,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[c,l,x]}),e[19]=c,e[20]=l,e[21]=x,e[22]=g):g=e[22];let h;return e[23]!==p||e[24]!==a||e[25]!==g?(h=t.jsx(pe,{open:a,onOpenChange:p,children:g}),e[23]=p,e[24]=a,e[25]=g,e[26]=h):h=e[26],h}function Pe({open:P,onComplete:e,selectedInstallation:a,onSelectInstallation:p,onImportComplete:k,mode:o="agent"}){const d=$(),{org:i}=ee(),s=X(),f=ke(),[v,b]=z.useState(null),C=ye({slug:"mcp-github"}),c=we(C),l=Se({enabled:P&&c.length===0}),r=c.length===1?c[0]??null:v,u=J({connectionId:r?.id??"",orgId:i.id,orgSlug:i.slug}),x=J({connectionId:se,orgId:i.id,orgSlug:i.slug}),g=async(n,y)=>{try{const w=await u.callTool({name:"get_file_contents",arguments:{owner:n.owner,repo:n.name,path:y}});if(w.isError)return null;const S=w.content?.find(I=>I.type==="resource")?.resource?.text;if(!S)return null;try{const I=JSON.parse(S);return typeof I=="string"?I:JSON.stringify(I)}catch{return S}}catch{return null}},h=(n,y)=>{Promise.all([g(y,"AGENTS.md"),g(y,"CLAUDE.md")]).then(async([j,w])=>{const R=j??w??null;R&&(await x.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:n,data:{metadata:{instructions:R}}}}),V(s,i.id))}).catch(j=>{console.error("GitHub instructions fetch failed:",j)})},m=te({mutationFn:async n=>{if(!r||!a)throw new Error("No GitHub connection or installation");const y=a.installationId;if(o==="connection"){const{childConnectionId:R}=await Z({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:S=>u.callTool(S),selfCallTool:S=>x.callTool(S),orgShared:!0});return{virtualMcpId:null,repo:n,connectionId:R,item:null}}const{childConnectionId:j}=await Z({orgSlug:i.slug,sourceConnection:r,installationId:y,owner:n.owner,repo:n.name,githubCallTool:R=>u.callTool(R),selfCallTool:R=>x.callTool(R)});let w=null;try{const R=await x.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:n.name,description:n.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:n.owner,name:n.name,url:n.url,installationId:y,connectionId:j},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:j}]}}}),S=R.structuredContent??R,I=S.item?.id;if(!S.item||!I)throw new Error("Failed to create the imported agent");return w=I,{virtualMcpId:I,repo:n,connectionId:j,item:S.item}}catch(R){throw w&&await x.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:w}}).catch(()=>{}),await x.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:j,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:n,repo:y,connectionId:j,item:w})=>{if(o==="connection"||!n||!w){V(s,i.id),ae(s,i.id),K.success(d("common.githubRepoPicker.addedRepo",{name:y.name})),e();return}if(s.setQueryData(q.collectionItem(x,i.id,"","VIRTUAL_MCP",n),{item:w}),V(s,i.id),h(n,y),k){k({virtualMcpId:n,repo:y,connectionId:j});return}K.success(d("common.githubRepoPicker.importedRepo",{name:y.name})),e(),localStorage.setItem("mesh:sidebar-open",JSON.stringify(!1)),f(n)},onError:n=>{K.error(d("common.githubRepoPicker.failedImport",{error:n instanceof Error?n.message:d("common.githubRepoPicker.unknownError")}))}});return l.status==="installing"||l.status==="authenticating"?t.jsx(W,{status:l.status,error:null,retry:l.retry}):l.status==="error"?t.jsx(W,{status:"error",error:l.error,retry:l.retry}):c.length===0&&l.status==="idle"?t.jsx(W,{status:"installing",error:null,retry:l.retry}):c.length>1&&!r?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:d("common.githubRepoPicker.selectConnection")})}),c.map(n=>t.jsxs("button",{type:"button",onClick:()=>b(n),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[n.icon?t.jsx("img",{src:n.icon,alt:n.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(H,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:n.title})]},n.id))]}):r?a?t.jsx(Te,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,installation:a,onSelectRepo:n=>m.mutate(n),isSaving:m.isPending}):t.jsx(Ie,{connectionId:r.id,orgId:i.id,orgSlug:i.slug,onSelect:p,showBackButton:c.length>1,onBack:()=>b(null)}):null}function Ie(P){const e=M.c(75),{connectionId:a,orgId:p,orgSlug:k,onSelect:o,showBackButton:d,onBack:i}=P,s=$();let f;e[0]!==p||e[1]!==k?(f={connectionId:se,orgId:p,orgSlug:k},e[0]=p,e[1]=k,e[2]=f):f=e[2];const v=J(f),b=X(),C=ne();let c;e[3]!==a||e[4]!==p?(c=q.githubUserOrgs(p,a),e[3]=a,e[4]=p,e[5]=c):c=e[5];let l;e[6]!==a||e[7]!==v?(l=()=>Ce(N=>v.callTool(N),a),e[6]=a,e[7]=v,e[8]=l):l=e[8];let r;e[9]!==c||e[10]!==l?(r={queryKey:c,queryFn:l},e[9]=c,e[10]=l,e[11]=r):r=e[11];const u=ce(r);let x;e[12]!==C||e[13]!==a||e[14]!==u||e[15]!==p||e[16]!==k||e[17]!==b?(x=async()=>{const N=await oe({connectionId:a,orgId:p,orgSlug:k,persistFallback:L=>C.update.mutateAsync({id:a,data:{connection_token:L}}).then(Ee)});if(N.ran&&!N.ok)throw new Error(N.error??"no token received");const E=new URL(`/api/${k}/mcp/${a}`,window.location.origin);await b.invalidateQueries({queryKey:q.isMCPAuthenticated(E.href,null)}),await b.invalidateQueries({queryKey:q.mcpClientPrefix()}),await u.refetch()},e[12]=C,e[13]=a,e[14]=u,e[15]=p,e[16]=k,e[17]=b,e[18]=x):x=e[18];let g;e[19]!==s?(g=N=>{K.error(s("common.githubRepoPicker.failedReconnect",{error:N instanceof Error?N.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,e[20]=g):g=e[20];let h;e[21]!==x||e[22]!==g?(h={mutationFn:x,onError:g},e[21]=x,e[22]=g,e[23]=h):h=e[23];const m=te(h);if(u.isLoading){let N;return e[24]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=N):N=e[24],N}if(u.isError){let N;e[25]!==s?(N=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=N):N=e[26];let E;e[27]!==N?(E=t.jsx("p",{className:"text-sm text-destructive",children:N}),e[27]=N,e[28]=E):E=e[28];let L;e[29]!==s?(L=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=L):L=e[30];let G;e[31]!==L?(G=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:L}),e[31]=L,e[32]=G):G=e[32];let O;e[33]!==m?(O=()=>m.mutate(),e[33]=m,e[34]=O):O=e[34];const le=m.isPending;let U;e[35]!==m.isPending?(U=m.isPending?t.jsx(Q,{size:14,className:"animate-spin"}):t.jsx(H,{className:"size-3.5"}),e[35]=m.isPending,e[36]=U):U=e[36];let F;e[37]!==s?(F=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=F):F=e[38];let D;e[39]!==m.isPending||e[40]!==O||e[41]!==U||e[42]!==F?(D=t.jsxs(ue,{type:"button",variant:"outline",size:"sm",onClick:O,disabled:le,children:[U,F]}),e[39]=m.isPending,e[40]=O,e[41]=U,e[42]=F,e[43]=D):D=e[43];let B;return e[44]!==G||e[45]!==D||e[46]!==E?(B=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[E,G,D]}),e[44]=G,e[45]=D,e[46]=E,e[47]=B):B=e[47],B}const n=u.data;if(!n)return null;let y;e[48]!==i||e[49]!==d||e[50]!==s?(y=d&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ie,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=i,e[49]=d,e[50]=s,e[51]=y):y=e[51];let j;if(e[52]!==n.installations||e[53]!==o||e[54]!==s){let N;e[56]!==o||e[57]!==s?(N=E=>t.jsxs("button",{type:"button",onClick:()=>o(E),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:E.avatarUrl,alt:E.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:E.login}),E.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},E.installationId),e[56]=o,e[57]=s,e[58]=N):N=e[58],j=n.installations.map(N),e[52]=n.installations,e[53]=o,e[54]=s,e[55]=j}else j=e[55];let w;e[59]!==j?(w=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:j}),e[59]=j,e[60]=w):w=e[60];const R=n.appSlug?`https://github.com/apps/${n.appSlug}/installations/new`:"https://github.com/settings/installations";let S;e[61]!==s?(S=s("common.githubRepoPicker.accountNotListed"),e[61]=s,e[62]=S):S=e[62];let I;e[63]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[63]=s,e[64]=I):I=e[64];let T;e[65]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[65]=I,e[66]=T):T=e[66];let A;e[67]!==R||e[68]!==S||e[69]!==T?(A=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:R,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[S," ",T]})}),e[67]=R,e[68]=S,e[69]=T,e[70]=A):A=e[70];let _;return e[71]!==w||e[72]!==A||e[73]!==y?(_=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[y,w,A]}),e[71]=w,e[72]=A,e[73]=y,e[74]=_):_=e[74],_}function Ee(){}function Te(P){const e=M.c(23),{connectionId:a,orgId:p,orgSlug:k,installation:o,onSelectRepo:d,isSaving:i}=P,s=$(),[f,v]=z.useState(""),b=be(f,300),C=z.useDeferredValue(b),c=f!==C;let l;e[0]!==s?(l=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=l):l=e[1];let r;e[2]!==c||e[3]!==f||e[4]!==l?(r=t.jsx(he,{placeholder:l,value:f,onChange:v,isSearching:c}),e[2]=c,e[3]=f,e[4]=l,e[5]=r):r=e[5];const u=c?"opacity-40":"opacity-100";let x;e[6]!==u?(x=Y("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",u),e[6]=u,e[7]=x):x=e[7];let g;e[8]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Q,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let h;e[9]!==a||e[10]!==C||e[11]!==o||e[12]!==i||e[13]!==d||e[14]!==p||e[15]!==k?(h=t.jsx(z.Suspense,{fallback:g,children:t.jsx(Ae,{connectionId:a,orgId:p,orgSlug:k,installation:o,query:C,onSelectRepo:d,isSaving:i})}),e[9]=a,e[10]=C,e[11]=o,e[12]=i,e[13]=d,e[14]=p,e[15]=k,e[16]=h):h=e[16];let m;e[17]!==x||e[18]!==h?(m=t.jsx("div",{className:x,children:h}),e[17]=x,e[18]=h,e[19]=m):m=e[19];let n;return e[20]!==r||e[21]!==m?(n=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[r,m]}),e[20]=r,e[21]=m,e[22]=n):n=e[22],n}function Ae(P){const e=M.c(36),{connectionId:a,orgId:p,orgSlug:k,installation:o,query:d,onSelectRepo:i,isSaving:s}=P,f=$();let v;e[0]!==a||e[1]!==p||e[2]!==k?(v={connectionId:a,orgId:p,orgSlug:k},e[0]=a,e[1]=p,e[2]=k,e[3]=v):v=e[3];const b=J(v),C=o.type==="User"?"user":"org",c=d?`${C}:${o.login} ${d} in:name`:`${C}:${o.login}`;let l;e[4]!==a||e[5]!==o.login||e[6]!==p||e[7]!==d?(l=q.githubOrgRepos(p,a,o.login,d),e[4]=a,e[5]=o.login,e[6]=p,e[7]=d,e[8]=l):l=e[8];let r;e[9]!==b||e[10]!==c?(r=async m=>{const{signal:n}=m,j=(await b.callTool({name:"search_repositories",arguments:{query:c,page:1,perPage:30}},void 0,{signal:n})).content?.[0]?.text;if(!j)throw new Error("No response from search_repositories");return(JSON.parse(j).items??[]).map(_e)},e[9]=b,e[10]=c,e[11]=r):r=e[11];let u;e[12]!==l||e[13]!==r?(u={queryKey:l,queryFn:r},e[12]=l,e[13]=r,e[14]=u):u=e[14];const{data:x}=de(u);if(x.length===0){let m;e[15]!==f?(m=f("common.githubRepoPicker.noRepositoriesFound"),e[15]=f,e[16]=m):m=e[16];let n;e[17]!==m?(n=t.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[17]=m,e[18]=n):n=e[18];let y;e[19]!==d||e[20]!==f?(y=d&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:f("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=d,e[20]=f,e[21]=y):y=e[21];let j;return e[22]!==n||e[23]!==y?(j=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[n,y]}),e[22]=n,e[23]=y,e[24]=j):j=e[24],j}let g;if(e[25]!==s||e[26]!==i||e[27]!==x||e[28]!==f){let m;e[30]!==s||e[31]!==i||e[32]!==f?(m=n=>t.jsxs("button",{type:"button",onClick:()=>i(n),disabled:s,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(H,{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:n.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:[n.private?t.jsx(me,{size:10}):t.jsx(je,{size:10}),n.private?f("common.githubRepoPicker.private"):f("common.githubRepoPicker.public")]})]},n.fullName),e[30]=s,e[31]=i,e[32]=f,e[33]=m):m=e[33],g=x.map(m),e[25]=s,e[26]=i,e[27]=x,e[28]=f,e[29]=g}else g=e[29];let h;return e[34]!==g?(h=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden flex flex-col [scrollbar-gutter:stable]",children:g}),e[34]=g,e[35]=h):h=e[35],h}function _e(P){return{name:P.name,fullName:P.full_name,owner:P.full_name.split("/")[0]??"",url:P.html_url,private:P.private,description:P.description,updatedAt:P.updated_at}}function W(P){const e=M.c(51),{status:a,error:p,retry:k}=P,o=$();if(a==="error"){let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-destructive"})}),e[0]=j):j=e[0];let w;e[1]!==o?(w=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=w):w=e[2];let R;e[3]!==w?(R=t.jsx("p",{className:"text-sm font-medium",children:w}),e[3]=w,e[4]=R):R=e[4];let S;e[5]!==p||e[6]!==o?(S=p??o("common.githubRepoPicker.somethingWentWrong"),e[5]=p,e[6]=o,e[7]=S):S=e[7];let I;e[8]!==S?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:S}),e[8]=S,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let A;e[13]!==o?(A=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=A):A=e[14];let _;e[15]!==k||e[16]!==A?(_=t.jsx("button",{type:"button",onClick:k,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:A}),e[15]=k,e[16]=A,e[17]=_):_=e[17];let N;return e[18]!==T||e[19]!==_?(N=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[j,T,_]}),e[18]=T,e[19]=_,e[20]=N):N=e[20],N}const d=a==="authenticating";let i;e[21]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(H,{className:"size-5 text-foreground"})}),e[21]=i):i=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[i,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(Q,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let f;e[23]!==d||e[24]!==o?(f=o(d?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=d,e[24]=o,e[25]=f):f=e[25];let v;e[26]!==f?(v=t.jsx("p",{className:"text-sm font-medium",children:f}),e[26]=f,e[27]=v):v=e[27];let b;e[28]!==d||e[29]!==o?(b=o(d?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=d,e[29]=o,e[30]=b):b=e[30];let C;e[31]!==b?(C=t.jsx("p",{className:"text-xs text-muted-foreground",children:b}),e[31]=b,e[32]=C):C=e[32];let c;e[33]!==v||e[34]!==C?(c=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[v,C]}),e[33]=v,e[34]=C,e[35]=c):c=e[35];const l=d?"bg-muted-foreground/30":"bg-foreground animate-pulse";let r;e[36]!==l?(r=Y("size-1.5 rounded-full",l),e[36]=l,e[37]=r):r=e[37];let u;e[38]!==r?(u=t.jsx("span",{className:r}),e[38]=r,e[39]=u):u=e[39];const x=d?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==x?(g=Y("size-1.5 rounded-full",x),e[40]=x,e[41]=g):g=e[41];let h;e[42]!==g?(h=t.jsx("span",{className:g}),e[42]=g,e[43]=h):h=e[43];let m;e[44]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=m):m=e[44];let n;e[45]!==u||e[46]!==h?(n=t.jsxs("div",{className:"flex items-center gap-1.5",children:[u,h,m]}),e[45]=u,e[46]=h,e[47]=n):n=e[47];let y;return e[48]!==n||e[49]!==c?(y=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,c,n]}),e[48]=n,e[49]=c,e[50]=y):y=e[50],y}export{Ke as G,Se as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dA as St,dB as It,bh as N,M as c,dC as de,bn as ze,dD as Et,bg as Tt,aX as wt,ah as O,ag as G,ae as oe,J as _,bi as m,b4 as F,dE as Mt,dF as I,af as At,t as ge,c as Ee,r as W,F as Ot,j as Ct}from"./index-
|
|
1
|
+
import{dA as St,dB as It,bh as N,M as c,dC as de,bn as ze,dD as Et,bg as Tt,aX as wt,ah as O,ag as G,ae as oe,J as _,bi as m,b4 as F,dE as Mt,dF as I,af as At,t as ge,c as Ee,r as W,F as Ot,j as Ct}from"./index-D8UtC1tD.js";import{S as Nt,u as Rt}from"./use-mcp-client-B8-Q-EhH.js";import{d as xt,D as Pt}from"./decopilot-sse-pool-DB9TgyZI.js";import{d as Dt}from"./delay-CnY5UFtP.js";import{e as kt}from"./backoff-CrEUbyZT.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Ae;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Ae||(Ae={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Oe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Oe||(Oe={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Ne,Z=class We extends(Ne=Error,Ce=Lt,Ne){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Re,xe,Zt=class extends(xe=Z,Re=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Re]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),Le,je,X=class ve extends(je=Z,Le=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ge(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function R(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ht(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):R()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":A(a,P.email,r.message,e);break}break;case"url":D(a,"uri",r.message,e);break;case"uuid":D(a,"uuid",r.message,e);break;case"regex":A(a,r.regex,r.message,e);break;case"cuid":A(a,P.cuid,r.message,e);break;case"cuid2":A(a,P.cuid2,r.message,e);break;case"startsWith":A(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":A(a,RegExp(`${he(r.value,e)}$`),r.message,e);break;case"datetime":D(a,"date-time",r.message,e);break;case"date":D(a,"date",r.message,e);break;case"time":D(a,"time",r.message,e);break;case"duration":D(a,"duration",r.message,e);break;case"length":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value,a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"includes":{A(a,RegExp(he(r.value,e)),r.message,e);break}case"ip":{r.version!=="v6"&&D(a,"ipv4",r.message,e),r.version!=="v4"&&D(a,"ipv6",r.message,e);break}case"base64url":A(a,P.base64url,r.message,e);break;case"jwt":A(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&A(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&A(a,P.ipv6Cidr,r.message,e);break}case"emoji":A(a,P.emoji(),r.message,e);break;case"ulid":{A(a,P.ulid,r.message,e);break}case"base64":{switch(e.base64Strategy){case"format:binary":{D(a,"binary",r.message,e);break}case"contentEncoding:base64":{a.contentEncoding="base64";break}case"pattern:zod":{A(a,P.base64,r.message,e);break}}break}case"nanoid":A(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function A(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|