decocms 2.175.0 → 2.175.1
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-5ZbLDi3s.js → AlertCircle-De9oqjty.js} +1 -1
- package/dist/client/assets/{AlignLeft-D4ghzTQG.js → AlignLeft-BaG4OcCg.js} +1 -1
- package/dist/client/assets/{ArrowDown-B5WC3D5H.js → ArrowDown-PFFBPH3j.js} +1 -1
- package/dist/client/assets/{ArrowLeft-D0Lalw4x.js → ArrowLeft-CPWCs_Od.js} +1 -1
- package/dist/client/assets/{ArrowUp-tKKJvEkq.js → ArrowUp-C6Q-EpUw.js} +1 -1
- package/dist/client/assets/{Check-CuWDIJeM.js → Check-BfKCyKXX.js} +1 -1
- package/dist/client/assets/{CheckCircle-wz1RfkCA.js → CheckCircle-DiRi76qb.js} +1 -1
- package/dist/client/assets/{CheckDone01-UsIketHR.js → CheckDone01-ZekLHdFZ.js} +1 -1
- package/dist/client/assets/{CheckVerified02-cu3amtx9.js → CheckVerified02-DC3VT092.js} +1 -1
- package/dist/client/assets/{ChevronDown-D0TXudCx.js → ChevronDown-BHMaRWRt.js} +1 -1
- package/dist/client/assets/{ChevronLeft-BZsszCLQ.js → ChevronLeft-0cpA2yNq.js} +1 -1
- package/dist/client/assets/{ChevronRight-UJRwW9xN.js → ChevronRight-1g9z-Z5h.js} +1 -1
- package/dist/client/assets/{ChevronUp-DXMXl76b.js → ChevronUp-1s_S3eDF.js} +1 -1
- package/dist/client/assets/{Clock-DKQ7EGj-.js → Clock-rHd8cQAO.js} +1 -1
- package/dist/client/assets/{Code01-DZzuHJh9.js → Code01-CoTQP8pZ.js} +1 -1
- package/dist/client/assets/{Coins01-DWo6Ypxq.js → Coins01-D7lfLTbO.js} +1 -1
- package/dist/client/assets/{Container-YdffBHg3.js → Container-DwxLlgWA.js} +1 -1
- package/dist/client/assets/{Copy01-CPHBT83w.js → Copy01-CIUDy0Hr.js} +1 -1
- package/dist/client/assets/{Dataflow03-CUuQJ-m_.js → Dataflow03-T9TmjQN-.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-DUoeCjzn.js → DotsHorizontal-CmCKbvuJ.js} +1 -1
- package/dist/client/assets/{DotsVertical-BaBvJOuP.js → DotsVertical-Y8XpM2B_.js} +1 -1
- package/dist/client/assets/{Download01-D5-Ilwwi.js → Download01-LinNp3zy.js} +1 -1
- package/dist/client/assets/{Edit01-Dpq6F4lk.js → Edit01-Dw-lPBk-.js} +1 -1
- package/dist/client/assets/{Edit05-h0OeCHXT.js → Edit05-Bx682Mm6.js} +1 -1
- package/dist/client/assets/{Eye-DDwMVcxZ.js → Eye-JuDcZhJz.js} +1 -1
- package/dist/client/assets/{EyeOff-D8njwIM7.js → EyeOff-9_-SJWcU.js} +1 -1
- package/dist/client/assets/{File02-Bc8tH3v5.js → File02-bFwU_wEK.js} +1 -1
- package/dist/client/assets/{File06-ZV5CfSHG.js → File06-CU5oU1OI.js} +1 -1
- package/dist/client/assets/{FilterLines-aqS8nu95.js → FilterLines-BaTxnUjH.js} +1 -1
- package/dist/client/assets/{Globe01-BdWDm7Ni.js → Globe01-DUjsFcPS.js} +1 -1
- package/dist/client/assets/{Globe02-Cn3qFriL.js → Globe02-k3_A41kp.js} +1 -1
- package/dist/client/assets/{Grid01-Gq7hBl7S.js → Grid01-DBOkAm2V.js} +1 -1
- package/dist/client/assets/{Hash02-CmJ0Y9N4.js → Hash02-gqJDwuju.js} +1 -1
- package/dist/client/assets/{Home02-Dz88FEOV.js → Home02-DfEb-Myv.js} +1 -1
- package/dist/client/assets/{Image01-DBWShOGl.js → Image01-I9pAeT0N.js} +1 -1
- package/dist/client/assets/{Inbox01-CJphqD3y.js → Inbox01-BgDmihAV.js} +1 -1
- package/dist/client/assets/{InfoCircle-uEl5PLW5.js → InfoCircle-LX1SVC24.js} +1 -1
- package/dist/client/assets/{Key01-IptFTL_3.js → Key01-DAjAUWfr.js} +1 -1
- package/dist/client/assets/{LayersTwo01-B5fVqAUB.js → LayersTwo01-C-XZtFtv.js} +1 -1
- package/dist/client/assets/{LayoutLeft-B8-msEGR.js → LayoutLeft-BvuIBX8d.js} +1 -1
- package/dist/client/assets/{Link01-BpjSsBky.js → Link01-q2vhCqdM.js} +1 -1
- package/dist/client/assets/{LinkExternal01-B21lACin.js → LinkExternal01-QGWpvftd.js} +1 -1
- package/dist/client/assets/{List-ySIwqood.js → List-CuV23QYs.js} +1 -1
- package/dist/client/assets/{Loading01-WTkiPysv.js → Loading01-BNn4YU_K.js} +1 -1
- package/dist/client/assets/{Lock01-DqO9uSP7.js → Lock01-DJQX15kR.js} +1 -1
- package/dist/client/assets/{Play-D72BHSXn.js → Play-C7yKo0dH.js} +1 -1
- package/dist/client/assets/{Plus-Dto-8y6a.js → Plus-CT_Gcwl2.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-DckyCUMd.js → RefreshCcw01-uL9q48A4.js} +1 -1
- package/dist/client/assets/{Save01-C2uk3LpG.js → Save01-CuwI4Bxq.js} +1 -1
- package/dist/client/assets/{SearchMd-Kap2MdR9.js → SearchMd-BLeX5weN.js} +1 -1
- package/dist/client/assets/{Settings01-CYUXeHtK.js → Settings01-2AkYiqYr.js} +1 -1
- package/dist/client/assets/{Shield01-CJ-f24yL.js → Shield01-D6IOCC-Z.js} +1 -1
- package/dist/client/assets/{Terminal-BQ1GlFmm.js → Terminal-Dlvh4GS2.js} +1 -1
- package/dist/client/assets/Tool01-CjSIsyxE.js +1 -0
- package/dist/client/assets/{Trash01-DkXbOnbi.js → Trash01-YPQczxci.js} +1 -1
- package/dist/client/assets/{Upload01-BasmYIL8.js → Upload01-BlEN4mwB.js} +1 -1
- package/dist/client/assets/{Users03-BXwEsNFj.js → Users03-B7X28dbt.js} +1 -1
- package/dist/client/assets/{X-CNbskBah.js → X-B_f76BPZ.js} +1 -1
- package/dist/client/assets/XAxis-Du5m1KMx.js +1 -0
- package/dist/client/assets/{XCircle-DvUvQRq1.js → XCircle-DDLf4PgL.js} +1 -1
- package/dist/client/assets/{XClose-B0FgAxIQ.js → XClose-eeK1fS1n.js} +1 -1
- package/dist/client/assets/{Zap-BgjTj76q.js → Zap-DHey7Hu_.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-Bh6ijP_X.js → agent-connections-preview-D6uKmygR.js} +1 -1
- package/dist/client/assets/agent-detail-BS4g93cA.js +2 -0
- package/dist/client/assets/{agents-DNXSTqTl.js → agents-BuWI7PBX.js} +1 -1
- package/dist/client/assets/{alert-dialog-DtAWdTyc.js → alert-dialog-BVglQjyM.js} +3 -3
- package/dist/client/assets/{auth-catchall-5qyXxzaS.js → auth-catchall-Bfllc4Ni.js} +1 -1
- package/dist/client/assets/automation-detail-DNo-sbc_.js +1 -0
- package/dist/client/assets/automations-CCXftgU_.js +1 -0
- package/dist/client/assets/{avatar-ChRCLY4k.js → avatar-OE2URZfM.js} +1 -1
- package/dist/client/assets/{badge-C4uZcq7J.js → badge-CAg946Xk.js} +1 -1
- package/dist/client/assets/{binder-hd3C3mvD.js → binder-DTBFGqjl.js} +1 -1
- package/dist/client/assets/{breadcrumb-pLMl4xjy.js → breadcrumb-aP02JuZO.js} +1 -1
- package/dist/client/assets/card-RQxLVCBk.js +1 -0
- package/dist/client/assets/chart-D9IwJUjP.js +15 -0
- package/dist/client/assets/{checkbox-D2IG7klY.js → checkbox-DLsMmmhu.js} +1 -1
- package/dist/client/assets/circle-alert-DCE_cWKa.js +1 -0
- package/dist/client/assets/{collapsible-ttq3VbhQ.js → collapsible-CGr-TiAc.js} +1 -1
- package/dist/client/assets/{collection-detail-DoRLjPv6.js → collection-detail-CZQpkHig.js} +5 -5
- package/dist/client/assets/collection-display-button-VOymjalV.js +1 -0
- package/dist/client/assets/{collection-search-Mtc1qP5K.js → collection-search-62vwaqdq.js} +1 -1
- package/dist/client/assets/collection-table-wrapper-DPJfuSg9.js +1 -0
- package/dist/client/assets/{collection-tabs-CHem1-m4.js → collection-tabs-FJx5TF4Z.js} +1 -1
- package/dist/client/assets/{command-DRBqjkmt.js → command-ChmbB2jp.js} +1 -1
- package/dist/client/assets/connect-Cak7aHsQ.js +1 -0
- package/dist/client/assets/connection-card-D9I87KkT.js +1 -0
- package/dist/client/assets/connection-detail-ZRvu6X4P.js +1 -0
- package/dist/client/assets/{connection-status-COvhqytZ.js → connection-status-D_iX92lK.js} +1 -1
- package/dist/client/assets/connections-Bi0oPT3Y.js +1 -0
- package/dist/client/assets/constants-B4Swgi3d.js +1 -0
- package/dist/client/assets/{constants-B9t4Nuz_.js → constants-XtX-WKGm.js} +1 -1
- package/dist/client/assets/{context-CiizXS06.js → context-CtrnP3HC.js} +1 -1
- package/dist/client/assets/{create-organization-dialog-BCMxp6fo.js → create-organization-dialog-DlsDrfHE.js} +1 -1
- package/dist/client/assets/{create-project-dialog-BvxMRX5X.js → create-project-dialog-BV-JjiBR.js} +1 -1
- package/dist/client/assets/{danger-BjSxZinj.js → danger-B3KgXwQ9.js} +1 -1
- package/dist/client/assets/{danger-zone-B2z3wTq9.js → danger-zone-C_4VhnMp.js} +1 -1
- package/dist/client/assets/{dependencies-BkOdHYmE.js → dependencies-BHUeYRA7.js} +1 -1
- package/dist/client/assets/dialog-_XYw8lZC.js +1 -0
- package/dist/client/assets/{dropdown-menu-Cp0O2jCN.js → dropdown-menu-DzFMEBVS.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-CcrlbNZV.js → dynamic-plugin-layout-b0Zt6Dxk.js} +1 -1
- package/dist/client/assets/{editable-task-title-COr46zxY.js → editable-task-title-B7Ktbs3r.js} +1 -1
- package/dist/client/assets/{empty-state-DbRFhzf6.js → empty-state-AMuFIqs3.js} +1 -1
- package/dist/client/assets/{empty-state-SBIKV11G.js → empty-state-D4GX29pL.js} +1 -1
- package/dist/client/assets/env-vars-editor-DTKmdK-v.js +1 -0
- package/dist/client/assets/extract-connection-data-CS_Bn7Ri.js +1 -0
- package/dist/client/assets/{file-browser-B2cQNHIN.js → file-browser-OSAi_CZb.js} +2 -2
- package/dist/client/assets/{form-DPPO-3Tw.js → form-BN7_f2uj.js} +1 -1
- package/dist/client/assets/{general-DDQcxBFZ.js → general-B9J0F1Xq.js} +1 -1
- package/dist/client/assets/{grid-view-BhmPSvr_.js → grid-view-BH674f3N.js} +1 -1
- package/dist/client/assets/home-Dam4fMEZ.js +1 -0
- package/dist/client/assets/index-C-NLwTON.js +1 -0
- package/dist/client/assets/index-CcA_QriT.js +1 -0
- package/dist/client/assets/{index-Bmxys2UV.js → index-Cn8BPdHZ.js} +1 -1
- package/dist/client/assets/{index-B3fUA0k0.js → index-CuSj4QrF.js} +1 -1
- package/dist/client/assets/index-D5cL24p_.css +1 -0
- package/dist/client/assets/{index-BVSHvvtZ.js → index-Da9ggy60.js} +1 -1
- package/dist/client/assets/{index-DO8fUd54.js → index-DsOJvxnb.js} +4 -4
- package/dist/client/assets/{index-D-NeGwUy.js → index-DxP-spTj.js} +1 -1
- package/dist/client/assets/index-MKlLgXIW.js +25 -0
- package/dist/client/assets/{index-B1uuY7UL.js → index-X4FDee1r.js} +1 -1
- package/dist/client/assets/{index-COM-PDLy.js → index-zjV4p_E5.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-x0ce-nmx.js → infiniteQueryObserver-BE0Fq7u7.js} +1 -1
- package/dist/client/assets/{input-BM9bdg-F.js → input-CUT8DBv1.js} +1 -1
- package/dist/client/assets/integration-icon-CVxvM4fR.js +1 -0
- package/dist/client/assets/{label-CnT8WAQY.js → label-iPw5smAw.js} +1 -1
- package/dist/client/assets/{layout-ubFJ5DPd.js → layout-C2ZnDBkW.js} +1 -1
- package/dist/client/assets/{layout-C4PDA52F.js → layout-CA_pUlCy.js} +1 -1
- package/dist/client/assets/login-DJvdi7W3.js +1 -0
- package/dist/client/assets/{logo-upload-Bb5Ay7-T.js → logo-upload-DlKQk0GB.js} +1 -1
- package/dist/client/assets/{markdown-ZobUYaB1.js → markdown-CKKBcXcE.js} +8 -8
- package/dist/client/assets/{mcp-app-renderer-CLfglV2_.js → mcp-app-renderer-IX_OR3wW.js} +2 -2
- package/dist/client/assets/mcp-server-card-Cq5E9kuT.js +1 -0
- package/dist/client/assets/mcp-server-detail-CTGb-hF0.js +2 -0
- package/dist/client/assets/members-CYtrIFR5.js +3 -0
- package/dist/client/assets/{monaco-editor-kjafc2y3.js → monaco-editor-J8rInsT2.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-CtIPN7nQ.js → monitoring-dashboard-edit-6gWIXCOX.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-FD-yc8mV.js → monitoring-dashboard-view-Dt4aILCV.js} +2 -2
- package/dist/client/assets/monitoring-gb_hJ2kW.js +4 -0
- package/dist/client/assets/monitoring-stats-row-Dx_W_1nT.js +28 -0
- package/dist/client/assets/{oauth-callback-wHI3TkEb.js → oauth-callback-COUada1q.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DHfWQd6C.js → oauth-callback-ai-provider-CqS-ybCD.js} +1 -1
- package/dist/client/assets/{org-ai-providers-Cu3Y8hG7.js → org-ai-providers-BDwPbfg4.js} +1 -1
- package/dist/client/assets/page-BrXIXidh.js +1 -0
- package/dist/client/assets/page-s-fs9Bly.js +1 -0
- package/dist/client/assets/{plugin-empty-state-C0KzvXIH.js → plugin-empty-state-CRLH-_5S.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Bh1khfVy.js → plugin-empty-state-Dt2dvxD9.js} +1 -1
- package/dist/client/assets/{plugin-header-ydYJ1Vj6.js → plugin-header-CkWzqJkZ.js} +1 -1
- package/dist/client/assets/{plugin-header-DJbwn5SE.js → plugin-header-DLDBKovk.js} +1 -1
- package/dist/client/assets/plugins-DkI_FXfU.js +1 -0
- package/dist/client/assets/{popover-D1WG-emQ.js → popover-CF3EN_0o.js} +1 -1
- package/dist/client/assets/{project-app-view-D-VHvgqy.js → project-app-view-Boof680i.js} +1 -1
- package/dist/client/assets/project-layout-CxwbtNi5.js +1 -0
- package/dist/client/assets/{project-plugins-BVdloqBu.js → project-plugins-DRIvSpW5.js} +1 -1
- package/dist/client/assets/{projects-list-Z8HiWxIk.js → projects-list-DmvsbHJl.js} +1 -1
- package/dist/client/assets/{registry-layout-B5XpbAHd.js → registry-layout-MGTBGYDW.js} +1 -1
- package/dist/client/assets/registry-utils-Cd3t_Kmp.js +1 -0
- package/dist/client/assets/{reports-layout-Ct8yUpC8.js → reports-layout-Cu0HmCBt.js} +1 -1
- package/dist/client/assets/{reset-password-BXrkGw9C.js → reset-password-Dwr8terU.js} +1 -1
- package/dist/client/assets/{resizable-CqLBllsV.js → resizable-D4LJctEl.js} +1 -1
- package/dist/client/assets/{save-actions-MbSzUbWU.js → save-actions-MzYbolsq.js} +1 -1
- package/dist/client/assets/{scroll-area-BcJ1ckdt.js → scroll-area-B5XbONJS.js} +1 -1
- package/dist/client/assets/{select-RxUFw6pZ.js → select-DRPG5csU.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-DU8qBWLM.js → select-virtual-mcp-B8NgSgPI.js} +1 -1
- package/dist/client/assets/sheet-BQuKOEiL.js +1 -0
- package/dist/client/assets/shell-layout-ZGvfzjfQ.js +3 -0
- package/dist/client/assets/{sidebar-settings-DICq5I_K.js → sidebar-settings-BqDjI96r.js} +1 -1
- package/dist/client/assets/{skeleton-CU7LuZGk.js → skeleton-DJFpR-1P.js} +1 -1
- package/dist/client/assets/{spinner-CpOteR2a.js → spinner-CqAVfcvO.js} +1 -1
- package/dist/client/assets/{store-invite-D2k0Vn6N.js → store-invite-JCf8JSic.js} +1 -1
- package/dist/client/assets/{switch-DyxdcdWl.js → switch-BQjzAGvm.js} +1 -1
- package/dist/client/assets/{table-DyNKuHyS.js → table-DJbHB5IL.js} +1 -1
- package/dist/client/assets/{tabs-XMAGaWgq.js → tabs-CkPDQzeX.js} +1 -1
- package/dist/client/assets/{task-status-DJB3YbbO.js → task-status-wkv2GdSY.js} +1 -1
- package/dist/client/assets/{tasks-panel-XTVNkW83.js → tasks-panel-TN0GeEUK.js} +1 -1
- package/dist/client/assets/tasks-zu-x8h5W.js +1 -0
- package/dist/client/assets/{textarea-BLuscN8X.js → textarea-CTzX43MZ.js} +1 -1
- package/dist/client/assets/{time-range-picker-Bd3fku3n.js → time-range-picker-DNJ6dRiN.js} +1 -1
- package/dist/client/assets/{toggle-group-BrL6C5fG.js → toggle-group-y2h19HHT.js} +1 -1
- package/dist/client/assets/tools-list-Db7zzadA.js +1 -0
- package/dist/client/assets/{tooltip-BLTgyg7W.js → tooltip-XyKE4lZa.js} +1 -1
- package/dist/client/assets/{topbar-portal-_Qqzdv9B.js → topbar-portal-D3fRQWai.js} +1 -1
- package/dist/client/assets/{types-BPYct9bF.js → types-B3niHy47.js} +5 -5
- package/dist/client/assets/{use-automations-BeAHZecx.js → use-automations-C4CL-jAO.js} +1 -1
- package/dist/client/assets/use-binding-BfjFWpEn.js +1 -0
- package/dist/client/assets/{use-collections-C8rLdQUN.js → use-collections-DSWhP4jg.js} +1 -1
- package/dist/client/assets/{use-connection-BNGXvSqD.js → use-connection-DmR852Js.js} +1 -1
- package/dist/client/assets/{use-copy-DPJ8nWWs.js → use-copy-dSR0w-bG.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-BfS4KaKE.js → use-create-virtual-mcp-DXWAjide.js} +1 -1
- package/dist/client/assets/use-infinite-scroll-CvaIKLMy.js +1 -0
- package/dist/client/assets/{use-install-from-registry-BEC7S-53.js → use-install-from-registry-_FQYQGQx.js} +1 -1
- package/dist/client/assets/{use-list-state-DsQajLIu.js → use-list-state-Ck8sSm9J.js} +1 -1
- package/dist/client/assets/{use-llm-IG8InXvX.js → use-llm-BkLbMZPM.js} +1 -1
- package/dist/client/assets/{use-local-storage-C3Bo802w.js → use-local-storage-CxC8ozOe.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D_02f3uO.js → use-mcp-prompts-C-XU_-dc.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-BNoK6dDS.js → use-mcp-resources-Bxkx1Ub1.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-BCCglZve.js → use-mcp-tools-BXmfFmar.js} +1 -1
- package/dist/client/assets/{use-members-Cqa4gqXV.js → use-members-B-Cx3SpJ.js} +1 -1
- package/dist/client/assets/{use-mobile-kAkblq0-.js → use-mobile-O8KVzGuv.js} +1 -1
- package/dist/client/assets/{use-project-DNZXkIib.js → use-project-Bg5pX2Ab.js} +1 -1
- package/dist/client/assets/use-store-discovery-DPE_0zuT.js +1 -0
- package/dist/client/assets/{use-view-mode-Bl6DaWwW.js → use-view-mode-ve-Q_Sd0.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-DoDJBE5n.js → use-virtual-mcp-C9XdHCA_.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DEfXPFTs.js +1 -0
- package/dist/client/assets/{useMutation-CNVq636e.js → useMutation-B_cFG709.js} +1 -1
- package/dist/client/assets/useQuery-D2ShO4od.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-CT40dICu.js +1 -0
- package/dist/client/assets/{user-6WV0RuBu.js → user-rS26WEu1.js} +1 -1
- package/dist/client/assets/workflow-C4-p-dLU.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/node_modules/{xtend → pg}/LICENSE +7 -6
- package/dist/server/node_modules/pg/README.md +95 -0
- package/dist/server/node_modules/pg/esm/index.mjs +20 -0
- package/dist/server/node_modules/pg/lib/client.js +743 -0
- package/dist/server/node_modules/pg/lib/connection-parameters.js +171 -0
- package/dist/server/node_modules/pg/lib/connection.js +221 -0
- package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +122 -0
- package/dist/server/node_modules/pg/lib/crypto/sasl.js +212 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +43 -0
- package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +89 -0
- package/dist/server/node_modules/pg/lib/crypto/utils.js +9 -0
- package/dist/server/node_modules/pg/lib/defaults.js +91 -0
- package/dist/server/node_modules/pg/lib/index.js +73 -0
- package/dist/server/node_modules/pg/lib/native/client.js +323 -0
- package/dist/server/node_modules/pg/lib/native/index.js +2 -0
- package/dist/server/node_modules/pg/lib/native/query.js +165 -0
- package/dist/server/node_modules/pg/lib/query.js +252 -0
- package/dist/server/node_modules/pg/lib/result.js +109 -0
- package/dist/server/node_modules/pg/lib/stream.js +83 -0
- package/dist/server/node_modules/pg/lib/type-overrides.js +35 -0
- package/dist/server/node_modules/pg/lib/utils.js +217 -0
- package/dist/server/node_modules/pg/package.json +76 -0
- package/package.json +1 -1
- package/dist/client/assets/agent-detail-Cda1RjKX.js +0 -2
- package/dist/client/assets/automation-detail-BV87rs7m.js +0 -1
- package/dist/client/assets/automations-Dp0qrLbX.js +0 -1
- package/dist/client/assets/card-B4dTtsmd.js +0 -1
- package/dist/client/assets/chart-Caf0jSbB.js +0 -15
- package/dist/client/assets/collection-display-button-C0A6ba73.js +0 -1
- package/dist/client/assets/collection-tab-CTog7m1d.js +0 -1
- package/dist/client/assets/collection-table-wrapper-Ccujw2gS.js +0 -1
- package/dist/client/assets/connect-CRbH1TYm.js +0 -1
- package/dist/client/assets/connection-card-DXMFAvSL.js +0 -1
- package/dist/client/assets/connection-detail-D-M6vj9q.js +0 -1
- package/dist/client/assets/connections-BZmayWR_.js +0 -1
- package/dist/client/assets/constants-Dr5R1EQY.js +0 -1
- package/dist/client/assets/dialog-CTFHRhvl.js +0 -1
- package/dist/client/assets/env-vars-editor-1feSU4JA.js +0 -1
- package/dist/client/assets/extract-connection-data-adtLKfGW.js +0 -1
- package/dist/client/assets/github-icon-Dp3wHhYE.js +0 -1
- package/dist/client/assets/home-Dxpbp1Bj.js +0 -1
- package/dist/client/assets/icon-picker-BKKuKn6y.js +0 -1
- package/dist/client/assets/index-B_m3AdpY.js +0 -1
- package/dist/client/assets/index-BqlWbrG0.js +0 -1
- package/dist/client/assets/index-C6XH6ylF.js +0 -25
- package/dist/client/assets/index-DmrxmdhV.css +0 -1
- package/dist/client/assets/integration-icon-BrOdBipR.js +0 -1
- package/dist/client/assets/login-CTOJXY_r.js +0 -1
- package/dist/client/assets/mcp-server-card-AL30DdJr.js +0 -1
- package/dist/client/assets/mcp-server-detail-CN2kEGgD.js +0 -2
- package/dist/client/assets/members-CpLusvJM.js +0 -3
- package/dist/client/assets/monitoring-BNAsqD0Y.js +0 -31
- package/dist/client/assets/page-BWMoYp-g.js +0 -1
- package/dist/client/assets/page-Ch5Qzmi-.js +0 -1
- package/dist/client/assets/plugins-D5THwapv.js +0 -1
- package/dist/client/assets/project-layout-Cd8cNifU.js +0 -1
- package/dist/client/assets/readme-viewer-MbTGGbgZ.js +0 -1
- package/dist/client/assets/registry-utils-oSXyNc33.js +0 -1
- package/dist/client/assets/shell-layout-0dnPJSNe.js +0 -3
- package/dist/client/assets/tasks-BJvBlQqj.js +0 -1
- package/dist/client/assets/tools-list-BeUwtNiH.js +0 -1
- package/dist/client/assets/use-binding-DSWv53zN.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BBGNgnIc.js +0 -1
- package/dist/client/assets/useQuery-BeFLqBun.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CdVyznmA.js +0 -1
- package/dist/client/assets/workflow-DUYpxPLh.js +0 -1
- package/dist/server/node_modules/async-exit-hook/CHANGELOG.md +0 -62
- package/dist/server/node_modules/async-exit-hook/index.js +0 -171
- package/dist/server/node_modules/async-exit-hook/license +0 -21
- package/dist/server/node_modules/async-exit-hook/package.json +0 -66
- package/dist/server/node_modules/async-exit-hook/readme.md +0 -118
- package/dist/server/node_modules/pg-int8/LICENSE +0 -13
- package/dist/server/node_modules/pg-int8/README.md +0 -16
- package/dist/server/node_modules/pg-int8/index.js +0 -100
- package/dist/server/node_modules/pg-int8/package.json +0 -24
- package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
- package/dist/server/node_modules/postgres-array/index.js +0 -97
- package/dist/server/node_modules/postgres-array/license +0 -21
- package/dist/server/node_modules/postgres-array/package.json +0 -35
- package/dist/server/node_modules/postgres-array/readme.md +0 -43
- package/dist/server/node_modules/postgres-bytea/index.js +0 -33
- package/dist/server/node_modules/postgres-bytea/license +0 -21
- package/dist/server/node_modules/postgres-bytea/package.json +0 -34
- package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
- package/dist/server/node_modules/postgres-date/index.js +0 -116
- package/dist/server/node_modules/postgres-date/license +0 -21
- package/dist/server/node_modules/postgres-date/package.json +0 -33
- package/dist/server/node_modules/postgres-date/readme.md +0 -49
- package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
- package/dist/server/node_modules/postgres-interval/index.js +0 -125
- package/dist/server/node_modules/postgres-interval/license +0 -21
- package/dist/server/node_modules/postgres-interval/package.json +0 -36
- package/dist/server/node_modules/postgres-interval/readme.md +0 -48
- package/dist/server/node_modules/split2/LICENSE +0 -13
- package/dist/server/node_modules/split2/README.md +0 -85
- package/dist/server/node_modules/split2/bench.js +0 -27
- package/dist/server/node_modules/split2/index.js +0 -141
- package/dist/server/node_modules/split2/package.json +0 -39
- package/dist/server/node_modules/split2/test.js +0 -409
- package/dist/server/node_modules/xtend/.jshintrc +0 -30
- package/dist/server/node_modules/xtend/README.md +0 -32
- package/dist/server/node_modules/xtend/immutable.js +0 -19
- package/dist/server/node_modules/xtend/mutable.js +0 -17
- package/dist/server/node_modules/xtend/package.json +0 -55
- package/dist/server/node_modules/xtend/test.js +0 -103
- /package/dist/client/assets/{readme-viewer-DWnTz46N.css → mcp-server-detail-DWnTz46N.css} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as v,c as O,f as st,j as s,z as ue,w as Je,o as ms,n as Ge,e as at,u as me,x as _t,t as fs,q as ps,K as mt,B as de,ca as Pt,O as Ie,P as It,S as Ze,g as xs,au as hs}from"./index-DO8fUd54.js";import{u as Et}from"./use-project-DNZXkIib.js";import{c as Ot,d as gs,b as vs,a as Dt,D as Lt}from"./dialog-CTFHRhvl.js";import{i as ys}from"./X-CNbskBah.js";import{S as ne}from"./skeleton-CU7LuZGk.js";import{i as bs,u as js,a as Ns,O as Ss}from"./org-ai-providers-Cu3Y8hG7.js";import{A as Tt}from"./avatar-ChRCLY4k.js";import{t as ws,i as rt}from"./Coins01-DWo6Ypxq.js";import{t as Cs}from"./Settings01-CYUXeHtK.js";import{i as As}from"./Zap-BgjTj76q.js";import{a as ks,T as _s,b as Ps,c as Is}from"./tooltip-BLTgyg7W.js";import{i as Es}from"./Check-CuWDIJeM.js";import{a as Os}from"./Copy01-CPHBT83w.js";import{S as De}from"./switch-DyxdcdWl.js";import{S as Ds,a as Ls,d as We,c as Ts}from"./select-RxUFw6pZ.js";import{i as zs}from"./Code01-DZzuHJh9.js";import{s as zt}from"./RefreshCcw01-DckyCUMd.js";import{i as $s}from"./Shield01-CJ-f24yL.js";import{u as Ms}from"./useMutation-CNVq636e.js";import{a as Bs,F as Fe,b as Re,c as Ue,d as Ke,f as Ve,e as Gs}from"./form-DPPO-3Tw.js";import{I as Pe}from"./input-BM9bdg-F.js";import{L as Ws}from"./logo-upload-Bb5Ay7-T.js";import{P as Fs}from"./project-plugins-BVdloqBu.js";import{u as Rs,a as Us,b as Ks,i as ie,r as lt,D as $t,c as Me,d as fe,s as ft,e as pt,Z as Mt,g as Bt,f as Gt,h as Wt,j as ke,k as nt,l as Be,m as it,n as Vs,o as Ys,p as Ft,q as ot,t as ct,v as Rt,w as Hs,x as Ut,y as xt,z as qs,A as Qs,B as Xs,R as Js,S as Zs,C as ea,E as ta,F as Kt,G as sa,H as aa,I as ra,J as la,K as na,L as ia,M as oa,N as ca,O as Le,P as da,Q as ht,T as gt,U as vt,V as ua,W as Vt,X as ma,Y as Ne,_ as fa,$ as pa,a0 as xa,a1 as ha,a2 as ga,a3 as Ye,a4 as va,a5 as Te,a6 as ya,a7 as J,a8 as Yt,a9 as ba,aa as ja,ab as Na,ac as Sa,ad as wa,ae as Ca,af as Aa,ag as ka,ah as _a,ai as Pa,aj as Ia,ak as Ea,al as Oa,am as Da,an as La,ao as Ta,ap as za,aq as $a}from"./chart-Caf0jSbB.js";import{L as _e}from"./label-CnT8WAQY.js";import{B as Ma}from"./badge-C4uZcq7J.js";import{a as Ba,T as He,b as qe,c as Ga}from"./tabs-XMAGaWgq.js";import{i as Wa}from"./AlertCircle-5ZbLDi3s.js";import{s as Ht}from"./Plus-Dto-8y6a.js";import{u as Ae,a as dt,K as Fa}from"./constants-B9t4Nuz_.js";import{b as Ra}from"./use-connection-BNGXvSqD.js";import{b as oe,a as qt}from"./use-mcp-tools-BCCglZve.js";import{u as Ua}from"./use-members-Cqa4gqXV.js";import{c as Ka,A as Va}from"./use-binding-DSWv53zN.js";import"./useQuery-BeFLqBun.js";import"./use-local-storage-C3Bo802w.js";import"./EyeOff-D8njwIM7.js";import"./Eye-DDwMVcxZ.js";import"./Key01-IptFTL_3.js";import"./Trash01-DkXbOnbi.js";import"./card-B4dTtsmd.js";import"./popover-D1WG-emQ.js";import"./use-llm-IG8InXvX.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./index-COM-PDLy.js";import"./ChevronUp-DXMXl76b.js";import"./ChevronDown-D0TXudCx.js";import"./Upload01-BasmYIL8.js";import"./Container-YdffBHg3.js";import"./use-install-from-registry-BEC7S-53.js";import"./extract-connection-data-adtLKfGW.js";import"./constants-Dr5R1EQY.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-oSXyNc33.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-WTkiPysv.js";import"./index-Bmxys2UV.js";import"./use-collections-C8rLdQUN.js";import"./binder-hd3C3mvD.js";const Qt=({size:t=24,color:e="currentColor",...r})=>v.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},v.createElement("path",{d:"M9.354 21c.705.622 1.632 1 2.646 1s1.94-.378 2.646-1M18 8A6 6 0 1 0 6 8c0 3.09-.78 5.206-1.65 6.605-.735 1.18-1.102 1.771-1.089 1.936.015.182.054.252.2.36.133.099.732.099 1.928.099H18.61c1.196 0 1.795 0 1.927-.098.147-.11.186-.179.2-.361.014-.165-.353-.755-1.088-1.936C18.78 13.206 18 11.09 18 8Z"}));Qt.displayName="Bell01";function Ya(t){const e=O.c(26),{activeSection:r,onNavigate:a}=t,{data:l}=st.useSession(),n=l?.user,i=n?.image,o=n?.name??"Profile",d=n?.name??"U";let m;e[0]!==d||e[1]!==i?(m=s.jsx(Tt,{url:i,fallback:d,shape:"circle",size:"2xs",className:"size-4 shrink-0"}),e[0]=d,e[1]=i,e[2]=m):m=e[2];let c;e[3]!==o||e[4]!==m?(c={key:"account.profile",label:o,icon:m},e[3]=o,e[4]=m,e[5]=c):c=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u={key:"account.preferences",label:"Preferences",icon:s.jsx(Cs,{size:14})},e[6]=u):u=e[6];let f;e[7]!==c?(f=[c,u],e[7]=c,e[8]=f):f=e[8];const h=f;let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x={key:"org.general",label:"General",icon:s.jsx(ws,{size:14})},e[9]=x):x=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p={key:"org.plugins",label:"Features",icon:s.jsx(As,{size:14})},e[10]=p):p=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g={key:"org.ai-providers",label:"AI Providers",icon:s.jsx(bs,{size:14})},e[11]=g):g=e[11];let y;e[12]===Symbol.for("react.memo_cache_sentinel")?(y=[x,p,g,{key:"org.billing",label:"Billing",icon:s.jsx(rt,{size:14})}],e[12]=y):y=e[12];const w=y;let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Account"}),e[13]=j):j=e[13];let b;e[14]!==h||e[15]!==r||e[16]!==a?(b=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[j,h.map(C=>s.jsxs("button",{type:"button",onClick:()=>a(C.key),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",r===C.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:C.icon}),s.jsx("span",{className:"truncate",children:C.label})]},C.key))]}),e[14]=h,e[15]=r,e[16]=a,e[17]=b):b=e[17];let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("p",{className:"px-2 py-1.5 text-xs font-semibold text-muted-foreground/60",children:"Organization"}),e[18]=S):S=e[18];let N;e[19]!==r||e[20]!==a?(N=s.jsxs("div",{className:"flex flex-col gap-0.5 px-2",children:[S,w.map(C=>s.jsxs("button",{type:"button",onClick:()=>a(C.key),className:ue("flex items-center gap-2.5 px-2 py-1.5 rounded-md text-sm text-left w-full transition-colors",r===C.key?"bg-accent text-accent-foreground font-medium":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[s.jsx("span",{className:"shrink-0",children:C.icon}),s.jsx("span",{className:"truncate",children:C.label})]},C.key))]}),e[19]=r,e[20]=a,e[21]=N):N=e[21];let A;e[22]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.175.0"]})}),e[22]=A):A=e[22];let k;return e[23]!==b||e[24]!==N?(k=s.jsxs("div",{className:"w-52 shrink-0 border-r border-border bg-sidebar/50 overflow-y-auto py-3 flex flex-col gap-4",children:[b,N,A]}),e[23]=b,e[24]=N,e[25]=k):k=e[25],k}function Ha(){const t=O.c(32),{data:e}=st.useSession(),[r,a]=v.useState(!1),l=e?.user,n=l?.image;let i;t[0]!==l?(i=()=>{l?.id&&navigator.clipboard.writeText(l.id).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})},t[0]=l,t[1]=i):i=t[1];const o=i;let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Profile"})}),t[2]=d):d=t[2];const m=l?.name??"U";let c;t[3]!==m||t[4]!==n?(c=s.jsx(Tt,{url:n,fallback:m,shape:"circle",size:"xl",className:"size-16 shrink-0"}),t[3]=m,t[4]=n,t[5]=c):c=t[5];const u=l?.name??"User";let f;t[6]!==u?(f=s.jsx("span",{className:"text-sm font-semibold text-foreground truncate",children:u}),t[6]=u,t[7]=f):f=t[7];const h=l?.email;let x;t[8]!==h?(x=s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:h}),t[8]=h,t[9]=x):x=t[9];let p;t[10]!==f||t[11]!==x?(p=s.jsxs("div",{className:"flex flex-col gap-1 min-w-0",children:[f,x]}),t[10]=f,t[11]=x,t[12]=p):p=t[12];let g;t[13]!==c||t[14]!==p?(g=s.jsxs("div",{className:"flex items-center gap-4",children:[c,p]}),t[13]=c,t[14]=p,t[15]=g):g=t[15];let y;t[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("p",{className:"py-4 text-base font-semibold text-foreground border-b border-border",children:"User ID"}),t[16]=y):y=t[16];let w;t[17]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("p",{className:"text-sm text-muted-foreground",children:"User ID"}),t[17]=w):w=t[17];const j=l?.id;let b;t[18]!==j?(b=s.jsx("span",{className:"font-mono text-sm",children:j}),t[18]=j,t[19]=b):b=t[19];let S;t[20]!==r?(S=r?s.jsx(Es,{size:14,className:"text-green-600 shrink-0"}):s.jsx(Os,{size:14,className:"shrink-0 opacity-70 group-hover:opacity-100 transition-opacity"}),t[20]=r,t[21]=S):S=t[21];let N;t[22]!==o||t[23]!==b||t[24]!==S?(N=s.jsx(ks,{asChild:!0,children:s.jsxs("button",{type:"button",onClick:o,className:"group flex items-center gap-2 text-muted-foreground hover:text-foreground transition-colors",children:[b,S]})}),t[22]=o,t[23]=b,t[24]=S,t[25]=N):N=t[25];let A;t[26]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(_s,{side:"left",children:s.jsx("p",{className:"text-xs",children:"Copy user ID"})}),t[26]=A):A=t[26];let k;t[27]!==N?(k=s.jsxs("div",{className:"flex flex-col",children:[y,s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4",children:[w,s.jsx(Ps,{children:s.jsxs(Is,{children:[N,A]})})]})]}),t[27]=N,t[28]=k):k=t[28];let C;return t[29]!==k||t[30]!==g?(C=s.jsxs("div",{className:"flex flex-col gap-8",children:[d,g,k]}),t[29]=k,t[30]=g,t[31]=C):C=t[31],C}function Oe(t){const e=O.c(27),{icon:r,label:a,description:l,control:n,onClick:i,disabled:o}=t,d=o?void 0:i,m=i?"button":void 0,c=i&&!o?0:void 0;let u;e[0]!==o||e[1]!==i?(u=i&&!o?S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),i())}:void 0,e[0]=o,e[1]=i,e[2]=u):u=e[2];const f=i&&!o?"pointer":void 0;let h;e[3]!==f?(h={cursor:f},e[3]=f,e[4]=h):h=e[4];let x;e[5]!==r?(x=s.jsx("span",{className:"text-muted-foreground mt-0.5 shrink-0",children:r}),e[5]=r,e[6]=x):x=e[6];let p;e[7]!==a?(p=s.jsx("p",{className:"text-sm font-medium text-foreground",children:a}),e[7]=a,e[8]=p):p=e[8];let g;e[9]!==l?(g=s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:l}),e[9]=l,e[10]=g):g=e[10];let y;e[11]!==p||e[12]!==g?(y=s.jsxs("div",{className:"min-w-0",children:[p,g]}),e[11]=p,e[12]=g,e[13]=y):y=e[13];let w;e[14]!==y||e[15]!==x?(w=s.jsxs("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[x,y]}),e[14]=y,e[15]=x,e[16]=w):w=e[16];let j;e[17]!==n?(j=s.jsx("div",{onClick:qa,className:"shrink-0",children:n}),e[17]=n,e[18]=j):j=e[18];let b;return e[19]!==d||e[20]!==w||e[21]!==j||e[22]!==m||e[23]!==c||e[24]!==u||e[25]!==h?(b=s.jsxs("div",{className:"flex items-center justify-between gap-6 py-4 border-b border-border last:border-0",onClick:d,role:m,tabIndex:c,onKeyDown:u,style:h,children:[w,j]}),e[19]=d,e[20]=w,e[21]=j,e[22]=m,e[23]=c,e[24]=u,e[25]=h,e[26]=b):b=e[26],b}function qa(t){return t.stopPropagation()}function yt(){const t=O.c(47),[e,r]=js();let a;t[0]!==r?(a=async _=>{if(_&&await Notification.requestPermission()!=="granted"){Je.error("Notifications denied. Please enable them in your browser settings."),r(Ja);return}r(E=>({...E,enableNotifications:_}))},t[0]=r,t[1]=a):a=t[1];const l=a;let n;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Preferences"})}),t[2]=n):n=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(zs,{size:16}),t[3]=i):i=t[3];let o;t[4]!==r?(o=()=>r(Xa),t[4]=r,t[5]=o):o=t[5];let d;t[6]!==r?(d=_=>r(E=>({...E,devMode:_})),t[6]=r,t[7]=d):d=t[7];let m;t[8]!==e.devMode||t[9]!==d?(m=s.jsx(De,{checked:e.devMode,onCheckedChange:d}),t[8]=e.devMode,t[9]=d,t[10]=m):m=t[10];let c;t[11]!==o||t[12]!==m?(c=s.jsx(Oe,{icon:i,label:"Developer Mode",description:"Show technical details like JSON input/output for tool calls.",onClick:o,control:m}),t[11]=o,t[12]=m,t[13]=c):c=t[13];let u;t[14]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Qt,{size:16}),t[14]=u):u=t[14];let f;t[15]!==l||t[16]!==e.enableNotifications?(f=s.jsx(Oe,{icon:u,label:"Notifications",description:"Play a sound and show a notification when chat messages complete while the app is unfocused.",disabled:typeof Notification>"u",onClick:()=>l(!e.enableNotifications),control:s.jsx(De,{disabled:typeof Notification>"u",checked:e.enableNotifications,onCheckedChange:l})}),t[15]=l,t[16]=e.enableNotifications,t[17]=f):f=t[17];let h;t[18]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(zt,{size:16}),t[18]=h):h=t[18];let x;t[19]!==r?(x=()=>r(Qa),t[19]=r,t[20]=x):x=t[20];let p;t[21]!==r?(p=_=>r(E=>({...E,experimentalAutomations:_})),t[21]=r,t[22]=p):p=t[22];let g;t[23]!==e.experimentalAutomations||t[24]!==p?(g=s.jsx(De,{checked:e.experimentalAutomations,onCheckedChange:p}),t[23]=e.experimentalAutomations,t[24]=p,t[25]=g):g=t[25];let y;t[26]!==x||t[27]!==g?(y=s.jsx(Oe,{icon:h,label:"Experimental: Automations",description:"Enable the Automations feature in the sidebar. This is an experimental feature under active development.",onClick:x,control:g}),t[26]=x,t[27]=g,t[28]=y):y=t[28];let w;t[29]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx($s,{size:16}),t[29]=w):w=t[29];let j;t[30]!==r?(j=_=>r(E=>({...E,toolApprovalLevel:_})),t[30]=r,t[31]=j):j=t[31];let b;t[32]===Symbol.for("react.memo_cache_sentinel")?(b={none:"Always ask",readonly:"Skip read-only",yolo:"Auto-approve all"},t[32]=b):b=t[32];const S=b[e.toolApprovalLevel];let N;t[33]!==S?(N=s.jsx(Ls,{className:"w-36",children:s.jsx("span",{children:S})}),t[33]=S,t[34]=N):N=t[34];let A;t[35]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(We,{value:"none",textValue:"Always ask",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Always ask"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Require approval for all tool calls"})]})}),t[35]=A):A=t[35];let k;t[36]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(We,{value:"readonly",textValue:"Skip read-only",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Skip read-only"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),t[36]=k):k=t[36];let C;t[37]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsxs(Ts,{children:[A,k,s.jsx(We,{value:"yolo",textValue:"Auto-approve all",children:s.jsxs("div",{className:"flex flex-col gap-0.5",children:[s.jsx("span",{className:"font-medium",children:"Auto-approve all"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all tools without approval"})]})})]}),t[37]=C):C=t[37];let P;t[38]!==e.toolApprovalLevel||t[39]!==j||t[40]!==N?(P=s.jsx(Oe,{icon:w,label:"Tool Approval",description:"Choose when to require approval before tools execute.",control:s.jsxs(Ds,{value:e.toolApprovalLevel,onValueChange:j,children:[N,C]})}),t[38]=e.toolApprovalLevel,t[39]=j,t[40]=N,t[41]=P):P=t[41];let D;return t[42]!==y||t[43]!==P||t[44]!==c||t[45]!==f?(D=s.jsxs("div",{className:"flex flex-col gap-6",children:[n,s.jsxs("div",{className:"flex flex-col",children:[c,f,y,P]})]}),t[42]=y,t[43]=P,t[44]=c,t[45]=f,t[46]=D):D=t[46],D}function Qa(t){return{...t,experimentalAutomations:!t.experimentalAutomations}}function Xa(t){return{...t,devMode:!t.devMode}}function Ja(t){return{...t,enableNotifications:!1}}const Za=ms({name:Ge().min(1,"Name is required").max(255,"Name is too long"),slug:Ge().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:Ge().optional()});function er(){const t=at(),{org:e,project:r}=me(),a=_t(),[l,n]=v.useState(!1),i=fs({resolver:ps(Za),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),o=Ms({mutationFn:async c=>{const u={name:c.name,slug:c.slug};c.logo&&(u.logo=c.logo);const f=await st.organization.update({organizationId:e.id,data:u});if(f?.error)throw new Error(f.error.message||"Failed to update organization");return f},onSuccess:c=>{a.invalidateQueries({queryKey:mt.organizations()}),a.invalidateQueries({queryKey:mt.activeOrganization(e.slug)}),Je.success("Organization settings updated successfully"),c?.data?.slug&&c.data.slug!==e.slug&&t({to:"/$org/$project/settings",params:{org:c.data.slug,project:r.slug}})},onError:c=>{Je.error(c instanceof Error?c.message:"Failed to update organization")},onSettled:()=>{n(!1)}}),d=c=>{n(!0),o.mutate(c)},m=i.formState.isDirty;return s.jsx(Bs,{...i,children:s.jsxs("form",{onSubmit:i.handleSubmit(d),className:"space-y-6",children:[s.jsx(Fe,{control:i.control,name:"name",render:({field:c})=>s.jsxs(Re,{children:[s.jsx(Ue,{children:"Organization Name"}),s.jsx(Ke,{children:s.jsx(Pe,{placeholder:"My Organization",...c,disabled:l})}),s.jsx(Ve,{})]})}),s.jsx(Fe,{control:i.control,name:"slug",render:({field:c})=>s.jsxs(Re,{children:[s.jsx(Ue,{children:"Organization Slug"}),s.jsx(Ke,{children:s.jsx(Pe,{placeholder:"my-organization",...c,disabled:l,onChange:u=>{const f=u.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");c.onChange(f)}})}),s.jsx(Gs,{children:"Used in URLs. Only lowercase letters, numbers, and hyphens are allowed."}),s.jsx(Ve,{})]})}),s.jsx(Fe,{control:i.control,name:"logo",render:({field:c})=>s.jsxs(Re,{children:[s.jsx(Ue,{children:"Logo"}),s.jsx(Ke,{children:s.jsx(Ws,{value:c.value,onChange:c.onChange,name:i.watch("name"),disabled:l})}),s.jsx(Ve,{})]})}),s.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[s.jsx(de,{type:"submit",disabled:!m||l,className:"min-w-24",children:l?"Saving...":"Save Changes"}),m&&s.jsx(de,{type:"button",variant:"outline",onClick:()=>i.reset(),disabled:l,children:"Cancel"})]})]})})}function tr(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsx("div",{children:s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Organization"})}),s.jsx(er,{})]}),t[0]=e):e=t[0],e}var bt=function(e,r){for(var a=arguments.length,l=new Array(a>2?a-2:0),n=2;n<a;n++)l[n-2]=arguments[n];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!e))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(r.replace(/%s/g,()=>l[i++]))}},sr=["x1","y1","x2","y2","key"],ar=["offset"],rr=["xAxisId","yAxisId"],lr=["xAxisId","yAxisId"];function jt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,a)}return r}function Z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jt(Object(r),!0).forEach(function(a){nr(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function nr(t,e,r){return(e=ir(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ir(t){var e=or(t,"string");return typeof e=="symbol"?e:e+""}function or(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pe(){return pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},pe.apply(null,arguments)}function ze(t,e){if(t==null)return{};var r,a,l=cr(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(a=0;a<n.length;a++)r=n[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function cr(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var dr=t=>{var{fill:e}=t;if(!e||e==="none")return null;var{fillOpacity:r,x:a,y:l,width:n,height:i,ry:o}=t;return v.createElement("rect",{x:a,y:l,ry:o,width:n,height:i,stroke:"none",fill:e,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Xt(t){var{option:e,lineItemProps:r}=t,a;if(v.isValidElement(e))a=v.cloneElement(e,r);else if(typeof e=="function")a=e(r);else{var l,{x1:n,y1:i,x2:o,y2:d,key:m}=r,c=ze(r,sr),u=(l=nt(c))!==null&&l!==void 0?l:{},{offset:f}=u,h=ze(u,ar);a=v.createElement("line",pe({},h,{x1:n,y1:i,x2:o,y2:d,fill:"none",key:m}))}return a}function ur(t){var{x:e,width:r,horizontal:a=!0,horizontalPoints:l}=t;if(!a||!l||!l.length)return null;var{xAxisId:n,yAxisId:i}=t,o=ze(t,rr),d=l.map((m,c)=>{var u=Z(Z({},o),{},{x1:e,y1:m,x2:e+r,y2:m,key:"line-".concat(c),index:c});return v.createElement(Xt,{key:"line-".concat(c),option:a,lineItemProps:u})});return v.createElement("g",{className:"recharts-cartesian-grid-horizontal"},d)}function mr(t){var{y:e,height:r,vertical:a=!0,verticalPoints:l}=t;if(!a||!l||!l.length)return null;var{xAxisId:n,yAxisId:i}=t,o=ze(t,lr),d=l.map((m,c)=>{var u=Z(Z({},o),{},{x1:m,y1:e,x2:m,y2:e+r,key:"line-".concat(c),index:c});return v.createElement(Xt,{option:a,lineItemProps:u,key:"line-".concat(c)})});return v.createElement("g",{className:"recharts-cartesian-grid-vertical"},d)}function fr(t){var{horizontalFill:e,fillOpacity:r,x:a,y:l,width:n,height:i,horizontalPoints:o,horizontal:d=!0}=t;if(!d||!e||!e.length||o==null)return null;var m=o.map(u=>Math.round(u+l-l)).sort((u,f)=>u-f);l!==m[0]&&m.unshift(0);var c=m.map((u,f)=>{var h=m[f+1],x=h==null,p=x?l+i-u:h-u;if(p<=0)return null;var g=f%e.length;return v.createElement("rect",{key:"react-".concat(f),y:u,x:a,height:p,width:n,stroke:"none",fill:e[g],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},c)}function pr(t){var{vertical:e=!0,verticalFill:r,fillOpacity:a,x:l,y:n,width:i,height:o,verticalPoints:d}=t;if(!e||!r||!r.length)return null;var m=d.map(u=>Math.round(u+l-l)).sort((u,f)=>u-f);l!==m[0]&&m.unshift(0);var c=m.map((u,f)=>{var h=m[f+1],x=h==null,p=x?l+i-u:h-u;if(p<=0)return null;var g=f%r.length;return v.createElement("rect",{key:"react-".concat(f),x:u,y:n,width:p,height:o,stroke:"none",fill:r[g],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return v.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},c)}var xr=(t,e)=>{var{xAxis:r,width:a,height:l,offset:n}=t;return Bt(Gt(Z(Z(Z({},ke),r),{},{ticks:Wt(r),viewBox:{x:0,y:0,width:a,height:l}})),n.left,n.left+n.width,e)},hr=(t,e)=>{var{yAxis:r,width:a,height:l,offset:n}=t;return Bt(Gt(Z(Z(Z({},ke),r),{},{ticks:Wt(r),viewBox:{x:0,y:0,width:a,height:l}})),n.top,n.top+n.height,e)},gr={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:$t.grid};function Jt(t){var e=Rs(),r=Us(),a=Ks(),l=Z(Z({},lt(t,gr)),{},{x:ie(t.x)?t.x:a.left,y:ie(t.y)?t.y:a.top,width:ie(t.width)?t.width:a.width,height:ie(t.height)?t.height:a.height}),{xAxisId:n,yAxisId:i,x:o,y:d,width:m,height:c,syncWithTicks:u,horizontalValues:f,verticalValues:h}=l,x=Me(),p=fe(C=>ft(C,"xAxis",n,x)),g=fe(C=>ft(C,"yAxis",i,x));if(!pt(m)||!pt(c)||!ie(o)||!ie(d))return null;var y=l.verticalCoordinatesGenerator||xr,w=l.horizontalCoordinatesGenerator||hr,{horizontalPoints:j,verticalPoints:b}=l;if((!j||!j.length)&&typeof w=="function"){var S=f&&f.length,N=w({yAxis:g?Z(Z({},g),{},{ticks:S?f:g.ticks}):void 0,width:e??m,height:r??c,offset:a},S?!0:u);bt(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof N,"]")),Array.isArray(N)&&(j=N)}if((!b||!b.length)&&typeof y=="function"){var A=h&&h.length,k=y({xAxis:p?Z(Z({},p),{},{ticks:A?h:p.ticks}):void 0,width:e??m,height:r??c,offset:a},A?!0:u);bt(Array.isArray(k),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof k,"]")),Array.isArray(k)&&(b=k)}return v.createElement(Mt,{zIndex:l.zIndex},v.createElement("g",{className:"recharts-cartesian-grid"},v.createElement(dr,{fill:l.fill,fillOpacity:l.fillOpacity,x:l.x,y:l.y,width:l.width,height:l.height,ry:l.ry}),v.createElement(fr,pe({},l,{horizontalPoints:j})),v.createElement(pr,pe({},l,{verticalPoints:b})),v.createElement(ur,pe({},l,{offset:a,horizontalPoints:j,xAxis:p,yAxis:g})),v.createElement(mr,pe({},l,{offset:a,verticalPoints:b,xAxis:p,yAxis:g}))))}Jt.displayName="CartesianGrid";var Zt=(t,e,r)=>Ft(t,"xAxis",ot(t,e),r),es=(t,e,r)=>Rt(t,"xAxis",ot(t,e),r),ts=(t,e,r)=>Ft(t,"yAxis",ct(t,e),r),ss=(t,e,r)=>Rt(t,"yAxis",ct(t,e),r),vr=Be([it,Zt,ts,es,ss],(t,e,r,a,l)=>Ut(t,"xAxis")?xt(e,a,!1):xt(r,l,!1)),yr=(t,e)=>e,as=Be([qs,yr],(t,e)=>t.filter(r=>r.type==="area").find(r=>r.id===e)),rs=t=>{var e=it(t),r=Ut(e,"xAxis");return r?"yAxis":"xAxis"},br=(t,e)=>{var r=rs(t);return r==="yAxis"?ct(t,e):ot(t,e)},jr=(t,e,r)=>Qs(t,rs(t),br(t,e),r),Nr=Be([as,jr],(t,e)=>{var r;if(!(t==null||e==null)){var{stackId:a}=t,l=Hs(t);if(!(a==null||l==null)){var n=(r=e[a])===null||r===void 0?void 0:r.stackedData,i=n?.find(o=>o.key===l);if(i!=null)return i.map(o=>[o[0],o[1]])}}}),Sr=Be([it,Zt,ts,es,ss,Nr,Vs,vr,as,Ys],(t,e,r,a,l,n,i,o,d,m)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:f}=i;if(!(d==null||t!=="horizontal"&&t!=="vertical"||e==null||r==null||a==null||l==null||a.length===0||l.length===0||o==null)){var{data:h}=d,x;if(h&&h.length>0?x=h:x=c?.slice(u,f+1),x!=null)return Rr({layout:t,xAxis:e,yAxis:r,xAxisTicks:a,yAxisTicks:l,dataStartIndex:u,areaSettings:d,stackedData:n,displayedData:x,chartBaseValue:m,bandSize:o})}}),wr=["id"],Cr=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function xe(){return xe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},xe.apply(null,arguments)}function ls(t,e){if(t==null)return{};var r,a,l=Ar(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(a=0;a<n.length;a++)r=n[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Ar(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Nt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,a)}return r}function Se(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nt(Object(r),!0).forEach(function(a){kr(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function kr(t,e,r){return(e=_r(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _r(t){var e=Pr(t,"string");return typeof e=="symbol"?e:e+""}function Pr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $e(t,e){return t&&t!=="none"?t:e}var Ir=t=>{var{dataKey:e,name:r,stroke:a,fill:l,legendType:n,hide:i}=t;return[{inactive:i,dataKey:e,type:n,color:$e(a,l),value:Kt(r,e),payload:t}]},Er=v.memo(t=>{var{dataKey:e,data:r,stroke:a,strokeWidth:l,fill:n,name:i,hide:o,unit:d,tooltipType:m,id:c}=t,u={dataDefinedOnItem:r,getPosition:aa,settings:{stroke:a,strokeWidth:l,fill:n,dataKey:e,nameKey:void 0,name:Kt(i,e),hide:o,type:m,color:$e(a,n),unit:d,graphicalItemId:c}};return v.createElement(sa,{tooltipEntrySettings:u})});function Or(t){var{clipPathId:e,points:r,props:a}=t,{needClip:l,dot:n,dataKey:i}=a,o=nt(a);return v.createElement(va,{points:r,dot:n,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:i,baseProps:o,needClip:l,clipPathId:e})}function Dr(t){var{showLabels:e,children:r,points:a}=t,l=a.map(n=>{var i,o,d={x:(i=n.x)!==null&&i!==void 0?i:0,y:(o=n.y)!==null&&o!==void 0?o:0,width:0,lowerWidth:0,upperWidth:0,height:0};return Se(Se({},d),{},{value:n.value,payload:n.payload,parentViewBox:void 0,viewBox:d,fill:void 0})});return v.createElement(ha,{value:e?l:void 0},r)}function St(t){var{points:e,baseLine:r,needClip:a,clipPathId:l,props:n}=t,{layout:i,type:o,stroke:d,connectNulls:m,isRange:c}=n,{id:u}=n,f=ls(n,wr),h=nt(f),x=ga(f);return v.createElement(v.Fragment,null,e?.length>1&&v.createElement(Le,{clipPath:a?"url(#clipPath-".concat(l,")"):void 0},v.createElement(Ye,xe({},x,{id:u,points:e,connectNulls:m,type:o,baseLine:r,layout:i,stroke:"none",className:"recharts-area-area"})),d!=="none"&&v.createElement(Ye,xe({},h,{className:"recharts-area-curve",layout:i,type:o,connectNulls:m,fill:"none",points:e})),d!=="none"&&c&&Array.isArray(r)&&v.createElement(Ye,xe({},h,{className:"recharts-area-curve",layout:i,type:o,connectNulls:m,fill:"none",points:r}))),v.createElement(Or,{points:e,props:f,clipPathId:l}))}function Lr(t){var e,r,{alpha:a,baseLine:l,points:n,strokeWidth:i}=t,o=(e=n[0])===null||e===void 0?void 0:e.y,d=(r=n[n.length-1])===null||r===void 0?void 0:r.y;if(!Te(o)||!Te(d))return null;var m=a*Math.abs(o-d),c=Math.max(...n.map(u=>u.x||0));return ie(l)?c=Math.max(l,c):l&&Array.isArray(l)&&l.length&&(c=Math.max(...l.map(u=>u.x||0),c)),ie(c)?v.createElement("rect",{x:0,y:o<d?o:o-m,width:c+(i?parseInt("".concat(i),10):1),height:Math.floor(m)}):null}function Tr(t){var e,r,{alpha:a,baseLine:l,points:n,strokeWidth:i}=t,o=(e=n[0])===null||e===void 0?void 0:e.x,d=(r=n[n.length-1])===null||r===void 0?void 0:r.x;if(!Te(o)||!Te(d))return null;var m=a*Math.abs(o-d),c=Math.max(...n.map(u=>u.y||0));return ie(l)?c=Math.max(l,c):l&&Array.isArray(l)&&l.length&&(c=Math.max(...l.map(u=>u.y||0),c)),ie(c)?v.createElement("rect",{x:o<d?o:o-m,y:0,width:m,height:Math.floor(c+(i?parseInt("".concat(i),10):1))}):null}function zr(t){var{alpha:e,layout:r,points:a,baseLine:l,strokeWidth:n}=t;return r==="vertical"?v.createElement(Lr,{alpha:e,points:a,baseLine:l,strokeWidth:n}):v.createElement(Tr,{alpha:e,points:a,baseLine:l,strokeWidth:n})}function $r(t){var{needClip:e,clipPathId:r,props:a,previousPointsRef:l,previousBaselineRef:n}=t,{points:i,baseLine:o,isAnimationActive:d,animationBegin:m,animationDuration:c,animationEasing:u,onAnimationStart:f,onAnimationEnd:h}=a,x=v.useMemo(()=>({points:i,baseLine:o}),[i,o]),p=ua(x,"recharts-area-"),g=Vt(),[y,w]=v.useState(!1),j=!y,b=v.useCallback(()=>{typeof h=="function"&&h(),w(!1)},[h]),S=v.useCallback(()=>{typeof f=="function"&&f(),w(!0)},[f]);if(g==null)return null;var N=l.current,A=n.current;return v.createElement(Dr,{showLabels:j,points:i},a.children,v.createElement(ma,{animationId:p,begin:m,duration:c,isActive:d,easing:u,onAnimationEnd:b,onAnimationStart:S,key:p},k=>{if(N){var C=N.length/i.length,P=k===1?i:i.map((_,E)=>{var T=Math.floor(E*C);if(N[T]){var L=N[T];return Se(Se({},_),{},{x:Ne(L.x,_.x,k),y:Ne(L.y,_.y,k)})}return _}),D;return ie(o)?D=Ne(A,o,k):fa(o)||pa(o)?D=Ne(A,0,k):D=o.map((_,E)=>{var T=Math.floor(E*C);if(Array.isArray(A)&&A[T]){var L=A[T];return Se(Se({},_),{},{x:Ne(L.x,_.x,k),y:Ne(L.y,_.y,k)})}return _}),k>0&&(l.current=P,n.current=D),v.createElement(St,{points:P,baseLine:D,needClip:e,clipPathId:r,props:a})}return k>0&&(l.current=i,n.current=o),v.createElement(Le,null,d&&v.createElement("defs",null,v.createElement("clipPath",{id:"animationClipPath-".concat(r)},v.createElement(zr,{alpha:k,points:i,baseLine:o,layout:g,strokeWidth:a.strokeWidth}))),v.createElement(Le,{clipPath:"url(#animationClipPath-".concat(r,")")},v.createElement(St,{points:i,baseLine:o,needClip:e,clipPathId:r,props:a})))}),v.createElement(xa,{label:a.label}))}function Mr(t){var{needClip:e,clipPathId:r,props:a}=t,l=v.useRef(null),n=v.useRef();return v.createElement($r,{needClip:e,clipPathId:r,props:a,previousPointsRef:l,previousBaselineRef:n})}class Br extends v.PureComponent{render(){var{hide:e,dot:r,points:a,className:l,top:n,left:i,needClip:o,xAxisId:d,yAxisId:m,width:c,height:u,id:f,baseLine:h,zIndex:x}=this.props;if(e)return null;var p=Pt("recharts-area",l),g=f,{r:y,strokeWidth:w}=oa(r),j=ca(r),b=y*2+w,S=o?"url(#clipPath-".concat(j?"":"dots-").concat(g,")"):void 0;return v.createElement(Mt,{zIndex:x},v.createElement(Le,{className:p},o&&v.createElement("defs",null,v.createElement(da,{clipPathId:g,xAxisId:d,yAxisId:m}),!j&&v.createElement("clipPath",{id:"clipPath-dots-".concat(g)},v.createElement("rect",{x:i-b/2,y:n-b/2,width:c+b,height:u+b}))),v.createElement(Mr,{needClip:o,clipPathId:g,props:this.props})),v.createElement(ht,{points:a,mainColor:$e(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}),this.props.isRange&&Array.isArray(h)&&v.createElement(ht,{points:h,mainColor:$e(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:S}))}}var Gr={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:$t.area};function Wr(t){var e,{activeDot:r,animationBegin:a,animationDuration:l,animationEasing:n,connectNulls:i,dot:o,fill:d,fillOpacity:m,hide:c,isAnimationActive:u,legendType:f,stroke:h,xAxisId:x,yAxisId:p}=t,g=ls(t,Cr),y=ra(),w=la(),{needClip:j}=na(x,p),b=Me(),{points:S,isRange:N,baseLine:A}=(e=fe(E=>Sr(E,t.id,b)))!==null&&e!==void 0?e:{},k=ia();if(y!=="horizontal"&&y!=="vertical"||k==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:C,width:P,x:D,y:_}=k;return!S||!S.length?null:v.createElement(Br,xe({},g,{activeDot:r,animationBegin:a,animationDuration:l,animationEasing:n,baseLine:A,connectNulls:i,dot:o,fill:d,fillOpacity:m,height:C,hide:c,layout:y,isAnimationActive:u,isRange:N,legendType:f,needClip:j,points:S,stroke:h,width:P,left:D,top:_,xAxisId:x,yAxisId:p}))}var Fr=(t,e,r,a,l)=>{var n=r??e;if(ie(n))return n;var i=t==="horizontal"?l:a,o=i.scale.domain();if(i.type==="number"){var d=Math.max(o[0],o[1]),m=Math.min(o[0],o[1]);return n==="dataMin"?m:n==="dataMax"||d<0?d:Math.max(Math.min(o[0],o[1]),0)}return n==="dataMin"?o[0]:n==="dataMax"?o[1]:o[0]};function Rr(t){var{areaSettings:{connectNulls:e,baseValue:r,dataKey:a},stackedData:l,layout:n,chartBaseValue:i,xAxis:o,yAxis:d,displayedData:m,dataStartIndex:c,xAxisTicks:u,yAxisTicks:f,bandSize:h}=t,x=l&&l.length,p=Fr(n,i,r,o,d),g=n==="horizontal",y=!1,w=m.map((b,S)=>{var N,A,k,C;if(x)C=l[c+S];else{var P=gt(b,a);Array.isArray(P)?(C=P,y=!0):C=[p,P]}var D=(N=(A=C)===null||A===void 0?void 0:A[1])!==null&&N!==void 0?N:null,_=D==null||x&&!e&>(b,a)==null;if(g){var E;return{x:vt({axis:o,ticks:u,bandSize:h,entry:b,index:S}),y:_?null:(E=d.scale.map(D))!==null&&E!==void 0?E:null,value:C,payload:b}}return{x:_?null:(k=o.scale.map(D))!==null&&k!==void 0?k:null,y:vt({axis:d,ticks:f,bandSize:h,entry:b,index:S}),value:C,payload:b}}),j;return x||y?j=w.map(b=>{var S,N=Array.isArray(b.value)?b.value[0]:null;if(g){var A;return{x:b.x,y:N!=null&&b.y!=null&&(A=d.scale.map(N))!==null&&A!==void 0?A:null,payload:b.payload}}return{x:N!=null&&(S=o.scale.map(N))!==null&&S!==void 0?S:null,y:b.y,payload:b.payload}}):j=g?d.scale.map(p):o.scale.map(p),{points:w,baseLine:j??0,isRange:y}}function Ur(t){var e=lt(t,Gr),r=Me();return v.createElement(Js,{id:e.id,type:"area"},a=>v.createElement(v.Fragment,null,v.createElement(Zs,{legendPayload:Ir(e)}),v.createElement(Er,{dataKey:e.dataKey,data:e.data,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,unit:e.unit,tooltipType:e.tooltipType,id:a}),v.createElement(ea,{type:"area",id:a,data:e.data,dataKey:e.dataKey,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,stackId:ta(e.stackId),hide:e.hide,barSize:void 0,baseValue:e.baseValue,isPanorama:r,connectNulls:e.connectNulls}),v.createElement(Wr,xe({},e,{id:a}))))}var ns=v.memo(Ur,Xs);ns.displayName="Area";var Kr=["type"],Vr=["dangerouslySetInnerHTML","ticks","scale"],Yr=["id","scale"];function et(){return et=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},et.apply(null,arguments)}function wt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,a)}return r}function Ct(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?wt(Object(r),!0).forEach(function(a){Hr(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Hr(t,e,r){return(e=qr(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qr(t){var e=Qr(t,"string");return typeof e=="symbol"?e:e+""}function Qr(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function tt(t,e){if(t==null)return{};var r,a,l=Xr(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(a=0;a<n.length;a++)r=n[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Xr(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function Jr(t){var e=Yt(),r=v.useRef(null),a=Vt(),{type:l}=t,n=tt(t,Kr),i=Ea(a,"yAxis",l),o=v.useMemo(()=>{if(i!=null)return Ct(Ct({},n),{},{type:i})},[i,n]);return v.useLayoutEffect(()=>{o!=null&&(r.current===null?e(ba(o)):r.current!==o&&e(ja({prev:r.current,next:o})),r.current=o)},[o,e]),v.useLayoutEffect(()=>()=>{r.current&&(e(Na(r.current)),r.current=null)},[e]),null}function Zr(t){var{yAxisId:e,className:r,width:a,label:l}=t,n=v.useRef(null),i=v.useRef(null),o=fe(Sa),d=Me(),m=Yt(),c="yAxis",u=fe(N=>wa(N,e)),f=fe(N=>Ca(N,e)),h=fe(N=>Aa(N,c,e,d)),x=fe(N=>ka(N,e));if(v.useLayoutEffect(()=>{if(!(a!=="auto"||!u||_a(l)||v.isValidElement(l)||x==null)){var N=n.current;if(N){var A=N.getCalculatedWidth();Math.round(u.width)!==Math.round(A)&&m(Pa({id:e,width:A}))}}},[h,u,m,l,e,a,x]),u==null||f==null||x==null)return null;var{dangerouslySetInnerHTML:p,ticks:g,scale:y}=t,w=tt(t,Vr),{id:j,scale:b}=x,S=tt(x,Yr);return v.createElement(Ia,et({},w,S,{ref:n,labelRef:i,x:f.x,y:f.y,tickTextProps:a==="auto"?{width:void 0}:{width:a},width:u.width,height:u.height,className:Pt("recharts-".concat(c," ").concat(c),r),viewBox:o,ticks:h,axisType:c,axisId:e}))}var el={allowDataOverflow:J.allowDataOverflow,allowDecimals:J.allowDecimals,allowDuplicatedCategory:J.allowDuplicatedCategory,angle:J.angle,axisLine:ke.axisLine,hide:!1,includeHidden:J.includeHidden,interval:J.interval,label:!1,minTickGap:J.minTickGap,mirror:J.mirror,orientation:J.orientation,padding:J.padding,reversed:J.reversed,scale:J.scale,tick:J.tick,tickCount:J.tickCount,tickLine:ke.tickLine,tickSize:ke.tickSize,type:J.type,niceTicks:J.niceTicks,width:J.width,yAxisId:0},tl=t=>{var e=lt(t,el);return v.createElement(v.Fragment,null,v.createElement(Jr,{interval:e.interval,id:e.yAxisId,scale:e.scale,type:e.type,domain:e.domain,allowDataOverflow:e.allowDataOverflow,dataKey:e.dataKey,allowDuplicatedCategory:e.allowDuplicatedCategory,allowDecimals:e.allowDecimals,tickCount:e.tickCount,padding:e.padding,includeHidden:e.includeHidden,reversed:e.reversed,ticks:e.ticks,width:e.width,orientation:e.orientation,mirror:e.mirror,hide:e.hide,unit:e.unit,name:e.name,angle:e.angle,minTickGap:e.minTickGap,tick:e.tick,tickFormatter:e.tickFormatter,niceTicks:e.niceTicks}),v.createElement(Zr,e))},is=v.memo(tl,ya);is.displayName="YAxis";var sl=["axis"],al=v.forwardRef((t,e)=>v.createElement(Oa,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:sl,tooltipPayloadSearcher:Da,categoricalChartProps:t,ref:e}));const we="$.providerMetadata.openrouter.usage.cost";function ut(t){const e=new Date,r=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=new Date(r);a.setDate(a.getDate()+1);const l=new Date(r),n=t==="7d"?7:t==="30d"?30:90;return l.setDate(l.getDate()-n),{startDate:l.toISOString(),endDate:a.toISOString()}}function Ce(t){return t.structuredContent}function K(t){return`$${t.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}const os="gateway-chip-period";function rl(){try{const t=localStorage.getItem(os);if(t==="daily"||t==="weekly"||t==="monthly")return t}catch{}return"daily"}function ll(t){try{localStorage.setItem(os,t)}catch{}}const nl={low:"Low confidence",medium:"Medium confidence",high:"High confidence"},il={daily:"daily",weekly:"weekly",monthly:"monthly"},ol=[5,10,25,50,100],cl=[{value:"daily",label:"Daily"},{value:"weekly",label:"Weekly"},{value:"monthly",label:"Monthly"},{value:"none",label:"No reset"}];function dl(t){const e=O.c(51),{open:r,onOpenChange:a,connectionId:l,currentLimitUsd:n,billingMode:i,currentLimitPeriod:o}=t,{org:d}=me(),[m,c]=v.useState(null),[u,f]=v.useState(""),[h,x]=v.useState(null),[p,g]=v.useState(null),[y,w]=v.useState(o??"none");let j;e[0]!==l||e[1]!==d.id?(j={connectionId:l,orgId:d.id},e[0]=l,e[1]=d.id,e[2]=j):j=e[2];const b=Ae(j);let S;e[3]!==b?(S={client:b},e[3]=b,e[4]=S):S=e[4];const{mutate:N,isPending:A}=qt(S),k=_t(),C=i==="postpaid";let P;e[5]!==u?(P=u?Number.parseFloat(u):null,e[5]=u,e[6]=P):P=e[6];const _=m??P,E=y==="none"?null:y,T=C&&_!=null&&_===n&&E===o;let L;e[7]!==b?(L=Fa.mcpToolCall(b,"GATEWAY_USAGE",JSON.stringify({})),e[7]=b,e[8]=L):L=e[8];const G=L;let V;e[9]!==G||e[10]!==k?(V=async()=>{await k.invalidateQueries({queryKey:G,exact:!0}),await k.refetchQueries({queryKey:G,exact:!0,type:"active"})},e[9]=G,e[10]=k,e[11]=V):V=e[11];const R=V;let z,$;e[12]!==i||e[13]!==o||e[14]!==n||e[15]!==_||e[16]!==C||e[17]!==y||e[18]!==N||e[19]!==a||e[20]!==R?($=()=>{if(!_||_<=0)return;const B=C?_:n+_;g(null);const ae={limit_usd:B,billing_mode:i,return_url:window.location.href};C&&(ae.limit_period=y),N({name:"GATEWAY_SET_LIMIT",arguments:ae},{onSuccess:async re=>{const te=re.structuredContent;te?.checkout_url||await R(),te?.checkout_url?x(te.checkout_url):z()},onError:re=>{g(re.message??"Failed to update limit.")}})},z=()=>{c(null),f(""),x(null),g(null),w(o??"none"),a(!1)},e[12]=i,e[13]=o,e[14]=n,e[15]=_,e[16]=C,e[17]=y,e[18]=N,e[19]=a,e[20]=R,e[21]=z,e[22]=$):(z=e[21],$=e[22]);const Y=C?"Configure Spending Limit":"Add Credit",H=C?"Set a spending limit for your AI Gateway. The limit resets automatically based on the selected period.":"Choose how much credit to add to your AI Gateway.",M=C?"New limit":"Select amount",U=C?"Set Limit":"Continue";let q;e[23]!==Y?(q=s.jsx(Ot,{children:Y}),e[23]=Y,e[24]=q):q=e[24];let ee;e[25]!==H?(ee=s.jsx(gs,{children:H}),e[25]=H,e[26]=ee):ee=e[26];let W;e[27]!==q||e[28]!==ee?(W=s.jsxs(vs,{children:[q,ee]}),e[27]=q,e[28]=ee,e[29]=W):W=e[29];let F;e[30]!==M||e[31]!==h||e[32]!==U||e[33]!==n||e[34]!==u||e[35]!==_||e[36]!==p||e[37]!==$||e[38]!==A||e[39]!==C||e[40]!==T||e[41]!==y||e[42]!==m?(F=h?s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Your payment link is ready. Click below to complete the purchase. You'll be redirected back here after payment."}),s.jsx(de,{asChild:!0,className:"gap-2",children:s.jsxs("a",{href:h,children:[s.jsx(rt,{size:15}),"Complete Payment"]})})]}):s.jsxs("div",{className:"flex flex-col gap-5 pt-2",children:[s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:M}),s.jsx("div",{className:"grid grid-cols-5 gap-2",children:ol.map(B=>s.jsxs("button",{type:"button",onClick:()=>{c(B),f("")},className:ue("rounded-md border px-3 py-2 text-sm font-medium transition-colors",m===B?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"),children:["$",B]},B))})]}),s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(_e,{htmlFor:"custom-amount",className:"text-xs text-muted-foreground",children:C?"Or enter the exact new limit":"Or enter a custom amount"}),s.jsxs("div",{className:"relative",children:[s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),s.jsx(Pe,{id:"custom-amount",type:"number",min:"0.01",step:"0.01",placeholder:"0.00",className:"pl-7",value:u,onChange:B=>{f(B.target.value),c(null)}})]})]}),C&&s.jsxs("div",{className:"flex flex-col gap-1.5",children:[s.jsx(_e,{className:"text-xs text-muted-foreground",children:"Reset period"}),s.jsx("div",{className:"grid grid-cols-4 gap-2",children:cl.map(B=>{const{value:ae,label:re}=B;return s.jsx("button",{type:"button",onClick:()=>w(ae),className:ue("rounded-md border px-2 py-2 text-xs font-medium transition-colors",y===ae?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"),children:re},ae)})})]}),p&&s.jsx("p",{className:"text-xs text-destructive",children:p}),s.jsxs("div",{className:"flex items-center justify-between pt-1",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:C?s.jsxs(s.Fragment,{children:["Current limit:"," ",s.jsx("span",{className:"font-medium text-foreground",children:n>0?K(n):"none"})]}):s.jsxs(s.Fragment,{children:["Current limit:"," ",s.jsx("span",{className:"font-medium text-foreground",children:K(n)})]})}),s.jsx(de,{onClick:$,disabled:A||!_||_<=0||T,className:"gap-2",children:A?"Updating...":U})]})]}),e[30]=M,e[31]=h,e[32]=U,e[33]=n,e[34]=u,e[35]=_,e[36]=p,e[37]=$,e[38]=A,e[39]=C,e[40]=T,e[41]=y,e[42]=m,e[43]=F):F=e[43];let Q;e[44]!==W||e[45]!==F?(Q=s.jsxs(Dt,{className:"sm:max-w-md",children:[W,F]}),e[44]=W,e[45]=F,e[46]=Q):Q=e[46];let se;return e[47]!==z||e[48]!==r||e[49]!==Q?(se=s.jsx(Lt,{open:r,onOpenChange:z,children:Q}),e[47]=z,e[48]=r,e[49]=Q,e[50]=se):se=e[50],se}function ul(t){const e=O.c(22),{estimation:r}=t;if(!r)return null;const{estimatedDaysRemaining:a,estimatedDepletionDate:l,avgDailySpend:n}=r;if(a==null)return null;let i;e[0]!==l?(i=l?new Date(l).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):null,e[0]=l,e[1]=i):i=e[1];const o=i,d=a!==1?"s":"";let m;e[2]!==a||e[3]!==d?(m=s.jsxs("span",{className:"tabular-nums font-medium text-foreground",children:["~",a," day",d," ","remaining"]}),e[2]=a,e[3]=d,e[4]=m):m=e[4];let c;e[5]!==o?(c=o&&s.jsxs("span",{children:["(until ",o,")"]}),e[5]=o,e[6]=c):c=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("span",{className:"text-muted-foreground/60",children:"|"}),e[7]=u):u=e[7];let f;e[8]!==n?(f=K(n),e[8]=n,e[9]=f):f=e[9];let h;e[10]!==f?(h=s.jsxs("span",{className:"tabular-nums",children:["avg ",f,"/day"]}),e[10]=f,e[11]=h):h=e[11];let x;e[12]!==r.resetsBeforeDepletion?(x=r.resetsBeforeDepletion&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-muted-foreground/60",children:"|"}),s.jsx("span",{className:"text-green-600 dark:text-green-400",children:"Resets before depletion"})]}),e[12]=r.resetsBeforeDepletion,e[13]=x):x=e[13];const p=nl[r.confidence];let g;e[14]!==p?(g=s.jsx(Ma,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-4 font-normal",children:p}),e[14]=p,e[15]=g):g=e[15];let y;return e[16]!==g||e[17]!==m||e[18]!==c||e[19]!==h||e[20]!==x?(y=s.jsxs("div",{className:"mt-3 flex items-center gap-2 flex-wrap text-xs text-muted-foreground",children:[m,c,u,h,x,g]}),e[16]=g,e[17]=m,e[18]=c,e[19]=h,e[20]=x,e[21]=y):y=e[21],y}function ml(t){const e=O.c(37),{usage:r,limit:a,limitPeriod:l,onConfigureLimit:n,connectionId:i,alert:o}=t,d=a.total!=null&&a.total>0;let m;e[0]!==d||e[1]!==a.remaining||e[2]!==a.total?(m=d?Math.min(100,Math.round((a.total-(a.remaining??0))/a.total*100)):null,e[0]=d,e[1]=a.remaining,e[2]=a.total,e[3]=m):m=e[3];const c=m;let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Spending"}),s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"· Deco AI Gateway"})]}),e[4]=u):u=e[4];let f;e[5]!==r.total?(f=K(r.total),e[5]=r.total,e[6]=f):f=e[6];let h;e[7]!==f?(h=s.jsx("p",{className:"text-3xl font-bold tabular-nums text-foreground tracking-tight",children:f}),e[7]=f,e[8]=h):h=e[8];let x;e[9]!==d||e[10]!==a.total||e[11]!==l?(x=d&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["of ",K(a.total)," limit",l&&s.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1",children:[s.jsx(zt,{size:10}),il[l]]})]}),e[9]=d,e[10]=a.total,e[11]=l,e[12]=x):x=e[12];let p;e[13]!==d?(p=!d&&s.jsx("p",{className:"text-xs text-muted-foreground",children:"No limit configured"}),e[13]=d,e[14]=p):p=e[14];let g;e[15]!==h||e[16]!==x||e[17]!==p?(g=s.jsxs("div",{className:"flex flex-col gap-1",children:[u,h,x,p]}),e[15]=h,e[16]=x,e[17]=p,e[18]=g):g=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Ht,{size:16}),e[19]=y):y=e[19];const w=d?"Configure Limit":"Set Limit";let j;e[20]!==n||e[21]!==w?(j=s.jsxs(de,{onClick:n,variant:"outline",className:"gap-2",children:[y,w]}),e[20]=n,e[21]=w,e[22]=j):j=e[22];let b;e[23]!==j||e[24]!==g?(b=s.jsxs("div",{className:"flex items-center justify-between",children:[g,j]}),e[23]=j,e[24]=g,e[25]=b):b=e[25];let S;e[26]!==d||e[27]!==a.reset||e[28]!==c?(S=d&&c!=null&&s.jsxs("div",{className:"mt-4",children:[s.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:ue("h-full rounded-full transition-all",c>=90?"bg-destructive":c>=70?"bg-amber-500":"bg-primary"),style:{width:`${c}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[c,"% used",a.reset&&s.jsxs("span",{className:"ml-2",children:["· resets ",a.reset]})]})]}),e[26]=d,e[27]=a.reset,e[28]=c,e[29]=S):S=e[29];let N;e[30]!==o||e[31]!==i?(N=s.jsx(cs,{connectionId:i,alert:o,billingMode:"postpaid"}),e[30]=o,e[31]=i,e[32]=N):N=e[32];let A;return e[33]!==b||e[34]!==S||e[35]!==N?(A=s.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-border bg-gradient-to-br from-card via-card to-muted/30 p-6",children:[b,S,N]}),e[33]=b,e[34]=S,e[35]=N,e[36]=A):A=e[36],A}function fl(t){const e=O.c(30),{available:r,total:a,estimation:l,onAddCredit:n,connectionId:i,alert:o}=t,d=a>0?Math.max(0,Math.min(100,(a-r)/a*100)):0;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Available Credit"}),s.jsx("span",{className:"text-[10px] text-muted-foreground/60",children:"· Deco AI Gateway"})]}),e[0]=m):m=e[0];let c;e[1]!==r?(c=K(r),e[1]=r,e[2]=c):c=e[2];let u;e[3]!==c?(u=s.jsx("p",{className:"text-3xl font-bold tabular-nums text-foreground tracking-tight",children:c}),e[3]=c,e[4]=u):u=e[4];let f;e[5]!==a?(f=a>0&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["of ",K(a)," total"]}),e[5]=a,e[6]=f):f=e[6];let h;e[7]!==u||e[8]!==f?(h=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,u,f]}),e[7]=u,e[8]=f,e[9]=h):h=e[9];let x;e[10]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ht,{size:16}),e[10]=x):x=e[10];let p;e[11]!==n?(p=s.jsxs(de,{onClick:n,className:"gap-2 px-5",children:[x,"Add Credit"]}),e[11]=n,e[12]=p):p=e[12];let g;e[13]!==h||e[14]!==p?(g=s.jsxs("div",{className:"flex items-center justify-between",children:[h,p]}),e[13]=h,e[14]=p,e[15]=g):g=e[15];let y;e[16]!==r||e[17]!==a||e[18]!==d?(y=a>0&&s.jsxs("div",{className:"mt-4",children:[s.jsx("div",{className:"h-1.5 w-full rounded-full bg-muted overflow-hidden",children:s.jsx("div",{className:"h-full rounded-full bg-primary transition-all",style:{width:`${d}%`}})}),s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[K(Math.max(0,a-r))," used"]})]}),e[16]=r,e[17]=a,e[18]=d,e[19]=y):y=e[19];let w;e[20]!==l?(w=s.jsx(ul,{estimation:l}),e[20]=l,e[21]=w):w=e[21];let j;e[22]!==o||e[23]!==i?(j=s.jsx(cs,{connectionId:i,alert:o,billingMode:"prepaid"}),e[22]=o,e[23]=i,e[24]=j):j=e[24];let b;return e[25]!==w||e[26]!==j||e[27]!==g||e[28]!==y?(b=s.jsxs("div",{className:"relative overflow-hidden rounded-xl border border-border bg-gradient-to-br from-card via-card to-muted/30 p-6",children:[g,y,w,j]}),e[25]=w,e[26]=j,e[27]=g,e[28]=y,e[29]=b):b=e[29],b}function cs(t){const e=O.c(78),{connectionId:r,alert:a,billingMode:l}=t,{org:n}=me(),[i,o]=v.useState(!1),[d,m]=v.useState(a.enabled),[c,u]=v.useState(String(a.threshold_usd)),[f,h]=v.useState(a.email??""),[x,p]=v.useState(!1),[g,y]=v.useState(null);let w;e[0]!==r||e[1]!==n.id?(w={connectionId:r,orgId:n.id},e[0]=r,e[1]=n.id,e[2]=w):w=e[2];const j=Ae(w);let b;e[3]!==j?(b={client:j},e[3]=j,e[4]=b):b=e[4];const{mutate:S,isPending:N}=qt(b),A=d!==a.enabled||c!==String(a.threshold_usd)||f!==(a.email??"");let k;e[5]!==f||e[6]!==d||e[7]!==S||e[8]!==c?(k=()=>{y(null),p(!1);const X=parseFloat(c);if(d&&(!f||!f.includes("@"))){y("A valid email is required to enable alerts.");return}if(Number.isNaN(X)||X<=0){y("Threshold must be a positive number.");return}S({name:"GATEWAY_SET_ALERT",arguments:{enabled:d,threshold_usd:X,...f?{email:f}:{}}},{onSuccess:()=>{p(!0),setTimeout(()=>p(!1),3e3)},onError:he=>{y(he.message??"Failed to save alert config.")}})},e[5]=f,e[6]=d,e[7]=S,e[8]=c,e[9]=k):k=e[9];const C=k,P=l==="postpaid"?"Usage Alert":"Low-Balance Alert",D=l==="postpaid"?"Get notified when spending reaches a threshold":"Get notified when credit drops below a threshold";if(!i){let X;e[10]===Symbol.for("react.memo_cache_sentinel")?(X=()=>o(!0),e[10]=X):X=e[10];let he;e[11]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx("div",{className:"flex items-center justify-center size-7 rounded-md bg-muted shrink-0",children:s.jsx(Wa,{size:14,className:"text-muted-foreground"})}),e[11]=he):he=e[11];let ge;e[12]!==P?(ge=s.jsx("p",{className:"text-xs font-medium text-foreground",children:P}),e[12]=P,e[13]=ge):ge=e[13];let ve;e[14]!==a.enabled||e[15]!==a.threshold_usd||e[16]!==l?(ve=a.enabled?l==="postpaid"?`Enabled · Alert at ${K(a.threshold_usd)}`:`Enabled · Alert below ${K(a.threshold_usd)}`:l==="postpaid"?"Get notified before your spending limit runs out":"Get notified before your credit balance runs out",e[14]=a.enabled,e[15]=a.threshold_usd,e[16]=l,e[17]=ve):ve=e[17];let ye;e[18]!==ve?(ye=s.jsx("p",{className:"text-[11px] text-muted-foreground",children:ve}),e[18]=ve,e[19]=ye):ye=e[19];let be;e[20]!==ge||e[21]!==ye?(be=s.jsxs("div",{className:"flex-1 min-w-0",children:[ge,ye]}),e[20]=ge,e[21]=ye,e[22]=be):be=e[22];let je;e[23]!==a.enabled?(je=a.enabled&&s.jsx("span",{className:"shrink-0 rounded-full bg-green-500/15 px-2 py-0.5 text-[10px] font-medium text-green-600 dark:text-green-400",children:"On"}),e[23]=a.enabled,e[24]=je):je=e[24];let Ee;return e[25]!==je||e[26]!==be?(Ee=s.jsxs("button",{type:"button",onClick:X,className:"mt-4 flex items-center gap-3 rounded-lg border border-dashed border-border/60 px-4 py-3 w-full text-left transition-colors hover:bg-muted/50 hover:border-border",children:[he,be,je]}),e[25]=je,e[26]=be,e[27]=Ee):Ee=e[27],Ee}let _;e[28]!==P?(_=s.jsx("p",{className:"text-xs font-medium text-foreground",children:P}),e[28]=P,e[29]=_):_=e[29];let E;e[30]!==D?(E=s.jsx("p",{className:"text-[11px] text-muted-foreground",children:D}),e[30]=D,e[31]=E):E=e[31];let T;e[32]!==_||e[33]!==E?(T=s.jsxs("div",{children:[_,E]}),e[32]=_,e[33]=E,e[34]=T):T=e[34];let L;e[35]!==d?(L=s.jsx(De,{checked:d,onCheckedChange:m}),e[35]=d,e[36]=L):L=e[36];let G;e[37]!==T||e[38]!==L?(G=s.jsxs("div",{className:"flex items-center justify-between",children:[T,L]}),e[37]=T,e[38]=L,e[39]=G):G=e[39];const V=!d&&"opacity-50 pointer-events-none";let R;e[40]!==V?(R=ue("flex flex-col gap-3 transition-opacity",V),e[40]=V,e[41]=R):R=e[41];const z=l==="postpaid"?"Notify at":"Notify below";let $;e[42]!==z?($=s.jsx(_e,{htmlFor:"alert-threshold",className:"text-[11px] text-muted-foreground",children:z}),e[42]=z,e[43]=$):$=e[43];let Y;e[44]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:"$"}),e[44]=Y):Y=e[44];let H;e[45]===Symbol.for("react.memo_cache_sentinel")?(H=X=>u(X.target.value),e[45]=H):H=e[45];let M;e[46]!==c?(M=s.jsxs("div",{className:"relative",children:[Y,s.jsx(Pe,{id:"alert-threshold",type:"number",min:"1",step:"1",className:"h-8 pl-7 text-xs",value:c,onChange:H})]}),e[46]=c,e[47]=M):M=e[47];let U;e[48]!==$||e[49]!==M?(U=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[$,M]}),e[48]=$,e[49]=M,e[50]=U):U=e[50];let q;e[51]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx(_e,{htmlFor:"alert-email",className:"text-[11px] text-muted-foreground",children:"Notification email"}),e[51]=q):q=e[51];let ee;e[52]===Symbol.for("react.memo_cache_sentinel")?(ee=X=>h(X.target.value),e[52]=ee):ee=e[52];let W;e[53]!==f?(W=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[q,s.jsx(Pe,{id:"alert-email",type:"email",placeholder:"you@example.com",className:"h-8 text-xs",value:f,onChange:ee})]}),e[53]=f,e[54]=W):W=e[54];let F;e[55]!==U||e[56]!==W?(F=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[U,W]}),e[55]=U,e[56]=W,e[57]=F):F=e[57];let Q;e[58]!==g?(Q=g&&s.jsx("p",{className:"text-[11px] text-destructive",children:g}),e[58]=g,e[59]=Q):Q=e[59];let se;e[60]!==R||e[61]!==F||e[62]!==Q?(se=s.jsxs("div",{className:R,children:[F,Q]}),e[60]=R,e[61]=F,e[62]=Q,e[63]=se):se=e[63];let B;e[64]!==x?(B=x&&s.jsx("span",{className:"text-[11px] text-green-600 dark:text-green-400",children:"Saved"}),e[64]=x,e[65]=B):B=e[65];let ae;e[66]===Symbol.for("react.memo_cache_sentinel")?(ae=s.jsx(de,{size:"sm",variant:"ghost",className:"h-7 text-xs",onClick:()=>o(!1),children:"Cancel"}),e[66]=ae):ae=e[66];const re=N||!A,te=N?"Saving...":"Save Alert";let le;e[67]!==C||e[68]!==re||e[69]!==te?(le=s.jsx(de,{size:"sm",className:"h-7 text-xs",onClick:C,disabled:re,children:te}),e[67]=C,e[68]=re,e[69]=te,e[70]=le):le=e[70];let ce;e[71]!==B||e[72]!==le?(ce=s.jsxs("div",{className:"flex items-center justify-end gap-2 pt-1",children:[B,ae,le]}),e[71]=B,e[72]=le,e[73]=ce):ce=e[73];let I;return e[74]!==se||e[75]!==ce||e[76]!==G?(I=s.jsxs("div",{className:"mt-4 flex flex-col gap-3 rounded-lg border border-border bg-muted/20 p-4",children:[G,se,ce]}),e[74]=se,e[75]=ce,e[76]=G,e[77]=I):I=e[77],I}const pl={cost:{label:"Cost",color:"var(--chart-1)"}};function xl(){const t=O.c(54),{org:e}=me(),[r,a]=v.useState("7d");let l;t[0]!==r?(l=ut(r),t[0]=r,t[1]=l):l=t[1];const n=l;let i;t[2]!==e.id?(i={connectionId:dt,orgId:e.id},t[2]=e.id,t[3]=i):i=t[3];const o=Ae(i);let d;t[4]===Symbol.for("react.memo_cache_sentinel")?(d={type:"timeseries",source:{path:we,from:"output"},aggregation:{fn:"sum",interval:"1d"}},t[4]=d):d=t[4];let m;t[5]!==n?(m={widget:d,timeRange:n,skipCount:!0},t[5]=n,t[6]=m):m=t[6];let c;t[7]!==o||t[8]!==m?(c={client:o,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:m,staleTime:6e4,select:Ce},t[7]=o,t[8]=m,t[9]=c):c=t[9];const{data:u}=oe(c);let f;t[10]===Symbol.for("react.memo_cache_sentinel")?(f={type:"metric",source:{path:we,from:"output"},aggregation:{fn:"count_all"}},t[10]=f):f=t[10];let h;t[11]!==n?(h={widget:f,timeRange:n,skipCount:!0},t[11]=n,t[12]=h):h=t[12];let x;t[13]!==o||t[14]!==h?(x={client:o,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:h,staleTime:6e4,select:Ce},t[13]=o,t[14]=h,t[15]=x):x=t[15];const{data:p}=oe(x);let g;t[16]===Symbol.for("react.memo_cache_sentinel")?(g={type:"metric",source:{path:we,from:"output"},aggregation:{fn:"sum",groupByColumn:"connection_title",limit:10}},t[16]=g):g=t[16];let y;t[17]!==n?(y={widget:g,timeRange:n,skipCount:!0},t[17]=n,t[18]=y):y=t[18];let w;t[19]!==o||t[20]!==y?(w={client:o,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:y,staleTime:6e4,select:Ce},t[19]=o,t[20]=y,t[21]=w):w=t[21];const{data:j}=oe(w);let b;t[22]!==u?.timeseries?(b=u?.timeseries??[],t[22]=u?.timeseries,t[23]=b):b=t[23];let S;t[24]!==b?(S=b.map(jl),t[24]=b,t[25]=S):S=t[25];const N=S;let A;if(t[26]!==p?.value||t[27]!==N||t[28]!==j?.groups||t[29]!==u?.timeseries||t[30]!==r){const k=(u?.timeseries??[]).reduce(bl,0),C=p?.value??0,P=(j?.groups??[]).filter(yl).sort(vl).slice(0,5),D=r==="7d"?"last 7 days":r==="30d"?"last 30 days":"last 90 days";let _;t[32]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Usage"}),t[32]=_):_=t[32];const E=K(k);let T;t[33]!==E?(T=s.jsx("p",{className:"text-2xl font-bold tabular-nums text-foreground tracking-tight",children:E}),t[33]=E,t[34]=T):T=t[34];let L;t[35]!==D?(L=s.jsx("p",{className:"text-xs text-muted-foreground",children:D}),t[35]=D,t[36]=L):L=t[36];let G;t[37]!==T||t[38]!==L?(G=s.jsxs("div",{className:"flex items-baseline gap-2",children:[T,L]}),t[37]=T,t[38]=L,t[39]=G):G=t[39];let V;t[40]!==C?(V=C.toLocaleString(),t[40]=C,t[41]=V):V=t[41];let R;t[42]!==V?(R=s.jsxs("p",{className:"text-xs text-muted-foreground tabular-nums",children:[V," tool calls"]}),t[42]=V,t[43]=R):R=t[43];let z;t[44]!==G||t[45]!==R?(z=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[_,G,R]}),t[44]=G,t[45]=R,t[46]=z):z=t[46];let $;t[47]!==r?($=s.jsx(ds,{period:r,onPeriodChange:a}),t[47]=r,t[48]=$):$=t[48];let Y;t[49]!==z||t[50]!==$?(Y=s.jsxs("div",{className:"flex items-center justify-between",children:[z,$]}),t[49]=z,t[50]=$,t[51]=Y):Y=t[51];let H;t[52]!==N?(H=N.length>0?s.jsx(La,{config:pl,className:"h-[200px] w-full",children:s.jsxs(al,{data:N,margin:{top:4,right:4,bottom:0,left:0},children:[s.jsx("defs",{children:s.jsxs("linearGradient",{id:"fillCost",x1:"0",y1:"0",x2:"0",y2:"1",children:[s.jsx("stop",{offset:"5%",stopColor:"var(--color-cost)",stopOpacity:.3}),s.jsx("stop",{offset:"95%",stopColor:"var(--color-cost)",stopOpacity:0})]})}),s.jsx(Jt,{vertical:!1,strokeDasharray:"3 3"}),s.jsx(Ta,{dataKey:"date",tickLine:!1,axisLine:!1,tickMargin:8,fontSize:11,interval:"preserveStartEnd"}),s.jsx(is,{tickLine:!1,axisLine:!1,tickMargin:4,fontSize:11,tickFormatter:gl}),s.jsx(za,{content:s.jsx($a,{formatter:hl})}),s.jsx(ns,{type:"monotone",dataKey:"cost",stroke:"var(--color-cost)",fill:"url(#fillCost)",strokeWidth:2})]})}):s.jsx("div",{className:"h-[200px] flex items-center justify-center text-xs text-muted-foreground",children:"No usage data available for this period"}),t[52]=N,t[53]=H):H=t[53],A=s.jsxs("div",{className:"flex flex-col gap-4 rounded-xl border border-border bg-card p-5",children:[Y,H,P.length>0&&s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-[11px] font-medium text-muted-foreground uppercase tracking-wide",children:"Cost by Connection"}),s.jsx("div",{className:"flex flex-col gap-1.5",children:P.map((M,U)=>{const q=k>0?Math.min(M.value/k*100,100):0;return s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-xs text-foreground truncate min-w-0 w-36 shrink-0",children:M.key}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1 rounded-sm",children:s.jsx("div",{className:"h-full transition-all duration-500 ease-out rounded-sm",style:{width:`${q}%`,backgroundColor:`var(--chart-${U%5+1})`}})}),s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-medium",children:K(M.value)})]},M.key)})})]})]}),t[26]=p?.value,t[27]=N,t[28]=j?.groups,t[29]=u?.timeseries,t[30]=r,t[31]=A}else A=t[31];return A}function hl(t){return K(t)}function gl(t){return`$${t}`}function vl(t,e){return e.value-t.value}function yl(t){return t.value>0}function bl(t,e){return t+e.value}function jl(t){return{date:new Date(t.timestamp).toLocaleDateString("en-US",{month:"short",day:"numeric"}),cost:t.value}}function Nl(){const t=O.c(6),[e,r]=v.useState(rl);let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=m=>{r(m),ll(m)},t[0]=a):a=t[0];const l=a;let n,i;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Sidebar Display Period"}),i=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose which usage period is shown in the sidebar when no limit is set."}),t[1]=n,t[2]=i):(n=t[1],i=t[2]);let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=["daily","weekly","monthly"],t[3]=o):o=t[3];let d;return t[4]!==e?(d=s.jsxs("div",{className:"flex flex-col gap-2 rounded-xl border border-border bg-card p-5",children:[n,i,s.jsx("div",{className:"flex gap-2 mt-1",children:o.map(m=>s.jsx("button",{type:"button",onClick:()=>l(m),className:ue("rounded-md border px-3 py-1.5 text-xs font-medium capitalize transition-colors",e===m?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted text-muted-foreground"),children:m},m))})]}),t[4]=e,t[5]=d):d=t[5],d}function Qe(t){const e=O.c(20),{label:r,value:a,subValue:l,maxValue:n,color:i}=t,o=i===void 0?"bg-chart-1":i;let d;e[0]!==a?(d=parseFloat(a.replace(/[^0-9.]/g,""))||0,e[0]=a,e[1]=d):d=e[1];const m=d,c=n>0?Math.min(m/n*100,100):0;let u;e[2]!==r?(u=s.jsx("span",{className:"text-xs text-foreground truncate min-w-0 w-36 shrink-0",children:r}),e[2]=r,e[3]=u):u=e[3];let f;e[4]!==o?(f=ue("h-full transition-all duration-500 ease-out",o),e[4]=o,e[5]=f):f=e[5];const h=`${c}%`;let x;e[6]!==h?(x={width:h},e[6]=h,e[7]=x):x=e[7];let p;e[8]!==f||e[9]!==x?(p=s.jsx("div",{className:"relative h-2 bg-muted/50 overflow-hidden flex-1 rounded-sm",children:s.jsx("div",{className:f,style:x})}),e[8]=f,e[9]=x,e[10]=p):p=e[10];let g;e[11]!==a?(g=s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-foreground font-medium",children:a}),e[11]=a,e[12]=g):g=e[12];let y;e[13]!==l?(y=l&&s.jsx("span",{className:"text-xs tabular-nums shrink-0 text-muted-foreground",children:l}),e[13]=l,e[14]=y):y=e[14];let w;return e[15]!==u||e[16]!==p||e[17]!==g||e[18]!==y?(w=s.jsxs("div",{className:"flex items-center gap-2",children:[u,p,g,y]}),e[15]=u,e[16]=p,e[17]=g,e[18]=y,e[19]=w):w=e[19],w}function Xe(t){const e=O.c(8),{title:r,children:a,empty:l}=t;let n;e[0]!==r?(n=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:r}),e[0]=r,e[1]=n):n=e[1];let i;e[2]!==a||e[3]!==l?(i=l?s.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"No data available for this period"}):a,e[2]=a,e[3]=l,e[4]=i):i=e[4];let o;return e[5]!==n||e[6]!==i?(o=s.jsxs("div",{className:"flex flex-col gap-3 rounded-xl border border-border bg-card p-5",children:[n,i]}),e[5]=n,e[6]=i,e[7]=o):o=e[7],o}const At={"7d":"7 days","30d":"30 days","90d":"90 days"};function ds(t){const e=O.c(4),{period:r,onPeriodChange:a}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Object.keys(At),e[0]=l):l=e[0];let n;return e[1]!==a||e[2]!==r?(n=s.jsx("div",{className:"flex items-center rounded-md border border-border bg-muted/50 p-0.5 self-start",children:l.map(i=>s.jsx("button",{type:"button",onClick:()=>a(i),className:ue("px-2.5 py-1 text-xs font-medium rounded-sm transition-colors",r===i?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:At[i]},i))}),e[1]=a,e[2]=r,e[3]=n):n=e[3],n}function kt(t,e){const r=new Map(e.map(a=>[a.key,a.value]));return t.map(a=>({key:a.key,cost:a.value,calls:r.get(a.key)??0})).sort((a,l)=>l.cost-a.cost)}function Sl(){const t=O.c(27),{org:e}=me(),[r,a]=v.useState("7d"),l=ut(r),{data:n}=Ua(),i=n?.data?.members??[],o=new Map(i.map(Pl));let d;t[0]!==e.id?(d={connectionId:dt,orgId:e.id},t[0]=e.id,t[1]=d):d=t[1];const m=Ae(d),c=I=>({client:m,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:{widget:{type:"table",source:{path:we,from:"output"},aggregation:{fn:I.fn,...I.groupByColumn&&{groupByColumn:I.groupByColumn},...I.limit&&{limit:I.limit}}},timeRange:l,skipCount:!0},staleTime:6e4,select:Ce}),{data:u,isLoading:f}=oe(c({fn:"sum",groupByColumn:"connection_title",limit:20})),{data:h,isLoading:x}=oe(c({fn:"count_all",groupByColumn:"connection_title",limit:20})),{data:p,isLoading:g}=oe(c({fn:"sum",groupByColumn:"user_id",limit:20})),{data:y,isLoading:w}=oe(c({fn:"count_all",groupByColumn:"user_id",limit:20})),{data:j,isLoading:b}=oe(c({fn:"sum",groupByColumn:"tool_name",limit:20}));let S;t[2]===Symbol.for("react.memo_cache_sentinel")?(S={fn:"count_all",groupByColumn:"tool_name",limit:20},t[2]=S):S=t[2];const{data:N,isLoading:A}=oe(c(S));if(f||x||g||w||b||A){let I;t[3]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ne,{className:"h-8 w-48"}),t[3]=I):I=t[3];let X;return t[4]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsxs("div",{className:"flex flex-col gap-4",children:[I,s.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:Array.from({length:3}).map(_l)})]}),t[4]=X):X=t[4],X}const C=kt(u?.groups??[],h?.groups??[]),P=kt(p?.groups??[],y?.groups??[]).map(I=>({...I,key:o.get(I.key)??I.key})),D=N?.groups??[],_=new Map((j?.groups??[]).map(kl)),E=D.map(I=>({name:I.key,calls:I.value,cost:_.get(I.key)??0})).sort(Al).slice(0,20),T=C.reduce(Cl,0),L=C.reduce(wl,0),G=C[0]?.cost??1,V=P[0]?.cost??1,R=E[0]?.calls??1;let z;t[5]!==r?(z=s.jsx(ds,{period:r,onPeriodChange:a}),t[5]=r,t[6]=z):z=t[6];const $="grid grid-cols-1 gap-4 sm:grid-cols-2",Y=C.length===0,H=C.slice(0,8).map(I=>s.jsx(Qe,{label:I.key,value:K(I.cost),subValue:`${I.calls.toLocaleString()} calls`,maxValue:G,color:"bg-chart-1"},I.key));let M;t[7]!==H?(M=s.jsx("div",{className:"space-y-2.5",children:H}),t[7]=H,t[8]=M):M=t[8];let U;t[9]!==Y||t[10]!==M?(U=s.jsx(Xe,{title:"Cost by Connection",empty:Y,children:M}),t[9]=Y,t[10]=M,t[11]=U):U=t[11];const q=P.length===0,ee=P.slice(0,8).map(I=>s.jsx(Qe,{label:I.key,value:K(I.cost),subValue:`${I.calls.toLocaleString()} calls`,maxValue:V,color:"bg-chart-4"},I.key));let W;t[12]!==ee?(W=s.jsx("div",{className:"space-y-2.5",children:ee}),t[12]=ee,t[13]=W):W=t[13];let F;t[14]!==W||t[15]!==q?(F=s.jsx(Xe,{title:"Cost by User",empty:q,children:W}),t[14]=W,t[15]=q,t[16]=F):F=t[16];const Q=Xe,se="Top Tools",B=E.length===0,ae="space-y-2.5",re=E.slice(0,8).map(I=>s.jsx(Qe,{label:I.name,value:I.calls.toLocaleString(),subValue:I.cost>0?K(I.cost):void 0,maxValue:R,color:"bg-chart-3"},I.name));let te;t[17]!==re?(te=s.jsx("div",{className:ae,children:re}),t[17]=re,t[18]=te):te=t[18];let le;t[19]!==Q||t[20]!==B||t[21]!==te?(le=s.jsx(Q,{title:se,empty:B,children:te}),t[19]=Q,t[20]=B,t[21]=te,t[22]=le):le=t[22];let ce;return t[23]!==F||t[24]!==le||t[25]!==U?(ce=s.jsxs("div",{className:$,children:[U,F,le]}),t[23]=F,t[24]=le,t[25]=U,t[26]=ce):ce=t[26],s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("div",{className:"flex gap-4 text-sm",children:[s.jsxs("span",{className:"text-muted-foreground",children:["Total:"," ",s.jsx("span",{className:"font-semibold text-foreground",children:K(T)})]}),s.jsxs("span",{className:"text-muted-foreground",children:["Calls:"," ",s.jsx("span",{className:"font-semibold text-foreground",children:L.toLocaleString()})]})]}),z]}),ce]})}function wl(t,e){return t+e.calls}function Cl(t,e){return t+e.cost}function Al(t,e){return e.calls-t.calls}function kl(t){return[t.key,t.value]}function _l(t,e){return s.jsx(ne,{className:"h-40 rounded-xl"},e)}function Pl(t){return[t.userId,t.user.name??t.user.email]}function Il(t,e){const r=new Map;for(const a of t){const n=new Date(a.timestamp).toLocaleDateString("en-US",{month:"short",year:"2-digit"}),i=r.get(n)??{cost:0,calls:0};r.set(n,{cost:i.cost+a.value,calls:i.calls})}for(const a of e){const n=new Date(a.timestamp).toLocaleDateString("en-US",{month:"short",year:"2-digit"}),i=r.get(n)??{cost:0,calls:0};r.set(n,{cost:i.cost,calls:i.calls+a.value})}return Array.from(r.entries()).map(([a,l])=>({month:a,...l})).reverse()}function El(){const t=O.c(27),{org:e}=me();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=ut("90d"),t[0]=r):r=t[0];const a=r;let l;t[1]!==e.id?(l={connectionId:dt,orgId:e.id},t[1]=e.id,t[2]=l):l=t[2];const n=Ae(l);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i={widget:{type:"timeseries",source:{path:we,from:"output"},aggregation:{fn:"sum",interval:"1d"}},timeRange:a,skipCount:!0},t[3]=i):i=t[3];let o;t[4]!==n?(o={client:n,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:i,staleTime:6e4,select:Ce},t[4]=n,t[5]=o):o=t[5];const{data:d,isLoading:m}=oe(o);let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c={widget:{type:"timeseries",source:{path:we,from:"output"},aggregation:{fn:"count_all",interval:"1d"}},timeRange:a,skipCount:!0},t[6]=c):c=t[6];let u;t[7]!==n?(u={client:n,toolName:"MONITORING_WIDGET_PREVIEW",toolArguments:c,staleTime:6e4,select:Ce},t[7]=n,t[8]=u):u=t[8];const{data:f,isLoading:h}=oe(u);if(m||h){let S;return t[9]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsxs("div",{className:"flex flex-col gap-4",children:[s.jsx(ne,{className:"h-8 w-48"}),s.jsx(ne,{className:"h-48 rounded-xl"})]}),t[9]=S):S=t[9],S}let x,p,g,y,w;if(t[10]!==f?.timeseries||t[11]!==d?.timeseries){const S=Il(d?.timeseries??[],f?.timeseries??[]);w="flex flex-col gap-4",t[17]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("p",{className:"text-xs text-muted-foreground",children:"Usage history from monitoring logs (last 90 days)"}),t[17]=x):x=t[17],p="flex flex-col gap-3 rounded-xl border border-border bg-card p-5",t[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("p",{className:"text-xs font-medium text-muted-foreground tracking-wide uppercase",children:"Monthly Usage"}),t[18]=g):g=t[18],y=S.length===0?s.jsx("p",{className:"text-xs text-muted-foreground py-4 text-center",children:"No usage data available for this period"}):s.jsxs("div",{className:"w-full",children:[s.jsxs("div",{className:"grid grid-cols-3 gap-x-4 pb-1.5 border-b border-border text-[11px] font-medium text-muted-foreground uppercase tracking-wide",children:[s.jsx("span",{children:"Month"}),s.jsx("span",{className:"text-right",children:"Cost"}),s.jsx("span",{className:"text-right",children:"Calls"})]}),s.jsx("div",{className:"divide-y divide-border",children:S.map(Ol)})]}),t[10]=f?.timeseries,t[11]=d?.timeseries,t[12]=x,t[13]=p,t[14]=g,t[15]=y,t[16]=w}else x=t[12],p=t[13],g=t[14],y=t[15],w=t[16];let j;t[19]!==p||t[20]!==g||t[21]!==y?(j=s.jsxs("div",{className:p,children:[g,y]}),t[19]=p,t[20]=g,t[21]=y,t[22]=j):j=t[22];let b;return t[23]!==x||t[24]!==j||t[25]!==w?(b=s.jsxs("div",{className:w,children:[x,j]}),t[23]=x,t[24]=j,t[25]=w,t[26]=b):b=t[26],b}function Ol(t){return s.jsxs("div",{className:"grid grid-cols-3 gap-x-4 py-2 text-xs",children:[s.jsx("span",{className:"text-foreground font-medium",children:t.month}),s.jsx("span",{className:"text-right tabular-nums text-foreground",children:K(t.cost)}),s.jsx("span",{className:"text-right tabular-nums text-muted-foreground",children:t.calls.toLocaleString()})]},t.month)}function Dl(t){const e=O.c(31),{connectionId:r}=t,{org:a}=me(),[l,n]=v.useState(!1);let i;e[0]!==r||e[1]!==a.id?(i={connectionId:r,orgId:a.id},e[0]=r,e[1]=a.id,e[2]=i):i=e[2];const o=Ae(i);let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={},e[3]=d):d=e[3];let m;e[4]!==o?(m={client:o,toolName:"GATEWAY_USAGE",toolArguments:d,staleTime:3e4,select:Ll},e[4]=o,e[5]=m):m=e[5];const{data:c,isLoading:u}=oe(m);if(u){let P;return e[6]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(ne,{className:"h-36 rounded-xl"}),e[6]=P):P=e[6],P}if(!c)return null;const f=c.limit.remaining??0,h=c.limit.total??0,x=c.usage,p=c.billing.mode,g=c.billing.limitPeriod??null,y=c.estimation??null;let w;e[7]!==c.alert?(w=c.alert??{enabled:!1,threshold_usd:10,email:null},e[7]=c.alert,e[8]=w):w=e[8];const j=w,b=c.limit,S=p==="postpaid"&&(h==null||h===0);let N;e[9]!==j||e[10]!==f||e[11]!==p||e[12]!==r||e[13]!==y||e[14]!==b||e[15]!==g||e[16]!==h||e[17]!==x?(N=p==="postpaid"?s.jsx(ml,{usage:x,limit:b,limitPeriod:g,onConfigureLimit:()=>n(!0),connectionId:r,alert:j}):s.jsx(fl,{available:f,total:h,estimation:y,onAddCredit:()=>n(!0),connectionId:r,alert:j}),e[9]=j,e[10]=f,e[11]=p,e[12]=r,e[13]=y,e[14]=b,e[15]=g,e[16]=h,e[17]=x,e[18]=N):N=e[18];let A;e[19]!==S?(A=S&&s.jsx(Nl,{}),e[19]=S,e[20]=A):A=e[20];let k;e[21]!==p||e[22]!==r||e[23]!==l||e[24]!==g||e[25]!==h?(k=s.jsx(dl,{open:l,onOpenChange:n,connectionId:r,currentLimitUsd:h,billingMode:p,currentLimitPeriod:g}),e[21]=p,e[22]=r,e[23]=l,e[24]=g,e[25]=h,e[26]=k):k=e[26];let C;return e[27]!==N||e[28]!==A||e[29]!==k?(C=s.jsxs(s.Fragment,{children:[N,A,k]}),e[27]=N,e[28]=A,e[29]=k,e[30]=C):C=e[30],C}function Ll(t){return t.structuredContent}function Tl(t){const e=O.c(20),{gatewayConnectionId:r}=t,[a,l]=v.useState("summary");let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Billing"}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs(Ba,{variant:"underline",children:[s.jsx(He,{value:"summary",variant:"underline",children:"Summary"}),s.jsx(He,{value:"breakdown",variant:"underline",children:"Breakdown"}),s.jsx(He,{value:"history",variant:"underline",children:"History"})]}),e[1]=i):i=e[1];let o;e[2]!==r?(o=r&&s.jsx(Dl,{connectionId:r}),e[2]=r,e[3]=o):o=e[3];let d;e[4]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(xl,{}),e[4]=d):d=e[4];let m;e[5]!==o?(m=s.jsxs(qe,{value:"summary",className:"flex flex-col gap-4 pt-2",children:[o,d]}),e[5]=o,e[6]=m):m=e[6];let c;e[7]!==a?(c=a==="breakdown"&&s.jsx(Sl,{}),e[7]=a,e[8]=c):c=e[8];let u;e[9]!==c?(u=s.jsx(qe,{value:"breakdown",className:"pt-2",children:c}),e[9]=c,e[10]=u):u=e[10];let f;e[11]!==a?(f=a==="history"&&s.jsx(El,{}),e[11]=a,e[12]=f):f=e[12];let h;e[13]!==f?(h=s.jsx(qe,{value:"history",className:"pt-2",children:f}),e[13]=f,e[14]=h):h=e[14];let x;return e[15]!==a||e[16]!==m||e[17]!==u||e[18]!==h?(x=s.jsxs(s.Fragment,{children:[n,s.jsxs(Ga,{value:a,onValueChange:l,variant:"underline",children:[i,m,u,h]})]}),e[15]=a,e[16]=m,e[17]=u,e[18]=h,e[19]=x):x=e[19],x}function zl(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col gap-6",children:[s.jsxs("div",{children:[s.jsx(ne,{className:"h-5 w-32"}),s.jsx(ne,{className:"h-4 w-64 mt-1.5"})]}),s.jsx(ne,{className:"h-28 rounded-xl"}),s.jsx(ne,{className:"h-[260px] rounded-lg"})]}),t[0]=e):e=t[0],e}function $l(){const t=O.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Billing"}),t[0]=e):e=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex items-center justify-center size-10 rounded-full bg-muted",children:s.jsx(rt,{size:20,className:"text-muted-foreground"})}),t[1]=r):r=t[1];let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-6",children:[e,s.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-12 rounded-lg border border-dashed border-border",children:[r,s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:"Something went wrong"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-[300px]",children:"Unable to load billing data. Please try again later."})]})]})]}),t[2]=a):a=t[2],a}class Ml extends v.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,r){}render(){return this.state.hasError?s.jsx($l,{}):this.props.children}}function Bl(){const t=O.c(4),e=Ra();let r;t[0]!==e?(r=e.find(Gl),t[0]=e,t[1]=r):r=t[1];const l=r?.id??null;let n;return t[2]!==l?(n=s.jsx(Tl,{gatewayConnectionId:l}),t[2]=l,t[3]=n):n=t[3],n}function Gl(t){return Ka(t,Va)}function Wl(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-6",children:s.jsx(Ml,{children:s.jsx(v.Suspense,{fallback:s.jsx(zl,{}),children:s.jsx(Bl,{})})})}),t[0]=e):e=t[0],e}function us(){const t=O.c(3);let e,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ne,{className:"h-6 w-48"}),r=s.jsx(ne,{className:"h-4 w-80"}),t[0]=e,t[1]=r):(e=t[0],r=t[1]);let a;return t[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-4 pt-2",children:[e,r,s.jsxs("div",{className:"mt-4 flex flex-col gap-3",children:[s.jsx(ne,{className:"h-12 w-full"}),s.jsx(ne,{className:"h-12 w-full"})]})]}),t[2]=a):a=t[2],a}function Fl(t){const e=O.c(14),{projectSlug:r,children:a}=t,{org:l}=me(),{data:n,isLoading:i}=Et(l.id,r);if(i||!n){let u;return e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(us,{}),e[0]=u):u=e[0],u}const o=r===Ie;let d;e[1]!==n.description||e[2]!==n.enabledPlugins||e[3]!==n.id||e[4]!==n.name||e[5]!==n.organizationId||e[6]!==n.slug||e[7]!==n.ui||e[8]!==o?(d={id:n.id,organizationId:n.organizationId,slug:n.slug,name:n.name,description:n.description,enabledPlugins:n.enabledPlugins,ui:n.ui,isOrgAdmin:o},e[1]=n.description,e[2]=n.enabledPlugins,e[3]=n.id,e[4]=n.name,e[5]=n.organizationId,e[6]=n.slug,e[7]=n.ui,e[8]=o,e[9]=d):d=e[9];const m=d;let c;return e[10]!==a||e[11]!==m||e[12]!==l?(c=s.jsx(It,{org:l,project:m,children:a}),e[10]=a,e[11]=m,e[12]=l,e[13]=c):c=e[13],c}function Rl(t){const e=O.c(7),{section:r}=t;switch(r){case"account.profile":{let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ha,{}),e[0]=a):a=e[0],a}case"account.preferences":{let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(yt,{}),e[1]=a):a=e[1],a}case"org.general":{let a;return e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(tr,{}),e[2]=a):a=e[2],a}case"org.plugins":{let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Fl,{projectSlug:Ie,children:s.jsx(Fs,{})}),e[3]=a):a=e[3],a}case"org.ai-providers":{let a;return e[4]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Ss,{}),e[4]=a):a=e[4],a}case"org.billing":{let a;return e[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Wl,{}),e[5]=a):a=e[5],a}default:{let a;return e[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(yt,{}),e[6]=a):a=e[6],a}}}function Ul(){const t=O.c(24),{isOpen:e,activeSection:r,open:a,close:l}=Ns();let n;t[0]!==l?(n=y=>!y&&l(),t[0]=l,t[1]=n):n=t[1];let i;t[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ot,{className:"sr-only",children:"Settings"}),t[2]=i):i=t[2];let o;t[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("div",{className:"w-52 shrink-0 border-r border-border"}),t[3]=o):o=t[3];let d;t[4]!==r||t[5]!==a?(d=s.jsx(v.Suspense,{fallback:o,children:s.jsx(Ya,{activeSection:r,onNavigate:a})}),t[4]=r,t[5]=a,t[6]=d):d=t[6];let m,c;t[7]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ys,{size:16}),c=s.jsx("span",{className:"sr-only",children:"Close"}),t[7]=m,t[8]=c):(m=t[7],c=t[8]);let u;t[9]!==l?(u=s.jsxs("button",{type:"button",onClick:l,className:"sticky top-4 float-right mr-4 mt-4 z-10 rounded-md p-1 opacity-70 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-ring",children:[m,c]}),t[9]=l,t[10]=u):u=t[10];let f;t[11]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(us,{}),t[11]=f):f=t[11];let h;t[12]!==r?(h=s.jsx("div",{className:"p-8",children:s.jsx(v.Suspense,{fallback:f,children:s.jsx(Rl,{section:r})})}),t[12]=r,t[13]=h):h=t[13];let x;t[14]!==u||t[15]!==h?(x=s.jsxs("div",{className:"flex-1 overflow-y-auto min-w-0 relative",children:[u,h]}),t[14]=u,t[15]=h,t[16]=x):x=t[16];let p;t[17]!==d||t[18]!==x?(p=s.jsxs(Dt,{className:"sm:max-w-[1100px] h-[85vh] p-0 overflow-hidden flex flex-col gap-0",closeButtonClassName:"hidden",children:[i,s.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[d,x]})]}),t[17]=d,t[18]=x,t[19]=p):p=t[19];let g;return t[20]!==e||t[21]!==n||t[22]!==p?(g=s.jsx(Lt,{open:e,onOpenChange:n,children:p}),t[20]=e,t[21]=n,t[22]=p,t[23]=g):g=t[23],g}function Kl(t){const e=O.c(12),{projectSlug:r,orgSlug:a,error:l}=t,n=at();let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h1",{className:"text-xl font-semibold",children:"Failed to load project"}),e[0]=i):i=e[0];let o;e[1]!==r?(o=s.jsxs("p",{className:"text-muted-foreground text-center",children:['There was an error loading the project "',r,'".']}),e[1]=r,e[2]=o):o=e[2];let d;e[3]!==l.message?(d=s.jsx("p",{className:"text-sm text-muted-foreground",children:l.message}),e[3]=l.message,e[4]=d):d=e[4];let m;e[5]!==n||e[6]!==a?(m=s.jsx(de,{variant:"link",onClick:()=>n({to:"/$org/$project",params:{org:a,project:Ie}}),children:"Go to organization home"}),e[5]=n,e[6]=a,e[7]=m):m=e[7];let c;return e[8]!==o||e[9]!==d||e[10]!==m?(c=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[i,o,d,m]}),e[8]=o,e[9]=d,e[10]=m,e[11]=c):c=e[11],c}function Vl(t){const e=O.c(9),{projectSlug:r,orgSlug:a}=t,l=at();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("h1",{className:"text-xl font-semibold",children:"Project not found"}),e[0]=n):n=e[0];let i;e[1]!==r?(i=s.jsxs("p",{className:"text-muted-foreground text-center",children:['The project "',r,'" does not exist in this organization.']}),e[1]=r,e[2]=i):i=e[2];let o;e[3]!==l||e[4]!==a?(o=s.jsx(de,{variant:"link",onClick:()=>l({to:"/$org/$project",params:{org:a,project:Ie}}),children:"Go to organization home"}),e[3]=l,e[4]=a,e[5]=o):o=e[5];let d;return e[6]!==i||e[7]!==o?(d=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-4 p-8",children:[n,i,o]}),e[6]=i,e[7]=o,e[8]=d):d=e[8],d}function Yl(){const t=O.c(23);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const r=xs(e),{org:a}=me(),l=r.org,n=r.project,{data:i,isLoading:o,error:d}=Et(a.id,n);if(o){let p;return t[1]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ze,{}),t[1]=p):p=t[1],p}if(d){let p;return t[2]!==d||t[3]!==l||t[4]!==n?(p=s.jsx(Kl,{projectSlug:n,orgSlug:l,error:d}),t[2]=d,t[3]=l,t[4]=n,t[5]=p):p=t[5],p}if(!i){let p;return t[6]!==l||t[7]!==n?(p=s.jsx(Vl,{projectSlug:n,orgSlug:l}),t[6]=l,t[7]=n,t[8]=p):p=t[8],p}const m=i.slug===Ie;let c;t[9]!==i.description||t[10]!==i.enabledPlugins||t[11]!==i.id||t[12]!==i.name||t[13]!==i.organizationId||t[14]!==i.slug||t[15]!==i.ui||t[16]!==m?(c={id:i.id,organizationId:i.organizationId,slug:i.slug,name:i.name,description:i.description,enabledPlugins:i.enabledPlugins,ui:i.ui,isOrgAdmin:m},t[9]=i.description,t[10]=i.enabledPlugins,t[11]=i.id,t[12]=i.name,t[13]=i.organizationId,t[14]=i.slug,t[15]=i.ui,t[16]=m,t[17]=c):c=t[17];const u=c;let f,h;t[18]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(v.Suspense,{fallback:s.jsx(Ze,{}),children:s.jsx(hs,{})}),h=s.jsx(Ul,{}),t[18]=f,t[19]=h):(f=t[18],h=t[19]);let x;return t[20]!==u||t[21]!==a?(x=s.jsxs(It,{org:a,project:u,children:[f,h]}),t[20]=u,t[21]=a,t[22]=x):x=t[22],x}function ti(){const t=O.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(v.Suspense,{fallback:s.jsx(Ze,{}),children:s.jsx(Yl,{})}),t[0]=e):e=t[0],e}export{ti as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as b,K as E,j as l}from"./index-DO8fUd54.js";import{u as R}from"./useQuery-BeFLqBun.js";import{i as j}from"./File06-ZV5CfSHG.js";import{i as v}from"./Loading01-WTkiPysv.js";import{e as _}from"./github-icon-Dp3wHhYE.js";function w(s){return s.replace(/<a[^>]*class="[^"]*anchor[^"]*"[^>]*>.*?<\/a>/gi,"")}function A(s){return s.replace(/<a\s+([^>]*href="[^"]*"[^>]*)>/gi,(e,r)=>{let t=e;return r.includes("target=")?t=t.replace(/target="[^"]*"/gi,'target="_blank"'):t=t.replace(/>/,' target="_blank">'),r.includes("rel=")?t=t.replace(/rel="[^"]*"/gi,'rel="noopener noreferrer"'):t=t.replace(/>/,' rel="noopener noreferrer">'),t})}function H(s){let e=w(s);return e=A(e),e}async function L(s,e){try{const r=await fetch(`https://api.github.com/repos/${s}/${e}/readme`,{headers:{Accept:"application/vnd.github.v3.html"}});if(!r.ok){if(r.status===404)return null;throw new Error(`Failed to fetch README: ${r.statusText}`)}const t=await r.text();return H(t)}catch(r){return console.error("Error fetching README:",r),null}}function D(s){const e=b.c(18),{repository:r,html:t,isLoading:g,queryKey:h}=s;let n,o,a,m;e[0]!==t||e[1]!==h||e[2]!==r?(n=r?_(r):null,o=!!n&&t===void 0,m=R,a=h??E.githubReadme(n?.owner,n?.repo),e[0]=t,e[1]=h,e[2]=r,e[3]=n,e[4]=o,e[5]=a,e[6]=m):(n=e[3],o=e[4],a=e[5],m=e[6]);let c;e[7]!==n?(c=async()=>n?L(n.owner,n.repo):null,e[7]=n,e[8]=c):c=e[8];let u;e[9]!==o||e[10]!==a||e[11]!==c?(u={queryKey:a,queryFn:c,enabled:o,staleTime:36e5,gcTime:864e5},e[9]=o,e[10]=a,e[11]=c,e[12]=u):u=e[12];const{data:x,isLoading:y}=m(u),f=t??x;if(g??(o&&y)){let i;return e[13]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx("div",{className:"flex items-center justify-center h-full",children:l.jsx(v,{size:32,className:"animate-spin text-muted-foreground"})}),e[13]=i):i=e[13],i}if(!f){let i;return e[14]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center p-6",children:[l.jsx(j,{size:48,className:"text-muted-foreground mb-4"}),l.jsx("h3",{className:"text-lg font-medium mb-2",children:"README not found"}),l.jsx("p",{className:"text-muted-foreground max-w-md",children:"This repository doesn't have a README file, or it's not publicly accessible."})]}),e[14]=i):i=e[14],i}let d;e[15]===Symbol.for("react.memo_cache_sentinel")?(d={backgroundColor:"transparent"},e[15]=d):d=e[15];let p;return e[16]!==f?(p=l.jsx("div",{className:"p-5 markdown-body",style:d,dangerouslySetInnerHTML:{__html:f}}),e[16]=f,e[17]=p):p=e[17],p}export{D as R};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./index-DO8fUd54.js";import{c as s}from"./constants-B9t4Nuz_.js";function m(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_LIST");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_LIST"));return i?i.name:""}function o(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_FILTERS");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_FILTERS"));return i?i.name:""}function I(t,r){if(!t)return"";const e=t.find(f=>f.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const i={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},n=t.find(f=>f.name===i[r]);if(n)return n.name;const a=t.find(f=>f.name.startsWith("COLLECTION_REGISTRY_APP_")&&f.name.endsWith(r));return a?a.name:""}function R(t){if(!t)return[];const r=[];for(const e of t){let i=[];if(Array.isArray(e))i=e;else if(typeof e=="object"&&e!==null){const n=Object.keys(e).find(a=>Array.isArray(e[a]));n&&(i=e[n])}r.push(...i)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function E(t){return t?c[t]??t.toUpperCase():null}function _(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function S(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}async function d(t,r,e,i){const n=await s({connectionId:t,orgId:r});try{const a=await n.callTool({name:e,arguments:i});return a.structuredContent??a}finally{await n.close().catch(console.error)}}export{R as a,o as b,d as c,I as d,S as e,m as f,E as g,_ as h};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{r as P,c as C,j as s,E as Ze,u as Ie,z as I,e as Xe,at as Je,L as We,ch as kt,bf as Ct,O as V,as as wt,W as $t,Y as zt,Z as It,X as Pt,$ as At,a1 as Et,a0 as Ot,I as Tt,T as Mt,g as it,f as _e,w as Se,ci as Dt,bM as Rt,x as Lt,B as Ge,A as Ht,S as lt,k as Ut,m as Bt,N as Ft,v as Wt,bh as Be,K as Gt,au as ot,P as Kt}from"./index-DO8fUd54.js";import{C as ae,c as Vt,i as qt,d as Yt}from"./task-status-DJB3YbbO.js";import{I as Qt}from"./integration-icon-BrOdBipR.js";import{u as nt,P as be}from"./index-B1uuY7UL.js";import{d as Zt,u as Xt}from"./constants-B9t4Nuz_.js";import{n as Ke}from"./CheckDone01-UsIketHR.js";import{n as Jt}from"./ChevronLeft-BZsszCLQ.js";import{i as es}from"./Loading01-WTkiPysv.js";import{s as Le}from"./Plus-Dto-8y6a.js";import{t as et}from"./Users03-BXwEsNFj.js";import{i as Ve}from"./X-CNbskBah.js";import{E as ts,C as ss}from"./editable-task-title-COr46zxY.js";import{T as is}from"./tasks-panel-XTVNkW83.js";import{a as ls}from"./use-llm-IG8InXvX.js";import{a as os}from"./context-CiizXS06.js";import{C as at}from"./create-project-dialog-BvxMRX5X.js";import{a as ns,b as as,c as rs,D as cs}from"./dialog-CTFHRhvl.js";import{t as rt,i as ds}from"./Coins01-DWo6Ypxq.js";import{n as ms}from"./Container-YdffBHg3.js";import{e as fs}from"./Dataflow03-CUuQJ-m_.js";import{a as us}from"./Home02-Dz88FEOV.js";import{i as qe}from"./LayoutLeft-B8-msEGR.js";import{s as ps}from"./RefreshCcw01-DckyCUMd.js";import{t as He}from"./Settings01-CYUXeHtK.js";import{u as xs,a as ct}from"./org-ai-providers-Cu3Y8hG7.js";import{u as dt,a as mt}from"./use-project-DNZXkIib.js";import{u as hs}from"./use-mobile-kAkblq0-.js";import{b as gs,T as bs,a as js,c as vs}from"./tooltip-BLTgyg7W.js";import{S as ce}from"./skeleton-CU7LuZGk.js";import{n as ze}from"./LinkExternal01-B21lACin.js";import{t as ft}from"./ChevronDown-D0TXudCx.js";import{A as Ae}from"./avatar-ChRCLY4k.js";import{c as re,f as ys,e as Ns,b as ut,D as pt,a as xt,h as Ue,d as Ss}from"./dropdown-menu-Cp0O2jCN.js";import{i as Ee}from"./Check-CuWDIJeM.js";import{C as _s}from"./create-organization-dialog-BCMxp6fo.js";import{a as ks}from"./Copy01-CPHBT83w.js";import{i as Cs}from"./File06-ZV5CfSHG.js";import{i as ws}from"./Globe01-BdWDm7Ni.js";import{i as $s}from"./Shield01-CJ-f24yL.js";import{a as zs,P as Is,b as Ps}from"./popover-D1WG-emQ.js";import{n as st}from"./Inbox01-CJphqD3y.js";import{s as As}from"./XClose-B0FgAxIQ.js";import{b as Es}from"./use-connection-BNGXvSqD.js";import{b as Os}from"./use-mcp-tools-BCCglZve.js";import{c as Ts,A as Ms}from"./use-binding-DSWv53zN.js";import{C as Ds,b as Rs,c as Ls}from"./collapsible-ttq3VbhQ.js";import{i as Hs}from"./ChevronRight-UJRwW9xN.js";import{u as tt}from"./use-local-storage-C3Bo802w.js";import{a as Us,R as ht,b as Bs}from"./resizable-CqLBllsV.js";import"./spinner-CpOteR2a.js";import"./use-mcp-prompts-D_02f3uO.js";import"./useQuery-BeFLqBun.js";import"./form-DPPO-3Tw.js";import"./label-CnT8WAQY.js";import"./input-BM9bdg-F.js";import"./index-B3fUA0k0.js";import"./usage-B8rgFVXq.js";import"./ArrowUp-tKKJvEkq.js";import"./Edit01-Dpq6F4lk.js";import"./Lock01-DqO9uSP7.js";import"./XCircle-DvUvQRq1.js";import"./AlertCircle-5ZbLDi3s.js";import"./select-RxUFw6pZ.js";import"./ChevronUp-DXMXl76b.js";import"./index-COM-PDLy.js";import"./ArrowLeft-D0Lalw4x.js";import"./use-copy-DPJ8nWWs.js";import"./tabs-XMAGaWgq.js";import"./badge-C4uZcq7J.js";import"./Code01-DZzuHJh9.js";import"./checkbox-D2IG7klY.js";import"./AlignLeft-D4ghzTQG.js";import"./Image01-DBWShOGl.js";import"./Key01-IptFTL_3.js";import"./SearchMd-Kap2MdR9.js";import"./index-BqlWbrG0.js";import"./ai-providers-logos-W57Qm-EN.js";import"./select-virtual-mcp-DU8qBWLM.js";import"./use-virtual-mcp-DoDJBE5n.js";import"./use-collections-C8rLdQUN.js";import"./useMutation-CNVq636e.js";import"./use-create-virtual-mcp-BfS4KaKE.js";import"./use-mcp-resources-BNoK6dDS.js";import"./marked.esm-BaswSlok.js";import"./markdown-ZobUYaB1.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLfglV2_.js";import"./types-BPYct9bF.js";import"./Eye-DDwMVcxZ.js";import"./Globe02-Cn3qFriL.js";import"./LayersTwo01-B5fVqAUB.js";import"./Clock-DKQ7EGj-.js";import"./Trash01-DkXbOnbi.js";import"./useSuspenseInfiniteQuery-CdVyznmA.js";import"./infiniteQueryObserver-x0ce-nmx.js";import"./CheckCircle-wz1RfkCA.js";import"./collection-search-Mtc1qP5K.js";import"./user-6WV0RuBu.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./decopilot-events-Brt4gAR6.js";import"./textarea-BLuscN8X.js";import"./EyeOff-D8njwIM7.js";import"./card-B4dTtsmd.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./alert-dialog-DtAWdTyc.js";import"./binder-hd3C3mvD.js";const gt=({size:t=24,color:e="currentColor",...i})=>P.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},P.createElement("path",{d:"M9 7H4.6c-.56 0-.84 0-1.054.109a1 1 0 0 0-.437.437C3 7.76 3 8.04 3 8.6v10.8c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C3.76 21 4.04 21 4.6 21H9m0 0h6m-6 0V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 3 10.04 3 10.6 3h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 3.76 15 4.04 15 4.6V21m0-10h4.4c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C21 11.76 21 12.04 21 12.6v6.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C20.24 21 19.96 21 19.4 21H15"}));gt.displayName="BarChart10";const bt=({size:t=24,color:e="currentColor",...i})=>P.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},P.createElement("path",{d:"M8 14s1.5 2 4 2 4-2 4-2m-1-5h.01M9 9h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-6.5-3a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Zm-6 0a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"}));bt.displayName="FaceSmile";const jt=({size:t=24,color:e="currentColor",...i})=>P.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},P.createElement("path",{d:"m16 17 5-5m0 0-5-5m5 5H9m0-9H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H9"}));jt.displayName="LogOut01";function Fs(){const t=C.c(70),{org:e}=Ie(),[,i]=nt(),l=ls(),{selectedVirtualMcp:o,isChatEmpty:n,activeTaskId:a,createTask:r,switchToTask:c,tasks:d}=os();let f;if(t[0]!==a||t[1]!==d){let U;t[3]!==a?(U=K=>K.id===a,t[3]=a,t[4]=U):U=t[4],f=d.find(U),t[0]=a,t[1]=d,t[2]=f}else f=t[2];const u=f,[m,p]=P.useState("chat"),[h,g]=P.useTransition();let j;t[5]!==e.id?(j=Zt(e.id),t[5]=e.id,t[6]=j):j=t[6];const b=o??j;let x;t[7]!==r?(x=()=>{g(()=>{r()})},t[7]=r,t[8]=x):x=t[8];const y=x;if(l?.providers?.length===0){let U;t[9]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(be.Header.Left,{className:"gap-2"}),t[9]=U):U=t[9];let K;t[10]!==i?(K=()=>i(!1),t[10]=i,t[11]=K):K=t[11];let Z;t[12]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=Z):Z=t[12];let le;t[13]!==K?(le=s.jsxs(be.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[U,s.jsx(be.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:K,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:Z})})]}),t[13]=K,t[14]=le):le=t[14];let ve;t[15]===Symbol.for("react.memo_cache_sentinel")?(ve=s.jsx(ae.Main,{className:"flex flex-col items-center",children:s.jsx(ae.EmptyState,{children:s.jsx(ae.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features."})})}),t[15]=ve):ve=t[15];let ne;return t[16]!==le?(ne=s.jsxs(ae,{className:"animate-in fade-in-0 duration-200",children:[le,ve]}),t[16]=le,t[17]=ne):ne=t[17],ne}const k=m!=="chat"||h?"opacity-0 pointer-events-none":"opacity-100";let v;t[18]!==k?(v=I("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",k),t[18]=k,t[19]=v):v=t[19];let N;t[20]!==u||t[21]!==n?(N=!n&&u?.title&&s.jsx(ts,{taskId:u.id,text:u.title,className:"text-sm font-medium text-foreground"}),t[20]=u,t[21]=n,t[22]=N):N=t[22];let w;t[23]!==N?(w=s.jsx(be.Header.Left,{className:"gap-2",children:N}),t[23]=N,t[24]=w):w=t[24];let z;t[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(Le,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[25]=z):z=t[25];let S;t[26]!==y||t[27]!==h?(S=s.jsx("button",{type:"button",onClick:y,disabled:h,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:z}),t[26]=y,t[27]=h,t[28]=S):S=t[28];let A;t[29]===Symbol.for("react.memo_cache_sentinel")?(A=()=>p("tasks"),t[29]=A):A=t[29];let O;t[30]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("button",{type:"button",onClick:A,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"Tasks",children:s.jsx(Ke,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[30]=O):O=t[30];let T;t[31]!==i?(T=()=>i(!1),t[31]=i,t[32]=T):T=t[32];let R;t[33]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[33]=R):R=t[33];let M;t[34]!==T?(M=s.jsx("button",{type:"button",onClick:T,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:R}),t[34]=T,t[35]=M):M=t[35];let E;t[36]!==M||t[37]!==S?(E=s.jsxs(be.Header.Right,{className:"gap-1",children:[S,O,M]}),t[36]=M,t[37]=S,t[38]=E):E=t[38];let D;t[39]!==E||t[40]!==w?(D=s.jsxs(be.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[w,E]}),t[39]=E,t[40]=w,t[41]=D):D=t[41];let L;t[42]!==b||t[43]!==n?(L=s.jsx(ae.Main,{children:n?s.jsx(ae.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 p-0 text-center",children:[s.jsx(Qt,{icon:b.icon,name:b.title,size:"lg",fallbackIcon:s.jsx(et,{size:32}),className:"size-[60px]! rounded-[18px]!"}),s.jsx("h3",{className:"text-xl font-medium text-foreground",children:b.title}),s.jsx("div",{className:"text-muted-foreground text-center text-sm max-w-md",children:b.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(ae.IceBreakers,{})]})}):s.jsx(ae.Messages,{})}),t[42]=b,t[43]=n,t[44]=L):L=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ae.Footer,{children:s.jsx(ae.Input,{onOpenContextPanel:()=>p("context")})}),t[45]=F):F=t[45];let H;t[46]!==D||t[47]!==L||t[48]!==v?(H=s.jsxs("div",{className:v,children:[D,L,F]}),t[46]=D,t[47]=L,t[48]=v,t[49]=H):H=t[49];const J=m==="tasks"?"opacity-100":"opacity-0 pointer-events-none";let G;t[50]!==J?(G=I("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",J),t[50]=J,t[51]=G):G=t[51];let ee;t[52]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(be.Header.Left,{className:"gap-2",children:s.jsx("span",{className:"text-sm font-normal text-foreground",children:"Tasks"})}),t[52]=ee):ee=t[52];let he;t[53]===Symbol.for("react.memo_cache_sentinel")?(he=()=>p("chat"),t[53]=he):he=t[53];let de;t[54]===Symbol.for("react.memo_cache_sentinel")?(de=s.jsxs(be.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[ee,s.jsx(be.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:he,className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Back to chat",children:s.jsx(Jt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),t[54]=de):de=t[54];let te;t[55]===Symbol.for("react.memo_cache_sentinel")?(te=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(es,{size:16,className:"animate-spin text-muted-foreground"})}),t[55]=te):te=t[55];let se;t[56]!==c?(se=s.jsx(Ze,{fallback:Ws,children:s.jsx(P.Suspense,{fallback:te,children:s.jsx(is,{onTaskSelect:async U=>{await c(U),p("chat")}})})}),t[56]=c,t[57]=se):se=t[57];let q;t[58]!==G||t[59]!==se?(q=s.jsxs("div",{className:G,children:[de,se]}),t[58]=G,t[59]=se,t[60]=q):q=t[60];const ie=m==="context"?"opacity-100":"opacity-0 pointer-events-none";let W;t[61]!==ie?(W=I("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",ie),t[61]=ie,t[62]=W):W=t[62];let Y;t[63]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(ss,{back:!0,onClose:()=>p("chat")}),t[63]=Y):Y=t[63];let Q;t[64]!==W?(Q=s.jsx("div",{className:W,children:Y}),t[64]=W,t[65]=Q):Q=t[65];let me;return t[66]!==H||t[67]!==q||t[68]!==Q?(me=s.jsxs(ae,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[H,q,Q]}),t[66]=H,t[67]=q,t[68]=Q,t[69]=me):me=t[69],me}function Ws(){return s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Unable to load tasks"})})}function Gs(){const t=C.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ae.Skeleton,{}),t[0]=e):e=t[0];let i;return t[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ze,{fallback:e,children:s.jsx(P.Suspense,{fallback:s.jsx(ae.Skeleton,{}),children:s.jsx(Fs,{})})}),t[1]=i):i=t[1],i}function Ks(t){const e=C.c(5),{open:i,onOpenChange:l}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(as,{children:s.jsx(rs,{children:"Keyboard Shortcuts"})}),e[0]=o):o=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs(ns,{className:"sm:max-w-md",children:[o,s.jsx("div",{className:"flex flex-col gap-4",children:Vt.map(Vs)})]}),e[1]=n):n=e[1];let a;return e[2]!==l||e[3]!==i?(a=s.jsx(cs,{open:i,onOpenChange:l,children:n}),e[2]=l,e[3]=i,e[4]=a):a=e[4],a}function Vs(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(qs)})]},t.label)}function qs(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Ys)})]},t.description)}function Ys(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Qs(){const t=C.c(59),{locator:e,org:i}=Ie(),l=Xe(),o=Je(),[n]=xs(),{org:a,project:r}=We.parse(e),c=We.isOrgAdminProject(e),{data:d}=dt(i.id,r);let f;t[0]!==d?.enabledPlugins?(f=d?.enabledPlugins??[],t[0]=d?.enabledPlugins,t[1]=f):f=t[1];const u=f,m=d?.ui?.pinnedViews??[];let p;t[2]!==u?(p=$=>u.includes($.pluginId),t[2]=u,t[3]=p):p=t[3];const h=kt.filter(p),g=o.location.pathname,j=`/${a}/${r}`,_=g===j||g===`${j}/`;let b;t[4]!==j||t[5]!==g?(b=$=>g.startsWith(`${j}/${$}`),t[4]=j,t[5]=g,t[6]=b):b=t[6];const x=b;let y;t[7]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(us,{}),t[7]=y):y=t[7];const k={key:"home",label:"Home",icon:y,isActive:_,onClick:()=>{_?window.dispatchEvent(new CustomEvent("reset-home-view")):l({to:"/$org/$project",params:{org:a,project:r}})}};let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ke,{}),t[8]=v):v=t[8];const N={key:"tasks",label:"Tasks",icon:v,isActive:x("tasks"),onClick:()=>l({to:"/$org/$project/tasks",params:{org:a,project:V}})};let w;t[9]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(ms,{}),t[9]=w):w=t[9];const z={key:"mcps",label:"Connections",icon:w,isActive:x("mcps"),onClick:()=>l({to:"/$org/$project/mcps",params:{org:a,project:V}})};let S;t[10]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(wt,{}),t[10]=S):S=t[10];const A={key:"projects",label:"Projects",icon:S,isActive:x("projects"),onClick:()=>l({to:"/$org/$project/projects",params:{org:a,project:V}})};let O;t[11]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(rt,{}),t[11]=O):O=t[11];const T={key:"store",label:"Store",icon:O,isActive:x("store"),onClick:()=>l({to:"/$org/$project/store",params:{org:a,project:V}})};let R;t[12]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(et,{}),t[12]=R):R=t[12];const M={key:"agents",label:"Agents",icon:R,isActive:x("agents"),onClick:()=>l({to:"/$org/$project/agents",params:{org:a,project:V}})};let E;t[13]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ps,{}),t[13]=E):E=t[13];const D={key:"automations",label:"Automations",icon:E,isActive:x("automations"),onClick:()=>l({to:"/$org/$project/automations",params:{org:a,project:V}})};let L;t[14]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(gt,{}),t[14]=L):L=t[14];const F={key:"monitoring",label:"Monitor",icon:L,isActive:x("monitoring"),onClick:()=>l({to:"/$org/$project/monitoring",params:{org:a,project:V}})};let H;t[15]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(bt,{}),t[15]=H):H=t[15];const J={key:"members",label:"Members",icon:H,isActive:x("members"),onClick:()=>l({to:"/$org/$project/members",params:{org:a,project:V}})},G=h.map($=>({key:$.pluginId,label:$.label,icon:$.icon,isActive:x($.pluginId),onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:a,project:r,pluginId:$.pluginId}})}));let ee;t[16]!==u?(ee=$=>u.includes($.pluginId),t[16]=u,t[17]=ee):ee=t[17];const de=Ct.filter(ee).map($=>({type:"group",group:{id:`${$.pluginId}-${$.id}`,label:$.label,items:$.items.map((B,oe)=>({key:`${$.pluginId}-${$.id}-${oe}`,label:B.label,icon:B.icon,isActive:x($.pluginId),onClick:()=>l({to:"/$org/$project/$pluginId",params:{org:a,project:r,pluginId:$.pluginId}})})),defaultExpanded:$.defaultExpanded??!0}})),te=m.map($=>({key:`app-${$.connectionId}-${$.toolName}`,label:$.label||$.toolName,icon:$.icon?s.jsx("img",{src:$.icon,alt:"",className:"size-4 rounded"}):s.jsx(qe,{}),isActive:x(`apps/${$.connectionId}/${encodeURIComponent($.toolName)}`),onClick:()=>l({to:"/$org/$project/apps/$connectionId/$toolName",params:{org:a,project:r,connectionId:$.connectionId,toolName:$.toolName}})}));let se;t[18]!==te?(se=te.length>0?{type:"group",group:{id:"apps",label:"Apps",items:te,defaultExpanded:!0}}:null,t[18]=te,t[19]=se):se=t[19];const q=se;if(c){let $;t[20]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(He,{}),t[20]=$):$=t[20];let B;t[21]!==x?(B=x("settings"),t[21]=x,t[22]=B):B=t[22];let oe;t[23]!==l||t[24]!==a?(oe=()=>l({to:"/$org/$project/settings",params:{org:a,project:V}}),t[23]=l,t[24]=a,t[25]=oe):oe=t[25];let fe;t[26]!==B||t[27]!==oe?(fe={key:"settings",label:"Settings",icon:$,isActive:B,onClick:oe},t[26]=B,t[27]=oe,t[28]=fe):fe=t[28];const ke=fe,ge=[{type:"items",items:[k,N,A]},{type:"group",group:{id:"build",label:"Build",items:[...n.experimentalAutomations?[D]:[],M,z,T],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[F,J,ke],defaultExpanded:!0}}];if(G.length>0){let ue;t[29]!==G?(ue={type:"items",items:G},t[29]=G,t[30]=ue):ue=t[30],ge.push(ue)}return de.length>0&&ge.push(...de),q&&ge.push(q),ge}let ie;t[31]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(Ke,{}),t[31]=ie):ie=t[31];let W;t[32]!==x?(W=x("tasks"),t[32]=x,t[33]=W):W=t[33];let Y;t[34]!==l||t[35]!==a||t[36]!==r?(Y=()=>l({to:"/$org/$project/tasks",params:{org:a,project:r}}),t[34]=l,t[35]=a,t[36]=r,t[37]=Y):Y=t[37];let Q;t[38]!==W||t[39]!==Y?(Q={key:"tasks",label:"Tasks",icon:ie,isActive:W,onClick:Y},t[38]=W,t[39]=Y,t[40]=Q):Q=t[40];const me=Q;let U;t[41]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(fs,{}),t[41]=U):U=t[41];let K;t[42]!==x?(K=x("workflows"),t[42]=x,t[43]=K):K=t[43];let Z;t[44]!==l||t[45]!==a||t[46]!==r?(Z=()=>l({to:"/$org/$project/workflows",params:{org:a,project:r}}),t[44]=l,t[45]=a,t[46]=r,t[47]=Z):Z=t[47];let le;t[48]!==K||t[49]!==Z?(le={key:"workflows",label:"Workflows",icon:U,isActive:K,onClick:Z},t[48]=K,t[49]=Z,t[50]=le):le=t[50];const ve=le;let ne;t[51]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(He,{}),t[51]=ne):ne=t[51];let ye;t[52]!==l||t[53]!==a||t[54]!==r?(ye={key:"configure",label:"Configure",icon:ne,isActive:!1,isExternal:!0,onClick:()=>l({to:"/$org/$project/projects/$slug/settings/general",params:{org:a,project:V,slug:r}})},t[52]=l,t[53]=a,t[54]=r,t[55]=ye):ye=t[55];const xe=[{type:"items",items:[k,me,ve,ye]}];if(G.length>0){let $;t[56]===Symbol.for("react.memo_cache_sentinel")?($={type:"divider"},t[56]=$):$=t[56],xe.push($);let B;t[57]!==G?(B={type:"items",items:G},t[57]=G,t[58]=B):B=t[58],xe.push(B)}return de.length>0&&xe.push(...de),q&&xe.push(q),xe}function Zs(t){const e=C.c(4);let i;e[0]!==t?({...i}=t,e[0]=t,e[1]=i):i=e[1];let l;return e[2]!==i?(l=s.jsx($t,{"data-slot":"sheet",...i}),e[2]=i,e[3]=l):l=e[3],l}function Xs(t){const e=C.c(4);let i;e[0]!==t?({...i}=t,e[0]=t,e[1]=i):i=e[1];let l;return e[2]!==i?(l=s.jsx(At,{"data-slot":"sheet-portal",...i}),e[2]=i,e[3]=l):l=e[3],l}function Js(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx(Ot,{"data-slot":"sheet-overlay",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function ei(t){const e=C.c(17);let i,l,o,n;e[0]!==t?({className:l,children:i,side:n,...o}=t,e[0]=t,e[1]=i,e[2]=l,e[3]=o,e[4]=n):(i=e[1],l=e[2],o=e[3],n=e[4]);const a=n===void 0?"right":n;let r;e[5]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Js,{}),e[5]=r):r=e[5];const c=a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",d=a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",u=a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let m;e[6]!==l||e[7]!==c||e[8]!==d||e[9]!==f||e[10]!==u?(m=I("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",c,d,f,u,l),e[6]=l,e[7]=c,e[8]=d,e[9]=f,e[10]=u,e[11]=m):m=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs(Et,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[s.jsx(Ve,{className:"size-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=p):p=e[12];let h;return e[13]!==i||e[14]!==o||e[15]!==m?(h=s.jsxs(Xs,{children:[r,s.jsxs(Pt,{"data-slot":"sheet-content",className:m,...o,children:[i,p]})]}),e[13]=i,e[14]=o,e[15]=m,e[16]=h):h=e[16],h}function ti(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("flex flex-col gap-1.5 p-4",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sheet-header",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function si(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("text-foreground font-semibold",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx(zt,{"data-slot":"sheet-title",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function ii(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("text-muted-foreground text-sm",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx(It,{"data-slot":"sheet-description",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}const li="sidebar_state",oi=3600*24*7,ni="16rem",ai="18rem",ri="3rem",ci="b",vt=P.createContext(null);function Fe(){const t=P.useContext(vt);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function di(t){const e=C.c(21),{defaultOpen:i,open:l,onOpenChange:o,children:n}=t,a=i===void 0?!0:i,r=hs(),[c,d]=P.useState(!1),[f,u]=P.useState(a),m=l??f;let p;e[0]!==m||e[1]!==o?(p=w=>{const z=typeof w=="function"?w(m):w;o?o(z):u(z),document.cookie=`${li}=${z}; path=/; max-age=${oi}`},e[0]=m,e[1]=o,e[2]=p):p=e[2];const h=p;let g;e[3]!==r||e[4]!==h?(g=()=>r?d(fi):h(mi),e[3]=r,e[4]=h,e[5]=g):g=e[5];const j=g;let _,b;e[6]!==j?(_=()=>{const w=z=>{if(z.key===ci&&(z.metaKey||z.ctrlKey)){const S=z.target;if(S.tagName==="INPUT"||S.tagName==="TEXTAREA"||S.isContentEditable)return;z.preventDefault(),j()}};return globalThis.addEventListener("keydown",w),()=>globalThis.removeEventListener("keydown",w)},b=[j],e[6]=j,e[7]=_,e[8]=b):(_=e[7],b=e[8]),P.useEffect(_,b);const x=m?"expanded":"collapsed";let y;e[9]!==r||e[10]!==m||e[11]!==c||e[12]!==h||e[13]!==x||e[14]!==j?(y={state:x,open:m,setOpen:h,isMobile:r,openMobile:c,setOpenMobile:d,toggleSidebar:j},e[9]=r,e[10]=m,e[11]=c,e[12]=h,e[13]=x,e[14]=j,e[15]=y):y=e[15];const k=y;let v;e[16]!==n?(v=s.jsx(gs,{delayDuration:0,children:n}),e[16]=n,e[17]=v):v=e[17];let N;return e[18]!==k||e[19]!==v?(N=s.jsx(vt.Provider,{value:k,children:v}),e[18]=k,e[19]=v,e[20]=N):N=e[20],N}function mi(t){return!t}function fi(t){return!t}function ui(t){const e=C.c(14);let i,l,o,n;e[0]!==t?({className:l,style:n,children:i,...o}=t,e[0]=t,e[1]=i,e[2]=l,e[3]=o,e[4]=n):(i=e[1],l=e[2],o=e[3],n=e[4]);let a;e[5]!==n?(a={"--sidebar-width":ni,"--sidebar-width-icon":ri,...n},e[5]=n,e[6]=a):a=e[6];const r=a;let c;e[7]!==l?(c=I("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",l),e[7]=l,e[8]=c):c=e[8];let d;return e[9]!==i||e[10]!==o||e[11]!==r||e[12]!==c?(d=s.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:c,...o,children:i}),e[9]=i,e[10]=o,e[11]=r,e[12]=c,e[13]=d):d=e[13],d}function pi(t){const e=C.c(42);let i,l,o,n,a,r;e[0]!==t?({side:n,variant:a,collapsible:r,className:l,children:i,...o}=t,e[0]=t,e[1]=i,e[2]=l,e[3]=o,e[4]=n,e[5]=a,e[6]=r):(i=e[1],l=e[2],o=e[3],n=e[4],a=e[5],r=e[6]);const c=n===void 0?"left":n,d=a===void 0?"sidebar":a,f=r===void 0?"offcanvas":r,{isMobile:u,state:m,openMobile:p,setOpenMobile:h}=Fe();if(f==="none"){let v;e[7]!==l?(v=I("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",l),e[7]=l,e[8]=v):v=e[8];let N;return e[9]!==i||e[10]!==o||e[11]!==v?(N=s.jsx("div",{"data-slot":"sidebar",className:v,...o,children:i}),e[9]=i,e[10]=o,e[11]=v,e[12]=N):N=e[12],N}if(u){let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v={"--sidebar-width":ai},e[13]=v):v=e[13];let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs(ti,{className:"sr-only",children:[s.jsx(si,{children:"Sidebar"}),s.jsx(ii,{children:"Displays the mobile sidebar."})]}),e[14]=N):N=e[14];let w;e[15]!==i?(w=s.jsx("div",{className:"flex h-full w-full flex-col",children:i}),e[15]=i,e[16]=w):w=e[16];let z;e[17]!==c||e[18]!==w?(z=s.jsxs(ei,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:v,side:c,children:[N,w]}),e[17]=c,e[18]=w,e[19]=z):z=e[19];let S;return e[20]!==p||e[21]!==o||e[22]!==h||e[23]!==z?(S=s.jsx(Zs,{open:p,onOpenChange:h,...o,children:z}),e[20]=p,e[21]=o,e[22]=h,e[23]=z,e[24]=S):S=e[24],S}const g=d==="floating"||d==="inset"?"data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"data-[collapsible=icon]:w-(--sidebar-width-icon)";let j;e[25]!==g?(j=I("group peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden","w-(--sidebar-width) transition-[width] duration-300 ease-[var(--ease-out-quart)]","data-[collapsible=offcanvas]:w-0",g),e[25]=g,e[26]=j):j=e[26];const _=m==="collapsed"?f:"";let b;e[27]!==l?(b=I("flex flex-col h-full w-(--sidebar-width)",l),e[27]=l,e[28]=b):b=e[28];let x;e[29]!==i?(x=s.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:i}),e[29]=i,e[30]=x):x=e[30];let y;e[31]!==o||e[32]!==b||e[33]!==x?(y=s.jsx("div",{"data-slot":"sidebar-container",className:b,...o,children:x}),e[31]=o,e[32]=b,e[33]=x,e[34]=y):y=e[34];let k;return e[35]!==c||e[36]!==m||e[37]!==j||e[38]!==_||e[39]!==y||e[40]!==d?(k=s.jsx("div",{className:j,"data-state":m,"data-collapsible":_,"data-variant":d,"data-side":c,"data-slot":"sidebar",children:y}),e[35]=c,e[36]=m,e[37]=j,e[38]=_,e[39]=y,e[40]=d,e[41]=k):k=e[41],k}function xi(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("main",{"data-slot":"sidebar-inset",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function yt(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("flex flex-col gap-2 p-2",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function hi(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("flex flex-col gap-2 p-2",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function gi(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("h-4 m-0! w-full",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-sidebar":"separator",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function bi(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function Oe(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function Te(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("w-full text-sm",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function je(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("flex w-full min-w-0 flex-col gap-1",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}function pe(t){const e=C.c(8);let i,l;e[0]!==t?({className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l):(i=e[1],l=e[2]);let o;e[3]!==i?(o=I("group/menu-item relative",i),e[3]=i,e[4]=o):o=e[4];let n;return e[5]!==l||e[6]!==o?(n=s.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:o,...l}),e[5]=l,e[6]=o,e[7]=n):n=e[7],n}const ji=Mt("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md py-0 pr-0.5 pl-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2!",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Me(t){const e=C.c(28);let i,l,o,n,a,r,c;e[0]!==t?({asChild:o,isActive:n,variant:a,size:r,tooltip:c,className:i,...l}=t,e[0]=t,e[1]=i,e[2]=l,e[3]=o,e[4]=n,e[5]=a,e[6]=r,e[7]=c):(i=e[1],l=e[2],o=e[3],n=e[4],a=e[5],r=e[6],c=e[7]);const d=o===void 0?!1:o,f=n===void 0?!1:n,u=a===void 0?"default":a,m=r===void 0?"default":r,p=d?Tt:"button",{isMobile:h,state:g}=Fe();let j;e[8]!==i||e[9]!==m||e[10]!==u?(j=I(ji({variant:u,size:m}),i),e[8]=i,e[9]=m,e[10]=u,e[11]=j):j=e[11];let _;e[12]!==p||e[13]!==f||e[14]!==l||e[15]!==m||e[16]!==j?(_=s.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":m,"data-active":f,className:j,...l}),e[12]=p,e[13]=f,e[14]=l,e[15]=m,e[16]=j,e[17]=_):_=e[17];const b=_;if(!c)return b;if(typeof c=="string"){let N;e[18]!==c?(N={children:c},e[18]=c,e[19]=N):N=e[19],c=N}let x;e[20]!==b?(x=s.jsx(js,{asChild:!0,children:b}),e[20]=b,e[21]=x):x=e[21];const y=g!=="collapsed"||h;let k;e[22]!==y||e[23]!==c?(k=s.jsx(bs,{side:"right",align:"center",hidden:y,...c}),e[22]=y,e[23]=c,e[24]=k):k=e[24];let v;return e[25]!==x||e[26]!==k?(v=s.jsxs(vs,{children:[x,k]}),e[25]=x,e[26]=k,e[27]=v):v=e[27],v}function vi(t){const e=C.c(11),{label:i,children:l,defaultExpanded:o}=t,n=o===void 0?!0:o,[a,r]=P.useState(n),{state:c}=Fe(),d=c==="collapsed";let f;e[0]!==a||e[1]!==d||e[2]!==i?(f=d?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(je,{children:s.jsx(pe,{children:s.jsxs(Me,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>r(!a),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:i}),s.jsx(ft,{size:12,className:I("text-muted-foreground transition-transform duration-200",!a&&"-rotate-90")})]})})}),e[0]=a,e[1]=d,e[2]=i,e[3]=f):f=e[3];let u;e[4]!==l||e[5]!==a||e[6]!==d?(u=(d||a)&&s.jsx(Te,{children:s.jsx(je,{className:"gap-0.5",children:l})}),e[4]=l,e[5]=a,e[6]=d,e[7]=u):u=e[7];let m;return e[8]!==f||e[9]!==u?(m=s.jsxs(Oe,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[f,u]}),e[8]=f,e[9]=u,e[10]=m):m=e[10],m}function Nt(t){const e=C.c(22),{item:i}=t,l=i.key,o=i.onClick,n=i.isActive,a=i.label,r=i.isExternal&&"group/external";let c;e[0]!==r?(c=I(r),e[0]=r,e[1]=c):c=e[1];let d;e[2]!==i.icon?(d=s.jsx("span",{className:"[&>svg]:size-4",children:i.icon}),e[2]=i.icon,e[3]=d):d=e[3];const f=i.isExternal&&"group-hover/external:underline underline-offset-2";let u;e[4]!==f?(u=I("truncate group-data-[collapsible=icon]:hidden",f),e[4]=f,e[5]=u):u=e[5];let m;e[6]!==i.label||e[7]!==u?(m=s.jsx("span",{className:u,children:i.label}),e[6]=i.label,e[7]=u,e[8]=m):m=e[8];let p;e[9]!==i.isExternal?(p=i.isExternal&&s.jsx(ze,{size:12,className:"ml-auto mr-1 shrink-0 opacity-0 group-hover/external:opacity-60 transition-opacity group-data-[collapsible=icon]:hidden"}),e[9]=i.isExternal,e[10]=p):p=e[10];let h;e[11]!==i.isActive||e[12]!==i.label||e[13]!==i.onClick||e[14]!==m||e[15]!==p||e[16]!==c||e[17]!==d?(h=s.jsxs(Me,{onClick:o,isActive:n,tooltip:a,className:c,children:[d,m,p]}),e[11]=i.isActive,e[12]=i.label,e[13]=i.onClick,e[14]=m,e[15]=p,e[16]=c,e[17]=d,e[18]=h):h=e[18];let g;return e[19]!==i.key||e[20]!==h?(g=s.jsx(pe,{children:h},l),e[19]=i.key,e[20]=h,e[21]=g):g=e[21],g}function yi(t){const e=C.c(12),{section:i}=t;switch(i.type){case"divider":{let l;return e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(gi,{className:"my-2"}),e[0]=l):l=e[0],l}case"spacer":{let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1"}),e[1]=l):l=e[1],l}case"group":{const l=i.group.label,o=i.group.defaultExpanded;let n;e[2]!==i.group.items?(n=i.group.items.map(Si),e[2]=i.group.items,e[3]=n):n=e[3];let a;return e[4]!==i.group.defaultExpanded||e[5]!==i.group.label||e[6]!==n?(a=s.jsx(vi,{label:l,defaultExpanded:o,children:n}),e[4]=i.group.defaultExpanded,e[5]=i.group.label,e[6]=n,e[7]=a):a=e[7],a}case"items":{let l;e[8]!==i.items?(l=i.items.map(Ni),e[8]=i.items,e[9]=l):l=e[9];let o;return e[10]!==l?(o=s.jsx(Oe,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Te,{children:s.jsx(je,{className:"gap-0.5",children:l})})}),e[10]=l,e[11]=o):o=e[11],o}}}function Ni(t){return s.jsx(Nt,{item:t},t.key)}function Si(t){return s.jsx(Nt,{item:t},t.key)}function St(t){const e=C.c(14),{sections:i,header:l,footer:o,additionalContent:n,variant:a,collapsible:r,contentClassName:c}=t,d=a===void 0?"sidebar":a,f=r===void 0?"icon":r;let u;e[0]!==c?(u=I("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",c),e[0]=c,e[1]=u):u=e[1];let m;e[2]!==i?(m=i.map(_i),e[2]=i,e[3]=m):m=e[3];let p;e[4]!==n||e[5]!==u||e[6]!==m?(p=s.jsxs(bi,{className:u,children:[m,n]}),e[4]=n,e[5]=u,e[6]=m,e[7]=p):p=e[7];let h;return e[8]!==f||e[9]!==o||e[10]!==l||e[11]!==p||e[12]!==d?(h=s.jsxs(pi,{variant:d,collapsible:f,children:[l,p,o]}),e[8]=f,e[9]=o,e[10]=l,e[11]=p,e[12]=d,e[13]=h):h=e[13],h}function _i(t,e){return s.jsx(yi,{section:t},e)}St.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,i)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ce,{className:"h-full bg-sidebar-accent rounded-md"})},i))})};function ki(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(ce,{className:"h-8 w-full rounded-lg"}),s.jsx(ce,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Ci(t){const e=C.c(12),{organizationId:i,currentProjectSlug:l,onSelect:o}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={suspense:!0},e[0]=n):n=e[0];const{data:a}=mt(i,n);let r,c;if(e[1]!==l||e[2]!==o||e[3]!==a){c=Symbol.for("react.early_return_sentinel");e:{const f=a?.filter(wi)??[];if(f.length===0){let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=m):m=e[6],c=m;break e}let u;e[7]!==l||e[8]!==o?(u=m=>{const p=l===m.slug,h=m.ui?.themeColor??"#3B82F6";return s.jsxs(re,{className:I("gap-2.5",p&&"bg-accent"),onClick:()=>o(m.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:m.ui?.icon?void 0:{backgroundColor:h},children:m.ui?.icon?s.jsx("img",{src:m.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:m.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:m.name}),p&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},m.id)},e[7]=l,e[8]=o,e[9]=u):u=e[9],r=f.map(u)}e[1]=l,e[2]=o,e[3]=a,e[4]=r,e[5]=c}else r=e[4],c=e[5];if(c!==Symbol.for("react.early_return_sentinel"))return c;let d;return e[10]!==r?(d=s.jsx(s.Fragment,{children:r}),e[10]=r,e[11]=d):d=e[11],d}function wi(t){return t.slug!==V}function $i(t){let e=0;for(let l=0;l<t.length;l++)e=t.charCodeAt(l)+((e<<5)-e);const i=Math.abs(e)%360;return{backgroundColor:`hsl(${i} 55% 70%)`,color:`hsl(${i} 55% 20%)`}}function Ye(t){const e=C.c(96),{isCollapsed:i,onCreateProject:l}=t,o=i===void 0?!1:i;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const{org:a,project:r}=it(n),{data:c}=_e.useListOrganizations(),d=Xe(),f=c?.find(X=>X.slug===a),[u,m]=P.useState(!1),p=r===V,{data:h}=dt(f?.id??"",p?"":r??"");let g;e[1]!==a?(g=(X,Re)=>X.slug===a?-1:Re.slug===a?1:X.name.localeCompare(Re.name),e[1]=a,e[2]=g):g=e[2];const j=[...c??[]].sort(g);let _;e[3]!==d||e[4]!==a?(_=()=>{a&&d({to:"/$org/$project",params:{org:a,project:V}})},e[3]=d,e[4]=a,e[5]=_):_=e[5];const b=_;let x;e[6]!==d||e[7]!==a?(x=X=>{a&&d({to:"/$org/$project",params:{org:a,project:X}})},e[6]=d,e[7]=a,e[8]=x):x=e[8];const y=x;let k;e[9]!==d?(k=X=>{d({to:"/$org/$project",params:{org:X,project:V}})},e[9]=d,e[10]=k):k=e[10];const v=k;let N;e[11]!==l?(N=l?()=>l():void 0,e[11]=l,e[12]=N):N=e[12];const w=N;let z;e[13]!==d||e[14]!==a||e[15]!==r?(z=()=>{if(!a||!r)return;const X=r===V;d({to:"/$org/$project",params:{org:a,project:r},search:Re=>({...Re,settings:X?"org.general":`project:${r}:general`})})},e[13]=d,e[14]=a,e[15]=r,e[16]=z):z=e[16];const S=z,A=pt,O=o?"w-auto pr-1.5":"w-full";let T;e[17]!==O?(T=I("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",O),e[17]=O,e[18]=T):T=e[18];const R=p?s.jsx("div",{className:I("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:f?.logo?void 0:$i(f?.name??""),children:f?.logo?s.jsx("img",{src:f.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:I("font-semibold leading-none",o?"text-[9px]":"text-xs"),children:(f?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:I("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:h?.ui?.icon?void 0:{backgroundColor:h?.ui?.themeColor??"#60a5fa"},children:h?.ui?.icon?s.jsx("img",{src:h.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:I("font-semibold text-white",o?"text-xs":"text-lg"),children:(h?.name??r??"?").charAt(0).toUpperCase()})});let M;e[19]!==f?.name||e[20]!==h?.name||e[21]!==o||e[22]!==p||e[23]!==r?(M=!o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:f?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:p?"Studio":h?.name??r??""})]}),s.jsx(qt,{size:16,className:"shrink-0 text-sidebar-foreground/40"})]}),e[19]=f?.name,e[20]=h?.name,e[21]=o,e[22]=p,e[23]=r,e[24]=M):M=e[24];let E;e[25]!==T||e[26]!==R||e[27]!==M?(E=s.jsx(xt,{asChild:!0,children:s.jsxs("button",{type:"button",className:T,children:[R,M]})}),e[25]=T,e[26]=R,e[27]=M,e[28]=E):E=e[28];const D=ut,L="start",F="bottom",H="w-64 flex flex-col gap-0.5",J=zi,G=p&&"bg-accent";let ee;e[29]!==G?(ee=I("gap-2.5",G),e[29]=G,e[30]=ee):ee=e[30];const he=f?.logo??"",de=f?.name??"";let te;e[31]!==he||e[32]!==de?(te=s.jsx(Ae,{url:he,fallback:de,size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),e[31]=he,e[32]=de,e[33]=te):te=e[33];const se=f?.name;let q;e[34]!==se?(q=s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",se]}),e[34]=se,e[35]=q):q=e[35];let ie;e[36]!==p?(ie=p&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"}),e[36]=p,e[37]=ie):ie=e[37];let W;e[38]!==b||e[39]!==ee||e[40]!==te||e[41]!==q||e[42]!==ie?(W=s.jsxs(re,{className:ee,onClick:b,children:[te,q,ie]}),e[38]=b,e[39]=ee,e[40]=te,e[41]=q,e[42]=ie,e[43]=W):W=e[43];let Y;e[44]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),e[44]=Y):Y=e[44];let Q;e[45]!==f||e[46]!==y||e[47]!==a||e[48]!==r?(Q=f&&s.jsx(P.Suspense,{fallback:s.jsx(ki,{}),children:s.jsx(Ci,{organizationId:f.id,currentProjectSlug:r,orgSlug:a??"",onSelect:y})}),e[45]=f,e[46]=y,e[47]=a,e[48]=r,e[49]=Q):Q=e[49];let me;e[50]!==w?(me=w&&s.jsxs(re,{className:"gap-2.5",onClick:w,children:[s.jsx(Le,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),e[50]=w,e[51]=me):me=e[51];let U;e[52]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(Ue,{}),e[52]=U):U=e[52];const K=Ns;let Z;e[53]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsxs(Ss,{className:"gap-2.5",children:[s.jsx(rt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),e[53]=Z):Z=e[53];const le=ys,ve="w-48 flex flex-col gap-0.5";let ne;e[54]!==v||e[55]!==a?(ne=X=>s.jsxs(re,{className:I("gap-2.5",X.slug===a&&"bg-accent"),onClick:()=>v(X.slug),children:[s.jsx(Ae,{url:X.logo??"",fallback:X.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:X.name}),X.slug===a&&s.jsx(Ee,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},X.id),e[54]=v,e[55]=a,e[56]=ne):ne=e[56];const ye=j.map(ne);let Pe;e[57]===Symbol.for("react.memo_cache_sentinel")?(Pe=s.jsx(Ue,{}),e[57]=Pe):Pe=e[57];let Ne;e[58]!==m?(Ne=()=>m(!0),e[58]=m,e[59]=Ne):Ne=e[59];let xe,$;e[60]===Symbol.for("react.memo_cache_sentinel")?(xe=s.jsx(Le,{size:14,className:"shrink-0 text-muted-foreground"}),$=s.jsx("span",{children:"Create organization"}),e[60]=xe,e[61]=$):(xe=e[60],$=e[61]);let B;e[62]!==Ne?(B=s.jsxs(re,{className:"gap-2.5",onClick:Ne,children:[xe,$]}),e[62]=Ne,e[63]=B):B=e[63];let oe;e[64]!==le||e[65]!==ye||e[66]!==B?(oe=s.jsxs(le,{className:ve,children:[ye,Pe,B]}),e[64]=le,e[65]=ye,e[66]=B,e[67]=oe):oe=e[67];let fe;e[68]!==K||e[69]!==Z||e[70]!==oe?(fe=s.jsxs(K,{children:[Z,oe]}),e[68]=K,e[69]=Z,e[70]=oe,e[71]=fe):fe=e[71];let ke,ge;e[72]===Symbol.for("react.memo_cache_sentinel")?(ke=s.jsx(He,{size:14,className:"shrink-0 text-muted-foreground"}),ge=s.jsx("span",{children:"Settings"}),e[72]=ke,e[73]=ge):(ke=e[72],ge=e[73]);let ue;e[74]!==S?(ue=s.jsxs(re,{className:"gap-2.5",onClick:S,children:[ke,ge]}),e[74]=S,e[75]=ue):ue=e[75];let Ce;e[76]!==D||e[77]!==J||e[78]!==W||e[79]!==Y||e[80]!==Q||e[81]!==me||e[82]!==U||e[83]!==fe||e[84]!==ue?(Ce=s.jsxs(D,{align:L,side:F,className:H,onCloseAutoFocus:J,children:[W,Y,Q,me,U,fe,ue]}),e[76]=D,e[77]=J,e[78]=W,e[79]=Y,e[80]=Q,e[81]=me,e[82]=U,e[83]=fe,e[84]=ue,e[85]=Ce):Ce=e[85];let we;e[86]!==A||e[87]!==E||e[88]!==Ce?(we=s.jsxs(A,{children:[E,Ce]}),e[86]=A,e[87]=E,e[88]=Ce,e[89]=we):we=e[89];let $e;e[90]!==u||e[91]!==m?($e=s.jsx(_s,{open:u,onOpenChange:m}),e[90]=u,e[91]=m,e[92]=$e):$e=e[92];let De;return e[93]!==we||e[94]!==$e?(De=s.jsxs(s.Fragment,{children:[we,$e]}),e[93]=we,e[94]=$e,e[95]=De):De=e[95],De}function zi(t){return t.preventDefault()}Ye.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(ce,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(ce,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function Qe(t){const e=C.c(4),{onCreateProject:i}=t,{state:l,toggleSidebar:o}=Fe(),n=l==="collapsed";let a;return e[0]!==n||e[1]!==i||e[2]!==o?(a=s.jsx(yt,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(je,{children:s.jsx(pe,{children:n?s.jsxs("div",{className:"flex flex-col w-full gap-0.5",children:[s.jsx(Ye,{isCollapsed:!0,onCreateProject:i}),s.jsx(Me,{onClick:o,tooltip:"Expand sidebar",children:s.jsx(qe,{})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(Ye,{isCollapsed:!1,onCreateProject:i})}),s.jsx(Me,{onClick:o,tooltip:"Collapse sidebar",className:"size-7 shrink-0",children:s.jsx(qe,{})})]})})})}),e[0]=n,e[1]=i,e[2]=o,e[3]=a):a=e[3],a}Qe.Skeleton=function(){return s.jsx(yt,{className:"px-3",children:s.jsx(je,{children:s.jsx(pe,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(ce,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(ce,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsx("div",{className:"flex items-center gap-0.5",children:s.jsx(ce,{className:"size-7 rounded-lg bg-sidebar-accent"})})]})})})})};function Ii(t){const e=C.c(50),{user:i,userImage:l}=t,{open:o}=ct(),[n,a]=P.useState(!1);let r;e[0]!==i.email||e[1]!==i.id||e[2]!==i.name?(r=()=>{const J=`ID: ${i.id}
|
|
2
|
-
Name: ${i.name||"N/A"}
|
|
3
|
-
Email: ${i.email}`;navigator.clipboard.writeText(J),a(!0),Se.success("User info copied to clipboard"),setTimeout(()=>a(!1),2e3)},e[0]=i.email,e[1]=i.id,e[2]=i.name,e[3]=r):r=e[3];const c=r,d=i.name||i.email||"U";let f;e[4]!==d||e[5]!==l?(f=s.jsx(Ae,{url:l,fallback:d,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=d,e[5]=l,e[6]=f):f=e[6];const u=i.name||"User";let m;e[7]!==u?(m=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:u})}),e[7]=u,e[8]=m):m=e[8];let p;e[9]!==f||e[10]!==m?(p=s.jsx(xt,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[f,m]})}),e[9]=f,e[10]=m,e[11]=p):p=e[11];const h=i.name||i.email||"U";let g;e[12]!==h||e[13]!==l?(g=s.jsx(Ae,{url:l,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=h,e[13]=l,e[14]=g):g=e[14];const j=i.name||"User";let _;e[15]!==j?(_=s.jsx("div",{className:"text-sm font-medium truncate",children:j}),e[15]=j,e[16]=_):_=e[16];let b;e[17]!==i.email?(b=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:i.email}),e[17]=i.email,e[18]=b):b=e[18];let x;e[19]!==_||e[20]!==b?(x=s.jsxs("div",{className:"flex-1 min-w-0",children:[_,b]}),e[19]=_,e[20]=b,e[21]=x):x=e[21];let y;e[22]!==n?(y=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:n?s.jsx(Ee,{size:14,className:"text-green-600"}):s.jsx(ks,{size:14,className:"text-muted-foreground"})}),e[22]=n,e[23]=y):y=e[23];let k;e[24]!==c||e[25]!==x||e[26]!==y||e[27]!==g?(k=s.jsxs(re,{onClick:c,className:"gap-2.5 group",children:[g,x,y]}),e[24]=c,e[25]=x,e[26]=y,e[27]=g,e[28]=k):k=e[28];let v;e[29]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(Ue,{}),e[29]=v):v=e[29];let N;e[30]!==o?(N=()=>o("account.preferences"),e[30]=o,e[31]=N):N=e[31];let w,z;e[32]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(He,{size:14,className:"shrink-0 text-muted-foreground"}),z=s.jsx("span",{children:"Settings"}),e[32]=w,e[33]=z):(w=e[32],z=e[33]);let S;e[34]!==N?(S=s.jsxs(re,{className:"gap-2.5",onClick:N,children:[w,z]}),e[34]=N,e[35]=S):S=e[35];let A;e[36]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(re,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Cs,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[36]=A):A=e[36];let O;e[37]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(re,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx($s,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[37]=O):O=e[37];let T;e[38]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(re,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Dt,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[38]=T):T=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(re,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(et,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[39]=R):R=e[39];let M,E;e[40]===Symbol.for("react.memo_cache_sentinel")?(M=s.jsx(re,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ws,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(ze,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),E=s.jsx(Ue,{}),e[40]=M,e[41]=E):(M=e[40],E=e[41]);let D;e[42]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsxs(re,{className:"gap-2.5",onClick:Pi,children:[s.jsx(jt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[42]=D):D=e[42];let L;e[43]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx("div",{className:"px-2 py-1.5",children:s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.175.0"]})}),e[43]=L):L=e[43];let F;e[44]!==k||e[45]!==S?(F=s.jsxs(ut,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:Ai,children:[k,v,S,A,O,T,R,M,E,D,L]}),e[44]=k,e[45]=S,e[46]=F):F=e[46];let H;return e[47]!==F||e[48]!==p?(H=s.jsxs(pt,{children:[p,F]}),e[47]=F,e[48]=p,e[49]=H):H=e[49],H}function Pi(){return _e.signOut()}function Ai(t){return t.preventDefault()}function _t(){const t=C.c(7),{data:e}=_e.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ae,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const i=e.user,l=i.name??void 0;let o;t[1]!==l||t[2]!==i?(o={...i,name:l},t[1]=l,t[2]=i,t[3]=o):o=t[3];const n=o,a=i.image;let r;return t[4]!==a||t[5]!==n?(r=s.jsx(Ii,{user:n,userImage:a}),t[4]=a,t[5]=n,t[6]=r):r=t[6],r}function Ei({invitation:t}){const[e,i]=P.useState(!1),[l,o]=P.useState(!1),n=Lt(),a=async()=>{i(!0);try{const c=await _e.organization.acceptInvitation({invitationId:t.id});if(c.error)Se.error(c.error.message),i(!1);else{const d=await _e.organization.setActive({organizationId:t.organizationId});Se.success("Invitation accepted!");const f=d?.data?.slug;window.location.href=f?`/${f}`:"/"}}catch{Se.error("Failed to accept invitation"),i(!1)}},r=async()=>{o(!0);try{const c=await _e.organization.rejectInvitation({invitationId:t.id});c.error?(Se.error(c.error.message),o(!1)):(Se.success("Invitation declined"),n.invalidateQueries())}catch{Se.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Ge,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:a,disabled:e||l,"aria-label":"Accept invitation",children:s.jsx(Ee,{size:14})}),s.jsx(Ge,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:r,disabled:e||l,"aria-label":"Decline invitation",children:s.jsx(As,{size:14})})]})]})}function Oi(){const t=P.useContext(Rt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(l=>l.status==="pending"&&new Date(l.expiresAt)>new Date)}class Ti extends P.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,i){}render(){return this.state.hasError?null:this.props.children}}const Mi="gateway-chip-period";function Di(){try{const t=localStorage.getItem(Mi);if(t==="daily"||t==="weekly"||t==="monthly")return t}catch{}return"daily"}function Ri(t,e){if(!e||e<=0)return"text-foreground/70";const i=t/e;return i<=.05?"text-destructive":i<=.2?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Li(t){return t>=90?"text-destructive":t>=70?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Hi(t){const e=C.c(42),{connectionId:i}=t,{open:l}=ct(),{org:o}=Ie();let n;e[0]!==i||e[1]!==o.id?(n={connectionId:i,orgId:o.id},e[0]=i,e[1]=o.id,e[2]=n):n=e[2];const a=Xt(n);let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r={},e[3]=r):r=e[3];let c;e[4]!==a?(c={client:a,toolName:"GATEWAY_USAGE",toolArguments:r,staleTime:6e4,select:Ui},e[4]=a,e[5]=c):c=e[5];const{data:d}=Os(c),f=d?.billing.mode??"prepaid",u=d?.limit.total??null,m=d?.limit.remaining??0;let p;e[6]!==d?.usage?(p=d?.usage??{total:0,daily:0,weekly:0,monthly:0},e[6]=d?.usage,e[7]=p):p=e[7];const h=p;let g,j,_,b,x,y,k;if(e[8]!==f||e[9]!==g||e[10]!==m||e[11]!==u||e[12]!==l||e[13]!==h){let w;if(f==="prepaid"){g="Credits";let S;e[21]!==m?(S=m.toFixed(2),e[21]=m,e[22]=S):S=e[22],j=`$${S}`,w=Ri(m,u)}else if(u!=null&&u>0){const S=u-m;let A;e[23]!==u||e[24]!==S?(A=Math.round(S/u*100),e[23]=u,e[24]=S,e[25]=A):A=e[25];const O=Math.min(100,A);g="Usage",j=`${O}%`,w=Li(O)}else{const S=Di(),A=S==="daily"?h.daily:S==="weekly"?h.weekly:h.monthly,O=S==="daily"?"/day":S==="weekly"?"/wk":"/mo";g="Usage";let T;e[26]!==A?(T=A.toFixed(2),e[26]=A,e[27]=T):T=e[27],j=`$${T}${O}`,w="text-foreground/70"}b="button",e[28]!==l?(x=()=>l("org.billing"),e[28]=l,e[29]=x):x=e[29],y="group-data-[collapsible=icon]:hidden flex items-center justify-between w-full px-2 py-1.5 rounded-md hover:bg-sidebar-accent transition-colors";let z;e[30]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(ds,{size:13,className:"text-muted-foreground/60 shrink-0"}),e[30]=z):z=e[30],e[31]!==g?(k=s.jsxs("div",{className:"flex items-center gap-1.5",children:[z,s.jsx("span",{className:"text-xs text-muted-foreground",children:g})]}),e[31]=g,e[32]=k):k=e[32],_=I("text-xs font-medium tabular-nums",w),e[8]=f,e[9]=g,e[10]=m,e[11]=u,e[12]=l,e[13]=h,e[14]=_,e[15]=b,e[16]=x,e[17]=y,e[18]=k,e[19]=g,e[20]=j}else _=e[14],b=e[15],x=e[16],y=e[17],k=e[18],g=e[19],j=e[20];let v;e[33]!==_||e[34]!==j?(v=s.jsx("span",{className:_,children:j}),e[33]=_,e[34]=j,e[35]=v):v=e[35];let N;return e[36]!==v||e[37]!==b||e[38]!==x||e[39]!==y||e[40]!==k?(N=s.jsxs("button",{type:b,onClick:x,className:y,children:[k,v]}),e[36]=v,e[37]=b,e[38]=x,e[39]=y,e[40]=k,e[41]=N):N=e[41],N}function Ui(t){return t.structuredContent}function Bi(){const t=C.c(4),e=Es();let i;t[0]!==e?(i=e.find(Fi),t[0]=e,t[1]=i):i=t[1];const l=i;if(!l?.id)return null;let o;return t[2]!==l.id?(o=s.jsx(Hi,{connectionId:l.id}),t[2]=l.id,t[3]=o):o=t[3],o}function Fi(t){return Ts(t,Ms)}function Wi(){const t=C.c(13),e=Oi();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ti,{children:s.jsx(P.Suspense,{fallback:null,children:s.jsx(Bi,{})})}),t[0]=i):i=t[0];let l;t[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(_t,{})}),t[1]=l):l=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Is,{asChild:!0,children:s.jsx(Ge,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(st,{size:16})})}),t[2]=o):o=t[2];let n;t[3]!==e.length?(n=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[3]=e.length,t[4]=n):n=t[4];let a;t[5]!==n?(a=s.jsxs("div",{className:"relative",children:[o,n]}),t[5]=n,t[6]=a):a=t[6];let r;t[7]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[7]=r):r=t[7];let c;t[8]!==e?(c=s.jsxs(zs,{side:"right",align:"end",sideOffset:24,className:"w-[400px] p-0 h-[650px] flex flex-col",children:[r,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(st,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(Gi)})]}),t[8]=e,t[9]=c):c=t[9];let d;return t[10]!==a||t[11]!==c?(d=s.jsxs(hi,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:[i,s.jsx(je,{children:s.jsx(pe,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[l,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs(Ps,{children:[a,c]})})]})})})]}),t[10]=a,t[11]=c,t[12]=d):d=t[12],d}function Gi(t){return s.jsx(Ei,{invitation:t},t.id)}function Ki(t){const e=C.c(11),{project:i}=t,l=i.ui?.themeColor??"#60a5fa";if(i.ui?.icon){let c;return e[0]!==i.ui.icon?(c=s.jsx("img",{src:i.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=i.ui.icon,e[1]=c):c=e[1],c}let o;e[2]!==l?(o={backgroundColor:l},e[2]=l,e[3]=o):o=e[3];let n;e[4]!==i.name?(n=i.name.charAt(0).toUpperCase(),e[4]=i.name,e[5]=n):n=e[5];let a;e[6]!==n?(a=s.jsx("span",{className:"text-[10px] font-medium text-white",children:n}),e[6]=n,e[7]=a):a=e[7];let r;return e[8]!==o||e[9]!==a?(r=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:o,children:a}),e[8]=o,e[9]=a,e[10]=r):r=e[10],r}function Vi(t){const e=C.c(14),{project:i}=t,l=Xe(),{org:o}=Ie();let n;e[0]!==l||e[1]!==o.slug||e[2]!==i.slug?(n=()=>{l({to:"/$org/$project",params:{org:o.slug,project:i.slug}})},e[0]=l,e[1]=o.slug,e[2]=i.slug,e[3]=n):n=e[3];let a;e[4]!==i?(a=s.jsx(Ki,{project:i}),e[4]=i,e[5]=a):a=e[5];let r;e[6]!==i.name?(r=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:i.name}),e[6]=i.name,e[7]=r):r=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Hs,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=c):c=e[8];let d;return e[9]!==i.name||e[10]!==n||e[11]!==a||e[12]!==r?(d=s.jsx(pe,{children:s.jsxs(Me,{onClick:n,tooltip:i.name,children:[a,r,c]})}),e[9]=i.name,e[10]=n,e[11]=a,e[12]=r,e[13]=d):d=e[13],d}function qi(){const t=C.c(55),{org:e}=Ie(),{data:i,isLoading:l}=mt(e.id),[o,n]=P.useState(!0),[a,r]=P.useState(!1);let c,d,f,u,m,p,h,g,j,_,b,x,y;if(t[0]!==l||t[1]!==o||t[2]!==i){y=Symbol.for("react.early_return_sentinel");e:{const T=i?.filter(Qi)??[];if(l){let H;t[16]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(pe,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ce,{className:"h-4 w-4 rounded"}),s.jsx(ce,{className:"h-4 flex-1"})]})}),t[16]=H):H=t[16];let J;t[17]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(Oe,{className:"py-0 px-0",children:s.jsx(Te,{children:s.jsxs(je,{className:"gap-0.5",children:[H,s.jsx(pe,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ce,{className:"h-4 w-4 rounded"}),s.jsx(ce,{className:"h-4 flex-1"})]})})]})})}),t[17]=J):J=t[17],y=J;break e}x="group/projects-section mt-2",m=Ds,_=o,b=n,u=Oe,j="py-0 px-0",f=Te,d=je,h="gap-0.5";let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=R):R=t[18];const M=!o&&"-rotate-90";let E;t[19]!==M?(E=I("text-muted-foreground shrink-0 transition-transform duration-200",M),t[19]=M,t[20]=E):E=t[20];let D;t[21]!==E?(D=s.jsx(Rs,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[R,s.jsx(ft,{size:12,className:E})]})}),t[21]=E,t[22]=D):D=t[22];let L;t[23]===Symbol.for("react.memo_cache_sentinel")?(L=()=>r(!0),t[23]=L):L=t[23];let F;t[24]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("button",{type:"button",onClick:L,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(Le,{size:16})}),t[24]=F):F=t[24],t[25]!==D?(g=s.jsx(pe,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[D,F]})}),t[25]=D,t[26]=g):g=t[26],c=Ls,p=T.length===0?s.jsx(pe,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):T.map(Yi)}t[0]=l,t[1]=o,t[2]=i,t[3]=c,t[4]=d,t[5]=f,t[6]=u,t[7]=m,t[8]=p,t[9]=h,t[10]=g,t[11]=j,t[12]=_,t[13]=b,t[14]=x,t[15]=y}else c=t[3],d=t[4],f=t[5],u=t[6],m=t[7],p=t[8],h=t[9],g=t[10],j=t[11],_=t[12],b=t[13],x=t[14],y=t[15];if(y!==Symbol.for("react.early_return_sentinel"))return y;let k;t[27]!==c||t[28]!==p?(k=s.jsx(c,{children:p}),t[27]=c,t[28]=p,t[29]=k):k=t[29];let v;t[30]!==d||t[31]!==h||t[32]!==g||t[33]!==k?(v=s.jsxs(d,{className:h,children:[g,k]}),t[30]=d,t[31]=h,t[32]=g,t[33]=k,t[34]=v):v=t[34];let N;t[35]!==f||t[36]!==v?(N=s.jsx(f,{children:v}),t[35]=f,t[36]=v,t[37]=N):N=t[37];let w;t[38]!==u||t[39]!==N||t[40]!==j?(w=s.jsx(u,{className:j,children:N}),t[38]=u,t[39]=N,t[40]=j,t[41]=w):w=t[41];let z;t[42]!==m||t[43]!==w||t[44]!==_||t[45]!==b?(z=s.jsx(m,{open:_,onOpenChange:b,children:w}),t[42]=m,t[43]=w,t[44]=_,t[45]=b,t[46]=z):z=t[46];let S;t[47]!==z||t[48]!==x?(S=s.jsx("div",{className:x,children:z}),t[47]=z,t[48]=x,t[49]=S):S=t[49];let A;t[50]!==a?(A=s.jsx(at,{open:a,onOpenChange:r}),t[50]=a,t[51]=A):A=t[51];let O;return t[52]!==S||t[53]!==A?(O=s.jsxs(s.Fragment,{children:[S,A]}),t[52]=S,t[53]=A,t[54]=O):O=t[54],O}function Yi(t){return s.jsx(Vi,{project:t},t.id)}function Qi(t){return t.slug!==V}function Zi(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(P.Suspense,{fallback:s.jsx(Oe,{className:"py-0 px-0",children:s.jsx(Te,{children:s.jsx(je,{className:"gap-0.5",children:s.jsx(pe,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ce,{className:"h-4 w-4 rounded"}),s.jsx(ce,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(qi,{})}),t[0]=e):e=t[0],e}function Xi(t){const e=C.c(12),{onCreateProject:i}=t,l=Qs(),{locator:o}=Ie();let n;e[0]!==o?(n=We.isOrgAdminProject(o),e[0]=o,e[1]=n):n=e[1];const a=n;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Qe.Skeleton,{}),e[2]=r):r=e[2];let c;e[3]!==i?(c=s.jsx(P.Suspense,{fallback:r,children:s.jsx(Qe,{onCreateProject:i})}),e[3]=i,e[4]=c):c=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(Wi,{}),e[5]=d):d=e[5];let f;e[6]!==a?(f=a?s.jsx(Ze,{children:s.jsx(P.Suspense,{fallback:null,children:s.jsx(Zi,{})})}):null,e[6]=a,e[7]=f):f=e[7];let u;return e[8]!==l||e[9]!==c||e[10]!==f?(u=s.jsx(St,{sections:l,header:c,footer:d,additionalContent:f}),e[8]=l,e[9]=c,e[10]=f,e[11]=u):u=e[11],u}function Ji(){const t=C.c(2),i=Je().location.href;let l;return t[0]!==i?(l=s.jsx(Ft,{to:"/login",search:{next:i},replace:!0}),t[0]=i,t[1]=l):l=t[1],l}function el(t){const e=C.c(6),{children:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Ht,{children:s.jsx(lt,{})}),e[0]=l):l=e[0];let o;e[1]!==i?(o=s.jsx(Ut,{children:i}),e[1]=i,e[2]=o):o=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Bt,{children:s.jsx(Ji,{})}),e[3]=n):n=e[3];let a;return e[4]!==o?(a=s.jsxs(s.Fragment,{children:[l,o,n]}),e[4]=o,e[5]=a):a=e[5],a}function tl(t){const e=C.c(10),{children:i,className:l}=t,[,o]=P.useTransition();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Be.decoChatPanelWidth(),e[0]=n):n=e[0];const[a,r]=tt(n,30);let c;e[1]!==r?(c=m=>o(()=>r(m)),e[1]=r,e[2]=c):c=e[2];const d=c;let f;e[3]!==l?(f=I("min-w-0",l),e[3]=l,e[4]=f):f=e[4];let u;return e[5]!==a||e[6]!==i||e[7]!==d||e[8]!==f?(u=s.jsx(ht,{defaultSize:a,minSize:20,className:f,onResize:d,children:i}),e[5]=a,e[6]=i,e[7]=d,e[8]=f,e[9]=u):u=e[9],u}function sl(t){const e=C.c(5),{children:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Be.sidebarOpen(),e[0]=l):l=e[0];const[o,n]=tt(l,!0);let a;return e[1]!==i||e[2]!==n||e[3]!==o?(a=s.jsx(di,{open:o,onOpenChange:n,children:i}),e[1]=i,e[2]=n,e[3]=o,e[4]=a):a=e[4],a}function il(t){const e=C.c(23),{isHomeRoute:i,onCreateProject:l}=t,[o]=nt();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Be.decoChatPanelWidth(),e[0]=n):n=e[0];const[a]=tt(n,30),r=`${a}cqi`;let c;e[1]!==r?(c={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":r},e[1]=r,e[2]=c):c=e[2];const d=c;let f;e[3]!==l?(f=s.jsx(Xi,{onCreateProject:l}),e[3]=l,e[4]=f):f=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={background:"transparent",containerType:"inline-size"},e[5]=u):u=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m={overflow:"visible"},e[6]=m):m=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p={overflow:"visible"},e[7]=p):p=e[7];const h=o&&"rounded-tr-[0.75rem] border-r";let g;e[8]!==h?(g=I("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",h),e[8]=h,e[9]=g):g=e[9];let j;e[10]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(ot,{})}),e[10]=j):j=e[10];let _;e[11]!==g?(_=s.jsx(ht,{className:"min-w-0 flex flex-col",style:p,children:s.jsx("div",{className:g,children:j})}),e[11]=g,e[12]=_):_=e[12];let b;e[13]!==o||e[14]!==i?(b=!i&&s.jsxs(s.Fragment,{children:[s.jsx(Us,{className:"bg-sidebar"}),s.jsx(tl,{className:I("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",o?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(Gs,{})})})})]}),e[13]=o,e[14]=i,e[15]=b):b=e[15];let x;e[16]!==_||e[17]!==b?(x=s.jsx(xi,{className:"pt-1.5",style:u,children:s.jsxs(Bs,{direction:"horizontal",className:"h-full",style:m,children:[_,b]})}),e[16]=_,e[17]=b,e[18]=x):x=e[18];let y;return e[19]!==x||e[20]!==d||e[21]!==f?(y=s.jsxs(ui,{className:"flex-1 bg-sidebar",style:d,children:[f,x]}),e[19]=x,e[20]=d,e[21]=f,e[22]=y):y=e[22],y}function ll(){const{org:t,project:e}=it({strict:!1}),i=Je(),[l,o]=P.useState(!1),[n,a]=P.useState(!1);P.useEffect(()=>{const u=m=>{Yt(m)&&m.code==="KeyK"&&(m.preventDefault(),a(!0))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const r=i.location.pathname===`/${t}/${e}`||i.location.pathname===`/${t}/${e}/`,c=e??V,{data:d}=Wt({queryKey:Gt.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:u}=await _e.organization.setActive({organizationSlug:t});return u&&localStorage.setItem(Be.lastOrgSlug(),t),{org:u,project:{slug:c,isOrgAdmin:c===V}}},gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1});if(!d)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx("div",{className:"w-fit",children:s.jsx(_t,{})})}),s.jsx(ot,{})]});if(!d.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const f={...d,project:{...d.project,slug:c,isOrgAdmin:c===V}};return s.jsxs(Kt,{...f,children:[s.jsx(sl,{children:s.jsx("div",{className:"flex flex-col h-screen overflow-hidden",children:s.jsx(ae.Provider,{children:s.jsx(il,{isHomeRoute:r,onCreateProject:()=>o(!0)})})})}),s.jsx(at,{open:l,onOpenChange:o}),s.jsx(Ks,{open:n,onOpenChange:a})]})}function nn(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(el,{children:s.jsx(P.Suspense,{fallback:s.jsx(lt,{}),children:s.jsx(ll,{})})}),t[0]=e):e=t[0],e}export{nn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as n,j as r,E as d,r as f,u as x,e as j}from"./index-DO8fUd54.js";import{T as h}from"./tasks-panel-XTVNkW83.js";import{P as e}from"./index-B1uuY7UL.js";import{B as g,a as b,b as T,c as k}from"./breadcrumb-pLMl4xjy.js";import{i as B}from"./Loading01-WTkiPysv.js";import{u as S}from"./context-CiizXS06.js";import"./task-status-DJB3YbbO.js";import"./popover-D1WG-emQ.js";import"./skeleton-CU7LuZGk.js";import"./spinner-CpOteR2a.js";import"./tooltip-BLTgyg7W.js";import"./index-COM-PDLy.js";import"./constants-B9t4Nuz_.js";import"./use-mcp-prompts-D_02f3uO.js";import"./useQuery-BeFLqBun.js";import"./dialog-CTFHRhvl.js";import"./X-CNbskBah.js";import"./form-DPPO-3Tw.js";import"./label-CnT8WAQY.js";import"./input-BM9bdg-F.js";import"./index-B3fUA0k0.js";import"./usage-B8rgFVXq.js";import"./ArrowUp-tKKJvEkq.js";import"./ChevronDown-D0TXudCx.js";import"./Edit01-Dpq6F4lk.js";import"./Lock01-DqO9uSP7.js";import"./Users03-BXwEsNFj.js";import"./XCircle-DvUvQRq1.js";import"./AlertCircle-5ZbLDi3s.js";import"./select-RxUFw6pZ.js";import"./ChevronUp-DXMXl76b.js";import"./Check-CuWDIJeM.js";import"./org-ai-providers-Cu3Y8hG7.js";import"./use-local-storage-C3Bo802w.js";import"./useMutation-CNVq636e.js";import"./EyeOff-D8njwIM7.js";import"./Eye-DDwMVcxZ.js";import"./Key01-IptFTL_3.js";import"./Trash01-DkXbOnbi.js";import"./card-B4dTtsmd.js";import"./avatar-ChRCLY4k.js";import"./use-llm-IG8InXvX.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowLeft-D0Lalw4x.js";import"./use-copy-DPJ8nWWs.js";import"./tabs-XMAGaWgq.js";import"./badge-C4uZcq7J.js";import"./collapsible-ttq3VbhQ.js";import"./index-BqlWbrG0.js";import"./Code01-DZzuHJh9.js";import"./checkbox-D2IG7klY.js";import"./AlignLeft-D4ghzTQG.js";import"./Image01-DBWShOGl.js";import"./RefreshCcw01-DckyCUMd.js";import"./SearchMd-Kap2MdR9.js";import"./Settings01-CYUXeHtK.js";import"./ai-providers-logos-W57Qm-EN.js";import"./select-virtual-mcp-DU8qBWLM.js";import"./integration-icon-BrOdBipR.js";import"./Container-YdffBHg3.js";import"./use-virtual-mcp-DoDJBE5n.js";import"./use-collections-C8rLdQUN.js";import"./use-create-virtual-mcp-BfS4KaKE.js";import"./use-mcp-resources-BNoK6dDS.js";import"./ChevronRight-UJRwW9xN.js";import"./Copy01-CPHBT83w.js";import"./marked.esm-BaswSlok.js";import"./markdown-ZobUYaB1.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CLfglV2_.js";import"./types-BPYct9bF.js";import"./Globe02-Cn3qFriL.js";import"./LayersTwo01-B5fVqAUB.js";import"./XClose-B0FgAxIQ.js";import"./Clock-DKQ7EGj-.js";import"./useSuspenseInfiniteQuery-CdVyznmA.js";import"./infiniteQueryObserver-x0ce-nmx.js";import"./CheckCircle-wz1RfkCA.js";import"./collection-search-Mtc1qP5K.js";import"./user-6WV0RuBu.js";import"./format-time-CMKyl-GC.js";import"./Plus-Dto-8y6a.js";import"./dropdown-menu-Cp0O2jCN.js";import"./decopilot-events-Brt4gAR6.js";function v(){const t=n.c(8),{org:o,project:s}=x(),a=j(),{switchToTask:c}=S();let i;t[0]!==a||t[1]!==o.slug||t[2]!==s.slug||t[3]!==c?(i=async u=>{await c(u),a({to:"/$org/$project",params:{org:o.slug,project:s.slug}})},t[0]=a,t[1]=o.slug,t[2]=s.slug,t[3]=c,t[4]=i):i=t[4];const l=i;let m;t[5]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx(e.Header,{children:r.jsx(e.Header.Left,{children:r.jsx(g,{children:r.jsx(b,{children:r.jsx(T,{children:r.jsx(k,{children:"Tasks"})})})})})}),t[5]=m):m=t[5];let p;return t[6]!==l?(p=r.jsxs(e,{children:[m,r.jsx(e.Content,{children:r.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r.jsx(h,{onTaskSelect:l})})})]}),t[6]=l,t[7]=p):p=t[7],p}function or(){const t=n.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(d,{children:r.jsx(f.Suspense,{fallback:r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsx(B,{size:32,className:"animate-spin text-muted-foreground"})}),children:r.jsx(v,{})})}),t[0]=o):o=t[0],o}export{or as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,e as X,r as H,j as t,af as Y,ag as Z,O as ee}from"./index-DO8fUd54.js";import{C as te}from"./collection-display-button-C0A6ba73.js";import{C as se}from"./collection-search-Mtc1qP5K.js";import{C as oe}from"./collection-table-wrapper-Ccujw2gS.js";import{E as B}from"./empty-state-SBIKV11G.js";import{I as ne}from"./integration-icon-BrOdBipR.js";import{B as K}from"./badge-C4uZcq7J.js";import{C as re}from"./card-B4dTtsmd.js";import{c as G,a as P,T as W,b as ae}from"./tooltip-BLTgyg7W.js";import{g as ie}from"./types-BPYct9bF.js";import{s as le}from"./Eye-DDwMVcxZ.js";import{s as ce}from"./Globe02-Cn3qFriL.js";import{s as me}from"./LayersTwo01-B5fVqAUB.js";import{V as de}from"./layout-ubFJ5DPd.js";const fe=[{key:"readOnlyHint",label:"Read-only",Icon:le,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:Y,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:Z,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:ce,variant:"outline"}];function pe(s){const e=z.c(18),{annotations:a,_meta:d}=s;let u;e[0]!==d?(u=ie(d),e[0]=d,e[1]=u):u=e[1];const l=!!u;let h,x,c,f,m;if(e[2]!==a||e[3]!==l){m=Symbol.for("react.early_return_sentinel");e:{const n=a?fe.filter(I=>a[I.key]===!0):[];if(n.length===0&&!l){m=null;break e}h=ae,x="flex gap-1 flex-nowrap",e[9]!==l?(c=l&&t.jsxs(G,{children:[t.jsx(P,{asChild:!0,children:t.jsx(K,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:t.jsx(me,{})})}),t.jsx(W,{children:"Interactive"})]}),e[9]=l,e[10]=c):c=e[10],f=n.map(ue)}e[2]=a,e[3]=l,e[4]=h,e[5]=x,e[6]=c,e[7]=f,e[8]=m}else h=e[4],x=e[5],c=e[6],f=e[7],m=e[8];if(m!==Symbol.for("react.early_return_sentinel"))return m;let p;e[11]!==x||e[12]!==c||e[13]!==f?(p=t.jsxs("div",{className:x,children:[c,f]}),e[11]=x,e[12]=c,e[13]=f,e[14]=p):p=e[14];let g;return e[15]!==h||e[16]!==p?(g=t.jsx(h,{children:p}),e[15]=h,e[16]=p,e[17]=g):g=e[17],g}function ue(s){const{label:e,Icon:a,variant:d}=s;return t.jsxs(G,{children:[t.jsx(P,{asChild:!0,children:t.jsx(K,{asChild:!0,variant:d,className:"size-6 p-1",children:t.jsx(a,{})})}),t.jsx(W,{children:e})]},e)}function Ee(s){const e=z.c(40),{tools:a,connectionId:d,org:u,onToolClick:l,showToolbar:h,emptyMessage:x,isLoading:c}=s,f=h===void 0?!0:h,m=x===void 0?"This connection doesn't have any tools yet.":x,p=c===void 0?!1:c,g=X(),[n,I]=H.useState(""),[j,F]=H.useState("table"),[r,M]=H.useState("name"),[i,V]=H.useState("asc");let w;e[0]!==i||e[1]!==r?(w=o=>{r===o?(V(Ne),i==="desc"&&M(void 0)):(M(o),V("asc"))},e[0]=i,e[1]=r,e[2]=w):w=e[2];const y=w;let _;e[3]!==d||e[4]!==g||e[5]!==l||e[6]!==u?(_=o=>{l?l(o):d&&u&&g({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:u,project:ee,connectionId:d,collectionName:"tools",itemId:encodeURIComponent(o.name)}})},e[3]=d,e[4]=g,e[5]=l,e[6]=u,e[7]=_):_=e[7];const k=_;let $;if(e[8]!==n||e[9]!==i||e[10]!==r||e[11]!==a){const o=!a||a.length===0?[]:n.trim()?(()=>{const E=n.toLowerCase();return a.filter(S=>S.name.toLowerCase().includes(E)||S.description&&S.description.toLowerCase().includes(E))})():a;$=!r||!i?o:[...o].sort((E,S)=>{const q=E[r]||"",Q=S[r]||"",U=String(q).localeCompare(String(Q));return i==="asc"?U:-U}),e[8]=n,e[9]=i,e[10]=r,e[11]=a,e[12]=$}else $=e[12];const T=$;let L;e[13]===Symbol.for("react.memo_cache_sentinel")?(L=[{id:"name",header:"Name",render:ye,sortable:!0},{id:"annotations",header:"Hints",render:je,cellClassName:"w-32 shrink-0"},{id:"description",header:"Description",render:ge,cellClassName:"flex-1",sortable:!0}],e[13]=L):L=e[13];const A=L;let O;e[14]===Symbol.for("react.memo_cache_sentinel")?(O=A.filter(xe).map(he),e[14]=O):O=e[14];const J=O;let N;e[15]!==y||e[16]!==f||e[17]!==i||e[18]!==r||e[19]!==j?(N=f&&t.jsx(de,{children:t.jsx(te,{viewMode:j,onViewModeChange:F,sortKey:r,sortDirection:i,onSort:y,sortOptions:J})}),e[15]=y,e[16]=f,e[17]=i,e[18]=r,e[19]=j,e[20]=N):N=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=o=>{o.key==="Escape"&&(I(""),o.target.blur())},e[21]=R):R=e[21];let v;e[22]!==n?(v=t.jsx(se,{value:n,onChange:I,placeholder:"Search tools...",onKeyDown:R}),e[22]=n,e[23]=v):v=e[23];let C;e[24]!==m||e[25]!==y||e[26]!==k||e[27]!==p||e[28]!==n||e[29]!==i||e[30]!==r||e[31]!==T||e[32]!==j?(C=j==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:T.length===0?t.jsx(B,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":m}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:T.map(o=>t.jsx(re,{className:"cursor-pointer transition-colors",onClick:()=>k(o),children:t.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[t.jsx(ne,{icon:null,name:o.name,size:"md",className:"shrink-0 shadow-sm"}),t.jsxs("div",{className:"flex flex-col gap-0",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:o.name}),t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:o.description||"No description"})]})]})},o.name))})}):t.jsx(oe,{columns:A,data:T,isLoading:p,sortKey:r,sortDirection:i,onSort:y,onRowClick:o=>k(o),emptyState:t.jsx(B,{image:null,title:n?"No tools found":"No tools available",description:n?"Try adjusting your search terms":m})}),e[24]=m,e[25]=y,e[26]=k,e[27]=p,e[28]=n,e[29]=i,e[30]=r,e[31]=T,e[32]=j,e[33]=C):C=e[33];let b;e[34]!==v||e[35]!==C?(b=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[v,C]}),e[34]=v,e[35]=C,e[36]=b):b=e[36];let D;return e[37]!==b||e[38]!==N?(D=t.jsxs(t.Fragment,{children:[N,b]}),e[37]=b,e[38]=N,e[39]=D):D=e[39],D}function he(s){return{id:s.id,label:typeof s.header=="string"?s.header:s.id}}function xe(s){return s.sortable}function ge(s){return t.jsx("span",{className:"text-sm text-foreground",children:s.description||"—"})}function je(s){return t.jsx(pe,{annotations:s.annotations,_meta:s._meta})}function ye(s){return t.jsx("span",{className:"text-sm font-medium font-mono text-foreground",children:s.name})}function Ne(s){return s==="asc"?"desc":s==="desc"?null:"asc"}export{pe as T,Ee as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as v}from"./binder-hd3C3mvD.js";import{bR as O,ad as N,o as t,n as e,bG as g,D as c,bS as l,bT as D,bU as G,bB as i,_ as I,bD as m,bI as T,bA as n,bH as L,bV as M,bW as B,bX as U,bY as k,bZ as w,b_ as W,b$ as _}from"./index-DO8fUd54.js";const F=N.extend({avatar:e().describe("URL or data URI to the assistant's avatar image"),system_prompt:e().describe("System prompt that defines the assistant's behavior"),virtual_mcp_id:e().describe("Virtual MCP ID to use for this assistant"),model:t({id:e().describe("Model ID"),connectionId:e().describe("Connection ID that provides the model")}).describe("Selected model reference for this assistant")}),j=O("assistant",F),Y=[...j],y=M(()=>m([B(),e(),i(),T(),g(e(),y),c(y)])),h=g(e(),g(e(),y)).optional().describe("Additional provider-specific options. Outer record keyed by provider name, inner by option key"),E=t({type:n("text"),text:e().describe("The text content"),providerOptions:h}),q=t({type:n("text"),text:e().describe("The text content"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),$=e().describe("File data as URL string"),R=t({type:n("file"),filename:e().optional().describe("Optional filename of the file"),data:$,mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),providerOptions:h}),J=t({type:n("file"),mediaType:e().describe("IANA media type of the file (e.g., image/png, audio/mp3)"),data:e().describe("Generated file data as base64 encoded string")}),V=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerOptions:h}),K=t({type:n("reasoning"),text:e().describe("The reasoning text"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),z=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call, used to match with tool result"),toolName:e().describe("Name of the tool being called"),input:e().describe("Arguments of the tool call (JSON-serializable object matching tool input schema)"),providerExecuted:T().optional().describe("Whether the tool call will be executed by the provider"),providerOptions:h}),H=t({type:n("tool-call"),toolCallId:e().describe("ID of the tool call"),toolName:e().describe("Name of the tool being called"),input:e().describe("Stringified JSON object with the tool call arguments"),providerExecuted:T().optional().describe("Whether the tool call will be executed by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),X=m([t({type:n("text"),value:e()}),t({type:n("json"),value:y}),t({type:n("error-text"),value:e()}),t({type:n("error-json"),value:y}),t({type:n("content"),value:c(m([t({type:n("text"),text:e().describe("Text content")}),t({type:n("media"),data:e().describe("Base-64 encoded media data"),mediaType:e().describe("IANA media type")})]))}),t({type:n("execution-denied"),reason:e().optional()}),e().describe("Raw or JSON-serialized output (e.g. from AI SDK mapToolResultOutput)")]),x=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),output:X.describe("Result of the tool call"),result:L().describe("Unknown result of the tool call"),providerOptions:h}),Z=t({type:n("tool-result"),toolCallId:e().describe("ID of the tool call that this result is associated with"),toolName:e().describe("Name of the tool that generated this result"),result:l().describe("Result of the tool call (JSON-serializable)"),isError:T().optional().describe("Whether the result is an error or error message"),providerExecuted:T().optional().describe("Whether the tool result was generated by the provider"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),Q=m([t({type:n("source"),sourceType:n("url"),id:e().describe("The ID of the source"),url:e().describe("The URL of the source"),title:e().optional().describe("The title of the source"),providerMetadata:l().optional().describe("Additional provider-specific metadata")}),t({type:n("source"),sourceType:n("document"),id:e().describe("The ID of the source"),mediaType:e().describe("IANA media type of the document (e.g., application/pdf)"),title:e().describe("The title of the document"),filename:e().optional().describe("Optional filename of the document"),providerMetadata:l().optional().describe("Additional provider-specific metadata")})]),ee=t({role:n("system"),content:e().describe("System message content"),providerOptions:h}),te=t({role:n("user"),content:c(m([E,R])).describe("User message content parts (text or file)"),providerOptions:h}),oe=t({role:n("assistant"),content:c(m([E,R,V,z,x])).describe("Assistant message content parts (text, file, reasoning, tool-call, or tool-result)"),providerOptions:h}),ae=t({role:n("tool"),content:c(x).describe("Tool message content (tool results)"),providerOptions:h}),ne=m([ee,te,oe,ae]),ie=c(ne).describe("A list of messages forming the prompt"),re=t({prompt:ie.describe("A language model prompt is a standardized prompt type (array of messages with roles: system, user, assistant, tool)"),maxOutputTokens:i().optional().describe("Maximum number of tokens to generate"),temperature:i().optional().describe("Temperature setting. The range depends on the provider and model"),topP:i().optional().describe("Nucleus sampling parameter"),topK:i().optional().describe("Only sample from the top K options for each subsequent token. Used to remove long tail low probability responses"),presencePenalty:i().optional().describe("Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt"),frequencyPenalty:i().optional().describe("Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases"),seed:i().optional().describe("The seed (integer) to use for random sampling. If set and supported by the model, calls will generate deterministic results"),stopSequences:c(e()).optional().describe("Stop sequences. If set, the model will stop generating text when one of the stop sequences is generated"),responseFormat:m([t({type:n("text")}),t({type:n("json"),schema:l().optional().describe("JSON schema that the generated output should conform to"),name:e().optional().describe("Name of output that should be generated"),description:e().optional().describe("Description of the output that should be generated")})]).optional().describe("Response format. The output can either be text or JSON. Default is text"),tools:c(l()).optional().describe("The tools that are available for the model"),toolChoice:l().optional().describe("Specifies how the tool should be selected. Defaults to 'auto'"),includeRawChunks:T().optional().describe("Include raw chunks in the stream. Only applicable for streaming calls"),abortSignal:l().optional().describe("Abort signal for cancelling the operation"),providerOptions:l().optional().describe("Additional provider-specific options")}),se=t({content:c(m([q,J,K,H,Z,Q])).describe("Ordered content that the model has generated (text, tool-calls, reasoning, files, sources)"),finishReason:I(["stop","length","content-filter","tool-calls","error","other","unknown"]).describe("Reason why generation stopped"),usage:G({inputTokens:i().optional(),outputTokens:i().optional(),totalTokens:i().optional(),reasoningTokens:i().optional()}).describe("Usage information for the language model call"),providerMetadata:l().optional().describe("Additional provider-specific metadata"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({id:e().optional().describe("ID for the generated response"),timestamp:D().optional().describe("Timestamp for the start of the generated response"),modelId:e().optional().describe("The ID of the response model that was used"),headers:g(e(),e()).optional().describe("Response headers"),body:l().optional().describe("Response HTTP body")}).optional().describe("Optional response information for telemetry and debugging"),warnings:c(l()).describe("Warnings for the call, e.g. unsupported settings")});t({stream:l().describe("ReadableStream of LanguageModelV2StreamPart"),request:t({body:l().optional().describe("Request HTTP body sent to the provider API")}).optional().describe("Optional request information for telemetry and debugging"),response:t({headers:g(e(),e()).optional().describe("Response headers")}).optional().describe("Optional response data")});const le=t({supportedUrls:g(e(),c(e())).describe("Supported URL patterns by media type for the provider")});t({modelId:e().describe("The ID of the model"),logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:I(["openai","anthropic","google","x-ai","deepseek","openai-compatible","openrouter"]).nullable()});const A=t({modelId:e().describe("The ID of the model"),callOptions:re}),ce=N.extend({logo:e().nullable(),description:e().nullable(),capabilities:c(e()),limits:t({contextWindow:i(),maxOutputTokens:i()}).nullable(),costs:t({input:i(),output:i()}).nullable(),provider:I(["openai","anthropic","google","xai","deepseek","openai-compatible","openrouter"]).nullable()}),de=O("llm",ce,{readOnly:!0}),pe=[{name:"LLM_METADATA",inputSchema:t({modelId:e().describe("The ID of the model")}),outputSchema:le},{name:"LLM_DO_STREAM",inputSchema:A,streamable:!0},{name:"LLM_DO_GENERATE",inputSchema:A,outputSchema:se},...de],ue=t({scopes:c(e()).describe("List of scopes available"),stateSchema:g(e(),L()).describe("JSON Schema (draft-07) defining the state structure")}),me=[{name:"MCP_CONFIGURATION",inputSchema:t({}),outputSchema:ue}],he=t({}).strict(),be=t({billing:t({mode:I(["prepaid","postpaid"]),limitPeriod:I(["daily","weekly","monthly"]).nullable()}),limit:t({total:i().nullable(),remaining:i().nullable(),reset:e().nullable()}),usage:t({total:i(),daily:i(),weekly:i(),monthly:i()}),alert:t({enabled:T(),threshold_usd:i(),email:e().nullable()}),connectionId:e()}),fe=[{name:"GATEWAY_USAGE",inputSchema:he,outputSchema:be},{name:"GATEWAY_SET_LIMIT",inputSchema:t({}),outputSchema:t({}),opt:!0},{name:"GATEWAY_SET_ALERT",inputSchema:t({}),outputSchema:t({}),opt:!0}],C={LLMS:pe,WORKFLOW:W,WORKFLOW_EXECUTION:w,ASSISTANTS:Y,MCP:me,AI_GATEWAY_BILLING:fe,EVENT_BUS:k,TRIGGER:U},ge={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER"};function ve(o){if(o)return ge[o]}function Te(o){return o.map(a=>({name:a.name,inputSchema:a.inputSchema?(()=>{try{return _(a.inputSchema)}catch(s){return console.error(`Failed to convert input schema for ${a.name}:`,s),t({})}})():t({}),outputSchema:a.outputSchema?(()=>{try{return _(a.outputSchema)}catch(s){return console.error(`Failed to convert output schema for ${a.name}:`,s),t({})}})():t({})}))}function Se(o,a){const s=o.tools;if(!s||s.length===0)return!1;const r=s.map(p=>({name:p.name,inputSchema:p.inputSchema})),d=a.map(p=>({name:p.name,inputSchema:p.inputSchema,opt:p.opt}));return v(d).isImplementedBy(r)}function Le({connections:o,binding:a}){const s=(()=>{if(a){if(typeof a=="string"){const r=a.toUpperCase(),d=C[r];if(!d){console.warn(`[useBindingConnections] Unknown binding "${a}". Available bindings: ${Object.keys(C).join(", ")}. Returning all connections without filtering.`);return}return d}if(a.length===0){console.warn("[useBindingConnections] Empty binding array provided. Returning all connections without filtering.");return}return Te(a)}})();return o?s?o.filter(r=>Se(r,s)):o:[]}function Ie(o){return o.toLowerCase().split("_").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" ")}function P(o){if(!o||o.length===0)return[];const a=/^COLLECTION_(.+)_LIST$/,s=[];for(const r of o){const d=r.name.match(a);d?.[1]&&s.push(d[1])}return s}function ye(o){return!o||o.length===0?!1:o.some(a=>a.name==="REGISTRY_ITEM_LIST"||a.name==="COLLECTION_REGISTRY_APP_LIST"?!0:a.name.startsWith("COLLECTION_REGISTRY_APP_"))}function Oe(o,a){const r=o.find(u=>u.name===`COLLECTION_${a}_CREATE`)?.inputSchema?.properties;if(r&&typeof r=="object"&&"data"in r)return r.data;const b=o.find(u=>u.name===`COLLECTION_${a}_UPDATE`)?.inputSchema?.properties;if(b&&typeof b=="object"&&"data"in b)return b.data;const S=o.find(u=>u.name===`COLLECTION_${a}_LIST`)?.outputSchema?.properties;if(S&&typeof S=="object"&&"items"in S){const u=S.items;if(u.items)return u.items}}function Ne(o,a){const s=a.toUpperCase();return{hasCreateTool:o.some(r=>r.name===`COLLECTION_${s}_CREATE`),hasUpdateTool:o.some(r=>r.name===`COLLECTION_${s}_UPDATE`),hasDeleteTool:o.some(r=>r.name===`COLLECTION_${s}_DELETE`)}}function _e(o){if(!o||o.length===0)return[];const a=P(o);if(a.length===0)return[];const s=[];for(const r of a)try{const d=O(r.toLowerCase(),N,{readOnly:!0}),b=o.map(f=>({name:f.name,inputSchema:f.inputSchema})),p=d.map(f=>({name:f.name,inputSchema:f.inputSchema}));if(v(p).isImplementedBy(b)){const f=Ne(o,r);s.push({name:r,displayName:Ie(r),schema:Oe(o,r),...f})}}catch{}return s}function Ee(o){return _e(o?.tools??null)}function Re(o){return o?o.filter(a=>P(a.tools).includes("REGISTRY_APP")||ye(a.tools)):[]}export{fe as A,Le as a,Ee as b,Se as c,ve as r,Re as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as u}from"./infiniteQueryObserver-x0ce-nmx.js";import{Q as i}from"./index-DO8fUd54.js";function t(e,r){return i(e,u,r)}export{t as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as u,U as s}from"./index-DO8fUd54.js";function o(e,r){return u(e,s,r)}export{o as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as s}from"./infiniteQueryObserver-x0ce-nmx.js";import{Q as u,R as n}from"./index-DO8fUd54.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as g,u as C,x as W,K as x,w,j as i,B as I}from"./index-DO8fUd54.js";import{a as _,u as L}from"./constants-B9t4Nuz_.js";import{C as k}from"./collection-tab-CTog7m1d.js";import{E as O}from"./empty-state-SBIKV11G.js";import{u as S}from"./useMutation-CNVq636e.js";import{P as u}from"./index-B1uuY7UL.js";import{B as b,a as h,b as P,c as y}from"./breadcrumb-pLMl4xjy.js";import{e as T}from"./Dataflow03-CUuQJ-m_.js";import"./generate-id-Dyweu44Y.js";import"./collection-display-button-C0A6ba73.js";import"./dropdown-menu-Cp0O2jCN.js";import"./Check-CuWDIJeM.js";import"./ChevronRight-UJRwW9xN.js";import"./ArrowDown-B5WC3D5H.js";import"./ArrowUp-tKKJvEkq.js";import"./Grid01-Gq7hBl7S.js";import"./List-ySIwqood.js";import"./tooltip-BLTgyg7W.js";import"./index-COM-PDLy.js";import"./badge-C4uZcq7J.js";import"./collection-search-Mtc1qP5K.js";import"./Loading01-WTkiPysv.js";import"./SearchMd-Kap2MdR9.js";import"./input-BM9bdg-F.js";import"./card-B4dTtsmd.js";import"./integration-icon-BrOdBipR.js";import"./Container-YdffBHg3.js";import"./Copy01-CPHBT83w.js";import"./DotsVertical-BaBvJOuP.js";import"./Edit01-Dpq6F4lk.js";import"./Eye-DDwMVcxZ.js";import"./Trash01-DkXbOnbi.js";import"./collection-table-wrapper-Ccujw2gS.js";import"./table-DyNKuHyS.js";import"./empty-state-DbRFhzf6.js";import"./Inbox01-CJphqD3y.js";import"./user-6WV0RuBu.js";import"./avatar-ChRCLY4k.js";import"./useQuery-BeFLqBun.js";import"./use-list-state-DsQajLIu.js";import"./use-view-mode-Bl6DaWwW.js";import"./use-mobile-kAkblq0-.js";import"./constants-Dr5R1EQY.js";import"./alert-dialog-DtAWdTyc.js";import"./use-collections-C8rLdQUN.js";import"./Plus-Dto-8y6a.js";import"./layout-ubFJ5DPd.js";import"./use-local-storage-C3Bo802w.js";function B(){const e=g.c(12),{org:t,project:r}=C(),a=W();let c;e[0]!==t.id?(c={connectionId:_,orgId:t.id},e[0]=t.id,e[1]=c):c=e[1];const l=L(c);let o;e[2]!==l||e[3]!==r?(o=async d=>{const m=r.enabledPlugins??[];if(m.includes(d))return;const p=[...m,d],j=await l.callTool({name:"PROJECT_UPDATE",arguments:{projectId:r.id,enabledPlugins:p}});return j.structuredContent??j},e[2]=l,e[3]=r,e[4]=o):o=e[4];let n;e[5]!==t.id||e[6]!==r||e[7]!==a?(n=()=>{a.invalidateQueries({queryKey:x.project(t.id,r.slug)}),a.invalidateQueries({queryKey:x.projects(t.id)})},e[5]=t.id,e[6]=r,e[7]=a,e[8]=n):n=e[8];let s;return e[9]!==o||e[10]!==n?(s={mutationFn:o,onSuccess:n,onError:K},e[9]=o,e[10]=n,e[11]=s):s=e[11],S(s)}function K(e){w.error("Failed to enable plugin: "+(e instanceof Error?e.message:"Unknown error"))}function N(e){const t=g.c(12),{pluginId:r,title:a,description:c,icon:l}=e,o=B();let n;t[0]!==o||t[1]!==r?(n=async()=>{try{await o.mutateAsync(r),w.success("Plugin enabled!")}catch{}},t[0]=o,t[1]=r,t[2]=n):n=t[2];const s=n,f=l??null,d=o.isPending?"Enabling…":"Enable plugin";let m;t[3]!==o.isPending||t[4]!==s||t[5]!==d?(m=i.jsx(I,{onClick:s,disabled:o.isPending,children:d}),t[3]=o.isPending,t[4]=s,t[5]=d,t[6]=m):m=t[6];let p;return t[7]!==c||t[8]!==f||t[9]!==m||t[10]!==a?(p=i.jsx(O,{image:f,title:a,description:c,actions:m}),t[7]=c,t[8]=f,t[9]=m,t[10]=a,t[11]=p):p=t[11],p}const E="workflows",F={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function Te(){const e=g.c(5),{project:t,org:r}=C();if(!(t.enabledPlugins??[]).includes(E)){let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(u.Header,{children:i.jsx(u.Header.Left,{children:i.jsx(b,{children:i.jsx(h,{children:i.jsx(P,{children:i.jsx(y,{children:"Workflows"})})})})})}),e[0]=n):n=e[0];let s;return e[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsxs(u,{children:[n,i.jsx(u.Content,{children:i.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:i.jsx(N,{pluginId:E,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:i.jsx("div",{className:"bg-muted p-4 rounded-full",children:i.jsx(T,{className:"size-8 text-muted-foreground"})})})})})]}),e[1]=s):s=e[1],s}let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(u.Header,{children:i.jsx(u.Header.Left,{children:i.jsx(b,{children:i.jsx(h,{children:i.jsx(P,{children:i.jsx(y,{children:"Workflows"})})})})})}),e[2]=l):l=e[2];let o;return e[3]!==r.slug?(o=i.jsxs(u,{children:[l,i.jsx(u.Content,{children:i.jsx(k,{connectionId:_,org:r.slug,activeCollection:F})})]}),e[3]=r.slug,e[4]=o):o=e[4],o}export{Te as default};
|