decocms 4.246.2 → 4.246.4
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-DOZzh9F_.js → AlertCircle-CywLLU7N.js} +1 -1
- package/dist/client/assets/{AreaChart-BEoF41lY.js → AreaChart-D_qhsjcn.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D3IfTAWC.js → ArrowLeft-5kZnTkMw.js} +1 -1
- package/dist/client/assets/{ArrowUp-D1Whwq-K.js → ArrowUp-Drc1UvH8.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-CibKwsqg.js → ArrowUpRight-BmVMgmrB.js} +1 -1
- package/dist/client/assets/{Check-CSFy6eOj.js → Check-BMTcpyw9.js} +1 -1
- package/dist/client/assets/{CheckCircle-BCbqPCn-.js → CheckCircle-DUIOLuHc.js} +1 -1
- package/dist/client/assets/{ChevronDown-DiERg-yU.js → ChevronDown-CRZWY5vZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-H-_IIqWd.js → ChevronRight-D-hHdaJE.js} +1 -1
- package/dist/client/assets/{ChevronSelectorVertical-Bnz5tSS1.js → ChevronSelectorVertical-DfQTwZbh.js} +1 -1
- package/dist/client/assets/{ChevronUp-CT1Rb5MC.js → ChevronUp-AUp1Qpqu.js} +1 -1
- package/dist/client/assets/{Copy01-CzEeXGsa.js → Copy01-DsL2MX7-.js} +1 -1
- package/dist/client/assets/{CreditCard01-DTIKWUon.js → CreditCard01-DSiwLzu5.js} +1 -1
- package/dist/client/assets/{DotsVertical-Bqf_kSFh.js → DotsVertical-T-qNNFNq.js} +1 -1
- package/dist/client/assets/{Download01-BPvwRxeD.js → Download01-Dx5a-JSz.js} +1 -1
- package/dist/client/assets/{Eye-CDfbu42j.js → Eye-7PQLukgG.js} +1 -1
- package/dist/client/assets/{FilterLines-Dc1F-WNI.js → FilterLines-CrgP-FUu.js} +1 -1
- package/dist/client/assets/{Globe01-CHMths1B.js → Globe01-BIM1CfT5.js} +1 -1
- package/dist/client/assets/{Globe04-CIol-u19.js → Globe04-CFZMqgDC.js} +1 -1
- package/dist/client/assets/{HardDrive-Bs-QsH_i.js → HardDrive-D-plrf3i.js} +1 -1
- package/dist/client/assets/{Key01-WuBVakl2.js → Key01-CKfOfm2w.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BF7bmTAo.js → LayoutLeft-CZkuUfPg.js} +1 -1
- package/dist/client/assets/{LinkExternal01-kQgSYVkJ.js → LinkExternal01-B6Mm4hAd.js} +1 -1
- package/dist/client/assets/{LockUnlocked01-Bvs7cZ-w.js → LockUnlocked01-BjEsmeyw.js} +1 -1
- package/dist/client/assets/{LogOut01-9xKoxZHy.js → LogOut01-C4uDW2hW.js} +1 -1
- package/dist/client/assets/{Monitor01-B5i4MO_v.js → Monitor01-DMCNMsNO.js} +1 -1
- package/dist/client/assets/{Palette-l5b6DG4Q.js → Palette-sGNsebP3.js} +1 -1
- package/dist/client/assets/{Play-AS6vVmkD.js → Play-CvUWjt5q.js} +1 -1
- package/dist/client/assets/{Plus-m61KPSTg.js → Plus-DPKssxLn.js} +1 -1
- package/dist/client/assets/{SearchLg-CDtXrrcW.js → SearchLg-L_JPa3fX.js} +1 -1
- package/dist/client/assets/{SearchMd-CF01LhHu.js → SearchMd-DHbBd3im.js} +1 -1
- package/dist/client/assets/{Settings02-CGZ0Ol25.js → Settings02-DyCd7JtA.js} +1 -1
- package/dist/client/assets/{Share07-Dc2LdheG.js → Share07-OGAtiC_R.js} +1 -1
- package/dist/client/assets/{Shield01-CkA8zl8k.js → Shield01-Ci_NiZAD.js} +1 -1
- package/dist/client/assets/{Stars01-Co5mOLjQ.js → Stars01-OuQBYZge.js} +1 -1
- package/dist/client/assets/{Stars02-CLHJV6ce.js → Stars02-Cp9bSUYT.js} +1 -1
- package/dist/client/assets/{Sun-Cz50Vxl-.js → Sun-B9dfSL2V.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BdWiZHby.js → SwitchHorizontal01-BhNLszpk.js} +1 -1
- package/dist/client/assets/{Tool01-D9lNVxCu.js → Tool01-BPmgbtqw.js} +1 -1
- package/dist/client/assets/{Tool02-DtJ6WkGT.js → Tool02-OPICFuOd.js} +1 -1
- package/dist/client/assets/{Trash01-BcRuo5Fe.js → Trash01-DgXUCXZR.js} +1 -1
- package/dist/client/assets/{TrendUp01-B2aFkzBy.js → TrendUp01-BfvESyFJ.js} +1 -1
- package/dist/client/assets/{Upload01-B1Z9PE0l.js → Upload01--adXJUt3.js} +1 -1
- package/dist/client/assets/{User01-D1UDDnNw.js → User01-Ddl7sykt.js} +1 -1
- package/dist/client/assets/UserSquare-DELWBgQx.js +1 -0
- package/dist/client/assets/{Users01-gv39jXBY.js → Users01-m82_DH1U.js} +1 -1
- package/dist/client/assets/{Users03-DM_1WdDy.js → Users03-D5uVoOJh.js} +1 -1
- package/dist/client/assets/{X-VMfnK-j5.js → X-GHDv2bPa.js} +1 -1
- package/dist/client/assets/{XCircle-D-ab7D3l.js → XCircle-Woz3hXm7.js} +1 -1
- package/dist/client/assets/{XClose-BmVO_SaY.js → XClose-C22JjfI5.js} +1 -1
- package/dist/client/assets/{YAxis-CYtp3V1k.js → YAxis-CTXvwn-w.js} +1 -1
- package/dist/client/assets/{Zap-BrJ2b2V7.js → Zap-DEkoWmnk.js} +1 -1
- package/dist/client/assets/{ZapSquare-BjQDrkMq.js → ZapSquare-Dk0j1NZT.js} +1 -1
- package/dist/client/assets/{access-gate-bmibgRvV.js → access-gate-CUuU4Akn.js} +1 -1
- package/dist/client/assets/agent-icon-BFfHpTj0.js +1 -0
- package/dist/client/assets/agents-list-B10S3S1o.js +1 -0
- package/dist/client/assets/ai-providers-D6M6vnH3.js +6 -0
- package/dist/client/assets/{alert-C6E9q71w.js → alert-CbzuL5U0.js} +1 -1
- package/dist/client/assets/{alert-dialog-DRGp9yFR.js → alert-dialog-B6efvq96.js} +1 -1
- package/dist/client/assets/api-keys-Be49xOHM.js +1 -0
- package/dist/client/assets/app-editor-Btw61HI8.js +1 -0
- package/dist/client/assets/{auth-Dk3-oFE7.js → auth-By9laq1a.js} +1 -1
- package/dist/client/assets/{auth-catchall-BB9-aq9V.js → auth-catchall-Dic0l2zL.js} +1 -1
- package/dist/client/assets/{auth-entry-C_2hGTBt.js → auth-entry-EiDYEymR.js} +1 -1
- package/dist/client/assets/{auth-split-layout-B7n763Vx.js → auth-split-layout-D9kcoAJV.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-BwcRtSiC.js → authenticate-and-persist-oauth-CjhkLgGL.js} +1 -1
- package/dist/client/assets/{automation-list-row-BIOSCgKN.js → automation-list-row-ByHEJHr4.js} +1 -1
- package/dist/client/assets/{automation-runs-D-R-Y_E3.js → automation-runs-CuJe3IJj.js} +16 -16
- package/dist/client/assets/automations-DRnBdfkP.js +1 -0
- package/dist/client/assets/{avatar-C448hZt-.js → avatar-XToRCTtg.js} +1 -1
- package/dist/client/assets/{badge-Bc-IWDm5.js → badge-DveTg52E.js} +1 -1
- package/dist/client/assets/{block-document-D__keZl9.js → block-document-CbRdyV4I.js} +1 -1
- package/dist/client/assets/{buckets-Dyp0YIko.js → buckets-HCO-gN-n.js} +1 -1
- package/dist/client/assets/bulk-category-panel-CZgZICpu.js +1 -0
- package/dist/client/assets/{capability-load-error-BPXMIbs3.js → capability-load-error-D9lVxIV_.js} +1 -1
- package/dist/client/assets/{card-CG7VHdDz.js → card-CzcIXv8O.js} +1 -1
- package/dist/client/assets/{cards-DY46VRdr.js → cards-CdIo4vf_.js} +1 -1
- package/dist/client/assets/category-editor-Nb4J4_cD.js +1 -0
- package/dist/client/assets/{chart-DoynaU7M.js → chart-CfPCrkm9.js} +1 -1
- package/dist/client/assets/{chat-context-D20WJCxs.js → chat-context-Dqusww-z.js} +5 -5
- package/dist/client/assets/{checkbox-BsGrD1YR.js → checkbox-BZtl3z8P.js} +1 -1
- package/dist/client/assets/choose-editor-CdvG_dim.js +1 -0
- package/dist/client/assets/{cli-auth-success-BBaOfXHx.js → cli-auth-success-CRHJTFXN.js} +1 -1
- package/dist/client/assets/collection-detail-BzgbN-Qy.js +1 -0
- package/dist/client/assets/{collection-display-button-CvRYqkOn.js → collection-display-button-CsTQ9UtS.js} +1 -1
- package/dist/client/assets/{collection-search-DGOZ00E9.js → collection-search-BAbgWU_h.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-Pg9EfyUB.js → collection-table-wrapper-DebkUlwo.js} +1 -1
- package/dist/client/assets/{collection-tabs-DaZaBm6K.js → collection-tabs-BuB0qOUO.js} +1 -1
- package/dist/client/assets/{command-D63NDRD_.js → command-DWt73k63.js} +1 -1
- package/dist/client/assets/commerce-onboarding-DNDoGFKk.js +1 -0
- package/dist/client/assets/{connect-GnxEAvmg.js → connect-Cii_fgku.js} +2 -2
- package/dist/client/assets/connection-card-C6y7PdX8.js +1 -0
- package/dist/client/assets/connection-detail-D7Voz52Y.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ZW-hGCeS.js → connection-form-helpers-CvmIulQM.js} +1 -1
- package/dist/client/assets/{connection-C_INLdxb.js → connection-ybedUfG8.js} +1 -1
- package/dist/client/assets/connections-B-Q5XAol.js +1 -0
- package/dist/client/assets/constants-BSYv1IkQ.js +1 -0
- package/dist/client/assets/{decopilot-sse-pool-CeSWLSEV.js → decopilot-sse-pool-Hm5cR6Ox.js} +1 -1
- package/dist/client/assets/{dialog-Ww_zj2g-.js → dialog-DF-CfFZo.js} +1 -1
- package/dist/client/assets/{domain-settings-C1hsjq6B.js → domain-settings-DyFCdtS5.js} +1 -1
- package/dist/client/assets/{drawer-lF-HaYn9.js → drawer-CDoSEnu9.js} +1 -1
- package/dist/client/assets/{dropdown-menu-ByKxU4Y4.js → dropdown-menu-CJxuIExP.js} +1 -1
- package/dist/client/assets/{empty-state-BJ2gnfVT.js → empty-state-CAvGBBF6.js} +1 -1
- package/dist/client/assets/extract-connection-data-DHCZqcQQ.js +1 -0
- package/dist/client/assets/file-explorer-iP4x_Yhy.js +2 -0
- package/dist/client/assets/{file-type-icon-B5W8k3cc.js → file-type-icon-DXPee-3o.js} +1 -1
- package/dist/client/assets/{form-BhElkTfE.js → form-3gPXzjO1.js} +1 -1
- package/dist/client/assets/general-VYZWN_XI.js +1 -0
- package/dist/client/assets/github-repo-picker-CbrjFpAT.js +1 -0
- package/dist/client/assets/{hooks-D72xT78n.js → hooks-2knfRhQG.js} +4 -4
- package/dist/client/assets/{index-DGV2vBko.js → index-BtSjLcb4.js} +1 -1
- package/dist/client/assets/index-C4tNsqrz.js +1 -0
- package/dist/client/assets/{index-CVShUKw1.js → index-CS8hxwi8.js} +1 -1
- package/dist/client/assets/{index-BGQowlvH.js → index-Cd5TgCBJ.js} +2 -2
- package/dist/client/assets/{index-COAHvcVh.js → index-ChP7VzHg.js} +49 -49
- package/dist/client/assets/{index-E8TCV-RN.js → index-CwnG996Y.js} +2 -2
- package/dist/client/assets/{index-CacyxM-B.js → index-DScyN1ng.js} +36 -36
- package/dist/client/assets/{index-GDSYOTBM.js → index-Dj9nFK99.js} +1 -1
- package/dist/client/assets/index-DukI1vFj.js +1 -0
- package/dist/client/assets/{index-redirect-DkpgAZX1.js → index-redirect-hmUlblcp.js} +1 -1
- package/dist/client/assets/{index-CSqLyX3L.js → index-xuoH-ELf.js} +1 -1
- package/dist/client/assets/{infra-billing-YoJpQK-_.js → infra-billing-6qUJ8FpF.js} +1 -1
- package/dist/client/assets/{input-B8ln-0Wl.js → input-B-WAAZ8l.js} +1 -1
- package/dist/client/assets/{integration-icon-CLbqw16t.js → integration-icon-h2cZJQ9Q.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-DBZ3baH8.js → invite-member-dialog-DmbzPllG.js} +1 -1
- package/dist/client/assets/{label-CCAJCJOj.js → label-Cg9QkeNq.js} +1 -1
- package/dist/client/assets/{layout-kT_5r6yU.js → layout-DZIITT9R.js} +1 -1
- package/dist/client/assets/{login-CdH7we7T.js → login-DjS6vG5F.js} +1 -1
- package/dist/client/assets/{mcp-oauth-YJCTRoaW.js → mcp-oauth-frjOq5nr.js} +1 -1
- package/dist/client/assets/{members-DkH9jYrb.js → members-DvCHXlKd.js} +1 -1
- package/dist/client/assets/{monaco-editor-q7NTyRwe.js → monaco-editor-B9zykm3x.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DCpIn3aa.js → monitoring-stats-row-DeZ0cyol.js} +1 -1
- package/dist/client/assets/{multi-select-FeXmTrOe.js → multi-select-BeamEHNc.js} +1 -1
- package/dist/client/assets/{oauth-callback-Br4bRi-8.js → oauth-callback-ChRRKa65.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-1lrQ44YW.js → oauth-callback-ai-provider-CAKZaPXP.js} +1 -1
- package/dist/client/assets/{onboarding-CJUbJrTS.js → onboarding-lmgUbBQe.js} +1 -1
- package/dist/client/assets/{org-layout-LRZQllfb.js → org-layout-B2VWo1QW.js} +1 -1
- package/dist/client/assets/{organization-choice-sfwWjhN7.js → organization-choice-BQ9U-Xq-.js} +1 -1
- package/dist/client/assets/{orgs-YJZRuVN_.js → orgs-Cdbe31pX.js} +1 -1
- package/dist/client/assets/{page-seo-form-BtKgt3m_.js → page-seo-form-D6iMCtAU.js} +1 -1
- package/dist/client/assets/{popover-5hCe1k-b.js → popover-Wy89IMWR.js} +1 -1
- package/dist/client/assets/post-editor-8um4AIC8.js +1 -0
- package/dist/client/assets/{primitives-BcUA5QnY.js → primitives-CuvVdjDA.js} +1 -1
- package/dist/client/assets/{profile-DLCbWXln.js → profile-C1mhmQtv.js} +1 -1
- package/dist/client/assets/project-app-view--LLIOxER.js +1 -0
- package/dist/client/assets/record-editor-DYnXx3r9.js +1 -0
- package/dist/client/assets/redirect-editor-B9-qGeUf.js +1 -0
- package/dist/client/assets/registry-CcjhOTSX.js +2 -0
- package/dist/client/assets/{registry-layout-DjY1XBxT.js → registry-layout-BR5urnXm.js} +2 -2
- package/dist/client/assets/{reports-gVOr0Sxi.js → reports-B9btUBiO.js} +1 -1
- package/dist/client/assets/{require-capability-BDCw5l2l.js → require-capability-DfzoRoy3.js} +1 -1
- package/dist/client/assets/{required-auth-layout-C0mQQwr6.js → required-auth-layout-BUpI2CfS.js} +1 -1
- package/dist/client/assets/{reset-password-DyhS2TkQ.js → reset-password-BVcWauyo.js} +1 -1
- package/dist/client/assets/roles-COefXdsU.js +1 -0
- package/dist/client/assets/{search-input-ByYoJKBQ.js → search-input-DGjtP6Rh.js} +1 -1
- package/dist/client/assets/{secrets-BRUyuZE5.js → secrets-BEPk1-eF.js} +1 -1
- package/dist/client/assets/{sections-editor-at21kKiT.js → sections-editor-DT6LvCBZ.js} +2 -2
- package/dist/client/assets/{select-CwAouusu.js → select-7pa4_aUT.js} +1 -1
- package/dist/client/assets/select-model-DQ1eNQu7.js +4 -0
- package/dist/client/assets/self-tool-result-BGGrfBl-.js +1 -0
- package/dist/client/assets/seo-editor-0ctPVCix.js +1 -0
- package/dist/client/assets/settings-layout-B147f-12.js +1 -0
- package/dist/client/assets/{settings-section-Cz2znp8W.js → settings-section-XDvcEzCV.js} +1 -1
- package/dist/client/assets/{settings-subnav-a1a1GCc2.js → settings-subnav-fRspG0-I.js} +1 -1
- package/dist/client/assets/{shell-controls-BPVHXOz1.js → shell-controls-nc8A-U3S.js} +1 -1
- package/dist/client/assets/shell-layout-BkFHuRxc.js +1 -0
- package/dist/client/assets/{sidebar-BDv_n64F.js → sidebar-BI-9XBR_.js} +1 -1
- package/dist/client/assets/{skeleton-DOg01VWn.js → skeleton-CmjcgP6R.js} +1 -1
- package/dist/client/assets/{spinner-D7fl_vK2.js → spinner-Ch7938P6.js} +1 -1
- package/dist/client/assets/{sso-kMJDATrG.js → sso-N3cjPoo1.js} +1 -1
- package/dist/client/assets/store-Dpv1v_pN.js +1 -0
- package/dist/client/assets/store-registry-B4Pzxsjd.js +2 -0
- package/dist/client/assets/{studio-tools-O0czolAT.js → studio-tools-DjBsxbnj.js} +1 -1
- package/dist/client/assets/{switch-B0vh0spM.js → switch-Bz_Ut2Tq.js} +1 -1
- package/dist/client/assets/synced-repos-4hDvRnUi.js +1 -0
- package/dist/client/assets/{tab-id-ZL6F14qy.js → tab-id-DgRfDePR.js} +1 -1
- package/dist/client/assets/{table-Dc0W0B0Q.js → table-BXTkk8zy.js} +1 -1
- package/dist/client/assets/{tabs-BerlyCPW.js → tabs-D_sEPUFk.js} +1 -1
- package/dist/client/assets/tasks-B38CkkW5.js +1 -0
- package/dist/client/assets/{textarea-CD_pYqo3.js → textarea-TMz6gyXu.js} +1 -1
- package/dist/client/assets/{toggle-group-BFyHFJ9G.js → toggle-group-CnQpN6py.js} +1 -1
- package/dist/client/assets/{toolbar-ClzusW5n.js → toolbar-CD4BCM4b.js} +1 -1
- package/dist/client/assets/{tooltip-CwIq9zTG.js → tooltip-BYHYsdou.js} +1 -1
- package/dist/client/assets/{track-Bufvtvpy.js → track-COzY04MD.js} +1 -1
- package/dist/client/assets/{types-D40WAxQO.js → types-CrCH3G_F.js} +1 -1
- package/dist/client/assets/{use-ai-providers-DF6xoNtC.js → use-ai-providers-D8ZxPPNl.js} +1 -1
- package/dist/client/assets/use-api-keys-QabOr7Sy.js +1 -0
- package/dist/client/assets/use-automations-olw2u0pZ.js +1 -0
- package/dist/client/assets/{use-autosave-BvdFNf3e.js → use-autosave-D0LAhUzj.js} +1 -1
- package/dist/client/assets/{use-capability-D8TgIows.js → use-capability-CzBu-J56.js} +1 -1
- package/dist/client/assets/{use-clock-tick-Dht-z9YX.js → use-clock-tick-DOlAeCMC.js} +1 -1
- package/dist/client/assets/use-commerce-diagnostic-BfO1Uz-E.js +1 -0
- package/dist/client/assets/use-connection-BPZswYGL.js +1 -0
- package/dist/client/assets/{use-copy-D87eemcY.js → use-copy-gUNHP8WW.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BqCII4uA.js → use-create-virtual-mcp-CVBBpLVJ.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-fueOpbqS.js → use-debounced-autosave-CYC1_jOJ.js} +1 -1
- package/dist/client/assets/{use-debounced-value-DAmoRUxP.js → use-debounced-value-CRrTp2sD.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BIUvCjFX.js → use-decopilot-events-BZrhOh3J.js} +1 -1
- package/dist/client/assets/{use-delete-connection-CmSM7WcU.js → use-delete-connection-Dn80jRMf.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-BRR0WTvL.js → use-deployment-admin-CczUz7z9.js} +1 -1
- package/dist/client/assets/{use-file-configs-EhMCIyTI.js → use-file-configs-bzI9NrYv.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-ChfJMk5S.js → use-infinite-scroll-qlOO1QTT.js} +1 -1
- package/dist/client/assets/{use-join-requests-DAyU8-6X.js → use-join-requests-Ve5ZEQzI.js} +1 -1
- package/dist/client/assets/use-mcp-client-CpcKk1mC.js +10 -0
- package/dist/client/assets/{use-mcp-tools-CMpvouUr.js → use-mcp-tools-BXCDAH3K.js} +1 -1
- package/dist/client/assets/{use-members-CYQAJOqU.js → use-members-lr2D4-9f.js} +1 -1
- package/dist/client/assets/{use-mobile-c0ak1uw4.js → use-mobile-CLhvlD5U.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-IPGb4TnC.js → use-navigate-to-agent-B9V6njZa.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Bjx13kGF.js → use-org-auth-client-BKcaa9No.js} +1 -1
- package/dist/client/assets/{use-org-repo-syncs-CEYhU3FE.js → use-org-repo-syncs-qpXT2wCH.js} +1 -1
- package/dist/client/assets/{use-org-sso-BUVIJh4V.js → use-org-sso-CKd4_qDy.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DZR-ca1L.js → use-organization-roles-dAemVnAv.js} +1 -1
- package/dist/client/assets/use-organization-settings-DqAGAUYM.js +1 -0
- package/dist/client/assets/use-registry-connections-BqF6UAct.js +1 -0
- package/dist/client/assets/{use-secrets-6DO3yZ-p.js → use-secrets-D0HFviXi.js} +1 -1
- package/dist/client/assets/{use-section-preview-base-Dc8Axtks.js → use-section-preview-base-BGsB97Xk.js} +1 -1
- package/dist/client/assets/use-settings-tabs-BjnrTXLq.js +1 -0
- package/dist/client/assets/{use-status-sounds-e0Pidqxv.js → use-status-sounds-DXRZEi59.js} +1 -1
- package/dist/client/assets/{use-tags-tOpGCqE_.js → use-tags-uV1Iq0hs.js} +1 -1
- package/dist/client/assets/{use-view-mode-BQejzyHA.js → use-view-mode-DuXFb47r.js} +1 -1
- package/dist/client/assets/use-virtual-mcp-CesHdqwl.js +1 -0
- package/dist/client/assets/useInfiniteQuery-DPD5wRLH.js +1 -0
- package/dist/client/assets/{useRouterState-Dk4tjkCW.js → useRouterState-C7_szwLj.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-kJZnOfaD.js +1 -0
- package/dist/client/assets/{users-Bv8CJJ4l.js → users-UKz0Vh9o.js} +1 -1
- package/dist/client/assets/variant-calendar-Bss6PO3E.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BTBNp3sA.js → view-mode-toggle-BdaCG6S5.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/agent-icon-BDevt-8Z.js +0 -1
- package/dist/client/assets/agents-list-DVOKstH-.js +0 -1
- package/dist/client/assets/ai-providers-qcQefmBS.js +0 -1
- package/dist/client/assets/api-keys-FMNqGQ51.js +0 -1
- package/dist/client/assets/app-editor-JM5Dp20k.js +0 -1
- package/dist/client/assets/automations-B-rlIa9G.js +0 -1
- package/dist/client/assets/billing-Do4qOo4X.js +0 -6
- package/dist/client/assets/bulk-category-panel-C5Gw6crO.js +0 -1
- package/dist/client/assets/category-editor-C2yNqWw9.js +0 -1
- package/dist/client/assets/choose-editor-D_7RLdI1.js +0 -1
- package/dist/client/assets/collection-detail-BcpNCPzg.js +0 -1
- package/dist/client/assets/commerce-onboarding-DptWqvBa.js +0 -1
- package/dist/client/assets/connection-card-BER9PD2I.js +0 -1
- package/dist/client/assets/connection-detail-BztCQFVl.js +0 -1
- package/dist/client/assets/connections-BkovTccm.js +0 -1
- package/dist/client/assets/extract-connection-data-BJ1FOt2x.js +0 -1
- package/dist/client/assets/file-explorer-DCujfpAL.js +0 -2
- package/dist/client/assets/general-DgbsvkYa.js +0 -1
- package/dist/client/assets/github-repo-picker-CcDCsGzG.js +0 -1
- package/dist/client/assets/index-DQv8YUWm.js +0 -1
- package/dist/client/assets/index-DRGw16I_.js +0 -1
- package/dist/client/assets/post-editor-C3I40PTm.js +0 -1
- package/dist/client/assets/project-app-view-TA-FxXgR.js +0 -1
- package/dist/client/assets/record-editor-wtWxgd5F.js +0 -1
- package/dist/client/assets/redirect-editor-BRBlF0cf.js +0 -1
- package/dist/client/assets/registry-D5JAnGyh.js +0 -2
- package/dist/client/assets/roles-BxtW1gkj.js +0 -1
- package/dist/client/assets/select-model-eoIBQakm.js +0 -4
- package/dist/client/assets/self-tool-result-DaPbHreD.js +0 -1
- package/dist/client/assets/seo-editor-DesMlOi9.js +0 -1
- package/dist/client/assets/settings-layout-Bf3LCUkH.js +0 -1
- package/dist/client/assets/shell-layout-VRjP3s0M.js +0 -1
- package/dist/client/assets/store-mWCGhxUC.js +0 -1
- package/dist/client/assets/store-registry-C-F9k1uh.js +0 -2
- package/dist/client/assets/synced-repos-DvIBkVQt.js +0 -1
- package/dist/client/assets/tasks-BhmY_7d9.js +0 -1
- package/dist/client/assets/use-api-keys-DMBDl3ic.js +0 -1
- package/dist/client/assets/use-automations-DQVxqjfN.js +0 -1
- package/dist/client/assets/use-commerce-diagnostic-B_wc4KWh.js +0 -1
- package/dist/client/assets/use-connection-BS7_Pbag.js +0 -1
- package/dist/client/assets/use-mcp-client-DRcy9vk6.js +0 -10
- package/dist/client/assets/use-open-billing-url-nNkK2kBm.js +0 -1
- package/dist/client/assets/use-organization-settings-DJYuvv-k.js +0 -1
- package/dist/client/assets/use-registry-connections-GX-tovow.js +0 -1
- package/dist/client/assets/use-settings-tabs-CkhP712K.js +0 -1
- package/dist/client/assets/use-virtual-mcp-zFcH9fRu.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BxSgA-RD.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CNPxNyM-.js +0 -1
- package/dist/client/assets/variant-calendar-Cvw4xTeP.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as ge,b as me,j as o,v as Ae,t as le,B as ne,F as De,o as Ie,a as Le,r as X,n as Te,K as de,e as Ee,p as V,G as Fe,m as ke}from"./index-CacyxM-B.js";import{a as re,b as ye,D as ue,c as pe}from"./dropdown-menu-ByKxU4Y4.js";import{a as Ge}from"./Users03-DM_1WdDy.js";import{G as we,b as Me,a as Pe}from"./github-repo-picker-CcDCsGzG.js";import{u as Oe,b as ze,c as Be}from"./use-virtual-mcp-zFcH9fRu.js";import{P as ce}from"./index-GDSYOTBM.js";import{a as Ue}from"./DotsVertical-Bqf_kSFh.js";import{A as Re,g as fe,b3 as $e}from"./agent-icon-BDevt-8Z.js";import{a as He}from"./Settings02-CGZ0Ol25.js";import{s as Ve}from"./Trash01-BcRuo5Fe.js";import{p as Ke,f as he}from"./pt-BR-CLy76QW2.js";import{c as Se}from"./use-navigate-to-agent-IPGb4TnC.js";import{f as qe,i as Qe}from"./use-organization-settings-DJYuvv-k.js";import{u as _e}from"./use-capability-D8TgIows.js";import{C as Je}from"./card-CG7VHdDz.js";import{E as Ye}from"./empty-state-BJ2gnfVT.js";import{u as We}from"./use-create-virtual-mcp-BqCII4uA.js";import{u as Xe}from"./use-connection-BS7_Pbag.js";import{u as xe,S as Ze}from"./use-mcp-client-DRcy9vk6.js";import{p as et,a as je}from"./deco-site-production-url-BjY4ZYd-.js";import{g as tt,f as ot,b as st,G as it,p as nt}from"./provision-repo-scoped-github-connection-CMPWtdMv.js";import{e as rt,d as lt,a as at,b as ct,c as mt}from"./dialog-Ww_zj2g-.js";import{i as dt}from"./ArrowLeft-D3IfTAWC.js";import{C as ut}from"./collection-search-DGOZ00E9.js";import{c as pt,d as gt,b as ft,f as ht,g as xt,e as jt,a as Ct,A as bt}from"./alert-dialog-DRGp9yFR.js";import{S as Dt}from"./search-input-ByYoJKBQ.js";import{s as Ce}from"./Plus-m61KPSTg.js";import"./Check-CSFy6eOj.js";import"./ChevronRight-H-_IIqWd.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./auth-Dk3-oFE7.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./use-mcp-tools-CMpvouUr.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./X-VMfnK-j5.js";import"./tooltip-CwIq9zTG.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./studio-tools-O0czolAT.js";function be(t){const e=ge.c(28),{onCreateFromScratch:i,onImportGitHub:n,onImportDeco:r,isCreating:f,align:c,side:G,showBetaBadge:x}=t,M=c===void 0?"end":c,d=me();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(Ge,{size:14}),e[0]=T):T=e[0];let m;e[1]!==d?(m=d("common.createAgentDropdown.createFromScratch"),e[1]=d,e[2]=m):m=e[2];let D;e[3]!==f||e[4]!==i||e[5]!==m?(D=o.jsxs(re,{disabled:f,onClick:i,children:[T,m]}),e[3]=f,e[4]=i,e[5]=m,e[6]=D):D=e[6];let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=o.jsx(we,{className:"size-3.5"}),e[7]=j):j=e[7];let y;e[8]!==d?(y=d("common.createAgentDropdown.importFromGitHub"),e[8]=d,e[9]=y):y=e[9];let a;e[10]!==x?(a=x&&o.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"}),e[10]=x,e[11]=a):a=e[11];let l;e[12]!==n||e[13]!==y||e[14]!==a?(l=o.jsxs(re,{onClick:n,children:[j,y,a]}),e[12]=n,e[13]=y,e[14]=a,e[15]=l):l=e[15];let h;e[16]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),e[16]=h):h=e[16];let C;e[17]!==d?(C=d("common.createAgentDropdown.importFromDeco"),e[17]=d,e[18]=C):C=e[18];let w;e[19]!==r||e[20]!==C?(w=o.jsxs(re,{onClick:r,children:[h,C]}),e[19]=r,e[20]=C,e[21]=w):w=e[21];let u;return e[22]!==M||e[23]!==G||e[24]!==w||e[25]!==D||e[26]!==l?(u=o.jsxs(ye,{side:G,align:M,className:"w-48",children:[D,l,w]}),e[22]=M,e[23]=G,e[24]=w,e[25]=D,e[26]=l,e[27]=u):u=e[27],u}function yt(t){const e=ge.c(65),{project:i,lastUsedAt:n,onDeleteClick:r}=t,f=Se(),c=me(),[G]=Ae(),x=G.language==="pt-BR"?Ke:void 0,{mainAgentId:M}=qe(),d=Qe(),{granted:T}=_e("org:manage"),m=M===i.id;let D;e[0]!==m||e[1]!==i.id||e[2]!==i.title||e[3]!==d||e[4]!==c?(D=()=>{const I=m?null:i.id;d.mutate(I,{onSuccess:()=>le.success(m?c("home.projectCard.mainAgentUnset",{title:i.title}):c("home.projectCard.mainAgentSet",{title:i.title})),onError:()=>le.error(c("home.projectCard.mainAgentError"))})},e[0]=m,e[1]=i.id,e[2]=i.title,e[3]=d,e[4]=c,e[5]=D):D=e[5];const j=D;let y;e[6]!==f||e[7]!==i.id?(y=()=>f(i.id),e[6]=f,e[7]=i.id,e[8]=y):y=e[8];let a;e[9]!==i.title||e[10]!==y?(a=o.jsx("button",{type:"button",onClick:y,className:"absolute inset-0 z-0","aria-label":i.title}),e[9]=i.title,e[10]=y,e[11]=a):a=e[11];let l;e[12]!==i.icon||e[13]!==i.title?(l=o.jsx(Re,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),e[12]=i.icon,e[13]=i.title,e[14]=l):l=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(ue,{asChild:!0,children:o.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:o.jsx(Ue,{size:20})})}),e[15]=h):h=e[15];let C;e[16]!==f||e[17]!==i.id?(C=()=>f(i.id,{search:{main:"settings"}}),e[16]=f,e[17]=i.id,e[18]=C):C=e[18];let w;e[19]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(He,{size:16}),e[19]=w):w=e[19];let u;e[20]!==C?(u=o.jsxs(re,{onClick:C,children:[w,"Settings"]}),e[20]=C,e[21]=u):u=e[21];let O;e[22]!==T||e[23]!==m||e[24]!==c||e[25]!==j?(O=T&&o.jsxs(re,{onClick:I=>{I.stopPropagation(),j()},children:[o.jsx(fe,{size:16}),c(m?"home.projectCard.unsetMainAgent":"home.projectCard.setAsMainAgent")]}),e[22]=T,e[23]=m,e[24]=c,e[25]=j,e[26]=O):O=e[26];let E;e[27]!==r?(E=r&&o.jsxs(re,{variant:"destructive",onClick:I=>{I.stopPropagation(),r(I)},children:[o.jsx(Ve,{size:16}),"Delete"]}),e[27]=r,e[28]=E):E=e[28];let z;e[29]!==E||e[30]!==u||e[31]!==O?(z=o.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:o.jsxs(pe,{children:[h,o.jsxs(ye,{align:"end",children:[u,O,E]})]})}),e[29]=E,e[30]=u,e[31]=O,e[32]=z):z=e[32];let S;e[33]!==z||e[34]!==l?(S=o.jsxs("div",{className:"flex items-start justify-between",children:[l,z]}),e[33]=z,e[34]=l,e[35]=S):S=e[35];let v;e[36]!==i.title?(v=o.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[36]=i.title,e[37]=v):v=e[37];let N;e[38]!==m||e[39]!==c?(N=m&&o.jsxs("span",{className:"shrink-0 inline-flex items-center gap-1 rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[o.jsx(fe,{size:12}),c("home.projectCard.mainAgentBadge")]}),e[38]=m,e[39]=c,e[40]=N):N=e[40];let P;e[41]!==v||e[42]!==N?(P=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[v,N]}),e[41]=v,e[42]=N,e[43]=P):P=e[43];const F=i.description||"No description";let s;e[44]!==F?(s=o.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:F}),e[44]=F,e[45]=s):s=e[45];let p;e[46]!==P||e[47]!==s?(p=o.jsxs("div",{className:"flex flex-col gap-1",children:[P,s]}),e[46]=P,e[47]=s,e[48]=p):p=e[48];let g;e[49]!==S||e[50]!==p?(g=o.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[S,p]}),e[49]=S,e[50]=p,e[51]=g):g=e[51];let b;e[52]!==n||e[53]!==x||e[54]!==i.updated_at||e[55]!==c?(b=n?c("home.projectCard.lastUsed",{time:he(new Date(n),{addSuffix:!0,locale:x})}):c("home.projectCard.updated",{time:he(new Date(i.updated_at),{addSuffix:!0,locale:x})}),e[52]=n,e[53]=x,e[54]=i.updated_at,e[55]=c,e[56]=b):b=e[56];let _;e[57]!==b?(_=o.jsx("div",{className:"border-t border-border mt-auto",children:o.jsx("div",{className:"h-10 flex items-center px-4.5",children:o.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),e[57]=b,e[58]=_):_=e[58];let A;e[59]!==g||e[60]!==_?(A=o.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[g,_]}),e[59]=g,e[60]=_,e[61]=A):A=e[61];let k;return e[62]!==A||e[63]!==a?(k=o.jsxs(Je,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[a,A]}),e[62]=A,e[63]=a,e[64]=k):k=e[64],k}const wt="deco-sites";function St(t){if(!t||typeof t!="object")return null;const e=t.github;if(!e||typeof e!="object")return null;const i=e.owner,n=e.repo;return typeof i!="string"||typeof n!="string"||i.length===0||n.length===0?null:{owner:i,repo:n}}function _t(t,e){const i=e?St(e):null,n=i?.owner??wt,r=i?.repo??t;return{owner:n,name:r,url:`https://github.com/${n}/${r}`}}function vt(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")}async function ve(t,e,i){const n=await fetch(t,e),r=await n.json().catch(()=>({}));if(!n.ok)throw new Error(r.error??`${i} (${n.status})`);return r}function Nt(t){return ve(`/api/${t}/deco-sites`,void 0,"Failed to load sites")}function At({open:t,onOpenChange:e,onBack:i}){const n=me(),{org:r}=De(),f=Se(),c=Ie(),{data:G}=Le.useSession(),[x,M]=X.useState(null),[d,T]=X.useState(null),[m,D]=X.useState(""),j=xe({connectionId:Ze,orgId:r.id,orgSlug:r.slug}),y=Xe({slug:"mcp-github"}),a=tt(y),l=Me({enabled:t&&a.length===0}),h=a.length===1?a[0]??null:d,C=a.length>1&&!h,w=xe({connectionId:h?.id??"",orgId:r.id,orgSlug:r.slug}),u=t&&a.length===0&&(l.status==="installing"||l.status==="authenticating"||l.status==="idle"),{data:O,isLoading:E,error:z}=Te({queryKey:de.decoSites(G?.user?.email),queryFn:()=>Nt(r.slug),enabled:t&&!!G?.user?.email,staleTime:6e4,retry:!1}),S=O?.sites??[],v=s=>{s||(M(null),T(null),D("")),e(s)},N=S.filter(s=>s.name.toLowerCase().includes(m.toLowerCase())||(s.domains?.[0]?.domain?.toLowerCase().includes(m.toLowerCase())??!1)),P=!x||N.some(s=>s.name===x),F=Ee({mutationFn:async s=>{if(!h)throw new Error(n("common.importFromDecoDialog.githubNotConnected"));V("deco_site_import_started",{site_name:s});const{installations:p}=await ot(B=>j.callTool(B),h.id),g=S.find(B=>B.name===s);if(!g)throw new Error(n("common.importFromDecoDialog.siteNoLongerAvailable"));const b=_t(s,g.metadata),_=st(p,b.owner);if(!_)throw new Error(n("common.importFromDecoDialog.installGithubApp",{owner:b.owner,installUrl:it}));let A=null,k=null,I=null;const J=async()=>{I&&await j.callTool({name:"COLLECTION_VIRTUAL_MCP_DELETE",arguments:{id:I}}).catch(()=>{}),k&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:k,force:!0}}).catch(()=>{}),A&&await j.callTool({name:"COLLECTION_CONNECTIONS_DELETE",arguments:{id:A,force:!0}}).catch(()=>{})};try{const B=await ve(`/api/${r.slug}/deco-sites/connection`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({siteName:s})},n("common.importFromDecoDialog.failedToCreateConnection")),R=B.connId;if(!R)throw new Error(n("common.importFromDecoDialog.noConnectionId"));A=R;const{childConnectionId:$,reused:Y}=await nt({orgSlug:r.slug,sourceConnection:h,installationId:_.installationId,owner:b.owner,repo:b.name,githubCallTool:H=>w.callTool(H),selfCallTool:H=>j.callTool(H)});k=Y?null:$;const K=B.icon??null,Z=vt(s),W=s.toLowerCase(),q=et(je(g.domains)),Q=await j.callTool({name:"COLLECTION_VIRTUAL_MCP_CREATE",arguments:{data:{title:s,description:"Imported from deco.cx",pinned:!1,icon:K??null,subtype:"project",metadata:{instructions:null,enabled_plugins:[],siteSlug:W,previewServerUrl:q,productionUrl:q,githubRepo:{owner:b.owner,name:b.name,url:b.url,installationId:_.installationId,connectionId:$},ui:{banner:null,bannerColor:"#22C55E",icon:K,themeColor:"#22C55E",slug:Z,pinnedViews:[{connectionId:R,toolName:"get_monitor_data",label:"Monitor",icon:null}],layout:{defaultMainView:{type:"preview"},chatDefaultOpen:!0}}},connections:[{connection_id:R},{connection_id:$}]}}}),U=Q.structuredContent??Q;if(!U.item?.id)throw new Error(n("common.importFromDecoDialog.failedToCreateAgent"));return I=U.item.id,{slug:Z,virtualMcpId:U.item.id,connId:R,item:U.item}}catch(B){throw await J(),B}},onSuccess:({slug:s,virtualMcpId:p,item:g})=>{V("deco_site_import_succeeded",{site_name:g.title,virtual_mcp_id:p,slug:s}),c.setQueryData(de.collectionItem(j,r.id,"","VIRTUAL_MCP",p),{item:g}),c.invalidateQueries({predicate:b=>{const _=b.queryKey;return _[1]===r.id&&_[3]==="collection"&&_[4]==="VIRTUAL_MCP"}}),c.invalidateQueries({queryKey:de.projects(r.id)}),le.success(n("common.importFromDecoDialog.importSuccess",{slug:s})),v(!1),localStorage.setItem(Fe.sidebarOpen(),JSON.stringify(!1)),f(p)},onError:s=>{V("deco_site_import_failed",{error:s instanceof Error?s.message:"Unknown error"}),le.error(n("common.importFromDecoDialog.importFailed",{error:(s instanceof Error?s.message:n("common.importFromDecoDialog.unknownError"))??""}))}});return o.jsx(rt,{open:t,onOpenChange:v,children:o.jsxs(lt,{className:"sm:max-w-[900px] p-0 gap-0 overflow-hidden",children:[o.jsx(at,{className:"sr-only",children:o.jsx(ct,{children:n("common.importFromDecoDialog.title")})}),o.jsxs("div",{className:"flex items-center h-12 border-b border-border px-4 gap-3",children:[i&&o.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors","aria-label":n("common.importFromDecoDialog.goBack"),children:o.jsx(dt,{size:18})}),o.jsx("span",{className:"text-sm font-medium text-foreground",children:n("common.importFromDecoDialog.title")})]}),o.jsx("div",{children:o.jsx(ut,{value:m,onChange:D,placeholder:n("common.importFromDecoDialog.searchPlaceholder"),onKeyDown:s=>{s.key==="Escape"&&D("")}})}),o.jsxs("div",{className:"pb-0 min-h-[300px]",children:[l.status==="error"&&o.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 h-48 px-8 text-center",children:[o.jsx("p",{className:"text-sm text-destructive",children:l.error??n("common.importFromDecoDialog.failedToConnectGithub")}),o.jsx(ne,{variant:"outline",size:"sm",onClick:l.retry,children:n("common.importFromDecoDialog.retryGithubSetup")})]}),u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.settingUpGithub")}),C&&!u&&l.status!=="error"&&o.jsxs("div",{className:"flex flex-col py-2",children:[o.jsx("div",{className:"px-8 py-2",children:o.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:n("common.importFromDecoDialog.selectGithubConnection")})}),a.map(s=>o.jsxs("button",{type:"button",onClick:()=>T(s),className:"flex items-center gap-3 px-8 py-3 hover:bg-accent transition-colors text-left",children:[s.icon?o.jsx("img",{src:s.icon,alt:s.title,className:"size-7 rounded-full shrink-0"}):o.jsx("div",{className:"size-7 rounded-full bg-muted flex items-center justify-center shrink-0",children:o.jsx(we,{className:"size-3.5 text-muted-foreground"})}),o.jsx("span",{className:"text-sm font-medium",children:s.title})]},s.id))]}),E&&!u&&l.status!=="error"&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.loadingSites")}),!E&&!u&&!C&&l.status!=="error"&&!z&&S.length===0&&o.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:n("common.importFromDecoDialog.noSitesFound")}),!E&&!u&&!C&&l.status!=="error"&&S.length>0&&o.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 max-h-[420px] overflow-y-auto py-4 px-8 [scrollbar-gutter:stable]",children:[N.length===0&&o.jsx("p",{className:"col-span-3 text-sm text-muted-foreground text-center py-8",children:n("common.importFromDecoDialog.noSitesMatch",{search:m})}),N.map(s=>{const p=je(s.domains),g=x===s.name;return o.jsxs("button",{type:"button",onClick:()=>M(s.name),className:ke("flex flex-col rounded-xl border overflow-hidden text-left transition-all cursor-pointer",g?"border-primary ring-1 ring-primary":"border-border hover:border-muted-foreground/40"),children:[o.jsx("div",{className:"w-full aspect-video bg-muted overflow-hidden",children:s.thumb_url?o.jsx("img",{src:s.thumb_url,alt:s.name,className:"w-full h-full object-cover",loading:"lazy"}):o.jsx("div",{className:"w-full h-full bg-muted"})}),o.jsxs("div",{className:"px-4 py-3",children:[o.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.name}),p&&o.jsx("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:p})]})]},s.name)})]})]}),o.jsxs(mt,{className:"px-8 py-5 border-t border-border",children:[o.jsx(ne,{variant:"outline",onClick:()=>v(!1),disabled:F.isPending,children:n("common.importFromDecoDialog.cancel")}),o.jsx(ne,{disabled:!x||!P||F.isPending||E||u||C||!h||l.status==="error",onClick:()=>x&&F.mutate(x),children:F.isPending?n("common.importFromDecoDialog.importing"):n("common.importFromDecoDialog.import")})]})]})})}function ds(){const t=ge.c(77),e=me(),{org:i}=De(),n=Oe(),r=ze(),[f,c]=X.useState("");let G;t[0]===Symbol.for("react.memo_cache_sentinel")?(G={navigateOnCreate:!0},t[0]=G):G=t[0];const{createVirtualMCP:x,isCreating:M}=We(G),[d,T]=X.useState(null),[m,D]=X.useState(!1),[j,y]=X.useState(!1),{granted:a}=_e("agents:manage"),l=f.toLowerCase(),h=n.filter(L=>L.id!==i.id&&(L.title.toLowerCase().includes(l)||L.description?.toLowerCase().includes(l))),{data:C}=Be(h.map(It));let w;t[1]!==r||t[2]!==d||t[3]!==e?(w=async()=>{if(!d)return;const{id:L,title:Ne}=d;T(null);try{await r.delete.mutateAsync(L),V("agent_deleted",{agent_id:L,source:"agents_list"}),le.success(e("routes.agentsList.deletedAgent",{title:Ne}))}catch{}},t[1]=r,t[2]=d,t[3]=e,t[4]=w):w=t[4];const u=w,O=ce,E=ce,z=ce;let S;t[5]!==e?(S=e("routes.agentsList.title"),t[5]=e,t[6]=S):S=t[6];let v;t[7]!==S?(v=o.jsx(ce.Title,{children:S}),t[7]=S,t[8]=v):v=t[8];let N;t[9]!==e?(N=e("routes.agentsList.searchPlaceholder"),t[9]=e,t[10]=N):N=t[10];let P;t[11]===Symbol.for("react.memo_cache_sentinel")?(P=L=>{L.key==="Escape"&&(c(""),L.target.blur())},t[11]=P):P=t[11];let F;t[12]!==f||t[13]!==N?(F=o.jsx(Dt,{value:f,onChange:c,placeholder:N,className:"w-full md:w-[375px]",onKeyDown:P}),t[12]=f,t[13]=N,t[14]=F):F=t[14];let s;t[15]!==a||t[16]!==x||t[17]!==M||t[18]!==e?(s=a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list",method:"deco"}),D(!0)},isCreating:M,align:"end"})]}),t[15]=a,t[16]=x,t[17]=M,t[18]=e,t[19]=s):s=t[19];let p;t[20]!==F||t[21]!==s?(p=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[F,s]}),t[20]=F,t[21]=s,t[22]=p):p=t[22];let g;t[23]!==p||t[24]!==v?(g=o.jsxs("div",{className:"flex flex-col gap-6",children:[v,p]}),t[23]=p,t[24]=v,t[25]=g):g=t[25];const b=h.length===0&&o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(Ye,{image:o.jsx($e,{size:48,className:"text-muted-foreground"}),title:e(f?"routes.agentsList.noAgentsFound":"routes.agentsList.noAgentsYet"),description:f?e("routes.agentsList.noAgentsMatchSearch",{search:f}):e(a?"routes.agentsList.createAgentToGetStarted":"routes.agentsList.askAdminToCreate"),actions:!f&&a&&o.jsxs(pe,{children:[o.jsx(ue,{asChild:!0,children:o.jsxs(ne,{size:"sm",children:[o.jsx(Ce,{size:14}),e("routes.agentsList.createAgent")]})}),o.jsx(be,{onCreateFromScratch:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),x()},onImportGitHub:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"github"}),y(!0)},onImportDeco:()=>{V("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),D(!0)},isCreating:M,align:"center",showBetaBadge:!0})]})})}),_=h.length>0&&o.jsxs("div",{className:"mt-6 @container",children:[o.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:e("routes.agentsList.agentsHeading")}),o.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:h.map(L=>o.jsx(yt,{project:L,lastUsedAt:C?.get(L.id)?.last_used_at,onDeleteClick:a?()=>T({id:L.id,title:L.title}):void 0},L.id))})]});let A;t[26]!==g||t[27]!==b||t[28]!==_||t[29]!==z.Body?(A=o.jsxs(z.Body,{children:[g,b,_]}),t[26]=g,t[27]=b,t[28]=_,t[29]=z.Body,t[30]=A):A=t[30];let k;t[31]!==A||t[32]!==E.Content?(k=o.jsx(E.Content,{children:A}),t[31]=A,t[32]=E.Content,t[33]=k):k=t[33];let I;t[34]!==j?(I=o.jsx(Pe,{open:j,onOpenChange:y}),t[34]=j,t[35]=I):I=t[35];let J;t[36]!==m?(J=o.jsx(At,{open:m,onOpenChange:D}),t[36]=m,t[37]=J):J=t[37];const B=!!d;let R;t[38]===Symbol.for("react.memo_cache_sentinel")?(R=L=>!L&&T(null),t[38]=R):R=t[38];let $;t[39]!==e?($=e("routes.agentsList.deleteAgentTitle"),t[39]=e,t[40]=$):$=t[40];let Y;t[41]!==$?(Y=o.jsx(pt,{children:$}),t[41]=$,t[42]=Y):Y=t[42];let K;t[43]!==e?(K=e("routes.agentsList.deleteAgentDescription"),t[43]=e,t[44]=K):K=t[44];const Z=d?.title;let W;t[45]!==Z?(W=o.jsx("span",{className:"font-medium text-foreground",children:Z}),t[45]=Z,t[46]=W):W=t[46];let q;t[47]!==K||t[48]!==W?(q=o.jsxs(gt,{children:[K," ",W,"."]}),t[47]=K,t[48]=W,t[49]=q):q=t[49];let Q;t[50]!==Y||t[51]!==q?(Q=o.jsxs(ft,{children:[Y,q]}),t[50]=Y,t[51]=q,t[52]=Q):Q=t[52];let U;t[53]!==e?(U=e("routes.agentsList.cancelButton"),t[53]=e,t[54]=U):U=t[54];let H;t[55]!==U?(H=o.jsx(ht,{children:U}),t[55]=U,t[56]=H):H=t[56];let ee;t[57]!==e?(ee=e("routes.agentsList.deleteButton"),t[57]=e,t[58]=ee):ee=t[58];let te;t[59]!==u||t[60]!==ee?(te=o.jsx(xt,{onClick:u,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:ee}),t[59]=u,t[60]=ee,t[61]=te):te=t[61];let oe;t[62]!==H||t[63]!==te?(oe=o.jsxs(jt,{children:[H,te]}),t[62]=H,t[63]=te,t[64]=oe):oe=t[64];let se;t[65]!==Q||t[66]!==oe?(se=o.jsxs(Ct,{children:[Q,oe]}),t[65]=Q,t[66]=oe,t[67]=se):se=t[67];let ie;t[68]!==B||t[69]!==se?(ie=o.jsx(bt,{open:B,onOpenChange:R,children:se}),t[68]=B,t[69]=se,t[70]=ie):ie=t[70];let ae;return t[71]!==O||t[72]!==k||t[73]!==I||t[74]!==J||t[75]!==ie?(ae=o.jsxs(O,{children:[k,I,J,ie]}),t[71]=O,t[72]=k,t[73]=I,t[74]=J,t[75]=ie,t[76]=ae):ae=t[76],ae}function It(t){return t.id}export{ds as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as J,b as se,a0 as Fe,$ as $e,r as G,j as s,a3 as tt,t as X,at as Ue,F as be,o as je,e as le,K as te,n as ke,m as Ee,B as ee,v as He,p as Re,X as st,Z as Pe,E as it}from"./index-CacyxM-B.js";import{i as lt}from"./AlertCircle-DOZzh9F_.js";import{P as Ie}from"./index-GDSYOTBM.js";import{S as Ke}from"./skeleton-DOg01VWn.js";import{b as qe,a as De,S as we,c as rt}from"./settings-section-Cz2znp8W.js";import{S as ot}from"./settings-subnav-a1a1GCc2.js";import{u as Be,b as _e,i as nt,c as at,p as ct,d as Ae,e as dt,f as ze}from"./use-ai-providers-DF6xoNtC.js";import{i as mt}from"./CheckCircle-BCbqPCn-.js";import{c as ut,S as ft,k as pt}from"./use-organization-settings-DJYuvv-k.js";import{c as gt,d as Ve,P as xt,C as Me}from"./select-model-eoIBQakm.js";import{u as ht}from"./use-debounced-autosave-fueOpbqS.js";import{I as ye}from"./input-B8ln-0Wl.js";import{a as Te,T as vt}from"./toggle-group-BFyHFJ9G.js";import{c as Le,d as Qe,b as Ge,f as Ye,g as We,e as Je,a as Xe,A as Ze}from"./alert-dialog-DRGp9yFR.js";import{u as re}from"./studio-tools-O0czolAT.js";import{s as yt}from"./Plus-m61KPSTg.js";import{p as bt,f as jt}from"./pt-BR-CLy76QW2.js";import{b as St}from"./Tool01-D9lNVxCu.js";import{s as Ct}from"./Trash01-BcRuo5Fe.js";import{A as _t}from"./avatar-C448hZt-.js";import{P as Nt}from"./ai-providers-logos-DD3qZ33J.js";import{i as Pt}from"./Settings02-CGZ0Ol25.js";import{s as It}from"./Eye-CDfbu42j.js";import{b as kt,a as Kt,d as Dt,e as wt,c as At}from"./dialog-Ww_zj2g-.js";import{S as Et}from"./spinner-D7fl_vK2.js";import{R as Rt}from"./require-capability-BDCw5l2l.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./X-VMfnK-j5.js";import"./tooltip-CwIq9zTG.js";import"./card-CG7VHdDz.js";import"./ArrowUpRight-CibKwsqg.js";import"./useRouterState-Dk4tjkCW.js";import"./use-settings-tabs-CkhP712K.js";import"./use-capability-D8TgIows.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./drawer-lF-HaYn9.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./Check-CSFy6eOj.js";import"./Copy01-CzEeXGsa.js";import"./Download01-BPvwRxeD.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-decopilot-events-BIUvCjFX.js";import"./checkbox-BsGrD1YR.js";import"./select-CwAouusu.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronUp-CT1Rb5MC.js";import"./ArrowLeft-D3IfTAWC.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./Key01-WuBVakl2.js";import"./SearchMd-CF01LhHu.js";import"./Monitor01-B5i4MO_v.js";import"./ChevronRight-H-_IIqWd.js";import"./Stars01-Co5mOLjQ.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./User01-D1UDDnNw.js";import"./access-gate-bmibgRvV.js";import"./capability-load-error-BPXMIbs3.js";const Mt=e=>e.capabilities?.includes("image")===!0,Tt=e=>nt(e),Ot=e=>at(e),Ft=[{key:"fast",filter:void 0},{key:"smart",filter:void 0},{key:"thinking",filter:void 0},{key:"image",filter:Mt},{key:"web_search",filter:Tt},{key:"deep_research",filter:Ot}];function $t(e){const t=J.c(30),{slot:i,onSlotChange:o,filterModels:n,defaultKeyId:c}=e,a=Be(),l=a.some(C=>C.id===i?.keyId)?i?.keyId:null,[u,_]=G.useState(l??c);let b,r;t[0]!==l?(b=()=>{l&&_(l)},r=[l],t[0]=l,t[1]=b,t[2]=r):(b=t[1],r=t[2]),G.useEffect(b,r);let p;t[3]!==a||t[4]!==c||t[5]!==u?(p=a.some(C=>C.id===u)?u:c,t[3]=a,t[4]=c,t[5]=u,t[6]=p):p=t[6];const m=p;let f;t[7]!==m||t[8]!==a?(f=m?a.find(C=>C.id===m):null,t[7]=m,t[8]=a,t[9]=f):f=t[9];const P=f,{models:h,isLoading:v}=_e(n?m??void 0:void 0),g=n?v||h.some(n):!0;let N;t[10]!==i||t[11]!==P?.providerId||t[12]!==l?(N=i&&l?{modelId:i.modelId,title:i.title??i.modelId,keyId:i.keyId,providerId:P?.providerId??"deco",description:null,logo:null,capabilities:[],limits:null,costs:null}:null,t[10]=i,t[11]=P?.providerId,t[12]=l,t[13]=N):N=t[13];const k=N,x=se();if(n&&!g){let C;t[14]!==x?(C=x("settings.simpleModeSection.notAvailableWithCurrentProvider"),t[14]=x,t[15]=C):C=t[15];let K;return t[16]!==C?(K=s.jsx("p",{className:"text-xs text-muted-foreground italic",children:C}),t[16]=C,t[17]=K):K=t[17],K}let j;t[18]!==x?(j=x("settings.simpleModeSection.pickModel"),t[18]=x,t[19]=j):j=t[19];let S;t[20]===Symbol.for("react.memo_cache_sentinel")?(S=C=>_(C),t[20]=S):S=t[20];let d;t[21]!==m||t[22]!==o?(d=C=>{const K=C.keyId??m??"";_(K),o({keyId:K,modelId:C.modelId,title:C.title})},t[21]=m,t[22]=o,t[23]=d):d=t[23];let y;return t[24]!==m||t[25]!==n||t[26]!==k||t[27]!==j||t[28]!==d?(y=s.jsx(gt,{variant:"bordered",placeholder:j,model:k,credentialId:m,filterModels:n,onCredentialChange:S,onModelChange:d}),t[24]=m,t[25]=n,t[26]=k,t[27]=j,t[28]=d,t[29]=y):y=t[29],y}function Ut(e){const t=J.c(10),{isPending:i,showSaved:o}=e,n=se();if(i){let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ue,{size:12,className:"animate-spin"}),t[0]=c):c=t[0];let a;t[1]!==n?(a=n("settings.simpleModeSection.saving"),t[1]=n,t[2]=a):a=t[2];let l;return t[3]!==a?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[c,a]}),t[3]=a,t[4]=l):l=t[4],l}if(o){let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(mt,{size:12}),t[5]=c):c=t[5];let a;t[6]!==n?(a=n("settings.simpleModeSection.saved"),t[6]=n,t[7]=a):a=t[7];let l;return t[8]!==a?(l=s.jsxs("span",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[c,a]}),t[8]=a,t[9]=l):l=t[9],l}return null}function Ht(){const e=J.c(58),t=se(),i=Be(),o=ut(),n=i.length>0;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=Fe(ft),e[0]=c):c=e[0];let a;e[1]!==o?(a={resolver:c,values:o,mode:"onChange"},e[1]=o,e[2]=a):a=e[2];const l=$e(a),{mutate:u,isPending:_,isSuccess:b}=pt(),r=l.formState.isDirty;let p;e[3]!==l||e[4]!==o||e[5]!==t||e[6]!==u?(p={delayMs:250,save:async()=>{const I=l.getValues();u(I,{onSuccess:()=>l.reset(I,{keepValues:!0}),onError:T=>{l.reset(o),X.error(t("settings.simpleModeSection.failedToSave",{error:T.message}))}})}},e[3]=l,e[4]=o,e[5]=t,e[6]=u,e[7]=p):p=e[7];const{schedule:m}=ht(p),f=i[0],P=i[1],h=i[2],{models:v}=_e(f?.id),{models:g}=_e(P?.id),{models:N}=_e(h?.id);let k,x;e[8]!==l||e[9]!==n?(k=()=>{n||l.reset({tiers:{fast:null,smart:null,thinking:null,image:null,web_search:null,deep_research:null}})},x=[n,l],e[8]=l,e[9]=n,e[10]=k,e[11]=x):(k=e[10],x=e[11]),G.useEffect(k,x);let j;e[12]!==i||e[13]!==l||e[14]!==f||e[15]!==P||e[16]!==h||e[17]!==v||e[18]!==g||e[19]!==N?(j=()=>{const I=l.getValues(),T=new Set(i.map(qt)),O={};f?.id&&(O[f.id]=v),P?.id&&(O[P.id]=g),h?.id&&(O[h.id]=N);const M=Q=>Q!=null&&!T.has(Q.keyId),D={fast:M(I.tiers.fast)?null:I.tiers.fast,smart:M(I.tiers.smart)?null:I.tiers.smart,thinking:M(I.tiers.thinking)?null:I.tiers.thinking,image:M(I.tiers.image)?null:I.tiers.image,web_search:M(I.tiers.web_search)?null:I.tiers.web_search,deep_research:M(I.tiers.deep_research)?null:I.tiers.deep_research},Y=!D.fast||!D.smart||!D.thinking||!D.image||!D.web_search||!D.deep_research,W=D.fast===I.tiers.fast&&D.smart===I.tiers.smart&&D.thinking===I.tiers.thinking&&D.image===I.tiers.image&&D.web_search===I.tiers.web_search&&D.deep_research===I.tiers.deep_research;if(!Y&&W)return;const B=ct(i,O);l.reset({tiers:{fast:D.fast??B.chat.fast,smart:D.smart??B.chat.smart,thinking:D.thinking??B.chat.thinking,image:D.image??B.image,web_search:D.web_search??B.webSearch,deep_research:D.deep_research??B.deepResearch}},{keepDirty:!0})},e[12]=i,e[13]=l,e[14]=f,e[15]=P,e[16]=h,e[17]=v,e[18]=g,e[19]=N,e[20]=j):j=e[20];const S=f?.id,d=P?.id,y=h?.id;let C;e[21]!==i||e[22]!==l||e[23]!==v||e[24]!==g||e[25]!==N||e[26]!==S||e[27]!==d||e[28]!==y?(C=[l,i,v,g,N,S,d,y],e[21]=i,e[22]=l,e[23]=v,e[24]=g,e[25]=N,e[26]=S,e[27]=d,e[28]=y,e[29]=C):C=e[29],G.useEffect(j,C);let K;e[30]!==t?(K=I=>({fast:t("settings.simpleModeSection.tierFast"),smart:t("settings.simpleModeSection.tierSmart"),thinking:t("settings.simpleModeSection.tierThinking"),image:t("settings.simpleModeSection.tierImage"),web_search:t("settings.simpleModeSection.tierWebSearch"),deep_research:t("settings.simpleModeSection.tierDeepResearch")})[I]||I,e[30]=t,e[31]=K):K=e[31];const A=K;let w;e[32]!==t?(w=I=>({fast:t("settings.simpleModeSection.tierFastDesc"),smart:t("settings.simpleModeSection.tierSmartDesc"),thinking:t("settings.simpleModeSection.tierThinkingDesc"),image:t("settings.simpleModeSection.tierImageDesc"),web_search:t("settings.simpleModeSection.tierWebSearchDesc"),deep_research:t("settings.simpleModeSection.tierDeepResearchDesc")})[I]||"",e[32]=t,e[33]=w):w=e[33];const E=w;let R;e[34]!==t?(R=t("settings.simpleModeSection.defaultModels"),e[34]=t,e[35]=R):R=e[35];let F;e[36]!==t?(F=t("settings.simpleModeSection.modelsPowerDescription"),e[36]=t,e[37]=F):F=e[37];let z;e[38]!==F?(z=s.jsx("p",{className:"text-sm text-muted-foreground",children:F}),e[38]=F,e[39]=z):z=e[39];const L=b&&!r;let $;e[40]!==_||e[41]!==L?($=s.jsx(Ut,{isPending:_,showSaved:L}),e[40]=_,e[41]=L,e[42]=$):$=e[42];let U;e[43]!==z||e[44]!==$?(U=s.jsxs("div",{className:"flex items-center justify-between -mt-2 mb-2",children:[z,$]}),e[43]=z,e[44]=$,e[45]=U):U=e[45];let H;e[46]!==i[0]?.id||e[47]!==l.control||e[48]!==E||e[49]!==A||e[50]!==m?(H=Ft.map(I=>s.jsx(tt,{control:l.control,name:`tiers.${I.key}`,render:T=>{const{field:O}=T;return s.jsx(qe,{title:A(I.key),description:E(I.key),action:s.jsx($t,{slot:O.value,defaultKeyId:i[0]?.id??null,filterModels:I.filter,onSlotChange:M=>{O.onChange(M),m()}})})}},I.key)),e[46]=i[0]?.id,e[47]=l.control,e[48]=E,e[49]=A,e[50]=m,e[51]=H):H=e[51];let q;e[52]!==H?(q=s.jsx(De,{children:H}),e[52]=H,e[53]=q):q=e[53];let V;return e[54]!==R||e[55]!==U||e[56]!==q?(V=s.jsxs(we,{title:R,headerClassName:"pl-0",children:[U,q]}),e[54]=R,e[55]=U,e[56]=q,e[57]=V):V=e[57],V}function qt(e){return e.id}const Bt={usd:[10,20,100],brl:[50,100,500]};function zt(){const e=J.c(30),t=se(),i=re(),[o]=He(),[n,c]=G.useState(!1);let a;e[0]!==t?(a=d=>{X.error(t("settings.decoCreditsHero.topUpFailed",{message:d.message}))},e[0]=t,e[1]=a):a=e[1];const{mutate:l,isPending:u}=le({mutationFn:async d=>{const{url:y}=await i.call("AI_PROVIDER_TOPUP_URL",{providerId:"deco",amountCents:d,currency:m});return y},onSuccess:Vt,onError:a}),[_,b]=G.useState(""),[r,p]=G.useState(o.language==="pt-BR"?"brl":"usd"),m=r,f=parseFloat(_),P=!isNaN(f)&&f>=1,h=m==="brl"?"R$":"$";let v;e[2]!==p?(v=d=>{d&&p(d)},e[2]=p,e[3]=v):v=e[3];let g,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Te,{value:"usd",className:"px-3.5 text-sm",children:"USD"}),N=s.jsx(Te,{value:"brl",className:"px-3.5 text-sm",children:"BRL"}),e[4]=g,e[5]=N):(g=e[4],N=e[5]);let k;e[6]!==m||e[7]!==v?(k=s.jsxs(vt,{type:"single",variant:"outline",size:"default",value:m,onValueChange:v,children:[g,N]}),e[6]=m,e[7]=v,e[8]=k):k=e[8];let x;e[9]!==m||e[10]!==h||e[11]!==n||e[12]!==u||e[13]!==t||e[14]!==l?(x=!n&&s.jsxs(s.Fragment,{children:[Bt[m].map(d=>s.jsxs(ee,{variant:"outline",className:"h-10 px-4 text-sm font-medium tabular-nums",disabled:u,onClick:()=>l(d*100),children:[h,d]},d)),s.jsx(ee,{variant:"ghost",className:"h-10 px-4 text-sm text-muted-foreground",onClick:()=>c(!0),disabled:u,children:t("settings.decoCreditsHero.custom")})]}),e[9]=m,e[10]=h,e[11]=n,e[12]=u,e[13]=t,e[14]=l,e[15]=x):x=e[15];let j;e[16]!==h||e[17]!==_||e[18]!==f||e[19]!==n||e[20]!==P||e[21]!==u||e[22]!==b||e[23]!==t||e[24]!==l?(j=n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"relative max-w-[140px]",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground select-none",children:h}),s.jsx(ye,{type:"number",min:"1",step:"1",placeholder:t("settings.decoCreditsHero.amountPlaceholder"),value:_,onChange:d=>b(d.target.value),className:"h-10 text-sm pl-7",autoFocus:!0})]}),s.jsx(ee,{className:"h-10",disabled:!P||u,onClick:()=>l(Math.round(f*100)),children:u?"...":t("settings.decoCreditsHero.add")}),s.jsx(ee,{variant:"ghost",className:"h-10 text-sm text-muted-foreground",onClick:()=>{c(!1),b("")},children:t("settings.decoCreditsHero.cancel")})]}),e[16]=h,e[17]=_,e[18]=f,e[19]=n,e[20]=P,e[21]=u,e[22]=b,e[23]=t,e[24]=l,e[25]=j):j=e[25];let S;return e[26]!==k||e[27]!==x||e[28]!==j?(S=s.jsx("div",{className:"flex flex-col gap-2.5",children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[k,x,j]})}),e[26]=k,e[27]=x,e[28]=j,e[29]=S):S=e[29],S}function Vt(e){e&&window.open(e,"_blank","noopener,noreferrer")}function Lt(e){return e<=0?"text-destructive":e<=1?"text-warning":"text-foreground"}function Qt(){const e=J.c(121),t=se(),{org:i}=be(),o=re(),n=je(),c=Ae();let a;e[0]!==c?(a=c.find(Gt),e[0]=c,e[1]=a):a=e[1];const l=a,[u,_]=G.useState(!1);let b;e[2]!==l||e[3]!==o?(b=async()=>{l&&await o.call("AI_PROVIDER_KEY_DELETE",{keyId:l.id})},e[2]=l,e[3]=o,e[4]=b):b=e[4];let r;e[5]!==i.id||e[6]!==n||e[7]!==t?(r=()=>{n.invalidateQueries({queryKey:te.aiProviderKeys(i.id)}),n.invalidateQueries({queryKey:te.aiProviders(i.id)}),X.success(t("settings.decoCreditsHero.disconnectSuccess")),_(!1)},e[5]=i.id,e[6]=n,e[7]=t,e[8]=r):r=e[8];let p;e[9]!==t?(p=et=>{X.error(t("settings.decoCreditsHero.disconnectError",{message:et.message}))},e[9]=t,e[10]=p):p=e[10];let m;e[11]!==b||e[12]!==r||e[13]!==p?(m={mutationFn:b,onSuccess:r,onError:p},e[11]=b,e[12]=r,e[13]=p,e[14]=m):m=e[14];const{mutate:f,isPending:P}=le(m);let h;e[15]!==i.id?(h=te.aiProviderCredits(i.id,"deco"),e[15]=i.id,e[16]=h):h=e[16];const v=!!l;let g;e[17]!==o?(g=async()=>{try{return await o.call("AI_PROVIDER_CREDITS",{providerId:"deco"})}catch{return null}},e[17]=o,e[18]=g):g=e[18];let N;e[19]!==h||e[20]!==v||e[21]!==g?(N={queryKey:h,enabled:v,staleTime:6e4,queryFn:g},e[19]=h,e[20]=v,e[21]=g,e[22]=N):N=e[22];const{data:k,isLoading:x,refetch:j,isFetching:S}=ke(N);if(!l)return null;const d=k?.balanceCents!=null?k.balanceCents/100:null;let y;e[23]!==d?(y=d!=null?`$${d.toFixed(2)}`:"—",e[23]=d,e[24]=y):y=e[24];const C=y;let K;e[25]!==t?(K=t("settings.decoCreditsHero.title"),e[25]=t,e[26]=K):K=e[26];let A;e[27]!==t?(A=t("settings.decoCreditsHero.decoAiGatewayAlt"),e[27]=t,e[28]=A):A=e[28];let w;e[29]!==A?(w=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:A,className:"size-9 rounded-lg object-contain dark:bg-white dark:p-0.5"}),e[29]=A,e[30]=w):w=e[30];let E;e[31]!==t?(E=t("settings.decoCreditsHero.accessModels"),e[31]=t,e[32]=E):E=e[32];let R;e[33]!==E?(R=s.jsx("div",{children:s.jsx("p",{className:"text-xs text-muted-foreground",children:E})}),e[33]=E,e[34]=R):R=e[34];let F;e[35]!==w||e[36]!==R?(F=s.jsxs("div",{className:"flex items-center gap-3",children:[w,R]}),e[35]=w,e[36]=R,e[37]=F):F=e[37];let z;e[38]===Symbol.for("react.memo_cache_sentinel")?(z=()=>_(!0),e[38]=z):z=e[38];let L;e[39]!==t?(L=t("settings.decoCreditsHero.disconnect"),e[39]=t,e[40]=L):L=e[40];let $;e[41]!==P||e[42]!==L?($=s.jsx(ee,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground hover:text-destructive",onClick:z,disabled:P,children:L}),e[41]=P,e[42]=L,e[43]=$):$=e[43];let U;e[44]!==F||e[45]!==$?(U=s.jsxs("div",{className:"flex items-center justify-between",children:[F,$]}),e[44]=F,e[45]=$,e[46]=U):U=e[46];let H;e[47]!==t?(H=t("settings.decoCreditsHero.disconnectTitle"),e[47]=t,e[48]=H):H=e[48];let q;e[49]!==H?(q=s.jsx(Le,{children:H}),e[49]=H,e[50]=q):q=e[50];let V;e[51]!==t?(V=t("settings.decoCreditsHero.disconnectDescription"),e[51]=t,e[52]=V):V=e[52];let I;e[53]!==V?(I=s.jsx(Qe,{children:V}),e[53]=V,e[54]=I):I=e[54];let T;e[55]!==q||e[56]!==I?(T=s.jsxs(Ge,{children:[q,I]}),e[55]=q,e[56]=I,e[57]=T):T=e[57];let O;e[58]!==t?(O=t("settings.decoCreditsHero.cancelButton"),e[58]=t,e[59]=O):O=e[59];let M;e[60]!==O?(M=s.jsx(Ye,{children:O}),e[60]=O,e[61]=M):M=e[61];let D;e[62]!==f?(D=()=>f(),e[62]=f,e[63]=D):D=e[63];let Y;e[64]!==t?(Y=t("settings.decoCreditsHero.disconnectButton"),e[64]=t,e[65]=Y):Y=e[65];let W;e[66]!==D||e[67]!==Y?(W=s.jsx(We,{onClick:D,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Y}),e[66]=D,e[67]=Y,e[68]=W):W=e[68];let B;e[69]!==M||e[70]!==W?(B=s.jsxs(Je,{children:[M,W]}),e[69]=M,e[70]=W,e[71]=B):B=e[71];let Q;e[72]!==T||e[73]!==B?(Q=s.jsxs(Xe,{children:[T,B]}),e[72]=T,e[73]=B,e[74]=Q):Q=e[74];let ie;e[75]!==u||e[76]!==Q?(ie=s.jsx(Ze,{open:u,onOpenChange:_,children:Q}),e[75]=u,e[76]=Q,e[77]=ie):ie=e[77];let Z;e[78]!==d||e[79]!==C||e[80]!==S||e[81]!==x?(Z=x||S?s.jsx(Ke,{className:"h-9 w-24"}):s.jsx("span",{className:Ee("text-3xl font-semibold tabular-nums tracking-tight",d!=null&&Lt(d)),children:C}),e[78]=d,e[79]=C,e[80]=S,e[81]=x,e[82]=Z):Z=e[82];let oe;e[83]!==j?(oe=()=>j(),e[83]=j,e[84]=oe):oe=e[84];let ne;e[85]!==t?(ne=t("settings.decoCreditsHero.refreshBalance"),e[85]=t,e[86]=ne):ne=e[86];const Ne=S&&"animate-spin";let ae;e[87]!==Ne?(ae=Ee(Ne),e[87]=Ne,e[88]=ae):ae=e[88];let ce;e[89]!==ae?(ce=s.jsx(Ue,{size:14,className:ae}),e[89]=ae,e[90]=ce):ce=e[90];let de;e[91]!==S||e[92]!==oe||e[93]!==ne||e[94]!==ce?(de=s.jsx("button",{type:"button",onClick:oe,disabled:S,className:"text-muted-foreground hover:text-foreground disabled:opacity-50 transition-colors p-1 rounded-md hover:bg-muted/50","aria-label":ne,children:ce}),e[91]=S,e[92]=oe,e[93]=ne,e[94]=ce,e[95]=de):de=e[95];let me;e[96]!==Z||e[97]!==de?(me=s.jsxs("div",{className:"flex items-baseline gap-2",children:[Z,de]}),e[96]=Z,e[97]=de,e[98]=me):me=e[98];let ue;e[99]!==t?(ue=t("settings.decoCreditsHero.availableBalance"),e[99]=t,e[100]=ue):ue=e[100];let fe;e[101]!==ue?(fe=s.jsx("p",{className:"text-xs text-muted-foreground",children:ue}),e[101]=ue,e[102]=fe):fe=e[102];let pe;e[103]!==me||e[104]!==fe?(pe=s.jsxs("div",{className:"flex flex-col gap-2 pt-2",children:[me,fe]}),e[103]=me,e[104]=fe,e[105]=pe):pe=e[105];let ge;e[106]!==t?(ge=t("settings.decoCreditsHero.addCredits"),e[106]=t,e[107]=ge):ge=e[107];let xe;e[108]!==ge?(xe=s.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2.5",children:ge}),e[108]=ge,e[109]=xe):xe=e[109];let Se;e[110]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx(zt,{}),e[110]=Se):Se=e[110];let he;e[111]!==xe?(he=s.jsxs("div",{className:"pt-4 border-t border-border/60",children:[xe,Se]}),e[111]=xe,e[112]=he):he=e[112];let ve;e[113]!==U||e[114]!==ie||e[115]!==pe||e[116]!==he?(ve=s.jsx(De,{children:s.jsxs("div",{className:"px-5 py-5 flex flex-col gap-5",children:[U,ie,pe,he]})}),e[113]=U,e[114]=ie,e[115]=pe,e[116]=he,e[117]=ve):ve=e[117];let Ce;return e[118]!==K||e[119]!==ve?(Ce=s.jsx(we,{title:K,children:ve}),e[118]=K,e[119]=ve,e[120]=Ce):Ce=e[120],Ce}function Gt(e){return e.providerId==="deco"}function Yt(){const e=J.c(12),{org:t}=be(),i=re(),o=je(),n=se();let c;e[0]!==i?(c=async()=>{await i.call("AI_PROVIDER_PROVISION_KEY",{providerId:"deco"})},e[0]=i,e[1]=c):c=e[1];let a;e[2]!==t||e[3]!==o||e[4]!==n?(a=()=>{Re("ai_provider_provision_succeeded",{provider_id:"deco"}),o.invalidateQueries({queryKey:te.aiProviderKeys(t.id)}),o.invalidateQueries({queryKey:te.aiProviders(t.id)}),X.success(n("settings.aiProviders.decoConnectSuccess"))},e[2]=t,e[3]=o,e[4]=n,e[5]=a):a=e[5];let l;e[6]!==n?(l=_=>{Re("ai_provider_provision_failed",{provider_id:"deco",error:_.message}),X.error(n("settings.aiProviders.decoConnectError",{error:_.message}))},e[6]=n,e[7]=l):l=e[7];let u;return e[8]!==c||e[9]!==a||e[10]!==l?(u={mutationFn:c,onSuccess:a,onError:l},e[8]=c,e[9]=a,e[10]=l,e[11]=u):u=e[11],le(u)}function Wt(){const e=J.c(37),t=se(),{mutate:i,isPending:o}=Yt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=["radial-gradient(ellipse 50% 150% at -15% 50%, rgba(165,149,255,0.14) 0%, transparent 60%)","radial-gradient(ellipse 50% 150% at 115% 50%, rgba(208,236,26,0.11) 0%, transparent 60%)"],e[0]=n):n=e[0];let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:n.join(", ")}}),e[1]=c):c=e[1];let a;e[2]!==t?(a=t("settings.decoNudgeCard.decoAiGateway"),e[2]=t,e[3]=a):a=e[3];let l;e[4]!==a?(l=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:a,className:"size-12 shrink-0 rounded-xl object-contain dark:bg-white dark:p-1"}),e[4]=a,e[5]=l):l=e[5];let u;e[6]!==t?(u=t("settings.decoNudgeCard.decoAiGateway"),e[6]=t,e[7]=u):u=e[7];let _;e[8]!==u?(_=s.jsx("p",{className:"text-base font-semibold",children:u}),e[8]=u,e[9]=_):_=e[9];let b;e[10]!==t?(b=t("settings.decoNudgeCard.recommended"),e[10]=t,e[11]=b):b=e[11];let r;e[12]!==b?(r=s.jsx("span",{className:"rounded-full border border-border/60 bg-background/60 px-2 py-0.5 text-[10px] font-medium text-muted-foreground",children:b}),e[12]=b,e[13]=r):r=e[13];let p;e[14]!==_||e[15]!==r?(p=s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[_,r]}),e[14]=_,e[15]=r,e[16]=p):p=e[16];let m;e[17]!==t?(m=t("settings.decoNudgeCard.description"),e[17]=t,e[18]=m):m=e[18];let f;e[19]!==m?(f=s.jsx("p",{className:"text-sm text-muted-foreground",children:m}),e[19]=m,e[20]=f):f=e[20];let P;e[21]!==f||e[22]!==p?(P=s.jsxs("div",{className:"flex-1 min-w-0",children:[p,f]}),e[21]=f,e[22]=p,e[23]=P):P=e[23];let h;e[24]!==i?(h=()=>i(),e[24]=i,e[25]=h):h=e[25];let v;e[26]!==o||e[27]!==t?(v=t(o?"settings.decoNudgeCard.connecting":"settings.decoNudgeCard.connectDeco"),e[26]=o,e[27]=t,e[28]=v):v=e[28];let g;e[29]!==o||e[30]!==h||e[31]!==v?(g=s.jsx(ee,{variant:"outline",disabled:o,onClick:h,children:v}),e[29]=o,e[30]=h,e[31]=v,e[32]=g):g=e[32];let N;return e[33]!==P||e[34]!==g||e[35]!==l?(N=s.jsxs("div",{className:"relative rounded-xl border border-border overflow-hidden",children:[c,s.jsxs("div",{className:"relative flex items-center gap-5 px-6 py-5",children:[l,P,g]})]}),e[33]=P,e[34]=g,e[35]=l,e[36]=N):N=e[36],N}const Jt=e=>st({label:Pe().min(1,e("settings.editProviderDialog.labelRequired")).max(100),apiKey:Pe().optional(),baseUrl:Pe().optional()});function Xt({isOpenAICompatible:e,baseUrl:t,currentBaseUrl:i,apiKey:o}){return e&&!!t&&t!==i&&!o}function Zt({providerKey:e,provider:t,preset:i,maskedKey:o,currentLabel:n,currentBaseUrl:c,onCancel:a,onSuccess:l}){const{org:u}=be(),_=re(),b=je(),r=se(),[p,m]=G.useState(!1),f=t.id==="openai-compatible",P=t.supportedMethods.includes("api-key"),h=Jt(r),{register:v,handleSubmit:g,watch:N,setError:k,formState:{errors:x}}=$e({resolver:Fe(h),defaultValues:{label:n,apiKey:"",baseUrl:c??""}}),j=N("apiKey")??"",{mutate:S,isPending:d}=le({mutationFn:async y=>{let C;y.apiKey&&(f?C=JSON.stringify({baseUrl:y.baseUrl||c||"",apiKey:y.apiKey}):C=y.apiKey),await _.call("AI_PROVIDER_KEY_UPDATE",{keyId:e.id,label:y.label,...C!==void 0?{apiKey:C}:{}})},onSuccess:()=>{b.invalidateQueries({queryKey:te.aiProviderKeys(u.id)}),b.invalidateQueries({queryKey:te.aiProviders(u.id)}),X.success(r("settings.editProviderDialog.providerUpdated")),l()},onError:y=>X.error(r("settings.editProviderDialog.failedToUpdate",{error:y.message}))});return s.jsxs("form",{onSubmit:g(y=>{if(Xt({isOpenAICompatible:f,baseUrl:y.baseUrl,currentBaseUrl:c,apiKey:y.apiKey})){k("apiKey",{message:r("settings.editProviderDialog.apiKeyRequiredForBaseUrlChange")});return}S(y)}),className:"space-y-3",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:r("settings.editProviderDialog.label")}),s.jsx(ye,{placeholder:r("settings.editProviderDialog.labelPlaceholder"),...v("label"),className:"h-8 text-sm"}),x.label&&s.jsx("p",{className:"text-xs text-destructive",children:x.label.message})]}),f&&!i?.defaultBaseUrl&&s.jsxs("div",{className:"space-y-1",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:r("settings.editProviderDialog.baseUrl")}),s.jsx(ye,{type:"url",placeholder:i?.baseUrlPlaceholder??r("settings.editProviderDialog.baseUrlPlaceholder"),...v("baseUrl"),className:"h-8 text-sm"})]}),P&&s.jsxs("div",{className:"space-y-1",children:[s.jsxs("label",{className:"text-xs font-medium text-muted-foreground",children:[r("settings.editProviderDialog.apiKey")," ",s.jsxs("span",{className:"text-muted-foreground/60",children:["(",r("settings.editProviderDialog.leaveBlankHint"),")"]})]}),s.jsxs("div",{className:"relative",children:[s.jsx(ye,{type:p&&j?"text":"password",placeholder:o,...v("apiKey"),className:"ph-no-capture h-8 text-sm pr-8"}),j&&s.jsx("button",{type:"button",onClick:()=>m(!p),"aria-label":r(p?"settings.editProviderDialog.hideApiKey":"settings.editProviderDialog.showApiKey"),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:p?s.jsx(Pt,{size:14}):s.jsx(It,{size:14})})]}),x.apiKey&&s.jsx("p",{className:"text-xs text-destructive",children:x.apiKey.message})]}),i?.helpText&&s.jsx("p",{className:"text-xs text-muted-foreground",children:i.helpText}),s.jsxs(At,{children:[s.jsx(ee,{type:"button",variant:"ghost",size:"sm",onClick:a,disabled:d,children:r("settings.editProviderDialog.cancel")}),s.jsx(ee,{type:"submit",size:"sm",disabled:d,children:r(d?"settings.editProviderDialog.saving":"settings.editProviderDialog.save")})]})]})}function es(e){const t=J.c(31),{providerKey:i,provider:o,open:n,onOpenChange:c}=e,a=se(),l=re(),u=o.id==="openai-compatible"&&i.presetId?Ve(i.presetId):void 0,_=u?.name??o.name;let b;t[0]!==i.id?(b=te.aiProviderKeyPreview(i.id),t[0]=i.id,t[1]=b):b=t[1];let r;t[2]!==i.id||t[3]!==l?(r=()=>l.call("AI_PROVIDER_KEY_PREVIEW",{keyId:i.id}),t[2]=i.id,t[3]=l,t[4]=r):r=t[4];let p;t[5]!==n||t[6]!==b||t[7]!==r?(p={queryKey:b,queryFn:r,enabled:n,staleTime:0},t[5]=n,t[6]=b,t[7]=r,t[8]=p):p=t[8];const{data:m,isLoading:f}=ke(p),P=wt,h=Dt,v="sm:max-w-md",g=Kt,N=kt,k=a("settings.editProviderDialog.editTitle",{name:_});let x;t[9]!==N||t[10]!==k?(x=s.jsx(N,{children:k}),t[9]=N,t[10]=k,t[11]=x):x=t[11];let j;t[12]!==g||t[13]!==x?(j=s.jsx(g,{children:x}),t[12]=g,t[13]=x,t[14]=j):j=t[14];let S;t[15]!==f||t[16]!==c||t[17]!==u||t[18]!==m||t[19]!==o||t[20]!==i?(S=f||!m?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(Et,{})}):s.jsx(Zt,{providerKey:i,provider:o,preset:u,maskedKey:m.maskedKey,currentLabel:m.label,currentBaseUrl:m.baseUrl,onCancel:()=>c(!1),onSuccess:()=>c(!1)}),t[15]=f,t[16]=c,t[17]=u,t[18]=m,t[19]=o,t[20]=i,t[21]=S):S=t[21];let d;t[22]!==h||t[23]!==j||t[24]!==S?(d=s.jsxs(h,{className:v,children:[j,S]}),t[22]=h,t[23]=j,t[24]=S,t[25]=d):d=t[25];let y;return t[26]!==P||t[27]!==c||t[28]!==n||t[29]!==d?(y=s.jsx(P,{open:n,onOpenChange:c,children:d}),t[26]=P,t[27]=c,t[28]=n,t[29]=d,t[30]=y):y=t[30],y}function ts(e){const t=J.c(86),{providerKey:i,provider:o}=e,{org:n}=be(),c=re(),a=je(),[l,u]=G.useState(!1),[_,b]=G.useState(!1),r=se(),[p]=He(),m=p.language==="pt-BR"?bt:void 0,f=o?.id==="openai-compatible";let P;t[0]!==f||t[1]!==i.presetId?(P=f&&i.presetId?Ve(i.presetId):void 0,t[0]=f,t[1]=i.presetId,t[2]=P):P=t[2];const h=P;let v;t[3]!==f||t[4]!==h||t[5]!==o?.name||t[6]!==i.providerId||t[7]!==r?(v=h?h.name:f?r("settings.aiProviders.customOpenAiCompatible"):o?.name??(i.providerId==="claude-code"?r("settings.providerKeyRow.claudeCode"):i.providerId==="codex"?r("settings.providerKeyRow.codex"):i.providerId),t[3]=f,t[4]=h,t[5]=o?.name,t[6]=i.providerId,t[7]=r,t[8]=v):v=t[8];const g=v,N=h?.logo??o?.logo??Nt[i.providerId];let k;e:{if(f){k=i.label;break e}let Z;t[9]!==m||t[10]!==i.createdAt||t[11]!==i.label||t[12]!==r?(Z=r("settings.providerKeyRow.addedTimeAgo",{label:i.label,time:jt(new Date(i.createdAt),{locale:m})}),t[9]=m,t[10]=i.createdAt,t[11]=i.label,t[12]=r,t[13]=Z):Z=t[13],k=Z}const x=k;let j;t[14]!==i.id||t[15]!==c?(j=async()=>{await c.call("AI_PROVIDER_KEY_DELETE",{keyId:i.id})},t[14]=i.id,t[15]=c,t[16]=j):j=t[16];let S;t[17]!==n||t[18]!==i.id||t[19]!==a||t[20]!==r?(S=()=>{a.invalidateQueries({queryKey:te.aiProviderKeys(n.id)}),a.invalidateQueries({queryKey:te.aiProviders(n.id)}),a.invalidateQueries({queryKey:te.aiProviderModels(n.id,i.id)}),X.success(r("settings.providerKeyRow.keyDeleted")),u(!1)},t[17]=n,t[18]=i.id,t[19]=a,t[20]=r,t[21]=S):S=t[21];let d;t[22]!==r?(d=Z=>X.error(r("settings.providerKeyRow.failedToDeleteKey",{error:Z.message})),t[22]=r,t[23]=d):d=t[23];let y;t[24]!==j||t[25]!==S||t[26]!==d?(y={mutationFn:j,onSuccess:S,onError:d},t[24]=j,t[25]=S,t[26]=d,t[27]=y):y=t[27];const{mutate:C,isPending:K}=le(y);let A;t[28]!==g||t[29]!==N?(A=N?s.jsx("img",{src:N,alt:g,className:"size-8 rounded-md object-contain dark:bg-white dark:p-0.5"}):s.jsx(_t,{fallback:g.charAt(0),className:"size-8 bg-primary/10 text-primary"}),t[28]=g,t[29]=N,t[30]=A):A=t[30];let w;t[31]!==o||t[32]!==r?(w=o?s.jsx(ee,{variant:"ghost",size:"icon","aria-label":r("settings.providerKeyRow.editProviderKey"),className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:()=>b(!0),children:s.jsx(St,{size:14})}):null,t[31]=o,t[32]=r,t[33]=w):w=t[33];let E;t[34]!==r?(E=r("settings.providerKeyRow.deleteProviderKey"),t[34]=r,t[35]=E):E=t[35];let R,F;t[36]===Symbol.for("react.memo_cache_sentinel")?(R=()=>u(!0),F=s.jsx(Ct,{size:14}),t[36]=R,t[37]=F):(R=t[36],F=t[37]);let z;t[38]!==K||t[39]!==E?(z=s.jsx(ee,{variant:"ghost",size:"icon","aria-label":E,className:"h-7 w-7 text-muted-foreground hover:text-destructive",disabled:K,onClick:R,children:F}),t[38]=K,t[39]=E,t[40]=z):z=t[40];let L;t[41]!==z||t[42]!==w?(L=s.jsxs("div",{className:"flex items-center gap-0.5",children:[w,z]}),t[41]=z,t[42]=w,t[43]=L):L=t[43];let $;t[44]!==x||t[45]!==g||t[46]!==L||t[47]!==A?($=s.jsx(qe,{icon:A,title:g,description:x,action:L}),t[44]=x,t[45]=g,t[46]=L,t[47]=A,t[48]=$):$=t[48];let U;t[49]!==_||t[50]!==o||t[51]!==i?(U=o?s.jsx(es,{providerKey:i,provider:o,open:_,onOpenChange:b}):null,t[49]=_,t[50]=o,t[51]=i,t[52]=U):U=t[52];let H;t[53]!==r?(H=r("settings.providerKeyRow.deleteApiKey"),t[53]=r,t[54]=H):H=t[54];let q;t[55]!==H?(q=s.jsx(Le,{children:H}),t[55]=H,t[56]=q):q=t[56];let V;t[57]!==i.label?(V=s.jsxs(Qe,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:i.label}),"."]}),t[57]=i.label,t[58]=V):V=t[58];let I;t[59]!==q||t[60]!==V?(I=s.jsxs(Ge,{children:[q,V]}),t[59]=q,t[60]=V,t[61]=I):I=t[61];let T;t[62]!==r?(T=r("settings.providerKeyRow.cancel"),t[62]=r,t[63]=T):T=t[63];let O;t[64]!==T?(O=s.jsx(Ye,{children:T}),t[64]=T,t[65]=O):O=t[65];let M;t[66]!==C?(M=()=>C(),t[66]=C,t[67]=M):M=t[67];let D;t[68]!==r?(D=r("settings.providerKeyRow.delete"),t[68]=r,t[69]=D):D=t[69];let Y;t[70]!==M||t[71]!==D?(Y=s.jsx(We,{onClick:M,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:D}),t[70]=M,t[71]=D,t[72]=Y):Y=t[72];let W;t[73]!==O||t[74]!==Y?(W=s.jsxs(Je,{children:[O,Y]}),t[73]=O,t[74]=Y,t[75]=W):W=t[75];let B;t[76]!==I||t[77]!==W?(B=s.jsxs(Xe,{children:[I,W]}),t[76]=I,t[77]=W,t[78]=B):B=t[78];let Q;t[79]!==l||t[80]!==B?(Q=s.jsx(Ze,{open:l,onOpenChange:u,children:B}),t[79]=l,t[80]=B,t[81]=Q):Q=t[81];let ie;return t[82]!==$||t[83]!==U||t[84]!==Q?(ie=s.jsxs(s.Fragment,{children:[$,U,Q]}),t[82]=$,t[83]=U,t[84]=Q,t[85]=ie):ie=t[85],ie}function ss(e){const t=e.filter(i=>dt(i.providerId));return{hasInventory:e.length>0,hasHostedProvider:t.length>0,hasDeco:t.some(i=>i.providerId==="deco")}}function is(e,t){return e.filter(i=>i.providerId!=="deco").map(i=>({key:i,provider:t.find(o=>o.id===i.providerId)??null}))}function Oe(e){const t=J.c(13),{onConnectClick:i}=e,o=se(),n=Ae(),c=ze();let a;if(t[0]!==c?.providers||t[1]!==n||t[2]!==i||t[3]!==o){const l=c?.providers??[],u=is(n,l);let _;t[5]!==o?(_=o("settings.connectedProvidersSection.sectionTitle"),t[5]=o,t[6]=_):_=t[6];let b;t[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(yt,{size:14}),t[7]=b):b=t[7];let r;t[8]!==o?(r=o("settings.connectedProvidersSection.connectButton"),t[8]=o,t[9]=r):r=t[9];let p;t[10]!==i||t[11]!==r?(p=s.jsxs(ee,{size:"sm",onClick:i,children:[b,r]}),t[10]=i,t[11]=r,t[12]=p):p=t[12],a=s.jsx(we,{title:_,headerClassName:"px-0",actions:p,children:u.length===0?s.jsx("p",{className:"text-sm text-muted-foreground px-1",children:o("settings.connectedProvidersSection.emptyState")}):s.jsx(De,{children:u.map(ls)})}),t[0]=c?.providers,t[1]=n,t[2]=i,t[3]=o,t[4]=a}else a=t[4];return a}function ls(e){const{key:t,provider:i}=e;return s.jsx(ts,{providerKey:t,provider:i},t.id)}function rs(){const e=J.c(55),t=se(),{org:i}=be(),o=re(),n=je(),[c,a]=G.useState("");let l;e[0]!==i.id?(l=te.claudeSubscription(i.id),e[0]=i.id,e[1]=l):l=e[1];let u;e[2]!==o?(u=()=>o.call("CLAUDE_SUBSCRIPTION_STATUS",{}),e[2]=o,e[3]=u):u=e[3];let _;e[4]!==l||e[5]!==u?(_={queryKey:l,queryFn:u},e[4]=l,e[5]=u,e[6]=_):_=e[6];const b=ke(_);let r;e[7]!==i.id||e[8]!==n?(r=()=>n.invalidateQueries({queryKey:te.claudeSubscription(i.id)}),e[7]=i.id,e[8]=n,e[9]=r):r=e[9];const p=r;let m;e[10]!==o||e[11]!==c?(m=()=>o.call("CLAUDE_SUBSCRIPTION_CONNECT",{token:c}),e[10]=o,e[11]=c,e[12]=m):m=e[12];let f;e[13]!==p||e[14]!==t?(f=async()=>{a(""),await p(),X.success(t("settings.claudeSubscription.connected"))},e[13]=p,e[14]=t,e[15]=f):f=e[15];let P;e[16]!==m||e[17]!==f?(P={mutationFn:m,onSuccess:f,onError:ns},e[16]=m,e[17]=f,e[18]=P):P=e[18];const h=le(P);let v;e[19]!==o?(v=()=>o.call("CLAUDE_SUBSCRIPTION_DISCONNECT",{}),e[19]=o,e[20]=v):v=e[20];let g;e[21]!==p||e[22]!==t?(g=async()=>{await p(),X.success(t("settings.claudeSubscription.disconnected"))},e[21]=p,e[22]=t,e[23]=g):g=e[23];let N;e[24]!==v||e[25]!==g?(N={mutationFn:v,onSuccess:g,onError:os},e[24]=v,e[25]=g,e[26]=N):N=e[26];const k=le(N),x=b.data?.connected===!0,j=!x&&!!b.data?.linkedAt;let S;e[27]!==t?(S=t("settings.claudeSubscription.title"),e[27]=t,e[28]=S):S=e[28];let d;e[29]!==S?(d=s.jsx("p",{className:"text-base font-semibold",children:S}),e[29]=S,e[30]=d):d=e[30];let y;e[31]!==x||e[32]!==j||e[33]!==t?(y=t(x?"settings.claudeSubscription.active":j?"settings.claudeSubscription.expired":"settings.claudeSubscription.description"),e[31]=x,e[32]=j,e[33]=t,e[34]=y):y=e[34];let C;e[35]!==y?(C=s.jsx("p",{className:"text-sm text-muted-foreground",children:y}),e[35]=y,e[36]=C):C=e[36];let K;e[37]!==d||e[38]!==C?(K=s.jsxs("div",{className:"flex-1 min-w-0",children:[d,C]}),e[37]=d,e[38]=C,e[39]=K):K=e[39];let A;e[40]!==x||e[41]!==k||e[42]!==t?(A=x?s.jsx(ee,{variant:"outline",disabled:k.isPending,onClick:()=>k.mutate(),children:t("settings.claudeSubscription.disconnect")}):null,e[40]=x,e[41]=k,e[42]=t,e[43]=A):A=e[43];let w;e[44]!==K||e[45]!==A?(w=s.jsxs("div",{className:"flex items-center gap-4",children:[K,A]}),e[44]=K,e[45]=A,e[46]=w):w=e[46];let E;e[47]!==h||e[48]!==x||e[49]!==t||e[50]!==c?(E=x?null:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsxs("p",{className:"text-sm text-muted-foreground",children:[t("settings.claudeSubscription.howTo")," ",s.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"claude setup-token"})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ye,{type:"password",value:c,onChange:F=>a(F.target.value),placeholder:t("settings.claudeSubscription.tokenPlaceholder")}),s.jsx(ee,{disabled:c.trim().length===0||h.isPending,onClick:()=>h.mutate(),children:t("settings.claudeSubscription.connect")})]})]}),e[47]=h,e[48]=x,e[49]=t,e[50]=c,e[51]=E):E=e[51];let R;return e[52]!==w||e[53]!==E?(R=s.jsxs("div",{className:"rounded-xl border border-border px-6 py-5 flex flex-col gap-4",children:[w,E]}),e[52]=w,e[53]=E,e[54]=R):R=e[54],R}function os(e){return X.error(e.message)}function ns(e){return X.error(e.message)}function as(e){const t=J.c(3),{error:i}=e;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(lt,{size:16}),t[0]=o):o=t[0];let n;return t[1]!==i.message?(n=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[o,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load AI providers: ",i.message]})]}),t[1]=i.message,t[2]=n):n=t[2],n}function cs(){const e=J.c(27),t=Ae();let i;e[0]!==t?(i=ss(t),e[0]=t,e[1]=i):i=e[1];const{hasInventory:o,hasHostedProvider:n,hasDeco:c}=i,[a,l]=G.useState(!1),[u,_]=G.useState(null),b=ze();let r;e[2]!==b?.providers?(r=b?.providers??[],e[2]=b?.providers,e[3]=r):r=e[3];const p=r;if(!n){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=()=>l(!0),e[4]=N):N=e[4];let k;e[5]!==p?(k=s.jsx(xt,{providers:p,onSelect:_,onShowAll:N}),e[5]=p,e[6]=k):k=e[6];const x=u!==null||a;let j;e[7]===Symbol.for("react.memo_cache_sentinel")?(j=K=>{K||(_(null),l(!1))},e[7]=j):j=e[7];const S=u??void 0;let d;e[8]!==x||e[9]!==S?(d=s.jsx(Me,{open:x,onOpenChange:j,initialProvider:S}),e[8]=x,e[9]=S,e[10]=d):d=e[10];let y;e[11]!==o?(y=o?s.jsx(Oe,{onConnectClick:()=>l(!0)}):null,e[11]=o,e[12]=y):y=e[12];let C;return e[13]!==k||e[14]!==d||e[15]!==y?(C=s.jsxs(s.Fragment,{children:[k,d,y]}),e[13]=k,e[14]=d,e[15]=y,e[16]=C):C=e[16],C}let m;e[17]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(G.Suspense,{fallback:s.jsx(Ke,{className:"h-16 w-full"}),children:s.jsx(Ht,{})}),e[17]=m):m=e[17];let f;e[18]!==c?(f=c?s.jsx(Qt,{}):s.jsx(Wt,{}),e[18]=c,e[19]=f):f=e[19];let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(rs,{}),e[20]=P):P=e[20];let h;e[21]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Oe,{onConnectClick:()=>l(!0)}),e[21]=h):h=e[21];let v;e[22]!==a?(v=s.jsx(Me,{open:a,onOpenChange:l}),e[22]=a,e[23]=v):v=e[23];let g;return e[24]!==f||e[25]!==v?(g=s.jsxs(s.Fragment,{children:[m,f,P,h,v]}),e[24]=f,e[25]=v,e[26]=g):g=e[26],g}function ds(){const e=J.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ot,{group:"billing"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ie,{children:s.jsx(Ie.Content,{children:s.jsx(Ie.Body,{children:s.jsxs(rt,{children:[t,s.jsx(it,{fallback:ms,children:s.jsx(G.Suspense,{fallback:s.jsx(Ke,{className:"h-64 w-full"}),children:s.jsx(cs,{})})})]})})})}),e[1]=i):i=e[1],i}function ms(e){const{error:t}=e;return s.jsx(as,{error:t??new Error("Failed to load AI providers")})}function _i(){const e=J.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Rt,{capability:"ai-providers:manage",area:"AI providers",children:s.jsx(ds,{})}),e[0]=t):t=e[0],t}export{_i as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,j as t,E as ie,r as F,b as B,B as N,t as R}from"./index-CacyxM-B.js";import{i as le}from"./AlertCircle-DOZzh9F_.js";import{a as ne}from"./Copy01-CzEeXGsa.js";import{i as M}from"./Key01-WuBVakl2.js";import{s as Q}from"./Plus-m61KPSTg.js";import{s as re}from"./Trash01-BcRuo5Fe.js";import{A as ae,a as oe,b as ce,c as me,d as de,e as fe,f as pe,g as ue}from"./alert-dialog-DRGp9yFR.js";import{b as U,h as V,a as W,c as X,d as Y,e as Z}from"./dialog-Ww_zj2g-.js";import{I as ee}from"./input-B8ln-0Wl.js";import{L as xe}from"./label-CCAJCJOj.js";import{S as ge}from"./skeleton-DOg01VWn.js";import{P as q}from"./index-GDSYOTBM.js";import{c as ye}from"./settings-section-Cz2znp8W.js";import{a as he,b as je,u as be}from"./use-api-keys-DMBDl3ic.js";import{S as Ke}from"./settings-subnav-a1a1GCc2.js";import{R as Ce}from"./require-capability-BDCw5l2l.js";import"./X-VMfnK-j5.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./tooltip-CwIq9zTG.js";import"./card-CG7VHdDz.js";import"./ArrowUpRight-CibKwsqg.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./useRouterState-Dk4tjkCW.js";import"./use-settings-tabs-CkhP712K.js";import"./use-capability-D8TgIows.js";import"./studio-tools-O0czolAT.js";import"./access-gate-bmibgRvV.js";import"./capability-load-error-BPXMIbs3.js";function De(c){const e=S.c(6),{error:o}=c,a=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(le,{size:16}),e[0]=i):i=e[0];let s;e[1]!==o.message||e[2]!==a?(s=a("settings.apiKeys.failedToLoadError",{error:o.message}),e[1]=o.message,e[2]=a,e[3]=s):s=e[3];let l;return e[4]!==s?(l=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[i,t.jsx("span",{className:"text-sm font-medium",children:s})]}),e[4]=s,e[5]=l):l=e[5],l}function Ae(c){const e=S.c(20),{apiKey:o,onDelete:a}=c,i=B();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx("div",{className:"size-9 rounded-md bg-muted flex items-center justify-center shrink-0",children:t.jsx(M,{size:16,className:"text-muted-foreground"})}),e[0]=s):s=e[0];let l;e[1]!==o.name?(l=t.jsx("span",{className:"font-medium text-sm truncate block",children:o.name}),e[1]=o.name,e[2]=l):l=e[2];let m;e[3]!==o.createdAt||e[4]!==i?(m=i("settings.apiKeys.createdAt",{date:new Date(o.createdAt).toLocaleDateString()}),e[3]=o.createdAt,e[4]=i,e[5]=m):m=e[5];let n;e[6]!==m?(n=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:m}),e[6]=m,e[7]=n):n=e[7];let d;e[8]!==l||e[9]!==n?(d=t.jsxs("div",{className:"flex items-start gap-3 min-w-0",children:[s,t.jsxs("div",{className:"min-w-0",children:[l,n]})]}),e[8]=l,e[9]=n,e[10]=d):d=e[10];let r;e[11]!==i?(r=i("settings.apiKeys.deleteKey"),e[11]=i,e[12]=r):r=e[12];let f;e[13]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(re,{size:14}),e[13]=f):f=e[13];let u;e[14]!==a||e[15]!==r?(u=t.jsx(N,{variant:"ghost",size:"icon",className:"text-muted-foreground hover:text-destructive shrink-0",onClick:a,"aria-label":r,children:f}),e[14]=a,e[15]=r,e[16]=u):u=e[16];let p;return e[17]!==d||e[18]!==u?(p=t.jsxs("div",{className:"flex items-start justify-between gap-4 py-3 border-b border-border/60 last:border-b-0",children:[d,u]}),e[17]=d,e[18]=u,e[19]=p):p=e[19],p}function Ne(c){const e=S.c(21),{onCreate:o}=c,a=B();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(M,{size:20,className:"text-muted-foreground"})}),e[0]=i):i=e[0];let s;e[1]!==a?(s=a("settings.apiKeys.emptyTitle"),e[1]=a,e[2]=s):s=e[2];let l;e[3]!==s?(l=t.jsx("p",{className:"font-medium text-sm",children:s}),e[3]=s,e[4]=l):l=e[4];let m;e[5]!==a?(m=a("settings.apiKeys.emptyDescription"),e[5]=a,e[6]=m):m=e[6];let n;e[7]!==m?(n=t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:m}),e[7]=m,e[8]=n):n=e[8];let d;e[9]!==l||e[10]!==n?(d=t.jsxs("div",{children:[l,n]}),e[9]=l,e[10]=n,e[11]=d):d=e[11];let r;e[12]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Q,{size:14}),e[12]=r):r=e[12];let f;e[13]!==a?(f=a("settings.apiKeys.newKey"),e[13]=a,e[14]=f):f=e[14];let u;e[15]!==o||e[16]!==f?(u=t.jsxs(N,{onClick:o,size:"sm",className:"mt-2",children:[r,f]}),e[15]=o,e[16]=f,e[17]=u):u=e[17];let p;return e[18]!==d||e[19]!==u?(p=t.jsxs("div",{className:"rounded-2xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[i,d,u]}),e[18]=d,e[19]=u,e[20]=p):p=e[20],p}function G(c){const e=S.c(40),{createdKey:o,onClose:a}=c,i=B(),s=o!==null;let l;e[0]!==a?(l=A=>!A&&a(),e[0]=a,e[1]=l):l=e[1];let m;e[2]!==i?(m=i("settings.apiKeys.createdTitle"),e[2]=i,e[3]=m):m=e[3];let n;e[4]!==m?(n=t.jsx(U,{children:m}),e[4]=m,e[5]=n):n=e[5];let d;e[6]!==i?(d=i("settings.apiKeys.createdDescription"),e[6]=i,e[7]=d):d=e[7];let r;e[8]!==d?(r=t.jsx(V,{children:d}),e[8]=d,e[9]=r):r=e[9];let f;e[10]!==n||e[11]!==r?(f=t.jsxs(W,{children:[n,r]}),e[10]=n,e[11]=r,e[12]=f):f=e[12];const u=o?.key??"";let p;e[13]!==u?(p=t.jsx(ee,{readOnly:!0,value:u,className:"font-mono text-xs"}),e[13]=u,e[14]=p):p=e[14];let x;e[15]!==o||e[16]!==i?(x=()=>{o&&(navigator.clipboard?.writeText(o.key),R.success(i("settings.apiKeys.copied")))},e[15]=o,e[16]=i,e[17]=x):x=e[17];let g;e[18]!==i?(g=i("settings.apiKeys.copyKey"),e[18]=i,e[19]=g):g=e[19];let K;e[20]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(ne,{size:14}),e[20]=K):K=e[20];let y;e[21]!==x||e[22]!==g?(y=t.jsx(N,{type:"button",variant:"outline",size:"icon",onClick:x,"aria-label":g,children:K}),e[21]=x,e[22]=g,e[23]=y):y=e[23];let h;e[24]!==y||e[25]!==p?(h=t.jsxs("div",{className:"flex items-center gap-2",children:[p,y]}),e[24]=y,e[25]=p,e[26]=h):h=e[26];let j;e[27]!==i?(j=i("settings.apiKeys.done"),e[27]=i,e[28]=j):j=e[28];let b;e[29]!==a||e[30]!==j?(b=t.jsx(X,{children:t.jsx(N,{onClick:a,children:j})}),e[29]=a,e[30]=j,e[31]=b):b=e[31];let C;e[32]!==h||e[33]!==b||e[34]!==f?(C=t.jsxs(Y,{className:"sm:max-w-lg",children:[f,h,b]}),e[32]=h,e[33]=b,e[34]=f,e[35]=C):C=e[35];let D;return e[36]!==s||e[37]!==C||e[38]!==l?(D=t.jsx(Z,{open:s,onOpenChange:l,children:C}),e[36]=s,e[37]=C,e[38]=l,e[39]=D):D=e[39],D}function J(c){const e=S.c(64),{open:o,onOpenChange:a,onCreated:i}=c,s=B(),[l,m]=F.useState(""),n=be();let d;e[0]!==a?(d=function(){m(""),a(!1)},e[0]=a,e[1]=d):d=e[1];const r=d;let f;e[2]!==n||e[3]!==r||e[4]!==l||e[5]!==i||e[6]!==s?(f=async function(se){if(se.preventDefault(),!!l.trim())try{const I=await n.mutateAsync({name:l.trim()});r(),i(I)}catch(I){const H=I;R.error(H instanceof Error?H.message:s("settings.apiKeys.failedToCreateKey"))}},e[2]=n,e[3]=r,e[4]=l,e[5]=i,e[6]=s,e[7]=f):f=e[7];const u=f;let p;e[8]!==r||e[9]!==a?(p=$=>{$?a($):r()},e[8]=r,e[9]=a,e[10]=p):p=e[10];let x;e[11]!==s?(x=s("settings.apiKeys.newKeyTitle"),e[11]=s,e[12]=x):x=e[12];let g;e[13]!==x?(g=t.jsx(U,{children:x}),e[13]=x,e[14]=g):g=e[14];let K;e[15]!==s?(K=s("settings.apiKeys.newKeyDescription"),e[15]=s,e[16]=K):K=e[16];let y;e[17]!==K?(y=t.jsx(V,{children:K}),e[17]=K,e[18]=y):y=e[18];let h;e[19]!==g||e[20]!==y?(h=t.jsxs(W,{children:[g,y]}),e[19]=g,e[20]=y,e[21]=h):h=e[21];let j;e[22]!==s?(j=s("settings.apiKeys.nameLabel"),e[22]=s,e[23]=j):j=e[23];let b;e[24]!==j?(b=t.jsx(xe,{htmlFor:"api-key-name",children:j}),e[24]=j,e[25]=b):b=e[25];let C;e[26]===Symbol.for("react.memo_cache_sentinel")?(C=$=>m($.target.value),e[26]=C):C=e[26];let D;e[27]!==s?(D=s("settings.apiKeys.namePlaceholder"),e[27]=s,e[28]=D):D=e[28];let A;e[29]!==l||e[30]!==D?(A=t.jsx(ee,{id:"api-key-name",value:l,onChange:C,placeholder:D,autoComplete:"off",required:!0}),e[29]=l,e[30]=D,e[31]=A):A=e[31];let v;e[32]!==b||e[33]!==A?(v=t.jsxs("div",{className:"space-y-1.5",children:[b,A]}),e[32]=b,e[33]=A,e[34]=v):v=e[34];const te=n.isPending;let k;e[35]!==s?(k=s("settings.apiKeys.cancelButton"),e[35]=s,e[36]=k):k=e[36];let _;e[37]!==n.isPending||e[38]!==r||e[39]!==k?(_=t.jsx(N,{type:"button",variant:"outline",onClick:r,disabled:te,children:k}),e[37]=n.isPending,e[38]=r,e[39]=k,e[40]=_):_=e[40];let w;e[41]!==n.isPending||e[42]!==l?(w=n.isPending||!l.trim(),e[41]=n.isPending,e[42]=l,e[43]=w):w=e[43];let P;e[44]!==n.isPending||e[45]!==s?(P=n.isPending?s("settings.apiKeys.creatingButton"):s("settings.apiKeys.createButton"),e[44]=n.isPending,e[45]=s,e[46]=P):P=e[46];let z;e[47]!==w||e[48]!==P?(z=t.jsx(N,{type:"submit",disabled:w,children:P}),e[47]=w,e[48]=P,e[49]=z):z=e[49];let E;e[50]!==_||e[51]!==z?(E=t.jsxs(X,{children:[_,z]}),e[50]=_,e[51]=z,e[52]=E):E=e[52];let T;e[53]!==u||e[54]!==v||e[55]!==E?(T=t.jsxs("form",{onSubmit:u,className:"space-y-4",children:[v,E]}),e[53]=u,e[54]=v,e[55]=E,e[56]=T):T=e[56];let O;e[57]!==T||e[58]!==h?(O=t.jsxs(Y,{className:"sm:max-w-lg",children:[h,T]}),e[57]=T,e[58]=h,e[59]=O):O=e[59];let L;return e[60]!==o||e[61]!==O||e[62]!==p?(L=t.jsx(Z,{open:o,onOpenChange:p,children:O}),e[60]=o,e[61]=O,e[62]=p,e[63]=L):L=e[63],L}function Se(){const c=B(),{data:e=[]}=he(),o=je(),[a,i]=F.useState(!1),[s,l]=F.useState(null),[m,n]=F.useState(null);async function d(){if(m)try{await o.mutateAsync(m.id),R.success(c("settings.apiKeys.keyDeleted",{name:m.name}))}catch(r){R.error(r instanceof Error?r.message:c("settings.apiKeys.failedToDeleteKey"))}finally{n(null)}}return e.length===0?t.jsxs(t.Fragment,{children:[t.jsx(Ne,{onCreate:()=>i(!0)}),t.jsx(J,{open:a,onOpenChange:i,onCreated:l}),t.jsx(G,{createdKey:s,onClose:()=>l(null)})]}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("p",{className:"text-sm text-muted-foreground",children:c(e.length===1?"settings.apiKeys.keysCountSingular":"settings.apiKeys.keysCountPlural",{count:e.length})}),t.jsxs(N,{onClick:()=>i(!0),size:"sm",children:[t.jsx(Q,{size:14}),c("settings.apiKeys.newKey")]})]}),t.jsx("section",{className:"rounded-2xl border border-border/60 bg-background p-5",children:t.jsx("div",{children:e.map(r=>t.jsx(Ae,{apiKey:r,onDelete:()=>n(r)},r.id))})}),t.jsx(J,{open:a,onOpenChange:i,onCreated:l}),t.jsx(G,{createdKey:s,onClose:()=>l(null)}),t.jsx(ae,{open:m!==null,onOpenChange:r=>{r||n(null)},children:t.jsxs(oe,{children:[t.jsxs(ce,{children:[t.jsx(me,{children:c("settings.apiKeys.deleteTitle",{name:m?.name??""})}),t.jsx(de,{children:c("settings.apiKeys.deleteDescription")})]}),t.jsxs(fe,{children:[t.jsx(pe,{children:c("settings.apiKeys.cancelButton")}),t.jsx(ue,{onClick:d,children:c("settings.apiKeys.deleteKey")})]})]})})]})}function ve(){const c=S.c(2);let e;c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{group:"connect"}),c[0]=e):e=c[0];let o;return c[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(q,{children:t.jsx(q.Content,{children:t.jsx(q.Body,{children:t.jsxs(ye,{children:[e,t.jsx(ie,{fallback:ke,children:t.jsx(F.Suspense,{fallback:t.jsx(ge,{className:"h-32 w-full"}),children:t.jsx(Se,{})})})]})})})}),c[1]=o):o=c[1],o}function ke(c){const{error:e}=c;return t.jsx(De,{error:e??new Error("Failed to load API keys")})}function rt(){const c=S.c(1);let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ce,{capability:"api-keys:manage",area:"api-keys",children:t.jsx(ve,{})}),c[0]=e):e=c[0],e}export{rt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as Bt,b as kt,r as A,j as o,m as jt,k as _t,t as xt}from"./index-CacyxM-B.js";import{i as wt}from"./ChevronRight-H-_IIqWd.js";import{B as At}from"./automation-runs-D-R-Y_E3.js";import{u as Et,A as Nt}from"./use-section-preview-base-Dc8Axtks.js";import{A as Rt,B as Ct,C as Kt,D as Tt,F as Ft,G as Pt,H as $t,S as Ut,I as Ot,J as zt}from"./index-COAHvcVh.js";import"./select-CwAouusu.js";import"./tooltip-CwIq9zTG.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronUp-CT1Rb5MC.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./studio-tools-O0czolAT.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./dialog-Ww_zj2g-.js";import"./tab-id-ZL6F14qy.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-D20WJCxs.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DF6xoNtC.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./monaco-editor-q7NTyRwe.js";import"./spinner-D7fl_vK2.js";import"./types-D40WAxQO.js";import"./shell-layout-VRjP3s0M.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./integration-icon-CLbqw16t.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./label-CCAJCJOj.js";import"./input-B8ln-0Wl.js";import"./file-type-icon-B5W8k3cc.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./popover-5hCe1k-b.js";import"./self-tool-result-DaPbHreD.js";import"./alert-dialog-DRGp9yFR.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-mcp-tools-CMpvouUr.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./checkbox-BsGrD1YR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";function It(n,t){const m=(n.title||n.resolveType.split("/").pop()||"").replace(/\.(tsx?|jsx?)$/,"").replace(/[^A-Za-z0-9_-]/g,""),i=/^[A-Za-z]/.test(m)&&m.length>0?m:"Section",s=Rt(t,i);return{blockKey:s,data:{__resolveType:n.resolveType,name:s}}}function Ir(n){const t=Bt.c(78),{orgSlug:m,virtualMcpId:i,branch:s,blockKey:p,block:x,meta:a,decofile:l,title:ht,excludeFields:H,schemaPending:nt,previewBaseUrl:lt}=n,M=nt===void 0?!1:nt,Z=lt===void 0?null:lt,c=kt();let N;t[0]!==Z||t[1]!==i?(N={virtualMcpId:i,sandboxUrl:Z},t[0]=Z,t[1]=i,t[2]=N):N=t[2];const h=Et(N),v=typeof x?.__resolveType=="string"?x.__resolveType:"";let R;t[3]!==H||t[4]!==a||t[5]!==v?(R=Ct(v,a,H),t[3]=H,t[4]=a,t[5]=v,t[6]=R):R=t[6];const b=R;let C;t[7]!==b?(C=!!b&&Object.keys(b.properties??{}).length>0,t[7]=b,t[8]=C):C=t[8];const G=C,ct=ht??(x?Kt(p,x,a):p);let K;t[9]!==s||t[10]!==m||t[11]!==i?(K={orgSlug:m,virtualMcpId:i,branch:s},t[9]=s,t[10]=m,t[11]=i,t[12]=K):K=t[12];const{save:S,flush:J,isPending:Q}=Tt(K);let T;t[13]!==s||t[14]!==m||t[15]!==i?(T={orgSlug:m,virtualMcpId:i,branch:s},t[13]=s,t[14]=m,t[15]=i,t[16]=T):T=t[16];const W=Ft(T);let F;t[17]!==S?(F=Ot((e,r)=>S(e,r)),t[17]=S,t[18]=F):F=t[18];const X=F,[bt,vt]=A.useState(p),[Y,dt]=A.useState(null),[tt,ut]=A.useState(0);let P;t[19]===Symbol.for("react.memo_cache_sentinel")?(P=[],t[19]=P):P=t[19];const[g,ft]=A.useState(P),[et,d]=A.useState(!1),$=A.useRef(null);bt!==p&&(vt(p),dt(null),ut(Vt),ft([]));let U;t[20]!==x?(U=x??{},t[20]=x,t[21]=U):U=t[21];const ot=U;let y;t[22]!==Y?(y=Y??{},t[22]=Y,t[23]=y):y=t[23];let O;t[24]!==ot||t[25]!==y?(O={...ot,...y},t[24]=ot,t[25]=y,t[26]=O):O=t[26];const rt=O;let z;t[27]!==p||t[28]!==v||t[29]!==S?(z=e=>{const r=e;dt(r),S(p,{...r,__resolveType:v})},t[27]=p,t[28]=v,t[29]=S,t[30]=z):z=t[30];const it=z;let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=e=>{ft(e)},t[31]=I):I=t[31];const E=I;let L;t[32]!==l||t[33]!==J||t[34]!==W||t[35]!==c?(L=async(e,r)=>{try{const{blockKey:u,data:f}=It(e,l);await W.mutateAsync({blockKey:u,data:f}),xt.success(c("sandbox.appEditor.createdSection",{name:u})),r({__resolveType:u}),J()}catch(u){const f=u,yt=f instanceof Error?f.message:c("sandbox.appEditor.failedAddSection");throw xt.error(yt),f}},t[32]=l,t[33]=J,t[34]=W,t[35]=c,t[36]=L):L=t[36];const B=L;let V;t[37]!==d?(V=e=>{$.current=e.append,d(!0)},t[37]=d,t[38]=V):V=t[38];const mt=V;let q;t[39]!==B||t[40]!==d?(q=async e=>{const r=$.current;if(r)try{await B(e,u=>{r(u),d(!1),$.current=null})}catch{}},t[39]=B,t[40]=d,t[41]=q):q=t[41];const st=q,pt=g.length>0?[ct,...g]:[],St="flex h-full flex-col",gt="flex h-12 shrink-0 items-center justify-between border-b px-6",at=pt.length>0?o.jsx("nav",{"aria-label":c("sandbox.appEditor.editingBreadcrumb"),className:"flex min-w-0 flex-1 items-center gap-1 overflow-hidden text-sm",children:pt.map((e,r)=>{const u=r===pt.length-1,f=Pt(e);return o.jsxs("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[r>0&&o.jsx(wt,{className:"size-3 shrink-0 text-muted-foreground/60"}),o.jsx("button",{type:"button",onClick:()=>{E(r===0?[]:$t(g,r)),ut(Lt)},title:f,className:jt("min-w-0 truncate rounded-md px-1 py-0.5 text-left transition-colors",u?"font-medium text-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:f})]},`${f}-${r}`)})}):o.jsx("span",{className:"text-sm font-medium",children:ct});let k;t[42]!==Q?(k=o.jsx(zt,{isPending:Q,isError:!1}),t[42]=Q,t[43]=k):k=t[43];let j;t[44]!==at||t[45]!==k?(j=o.jsxs("div",{className:gt,children:[at,k]}),t[44]=at,t[45]=k,t[46]=j):j=t[46];let _;t[47]!==p||t[48]!==s||t[49]!==g||t[50]!==l||t[51]!==rt||t[52]!==tt||t[53]!==B||t[54]!==E||t[55]!==it||t[56]!==mt||t[57]!==G||t[58]!==a||t[59]!==m||t[60]!==X||t[61]!==b||t[62]!==M||t[63]!==h||t[64]!==c||t[65]!==i?(_=o.jsx(At,{className:"min-h-0 min-w-0 flex-1 [&_[data-slot=scroll-area-viewport]>div]:!block",children:o.jsx("div",{className:"px-6 py-6",children:o.jsx("div",{className:"mx-auto max-w-xl",children:G?o.jsx(Ut,{schema:b,value:rt,onChange:it,basePath:"",breadcrumbPath:g,onBreadcrumbChange:E,decofile:l,meta:a,onSaveReferencedBlock:X,previewBaseUrl:h,onAddSectionItem:B,onRequestAddSection:mt,sandbox:{orgSlug:m,virtualMcpId:i,branch:s}},`${p}:${tt}`):M?o.jsxs("div",{className:"flex flex-col items-center gap-2 py-6 text-center text-xs text-muted-foreground",children:[o.jsx(_t,{size:16,className:"animate-spin"}),c("sandbox.appEditor.loadingSchema")]}):o.jsx("div",{className:"py-6 text-center text-xs text-muted-foreground",children:c("sandbox.appEditor.noEditableSchema")})})})}),t[47]=p,t[48]=s,t[49]=g,t[50]=l,t[51]=rt,t[52]=tt,t[53]=B,t[54]=E,t[55]=it,t[56]=mt,t[57]=G,t[58]=a,t[59]=m,t[60]=X,t[61]=b,t[62]=M,t[63]=h,t[64]=c,t[65]=i,t[66]=_):_=t[66];let w;t[67]!==et||t[68]!==l||t[69]!==st||t[70]!==a||t[71]!==h||t[72]!==d?(w=h&&o.jsx(Nt,{open:et,onOpenChange:e=>{d(e),e||($.current=null)},meta:a,decofile:l,previewBaseUrl:h,onSelect:e=>{st(e)}}),t[67]=et,t[68]=l,t[69]=st,t[70]=a,t[71]=h,t[72]=d,t[73]=w):w=t[73];let D;return t[74]!==j||t[75]!==_||t[76]!==w?(D=o.jsxs("div",{className:St,children:[j,_,w]}),t[74]=j,t[75]=_,t[76]=w,t[77]=D):D=t[77],D}function Lt(n){return n+1}function Vt(n){return n+1}export{Ir as AppEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as B,j as o,b as D,F as M,d as $,r as q,B as F,p as R}from"./index-CacyxM-B.js";import{s as V}from"./Plus-m61KPSTg.js";import{i as S}from"./Zap-BrJ2b2V7.js";import{S as G}from"./search-input-ByYoJKBQ.js";import{P as d}from"./index-GDSYOTBM.js";import{E as T}from"./empty-state-BJ2gnfVT.js";import{c as H}from"./use-automations-DQVxqjfN.js";import{c as J}from"./use-navigate-to-agent-IPGb4TnC.js";import{A as K}from"./automation-list-row-BIOSCgKN.js";import{t as O}from"./use-mcp-client-DRcy9vk6.js";import{u as Q}from"./use-virtual-mcp-zFcH9fRu.js";import{R as U}from"./require-capability-BDCw5l2l.js";import"./SearchMd-CF01LhHu.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./X-VMfnK-j5.js";import"./tooltip-CwIq9zTG.js";import"./studio-tools-O0czolAT.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./alert-dialog-DRGp9yFR.js";import"./dropdown-menu-ByKxU4Y4.js";import"./Check-CSFy6eOj.js";import"./ChevronRight-H-_IIqWd.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Trash01-BcRuo5Fe.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./SearchLg-CDtXrrcW.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./auth-Dk3-oFE7.js";import"./use-capability-D8TgIows.js";import"./access-gate-bmibgRvV.js";import"./capability-load-error-BPXMIbs3.js";function W(){const t=B.c(20),i=D(),{org:c}=M(),{data:C}=H(void 0),g=C===void 0?[]:C,k=Q(),P=J(),f=$(),[x,E]=q.useState(""),h=x.toLowerCase(),A=new Map(k.map(X)),b=g.filter(e=>{if(!h||e.name.toLowerCase().includes(h))return!0;if(e.virtual_mcp_id){const p=A.get(e.virtual_mcp_id);if(p&&p.title.toLowerCase().includes(h))return!0}return!1}),z=(e,p)=>{const N=p&&A.has(p)?p:O(c.id);R("automations_list_row_clicked",{automation_id:e,agent_id:N,source:"settings_automations"}),P(N,{search:{main:"automation:"+e}})};let l;t[0]!==f||t[1]!==c.slug?(l=()=>{R("automations_empty_state_browse_agents_clicked"),f({to:"/$org/settings/agents",params:{org:c.slug}})},t[0]=f,t[1]=c.slug,t[2]=l):l=t[2];const L=l,j=d,v=d,w=d;let s;t[3]!==i?(s=i("settings.automations.pageTitle"),t[3]=i,t[4]=s):s=t[4];let r;t[5]!==s?(r=o.jsx(d.Title,{children:s}),t[5]=s,t[6]=r):r=t[6];const _=g.length>0&&o.jsx(G,{value:x,onChange:E,placeholder:i("settings.automations.searchPlaceholder"),className:"w-full md:w-[375px]"});let m;t[7]!==r||t[8]!==_?(m=o.jsxs("div",{className:"flex flex-col gap-6",children:[r,_]}),t[7]=r,t[8]=_,t[9]=m):m=t[9];const y=g.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.emptyTitle"),description:i("settings.automations.emptyDescription"),actions:o.jsxs(F,{size:"sm",onClick:L,children:[o.jsx(V,{size:14}),i("settings.automations.browseAgentsButton")]})})}):b.length===0?o.jsx("div",{className:"flex items-center justify-center py-20",children:o.jsx(T,{image:o.jsx(S,{size:48,className:"text-muted-foreground"}),title:i("settings.automations.noResultsTitle"),description:i("settings.automations.noResultsDescription",{search:x})})}):o.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:b.map(e=>o.jsx(K,{automation:e,showAgent:!0,onClick:()=>z(e.id,e.virtual_mcp_id)},e.id))});let n;t[10]!==w.Body||t[11]!==m||t[12]!==y?(n=o.jsxs(w.Body,{children:[m,y]}),t[10]=w.Body,t[11]=m,t[12]=y,t[13]=n):n=t[13];let a;t[14]!==v.Content||t[15]!==n?(a=o.jsx(v.Content,{children:n}),t[14]=v.Content,t[15]=n,t[16]=a):a=t[16];let u;return t[17]!==j||t[18]!==a?(u=o.jsx(j,{children:a}),t[17]=j,t[18]=a,t[19]=u):u=t[19],u}function X(t){return[t.id,t]}function wo(){const t=B.c(1);let i;return t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(U,{capability:"automations:manage",area:"automations",children:o.jsx(W,{})}),t[0]=i):i=t[0],i}export{wo as default};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{r as re,j as s,cx as le,cy as fe,c as D,m as ae,b as ge,F as xe,K as pe,n as be,B as Y,k as J}from"./index-CacyxM-B.js";import{i as W}from"./CreditCard01-DTIKWUon.js";import{B as q}from"./badge-Bc-IWDm5.js";import{S as ee}from"./skeleton-DOg01VWn.js";import{P as Q}from"./index-GDSYOTBM.js";import{c as he,S as ve,a as Z,b as je}from"./settings-section-Cz2znp8W.js";import{u as Ne}from"./studio-tools-O0czolAT.js";import{u as te}from"./use-open-billing-url-nNkK2kBm.js";import{S as Pe}from"./settings-subnav-a1a1GCc2.js";import{R as _e}from"./require-capability-BDCw5l2l.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./X-VMfnK-j5.js";import"./tooltip-CwIq9zTG.js";import"./card-CG7VHdDz.js";import"./ArrowUpRight-CibKwsqg.js";import"./useRouterState-Dk4tjkCW.js";import"./use-settings-tabs-CkhP712K.js";import"./use-capability-D8TgIows.js";import"./access-gate-bmibgRvV.js";import"./capability-load-error-BPXMIbs3.js";var X="Progress",H=100,[ye]=fe(X),[Se,Te]=ye(X),ne=re.forwardRef((e,t)=>{const{__scopeProgress:a,value:n=null,max:r,getValueLabel:o=Ie,...c}=e;(r||r===0)&&!se(r)&&console.error(Ee(`${r}`,"Progress"));const i=se(r)?r:H;n!==null&&!ie(n,i)&&console.error(Ae(`${n}`,"Progress"));const l=ie(n,i)?n:null,d=M(l)?o(l,i):void 0;return s.jsx(Se,{scope:a,value:l,max:i,children:s.jsx(le.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":M(l)?l:void 0,"aria-valuetext":d,role:"progressbar","data-state":ue(l,i),"data-value":l??void 0,"data-max":i,...c,ref:t})})});ne.displayName=X;var oe="ProgressIndicator",ce=re.forwardRef((e,t)=>{const{__scopeProgress:a,...n}=e,r=Te(oe,a);return s.jsx(le.div,{"data-state":ue(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...n,ref:t})});ce.displayName=oe;function Ie(e,t){return`${Math.round(e/t*100)}%`}function ue(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function M(e){return typeof e=="number"}function se(e){return M(e)&&!isNaN(e)&&e>0}function ie(e,t){return M(e)&&!isNaN(e)&&e<=t&&e>=0}function Ee(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${H}\`.`}function Ae(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
-
- a positive number
|
|
3
|
-
- less than the value passed to \`max\` (or ${H} if no \`max\` prop is set)
|
|
4
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
-
|
|
6
|
-
Defaulting to \`null\`.`}var Re=ne,$e=ce;function Oe(e){const t=D.c(12);let a,n,r;t[0]!==e?({className:a,value:r,...n}=e,t[0]=e,t[1]=a,t[2]=n,t[3]=r):(a=t[1],n=t[2],r=t[3]);let o;t[4]!==a?(o=ae("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",a),t[4]=a,t[5]=o):o=t[5];const c=`translateX(-${100-(r||0)}%)`;let i;t[6]!==c?(i=s.jsx($e,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:c}}),t[6]=c,t[7]=i):i=t[7];let l;return t[8]!==n||t[9]!==o||t[10]!==i?(l=s.jsx(Re,{"data-slot":"progress",className:o,...n,children:i}),t[8]=n,t[9]=o,t[10]=i,t[11]=l):l=t[11],l}const ke=new Intl.DateTimeFormat(void 0,{month:"short",day:"numeric",year:"numeric"});function we(e){const t=D.c(12),{billingStatus:a,subscribed:n,t:r}=e;if(n&&a==="past_due"){let i;t[0]!==r?(i=r("settings.billing.statusPastDue"),t[0]=r,t[1]=i):i=t[1];let l;return t[2]!==i?(l=s.jsx(q,{variant:"warning",children:i}),t[2]=i,t[3]=l):l=t[3],l}if(n){let i;t[4]!==r?(i=r("settings.billing.statusActive"),t[4]=r,t[5]=i):i=t[5];let l;return t[6]!==i?(l=s.jsx(q,{variant:"success",children:i}),t[6]=i,t[7]=l):l=t[7],l}let o;t[8]!==r?(o=r("settings.billing.statusTrial"),t[8]=r,t[9]=o):o=t[9];let c;return t[10]!==o?(c=s.jsx(q,{variant:"secondary",children:o}),t[10]=o,t[11]=c):c=t[11],c}function Be(){const e=D.c(78),t=ge(),{org:a}=xe(),n=Ne(),r=te("ORGANIZATION_BILLING_CHECKOUT_START","settings.billing.checkoutError"),o=te("ORGANIZATION_BILLING_PORTAL","settings.billing.portalError");let c;e[0]!==a.id?(c=pe.organizationTaskQuota(a.id),e[0]=a.id,e[1]=c):c=e[1];let i;e[2]!==n?(i=()=>n.call("ORGANIZATION_TASK_QUOTA_GET",{}),e[2]=n,e[3]=i):i=e[3];let l;e[4]!==c||e[5]!==i?(l={queryKey:c,queryFn:i},e[4]=c,e[5]=i,e[6]=l):l=e[6];const{data:d,isLoading:de}=be(l);if(de){let m;return e[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(Z,{children:s.jsxs("div",{className:"flex flex-col gap-3 px-4 py-4",children:[s.jsx(ee,{className:"h-4 w-40"}),s.jsx(ee,{className:"h-2 w-full"})]})}),e[7]=m):m=e[7],m}if(!d||!d.enforced){let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(W,{size:16}),e[8]=m):m=e[8];let w;e[9]!==t?(w=t("settings.billing.autoTasksTitle"),e[9]=t,e[10]=w):w=e[10];let B;e[11]!==t?(B=t("settings.billing.unlimitedDescription"),e[11]=t,e[12]=B):B=e[12];let G;return e[13]!==w||e[14]!==B?(G=s.jsx(Z,{children:s.jsx(je,{icon:m,title:w,description:B})}),e[13]=w,e[14]=B,e[15]=G):G=e[15],G}const{billingStatus:V,subscribed:u,hasBillingAccount:F,used:C,limit:f}=d,K=f>0?Math.min(100,C/f*100):0,me=C>=f;let L;e[16]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("div",{className:"size-9 shrink-0 rounded-lg bg-muted/60 flex items-center justify-center text-muted-foreground",children:s.jsx(W,{size:16})}),e[16]=L):L=e[16];let g;e[17]!==t?(g=t("settings.billing.autoTasksTitle"),e[17]=t,e[18]=g):g=e[18];let x;e[19]!==g?(x=s.jsx("span",{className:"text-sm font-medium text-foreground",children:g}),e[19]=g,e[20]=x):x=e[20];let p;e[21]!==V||e[22]!==u||e[23]!==t?(p=s.jsx(we,{billingStatus:V,subscribed:u,t}),e[21]=V,e[22]=u,e[23]=t,e[24]=p):p=e[24];let b;e[25]!==x||e[26]!==p?(b=s.jsxs("div",{className:"flex items-center gap-2",children:[x,p]}),e[25]=x,e[26]=p,e[27]=b):b=e[27];let h;e[28]!==u||e[29]!==t?(h=t(u?"settings.billing.autoTasksDescriptionSubscribed":"settings.billing.autoTasksDescriptionTrial"),e[28]=u,e[29]=t,e[30]=h):h=e[30];let v;e[31]!==h?(v=s.jsx("p",{className:"text-xs text-muted-foreground",children:h}),e[31]=h,e[32]=v):v=e[32];let j;e[33]!==b||e[34]!==v?(j=s.jsxs("div",{className:"flex items-center gap-3",children:[L,s.jsxs("div",{className:"flex flex-col gap-1",children:[b,v]})]}),e[33]=b,e[34]=v,e[35]=j):j=e[35];let N;e[36]!==F||e[37]!==o||e[38]!==t?(N=F&&s.jsxs(Y,{variant:"outline",size:"sm",disabled:o.isPending,onClick:()=>o.mutate(),children:[o.isPending&&s.jsx(J,{size:14,className:"animate-spin"}),t("settings.billing.manageButton")]}),e[36]=F,e[37]=o,e[38]=t,e[39]=N):N=e[39];let P;e[40]!==r||e[41]!==u||e[42]!==t?(P=!u&&s.jsxs(Y,{size:"sm",disabled:r.isPending,onClick:()=>r.mutate(),children:[r.isPending&&s.jsx(J,{size:14,className:"animate-spin"}),t("settings.billing.subscribeButton")]}),e[40]=r,e[41]=u,e[42]=t,e[43]=P):P=e[43];let _;e[44]!==N||e[45]!==P?(_=s.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[N,P]}),e[44]=N,e[45]=P,e[46]=_):_=e[46];let y;e[47]!==j||e[48]!==_?(y=s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[j,_]}),e[47]=j,e[48]=_,e[49]=y):y=e[49];const U=me?"text-warning":"text-foreground";let S;e[50]!==U?(S=ae("text-2xl font-semibold tabular-nums tracking-tight",U),e[50]=U,e[51]=S):S=e[51];let T;e[52]!==f?(T=s.jsxs("span",{className:"text-sm font-normal text-muted-foreground",children:[" ","/ ",f]}),e[52]=f,e[53]=T):T=e[53];let I;e[54]!==S||e[55]!==T||e[56]!==C?(I=s.jsxs("span",{className:S,children:[C,T]}),e[54]=S,e[55]=T,e[56]=C,e[57]=I):I=e[57];let E;e[58]!==d.currentPeriodEnd||e[59]!==u||e[60]!==t?(E=u&&d.currentPeriodEnd&&s.jsx("span",{className:"text-xs text-muted-foreground",children:t("settings.billing.renewsOn",{date:ke.format(new Date(d.currentPeriodEnd))})}),e[58]=d.currentPeriodEnd,e[59]=u,e[60]=t,e[61]=E):E=e[61];let A;e[62]!==I||e[63]!==E?(A=s.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[I,E]}),e[62]=I,e[63]=E,e[64]=A):A=e[64];let R;e[65]!==t?(R=t("settings.billing.runsUsedLabel"),e[65]=t,e[66]=R):R=e[66];let $;e[67]!==R?($=s.jsx("p",{className:"text-xs text-muted-foreground",children:R}),e[67]=R,e[68]=$):$=e[68];let O;e[69]!==K?(O=s.jsx(Oe,{value:K,className:"h-1.5"}),e[69]=K,e[70]=O):O=e[70];let k;e[71]!==A||e[72]!==$||e[73]!==O?(k=s.jsxs("div",{className:"flex flex-col gap-2.5 pt-4 border-t border-border/60",children:[A,$,O]}),e[71]=A,e[72]=$,e[73]=O,e[74]=k):k=e[74];let z;return e[75]!==y||e[76]!==k?(z=s.jsx(Z,{children:s.jsxs("div",{className:"flex flex-col gap-5 px-5 py-5",children:[y,k]})}),e[75]=y,e[76]=k,e[77]=z):z=e[77],z}function Ce(){const e=D.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Pe,{group:"billing"}),e[0]=t):t=e[0];let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{children:s.jsx(Q.Content,{children:s.jsx(Q.Body,{children:s.jsxs(he,{children:[t,s.jsx(ve,{children:s.jsx(Be,{})})]})})})}),e[1]=a):a=e[1],a}function lt(){const e=D.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(_e,{capability:"members:manage",area:"billing",children:s.jsx(Ce,{})}),e[0]=t):t=e[0],t}export{lt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as he,b as je,r as de,j as t,k as ye,B as ne}from"./index-CacyxM-B.js";import{C as ue}from"./agent-icon-BDevt-8Z.js";import{i as Ne}from"./X-VMfnK-j5.js";import{L as ce}from"./label-CCAJCJOj.js";import{an as xe,ao as ke}from"./index-COAHvcVh.js";import{S as Ce,a as Pe,b as Se,c as ve,d as _e}from"./select-CwAouusu.js";import{T as Te,a as we,c as Be}from"./tooltip-CwIq9zTG.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./dialog-Ww_zj2g-.js";import"./hooks-D72xT78n.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-ai-providers-DF6xoNtC.js";import"./studio-tools-O0czolAT.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./automation-runs-D-R-Y_E3.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./use-connection-BS7_Pbag.js";import"./card-CG7VHdDz.js";import"./sidebar-BDv_n64F.js";import"./use-mobile-c0ak1uw4.js";import"./table-Dc0W0B0Q.js";import"./empty-state-BJ2gnfVT.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-clock-tick-Dht-z9YX.js";import"./use-automations-DQVxqjfN.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./avatar-C448hZt-.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D87eemcY.js";import"./monaco-editor-q7NTyRwe.js";import"./spinner-D7fl_vK2.js";import"./types-D40WAxQO.js";import"./shell-layout-VRjP3s0M.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./integration-icon-CLbqw16t.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./form-BhElkTfE.js";import"./input-B8ln-0Wl.js";import"./file-type-icon-B5W8k3cc.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./popover-5hCe1k-b.js";import"./self-tool-result-DaPbHreD.js";import"./alert-dialog-DRGp9yFR.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-mcp-tools-CMpvouUr.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./checkbox-BsGrD1YR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-e0Pidqxv.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";function wi(i){const e=he.c(121),{posts:X,categories:l,initialSlug:re,isPending:s,onApply:le,onClose:p}=i,o=je(),[m,fe]=de.useState(re&&l.some(a=>a.slug===re)?re:l[0]?.slug??""),[n,ge]=de.useState("add");let Y;if(e[0]!==l||e[1]!==m){let a;e[3]!==m?(a=be=>be.slug===m,e[3]=m,e[4]=a):a=e[4],Y=l.find(a),e[0]=l,e[1]=m,e[2]=Y}else Y=e[2];const c=Y,r=X.length,me=String(r);let d;e[5]!==o||e[6]!==me?(d=o("sandbox.bulkCategoryPanel.selectedCount",{count:me}),e[5]=o,e[6]=me,e[7]=d):d=e[7];let x;e[8]!==d?(x=t.jsx("span",{className:"truncate text-sm font-medium",children:d}),e[8]=d,e[9]=x):x=e[9];let u;e[10]!==o?(u=o("sandbox.bulkCategoryPanel.exitSelection"),e[10]=o,e[11]=u):u=e[11];let Z;e[12]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(Ne,{size:14}),e[12]=Z):Z=e[12];let f;e[13]!==s||e[14]!==p||e[15]!==u?(f=t.jsx(Te,{asChild:!0,children:t.jsx(ne,{type:"button",variant:"ghost",size:"icon",disabled:s,onClick:p,"aria-label":u,children:Z})}),e[13]=s,e[14]=p,e[15]=u,e[16]=f):f=e[16];let g;e[17]!==o?(g=o("sandbox.bulkCategoryPanel.exitSelection"),e[17]=o,e[18]=g):g=e[18];let b;e[19]!==g?(b=t.jsx(we,{side:"bottom",children:g}),e[19]=g,e[20]=b):b=e[20];let h;e[21]!==f||e[22]!==b?(h=t.jsxs(Be,{children:[f,b]}),e[21]=f,e[22]=b,e[23]=h):h=e[23];let j;e[24]!==h||e[25]!==x?(j=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[x,h]}),e[24]=h,e[25]=x,e[26]=j):j=e[26];let y;e[27]!==o?(y=o("sandbox.bulkCategoryPanel.title"),e[27]=o,e[28]=y):y=e[28];let N;e[29]!==y?(N=t.jsx("h2",{className:"text-2xl font-bold text-foreground",children:y}),e[29]=y,e[30]=N):N=e[30];let k;e[31]!==r||e[32]!==o?(k=r===0?o("sandbox.bulkCategoryPanel.descriptionEmpty"):o("sandbox.bulkCategoryPanel.descriptionWithCount",{count:String(r)}),e[31]=r,e[32]=o,e[33]=k):k=e[33];let C;e[34]!==k?(C=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:k}),e[34]=k,e[35]=C):C=e[35];let P;e[36]!==o?(P=o("sandbox.bulkCategoryPanel.categoryLabel"),e[36]=o,e[37]=P):P=e[37];let S;e[38]!==P?(S=t.jsx(ce,{children:P}),e[38]=P,e[39]=S):S=e[39];let v;e[40]!==l||e[41]!==m||e[42]!==o?(v=l.length===0?t.jsx("p",{className:"text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noCategoriesMessage")}):t.jsxs(Ce,{value:m,onValueChange:fe,children:[t.jsx(Pe,{className:"w-full",children:t.jsx(Se,{placeholder:o("sandbox.bulkCategoryPanel.selectCategoryPlaceholder")})}),t.jsx(ve,{children:l.map(ze)})]}),e[40]=l,e[41]=m,e[42]=o,e[43]=v):v=e[43];let _;e[44]!==S||e[45]!==v?(_=t.jsxs("div",{className:"space-y-2",children:[S,v]}),e[44]=S,e[45]=v,e[46]=_):_=e[46];let ee;e[47]===Symbol.for("react.memo_cache_sentinel")?(ee=a=>ge(a),e[47]=ee):ee=e[47];let te;e[48]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx(xe,{value:"add",id:"cat-mode-add",className:"mt-0.5"}),e[48]=te):te=e[48];let T;e[49]!==o?(T=o("sandbox.bulkCategoryPanel.modeAddTitle"),e[49]=o,e[50]=T):T=e[50];let w;e[51]!==T?(w=t.jsx("span",{className:"block text-sm font-medium",children:T}),e[51]=T,e[52]=w):w=e[52];let B;e[53]!==o?(B=o("sandbox.bulkCategoryPanel.modeAddDescription"),e[53]=o,e[54]=B):B=e[54];let R;e[55]!==B?(R=t.jsx("span",{className:"block text-xs text-muted-foreground",children:B}),e[55]=B,e[56]=R):R=e[56];let z;e[57]!==w||e[58]!==R?(z=t.jsxs(ce,{htmlFor:"cat-mode-add",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[te,t.jsxs("span",{className:"space-y-0.5",children:[w,R]})]}),e[57]=w,e[58]=R,e[59]=z):z=e[59];let oe;e[60]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx(xe,{value:"replace",id:"cat-mode-replace",className:"mt-0.5"}),e[60]=oe):oe=e[60];let E;e[61]!==o?(E=o("sandbox.bulkCategoryPanel.modeReplaceTitle"),e[61]=o,e[62]=E):E=e[62];let L;e[63]!==E?(L=t.jsx("span",{className:"block text-sm font-medium",children:E}),e[63]=E,e[64]=L):L=e[64];let A;e[65]!==o?(A=o("sandbox.bulkCategoryPanel.modeReplaceDescription"),e[65]=o,e[66]=A):A=e[66];let F;e[67]!==A?(F=t.jsx("span",{className:"block text-xs text-muted-foreground",children:A}),e[67]=A,e[68]=F):F=e[68];let M;e[69]!==L||e[70]!==F?(M=t.jsxs(ce,{htmlFor:"cat-mode-replace",className:"flex cursor-pointer items-start gap-2.5 rounded-lg border p-3",children:[oe,t.jsxs("span",{className:"space-y-0.5",children:[L,F]})]}),e[69]=L,e[70]=F,e[71]=M):M=e[71];let V;e[72]!==n||e[73]!==z||e[74]!==M?(V=t.jsxs(ke,{value:n,onValueChange:ee,className:"gap-2",children:[z,M]}),e[72]=n,e[73]=z,e[74]=M,e[75]=V):V=e[75];let $;e[76]!==o?($=o("sandbox.bulkCategoryPanel.cancelButton"),e[76]=o,e[77]=$):$=e[77];let D;e[78]!==s||e[79]!==p||e[80]!==$?(D=t.jsx(ne,{type:"button",variant:"outline",onClick:p,disabled:s,children:$}),e[78]=s,e[79]=p,e[80]=$,e[81]=D):D=e[81];const ae=!c||s||r===0;let G;e[82]!==n||e[83]!==le||e[84]!==c?(G=()=>c&&le(n,{name:c.name,slug:c.slug}),e[82]=n,e[83]=le,e[84]=c,e[85]=G):G=e[85];let I;e[86]!==s||e[87]!==o?(I=s?t.jsxs(t.Fragment,{children:[t.jsx(ye,{size:14,className:"animate-spin"}),o("sandbox.bulkCategoryPanel.updatingButton")]}):o("sandbox.bulkCategoryPanel.applyButton"),e[86]=s,e[87]=o,e[88]=I):I=e[88];let W;e[89]!==ae||e[90]!==G||e[91]!==I?(W=t.jsx(ne,{type:"button",disabled:ae,onClick:G,children:I}),e[89]=ae,e[90]=G,e[91]=I,e[92]=W):W=e[92];let q;e[93]!==D||e[94]!==W?(q=t.jsxs("div",{className:"flex justify-end gap-2",children:[D,W]}),e[93]=D,e[94]=W,e[95]=q):q=e[95];let H;e[96]!==_||e[97]!==V||e[98]!==q?(H=t.jsxs("div",{className:"mt-6 space-y-4",children:[_,V,q]}),e[96]=_,e[97]=V,e[98]=q,e[99]=H):H=e[99];let ie;e[100]===Symbol.for("react.memo_cache_sentinel")?(ie=t.jsx(ue,{size:16,className:"shrink-0 text-muted-foreground"}),e[100]=ie):ie=e[100];const pe=String(r);let J;e[101]!==o||e[102]!==pe?(J=o("sandbox.bulkCategoryPanel.selectedPostsLabel",{count:pe}),e[101]=o,e[102]=pe,e[103]=J):J=e[103];let K;e[104]!==J?(K=t.jsxs("div",{className:"flex items-center gap-2 px-4 py-3",children:[ie,t.jsx("span",{className:"text-sm",children:J})]}),e[104]=J,e[105]=K):K=e[105];let O;e[106]!==r||e[107]!==X||e[108]!==o?(O=r===0?t.jsx("p",{className:"border-t bg-background px-4 py-3 text-sm text-muted-foreground",children:o("sandbox.bulkCategoryPanel.noPostsSelectedMessage")}):t.jsx("ul",{className:"divide-y border-t bg-background",children:X.map(Re)}),e[106]=r,e[107]=X,e[108]=o,e[109]=O):O=e[109];let Q;e[110]!==K||e[111]!==O?(Q=t.jsxs("div",{className:"mt-8 overflow-hidden rounded-lg border bg-muted/30",children:[K,O]}),e[110]=K,e[111]=O,e[112]=Q):Q=e[112];let U;e[113]!==N||e[114]!==C||e[115]!==H||e[116]!==Q?(U=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-2xl px-8 py-8",children:[N,C,H,Q]})}),e[113]=N,e[114]=C,e[115]=H,e[116]=Q,e[117]=U):U=e[117];let se;return e[118]!==j||e[119]!==U?(se=t.jsxs("div",{className:"flex h-full flex-col",children:[j,U]}),e[118]=j,e[119]=U,e[120]=se):se=e[120],se}function Re(i){return t.jsxs("li",{className:"flex items-center gap-2.5 px-4 py-2.5",children:[t.jsx(ue,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:i.title}),i.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:i.slug})]})]},i.key)}function ze(i){return t.jsx(_e,{value:i.slug,children:t.jsx("span",{className:"truncate",children:i.name})},i.slug)}export{wi as BulkCategoryPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as G,r as k,m as Q,j as t,b as X,B as I,k as Z,t as W}from"./index-CacyxM-B.js";import{i as _}from"./XCircle-D-ab7D3l.js";import{b6 as K,C as U}from"./agent-icon-BDevt-8Z.js";import{n as tt}from"./LinkExternal01-kQgSYVkJ.js";import{A as ot,a as et,b as rt,c as it,d as st,e as at,f as nt,g as mt}from"./alert-dialog-DRGp9yFR.js";import{I as H}from"./input-B8ln-0Wl.js";import{L as J}from"./label-CCAJCJOj.js";import{F as lt,R as pt,T as ct,al as dt,J as ut,V as A,Y as gt,am as xt,W as ft}from"./index-COAHvcVh.js";import{c as ht,B as yt,a as bt}from"./block-document-D__keZl9.js";import{u as jt}from"./use-autosave-BvdFNf3e.js";import{t as vt}from"./ChevronDown-DiERg-yU.js";import{af as Et,ag as Ct,ae as Nt}from"./automation-runs-D-R-Y_E3.js";import{s as j,E as St}from"./primitives-BcUA5QnY.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";import"./chat-context-D20WJCxs.js";import"./tab-id-ZL6F14qy.js";import"./dialog-Ww_zj2g-.js";import"./hooks-D72xT78n.js";import"./use-mcp-client-DRcy9vk6.js";import"./auth-Dk3-oFE7.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./use-ai-providers-DF6xoNtC.js";import"./studio-tools-O0czolAT.js";import"./use-decopilot-events-BIUvCjFX.js";import"./use-organization-settings-DJYuvv-k.js";import"./spinner-D7fl_vK2.js";import"./tooltip-CwIq9zTG.js";import"./drawer-lF-HaYn9.js";import"./collection-search-DGOZ00E9.js";import"./use-mobile-c0ak1uw4.js";import"./chart-DoynaU7M.js";import"./index-CVShUKw1.js";import"./shell-layout-VRjP3s0M.js";import"./avatar-C448hZt-.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";import"./deco-site-production-url-BjY4ZYd-.js";import"./form-BhElkTfE.js";import"./select-CwAouusu.js";import"./tabs-BerlyCPW.js";import"./toggle-group-BFyHFJ9G.js";import"./use-commerce-diagnostic-B_wc4KWh.js";import"./sidebar-BDv_n64F.js";import"./popover-5hCe1k-b.js";import"./self-tool-result-DaPbHreD.js";import"./integration-icon-CLbqw16t.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./track-Bufvtvpy.js";import"./toolbar-ClzusW5n.js";import"./skeleton-DOg01VWn.js";import"./github-repo-picker-CcDCsGzG.js";import"./use-connection-BS7_Pbag.js";import"./use-mcp-tools-CMpvouUr.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./reusable-new-chat-CouMjkYR.js";import"./agent-capabilities-C4tLW0Za.js";import"./connection-card-BER9PD2I.js";import"./use-registry-connections-GX-tovow.js";import"./useInfiniteQuery-BxSgA-RD.js";import"./use-infinite-scroll-ChfJMk5S.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./card-CG7VHdDz.js";import"./textarea-CD_pYqo3.js";import"./connection-form-helpers-ZW-hGCeS.js";import"./collection-tabs-DaZaBm6K.js";import"./badge-Bc-IWDm5.js";import"./useSuspenseInfiniteQuery-CNPxNyM-.js";import"./command-D63NDRD_.js";import"./index-CSqLyX3L.js";import"./use-clock-tick-Dht-z9YX.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-open-billing-url-nNkK2kBm.js";import"./select-model-eoIBQakm.js";import"./checkbox-BsGrD1YR.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Cz2znp8W.js";import"./cards-DY46VRdr.js";import"./dropdown-menu-ByKxU4Y4.js";import"./file-type-icon-B5W8k3cc.js";import"./question-004-sINsf4GQ.js";import"./use-members-CYQAJOqU.js";import"./use-org-auth-client-Bjx13kGF.js";import"./use-status-sounds-e0Pidqxv.js";import"./empty-state-BJ2gnfVT.js";import"./types-D40WAxQO.js";import"./use-capability-D8TgIows.js";import"./use-file-configs-EhMCIyTI.js";import"./monaco-editor-q7NTyRwe.js";import"./pt-BR-CLy76QW2.js";import"./switch-B0vh0spM.js";import"./use-debounced-autosave-fueOpbqS.js";import"./index-GDSYOTBM.js";import"./search-input-ByYoJKBQ.js";import"./index-DGV2vBko.js";import"./use-secrets-6DO3yZ-p.js";import"./AreaChart-BEoF41lY.js";import"./use-copy-D87eemcY.js";import"./use-tags-tOpGCqE_.js";import"./get-initials-D-f_fDFw.js";import"./use-automations-DQVxqjfN.js";import"./automation-list-row-BIOSCgKN.js";import"./use-org-repo-syncs-CEYhU3FE.js";import"./table-Dc0W0B0Q.js";function wt(y){const o=G.c(18),{icon:u,title:n,defaultOpen:v,children:g}=y,P=v===void 0?!1:v,[x,D]=k.useState(P);let m;o[0]!==u?(m=t.jsx(u,{size:15}),o[0]=u,o[1]=m):m=o[1];let r;o[2]!==n?(r=t.jsx("span",{className:"flex-1 text-left",children:n}),o[2]=n,o[3]=r):r=o[3];const a=x&&"rotate-180";let l;o[4]!==a?(l=Q("transition-transform",a),o[4]=a,o[5]=l):l=o[5];let p;o[6]!==l?(p=t.jsx(vt,{size:15,className:l}),o[6]=l,o[7]=p):p=o[7];let i;o[8]!==m||o[9]!==r||o[10]!==p?(i=t.jsx(Et,{asChild:!0,children:t.jsxs("button",{type:"button",className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[m,r,p]})}),o[8]=m,o[9]=r,o[10]=p,o[11]=i):i=o[11];let c;o[12]!==g?(c=t.jsx(Ct,{className:"px-2 pt-4",children:g}),o[12]=g,o[13]=c):c=o[13];let f;return o[14]!==x||o[15]!==i||o[16]!==c?(f=t.jsxs(Nt,{open:x,onOpenChange:D,className:"mt-4",children:[i,c]}),o[14]=x,o[15]=i,o[16]=c,o[17]=f):f=o[17],f}function wr({orgSlug:y,virtualMcpId:o,branch:u,blockKey:n,block:v,decofile:g,meta:P,onManagePosts:x,onOpenPost:D,previewBaseUrl:m}){const r=X(),a=lt({orgSlug:y,virtualMcpId:o,branch:u}),l=pt({orgSlug:y,virtualMcpId:o,branch:u}),p=ct(v,"categories"),[i,c,f]=jt(p,e=>{a.mutate({blockKey:n,data:A(n,"categories",e)})}),E=(e,w)=>c({...i,[e]:w}),T=ht({decofile:g,category:i,previewBaseUrl:m,draftPointer:l}),s=j(i.slug),[B,b]=k.useState(s),[d,C]=k.useState(null),[N,z]=k.useState(!1),F=s?dt(g).filter(e=>e.categorySlugs.includes(s)):[],S=F.length,M=e=>E("slug",e),V=async(e,w)=>{const q=j(i.name);z(!0);try{let h=0;for(const{key:O,payload:L}of gt(g,"posts")){const $=xt(L,e,{name:q,slug:w});$!==L&&(await a.mutateAsync({blockKey:O,data:A(O,"posts",ft($))}),h+=1)}const R={...i,slug:w};await a.mutateAsync({blockKey:n,data:A(n,"categories",R)}),f(R),W.success(h>0?r("sandbox.categoryEditor.renameSuccessWithPosts",{count:String(h)}):r("sandbox.categoryEditor.renameSuccessNoPosts")),C(null)}catch(h){b(e),C(null),W.error(h instanceof Error?h.message:r("sandbox.categoryEditor.renameFailed"))}finally{z(!1)}},Y=()=>{const e=B.trim();if(e===s){B!==e&&b(e);return}if(!e){b(s);return}if(S===0){M(e);return}C({oldSlug:s,newSlug:e,count:S})};return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex h-full flex-col",children:[t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[t.jsx("span",{className:"truncate text-sm font-medium",children:j(i.name)||r("sandbox.categoryEditor.untitledCategory")}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[t.jsx(ut,{isPending:a.isPending,isError:a.isError}),T&&t.jsxs(I,{type:"button",variant:"outline",size:"sm",title:r("sandbox.categoryEditor.previewTooltip"),onClick:()=>window.open(T,"_blank","noopener,noreferrer"),children:[t.jsx(tt,{size:14}),r("sandbox.categoryEditor.seeCategoryPreview")]})]})]}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[t.jsx(St,{value:j(i.name),onChange:e=>E("name",e),placeholder:r("sandbox.categoryEditor.categoryNamePlaceholder"),className:"py-1 text-3xl font-bold text-foreground"}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-slug",children:r("sandbox.categoryEditor.slugLabel")}),t.jsx(H,{id:"category-slug",value:B,onChange:e=>b(e.target.value),onBlur:Y,placeholder:r("sandbox.categoryEditor.slugPlaceholder"),className:"h-10"})]}),t.jsxs("div",{className:"mt-4 space-y-2",children:[t.jsx(J,{htmlFor:"category-description",children:r("sandbox.categoryEditor.descriptionLabel")}),t.jsx(H,{id:"category-description",value:j(i.description),onChange:e=>E("description",e.target.value),placeholder:r("sandbox.categoryEditor.descriptionPlaceholder"),className:"h-10"})]}),t.jsx(wt,{icon:K,title:r("sandbox.categoryEditor.contentTitle"),defaultOpen:!0,children:t.jsx(yt,{value:bt(i.sections),onChange:e=>E("sections",e),meta:P,sandboxRef:{orgSlug:y,virtualMcpId:o,branch:u},emptyMessage:r("sandbox.categoryEditor.noContentEmpty")})}),t.jsxs("div",{className:"mt-6 overflow-hidden rounded-lg border bg-muted/30",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3",children:[t.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[t.jsx(U,{size:16,className:"shrink-0 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:r("sandbox.categoryEditor.postsInCategory",{count:String(S)})})]}),t.jsxs(I,{type:"button",variant:"outline",size:"sm",disabled:!s,title:r(s?"sandbox.categoryEditor.pickPostsTooltip":"sandbox.categoryEditor.setSlugTooltip"),onClick:()=>x(s),children:[r("sandbox.categoryEditor.addPostsButton"),t.jsx(_,{size:14})]})]}),S>0&&t.jsx("ul",{className:"divide-y border-t bg-background",children:F.map(e=>t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(e.key),className:"flex w-full items-center gap-2.5 px-4 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[t.jsx(U,{size:14,className:"shrink-0 text-muted-foreground"}),t.jsxs("span",{className:"min-w-0 flex-1",children:[t.jsx("span",{className:"block truncate text-sm",children:e.title||r("sandbox.categoryEditor.untitledPost")}),e.slug&&t.jsx("span",{className:"block truncate text-xs text-muted-foreground",children:e.slug})]})]})},e.key))})]})]})})]}),t.jsx(ot,{open:!!d,onOpenChange:e=>{e||N||(b(s),C(null))},children:t.jsxs(et,{children:[t.jsxs(rt,{children:[t.jsx(it,{children:r("sandbox.categoryEditor.renameDialogTitle")}),t.jsx(st,{children:d?r("sandbox.categoryEditor.renameDialogDescription",{oldSlug:d.oldSlug,newSlug:d.newSlug,count:String(d.count)}):null})]}),t.jsxs(at,{children:[t.jsx(nt,{disabled:N,children:r("sandbox.categoryEditor.cancelButton")}),t.jsx(mt,{onClick:e=>{e.preventDefault(),d&&V(d.oldSlug,d.newSlug)},disabled:N,children:N?t.jsxs(t.Fragment,{children:[t.jsx(Z,{size:14,className:"animate-spin"}),r("sandbox.categoryEditor.renamingLabel")]}):r("sandbox.categoryEditor.renameActionButton")})]})]})})]})}export{wr as CategoryEditor};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as y,j as s,u as K,b as S,d as N,B as v,r as I,N as k,n as w,K as R,k as C}from"./index-CacyxM-B.js";import{A as T}from"./agent-icon-BDevt-8Z.js";import{R as F}from"./required-auth-layout-C0mQQwr6.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./Tool02-DtJ6WkGT.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";async function _(t){const e=new URLSearchParams({site:t}),l=await fetch(`/api/_editor-resolve?${e.toString()}`,{headers:{Accept:"application/json"}});if(!l.ok){const r=new Error(`editor-resolve HTTP ${l.status}`);throw r.status=l.status,r}return await l.json()}function $(t){const e=t?.status;return typeof e=="number"&&e>=400&&e<500}function A(t){return{...t.pageId?{contentPageId:t.pageId}:{},...t.path?{contentPath:t.path}:{},...t.pathTemplate?{contentPathTemplate:t.pathTemplate}:{}}}function b(t){const e=y.c(2),{children:l}=t;let r;return e[0]!==l?(r=s.jsx("div",{className:"flex min-h-screen w-full items-center justify-center bg-background p-6",children:s.jsx("div",{className:"flex w-full max-w-md flex-col items-center gap-6 text-center",children:l})}),e[0]=l,e[1]=r):r=e[1],r}function P(){const t=y.c(5),e=S();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(C,{size:24,className:"animate-spin text-muted-foreground"}),t[0]=l):l=t[0];let r;t[1]!==e?(r=e("chooseEditor.resolving"),t[1]=e,t[2]=r):r=t[2];let i;return t[3]!==r?(i=s.jsxs(b,{children:[l,s.jsx("p",{className:"text-sm text-muted-foreground",children:r})]}),t[3]=r,t[4]=i):i=t[4],i}function E(t){const e=y.c(29),{titleKey:l,descriptionKey:r,onRetry:i}=t,n=S(),p=N();let c;e[0]!==n||e[1]!==l?(c=n(l),e[0]=n,e[1]=l,e[2]=c):c=e[2];let m;e[3]!==c?(m=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:c}),e[3]=c,e[4]=m):m=e[4];let f;e[5]!==r||e[6]!==n?(f=n(r),e[5]=r,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==f?(d=s.jsx("p",{className:"text-sm text-muted-foreground",children:f}),e[8]=f,e[9]=d):d=e[9];let a;e[10]!==m||e[11]!==d?(a=s.jsxs("div",{className:"flex flex-col gap-2",children:[m,d]}),e[10]=m,e[11]=d,e[12]=a):a=e[12];let u;e[13]!==i||e[14]!==n?(u=i?s.jsx(v,{variant:"outline",onClick:i,children:n("chooseEditor.retry")}):null,e[13]=i,e[14]=n,e[15]=u):u=e[15];let o;e[16]!==p?(o=()=>p({to:"/"}),e[16]=p,e[17]=o):o=e[17];let g;e[18]!==n?(g=n("chooseEditor.backToStudio"),e[18]=n,e[19]=g):g=e[19];let j;e[20]!==o||e[21]!==g?(j=s.jsx(v,{onClick:o,children:g}),e[20]=o,e[21]=g,e[22]=j):j=e[22];let x;e[23]!==u||e[24]!==j?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[u,j]}),e[23]=u,e[24]=j,e[25]=x):x=e[25];let h;return e[26]!==x||e[27]!==a?(h=s.jsxs(b,{children:[a,x]}),e[26]=x,e[27]=a,e[28]=h):h=e[28],h}function U(t){const e=y.c(9),{orgSlug:l,projectId:r,pageSearch:i}=t,[n]=I.useState(q);let p;e[0]!==l||e[1]!==n?(p={org:l,taskId:n},e[0]=l,e[1]=n,e[2]=p):p=e[2];let c;e[3]!==i||e[4]!==r?(c={virtualmcpid:r,main:"content",...i},e[3]=i,e[4]=r,e[5]=c):c=e[5];let m;return e[6]!==p||e[7]!==c?(m=s.jsx(k,{to:"/$org/$taskId",params:p,search:c,replace:!0}),e[6]=p,e[7]=c,e[8]=m):m=e[8],m}function q(){return crypto.randomUUID()}function D(t){const e=y.c(26),{matches:l,pageSearch:r}=t,i=S(),n=N();let p;e[0]!==n||e[1]!==r?(p=x=>{n({to:"/$org/$taskId",params:{org:x.orgSlug,taskId:crypto.randomUUID()},search:{virtualmcpid:x.project.id,main:"content",...r}})},e[0]=n,e[1]=r,e[2]=p):p=e[2];const c=p;let m;e[3]!==i?(m=i("chooseEditor.chooser.title"),e[3]=i,e[4]=m):m=e[4];let f;e[5]!==m?(f=s.jsx("h1",{className:"text-lg font-medium text-foreground",children:m}),e[5]=m,e[6]=f):f=e[6];let d;e[7]!==i?(d=i("chooseEditor.chooser.subtitle"),e[7]=i,e[8]=d):d=e[8];let a;e[9]!==d?(a=s.jsx("p",{className:"text-sm text-muted-foreground",children:d}),e[9]=d,e[10]=a):a=e[10];let u;e[11]!==f||e[12]!==a?(u=s.jsxs("div",{className:"flex flex-col gap-2",children:[f,a]}),e[11]=f,e[12]=a,e[13]=u):u=e[13];let o;if(e[14]!==l||e[15]!==c||e[16]!==i){let x;e[18]!==c||e[19]!==i?(x=h=>s.jsxs("button",{type:"button",onClick:()=>c(h),"aria-label":i("chooseEditor.chooser.openAriaLabel",{title:h.project.title,org:h.orgName}),className:"flex w-full items-center gap-3 rounded-lg border border-border bg-card p-3 text-left transition-colors hover:bg-accent",children:[s.jsx(T,{icon:h.project.icon,name:h.project.title,size:"sm"}),s.jsxs("div",{className:"flex min-w-0 flex-col",children:[s.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:h.project.title}),s.jsx("span",{className:"truncate text-xs text-muted-foreground",children:h.orgName})]})]},`${h.orgSlug}/${h.project.id}`),e[18]=c,e[19]=i,e[20]=x):x=e[20],o=l.map(x),e[14]=l,e[15]=c,e[16]=i,e[17]=o}else o=e[17];let g;e[21]!==o?(g=s.jsx("div",{className:"flex w-full flex-col gap-2",children:o}),e[21]=o,e[22]=g):g=e[22];let j;return e[23]!==u||e[24]!==g?(j=s.jsxs(b,{children:[u,g]}),e[23]=u,e[24]=g,e[25]=j):j=e[25],j}function L(){const t=y.c(24);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/choose-editor"},t[0]=e):e=t[0];const l=K(e);let r,i,n,p;t[1]!==l?(i=l.site?.trim()??"",r=A(l),p=w,n=R.editorResolve(i),t[1]=l,t[2]=r,t[3]=i,t[4]=n,t[5]=p):(r=t[2],i=t[3],n=t[4],p=t[5]);let c;t[6]!==i?(c=()=>_(i),t[6]=i,t[7]=c):c=t[7];const m=i.length>0;let f;t[8]!==n||t[9]!==c||t[10]!==m?(f={queryKey:n,queryFn:c,enabled:m,staleTime:1/0,retry:z},t[8]=n,t[9]=c,t[10]=m,t[11]=f):f=t[11];const d=p(f);if(!i){let o;return t[12]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[12]=o):o=t[12],o}if(d.isError){let o;return t[13]!==d?(o=$(d.error)?s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}):s.jsx(E,{titleKey:"chooseEditor.error.title",descriptionKey:"chooseEditor.error.description",onRetry:()=>d.refetch()}),t[13]=d,t[14]=o):o=t[14],o}if(!d.data){let o;return t[15]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(P,{}),t[15]=o):o=t[15],o}const{matches:a}=d.data;if(a.length===0){let o;return t[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(E,{titleKey:"chooseEditor.notFound.title",descriptionKey:"chooseEditor.notFound.description"}),t[16]=o):o=t[16],o}if(a.length===1&&a[0]){let o;return t[17]!==a[0].orgSlug||t[18]!==a[0].project.id||t[19]!==r?(o=s.jsx(U,{orgSlug:a[0].orgSlug,projectId:a[0].project.id,pageSearch:r}),t[17]=a[0].orgSlug,t[18]=a[0].project.id,t[19]=r,t[20]=o):o=t[20],o}let u;return t[21]!==a||t[22]!==r?(u=s.jsx(D,{matches:a,pageSearch:r}),t[21]=a,t[22]=r,t[23]=u):u=t[23],u}function z(t,e){return!$(e)&&t<2}function ze(){const t=y.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(F,{children:s.jsx(L,{})}),t[0]=e):e=t[0],e}export{ze as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as k,j as t,B as K,k as oe,X as Ye,Z as re,b as W,E as Ee,r as E,F as fe,bc as Ze,bd as Re,$ as Ge,m as Q,be as et,u as tt,L as te,t as st,f as he,bf as Oe}from"./index-CacyxM-B.js";import{E as Fe}from"./empty-state-BJ2gnfVT.js";import{u as ge}from"./use-mcp-client-DRcy9vk6.js";import{d as ae,F as lt,a as ce,b as de}from"./form-BhElkTfE.js";import{I as pe}from"./input-B8ln-0Wl.js";import{T as xe}from"./textarea-CD_pYqo3.js";import{a as ot,b as nt,V as je,O as it,M as rt}from"./index-E8TCV-RN.js";import{aP as at,U as ct,aQ as dt,al as mt,an as ut,aR as pt,u as ye}from"./agent-icon-BDevt-8Z.js";import{g as xt,M as ft,a as we}from"./types-D40WAxQO.js";import{A as ht,a as gt,b as jt}from"./alert-C6E9q71w.js";import{S as Ce,a as Ie,b as $e,c as Te,d as me}from"./select-CwAouusu.js";import{b as bt,c as Pe,T as ke,a as Ae}from"./tooltip-CwIq9zTG.js";import{i as Nt}from"./AlertCircle-DOZzh9F_.js";import{s as vt}from"./Stars02-CLHJV6ce.js";import{a as St}from"./Copy01-CzEeXGsa.js";import{i as yt}from"./Play-AS6vVmkD.js";import{i as wt}from"./ChevronRight-H-_IIqWd.js";import{g as Ct}from"./connection-slug-eyAPH6o3.js";import{u as It,T as $t}from"./index-DGV2vBko.js";import{a as ze,u as Me}from"./use-connection-BS7_Pbag.js";import{a as Tt}from"./use-mcp-tools-CMpvouUr.js";import{M as Pt,c as kt}from"./monaco-editor-q7NTyRwe.js";import{I as De}from"./integration-icon-CLbqw16t.js";import{k as At,D as Dt}from"./chat-context-D20WJCxs.js";import{u as Et}from"./shell-layout-VRjP3s0M.js";import{n as Rt}from"./Tool02-DtJ6WkGT.js";import"./auth-Dk3-oFE7.js";import"./label-CCAJCJOj.js";import"./index-GDSYOTBM.js";import"./sidebar-BDv_n64F.js";import"./LayoutLeft-BF7bmTAo.js";import"./use-mobile-c0ak1uw4.js";import"./X-VMfnK-j5.js";import"./Key01-WuBVakl2.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./use-registry-connections-GX-tovow.js";import"./use-organization-settings-DJYuvv-k.js";import"./studio-tools-O0czolAT.js";import"./Plus-m61KPSTg.js";import"./index-CVShUKw1.js";import"./index-CSqLyX3L.js";import"./popover-5hCe1k-b.js";import"./use-virtual-mcp-zFcH9fRu.js";import"./Check-CSFy6eOj.js";import"./SearchMd-CF01LhHu.js";import"./Users03-DM_1WdDy.js";import"./use-create-virtual-mcp-BqCII4uA.js";import"./use-navigate-to-agent-IPGb4TnC.js";import"./hooks-D72xT78n.js";import"./decopilot-sse-pool-CeSWLSEV.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./reusable-new-chat-CouMjkYR.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./XCircle-D-ab7D3l.js";import"./ArrowUpRight-CibKwsqg.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./CheckCircle-BCbqPCn-.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./SearchLg-CDtXrrcW.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./Zap-BrJ2b2V7.js";import"./badge-Bc-IWDm5.js";import"./mcp-oauth-YJCTRoaW.js";import"./spinner-D7fl_vK2.js";import"./tab-id-ZL6F14qy.js";import"./dialog-Ww_zj2g-.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DF6xoNtC.js";import"./use-decopilot-events-BIUvCjFX.js";import"./avatar-C448hZt-.js";import"./required-auth-layout-C0mQQwr6.js";import"./use-org-sso-BUVIJh4V.js";function Ot(s){const e=k.c(15),{onSave:n,onUndo:l,isDirty:o,isSaving:i,saveLabel:r,undoLabel:c}=s,d=r===void 0?"Save":r,a=c===void 0?"Undo":c;if(!o)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(at,{size:14}),e[0]=x):x=e[0];let h;e[1]!==i||e[2]!==l||e[3]!==a?(h=t.jsxs(K,{variant:"outline",size:"sm",onClick:l,disabled:i,"aria-label":a,children:[x,a]}),e[1]=i,e[2]=l,e[3]=a,e[4]=h):h=e[4];let m;e[5]!==i?(m=i?t.jsx(oe,{size:14,className:"animate-spin"}):t.jsx(ct,{size:14}),e[5]=i,e[6]=m):m=e[6];let f;e[7]!==i||e[8]!==n||e[9]!==d||e[10]!==m?(f=t.jsxs(K,{variant:"default",size:"sm",onClick:n,disabled:i,"aria-label":d,children:[m,d]}),e[7]=i,e[8]=n,e[9]=d,e[10]=m,e[11]=f):f=e[11];let p;return e[12]!==h||e[13]!==f?(p=t.jsxs(t.Fragment,{children:[h,f]}),e[12]=h,e[13]=f,e[14]=p):p=e[14],p}Ye({title:re().min(1),description:re().nullable(),body:re()});function ue(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Ft(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(l=>l==="mcps"),n=e>=0?s[e+1]:void 0;return n?decodeURIComponent(n):void 0}function zt(s){const e=k.c(43),{form:n}=s,l=W();let o;e[0]!==l?(o=l("details.prompt.details"),e[0]=l,e[1]=o):o=e[1];let i;e[2]!==o?(i=t.jsx("div",{className:"text-sm font-medium text-foreground",children:o}),e[2]=o,e[3]=i):i=e[3];let r;e[4]!==l?(r=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.title")}),t.jsx(de,{children:t.jsx(pe,{...N,placeholder:l("details.prompt.titlePlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[4]=l,e[5]=r):r=e[5];let c;e[6]!==n.control||e[7]!==r?(c=t.jsx(ae,{control:n.control,name:"title",render:r}),e[6]=n.control,e[7]=r,e[8]=c):c=e[8];let d;e[9]!==l?(d=w=>{const{field:N}=w;return t.jsxs(ce,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:l("details.prompt.description")}),t.jsx(de,{children:t.jsx(pe,{...N,value:N.value??"",placeholder:l("details.prompt.descriptionPlaceholder"),className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})},e[9]=l,e[10]=d):d=e[10];let a;e[11]!==n.control||e[12]!==d?(a=t.jsx(ae,{control:n.control,name:"description",render:d}),e[11]=n.control,e[12]=d,e[13]=a):a=e[13];let x;e[14]!==c||e[15]!==a?(x=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[c,a]}),e[14]=c,e[15]=a,e[16]=x):x=e[16];let h;e[17]!==i||e[18]!==x?(h=t.jsxs("div",{className:"flex flex-col gap-4",children:[i,x]}),e[17]=i,e[18]=x,e[19]=h):h=e[19];let m;e[20]!==l?(m=l("details.prompt.message"),e[20]=l,e[21]=m):m=e[21];let f;e[22]!==m?(f=t.jsx("div",{className:"text-sm font-medium text-foreground",children:m}),e[22]=m,e[23]=f):f=e[23];let p;e[24]!==l?(p=l("details.prompt.messageDescription"),e[24]=l,e[25]=p):p=e[25];let g;e[26]!==p?(g=t.jsx("div",{className:"text-xs text-muted-foreground",children:p}),e[26]=p,e[27]=g):g=e[27];let b;e[28]!==l?(b=w=>{const{field:N}=w;return t.jsx(ce,{children:t.jsx(de,{children:t.jsx(xe,{...N,value:N.value??"",placeholder:l("details.prompt.bodyPlaceholder"),className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})},e[28]=l,e[29]=b):b=e[29];let S;e[30]!==n.control||e[31]!==b?(S=t.jsx(ae,{control:n.control,name:"body",render:b}),e[30]=n.control,e[31]=b,e[32]=S):S=e[32];let T;e[33]!==f||e[34]!==g||e[35]!==S?(T=t.jsxs("div",{className:"flex flex-col gap-2",children:[f,g,S]}),e[33]=f,e[34]=g,e[35]=S,e[36]=T):T=e[36];let y;e[37]!==T||e[38]!==h?(y=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[h,T]}),e[37]=T,e[38]=h,e[39]=y):y=e[39];let P;return e[40]!==n||e[41]!==y?(P=t.jsx(lt,{...n,children:y}),e[40]=n,e[41]=y,e[42]=P):P=e[42],P}function Mt(s){const e=k.c(42),{providerId:n,promptId:l}=s,o=W(),{org:i}=fe(),r=n||null;let c;e[0]!==i.id||e[1]!==i.slug||e[2]!==r?(c={connectionId:r,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=r,e[3]=c):c=e[3];const d=ge(c),a=Ze(n,"PROMPT",l,d),x=Re(n,"PROMPT",d),h=x.update.isPending;let m;e[4]!==a?(m=a?{title:a.title,description:a.description??null,body:ue(a)}:void 0,e[4]=a,e[5]=m):m=e[5];let f;e[6]!==m?(f={values:m},e[6]=m,e[7]=f):f=e[7];const p=Ge(f);let g;e[8]!==p||e[9]!==a?(g=()=>{a&&p.reset({title:a.title,description:a.description??null,body:ue(a)})},e[8]=p,e[9]=a,e[10]=g):g=e[10];const b=g;let S;e[11]!==x.update||e[12]!==p||e[13]!==l?(S=p.handleSubmit(async C=>{const I=await x.update.mutateAsync({id:l,data:{title:C.title,description:C.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:C.body}}]}});p.reset({title:I.title,description:I.description??null,body:ue(I)})}),e[11]=x.update,e[12]=p,e[13]=l,e[14]=S):S=e[14];const T=S;if(!a){let C;e[15]!==o?(C=o("details.prompt.notFoundTitle"),e[15]=o,e[16]=C):C=e[16];let I;e[17]!==o?(I=o("details.prompt.notFoundDescription"),e[17]=o,e[18]=I):I=e[18];let O;return e[19]!==C||e[20]!==I?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:C,description:I})}),e[19]=C,e[20]=I,e[21]=O):O=e[21],O}let y;e[22]!==a.title?(y=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:a.title}),e[22]=a.title,e[23]=y):y=e[23];let P;e[24]!==a.description?(P=a.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:a.description})]}):null,e[24]=a.description,e[25]=P):P=e[25];let w;e[26]!==y||e[27]!==P?(w=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,P]})}),e[26]=y,e[27]=P,e[28]=w):w=e[28];let N;e[29]!==T?(N=()=>{T()},e[29]=T,e[30]=N):N=e[30];let A;e[31]!==p.formState.isDirty||e[32]!==h||e[33]!==b||e[34]!==N?(A=t.jsx(ot,{children:t.jsx(Ot,{onSave:N,onUndo:b,isDirty:p.formState.isDirty,isSaving:h})}),e[31]=p.formState.isDirty,e[32]=h,e[33]=b,e[34]=N,e[35]=A):A=e[35];let D;e[36]!==p?(D=t.jsx("div",{className:"h-full",children:t.jsx(zt,{form:p})}),e[36]=p,e[37]=D):D=e[37];let R;return e[38]!==A||e[39]!==D||e[40]!==w?(R=t.jsxs(je,{children:[w,A,D]}),e[38]=A,e[39]=D,e[40]=w,e[41]=R):R=e[41],R}function Lt(s){const e=k.c(10),{itemId:n}=s,l=W();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Ft(),e[0]=o):o=e[0];const i=o;if(!i){let c;e[1]!==l?(c=l("details.prompt.notFoundTitle"),e[1]=l,e[2]=c):c=e[2];let d;e[3]!==l?(d=l("details.prompt.missingConnectionDescription"),e[3]=l,e[4]=d):d=e[4];let a;return e[5]!==c||e[6]!==d?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Fe,{title:c,description:d})}),e[5]=c,e[6]=d,e[7]=a):a=e[7],a}let r;return e[8]!==n?(r=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:null,children:t.jsx(Mt,{providerId:i,promptId:n})})}),e[8]=n,e[9]=r):r=e[9],r}function Le(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("min-w-0 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Be(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("ol",{"data-slot":"breadcrumb-list",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function Y(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("inline-flex items-center gap-1.5 min-w-0",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("li",{"data-slot":"breadcrumb-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function se(s){const e=k.c(10);let n,l,o;e[0]!==s?({asChild:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);const i=n?et:"a";let r;e[4]!==l?(r=Q("hover:text-foreground transition-colors truncate",l),e[4]=l,e[5]=r):r=e[5];let c;return e[6]!==i||e[7]!==o||e[8]!==r?(c=t.jsx(i,{"data-slot":"breadcrumb-link",className:r,...o}),e[6]=i,e[7]=o,e[8]=r,e[9]=c):c=e[9],c}function Ue(s){const e=k.c(8);let n,l;e[0]!==s?({className:n,...l}=s,e[0]=s,e[1]=n,e[2]=l):(n=e[1],l=e[2]);let o;e[3]!==n?(o=Q("text-foreground font-medium truncate",n),e[3]=n,e[4]=o):o=e[4];let i;return e[5]!==l||e[6]!==o?(i=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:o,...l}),e[5]=l,e[6]=o,e[7]=i):i=e[7],i}function le(s){const e=k.c(12);let n,l,o;e[0]!==s?({children:n,className:l,...o}=s,e[0]=s,e[1]=n,e[2]=l,e[3]=o):(n=e[1],l=e[2],o=e[3]);let i;e[4]!==l?(i=Q("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",l),e[4]=l,e[5]=i):i=e[5];let r;e[6]!==n?(r=n??t.jsx(wt,{}),e[6]=n,e[7]=r):r=e[7];let c;return e[8]!==o||e[9]!==i||e[10]!==r?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:i,...o,children:r}),e[8]=o,e[9]=i,e[10]=r,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ut(s){const e=k.c(12),{toolName:n,connectionId:l,siblings:o,onSelectInstance:i,onBack:r}=s,c=W();let d;e[0]!==l?(d={connectionId:l},e[0]=l,e[1]=d):d=e[1];const a=It(d);if(!a.isAuthenticated){let m;return e[2]!==a.supportsOAuth||e[3]!==r||e[4]!==c?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:a.supportsOAuth?t.jsx(it,{onAuthenticate:()=>r(),buttonText:c("details.tool.goBackToAuthenticate")}):t.jsx(rt,{hasReadme:!1})}),e[2]=a.supportsOAuth,e[3]=r,e[4]=c,e[5]=m):m=e[5],m}const x=`${l}:${n}`;let h;return e[6]!==l||e[7]!==i||e[8]!==o||e[9]!==x||e[10]!==n?(h=t.jsx(Vt,{toolName:n,connectionId:l,siblings:o,onSelectInstance:i},x),e[6]=l,e[7]=i,e[8]=o,e[9]=x,e[10]=n,e[11]=h):h=e[11],h}function Vt({toolName:s,connectionId:e,siblings:n,onSelectInstance:l}){const o=W(),{replayId:i}=tt({strict:!1}),r=(()=>{if(!i)return null;const u=`replay-${i}`,j=sessionStorage.getItem(u);if(!j)return null;sessionStorage.removeItem(u);try{return JSON.parse(j)}catch{return null}})(),c=(()=>{if(!r)return null;const u={};for(const[j,$]of Object.entries(r))$!==null&&typeof $=="object"?u[j]=JSON.stringify($,null,2):u[j]=$;return u})(),[d,a]=E.useState(c??{}),[x,h]=E.useState(r?JSON.stringify(r,null,2):"{}"),[m,f]=E.useState(null),[p,g]=E.useState(null),[b,S]=E.useState(null),[T,y]=E.useState(null),[P,w]=E.useState(!1),[N,A]=E.useState(null),{org:D}=fe(),R=ze(e),C=At(),I=Dt(),{openSidePanel:O}=Et(),U=`${e}:${s}`,z=ge({connectionId:e,orgId:D.id,orgSlug:D.slug}),V=Tt({client:z}),v=V.data?.tools?.find(u=>u.name===s),F=xt(v?._meta),J=u=>{if(!C)return;const j=kt(u.content);j.content.length>0&&(O("chat"),C.sendMessage({tiptapDoc:j}))},[M,L]=E.useState("json"),[q,X]=E.useState(!1);F&&!q&&(L("ui"),X(!0));const _=v?.inputSchema?.properties,be=_?Object.keys(_):[],Z=be.length>0,G={};if(Z&&v?.inputSchema?.properties)for(const u of be)G[u]=v.inputSchema.required?.includes(u)?"":void 0;const ne=u=>Object.prototype.hasOwnProperty.call(d,u),Ve=async()=>{w(!0),y(null),f(null),g(null),S(null),A(null);const u=performance.now();try{if(!z)throw new Error("MCP client is not available");const j=Z?{...G,...d}:(()=>{const B=x.trim();if(!B)return{};const H=JSON.parse(B);if(H&&typeof H=="object")return H;throw new Error("Raw JSON input must be an object.")})();Z&&v?.inputSchema?.properties&&Object.entries(v.inputSchema.properties).forEach(([B,H])=>{if((H.type==="object"||H.type==="array")&&typeof j[B]=="string")try{j[B]=JSON.parse(j[B])}catch{}else if((H.type==="number"||H.type==="integer")&&typeof j[B]=="string"&&j[B]!==""){const Se=Number(j[B]);Number.isNaN(Se)||(j[B]=Se)}});const $=await z.callTool({name:s,arguments:j}),ee=$.structuredContent??$,Qe=performance.now(),We=Math.round(Qe-u);f(ee),g($),S(j);const Xe=JSON.stringify(ee),ve=new TextEncoder().encode(Xe).length;A({duration:`${We}ms`,bytes:`${ve} bytes`,tokens:`~${Math.ceil(ve/4)} tokens`,cost:"$0.0000"})}catch(j){const $=j instanceof Error?j.message:String(j);y($||"Unknown error occurred");const ee=performance.now();A({duration:`${Math.round(ee-u)}ms`})}finally{w(!1)}},ie=(u,j)=>{a($=>({...$,[u]:j}))},_e=()=>{f(null),g(null),S(null),y(null),A(null)},Je=v?.name??Bt(s),qe=t.jsx(Le,{children:t.jsxs(Be,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:D.slug},children:o("details.tool.connections")})})}),t.jsx(le,{}),R&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:D.slug,appSlug:Ct(R)},search:{tab:"tools"},children:R.title})})}),t.jsx(le,{})]}),t.jsx(Y,{children:t.jsx(Ue,{children:Je})})]})}),Ne=n.length>1&&t.jsxs(Ce,{value:e,onValueChange:l,children:[t.jsx(Ie,{className:"h-8 w-auto min-w-[200px]",children:t.jsx($e,{})}),t.jsx(Te,{children:n.map(u=>t.jsx(me,{value:u.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(De,{icon:u.icon,name:u.title,size:"xs",className:"shrink-0"}),u.title]})},u.id))})]}),He=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:o("details.tool.parameters")}),v?.inputSchema?.required&&v.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-destructive",children:"*"})," ",o("details.tool.required")]})]}),t.jsx("div",{className:"space-y-4",children:Z&&v?.inputSchema?.properties?Object.entries(v.inputSchema.properties).map(([u,j])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[u,v.inputSchema?.required?.includes(u)&&t.jsx("span",{className:"text-destructive text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:j.type})]}),j.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:j.description}),j.type==="object"||j.type==="array"?t.jsx(xe,{className:"font-mono text-xs",value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enterAsJson",{key:u}),rows:3}):j.type==="boolean"?t.jsxs(Ce,{value:ne(u)?String(d[u]??""):"",onValueChange:$=>ie(u,$==="true"),children:[t.jsx(Ie,{children:t.jsx($e,{placeholder:o("details.tool.selectTrueOrFalse")})}),t.jsxs(Te,{children:[t.jsx(me,{value:"true",children:"true"}),t.jsx(me,{value:"false",children:"false"})]})]}):t.jsx(pe,{value:ne(u)?d[u]??"":G[u]??"",onChange:$=>ie(u,$.target.value),placeholder:o("details.tool.enter",{key:u})})]},u)):v?.inputSchema&&!Z?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:o("details.tool.rawJsonInput")}),t.jsx(xe,{className:"font-mono text-xs min-h-[120px]",value:x,onChange:u=>h(u.target.value),placeholder:o("details.tool.rawJsonExample")})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o("details.tool.noParametersRequired")})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:P?t.jsxs(K,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:_e,children:[t.jsx(dt,{className:"h-3.5 w-3.5"}),o("details.tool.cancel")]}):t.jsxs(K,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ve,children:[t.jsx(yt,{className:"h-3.5 w-3.5 fill-current"}),o("details.tool.executeTool")]})})]}),Ke=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:o("details.tool.result")}),t.jsxs("div",{className:"flex items-center gap-3",children:[N&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(vt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.duration})]}),N.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(mt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.tokens})]}),N.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ut,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:N.bytes})]}),N.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:N.cost})})]}),F&&t.jsx(bt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("ui"),children:t.jsx(pt,{size:14})})}),t.jsx(Ae,{children:o("details.tool.interactiveView")})]}),t.jsxs(Pe,{children:[t.jsx(ke,{asChild:!0,children:t.jsx(K,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>L("json"),children:t.jsx(ye,{size:14})})}),t.jsx(Ae,{children:o("details.tool.jsonView")})]})]})})]})]}),T&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(ht,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Nt,{className:"h-4 w-4"}),t.jsx(gt,{className:"mb-0",children:o("details.tool.executionFailed")})]}),t.jsx(jt,{className:"text-xs text-destructive",children:T})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:F&&M==="ui"&&z?t.jsx(E.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:o("details.tool.loadingApp")})]})}),children:t.jsx(ft,{resourceURI:F,toolInfo:v?{tool:v}:void 0,toolInput:b??void 0,toolResult:p??void 0,displayMode:"fullscreen",minHeight:we.view.minHeight,maxHeight:we.view.maxHeight,client:z,onMessage:J,onUpdateModelContext:u=>I?.setAppContext(U,u),onTeardown:()=>I?.clearAppContext(U),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(K,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),st.success(o("details.tool.copiedToClipboard"))},children:t.jsx(St,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(ye,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:o("details.tool.runToolToSeeResults")})]})})]});return t.jsx(je,{breadcrumb:qe,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(De,{icon:R?.icon||null,name:R?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[V.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-success animate-pulse shrink-0"}):V.isLoading?t.jsx(oe,{size:10,className:"animate-spin text-warning shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-destructive shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:V.isSuccess?"ready":V.isLoading?"connecting":"error"})]}),t.jsx($t,{annotations:v?.annotations,_meta:v?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:Ne})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:v?.description||"No description available"})]}),n.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:o("details.tool.instance")}),Ne]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:He}),Ke]})})]})})}function _t(s){const e=k.c(20),{itemId:n,siblings:l,onBack:o}=s,i=W(),[r,c]=E.useState(l[0]?.id??"");let d;e[0]!==r||e[1]!==l?(d=l.find(f=>f.id===r)?.id??l[0]?.id??"",e[0]=r,e[1]=l,e[2]=d):d=e[2];const a=d;if(!ze(a||void 0)||!a){let f;e[3]!==i?(f=i("details.tool.connectionNotFound"),e[3]=i,e[4]=f):f=e[4];let p;e[5]!==f?(p=t.jsx("h3",{className:"text-lg font-semibold",children:f}),e[5]=f,e[6]=p):p=e[6];let g;e[7]!==i?(g=i("details.tool.connectionNotFoundMessage"),e[7]=i,e[8]=g):g=e[8];let b;e[9]!==g?(b=t.jsx("p",{className:"text-sm text-muted-foreground",children:g}),e[9]=g,e[10]=b):b=e[10];let S;return e[11]!==p||e[12]!==b?(S=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[p,b]})}),e[11]=p,e[12]=b,e[13]=S):S=e[13],S}let h;e[14]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground"})}),e[14]=h):h=e[14];let m;return e[15]!==a||e[16]!==o||e[17]!==l||e[18]!==n?(m=t.jsx(E.Suspense,{fallback:h,children:t.jsx(Ut,{toolName:n,connectionId:a,siblings:l,onSelectInstance:c,onBack:o})}),e[15]=a,e[16]=o,e[17]=l,e[18]=n,e[19]=m):m=e[19],m}function Jt(s){const e=k.c(21),{icon:n,illustration:l,title:o,description:i,buttonProps:r,buttonComponent:c,className:d,children:a}=s;let x;e[0]!==d?(x=Q("flex flex-col items-center justify-center py-16 text-center",d),e[0]=d,e[1]=x):x=e[1];let h;e[2]!==n||e[3]!==l?(h=l?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:l}):n?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:n}):null,e[2]=n,e[3]=l,e[4]=h):h=e[4];let m;e[5]!==o?(m=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:o}),e[5]=o,e[6]=m):m=e[6];let f;e[7]!==i?(f=i&&t.jsx("div",{className:"text-sm text-muted-foreground",children:i}),e[7]=i,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;e[12]!==c||e[13]!==r?(g=(c??r)&&t.jsx("div",{className:"mt-4",children:c??(r&&t.jsx(K,{size:"sm",className:Q(r?.className),...r}))}),e[12]=c,e[13]=r,e[14]=g):g=e[14];let b;return e[15]!==a||e[16]!==x||e[17]!==h||e[18]!==p||e[19]!==g?(b=t.jsxs("div",{className:x,children:[h,p,g,a]}),e[15]=a,e[16]=x,e[17]=h,e[18]=p,e[19]=g,e[20]=b):b=e[20],b}const qt={prompt:Lt};function Ht(){const s=k.c(9),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=decodeURIComponent(l.itemId);let i;s[1]!==l.appSlug?(i={slug:l.appSlug},s[1]=l.appSlug,s[2]=i):i=s[2];const r=Me(i);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const d=c,a=Kt;let x;return s[5]!==d||s[6]!==o||s[7]!==r?(x=t.jsx(_t,{itemId:o,siblings:r,onBack:d,onUpdate:a}),s[5]=d,s[6]=o,s[7]=r,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Qt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Wt(){const s=k.c(52),e=Oe();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=n):n=s[0];const l=he(n),o=W(),i=decodeURIComponent(l.collectionName),r=decodeURIComponent(l.itemId);let c;s[1]!==e.history?(c=()=>{e.history.back()},s[1]=e.history,s[2]=c):c=s[2];const d=c,{org:a}=fe();let x;s[3]!==l.appSlug?(x={slug:l.appSlug},s[3]=l.appSlug,s[4]=x):x=s[4];const m=Me(x)[0]??null,f=m?.id??"",p=f||"no-connection",g=f??null;let b;s[5]!==a.id||s[6]!==a.slug||s[7]!==g?(b={connectionId:g,orgId:a.id,orgSlug:a.slug},s[5]=a.id,s[6]=a.slug,s[7]=g,s[8]=b):b=s[8];const S=ge(b),T=Re(p,i,S);let y;s[9]!==T||s[10]!==r?(y=async _=>{r&&await T.update.mutateAsync({id:r,data:_})},s[9]=T,s[10]=r,s[11]=y):y=s[11];const P=y;let w;s[12]!==i?(w=i?.toLowerCase(),s[12]=i,s[13]=w):w=s[13];const N=w,A=N&&qt[N];let D;s[14]!==i?(D=Qt(i),s[14]=i,s[15]=D):D=s[15];const R=D;let C;s[16]!==a.slug?(C=t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections",params:{org:a.slug},children:"Connections"})})}),s[16]=a.slug,s[17]=C):C=s[17];let I;s[18]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(le,{}),s[18]=I):I=s[18];let O;s[19]!==i||s[20]!==m||s[21]!==a.slug||s[22]!==l.appSlug?(O=m&&t.jsxs(t.Fragment,{children:[t.jsx(Y,{children:t.jsx(se,{asChild:!0,children:t.jsx(te,{to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:l.appSlug},search:{tab:i},children:m.title})})}),t.jsx(le,{})]}),s[19]=i,s[20]=m,s[21]=a.slug,s[22]=l.appSlug,s[23]=O):O=s[23];let U;s[24]!==R?(U=t.jsx(Y,{children:t.jsx(Ue,{children:R})}),s[24]=R,s[25]=U):U=s[25];let z;s[26]!==O||s[27]!==U||s[28]!==C?(z=t.jsx(Le,{children:t.jsxs(Be,{children:[C,I,O,U]})}),s[26]=O,s[27]=U,s[28]=C,s[29]=z):z=s[29];const V=z;if(A){let _;return s[30]!==A||s[31]!==d||s[32]!==P||s[33]!==r?(_=t.jsx(A,{itemId:r,onBack:d,onUpdate:P}),s[30]=A,s[31]=d,s[32]=P,s[33]=r,s[34]=_):_=s[34],_}let v;s[35]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx(Rt,{size:36,className:"text-muted-foreground"}),s[35]=v):v=s[35];let F;s[36]!==o?(F=o("orgs.collectionDetail.noComponentDefinedTitle"),s[36]=o,s[37]=F):F=s[37];let J;s[38]!==o?(J=o("orgs.collectionDetail.noComponentDefinedDescription"),s[38]=o,s[39]=J):J=s[39];let M;s[40]!==o?(M=o("orgs.collectionDetail.goBackButton"),s[40]=o,s[41]=M):M=s[41];let L;s[42]!==d||s[43]!==M?(L={onClick:d,children:M},s[42]=d,s[43]=M,s[44]=L):L=s[44];let q;s[45]!==F||s[46]!==J||s[47]!==L?(q=t.jsx(Jt,{icon:v,title:F,description:J,buttonProps:L}),s[45]=F,s[46]=J,s[47]=L,s[48]=q):q=s[48];let X;return s[49]!==V||s[50]!==q?(X=t.jsx(je,{breadcrumb:V,children:q}),s[49]=V,s[50]=q,s[51]=X):X=s[51],X}function Xt(){const s=k.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const n=he(e);if(decodeURIComponent(n.collectionName)==="tools"){let r;return s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ht,{}),s[1]=r):r=s[1],r}let i;return s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Wt,{}),s[2]=i):i=s[2],i}function ql(){const s=k.c(7),e=W();let n;s[0]!==e?(n=e("orgs.collectionDetail.loadingAriaLabel"),s[0]=e,s[1]=n):n=s[1];let l;s[2]!==n?(l=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(oe,{size:32,className:"animate-spin text-muted-foreground","aria-label":n})}),s[2]=n,s[3]=l):l=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Xt,{}),s[4]=o):o=s[4];let i;return s[5]!==l?(i=t.jsx(Ee,{children:t.jsx(E.Suspense,{fallback:l,children:o})}),s[5]=l,s[6]=i):i=s[6],i}export{ql as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as N,b as Q,j as o,m as Te,p as ue,B as Ne,u as Xe,r as Y,a as Ae,q as st,d as nt,s as lt,e as Ze,v as Ee,w as Se,Q as at,E as ct,K as He,x as Be,N as mt}from"./index-CacyxM-B.js";import{L as dt,s as Me,S as We,C as qe,i as ut,n as ze,a as et,p as Le}from"./self-tool-result-DaPbHreD.js";import{A as gt}from"./auth-entry-C_2hGTBt.js";import{A as ft}from"./auth-split-layout-B7n763Vx.js";import{O as Ve}from"./organization-choice-sfwWjhN7.js";import{r as pt}from"./track-Bufvtvpy.js";import{I as ht}from"./input-B8ln-0Wl.js";import{D as bt,a as Ke,b as xt,c as yt}from"./dropdown-menu-ByKxU4Y4.js";import{S as Ct,u as jt,W as Ot,g as vt,a as St}from"./use-mcp-client-DRcy9vk6.js";import{i as _t}from"./XCircle-D-ab7D3l.js";import{i as wt}from"./ArrowUpRight-CibKwsqg.js";import"./alert-dialog-DRGp9yFR.js";import"./form-BhElkTfE.js";import"./label-CCAJCJOj.js";import"./spinner-D7fl_vK2.js";import"./integration-icon-CLbqw16t.js";import"./Tool02-DtJ6WkGT.js";import"./agent-icon-BDevt-8Z.js";import"./AlertCircle-DOZzh9F_.js";import"./Tool01-D9lNVxCu.js";import"./ArrowUp-D1Whwq-K.js";import"./ArrowLeft-D3IfTAWC.js";import"./TrendUp01-B2aFkzBy.js";import"./ZapSquare-BjQDrkMq.js";import"./Users03-DM_1WdDy.js";import"./CheckCircle-BCbqPCn-.js";import"./Check-CSFy6eOj.js";import"./ChevronDown-DiERg-yU.js";import"./ChevronRight-H-_IIqWd.js";import"./ChevronSelectorVertical-Bnz5tSS1.js";import"./ChevronUp-CT1Rb5MC.js";import"./DotsVertical-Bqf_kSFh.js";import"./Stars02-CLHJV6ce.js";import"./Copy01-CzEeXGsa.js";import"./CreditCard01-DTIKWUon.js";import"./Download01-BPvwRxeD.js";import"./Settings02-CGZ0Ol25.js";import"./Eye-CDfbu42j.js";import"./FilterLines-Dc1F-WNI.js";import"./Share07-Dc2LdheG.js";import"./Globe01-CHMths1B.js";import"./Globe04-CIol-u19.js";import"./SwitchHorizontal01-BdWiZHby.js";import"./HardDrive-Bs-QsH_i.js";import"./Key01-WuBVakl2.js";import"./LayoutLeft-BF7bmTAo.js";import"./LinkExternal01-kQgSYVkJ.js";import"./LockUnlocked01-Bvs7cZ-w.js";import"./LogOut01-9xKoxZHy.js";import"./Monitor01-B5i4MO_v.js";import"./Sun-Cz50Vxl-.js";import"./Palette-l5b6DG4Q.js";import"./Play-AS6vVmkD.js";import"./Plus-m61KPSTg.js";import"./SearchLg-CDtXrrcW.js";import"./SearchMd-CF01LhHu.js";import"./Shield01-CkA8zl8k.js";import"./Stars01-Co5mOLjQ.js";import"./Trash01-BcRuo5Fe.js";import"./Upload01-B1Z9PE0l.js";import"./User01-D1UDDnNw.js";import"./Users01-gv39jXBY.js";import"./XClose-BmVO_SaY.js";import"./X-VMfnK-j5.js";import"./Zap-BrJ2b2V7.js";import"./dialog-Ww_zj2g-.js";import"./tooltip-CwIq9zTG.js";import"./extract-connection-data-BJ1FOt2x.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DAmoRUxP.js";import"./authenticate-and-persist-oauth-BwcRtSiC.js";import"./mcp-oauth-YJCTRoaW.js";import"./auth-Dk3-oFE7.js";import"./use-is-desktop-app-BNujXJc_.js";import"./retry-CErkP7V6.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-C448hZt-.js";const Qe={"pt-BR":"https://decocms.com/agendar",en:"https://www.decocms.com/en/schedule"},Ge=["https://decoims.com/image?src=decocms%2Fb07a1c19-0cd6-49c8-b326-86055ee78605%2Fauthor-1763423987973-baby.jpeg&quality=original&fit=cover&width=200&height=200","https://decoims.com/decocms/07c2daf4-a3c2-485e-a1a8-341585a06e3b/cecilia.png","https://decoims.com/decocms/48013ca2-3277-464b-b0f1-dd5f1f08d986/tavano.png"],Nt="var(--brand-green-dark)";function De({siteUrl:t,email:e,locale:s}){const i=(s&&Qe[s])??Qe["pt-BR"]??"https://decocms.com/agendar",r=new URL(i);return t&&r.searchParams.set("siteUrl",t),e&&r.searchParams.set("email",e),r.toString()}function Et(t){const e=N.c(15),{href:s,size:i,className:r,orgId:l}=t,a=i===void 0?"lg":i,n=Q();let c;e[0]!==r?(c=Te("w-full",r),e[0]=r,e[1]=c):c=e[1];let m;e[2]!==l?(m=()=>ue("commerce_onboarding_meeting_cta_clicked",{placement:"visual_card",organization_id:l}),e[2]=l,e[3]=m):m=e[3];let d;e[4]!==n?(d=n("routes.commerceOnboarding.scheduleMeeting.scheduleButton"),e[4]=n,e[5]=d):d=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(wt,{size:16}),e[6]=u):u=e[6];let f;e[7]!==s||e[8]!==m||e[9]!==d?(f=o.jsxs("a",{href:s,target:"_blank",rel:"noreferrer",onClick:m,children:[d,u]}),e[7]=s,e[8]=m,e[9]=d,e[10]=f):f=e[10];let p;return e[11]!==a||e[12]!==c||e[13]!==f?(p=o.jsx(Ne,{asChild:!0,variant:"outline",size:a,className:c,children:f}),e[11]=a,e[12]=c,e[13]=f,e[14]=p):p=e[14],p}function Ut(t){const e=N.c(13),{size:s}=t,i=s===void 0?72:s,r=Q();let l;e[0]!==r?(l=r("routes.commerceOnboarding.scheduleMeeting.expertAlt"),e[0]=r,e[1]=l):l=e[1];const a=l;let n;e[2]!==i?(n=Math.round(i*.3),e[2]=i,e[3]=n):n=e[3];const c=n;let m;e[4]!==i?(m={height:i},e[4]=i,e[5]=m):m=e[5];let d;e[6]!==a||e[7]!==c||e[8]!==i?(d=Ge.map((f,p)=>o.jsxs("div",{className:"relative shrink-0",style:{width:i,height:i,marginLeft:p===0?0:-c,zIndex:Ge.length-p},children:[o.jsx("div",{className:"h-full w-full overflow-hidden rounded-full border-4 border-card bg-muted",children:o.jsx("img",{src:f,alt:a,className:"h-full w-full object-cover",loading:"lazy"})}),p===0&&o.jsxs("span",{className:"absolute bottom-1.5 right-1.5 flex h-3.5 w-3.5",children:[o.jsx("span",{className:"absolute inline-flex h-full w-full rounded-full bg-success opacity-60 motion-safe:animate-ping","aria-hidden":!0}),o.jsx("span",{className:"relative inline-flex h-3.5 w-3.5 rounded-full border-2 border-card bg-success"})]})]},f)),e[6]=a,e[7]=c,e[8]=i,e[9]=d):d=e[9];let u;return e[10]!==m||e[11]!==d?(u=o.jsx("div",{className:"flex items-end",style:m,children:d}),e[10]=m,e[11]=d,e[12]=u):u=e[12],u}function Fe(t){const e=N.c(19),{href:s,orgId:i}=t,r=Q();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"h-20",style:{backgroundColor:Nt}}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"-mt-9 mb-4",children:o.jsx(Ut,{})}),e[1]=a):a=e[1];let n;e[2]!==r?(n=r("routes.commerceOnboarding.scheduleMeeting.headline"),e[2]=r,e[3]=n):n=e[3];let c;e[4]!==n?(c=o.jsx("h2",{className:"text-lg font-medium leading-6 text-foreground",children:n}),e[4]=n,e[5]=c):c=e[5];let m;e[6]!==r?(m=r("routes.commerceOnboarding.scheduleMeeting.body"),e[6]=r,e[7]=m):m=e[7];let d;e[8]!==m?(d=o.jsx("p",{className:"text-sm leading-5 text-muted-foreground",children:m}),e[8]=m,e[9]=d):d=e[9];let u;e[10]!==c||e[11]!==d?(u=o.jsxs("div",{className:"grid gap-1.5",children:[c,d]}),e[10]=c,e[11]=d,e[12]=u):u=e[12];let f;e[13]!==s||e[14]!==i?(f=o.jsx(Et,{href:s,size:"lg",className:"mt-6",orgId:i}),e[13]=s,e[14]=i,e[15]=f):f=e[15];let p;return e[16]!==u||e[17]!==f?(p=o.jsx("div",{className:"relative flex h-full w-full items-center justify-center p-10",children:o.jsxs("div",{className:"w-full max-w-[440px] overflow-hidden rounded-3xl border border-border bg-card card-shadow",children:[l,o.jsxs("div",{className:"px-8 pb-8",children:[a,u,f]})]})}),e[16]=u,e[17]=f,e[18]=p):p=e[18],p}function tt(t){const e=N.c(10),{host:s}=t,i=`https://www.google.com/s2/favicons?domain=${s}&sz=128`;let r,l,a;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-7 w-7 dark:hidden"}),l=o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-7 w-7 hidden dark:block"}),a=o.jsx("div",{className:"h-6 w-px rotate-12 bg-border","aria-hidden":"true"}),e[0]=r,e[1]=l,e[2]=a):(r=e[0],l=e[1],a=e[2]);let n;e[3]!==i?(n=o.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-lg border border-border bg-white",children:o.jsx("img",{src:i,alt:"",className:"h-5 w-5",loading:"lazy"})}),e[3]=i,e[4]=n):n=e[4];let c;e[5]!==s?(c=o.jsx("span",{className:"text-lg font-medium text-foreground",children:s}),e[5]=s,e[6]=c):c=e[6];let m;return e[7]!==n||e[8]!==c?(m=o.jsxs("div",{className:"flex items-center gap-3",children:[r,l,a,n,c]}),e[7]=n,e[8]=c,e[9]=m):m=e[9],m}function $e(t){const e=N.c(5),{variant:s}=t,i=Q();let r;e[0]!==i||e[1]!==s?(r=i(s==="workspace"?"routes.commerceOnboarding.loading.preparingWorkspace":"routes.commerceOnboarding.loading.preparing"),e[0]=i,e[1]=s,e[2]=r):r=e[2];const l=r;let a;return e[3]!==l?(a=o.jsx("div",{className:"flex justify-center py-4",role:"status","aria-live":"polite",children:o.jsx(dt,{label:l,className:"text-muted-foreground"})}),e[3]=l,e[4]=a):a=e[4],a}function fo(){const t=N.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(Lt,{}),t[0]=e):e=t[0],e}const rt=Y.createContext(null),ot=()=>Y.useContext(rt);function Pt(){const t=N.c(22),[e,s]=Ee(),i=e.language==="pt-BR"?"PT-BR":"EN";let r;t[0]!==i?(r=o.jsx(bt,{asChild:!0,children:o.jsx("button",{className:"text-sm font-medium text-foreground/70 hover:text-foreground transition-colors",type:"button",children:i})}),t[0]=i,t[1]=r):r=t[1];let l;t[2]!==s?(l=()=>{s(Rt)},t[2]=s,t[3]=l):l=t[3];const a=e.language==="en"&&"bg-accent";let n;t[4]!==a?(n=Te(a),t[4]=a,t[5]=n):n=t[5];let c;t[6]!==l||t[7]!==n?(c=o.jsx(Ke,{onClick:l,className:n,children:"English"}),t[6]=l,t[7]=n,t[8]=c):c=t[8];let m;t[9]!==s?(m=()=>{s(It)},t[9]=s,t[10]=m):m=t[10];const d=e.language==="pt-BR"&&"bg-accent";let u;t[11]!==d?(u=Te(d),t[11]=d,t[12]=u):u=t[12];let f;t[13]!==m||t[14]!==u?(f=o.jsx(Ke,{onClick:m,className:u,children:"Português (Brasil)"}),t[13]=m,t[14]=u,t[15]=f):f=t[15];let p;t[16]!==c||t[17]!==f?(p=o.jsxs(xt,{align:"end",children:[c,f]}),t[16]=c,t[17]=f,t[18]=p):p=t[18];let O;return t[19]!==r||t[20]!==p?(O=o.jsxs(yt,{children:[r,p]}),t[19]=r,t[20]=p,t[21]=O):O=t[21],O}function It(t){return{...t,language:"pt-BR"}}function Rt(t){return{...t,language:"en"}}function B(t){const e=N.c(17);let s,i,r;e[0]!==t?({visual:r,children:s,...i}=t,e[0]=t,e[1]=s,e[2]=i,e[3]=r):(s=e[1],i=e[2],r=e[3]);let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/commerce-onboarding"},e[4]=l):l=e[4];const a=Xe(l),{data:n}=Ae.useSession(),[c]=Ee(),m=n?.user?.email;let d;e[5]!==c.language||e[6]!==a.siteUrl||e[7]!==m?(d=De({siteUrl:a.siteUrl,email:m,locale:c.language}),e[5]=c.language,e[6]=a.siteUrl,e[7]=m,e[8]=d):d=e[8];const u=d;let f;e[9]!==u||e[10]!==r?(f=r??o.jsx(Fe,{href:u}),e[9]=u,e[10]=r,e[11]=f):f=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs("div",{className:"flex justify-between items-start mb-8",children:[o.jsx("div",{}),o.jsx(Pt,{})]}),e[12]=p):p=e[12];let O;return e[13]!==s||e[14]!==i||e[15]!==f?(O=o.jsxs(ft,{...i,visual:f,children:[p,s]}),e[13]=s,e[14]=i,e[15]=f,e[16]=O):O=e[16],O}function zt(t){return{signUpFailed:t("routes.commerceOnboarding.authCopy.signUpFailed"),signInFailed:t("routes.commerceOnboarding.authCopy.signInFailed"),authenticationFailed:t("routes.commerceOnboarding.authCopy.authenticationFailed"),resetEmailFailed:t("routes.commerceOnboarding.authCopy.resetEmailFailed"),otpSendFailed:t("routes.commerceOnboarding.authCopy.otpSendFailed"),invalidCode:t("routes.commerceOnboarding.authCopy.invalidCode"),invalidEmail:t("routes.commerceOnboarding.authCopy.invalidEmail"),invalidEmailOrPassword:t("routes.commerceOnboarding.authCopy.invalidEmailOrPassword"),accountExists:t("routes.commerceOnboarding.authCopy.accountExists"),networkError:t("routes.commerceOnboarding.authCopy.networkError"),tooManyAttempts:t("routes.commerceOnboarding.authCopy.tooManyAttempts"),invalidOrExpiredCode:t("routes.commerceOnboarding.authCopy.invalidOrExpiredCode"),genericError:t("routes.commerceOnboarding.authCopy.genericError"),resetPasswordTitle:t("routes.commerceOnboarding.authCopy.resetPasswordTitle"),verificationCodeTitle:t("routes.commerceOnboarding.authCopy.verificationCodeTitle"),welcomeTitle:t("routes.commerceOnboarding.authCopy.welcomeTitle"),resetPasswordSubtitle:t("routes.commerceOnboarding.authCopy.resetPasswordSubtitle"),codeSentTo:e=>t("routes.commerceOnboarding.authCopy.codeSentTo",{email:e}),defaultSubtitle:t("routes.commerceOnboarding.authCopy.defaultSubtitle"),resetEmailSent:t("routes.commerceOnboarding.authCopy.resetEmailSent"),continueWith:e=>t("routes.commerceOnboarding.authCopy.continueWith",{provider:e}),divider:t("routes.commerceOnboarding.authCopy.divider"),emailLabel:t("routes.commerceOnboarding.authCopy.emailLabel"),emailPlaceholder:t("routes.commerceOnboarding.authCopy.emailPlaceholder"),sending:t("routes.commerceOnboarding.authCopy.sending"),sendCode:t("routes.commerceOnboarding.authCopy.sendCode"),verificationCodeLabel:t("routes.commerceOnboarding.authCopy.verificationCodeLabel"),enterCodePlaceholder:t("routes.commerceOnboarding.authCopy.enterCodePlaceholder"),verifying:t("routes.commerceOnboarding.authCopy.verifying"),verify:t("routes.commerceOnboarding.authCopy.verify"),useDifferentEmail:t("routes.commerceOnboarding.authCopy.useDifferentEmail"),sendResetLink:t("routes.commerceOnboarding.authCopy.sendResetLink"),nameLabel:t("routes.commerceOnboarding.authCopy.nameLabel"),namePlaceholder:t("routes.commerceOnboarding.authCopy.namePlaceholder"),passwordLabel:t("routes.commerceOnboarding.authCopy.passwordLabel"),forgotPassword:t("routes.commerceOnboarding.authCopy.forgotPassword"),creatingAccount:t("routes.commerceOnboarding.authCopy.creatingAccount"),signingIn:t("routes.commerceOnboarding.authCopy.signingIn"),continue:t("routes.commerceOnboarding.authCopy.continue"),backToSignIn:t("routes.commerceOnboarding.authCopy.backToSignIn"),signInWithPassword:t("routes.commerceOnboarding.authCopy.signInWithPassword"),alreadyHaveAccount:t("routes.commerceOnboarding.authCopy.alreadyHaveAccount"),dontHaveAccount:t("routes.commerceOnboarding.authCopy.dontHaveAccount"),signIn:t("routes.commerceOnboarding.authCopy.signIn"),signUp:t("routes.commerceOnboarding.authCopy.signUp"),signInWithEmailCode:t("routes.commerceOnboarding.authCopy.signInWithEmailCode")}}function Ye(t,e){switch(e){case"Enter a website URL.":return t("routes.commerceOnboarding.siteUrl.enterUrl");case"Use an HTTP or HTTPS website URL.":return t("routes.commerceOnboarding.siteUrl.useHttpOrHttps");case"Enter a valid website URL.":return t("routes.commerceOnboarding.siteUrl.enterValidUrl");case"__configurationFailed":return t("routes.commerceOnboarding.configurationFailed");default:return e}}let Je=!1;function Lt(){const t=Xe({from:"/commerce-onboarding"}),{org:e,siteUrl:s}=t,i=Me(s);if(!Je&&st()){Je=!0;const r=pt(window.location.search);ue("commerce_onboarding_viewed",{site_url:s,domain:i??void 0,...r,...i?{$set:{last_scanned_domain:i}}:{}})}return o.jsx(rt.Provider,{value:i,children:o.jsx(kt,{requestedOrgSlug:e,siteUrl:s})})}function kt(t){const e=N.c(14),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),{data:l,isPending:a}=Ae.useSession(),n=ot();if(a){let m;return e[0]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(B,{children:o.jsx($e,{variant:"generic"})}),e[0]=m):m=e[0],m}if(!l){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let d;e[1]!==r?(d=r("routes.commerceOnboarding.unlockDiagnostic"),e[1]=r,e[2]=d):d=e[2];let u;e[3]!==n?(u=n?o.jsx(tt,{host:n}):void 0,e[3]=n,e[4]=u):u=e[4];let f;e[5]!==r?(f=zt(r),e[5]=r,e[6]=f):f=e[6];let p;return e[7]!==d||e[8]!==u||e[9]!==f?(p=o.jsx(B,{children:o.jsx(gt,{callbackUrl:m,allowAutoLogin:!1,title:d,subtitle:null,brand:u,copy:f})}),e[7]=d,e[8]=u,e[9]=f,e[10]=p):p=e[10],p}let c;return e[11]!==s||e[12]!==i?(c=o.jsx(Tt,{requestedOrgSlug:s,siteUrl:i}),e[11]=s,e[12]=i,e[13]=c):c=e[13],c}function Tt(t){const e=N.c(121),{requestedOrgSlug:s,siteUrl:i}=t,r=Q(),l=nt(),a=lt(),[n,c]=Y.useState(null),[m,d]=Y.useState(null),[u,f]=Y.useState(!1),p=a.data?.map(At)??[];let O;e[0]===Symbol.for("react.memo_cache_sentinel")?(O={mutationFn:Mt,retry:!1,onSuccess:g=>{d(g)}},e[0]=O):O=e[0];const v=Ze(O);if(a.isPending){let g;return e[1]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(B,{children:o.jsx($e,{variant:"workspace"})}),e[1]=g):g=e[1],g}if(a.error){let g;e[2]!==r?(g=r("routes.commerceOnboarding.couldNotLoadOrgs"),e[2]=r,e[3]=g):g=e[3];let h;e[4]!==r?(h=r("routes.commerceOnboarding.retryToConfigureCommerce"),e[4]=r,e[5]=h):h=e[5];let x;e[6]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=x):x=e[7];let b;e[8]!==a?(b=()=>a.refetch(),e[8]=a,e[9]=b):b=e[9];let _;return e[10]!==g||e[11]!==h||e[12]!==x||e[13]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[10]=g,e[11]=h,e[12]=x,e[13]=b,e[14]=_):_=e[14],_}const w=s?p.find(g=>g.slug===s):null;if(w){let g;return e[15]!==w||e[16]!==i?(g=o.jsx(ve,{org:w,initialSiteUrl:i}),e[15]=w,e[16]=i,e[17]=g):g=e[17],g}if(s){let g;e[18]!==r?(g=r("routes.commerceOnboarding.orgNotFound"),e[18]=r,e[19]=g):g=e[19];let h;e[20]!==r?(h=r("routes.commerceOnboarding.couldNotFindOrg"),e[20]=r,e[21]=h):h=e[21];let x;e[22]!==r?(x=r("routes.commerceOnboarding.retryAgain"),e[22]=r,e[23]=x):x=e[23];let b;e[24]!==a?(b=()=>a.refetch(),e[24]=a,e[25]=b):b=e[25];let _;return e[26]!==g||e[27]!==h||e[28]!==x||e[29]!==b?(_=o.jsx(_e,{title:g,description:h,actionLabel:x,onRetry:b}),e[26]=g,e[27]=h,e[28]=x,e[29]=b,e[30]=_):_=e[30],_}if(n){let g;return e[31]!==n||e[32]!==i?(g=o.jsx(ve,{org:n,initialSiteUrl:i}),e[31]=n,e[32]=i,e[33]=g):g=e[33],g}if(p.length===1&&p[0]){let g;return e[34]!==p[0]||e[35]!==i?(g=o.jsx(ve,{org:p[0],initialSiteUrl:i}),e[34]=p[0],e[35]=i,e[36]=g):g=e[36],g}if(p.length>1){let g;e[37]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[37]=r,e[38]=g):g=e[38];let h;e[39]!==r?(h=r("routes.commerceOnboarding.selectWhereCommerceContinues"),e[39]=r,e[40]=h):h=e[40];let x;e[41]!==g||e[42]!==h?(x=o.jsx(J,{title:g,description:h}),e[41]=g,e[42]=h,e[43]=x):x=e[43];let b;e[44]!==r?(b=r("routes.commerceOnboarding.authCopy.continue"),e[44]=r,e[45]=b):b=e[45];let _;e[46]!==l||e[47]!==i?(_=j=>l({to:"/commerce-onboarding",search:{org:j.slug,siteUrl:i}}),e[46]=l,e[47]=i,e[48]=_):_=e[48];let T;e[49]===Symbol.for("react.memo_cache_sentinel")?(T=()=>f(!0),e[49]=T):T=e[49];let z;e[50]!==r?(z=r("routes.commerceOnboarding.createNewOrg"),e[50]=r,e[51]=z):z=e[51];let R;e[52]!==p||e[53]!==b||e[54]!==_||e[55]!==z?(R=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:p,selectLabel:b,onSelected:_,onCreateNew:T,createNewLabel:z})}),e[52]=p,e[53]=b,e[54]=_,e[55]=z,e[56]=R):R=e[56];let U;e[57]!==x||e[58]!==R?(U=o.jsxs("div",{className:"grid gap-10",children:[x,R]}),e[57]=x,e[58]=R,e[59]=U):U=e[59];let M;e[60]!==l||e[61]!==i?(M=j=>{Se(),l({to:"/commerce-onboarding",search:{org:j,siteUrl:i}})},e[60]=l,e[61]=i,e[62]=M):M=e[62];let P;e[63]!==u||e[64]!==M?(P=o.jsx(qe,{open:u,onOpenChange:f,onCreated:M}),e[63]=u,e[64]=M,e[65]=P):P=e[65];let L;return e[66]!==U||e[67]!==P?(L=o.jsxs(B,{children:[U,P]}),e[66]=U,e[67]=P,e[68]=L):L=e[68],L}if(!m){let g;e[69]!==v?(g=()=>{v.reset(),v.mutate()},e[69]=v,e[70]=g):g=e[70];let h;return e[71]!==v||e[72]!==g?(h=o.jsx(Dt,{mutation:v,onRetry:g}),e[71]=v,e[72]=g,e[73]=h):h=e[73],h}const C=m;if(C?.success&&(C.status==="created"||C.status==="joined"||C.status==="already_has_organization")&&C.organization){let g;return e[74]!==C.organization||e[75]!==i?(g=o.jsx(ve,{org:C.organization,initialSiteUrl:i}),e[74]=C.organization,e[75]=i,e[76]=g):g=e[76],g}if(C?.status==="ambiguous"&&C.organizations&&C.organizations.length>0){let g;e[77]!==r?(g=r("routes.commerceOnboarding.chooseOrg"),e[77]=r,e[78]=g):g=e[78];let h;e[79]!==r?(h=r("routes.commerceOnboarding.emailAccessMultipleOrgs"),e[79]=r,e[80]=h):h=e[80];let x;e[81]!==g||e[82]!==h?(x=o.jsx(J,{title:g,description:h}),e[81]=g,e[82]=h,e[83]=x):x=e[83];const b=C.organizations,_=C.domain??void 0;let T;e[84]!==l||e[85]!==i?(T=(X,Z)=>{Se(),c({...X,slug:Z}),l({to:"/commerce-onboarding",search:{org:Z,siteUrl:i}})},e[84]=l,e[85]=i,e[86]=T):T=e[86];let z;e[87]===Symbol.for("react.memo_cache_sentinel")?(z=()=>f(!0),e[87]=z):z=e[87];let R;e[88]!==r?(R=r("routes.commerceOnboarding.createNewOrg"),e[88]=r,e[89]=R):R=e[89];let U;e[90]!==C.organizations||e[91]!==_||e[92]!==T||e[93]!==R?(U=o.jsx(We,{className:"-mx-1 -my-1 max-h-[60vh] overflow-y-auto px-1 py-1",children:o.jsx(Ve,{organizations:b,domain:_,onJoined:T,onCreateNew:z,createNewLabel:R})}),e[90]=C.organizations,e[91]=_,e[92]=T,e[93]=R,e[94]=U):U=e[94];let M;e[95]!==U||e[96]!==x?(M=o.jsxs("div",{className:"grid gap-10",children:[x,U]}),e[95]=U,e[96]=x,e[97]=M):M=e[97];let P;e[98]!==l||e[99]!==i?(P=X=>{Se(),l({to:"/commerce-onboarding",search:{org:X,siteUrl:i}})},e[98]=l,e[99]=i,e[100]=P):P=e[100];let L;e[101]!==u||e[102]!==P?(L=o.jsx(qe,{open:u,onOpenChange:f,onCreated:P}),e[101]=u,e[102]=P,e[103]=L):L=e[103];let j;return e[104]!==M||e[105]!==L?(j=o.jsxs(B,{children:[M,L]}),e[104]=M,e[105]=L,e[106]=j):j=e[106],j}let I;e[107]!==r?(I=r("routes.commerceOnboarding.onboardingNeedsSupport"),e[107]=r,e[108]=I):I=e[108];let E;e[109]!==C?.error||e[110]!==r?(E=C?.error??r("routes.commerceOnboarding.couldNotDetermineOrg"),e[109]=C?.error,e[110]=r,e[111]=E):E=e[111];let A;e[112]!==r?(A=r("routes.commerceOnboarding.retryAgain"),e[112]=r,e[113]=A):A=e[113];let W;e[114]!==v?(W=()=>{d(null),v.reset()},e[114]=v,e[115]=W):W=e[115];let q;return e[116]!==I||e[117]!==E||e[118]!==A||e[119]!==W?(q=o.jsx(_e,{title:I,description:E,actionLabel:A,onRetry:W}),e[116]=I,e[117]=E,e[118]=A,e[119]=W,e[120]=q):q=e[120],q}async function Mt(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&Se(),e}function At(t){return{id:t.id,name:t.name,slug:t.slug,logo:t.logo??null}}function Dt(t){const e=N.c(16),{mutation:s,onRetry:i}=t,r=Q(),l=Y.useRef(!1);let a;e[0]!==s?(a=d=>{!d||l.current||(l.current=!0,s.mutate())},e[0]=s,e[1]=a):a=e[1];const n=a;if(s.error){let d;e[2]!==r?(d=r("routes.commerceOnboarding.onboardingUnavailable"),e[2]=r,e[3]=d):d=e[3];let u;e[4]!==r?(u=r("routes.commerceOnboarding.couldNotPrepareOrg"),e[4]=r,e[5]=u):u=e[5];let f;e[6]!==r?(f=r("routes.commerceOnboarding.retryAgain"),e[6]=r,e[7]=f):f=e[7];let p;return e[8]!==i||e[9]!==d||e[10]!==u||e[11]!==f?(p=o.jsx(_e,{title:d,description:u,actionLabel:f,onRetry:i}),e[8]=i,e[9]=d,e[10]=u,e[11]=f,e[12]=p):p=e[12],p}let c;e[13]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx($e,{variant:"generic"}),e[13]=c):c=e[13];let m;return e[14]!==n?(m=o.jsx(B,{children:o.jsx("div",{ref:n,children:c})}),e[14]=n,e[15]=m):m=e[15],m}function J(t){const e=N.c(8),{title:s,description:i}=t,r=ot();let l;e[0]!==r?(l=r?o.jsx(tt,{host:r}):o.jsxs("div",{children:[o.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),o.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]}),e[0]=r,e[1]=l):l=e[1];let a;e[2]!==i||e[3]!==s?(a=(s||i)&&o.jsxs("div",{className:"space-y-2",children:[s&&o.jsx("h1",{className:"text-2xl font-medium leading-8",children:s}),i&&o.jsx("p",{className:"text-base text-muted-foreground leading-6",children:i})]}),e[2]=i,e[3]=s,e[4]=a):a=e[4];let n;return e[5]!==l||e[6]!==a?(n=o.jsxs("div",{className:"grid gap-10",children:[l,a]}),e[5]=l,e[6]=a,e[7]=n):n=e[7],n}function _e(t){const e=N.c(9),{title:s,description:i,actionLabel:r,onRetry:l}=t;let a;e[0]!==i||e[1]!==s?(a=o.jsx(J,{title:s,description:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let n;e[3]!==r||e[4]!==l?(n=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=n):n=e[5];let c;return e[6]!==a||e[7]!==n?(c=o.jsx(B,{children:o.jsxs("div",{className:"grid gap-10",children:[a,n]})}),e[6]=a,e[7]=n,e[8]=c):c=e[8],c}function ve(t){const e=N.c(13),{org:s,initialSiteUrl:i}=t,r=Q(),{data:l}=Ae.useSession(),[a]=Ee(),n=l?.user?.email;let c;e[0]!==i||e[1]!==a.language||e[2]!==n?(c=De({siteUrl:i,email:n,locale:a.language}),e[0]=i,e[1]=a.language,e[2]=n,e[3]=c):c=e[3];const m=c;let d;e[4]!==m||e[5]!==s.id?(d=o.jsx(Fe,{href:m,orgId:s.id}),e[4]=m,e[5]=s.id,e[6]=d):d=e[6];const u=d;let f;return e[7]!==i||e[8]!==u||e[9]!==s||e[10]!==l?.user?.email||e[11]!==r?(f=o.jsx(at,{children:p=>{const{reset:O}=p;return o.jsx(ct,{fallback:v=>{const{error:w,resetError:C}=v;return o.jsx(B,{visual:u,children:o.jsx(Ft,{orgName:s.name,message:w instanceof Error?w.message:r("routes.commerceOnboarding.couldNotVerifyCommerceSetting"),onRetry:()=>{O(),C()}})})},children:o.jsx(Y.Suspense,{fallback:o.jsx(it,{visual:u}),children:o.jsx($t,{org:s,initialSiteUrl:i,sessionEmail:l?.user?.email},`${s.id}:${i??""}`)})})}}),e[7]=i,e[8]=u,e[9]=s,e[10]=l?.user?.email,e[11]=r,e[12]=f):f=e[12],f}function it(t){const e=N.c(3),{visual:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6 md:grid md:gap-4",children:[o.jsx(J,{}),o.jsx(et,{})]}),e[0]=i):i=e[0];let r;return e[1]!==s?(r=o.jsx(B,{align:"fill",visual:s,children:i}),e[1]=s,e[2]=r):r=e[2],r}function Ft(t){const e=N.c(19),{orgName:s,message:i,onRetry:r}=t,l=Q();let a;e[0]!==l?(a=l("routes.commerceOnboarding.commerceDiagnostic"),e[0]=l,e[1]=a):a=e[1];let n;e[2]!==s||e[3]!==l?(n=l("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s}),e[2]=s,e[3]=l,e[4]=n):n=e[4];let c;e[5]!==a||e[6]!==n?(c=o.jsx(J,{title:a,description:n}),e[5]=a,e[6]=n,e[7]=c):c=e[7];let m;e[8]!==i?(m=o.jsx(we,{message:i}),e[8]=i,e[9]=m):m=e[9];let d;e[10]!==l?(d=l("routes.commerceOnboarding.retryAgain"),e[10]=l,e[11]=d):d=e[11];let u;e[12]!==r||e[13]!==d?(u=o.jsx(Ne,{type:"button",size:"xl",className:"w-full",onClick:r,children:d}),e[12]=r,e[13]=d,e[14]=u):u=e[14];let f;return e[15]!==c||e[16]!==m||e[17]!==u?(f=o.jsxs("div",{className:"grid gap-10",children:[c,m,u]}),e[15]=c,e[16]=m,e[17]=u,e[18]=f):f=e[18],f}function $t(t){const e=N.c(135),{org:s,initialSiteUrl:i,sessionEmail:r}=t;let l;e[0]!==s.id||e[1]!==s.slug?(l={connectionId:Ct,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l):l=e[2];const a=jt(l),[n,c]=Y.useState(i??""),[m,d]=Y.useState(null),u=Y.useRef(!1),f=Ot.COMMERCE_DISCOVERY(s.id),p=vt(s.id),O=He.commerceDiscoveryConnection(s.id,f);let v;e[3]!==f||e[4]!==a?(v=async()=>{const y=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:f}});return Le(y)},e[3]=f,e[4]=a,e[5]=v):v=e[5];let w;e[6]!==O||e[7]!==v?(w={queryKey:O,queryFn:v,retry:!1},e[6]=O,e[7]=v,e[8]=w):w=e[8];const C=Be(w),I=He.commerceDiscoveryVirtualMcp(s.id,p);let E;e[9]!==a||e[10]!==p?(E=async()=>{const y=await a.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:p}});return Le(y)},e[9]=a,e[10]=p,e[11]=E):E=e[11];let A;e[12]!==I||e[13]!==E?(A={queryKey:I,queryFn:E,retry:!1},e[12]=I,e[13]=E,e[14]=A):A=e[14];const W=Be(A);let q;e[15]!==a?(q=async y=>{const S=await a.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:y}});return Le(S)},e[15]=a,e[16]=q):q=e[16];let g;e[17]!==C||e[18]!==s.id||e[19]!==W?(g=(y,S)=>{ue("commerce_onboarding_setup_succeeded",{domain:Me(S)??void 0,organization_id:s.id}),d(null),C.refetch(),W.refetch()},e[17]=C,e[18]=s.id,e[19]=W,e[20]=g):g=e[20];let h;e[21]!==s.id?(h=(y,S)=>{ue("commerce_onboarding_setup_failed",{domain:Me(S)??void 0,organization_id:s.id,error:y instanceof Error?y.message:String(y)}),d(y instanceof Error?y.message:"__configurationFailed")},e[21]=s.id,e[22]=h):h=e[22];let x;e[23]!==h||e[24]!==q||e[25]!==g?(x={mutationFn:q,retry:!1,onSuccess:g,onError:h},e[23]=h,e[24]=q,e[25]=g,e[26]=x):x=e[26];const b=Ze(x),_=!!C.data.item&&!!W.data.item,T=C.data.item,z=typeof T?.metadata?.siteUrl=="string"?T.metadata.siteUrl:void 0,R=i||n||"";let U;e[27]!==z||e[28]!==R?(U=ut(R,z),e[27]=z,e[28]=R,e[29]=U):U=e[29];const P=_&&U,L=i||n||z||"",j=Q(),[X]=Ee();let Z;e[30]!==L||e[31]!==X.language||e[32]!==r?(Z=De({siteUrl:L,email:r,locale:X.language}),e[30]=L,e[31]=X.language,e[32]=r,e[33]=Z):Z=e[33];const Ue=Z;let ge;e[34]!==Ue||e[35]!==s.id?(ge=o.jsx(Fe,{href:Ue,orgId:s.id}),e[34]=Ue,e[35]=s.id,e[36]=ge):ge=e[36];const $=ge;let fe;e[37]!==m||e[38]!==j?(fe=m?Ye(j,m):null,e[37]=m,e[38]=j,e[39]=fe):fe=e[39];const H=fe;let pe;e[40]!==b?(pe=y=>{const S=ze(y);if(!S.ok){d(S.error);return}d(null),b.mutate(S.value)},e[40]=b,e[41]=pe):pe=e[41];const ee=pe;let he;e[42]!==i||e[43]!==ee||e[44]!==P?(he=y=>{!y||u.current||P||!i||(u.current=!0,ee(i))},e[42]=i,e[43]=ee,e[44]=P,e[45]=he):he=e[45];const Pe=he;let be;e[46]!==s.id||e[47]!==ee||e[48]!==n?(be=y=>{y.preventDefault();const S=ze(n);S.ok&&ue("commerce_onboarding_site_url_submitted",{domain:new URL(S.value).hostname,organization_id:s.id}),ee(n)},e[46]=s.id,e[47]=ee,e[48]=n,e[49]=be):be=e[49];const V=be;if(P){const y=s.slug;let S;e[50]===Symbol.for("react.memo_cache_sentinel")?(S=crypto.randomUUID(),e[50]=S):S=e[50];let k;e[51]!==s.slug?(k={org:y,taskId:S},e[51]=s.slug,e[52]=k):k=e[52];let D;e[53]!==s.id?(D=St(s.id),e[53]=s.id,e[54]=D):D=e[54];const G=L||void 0;let F;e[55]!==D.id||e[56]!==G?(F={virtualmcpid:D.id,connect:"1",siteUrl:G},e[55]=D.id,e[56]=G,e[57]=F):F=e[57];let K;return e[58]!==k||e[59]!==F?(K=o.jsx(mt,{to:"/$org/$taskId",params:k,search:F,replace:!0}),e[58]=k,e[59]=F,e[60]=K):K=e[60],K}if(b.isPending){let y;return e[61]!==$?(y=o.jsx(it,{visual:$}),e[61]=$,e[62]=y):y=e[62],y}if(i){let y,S,k,D,G,F,K,ne;if(e[63]!==$||e[64]!==V||e[65]!==i||e[66]!==s.name||e[67]!==b.isPending||e[68]!==n||e[69]!==j||e[70]!==H||e[71]!==Pe){ne=Symbol.for("react.early_return_sentinel");e:{const Ie=ze(i);if(!Ie.ok){let me;e[80]!==j?(me=j("routes.commerceOnboarding.commerceDiagnostic"),e[80]=j,e[81]=me):me=e[81];let de;e[82]!==s.name||e[83]!==j?(de=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[82]=s.name,e[83]=j,e[84]=de):de=e[84];let Ce;e[85]!==me||e[86]!==de?(Ce=o.jsx(J,{title:me,description:de}),e[85]=me,e[86]=de,e[87]=Ce):Ce=e[87];let je;e[88]!==V||e[89]!==b.isPending||e[90]!==n||e[91]!==H?(je=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[88]=V,e[89]=b.isPending,e[90]=n,e[91]=H,e[92]=je):je=e[92];const Re=o.jsxs("div",{className:"grid gap-10",children:[Ce,o.jsx(we,{message:Ye(j,Ie.error)}),je]});let Oe;e[93]!==$||e[94]!==Re?(Oe=o.jsx(B,{visual:$,children:Re}),e[93]=$,e[94]=Re,e[95]=Oe):Oe=e[95],ne=Oe;break e}S=B,K=$,G=Pe,F="grid gap-10",y=J,e[96]!==j?(k=j("routes.commerceOnboarding.commerceDiagnostic"),e[96]=j,e[97]=k):k=e[97],D=j("routes.commerceOnboarding.commerceDiscoveryBeingPrepared",{url:Ie.value})}e[63]=$,e[64]=V,e[65]=i,e[66]=s.name,e[67]=b.isPending,e[68]=n,e[69]=j,e[70]=H,e[71]=Pe,e[72]=y,e[73]=S,e[74]=k,e[75]=D,e[76]=G,e[77]=F,e[78]=K,e[79]=ne}else y=e[72],S=e[73],k=e[74],D=e[75],G=e[76],F=e[77],K=e[78],ne=e[79];if(ne!==Symbol.for("react.early_return_sentinel"))return ne;let le;e[98]!==y||e[99]!==k||e[100]!==D?(le=o.jsx(y,{title:k,description:D}),e[98]=y,e[99]=k,e[100]=D,e[101]=le):le=e[101];let ae;e[102]!==V||e[103]!==b.isPending||e[104]!==n||e[105]!==H?(ae=H?o.jsxs(o.Fragment,{children:[o.jsx(we,{message:H}),o.jsx(ke,{siteUrl:n,error:null,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V})]}):o.jsx(et,{}),e[102]=V,e[103]=b.isPending,e[104]=n,e[105]=H,e[106]=ae):ae=e[106];let ce;e[107]!==G||e[108]!==F||e[109]!==le||e[110]!==ae?(ce=o.jsxs("div",{ref:G,className:F,children:[le,ae]}),e[107]=G,e[108]=F,e[109]=le,e[110]=ae,e[111]=ce):ce=e[111];let ye;return e[112]!==S||e[113]!==K||e[114]!==ce?(ye=o.jsx(S,{visual:K,children:ce}),e[112]=S,e[113]=K,e[114]=ce,e[115]=ye):ye=e[115],ye}let te;e[116]!==j?(te=j("routes.commerceOnboarding.commerceDiagnostic"),e[116]=j,e[117]=te):te=e[117];let re;e[118]!==s.name||e[119]!==j?(re=j("routes.commerceOnboarding.configurationWillContinueIn",{orgName:s.name}),e[118]=s.name,e[119]=j,e[120]=re):re=e[120];let oe;e[121]!==te||e[122]!==re?(oe=o.jsx(J,{title:te,description:re}),e[121]=te,e[122]=re,e[123]=oe):oe=e[123];let ie;e[124]!==V||e[125]!==b.isPending||e[126]!==n||e[127]!==H?(ie=o.jsx(ke,{siteUrl:n,error:H,isSubmitting:b.isPending,onSiteUrlChange:c,onSubmit:V}),e[124]=V,e[125]=b.isPending,e[126]=n,e[127]=H,e[128]=ie):ie=e[128];let se;e[129]!==oe||e[130]!==ie?(se=o.jsxs("div",{className:"grid gap-10",children:[oe,ie]}),e[129]=oe,e[130]=ie,e[131]=se):se=e[131];let xe;return e[132]!==$||e[133]!==se?(xe=o.jsx(B,{visual:$,children:se}),e[132]=$,e[133]=se,e[134]=xe):xe=e[134],xe}function ke(t){const e=N.c(30),{siteUrl:s,error:i,isSubmitting:r,onSiteUrlChange:l,onSubmit:a}=t,n=Q();let c;e[0]!==n?(c=n("routes.commerceOnboarding.siteUrlLabel"),e[0]=n,e[1]=c):c=e[1];let m;e[2]!==c?(m=o.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:c}),e[2]=c,e[3]=m):m=e[3];let d;e[4]!==l?(d=A=>l(A.target.value),e[4]=l,e[5]=d):d=e[5];let u;e[6]!==n?(u=n("routes.commerceOnboarding.siteUrlPlaceholder"),e[6]=n,e[7]=u):u=e[7];const f=!!i;let p;e[8]!==r||e[9]!==s||e[10]!==d||e[11]!==u||e[12]!==f?(p=o.jsx(ht,{id:"commerce-site-url",type:"text",inputMode:"url",value:s,onChange:d,placeholder:u,"aria-invalid":f,disabled:r}),e[8]=r,e[9]=s,e[10]=d,e[11]=u,e[12]=f,e[13]=p):p=e[13];let O;e[14]!==i?(O=i?o.jsx(we,{message:i}):null,e[14]=i,e[15]=O):O=e[15];let v;e[16]!==m||e[17]!==p||e[18]!==O?(v=o.jsxs("div",{className:"grid gap-2",children:[m,p,O]}),e[16]=m,e[17]=p,e[18]=O,e[19]=v):v=e[19];let w;e[20]!==n?(w=n("routes.commerceOnboarding.authCopy.continue"),e[20]=n,e[21]=w):w=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=o.jsx(_t,{size:16}),e[22]=C):C=e[22];let I;e[23]!==r||e[24]!==w?(I=o.jsxs(Ne,{type:"submit",size:"xl",className:"w-full",disabled:r,children:[w,C]}),e[23]=r,e[24]=w,e[25]=I):I=e[25];let E;return e[26]!==a||e[27]!==I||e[28]!==v?(E=o.jsxs("form",{className:"grid gap-4",onSubmit:a,children:[v,I]}),e[26]=a,e[27]=I,e[28]=v,e[29]=E):E=e[29],E}function we(t){const e=N.c(2),{message:s}=t;let i;return e[0]!==s?(i=o.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:s}),e[0]=s,e[1]=i):i=e[1],i}export{fo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as S,F as K,b7 as Q,K as H,b as q,m as $,j as x}from"./index-CacyxM-B.js";import{u as G}from"./use-registry-connections-GX-tovow.js";import{g as U}from"./use-organization-settings-DJYuvv-k.js";import{S as k,n as V}from"./use-mcp-client-DRcy9vk6.js";import{u as X}from"./useInfiniteQuery-BxSgA-RD.js";import{i as Y,f as z}from"./extract-connection-data-BJ1FOt2x.js";import{r as B,R as W}from"./retry-CErkP7V6.js";import{g as A}from"./connection-slug-eyAPH6o3.js";import{C as Z}from"./card-CG7VHdDz.js";import{I as J}from"./integration-icon-CLbqw16t.js";function ye(){const s=S.c(6),e=G(),t=U(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function F(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:b}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=Y(i.id,e);try{return await B(async()=>{let u=null;try{u=await V({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const N=await u.callTool({name:C,arguments:h}),v=N.structuredContent??N,P=v.nextCursor||v.cursor||void 0,R=z(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:R,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof W?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:Q,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:b,fetchNextPage:()=>{d&&!g&&f()}}}function he(s,e){const t=S.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const b=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==b||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:b,loadMore:m},t[10]=l,t[11]=b,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return F(s)}function ie(s){return!F(s)}function xe(s){const e=new Map;for(const n of s){const a=A(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=A(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function ve(s){const e=S.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,b=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=$("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:$("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let N;e[14]!==h||e[15]!==C?(N=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=N):N=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==b?(P=t.description||b("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=b,e[21]=P):P=e[21];let R;e[22]!==P?(R=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=R):R=e[23];let j;e[24]!==v||e[25]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,R]}),e[24]=v,e[25]=R,e[26]=j):j=e[26];let M;e[27]!==N||e[28]!==j?(M=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[N,j]}),e[27]=N,e[28]=j,e[29]=M):M=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==M||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[M,w]}),e[32]=M,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(Z,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{ve as C,he as a,xe as g,ye as u};
|