decocms 4.286.8 → 4.286.9
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-Dw3SdgUF.js → AlertCircle-CySDkuFI.js} +1 -1
- package/dist/client/assets/{AreaChart-D2vym8KR.js → AreaChart-Diq94zn-.js} +1 -1
- package/dist/client/assets/{ArrowLeft-DvpAv4zp.js → ArrowLeft-BB7ODm9w.js} +1 -1
- package/dist/client/assets/{ArrowUp-B0Lqqmya.js → ArrowUp-OmZF_t7M.js} +1 -1
- package/dist/client/assets/{Check-ttzquLcG.js → Check-CoQiKRJX.js} +1 -1
- package/dist/client/assets/{CheckCircle-Cy0Rnrsm.js → CheckCircle-CZBsNhly.js} +1 -1
- package/dist/client/assets/{ChevronDown-rzwAIpBt.js → ChevronDown-Cl_G7d02.js} +1 -1
- package/dist/client/assets/{ChevronRight-DkPzpckV.js → ChevronRight-l0uFz17M.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-LJxUB6jw.js → ChevronSelectorVertical-CdAnSbeG.js} +1 -1
- package/dist/client/assets/{ChevronUp-BHQR4UV3.js → ChevronUp-CTDZzTRR.js} +1 -1
- package/dist/client/assets/{Circle-IuE7HGfM.js → Circle-DCAX0uOn.js} +1 -1
- package/dist/client/assets/{Copy01-C9x-qaA5.js → Copy01-cb1xdMeW.js} +1 -1
- package/dist/client/assets/{CreditCard01-BjpClgK3.js → CreditCard01-BdRQMZi3.js} +1 -1
- package/dist/client/assets/{DotsVertical-Ub5HmhJM.js → DotsVertical-C-e3IXLs.js} +1 -1
- package/dist/client/assets/{Download01-Cti1tG3M.js → Download01-RXuY9PVr.js} +1 -1
- package/dist/client/assets/{Eye-DF8_ZcTD.js → Eye-Dzmn8laT.js} +1 -1
- package/dist/client/assets/{FilterLines-Du0AyVq8.js → FilterLines-Du7-qdeg.js} +1 -1
- package/dist/client/assets/{Flag01-inBVZiX0.js → Flag01-Cgf9RGWm.js} +1 -1
- package/dist/client/assets/{Globe01-BkycGCgE.js → Globe01-B3eypf7Z.js} +1 -1
- package/dist/client/assets/{Globe04-y7iSy_To.js → Globe04-DGBjwe92.js} +1 -1
- package/dist/client/assets/{HardDrive-Cbjcxk-m.js → HardDrive-TuXYiIph.js} +1 -1
- package/dist/client/assets/{Key01-haAH_VDS.js → Key01-5y05h8xe.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CgEKyQta.js → LinkExternal01-Dj2RocB0.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-DiK5Iz2C.js → LockUnlocked01-DmE9B4eY.js} +1 -1
- package/dist/client/assets/{LogOut01-E2kdEUrB.js → LogOut01-xJjCoaem.js} +1 -1
- package/dist/client/assets/{Monitor01-lD-OxyiV.js → Monitor01-DNfWqiVo.js} +1 -1
- package/dist/client/assets/{Palette-DR7lX3pn.js → Palette-Ca5J7ydX.js} +1 -1
- package/dist/client/assets/{Play-CqkwkZ_-.js → Play-CaxAtGGz.js} +1 -1
- package/dist/client/assets/{Plus-CjLpdcmH.js → Plus-CVuoen9m.js} +1 -1
- package/dist/client/assets/{SearchLg-5ZGRHNDG.js → SearchLg-ULxpJ1Bt.js} +1 -1
- package/dist/client/assets/{SearchMd-B4WVXsSg.js → SearchMd-CoaYTf74.js} +1 -1
- package/dist/client/assets/{Settings02-BWIBgnXP.js → Settings02-Ctx2jq3F.js} +1 -1
- package/dist/client/assets/{Share07-BEb7ZfUu.js → Share07-Mo6Fcsol.js} +1 -1
- package/dist/client/assets/{Shield01-iM0j3TRP.js → Shield01-CCM448Vy.js} +1 -1
- package/dist/client/assets/{Stars01-Cvv6NHCU.js → Stars01-Cvy16LXb.js} +1 -1
- package/dist/client/assets/{Stars02-BXqGEI9t.js → Stars02-BTSDg-yp.js} +1 -1
- package/dist/client/assets/{Sun-gEB_AVfi.js → Sun-DDjWGsJo.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-CoU25efW.js → SwitchHorizontal01-CZEwbna7.js} +1 -1
- package/dist/client/assets/{Tag01-C5aAw6Cw.js → Tag01-CNpFRwik.js} +1 -1
- package/dist/client/assets/{ThumbsUp-CbyaOU9x.js → ThumbsUp-2KuOmMlO.js} +1 -1
- package/dist/client/assets/{Tool01-RVeqlI6_.js → Tool01-Dts8V4zb.js} +1 -1
- package/dist/client/assets/{Tool02-BeH-qK4u.js → Tool02-Bs7vLB0r.js} +1 -1
- package/dist/client/assets/{Trash01-B7qNZLDY.js → Trash01-DRWHI2Bc.js} +1 -1
- package/dist/client/assets/{TrendUp01-HanaeZo1.js → TrendUp01-Dtsq3UUy.js} +1 -1
- package/dist/client/assets/{Upload01-CgYfI0IF.js → Upload01-SwLjey2j.js} +1 -1
- package/dist/client/assets/{User01-C1MlDYm7.js → User01-DBxTqqZ_.js} +1 -1
- package/dist/client/assets/{UserSquare-RWXgNzap.js → UserSquare-DTBnhKEL.js} +1 -1
- package/dist/client/assets/{Users01-CTMGsTHJ.js → Users01-DlM_Dnpr.js} +1 -1
- package/dist/client/assets/{Users03-BsPXbQir.js → Users03-TCUrKubc.js} +1 -1
- package/dist/client/assets/{XCircle-Ch-rTPae.js → XCircle-MJeeThqu.js} +1 -1
- package/dist/client/assets/{XClose-SNsEgcxK.js → XClose-DvNO5Nzt.js} +1 -1
- package/dist/client/assets/{YAxis-pQW5L7Zi.js → YAxis-DAEuH7pB.js} +1 -1
- package/dist/client/assets/{Zap-BSaUAe49.js → Zap-Cbis5Ots.js} +1 -1
- package/dist/client/assets/{ZapSquare-CCnJPz6U.js → ZapSquare-B8jDLXES.js} +1 -1
- package/dist/client/assets/{access-gate-BaqGBtda.js → access-gate-DmA6EBSs.js} +1 -1
- package/dist/client/assets/{agent-icon-C4iQDDhi.js → agent-icon-BnE44Jmh.js} +1 -1
- package/dist/client/assets/{agents-list-Cn-17_xd.js → agents-list-DH_Nbme2.js} +1 -1
- package/dist/client/assets/{ai-providers-C5SElYFt.js → ai-providers-IOK1DhCt.js} +1 -1
- package/dist/client/assets/{alert-dialog-zxFDb_4-.js → alert-dialog-CqV6ljrU.js} +1 -1
- package/dist/client/assets/{alert-0e0aLDNC.js → alert-vpspiBMk.js} +1 -1
- package/dist/client/assets/{api-keys-DrZiJRx7.js → api-keys-D9yaMTyw.js} +1 -1
- package/dist/client/assets/{app-editor-Cx3oAgsE.js → app-editor-D2p7IXNX.js} +1 -1
- package/dist/client/assets/{auth-BOaJ5nut.js → auth-Booy03Jk.js} +1 -1
- package/dist/client/assets/{auth-catchall-YYRz5LwZ.js → auth-catchall-DNlLMPPv.js} +1 -1
- package/dist/client/assets/{auth-entry-k-ynOCuT.js → auth-entry-B2AlzrSe.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DxK9ThJI.js → auth-split-layout-qb8DBYic.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-ByMzEyLt.js → authenticate-and-persist-oauth-CmndGCoy.js} +1 -1
- package/dist/client/assets/{automation-list-row-A76srB5C.js → automation-list-row-DR_em0ct.js} +1 -1
- package/dist/client/assets/{automation-runs-DZnf-9zL.js → automation-runs-BVfapcJW.js} +153 -154
- package/dist/client/assets/{automations-f3L-tUAH.js → automations-CFAnBhFU.js} +1 -1
- package/dist/client/assets/{avatar-BgfkuwRB.js → avatar-D-bODSns.js} +1 -1
- package/dist/client/assets/{badge-Ch_ONHF2.js → badge-cxReBOxc.js} +1 -1
- package/dist/client/assets/{block-document-bPzW9mKv.js → block-document-DvNkwTJH.js} +1 -1
- package/dist/client/assets/{breadcrumb-BXH4egSF.js → breadcrumb-iVWuyc9x.js} +1 -1
- package/dist/client/assets/{buckets-qcs3thvR.js → buckets-BR1UrbRA.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CmUwQSOp.js → bulk-category-panel-CtyVNSxB.js} +1 -1
- package/dist/client/assets/{capability-load-error-CezTFxpc.js → capability-load-error-m72FBMhN.js} +1 -1
- package/dist/client/assets/{cards-BansJ4hg.js → cards-ZowjpGHm.js} +1 -1
- package/dist/client/assets/category-editor-Ds4jO2ly.js +1 -0
- package/dist/client/assets/{chart-u6_W5n2i.js → chart-DIdj6nQQ.js} +1 -1
- package/dist/client/assets/{chat-context-CIW918kd.js → chat-context-Bcaj9GGz.js} +5 -5
- package/dist/client/assets/{checkbox-CYFHboNO.js → checkbox-_f6yJpXQ.js} +1 -1
- package/dist/client/assets/{choose-editor-DI_FfPXG.js → choose-editor-DmBE59G7.js} +1 -1
- package/dist/client/assets/{cli-auth-success-COIiH1IT.js → cli-auth-success-C1wVlshA.js} +1 -1
- package/dist/client/assets/{collection-detail-384DJk4b.js → collection-detail-bpKUPo55.js} +1 -1
- package/dist/client/assets/{collection-display-button-BSIIeB-1.js → collection-display-button-DC7kfJsy.js} +1 -1
- package/dist/client/assets/{collection-search-CNiN7_WJ.js → collection-search-VBS9e7ZP.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DESOtwDn.js → collection-table-wrapper-Fn_U26YS.js} +1 -1
- package/dist/client/assets/{collection-tabs-CQNJVAAz.js → collection-tabs-Dum8wYlH.js} +1 -1
- package/dist/client/assets/{command-BlLeosbi.js → command-BJrffI7f.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-nnotuPxX.js → commerce-onboarding-DLuX3mHK.js} +1 -1
- package/dist/client/assets/{config-x7MyaYKx.js → config-ClflJ8mr.js} +1 -1
- package/dist/client/assets/{connect-4EgAstDP.js → connect-DRjwAl48.js} +2 -2
- package/dist/client/assets/{connection-card-BE77KM2M.js → connection-card-DUgY19kv.js} +1 -1
- package/dist/client/assets/{connection-CUmZGX4o.js → connection-dXu7KNvm.js} +1 -1
- package/dist/client/assets/{connection-detail-B0Ek8gHD.js → connection-detail-Czc-iEA0.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-BI3u_trm.js → connection-form-helpers-_bfjQC3M.js} +1 -1
- package/dist/client/assets/{connections-JF3QzcpT.js → connections-DlcOFFRT.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DPRBorRx.js → decopilot-sse-pool-CSymSA16.js} +1 -1
- package/dist/client/assets/{dialog-Dr0JFHjN.js → dialog-C5eRYxRp.js} +1 -1
- package/dist/client/assets/{domain-settings-ADY97haU.js → domain-settings-BH-O1G2y.js} +1 -1
- package/dist/client/assets/{drawer-CHTd7tLQ.js → drawer-B5RPzA5q.js} +1 -1
- package/dist/client/assets/{dropdown-menu-CEKKyK2-.js → dropdown-menu-BUM2ZKd3.js} +1 -1
- package/dist/client/assets/{empty-state-CBiHv5h7.js → empty-state-DfWMRost.js} +1 -1
- package/dist/client/assets/{extract-connection-data-DRoFrfak.js → extract-connection-data-BLRIr0QA.js} +1 -1
- package/dist/client/assets/{file-explorer-Buvt7Jx5.js → file-explorer-C2ayBWwg.js} +1 -1
- package/dist/client/assets/{file-type-icon-DcJEJkZX.js → file-type-icon-ByldKg4g.js} +1 -1
- package/dist/client/assets/{form-D77whi9m.js → form-DzqH4nYI.js} +1 -1
- package/dist/client/assets/{general-ZF5faWPg.js → general-5QlppPKR.js} +1 -1
- package/dist/client/assets/{github-icon-C4ja-GnH.js → github-icon-4zdJwqYh.js} +1 -1
- package/dist/client/assets/{github-repo-picker-DrUrjUkS.js → github-repo-picker-D52qvjxt.js} +1 -1
- package/dist/client/assets/{hooks-B5_amjoz.js → hooks-DDmyNgv3.js} +1 -1
- package/dist/client/assets/{index-CvCiTM5m.js → index--ioJ2o-u.js} +1 -1
- package/dist/client/assets/{index-CSwDxW2p.js → index-5gwi64rK.js} +1 -1
- package/dist/client/assets/{index-DAIr6pIT.js → index-BjpDl4dR.js} +1 -1
- package/dist/client/assets/{index-DI9v52-X.js → index-C6Y2Koh2.js} +1 -1
- package/dist/client/assets/{index-pVQiTPZE.js → index-CFdTu8yS.js} +1 -1
- package/dist/client/assets/index-CYD6iwga.js +1 -0
- package/dist/client/assets/{index-C2wKJjGr.js → index-CbYn6R_7.js} +3 -3
- package/dist/client/assets/index-Di87R3uJ.js +759 -0
- package/dist/client/assets/{index-BDQwfrOa.js → index-kRw55cWn.js} +4 -4
- package/dist/client/assets/{index-redirect-BJiQK1CE.js → index-redirect-FqOZ8qxn.js} +1 -1
- package/dist/client/assets/{index-CFKzku9b.js → index-zMWVGpfR.js} +1 -1
- package/dist/client/assets/{infra-billing-DPUTsbXW.js → infra-billing-DIUXfA-Y.js} +1 -1
- package/dist/client/assets/{input-tkXOFrYf.js → input-Dpp5l8sc.js} +1 -1
- package/dist/client/assets/{integration-icon-Czqr9NJo.js → integration-icon-7B3N5uJo.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CGeklCQn.js → invite-member-dialog--0NPHrtC.js} +1 -1
- package/dist/client/assets/{label-fUj9ClwH.js → label-BrNTx-00.js} +1 -1
- package/dist/client/assets/{layout-BBcH7LvX.js → layout-Dtaa-nFL.js} +1 -1
- package/dist/client/assets/{login-BH9TUYGs.js → login-BB7Rt7jB.js} +1 -1
- package/dist/client/assets/{mcp-oauth-2Pcd3vN4.js → mcp-oauth-cazow6f9.js} +1 -1
- package/dist/client/assets/{members-HGEkAGWi.js → members-DJknuJ1N.js} +1 -1
- package/dist/client/assets/{monaco-editor-DhL3ddUA.js → monaco-editor-CorgchLZ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CItbBR3E.js → monitoring-stats-row-BT-Ngw_6.js} +1 -1
- package/dist/client/assets/{multi-select-CHxyqYOg.js → multi-select-BO9xZAZj.js} +1 -1
- package/dist/client/assets/{oauth-callback-DjOSMyhv.js → oauth-callback-DDRdYebV.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-CxieGga4.js → oauth-callback-ai-provider-BortRqW_.js} +1 -1
- package/dist/client/assets/{onboarding-BQeEDsEd.js → onboarding-Cnxxn6kN.js} +1 -1
- package/dist/client/assets/{org-layout-DLRQ_M2O.js → org-layout-geBLKUY3.js} +1 -1
- package/dist/client/assets/{organization-choice-Cktc0PlC.js → organization-choice-RdkoFKEW.js} +1 -1
- package/dist/client/assets/{orgs-Crpd8ei1.js → orgs-BgRCUMKz.js} +1 -1
- package/dist/client/assets/{page-seo-form-DUh68KII.js → page-seo-form-DMXg4GbO.js} +1 -1
- package/dist/client/assets/{popover-DjgpLaeH.js → popover-Cr34V7iV.js} +1 -1
- package/dist/client/assets/{post-calendar-Bgj5C5Xs.js → post-calendar-DHMx5cqk.js} +1 -1
- package/dist/client/assets/{post-editor-DdJ8ItyW.js → post-editor-WHwOZieF.js} +1 -1
- package/dist/client/assets/{primitives-cHgQijHE.js → primitives-B6MrFxhJ.js} +1 -1
- package/dist/client/assets/{profile-BwpVPWzk.js → profile-D5aRYG0C.js} +1 -1
- package/dist/client/assets/{project-app-view-BG8-nnSR.js → project-app-view-Bvh_kRrq.js} +1 -1
- package/dist/client/assets/{prompts-C_nWMi_z.js → prompts-C63HeNZS.js} +1 -1
- package/dist/client/assets/record-editor-sxjxKjgW.js +1 -0
- package/dist/client/assets/redirect-editor-D39sP-vp.js +1 -0
- package/dist/client/assets/registry-ChNMYft8.js +2 -0
- package/dist/client/assets/{registry-layout-OkjMTUFx.js → registry-layout-DMqk-hGf.js} +4 -4
- package/dist/client/assets/{reports-Dm6R8rr1.js → reports-BzwoTZeA.js} +1 -1
- package/dist/client/assets/{require-capability-DQJ7411V.js → require-capability-Cry7YHQI.js} +1 -1
- package/dist/client/assets/{required-auth-layout-YsYr38eN.js → required-auth-layout-D3qq7JAj.js} +1 -1
- package/dist/client/assets/{reset-password-BhAfZXCe.js → reset-password-Bb6BEmC-.js} +1 -1
- package/dist/client/assets/{review-settings-j2RX7TKZ.js → review-settings-DIqY0ZXS.js} +1 -1
- package/dist/client/assets/{roles-SMLYunvV.js → roles-BUHOq57w.js} +1 -1
- package/dist/client/assets/{scroll-area-BaCu9Erq.js → scroll-area-CwBEEij0.js} +1 -1
- package/dist/client/assets/{search-input-B_d2onV1.js → search-input-BnGZXUUf.js} +1 -1
- package/dist/client/assets/{secrets--tEhMEdB.js → secrets-CtSvxVD-.js} +1 -1
- package/dist/client/assets/{sections-editor-Q4Hskisl.js → sections-editor-BkMAyoHy.js} +1 -1
- package/dist/client/assets/{select-KvNOZN66.js → select-M-APHiZT.js} +1 -1
- package/dist/client/assets/{select-model-DrSe295o.js → select-model-C6nZF0X7.js} +1 -1
- package/dist/client/assets/{self-tool-result-D3Lb6Jbg.js → self-tool-result-B-dwuOyI.js} +1 -1
- package/dist/client/assets/{seo-editor-BqS1IWQX.js → seo-editor-I_ClNKhS.js} +1 -1
- package/dist/client/assets/{settings-layout-BfrOqoIG.js → settings-layout-D2AMt2YH.js} +1 -1
- package/dist/client/assets/{shell-controls-DQe6F9nz.js → shell-controls-D6CGfkZH.js} +1 -1
- package/dist/client/assets/{shell-layout-DGXTmLep.js → shell-layout-Vy7vbE5Z.js} +1 -1
- package/dist/client/assets/{spinner-CLUjBH1z.js → spinner-DTb4kyVC.js} +1 -1
- package/dist/client/assets/{sso-T750OslB.js → sso-BVDRWvuz.js} +1 -1
- package/dist/client/assets/store-registry-5bqJML8Y.js +2 -0
- package/dist/client/assets/{store-CGcLokDp.js → store-sLnztQSh.js} +1 -1
- package/dist/client/assets/{super-agent-icon-OEcl78rY.js → super-agent-icon-kuZUsoxE.js} +1 -1
- package/dist/client/assets/{switch-D_XAP-VR.js → switch-4MQ9PYFn.js} +1 -1
- package/dist/client/assets/{synced-repos-DEcRdtsc.js → synced-repos-Q1JTvzar.js} +1 -1
- package/dist/client/assets/{tab-id-Ksgtpkhm.js → tab-id-CQesTqLl.js} +1 -1
- package/dist/client/assets/{table-ebymWD54.js → table-B0cp8jQG.js} +1 -1
- package/dist/client/assets/{tabs-J6t-1xy5.js → tabs-BmPIa_mu.js} +1 -1
- package/dist/client/assets/{task-board-YhYj0m6c.js → task-board-Cr-nv6fq.js} +1 -1
- package/dist/client/assets/{task-filters-a--jprJW.js → task-filters-C_gIUGmD.js} +1 -1
- package/dist/client/assets/{tasks-DUnpKYSO.js → tasks-Cb5Hvfyl.js} +1 -1
- package/dist/client/assets/{textarea-CnYvlpOR.js → textarea-BKN2c82K.js} +1 -1
- package/dist/client/assets/{toggle-group-CW6PwHGb.js → toggle-group-C-sVfzEB.js} +1 -1
- package/dist/client/assets/{toolbar-BFVDxa1z.js → toolbar-C4DLCGY_.js} +1 -1
- package/dist/client/assets/{track-1dgUcOI_.js → track-CfBxugSg.js} +1 -1
- package/dist/client/assets/{types-BCm_iyZj.js → types-BLVNuKk3.js} +1 -1
- package/dist/client/assets/{use-ai-providers-BrJYoUgs.js → use-ai-providers-B-obOmqH.js} +1 -1
- package/dist/client/assets/{use-api-keys-BgHiSrv9.js → use-api-keys-D0jkTXHn.js} +1 -1
- package/dist/client/assets/{use-automations-gY7mK1L9.js → use-automations-BqNae25x.js} +1 -1
- package/dist/client/assets/{use-autosave-CufMOJRo.js → use-autosave-Dv-IeiGC.js} +1 -1
- package/dist/client/assets/{use-commerce-diagnostic-D5GsPjzv.js → use-commerce-diagnostic-CBKGF0Aw.js} +1 -1
- package/dist/client/assets/{use-connection-BiFW_cHg.js → use-connection-KE4Z3WJ_.js} +1 -1
- package/dist/client/assets/{use-copy-CdoVt82M.js → use-copy-DO33QwuC.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BjEls0y2.js → use-create-virtual-mcp-CrBtXC3x.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave--3PwEBvC.js → use-debounced-autosave-BYurijjF.js} +1 -1
- package/dist/client/assets/{use-debounced-value-jIkPbsOp.js → use-debounced-value-CFOfzcG4.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CapdWR8Q.js → use-decopilot-events-MmWhMsGA.js} +1 -1
- package/dist/client/assets/{use-delete-connection-DvjMa9k1.js → use-delete-connection-CI7FNlH6.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-eZlkTqNx.js → use-deployment-admin-DMVJkEBR.js} +1 -1
- package/dist/client/assets/{use-file-configs-ndjlQHxI.js → use-file-configs-DDF7p6KR.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-B9qolsch.js → use-infinite-scroll-BEGE8jUt.js} +1 -1
- package/dist/client/assets/{use-join-requests-UHLAp14h.js → use-join-requests-BVJ0y4yM.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BZAPRmOL.js → use-mcp-auth-status-DSxJkUY2.js} +1 -1
- package/dist/client/assets/{use-mcp-client-41m5xvE3.js → use-mcp-client-CAS9_zw7.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-uQ6_5oAd.js → use-mcp-tools-ZP0kq4P1.js} +1 -1
- package/dist/client/assets/{use-members-CDcE1HPu.js → use-members-B9F2MC14.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-P1K0kc_y.js → use-navigate-to-agent-BQyZBFkq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-ChuKLXBf.js → use-org-auth-client-FjFM2min.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-BSB4bUfY.js → use-org-repo-syncs-BLLUkvlx.js} +1 -1
- package/dist/client/assets/{use-org-sso-MHfzksKB.js → use-org-sso-CXbm3lTN.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DjbjXB_I.js → use-organization-roles-DWrru3h6.js} +1 -1
- package/dist/client/assets/{use-organization-settings-DQqbGH5p.js → use-organization-settings-Q7RvXXM1.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CoPbabB-.js → use-registry-connections-BH7frhH7.js} +1 -1
- package/dist/client/assets/{use-secrets-CUaQOZAO.js → use-secrets-pLSU8FeC.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-BMwP9IX7.js → use-section-preview-base-CuLByp45.js} +1 -1
- package/dist/client/assets/{use-status-sounds-B7xb8CcA.js → use-status-sounds-jAj2BDKx.js} +1 -1
- package/dist/client/assets/{use-tags-BEPQVwa6.js → use-tags-uNJcfqFW.js} +1 -1
- package/dist/client/assets/{use-view-mode-BLuUt2zI.js → use-view-mode-Dh_pkB6r.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-CCV4A6AF.js → use-virtual-mcp-HAZ8aJlV.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-JG_B9ZWK.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-auoy3kFV.js +1 -0
- package/dist/client/assets/{users-Da7f2Dpx.js → users-DHEcforB.js} +1 -1
- package/dist/client/assets/{variant-calendar-B36Wo9EG.js → variant-calendar-1ZcoAaB_.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-B6ucBwrs.js → view-mode-toggle-CEuD4bwV.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/category-editor-Dwj7-ITM.js +0 -1
- package/dist/client/assets/index-AlHFSHJa.js +0 -748
- package/dist/client/assets/index-pLb5aaYO.js +0 -1
- package/dist/client/assets/record-editor-C27xFv26.js +0 -1
- package/dist/client/assets/redirect-editor-q9UCECQI.js +0 -1
- package/dist/client/assets/registry-DY11Hm88.js +0 -2
- package/dist/client/assets/store-registry-CgBS4zc9.js +0 -2
- package/dist/client/assets/useInfiniteQuery-C1ZiiXDY.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-F9QpXYtm.js +0 -1
package/dist/client/assets/{github-repo-picker-DrUrjUkS.js → github-repo-picker-D52qvjxt.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as Z,H as de,a as ye,p as me,r as H,aU as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-BDQwfrOa.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-Dr0JFHjN.js";import{C as Te}from"./collection-search-CNiN7_WJ.js";import{u as _e}from"./use-debounced-value-jIkPbsOp.js";import{b as he,u as Ee}from"./use-connection-BiFW_cHg.js";import{u as se}from"./use-mcp-client-41m5xvE3.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-ByMzEyLt.js";import{i as ue}from"./ArrowLeft-DvpAv4zp.js";import{n as ze}from"./LinkExternal01-CgEKyQta.js";import{n as Le}from"./LockUnlocked01-DiK5Iz2C.js";import{u as Ge}from"./use-mcp-tools-uQ6_5oAd.js";import{e as Oe}from"./extract-connection-data-DRoFrfak.js";import{c as Fe}from"./use-navigate-to-agent-P1K0kc_y.js";import{G as $}from"./github-icon-C4ja-GnH.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?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:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.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($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),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:S.avatarUrl,alt:S.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:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=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(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,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($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),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:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=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]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,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(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
|
|
1
|
+
import{c as Z,H as de,a as ye,p as me,r as H,aX as le,b as ee,j as t,k as X,e as ge,t as te,eQ as Ne,K as ne,I as ke,o as ve,n as ae,B as re,z as Ce,C as Re}from"./index-kRw55cWn.js";import{a as we,b as Pe,d as Se,e as Ie}from"./dialog-C5eRYxRp.js";import{C as Te}from"./collection-search-VBS9e7ZP.js";import{u as _e}from"./use-debounced-value-CFOfzcG4.js";import{b as he,u as Ee}from"./use-connection-KE4Z3WJ_.js";import{u as se}from"./use-mcp-client-CAS9_zw7.js";import{W as Ae,S as pe}from"./constants-dLUUoWH7.js";import{a as be}from"./authenticate-and-persist-oauth-CmndGCoy.js";import{i as ue}from"./ArrowLeft-BB7ODm9w.js";import{n as ze}from"./LinkExternal01-Dj2RocB0.js";import{n as Le}from"./LockUnlocked01-DmE9B4eY.js";import{u as Ge}from"./use-mcp-tools-ZP0kq4P1.js";import{e as Oe}from"./extract-connection-data-BLRIr0QA.js";import{c as Fe}from"./use-navigate-to-agent-BQyZBFkq.js";import{G as $}from"./github-icon-4zdJwqYh.js";import{g as Ue,p as fe,f as He,G as xe}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";function De(C,e){const i=Z.c(12),{org:a}=de();let y;i[0]!==a.id?(y=Ae.REGISTRY(a.id),i[0]=a.id,i[1]=y):y=i[1];const r=y;let c;i[2]!==a.id||i[3]!==a.slug||i[4]!==r?(c={connectionId:r,orgId:a.id,orgSlug:a.slug},i[2]=a.id,i[3]=a.slug,i[4]=r,i[5]=c):c=i[5];const o=se(c);let n;i[6]!==C?(n={name:C},i[6]=C,i[7]=n):n=i[7];const u=e?.enabled??!0;let k;return i[8]!==o||i[9]!==n||i[10]!==u?(k={client:o,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:n,enabled:u,staleTime:3e5,select:$e},i[8]=o,i[9]=n,i[10]=u,i[11]=k):k=i[11],Ge(k)}function $e(C){return C.structuredContent?.item??null}const Me="deco/mcp-github";function Qe(C){const{org:e}=de(),{data:i}=ye.useSession(),a=he(),y=me(),[r,c]=H.useState("idle"),[o,n]=H.useState(null),[u,k]=H.useState(null),{data:v,isLoading:P}=De(Me,{enabled:C.enabled}),f=H.useRef(!1);C.enabled&&v&&!P&&!f.current&&i?.user?.id&&r==="idle"&&(f.current=!0,d());async function d(){if(!(!v||!i?.user?.id||!e))try{c("installing"),n(null);const l=Oe(v,e.id,i.user.id,{remoteIndex:0});if(!l.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await a.create.mutateAsync(l);c("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>a.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await a.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(y,e.id),k(l),c("ready")}catch(l){n(l instanceof Error?l.message:String(l)),c("error")}}function m(){c("idle"),n(null),k(null),f.current=!1}return C.enabled&&P&&r==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:r,error:o,connection:u,retry:m}}function ft(C){const e=Z.c(27),{open:i,onOpenChange:a,title:y,onImportComplete:r,mode:c}=C,o=c===void 0?"agent":c,n=ee();let u;e[0]!==o||e[1]!==n||e[2]!==y?(u=y??n(o==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=o,e[1]=n,e[2]=y,e[3]=u):u=e[3];const k=u,[v,P]=H.useState(null);let f;e[4]!==k?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Pe,{children:k})}),e[4]=k,e[5]=f):f=e[5];let d;e[6]!==k||e[7]!==v||e[8]!==n?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:v?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>P(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":n("common.githubRepoPicker.backToAccounts"),children:t.jsx(ue,{size:16})}),t.jsx("img",{src:v.avatarUrl,alt:v.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:v.login})]}):t.jsxs(t.Fragment,{children:[t.jsx($,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:k})]})}),e[6]=k,e[7]=v,e[8]=n,e[9]=d):d=e[9];let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let l;e[11]!==a?(l=()=>a(!1),e[11]=a,e[12]=l):l=e[12];let p;e[13]!==o||e[14]!==r||e[15]!==i||e[16]!==v||e[17]!==l?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(H.Suspense,{fallback:m,children:t.jsx(qe,{open:i,onComplete:l,selectedInstallation:v,onSelectInstallation:P,onImportComplete:r,mode:o})})}),e[13]=o,e[14]=r,e[15]=i,e[16]=v,e[17]=l,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Se,{className:"sm:max-w-[560px] h-[85svh] sm:h-[520px] p-0 gap-0 overflow-hidden flex flex-col",children:[f,d,p]}),e[19]=f,e[20]=d,e[21]=p,e[22]=g):g=e[22];let j;return e[23]!==a||e[24]!==i||e[25]!==g?(j=t.jsx(Ie,{open:i,onOpenChange:a,children:g}),e[23]=a,e[24]=i,e[25]=g,e[26]=j):j=e[26],j}function qe({open:C,onComplete:e,selectedInstallation:i,onSelectInstallation:a,onImportComplete:y,mode:r="agent"}){const c=ee(),{org:o}=de(),n=me(),u=Fe(),[k,v]=H.useState(null),P=Ee({slug:"mcp-github"}),f=Ue(P),d=Qe({enabled:C&&f.length===0}),m=f.length===1?f[0]??null:k,l=se({connectionId:m?.id??"",orgId:o.id,orgSlug:o.slug}),p=se({connectionId:pe,orgId:o.id,orgSlug:o.slug}),g=async(s,b)=>{try{const I=await l.callTool({name:"get_file_contents",arguments:{owner:s.owner,repo:s.name,path:b}});if(I.isError)return null;const R=I.content?.find(w=>w.type==="resource")?.resource?.text;if(!R)return null;try{const w=JSON.parse(R);return typeof w=="string"?w:JSON.stringify(w)}catch{return R}}catch{return null}},j=(s,b)=>{Promise.all([g(b,"AGENTS.md"),g(b,"CLAUDE.md")]).then(async([N,I])=>{const T=N??I??null;T&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s,data:{metadata:{instructions:T}}}}),le(n,o.id))}).catch(N=>{console.error("GitHub instructions fetch failed:",N)})},x=ge({mutationFn:async s=>{if(!m||!i)throw new Error("No GitHub connection or installation");const b=i.installationId;if(r==="connection"){const{childConnectionId:R}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:w=>l.callTool(w),selfCallTool:w=>p.callTool(w),orgShared:!0});return{virtualMcpId:null,repo:s,connectionId:R,item:null}}const{childConnectionId:N,reused:I}=await fe({orgSlug:o.slug,sourceConnection:m,installationId:b,owner:s.owner,repo:s.name,githubCallTool:R=>l.callTool(R),selfCallTool:R=>p.callTool(R)});let T=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s.name,description:s.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:s.owner,name:s.name,url:s.url,installationId:b,connectionId:N},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:N}]}}}),w=R.structuredContent??R,_=w.item?.id;if(!w.item||!_)throw new Error("Failed to create the imported agent");return T=_,{virtualMcpId:_,repo:s,connectionId:N,item:w.item}}catch(R){throw T&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:T}}).catch(()=>{}),I||await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:N,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:s,repo:b,connectionId:N,item:I})=>{if(r==="connection"||!s||!I){if(le(n,o.id),Ne(n,o.id),y){y({virtualMcpId:null,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.addedRepo",{name:b.name})),e();return}if(n.setQueryData(ne.collectionItem(p,o.id,"","VIRTUAL_MCP",s),{item:I}),le(n,o.id),j(s,b),y){y({virtualMcpId:s,repo:b,connectionId:N});return}te.success(c("common.githubRepoPicker.importedRepo",{name:b.name})),e(),localStorage.setItem(ke.sidebarOpen(),JSON.stringify(!1)),u(s)},onError:(s,b)=>{console.error("GitHub import failed:",s);const N=s instanceof Error?s.message:c("common.githubRepoPicker.unknownError");if(b.fork&&N.toLowerCase().includes("mint")){te.error(c("common.githubRepoPicker.failedImportFork",{name:b.name}));return}te.error(c("common.githubRepoPicker.failedImport",{error:N}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ce,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ce,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ce,{status:"installing",error:null,retry:d.retry}):f.length>1&&!m?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:c("common.githubRepoPicker.selectConnection")})}),f.map(s=>t.jsxs("button",{type:"button",onClick:()=>v(s),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?t.jsx("img",{src:s.icon,alt:s.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($,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}):m?i?t.jsx(Ke,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,installation:i,onSelectRepo:s=>x.mutate(s),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:o.id,orgSlug:o.slug,onSelect:a,showBackButton:f.length>1,onBack:()=>v(null)}):null}function Be(C){const e=Z.c(124),{connectionId:i,orgId:a,orgSlug:y,onSelect:r,showBackButton:c,onBack:o}=C,n=ee();let u;e[0]!==a||e[1]!==y?(u={connectionId:pe,orgId:a,orgSlug:y},e[0]=a,e[1]=y,e[2]=u):u=e[2];const k=se(u),v=me(),P=he();let f;e[3]!==i||e[4]!==a?(f=ne.githubUserOrgs(a,i),e[3]=i,e[4]=a,e[5]=f):f=e[5];let d;e[6]!==i||e[7]!==k?(d=()=>He(h=>k.callTool(h),i),e[6]=i,e[7]=k,e[8]=d):d=e[8];let m;e[9]!==f||e[10]!==d?(m={queryKey:f,queryFn:d},e[9]=f,e[10]=d,e[11]=m):m=e[11];const l=ve(m);let p;e[12]!==P||e[13]!==i||e[14]!==l||e[15]!==a||e[16]!==y||e[17]!==v?(p=async()=>{const h=await be({connectionId:i,orgId:a,orgSlug:y,persistFallback:E=>P.update.mutateAsync({id:i,data:{connection_token:E}}).then(Ve)});if(h.ran&&!h.ok)throw new Error(h.error??"no token received");const S=new URL(`/api/${y}/mcp/${i}`,window.location.origin);await v.invalidateQueries({queryKey:ne.isMCPAuthenticated(S.href,null)}),await v.invalidateQueries({queryKey:ne.mcpClientPrefix()}),await l.refetch()},e[12]=P,e[13]=i,e[14]=l,e[15]=a,e[16]=y,e[17]=v,e[18]=p):p=e[18];let g;e[19]!==n?(g=h=>{te.error(n("common.githubRepoPicker.failedReconnect",{error:h instanceof Error?h.message:n("common.githubRepoPicker.unknownError")}))},e[19]=n,e[20]=g):g=e[20];let j;e[21]!==p||e[22]!==g?(j={mutationFn:p,onError:g},e[21]=p,e[22]=g,e[23]=j):j=e[23];const x=ge(j);if(l.isLoading){let h;return e[24]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=h):h=e[24],h}if(l.isError){let h;e[25]!==n?(h=n("common.githubRepoPicker.failedLoadAccounts"),e[25]=n,e[26]=h):h=e[26];let S;e[27]!==h?(S=t.jsx("p",{className:"text-sm text-destructive",children:h}),e[27]=h,e[28]=S):S=e[28];let E;e[29]!==n?(E=n("common.githubRepoPicker.connectionExpiredMessage"),e[29]=n,e[30]=E):E=e[30];let A;e[31]!==E?(A=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:E}),e[31]=E,e[32]=A):A=e[32];let z;e[33]!==x?(z=()=>x.mutate(),e[33]=x,e[34]=z):z=e[34];const D=x.isPending;let L;e[35]!==x.isPending?(L=x.isPending?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx($,{className:"size-3.5"}),e[35]=x.isPending,e[36]=L):L=e[36];let G;e[37]!==n?(G=n("common.githubRepoPicker.reconnectGitHub"),e[37]=n,e[38]=G):G=e[38];let O;e[39]!==x.isPending||e[40]!==z||e[41]!==L||e[42]!==G?(O=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:z,disabled:D,children:[L,G]}),e[39]=x.isPending,e[40]=z,e[41]=L,e[42]=G,e[43]=O):O=e[43];let U;return e[44]!==A||e[45]!==O||e[46]!==S?(U=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[S,A,O]}),e[44]=A,e[45]=O,e[46]=S,e[47]=U):U=e[47],U}const s=l.data;if(!s)return null;if(s.installations.length===0){let h;e[48]!==o||e[49]!==c||e[50]!==n?(h=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[48]=o,e[49]=c,e[50]=n,e[51]=h):h=e[51];let S;e[52]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-8 text-foreground"})}),e[52]=S):S=e[52];let E;e[53]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=E):E=e[53];let A;e[54]!==n?(A=n("common.githubRepoPicker.githubConnected"),e[54]=n,e[55]=A):A=e[55];let z;e[56]!==A?(z=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[E,A]}),e[56]=A,e[57]=z):z=e[57];let D;e[58]!==n?(D=n("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=n,e[59]=D):D=e[59];let L;e[60]!==D?(L=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:D}),e[60]=D,e[61]=L):L=e[61];let G;e[62]!==n?(G=n("common.githubRepoPicker.noRepositoriesShared"),e[62]=n,e[63]=G):G=e[63];let O;e[64]!==G?(O=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:G}),e[64]=G,e[65]=O):O=e[65];let U;e[66]!==n?(U=n("common.githubRepoPicker.chooseRepositories"),e[66]=n,e[67]=U):U=e[67];let ie;e[68]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ze,{size:14}),e[68]=ie):ie=e[68];let M;e[69]!==U?(M=t.jsx(re,{asChild:!0,size:"sm",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",children:[U,ie]})}),e[69]=U,e[70]=M):M=e[70];let Q;e[71]!==l?(Q=()=>{l.refetch()},e[71]=l,e[72]=Q):Q=e[72];const je=l.isFetching;let q;e[73]!==l.isFetching?(q=l.isFetching&&t.jsx(X,{size:14,className:"animate-spin"}),e[73]=l.isFetching,e[74]=q):q=e[74];let B;e[75]!==n?(B=n("common.githubRepoPicker.checkAgain"),e[75]=n,e[76]=B):B=e[76];let V;e[77]!==l.isFetching||e[78]!==Q||e[79]!==q||e[80]!==B?(V=t.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:Q,disabled:je,children:[q,B]}),e[77]=l.isFetching,e[78]=Q,e[79]=q,e[80]=B,e[81]=V):V=e[81];let K;e[82]!==M||e[83]!==V?(K=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[M,V]}),e[82]=M,e[83]=V,e[84]=K):K=e[84];let J;e[85]!==n?(J=n("common.githubRepoPicker.repositoryAccessNote"),e[85]=n,e[86]=J):J=e[86];let W;e[87]!==J?(W=t.jsx("p",{className:"mt-4 max-w-[360px] rounded-lg bg-muted/50 px-3 py-2 text-xs leading-relaxed text-muted-foreground",children:J}),e[87]=J,e[88]=W):W=e[88];let Y;e[89]!==z||e[90]!==L||e[91]!==O||e[92]!==K||e[93]!==W?(Y=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[S,z,L,O,K,W]}),e[89]=z,e[90]=L,e[91]=O,e[92]=K,e[93]=W,e[94]=Y):Y=e[94];let oe;return e[95]!==Y||e[96]!==h?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[h,Y]}),e[95]=Y,e[96]=h,e[97]=oe):oe=e[97],oe}let b;e[98]!==o||e[99]!==c||e[100]!==n?(b=c&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:o,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(ue,{size:12}),n("common.githubRepoPicker.changeConnection")]})}),e[98]=o,e[99]=c,e[100]=n,e[101]=b):b=e[101];let N;if(e[102]!==s.installations||e[103]!==r||e[104]!==n){let h;e[106]!==r||e[107]!==n?(h=S=>t.jsxs("button",{type:"button",onClick:()=>r(S),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:S.avatarUrl,alt:S.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:S.login}),S.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:n("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[n("common.githubRepoPicker.select")," →"]})]},S.installationId),e[106]=r,e[107]=n,e[108]=h):h=e[108],N=s.installations.map(h),e[102]=s.installations,e[103]=r,e[104]=n,e[105]=N}else N=e[105];let I;e[109]!==N?(I=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:N}),e[109]=N,e[110]=I):I=e[110];let T;e[111]!==n?(T=n("common.githubRepoPicker.accountNotListed"),e[111]=n,e[112]=T):T=e[112];let R;e[113]!==n?(R=n("common.githubRepoPicker.installGitHubApp"),e[113]=n,e[114]=R):R=e[114];let w;e[115]!==R?(w=t.jsx("span",{className:"underline underline-offset-2",children:R}),e[115]=R,e[116]=w):w=e[116];let _;e[117]!==T||e[118]!==w?(_=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:xe,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[T," ",w]})}),e[117]=T,e[118]=w,e[119]=_):_=e[119];let F;return e[120]!==I||e[121]!==_||e[122]!==b?(F=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,I,_]}),e[120]=I,e[121]=_,e[122]=b,e[123]=F):F=e[123],F}function Ve(){}function Ke(C){const e=Z.c(23),{connectionId:i,orgId:a,orgSlug:y,installation:r,onSelectRepo:c,isSaving:o}=C,n=ee(),[u,k]=H.useState(""),v=_e(u,300),P=H.useDeferredValue(v),f=u!==P;let d;e[0]!==n?(d=n("common.githubRepoPicker.searchRepositories"),e[0]=n,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(Te,{placeholder:d,value:u,onChange:k,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const l=f?"opacity-40":"opacity-100";let p;e[6]!==l?(p=ae("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",l),e[6]=l,e[7]=p):p=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(X,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==i||e[10]!==P||e[11]!==r||e[12]!==o||e[13]!==c||e[14]!==a||e[15]!==y?(j=t.jsx(H.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:i,orgId:a,orgSlug:y,installation:r,query:P,onSelectRepo:c,isSaving:o})}),e[9]=i,e[10]=P,e[11]=r,e[12]=o,e[13]=c,e[14]=a,e[15]=y,e[16]=j):j=e[16];let x;e[17]!==p||e[18]!==j?(x=t.jsx("div",{className:p,children:j}),e[17]=p,e[18]=j,e[19]=x):x=e[19];let s;return e[20]!==m||e[21]!==x?(s=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=s):s=e[22],s}function Je(C){const e=Z.c(36),{connectionId:i,orgId:a,orgSlug:y,installation:r,query:c,onSelectRepo:o,isSaving:n}=C,u=ee();let k;e[0]!==i||e[1]!==a||e[2]!==y?(k={connectionId:i,orgId:a,orgSlug:y},e[0]=i,e[1]=a,e[2]=y,e[3]=k):k=e[3];const v=se(k),P=r.type==="User"?"user":"org",f=c?`${P}:${r.login} ${c} in:name fork:true`:`${P}:${r.login} fork:true`;let d;e[4]!==i||e[5]!==r.login||e[6]!==a||e[7]!==c?(d=ne.githubOrgRepos(a,i,r.login,c),e[4]=i,e[5]=r.login,e[6]=a,e[7]=c,e[8]=d):d=e[8];let m;e[9]!==v||e[10]!==f?(m=async x=>{const{signal:s}=x,N=(await v.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:s})).content?.[0]?.text;if(!N)throw new Error("No response from search_repositories");return(JSON.parse(N).items??[]).map(We)},e[9]=v,e[10]=f,e[11]=m):m=e[11];let l;e[12]!==d||e[13]!==m?(l={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=l):l=e[14];const{data:p}=Ce(l);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let s;e[17]!==x?(s=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=s):s=e[18];let b;e[19]!==c||e[20]!==u?(b=c&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=c,e[20]=u,e[21]=b):b=e[21];let N;return e[22]!==s||e[23]!==b?(N=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[s,b]}),e[22]=s,e[23]=b,e[24]=N):N=e[24],N}let g;if(e[25]!==n||e[26]!==o||e[27]!==p||e[28]!==u){let x;e[30]!==n||e[31]!==o||e[32]!==u?(x=s=>t.jsxs("button",{type:"button",onClick:()=>o(s),disabled:n,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($,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[t.jsx("span",{className:"text-sm font-medium truncate",children:s.name}),s.fork&&t.jsx("span",{className:"text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:u("common.githubRepoPicker.forkBadge")})]}),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:[s.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),s.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},s.fullName),e[30]=n,e[31]=o,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=n,e[26]=o,e[27]=p,e[28]=u,e[29]=g}else g=e[29];let j;return e[34]!==g?(j=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]=j):j=e[35],j}function We(C){return{name:C.name,fullName:C.full_name,owner:C.full_name.split("/")[0]??"",url:C.html_url,private:C.private,description:C.description,updatedAt:C.updated_at,fork:C.fork??!1}}function ce(C){const e=Z.c(51),{status:i,error:a,retry:y}=C,r=ee();if(i==="error"){let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx($,{className:"size-5 text-destructive"})}),e[0]=N):N=e[0];let I;e[1]!==r?(I=r("common.githubRepoPicker.connectionFailed"),e[1]=r,e[2]=I):I=e[2];let T;e[3]!==I?(T=t.jsx("p",{className:"text-sm font-medium",children:I}),e[3]=I,e[4]=T):T=e[4];let R;e[5]!==a||e[6]!==r?(R=a??r("common.githubRepoPicker.somethingWentWrong"),e[5]=a,e[6]=r,e[7]=R):R=e[7];let w;e[8]!==R?(w=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:R}),e[8]=R,e[9]=w):w=e[9];let _;e[10]!==T||e[11]!==w?(_=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[T,w]}),e[10]=T,e[11]=w,e[12]=_):_=e[12];let F;e[13]!==r?(F=r("common.githubRepoPicker.tryAgain"),e[13]=r,e[14]=F):F=e[14];let h;e[15]!==y||e[16]!==F?(h=t.jsx("button",{type:"button",onClick:y,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:F}),e[15]=y,e[16]=F,e[17]=h):h=e[17];let S;return e[18]!==_||e[19]!==h?(S=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[N,_,h]}),e[18]=_,e[19]=h,e[20]=S):S=e[20],S}const c=i==="authenticating";let o;e[21]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx($,{className:"size-5 text-foreground"})}),e[21]=o):o=e[21];let n;e[22]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsxs("div",{className:"relative size-10",children:[o,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(X,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=n):n=e[22];let u;e[23]!==c||e[24]!==r?(u=r(c?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=c,e[24]=r,e[25]=u):u=e[25];let k;e[26]!==u?(k=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=k):k=e[27];let v;e[28]!==c||e[29]!==r?(v=r(c?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=c,e[29]=r,e[30]=v):v=e[30];let P;e[31]!==v?(P=t.jsx("p",{className:"text-xs text-muted-foreground",children:v}),e[31]=v,e[32]=P):P=e[32];let f;e[33]!==k||e[34]!==P?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[k,P]}),e[33]=k,e[34]=P,e[35]=f):f=e[35];const d=c?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ae("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let l;e[38]!==m?(l=t.jsx("span",{className:m}),e[38]=m,e[39]=l):l=e[39];const p=c?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ae("size-1.5 rounded-full",p),e[40]=p,e[41]=g):g=e[41];let j;e[42]!==g?(j=t.jsx("span",{className:g}),e[42]=g,e[43]=j):j=e[43];let x;e[44]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("span",{className:"size-1.5 rounded-full bg-muted-foreground/30"}),e[44]=x):x=e[44];let s;e[45]!==l||e[46]!==j?(s=t.jsxs("div",{className:"flex items-center gap-1.5",children:[l,j,x]}),e[45]=l,e[46]=j,e[47]=s):s=e[47];let b;return e[48]!==s||e[49]!==f?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[n,f,s]}),e[48]=s,e[49]=f,e[50]=b):b=e[50],b}export{ft as G,Qe as a,De as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-
|
|
1
|
+
import{eq as It,er as Et,b_ as R,an as c,es as de,c3 as Je,et as Tt,bZ as wt,ar as Mt,am as O,ap as G,al as oe,ak as S,at as m,au as F,as as At,eu as I,ao as Ot,t as ge,c as Ee,r as W,H as Ct,j as Rt}from"./index-kRw55cWn.js";import{u as Nt}from"./use-mcp-client-CAS9_zw7.js";import{S as xt}from"./constants-dLUUoWH7.js";import{d as Pt}from"./delay-CnY5UFtP.js";import{e as Dt}from"./backoff-CrEUbyZT.js";import{d as Lt,D as kt}from"./decopilot-sse-pool-CSymSA16.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 n={};for(const i of s)n[i]=i;return n},t.getValidEnumValues=s=>{const n=t.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},t.find=(s,n)=>{for(const i of s)if(n(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,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}t.joinValues=r,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(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(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.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 o=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(a(i))):o[u]=o[u]||{_errors:[]},o=o[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 n=s.path[0];a[n]=a[n]||[],a[n].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 We="vercel.ai.error",jt=Symbol.for(We),Ce,Re,Z=class Ge extends(Re=Error,Ce=jt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return Ge.hasMarker(e,We)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ye(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var He="AI_InvalidArgumentError",qe=`vercel.ai.error.${He}`,Zt=Symbol.for(qe),Ne,xe,$t=class extends(xe=Z,Ne=Zt,xe){constructor({message:t,cause:e,argument:a}){super({name:He,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,qe)}},Xe="AI_JSONParseError",Qe=`vercel.ai.error.${Xe}`,Ut=Symbol.for(Qe),Pe,De,Le=class extends(De=Z,Pe=Ut,De){constructor({text:t,cause:e}){super({name:Xe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ye(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Qe)}},Ke="AI_TypeValidationError",et=`vercel.ai.error.${Ke}`,Ft=Symbol.for(et),ke,je,q=class ve extends(je=Z,ke=Ft,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 n=[];r.entityName&&n.push(r.entityName),r.entityId&&n.push(`id: "${r.entityId}"`),s+=n.join(", "),s+=")"}super({name:Ke,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ye(a)}`,cause:a}),this[ke]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,et)}static wrap({value:e,cause:a,context:r}){var s,n,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((n=a.context)==null?void 0:n.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 n=a.length,i=new Array(e);for(let o=0;o<e;o++)i[o]=a[Math.random()*n|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new $t({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Bt=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Vt=/"(?: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"||Bt.test(t)===!1&&Vt.test(t)===!1?e:zt(e)}function zt(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 n=r[s];n&&typeof n=="object"&&e.push(n)}}}return t}function Jt(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 Wt=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"},Gt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Yt(t,e){var a,r,s;const n={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&&(n.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(n.minItems=t.minLength.value),t.maxLength&&(n.maxItems=t.maxLength.value),t.exactLength&&(n.minItems=t.exactLength.value,n.maxItems=t.exactLength.value),n}function Ht(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function qt(){return{type:"boolean"}}function tt(t,e){return b(t.type._def,e)}var Xt=(t,e)=>b(t.innerType._def,e);function at(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,n)=>at(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 Qt(t)}}var Qt=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 Kt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function ea(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ta(t){return{type:"string",enum:Array.from(t.values)}}var aa=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function ra(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(aa(s))r.push(...s.allOf);else{let n=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...o}=s;n=o}r.push(n)}}),r.length?{allOf:r}:void 0}function sa(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 rt(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"?oa(t):t}var na=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function oa(t){let e="";for(let a=0;a<t.length;a++)na.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(n=>n.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(n=>n.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 n="",i=!1,o=!1,p=!1;for(let u=0;u<s.length;u++){if(i){n+=s[u],i=!1;continue}if(r.i){if(o){if(s[u].match(/[a-z]/)){p?(n+=s[u],n+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(n+=s[u],p=!0):n+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){n+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){n+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){n+=`($|(?=[\r
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cc as _}from"./index-
|
|
1
|
+
import{cc as _}from"./index-kRw55cWn.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,bn as L,bl as B,j as d,dd as q,bi as x,bm as E,db as K,bo as C,dc as _,cr as T,bk as k,cm as U,cl as V}from"./index-
|
|
1
|
+
import{r as s,bn as L,bl as B,j as d,dd as q,bi as x,bm as E,db as K,bo as C,dc as _,cr as T,bk as k,cm as U,cl as V}from"./index-kRw55cWn.js";var I="Radio",[z,w]=k(I),[H,W]=z(I),P=s.forwardRef((t,c)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=E(c,h=>m(h)),u=s.useRef(!1),b=p?R||!!p.closest("form"):!0;return d.jsxs(H,{scope:o,checked:e,disabled:a,children:[d.jsx(x.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:C(t.onClick,h=>{e||f?.(),b&&(u.current=h.isPropagationStopped(),u.current||h.stopPropagation())})}),b&&d.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});P.displayName=I;var g="RadioIndicator",G=s.forwardRef((t,c)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(g,o);return d.jsx(T,{present:n||r.checked,children:d.jsx(x.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:c})})});G.displayName=g;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:c,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=E(a,r),f=U(o),R=V(c);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),d.jsx(x.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y="RadioGroup",[J]=k(y,[_,w]),j=_(),N=w(),[Q,Z]=J(y),D=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[b,h]=B({prop:r,defaultProp:e??null,onChange:p,caller:y});return d.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:b,onValueChange:h,children:d.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:d.jsx(x.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:c})})})});D.displayName=y;var M="RadioGroupItem",O=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=E(c,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=b=>{Y.includes(b.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),d.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:d.jsx(P,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:C(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:C(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,c)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return d.jsx(G,{...e,...n,ref:c})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
|