decocms 4.150.3 → 4.150.5
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-9SzyWKyE.js → AlertCircle-VrOh3j4B.js} +1 -1
- package/dist/client/assets/{AreaChart-CnNr4TEy.js → AreaChart-CIv0e4G-.js} +1 -1
- package/dist/client/assets/{ArrowUp-DQRRFixg.js → ArrowUp-BVZLXzUV.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CbcmJ_TD.js → ArrowUpRight-CEm-1PRY.js} +1 -1
- package/dist/client/assets/{Check-HAv3Qoh-.js → Check-C2IOndRU.js} +1 -1
- package/dist/client/assets/{CheckCircle-B2TYFYU2.js → CheckCircle-BTBBUz6b.js} +1 -1
- package/dist/client/assets/{ChevronDown-CHC7E66-.js → ChevronDown-BdEeojTz.js} +1 -1
- package/dist/client/assets/{ChevronRight-CcOjzlDN.js → ChevronRight-D1ezJqQ4.js} +1 -1
- package/dist/client/assets/{ChevronUp-DbtLB7uL.js → ChevronUp-COjK6jYy.js} +1 -1
- package/dist/client/assets/{Copy01-Bp9Lffnr.js → Copy01-DSaJHchw.js} +1 -1
- package/dist/client/assets/{CpuChip01-CKGxncDz.js → CpuChip01-YK0olih9.js} +1 -1
- package/dist/client/assets/{DotsVertical-Df0bVocX.js → DotsVertical-DhLV-A4H.js} +1 -1
- package/dist/client/assets/{Eye-BNpFccLX.js → Eye-DKZ3-ZmG.js} +1 -1
- package/dist/client/assets/{FilterLines-Gvs8cXY9.js → FilterLines-Ct0b5Izh.js} +1 -1
- package/dist/client/assets/{HardDrive-DplRZ7Xc.js → HardDrive-DXCUEBbQ.js} +1 -1
- package/dist/client/assets/{Key01-DQiO6Zek.js → Key01-C6x0Tr_g.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Dyg8dCMM.js → LayoutLeft-C8ZYpS6u.js} +1 -1
- package/dist/client/assets/{LinkExternal01-CtHit8P2.js → LinkExternal01-BGFlrQXG.js} +1 -1
- package/dist/client/assets/{LogOut01-BZTTP4bY.js → LogOut01-BICvVeQl.js} +1 -1
- package/dist/client/assets/{Monitor01-CFzyQiRg.js → Monitor01-BNCfbzzq.js} +1 -1
- package/dist/client/assets/{Palette-BFblTH0J.js → Palette-Davckwrw.js} +1 -1
- package/dist/client/assets/{Play-BorSZmIL.js → Play-BDEXf8DE.js} +1 -1
- package/dist/client/assets/{Plus-BVxAhxMz.js → Plus-Cc4UAY6m.js} +1 -1
- package/dist/client/assets/{SearchLg-CDsIaigY.js → SearchLg-i1xrYkDO.js} +1 -1
- package/dist/client/assets/{SearchMd-BSTxqnhr.js → SearchMd-em4uHmz6.js} +1 -1
- package/dist/client/assets/{Settings02-BELTDGHE.js → Settings02-7hoFOzi1.js} +1 -1
- package/dist/client/assets/{Shield01-CT4epMIY.js → Shield01-BlbSjQrn.js} +1 -1
- package/dist/client/assets/{Star01-Bi9T9bJZ.js → Star01-DRwTTzYO.js} +1 -1
- package/dist/client/assets/{Stars01-OZSf9VLV.js → Stars01-DVGAaR5C.js} +1 -1
- package/dist/client/assets/{Stars02-Bj8ktNiu.js → Stars02-DfyxfEcS.js} +1 -1
- package/dist/client/assets/{Sun-DuEt3PP-.js → Sun-BVUdhCkU.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BPNHlIUv.js → SwitchHorizontal01-D_y3gDV6.js} +1 -1
- package/dist/client/assets/{Tool01-DkOLJQIO.js → Tool01-C7GA4KcH.js} +1 -1
- package/dist/client/assets/{Tool02-B7PpgdMe.js → Tool02-BogqBe3k.js} +1 -1
- package/dist/client/assets/{Trash01-BrKPcSIO.js → Trash01-C5Fu6DJL.js} +1 -1
- package/dist/client/assets/{TrendUp01-DcvNh57G.js → TrendUp01-pCv4OITY.js} +1 -1
- package/dist/client/assets/{Upload01-INelJ_Lh.js → Upload01-BYwhzcDR.js} +1 -1
- package/dist/client/assets/{User01-D5zL4tme.js → User01-q5cxRF_s.js} +1 -1
- package/dist/client/assets/{Users01-Dv4yEyJr.js → Users01-D37NvFWU.js} +1 -1
- package/dist/client/assets/{Users03-Brr-YBon.js → Users03-CLhPbTfm.js} +1 -1
- package/dist/client/assets/{X-b1CduA8m.js → X-D7jgb4FX.js} +1 -1
- package/dist/client/assets/{XCircle-COKwof4k.js → XCircle-Q2-xnhMv.js} +1 -1
- package/dist/client/assets/{XClose-BeeXU30N.js → XClose-BAVsEAz0.js} +1 -1
- package/dist/client/assets/{Zap-DTi7UEaq.js → Zap-fNNxx-9c.js} +1 -1
- package/dist/client/assets/{ZapSquare-BdAqvdax.js → ZapSquare-DyBHtYQG.js} +1 -1
- package/dist/client/assets/{access-gate-BMlGI3KF.js → access-gate-8VbifWBn.js} +1 -1
- package/dist/client/assets/{add-section-modal-C6iHHcJL.js → add-section-modal-CEAj_Dbs.js} +1 -1
- package/dist/client/assets/{agent-icon-DsZ_qI1T.js → agent-icon-BtnFRNoX.js} +1 -1
- package/dist/client/assets/{agents-list-Cbu4_Cyi.js → agents-list-BIx4Uh7u.js} +1 -1
- package/dist/client/assets/ai-providers-BpyyxVFG.js +1 -0
- package/dist/client/assets/{alert-B-wH90gS.js → alert-D3ALohgv.js} +1 -1
- package/dist/client/assets/{alert-dialog-BQTZb6rd.js → alert-dialog-DpBDum8p.js} +1 -1
- package/dist/client/assets/app-editor-Bs-aXtBt.js +1 -0
- package/dist/client/assets/{auth-CF8F6GlA.js → auth-C_hAx-kf.js} +1 -1
- package/dist/client/assets/{auth-catchall-DddFNrzC.js → auth-catchall-zKdPQW4C.js} +1 -1
- package/dist/client/assets/auth-entry-C8-Xu5vu.js +1 -0
- package/dist/client/assets/{auth-split-layout-BUp_M-fc.js → auth-split-layout-qtJy2TTH.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BVEgp1eO.js → authenticate-and-persist-oauth-rg7jJVLv.js} +1 -1
- package/dist/client/assets/{automation-list-row-CqyPjnKW.js → automation-list-row-BX1kOyLG.js} +1 -1
- package/dist/client/assets/{automation-runs-DbpjwD40.js → automation-runs-qWnkNQwP.js} +14 -14
- package/dist/client/assets/{automations-Cies1T9w.js → automations-BfEf_KVY.js} +1 -1
- package/dist/client/assets/{avatar-2jBZ0oLe.js → avatar-CjpdLlJL.js} +1 -1
- package/dist/client/assets/{badge-gG6vRyl9.js → badge-CKejypa0.js} +1 -1
- package/dist/client/assets/{block-document-ChCaQmhb.js → block-document-C51Jez6r.js} +1 -1
- package/dist/client/assets/{brand-context-BmVT6dy0.js → brand-context-_l6qY4h_.js} +1 -1
- package/dist/client/assets/{buckets-MBiWM1KL.js → buckets-CfMY0n88.js} +1 -1
- package/dist/client/assets/bulk-category-panel-exsSe_x8.js +1 -0
- package/dist/client/assets/{calendar-BhcNF5ME.js → calendar-17clXnw0.js} +1 -1
- package/dist/client/assets/{capability-load-error-Dqfkupks.js → capability-load-error-D5eDC4Hb.js} +1 -1
- package/dist/client/assets/{card-Bk2dJN_0.js → card-DpFGkJgB.js} +1 -1
- package/dist/client/assets/category-editor-B6cqNUeb.js +1 -0
- package/dist/client/assets/chat-context-DfoigBsD.js +36 -0
- package/dist/client/assets/{checkbox-RL6gfPEZ.js → checkbox-t8OeMbU6.js} +1 -1
- package/dist/client/assets/{cli-auth-success-CTDCMXH6.js → cli-auth-success-B9BmRxtW.js} +1 -1
- package/dist/client/assets/collection-detail-Iu6VkI9O.js +1 -0
- package/dist/client/assets/{collection-display-button-DUb4Bukx.js → collection-display-button-Dgga6ZlA.js} +1 -1
- package/dist/client/assets/{collection-search-CrIM_huO.js → collection-search-zUg8lVSw.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-AZMzRHKA.js → collection-table-wrapper-Cr-z7b00.js} +1 -1
- package/dist/client/assets/{collection-tabs-DSHWZpg5.js → collection-tabs-A7lru7Qs.js} +1 -1
- package/dist/client/assets/{command-2_oAT47U.js → command-Bi0o-QK5.js} +1 -1
- package/dist/client/assets/commerce-onboarding-BkC2fyc4.js +1 -0
- package/dist/client/assets/{companions-core-Dcviw3XP.js → companions-core-dVJvbC65.js} +1 -1
- package/dist/client/assets/{connect-Df_GTBGq.js → connect-eC5jr4RA.js} +1 -1
- package/dist/client/assets/{connection-card-4rTis35w.js → connection-card-C8Cdx8-l.js} +1 -1
- package/dist/client/assets/{connection-detail-DUOgMQT4.js → connection-detail-BUs63Yct.js} +1 -1
- package/dist/client/assets/{connection-C29S1nEA.js → connection-eo8ODq06.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-o0JRu9Pz.js → connection-form-helpers-DJW4NOaI.js} +1 -1
- package/dist/client/assets/{connections-B-O9wYf6.js → connections-DjyXGiLS.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-B0Y65B5R.js → decopilot-sse-pool-iZWGiJ6m.js} +1 -1
- package/dist/client/assets/{dialog-k8IF67S5.js → dialog-CYJ2krGd.js} +1 -1
- package/dist/client/assets/{domain-settings-BqoJGIGn.js → domain-settings-Bd6S514P.js} +1 -1
- package/dist/client/assets/{drawer-BSAyV4TO.js → drawer-BgACK2gO.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BHrqHItr.js → dropdown-menu-BVKPxQwK.js} +1 -1
- package/dist/client/assets/{empty-state-pVGYkd6B.js → empty-state-_lnZvnDy.js} +1 -1
- package/dist/client/assets/{extract-connection-data-C5kAgWu4.js → extract-connection-data-DDGietCF.js} +1 -1
- package/dist/client/assets/file-explorer-CONK9Gls.js +2 -0
- package/dist/client/assets/{form-hHWp4kad.js → form-Dz3t-7Zx.js} +1 -1
- package/dist/client/assets/{general-uZipTDA8.js → general-CzNW1OwL.js} +1 -1
- package/dist/client/assets/{github-repo-picker-C4SqFi1U.js → github-repo-picker-D5ZYIMD_.js} +1 -1
- package/dist/client/assets/{hooks-Cqm3ievW.js → hooks-BFXnvJsj.js} +1 -1
- package/dist/client/assets/{index-Dw8aOHkA.js → index-09an7Ths.js} +2 -2
- package/dist/client/assets/{index-D2mJ3JUR.js → index-7MKVrGX5.js} +37 -37
- package/dist/client/assets/{index-D9uE9H9L.js → index-BCZrRQXI.js} +1 -1
- package/dist/client/assets/{index-C2l8ZL-J.js → index-BP8RPnKM.js} +1 -1
- package/dist/client/assets/index-BRFMEop5.js +1 -0
- package/dist/client/assets/{index-BNimzFza.js → index-BXew28Nr.js} +1 -1
- package/dist/client/assets/{index-BH_FlvCl.js → index-Cqp0j5ti.js} +26 -26
- package/dist/client/assets/{index-CI9qWtAz.js → index-CvNrBBI4.js} +1 -1
- package/dist/client/assets/{index-6MYKzXRx.js → index-Di56pqp7.js} +3 -3
- package/dist/client/assets/{index-DOVYT_MA.js → index-c0896GV6.js} +1 -1
- package/dist/client/assets/{index-redirect-DhikZZpl.js → index-redirect-AQoE5UYg.js} +1 -1
- package/dist/client/assets/{index--wIVtztH.js → index-wygzLoLh.js} +1 -1
- package/dist/client/assets/{input-D_5wC1aD.js → input-D6nQa3aJ.js} +1 -1
- package/dist/client/assets/{integration-icon-DOIN2Kkl.js → integration-icon-DdT_8AQf.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DUTyUDhg.js → invite-member-dialog-BFi00VMw.js} +1 -1
- package/dist/client/assets/{label-y0hp3C8E.js → label-C9IhNAjJ.js} +1 -1
- package/dist/client/assets/{layout-BfJRmK_r.js → layout-3pCmW4H5.js} +1 -1
- package/dist/client/assets/login-BCSU8KVZ.js +1 -0
- package/dist/client/assets/{mcp-oauth-34yo-foZ.js → mcp-oauth-CmEMsCWr.js} +1 -1
- package/dist/client/assets/{members-G_VAfvuD.js → members-CMhdddGj.js} +1 -1
- package/dist/client/assets/{monaco-editor-D-wYE9NF.js → monaco-editor-BzA0njjf.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BERtubjR.js → monitoring-stats-row-C6-uGNCA.js} +1 -1
- package/dist/client/assets/{multi-select-TIl6cgZ2.js → multi-select-DhcdFFyS.js} +1 -1
- package/dist/client/assets/{oauth-callback-WWLohlYj.js → oauth-callback-B4hEB8_A.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-1jhRM56C.js → oauth-callback-ai-provider-DfCcrXhM.js} +1 -1
- package/dist/client/assets/{onboarding-BKGxGwjd.js → onboarding-qfcJYQID.js} +1 -1
- package/dist/client/assets/{org-install-CTzDf415.js → org-install-C8SnWuo2.js} +1 -1
- package/dist/client/assets/{org-layout-FR2gTMA8.js → org-layout-C3uvkM7z.js} +1 -1
- package/dist/client/assets/{organization-choice-BDoC3TOS.js → organization-choice-BRpRRzGf.js} +1 -1
- package/dist/client/assets/{orgs-BZMU7CkE.js → orgs-CAzhBKty.js} +1 -1
- package/dist/client/assets/{page-seo-form-CL6MwdTw.js → page-seo-form-zVQNJp67.js} +1 -1
- package/dist/client/assets/{popover-BjTiOU-j.js → popover-Xw-N8e2Y.js} +1 -1
- package/dist/client/assets/post-editor-DwgZcnqm.js +1 -0
- package/dist/client/assets/{primitives-UAJBop2L.js → primitives-DS-h_LSR.js} +1 -1
- package/dist/client/assets/{profile-BIzIR79p.js → profile-BLlVTlb4.js} +1 -1
- package/dist/client/assets/project-app-view-CwNWs0k5.js +1 -0
- package/dist/client/assets/record-editor-Bx1VQAN5.js +1 -0
- package/dist/client/assets/redirect-editor-C_yCxgbV.js +1 -0
- package/dist/client/assets/registry-BpxpQIhl.js +2 -0
- package/dist/client/assets/{registry-layout-Bn38_zue.js → registry-layout-BcLR04wI.js} +1 -1
- package/dist/client/assets/{reports-Bg5241W2.js → reports-Bc2g3ShR.js} +2 -2
- package/dist/client/assets/{require-capability-DqCmC5MK.js → require-capability-DxiwYNcF.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CUjsq5ga.js → required-auth-layout-4hr336lj.js} +1 -1
- package/dist/client/assets/{reset-password-DYsOl0An.js → reset-password-Dd3bedeo.js} +1 -1
- package/dist/client/assets/{roles-BS6akTVO.js → roles-DA36o3mk.js} +1 -1
- package/dist/client/assets/{search-input-DUXJZ6jf.js → search-input-GmGBLHNz.js} +1 -1
- package/dist/client/assets/{secrets-a23_vqmE.js → secrets-DNKgYSaf.js} +1 -1
- package/dist/client/assets/{sections-editor-DqH_0g19.js → sections-editor-Ci-G3tVT.js} +2 -2
- package/dist/client/assets/{select-DQeN1iTO.js → select-B-1QLAzY.js} +1 -1
- package/dist/client/assets/{select-model-DSHwqyob.js → select-model-CK74mhHy.js} +2 -2
- package/dist/client/assets/{self-tool-result-6UMYRbHu.js → self-tool-result-BYri_TUe.js} +1 -1
- package/dist/client/assets/seo-editor-CHmOrZ28.js +1 -0
- package/dist/client/assets/{settings-layout-CsZ5mAq6.js → settings-layout-Drjj-yeq.js} +1 -1
- package/dist/client/assets/{settings-section-C-scXgTT.js → settings-section-B2Dp5AvY.js} +1 -1
- package/dist/client/assets/{shell-controls-CG2FoklQ.js → shell-controls-DInN0az9.js} +1 -1
- package/dist/client/assets/{shell-layout-BjvhCwpZ.js → shell-layout-D7DgFiS7.js} +1 -1
- package/dist/client/assets/{sidebar-D3dJYFFY.js → sidebar-C48FbYSi.js} +1 -1
- package/dist/client/assets/{skeleton-Dtl2kVUh.js → skeleton-CSIlOmty.js} +1 -1
- package/dist/client/assets/spinner-CCsdQFJ7.js +1 -0
- package/dist/client/assets/{sso-DitYu9sW.js → sso-Dfrtb9rK.js} +1 -1
- package/dist/client/assets/{store-BOU1swIR.js → store-Dbg0akwy.js} +1 -1
- package/dist/client/assets/store-registry-Dqn8_0iK.js +2 -0
- package/dist/client/assets/{studio-tools-D75sojFk.js → studio-tools-D1kZSFKJ.js} +1 -1
- package/dist/client/assets/{switch-CQkWKPjL.js → switch-BvfWZ5SX.js} +1 -1
- package/dist/client/assets/{tab-id-DTfezOr5.js → tab-id-DPGbzkjZ.js} +1 -1
- package/dist/client/assets/{table-CSJj0ga_.js → table-BWObzM0D.js} +1 -1
- package/dist/client/assets/{tabs-l0P4uKJS.js → tabs-Cs2NaHyi.js} +1 -1
- package/dist/client/assets/{textarea-Cwy8mcj3.js → textarea-DythUT91.js} +1 -1
- package/dist/client/assets/{toggle-group-BUQniaMs.js → toggle-group-cwJ-3Qkn.js} +1 -1
- package/dist/client/assets/{toolbar-BnCsl0cc.js → toolbar-D1X491Bz.js} +1 -1
- package/dist/client/assets/{tooltip-5f345nRx.js → tooltip-CLQrC55g.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DscE0aEQ.js → use-ai-providers-DhDzhV21.js} +1 -1
- package/dist/client/assets/{use-automations-R01MF2Wb.js → use-automations-BXBpgS7I.js} +1 -1
- package/dist/client/assets/{use-autosave-wlNPsM1K.js → use-autosave-CVe6tVe8.js} +1 -1
- package/dist/client/assets/{use-capability-CXHTHN2p.js → use-capability-BvgzrNVb.js} +1 -1
- package/dist/client/assets/{use-clock-tick-ClIxUD8i.js → use-clock-tick-DBPQY4zY.js} +1 -1
- package/dist/client/assets/{use-connection-aekGGpVs.js → use-connection-C8a96kdh.js} +1 -1
- package/dist/client/assets/{use-copy-hYjjhj44.js → use-copy-Byt9inJO.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DAF6n_fI.js → use-create-virtual-mcp-DMtE2TRf.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BIMFLroB.js → use-debounced-autosave-Dw1dSaXC.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BVPzmiZc.js → use-debounced-value-D9PhOqL3.js} +1 -1
- package/dist/client/assets/use-deco-credits-D4Zi2Dpi.js +1 -0
- package/dist/client/assets/{use-decopilot-events-BsDG16aR.js → use-decopilot-events-Dh8SD8wQ.js} +1 -1
- package/dist/client/assets/{use-delete-connection-JQZFpGgt.js → use-delete-connection-fSESSDJN.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-JunCUCsz.js → use-deployment-admin-DpBCxqNV.js} +1 -1
- package/dist/client/assets/{use-file-configs-DZVUQ4pq.js → use-file-configs-zRFCtc2l.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BVTX2txG.js → use-infinite-scroll-Dp_deUwo.js} +1 -1
- package/dist/client/assets/use-is-desktop-app-BNujXJc_.js +1 -0
- package/dist/client/assets/{use-join-requests-Cs-3guHD.js → use-join-requests-2jyJQOhD.js} +1 -1
- package/dist/client/assets/{use-mcp-auth-status-BSa8WVqO.js → use-mcp-auth-status-XMCWqwYj.js} +1 -1
- package/dist/client/assets/{use-mcp-client-epZZ6uX_.js → use-mcp-client-aTD0dPcl.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CA8XLLvW.js → use-mcp-tools-BAO8rbDl.js} +1 -1
- package/dist/client/assets/{use-members-DkE_dcBu.js → use-members-BUtOw5Tc.js} +1 -1
- package/dist/client/assets/{use-mobile-CHEn9Vuf.js → use-mobile-CwF0Qb5H.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-ndEZccL5.js → use-navigate-to-agent-DQ1z_mCw.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-FL0jYYDe.js → use-org-auth-client-CZTzoTui.js} +1 -1
- package/dist/client/assets/{use-org-sso-DZn58QZw.js → use-org-sso-pqFbhVp4.js} +1 -1
- package/dist/client/assets/{use-organization-roles-BbvmSWo8.js → use-organization-roles-CO3N-Y73.js} +1 -1
- package/dist/client/assets/{use-organization-settings-Cs2jBFh8.js → use-organization-settings-B38wM1cJ.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CcoxB7ml.js → use-registry-connections-DewHQY4J.js} +1 -1
- package/dist/client/assets/{use-secrets-BX9Z-daT.js → use-secrets-Bis_tj7L.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DL8lqATA.js → use-status-sounds-BX5ZDt6a.js} +1 -1
- package/dist/client/assets/{use-tags-HpOhT-xP.js → use-tags-BkA_-ycD.js} +1 -1
- package/dist/client/assets/{use-view-mode-Bq06vK1E.js → use-view-mode-B7fMvZSY.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-BKlkVUBn.js → use-virtual-mcp-D568WlVW.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-P0ef7WOv.js +1 -0
- package/dist/client/assets/{useQueries-DcSKIvPe.js → useQueries-CWXfwoCp.js} +1 -1
- package/dist/client/assets/{useRouterState-BQfjji-X.js → useRouterState-Du--m2-U.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-C4SvLOUQ.js +1 -0
- package/dist/client/assets/{users-BBP5TmzE.js → users-Cxz-o92E.js} +1 -1
- package/dist/client/assets/variant-calendar-CHEpmQsa.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BaM0Ryag.js → view-mode-toggle-CbCBQwMo.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/ai-providers-q7C15Bys.js +0 -1
- package/dist/client/assets/app-editor-Bz0hayv-.js +0 -1
- package/dist/client/assets/auth-entry-BwrOFYck.js +0 -1
- package/dist/client/assets/bulk-category-panel-BCWceJ3U.js +0 -1
- package/dist/client/assets/category-editor-h6Q3eBQp.js +0 -1
- package/dist/client/assets/chat-context-Q02iA1Qd.js +0 -36
- package/dist/client/assets/collection-detail-DH-FTvj_.js +0 -1
- package/dist/client/assets/commerce-onboarding-uTivlgyM.js +0 -1
- package/dist/client/assets/file-explorer-k4LIT8bA.js +0 -2
- package/dist/client/assets/index-DmMGycGe.js +0 -1
- package/dist/client/assets/login-BF2Ne-_P.js +0 -1
- package/dist/client/assets/post-editor-CdpGGMi2.js +0 -1
- package/dist/client/assets/project-app-view-D7SClw3A.js +0 -1
- package/dist/client/assets/record-editor-jqXVvOw2.js +0 -1
- package/dist/client/assets/redirect-editor-2RZq6KLP.js +0 -1
- package/dist/client/assets/registry-BKYB7Tvz.js +0 -2
- package/dist/client/assets/seo-editor-CfHy9C5F.js +0 -1
- package/dist/client/assets/store-registry-CJZci817.js +0 -2
- package/dist/client/assets/use-deco-credits-Dcf_jzcd.js +0 -1
- package/dist/client/assets/useInfiniteQuery-B1VFJBv9.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-19gePOvk.js +0 -1
- package/dist/client/assets/variant-calendar-mcbg0du1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as P,F as H,r as Z,j as i,B as te,L as ue,X as fe,Y as J,b as K,d as pe,o as he,_ as xe,Z as je,e as le,p as ie,t as F,K as oe,a6 as re,G as ae,w as Se}from"./index-BH_FlvCl.js";import{P as W}from"./index-CI9qWtAz.js";import{A as ze,b as ve}from"./alert-B-wH90gS.js";import{i as be}from"./XCircle-COKwof4k.js";import{n as Ae}from"./LinkExternal01-CtHit8P2.js";import{s as ye}from"./XClose-BeeXU30N.js";import{u as Ce}from"./use-org-auth-client-FL0jYYDe.js";import{u as _e}from"./use-debounced-autosave-BIMFLroB.js";import{A as Oe}from"./avatar-2jBZ0oLe.js";import{I as ce}from"./input-D_5wC1aD.js";import{S as se,a as ne,b as Q,c as we}from"./settings-section-C-scXgTT.js";import{d as me,S as Ne,a as De,b as Te,c as Fe}from"./select-DQeN1iTO.js";import{S as Ee}from"./skeleton-Dtl2kVUh.js";import{A as ge}from"./agent-icon-DsZ_qI1T.js";import{a as Pe,i as ke,f as Re}from"./use-mcp-client-epZZ6uX_.js";import{a as Ie}from"./use-virtual-mcp-BKlkVUBn.js";import{a as Le}from"./agent-capabilities-cXfbMfjV.js";import{e as Me,h as Ve}from"./use-organization-settings-Cs2jBFh8.js";import{D as $e}from"./domain-settings-BqoJGIGn.js";import{u as Be}from"./studio-tools-D75sojFk.js";import{c as Ge,d as Ue,b as qe,f as Ke,g as Qe,e as Ze,a as Ye,A as We}from"./alert-dialog-BQTZb6rd.js";import{R as He}from"./require-capability-DqCmC5MK.js";import"./sidebar-D3dJYFFY.js";import"./LayoutLeft-Dyg8dCMM.js";import"./use-mobile-CHEn9Vuf.js";import"./X-b1CduA8m.js";import"./tooltip-5f345nRx.js";import"./User01-D5zL4tme.js";import"./card-Bk2dJN_0.js";import"./ArrowUpRight-CbcmJ_TD.js";import"./Check-HAv3Qoh-.js";import"./ChevronDown-CHC7E66-.js";import"./ChevronUp-DbtLB7uL.js";import"./AlertCircle-9SzyWKyE.js";import"./Tool01-DkOLJQIO.js";import"./ArrowUp-DQRRFixg.js";import"./Settings02-BELTDGHE.js";import"./Tool02-B7PpgdMe.js";import"./TrendUp01-DcvNh57G.js";import"./ZapSquare-BdAqvdax.js";import"./Users03-Brr-YBon.js";import"./CheckCircle-B2TYFYU2.js";import"./ChevronRight-CcOjzlDN.js";import"./DotsVertical-Df0bVocX.js";import"./Stars02-Bj8ktNiu.js";import"./Copy01-Bp9Lffnr.js";import"./CpuChip01-CKGxncDz.js";import"./Eye-BNpFccLX.js";import"./FilterLines-Gvs8cXY9.js";import"./Star01-Bi9T9bJZ.js";import"./Palette-BFblTH0J.js";import"./SwitchHorizontal01-BPNHlIUv.js";import"./HardDrive-DplRZ7Xc.js";import"./Key01-DQiO6Zek.js";import"./LogOut01-BZTTP4bY.js";import"./Monitor01-CFzyQiRg.js";import"./Sun-DuEt3PP-.js";import"./Play-BorSZmIL.js";import"./Plus-BVxAhxMz.js";import"./SearchLg-CDsIaigY.js";import"./SearchMd-BSTxqnhr.js";import"./Shield01-CT4epMIY.js";import"./Stars01-OZSf9VLV.js";import"./Trash01-BrKPcSIO.js";import"./Upload01-INelJ_Lh.js";import"./Users01-Dv4yEyJr.js";import"./Zap-DTi7UEaq.js";import"./auth-CF8F6GlA.js";import"./badge-gG6vRyl9.js";import"./use-capability-CXHTHN2p.js";import"./access-gate-BMlGI3KF.js";import"./capability-load-error-Dqfkupks.js";function de(e){return`connect-banner-dismissed:${e}`}function Xe(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function Je(){const e=P.c(17),{org:t}=H();let s;e[0]!==t.id?(s=()=>Xe(t.id),e[0]=t.id,e[1]=s):s=e[1];const[g,u]=Z.useState(s);if(g)return null;let o;e[2]!==t.id?(o=()=>{u(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=o):o=e[3];const d=o;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ae,{}),e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=a):a=e[5];let c;e[6]!==t.slug?(c={org:t.slug},e[6]=t.slug,e[7]=c):c=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(be,{size:12}),e[8]=f):f=e[8];let n;e[9]!==c?(n=i.jsx(te,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ue,{to:"/$org/settings/connect",params:c,children:["Connect to clients ",f]})}),e[9]=c,e[10]=n):n=e[10];let r;e[11]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(ye,{size:14}),e[11]=r):r=e[11];let l;e[12]!==d?(l=i.jsx(te,{variant:"ghost",size:"icon",className:"size-7",onClick:d,"aria-label":"Dismiss",children:r}),e[12]=d,e[13]=l):l=e[13];let p;return e[14]!==n||e[15]!==l?(p=i.jsxs(ze,{variant:"info",className:"items-center",children:[m,i.jsxs(ve,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[a,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[n,l]})]})]}),e[14]=n,e[15]=l,e[16]=p):p=e[16],p}const et=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function tt(e){return typeof e=="string"&&et.has(e.trim().toLowerCase())}const it=fe({name:J().min(1,"Name is required").max(255,"Name is too long"),slug:J().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!tt(e),"This organization URL is reserved by Studio"),logo:J().optional()});function st(e){const t=P.c(17),{value:s,onChange:g,name:u,disabled:o}=e,d=K(),m=Z.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const c=a;let f;t[1]!==g||t[2]!==d?(f=O=>{const h=O.target.files?.[0];if(!h)return;if(h.size>2097152){F.error(d("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>F.error(d("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&g(x.result),m.current&&(m.current.value="")},x.readAsDataURL(h)},t[1]=g,t[2]=d,t[3]=f):f=t[3];const n=f;let r;t[4]!==d?(r=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=r):r=t[5];let l;t[6]!==o||t[7]!==n?(l=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),t[6]=o,t[7]=n,t[8]=l):l=t[8];const p=s||void 0,j=u??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Oe,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let v;return t[12]!==o||t[13]!==r||t[14]!==l||t[15]!==S?(v=i.jsxs("button",{type:"button",onClick:c,disabled:o,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":r,children:[l,S]}),t[12]=o,t[13]=r,t[14]=l,t[15]=S,t[16]=v):v=t[16],v}function nt(){const e=K(),t=pe(),{org:s}=H(),g=Ce(),u=he(),o=xe({resolver:je(it),values:{name:s.name??"",slug:s.slug??"",logo:s.logo??""}}),d=le({mutationFn:async n=>{const r={name:n.name,slug:n.slug};n.logo&&(r.logo=n.logo);const l=await g.organization.update({data:r});if(l?.error)throw new Error(l.error.message||e("settings.organizationForm.failedToUpdateOrg"));return l},onSuccess:(n,r)=>{ie("organization_settings_updated",{organization_id:s.id,fields:Object.keys(r)}),u.invalidateQueries({queryKey:oe.organizations()}),u.invalidateQueries({queryKey:oe.activeOrganization(s.slug)}),F.success(e("settings.organizationForm.updateSuccess")),n?.data?.slug&&n.data.slug!==s.slug&&t({to:"/$org/settings/general",params:{org:n.data.slug}})},onError:(n,r)=>{ie("organization_settings_update_failed",{organization_id:s.id,fields:Object.keys(r),error:n instanceof Error?n.message:String(n)}),F.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:m,flush:a}=_e({save:async()=>{const n=o.control._formState.dirtyFields;if(Object.keys(n).length===0||!await o.trigger())return;const l=o.getValues(),p=o.control._defaultValues;o.reset(l,{keepValues:!0});try{await d.mutateAsync(l)}catch{o.reset(p,{keepValues:!0})}}}),c=o.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(ne,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(st,{value:o.watch("logo"),onChange:n=>{o.setValue("logo",n??"",{shouldDirty:!0}),a()},name:o.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(re,{control:o.control,name:"name",render:({field:n})=>i.jsx(ce,{id:"org-name",...n,onChange:r=>{n.onChange(r),m()},onBlur:()=>{n.onBlur(),a()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx(re,{control:o.control,name:"slug",render:({field:n})=>i.jsx("input",{id:"org-slug",value:n.value??"",name:n.name,ref:n.ref,placeholder:e("settings.organizationForm.slugPlaceholder"),className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:r=>{const l=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",l,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{n.onBlur(),a()}})})]})}),(c.name||c.slug||c.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[c.name&&i.jsx("p",{className:"text-xs text-destructive",children:c.name.message}),c.slug&&i.jsx("p",{className:"text-xs text-destructive",children:c.slug.message}),c.logo&&i.jsx("p",{className:"text-xs text-destructive",children:c.logo.message})]})]})})}const ee="__super_agent__";function ot(){const e=P.c(42),t=K(),{org:s}=H(),g=Ie(),{mainAgentId:u}=Me(),o=Ve();let d,m,a,c,f,n,r,l;if(e[0]!==g||e[1]!==u||e[2]!==s.id||e[3]!==o||e[4]!==t){const S=Le(g),v=(g??[]).filter(lt).filter(z=>!S.has(z.id)).filter(at);let O;e[13]!==s.id?(O=Pe(s.id),e[13]=s.id,e[14]=O):O=e[14];const h=O,x=u!=null?(g??[]).find(z=>z.id===u):void 0,w=x?x.id:ee,N=x&&!v.some(z=>z.id===x.id)?[x,...v]:v;let _;e[15]!==g||e[16]!==o||e[17]!==h.title||e[18]!==t?(_=z=>{const C=z===ee?null:z,k=C===null?h.title:(g??[]).find(T=>T.id===C)?.title??"";o.mutate(C,{onSuccess:()=>F.success(C===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:k})),onError:()=>F.error(t("settings.mainAgent.errorToast"))})},e[15]=g,e[16]=o,e[17]=h.title,e[18]=t,e[19]=_):_=e[19];const D=_;m=Ne,f=w,n=D,r=o.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(De,{className:"w-full sm:w-[280px]",children:i.jsx(Te,{})}),e[20]=l):l=e[20],d=Fe;let b;e[21]!==h.icon||e[22]!==h.title?(b=i.jsx(ge,{icon:h.icon,name:h.title,size:"xs",className:"shrink-0"}),e[21]=h.icon,e[22]=h.title,e[23]=b):b=e[23];let A;e[24]!==t?(A=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=A):A=e[25];let y;e[26]!==A?(y=i.jsx("span",{className:"truncate",children:A}),e[26]=A,e[27]=y):y=e[27],e[28]!==y||e[29]!==b?(a=i.jsx(me,{value:ee,children:i.jsxs("span",{className:"flex items-center gap-2",children:[b,y]})}),e[28]=y,e[29]=b,e[30]=a):a=e[30],c=N.map(rt),e[0]=g,e[1]=u,e[2]=s.id,e[3]=o,e[4]=t,e[5]=d,e[6]=m,e[7]=a,e[8]=c,e[9]=f,e[10]=n,e[11]=r,e[12]=l}else d=e[5],m=e[6],a=e[7],c=e[8],f=e[9],n=e[10],r=e[11],l=e[12];let p;e[31]!==d||e[32]!==a||e[33]!==c?(p=i.jsxs(d,{children:[a,c]}),e[31]=d,e[32]=a,e[33]=c,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==f||e[37]!==n||e[38]!==r||e[39]!==l||e[40]!==p?(j=i.jsxs(m,{value:f,onValueChange:n,disabled:r,children:[l,p]}),e[35]=m,e[36]=f,e[37]=n,e[38]=r,e[39]=l,e[40]=p,e[41]=j):j=e[41],j}function rt(e){return i.jsx(me,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(ge,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function at(e){return!Re(e.id)}function lt(e){return!ke(e.id)}function ct(){const e=P.c(16),t=K();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let g;e[2]!==t?(g=t("settings.mainAgent.description"),e[2]=t,e[3]=g):g=e[3];let u;e[4]!==t?(u=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=u):u=e[5];let o;e[6]!==t?(o=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=o):o=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Z.Suspense,{fallback:i.jsx(Ee,{className:"h-9 w-[280px]"}),children:i.jsx(ot,{})}),e[8]=d):d=e[8];let m;e[9]!==u||e[10]!==o?(m=i.jsx(ne,{children:i.jsx(Q,{title:u,description:o,action:d})}),e[9]=u,e[10]=o,e[11]=m):m=e[11];let a;return e[12]!==s||e[13]!==g||e[14]!==m?(a=i.jsx(se,{title:s,description:g,children:m}),e[12]=s,e[13]=g,e[14]=m,e[15]=a):a=e[15],a}function mt(){const e=P.c(86),t=K(),{org:s}=H(),[g,u]=Z.useState(!1),[o,d]=Z.useState(""),m=Be();let a;e[0]!==s.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=a):a=e[2];let c;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(c=()=>{ie("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),Se(),F.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=c):c=e[6];let f;e[7]!==t?(f=E=>{F.error(E instanceof Error?E.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=f):f=e[8];let n;e[9]!==a||e[10]!==c||e[11]!==f?(n={mutationFn:a,onSuccess:c,onError:f},e[9]=a,e[10]=c,e[11]=f,e[12]=n):n=e[12];const r=le(n);let l;e[13]!==t?(l=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=l):l=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=()=>u(!0),e[21]=v):v=e[21];const O=r.isPending;let h;e[22]!==t?(h=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=h):h=e[23];let x;e[24]!==r.isPending||e[25]!==h?(x=i.jsx(te,{variant:"destructive",size:"sm",onClick:v,disabled:O,children:h}),e[24]=r.isPending,e[25]=h,e[26]=x):x=e[26];let w;e[27]!==x||e[28]!==j||e[29]!==S?(w=i.jsx(ne,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:x})}),e[27]=x,e[28]=j,e[29]=S,e[30]=w):w=e[30];let N;e[31]!==w||e[32]!==l||e[33]!==p?(N=i.jsx(se,{title:l,description:p,children:w}),e[31]=w,e[32]=l,e[33]=p,e[34]=N):N=e[34];let _;e[35]===Symbol.for("react.memo_cache_sentinel")?(_=E=>{u(E),E||d("")},e[35]=_):_=e[35];let D;e[36]!==t?(D=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=D):D=e[37];let b;e[38]!==D?(b=i.jsx(Ge,{children:D}),e[38]=D,e[39]=b):b=e[39];let A;e[40]!==s.name||e[41]!==t?(A=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=A):A=e[42];let y;e[43]!==A?(y=i.jsx("p",{children:A}),e[43]=A,e[44]=y):y=e[44];let z;e[45]!==s.name||e[46]!==t?(z=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=z):z=e[47];let C;e[48]!==z?(C=i.jsx("p",{className:"mt-3 mb-1.5",children:z}),e[48]=z,e[49]=C):C=e[49];let k;e[50]===Symbol.for("react.memo_cache_sentinel")?(k=E=>d(E.target.value),e[50]=k):k=e[50];let T;e[51]!==o||e[52]!==s.name?(T=i.jsx(ce,{value:o,onChange:k,placeholder:s.name,autoFocus:!0}),e[51]=o,e[52]=s.name,e[53]=T):T=e[53];let R;e[54]!==y||e[55]!==C||e[56]!==T?(R=i.jsx(Ue,{asChild:!0,children:i.jsxs("div",{children:[y,C,T]})}),e[54]=y,e[55]=C,e[56]=T,e[57]=R):R=e[57];let I;e[58]!==b||e[59]!==R?(I=i.jsxs(qe,{children:[b,R]}),e[58]=b,e[59]=R,e[60]=I):I=e[60];let L;e[61]!==t?(L=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=L):L=e[62];let M;e[63]!==L?(M=i.jsx(Ke,{children:L}),e[63]=L,e[64]=M):M=e[64];let V;e[65]!==r?(V=()=>r.mutate(),e[65]=r,e[66]=V):V=e[66];const X=o!==s.name||r.isPending;let $;e[67]!==r.isPending||e[68]!==t?($=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=r.isPending,e[68]=t,e[69]=$):$=e[69];let B;e[70]!==V||e[71]!==X||e[72]!==$?(B=i.jsx(Qe,{onClick:V,disabled:X,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:$}),e[70]=V,e[71]=X,e[72]=$,e[73]=B):B=e[73];let G;e[74]!==M||e[75]!==B?(G=i.jsxs(Ze,{children:[M,B]}),e[74]=M,e[75]=B,e[76]=G):G=e[76];let U;e[77]!==I||e[78]!==G?(U=i.jsxs(Ye,{children:[I,G]}),e[77]=I,e[78]=G,e[79]=U):U=e[79];let q;e[80]!==g||e[81]!==U?(q=i.jsx(We,{open:g,onOpenChange:_,children:U}),e[80]=g,e[81]=U,e[82]=q):q=e[82];let Y;return e[83]!==N||e[84]!==q?(Y=i.jsxs(i.Fragment,{children:[N,q]}),e[83]=N,e[84]=q,e[85]=Y):Y=e[85],Y}function gt(){const e=P.c(11),t=K();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let g;e[2]!==s?(g=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=g):g=e[3];let u,o,d,m,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Je,{}),o=i.jsx(nt,{}),d=i.jsx(ct,{}),m=i.jsx($e,{}),a=i.jsx(mt,{}),e[4]=u,e[5]=o,e[6]=d,e[7]=m,e[8]=a):(u=e[4],o=e[5],d=e[6],m=e[7],a=e[8]);let c;return e[9]!==g?(c=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(we,{children:[g,u,o,d,m,a]})})})}),e[9]=g,e[10]=c):c=e[10],c}function Di(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(He,{capability:"org:manage",area:"general settings",children:i.jsx(gt,{})}),e[0]=t):t=e[0],t}export{Di as default};
|
|
1
|
+
import{c as P,F as H,r as Z,j as i,B as te,L as ue,X as fe,Y as J,b as K,d as pe,o as he,_ as xe,Z as je,e as le,p as ie,t as F,K as oe,a6 as re,G as ae,w as Se}from"./index-Cqp0j5ti.js";import{P as W}from"./index-CvNrBBI4.js";import{A as ze,b as ve}from"./alert-D3ALohgv.js";import{i as be}from"./XCircle-Q2-xnhMv.js";import{n as Ae}from"./LinkExternal01-BGFlrQXG.js";import{s as ye}from"./XClose-BAVsEAz0.js";import{u as Ce}from"./use-org-auth-client-CZTzoTui.js";import{u as _e}from"./use-debounced-autosave-Dw1dSaXC.js";import{A as Oe}from"./avatar-CjpdLlJL.js";import{I as ce}from"./input-D6nQa3aJ.js";import{S as se,a as ne,b as Q,c as we}from"./settings-section-B2Dp5AvY.js";import{d as me,S as Ne,a as De,b as Te,c as Fe}from"./select-B-1QLAzY.js";import{S as Ee}from"./skeleton-CSIlOmty.js";import{A as ge}from"./agent-icon-BtnFRNoX.js";import{a as Pe,i as ke,f as Re}from"./use-mcp-client-aTD0dPcl.js";import{a as Ie}from"./use-virtual-mcp-D568WlVW.js";import{a as Le}from"./agent-capabilities-cXfbMfjV.js";import{e as Me,h as Ve}from"./use-organization-settings-B38wM1cJ.js";import{D as $e}from"./domain-settings-Bd6S514P.js";import{u as Be}from"./studio-tools-D1kZSFKJ.js";import{c as Ge,d as Ue,b as qe,f as Ke,g as Qe,e as Ze,a as Ye,A as We}from"./alert-dialog-DpBDum8p.js";import{R as He}from"./require-capability-DxiwYNcF.js";import"./sidebar-C48FbYSi.js";import"./LayoutLeft-C8ZYpS6u.js";import"./use-mobile-CwF0Qb5H.js";import"./X-D7jgb4FX.js";import"./tooltip-CLQrC55g.js";import"./User01-q5cxRF_s.js";import"./card-DpFGkJgB.js";import"./ArrowUpRight-CEm-1PRY.js";import"./Check-C2IOndRU.js";import"./ChevronDown-BdEeojTz.js";import"./ChevronUp-COjK6jYy.js";import"./AlertCircle-VrOh3j4B.js";import"./Tool01-C7GA4KcH.js";import"./ArrowUp-BVZLXzUV.js";import"./Settings02-7hoFOzi1.js";import"./Tool02-BogqBe3k.js";import"./TrendUp01-pCv4OITY.js";import"./ZapSquare-DyBHtYQG.js";import"./Users03-CLhPbTfm.js";import"./CheckCircle-BTBBUz6b.js";import"./ChevronRight-D1ezJqQ4.js";import"./DotsVertical-DhLV-A4H.js";import"./Stars02-DfyxfEcS.js";import"./Copy01-DSaJHchw.js";import"./CpuChip01-YK0olih9.js";import"./Eye-DKZ3-ZmG.js";import"./FilterLines-Ct0b5Izh.js";import"./Star01-DRwTTzYO.js";import"./Palette-Davckwrw.js";import"./SwitchHorizontal01-D_y3gDV6.js";import"./HardDrive-DXCUEBbQ.js";import"./Key01-C6x0Tr_g.js";import"./LogOut01-BICvVeQl.js";import"./Monitor01-BNCfbzzq.js";import"./Sun-BVUdhCkU.js";import"./Play-BDEXf8DE.js";import"./Plus-Cc4UAY6m.js";import"./SearchLg-i1xrYkDO.js";import"./SearchMd-em4uHmz6.js";import"./Shield01-BlbSjQrn.js";import"./Stars01-DVGAaR5C.js";import"./Trash01-C5Fu6DJL.js";import"./Upload01-BYwhzcDR.js";import"./Users01-D37NvFWU.js";import"./Zap-fNNxx-9c.js";import"./auth-C_hAx-kf.js";import"./badge-CKejypa0.js";import"./use-capability-BvgzrNVb.js";import"./access-gate-8VbifWBn.js";import"./capability-load-error-D5eDC4Hb.js";function de(e){return`connect-banner-dismissed:${e}`}function Xe(e){if(typeof window>"u")return!0;try{return localStorage.getItem(de(e))==="1"}catch{return!1}}function Je(){const e=P.c(17),{org:t}=H();let s;e[0]!==t.id?(s=()=>Xe(t.id),e[0]=t.id,e[1]=s):s=e[1];const[g,u]=Z.useState(s);if(g)return null;let o;e[2]!==t.id?(o=()=>{u(!0);try{localStorage.setItem(de(t.id),"1")}catch{}},e[2]=t.id,e[3]=o):o=e[3];const d=o;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ae,{}),e[4]=m):m=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=a):a=e[5];let c;e[6]!==t.slug?(c={org:t.slug},e[6]=t.slug,e[7]=c):c=e[7];let f;e[8]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(be,{size:12}),e[8]=f):f=e[8];let n;e[9]!==c?(n=i.jsx(te,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(ue,{to:"/$org/settings/connect",params:c,children:["Connect to clients ",f]})}),e[9]=c,e[10]=n):n=e[10];let r;e[11]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(ye,{size:14}),e[11]=r):r=e[11];let l;e[12]!==d?(l=i.jsx(te,{variant:"ghost",size:"icon",className:"size-7",onClick:d,"aria-label":"Dismiss",children:r}),e[12]=d,e[13]=l):l=e[13];let p;return e[14]!==n||e[15]!==l?(p=i.jsxs(ze,{variant:"info",className:"items-center",children:[m,i.jsxs(ve,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[a,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[n,l]})]})]}),e[14]=n,e[15]=l,e[16]=p):p=e[16],p}const et=new Set([".well-known","_admin","api","auth","cli","commerce-onboarding","dbos-queue-depth","health","hosted-run-pending","login","mcp","metrics","oauth","oauth-proxy","onboarding","org","report","reset-password"]);function tt(e){return typeof e=="string"&&et.has(e.trim().toLowerCase())}const it=fe({name:J().min(1,"Name is required").max(255,"Name is too long"),slug:J().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens").refine(e=>!tt(e),"This organization URL is reserved by Studio"),logo:J().optional()});function st(e){const t=P.c(17),{value:s,onChange:g,name:u,disabled:o}=e,d=K(),m=Z.useRef(null);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=()=>m.current?.click(),t[0]=a):a=t[0];const c=a;let f;t[1]!==g||t[2]!==d?(f=O=>{const h=O.target.files?.[0];if(!h)return;if(h.size>2097152){F.error(d("settings.organizationForm.imageTooLarge"));return}const x=new FileReader;x.onerror=()=>F.error(d("settings.organizationForm.failedToReadImage")),x.onloadend=()=>{x.result&&g(x.result),m.current&&(m.current.value="")},x.readAsDataURL(h)},t[1]=g,t[2]=d,t[3]=f):f=t[3];const n=f;let r;t[4]!==d?(r=d("settings.organizationForm.uploadLogoLabel"),t[4]=d,t[5]=r):r=t[5];let l;t[6]!==o||t[7]!==n?(l=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:n,className:"hidden",disabled:o}),t[6]=o,t[7]=n,t[8]=l):l=t[8];const p=s||void 0,j=u??"?";let S;t[9]!==p||t[10]!==j?(S=i.jsx(Oe,{url:p,fallback:j,shape:"square",size:"base"}),t[9]=p,t[10]=j,t[11]=S):S=t[11];let v;return t[12]!==o||t[13]!==r||t[14]!==l||t[15]!==S?(v=i.jsxs("button",{type:"button",onClick:c,disabled:o,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":r,children:[l,S]}),t[12]=o,t[13]=r,t[14]=l,t[15]=S,t[16]=v):v=t[16],v}function nt(){const e=K(),t=pe(),{org:s}=H(),g=Ce(),u=he(),o=xe({resolver:je(it),values:{name:s.name??"",slug:s.slug??"",logo:s.logo??""}}),d=le({mutationFn:async n=>{const r={name:n.name,slug:n.slug};n.logo&&(r.logo=n.logo);const l=await g.organization.update({data:r});if(l?.error)throw new Error(l.error.message||e("settings.organizationForm.failedToUpdateOrg"));return l},onSuccess:(n,r)=>{ie("organization_settings_updated",{organization_id:s.id,fields:Object.keys(r)}),u.invalidateQueries({queryKey:oe.organizations()}),u.invalidateQueries({queryKey:oe.activeOrganization(s.slug)}),F.success(e("settings.organizationForm.updateSuccess")),n?.data?.slug&&n.data.slug!==s.slug&&t({to:"/$org/settings/general",params:{org:n.data.slug}})},onError:(n,r)=>{ie("organization_settings_update_failed",{organization_id:s.id,fields:Object.keys(r),error:n instanceof Error?n.message:String(n)}),F.error(n instanceof Error?n.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:m,flush:a}=_e({save:async()=>{const n=o.control._formState.dirtyFields;if(Object.keys(n).length===0||!await o.trigger())return;const l=o.getValues(),p=o.control._defaultValues;o.reset(l,{keepValues:!0});try{await d.mutateAsync(l)}catch{o.reset(p,{keepValues:!0})}}}),c=o.formState.errors,f=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(se,{children:i.jsxs(ne,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(st,{value:o.watch("logo"),onChange:n=>{o.setValue("logo",n??"",{shouldDirty:!0}),a()},name:o.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(re,{control:o.control,name:"name",render:({field:n})=>i.jsx(ce,{id:"org-name",...n,onChange:r=>{n.onChange(r),m()},onBlur:()=>{n.onBlur(),a()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[f&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:f}),i.jsx(re,{control:o.control,name:"slug",render:({field:n})=>i.jsx("input",{id:"org-slug",value:n.value??"",name:n.name,ref:n.ref,placeholder:e("settings.organizationForm.slugPlaceholder"),className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:r=>{const l=r.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");o.setValue("slug",l,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),m()},onBlur:()=>{n.onBlur(),a()}})})]})}),(c.name||c.slug||c.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[c.name&&i.jsx("p",{className:"text-xs text-destructive",children:c.name.message}),c.slug&&i.jsx("p",{className:"text-xs text-destructive",children:c.slug.message}),c.logo&&i.jsx("p",{className:"text-xs text-destructive",children:c.logo.message})]})]})})}const ee="__super_agent__";function ot(){const e=P.c(42),t=K(),{org:s}=H(),g=Ie(),{mainAgentId:u}=Me(),o=Ve();let d,m,a,c,f,n,r,l;if(e[0]!==g||e[1]!==u||e[2]!==s.id||e[3]!==o||e[4]!==t){const S=Le(g),v=(g??[]).filter(lt).filter(z=>!S.has(z.id)).filter(at);let O;e[13]!==s.id?(O=Pe(s.id),e[13]=s.id,e[14]=O):O=e[14];const h=O,x=u!=null?(g??[]).find(z=>z.id===u):void 0,w=x?x.id:ee,N=x&&!v.some(z=>z.id===x.id)?[x,...v]:v;let _;e[15]!==g||e[16]!==o||e[17]!==h.title||e[18]!==t?(_=z=>{const C=z===ee?null:z,k=C===null?h.title:(g??[]).find(T=>T.id===C)?.title??"";o.mutate(C,{onSuccess:()=>F.success(C===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:k})),onError:()=>F.error(t("settings.mainAgent.errorToast"))})},e[15]=g,e[16]=o,e[17]=h.title,e[18]=t,e[19]=_):_=e[19];const D=_;m=Ne,f=w,n=D,r=o.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(De,{className:"w-full sm:w-[280px]",children:i.jsx(Te,{})}),e[20]=l):l=e[20],d=Fe;let b;e[21]!==h.icon||e[22]!==h.title?(b=i.jsx(ge,{icon:h.icon,name:h.title,size:"xs",className:"shrink-0"}),e[21]=h.icon,e[22]=h.title,e[23]=b):b=e[23];let A;e[24]!==t?(A=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=A):A=e[25];let y;e[26]!==A?(y=i.jsx("span",{className:"truncate",children:A}),e[26]=A,e[27]=y):y=e[27],e[28]!==y||e[29]!==b?(a=i.jsx(me,{value:ee,children:i.jsxs("span",{className:"flex items-center gap-2",children:[b,y]})}),e[28]=y,e[29]=b,e[30]=a):a=e[30],c=N.map(rt),e[0]=g,e[1]=u,e[2]=s.id,e[3]=o,e[4]=t,e[5]=d,e[6]=m,e[7]=a,e[8]=c,e[9]=f,e[10]=n,e[11]=r,e[12]=l}else d=e[5],m=e[6],a=e[7],c=e[8],f=e[9],n=e[10],r=e[11],l=e[12];let p;e[31]!==d||e[32]!==a||e[33]!==c?(p=i.jsxs(d,{children:[a,c]}),e[31]=d,e[32]=a,e[33]=c,e[34]=p):p=e[34];let j;return e[35]!==m||e[36]!==f||e[37]!==n||e[38]!==r||e[39]!==l||e[40]!==p?(j=i.jsxs(m,{value:f,onValueChange:n,disabled:r,children:[l,p]}),e[35]=m,e[36]=f,e[37]=n,e[38]=r,e[39]=l,e[40]=p,e[41]=j):j=e[41],j}function rt(e){return i.jsx(me,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(ge,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function at(e){return!Re(e.id)}function lt(e){return!ke(e.id)}function ct(){const e=P.c(16),t=K();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let g;e[2]!==t?(g=t("settings.mainAgent.description"),e[2]=t,e[3]=g):g=e[3];let u;e[4]!==t?(u=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=u):u=e[5];let o;e[6]!==t?(o=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=o):o=e[7];let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(Z.Suspense,{fallback:i.jsx(Ee,{className:"h-9 w-[280px]"}),children:i.jsx(ot,{})}),e[8]=d):d=e[8];let m;e[9]!==u||e[10]!==o?(m=i.jsx(ne,{children:i.jsx(Q,{title:u,description:o,action:d})}),e[9]=u,e[10]=o,e[11]=m):m=e[11];let a;return e[12]!==s||e[13]!==g||e[14]!==m?(a=i.jsx(se,{title:s,description:g,children:m}),e[12]=s,e[13]=g,e[14]=m,e[15]=a):a=e[15],a}function mt(){const e=P.c(86),t=K(),{org:s}=H(),[g,u]=Z.useState(!1),[o,d]=Z.useState(""),m=Be();let a;e[0]!==s.id||e[1]!==m?(a=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=a):a=e[2];let c;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(c=()=>{ie("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),Se(),F.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=c):c=e[6];let f;e[7]!==t?(f=E=>{F.error(E instanceof Error?E.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=f):f=e[8];let n;e[9]!==a||e[10]!==c||e[11]!==f?(n={mutationFn:a,onSuccess:c,onError:f},e[9]=a,e[10]=c,e[11]=f,e[12]=n):n=e[12];const r=le(n);let l;e[13]!==t?(l=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=l):l=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let j;e[17]!==t?(j=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=j):j=e[18];let S;e[19]!==t?(S=t("settings.deleteOrganizationSection.deleteOrganizationDescription"),e[19]=t,e[20]=S):S=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=()=>u(!0),e[21]=v):v=e[21];const O=r.isPending;let h;e[22]!==t?(h=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=h):h=e[23];let x;e[24]!==r.isPending||e[25]!==h?(x=i.jsx(te,{variant:"destructive",size:"sm",onClick:v,disabled:O,children:h}),e[24]=r.isPending,e[25]=h,e[26]=x):x=e[26];let w;e[27]!==x||e[28]!==j||e[29]!==S?(w=i.jsx(ne,{className:"border-destructive/40",children:i.jsx(Q,{title:j,description:S,action:x})}),e[27]=x,e[28]=j,e[29]=S,e[30]=w):w=e[30];let N;e[31]!==w||e[32]!==l||e[33]!==p?(N=i.jsx(se,{title:l,description:p,children:w}),e[31]=w,e[32]=l,e[33]=p,e[34]=N):N=e[34];let _;e[35]===Symbol.for("react.memo_cache_sentinel")?(_=E=>{u(E),E||d("")},e[35]=_):_=e[35];let D;e[36]!==t?(D=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=D):D=e[37];let b;e[38]!==D?(b=i.jsx(Ge,{children:D}),e[38]=D,e[39]=b):b=e[39];let A;e[40]!==s.name||e[41]!==t?(A=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=A):A=e[42];let y;e[43]!==A?(y=i.jsx("p",{children:A}),e[43]=A,e[44]=y):y=e[44];let z;e[45]!==s.name||e[46]!==t?(z=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=z):z=e[47];let C;e[48]!==z?(C=i.jsx("p",{className:"mt-3 mb-1.5",children:z}),e[48]=z,e[49]=C):C=e[49];let k;e[50]===Symbol.for("react.memo_cache_sentinel")?(k=E=>d(E.target.value),e[50]=k):k=e[50];let T;e[51]!==o||e[52]!==s.name?(T=i.jsx(ce,{value:o,onChange:k,placeholder:s.name,autoFocus:!0}),e[51]=o,e[52]=s.name,e[53]=T):T=e[53];let R;e[54]!==y||e[55]!==C||e[56]!==T?(R=i.jsx(Ue,{asChild:!0,children:i.jsxs("div",{children:[y,C,T]})}),e[54]=y,e[55]=C,e[56]=T,e[57]=R):R=e[57];let I;e[58]!==b||e[59]!==R?(I=i.jsxs(qe,{children:[b,R]}),e[58]=b,e[59]=R,e[60]=I):I=e[60];let L;e[61]!==t?(L=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=L):L=e[62];let M;e[63]!==L?(M=i.jsx(Ke,{children:L}),e[63]=L,e[64]=M):M=e[64];let V;e[65]!==r?(V=()=>r.mutate(),e[65]=r,e[66]=V):V=e[66];const X=o!==s.name||r.isPending;let $;e[67]!==r.isPending||e[68]!==t?($=r.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=r.isPending,e[68]=t,e[69]=$):$=e[69];let B;e[70]!==V||e[71]!==X||e[72]!==$?(B=i.jsx(Qe,{onClick:V,disabled:X,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:$}),e[70]=V,e[71]=X,e[72]=$,e[73]=B):B=e[73];let G;e[74]!==M||e[75]!==B?(G=i.jsxs(Ze,{children:[M,B]}),e[74]=M,e[75]=B,e[76]=G):G=e[76];let U;e[77]!==I||e[78]!==G?(U=i.jsxs(Ye,{children:[I,G]}),e[77]=I,e[78]=G,e[79]=U):U=e[79];let q;e[80]!==g||e[81]!==U?(q=i.jsx(We,{open:g,onOpenChange:_,children:U}),e[80]=g,e[81]=U,e[82]=q):q=e[82];let Y;return e[83]!==N||e[84]!==q?(Y=i.jsxs(i.Fragment,{children:[N,q]}),e[83]=N,e[84]=q,e[85]=Y):Y=e[85],Y}function gt(){const e=P.c(11),t=K();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let g;e[2]!==s?(g=i.jsx(W.Title,{children:s}),e[2]=s,e[3]=g):g=e[3];let u,o,d,m,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Je,{}),o=i.jsx(nt,{}),d=i.jsx(ct,{}),m=i.jsx($e,{}),a=i.jsx(mt,{}),e[4]=u,e[5]=o,e[6]=d,e[7]=m,e[8]=a):(u=e[4],o=e[5],d=e[6],m=e[7],a=e[8]);let c;return e[9]!==g?(c=i.jsx(W,{children:i.jsx(W.Content,{children:i.jsx(W.Body,{children:i.jsxs(we,{children:[g,u,o,d,m,a]})})})}),e[9]=g,e[10]=c):c=e[10],c}function Di(){const e=P.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(He,{capability:"org:manage",area:"general settings",children:i.jsx(gt,{})}),e[0]=t):t=e[0],t}export{Di as default};
|
package/dist/client/assets/{github-repo-picker-C4SqFi1U.js → github-repo-picker-D5ZYIMD_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as q,j as t,F as me,a as ye,o as fe,r as D,$ as le,b as te,k as ee,e as ge,t as re,dS as Ne,K as se,G as ve,n as ke,m as ue,B as ce,x as Ce,y as Re}from"./index-BH_FlvCl.js";import{a as we,b as Se,d as Pe,e as Ie}from"./dialog-k8IF67S5.js";import{C as _e}from"./collection-search-CrIM_huO.js";import{u as Te}from"./use-debounced-value-BVPzmiZc.js";import{b as he,u as Ee}from"./use-connection-aekGGpVs.js";import{W as Ae,u as ne,S as pe}from"./use-mcp-client-epZZ6uX_.js";import{a as be}from"./authenticate-and-persist-oauth-BVEgp1eO.js";import{b as de}from"./Settings02-BELTDGHE.js";import{n as ze}from"./LinkExternal01-CtHit8P2.js";import{U as Le}from"./agent-icon-DsZ_qI1T.js";import{u as Ge}from"./use-mcp-tools-CA8XLLvW.js";import{e as Oe}from"./extract-connection-data-C5kAgWu4.js";import{c as Fe}from"./use-navigate-to-agent-ndEZccL5.js";import{g as Ue,p as xe,f as $e}from"./provision-repo-scoped-github-connection-DWINBxtd.js";function M(k){const e=q.c(4),{size:n,className:l}=k;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:h}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function De(k,e){const n=q.c(12),{org:l}=me();let h;n[0]!==l.id?(h=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=h):h=n[1];const o=h;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==k?(s={name:k},n[6]=k,n[7]=s):s=n[7];const u=e?.enabled??!0;let y;return n[8]!==r||n[9]!==s||n[10]!==u?(y={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:He},n[8]=r,n[9]=s,n[10]=u,n[11]=y):y=n[11],Ge(y)}function He(k){return k.structuredContent?.item??null}const Me="deco/mcp-github";function qe(k){const{org:e}=me(),{data:n}=ye.useSession(),l=he(),h=fe(),[o,a]=D.useState("idle"),[r,s]=D.useState(null),[u,y]=D.useState(null),{data:N,isLoading:w}=De(Me,{enabled:k.enabled}),f=D.useRef(!1);k.enabled&&N&&!w&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!N||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(N,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(h,e.id),y(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),y(null),f.current=!1}return k.enabled&&w&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(k){const e=q.c(27),{open:n,onOpenChange:l,title:h,onImportComplete:o,mode:a}=k,r=a===void 0?"agent":a,s=te();let u;e[0]!==r||e[1]!==s||e[2]!==h?(u=h??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=h,e[3]=u):u=e[3];const y=u,[N,w]=D.useState(null);let f;e[4]!==y?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Se,{children:y})}),e[4]=y,e[5]=f):f=e[5];let d;e[6]!==y||e[7]!==N||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:N?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(de,{size:16})}),t.jsx("img",{src:N.avatarUrl,alt:N.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(M,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:y})]})}),e[6]=y,e[7]=N,e[8]=s,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(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let p;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==N||e[17]!==c?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(D.Suspense,{fallback:m,children:t.jsx(Qe,{open:n,onComplete:c,selectedInstallation:N,onSelectInstallation:w,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=N,e[17]=c,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Pe,{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]!==l||e[24]!==n||e[25]!==g?(j=t.jsx(Ie,{open:n,onOpenChange:l,children:g}),e[23]=l,e[24]=n,e[25]=g,e[26]=j):j=e[26],j}function Qe({open:k,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:h,mode:o="agent"}){const a=te(),{org:r}=me(),s=fe(),u=Fe(),[y,N]=D.useState(null),w=Ee({slug:"mcp-github"}),f=Ue(w),d=qe({enabled:k&&f.length===0}),m=f.length===1?f[0]??null:y,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),p=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,v)=>{try{const S=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:v}});if(S.isError)return null;const P=S.content?.find(I=>I.type==="resource")?.resource?.text;if(!P)return null;try{const I=JSON.parse(P);return typeof I=="string"?I:JSON.stringify(I)}catch{return P}}catch{return null}},j=(i,v)=>{Promise.all([g(v,"AGENTS.md"),g(v,"CLAUDE.md")]).then(async([C,S])=>{const R=C??S??null;R&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:R}}}}),le(s,r.id))}).catch(C=>{console.error("GitHub instructions fetch failed:",C)})},x=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(o==="connection"){const{childConnectionId:R}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:P=>c.callTool(P),selfCallTool:P=>p.callTool(P),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:C}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>p.callTool(R)});let S=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:v,connectionId:C},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:C}]}}}),P=R.structuredContent??R,I=P.item?.id;if(!P.item||!I)throw new Error("Failed to create the imported agent");return S=I,{virtualMcpId:I,repo:i,connectionId:C,item:P.item}}catch(R){throw S&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:S}}).catch(()=>{}),await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:C,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:v,connectionId:C,item:S})=>{if(o==="connection"||!i||!S){le(s,r.id),Ne(s,r.id),re.success(a("common.githubRepoPicker.addedRepo",{name:v.name})),e();return}if(s.setQueryData(se.collectionItem(p,r.id,"","VIRTUAL_MCP",i),{item:S}),le(s,r.id),j(i,v),h){h({virtualMcpId:i,repo:v,connectionId:C});return}re.success(a("common.githubRepoPicker.importedRepo",{name:v.name})),e(),localStorage.setItem(ve.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:i=>{re.error(a("common.githubRepoPicker.failedImport",{error:i instanceof Error?i.message:a("common.githubRepoPicker.unknownError")}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ae,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ae,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ae,{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:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>N(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.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(M,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>N(null)}):null}function Be(k){const e=q.c(126),{connectionId:n,orgId:l,orgSlug:h,onSelect:o,showBackButton:a,onBack:r}=k,s=te();let u;e[0]!==l||e[1]!==h?(u={connectionId:pe,orgId:l,orgSlug:h},e[0]=l,e[1]=h,e[2]=u):u=e[2];const y=ne(u),N=fe(),w=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==y?(d=()=>$e(b=>y.callTool(b),n),e[6]=n,e[7]=y,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 c=ke(m);let p;e[12]!==w||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==h||e[17]!==N?(p=async()=>{const b=await be({connectionId:n,orgId:l,orgSlug:h,persistFallback:A=>w.update.mutateAsync({id:n,data:{connection_token:A}}).then(Ve)});if(b.ran&&!b.ok)throw new Error(b.error??"no token received");const _=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await N.invalidateQueries({queryKey:se.isMCPAuthenticated(_.href,null)}),await N.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=w,e[13]=n,e[14]=c,e[15]=l,e[16]=h,e[17]=N,e[18]=p):p=e[18];let g;e[19]!==s?(g=b=>{re.error(s("common.githubRepoPicker.failedReconnect",{error:b instanceof Error?b.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,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(c.isLoading){let b;return e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=b):b=e[24],b}if(c.isError){let b;e[25]!==s?(b=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=b):b=e[26];let _;e[27]!==b?(_=t.jsx("p",{className:"text-sm text-destructive",children:b}),e[27]=b,e[28]=_):_=e[28];let A;e[29]!==s?(A=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=A):A=e[30];let z;e[31]!==A?(z=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:A}),e[31]=A,e[32]=z):z=e[32];let L;e[33]!==x?(L=()=>x.mutate(),e[33]=x,e[34]=L):L=e[34];const H=x.isPending;let G;e[35]!==x.isPending?(G=x.isPending?t.jsx(ee,{size:14,className:"animate-spin"}):t.jsx(M,{className:"size-3.5"}),e[35]=x.isPending,e[36]=G):G=e[36];let O;e[37]!==s?(O=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=O):O=e[38];let F;e[39]!==x.isPending||e[40]!==L||e[41]!==G||e[42]!==O?(F=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:L,disabled:H,children:[G,O]}),e[39]=x.isPending,e[40]=L,e[41]=G,e[42]=O,e[43]=F):F=e[43];let $;return e[44]!==z||e[45]!==F||e[46]!==_?($=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[_,z,F]}),e[44]=z,e[45]=F,e[46]=_,e[47]=$):$=e[47],$}const i=c.data;if(!i)return null;const v=i.appSlug?`https://github.com/apps/${i.appSlug}/installations/new`:"https://github.com/settings/installations";if(i.installations.length===0){let b;e[48]!==r||e[49]!==a||e[50]!==s?(b=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=b):b=e[51];let _;e[52]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-8 text-foreground"})}),e[52]=_):_=e[52];let A;e[53]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=A):A=e[53];let z;e[54]!==s?(z=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=z):z=e[55];let L;e[56]!==z?(L=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[A,z]}),e[56]=z,e[57]=L):L=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let G;e[60]!==H?(G=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=G):G=e[61];let O;e[62]!==s?(O=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=O):O=e[63];let F;e[64]!==O?(F=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:O}),e[64]=O,e[65]=F):F=e[65];let $;e[66]!==s?($=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=$):$=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 Q;e[69]!==v||e[70]!==$?(Q=t.jsx(ce,{asChild:!0,size:"sm",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",children:[$,ie]})}),e[69]=v,e[70]=$,e[71]=Q):Q=e[71];let B;e[72]!==c?(B=()=>{c.refetch()},e[72]=c,e[73]=B):B=e[73];const je=c.isFetching;let V;e[74]!==c.isFetching?(V=c.isFetching&&t.jsx(ee,{size:14,className:"animate-spin"}),e[74]=c.isFetching,e[75]=V):V=e[75];let K;e[76]!==s?(K=s("common.githubRepoPicker.checkAgain"),e[76]=s,e[77]=K):K=e[77];let J;e[78]!==c.isFetching||e[79]!==B||e[80]!==V||e[81]!==K?(J=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:B,disabled:je,children:[V,K]}),e[78]=c.isFetching,e[79]=B,e[80]=V,e[81]=K,e[82]=J):J=e[82];let W;e[83]!==Q||e[84]!==J?(W=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[Q,J]}),e[83]=Q,e[84]=J,e[85]=W):W=e[85];let Y;e[86]!==s?(Y=s("common.githubRepoPicker.repositoryAccessNote"),e[86]=s,e[87]=Y):Y=e[87];let X;e[88]!==Y?(X=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:Y}),e[88]=Y,e[89]=X):X=e[89];let Z;e[90]!==L||e[91]!==G||e[92]!==F||e[93]!==W||e[94]!==X?(Z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[_,L,G,F,W,X]}),e[90]=L,e[91]=G,e[92]=F,e[93]=W,e[94]=X,e[95]=Z):Z=e[95];let oe;return e[96]!==Z||e[97]!==b?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,Z]}),e[96]=Z,e[97]=b,e[98]=oe):oe=e[98],oe}let C;e[99]!==r||e[100]!==a||e[101]!==s?(C=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[99]=r,e[100]=a,e[101]=s,e[102]=C):C=e[102];let S;if(e[103]!==i.installations||e[104]!==o||e[105]!==s){let b;e[107]!==o||e[108]!==s?(b=_=>t.jsxs("button",{type:"button",onClick:()=>o(_),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:_.avatarUrl,alt:_.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:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},_.installationId),e[107]=o,e[108]=s,e[109]=b):b=e[109],S=i.installations.map(b),e[103]=i.installations,e[104]=o,e[105]=s,e[106]=S}else S=e[106];let R;e[110]!==S?(R=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:S}),e[110]=S,e[111]=R):R=e[111];let P;e[112]!==s?(P=s("common.githubRepoPicker.accountNotListed"),e[112]=s,e[113]=P):P=e[113];let I;e[114]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[114]=s,e[115]=I):I=e[115];let T;e[116]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[116]=I,e[117]=T):T=e[117];let E;e[118]!==v||e[119]!==P||e[120]!==T?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[P," ",T]})}),e[118]=v,e[119]=P,e[120]=T,e[121]=E):E=e[121];let U;return e[122]!==R||e[123]!==E||e[124]!==C?(U=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[C,R,E]}),e[122]=R,e[123]=E,e[124]=C,e[125]=U):U=e[125],U}function Ve(){}function Ke(k){const e=q.c(23),{connectionId:n,orgId:l,orgSlug:h,installation:o,onSelectRepo:a,isSaving:r}=k,s=te(),[u,y]=D.useState(""),N=Te(u,300),w=D.useDeferredValue(N),f=u!==w;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:y,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let p;e[6]!==c?(p=ue("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,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(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==n||e[10]!==w||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==h?(j=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:h,installation:o,query:w,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=w,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=h,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 i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(k){const e=q.c(36),{connectionId:n,orgId:l,orgSlug:h,installation:o,query:a,onSelectRepo:r,isSaving:s}=k,u=te();let y;e[0]!==n||e[1]!==l||e[2]!==h?(y={connectionId:n,orgId:l,orgSlug:h},e[0]=n,e[1]=l,e[2]=h,e[3]=y):y=e[3];const N=ne(y),w=o.type==="User"?"user":"org",f=a?`${w}:${o.login} ${a} in:name`:`${w}:${o.login}`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==N||e[10]!==f?(m=async x=>{const{signal:i}=x,C=(await N.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!C)throw new Error("No response from search_repositories");return(JSON.parse(C).items??[]).map(We)},e[9]=N,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:p}=Ce(c);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let v;e[19]!==a||e[20]!==u?(v=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=v):v=e[21];let C;return e[22]!==i||e[23]!==v?(C=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,v]}),e[22]=i,e[23]=v,e[24]=C):C=e[24],C}let g;if(e[25]!==s||e[26]!==r||e[27]!==p||e[28]!==u){let x;e[30]!==s||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(M,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:i.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=s,e[26]=r,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(k){return{name:k.name,fullName:k.full_name,owner:k.full_name.split("/")[0]??"",url:k.html_url,private:k.private,description:k.description,updatedAt:k.updated_at}}function ae(k){const e=q.c(51),{status:n,error:l,retry:h}=k,o=te();if(n==="error"){let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-destructive"})}),e[0]=C):C=e[0];let S;e[1]!==o?(S=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=S):S=e[2];let R;e[3]!==S?(R=t.jsx("p",{className:"text-sm font-medium",children:S}),e[3]=S,e[4]=R):R=e[4];let P;e[5]!==l||e[6]!==o?(P=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=P):P=e[7];let I;e[8]!==P?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:P}),e[8]=P,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let E;e[13]!==o?(E=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=E):E=e[14];let U;e[15]!==h||e[16]!==E?(U=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:E}),e[15]=h,e[16]=E,e[17]=U):U=e[17];let b;return e[18]!==T||e[19]!==U?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[C,T,U]}),e[18]=T,e[19]=U,e[20]=b):b=e[20],b}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ee,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let y;e[26]!==u?(y=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=y):y=e[27];let N;e[28]!==a||e[29]!==o?(N=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=N):N=e[30];let w;e[31]!==N?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[31]=N,e[32]=w):w=e[32];let f;e[33]!==y||e[34]!==w?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[y,w]}),e[33]=y,e[34]=w,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ue("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const p=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ue("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 i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let v;return e[48]!==i||e[49]!==f?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=v):v=e[50],v}export{M as G,dt as a,qe as b,De as u};
|
|
1
|
+
import{c as q,j as t,F as me,a as ye,o as fe,r as D,$ as le,b as te,k as ee,e as ge,t as re,dS as Ne,K as se,G as ve,n as ke,m as ue,B as ce,x as Ce,y as Re}from"./index-Cqp0j5ti.js";import{a as we,b as Se,d as Pe,e as Ie}from"./dialog-CYJ2krGd.js";import{C as _e}from"./collection-search-zUg8lVSw.js";import{u as Te}from"./use-debounced-value-D9PhOqL3.js";import{b as he,u as Ee}from"./use-connection-C8a96kdh.js";import{W as Ae,u as ne,S as pe}from"./use-mcp-client-aTD0dPcl.js";import{a as be}from"./authenticate-and-persist-oauth-rg7jJVLv.js";import{b as de}from"./Settings02-7hoFOzi1.js";import{n as ze}from"./LinkExternal01-BGFlrQXG.js";import{U as Le}from"./agent-icon-BtnFRNoX.js";import{u as Ge}from"./use-mcp-tools-BAO8rbDl.js";import{e as Oe}from"./extract-connection-data-DDGietCF.js";import{c as Fe}from"./use-navigate-to-agent-DQ1z_mCw.js";import{g as Ue,p as xe,f as $e}from"./provision-repo-scoped-github-connection-DWINBxtd.js";function M(k){const e=q.c(4),{size:n,className:l}=k;let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0016 8c0-4.42-3.58-8-8-8z"}),e[0]=h):h=e[0];let o;return e[1]!==l||e[2]!==n?(o=t.jsx("svg",{width:n,height:n,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",className:l,children:h}),e[1]=l,e[2]=n,e[3]=o):o=e[3],o}function De(k,e){const n=q.c(12),{org:l}=me();let h;n[0]!==l.id?(h=Ae.REGISTRY(l.id),n[0]=l.id,n[1]=h):h=n[1];const o=h;let a;n[2]!==l.id||n[3]!==l.slug||n[4]!==o?(a={connectionId:o,orgId:l.id,orgSlug:l.slug},n[2]=l.id,n[3]=l.slug,n[4]=o,n[5]=a):a=n[5];const r=ne(a);let s;n[6]!==k?(s={name:k},n[6]=k,n[7]=s):s=n[7];const u=e?.enabled??!0;let y;return n[8]!==r||n[9]!==s||n[10]!==u?(y={client:r,toolName:"COLLECTION_REGISTRY_APP_GET",toolArguments:s,enabled:u,staleTime:3e5,select:He},n[8]=r,n[9]=s,n[10]=u,n[11]=y):y=n[11],Ge(y)}function He(k){return k.structuredContent?.item??null}const Me="deco/mcp-github";function qe(k){const{org:e}=me(),{data:n}=ye.useSession(),l=he(),h=fe(),[o,a]=D.useState("idle"),[r,s]=D.useState(null),[u,y]=D.useState(null),{data:N,isLoading:w}=De(Me,{enabled:k.enabled}),f=D.useRef(!1);k.enabled&&N&&!w&&!f.current&&n?.user?.id&&o==="idle"&&(f.current=!0,d());async function d(){if(!(!N||!n?.user?.id||!e))try{a("installing"),s(null);const c=Oe(N,e.id,n.user.id,{remoteIndex:0});if(!c.connection_url)throw new Error("Registry item is missing a remote URL for mcp-github");const{id:g}=await l.create.mutateAsync(c);a("authenticating");const j=await be({connectionId:g,orgId:e.id,orgSlug:e.slug,persistFallback:x=>l.update.mutateAsync({id:g,data:{connection_token:x}}).then(()=>{})});if(j.ran&&!j.ok){try{await l.delete.mutateAsync(g)}catch{}throw new Error(j.error&&j.error!=="no token received"?j.error:"No token received from GitHub")}le(h,e.id),y(c),a("ready")}catch(c){s(c instanceof Error?c.message:String(c)),a("error")}}function m(){a("idle"),s(null),y(null),f.current=!1}return k.enabled&&w&&o==="idle"?{status:"installing",error:null,connection:null,retry:m}:{status:o,error:r,connection:u,retry:m}}function dt(k){const e=q.c(27),{open:n,onOpenChange:l,title:h,onImportComplete:o,mode:a}=k,r=a===void 0?"agent":a,s=te();let u;e[0]!==r||e[1]!==s||e[2]!==h?(u=h??s(r==="connection"?"common.githubRepoPicker.addRepo":"common.githubRepoPicker.importFromGitHub"),e[0]=r,e[1]=s,e[2]=h,e[3]=u):u=e[3];const y=u,[N,w]=D.useState(null);let f;e[4]!==y?(f=t.jsx(we,{className:"sr-only",children:t.jsx(Se,{children:y})}),e[4]=y,e[5]=f):f=e[5];let d;e[6]!==y||e[7]!==N||e[8]!==s?(d=t.jsx("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3 shrink-0",children:N?t.jsxs(t.Fragment,{children:[t.jsx("button",{type:"button",onClick:()=>w(null),className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors shrink-0","aria-label":s("common.githubRepoPicker.backToAccounts"),children:t.jsx(de,{size:16})}),t.jsx("img",{src:N.avatarUrl,alt:N.login,className:"size-5 rounded-full ring-1 ring-border shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:N.login})]}):t.jsxs(t.Fragment,{children:[t.jsx(M,{className:"size-4 text-foreground shrink-0"}),t.jsx("span",{className:"text-sm font-medium text-foreground",children:y})]})}),e[6]=y,e[7]=N,e[8]=s,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(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[10]=m):m=e[10];let c;e[11]!==l?(c=()=>l(!1),e[11]=l,e[12]=c):c=e[12];let p;e[13]!==r||e[14]!==o||e[15]!==n||e[16]!==N||e[17]!==c?(p=t.jsx("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:t.jsx(D.Suspense,{fallback:m,children:t.jsx(Qe,{open:n,onComplete:c,selectedInstallation:N,onSelectInstallation:w,onImportComplete:o,mode:r})})}),e[13]=r,e[14]=o,e[15]=n,e[16]=N,e[17]=c,e[18]=p):p=e[18];let g;e[19]!==f||e[20]!==d||e[21]!==p?(g=t.jsxs(Pe,{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]!==l||e[24]!==n||e[25]!==g?(j=t.jsx(Ie,{open:n,onOpenChange:l,children:g}),e[23]=l,e[24]=n,e[25]=g,e[26]=j):j=e[26],j}function Qe({open:k,onComplete:e,selectedInstallation:n,onSelectInstallation:l,onImportComplete:h,mode:o="agent"}){const a=te(),{org:r}=me(),s=fe(),u=Fe(),[y,N]=D.useState(null),w=Ee({slug:"mcp-github"}),f=Ue(w),d=qe({enabled:k&&f.length===0}),m=f.length===1?f[0]??null:y,c=ne({connectionId:m?.id??"",orgId:r.id,orgSlug:r.slug}),p=ne({connectionId:pe,orgId:r.id,orgSlug:r.slug}),g=async(i,v)=>{try{const S=await c.callTool({name:"get_file_contents",arguments:{owner:i.owner,repo:i.name,path:v}});if(S.isError)return null;const P=S.content?.find(I=>I.type==="resource")?.resource?.text;if(!P)return null;try{const I=JSON.parse(P);return typeof I=="string"?I:JSON.stringify(I)}catch{return P}}catch{return null}},j=(i,v)=>{Promise.all([g(v,"AGENTS.md"),g(v,"CLAUDE.md")]).then(async([C,S])=>{const R=C??S??null;R&&(await p.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:i,data:{metadata:{instructions:R}}}}),le(s,r.id))}).catch(C=>{console.error("GitHub instructions fetch failed:",C)})},x=ge({mutationFn:async i=>{if(!m||!n)throw new Error("No GitHub connection or installation");const v=n.installationId;if(o==="connection"){const{childConnectionId:R}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:P=>c.callTool(P),selfCallTool:P=>p.callTool(P),orgShared:!0});return{virtualMcpId:null,repo:i,connectionId:R,item:null}}const{childConnectionId:C}=await xe({orgSlug:r.slug,sourceConnection:m,installationId:v,owner:i.owner,repo:i.name,githubCallTool:R=>c.callTool(R),selfCallTool:R=>p.callTool(R)});let S=null;try{const R=await p.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:i.name,description:i.description||"Imported from GitHub",pinned:!1,icon:null,metadata:{githubRepo:{owner:i.owner,name:i.name,url:i.url,installationId:v,connectionId:C},instructions:null,ui:{pinnedViews:null,layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:C}]}}}),P=R.structuredContent??R,I=P.item?.id;if(!P.item||!I)throw new Error("Failed to create the imported agent");return S=I,{virtualMcpId:I,repo:i,connectionId:C,item:P.item}}catch(R){throw S&&await p.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:S}}).catch(()=>{}),await p.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:C,force:!0}}).catch(()=>{}),R}},onSuccess:({virtualMcpId:i,repo:v,connectionId:C,item:S})=>{if(o==="connection"||!i||!S){le(s,r.id),Ne(s,r.id),re.success(a("common.githubRepoPicker.addedRepo",{name:v.name})),e();return}if(s.setQueryData(se.collectionItem(p,r.id,"","VIRTUAL_MCP",i),{item:S}),le(s,r.id),j(i,v),h){h({virtualMcpId:i,repo:v,connectionId:C});return}re.success(a("common.githubRepoPicker.importedRepo",{name:v.name})),e(),localStorage.setItem(ve.sidebarOpen(),JSON.stringify(!1)),u(i)},onError:i=>{re.error(a("common.githubRepoPicker.failedImport",{error:i instanceof Error?i.message:a("common.githubRepoPicker.unknownError")}))}});return d.status==="installing"||d.status==="authenticating"?t.jsx(ae,{status:d.status,error:null,retry:d.retry}):d.status==="error"?t.jsx(ae,{status:"error",error:d.error,retry:d.retry}):f.length===0&&d.status==="idle"?t.jsx(ae,{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:a("common.githubRepoPicker.selectConnection")})}),f.map(i=>t.jsxs("button",{type:"button",onClick:()=>N(i),className:"flex items-center gap-3 px-4 py-3 hover:bg-accent transition-colors text-left",children:[i.icon?t.jsx("img",{src:i.icon,alt:i.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(M,{className:"size-3.5 text-muted-foreground"})}),t.jsx("span",{className:"text-sm font-medium",children:i.title})]},i.id))]}):m?n?t.jsx(Ke,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,installation:n,onSelectRepo:i=>x.mutate(i),isSaving:x.isPending}):t.jsx(Be,{connectionId:m.id,orgId:r.id,orgSlug:r.slug,onSelect:l,showBackButton:f.length>1,onBack:()=>N(null)}):null}function Be(k){const e=q.c(126),{connectionId:n,orgId:l,orgSlug:h,onSelect:o,showBackButton:a,onBack:r}=k,s=te();let u;e[0]!==l||e[1]!==h?(u={connectionId:pe,orgId:l,orgSlug:h},e[0]=l,e[1]=h,e[2]=u):u=e[2];const y=ne(u),N=fe(),w=he();let f;e[3]!==n||e[4]!==l?(f=se.githubUserOrgs(l,n),e[3]=n,e[4]=l,e[5]=f):f=e[5];let d;e[6]!==n||e[7]!==y?(d=()=>$e(b=>y.callTool(b),n),e[6]=n,e[7]=y,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 c=ke(m);let p;e[12]!==w||e[13]!==n||e[14]!==c||e[15]!==l||e[16]!==h||e[17]!==N?(p=async()=>{const b=await be({connectionId:n,orgId:l,orgSlug:h,persistFallback:A=>w.update.mutateAsync({id:n,data:{connection_token:A}}).then(Ve)});if(b.ran&&!b.ok)throw new Error(b.error??"no token received");const _=new URL(`/api/${h}/mcp/${n}`,window.location.origin);await N.invalidateQueries({queryKey:se.isMCPAuthenticated(_.href,null)}),await N.invalidateQueries({queryKey:se.mcpClientPrefix()}),await c.refetch()},e[12]=w,e[13]=n,e[14]=c,e[15]=l,e[16]=h,e[17]=N,e[18]=p):p=e[18];let g;e[19]!==s?(g=b=>{re.error(s("common.githubRepoPicker.failedReconnect",{error:b instanceof Error?b.message:s("common.githubRepoPicker.unknownError")}))},e[19]=s,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(c.isLoading){let b;return e[24]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[24]=b):b=e[24],b}if(c.isError){let b;e[25]!==s?(b=s("common.githubRepoPicker.failedLoadAccounts"),e[25]=s,e[26]=b):b=e[26];let _;e[27]!==b?(_=t.jsx("p",{className:"text-sm text-destructive",children:b}),e[27]=b,e[28]=_):_=e[28];let A;e[29]!==s?(A=s("common.githubRepoPicker.connectionExpiredMessage"),e[29]=s,e[30]=A):A=e[30];let z;e[31]!==A?(z=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[280px] leading-relaxed",children:A}),e[31]=A,e[32]=z):z=e[32];let L;e[33]!==x?(L=()=>x.mutate(),e[33]=x,e[34]=L):L=e[34];const H=x.isPending;let G;e[35]!==x.isPending?(G=x.isPending?t.jsx(ee,{size:14,className:"animate-spin"}):t.jsx(M,{className:"size-3.5"}),e[35]=x.isPending,e[36]=G):G=e[36];let O;e[37]!==s?(O=s("common.githubRepoPicker.reconnectGitHub"),e[37]=s,e[38]=O):O=e[38];let F;e[39]!==x.isPending||e[40]!==L||e[41]!==G||e[42]!==O?(F=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:L,disabled:H,children:[G,O]}),e[39]=x.isPending,e[40]=L,e[41]=G,e[42]=O,e[43]=F):F=e[43];let $;return e[44]!==z||e[45]!==F||e[46]!==_?($=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 px-6 text-center",children:[_,z,F]}),e[44]=z,e[45]=F,e[46]=_,e[47]=$):$=e[47],$}const i=c.data;if(!i)return null;const v=i.appSlug?`https://github.com/apps/${i.appSlug}/installations/new`:"https://github.com/settings/installations";if(i.installations.length===0){let b;e[48]!==r||e[49]!==a||e[50]!==s?(b=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[48]=r,e[49]=a,e[50]=s,e[51]=b):b=e[51];let _;e[52]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx("div",{className:"size-16 rounded-2xl bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-8 text-foreground"})}),e[52]=_):_=e[52];let A;e[53]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),e[53]=A):A=e[53];let z;e[54]!==s?(z=s("common.githubRepoPicker.githubConnected"),e[54]=s,e[55]=z):z=e[55];let L;e[56]!==z?(L=t.jsxs("div",{className:"mt-4 flex items-center gap-1.5 text-xs font-medium text-success",children:[A,z]}),e[56]=z,e[57]=L):L=e[57];let H;e[58]!==s?(H=s("common.githubRepoPicker.setupRepositoriesTitle"),e[58]=s,e[59]=H):H=e[59];let G;e[60]!==H?(G=t.jsx("h2",{className:"mt-2 text-base font-semibold text-foreground",children:H}),e[60]=H,e[61]=G):G=e[61];let O;e[62]!==s?(O=s("common.githubRepoPicker.noRepositoriesShared"),e[62]=s,e[63]=O):O=e[63];let F;e[64]!==O?(F=t.jsx("p",{className:"mt-1.5 max-w-[360px] text-xs leading-relaxed text-muted-foreground",children:O}),e[64]=O,e[65]=F):F=e[65];let $;e[66]!==s?($=s("common.githubRepoPicker.chooseRepositories"),e[66]=s,e[67]=$):$=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 Q;e[69]!==v||e[70]!==$?(Q=t.jsx(ce,{asChild:!0,size:"sm",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",children:[$,ie]})}),e[69]=v,e[70]=$,e[71]=Q):Q=e[71];let B;e[72]!==c?(B=()=>{c.refetch()},e[72]=c,e[73]=B):B=e[73];const je=c.isFetching;let V;e[74]!==c.isFetching?(V=c.isFetching&&t.jsx(ee,{size:14,className:"animate-spin"}),e[74]=c.isFetching,e[75]=V):V=e[75];let K;e[76]!==s?(K=s("common.githubRepoPicker.checkAgain"),e[76]=s,e[77]=K):K=e[77];let J;e[78]!==c.isFetching||e[79]!==B||e[80]!==V||e[81]!==K?(J=t.jsxs(ce,{type:"button",variant:"outline",size:"sm",onClick:B,disabled:je,children:[V,K]}),e[78]=c.isFetching,e[79]=B,e[80]=V,e[81]=K,e[82]=J):J=e[82];let W;e[83]!==Q||e[84]!==J?(W=t.jsxs("div",{className:"mt-5 flex items-center gap-2",children:[Q,J]}),e[83]=Q,e[84]=J,e[85]=W):W=e[85];let Y;e[86]!==s?(Y=s("common.githubRepoPicker.repositoryAccessNote"),e[86]=s,e[87]=Y):Y=e[87];let X;e[88]!==Y?(X=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:Y}),e[88]=Y,e[89]=X):X=e[89];let Z;e[90]!==L||e[91]!==G||e[92]!==F||e[93]!==W||e[94]!==X?(Z=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-8 py-6 text-center",children:[_,L,G,F,W,X]}),e[90]=L,e[91]=G,e[92]=F,e[93]=W,e[94]=X,e[95]=Z):Z=e[95];let oe;return e[96]!==Z||e[97]!==b?(oe=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[b,Z]}),e[96]=Z,e[97]=b,e[98]=oe):oe=e[98],oe}let C;e[99]!==r||e[100]!==a||e[101]!==s?(C=a&&t.jsx("div",{className:"flex items-center gap-1 px-4 pt-3 pb-1 shrink-0",children:t.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[t.jsx(de,{size:12}),s("common.githubRepoPicker.changeConnection")]})}),e[99]=r,e[100]=a,e[101]=s,e[102]=C):C=e[102];let S;if(e[103]!==i.installations||e[104]!==o||e[105]!==s){let b;e[107]!==o||e[108]!==s?(b=_=>t.jsxs("button",{type:"button",onClick:()=>o(_),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:_.avatarUrl,alt:_.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:_.login}),_.type==="User"&&t.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:s("common.githubRepoPicker.personalAccount")})]}),t.jsxs("span",{className:"text-xs text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:[s("common.githubRepoPicker.select")," →"]})]},_.installationId),e[107]=o,e[108]=s,e[109]=b):b=e[109],S=i.installations.map(b),e[103]=i.installations,e[104]=o,e[105]=s,e[106]=S}else S=e[106];let R;e[110]!==S?(R=t.jsx("div",{className:"flex-1 overflow-y-auto overflow-x-hidden [scrollbar-gutter:stable]",children:S}),e[110]=S,e[111]=R):R=e[111];let P;e[112]!==s?(P=s("common.githubRepoPicker.accountNotListed"),e[112]=s,e[113]=P):P=e[113];let I;e[114]!==s?(I=s("common.githubRepoPicker.installGitHubApp"),e[114]=s,e[115]=I):I=e[115];let T;e[116]!==I?(T=t.jsx("span",{className:"underline underline-offset-2",children:I}),e[116]=I,e[117]=T):T=e[117];let E;e[118]!==v||e[119]!==P||e[120]!==T?(E=t.jsx("div",{className:"px-4 py-3 border-t border-border shrink-0",children:t.jsxs("a",{href:v,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-muted-foreground hover:text-foreground transition-colors",children:[P," ",T]})}),e[118]=v,e[119]=P,e[120]=T,e[121]=E):E=e[121];let U;return e[122]!==R||e[123]!==E||e[124]!==C?(U=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[C,R,E]}),e[122]=R,e[123]=E,e[124]=C,e[125]=U):U=e[125],U}function Ve(){}function Ke(k){const e=q.c(23),{connectionId:n,orgId:l,orgSlug:h,installation:o,onSelectRepo:a,isSaving:r}=k,s=te(),[u,y]=D.useState(""),N=Te(u,300),w=D.useDeferredValue(N),f=u!==w;let d;e[0]!==s?(d=s("common.githubRepoPicker.searchRepositories"),e[0]=s,e[1]=d):d=e[1];let m;e[2]!==f||e[3]!==u||e[4]!==d?(m=t.jsx(_e,{placeholder:d,value:u,onChange:y,isSearching:f}),e[2]=f,e[3]=u,e[4]=d,e[5]=m):m=e[5];const c=f?"opacity-40":"opacity-100";let p;e[6]!==c?(p=ue("flex-1 overflow-hidden flex flex-col transition-opacity duration-150",c),e[6]=c,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(ee,{size:18,className:"animate-spin text-muted-foreground"})}),e[8]=g):g=e[8];let j;e[9]!==n||e[10]!==w||e[11]!==o||e[12]!==r||e[13]!==a||e[14]!==l||e[15]!==h?(j=t.jsx(D.Suspense,{fallback:g,children:t.jsx(Je,{connectionId:n,orgId:l,orgSlug:h,installation:o,query:w,onSelectRepo:a,isSaving:r})}),e[9]=n,e[10]=w,e[11]=o,e[12]=r,e[13]=a,e[14]=l,e[15]=h,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 i;return e[20]!==m||e[21]!==x?(i=t.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m,x]}),e[20]=m,e[21]=x,e[22]=i):i=e[22],i}function Je(k){const e=q.c(36),{connectionId:n,orgId:l,orgSlug:h,installation:o,query:a,onSelectRepo:r,isSaving:s}=k,u=te();let y;e[0]!==n||e[1]!==l||e[2]!==h?(y={connectionId:n,orgId:l,orgSlug:h},e[0]=n,e[1]=l,e[2]=h,e[3]=y):y=e[3];const N=ne(y),w=o.type==="User"?"user":"org",f=a?`${w}:${o.login} ${a} in:name`:`${w}:${o.login}`;let d;e[4]!==n||e[5]!==o.login||e[6]!==l||e[7]!==a?(d=se.githubOrgRepos(l,n,o.login,a),e[4]=n,e[5]=o.login,e[6]=l,e[7]=a,e[8]=d):d=e[8];let m;e[9]!==N||e[10]!==f?(m=async x=>{const{signal:i}=x,C=(await N.callTool({name:"search_repositories",arguments:{query:f,page:1,perPage:30}},void 0,{signal:i})).content?.[0]?.text;if(!C)throw new Error("No response from search_repositories");return(JSON.parse(C).items??[]).map(We)},e[9]=N,e[10]=f,e[11]=m):m=e[11];let c;e[12]!==d||e[13]!==m?(c={queryKey:d,queryFn:m},e[12]=d,e[13]=m,e[14]=c):c=e[14];const{data:p}=Ce(c);if(p.length===0){let x;e[15]!==u?(x=u("common.githubRepoPicker.noRepositoriesFound"),e[15]=u,e[16]=x):x=e[16];let i;e[17]!==x?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:x}),e[17]=x,e[18]=i):i=e[18];let v;e[19]!==a||e[20]!==u?(v=a&&t.jsx("p",{className:"text-xs text-muted-foreground/60",children:u("common.githubRepoPicker.tryDifferentSearchTerm")}),e[19]=a,e[20]=u,e[21]=v):v=e[21];let C;return e[22]!==i||e[23]!==v?(C=t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-1",children:[i,v]}),e[22]=i,e[23]=v,e[24]=C):C=e[24],C}let g;if(e[25]!==s||e[26]!==r||e[27]!==p||e[28]!==u){let x;e[30]!==s||e[31]!==r||e[32]!==u?(x=i=>t.jsxs("button",{type:"button",onClick:()=>r(i),disabled:s,className:"flex items-start gap-3 px-4 py-3 hover:bg-accent transition-colors text-left disabled:opacity-50 disabled:cursor-not-allowed",children:[t.jsx(M,{className:"size-4 text-muted-foreground mt-0.5 shrink-0"}),t.jsx("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:t.jsx("span",{className:"text-sm font-medium truncate",children:i.name})}),t.jsxs("span",{className:"flex items-center gap-1 text-xs font-medium text-muted-foreground border border-border rounded px-1.5 py-0.5 shrink-0 leading-none",children:[i.private?t.jsx(Re,{size:10}):t.jsx(Le,{size:10}),i.private?u("common.githubRepoPicker.private"):u("common.githubRepoPicker.public")]})]},i.fullName),e[30]=s,e[31]=r,e[32]=u,e[33]=x):x=e[33],g=p.map(x),e[25]=s,e[26]=r,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(k){return{name:k.name,fullName:k.full_name,owner:k.full_name.split("/")[0]??"",url:k.html_url,private:k.private,description:k.description,updatedAt:k.updated_at}}function ae(k){const e=q.c(51),{status:n,error:l,retry:h}=k,o=te();if(n==="error"){let C;e[0]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"size-10 rounded-full bg-destructive/10 flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-destructive"})}),e[0]=C):C=e[0];let S;e[1]!==o?(S=o("common.githubRepoPicker.connectionFailed"),e[1]=o,e[2]=S):S=e[2];let R;e[3]!==S?(R=t.jsx("p",{className:"text-sm font-medium",children:S}),e[3]=S,e[4]=R):R=e[4];let P;e[5]!==l||e[6]!==o?(P=l??o("common.githubRepoPicker.somethingWentWrong"),e[5]=l,e[6]=o,e[7]=P):P=e[7];let I;e[8]!==P?(I=t.jsx("p",{className:"text-xs text-muted-foreground max-w-[260px] leading-relaxed",children:P}),e[8]=P,e[9]=I):I=e[9];let T;e[10]!==R||e[11]!==I?(T=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[R,I]}),e[10]=R,e[11]=I,e[12]=T):T=e[12];let E;e[13]!==o?(E=o("common.githubRepoPicker.tryAgain"),e[13]=o,e[14]=E):E=e[14];let U;e[15]!==h||e[16]!==E?(U=t.jsx("button",{type:"button",onClick:h,className:"text-xs font-medium text-foreground border border-border rounded-md px-3 py-1.5 hover:bg-accent transition-colors",children:E}),e[15]=h,e[16]=E,e[17]=U):U=e[17];let b;return e[18]!==T||e[19]!==U?(b=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[C,T,U]}),e[18]=T,e[19]=U,e[20]=b):b=e[20],b}const a=n==="authenticating";let r;e[21]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"size-10 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{className:"size-5 text-foreground"})}),e[21]=r):r=e[21];let s;e[22]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsxs("div",{className:"relative size-10",children:[r,t.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 size-4 rounded-full bg-background flex items-center justify-center",children:t.jsx(ee,{size:12,className:"animate-spin text-muted-foreground"})})]}),e[22]=s):s=e[22];let u;e[23]!==a||e[24]!==o?(u=o(a?"common.githubRepoPicker.authenticatingGitHub":"common.githubRepoPicker.settingUpGitHub"),e[23]=a,e[24]=o,e[25]=u):u=e[25];let y;e[26]!==u?(y=t.jsx("p",{className:"text-sm font-medium",children:u}),e[26]=u,e[27]=y):y=e[27];let N;e[28]!==a||e[29]!==o?(N=o(a?"common.githubRepoPicker.completeOAuthFlow":"common.githubRepoPicker.installingGitHubConnection"),e[28]=a,e[29]=o,e[30]=N):N=e[30];let w;e[31]!==N?(w=t.jsx("p",{className:"text-xs text-muted-foreground",children:N}),e[31]=N,e[32]=w):w=e[32];let f;e[33]!==y||e[34]!==w?(f=t.jsxs("div",{className:"flex flex-col items-center gap-1 text-center",children:[y,w]}),e[33]=y,e[34]=w,e[35]=f):f=e[35];const d=a?"bg-muted-foreground/30":"bg-foreground animate-pulse";let m;e[36]!==d?(m=ue("size-1.5 rounded-full",d),e[36]=d,e[37]=m):m=e[37];let c;e[38]!==m?(c=t.jsx("span",{className:m}),e[38]=m,e[39]=c):c=e[39];const p=a?"bg-foreground animate-pulse":"bg-muted-foreground/30";let g;e[40]!==p?(g=ue("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 i;e[45]!==c||e[46]!==j?(i=t.jsxs("div",{className:"flex items-center gap-1.5",children:[c,j,x]}),e[45]=c,e[46]=j,e[47]=i):i=e[47];let v;return e[48]!==i||e[49]!==f?(v=t.jsxs("div",{className:"flex flex-col items-center gap-4 px-6 py-10",children:[s,f,i]}),e[48]=i,e[49]=f,e[50]=v):v=e[50],v}export{M as G,dt as a,qe as b,De as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{dv as St,dw as It,ba as R,Y as c,dx as de,bg as ze,dy as Et,b9 as Tt,aH as wt,a5 as A,a4 as G,a2 as oe,X as _,bb as m,b0 as F,cp as Mt,dz as I,a3 as Ot,t as ge,c as Ee,r as W,F as At,j as Ct}from"./index-
|
|
1
|
+
import{dv as St,dw as It,ba as R,Y as c,dx as de,bg as ze,dy as Et,b9 as Tt,aH as wt,a5 as A,a4 as G,a2 as oe,X as _,bb as m,b0 as F,cp as Mt,dz as I,a3 as Ot,t as ge,c as Ee,r as W,F as At,j as Ct}from"./index-Cqp0j5ti.js";import{S as Rt,u as Nt}from"./use-mcp-client-aTD0dPcl.js";import{d as xt}from"./delay-CnY5UFtP.js";import{e as Pt}from"./backoff-CrEUbyZT.js";import{d as Dt,D as kt}from"./decopilot-sse-pool-iZWGiJ6m.js";var re;(function(t){t.assertEqual=s=>{};function e(s){}t.assertIs=e;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const o={};for(const i of s)o[i]=i;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(n=>typeof s[s[n]]!="number"),i={};for(const n of o)i[n]=s[n];return t.objectValues(i)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&o.push(i);return o},t.find=(s,o)=>{for(const i of s)if(o(i))return i},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(re||(re={}));var Oe;(function(t){t.mergeShapes=(e,a)=>({...e,...a})})(Oe||(Oe={}));re.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);re.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ce extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=e}format(e){const a=e||function(o){return o.message},r={_errors:[]},s=o=>{for(const i of o.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let n=r,p=0;for(;p<i.path.length;){const u=i.path[p];p===i.path.length-1?(n[u]=n[u]||{_errors:[]},n[u]._errors.push(a(i))):n[u]=n[u]||{_errors:[]},n=n[u],p++}}};return s(this),r}static assert(e){if(!(e instanceof ce))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,re.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];a[o]=a[o]||[],a[o].push(e(s))}else r.push(e(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}ce.create=t=>new ce(t);var Ae;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(Ae||(Ae={}));var h;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(h||(h={}));var Je="vercel.ai.error",Lt=Symbol.for(Je),Ce,Re,Z=class We extends(Re=Error,Ce=Lt,Re){constructor({name:e,message:a,cause:r}){super(a),this[Ce]=!0,this.name=e,this.cause=r}static isInstance(e){return We.hasMarker(e,Je)}static hasMarker(e,a){const r=Symbol.for(a);return e!=null&&typeof e=="object"&&r in e&&typeof e[r]=="boolean"&&e[r]===!0}};function Ge(t){return t==null?"unknown error":typeof t=="string"?t:t instanceof Error?t.message:JSON.stringify(t)}var Ye="AI_InvalidArgumentError",He=`vercel.ai.error.${Ye}`,jt=Symbol.for(He),Ne,xe,Zt=class extends(xe=Z,Ne=jt,xe){constructor({message:t,cause:e,argument:a}){super({name:Ye,message:t,cause:e}),this[Ne]=!0,this.argument=a}static isInstance(t){return Z.hasMarker(t,He)}},qe="AI_JSONParseError",Xe=`vercel.ai.error.${qe}`,$t=Symbol.for(Xe),Pe,De,ke=class extends(De=Z,Pe=$t,De){constructor({text:t,cause:e}){super({name:qe,message:`JSON parsing failed: Text: ${t}.
|
|
2
2
|
Error message: ${Ge(e)}`,cause:e}),this[Pe]=!0,this.text=t}static isInstance(t){return Z.hasMarker(t,Xe)}},Qe="AI_TypeValidationError",Ke=`vercel.ai.error.${Qe}`,Ut=Symbol.for(Ke),Le,je,X=class ve extends(je=Z,Le=Ut,je){constructor({value:e,cause:a,context:r}){let s="Type validation failed";if(r?.field&&(s+=` for ${r.field}`),r?.entityName||r?.entityId){s+=" (";const o=[];r.entityName&&o.push(r.entityName),r.entityId&&o.push(`id: "${r.entityId}"`),s+=o.join(", "),s+=")"}super({name:Qe,message:`${s}: Value: ${JSON.stringify(e)}.
|
|
3
3
|
Error message: ${Ge(a)}`,cause:a}),this[Le]=!0,this.value=e,this.context=r}static isInstance(e){return Z.hasMarker(e,Ke)}static wrap({value:e,cause:a,context:r}){var s,o,i;return ve.isInstance(a)&&a.value===e&&((s=a.context)==null?void 0:s.field)===r?.field&&((o=a.context)==null?void 0:o.entityName)===r?.entityName&&((i=a.context)==null?void 0:i.entityId)===r?.entityId?a:new ve({value:e,cause:a,context:r})}},ie=({prefix:t,size:e=16,alphabet:a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:r="-"}={})=>{const s=()=>{const o=a.length,i=new Array(e);for(let n=0;n<e;n++)i[n]=a[Math.random()*o|0];return i.join("")};if(t==null)return s;if(a.includes(r))throw new Zt({argument:"separator",message:`The separator "${r}" must not be part of the alphabet "${a}".`});return()=>`${t}${r}${s()}`};ie();var Ft=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,Bt=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function Ze(t){const e=JSON.parse(t);return e===null||typeof e!="object"||Ft.test(t)===!1&&Bt.test(t)===!1?e:Vt(e)}function Vt(t){let e=[t];for(;e.length;){const a=e;e=[];for(const r of a){if(Object.prototype.hasOwnProperty.call(r,"__proto__"))throw new SyntaxError("Object contains forbidden prototype property");if(Object.prototype.hasOwnProperty.call(r,"constructor")&&r.constructor!==null&&typeof r.constructor=="object"&&Object.prototype.hasOwnProperty.call(r.constructor,"prototype"))throw new SyntaxError("Object contains forbidden prototype property");for(const s in r){const o=r[s];o&&typeof o=="object"&&e.push(o)}}}return t}function zt(t){const{stackTraceLimit:e}=Error;try{Error.stackTraceLimit=0}catch{return Ze(t)}try{return Ze(t)}finally{Error.stackTraceLimit=e}}function Te(t){if(t.type==="object"||Array.isArray(t.type)&&t.type.includes("object")){t.additionalProperties=!1;const{properties:a}=t;if(a!=null)for(const r of Object.keys(a))a[r]=z(a[r])}t.items!=null&&(t.items=Array.isArray(t.items)?t.items.map(z):z(t.items)),t.anyOf!=null&&(t.anyOf=t.anyOf.map(z)),t.allOf!=null&&(t.allOf=t.allOf.map(z)),t.oneOf!=null&&(t.oneOf=t.oneOf.map(z));const{definitions:e}=t;if(e!=null)for(const a of Object.keys(e))e[a]=z(e[a]);return t}function z(t){return typeof t=="boolean"?t:Te(t)}var Jt=Symbol("Let zodToJsonSchema decide on which parser to use"),$e={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",strictUnions:!1,definitions:{},errorMessages:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},Wt=t=>typeof t=="string"?{...$e,name:t}:{...$e,...t};function N(){return{}}function Gt(t,e){var a,r,s;const o={type:"array"};return(a=t.type)!=null&&a._def&&((s=(r=t.type)==null?void 0:r._def)==null?void 0:s.typeName)!==h.ZodAny&&(o.items=b(t.type._def,{...e,currentPath:[...e.currentPath,"items"]})),t.minLength&&(o.minItems=t.minLength.value),t.maxLength&&(o.maxItems=t.maxLength.value),t.exactLength&&(o.minItems=t.exactLength.value,o.maxItems=t.exactLength.value),o}function Yt(t){const e={type:"integer",format:"int64"};if(!t.checks)return e;for(const a of t.checks)switch(a.kind){case"min":a.inclusive?e.minimum=a.value:e.exclusiveMinimum=a.value;break;case"max":a.inclusive?e.maximum=a.value:e.exclusiveMaximum=a.value;break;case"multipleOf":e.multipleOf=a.value;break}return e}function Ht(){return{type:"boolean"}}function et(t,e){return b(t.type._def,e)}var qt=(t,e)=>b(t.innerType._def,e);function tt(t,e,a){const r=a??e.dateStrategy;if(Array.isArray(r))return{anyOf:r.map((s,o)=>tt(t,e,s))};switch(r){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return Xt(t)}}var Xt=t=>{const e={type:"integer",format:"unix-time"};for(const a of t.checks)switch(a.kind){case"min":e.minimum=a.value;break;case"max":e.maximum=a.value;break}return e};function Qt(t,e){return{...b(t.innerType._def,e),default:t.defaultValue()}}function Kt(t,e){return e.effectStrategy==="input"?b(t.schema._def,e):N()}function ea(t){return{type:"string",enum:Array.from(t.values)}}var ta=t=>"type"in t&&t.type==="string"?!1:"allOf"in t;function aa(t,e){const a=[b(t.left._def,{...e,currentPath:[...e.currentPath,"allOf","0"]}),b(t.right._def,{...e,currentPath:[...e.currentPath,"allOf","1"]})].filter(s=>!!s),r=[];return a.forEach(s=>{if(ta(s))r.push(...s.allOf);else{let o=s;if("additionalProperties"in s&&s.additionalProperties===!1){const{additionalProperties:i,...n}=s;o=n}r.push(o)}}),r.length?{allOf:r}:void 0}function ra(t){const e=typeof t.value;return e!=="bigint"&&e!=="number"&&e!=="boolean"&&e!=="string"?{type:Array.isArray(t.value)?"array":"object"}:{type:e==="bigint"?"integer":e,const:t.value}}var me=void 0,P={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(me===void 0&&(me=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),me),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function at(t,e){const a={type:"string"};if(t.checks)for(const r of t.checks)switch(r.kind){case"min":a.minLength=typeof a.minLength=="number"?Math.max(a.minLength,r.value):r.value;break;case"max":a.maxLength=typeof a.maxLength=="number"?Math.min(a.maxLength,r.value):r.value;break;case"email":switch(e.emailStrategy){case"format:email":D(a,"email",r.message,e);break;case"format:idn-email":D(a,"idn-email",r.message,e);break;case"pattern:zod":O(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":O(a,r.regex,r.message,e);break;case"cuid":O(a,P.cuid,r.message,e);break;case"cuid2":O(a,P.cuid2,r.message,e);break;case"startsWith":O(a,RegExp(`^${he(r.value,e)}`),r.message,e);break;case"endsWith":O(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":{O(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":O(a,P.base64url,r.message,e);break;case"jwt":O(a,P.jwt,r.message,e);break;case"cidr":{r.version!=="v6"&&O(a,P.ipv4Cidr,r.message,e),r.version!=="v4"&&O(a,P.ipv6Cidr,r.message,e);break}case"emoji":O(a,P.emoji(),r.message,e);break;case"ulid":{O(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":{O(a,P.base64,r.message,e);break}}break}case"nanoid":O(a,P.nanoid,r.message,e)}return a}function he(t,e){return e.patternStrategy==="escape"?na(t):t}var sa=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function na(t){let e="";for(let a=0;a<t.length;a++)sa.has(t[a])||(e+="\\"),e+=t[a];return e}function D(t,e,a,r){var s;t.format||(s=t.anyOf)!=null&&s.some(o=>o.format)?(t.anyOf||(t.anyOf=[]),t.format&&(t.anyOf.push({format:t.format}),delete t.format),t.anyOf.push({format:e,...a&&r.errorMessages&&{errorMessage:{format:a}}})):t.format=e}function O(t,e,a,r){var s;t.pattern||(s=t.allOf)!=null&&s.some(o=>o.pattern)?(t.allOf||(t.allOf=[]),t.pattern&&(t.allOf.push({pattern:t.pattern}),delete t.pattern),t.allOf.push({pattern:Ue(e,r),...a&&r.errorMessages&&{errorMessage:{pattern:a}}})):t.pattern=Ue(e,r)}function Ue(t,e){var a;if(!e.applyRegexFlags||!t.flags)return t.source;const r={i:t.flags.includes("i"),m:t.flags.includes("m"),s:t.flags.includes("s")},s=r.i?t.source.toLowerCase():t.source;let o="",i=!1,n=!1,p=!1;for(let u=0;u<s.length;u++){if(i){o+=s[u],i=!1;continue}if(r.i){if(n){if(s[u].match(/[a-z]/)){p?(o+=s[u],o+=`${s[u-2]}-${s[u]}`.toUpperCase(),p=!1):s[u+1]==="-"&&((a=s[u+2])!=null&&a.match(/[a-z]/))?(o+=s[u],p=!0):o+=`${s[u]}${s[u].toUpperCase()}`;continue}}else if(s[u].match(/[a-z]/)){o+=`[${s[u]}${s[u].toUpperCase()}]`;continue}}if(r.m){if(s[u]==="^"){o+=`(^|(?<=[\r
|
|
4
4
|
]))`;continue}else if(s[u]==="$"){o+=`($|(?=[\r
|