decocms 4.221.0 → 4.221.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-B5sDezf-.js → AlertCircle-BngcPF6g.js} +1 -1
- package/dist/client/assets/{AreaChart-B14o5fmp.js → AreaChart-DVnqbznT.js} +1 -1
- package/dist/client/assets/{ArrowLeft-hINWrmDM.js → ArrowLeft-D0SMPcnr.js} +1 -1
- package/dist/client/assets/{ArrowUp-BCKIIXqC.js → ArrowUp-CQvXx2Eb.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-D9wNgkJO.js → ArrowUpRight-DZpp5DED.js} +1 -1
- package/dist/client/assets/{Check-DvgcRTBi.js → Check-BVTsyPDh.js} +1 -1
- package/dist/client/assets/{CheckCircle-hJqs3poK.js → CheckCircle-Blh8DmbD.js} +1 -1
- package/dist/client/assets/{ChevronDown-Dg-G9Bza.js → ChevronDown-C6mtwPLn.js} +1 -1
- package/dist/client/assets/{ChevronRight-D--quDsb.js → ChevronRight-BEp1VAsd.js} +1 -1
- package/dist/client/assets/{ChevronUp-DVfjlsaH.js → ChevronUp-BIP55CrT.js} +1 -1
- package/dist/client/assets/{Copy01-A-iF56j2.js → Copy01-DgiqwcSK.js} +1 -1
- package/dist/client/assets/{CpuChip01-C4a1EmKL.js → CpuChip01-CENIClYZ.js} +1 -1
- package/dist/client/assets/{CreditCard01-DD3YsjP8.js → CreditCard01-BhrVduIh.js} +1 -1
- package/dist/client/assets/{DotsVertical-Dna5iyxv.js → DotsVertical-C6DREveP.js} +1 -1
- package/dist/client/assets/{Eye-Sv9L0hDt.js → Eye-PKXEw9_c.js} +1 -1
- package/dist/client/assets/{FilterLines-BP3DhNOH.js → FilterLines-CEQFAuO4.js} +1 -1
- package/dist/client/assets/{Globe01-DDNwpjh5.js → Globe01-7jkIPFoA.js} +1 -1
- package/dist/client/assets/{Globe04-akm1kAFe.js → Globe04-DR8uwSal.js} +1 -1
- package/dist/client/assets/{HardDrive-CK5PbODV.js → HardDrive-JJwxAgPq.js} +1 -1
- package/dist/client/assets/{Key01-LdZJmUXU.js → Key01-BJ3dxv9s.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DTYf3Zp9.js → LayoutLeft-BdUVMA1s.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BaEq__IR.js → LinkExternal01-zuYuwJZ-.js} +1 -1
- package/dist/client/assets/{LogOut01-1f2QOh82.js → LogOut01-BLeeRd_x.js} +1 -1
- package/dist/client/assets/{Monitor01-DPJi2KGo.js → Monitor01-BnK9fFda.js} +1 -1
- package/dist/client/assets/{Palette-DpXIzWgD.js → Palette-Cg1tIBcF.js} +1 -1
- package/dist/client/assets/{Play-CFJ7WwbI.js → Play-2YDlreGg.js} +1 -1
- package/dist/client/assets/{Plus-DzzDYhDH.js → Plus-CgUsDtXu.js} +1 -1
- package/dist/client/assets/{SearchLg-Ddza_Jes.js → SearchLg-CKHQyByC.js} +1 -1
- package/dist/client/assets/{SearchMd-DheaqQdu.js → SearchMd-D_hwjTJs.js} +1 -1
- package/dist/client/assets/{Settings02-nh2DxBto.js → Settings02-I4I2nClv.js} +1 -1
- package/dist/client/assets/{Share07-CnHohhT8.js → Share07-BPGtMefI.js} +1 -1
- package/dist/client/assets/{Shield01-CDtPaxfg.js → Shield01-CK9cE1oJ.js} +1 -1
- package/dist/client/assets/{Star01-Dtu6SkUk.js → Star01-DCIbpwnb.js} +1 -1
- package/dist/client/assets/{Stars01-C_U8OZIq.js → Stars01-C5PvctF2.js} +1 -1
- package/dist/client/assets/{Stars02-Cw0-QoyL.js → Stars02-BAO2I02Z.js} +1 -1
- package/dist/client/assets/{Sun-CPY69DKL.js → Sun-E3c2IB3O.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-Buu6mw-W.js → SwitchHorizontal01-zV8kVIQA.js} +1 -1
- package/dist/client/assets/{Tool01-Cn0-xBBt.js → Tool01-CN04dNAZ.js} +1 -1
- package/dist/client/assets/{Tool02-BlzqzZAJ.js → Tool02-mI78frGe.js} +1 -1
- package/dist/client/assets/{Trash01-C3hHB6NE.js → Trash01-BxlP0eyg.js} +1 -1
- package/dist/client/assets/{TrendUp01-B8cusAvZ.js → TrendUp01-D7jiFi03.js} +1 -1
- package/dist/client/assets/{Upload01-DOECu3Z7.js → Upload01-Bbnlu9tq.js} +1 -1
- package/dist/client/assets/{User01-v0JW3r6M.js → User01-BIqoyKIS.js} +1 -1
- package/dist/client/assets/{Users01-Bo461Fnp.js → Users01-DY_fYiv0.js} +1 -1
- package/dist/client/assets/{Users03-c4O2AlzH.js → Users03-DUwPNwXU.js} +1 -1
- package/dist/client/assets/{X-D4P_xotm.js → X-ibOvxK6r.js} +1 -1
- package/dist/client/assets/{XCircle-BhdQMcW8.js → XCircle-BnwtkUhP.js} +1 -1
- package/dist/client/assets/{XClose-NC_Nso5p.js → XClose-DI0JEn_A.js} +1 -1
- package/dist/client/assets/{YAxis-Cns8RI4u.js → YAxis-FCDZOHrS.js} +1 -1
- package/dist/client/assets/{Zap-UDNJrio-.js → Zap-DS_8b3SH.js} +1 -1
- package/dist/client/assets/{ZapSquare-BEEyAqSI.js → ZapSquare-BYkzde_j.js} +1 -1
- package/dist/client/assets/{access-gate-vBdGjDQW.js → access-gate-DS6vMaXc.js} +1 -1
- package/dist/client/assets/{agent-icon-B5lPNSsP.js → agent-icon-DxmmOieH.js} +1 -1
- package/dist/client/assets/{agents-list-BJn8TJuy.js → agents-list-DH1J1PER.js} +1 -1
- package/dist/client/assets/{ai-providers-BbeFgeD3.js → ai-providers-BgGFh3bD.js} +1 -1
- package/dist/client/assets/{alert-CUvt8zLM.js → alert-BMIHoWVc.js} +1 -1
- package/dist/client/assets/{alert-dialog-jruC7mBq.js → alert-dialog-C-EKs2lL.js} +1 -1
- package/dist/client/assets/{api-keys-Dwla9eef.js → api-keys-oH6s0Kiy.js} +1 -1
- package/dist/client/assets/{app-editor-BEgPwoRq.js → app-editor-CKRORZ0B.js} +1 -1
- package/dist/client/assets/{auth-Bz9lRoBo.js → auth-Bog8FqNA.js} +1 -1
- package/dist/client/assets/{auth-catchall-CNW5wSxJ.js → auth-catchall-DEr4VweJ.js} +1 -1
- package/dist/client/assets/{auth-entry-DuHumkii.js → auth-entry-P98QAa8r.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DCr3x48B.js → auth-split-layout-b3qV-eZZ.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dgj4f6Ax.js → authenticate-and-persist-oauth-P5_Ha_c9.js} +1 -1
- package/dist/client/assets/{automation-list-row-BDhubR9Y.js → automation-list-row-DeBMFDOi.js} +1 -1
- package/dist/client/assets/{automation-runs-j2r--LSH.js → automation-runs-CqphiI3m.js} +1 -1
- package/dist/client/assets/{automations-CFSdHPgS.js → automations-2mLiSOY-.js} +1 -1
- package/dist/client/assets/{avatar-D4NA2Bhx.js → avatar-D98__g63.js} +1 -1
- package/dist/client/assets/{badge-BjVK4C89.js → badge-Ce3GqcFl.js} +1 -1
- package/dist/client/assets/{billing-B7KybG63.js → billing-ENaqQdK2.js} +1 -1
- package/dist/client/assets/{block-document-DIxKyslO.js → block-document-CG0NFzAh.js} +1 -1
- package/dist/client/assets/{brand-context-KFGh7Cqy.js → brand-context-BKLPwaYZ.js} +1 -1
- package/dist/client/assets/{buckets-DAxo88K_.js → buckets-56Mkka1H.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-CgGP-pZo.js → bulk-category-panel-CHCRKR4P.js} +1 -1
- package/dist/client/assets/{capability-load-error-BB1uxQxo.js → capability-load-error-DG1kaWeF.js} +1 -1
- package/dist/client/assets/{card-DYQ6zVHs.js → card-FTRG4FI8.js} +1 -1
- package/dist/client/assets/{cards-B0hdhTBg.js → cards-BEKt-odr.js} +1 -1
- package/dist/client/assets/{category-editor-uo-GEs22.js → category-editor-B8YNO_Z8.js} +1 -1
- package/dist/client/assets/{chart-Cu0CqzUJ.js → chart-jXstGrkI.js} +1 -1
- package/dist/client/assets/{chat-context-6z6Usp8t.js → chat-context-0AU1Ck7Q.js} +1 -1
- package/dist/client/assets/{checkbox-BYUUT_OQ.js → checkbox-DG1KP888.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BmwTSIm3.js → cli-auth-success-VKH_DAL_.js} +1 -1
- package/dist/client/assets/{collection-detail-DL2maNvj.js → collection-detail-DRmwoW6R.js} +1 -1
- package/dist/client/assets/{collection-display-button-K8EPC15C.js → collection-display-button-BgL0eHeD.js} +1 -1
- package/dist/client/assets/{collection-search-BEi_6zWf.js → collection-search-Dd_8W7pe.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-CJ1bvTF4.js → collection-table-wrapper-B-jYZKrj.js} +1 -1
- package/dist/client/assets/{collection-tabs-z4TGwElC.js → collection-tabs-C1U9k4YH.js} +1 -1
- package/dist/client/assets/{command-Dy--q7-N.js → command-DO7yCE_e.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-B-bcfSh9.js → commerce-onboarding-DmnJndiV.js} +1 -1
- package/dist/client/assets/{connect-C5yqxNbe.js → connect-BbfJB-8y.js} +1 -1
- package/dist/client/assets/{connection-BvqWJ-Xq.js → connection-BbKGBDgy.js} +1 -1
- package/dist/client/assets/{connection-card-VoqZ5QIL.js → connection-card-CQ96AbdZ.js} +1 -1
- package/dist/client/assets/{connection-detail-evUcN-XV.js → connection-detail-BdRCVGMR.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-B4Paw6j5.js → connection-form-helpers-C2-q5pAR.js} +1 -1
- package/dist/client/assets/{connections-4syOz7oA.js → connections-S-_0Igvd.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-CBWbLfMa.js → decopilot-sse-pool-DaDP3S1o.js} +1 -1
- package/dist/client/assets/{dialog-6eLF19WZ.js → dialog-BplUXBMG.js} +1 -1
- package/dist/client/assets/{domain-settings-C5eQMGnS.js → domain-settings-I_K89_VF.js} +1 -1
- package/dist/client/assets/{drawer-gzblMb4G.js → drawer-BGh4JkbP.js} +1 -1
- package/dist/client/assets/{dropdown-menu-AtDwBl9o.js → dropdown-menu-lGvTdVZ8.js} +1 -1
- package/dist/client/assets/{empty-state-BT_HKEND.js → empty-state-CXLNA2ti.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CXHDzEiJ.js → extract-connection-data-DvtgDdiK.js} +1 -1
- package/dist/client/assets/{file-explorer-Bw6TAY8Q.js → file-explorer-CvDONbdg.js} +1 -1
- package/dist/client/assets/{file-type-icon-rCrXf4Wk.js → file-type-icon-C8_FY9PP.js} +1 -1
- package/dist/client/assets/{form-BMN1fUOX.js → form-bokF6u7G.js} +1 -1
- package/dist/client/assets/{general-DKR8bXXm.js → general-DzZ5IPBp.js} +1 -1
- package/dist/client/assets/{github-repo-picker-D7fRmvNp.js → github-repo-picker-ERlP0mrh.js} +1 -1
- package/dist/client/assets/{hooks-15WKVCFA.js → hooks-Bg9fS6HW.js} +1 -1
- package/dist/client/assets/{index-CCLrlcV5.js → index-5gemagf1.js} +3 -3
- package/dist/client/assets/{index-CGSTZ1ZU.js → index-BG3OISG4.js} +1 -1
- package/dist/client/assets/{index-BwmITuIy.js → index-D4ix1fGK.js} +1 -1
- package/dist/client/assets/{index-BFjeToXL.js → index-DA2rLLPh.js} +1 -1
- package/dist/client/assets/{index-DP9nGBt7.js → index-DKORCoqT.js} +1 -1
- package/dist/client/assets/{index-Dpu2EeKk.js → index-ITbViqR5.js} +1 -1
- package/dist/client/assets/{index-DAxY6pzU.js → index-NDWWiHlo.js} +1 -1
- package/dist/client/assets/{index-D2lGClaQ.js → index-OhAQDPDV.js} +1 -1
- package/dist/client/assets/{index-B4LwrR_z.js → index-UrA_YNnD.js} +4 -4
- package/dist/client/assets/{index-DuQpNddO.js → index-VNa6_71P.js} +1 -1
- package/dist/client/assets/{index-redirect-DkWYochk.js → index-redirect-Dpbvfg6v.js} +1 -1
- package/dist/client/assets/{infra-billing-D3_zJevY.js → infra-billing-Cvk_Z_aX.js} +1 -1
- package/dist/client/assets/{input-D-IOsTjg.js → input-Dolcjx-g.js} +1 -1
- package/dist/client/assets/{integration-icon-B83LqhIA.js → integration-icon-B-EnQSDk.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-Cui6XPGV.js → invite-member-dialog-DxBLq6lg.js} +1 -1
- package/dist/client/assets/{label-D1FqNbWH.js → label-D3lnkDBW.js} +1 -1
- package/dist/client/assets/{layout-CgLUlycD.js → layout-kHrtOvTw.js} +1 -1
- package/dist/client/assets/{login-Ctbk1pYe.js → login-3PIKR3WF.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BcVMm2uf.js → mcp-oauth-CfTAXvvd.js} +1 -1
- package/dist/client/assets/{members-llcw8uEg.js → members-UXTsVHFy.js} +1 -1
- package/dist/client/assets/{monaco-editor-DKEoDpqg.js → monaco-editor-UmS7A7ZQ.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-CY21GWyZ.js → monitoring-stats-row-B5bAARD2.js} +1 -1
- package/dist/client/assets/{multi-select-DXDADON8.js → multi-select-FdtITAIk.js} +1 -1
- package/dist/client/assets/{oauth-callback-DSAxbmbr.js → oauth-callback-CLULI95z.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-Cfqol9wy.js → oauth-callback-ai-provider-wEHKm3gV.js} +1 -1
- package/dist/client/assets/{onboarding-CIis0EMQ.js → onboarding-CivMuKXz.js} +1 -1
- package/dist/client/assets/{org-layout-BXQQoCDr.js → org-layout-AMIbegtU.js} +1 -1
- package/dist/client/assets/{organization-choice-D5x-9mO1.js → organization-choice-C0EtSlhf.js} +1 -1
- package/dist/client/assets/{orgs-DdP5J1RP.js → orgs-CO2N7ZHV.js} +1 -1
- package/dist/client/assets/{page-seo-form-DEW14diT.js → page-seo-form-f6-aQWck.js} +1 -1
- package/dist/client/assets/{popover-C80X4J3B.js → popover-14h9vyqc.js} +1 -1
- package/dist/client/assets/{post-editor-BKzphWjx.js → post-editor-D7JohTJd.js} +1 -1
- package/dist/client/assets/{primitives-CKMnJ8eQ.js → primitives-D-bSFfki.js} +1 -1
- package/dist/client/assets/{profile-16zdistj.js → profile-CcIncDgB.js} +1 -1
- package/dist/client/assets/{project-app-view-BjsLwg8u.js → project-app-view-DPjt3Vyt.js} +1 -1
- package/dist/client/assets/record-editor-DBla9sJF.js +1 -0
- package/dist/client/assets/redirect-editor-D6KHsC0M.js +1 -0
- package/dist/client/assets/registry-C2SpOJjd.js +2 -0
- package/dist/client/assets/{registry-layout-DWDx18Gs.js → registry-layout-BZJDOdWz.js} +1 -1
- package/dist/client/assets/{reports-PMHpEHQ2.js → reports-0bkwbP7B.js} +1 -1
- package/dist/client/assets/{require-capability-ByZBV_vi.js → require-capability-ZHR0pgYI.js} +1 -1
- package/dist/client/assets/{required-auth-layout-BIQhfPe7.js → required-auth-layout-BczHZORq.js} +1 -1
- package/dist/client/assets/{reset-password-CjKPS-n3.js → reset-password-COgN7m3z.js} +1 -1
- package/dist/client/assets/{roles-Btj87vKr.js → roles-BvrKR6eV.js} +1 -1
- package/dist/client/assets/{search-input-ClLM0YYE.js → search-input-RItYBnRq.js} +1 -1
- package/dist/client/assets/{secrets-DOlH1wS-.js → secrets-D0UdjGnX.js} +1 -1
- package/dist/client/assets/{sections-editor-B86M8NM1.js → sections-editor-YqkyT2dk.js} +1 -1
- package/dist/client/assets/{select-CDSdt8fw.js → select-Ddz9NuOw.js} +1 -1
- package/dist/client/assets/{select-model-C_6qnRyS.js → select-model-CGoC4bru.js} +1 -1
- package/dist/client/assets/{self-tool-result-DaYACJ0n.js → self-tool-result-CRZICvmy.js} +1 -1
- package/dist/client/assets/{seo-editor-DMq-kqMV.js → seo-editor-JmC09E-T.js} +1 -1
- package/dist/client/assets/{settings-layout-BwDa1Kdm.js → settings-layout-CcuZgI21.js} +1 -1
- package/dist/client/assets/{settings-section-CW4NkTM6.js → settings-section-y0TY3QQz.js} +1 -1
- package/dist/client/assets/{shell-controls-C1BF0iiw.js → shell-controls-Bf-F5nfO.js} +1 -1
- package/dist/client/assets/{shell-layout-BLTnNvbt.js → shell-layout-CtR_VnY2.js} +1 -1
- package/dist/client/assets/{sidebar-7RoWud82.js → sidebar-4tITL9-j.js} +1 -1
- package/dist/client/assets/{skeleton-CHINK0-G.js → skeleton-CEbCDyXB.js} +1 -1
- package/dist/client/assets/{spinner-Ch6YiaO3.js → spinner-DA1qqmBF.js} +1 -1
- package/dist/client/assets/{sso-otN1zQLX.js → sso-DVLO8_9V.js} +1 -1
- package/dist/client/assets/store-registry-Bdhg587z.js +2 -0
- package/dist/client/assets/{store-Cyi0zNMM.js → store-vZKTlVw8.js} +1 -1
- package/dist/client/assets/{studio-tools-VaW1QNJX.js → studio-tools-CQ2rygf5.js} +1 -1
- package/dist/client/assets/{switch-5yajnsJ1.js → switch-DuNudDxw.js} +1 -1
- package/dist/client/assets/{synced-repos-DT7jZ4al.js → synced-repos-CfRbhLY3.js} +1 -1
- package/dist/client/assets/{tab-id-B-ZhKmzp.js → tab-id-yehNTD_Y.js} +1 -1
- package/dist/client/assets/{table-CGQtLSZX.js → table-BGuPhElJ.js} +1 -1
- package/dist/client/assets/{tabs-B9pbmfNS.js → tabs-DjzfxGSN.js} +1 -1
- package/dist/client/assets/{textarea-PTW5Gjko.js → textarea-_Pli16i3.js} +1 -1
- package/dist/client/assets/{toggle-group-DTqvTqtA.js → toggle-group-BMH9CGot.js} +1 -1
- package/dist/client/assets/{toolbar-DA64sova.js → toolbar-Dxwz1zDu.js} +1 -1
- package/dist/client/assets/{tooltip-D4n-WF2q.js → tooltip-CyXjvnKb.js} +1 -1
- package/dist/client/assets/{track-CtujQPYm.js → track-ZTi3rGvE.js} +1 -1
- package/dist/client/assets/{types-Dil0eUsT.js → types-CSDveaQ0.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DSPW7HA5.js → use-ai-providers-Cgq4fq_s.js} +1 -1
- package/dist/client/assets/{use-api-keys-CwXATxOd.js → use-api-keys-DxrzkSir.js} +1 -1
- package/dist/client/assets/{use-automations-C-VZMP6n.js → use-automations-Cy-Q13k9.js} +1 -1
- package/dist/client/assets/{use-autosave-Dz4TK2qS.js → use-autosave-BLqJyX9U.js} +1 -1
- package/dist/client/assets/{use-capability-if9Tx37f.js → use-capability-D3-UBGHo.js} +1 -1
- package/dist/client/assets/{use-clock-tick-BJJCAsNs.js → use-clock-tick-Bgw2dE7q.js} +1 -1
- package/dist/client/assets/{use-connection-CTtDScYT.js → use-connection-BEzC3g8f.js} +1 -1
- package/dist/client/assets/{use-copy-Bhq89_Kc.js → use-copy-D53s1qEg.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-DGJQwotb.js → use-create-virtual-mcp-ANUYf12Q.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-BOUcFzt5.js → use-debounced-autosave-BJZGzBBA.js} +1 -1
- package/dist/client/assets/{use-debounced-value-BTkSCUP8.js → use-debounced-value-CYa76Zmr.js} +1 -1
- package/dist/client/assets/{use-deco-credits-BMYnKYPH.js → use-deco-credits-WZGr7UOX.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-hcWdwEuS.js → use-decopilot-events-BV0PbrVT.js} +1 -1
- package/dist/client/assets/{use-delete-connection-BzQuIunM.js → use-delete-connection-Ccr3K0EP.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Dtk9gilM.js → use-deployment-admin-BTi-7IB8.js} +1 -1
- package/dist/client/assets/{use-file-configs-TjH-jCIl.js → use-file-configs-kOtKCUoV.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-BqNrHJAq.js → use-infinite-scroll-CONOHnuy.js} +1 -1
- package/dist/client/assets/{use-infra-billing-CTNpYocM.js → use-infra-billing-B4EAURSE.js} +1 -1
- package/dist/client/assets/{use-join-requests-BHFt0urj.js → use-join-requests-DtBvsbrF.js} +1 -1
- package/dist/client/assets/{use-mcp-client-C-LXOIxN.js → use-mcp-client-DTIaJzH5.js} +1 -1
- package/dist/client/assets/{use-mcp-tools--8cQ92eh.js → use-mcp-tools-JzoGZ6p1.js} +1 -1
- package/dist/client/assets/{use-members-Brt19w11.js → use-members-COIGrf9q.js} +1 -1
- package/dist/client/assets/{use-mobile-WonL71_u.js → use-mobile-BfoXl3UK.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-DF7sO83S.js → use-navigate-to-agent-CvPty0ka.js} +1 -1
- package/dist/client/assets/{use-open-billing-url-Cc23huFw.js → use-open-billing-url-49jCKOMZ.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-t9JfZIjw.js → use-org-auth-client-Dur3Yig8.js} +1 -1
- package/dist/client/assets/{use-org-sso-UKEGNTmI.js → use-org-sso-BcptYP89.js} +1 -1
- package/dist/client/assets/{use-organization-roles-CkLxPl_R.js → use-organization-roles-CWEb_6Wz.js} +1 -1
- package/dist/client/assets/{use-organization-settings-BaavpVJk.js → use-organization-settings-CNMbxTls.js} +1 -1
- package/dist/client/assets/{use-registry-connections-BMitvLFT.js → use-registry-connections-DAANgu0H.js} +1 -1
- package/dist/client/assets/{use-secrets-DxHmo3_h.js → use-secrets-BCJA-H_b.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-CmKT9IBD.js → use-section-preview-base-DwokRW01.js} +1 -1
- package/dist/client/assets/{use-status-sounds-DX2DHYLU.js → use-status-sounds-C8n706u8.js} +1 -1
- package/dist/client/assets/{use-tags-BXByInuC.js → use-tags-ah4hD1oP.js} +1 -1
- package/dist/client/assets/{use-view-mode-DWObKYOq.js → use-view-mode-Bf5q7usB.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DsDRQJX3.js → use-virtual-mcp-CChazQvN.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-B75UMXoa.js +1 -0
- package/dist/client/assets/{useRouterState-OwhrRUai.js → useRouterState-CdeKrYGj.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-2Xb4xxXy.js +1 -0
- package/dist/client/assets/{users-CnXnxHmT.js → users-DreFNVYF.js} +1 -1
- package/dist/client/assets/{variant-calendar-fCIvpvPi.js → variant-calendar-2VE-dx9u.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-BaqCYZ7S.js → view-mode-toggle-CKkq4yjo.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +442 -442
- package/dist/server/server.js +309 -309
- package/package.json +1 -1
- package/dist/client/assets/record-editor-BF9u1n6O.js +0 -1
- package/dist/client/assets/redirect-editor-CzmitCSW.js +0 -1
- package/dist/client/assets/registry-BO3JsbA7.js +0 -2
- package/dist/client/assets/store-registry-BRdj0CWe.js +0 -2
- package/dist/client/assets/useInfiniteQuery-BXmYrs00.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-MTcqeDuU.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,p as ge,t as N,j as s,B as te}from"./index-
|
|
1
|
+
import{c as oe,b as ae,F as re,o as de,r as ce,K as ie,n as me,e as X,p as ge,t as N,j as s,B as te}from"./index-5gemagf1.js";import{u as ue}from"./studio-tools-CQ2rygf5.js";import{b as fe,a as xe,S as Se}from"./settings-section-y0TY3QQz.js";import{B as ne}from"./badge-Ce3GqcFl.js";import{I as je}from"./input-Dolcjx-g.js";import{S as pe,a as he,b as Ne,c as ve,d as se}from"./select-Ddz9NuOw.js";function Me(e,t,o){switch(e){case"auto":return o("settings.domainSettings.joinModeHelpAuto",{domain:t});case"request":return o("settings.domainSettings.joinModeHelpRequest",{domain:t});default:return o("settings.domainSettings.joinModeHelpOff")}}function Re(){const e=oe.c(101),t=ae(),{org:o}=re(),p=de(),i=ue(),[r,v]=ce.useState("");let c;e[0]!==o.id?(c=ie.organizationDomains(o.id),e[0]=o.id,e[1]=c):c=e[1];let m;e[2]!==i?(m=()=>i.call("ORGANIZATION_DOMAIN_LIST",{}),e[2]=i,e[3]=m):m=e[3];let x;e[4]!==c||e[5]!==m?(x={queryKey:c,queryFn:m},e[4]=c,e[5]=m,e[6]=x):x=e[6];const{data:h,isPending:M}=me(x);let S;e[7]!==o.id||e[8]!==p?(S=()=>p.invalidateQueries({queryKey:ie.organizationDomains(o.id)}),e[7]=o.id,e[8]=p,e[9]=S):S=e[9];const a=S;let g;e[10]!==i?(g=n=>i.call("ORGANIZATION_DOMAIN_ADD",{domain:n}),e[10]=i,e[11]=g):g=e[11];let u;e[12]!==a||e[13]!==o.id||e[14]!==t?(u=()=>{ge("organization_domain_added",{organization_id:o.id}),v(""),a(),N.success(t("settings.domainSettings.domainAdded"))},e[12]=a,e[13]=o.id,e[14]=t,e[15]=u):u=e[15];let f;e[16]!==t?(f=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedAddDomain")),e[16]=t,e[17]=f):f=e[17];let j;e[18]!==g||e[19]!==u||e[20]!==f?(j={mutationFn:g,onSuccess:u,onError:f},e[18]=g,e[19]=u,e[20]=f,e[21]=j):j=e[21];const d=X(j);let I;e[22]!==i?(I=n=>{const{id:l,joinMode:D}=n;return i.call("ORGANIZATION_DOMAIN_UPDATE",{id:l,joinMode:D})},e[22]=i,e[23]=I):I=e[23];let A;e[24]!==a||e[25]!==t?(A=()=>{a(),N.success(t("settings.domainSettings.joinModeUpdated"))},e[24]=a,e[25]=t,e[26]=A):A=e[26];let b;e[27]!==t?(b=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedUpdate")),e[27]=t,e[28]=b):b=e[28];let U;e[29]!==b||e[30]!==I||e[31]!==A?(U={mutationFn:I,onSuccess:A,onError:b},e[29]=b,e[30]=I,e[31]=A,e[32]=U):U=e[32];const Q=X(U);let O;e[33]!==i?(O=n=>i.call("ORGANIZATION_DOMAIN_VERIFY",{id:n}),e[33]=i,e[34]=O):O=e[34];let y;e[35]!==a||e[36]!==t?(y=n=>{a(),n.verified?N.success(t("settings.domainSettings.domainVerified")):N.error(t("settings.domainSettings.txtRecordNotFound"))},e[35]=a,e[36]=t,e[37]=y):y=e[37];let E;e[38]!==t?(E=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedVerify")),e[38]=t,e[39]=E):E=e[39];let Y;e[40]!==O||e[41]!==y||e[42]!==E?(Y={mutationFn:O,onSuccess:y,onError:E},e[40]=O,e[41]=y,e[42]=E,e[43]=Y):Y=e[43];const R=X(Y);let C;e[44]!==i?(C=n=>i.call("ORGANIZATION_DOMAIN_REMOVE",{id:n}),e[44]=i,e[45]=C):C=e[45];let P;e[46]!==a||e[47]!==t?(P=()=>{a(),N.success(t("settings.domainSettings.domainRemoved"))},e[46]=a,e[47]=t,e[48]=P):P=e[48];let _;e[49]!==t?(_=n=>N.error(n instanceof Error?n.message:t("settings.domainSettings.failedRemove")),e[49]=t,e[50]=_):_=e[50];let $;e[51]!==C||e[52]!==P||e[53]!==_?($={mutationFn:C,onSuccess:P,onError:_},e[51]=C,e[52]=P,e[53]=_,e[54]=$):$=e[54];const T=X($);if(M)return null;let L;e[55]!==h?.domains?(L=h?.domains??[],e[55]=h?.domains,e[56]=L):L=e[56];const ee=L;let V;e[57]!==t?(V=t("settings.domainSettings.emailDomains"),e[57]=t,e[58]=V):V=e[58];let F;e[59]!==t?(F=t("settings.domainSettings.emailDomainsDescription"),e[59]=t,e[60]=F):F=e[60];let k;if(e[61]!==ee||e[62]!==T||e[63]!==t||e[64]!==Q||e[65]!==R){let n;e[67]!==T||e[68]!==t||e[69]!==Q||e[70]!==R?(n=l=>{const D=l.verificationStatus==="verified";return s.jsx(fe,{title:s.jsxs("span",{className:"flex items-center gap-2",children:[l.domain,D?s.jsx(ne,{variant:"secondary",children:t("settings.domainSettings.verified")}):s.jsx(ne,{variant:"outline",children:t("settings.domainSettings.pending")})]}),description:D?Me(l.joinMode,l.domain,t):t("settings.domainSettings.addDnsRecordInstruction"),action:s.jsxs("div",{className:"flex items-center gap-2",children:[D&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.domainSettings.joinMode")}),s.jsxs(pe,{value:l.joinMode,onValueChange:le=>Q.mutate({id:l.id,joinMode:le}),children:[s.jsx(he,{className:"w-44",size:"sm",children:s.jsx(Ne,{})}),s.jsxs(ve,{children:[s.jsx(se,{value:"off",children:t("settings.domainSettings.joinModeOff")}),s.jsx(se,{value:"auto",children:t("settings.domainSettings.joinModeAuto")}),s.jsx(se,{value:"request",children:t("settings.domainSettings.joinModeRequest")})]})]})]}),!D&&s.jsx(te,{size:"sm",variant:"outline",onClick:()=>R.mutate(l.id),disabled:R.isPending,children:t("settings.domainSettings.verify")}),s.jsx(te,{size:"sm",variant:"ghost",onClick:()=>T.mutate(l.id),disabled:T.isPending,children:t("settings.domainSettings.remove")})]}),children:!D&&l.recordName&&l.recordValue&&s.jsx(Ie,{recordName:l.recordName,recordValue:l.recordValue})},l.id)},e[67]=T,e[68]=t,e[69]=Q,e[70]=R,e[71]=n):n=e[71],k=ee.map(n),e[61]=ee,e[62]=T,e[63]=t,e[64]=Q,e[65]=R,e[66]=k}else k=e[66];let J;e[72]===Symbol.for("react.memo_cache_sentinel")?(J=n=>v(n.target.value),e[72]=J):J=e[72];let q;e[73]!==t?(q=t("settings.domainSettings.domainPlaceholder"),e[73]=t,e[74]=q):q=e[74];let z;e[75]!==r||e[76]!==q?(z=s.jsx(je,{value:r,onChange:J,placeholder:q,className:"max-w-xs"}),e[75]=r,e[76]=q,e[77]=z):z=e[77];let w;e[78]!==d||e[79]!==r?(w=()=>d.mutate(r.trim()),e[78]=d,e[79]=r,e[80]=w):w=e[80];let G;e[81]!==d.isPending||e[82]!==r?(G=!r.trim()||d.isPending,e[81]=d.isPending,e[82]=r,e[83]=G):G=e[83];let Z;e[84]!==d.isPending||e[85]!==t?(Z=d.isPending?t("settings.domainSettings.adding"):t("settings.domainSettings.addDomain"),e[84]=d.isPending,e[85]=t,e[86]=Z):Z=e[86];let B;e[87]!==w||e[88]!==G||e[89]!==Z?(B=s.jsx(te,{size:"sm",onClick:w,disabled:G,children:Z}),e[87]=w,e[88]=G,e[89]=Z,e[90]=B):B=e[90];let H;e[91]!==z||e[92]!==B?(H=s.jsxs("div",{className:"flex items-center gap-2 p-4",children:[z,B]}),e[91]=z,e[92]=B,e[93]=H):H=e[93];let K;e[94]!==k||e[95]!==H?(K=s.jsxs(xe,{children:[k,H]}),e[94]=k,e[95]=H,e[96]=K):K=e[96];let W;return e[97]!==V||e[98]!==F||e[99]!==K?(W=s.jsx(Se,{title:V,description:F,children:K}),e[97]=V,e[98]=F,e[99]=K,e[100]=W):W=e[100],W}function Ie(e){const t=oe.c(34),{recordName:o,recordValue:p}=e,i=ae();let r;t[0]!==i?(r=I=>{navigator.clipboard?.writeText(I),N.success(i("settings.domainSettings.copied"))},t[0]=i,t[1]=r):r=t[1];const v=r;let c;t[2]!==i?(c=i("settings.domainSettings.dnsInstructions"),t[2]=i,t[3]=c):c=t[3];let m;t[4]!==c?(m=s.jsx("p",{className:"text-muted-foreground",children:c}),t[4]=c,t[5]=m):m=t[5];let x;t[6]!==v||t[7]!==o?(x=()=>v(o),t[6]=v,t[7]=o,t[8]=x):x=t[8];let h;t[9]!==i?(h=i("settings.domainSettings.txt"),t[9]=i,t[10]=h):h=t[10];let M;t[11]!==h?(M=s.jsxs("span",{className:"text-muted-foreground",children:[h," "]}),t[11]=h,t[12]=M):M=t[12];let S;t[13]!==o||t[14]!==x||t[15]!==M?(S=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:x,children:[M,o]}),t[13]=o,t[14]=x,t[15]=M,t[16]=S):S=t[16];let a;t[17]!==v||t[18]!==p?(a=()=>v(p),t[17]=v,t[18]=p,t[19]=a):a=t[19];let g;t[20]!==i?(g=i("settings.domainSettings.value"),t[20]=i,t[21]=g):g=t[21];let u;t[22]!==g?(u=s.jsxs("span",{className:"text-muted-foreground",children:[g," "]}),t[22]=g,t[23]=u):u=t[23];let f;t[24]!==p||t[25]!==u||t[26]!==a?(f=s.jsxs("button",{type:"button",className:"text-left font-mono break-all hover:underline",onClick:a,children:[u,p]}),t[24]=p,t[25]=u,t[26]=a,t[27]=f):f=t[27];let j;t[28]!==f||t[29]!==S?(j=s.jsxs("div",{className:"grid gap-1",children:[S,f]}),t[28]=f,t[29]=S,t[30]=j):j=t[30];let d;return t[31]!==j||t[32]!==m?(d=s.jsxs("div",{className:"mt-3 rounded-lg border border-border bg-muted/40 p-3 text-xs space-y-2",children:[m,j]}),t[31]=j,t[32]=m,t[33]=d):d=t[33],d}export{Re as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,j as s,cw as i,m as c}from"./index-
|
|
1
|
+
import{c as d,j as s,cw as i,m as c}from"./index-5gemagf1.js";function x(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Root,{"data-slot":"drawer",...t}),e[2]=t,e[3]=a):a=e[3],a}function v(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Trigger,{"data-slot":"drawer-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function w(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Portal,{"data-slot":"drawer-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function b(l){const e=d.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(i.Close,{"data-slot":"drawer-close",...t}),e[2]=t,e[3]=a):a=e[3],a}function m(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Overlay,{"data-slot":"drawer-overlay",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function g(l){const e=d.c(12);let t,a,r;e[0]!==l?({className:a,children:t,...r}=l,e[0]=l,e[1]=t,e[2]=a,e[3]=r):(t=e[1],a=e[2],r=e[3]);let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(m,{}),e[4]=o):o=e[4];let n;e[5]!==a?(n=c("group/drawer-content bg-background fixed z-50 flex h-auto flex-col","data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-lg data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[95vh] data-[vaul-drawer-direction=bottom]:rounded-t-lg data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=right]:sm:max-w-sm","data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=left]:sm:max-w-sm",a),e[5]=a,e[6]=n):n=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e[7]=f):f=e[7];let u;return e[8]!==t||e[9]!==r||e[10]!==n?(u=s.jsxs(w,{"data-slot":"drawer-portal",children:[o,s.jsxs(i.Content,{"data-slot":"drawer-content",className:n,...r,children:[f,t]})]}),e[8]=t,e[9]=r,e[10]=n,e[11]=u):u=e[11],u}function h(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("flex flex-col gap-1.5 px-4 py-2",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-header",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function j(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("mt-auto flex flex-col gap-2 p-4",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx("div",{"data-slot":"drawer-footer",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function D(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-foreground font-semibold",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Title,{"data-slot":"drawer-title",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}function N(l){const e=d.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let r;e[3]!==t?(r=c("text-muted-foreground text-sm",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==a||e[6]!==r?(o=s.jsx(i.Description,{"data-slot":"drawer-description",className:r,...a}),e[5]=a,e[6]=r,e[7]=o):o=e[7],o}export{x as D,g as a,D as b,h as c,v as d,b as e,j as f,N as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c,j as i,dL as f,dM as m,m as u,dN as g,dO as x,dP as v,dQ as b,dR as h,dS as w,dT as j,dU as N,dV as z,dW as _,dX as y,dY as p}from"./index-
|
|
1
|
+
import{c,j as i,dL as f,dM as m,m as u,dN as g,dO as x,dP as v,dQ as b,dR as h,dS as w,dT as j,dU as N,dV as z,dW as _,dX as y,dY as p}from"./index-5gemagf1.js";import{i as $}from"./Check-BVTsyPDh.js";import{i as D}from"./ChevronRight-BEp1VAsd.js";import{i as M}from"./DotsVertical-C6DREveP.js";function C(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(f,{"data-slot":"dropdown-menu",...t}),e[2]=t,e[3]=s):s=e[3],s}function T(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(m,{"data-slot":"dropdown-menu-trigger",...t}),e[2]=t,e[3]=s):s=e[3],s}function L(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,sideOffset:o,...s}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);const n=o===void 0?4:o;let r;e[4]!==t?(r=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border p-1 shadow-md",t),e[4]=t,e[5]=r):r=e[5];let d;return e[6]!==s||e[7]!==n||e[8]!==r?(d=i.jsx(x,{children:i.jsx(v,{"data-slot":"dropdown-menu-content",sideOffset:n,translate:"no",className:r,...s})}),e[6]=s,e[7]=n,e[8]=r,e[9]=d):d=e[9],d}function O(a){const e=c.c(12);let t,s,o,n;e[0]!==a?({className:t,inset:s,variant:n,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);const r=n===void 0?"default":n;let d;e[5]!==t?(d=u("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[5]=t,e[6]=d):d=e[6];let l;return e[7]!==s||e[8]!==o||e[9]!==d||e[10]!==r?(l=i.jsx(g,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":r,className:d,...o}),e[7]=s,e[8]=o,e[9]=d,e[10]=r,e[11]=l):l=e[11],l}function E(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:o,children:s,checked:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==o?(r=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx($,{className:"size-4"})})}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==s||e[10]!==n||e[11]!==r?(l=i.jsxs(h,{"data-slot":"dropdown-menu-checkbox-item",className:r,checked:t,...n,children:[d,s]}),e[8]=t,e[9]=s,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function G(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(_,{"data-slot":"dropdown-menu-radio-group",...t}),e[2]=t,e[3]=s):s=e[3],s}function P(a){const e=c.c(11);let t,s,o;e[0]!==a?({className:s,children:t,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==s?(n=u("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-lg py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[4]=s,e[5]=n):n=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:i.jsx(p,{children:i.jsx(M,{className:"size-2 fill-current"})})}),e[6]=r):r=e[6];let d;return e[7]!==t||e[8]!==o||e[9]!==n?(d=i.jsxs(y,{"data-slot":"dropdown-menu-radio-item",className:n,...o,children:[r,t]}),e[7]=t,e[8]=o,e[9]=n,e[10]=d):d=e[10],d}function Q(a){const e=c.c(10);let t,s,o;e[0]!==a?({className:t,inset:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o):(t=e[1],s=e[2],o=e[3]);let n;e[4]!==t?(n=u("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),e[4]=t,e[5]=n):n=e[5];let r;return e[6]!==s||e[7]!==o||e[8]!==n?(r=i.jsx(b,{"data-slot":"dropdown-menu-label","data-inset":s,className:n,...o}),e[6]=s,e[7]=o,e[8]=n,e[9]=r):r=e[9],r}function U(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("bg-border -mx-1 my-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(w,{"data-slot":"dropdown-menu-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}function V(a){const e=c.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=i.jsx(j,{"data-slot":"dropdown-menu-sub",...t}),e[2]=t,e[3]=s):s=e[3],s}function W(a){const e=c.c(13);let t,s,o,n;e[0]!==a?({className:s,inset:o,children:t,...n}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=n):(t=e[1],s=e[2],o=e[3],n=e[4]);let r;e[5]!==s?(r=u("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-lg px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8",s),e[5]=s,e[6]=r):r=e[6];let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(D,{className:"ml-auto size-4"}),e[7]=d):d=e[7];let l;return e[8]!==t||e[9]!==o||e[10]!==n||e[11]!==r?(l=i.jsxs(N,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r,...n,children:[t,d]}),e[8]=t,e[9]=o,e[10]=n,e[11]=r,e[12]=l):l=e[12],l}function X(a){const e=c.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=u("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",t),e[3]=t,e[4]=o):o=e[4];let n;return e[5]!==s||e[6]!==o?(n=i.jsx(z,{"data-slot":"dropdown-menu-sub-content",translate:"no",className:o,...s}),e[5]=s,e[6]=o,e[7]=n):n=e[7],n}export{T as D,O as a,L as b,C as c,V as d,W as e,X as f,G as g,P as h,U as i,Q as j,E as k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as v,m as N,j as t}from"./index-
|
|
1
|
+
import{c as v,m as N,j as t}from"./index-5gemagf1.js";function y(){const x=v.c(1);let e;return x[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("img",{src:"/empty-state-cards.png",alt:"",width:336,height:320,"aria-hidden":"true"}),x[0]=e):e=x[0],e}function C(x){const e=v.c(24),{image:f,title:p,description:u,actions:o,className:h,descriptionClassName:j,actionsClassName:g}=x;let s;e[0]!==h?(s=N("flex flex-1 flex-col items-center justify-center gap-8 p-4",h),e[0]=h,e[1]=s):s=e[1];let l;e[2]!==f?(l=f!==null&&t.jsx("div",{className:"flex items-center justify-center",children:f??t.jsx(y,{})}),e[2]=f,e[3]=l):l=e[3];let i;e[4]!==p?(i=t.jsx("h3",{className:"text-center text-lg font-medium text-foreground",children:p}),e[4]=p,e[5]=i):i=e[5];let c;e[6]!==j?(c=N("text-sm text-muted-foreground text-center max-w-[300px]",j),e[6]=j,e[7]=c):c=e[7];let a;e[8]!==u||e[9]!==c?(a=t.jsx("div",{className:c,children:u}),e[8]=u,e[9]=c,e[10]=a):a=e[10];let n;e[11]!==i||e[12]!==a?(n=t.jsxs("div",{className:"flex flex-col items-center gap-2",children:[i,a]}),e[11]=i,e[12]=a,e[13]=n):n=e[13];let r;e[14]!==o||e[15]!==g?(r=o&&t.jsx("div",{className:N("flex items-center gap-2",g),children:o}),e[14]=o,e[15]=g,e[16]=r):r=e[16];let m;e[17]!==n||e[18]!==r?(m=t.jsxs("div",{className:"flex flex-col items-center gap-4",children:[n,r]}),e[17]=n,e[18]=r,e[19]=m):m=e[19];let d;return e[20]!==s||e[21]!==l||e[22]!==m?(d=t.jsxs("div",{className:s,children:[l,m]}),e[20]=s,e[21]=l,e[22]=m,e[23]=d):d=e[23],d}export{C as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as I}from"./metadata-dUsYcpuu.js";import"./index-
|
|
1
|
+
import{g as I}from"./metadata-dUsYcpuu.js";import"./index-5gemagf1.js";import{W as T,n as E}from"./use-mcp-client-DTIaJzH5.js";function U(t){if(!t)return null;const e=typeof t=="string"?t:t.url;if(!e)return null;const n=e.match(/github\.com[/:]([^/]+)\/([^/]+?)(?:\.git)?\/?$/);return n?{owner:n[1]||"",repo:n[2]||""}:null}function H(t){const e=U(t);if(!e)return null;const n=`https://github.com/${e.owner}.png`;return`https://images.weserv.nl/?url=${encodeURIComponent(n)}&output=webp`}function L(t,e){return t===T.REGISTRY(e)||t===T.COMMUNITY_REGISTRY(e)}function B(t,e){return L(t,e)?"COLLECTION_REGISTRY_APP_LIST":"REGISTRY_ITEM_LIST"}function J(t){if(!t)return[];const e=[];for(const n of t){let a=[];if(Array.isArray(n))a=n;else if(typeof n=="object"&&n!==null){const r=Object.keys(n).find(o=>Array.isArray(n[o]));r&&(a=n[r])}e.push(...a)}return e}const D={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function G(t){return t?D[t]??t.toUpperCase():null}function Q(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const e=Object.keys(t).find(n=>Array.isArray(t[n]));if(e)return t[e]}return[]}async function X(t,e,n,a,r){const o=await E({connectionId:t,orgId:e,orgSlug:n});try{const s=await o.callTool({name:a,arguments:r});return s.structuredContent??s}finally{await o.close().catch(console.error)}}let Y="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",$=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=Y[n[t]&63];return e};function j(t){return`${t}_${$()}`}function V(t){return I(t._meta)?.appName||t.server?.name||null}function K(t){if(!t?.url)return"Unknown";try{return new URL(t.url).hostname}catch{return t.url}}function W(t){const e=t?.identifier||t?.name;return e?e.replace(/^@[^/]+\//,"").replace(/[-_]/g," ").replace(/\b\w/g,a=>a.toUpperCase()):"Unknown"}function Z(t,e,n,a){const r=t.server,o=I(t._meta),s=new Date().toISOString(),R=o?.friendlyName||o?.friendly_name||t.title||r?.title||r?.name||"Unnamed MCP Server",k=r?.description||null,w=r?.icons?.[0]?.src||H(r?.repository)||null,i=o?.oauth_config,A=i&&typeof i.authorizationEndpoint=="string"&&typeof i.tokenEndpoint=="string"&&typeof i.clientId=="string"&&Array.isArray(i.scopes)&&(i.grantType==="authorization_code"||i.grantType==="client_credentials")?i:null,C=o?.configuration_state,v=o?.configuration_scopes,P=r?.repository?{url:r.repository.url,source:r.repository.source,subfolder:r.repository.subfolder}:null,p=r?.packages??[],g=r?.remotes??[],S=a?.packageIndex??0,N=a?.remoteIndex??0,y=p.length>0&&(a?.packageIndex!==void 0||g.length===0),c=y?p[S]:null,l=y?null:g[N];let u,f,h=null;if(c){const _=c.identifier||c.name;u="STDIO",f="";const m={};if(c.environmentVariables)for(const b of c.environmentVariables)b.name&&(m[b.name]="");h={command:"npx",args:_?["-y",_]:[],...Object.keys(m).length>0&&{envVars:m}}}else l?(u=G(l.type)||"HTTP",f=l.url||""):(u="HTTP",f="");const M=g.length>1,O=p.length>1;let d="";c&&O?d=` (${W(c)})`:l&&M&&(d=` (${K(l)})`);const x=R+d;return{id:j("conn"),title:x,description:k,icon:w,app_name:V(t),app_id:o?.id||t.id||null,connection_type:u,connection_url:f,connection_token:null,connection_headers:h,oauth_config:A,configuration_state:C??null,configuration_scopes:v??null,metadata:{source:"store",registry_item_id:t.id,verified:o?.verified??!1,scopeName:o?.scopeName??null,toolsCount:o?.tools?.length??0,publishedAt:o?.publishedAt??null,repository:P},created_at:s,updated_at:s,created_by:n,organization_id:e,tools:null,bindings:null,status:"inactive"}}export{V as a,H as b,X as c,Q as d,Z as e,J as f,j as g,B as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as se,b as Me,r as u,j as r,k as fe,B as De,e8 as Jt,aH as Zt,aN as xe,e9 as en,ea as tn,eb as nn,ec as rn,bU as on,ed as sn,ee as lt,aJ as an,ef as ln,eg as cn,eh as dn,ei as un,ej as fn,ek as pn,el as mn,em as xn,en as hn,m as le,o as gn,t as ne,K as Ze}from"./index-CCLrlcV5.js";import{F as bn,l as yn}from"./monaco-editor-DKEoDpqg.js";import{e as vn,aZ as Cn,a_ as wn}from"./agent-icon-B5lPNSsP.js";import{s as Nn}from"./XClose-NC_Nso5p.js";import{B as jn}from"./automation-runs-j2r--LSH.js";import{c as et,T as tt,a as nt}from"./tooltip-D4n-WF2q.js";import{a as En}from"./chat-context-6z6Usp8t.js";import{u as Sn}from"./shell-layout-BLTnNvbt.js";import{i as Dn,E as Mn,a as Ae,b as Rn,f as Tn,g as Pn,c as kn,t as re,d as we,e as Le,h as Ne,j as Oe,k as Ie,l as Fn,s as An,v as Ln,m as $e,n as je,o as rt,p as On,q as Ee,r as Ke,w as In,x as $n,y as Kn,z as zn}from"./index-B4LwrR_z.js";import{b as _n,h as Gn,a as Bn,c as Un,d as Vn,e as Hn}from"./dialog-6eLF19WZ.js";import{I as ot}from"./input-D-IOsTjg.js";import{A as qn,a as Wn,b as Qn,c as Xn,d as Yn,e as Jn,f as Zn,g as er}from"./alert-dialog-jruC7mBq.js";import{t as tr}from"./ChevronDown-Dg-G9Bza.js";import{i as nr}from"./ChevronRight-D--quDsb.js";import{i as rr}from"./Share07-CnHohhT8.js";import"./spinner-Ch6YiaO3.js";import"./delay-CnY5UFtP.js";import"./AlertCircle-B5sDezf-.js";import"./Tool01-Cn0-xBBt.js";import"./ArrowUp-BCKIIXqC.js";import"./ArrowLeft-hINWrmDM.js";import"./Tool02-BlzqzZAJ.js";import"./XCircle-BhdQMcW8.js";import"./ArrowUpRight-D9wNgkJO.js";import"./TrendUp01-B8cusAvZ.js";import"./ZapSquare-BEEyAqSI.js";import"./Users03-c4O2AlzH.js";import"./CheckCircle-hJqs3poK.js";import"./Check-DvgcRTBi.js";import"./ChevronUp-DVfjlsaH.js";import"./DotsVertical-Dna5iyxv.js";import"./Stars02-Cw0-QoyL.js";import"./Copy01-A-iF56j2.js";import"./CpuChip01-C4a1EmKL.js";import"./CreditCard01-DD3YsjP8.js";import"./Globe01-DDNwpjh5.js";import"./Settings02-nh2DxBto.js";import"./Eye-Sv9L0hDt.js";import"./FilterLines-BP3DhNOH.js";import"./Star01-Dtu6SkUk.js";import"./Globe04-akm1kAFe.js";import"./SwitchHorizontal01-Buu6mw-W.js";import"./HardDrive-CK5PbODV.js";import"./Key01-LdZJmUXU.js";import"./LayoutLeft-DTYf3Zp9.js";import"./LinkExternal01-BaEq__IR.js";import"./LogOut01-1f2QOh82.js";import"./Monitor01-DPJi2KGo.js";import"./Sun-CPY69DKL.js";import"./Palette-DpXIzWgD.js";import"./Play-CFJ7WwbI.js";import"./Plus-DzzDYhDH.js";import"./SearchLg-Ddza_Jes.js";import"./SearchMd-DheaqQdu.js";import"./Shield01-CDtPaxfg.js";import"./Stars01-C_U8OZIq.js";import"./Trash01-C3hHB6NE.js";import"./Upload01-DOECu3Z7.js";import"./User01-v0JW3r6M.js";import"./Users01-Bo461Fnp.js";import"./X-D4P_xotm.js";import"./Zap-UDNJrio-.js";import"./select-CDSdt8fw.js";import"./useInfiniteQuery-BXmYrs00.js";import"./use-infinite-scroll-BqNrHJAq.js";import"./use-connection-CTtDScYT.js";import"./use-mcp-client-C-LXOIxN.js";import"./auth-Bz9lRoBo.js";import"./use-virtual-mcp-DsDRQJX3.js";import"./card-DYQ6zVHs.js";import"./sidebar-7RoWud82.js";import"./use-mobile-WonL71_u.js";import"./table-CGQtLSZX.js";import"./empty-state-BT_HKEND.js";import"./use-members-Brt19w11.js";import"./use-org-auth-client-t9JfZIjw.js";import"./use-clock-tick-BJJCAsNs.js";import"./use-automations-C-VZMP6n.js";import"./studio-tools-VaW1QNJX.js";import"./useSuspenseInfiniteQuery-MTcqeDuU.js";import"./avatar-D4NA2Bhx.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Bhq89_Kc.js";import"./tab-id-B-ZhKmzp.js";import"./hooks-15WKVCFA.js";import"./decopilot-sse-pool-CBWbLfMa.js";import"./backoff-CrEUbyZT.js";import"./types-Dil0eUsT.js";import"./integration-icon-B83LqhIA.js";import"./use-navigate-to-agent-DF7sO83S.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-Cu0CqzUJ.js";import"./index-DuQpNddO.js";import"./form-BMN1fUOX.js";import"./label-D1FqNbWH.js";import"./file-type-icon-rCrXf4Wk.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DSPW7HA5.js";import"./use-decopilot-events-hcWdwEuS.js";import"./use-organization-settings-BaavpVJk.js";import"./required-auth-layout-BIQhfPe7.js";import"./use-org-sso-UKEGNTmI.js";import"./drawer-gzblMb4G.js";import"./collection-search-BEi_6zWf.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-B9pbmfNS.js";import"./toggle-group-DTqvTqtA.js";import"./use-deco-credits-BMYnKYPH.js";import"./popover-C80X4J3B.js";import"./self-tool-result-DaYACJ0n.js";import"./extract-connection-data-CXHDzEiJ.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-BTkSCUP8.js";import"./authenticate-and-persist-oauth-Dgj4f6Ax.js";import"./mcp-oauth-BcVMm2uf.js";import"./track-CtujQPYm.js";import"./toolbar-DA64sova.js";import"./skeleton-CHINK0-G.js";import"./github-repo-picker-D7fRmvNp.js";import"./use-mcp-tools--8cQ92eh.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-VoqZ5QIL.js";import"./use-registry-connections-BMitvLFT.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-PTW5Gjko.js";import"./connection-form-helpers-B4Paw6j5.js";import"./collection-tabs-z4TGwElC.js";import"./badge-BjVK4C89.js";import"./use-open-billing-url-Cc23huFw.js";import"./select-model-C_6qnRyS.js";import"./checkbox-BYUUT_OQ.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-CW4NkTM6.js";import"./cards-B0hdhTBg.js";import"./dropdown-menu-AtDwBl9o.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DX2DHYLU.js";import"./use-capability-if9Tx37f.js";import"./pt-BR-CLy76QW2.js";import"./switch-5yajnsJ1.js";import"./use-debounced-autosave-BOUcFzt5.js";import"./index-Dpu2EeKk.js";import"./search-input-ClLM0YYE.js";import"./index-CGSTZ1ZU.js";import"./use-secrets-DxHmo3_h.js";import"./AreaChart-B14o5fmp.js";import"./use-tags-BXByInuC.js";import"./get-initials-D-f_fDFw.js";import"./command-Dy--q7-N.js";import"./index-DP9nGBt7.js";import"./use-file-configs-TjH-jCIl.js";import"./automation-list-row-BDhubR9Y.js";const or={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function sr(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:v}=i,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,k]=u.useState(j),[Z,q]=u.useState(s),y=or[a];s!==Z&&(q(s),s&&k(j));let b;e[0]!==d||e[1]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const F=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(_n,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Gn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Bn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>k(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let $;e[38]!==R||e[39]!==G?($=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=$):$=e[40];let W;e[41]!==v?(W=()=>v(!1),e[41]=v,e[42]=W):W=e[42];let K;e[43]!==x?(K=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=K):K=e[44];let z;e[45]!==d||e[46]!==W||e[47]!==K?(z=r.jsx(De,{type:"button",variant:"outline",onClick:W,disabled:d,children:K}),e[45]=d,e[46]=W,e[47]=K,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let L;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(L=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=L):L=e[55];let U;e[56]!==B||e[57]!==L?(U=r.jsx(De,{type:"submit",disabled:B,children:L}),e[56]=B,e[57]=L,e[58]=U):U=e[58];let O;e[59]!==z||e[60]!==U?(O=r.jsxs(Un,{children:[z,U]}),e[59]=z,e[60]=U,e[61]=O):O=e[61];let V;e[62]!==I||e[63]!==$||e[64]!==O||e[65]!==N?(V=r.jsx(Vn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,$,O]})}),e[62]=I,e[63]=$,e[64]=O,e[65]=N,e[66]=V):V=e[66];let ee;return e[67]!==F||e[68]!==s||e[69]!==V?(ee=r.jsx(Hn,{open:s,onOpenChange:F,children:V}),e[67]=F,e[68]=s,e[69]=V,e[70]=ee):ee=e[70],ee}function ar(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:h}=i,f=Me(),v=s?.kind==="directory",j=s!==null,d=v?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(qn,{children:x}),e[3]=x,e[4]=g):g=e[4];let k;e[5]!==f?(k=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=k):k=e[6];const Z=s?.name;let q;e[7]!==Z?(q=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=q):q=e[8];let y;e[9]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==a.length||e[13]!==f?(b=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=f,e[14]=b):b=e[14];let F;e[15]!==k||e[16]!==q||e[17]!==y||e[18]!==b?(F=r.jsxs(Wn,{children:[k," ",q,y,b]}),e[15]=k,e[16]=q,e[17]=y,e[18]=b,e[19]=F):F=e[19];let A;e[20]!==F||e[21]!==g?(A=r.jsxs(Qn,{children:[g,F]}),e[20]=F,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(Xn,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx(Yn,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Jn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(Zn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(er,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ir]=an(ze,[lt]),J=lt(),[lr,ct]=ir(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[h,f]=u.useState(!1),v=J(e),j=on(a),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(lr,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...v,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:v}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var cr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(nn,{...a,...s})};pt.displayName=cr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{i.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{i.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var dr="ContextMenuGroup",ur=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});ur.displayName=dr;var fr="ContextMenuLabel",pr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});ht.displayName=mr;var xr="ContextMenuCheckboxItem",hr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});hr.displayName=xr;var gr="ContextMenuRadioGroup",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioItem",vr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuItemIndicator",wr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});wr.displayName=Cr;var Nr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(tn,{...l,...a,ref:e})});gt.displayName=Nr;var jr="ContextMenuArrow",Er=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Er.displayName=jr;var Sr="ContextMenuSubTrigger",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubContent",Rr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(hn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Tr=dt,Pr=ft,kr=pt,Fr=xt,Ar=ht,Lr=gt;function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Pr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function $r(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(kr,{children:r.jsx(Fr,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function ue(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let v;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(v=r.jsx(Ar,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:f,...l}),e[7]=a,e[8]=l,e[9]=f,e[10]=h,e[11]=v):v=e[11],v}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Lr,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const Kr="#d9a441";function zr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:v,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:k,onRename:Z,onDelete:q}=i,y=h===void 0?!1:h,b=Me(),F=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${a*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==F||e[10]!==l||e[11]!==y?(R=F?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(tr,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(nr,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(rr,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=F,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(st,{}),e[31]=$):$=e[31];let W;e[32]!==b?(W=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=W):W=e[33];let K;e[34]!==g||e[35]!==W?(K=r.jsx(ue,{onSelect:g,children:W}),e[34]=g,e[35]=W,e[36]=K):K=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==k||e[40]!==z?(B=r.jsx(ue,{onSelect:k,children:z}),e[39]=k,e[40]=z,e[41]=B):B=e[41];let L;e[42]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(st,{}),e[42]=L):L=e[42];let U;e[43]!==b?(U=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=U):U=e[44];let O;e[45]!==Z||e[46]!==U?(O=r.jsx(ue,{onSelect:Z,children:U}),e[45]=Z,e[46]=U,e[47]=O):O=e[47];let V;e[48]!==b?(V=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=V):V=e[49];let ee;e[50]!==q||e[51]!==V?(ee=r.jsx(ue,{variant:"destructive",onSelect:q,children:V}),e[50]=q,e[51]=V,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==K||e[56]!==B||e[57]!==O||e[58]!==ee?(_=r.jsxs($r,{className:"w-52",children:[X,G,$,K,B,L,O,ee]}),e[53]=X,e[54]=G,e[55]=K,e[56]=B,e[57]=O,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Or,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}yn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,_r=2,Gr=250,it=200;function Br(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Ur(i){const e=se.c(9),{text:s,query:a}=i;let l,m,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:v,segments:j}=Fn(s,a);l="truncate font-mono text-muted-foreground",m=v&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function za({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[v,j]=u.useState(new Set),[d,x]=u.useState(null),[g,k]=u.useState(null),[Z,q]=u.useState([]),[y,b]=u.useState(""),[F,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),$=u.useRef(0),W=u.useRef(null),K=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),L=u.useRef(0),U=u.useRef(null),O=u.useRef(null),V=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=En(),{openSidePanel:yt}=Sn(),ge=gn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Br(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=Kn(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>we(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=we(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){q(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const C=t(c);C&&o.set(C,p)}return o}),k(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=we(t);k(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Ie(o))C.add(ce);return C.add(o),C}),k({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=Ne(o),p=Ee(c,n);if(p===o){oe(null);return}if(Ke(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ge(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Ln(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,W.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Dn(t)&&me(t)})}async function ke(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ue(t,n,o){if(o!==$.current)return!1;let c=!1;return m(p=>{const C=n?zn(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=$.current,c=(async()=>{const p=await ke({pattern:"**/*",path:re(t),limit:Ae}),C=Ue(p,!0,o);return!C&&o===$.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ve(t){if(!$e(t,K.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(K.current);for(const c of Ie(n)){if(!$e(c,o))continue;if(await Ve(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++$.current;U.current=null,O.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await ke({pattern:"**/*",limit:Ae,maxDepth:Mn});Ue(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=An(o.content??"");te(p=>{const C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}catch{}}}function Ft(){L.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=$.current,n=U.current;if(n&&n.generation===t)return n.files;const o=O.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await ke({pattern:"**/*",limit:Ae});return $.current===t&&(U.current={generation:t,files:p.files}),p.files})();O.current={generation:t,promise:c};try{return await c}finally{O.current?.generation===t&&(O.current=null)}}async function Lt(t,n){try{const o=await At();if(n!==L.current)return;A(In(o,t,it))}catch{if(n!==L.current)return;A([])}}async function Ot(t,n){D(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==L.current)return;S($n(o.results??"")),N((o.matchCount??0)>=at)}catch{if(n!==L.current)return;S([]),N(!1)}finally{n===L.current&&D(!1)}}function It(t){const n=t.trim(),o=++L.current;Lt(n,o),n.length<_r?(S(null),D(!1),N(!1)):Ot(n,o)}function $t(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){Ft();return}B.current=setTimeout(()=>{It(t)},Gr)}function qe(t){const n=V.current;if(!n||n.path!==d)return;V.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Kt(t){V.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&qe(Re.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await On(i,e,s);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){je("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),k({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||q(n=>[...n,t]),He(t)}function Gt(t){q(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function We(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if($e(t,K.current))try{if(await Ve(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Ut(t,n){if(n){We(t);return}await Bt(t)}async function Vt(t){await W.current,await kt(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Vt(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?Ne(g.path):d?Ne(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const qt=Rn(h,f),Xe=Tn(qt,v),Fe=F?.length??0,Ye=Pn(I??[]),Je=I?.length??0,de=d?_.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Te?wt(Te.path):[],Xt=(t,n)=>{Re.current=t,qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Oe(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
1
|
+
import{c as se,b as Me,r as u,j as r,k as fe,B as De,e8 as Jt,aH as Zt,aN as xe,e9 as en,ea as tn,eb as nn,ec as rn,bU as on,ed as sn,ee as lt,aJ as an,ef as ln,eg as cn,eh as dn,ei as un,ej as fn,ek as pn,el as mn,em as xn,en as hn,m as le,o as gn,t as ne,K as Ze}from"./index-5gemagf1.js";import{F as bn,l as yn}from"./monaco-editor-UmS7A7ZQ.js";import{e as vn,aZ as Cn,a_ as wn}from"./agent-icon-DxmmOieH.js";import{s as Nn}from"./XClose-DI0JEn_A.js";import{B as jn}from"./automation-runs-CqphiI3m.js";import{c as et,T as tt,a as nt}from"./tooltip-CyXjvnKb.js";import{a as En}from"./chat-context-0AU1Ck7Q.js";import{u as Sn}from"./shell-layout-CtR_VnY2.js";import{i as Dn,E as Mn,a as Ae,b as Rn,f as Tn,g as Pn,c as kn,t as re,d as we,e as Le,h as Ne,j as Oe,k as Ie,l as Fn,s as An,v as Ln,m as $e,n as je,o as rt,p as On,q as Ee,r as Ke,w as In,x as $n,y as Kn,z as zn}from"./index-UrA_YNnD.js";import{b as _n,h as Gn,a as Bn,c as Un,d as Vn,e as Hn}from"./dialog-BplUXBMG.js";import{I as ot}from"./input-Dolcjx-g.js";import{A as qn,a as Wn,b as Qn,c as Xn,d as Yn,e as Jn,f as Zn,g as er}from"./alert-dialog-C-EKs2lL.js";import{t as tr}from"./ChevronDown-C6mtwPLn.js";import{i as nr}from"./ChevronRight-BEp1VAsd.js";import{i as rr}from"./Share07-BPGtMefI.js";import"./spinner-DA1qqmBF.js";import"./delay-CnY5UFtP.js";import"./AlertCircle-BngcPF6g.js";import"./Tool01-CN04dNAZ.js";import"./ArrowUp-CQvXx2Eb.js";import"./ArrowLeft-D0SMPcnr.js";import"./Tool02-mI78frGe.js";import"./XCircle-BnwtkUhP.js";import"./ArrowUpRight-DZpp5DED.js";import"./TrendUp01-D7jiFi03.js";import"./ZapSquare-BYkzde_j.js";import"./Users03-DUwPNwXU.js";import"./CheckCircle-Blh8DmbD.js";import"./Check-BVTsyPDh.js";import"./ChevronUp-BIP55CrT.js";import"./DotsVertical-C6DREveP.js";import"./Stars02-BAO2I02Z.js";import"./Copy01-DgiqwcSK.js";import"./CpuChip01-CENIClYZ.js";import"./CreditCard01-BhrVduIh.js";import"./Globe01-7jkIPFoA.js";import"./Settings02-I4I2nClv.js";import"./Eye-PKXEw9_c.js";import"./FilterLines-CEQFAuO4.js";import"./Star01-DCIbpwnb.js";import"./Globe04-DR8uwSal.js";import"./SwitchHorizontal01-zV8kVIQA.js";import"./HardDrive-JJwxAgPq.js";import"./Key01-BJ3dxv9s.js";import"./LayoutLeft-BdUVMA1s.js";import"./LinkExternal01-zuYuwJZ-.js";import"./LogOut01-BLeeRd_x.js";import"./Monitor01-BnK9fFda.js";import"./Sun-E3c2IB3O.js";import"./Palette-Cg1tIBcF.js";import"./Play-2YDlreGg.js";import"./Plus-CgUsDtXu.js";import"./SearchLg-CKHQyByC.js";import"./SearchMd-D_hwjTJs.js";import"./Shield01-CK9cE1oJ.js";import"./Stars01-C5PvctF2.js";import"./Trash01-BxlP0eyg.js";import"./Upload01-Bbnlu9tq.js";import"./User01-BIqoyKIS.js";import"./Users01-DY_fYiv0.js";import"./X-ibOvxK6r.js";import"./Zap-DS_8b3SH.js";import"./select-Ddz9NuOw.js";import"./useInfiniteQuery-B75UMXoa.js";import"./use-infinite-scroll-CONOHnuy.js";import"./use-connection-BEzC3g8f.js";import"./use-mcp-client-DTIaJzH5.js";import"./auth-Bog8FqNA.js";import"./use-virtual-mcp-CChazQvN.js";import"./card-FTRG4FI8.js";import"./sidebar-4tITL9-j.js";import"./use-mobile-BfoXl3UK.js";import"./table-BGuPhElJ.js";import"./empty-state-CXLNA2ti.js";import"./use-members-COIGrf9q.js";import"./use-org-auth-client-Dur3Yig8.js";import"./use-clock-tick-Bgw2dE7q.js";import"./use-automations-Cy-Q13k9.js";import"./studio-tools-CQ2rygf5.js";import"./useSuspenseInfiniteQuery-2Xb4xxXy.js";import"./avatar-D98__g63.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D53s1qEg.js";import"./tab-id-yehNTD_Y.js";import"./hooks-Bg9fS6HW.js";import"./decopilot-sse-pool-DaDP3S1o.js";import"./backoff-CrEUbyZT.js";import"./types-CSDveaQ0.js";import"./integration-icon-B-EnQSDk.js";import"./use-navigate-to-agent-CvPty0ka.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-jXstGrkI.js";import"./index-VNa6_71P.js";import"./form-bokF6u7G.js";import"./label-D3lnkDBW.js";import"./file-type-icon-C8_FY9PP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-Cgq4fq_s.js";import"./use-decopilot-events-BV0PbrVT.js";import"./use-organization-settings-CNMbxTls.js";import"./required-auth-layout-BczHZORq.js";import"./use-org-sso-BcptYP89.js";import"./drawer-BGh4JkbP.js";import"./collection-search-Dd_8W7pe.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-DjzfxGSN.js";import"./toggle-group-BMH9CGot.js";import"./use-deco-credits-WZGr7UOX.js";import"./popover-14h9vyqc.js";import"./self-tool-result-CRZICvmy.js";import"./extract-connection-data-DvtgDdiK.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-C2HwF4Ce.js";import"./use-debounced-value-CYa76Zmr.js";import"./authenticate-and-persist-oauth-P5_Ha_c9.js";import"./mcp-oauth-CfTAXvvd.js";import"./track-ZTi3rGvE.js";import"./toolbar-Dxwz1zDu.js";import"./skeleton-CEbCDyXB.js";import"./github-repo-picker-ERlP0mrh.js";import"./use-mcp-tools-JzoGZ6p1.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-CQ96AbdZ.js";import"./use-registry-connections-DAANgu0H.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-_Pli16i3.js";import"./connection-form-helpers-C2-q5pAR.js";import"./collection-tabs-C1U9k4YH.js";import"./badge-Ce3GqcFl.js";import"./use-open-billing-url-49jCKOMZ.js";import"./select-model-CGoC4bru.js";import"./checkbox-DG1KP888.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-y0TY3QQz.js";import"./cards-BEKt-odr.js";import"./dropdown-menu-lGvTdVZ8.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-C8n706u8.js";import"./use-capability-D3-UBGHo.js";import"./pt-BR-CLy76QW2.js";import"./switch-DuNudDxw.js";import"./use-debounced-autosave-BJZGzBBA.js";import"./index-ITbViqR5.js";import"./search-input-RItYBnRq.js";import"./index-BG3OISG4.js";import"./use-secrets-BCJA-H_b.js";import"./AreaChart-DVnqbznT.js";import"./use-tags-ah4hD1oP.js";import"./get-initials-D-f_fDFw.js";import"./command-DO7yCE_e.js";import"./index-DKORCoqT.js";import"./use-file-configs-kOtKCUoV.js";import"./automation-list-row-DeBMFDOi.js";const or={"new-file":{titleKey:"sandbox.fileExplorerNameDialog.newFileTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFileDescription",submitKey:"sandbox.fileExplorerNameDialog.newFileSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFilePlaceholder"},"new-folder":{titleKey:"sandbox.fileExplorerNameDialog.newFolderTitle",descriptionKey:"sandbox.fileExplorerNameDialog.newFolderDescription",submitKey:"sandbox.fileExplorerNameDialog.newFolderSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.newFolderPlaceholder"},rename:{titleKey:"sandbox.fileExplorerNameDialog.renameTitle",descriptionKey:"sandbox.fileExplorerNameDialog.renameDescription",submitKey:"sandbox.fileExplorerNameDialog.renameSubmit",placeholderKey:"sandbox.fileExplorerNameDialog.renamePlaceholder"}};function sr(i){const e=se.c(71),{open:s,mode:a,initialName:l,parentLabel:m,isPending:h,onSubmit:f,onOpenChange:v}=i,j=l===void 0?"":l,d=h===void 0?!1:h,x=Me(),[g,k]=u.useState(j),[Z,q]=u.useState(s),y=or[a];s!==Z&&(q(s),s&&k(j));let b;e[0]!==d||e[1]!==v?(b=_=>{!_&&!d&&v(!1)},e[0]=d,e[1]=v,e[2]=b):b=e[2];const F=b;let A;e[3]!==d||e[4]!==g||e[5]!==f?(A=async _=>{_.preventDefault();const te=g.trim();!te||d||await f(te)},e[3]=d,e[4]=g,e[5]=f,e[6]=A):A=e[6];const I=A;let S;e[7]!==y.titleKey||e[8]!==x?(S=x(y.titleKey),e[7]=y.titleKey,e[8]=x,e[9]=S):S=e[9];let P;e[10]!==S?(P=r.jsx(_n,{children:S}),e[10]=S,e[11]=P):P=e[11];let D;e[12]!==y.descriptionKey||e[13]!==x?(D=x(y.descriptionKey),e[12]=y.descriptionKey,e[13]=x,e[14]=D):D=e[14];let M;e[15]!==D?(M=r.jsx(Gn,{children:D}),e[15]=D,e[16]=M):M=e[16];let N;e[17]!==P||e[18]!==M?(N=r.jsxs(Bn,{children:[P,M]}),e[17]=P,e[18]=M,e[19]=N):N=e[19];let R;e[20]!==m||e[21]!==x?(R=m&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:x("sandbox.fileExplorerNameDialog.location")}),r.jsx(ot,{value:m,readOnly:!0,disabled:!0,className:"font-mono text-xs"})]}),e[20]=m,e[21]=x,e[22]=R):R=e[22];let E;e[23]!==x?(E=x("sandbox.fileExplorerNameDialog.name"),e[23]=x,e[24]=E):E=e[24];let T;e[25]!==E?(T=r.jsx("label",{htmlFor:"file-explorer-name",className:"text-xs font-medium text-muted-foreground",children:E}),e[25]=E,e[26]=T):T=e[26];let Q;e[27]===Symbol.for("react.memo_cache_sentinel")?(Q=_=>k(_.target.value),e[27]=Q):Q=e[27];let X;e[28]!==y.placeholderKey||e[29]!==x?(X=x(y.placeholderKey),e[28]=y.placeholderKey,e[29]=x,e[30]=X):X=e[30];let Y;e[31]!==d||e[32]!==g||e[33]!==X?(Y=r.jsx(ot,{id:"file-explorer-name",value:g,onChange:Q,placeholder:X,autoFocus:!0,disabled:d}),e[31]=d,e[32]=g,e[33]=X,e[34]=Y):Y=e[34];let G;e[35]!==T||e[36]!==Y?(G=r.jsxs("div",{className:"space-y-1.5",children:[T,Y]}),e[35]=T,e[36]=Y,e[37]=G):G=e[37];let $;e[38]!==R||e[39]!==G?($=r.jsxs("div",{className:"space-y-4 py-4",children:[R,G]}),e[38]=R,e[39]=G,e[40]=$):$=e[40];let W;e[41]!==v?(W=()=>v(!1),e[41]=v,e[42]=W):W=e[42];let K;e[43]!==x?(K=x("sandbox.fileExplorerNameDialog.cancel"),e[43]=x,e[44]=K):K=e[44];let z;e[45]!==d||e[46]!==W||e[47]!==K?(z=r.jsx(De,{type:"button",variant:"outline",onClick:W,disabled:d,children:K}),e[45]=d,e[46]=W,e[47]=K,e[48]=z):z=e[48];let B;e[49]!==d||e[50]!==g?(B=!g.trim()||d,e[49]=d,e[50]=g,e[51]=B):B=e[51];let L;e[52]!==y.submitKey||e[53]!==d||e[54]!==x?(L=d?r.jsxs(r.Fragment,{children:[r.jsx(fe,{size:14,className:"animate-spin"}),x("sandbox.fileExplorerNameDialog.saving")]}):x(y.submitKey),e[52]=y.submitKey,e[53]=d,e[54]=x,e[55]=L):L=e[55];let U;e[56]!==B||e[57]!==L?(U=r.jsx(De,{type:"submit",disabled:B,children:L}),e[56]=B,e[57]=L,e[58]=U):U=e[58];let O;e[59]!==z||e[60]!==U?(O=r.jsxs(Un,{children:[z,U]}),e[59]=z,e[60]=U,e[61]=O):O=e[61];let V;e[62]!==I||e[63]!==$||e[64]!==O||e[65]!==N?(V=r.jsx(Vn,{className:"sm:max-w-md",children:r.jsxs("form",{onSubmit:I,children:[N,$,O]})}),e[62]=I,e[63]=$,e[64]=O,e[65]=N,e[66]=V):V=e[66];let ee;return e[67]!==F||e[68]!==s||e[69]!==V?(ee=r.jsx(Hn,{open:s,onOpenChange:F,children:V}),e[67]=F,e[68]=s,e[69]=V,e[70]=ee):ee=e[70],ee}function ar(i){const e=se.c(47),{deleteTarget:s,deleteDirtyPaths:a,fsActionPending:l,onOpenChange:m,onConfirm:h}=i,f=Me(),v=s?.kind==="directory",j=s!==null,d=v?"sandbox.fileExplorerDeleteDialog.titleFolder":"sandbox.fileExplorerDeleteDialog.titleFile";let x;e[0]!==f||e[1]!==d?(x=f(d),e[0]=f,e[1]=d,e[2]=x):x=e[2];let g;e[3]!==x?(g=r.jsx(qn,{children:x}),e[3]=x,e[4]=g):g=e[4];let k;e[5]!==f?(k=f("sandbox.fileExplorerDeleteDialog.description"),e[5]=f,e[6]=k):k=e[6];const Z=s?.name;let q;e[7]!==Z?(q=r.jsx("span",{className:"font-mono",children:Z}),e[7]=Z,e[8]=q):q=e[8];let y;e[9]!==v||e[10]!==f?(y=v?f("sandbox.fileExplorerDeleteDialog.folderSuffix"):".",e[9]=v,e[10]=f,e[11]=y):y=e[11];let b;e[12]!==a.length||e[13]!==f?(b=a.length>0&&r.jsxs(r.Fragment,{children:[" ",a.length===1?f("sandbox.fileExplorerDeleteDialog.unsavedChangesOne"):f("sandbox.fileExplorerDeleteDialog.unsavedChangesMany",{count:a.length})]}),e[12]=a.length,e[13]=f,e[14]=b):b=e[14];let F;e[15]!==k||e[16]!==q||e[17]!==y||e[18]!==b?(F=r.jsxs(Wn,{children:[k," ",q,y,b]}),e[15]=k,e[16]=q,e[17]=y,e[18]=b,e[19]=F):F=e[19];let A;e[20]!==F||e[21]!==g?(A=r.jsxs(Qn,{children:[g,F]}),e[20]=F,e[21]=g,e[22]=A):A=e[22];let I;e[23]!==f?(I=f("sandbox.fileExplorerDeleteDialog.cancel"),e[23]=f,e[24]=I):I=e[24];let S;e[25]!==l||e[26]!==I?(S=r.jsx(Xn,{disabled:l,children:I}),e[25]=l,e[26]=I,e[27]=S):S=e[27];const P=l||!s;let D;e[28]!==s||e[29]!==h?(D=Q=>{Q.preventDefault(),s&&h(s)},e[28]=s,e[29]=h,e[30]=D):D=e[30];let M;e[31]!==f?(M=f("sandbox.fileExplorerDeleteDialog.delete"),e[31]=f,e[32]=M):M=e[32];let N;e[33]!==P||e[34]!==D||e[35]!==M?(N=r.jsx(Yn,{disabled:P,onClick:D,children:M}),e[33]=P,e[34]=D,e[35]=M,e[36]=N):N=e[36];let R;e[37]!==S||e[38]!==N?(R=r.jsxs(Jn,{children:[S,N]}),e[37]=S,e[38]=N,e[39]=R):R=e[39];let E;e[40]!==A||e[41]!==R?(E=r.jsxs(Zn,{children:[A,R]}),e[40]=A,e[41]=R,e[42]=E):E=e[42];let T;return e[43]!==m||e[44]!==j||e[45]!==E?(T=r.jsx(er,{open:j,onOpenChange:m,children:E}),e[43]=m,e[44]=j,e[45]=E,e[46]=T):T=e[46],T}var ze="ContextMenu",[ir]=an(ze,[lt]),J=lt(),[lr,ct]=ir(ze),dt=i=>{const{__scopeContextMenu:e,children:s,onOpenChange:a,dir:l,modal:m=!0}=i,[h,f]=u.useState(!1),v=J(e),j=on(a),d=u.useCallback(x=>{f(x),j(x)},[j]);return r.jsx(lr,{scope:e,open:h,onOpenChange:d,modal:m,children:r.jsx(sn,{...v,dir:l,open:h,onOpenChange:d,modal:m,children:s})})};dt.displayName=ze;var ut="ContextMenuTrigger",ft=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,disabled:a=!1,...l}=i,m=ct(ut,s),h=J(s),f=u.useRef({x:0,y:0}),v=u.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),j=u.useRef(0),d=u.useCallback(()=>window.clearTimeout(j.current),[]),x=g=>{f.current={x:g.clientX,y:g.clientY},m.onOpenChange(!0)};return u.useEffect(()=>d,[d]),u.useEffect(()=>{a&&d()},[a,d]),r.jsxs(r.Fragment,{children:[r.jsx(Jt,{...h,virtualRef:v}),r.jsx(Zt.span,{"data-state":m.open?"open":"closed","data-disabled":a?"":void 0,...l,ref:e,style:{WebkitTouchCallout:"none",...i.style},onContextMenu:a?i.onContextMenu:xe(i.onContextMenu,g=>{d(),x(g),g.preventDefault()}),onPointerDown:a?i.onPointerDown:xe(i.onPointerDown,Se(g=>{d(),j.current=window.setTimeout(()=>x(g),700)})),onPointerMove:a?i.onPointerMove:xe(i.onPointerMove,Se(d)),onPointerCancel:a?i.onPointerCancel:xe(i.onPointerCancel,Se(d)),onPointerUp:a?i.onPointerUp:xe(i.onPointerUp,Se(d))})]})});ft.displayName=ut;var cr="ContextMenuPortal",pt=i=>{const{__scopeContextMenu:e,...s}=i,a=J(e);return r.jsx(nn,{...a,...s})};pt.displayName=cr;var mt="ContextMenuContent",xt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=ct(mt,s),m=J(s),h=u.useRef(!1);return r.jsx(rn,{...m,...a,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{i.onCloseAutoFocus?.(f),!f.defaultPrevented&&h.current&&f.preventDefault(),h.current=!1},onInteractOutside:f=>{i.onInteractOutside?.(f),!f.defaultPrevented&&!l.modal&&(h.current=!0)},style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xt.displayName=mt;var dr="ContextMenuGroup",ur=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(ln,{...l,...a,ref:e})});ur.displayName=dr;var fr="ContextMenuLabel",pr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(cn,{...l,...a,ref:e})});pr.displayName=fr;var mr="ContextMenuItem",ht=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(en,{...l,...a,ref:e})});ht.displayName=mr;var xr="ContextMenuCheckboxItem",hr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(dn,{...l,...a,ref:e})});hr.displayName=xr;var gr="ContextMenuRadioGroup",br=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(un,{...l,...a,ref:e})});br.displayName=gr;var yr="ContextMenuRadioItem",vr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(fn,{...l,...a,ref:e})});vr.displayName=yr;var Cr="ContextMenuItemIndicator",wr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(pn,{...l,...a,ref:e})});wr.displayName=Cr;var Nr="ContextMenuSeparator",gt=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(tn,{...l,...a,ref:e})});gt.displayName=Nr;var jr="ContextMenuArrow",Er=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(mn,{...l,...a,ref:e})});Er.displayName=jr;var Sr="ContextMenuSubTrigger",Dr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(xn,{...l,...a,ref:e})});Dr.displayName=Sr;var Mr="ContextMenuSubContent",Rr=u.forwardRef((i,e)=>{const{__scopeContextMenu:s,...a}=i,l=J(s);return r.jsx(hn,{...l,...a,ref:e,style:{...i.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Rr.displayName=Mr;function Se(i){return e=>e.pointerType!=="mouse"?i(e):void 0}var Tr=dt,Pr=ft,kr=pt,Fr=xt,Ar=ht,Lr=gt;function Or(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Tr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=a):a=e[3],a}function Ir(i){const e=se.c(4);let s;e[0]!==i?({...s}=i,e[0]=i,e[1]=s):s=e[1];let a;return e[2]!==s?(a=r.jsx(Pr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=a):a=e[3],a}function $r(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(kr,{children:r.jsx(Fr,{"data-slot":"context-menu-content",translate:"no",className:l,...a})}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}function ue(i){const e=se.c(12);let s,a,l,m;e[0]!==i?({className:s,inset:a,variant:m,...l}=i,e[0]=i,e[1]=s,e[2]=a,e[3]=l,e[4]=m):(s=e[1],a=e[2],l=e[3],m=e[4]);const h=m===void 0?"default":m;let f;e[5]!==s?(f=le("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=f):f=e[6];let v;return e[7]!==a||e[8]!==l||e[9]!==f||e[10]!==h?(v=r.jsx(Ar,{"data-slot":"context-menu-item","data-inset":a,"data-variant":h,className:f,...l}),e[7]=a,e[8]=l,e[9]=f,e[10]=h,e[11]=v):v=e[11],v}function st(i){const e=se.c(8);let s,a;e[0]!==i?({className:s,...a}=i,e[0]=i,e[1]=s,e[2]=a):(s=e[1],a=e[2]);let l;e[3]!==s?(l=le("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=l):l=e[4];let m;return e[5]!==a||e[6]!==l?(m=r.jsx(Lr,{"data-slot":"context-menu-separator",className:l,...a}),e[5]=a,e[6]=l,e[7]=m):m=e[7],m}const Kr="#d9a441";function zr(i){const e=se.c(63),{node:s,depth:a,isExpanded:l,isSelected:m,isLoading:h,fileVisual:f,onOpen:v,onSelect:j,onNewFile:d,onNewFolder:x,onCopyPath:g,onCopyRelativePath:k,onRename:Z,onDelete:q}=i,y=h===void 0?!1:h,b=Me(),F=s.kind==="directory",{Icon:A,color:I}=f,S=m&&"bg-accent";let P;e[0]!==S?(P=le("flex w-full items-center gap-1.5 px-2 py-1.5 text-left text-[13px] hover:bg-accent transition-colors",S),e[0]=S,e[1]=P):P=e[1];const D=`${a*14+8}px`;let M;e[2]!==D?(M={paddingLeft:D},e[2]=D,e[3]=M):M=e[3];let N;e[4]!==v||e[5]!==j?(N=()=>{j(),v()},e[4]=v,e[5]=j,e[6]=N):N=e[6];let R;e[7]!==A||e[8]!==I||e[9]!==F||e[10]!==l||e[11]!==y?(R=F?r.jsxs(r.Fragment,{children:[y?r.jsx(fe,{size:14,className:"shrink-0 animate-spin text-muted-foreground"}):l?r.jsx(tr,{size:14,className:"shrink-0 text-muted-foreground"}):r.jsx(nr,{size:14,className:"shrink-0 text-muted-foreground"}),r.jsx(rr,{size:16,className:"shrink-0",style:{color:Kr}})]}):r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"w-3.5 shrink-0"}),r.jsx(A,{size:16,className:"shrink-0",style:{color:I}})]}),e[7]=A,e[8]=I,e[9]=F,e[10]=l,e[11]=y,e[12]=R):R=e[12];let E;e[13]!==s.name?(E=r.jsx("span",{className:"truncate",children:s.name}),e[13]=s.name,e[14]=E):E=e[14];let T;e[15]!==P||e[16]!==M||e[17]!==N||e[18]!==R||e[19]!==E?(T=r.jsx(Ir,{asChild:!0,children:r.jsxs("button",{type:"button",className:P,style:M,onClick:N,children:[R,E]})}),e[15]=P,e[16]=M,e[17]=N,e[18]=R,e[19]=E,e[20]=T):T=e[20];let Q;e[21]!==b?(Q=b("sandbox.fileTreeRow.newFile"),e[21]=b,e[22]=Q):Q=e[22];let X;e[23]!==d||e[24]!==Q?(X=r.jsx(ue,{onSelect:d,children:Q}),e[23]=d,e[24]=Q,e[25]=X):X=e[25];let Y;e[26]!==b?(Y=b("sandbox.fileTreeRow.newFolder"),e[26]=b,e[27]=Y):Y=e[27];let G;e[28]!==x||e[29]!==Y?(G=r.jsx(ue,{onSelect:x,children:Y}),e[28]=x,e[29]=Y,e[30]=G):G=e[30];let $;e[31]===Symbol.for("react.memo_cache_sentinel")?($=r.jsx(st,{}),e[31]=$):$=e[31];let W;e[32]!==b?(W=b("sandbox.fileTreeRow.copyPath"),e[32]=b,e[33]=W):W=e[33];let K;e[34]!==g||e[35]!==W?(K=r.jsx(ue,{onSelect:g,children:W}),e[34]=g,e[35]=W,e[36]=K):K=e[36];let z;e[37]!==b?(z=b("sandbox.fileTreeRow.copyRelativePath"),e[37]=b,e[38]=z):z=e[38];let B;e[39]!==k||e[40]!==z?(B=r.jsx(ue,{onSelect:k,children:z}),e[39]=k,e[40]=z,e[41]=B):B=e[41];let L;e[42]===Symbol.for("react.memo_cache_sentinel")?(L=r.jsx(st,{}),e[42]=L):L=e[42];let U;e[43]!==b?(U=b("sandbox.fileTreeRow.rename"),e[43]=b,e[44]=U):U=e[44];let O;e[45]!==Z||e[46]!==U?(O=r.jsx(ue,{onSelect:Z,children:U}),e[45]=Z,e[46]=U,e[47]=O):O=e[47];let V;e[48]!==b?(V=b("sandbox.fileTreeRow.delete"),e[48]=b,e[49]=V):V=e[49];let ee;e[50]!==q||e[51]!==V?(ee=r.jsx(ue,{variant:"destructive",onSelect:q,children:V}),e[50]=q,e[51]=V,e[52]=ee):ee=e[52];let _;e[53]!==X||e[54]!==G||e[55]!==K||e[56]!==B||e[57]!==O||e[58]!==ee?(_=r.jsxs($r,{className:"w-52",children:[X,G,$,K,B,L,O,ee]}),e[53]=X,e[54]=G,e[55]=K,e[56]=B,e[57]=O,e[58]=ee,e[59]=_):_=e[59];let te;return e[60]!==_||e[61]!==T?(te=r.jsxs(Or,{children:[T,_]}),e[60]=_,e[61]=T,e[62]=te):te=e[62],te}yn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});const at=200,_r=2,Gr=250,it=200;function Br(i,e,s,a){return`/api/${i}/sandbox/${encodeURIComponent(e)}/${encodeURIComponent(s)}/${a}`}function Ur(i){const e=se.c(9),{text:s,query:a}=i;let l,m,h;if(e[0]!==a||e[1]!==s){const{leadingEllipsis:v,segments:j}=Fn(s,a);l="truncate font-mono text-muted-foreground",m=v&&r.jsx("span",{className:"text-muted-foreground/50",children:"…"}),h=j.map(Vr),e[0]=a,e[1]=s,e[2]=l,e[3]=m,e[4]=h}else l=e[2],m=e[3],h=e[4];let f;return e[5]!==l||e[6]!==m||e[7]!==h?(f=r.jsxs("span",{className:l,children:[m,h]}),e[5]=l,e[6]=m,e[7]=h,e[8]=f):f=e[8],f}function Vr(i,e){return i.match?r.jsx("span",{className:"rounded-[2px] bg-primary/20 text-foreground",children:i.text},e):r.jsx("span",{children:i.text},e)}function za({orgSlug:i,virtualMcpId:e,branch:s,openPath:a}){const[l,m]=u.useState({files:[],directories:[],truncated:!1}),{files:h,directories:f}=l,[v,j]=u.useState(new Set),[d,x]=u.useState(null),[g,k]=u.useState(null),[Z,q]=u.useState([]),[y,b]=u.useState(""),[F,A]=u.useState(null),[I,S]=u.useState(null),[P,D]=u.useState(!1),[M,N]=u.useState(!1),[R,E]=u.useState(!1),[T,Q]=u.useState(!1),[,X]=u.useState(new Set),[Y,G]=u.useState(new Set),$=u.useRef(0),W=u.useRef(null),K=u.useRef(new Set),z=u.useRef(new Map),B=u.useRef(null),L=u.useRef(0),U=u.useRef(null),O=u.useRef(null),V=u.useRef(null);function ee(t){X(n=>{const o=typeof t=="function"?t(n):t;return K.current=o,o})}const[_,te]=u.useState(new Map),Re=u.useRef(null),[ae,he]=u.useState(null),{sendMessage:bt}=En(),{openSidePanel:yt}=Sn(),ge=gn(),[H,oe]=u.useState(null),[Te,Pe]=u.useState(null),[be,ye]=u.useState(!1);async function ie(t,n){const o=await fetch(Br(i,e,s,t),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)});if(!o.ok){const c=await o.json().catch(()=>({}));throw new Error(c.error??`Request failed (${o.status})`)}return o.json()}async function ve(){ge.invalidateQueries({queryKey:rt(i,e,s)})}function _e(t,n,o){navigator.clipboard.writeText(o).then(()=>ne.success(t("sandbox.fileExplorer.textCopied",{label:n})),()=>ne.error(t("sandbox.fileExplorer.failedToCopyText",{label:n.toLowerCase()})))}function vt(t){const n=Kn(t);if(!n)return;const o=`${i}/${e}/${s}`;ge.setQueryData(Ze.decofile(o),c=>{if(!c)return c;const{[n]:p,...C}=c;return C}),ge.invalidateQueries({queryKey:Ze.liveMeta(i,e,s)})}function Ct(t){const n=t.kind==="file"?[t.path]:h.filter(o=>o.startsWith(".deco/blocks/")).map(o=>we(o)).filter(o=>o===t.path||o.startsWith(`${t.path}/`));for(const o of n)vt(o)}function wt(t){const n=we(t);return Z.filter(o=>{if(o!==n&&!o.startsWith(`${n}/`))return!1;const c=_.get(o);return!!(c?.loaded&&c.editorValue!==c.savedContent)})}function Ge(t){q(n=>n.map(o=>t(o)).filter(o=>o!==null)),x(n=>n&&t(n)),te(n=>{const o=new Map;for(const[c,p]of n){const C=t(c);C&&o.set(C,p)}return o}),k(n=>{if(!n)return n;const o=t(n.path);return o?o===n.path?n:{...n,path:o,name:o.split("/").pop()??o}:null})}function Nt(t){const n=we(t);k(o=>o&&(o.path===n||o.path.startsWith(`${n}/`)?null:o)),Ge(o=>o===n||o.startsWith(`${n}/`)?null:o)}async function jt(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("write",{path:re(o),content:""}),await pe(),await ve(),oe(null),me(o)}async function Et(t,n){if(!H)return;const o=Ee(H.parentDir,n);if(Ke(o,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));const c=re(o);await ie("mkdir",{path:c}),m(p=>({...p,directories:p.directories.includes(c)?p.directories:[...p.directories,c]})),await pe(),await ve(),oe(null),j(p=>{const C=new Set(p);for(const ce of Ie(o))C.add(ce);return C.add(o),C}),k({name:n,path:o,kind:"directory",children:[]})}async function St(t,n){if(!H)return;const o=H.node.path,c=Ne(o),p=Ee(c,n);if(p===o){oe(null);return}if(Ke(p,h,f))throw new Error(t("sandbox.fileExplorer.fileAlreadyExists",{name:n}));await ie("rename",{from:re(o),to:re(p)}),Ge(C=>C===o?p:C.startsWith(`${o}/`)?Ee(p,C.slice(o.length+1)):C),await pe(),await ve(),oe(null)}async function Dt(t,n){ye(!0);try{await ie("unlink",{path:re(n.path),recursive:n.kind==="directory"}),Ct(n),Nt(n.path),await pe(),await ve(),Pe(null),ne.success(t("sandbox.fileExplorer.fileDeleted",{name:n.name}))}catch(o){ne.error(o instanceof Error?o.message:t("sandbox.fileExplorer.deleteFailed"))}finally{ye(!1)}}async function Mt(t,n){const o=Ln(n);if(o){ne.error(o);return}ye(!0);try{H?.mode==="new-file"?(await jt(t,n),ne.success(t("sandbox.fileExplorer.fileCreated",{name:n}))):H?.mode==="new-folder"?(await Et(t,n),ne.success(t("sandbox.fileExplorer.folderCreated",{name:n}))):H?.mode==="rename"&&(await St(t,n),ne.success(t("sandbox.fileExplorer.renamedTo",{name:n})))}catch(c){ne.error(c instanceof Error?c.message:t("sandbox.fileExplorer.operationFailed"))}finally{ye(!1)}}const Be=u.useRef(!1);Be.current||(Be.current=!0,W.current=pe());const[Rt,Tt]=u.useState(null),w=Me();if(a&&a!==Rt){Tt(a);const t=a;queueMicrotask(()=>{Dn(t)&&me(t)})}async function ke(t){const n=await ie("glob",t);return{files:n.files??[],directories:n.directories??[],truncated:n.truncated}}function Ue(t,n,o){if(o!==$.current)return!1;let c=!1;return m(p=>{const C=n?zn(p.files,p.directories,t,p.truncated):{files:t.files,directories:t.directories??[],truncated:!!t.truncated};return c=!!C.truncated,{files:C.files,directories:C.directories,truncated:c}}),c&&ne.warning(w("sandbox.fileExplorer.fileListTruncated")),c}async function Pt(t){const n=z.current.get(t);if(n)return n;const o=$.current,c=(async()=>{const p=await ke({pattern:"**/*",path:re(t),limit:Ae}),C=Ue(p,!0,o);return!C&&o===$.current&&ee(ce=>{const Ce=new Set(ce);return Ce.add(t),Ce}),C})();z.current.set(t,c);try{return await c}finally{z.current.delete(t)}}async function Ve(t){if(!$e(t,K.current))return!1;G(n=>new Set(n).add(t));try{return await Pt(t)}finally{G(n=>{const o=new Set(n);return o.delete(t),o})}}async function kt(t,n){const o=new Set(K.current);for(const c of Ie(n)){if(!$e(c,o))continue;if(await Ve(c))throw new Error(t("sandbox.fileExplorer.folderListingTruncated"));o.add(c)}}async function pe(){const t=++$.current;U.current=null,O.current=null,z.current.clear(),E(!0),ee(new Set),j(new Set),G(new Set);try{const n=await ke({pattern:"**/*",limit:Ae,maxDepth:Mn});Ue(n,!1,t),Q(!0)}catch{T&&ne.error(w("sandbox.fileExplorer.failedToRefreshFileTree"))}finally{E(!1)}}async function He(t){if(!_.get(t)?.loaded){te(o=>{const c=new Map(o);return c.set(t,{savedContent:"",editorValue:"",loaded:!1}),c});try{const o=await ie("read",{path:re(t),full:!0}),c=An(o.content??"");te(p=>{const C=new Map(p);return C.set(t,{savedContent:c,editorValue:c,loaded:!0}),C})}catch{}}}function Ft(){L.current++,A(null),S(null),D(!1),N(!1)}async function At(){const t=$.current,n=U.current;if(n&&n.generation===t)return n.files;const o=O.current;if(o&&o.generation===t)return o.promise;const c=(async()=>{const p=await ke({pattern:"**/*",limit:Ae});return $.current===t&&(U.current={generation:t,files:p.files}),p.files})();O.current={generation:t,promise:c};try{return await c}finally{O.current?.generation===t&&(O.current=null)}}async function Lt(t,n){try{const o=await At();if(n!==L.current)return;A(In(o,t,it))}catch{if(n!==L.current)return;A([])}}async function Ot(t,n){D(!0);try{const o=await ie("grep",{pattern:t,output_mode:"content",ignore_case:!0,fixed_strings:!0,limit:at});if(n!==L.current)return;S($n(o.results??"")),N((o.matchCount??0)>=at)}catch{if(n!==L.current)return;S([]),N(!1)}finally{n===L.current&&D(!1)}}function It(t){const n=t.trim(),o=++L.current;Lt(n,o),n.length<_r?(S(null),D(!1),N(!1)):Ot(n,o)}function $t(t){if(b(t),B.current&&clearTimeout(B.current),!t.trim()){Ft();return}B.current=setTimeout(()=>{It(t)},Gr)}function qe(t){const n=V.current;if(!n||n.path!==d)return;V.current=null;const o=Math.max(1,n.line);t.revealLineInCenter(o),t.setPosition({lineNumber:o,column:1}),t.focus()}function Kt(t){V.current={path:t.path,line:t.line};const n=d===t.path&&_.get(t.path)?.loaded;me(t.path),n&&Re.current&&qe(Re.current)}async function zt(t,n){try{await ie("write",{path:re(t),content:n}),je("file saved via sandbox /write",{path:t}),ge.invalidateQueries({queryKey:rt(i,e,s)});try{const o=await On(i,e,s);je("git status after save",o)}catch(o){je("git status after save failed",{path:t,error:o instanceof Error?o.message:String(o)})}te(o=>{const c=new Map(o),p=c.get(t);return p&&c.set(t,{...p,savedContent:n}),c})}catch(o){je("file save failed",{path:t,error:o instanceof Error?o.message:String(o)})}}function _t(t){x(t),k({name:t.split("/").pop()??t,path:t,kind:"file",children:[]}),he(null),Z.includes(t)||q(n=>[...n,t]),He(t)}function Gt(t){q(n=>{const o=n.filter(c=>c!==t);return d===t&&x(o[o.length-1]??null),o}),te(n=>{const o=new Map(n);return o.delete(t),o})}function We(t){j(n=>{const o=new Set(n);return o.has(t)?o.delete(t):o.add(t),o})}async function Bt(t){if($e(t,K.current))try{if(await Ve(t))return}catch(n){ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToLoadFolder"));return}We(t)}async function Ut(t,n){if(n){We(t);return}await Bt(t)}async function Vt(t){await W.current,await kt(w,t);const n=Ie(t);j(o=>{const c=new Set(o);for(const p of n)c.add(p);return c}),_t(t)}function me(t){Vt(t).catch(n=>{ne.error(n instanceof Error?n.message:w("sandbox.fileExplorer.failedToOpenFile"))})}function Ht(){return g?.kind==="directory"?g.path:g?.kind==="file"?Ne(g.path):d?Ne(d):"/"}function Qe(t){const n=Ht();oe({mode:t,parentDir:n,node:{name:"",path:n,kind:"directory",children:[]}})}const qt=Rn(h,f),Xe=Tn(qt,v),Fe=F?.length??0,Ye=Pn(I??[]),Je=I?.length??0,de=d?_.get(d):null,Wt=de?.loaded&&de.editorValue!==de.savedContent,Qt=Te?wt(Te.path):[],Xt=(t,n)=>{Re.current=t,qe(t),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyS,async()=>{if(!d)return;const o=t.getValue();await zt(d,o)}),t.addCommand(n.KeyMod.CtrlCmd|n.KeyCode.KeyK,()=>{const o=t.getSelection(),c=t.getModel();if(!o||!c||!d)return;const p=c.getValueInRange(o);he({filePath:d,lineStart:o.startLineNumber,lineEnd:o.endLineNumber,selectedCode:p})})};function Yt(t){if(!ae)return;const n=[`The user selected code in the file explorer and asked: **"${t.trim()}"**`,"",`**File:** \`${ae.filePath}\``,`**Lines:** ${ae.lineStart}–${ae.lineEnd}`];if(ae.selectedCode){const o=Oe(ae.filePath),c=ae.selectedCode.replace(/```/g,"`` `");n.push("","**Selected code:**","```"+o,c,"```")}n.push("","Please read the source file, locate the code, and apply the requested change."),yt("chat"),bt({parts:[{type:"text",text:n.join(`
|
|
2
2
|
`)}]}),he(null)}return R&&!T?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsxs("div",{className:"flex h-full w-full overflow-hidden",children:[r.jsxs("div",{className:"w-64 shrink-0 border-r flex flex-col overflow-hidden",children:[r.jsxs("div",{className:"flex items-center gap-1 p-2 border-b",children:[r.jsxs("div",{className:"relative min-w-0 flex-1",children:[r.jsx(vn,{size:14,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),r.jsx("input",{type:"text",value:y,onChange:t=>$t(t.target.value),placeholder:w("sandbox.fileExplorer.searchFilesPlaceholder"),"aria-label":w("sandbox.fileExplorer.searchFilesLabel"),className:"w-full rounded-md border border-input bg-transparent pl-7 pr-2 py-1.5 text-xs outline-none placeholder:text-muted-foreground focus:ring-1 focus:ring-ring"})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFileLabel"),onClick:()=>Qe("new-file"),children:r.jsx(Cn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFile")})]}),r.jsxs(et,{children:[r.jsx(tt,{asChild:!0,children:r.jsx(De,{type:"button",variant:"ghost",size:"icon",className:"size-7 shrink-0","aria-label":w("sandbox.fileExplorer.newFolderLabel"),onClick:()=>Qe("new-folder"),children:r.jsx(wn,{size:14})})}),r.jsx(nt,{side:"bottom",children:w("sandbox.fileExplorer.newFolder")})]})]}),r.jsx(jn,{className:"flex-1",children:r.jsxs("div",{className:"py-1",children:[!y&&Xe.map(t=>{const{node:n,depth:o}=t,c=n.kind==="directory",p=v.has(n.path),C=g?.path===n.path,ce=kn(n.path,n.kind),Ce=c&&Y.has(n.path);return r.jsx(zr,{node:n,depth:o,isExpanded:p,isSelected:C,isLoading:Ce,fileVisual:Le(n.name),onSelect:()=>k(n),onOpen:()=>{c?Ut(n.path,p):me(n.path)},onNewFile:()=>oe({mode:"new-file",node:n,parentDir:ce}),onNewFolder:()=>oe({mode:"new-folder",node:n,parentDir:ce}),onCopyPath:()=>_e(w,"Path",we(n.path)),onCopyRelativePath:()=>_e(w,"Relative path",re(n.path)),onRename:()=>oe({mode:"rename",node:n,parentDir:ce}),onDelete:()=>Pe(n)},n.path)}),!y&&T&&Xe.length===0&&r.jsx("div",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFilesFound")}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.files")}),Fe>0&&r.jsxs("span",{className:"normal-case tracking-normal text-muted-foreground/70",children:[Fe,Fe>=it?"+":""]})]}),F!==null&&F.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noFileNamesMatch")}),F?.map(t=>{const n=t.split("/").pop()??t,o=Ne(t),{Icon:c,color:p}=Le(n),C=d===t;return r.jsxs("button",{type:"button",onClick:()=>me(t),title:t,className:le("flex w-full items-center gap-1.5 px-3 py-1 text-left text-xs hover:bg-accent",C&&"bg-accent"),children:[r.jsx(c,{size:14,className:le("shrink-0",p)}),r.jsx("span",{className:"max-w-40 shrink-0 truncate",children:n}),o!=="/"&&r.jsx("span",{className:"truncate text-muted-foreground/60",children:o})]},t)})]}),y&&r.jsxs("div",{className:"mt-1 border-t pt-1",children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 pb-0.5 pt-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:[r.jsx("span",{children:w("sandbox.fileExplorer.inFiles")}),Je>0&&r.jsxs("span",{className:"text-muted-foreground/70 normal-case tracking-normal",children:[Je,M?"+":""]}),P&&r.jsx(fe,{size:10,className:"animate-spin"})]}),!P&&I!==null&&Ye.length===0&&r.jsx("div",{className:"px-3 py-1 text-xs text-muted-foreground",children:w("sandbox.fileExplorer.noMatchesInFileContents")}),Ye.map(t=>{const n=t.path.split("/").pop()??t.path,{Icon:o,color:c}=Le(n);return r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 text-xs text-muted-foreground",children:[r.jsx(o,{size:14,className:le("shrink-0",c)}),r.jsx("span",{className:"truncate",children:n}),r.jsx("span",{className:"text-muted-foreground/60",children:t.matches.length})]}),t.matches.map(p=>r.jsxs("button",{type:"button",onClick:()=>Kt(p),title:`${t.path}:${p.line}`,className:"flex w-full items-baseline gap-2 pl-8 pr-3 py-0.5 text-left text-xs hover:bg-accent",children:[r.jsx("span",{className:"shrink-0 tabular-nums text-muted-foreground",children:p.line}),r.jsx(Ur,{text:p.text,query:y})]},`${t.path}:${p.line}`))]},t.path)})]})]})})]}),r.jsxs("div",{className:"relative flex-1 flex flex-col overflow-hidden",children:[Z.length>0&&r.jsx("div",{className:"flex items-center border-b overflow-x-auto shrink-0",children:Z.map(t=>{const n=_.get(t),o=n?.loaded&&n.editorValue!==n.savedContent,c=d===t,p=t.split("/").pop()??t;return r.jsxs("div",{className:le("flex items-center gap-1 px-3 py-1.5 text-xs border-r cursor-pointer transition-colors",c?"bg-background text-foreground":"bg-muted/50 text-muted-foreground hover:bg-accent"),onClick:()=>{x(t),He(t)},onKeyDown:()=>{},role:"tab",tabIndex:0,"aria-selected":c,children:[r.jsx("span",{className:"truncate max-w-32",children:p}),o&&r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-foreground/60 shrink-0"}),r.jsx("button",{type:"button",className:"ml-1 rounded p-0.5 hover:bg-accent-foreground/10",onClick:C=>{C.stopPropagation(),Gt(t)},children:r.jsx(Nn,{size:12})})]},t)})}),ae&&r.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 z-20 mt-2",style:{width:"360px"},children:r.jsxs("form",{className:"flex w-full items-center gap-1.5 rounded-xl border border-border bg-background/95 px-3 py-1.5 shadow-lg backdrop-blur",onSubmit:t=>{t.preventDefault();const o=t.currentTarget.elements.namedItem("askAiInput");o.value.trim()&&Yt(o.value)},children:[r.jsx("input",{name:"askAiInput",autoFocus:!0,type:"text",placeholder:w("sandbox.fileExplorer.askTheAiPlaceholder"),className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground",onKeyDown:t=>{t.stopPropagation(),t.key==="Escape"&&he(null)}}),r.jsx("button",{type:"submit",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-full bg-foreground text-background transition-opacity",title:w("sandbox.fileExplorer.send"),children:r.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"none","aria-hidden":"true",children:[r.jsx("title",{children:w("sandbox.fileExplorer.send")}),r.jsx("path",{d:"M5 9V1M1 5l4-4 4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}),r.jsx("div",{className:"flex-1 overflow-hidden",children:d&&de?.loaded?r.jsx(bn,{language:Oe(d),theme:document.documentElement.classList.contains("dark")?"vs-dark":"light",value:de.editorValue,path:d,onChange:t=>{const n=d;n&&te(o=>{const c=new Map(o),p=c.get(n);return p&&c.set(n,{...p,editorValue:t??""}),c})},onMount:Xt,loading:r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}),options:{fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:2,wordWrap:"on",minimap:{enabled:!1},padding:{top:12,bottom:12},scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}}},d):d&&!de?.loaded?r.jsx("div",{className:"flex items-center justify-center h-full w-full",children:r.jsx(fe,{size:20,className:"animate-spin text-muted-foreground"})}):r.jsx("div",{className:"flex items-center justify-center h-full w-full text-sm text-muted-foreground",children:w("sandbox.fileExplorer.selectFileToEdit")})}),d&&r.jsxs("div",{className:"flex items-center justify-between px-3 py-1 border-t text-[11px] text-muted-foreground shrink-0",children:[r.jsx("span",{className:"truncate",children:d}),r.jsxs("span",{children:[w(Wt?"sandbox.fileExplorer.modified":"sandbox.fileExplorer.saved")," ","· ",Oe(d)]})]})]}),r.jsx(sr,{open:H!==null,mode:H?.mode??"new-file",initialName:H?.mode==="rename"?H.node.name:"",parentLabel:H&&H.mode!=="rename"?H.parentDir==="/"?"/":re(H.parentDir):void 0,isPending:be,onSubmit:t=>Mt(w,t),onOpenChange:t=>{!t&&!be&&oe(null)}}),r.jsx(ar,{deleteTarget:Te,deleteDirtyPaths:Qt,fsActionPending:be,onOpenChange:t=>{!t&&!be&&Pe(null)},onConfirm:t=>{Dt(w,t)}})]})}export{za as FileExplorer};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g,j as o}from"./index-
|
|
1
|
+
import{c as g,j as o}from"./index-5gemagf1.js";const h={pdf:"#D92D20",doc:"#155EEF",docx:"#155EEF",txt:"#475467",md:"#475467",xls:"#099250",xlsx:"#099250",csv:"#099250",tsv:"#099250",json:"#475467",xml:"#475467",yaml:"#475467",yml:"#475467",ppt:"#DC6803",pptx:"#DC6803",key:"#DC6803",png:"#7F56D9",jpg:"#7F56D9",jpeg:"#7F56D9",gif:"#7F56D9",webp:"#7F56D9",svg:"#7F56D9",avif:"#7F56D9",mp3:"#DD2590",wav:"#DD2590",mp4:"#DD2590",mov:"#DD2590",webm:"#DD2590",zip:"#475467",tar:"#475467",gz:"#475467",rar:"#475467",html:"#DC6803",htm:"#DC6803",css:"#155EEF",js:"#155EEF",jsx:"#155EEF",ts:"#155EEF",tsx:"#155EEF",py:"#155EEF",sql:"#155EEF",sh:"#475467"},F="#475467",D={pdf:"PDF",doc:"Word document",docx:"Word document",txt:"Text file",md:"Markdown",xls:"Excel file",xlsx:"Excel file",csv:"CSV file",tsv:"TSV file",json:"JSON file",xml:"XML file",yaml:"YAML file",yml:"YAML file",ppt:"Presentation",pptx:"Presentation",key:"Presentation",png:"Image",jpg:"Image",jpeg:"Image",gif:"Image",webp:"Image",svg:"Image",avif:"Image",mp3:"Audio",wav:"Audio",mp4:"Video",mov:"Video",webm:"Video",zip:"Archive",tar:"Archive",gz:"Archive",rar:"Archive",html:"HTML file",htm:"HTML file"};function v(l){const e=f(l);return e?D[e]??`${e.toUpperCase()} file`:"File"}function f(l){const e=l.lastIndexOf(".");if(e<=0||e===l.length-1)return null;const t=l.slice(e+1).toLowerCase();return t.length>4||!/^[a-z0-9]+$/.test(t)?null:t}function u(l){const e=g.c(17);let t,n;e[0]!==l?({filename:t,...n}=l,e[0]=l,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let s,i,a;e[3]!==t?(i=f(t),s=i?h[i]??F:null,a=i?.toUpperCase()??"",e[3]=t,e[4]=s,e[5]=i,e[6]=a):(s=e[4],i=e[5],a=e[6]);const c=a,m=Math.min(8+c.length*4.6,28);let p,x;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx("path",{d:"M19.5 1H8a4 4 0 0 0-4 4v30a4 4 0 0 0 4 4h16a4 4 0 0 0 4-4V9.5L19.5 1Z",className:"fill-background stroke-border",strokeWidth:"1.5"}),x=o.jsx("path",{d:"M19.5 1v4.5a4 4 0 0 0 4 4H28",className:"stroke-border",strokeWidth:"1.5"}),e[7]=p,e[8]=x):(p=e[7],x=e[8]);let r;e[9]!==m||e[10]!==s||e[11]!==i||e[12]!==c?(r=i&&s&&o.jsxs(o.Fragment,{children:[o.jsx("rect",{x:"1",y:"20",width:m,height:"12",rx:"3",fill:s}),o.jsx("text",{x:1+m/2,y:"29",textAnchor:"middle",fontSize:"7",fontWeight:"700",letterSpacing:"0.2",fill:"#FFFFFF",style:{fontFamily:"inherit"},children:c})]}),e[9]=m,e[10]=s,e[11]=i,e[12]=c,e[13]=r):r=e[13];let d;return e[14]!==n||e[15]!==r?(d=o.jsxs("svg",{viewBox:"0 0 32 40",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...n,children:[p,x,r]}),e[14]=n,e[15]=r,e[16]=d):d=e[16],d}export{u as F,v as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d$ as C,c as f,j as c,a5 as j,r as d,m as p,bg as b,e0 as v,e1 as h}from"./index-
|
|
1
|
+
import{d$ as C,c as f,j as c,a5 as j,r as d,m as p,bg as b,e0 as v,e1 as h}from"./index-5gemagf1.js";import{L as N}from"./label-D3lnkDBW.js";const E=C,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(j,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(b,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{E as F,w as a,P as b,R as c,M as d,L as e,y as f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as O,F as X,r as W,j as i,B as se,L as fe,Z as ue,$ as oe,b as P,o as pe,a1 as xe,a2 as he,e as le,p as ne,t as C,K as re,a5 as je,G as ae,bY as Se,bZ as _e,w as ve}from"./index-CCLrlcV5.js";import{P as H}from"./index-Dpu2EeKk.js";import{A as ye,b as be}from"./alert-CUvt8zLM.js";import{i as ze}from"./XCircle-BhdQMcW8.js";import{n as Ae}from"./LinkExternal01-BaEq__IR.js";import{s as we}from"./XClose-NC_Nso5p.js";import{u as Ce}from"./use-org-auth-client-t9JfZIjw.js";import{u as Oe}from"./use-debounced-autosave-BOUcFzt5.js";import{A as De}from"./avatar-D4NA2Bhx.js";import{I as ce}from"./input-D-IOsTjg.js";import{S as J,a as ee,b as Q,c as Ne}from"./settings-section-CW4NkTM6.js";import{d as me,S as Te,a as Fe,b as ke,c as Pe}from"./select-CDSdt8fw.js";import{S as Ee}from"./skeleton-CHINK0-G.js";import{A as de,t as Re,aV as Ke,aW as $e,a5 as Me,aX as Le}from"./agent-icon-B5lPNSsP.js";import{a as Ie,i as Ve,f as qe}from"./use-mcp-client-C-LXOIxN.js";import{a as Be}from"./use-virtual-mcp-DsDRQJX3.js";import{a as Ge}from"./agent-capabilities-cXfbMfjV.js";import{e as Ue,h as Qe,u as Ze,i as We}from"./use-organization-settings-BaavpVJk.js";import{S as Ye}from"./switch-5yajnsJ1.js";import{D as He}from"./domain-settings-C5eQMGnS.js";import{u as Xe}from"./studio-tools-VaW1QNJX.js";import{A as Je,a as et,b as tt,c as it,d as st,e as nt,f as ot,g as rt}from"./alert-dialog-jruC7mBq.js";import{R as at}from"./require-capability-ByZBV_vi.js";import"./sidebar-7RoWud82.js";import"./LayoutLeft-DTYf3Zp9.js";import"./use-mobile-WonL71_u.js";import"./X-D4P_xotm.js";import"./tooltip-D4n-WF2q.js";import"./User01-v0JW3r6M.js";import"./card-DYQ6zVHs.js";import"./ArrowUpRight-D9wNgkJO.js";import"./Check-DvgcRTBi.js";import"./ChevronDown-Dg-G9Bza.js";import"./ChevronUp-DVfjlsaH.js";import"./AlertCircle-B5sDezf-.js";import"./Tool01-Cn0-xBBt.js";import"./ArrowUp-BCKIIXqC.js";import"./ArrowLeft-hINWrmDM.js";import"./Tool02-BlzqzZAJ.js";import"./TrendUp01-B8cusAvZ.js";import"./ZapSquare-BEEyAqSI.js";import"./Users03-c4O2AlzH.js";import"./CheckCircle-hJqs3poK.js";import"./ChevronRight-D--quDsb.js";import"./DotsVertical-Dna5iyxv.js";import"./Stars02-Cw0-QoyL.js";import"./Copy01-A-iF56j2.js";import"./CpuChip01-C4a1EmKL.js";import"./CreditCard01-DD3YsjP8.js";import"./Globe01-DDNwpjh5.js";import"./Settings02-nh2DxBto.js";import"./Eye-Sv9L0hDt.js";import"./FilterLines-BP3DhNOH.js";import"./Share07-CnHohhT8.js";import"./Star01-Dtu6SkUk.js";import"./Globe04-akm1kAFe.js";import"./SwitchHorizontal01-Buu6mw-W.js";import"./HardDrive-CK5PbODV.js";import"./Key01-LdZJmUXU.js";import"./LogOut01-1f2QOh82.js";import"./Monitor01-DPJi2KGo.js";import"./Sun-CPY69DKL.js";import"./Palette-DpXIzWgD.js";import"./Play-CFJ7WwbI.js";import"./Plus-DzzDYhDH.js";import"./SearchLg-Ddza_Jes.js";import"./SearchMd-DheaqQdu.js";import"./Shield01-CDtPaxfg.js";import"./Stars01-C_U8OZIq.js";import"./Trash01-C3hHB6NE.js";import"./Upload01-DOECu3Z7.js";import"./Users01-Bo461Fnp.js";import"./Zap-UDNJrio-.js";import"./auth-Bz9lRoBo.js";import"./badge-BjVK4C89.js";import"./use-capability-if9Tx37f.js";import"./access-gate-vBdGjDQW.js";import"./capability-load-error-BB1uxQxo.js";function ge(e){return`connect-banner-dismissed:${e}`}function lt(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ge(e))==="1"}catch{return!1}}function ct(){const e=O.c(17),{org:t}=X();let s;e[0]!==t.id?(s=()=>lt(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,a]=W.useState(s);if(l)return null;let c;e[2]!==t.id?(c=()=>{a(!0);try{localStorage.setItem(ge(t.id),"1")}catch{}},e[2]=t.id,e[3]=c):c=e[3];const r=c;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ae,{}),e[4]=m):m=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=n):n=e[5];let g;e[6]!==t.slug?(g={org:t.slug},e[6]=t.slug,e[7]=g):g=e[7];let o;e[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(ze,{size:12}),e[8]=o):o=e[8];let u;e[9]!==g?(u=i.jsx(se,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(fe,{to:"/$org/settings/connect",params:g,children:["Connect to clients ",o]})}),e[9]=g,e[10]=u):u=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(we,{size:14}),e[11]=d):d=e[11];let f;e[12]!==r?(f=i.jsx(se,{variant:"ghost",size:"icon",className:"size-7",onClick:r,"aria-label":"Dismiss",children:d}),e[12]=r,e[13]=f):f=e[13];let p;return e[14]!==u||e[15]!==f?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(be,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[n,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[u,f]})]})]}),e[14]=u,e[15]=f,e[16]=p):p=e[16],p}const mt=ue({name:oe().min(1,"Name is required").max(255,"Name is too long"),logo:oe().optional()});function dt(e){const t=O.c(17),{value:s,onChange:l,name:a,disabled:c}=e,r=P(),m=W.useRef(null);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>m.current?.click(),t[0]=n):n=t[0];const g=n;let o;t[1]!==l||t[2]!==r?(o=D=>{const h=D.target.files?.[0];if(!h)return;if(h.size>2097152){C.error(r("settings.organizationForm.imageTooLarge"));return}const j=new FileReader;j.onerror=()=>C.error(r("settings.organizationForm.failedToReadImage")),j.onloadend=()=>{j.result&&l(j.result),m.current&&(m.current.value="")},j.readAsDataURL(h)},t[1]=l,t[2]=r,t[3]=o):o=t[3];const u=o;let d;t[4]!==r?(d=r("settings.organizationForm.uploadLogoLabel"),t[4]=r,t[5]=d):d=t[5];let f;t[6]!==c||t[7]!==u?(f=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:u,className:"hidden",disabled:c}),t[6]=c,t[7]=u,t[8]=f):f=t[8];const p=s||void 0,x=a??"?";let S;t[9]!==p||t[10]!==x?(S=i.jsx(De,{url:p,fallback:x,shape:"square",size:"base"}),t[9]=p,t[10]=x,t[11]=S):S=t[11];let v;return t[12]!==c||t[13]!==d||t[14]!==f||t[15]!==S?(v=i.jsxs("button",{type:"button",onClick:g,disabled:c,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":d,children:[f,S]}),t[12]=c,t[13]=d,t[14]=f,t[15]=S,t[16]=v):v=t[16],v}function gt(){const e=P(),{org:t}=X(),s=Ce(),l=pe(),a=xe({resolver:he(mt),values:{name:t.name??"",logo:t.logo??""}}),c=le({mutationFn:async o=>{const u={name:o.name};o.logo&&(u.logo=o.logo);const d=await s.organization.update({data:u});if(d?.error)throw new Error(d.error.message||e("settings.organizationForm.failedToUpdateOrg"));return d},onSuccess:(o,u)=>{ne("organization_settings_updated",{organization_id:t.id,fields:Object.keys(u)}),l.invalidateQueries({queryKey:re.organizations()}),l.invalidateQueries({queryKey:re.activeOrganization(t.slug)}),C.success(e("settings.organizationForm.updateSuccess"))},onError:(o,u)=>{ne("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(u),error:o instanceof Error?o.message:String(o)}),C.error(o instanceof Error?o.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:r,flush:m}=Oe({save:async()=>{const o=a.control._formState.dirtyFields;if(Object.keys(o).length===0||!await a.trigger())return;const d=a.getValues(),f=a.control._defaultValues;a.reset(d,{keepValues:!0});try{await c.mutateAsync(d)}catch{a.reset(f,{keepValues:!0})}}}),n=a.formState.errors,g=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(J,{children:i.jsxs(ee,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(dt,{value:a.watch("logo"),onChange:o=>{a.setValue("logo",o??"",{shouldDirty:!0}),m()},name:a.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(je,{control:a.control,name:"name",render:({field:o})=>i.jsx(ce,{id:"org-name",...o,onChange:u=>{o.onChange(u),r()},onBlur:()=>{o.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[g&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:g}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(n.name||n.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[n.name&&i.jsx("p",{className:"text-xs text-destructive",children:n.name.message}),n.logo&&i.jsx("p",{className:"text-xs text-destructive",children:n.logo.message})]})]})})}const ie="__super_agent__";function ft(){const e=O.c(42),t=P(),{org:s}=X(),l=Be(),{mainAgentId:a}=Ue(),c=Qe();let r,m,n,g,o,u,d,f;if(e[0]!==l||e[1]!==a||e[2]!==s.id||e[3]!==c||e[4]!==t){const S=Ge(l),v=(l??[]).filter(xt).filter(_=>!S.has(_.id)).filter(pt);let D;e[13]!==s.id?(D=Ie(s.id),e[13]=s.id,e[14]=D):D=e[14];const h=D,j=a!=null?(l??[]).find(_=>_.id===a):void 0,N=j?j.id:ie,T=j&&!v.some(_=>_.id===j.id)?[j,...v]:v;let w;e[15]!==l||e[16]!==c||e[17]!==h.title||e[18]!==t?(w=_=>{const A=_===ie?null:_,R=A===null?h.title:(l??[]).find(k=>k.id===A)?.title??"";c.mutate(A,{onSuccess:()=>C.success(A===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:R})),onError:()=>C.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=c,e[17]=h.title,e[18]=t,e[19]=w):w=e[19];const F=w;m=Te,o=N,u=F,d=c.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Fe,{className:"w-full sm:w-[280px]",children:i.jsx(ke,{})}),e[20]=f):f=e[20],r=Pe;let y;e[21]!==h.icon||e[22]!==h.title?(y=i.jsx(de,{icon:h.icon,name:h.title,size:"xs",className:"shrink-0"}),e[21]=h.icon,e[22]=h.title,e[23]=y):y=e[23];let b;e[24]!==t?(b=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=b):b=e[25];let z;e[26]!==b?(z=i.jsx("span",{className:"truncate",children:b}),e[26]=b,e[27]=z):z=e[27],e[28]!==z||e[29]!==y?(n=i.jsx(me,{value:ie,children:i.jsxs("span",{className:"flex items-center gap-2",children:[y,z]})}),e[28]=z,e[29]=y,e[30]=n):n=e[30],g=T.map(ut),e[0]=l,e[1]=a,e[2]=s.id,e[3]=c,e[4]=t,e[5]=r,e[6]=m,e[7]=n,e[8]=g,e[9]=o,e[10]=u,e[11]=d,e[12]=f}else r=e[5],m=e[6],n=e[7],g=e[8],o=e[9],u=e[10],d=e[11],f=e[12];let p;e[31]!==r||e[32]!==n||e[33]!==g?(p=i.jsxs(r,{children:[n,g]}),e[31]=r,e[32]=n,e[33]=g,e[34]=p):p=e[34];let x;return e[35]!==m||e[36]!==o||e[37]!==u||e[38]!==d||e[39]!==f||e[40]!==p?(x=i.jsxs(m,{value:o,onValueChange:u,disabled:d,children:[f,p]}),e[35]=m,e[36]=o,e[37]=u,e[38]=d,e[39]=f,e[40]=p,e[41]=x):x=e[41],x}function ut(e){return i.jsx(me,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(de,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function pt(e){return!qe(e.id)}function xt(e){return!Ve(e.id)}function ht(){const e=O.c(16),t=P();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==t?(a=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=a):a=e[5];let c;e[6]!==t?(c=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=c):c=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(W.Suspense,{fallback:i.jsx(Ee,{className:"h-9 w-[280px]"}),children:i.jsx(ft,{})}),e[8]=r):r=e[8];let m;e[9]!==a||e[10]!==c?(m=i.jsx(ee,{children:i.jsx(Q,{title:a,description:c,action:r})}),e[9]=a,e[10]=c,e[11]=m):m=e[11];let n;return e[12]!==s||e[13]!==l||e[14]!==m?(n=i.jsx(J,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=n):n=e[15],n}function jt(){const e=O.c(12),t=P();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.review.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Z,{flag:"qa_agent_enabled",icon:i.jsx(Re,{size:16}),titleKey:"settings.review.qaAgentTitle",descriptionKey:"settings.review.qaAgentDescription"}),e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Z,{flag:"code_reviewer_enabled",icon:i.jsx(Ke,{size:16}),titleKey:"settings.review.codeReviewerTitle",descriptionKey:"settings.review.codeReviewerDescription"}),e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Z,{flag:"cheap_reviewer_model",icon:i.jsx($e,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Z,{flag:"auto_merge",icon:i.jsx(Me,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),e[7]=m):m=e[7];let n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(ee,{children:[a,c,r,m,i.jsx(Z,{flag:"auto_assign_report_tasks_to_super_agent",icon:i.jsx(Le,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=n):n=e[8];let g;return e[9]!==s||e[10]!==l?(g=i.jsx(J,{title:s,description:l,children:n}),e[9]=s,e[10]=l,e[11]=g):g=e[11],g}function Z(e){const t=O.c(23),{flag:s,icon:l,titleKey:a,descriptionKey:c}=e,r=P(),m=Ze(s),n=We();let g;t[0]!==r||t[1]!==a?(g=r(a),t[0]=r,t[1]=a,t[2]=g):g=t[2];let o;t[3]!==c||t[4]!==r?(o=r(c),t[3]=c,t[4]=r,t[5]=o):o=t[5];const u=n.isPending;let d;t[6]!==r||t[7]!==a?(d=r(a),t[6]=r,t[7]=a,t[8]=d):d=t[8];let f;t[9]!==s||t[10]!==n||t[11]!==r?(f=S=>n.mutate(s,S,{onError:()=>C.error(r("settings.review.updateError"))}),t[9]=s,t[10]=n,t[11]=r,t[12]=f):f=t[12];let p;t[13]!==m||t[14]!==n.isPending||t[15]!==d||t[16]!==f?(p=i.jsx(Ye,{checked:m,disabled:u,"aria-label":d,onCheckedChange:f}),t[13]=m,t[14]=n.isPending,t[15]=d,t[16]=f,t[17]=p):p=t[17];let x;return t[18]!==l||t[19]!==g||t[20]!==o||t[21]!==p?(x=i.jsx(Q,{icon:l,title:g,description:o,action:p}),t[18]=l,t[19]=g,t[20]=o,t[21]=p,t[22]=x):x=t[22],x}function St(){const e=O.c(86),t=P(),{org:s}=X(),[l,a]=W.useState(!1),[c,r]=W.useState(""),m=Xe();let n;e[0]!==s.id||e[1]!==m?(n=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=n):n=e[2];let g;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(g=()=>{ne("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),Se()?.org===s.slug&&_e(),ve(),C.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=g):g=e[6];let o;e[7]!==t?(o=E=>{C.error(E instanceof Error?E.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=o):o=e[8];let u;e[9]!==n||e[10]!==g||e[11]!==o?(u={mutationFn:n,onSuccess:g,onError:o},e[9]=n,e[10]=g,e[11]=o,e[12]=u):u=e[12];const d=le(u);let f;e[13]!==t?(f=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=f):f=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let x;e[17]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=x):x=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=()=>a(!0),e[21]=v):v=e[21];const D=d.isPending;let h;e[22]!==t?(h=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=h):h=e[23];let j;e[24]!==d.isPending||e[25]!==h?(j=i.jsx(se,{variant:"destructive",size:"sm",onClick:v,disabled:D,children:h}),e[24]=d.isPending,e[25]=h,e[26]=j):j=e[26];let N;e[27]!==j||e[28]!==x||e[29]!==S?(N=i.jsx(ee,{className:"border-destructive/40",children:i.jsx(Q,{title:x,description:S,action:j})}),e[27]=j,e[28]=x,e[29]=S,e[30]=N):N=e[30];let T;e[31]!==N||e[32]!==f||e[33]!==p?(T=i.jsx(J,{title:f,description:p,children:N}),e[31]=N,e[32]=f,e[33]=p,e[34]=T):T=e[34];let w;e[35]===Symbol.for("react.memo_cache_sentinel")?(w=E=>{a(E),E||r("")},e[35]=w):w=e[35];let F;e[36]!==t?(F=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=F):F=e[37];let y;e[38]!==F?(y=i.jsx(Je,{children:F}),e[38]=F,e[39]=y):y=e[39];let b;e[40]!==s.name||e[41]!==t?(b=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=b):b=e[42];let z;e[43]!==b?(z=i.jsx("p",{children:b}),e[43]=b,e[44]=z):z=e[44];let _;e[45]!==s.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let R;e[50]===Symbol.for("react.memo_cache_sentinel")?(R=E=>r(E.target.value),e[50]=R):R=e[50];let k;e[51]!==c||e[52]!==s.name?(k=i.jsx(ce,{value:c,onChange:R,placeholder:s.name,autoFocus:!0}),e[51]=c,e[52]=s.name,e[53]=k):k=e[53];let K;e[54]!==z||e[55]!==A||e[56]!==k?(K=i.jsx(et,{asChild:!0,children:i.jsxs("div",{children:[z,A,k]})}),e[54]=z,e[55]=A,e[56]=k,e[57]=K):K=e[57];let $;e[58]!==y||e[59]!==K?($=i.jsxs(tt,{children:[y,K]}),e[58]=y,e[59]=K,e[60]=$):$=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let L;e[63]!==M?(L=i.jsx(it,{children:M}),e[63]=M,e[64]=L):L=e[64];let I;e[65]!==d?(I=()=>d.mutate(),e[65]=d,e[66]=I):I=e[66];const te=c!==s.name||d.isPending;let V;e[67]!==d.isPending||e[68]!==t?(V=d.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=d.isPending,e[68]=t,e[69]=V):V=e[69];let q;e[70]!==I||e[71]!==te||e[72]!==V?(q=i.jsx(st,{onClick:I,disabled:te,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:V}),e[70]=I,e[71]=te,e[72]=V,e[73]=q):q=e[73];let B;e[74]!==L||e[75]!==q?(B=i.jsxs(nt,{children:[L,q]}),e[74]=L,e[75]=q,e[76]=B):B=e[76];let G;e[77]!==$||e[78]!==B?(G=i.jsxs(ot,{children:[$,B]}),e[77]=$,e[78]=B,e[79]=G):G=e[79];let U;e[80]!==l||e[81]!==G?(U=i.jsx(rt,{open:l,onOpenChange:w,children:G}),e[80]=l,e[81]=G,e[82]=U):U=e[82];let Y;return e[83]!==T||e[84]!==U?(Y=i.jsxs(i.Fragment,{children:[T,U]}),e[83]=T,e[84]=U,e[85]=Y):Y=e[85],Y}function _t(){const e=O.c(12),t=P();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(H.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let a,c,r,m,n,g;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(ct,{}),c=i.jsx(gt,{}),r=i.jsx(ht,{}),m=i.jsx(jt,{}),n=i.jsx(He,{}),g=i.jsx(St,{}),e[4]=a,e[5]=c,e[6]=r,e[7]=m,e[8]=n,e[9]=g):(a=e[4],c=e[5],r=e[6],m=e[7],n=e[8],g=e[9]);let o;return e[10]!==l?(o=i.jsx(H,{children:i.jsx(H.Content,{children:i.jsx(H.Body,{children:i.jsxs(Ne,{children:[l,a,c,r,m,n,g]})})})}),e[10]=l,e[11]=o):o=e[11],o}function Gi(){const e=O.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(at,{capability:"org:manage",area:"general settings",children:i.jsx(_t,{})}),e[0]=t):t=e[0],t}export{Gi as default};
|
|
1
|
+
import{c as O,F as X,r as W,j as i,B as se,L as fe,Z as ue,$ as oe,b as P,o as pe,a1 as xe,a2 as he,e as le,p as ne,t as C,K as re,a5 as je,G as ae,bY as Se,bZ as _e,w as ve}from"./index-5gemagf1.js";import{P as H}from"./index-ITbViqR5.js";import{A as ye,b as be}from"./alert-BMIHoWVc.js";import{i as ze}from"./XCircle-BnwtkUhP.js";import{n as Ae}from"./LinkExternal01-zuYuwJZ-.js";import{s as we}from"./XClose-DI0JEn_A.js";import{u as Ce}from"./use-org-auth-client-Dur3Yig8.js";import{u as Oe}from"./use-debounced-autosave-BJZGzBBA.js";import{A as De}from"./avatar-D98__g63.js";import{I as ce}from"./input-Dolcjx-g.js";import{S as J,a as ee,b as Q,c as Ne}from"./settings-section-y0TY3QQz.js";import{d as me,S as Te,a as Fe,b as ke,c as Pe}from"./select-Ddz9NuOw.js";import{S as Ee}from"./skeleton-CEbCDyXB.js";import{A as de,t as Re,aV as Ke,aW as $e,a5 as Me,aX as Le}from"./agent-icon-DxmmOieH.js";import{a as Ie,i as Ve,f as qe}from"./use-mcp-client-DTIaJzH5.js";import{a as Be}from"./use-virtual-mcp-CChazQvN.js";import{a as Ge}from"./agent-capabilities-cXfbMfjV.js";import{e as Ue,h as Qe,u as Ze,i as We}from"./use-organization-settings-CNMbxTls.js";import{S as Ye}from"./switch-DuNudDxw.js";import{D as He}from"./domain-settings-I_K89_VF.js";import{u as Xe}from"./studio-tools-CQ2rygf5.js";import{A as Je,a as et,b as tt,c as it,d as st,e as nt,f as ot,g as rt}from"./alert-dialog-C-EKs2lL.js";import{R as at}from"./require-capability-ZHR0pgYI.js";import"./sidebar-4tITL9-j.js";import"./LayoutLeft-BdUVMA1s.js";import"./use-mobile-BfoXl3UK.js";import"./X-ibOvxK6r.js";import"./tooltip-CyXjvnKb.js";import"./User01-BIqoyKIS.js";import"./card-FTRG4FI8.js";import"./ArrowUpRight-DZpp5DED.js";import"./Check-BVTsyPDh.js";import"./ChevronDown-C6mtwPLn.js";import"./ChevronUp-BIP55CrT.js";import"./AlertCircle-BngcPF6g.js";import"./Tool01-CN04dNAZ.js";import"./ArrowUp-CQvXx2Eb.js";import"./ArrowLeft-D0SMPcnr.js";import"./Tool02-mI78frGe.js";import"./TrendUp01-D7jiFi03.js";import"./ZapSquare-BYkzde_j.js";import"./Users03-DUwPNwXU.js";import"./CheckCircle-Blh8DmbD.js";import"./ChevronRight-BEp1VAsd.js";import"./DotsVertical-C6DREveP.js";import"./Stars02-BAO2I02Z.js";import"./Copy01-DgiqwcSK.js";import"./CpuChip01-CENIClYZ.js";import"./CreditCard01-BhrVduIh.js";import"./Globe01-7jkIPFoA.js";import"./Settings02-I4I2nClv.js";import"./Eye-PKXEw9_c.js";import"./FilterLines-CEQFAuO4.js";import"./Share07-BPGtMefI.js";import"./Star01-DCIbpwnb.js";import"./Globe04-DR8uwSal.js";import"./SwitchHorizontal01-zV8kVIQA.js";import"./HardDrive-JJwxAgPq.js";import"./Key01-BJ3dxv9s.js";import"./LogOut01-BLeeRd_x.js";import"./Monitor01-BnK9fFda.js";import"./Sun-E3c2IB3O.js";import"./Palette-Cg1tIBcF.js";import"./Play-2YDlreGg.js";import"./Plus-CgUsDtXu.js";import"./SearchLg-CKHQyByC.js";import"./SearchMd-D_hwjTJs.js";import"./Shield01-CK9cE1oJ.js";import"./Stars01-C5PvctF2.js";import"./Trash01-BxlP0eyg.js";import"./Upload01-Bbnlu9tq.js";import"./Users01-DY_fYiv0.js";import"./Zap-DS_8b3SH.js";import"./auth-Bog8FqNA.js";import"./badge-Ce3GqcFl.js";import"./use-capability-D3-UBGHo.js";import"./access-gate-DS6vMaXc.js";import"./capability-load-error-DG1kaWeF.js";function ge(e){return`connect-banner-dismissed:${e}`}function lt(e){if(typeof window>"u")return!0;try{return localStorage.getItem(ge(e))==="1"}catch{return!1}}function ct(){const e=O.c(17),{org:t}=X();let s;e[0]!==t.id?(s=()=>lt(t.id),e[0]=t.id,e[1]=s):s=e[1];const[l,a]=W.useState(s);if(l)return null;let c;e[2]!==t.id?(c=()=>{a(!0);try{localStorage.setItem(ge(t.id),"1")}catch{}},e[2]=t.id,e[3]=c):c=e[3];const r=c;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Ae,{}),e[4]=m):m=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("span",{children:"Use Studio MCP anywhere — paste a command into Claude Code, Cursor, Codex, or any MCP client."}),e[5]=n):n=e[5];let g;e[6]!==t.slug?(g={org:t.slug},e[6]=t.slug,e[7]=g):g=e[7];let o;e[8]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(ze,{size:12}),e[8]=o):o=e[8];let u;e[9]!==g?(u=i.jsx(se,{asChild:!0,size:"sm",variant:"ghost",className:"text-xs gap-1",children:i.jsxs(fe,{to:"/$org/settings/connect",params:g,children:["Connect to clients ",o]})}),e[9]=g,e[10]=u):u=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(we,{size:14}),e[11]=d):d=e[11];let f;e[12]!==r?(f=i.jsx(se,{variant:"ghost",size:"icon",className:"size-7",onClick:r,"aria-label":"Dismiss",children:d}),e[12]=r,e[13]=f):f=e[13];let p;return e[14]!==u||e[15]!==f?(p=i.jsxs(ye,{variant:"info",className:"items-center",children:[m,i.jsxs(be,{className:"flex-1 flex items-center justify-between gap-2 text-sm",children:[n,i.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[u,f]})]})]}),e[14]=u,e[15]=f,e[16]=p):p=e[16],p}const mt=ue({name:oe().min(1,"Name is required").max(255,"Name is too long"),logo:oe().optional()});function dt(e){const t=O.c(17),{value:s,onChange:l,name:a,disabled:c}=e,r=P(),m=W.useRef(null);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=()=>m.current?.click(),t[0]=n):n=t[0];const g=n;let o;t[1]!==l||t[2]!==r?(o=D=>{const h=D.target.files?.[0];if(!h)return;if(h.size>2097152){C.error(r("settings.organizationForm.imageTooLarge"));return}const j=new FileReader;j.onerror=()=>C.error(r("settings.organizationForm.failedToReadImage")),j.onloadend=()=>{j.result&&l(j.result),m.current&&(m.current.value="")},j.readAsDataURL(h)},t[1]=l,t[2]=r,t[3]=o):o=t[3];const u=o;let d;t[4]!==r?(d=r("settings.organizationForm.uploadLogoLabel"),t[4]=r,t[5]=d):d=t[5];let f;t[6]!==c||t[7]!==u?(f=i.jsx("input",{ref:m,type:"file",accept:"image/*",onChange:u,className:"hidden",disabled:c}),t[6]=c,t[7]=u,t[8]=f):f=t[8];const p=s||void 0,x=a??"?";let S;t[9]!==p||t[10]!==x?(S=i.jsx(De,{url:p,fallback:x,shape:"square",size:"base"}),t[9]=p,t[10]=x,t[11]=S):S=t[11];let v;return t[12]!==c||t[13]!==d||t[14]!==f||t[15]!==S?(v=i.jsxs("button",{type:"button",onClick:g,disabled:c,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":d,children:[f,S]}),t[12]=c,t[13]=d,t[14]=f,t[15]=S,t[16]=v):v=t[16],v}function gt(){const e=P(),{org:t}=X(),s=Ce(),l=pe(),a=xe({resolver:he(mt),values:{name:t.name??"",logo:t.logo??""}}),c=le({mutationFn:async o=>{const u={name:o.name};o.logo&&(u.logo=o.logo);const d=await s.organization.update({data:u});if(d?.error)throw new Error(d.error.message||e("settings.organizationForm.failedToUpdateOrg"));return d},onSuccess:(o,u)=>{ne("organization_settings_updated",{organization_id:t.id,fields:Object.keys(u)}),l.invalidateQueries({queryKey:re.organizations()}),l.invalidateQueries({queryKey:re.activeOrganization(t.slug)}),C.success(e("settings.organizationForm.updateSuccess"))},onError:(o,u)=>{ne("organization_settings_update_failed",{organization_id:t.id,fields:Object.keys(u),error:o instanceof Error?o.message:String(o)}),C.error(o instanceof Error?o.message:e("settings.organizationForm.failedToUpdateOrg"))}}),{schedule:r,flush:m}=Oe({save:async()=>{const o=a.control._formState.dirtyFields;if(Object.keys(o).length===0||!await a.trigger())return;const d=a.getValues(),f=a.control._defaultValues;a.reset(d,{keepValues:!0});try{await c.mutateAsync(d)}catch{a.reset(f,{keepValues:!0})}}}),n=a.formState.errors,g=typeof window<"u"?`${window.location.host}/`:"";return i.jsx(J,{children:i.jsxs(ee,{children:[i.jsx(Q,{title:e("settings.organizationForm.logoTitle"),description:e("settings.organizationForm.logoDescription"),action:i.jsx(dt,{value:a.watch("logo"),onChange:o=>{a.setValue("logo",o??"",{shouldDirty:!0}),m()},name:a.watch("name")})}),i.jsx(Q,{title:e("settings.organizationForm.nameTitle"),action:i.jsx(je,{control:a.control,name:"name",render:({field:o})=>i.jsx(ce,{id:"org-name",...o,onChange:u=>{o.onChange(u),r()},onBlur:()=>{o.onBlur(),m()},placeholder:e("settings.organizationForm.namePlaceholder"),className:"w-[280px]"})})}),i.jsx(Q,{title:e("settings.organizationForm.urlTitle"),description:e("settings.organizationForm.urlDescription"),action:i.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-muted/40 overflow-hidden",children:[g&&i.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:g}),i.jsx("span",{className:"flex-1 min-w-0 px-2 py-1.5 text-sm text-foreground truncate",children:t.slug})]})}),(n.name||n.logo)&&i.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[n.name&&i.jsx("p",{className:"text-xs text-destructive",children:n.name.message}),n.logo&&i.jsx("p",{className:"text-xs text-destructive",children:n.logo.message})]})]})})}const ie="__super_agent__";function ft(){const e=O.c(42),t=P(),{org:s}=X(),l=Be(),{mainAgentId:a}=Ue(),c=Qe();let r,m,n,g,o,u,d,f;if(e[0]!==l||e[1]!==a||e[2]!==s.id||e[3]!==c||e[4]!==t){const S=Ge(l),v=(l??[]).filter(xt).filter(_=>!S.has(_.id)).filter(pt);let D;e[13]!==s.id?(D=Ie(s.id),e[13]=s.id,e[14]=D):D=e[14];const h=D,j=a!=null?(l??[]).find(_=>_.id===a):void 0,N=j?j.id:ie,T=j&&!v.some(_=>_.id===j.id)?[j,...v]:v;let w;e[15]!==l||e[16]!==c||e[17]!==h.title||e[18]!==t?(w=_=>{const A=_===ie?null:_,R=A===null?h.title:(l??[]).find(k=>k.id===A)?.title??"";c.mutate(A,{onSuccess:()=>C.success(A===null?t("settings.mainAgent.resetToast"):t("settings.mainAgent.setToast",{title:R})),onError:()=>C.error(t("settings.mainAgent.errorToast"))})},e[15]=l,e[16]=c,e[17]=h.title,e[18]=t,e[19]=w):w=e[19];const F=w;m=Te,o=N,u=F,d=c.isPending,e[20]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Fe,{className:"w-full sm:w-[280px]",children:i.jsx(ke,{})}),e[20]=f):f=e[20],r=Pe;let y;e[21]!==h.icon||e[22]!==h.title?(y=i.jsx(de,{icon:h.icon,name:h.title,size:"xs",className:"shrink-0"}),e[21]=h.icon,e[22]=h.title,e[23]=y):y=e[23];let b;e[24]!==t?(b=t("settings.mainAgent.superAgentOption"),e[24]=t,e[25]=b):b=e[25];let z;e[26]!==b?(z=i.jsx("span",{className:"truncate",children:b}),e[26]=b,e[27]=z):z=e[27],e[28]!==z||e[29]!==y?(n=i.jsx(me,{value:ie,children:i.jsxs("span",{className:"flex items-center gap-2",children:[y,z]})}),e[28]=z,e[29]=y,e[30]=n):n=e[30],g=T.map(ut),e[0]=l,e[1]=a,e[2]=s.id,e[3]=c,e[4]=t,e[5]=r,e[6]=m,e[7]=n,e[8]=g,e[9]=o,e[10]=u,e[11]=d,e[12]=f}else r=e[5],m=e[6],n=e[7],g=e[8],o=e[9],u=e[10],d=e[11],f=e[12];let p;e[31]!==r||e[32]!==n||e[33]!==g?(p=i.jsxs(r,{children:[n,g]}),e[31]=r,e[32]=n,e[33]=g,e[34]=p):p=e[34];let x;return e[35]!==m||e[36]!==o||e[37]!==u||e[38]!==d||e[39]!==f||e[40]!==p?(x=i.jsxs(m,{value:o,onValueChange:u,disabled:d,children:[f,p]}),e[35]=m,e[36]=o,e[37]=u,e[38]=d,e[39]=f,e[40]=p,e[41]=x):x=e[41],x}function ut(e){return i.jsx(me,{value:e.id,children:i.jsxs("span",{className:"flex items-center gap-2",children:[i.jsx(de,{icon:e.icon,name:e.title,size:"xs",className:"shrink-0"}),i.jsx("span",{className:"truncate",children:e.title})]})},e.id)}function pt(e){return!qe(e.id)}function xt(e){return!Ve(e.id)}function ht(){const e=O.c(16),t=P();let s;e[0]!==t?(s=t("settings.mainAgent.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.mainAgent.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==t?(a=t("settings.mainAgent.itemTitle"),e[4]=t,e[5]=a):a=e[5];let c;e[6]!==t?(c=t("settings.mainAgent.itemDescription"),e[6]=t,e[7]=c):c=e[7];let r;e[8]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(W.Suspense,{fallback:i.jsx(Ee,{className:"h-9 w-[280px]"}),children:i.jsx(ft,{})}),e[8]=r):r=e[8];let m;e[9]!==a||e[10]!==c?(m=i.jsx(ee,{children:i.jsx(Q,{title:a,description:c,action:r})}),e[9]=a,e[10]=c,e[11]=m):m=e[11];let n;return e[12]!==s||e[13]!==l||e[14]!==m?(n=i.jsx(J,{title:s,description:l,children:m}),e[12]=s,e[13]=l,e[14]=m,e[15]=n):n=e[15],n}function jt(){const e=O.c(12),t=P();let s;e[0]!==t?(s=t("settings.review.title"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==t?(l=t("settings.review.description"),e[2]=t,e[3]=l):l=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(Z,{flag:"qa_agent_enabled",icon:i.jsx(Re,{size:16}),titleKey:"settings.review.qaAgentTitle",descriptionKey:"settings.review.qaAgentDescription"}),e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Z,{flag:"code_reviewer_enabled",icon:i.jsx(Ke,{size:16}),titleKey:"settings.review.codeReviewerTitle",descriptionKey:"settings.review.codeReviewerDescription"}),e[5]=c):c=e[5];let r;e[6]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(Z,{flag:"cheap_reviewer_model",icon:i.jsx($e,{size:16}),titleKey:"settings.review.cheapReviewerModelTitle",descriptionKey:"settings.review.cheapReviewerModelDescription"}),e[6]=r):r=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(Z,{flag:"auto_merge",icon:i.jsx(Me,{size:16}),titleKey:"settings.review.autoMergeTitle",descriptionKey:"settings.review.autoMergeDescription"}),e[7]=m):m=e[7];let n;e[8]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs(ee,{children:[a,c,r,m,i.jsx(Z,{flag:"auto_assign_report_tasks_to_super_agent",icon:i.jsx(Le,{size:16}),titleKey:"settings.review.autoAssignReportTasksTitle",descriptionKey:"settings.review.autoAssignReportTasksDescription"})]}),e[8]=n):n=e[8];let g;return e[9]!==s||e[10]!==l?(g=i.jsx(J,{title:s,description:l,children:n}),e[9]=s,e[10]=l,e[11]=g):g=e[11],g}function Z(e){const t=O.c(23),{flag:s,icon:l,titleKey:a,descriptionKey:c}=e,r=P(),m=Ze(s),n=We();let g;t[0]!==r||t[1]!==a?(g=r(a),t[0]=r,t[1]=a,t[2]=g):g=t[2];let o;t[3]!==c||t[4]!==r?(o=r(c),t[3]=c,t[4]=r,t[5]=o):o=t[5];const u=n.isPending;let d;t[6]!==r||t[7]!==a?(d=r(a),t[6]=r,t[7]=a,t[8]=d):d=t[8];let f;t[9]!==s||t[10]!==n||t[11]!==r?(f=S=>n.mutate(s,S,{onError:()=>C.error(r("settings.review.updateError"))}),t[9]=s,t[10]=n,t[11]=r,t[12]=f):f=t[12];let p;t[13]!==m||t[14]!==n.isPending||t[15]!==d||t[16]!==f?(p=i.jsx(Ye,{checked:m,disabled:u,"aria-label":d,onCheckedChange:f}),t[13]=m,t[14]=n.isPending,t[15]=d,t[16]=f,t[17]=p):p=t[17];let x;return t[18]!==l||t[19]!==g||t[20]!==o||t[21]!==p?(x=i.jsx(Q,{icon:l,title:g,description:o,action:p}),t[18]=l,t[19]=g,t[20]=o,t[21]=p,t[22]=x):x=t[22],x}function St(){const e=O.c(86),t=P(),{org:s}=X(),[l,a]=W.useState(!1),[c,r]=W.useState(""),m=Xe();let n;e[0]!==s.id||e[1]!==m?(n=async()=>{await m.call("ORGANIZATION_DELETE",{id:s.id})},e[0]=s.id,e[1]=m,e[2]=n):n=e[2];let g;e[3]!==s.id||e[4]!==s.slug||e[5]!==t?(g=()=>{ne("organization_deleted",{organization_id:s.id}),localStorage.getItem(ae.lastOrgSlug())===s.slug&&localStorage.removeItem(ae.lastOrgSlug()),Se()?.org===s.slug&&_e(),ve(),C.success(t("settings.deleteOrganizationSection.organizationDeleted")),window.location.href="/"},e[3]=s.id,e[4]=s.slug,e[5]=t,e[6]=g):g=e[6];let o;e[7]!==t?(o=E=>{C.error(E instanceof Error?E.message:t("settings.deleteOrganizationSection.failedToDeleteOrganization"))},e[7]=t,e[8]=o):o=e[8];let u;e[9]!==n||e[10]!==g||e[11]!==o?(u={mutationFn:n,onSuccess:g,onError:o},e[9]=n,e[10]=g,e[11]=o,e[12]=u):u=e[12];const d=le(u);let f;e[13]!==t?(f=t("settings.deleteOrganizationSection.dangerZone"),e[13]=t,e[14]=f):f=e[14];let p;e[15]!==t?(p=t("settings.deleteOrganizationSection.irreversibleActionsDescription"),e[15]=t,e[16]=p):p=e[16];let x;e[17]!==t?(x=t("settings.deleteOrganizationSection.deleteOrganizationTitle"),e[17]=t,e[18]=x):x=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=()=>a(!0),e[21]=v):v=e[21];const D=d.isPending;let h;e[22]!==t?(h=t("settings.deleteOrganizationSection.deleteButton"),e[22]=t,e[23]=h):h=e[23];let j;e[24]!==d.isPending||e[25]!==h?(j=i.jsx(se,{variant:"destructive",size:"sm",onClick:v,disabled:D,children:h}),e[24]=d.isPending,e[25]=h,e[26]=j):j=e[26];let N;e[27]!==j||e[28]!==x||e[29]!==S?(N=i.jsx(ee,{className:"border-destructive/40",children:i.jsx(Q,{title:x,description:S,action:j})}),e[27]=j,e[28]=x,e[29]=S,e[30]=N):N=e[30];let T;e[31]!==N||e[32]!==f||e[33]!==p?(T=i.jsx(J,{title:f,description:p,children:N}),e[31]=N,e[32]=f,e[33]=p,e[34]=T):T=e[34];let w;e[35]===Symbol.for("react.memo_cache_sentinel")?(w=E=>{a(E),E||r("")},e[35]=w):w=e[35];let F;e[36]!==t?(F=t("settings.deleteOrganizationSection.deleteOrganizationQuestion"),e[36]=t,e[37]=F):F=e[37];let y;e[38]!==F?(y=i.jsx(Je,{children:F}),e[38]=F,e[39]=y):y=e[39];let b;e[40]!==s.name||e[41]!==t?(b=t("settings.deleteOrganizationSection.deleteWarning",{organizationName:s.name}),e[40]=s.name,e[41]=t,e[42]=b):b=e[42];let z;e[43]!==b?(z=i.jsx("p",{children:b}),e[43]=b,e[44]=z):z=e[44];let _;e[45]!==s.name||e[46]!==t?(_=t("settings.deleteOrganizationSection.typeToConfirm",{organizationName:s.name}),e[45]=s.name,e[46]=t,e[47]=_):_=e[47];let A;e[48]!==_?(A=i.jsx("p",{className:"mt-3 mb-1.5",children:_}),e[48]=_,e[49]=A):A=e[49];let R;e[50]===Symbol.for("react.memo_cache_sentinel")?(R=E=>r(E.target.value),e[50]=R):R=e[50];let k;e[51]!==c||e[52]!==s.name?(k=i.jsx(ce,{value:c,onChange:R,placeholder:s.name,autoFocus:!0}),e[51]=c,e[52]=s.name,e[53]=k):k=e[53];let K;e[54]!==z||e[55]!==A||e[56]!==k?(K=i.jsx(et,{asChild:!0,children:i.jsxs("div",{children:[z,A,k]})}),e[54]=z,e[55]=A,e[56]=k,e[57]=K):K=e[57];let $;e[58]!==y||e[59]!==K?($=i.jsxs(tt,{children:[y,K]}),e[58]=y,e[59]=K,e[60]=$):$=e[60];let M;e[61]!==t?(M=t("settings.deleteOrganizationSection.cancel"),e[61]=t,e[62]=M):M=e[62];let L;e[63]!==M?(L=i.jsx(it,{children:M}),e[63]=M,e[64]=L):L=e[64];let I;e[65]!==d?(I=()=>d.mutate(),e[65]=d,e[66]=I):I=e[66];const te=c!==s.name||d.isPending;let V;e[67]!==d.isPending||e[68]!==t?(V=d.isPending?t("settings.deleteOrganizationSection.deleting"):t("settings.deleteOrganizationSection.deleteOrganizationAction"),e[67]=d.isPending,e[68]=t,e[69]=V):V=e[69];let q;e[70]!==I||e[71]!==te||e[72]!==V?(q=i.jsx(st,{onClick:I,disabled:te,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:V}),e[70]=I,e[71]=te,e[72]=V,e[73]=q):q=e[73];let B;e[74]!==L||e[75]!==q?(B=i.jsxs(nt,{children:[L,q]}),e[74]=L,e[75]=q,e[76]=B):B=e[76];let G;e[77]!==$||e[78]!==B?(G=i.jsxs(ot,{children:[$,B]}),e[77]=$,e[78]=B,e[79]=G):G=e[79];let U;e[80]!==l||e[81]!==G?(U=i.jsx(rt,{open:l,onOpenChange:w,children:G}),e[80]=l,e[81]=G,e[82]=U):U=e[82];let Y;return e[83]!==T||e[84]!==U?(Y=i.jsxs(i.Fragment,{children:[T,U]}),e[83]=T,e[84]=U,e[85]=Y):Y=e[85],Y}function _t(){const e=O.c(12),t=P();let s;e[0]!==t?(s=t("settings.orgGeneral.organization"),e[0]=t,e[1]=s):s=e[1];let l;e[2]!==s?(l=i.jsx(H.Title,{children:s}),e[2]=s,e[3]=l):l=e[3];let a,c,r,m,n,g;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx(ct,{}),c=i.jsx(gt,{}),r=i.jsx(ht,{}),m=i.jsx(jt,{}),n=i.jsx(He,{}),g=i.jsx(St,{}),e[4]=a,e[5]=c,e[6]=r,e[7]=m,e[8]=n,e[9]=g):(a=e[4],c=e[5],r=e[6],m=e[7],n=e[8],g=e[9]);let o;return e[10]!==l?(o=i.jsx(H,{children:i.jsx(H.Content,{children:i.jsx(H.Body,{children:i.jsxs(Ne,{children:[l,a,c,r,m,n,g]})})})}),e[10]=l,e[11]=o):o=e[11],o}function Gi(){const e=O.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(at,{capability:"org:manage",area:"general settings",children:i.jsx(_t,{})}),e[0]=t):t=e[0],t}export{Gi as default};
|