decocms 2.175.3 → 2.175.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/{AlertCircle-Bu9DNwe-.js → AlertCircle-BCDqbXXS.js} +1 -1
- package/dist/client/assets/{AlignLeft-CJvAdEi-.js → AlignLeft-BtdVdG2m.js} +1 -1
- package/dist/client/assets/{ArrowDown-BrkOB1Av.js → ArrowDown-qfJtx-dv.js} +1 -1
- package/dist/client/assets/{ArrowLeft-BLUY3Pjw.js → ArrowLeft-Del7wDOT.js} +1 -1
- package/dist/client/assets/{ArrowUp-Bl5YEbbF.js → ArrowUp-ETVB6cdy.js} +1 -1
- package/dist/client/assets/{Check-CN56KhoF.js → Check-DsclgHfU.js} +1 -1
- package/dist/client/assets/{CheckCircle-B4pYO1ZS.js → CheckCircle-CQGSbCTG.js} +1 -1
- package/dist/client/assets/{CheckDone01-DgXembQE.js → CheckDone01-v1xPuIIg.js} +1 -1
- package/dist/client/assets/{CheckVerified02-BTUqey_K.js → CheckVerified02-DhH8-7Z6.js} +1 -1
- package/dist/client/assets/{ChevronDown-BURkaeCD.js → ChevronDown-CIjXFJfV.js} +1 -1
- package/dist/client/assets/{ChevronLeft-C1fUg8Ja.js → ChevronLeft-tQ1_QiuA.js} +1 -1
- package/dist/client/assets/{ChevronRight-Df5oEIdG.js → ChevronRight-DmvbXNWu.js} +1 -1
- package/dist/client/assets/{ChevronUp-Ql_IhfwF.js → ChevronUp-C8129itH.js} +1 -1
- package/dist/client/assets/{Clock-DY1djxCP.js → Clock-CQzMyEYR.js} +1 -1
- package/dist/client/assets/{Code01-ClhNhs6L.js → Code01-Cq3-F_YX.js} +1 -1
- package/dist/client/assets/{Coins01-C0DqkhBz.js → Coins01-D4l1LRdX.js} +1 -1
- package/dist/client/assets/{Container-De-pv4QL.js → Container-C_pBhYQm.js} +1 -1
- package/dist/client/assets/{Copy01-E3kqWO3T.js → Copy01-CFr3FQ5x.js} +1 -1
- package/dist/client/assets/{Dataflow03-DVfc8SxS.js → Dataflow03-OPkwvxOZ.js} +1 -1
- package/dist/client/assets/{DotsHorizontal-zFut2S5z.js → DotsHorizontal-7V70FVQq.js} +1 -1
- package/dist/client/assets/{DotsVertical-ZWNLrGdE.js → DotsVertical-ZHHEIIAw.js} +1 -1
- package/dist/client/assets/{Download01-D_QoltgV.js → Download01-CYaxYM2W.js} +1 -1
- package/dist/client/assets/{Edit01-KzFCPjcw.js → Edit01-y_ign3HR.js} +1 -1
- package/dist/client/assets/{Edit05-DFdmrfVO.js → Edit05-DW3L1ev9.js} +1 -1
- package/dist/client/assets/{Eye-CUyEl5IU.js → Eye-Dq2YmoWs.js} +1 -1
- package/dist/client/assets/{EyeOff-D3iBtnD1.js → EyeOff-CpKFKNjY.js} +1 -1
- package/dist/client/assets/{File02-CqU_tyTM.js → File02-BsdZFaU2.js} +1 -1
- package/dist/client/assets/{File06-B23HFdp6.js → File06-BpsmzbhK.js} +1 -1
- package/dist/client/assets/{FilterLines-B4Jg_hkv.js → FilterLines-BFSA7yHa.js} +1 -1
- package/dist/client/assets/{Globe01-BAfb6FiF.js → Globe01-C5-PYqjH.js} +1 -1
- package/dist/client/assets/{Globe02-DAjgLqHS.js → Globe02-BLXYb9br.js} +1 -1
- package/dist/client/assets/{Grid01-B7q4cvPD.js → Grid01-BSBJv9eJ.js} +1 -1
- package/dist/client/assets/{Hash02-BPlWtian.js → Hash02-zbrPaDCt.js} +1 -1
- package/dist/client/assets/{Home02-BYbFBx09.js → Home02-DtwXSs3k.js} +1 -1
- package/dist/client/assets/{Image01-C62qGXSk.js → Image01-NzJP6iMs.js} +1 -1
- package/dist/client/assets/{Inbox01-BF4_faho.js → Inbox01-BqBxWaFX.js} +1 -1
- package/dist/client/assets/{InfoCircle-DhO0vGS4.js → InfoCircle-8bpl-KKl.js} +1 -1
- package/dist/client/assets/{Key01-Bfc7gsTd.js → Key01-yVAqC10q.js} +1 -1
- package/dist/client/assets/{LayersTwo01-CsbV79W9.js → LayersTwo01-T6ICoMvs.js} +1 -1
- package/dist/client/assets/{LayoutLeft-BjhMzXil.js → LayoutLeft-B8jrj3eE.js} +1 -1
- package/dist/client/assets/{Link01-CBvOA17k.js → Link01-2qS2xckB.js} +1 -1
- package/dist/client/assets/{LinkExternal01-v1Fp9c9j.js → LinkExternal01-CBG098kX.js} +1 -1
- package/dist/client/assets/{List-DxiRK8pO.js → List-LffcVOLG.js} +1 -1
- package/dist/client/assets/{Loading01-CDOurw-F.js → Loading01-CSUxQOK0.js} +1 -1
- package/dist/client/assets/{Lock01-jAI5MKWg.js → Lock01-CjY0LR2m.js} +1 -1
- package/dist/client/assets/{Play-DSE8IZVS.js → Play-D223AznW.js} +1 -1
- package/dist/client/assets/{Plus-OTc7Ql1V.js → Plus-CGe5wBcS.js} +1 -1
- package/dist/client/assets/{RefreshCcw01-QnfLSKau.js → RefreshCcw01-CxVqRnRx.js} +1 -1
- package/dist/client/assets/{Save01-Df_qJsfN.js → Save01-CYi2R4Ht.js} +1 -1
- package/dist/client/assets/{SearchMd-D6jy19cO.js → SearchMd-CrngVZhh.js} +1 -1
- package/dist/client/assets/{Settings01-Bl2wNagM.js → Settings01-Dujhf9RE.js} +1 -1
- package/dist/client/assets/{Shield01-B145EOAd.js → Shield01-BqSRHTNN.js} +1 -1
- package/dist/client/assets/{Terminal-D3ILbCbK.js → Terminal-ieofo8yI.js} +1 -1
- package/dist/client/assets/{Tool01-BBVRBzC0.js → Tool01-DImlld_g.js} +1 -1
- package/dist/client/assets/{Trash01-DhGTBhjv.js → Trash01-DPMbpRnj.js} +1 -1
- package/dist/client/assets/{Upload01-DvtQC2yf.js → Upload01-DgCnYplh.js} +1 -1
- package/dist/client/assets/{Users03-B2n8Cd76.js → Users03-C-Jr0LW_.js} +1 -1
- package/dist/client/assets/{X-DVxsAMCH.js → X-CuPyb-Ex.js} +1 -1
- package/dist/client/assets/{XAxis-D14vbkR0.js → XAxis-BmVXiq6v.js} +1 -1
- package/dist/client/assets/{XCircle-l3Ck-71_.js → XCircle-DIW-x13c.js} +1 -1
- package/dist/client/assets/{XClose-C8g1LxXV.js → XClose-ndXrBTVc.js} +1 -1
- package/dist/client/assets/{Zap-DUVjsAS1.js → Zap-Ctmk6j5l.js} +1 -1
- package/dist/client/assets/{agent-connections-preview-D0-1Au_l.js → agent-connections-preview-Vgh7fOJI.js} +1 -1
- package/dist/client/assets/{agent-detail-BALBko9m.js → agent-detail-C36fDm_v.js} +1 -1
- package/dist/client/assets/{agents-BuGtmP_d.js → agents-DYiHQBsI.js} +1 -1
- package/dist/client/assets/{ai-providers-logos-NSo4Ckh1.js → ai-providers-logos-D3xG95Si.js} +1 -1
- package/dist/client/assets/{alert-dialog-DfOenbUZ.js → alert-dialog-BoQV9ycw.js} +1 -1
- package/dist/client/assets/{auth-catchall-BAl96W8M.js → auth-catchall-D434eF_Q.js} +1 -1
- package/dist/client/assets/{automation-detail-D16eCAb7.js → automation-detail-3RIJVSzC.js} +1 -1
- package/dist/client/assets/{automations-UpOWNkQ6.js → automations-CsNPJGVV.js} +1 -1
- package/dist/client/assets/{avatar-DexhTB4g.js → avatar-CkCU2Fe6.js} +1 -1
- package/dist/client/assets/{badge-C7XTRm7k.js → badge-7TJrkuyd.js} +1 -1
- package/dist/client/assets/{binder--omYMrhv.js → binder-qGS3hkzV.js} +1 -1
- package/dist/client/assets/{breadcrumb-h9Dq7GJ0.js → breadcrumb-7YipRD-p.js} +1 -1
- package/dist/client/assets/{card-Cm-keK-z.js → card-D9sP6AvS.js} +1 -1
- package/dist/client/assets/{chart-BkIsuiHb.js → chart-DtzgRcs7.js} +1 -1
- package/dist/client/assets/{checkbox-B92JdB3t.js → checkbox-BRXa8FNh.js} +1 -1
- package/dist/client/assets/{collapsible-B5VFLcG-.js → collapsible-Dl714J5i.js} +1 -1
- package/dist/client/assets/{collection-detail-BUpBhGP1.js → collection-detail-BU5tC6bR.js} +1 -1
- package/dist/client/assets/{collection-display-button-CEqdF8O7.js → collection-display-button-CPJ0Uvih.js} +1 -1
- package/dist/client/assets/{collection-search-CPQlTmfx.js → collection-search-BeqmTWUU.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-BVpN3w_L.js → collection-table-wrapper-DU2xJaVV.js} +1 -1
- package/dist/client/assets/{collection-tabs-DwGvAiHF.js → collection-tabs-CBTc1SAx.js} +1 -1
- package/dist/client/assets/{command-BYr1e0yf.js → command-DVQ8NWzo.js} +1 -1
- package/dist/client/assets/{connect-DKqC06uo.js → connect-BVkZJKoj.js} +1 -1
- package/dist/client/assets/{connection-card-BDqdYEuX.js → connection-card-D3SNWej3.js} +1 -1
- package/dist/client/assets/connection-detail-C4SImbSn.js +1 -0
- package/dist/client/assets/{connection-status-B854Axgl.js → connection-status-B9duDm-X.js} +1 -1
- package/dist/client/assets/connections-iR6Y0Kp3.js +1 -0
- package/dist/client/assets/{constants-BZUBXkLq.js → constants-4hZfe-FX.js} +1 -1
- package/dist/client/assets/constants-CXKG1Tp4.js +1 -0
- package/dist/client/assets/{context-GHqlq7Gd.js → context-D-2OkzTq.js} +2 -2
- package/dist/client/assets/{create-organization-dialog-Cum8PmLv.js → create-organization-dialog-C8OjRm9O.js} +1 -1
- package/dist/client/assets/{create-project-dialog-d10TQ9K8.js → create-project-dialog-C6OTQ8lU.js} +1 -1
- package/dist/client/assets/{danger-qmT_QFAs.js → danger-BESOuFS9.js} +1 -1
- package/dist/client/assets/{danger-zone-daxj8FQE.js → danger-zone-Dr5J9bxx.js} +1 -1
- package/dist/client/assets/{dependencies-sz-4aCSB.js → dependencies-CTIlIG34.js} +1 -1
- package/dist/client/assets/{dialog-PlqYdiap.js → dialog-1RTimACw.js} +1 -1
- package/dist/client/assets/{dropdown-menu-V8gWmDzD.js → dropdown-menu-ur1Ui41o.js} +1 -1
- package/dist/client/assets/{dynamic-plugin-layout-PDo9TaOG.js → dynamic-plugin-layout-De3JUiCe.js} +1 -1
- package/dist/client/assets/{editable-task-title-CXa2sXGX.js → editable-task-title-DPKxqM1E.js} +1 -1
- package/dist/client/assets/{empty-state-CADB2xYt.js → empty-state-BLWznTIL.js} +1 -1
- package/dist/client/assets/{empty-state-BUpyINsX.js → empty-state-COoAU6KF.js} +1 -1
- package/dist/client/assets/{env-vars-editor-Crsr3jiO.js → env-vars-editor-UXVlMJFO.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CBWW8njI.js → extract-connection-data-6RfUcjze.js} +1 -1
- package/dist/client/assets/{file-browser-Ba38jp_3.js → file-browser-BHUGJprt.js} +2 -2
- package/dist/client/assets/{form-CnUcVXlu.js → form-RbK75Dit.js} +1 -1
- package/dist/client/assets/{general-D78WAnZa.js → general-DQk46kRh.js} +1 -1
- package/dist/client/assets/{grid-view-D92iM48j.js → grid-view-RxDrBxoP.js} +1 -1
- package/dist/client/assets/{home-Dh3Zkl7g.js → home-CnM3BkZT.js} +1 -1
- package/dist/client/assets/{index-Ce1KA469.js → index-3d9-dYhc.js} +1 -1
- package/dist/client/assets/{index-DINW__d9.js → index-B4bICiSz.js} +1 -1
- package/dist/client/assets/{index-CMdtjEkH.js → index-B5Wny992.js} +1 -1
- package/dist/client/assets/{index-D0LkSlcd.js → index-CElzn9PI.js} +1 -1
- package/dist/client/assets/{index-SkQC2bL2.js → index-DJtnEPc7.js} +3 -3
- package/dist/client/assets/{index-BAS3V89m.js → index-DTrW0n62.js} +1 -1
- package/dist/client/assets/{index-BG9x5ELw.js → index-DqU0CNB5.js} +1 -1
- package/dist/client/assets/{index-DDOXVfmG.js → index-FmcHS0n7.js} +1 -1
- package/dist/client/assets/{index-AtuNXtl1.js → index-biN0aic_.js} +1 -1
- package/dist/client/assets/{index-Bs-gkatC.js → index-qxqsMecG.js} +1 -1
- package/dist/client/assets/{infiniteQueryObserver-dFlgfKVl.js → infiniteQueryObserver-DPmZK5SE.js} +1 -1
- package/dist/client/assets/{input-C4xXFdLa.js → input-j_5WJy1c.js} +1 -1
- package/dist/client/assets/{integration-icon-9nN5AvVn.js → integration-icon-DrTDJ354.js} +1 -1
- package/dist/client/assets/{label-B5UIAzjB.js → label-Dmque-mN.js} +1 -1
- package/dist/client/assets/{layout-C93ItuDu.js → layout-BgLVGdMB.js} +1 -1
- package/dist/client/assets/{layout-DIeoK390.js → layout-Cyh0KCTx.js} +1 -1
- package/dist/client/assets/{login-Cum9TENA.js → login-CEJuPXz8.js} +1 -1
- package/dist/client/assets/{logo-upload-HuBGdFvy.js → logo-upload-D_X-eua0.js} +1 -1
- package/dist/client/assets/{markdown-C7LUMDS1.js → markdown-BjeAfn6Q.js} +1 -1
- package/dist/client/assets/{mcp-app-renderer-8UT29L5G.js → mcp-app-renderer-BjIiENx_.js} +1 -1
- package/dist/client/assets/{mcp-server-card--KsSGXj4.js → mcp-server-card-hwjTnxKa.js} +1 -1
- package/dist/client/assets/{mcp-server-detail-DpFZrrxK.js → mcp-server-detail-fOqjCDsy.js} +2 -2
- package/dist/client/assets/{members-Cv4ALw5c.js → members-BUIvlCPj.js} +1 -1
- package/dist/client/assets/{monaco-editor-CGQB1ouQ.js → monaco-editor-BI48gu97.js} +1 -1
- package/dist/client/assets/{monitoring-jUgSe2al.js → monitoring-cvfFeG45.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-edit-_8LF_BxB.js → monitoring-dashboard-edit-BOzMfOYa.js} +1 -1
- package/dist/client/assets/{monitoring-dashboard-view-CZdUWDWw.js → monitoring-dashboard-view-Da1aDoKV.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DOJg3snj.js → monitoring-stats-row-Bk2P-uOc.js} +1 -1
- package/dist/client/assets/{oauth-callback-DUHDiUnV.js → oauth-callback-DrDtRQei.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DJ-b74-1.js → oauth-callback-ai-provider-AqyT7OAy.js} +1 -1
- package/dist/client/assets/{org-ai-providers-DUCq5EUw.js → org-ai-providers-CYV2m0oE.js} +1 -1
- package/dist/client/assets/{page-DAq05p7G.js → page-CBVSkVrr.js} +1 -1
- package/dist/client/assets/{page-SgyDrWHD.js → page-CjM0cJ2H.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-CrnlpA9V.js → plugin-empty-state-CzxAWw66.js} +1 -1
- package/dist/client/assets/{plugin-empty-state-Dnds-DCV.js → plugin-empty-state-DGepiILI.js} +1 -1
- package/dist/client/assets/{plugin-header-CIduSygp.js → plugin-header-BHxHz9n0.js} +1 -1
- package/dist/client/assets/{plugin-header-C1XYEeTv.js → plugin-header-mOLE86wJ.js} +1 -1
- package/dist/client/assets/plugins-DoHvFK9w.js +1 -0
- package/dist/client/assets/{popover-U_QlVu0r.js → popover-B_9jK9T6.js} +1 -1
- package/dist/client/assets/{project-app-view-D9t5-mJm.js → project-app-view-BOeJqLvY.js} +1 -1
- package/dist/client/assets/{project-layout-BL0jttJZ.js → project-layout-BoHZ9uLC.js} +1 -1
- package/dist/client/assets/{project-plugins-By0aRQeH.js → project-plugins-BOxyaluG.js} +1 -1
- package/dist/client/assets/{projects-list-C2BO1TYf.js → projects-list-DP4hhCRm.js} +1 -1
- package/dist/client/assets/{registry-layout-CNpSd9I3.js → registry-layout-D1uZlucV.js} +1 -1
- package/dist/client/assets/{registry-utils-Bi8LTB_e.js → registry-utils-9Z7xkXEW.js} +1 -1
- package/dist/client/assets/{reports-layout-DH4L5-lG.js → reports-layout-_2OT-yHj.js} +1 -1
- package/dist/client/assets/{reset-password-BiJO11OF.js → reset-password-DbKC8pv7.js} +1 -1
- package/dist/client/assets/{resizable-XfUJo45G.js → resizable-D2UQg53E.js} +1 -1
- package/dist/client/assets/{save-actions-AenTNPs2.js → save-actions-DRE_2Nh6.js} +1 -1
- package/dist/client/assets/{scroll-area-BvqSXnHA.js → scroll-area-DXeQheGE.js} +1 -1
- package/dist/client/assets/{select-Bqr12jkn.js → select-roICowiz.js} +1 -1
- package/dist/client/assets/{select-virtual-mcp-DorfgjZR.js → select-virtual-mcp-CFEExN2T.js} +1 -1
- package/dist/client/assets/{sheet-D7MnTm5h.js → sheet-D0UV-Fr7.js} +1 -1
- package/dist/client/assets/{shell-layout-F6dMRYN1.js → shell-layout-BzGvbbd1.js} +2 -2
- package/dist/client/assets/{sidebar-settings-ZSwNsZur.js → sidebar-settings-Bqi6Lp6h.js} +1 -1
- package/dist/client/assets/{skeleton-xiE088f2.js → skeleton-Cy7jej-7.js} +1 -1
- package/dist/client/assets/{spinner-Bt_p6wlU.js → spinner-qX5-Mz-A.js} +1 -1
- package/dist/client/assets/{store-invite-BxsZ0zsl.js → store-invite-CMn4A-jT.js} +1 -1
- package/dist/client/assets/{switch-BIAgKxiJ.js → switch-7_yekA3p.js} +1 -1
- package/dist/client/assets/{table-c-SrSmwK.js → table-Cd-wCYBh.js} +1 -1
- package/dist/client/assets/{tabs-CytiJeE2.js → tabs-T6eq77EC.js} +1 -1
- package/dist/client/assets/{task-status-9RY3Ya8o.js → task-status-DSYWex9b.js} +1 -1
- package/dist/client/assets/tasks-CaWtJ_wZ.js +1 -0
- package/dist/client/assets/{tasks-panel-CftcenZ4.js → tasks-panel-Cpm18hI4.js} +1 -1
- package/dist/client/assets/{textarea-Buug1Hxe.js → textarea-BJkI1dfy.js} +1 -1
- package/dist/client/assets/{time-range-picker-BlD0TDtN.js → time-range-picker-DKvAeQX-.js} +1 -1
- package/dist/client/assets/{toggle-group-abCGptw4.js → toggle-group-O3ssRQZp.js} +1 -1
- package/dist/client/assets/{tools-list-BdA1jEJI.js → tools-list-DfrxfnU8.js} +1 -1
- package/dist/client/assets/{tooltip-Ckpai_jH.js → tooltip-Bms1Xn3i.js} +1 -1
- package/dist/client/assets/{topbar-portal-B-Tb-3gt.js → topbar-portal-C9r1D7L2.js} +1 -1
- package/dist/client/assets/{types-CUEMI47Y.js → types-BTzo08LL.js} +1 -1
- package/dist/client/assets/{use-automations-Cw8FAF0H.js → use-automations-DQ0Wvn7B.js} +1 -1
- package/dist/client/assets/{use-binding-f1akiPTf.js → use-binding-CidrckI6.js} +1 -1
- package/dist/client/assets/{use-collections-C3CSj681.js → use-collections-uyyRdHl8.js} +1 -1
- package/dist/client/assets/{use-connection-DSkVzqSP.js → use-connection-2T7CNTjX.js} +1 -1
- package/dist/client/assets/{use-copy-F9tiQWTi.js → use-copy-CnWGIrpr.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-C5n2ShE6.js → use-create-virtual-mcp-BqiAP0hG.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-C1Dhvj0C.js → use-infinite-scroll-BZWlWT4v.js} +1 -1
- package/dist/client/assets/{use-install-from-registry-BQfcs7M8.js → use-install-from-registry-BGTf0OMo.js} +1 -1
- package/dist/client/assets/{use-list-state-Djxe5eyh.js → use-list-state-Dn3PYXZc.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-D5tu2gbi.js → use-mcp-prompts-Bvq8o_wk.js} +1 -1
- package/dist/client/assets/{use-mcp-resources-D0eHe68n.js → use-mcp-resources-INpGwYsS.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DTZxAm-y.js → use-mcp-tools-CoXbW9dQ.js} +1 -1
- package/dist/client/assets/{use-members-DdPysVve.js → use-members-CKrsZLkR.js} +1 -1
- package/dist/client/assets/{use-mobile-DqlomLIB.js → use-mobile-BgetcADk.js} +1 -1
- package/dist/client/assets/{use-project-Cdk7AuZE.js → use-project-CCY4E3rU.js} +1 -1
- package/dist/client/assets/{use-store-discovery-C_al4z4H.js → use-store-discovery-B92mIOto.js} +1 -1
- package/dist/client/assets/{use-view-mode-Ag3VBJ77.js → use-view-mode-U3Y0emnO.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-V0XoWMM_.js → use-virtual-mcp-B8_wDvx9.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-Dbe2YK49.js +1 -0
- package/dist/client/assets/{useMutation-CXgAMvoC.js → useMutation-D77LVetF.js} +1 -1
- package/dist/client/assets/useQuery-DLey6Pvf.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-lgWDbCQ9.js +1 -0
- package/dist/client/assets/{user-C2BDT4Rq.js → user-D3_ltBdu.js} +1 -1
- package/dist/client/assets/{workflow-Bp2ajWVc.js → workflow-df54tmZt.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +250 -250
- package/dist/server/migrate.js +1 -1
- package/dist/server/node_modules/xtend/.jshintrc +30 -0
- package/dist/server/node_modules/xtend/LICENSE +20 -0
- package/dist/server/node_modules/xtend/README.md +32 -0
- package/dist/server/node_modules/xtend/immutable.js +19 -0
- package/dist/server/node_modules/xtend/mutable.js +17 -0
- package/dist/server/node_modules/xtend/package.json +55 -0
- package/dist/server/node_modules/xtend/test.js +103 -0
- package/dist/server/server.js +228 -228
- package/package.json +1 -1
- package/dist/client/assets/connection-detail-CHMgcK2a.js +0 -1
- package/dist/client/assets/connections-DxOgNXy0.js +0 -1
- package/dist/client/assets/constants-DgbSVhNJ.js +0 -1
- package/dist/client/assets/plugins-CJcJdSWL.js +0 -1
- package/dist/client/assets/tasks-C43Ik9tC.js +0 -1
- package/dist/client/assets/useInfiniteQuery-BXEdoCXW.js +0 -1
- package/dist/client/assets/useQuery-CtOvMPbo.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-Ds_6ilsi.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as w,c5 as ss,c as re,y as fe,j as s,u as pe,E as Fe,x as as,e as Ve,v as rs,K as Pe,B as ue,w as Ee,O as gt,d as ns}from"./index-SkQC2bL2.js";import{C as ls}from"./collection-search-CPQlTmfx.js";import{P as xe}from"./index-Bs-gkatC.js";import{B as vt,a as bt,b as jt,c as Nt}from"./breadcrumb-h9Dq7GJ0.js";import{E as We}from"./empty-state-BUpyINsX.js";import{E as os,d as is,e as Je,b as cs,T as ds,M as He,p as ke,s as je,a as Ze}from"./time-range-picker-BlD0TDtN.js";import{I as Ae}from"./integration-icon-9nN5AvVn.js";import{B as Le}from"./badge-C7XTRm7k.js";import{t as Re}from"./ChevronDown-BURkaeCD.js";import{i as ms}from"./ChevronRight-Df5oEIdG.js";import{e as de,b as we,d as yt,T as wt,a as St,c as ne}from"./table-c-SrSmwK.js";import{S as us,b as xs,H as Ne,M as fs,K as Ct}from"./monitoring-stats-row-DOJg3snj.js";import{a as Ie,u as De,W as ps}from"./constants-BZUBXkLq.js";import{u as Ue}from"./use-mcp-tools-DTZxAm-y.js";import{i as hs}from"./DotsVertical-ZWNLrGdE.js";import{i as gs}from"./Edit05-DFdmrfVO.js";import{s as It}from"./Plus-OTc7Ql1V.js";import{s as Dt}from"./Trash01-DhGTBhjv.js";import{C as vs}from"./connection-card-BDqdYEuX.js";import{D as bs,a as js,b as Ns,c as Xe}from"./dropdown-menu-V8gWmDzD.js";import{f as ys,a as ws,b as Ss,c as Cs,d as Is,e as Ds,A as Ts,h as ks}from"./alert-dialog-DfOenbUZ.js";import{u as Ms}from"./use-infinite-scroll-C1Dhvj0C.js";import{u as _s}from"./use-members-DdPysVve.js";import{u as Ps}from"./useSuspenseInfiniteQuery-Ds_6ilsi.js";import{b as Tt}from"./use-connection-DSkVzqSP.js";import{b as As}from"./use-virtual-mcp-V0XoWMM_.js";import{i as Ls}from"./Code01-ClhNhs6L.js";import{n as $e}from"./Container-De-pv4QL.js";import{i as Es}from"./FilterLines-B4Jg_hkv.js";import{c as Os}from"./Grid01-B7q4cvPD.js";import{I as Oe}from"./input-C4xXFdLa.js";import{C as Ye}from"./checkbox-B92JdB3t.js";import{c as Rs,d as $s,e as et,a as zs,C as Ks,b as Bs}from"./command-BYr1e0yf.js";import{P as kt,a as Mt,b as _t}from"./popover-U_QlVu0r.js";import{S as tt,a as st,b as at,c as rt,d as Me}from"./select-Bqr12jkn.js";import{T as Fs}from"./textarea-Buug1Hxe.js";import{T as Vs,a as Ws,b as Hs}from"./tooltip-Ckpai_jH.js";import{C as Pt}from"./collection-tabs-DwGvAiHF.js";import{S as Us}from"./switch-BIAgKxiJ.js";import{L as Gs}from"./label-B5UIAzjB.js";import{c as Ge,s as At,d as qs,e as Lt,f as Et,g as Qs,i as Js,h as nt,p as Zs,r as Ot,D as Xs,u as Rt,R as Ys,S as ea,j as ta,k as $t,l as sa,n as aa,m as ra,o as na,q as la,t as oa,v as ia,Z as ca,L as da,G as ma,w as zt,x as lt,y as ot,z as ua,J as xa,A as ye,B as fa,E as pa,F as ha,H as ga,I as va,K as ba,C as it,a as ct}from"./chart-BkIsuiHb.js";import{g as ja,A as Na,D as ya,X as dt}from"./XAxis-D14vbkR0.js";import"./Loading01-CDOurw-F.js";import"./SearchMd-D6jy19cO.js";import"./useQuery-CtOvMPbo.js";import"./useMutation-CXgAMvoC.js";import"./Check-CN56KhoF.js";import"./Copy01-E3kqWO3T.js";import"./Download01-D_QoltgV.js";import"./Key01-Bfc7gsTd.js";import"./Play-DSE8IZVS.js";import"./monaco-editor-CGQB1ouQ.js";import"./spinner-Bt_p6wlU.js";import"./scroll-area-BvqSXnHA.js";import"./ChevronUp-Ql_IhfwF.js";import"./Clock-DY1djxCP.js";import"./ChevronLeft-C1fUg8Ja.js";import"./card-Cm-keK-z.js";import"./infiniteQueryObserver-dFlgfKVl.js";import"./use-collections-C3CSj681.js";import"./index-Ce1KA469.js";import"./index-AtuNXtl1.js";import"./index-CMdtjEkH.js";const ze=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));ze.displayName="BarChart07";const Kt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Kt.displayName="PauseCircle";const Bt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),w.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Bt.displayName="PlayCircle";var Ft=(t,e,a,r)=>Lt(t,"xAxis",e,r),Vt=(t,e,a,r)=>Et(t,"xAxis",e,r),Wt=(t,e,a,r)=>Lt(t,"yAxis",a,r),Ht=(t,e,a,r)=>Et(t,"yAxis",a,r),wa=Ge([At,Ft,Wt,Vt,Ht],(t,e,a,r,n)=>Js(t,"xAxis")?nt(e,r,!1):nt(a,n,!1)),Sa=(t,e,a,r,n)=>n;function Ca(t){return t.type==="line"}var Ia=Ge([Qs,Sa],(t,e)=>t.filter(Ca).find(a=>a.id===e)),Da=Ge([At,Ft,Wt,Vt,Ht,Ia,wa,qs],(t,e,a,r,n,l,i,c)=>{var{chartData:o,dataStartIndex:d,dataEndIndex:f}=c;if(!(l==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:m,data:p}=l,x;if(p!=null&&p.length>0?x=p:x=o?.slice(d,f+1),x!=null)return Ga({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:m,bandSize:i,displayedData:x})}}),Ta=["id"],ka=["type","layout","connectNulls","needClip","shape"],Ma=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},Se.apply(null,arguments)}function mt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function me(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(a),!0).forEach(function(r){_a(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):mt(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function _a(t,e,a){return(e=Pa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Pa(t){var e=Aa(t,"string");return typeof e=="symbol"?e:e+""}function Aa(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qe(t,e){if(t==null)return{};var a,r,n=La(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function La(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var Ea=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:l}=t;return[{inactive:l,dataKey:e,type:n,color:r,value:$t(a,e),payload:t}]},Oa=w.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:l,name:i,hide:c,unit:o,tooltipType:d,id:f}=t,m={dataDefinedOnItem:a,getPosition:aa,settings:{stroke:r,strokeWidth:n,fill:l,dataKey:e,nameKey:void 0,name:$t(i,e),hide:c,type:d,color:r,unit:o,graphicalItemId:f}};return w.createElement(sa,{tooltipEntrySettings:m})}),Ut=(t,e)=>"".concat(e,"px ").concat(t,"px");function Ra(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var $a=(t,e,a)=>{var r=a.reduce((p,x)=>p+x,0);if(!r)return Ut(e,t);for(var n=Math.floor(t/r),l=t%r,i=[],c=0,o=0;c<a.length;o+=(d=a[c])!==null&&d!==void 0?d:0,++c){var d,f=a[c];if(f!=null&&o+f>l){i=[...a.slice(0,c),l-o];break}}var m=i.length%2===0?[0,e]:[e];return[...Ra(a,n),...i,...m].map(p=>"".concat(p,"px")).join(", ")};function za(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:l,needClip:i}=r,{id:c}=r,o=qe(r,Ta),d=ga(o);return w.createElement(ya,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:d,needClip:i,clipPathId:e})}function Ka(t){var{showLabels:e,children:a,points:r}=t,n=w.useMemo(()=>r?.map(l=>{var i,c,o={x:(i=l.x)!==null&&i!==void 0?i:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return me(me({},o),{},{value:l.value,payload:l.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[r]);return w.createElement(pa,{value:e?n:void 0},a)}function ut(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:l}=t,{type:i,layout:c,connectNulls:o,needClip:d,shape:f}=l,m=qe(l,ka),p=me(me({},ha(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(e,")"):void 0,points:r,type:i,layout:c,connectNulls:o,strokeDasharray:n??l.strokeDasharray});return w.createElement(w.Fragment,null,r?.length>1&&w.createElement(xs,Se({shapeType:"curve",option:f},p,{pathRef:a})),w.createElement(za,{points:r,clipPathId:e,props:l}))}function Ba(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Fa(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:l}=t,{points:i,strokeDasharray:c,isAnimationActive:o,animationBegin:d,animationDuration:f,animationEasing:m,animateNewValues:p,width:x,height:b,onAnimationEnd:j,onAnimationStart:v}=a,g=n.current,h=ua(i,"recharts-line-"),u=w.useRef(h),[y,S]=w.useState(!1),N=!y,P=w.useCallback(()=>{typeof j=="function"&&j(),S(!1)},[j]),D=w.useCallback(()=>{typeof v=="function"&&v(),S(!0)},[v]),I=Ba(r.current),M=w.useRef(0);u.current!==h&&(M.current=l.current,u.current=h);var L=M.current;return w.createElement(Ka,{points:i,showLabels:N},a.children,w.createElement(xa,{animationId:h,begin:d,duration:f,isActive:o,easing:m,onAnimationEnd:P,onAnimationStart:D,key:h},E=>{var T=ye(L,I+L,E),C=Math.min(T,I),_;if(o)if(c){var O="".concat(c).split(/[,\s]+/gim).map(K=>parseFloat(K));_=$a(C,I,O)}else _=Ut(I,C);else _=c==null?void 0:String(c);if(E>0&&I>0&&(n.current=i,l.current=Math.max(l.current,C)),g){var F=g.length/i.length,W=E===1?i:i.map((K,z)=>{var A=Math.floor(z*F);if(g[A]){var k=g[A];return me(me({},K),{},{x:ye(k.x,K.x,E),y:ye(k.y,K.y,E)})}return p?me(me({},K),{},{x:ye(x*2,K.x,E),y:ye(b/2,K.y,E)}):me(me({},K),{},{x:K.x,y:K.y})});return n.current=W,w.createElement(ut,{props:a,points:W,clipPathId:e,pathRef:r,strokeDasharray:_})}return w.createElement(ut,{props:a,points:i,clipPathId:e,pathRef:r,strokeDasharray:_})}),w.createElement(fa,{label:a.label}))}function Va(t){var{clipPathId:e,props:a}=t,r=w.useRef(null),n=w.useRef(0),l=w.useRef(null);return w.createElement(Fa,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:l})}var Wa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:zt(t.payload,e)}};class Ha extends w.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:l,yAxisId:i,top:c,left:o,width:d,height:f,id:m,needClip:p,zIndex:x}=this.props;if(e)return null;var b=ss("recharts-line",n),j=m,{r:v,strokeWidth:g}=ja(a),h=ia(a),u=v*2+g,y=p?"url(#clipPath-".concat(h?"":"dots-").concat(j,")"):void 0;return w.createElement(ca,{zIndex:x},w.createElement(da,{className:b},p&&w.createElement("defs",null,w.createElement(ma,{clipPathId:j,xAxisId:l,yAxisId:i}),!h&&w.createElement("clipPath",{id:"clipPath-dots-".concat(j)},w.createElement("rect",{x:o-u/2,y:c-u/2,width:d+u,height:f+u}))),w.createElement(us,{xAxisId:l,yAxisId:i,data:r,dataPointFormatter:Wa,errorBarOffset:0},w.createElement(Va,{props:this.props,clipPathId:j}))),w.createElement(Na,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:y}))}}var Gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Xs.line,type:"linear"};function Ua(t){var e=Ot(t,Gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,connectNulls:c,dot:o,hide:d,isAnimationActive:f,label:m,legendType:p,xAxisId:x,yAxisId:b,id:j}=e,v=qe(e,Ma),{needClip:g}=ra(x,b),h=na(),u=la(),y=Rt(),S=oa(M=>Da(M,x,b,y,j));if(u!=="horizontal"&&u!=="vertical"||S==null||h==null)return null;var{height:N,width:P,x:D,y:I}=h;return w.createElement(Ha,Se({},v,{id:j,connectNulls:c,dot:o,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,isAnimationActive:f,hide:d,label:m,legendType:p,xAxisId:x,yAxisId:b,points:S,layout:u,height:N,width:P,left:D,top:I,needClip:g}))}function Ga(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:l,dataKey:i,bandSize:c,displayedData:o}=t;return o.map((d,f)=>{var m=zt(d,i);if(e==="horizontal"){var p=lt({axis:a,ticks:n,bandSize:c,entry:d,index:f}),x=ot(m)?null:r.scale.map(m);return{x:p,y:x??null,value:m,payload:d}}var b=ot(m)?null:a.scale.map(m),j=lt({axis:r,ticks:l,bandSize:c,entry:d,index:f});return b==null||j==null?null:{x:b,y:j,value:m,payload:d}}).filter(Boolean)}function qa(t){var e=Ot(t,Gt),a=Rt();return w.createElement(Ys,{id:e.id,type:"line"},r=>w.createElement(w.Fragment,null,w.createElement(ea,{legendPayload:Ea(e)}),w.createElement(Oa,{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:r}),w.createElement(ta,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),w.createElement(Ua,Se({},e,{id:r}))))}var Ke=w.memo(qa,Zs);Ke.displayName="Line";var Qa=["axis"],xt=w.forwardRef((t,e)=>w.createElement(va,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Qa,tooltipPayloadSearcher:ba,categoricalChartProps:t,ref:e}));function Ja(t){const e=re.c(49),{log:a,isExpanded:r,connection:n,virtualMcpName:l,onToggle:i,lastLogRef:c}=t;let o,d;if(e[0]!==a.timestamp){const C=new Date(a.timestamp);o=C.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=C.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=a.timestamp,e[1]=o,e[2]=d}else o=e[1],d=e[2];const f=d,m=r?"bg-muted/30 hover:bg-accent/80":"hover:bg-muted/40";let p;e[3]!==m?(p=fe("h-14 md:h-16 transition-colors cursor-pointer",m),e[3]=m,e[4]=p):p=e[4];let x;e[5]!==r?(x=s.jsx(de,{className:"w-10 md:w-12 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:r?s.jsx(Re,{size:16,className:"text-muted-foreground"}):s.jsx(ms,{size:16,className:"text-muted-foreground"})})}),e[5]=r,e[6]=x):x=e[6];const b=n?.icon||null;let j;e[7]!==a.connectionTitle||e[8]!==b?(j=s.jsx(de,{className:"w-12 md:w-16 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Ae,{icon:b,name:a.connectionTitle,size:"xs",className:"shadow-sm"})})}),e[7]=a.connectionTitle,e[8]=b,e[9]=j):j=e[9];let v;e[10]!==a.toolName?(v=s.jsx("div",{className:"text-xs font-medium text-foreground truncate block",children:a.toolName}),e[10]=a.toolName,e[11]=v):v=e[11];let g;e[12]!==a.connectionTitle?(g=s.jsx("div",{className:"text-xs text-muted-foreground truncate block",children:a.connectionTitle}),e[12]=a.connectionTitle,e[13]=g):g=e[13];let h;e[14]!==v||e[15]!==g?(h=s.jsxs(de,{className:"min-w-0 pr-2 md:pr-4",children:[v,g]}),e[14]=v,e[15]=g,e[16]=h):h=e[16];let u;e[17]!==l?(u=s.jsx(de,{className:"w-24 md:w-32 px-2 md:px-3 text-xs text-muted-foreground",children:s.jsx("div",{className:"truncate",children:l})}),e[17]=l,e[18]=u):u=e[18];let y;e[19]!==a.userName?(y=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:a.userName}),e[19]=a.userName,e[20]=y):y=e[20];let S;e[21]!==o?(S=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:o}),e[21]=o,e[22]=S):S=e[22];let N;e[23]!==f?(N=s.jsx(de,{className:"w-20 md:w-28 px-2 md:px-3 text-xs text-muted-foreground",children:f}),e[23]=f,e[24]=N):N=e[24];let P;e[25]!==a.durationMs?(P=s.jsxs(de,{className:"w-16 md:w-20 px-2 md:px-3 text-xs text-muted-foreground font-mono text-right",children:[a.durationMs,"ms"]}),e[25]=a.durationMs,e[26]=P):P=e[26];const D=a.isError?"destructive":"success",I=a.isError?"Error":"OK";let M;e[27]!==D||e[28]!==I?(M=s.jsx(de,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"flex items-center justify-end",children:s.jsx(Le,{variant:D,className:"text-xs px-1.5 md:px-2 py-0.5 md:py-1",children:I})})}),e[27]=D,e[28]=I,e[29]=M):M=e[29];let L;e[30]!==c||e[31]!==i||e[32]!==u||e[33]!==y||e[34]!==S||e[35]!==N||e[36]!==P||e[37]!==M||e[38]!==p||e[39]!==x||e[40]!==j||e[41]!==h?(L=s.jsxs(we,{ref:c,className:p,onClick:i,children:[x,j,h,u,y,S,N,P,M]}),e[30]=c,e[31]=i,e[32]=u,e[33]=y,e[34]=S,e[35]=N,e[36]=P,e[37]=M,e[38]=p,e[39]=x,e[40]=j,e[41]=h,e[42]=L):L=e[42];let E;e[43]!==r||e[44]!==a?(E=r&&s.jsx(we,{children:s.jsx(de,{colSpan:9,className:"p-0",children:s.jsx(os,{log:a})})}),e[43]=r,e[44]=a,e[45]=E):E=e[45];let T;return e[46]!==L||e[47]!==E?(T=s.jsxs(w.Fragment,{children:[L,E]}),e[46]=L,e[47]=E,e[48]=T):T=e[48],T}const Qe="decopilot";function Za(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:Xa},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function Xa(t){return t.structuredContent??t}function Ya(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:er},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function er(t){return t.structuredContent??t}function qt(t,e){const a=re.c(9),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]===Symbol.for("react.memo_cache_sentinel")?(i=[Qe],a[2]=i):i=a[2];let c;a[3]!==t?(c={...t,connectionIds:i,topN:5},a[3]=t,a[4]=c):c=a[4];let o;return a[5]!==l||a[6]!==e||a[7]!==c?(o={client:l,toolName:"MONITORING_STATS",toolArguments:c,staleTime:3e4,...e,select:tr},a[5]=l,a[6]=e,a[7]=c,a[8]=o):o=a[8],Ue(o)}function tr(t){return t.structuredContent??t}function sr(){const{org:t,project:e,locator:a}=pe(),r=as(),n=Ve(),l=De({connectionId:Ie,orgId:t.id}),[i,c]=w.useState(null),[o,d]=w.useState(!1),[f,m]=w.useState(!1),{data:p}=rs({queryKey:Pe.monitoringDashboards(a),queryFn:async()=>{if(!l)throw new Error("MCP client is not available");const h=await l.callTool({name:"MONITORING_DASHBOARD_LIST",arguments:{}});return h.structuredContent??h}}),x=p?.dashboards??[],b=async()=>{if(l){m(!0);try{const h=await l.callTool({name:"MONITORING_DASHBOARD_CREATE",arguments:{name:"Untitled Dashboard",widgets:[{id:crypto.randomUUID(),name:"New Widget",type:"metric",source:{path:"$.usage.total_tokens",from:"output"},aggregation:{fn:"sum"}}]}}),u=(h.structuredContent??h).id;r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)}),n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:u}})}catch(h){Ee.error("Failed to create dashboard"),console.error(h)}finally{m(!1)}}},j=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId",params:{org:t.slug,project:e.slug,dashboardId:h}})},v=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:h}})},g=async h=>{if(l){d(!0);try{await l.callTool({name:"MONITORING_DASHBOARD_DELETE",arguments:{id:h}}),Ee.success("Dashboard deleted"),r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)})}catch(u){Ee.error("Failed to delete dashboard"),console.error(u)}finally{d(!1),c(null)}}};return s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[x.length===0?s.jsx(We,{title:"No dashboards yet",description:"Create a dashboard to aggregate and visualize your monitoring data",image:s.jsx(ze,{size:48,className:"text-muted-foreground/50"}),actions:s.jsxs(ue,{onClick:b,size:"sm",disabled:f,children:[s.jsx(It,{size:16,className:"mr-1.5"}),"Create Dashboard"]})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(h=>s.jsx(vs,{connection:{id:h.id,title:h.name,description:h.description},fallbackIcon:s.jsx(ze,{}),onClick:()=>j(h.id),headerActions:s.jsxs(bs,{children:[s.jsx(js,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:u=>u.stopPropagation(),children:s.jsx(hs,{size:20})})}),s.jsxs(Ns,{align:"end",onClick:u=>u.stopPropagation(),children:[s.jsxs(Xe,{onClick:()=>v(h.id),children:[s.jsx(gs,{size:16}),"Edit"]}),s.jsxs(Xe,{onClick:()=>c(h.id),className:"text-destructive",children:[s.jsx(Dt,{size:16}),"Delete"]})]})]}),footer:s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsxs("span",{children:[h.widgets.length," widget",h.widgets.length!==1?"s":""]}),s.jsx("span",{children:"·"}),s.jsx("span",{children:new Date(h.createdAt).toLocaleDateString()})]})},h.id))}),s.jsx(ys,{open:!!i,onOpenChange:()=>c(null),children:s.jsxs(ws,{children:[s.jsxs(Ss,{children:[s.jsx(Cs,{children:"Delete Dashboard"}),s.jsx(Is,{children:"Are you sure you want to delete this dashboard? This action cannot be undone."})]}),s.jsxs(Ds,{children:[s.jsx(Ts,{disabled:o,children:"Cancel"}),s.jsx(ks,{disabled:o,onClick:()=>i&&g(i),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o?"Deleting...":"Delete"})]})]})})]})}function ar(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"h-6 w-40 bg-muted rounded animate-pulse"}),s.jsx("div",{className:"h-4 w-64 bg-muted rounded animate-pulse mt-2"})]}),s.jsx("div",{className:"h-8 w-32 bg-muted rounded animate-pulse"})]}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[e,s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(rr)})]}),t[1]=a):a=t[1],a}function rr(t){return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-2"}),s.jsx("div",{className:"h-4 w-full bg-muted rounded animate-pulse mb-3"}),s.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]},t)}function nr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboards"}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Fe,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(ar,{}),children:s.jsx(sr,{})})}),t[1]=a):a=t[1],a}function ft(t){const e=re.c(72),{options:a,onValueChange:r,defaultValue:n,placeholder:l,variant:i,animation:c,maxCount:o,modalPopover:d,asChild:f,className:m,disabled:p}=t;let x;e[0]!==n?(x=n===void 0?[]:n,e[0]=n,e[1]=x):x=e[1];const b=x,j=l===void 0?"Select items":l,v=i===void 0?"default":i,g=c===void 0?0:c,h=o===void 0?3:o,u=d===void 0?!1:d,y=f===void 0?!1:f,S=p===void 0?!1:p,[N,P]=w.useState(b),[D,I]=w.useState(!1);let M,L;e[2]!==b||e[3]!==N?(M=()=>{JSON.stringify(N)!==JSON.stringify(b)&&P(b)},L=[b,N],e[2]=b,e[3]=N,e[4]=M,e[5]=L):(M=e[4],L=e[5]),w.useEffect(M,L);let E;e[6]!==r||e[7]!==N?(E=Q=>{if(Q.key==="Enter")I(!0);else if(Q.key==="Backspace"&&!Q.currentTarget.value){const ee=[...N];ee.pop(),P(ee),r(ee)}},e[6]=r,e[7]=N,e[8]=E):E=e[8];const T=E;let C;e[9]!==r||e[10]!==N?(C=Q=>{const ee=N.includes(Q.value)?N.filter(ie=>ie!==Q.value):[...N,Q.value];P(ee),r(ee)},e[9]=r,e[10]=N,e[11]=C):C=e[11];const _=C;let O;e[12]!==r?(O=()=>{P([]),r([])},e[12]=r,e[13]=O):O=e[13];const F=O;let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{I(cr)},e[14]=W):W=e[14];const K=W;let z;e[15]!==F||e[16]!==r||e[17]!==a||e[18]!==N.length?(z=()=>{if(N.length===a.length)F();else{const Q=a.map(ir);P(Q),r(Q)}},e[15]=F,e[16]=r,e[17]=a,e[18]=N.length,e[19]=z):z=e[19];const A=z;let k;e[20]!==y?(k=y?{}:{variant:"outline"},e[20]=y,e[21]=k):k=e[21];let R;e[22]!==m?(R=fe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",m),e[22]=m,e[23]=R):R=e[23];let $;e[24]!==g||e[25]!==h||e[26]!==a||e[27]!==j||e[28]!==N||e[29]!==v?($=N.length>0?s.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[N.slice(0,h).map(Q=>{const ee=a.find(ce=>ce.value===Q),ie=ee?.icon;return s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${g}s`},children:[ie&&s.jsx(ie,{className:"h-3 w-3 shrink-0"}),s.jsx("span",{className:"truncate",children:ee?.label})]},Q)}),N.length>h&&s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${g}s`},children:["+",N.length-h]})]}),s.jsx("div",{className:"flex items-center shrink-0 ml-2",children:s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:j}),s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=g,e[25]=h,e[26]=a,e[27]=j,e[28]=N,e[29]=v,e[30]=$):$=e[30];let q;e[31]!==S||e[32]!==k||e[33]!==R||e[34]!==$?(q=s.jsx(kt,{asChild:!0,children:s.jsx(ue,{ref:null,...k,onClick:K,className:R,disabled:S,children:$})}),e[31]=S,e[32]=k,e[33]=R,e[34]=$,e[35]=q):q=e[35];let te;e[36]===Symbol.for("react.memo_cache_sentinel")?(te=()=>I(!1),e[36]=te):te=e[36];let Z;e[37]!==T?(Z=s.jsx(Rs,{placeholder:"Search...",onKeyDown:T,className:"rounded-t-xl"}),e[37]=T,e[38]=Z):Z=e[38];let V;e[39]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx($s,{children:"No results found."}),e[39]=V):V=e[39];let U;e[40]!==A?(U=()=>{A()},e[40]=A,e[41]=U):U=e[41];let G;e[42]!==A?(G=Q=>{Q.stopPropagation(),A()},e[42]=A,e[43]=G):G=e[43];const J=N.length===a.length&&a.length>0;let B;e[44]!==J||e[45]!==A?(B=s.jsx(Ye,{checked:J,onCheckedChange:A,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:or}),e[44]=J,e[45]=A,e[46]=B):B=e[46];let X;e[47]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("span",{children:"(Select All)"}),e[47]=X):X=e[47];let H;e[48]!==G||e[49]!==B?(H=s.jsxs("div",{className:"flex items-center w-full",onClick:G,children:[B,X]}),e[48]=G,e[49]=B,e[50]=H):H=e[50];let se;e[51]!==U||e[52]!==H?(se=s.jsx(et,{onSelect:U,className:"cursor-pointer",children:H},"all"),e[51]=U,e[52]=H,e[53]=se):se=e[53];let ae;if(e[54]!==a||e[55]!==N||e[56]!==_){let Q;e[58]!==N||e[59]!==_?(Q=ee=>{const ie=N.includes(ee.value);return s.jsx(et,{onSelect:()=>{_(ee)},className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center w-full",onClick:ce=>{ce.stopPropagation(),_(ee)},children:[s.jsx(Ye,{checked:ie,onCheckedChange:()=>{_(ee)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:lr}),ee.icon&&s.jsx(ee.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),s.jsx("span",{children:ee.label})]})},ee.value)},e[58]=N,e[59]=_,e[60]=Q):Q=e[60],ae=a.map(Q),e[54]=a,e[55]=N,e[56]=_,e[57]=ae}else ae=e[57];let Y;e[61]!==se||e[62]!==ae?(Y=s.jsxs(zs,{className:"rounded-b-xl",children:[V,s.jsxs(Ks,{children:[se,ae]})]}),e[61]=se,e[62]=ae,e[63]=Y):Y=e[63];let le;e[64]!==Z||e[65]!==Y?(le=s.jsx(Mt,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:te,children:s.jsxs(Bs,{className:"rounded-xl",children:[Z,Y]})}),e[64]=Z,e[65]=Y,e[66]=le):le=e[66];let oe;return e[67]!==D||e[68]!==u||e[69]!==q||e[70]!==le?(oe=s.jsxs(_t,{open:D,onOpenChange:I,modal:u,children:[q,le]}),e[67]=D,e[68]=u,e[69]=q,e[70]=le,e[71]=oe):oe=e[71],oe}function lr(t){return t.stopPropagation()}function or(t){return t.stopPropagation()}function ir(t){return t.value}function cr(t){return!t}function Qt(t,e){return e==="1d"?t.toLocaleDateString([],{month:"short",day:"numeric"}):t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function dr(t,e,a,r,n){const l=t.map(u=>u.toolName),i=new Map,c=20,o=a.getTime(),f=(r.getTime()-o)/(c-1);for(let u=0;u<c;u++){const y=Math.round(o+u*f),S=new Date(y);i.set(String(y),{t:S.toISOString(),ts:y,label:Qt(S,n),tools:new Map})}const m=[...i.keys()].map(Number).sort((u,y)=>u-y);for(const u of e){const y=u.timestamp.includes("T")?u.timestamp:u.timestamp.replace(" ","T"),S=new Date(y).getTime();let N=m[0],P=Math.abs(S-N);for(const M of m){const L=Math.abs(S-M);L<P&&(P=L,N=M)}const D=i.get(String(N)),I=D.tools.get(u.toolName);I?D.tools.set(u.toolName,{calls:I.calls+u.calls,errors:I.errors+u.errors,avg:(I.avg*I.calls+u.avg*u.calls)/(I.calls+u.calls),p95:Math.max(I.p95,u.p95)}):D.tools.set(u.toolName,{calls:u.calls,errors:u.errors,avg:u.avg,p95:u.p95})}const p=[...i.values()].sort((u,y)=>u.ts-y.ts),x=[],b=[],j=[],v=[];for(const u of p){const y={t:u.t,ts:u.ts,label:u.label},S={...y},N={...y},P={...y},D={...y};for(const I of l){const M=u.tools.get(I)??{calls:0,errors:0,avg:0,p95:0};S[I]=M.calls,D[I]=M.errors,N[I]=Math.round(M.avg),P[I]=Math.round(M.p95)}x.push(S),b.push(N),j.push(P),v.push(D)}const g={},h=new Map;return t.forEach((u,y)=>{const N=`var(--chart-${y%5+1})`;h.set(u.toolName,N),g[u.toolName]={label:u.toolName,color:N}}),{callsBuckets:x,latencyAvgBuckets:b,latencyP95Buckets:j,errorsBuckets:v,chartConfig:g,toolColors:h}}function mr(t,e){let a=0,r=Math.abs(t-e[0]);for(let n=1;n<e.length;n++){const l=Math.abs(t-e[n]);l<r&&(r=l,a=n)}return a}function ur(t,e,a,r){const l=e.getTime(),c=(a.getTime()-l)/19,o=[],d=[];for(let m=0;m<20;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:Qt(new Date(p),r),calls:0,errors:0,avg:0,p95:0})}const f=new Array(20).fill(0);for(const m of t){const p=new Date(m.timestamp).getTime(),x=mr(p,d),b=o[x];b.calls+=m.calls,b.errors+=m.errors,b.avg+=m.avg,b.p95=Math.max(b.p95,m.p95),f[x]++}for(let m=0;m<20;m++)f[m]>0&&(o[m].avg=o[m].avg/f[m]);return o}const pt={calls:"Top Tools — Calls","latency-avg":"Top Tools — Average Latency","latency-p95":"Top Tools — P95 Latency",errors:"Top Tools — Errors","llm-calls":"AI Usage","llm-latency-avg":"AI Latency","llm-latency-p95":"AI P95 Latency","llm-errors":"AI Errors"};function xr(t){return t.startsWith("llm-")}function ht(t,e){return e==="latency-avg"||e==="latency-p95"||e==="llm-latency-avg"||e==="llm-latency-p95"?t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`:String(t)}function fr(t){const e=re.c(34),{metricsMode:a,dateRange:r,connectionIds:n,excludeConnectionIds:l,toolName:i,status:c,isStreaming:o,streamingRefetchInterval:d}=t,{org:f}=pe(),m=Ve(),p=Tt()??[],x=r;if(!x)throw new Error("TopTools requires an explicit date range");const b=new Date(x.startDate),j=new Date(x.endDate),v=j.getTime()-b.getTime(),g=v<=36e5?"1m":v<=9e7?"1h":"1d",h=xr(a),u=n?.length?n:void 0;let y;e[0]!==i?(y=i?[i]:void 0,e[0]=i,e[1]=y):y=e[1];let S;e[2]!==x.endDate||e[3]!==x.startDate||e[4]!==l||e[5]!==g||e[6]!==c||e[7]!==u||e[8]!==y?(S={interval:g,startDate:x.startDate,endDate:x.endDate,topN:10,connectionIds:u,excludeConnectionIds:l,toolNames:y,status:c},e[2]=x.endDate,e[3]=x.startDate,e[4]=l,e[5]=g,e[6]=c,e[7]=u,e[8]=y,e[9]=S):S=e[9];const N=o?d:!1;let P;e[10]!==N?(P={refetchInterval:N},e[10]=N,e[11]=P):P=e[11];const{data:D}=Ya(S,P);let I;e[12]!==x.endDate||e[13]!==x.startDate||e[14]!==g?(I={interval:g,startDate:x.startDate,endDate:x.endDate},e[12]=x.endDate,e[13]=x.startDate,e[14]=g,e[15]=I):I=e[15];const M=o?d:!1;let L;e[16]!==M?(L={refetchInterval:M},e[16]=M,e[17]=L):L=e[17];const{data:E}=qt(I,L),T=D?.topTools??[],{callsBuckets:C,latencyAvgBuckets:_,latencyP95Buckets:O,errorsBuckets:F,chartConfig:W,toolColors:K}=dr(T,D?.topToolsTimeseries??[],b,j,g),z=ur(E?.timeseries??[],b,j,g),A=a==="llm-latency-avg"?"avg":a==="llm-latency-p95"?"p95":a==="llm-errors"?"errors":"calls",k=a==="latency-avg"?_:a==="latency-p95"?O:a==="errors"?F:C,R=new Map(p.map(hr));let $;e[18]!==m||e[19]!==f.slug?($=()=>{m({to:"/$org/$project/monitoring",params:{org:f.slug,project:gt}})},e[18]=m,e[19]=f.slug,e[20]=$):$=e[20];const q=$;if(h){let V;e[21]!==A?(V={label:A,color:"var(--chart-1)"},e[21]=A,e[22]=V):V=e[22];let U;e[23]!==A||e[24]!==V?(U={[A]:V},e[23]=A,e[24]=V,e[25]=U):U=e[25];const G=U,J=pt[a];let B;e[26]!==J?(B=s.jsx("div",{className:"flex flex-col gap-1.5",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:J})}),e[26]=J,e[27]=B):B=e[27];const X=(E?.timeseries?.length??0)===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No AI activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:G,children:s.jsxs(xt,{data:z,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:se=>{const{active:ae,payload:Y}=se;if(!ae||!Y||Y.length===0)return null;const le=Y[0]&&typeof Y[0]=="object"&&"payload"in Y[0]?Y[0].payload?.label??"":"",oe=typeof Y[0]?.value=="number"?Y[0].value:0;return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:le}),s.jsx("div",{className:"text-xs font-medium",children:ht(oe,a)})]})}}),s.jsx(Ke,{type:"monotone",dataKey:A,stroke:"var(--chart-1)",strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}})]})})});let H;return e[28]!==q||e[29]!==B||e[30]!==X?(H=s.jsx(Ne,{title:B,onTitleClick:q,children:X}),e[28]=q,e[29]=B,e[30]=X,e[31]=H):H=e[31],H}const te=pt[a];let Z;return e[32]!==te?(Z=s.jsx("p",{className:"text-sm text-muted-foreground",children:te}),e[32]=te,e[33]=Z):Z=e[33],s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-1.5",children:[Z,s.jsx("div",{className:"flex items-center gap-3",children:T.slice(0,3).map(V=>{const U=R.get(V.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ae,{icon:U?.icon||null,name:V.toolName,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4! aspect-square rounded-sm"}),s.jsx("span",{className:"text-[10px] text-foreground truncate max-w-32",children:V.toolName})]},V.toolName)})})]}),onTitleClick:q,children:T.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No tool activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:W,children:s.jsxs(xt,{data:k,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:V=>{const{active:U,payload:G}=V;if(!U||!G||G.length===0)return null;const J=G[0]&&typeof G[0]=="object"&&"payload"in G[0]?G[0].payload?.label??"":"";return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:J}),s.jsx("div",{className:"flex flex-col gap-1",children:[...G].sort(pr).map(B=>{const X=String(B.dataKey??""),H=typeof B.value=="number"?B.value:0,se=typeof B.color=="string"?B.color:void 0;if(!H||H===0)return null;const ae=T.find(le=>le.toolName===X),Y=R.get(ae?.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:se}}),s.jsx(Ae,{icon:Y?.icon||null,name:X,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[X,":"]}),s.jsx("span",{className:"text-xs font-medium",children:ht(H,a)})]},X)})})]})}}),T.map(V=>s.jsx(Ke,{type:"monotone",dataKey:V.toolName,stroke:K.get(V.toolName),strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}},V.toolName))]})})})})}function pr(t,e){const a=typeof t.value=="number"?t.value:0;return(typeof e.value=="number"?e.value:0)-a}function hr(t){return[t.id,t]}function gr(){const t=re.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t[0]=e):e=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[e,s.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:3}).map(vr)})]}),t[1]=a):a=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ne,{title:a,children:s.jsx("div",{className:"flex flex-col gap-2 w-full",children:s.jsx("div",{className:"h-[140px] w-full rounded bg-muted animate-pulse"})})}),t[2]=r):r=t[2],r}function vr(t,e){return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"size-4 aspect-square rounded-md bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-16 rounded bg-muted animate-pulse"})]},e)}const Be={Content:fr,Skeleton:gr};function Jt(t){const e=t.endDate.getTime()-t.startDate.getTime(),a=3600*1e3,r=25*a;return e<=a?"1m":e<=r?"1h":"1d"}function br(t,e){const a=new Date(t);return e==="1d"?a.toLocaleDateString([],{month:"short",day:"numeric"}):a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function jr(t,e){const a=new Date(t);return e==="1d"?(a.setHours(0,0,0,0),a):e==="1h"?(a.setMinutes(0,0,0),a):(a.setSeconds(0,0),a)}function Zt(t,e,a){const r=new Map(t.map(m=>[jr(new Date(m.timestamp),a).getTime(),m])),n=20,l=e.startDate.getTime(),c=(e.endDate.getTime()-l)/(n-1),o=[],d=[];for(let m=0;m<n;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:br(new Date(p).toISOString(),a),calls:0,errors:0,errorRate:0,avg:0,p50:0,p95:0})}const f=new Array(n).fill(0);for(const[m,p]of r){let x=0,b=Math.abs(m-d[0]);for(let v=1;v<d.length;v++){const g=Math.abs(m-d[v]);g<b&&(b=g,x=v)}const j=o[x];j.calls+=p.calls,j.errors+=p.errors,j.errorRate+=p.errorRate,j.avg+=p.avg,j.p50+=p.p50,j.p95=Math.max(j.p95,p.p95),f[x]++}for(let m=0;m<n;m++)f[m]>0&&(o[m].errorRate=o[m].errorRate/f[m],o[m].avg=o[m].avg/f[m],o[m].p50=o[m].p50/f[m]);return o}function _e(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ce(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Nr(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:Ce(t.avgDurationMs)}const yr=[{id:"calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",leaderboardMode:"requests",chartMetrics:["calls"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Tool Calls"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalCalls.toLocaleString()})]}),getNextMetric:()=>"calls"},{id:"latency",dataKey:t=>t==="latency-avg"?"avg":"p95",colorNum:4,barColor:"bg-chart-4",leaderboardMode:"latency",chartMetrics:["latency-avg","latency-p95"],renderTitle:(t,e)=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{className:fe("pb-0.5",e==="latency-avg"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{className:fe("pb-0.5",e==="latency-p95"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]}),getNextMetric:t=>t==="latency-avg"?"latency-p95":"latency-avg"},{id:"errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",leaderboardMode:"errors",chartMetrics:["errors"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalErrors.toLocaleString()})]}),getNextMetric:()=>"errors"}];function wr(t){const e=re.c(12),{metrics:a,connections:r,mode:n,barColor:l}=t;let i,c,o;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==n){o=Symbol.for("react.early_return_sentinel");e:{const f=new Map(a.map(Cr)),m=r??[];let p;e[7]!==n?(p=(j,v)=>_e(v.metric,n)-_e(j.metric,n),e[7]=n,e[8]=p):p=e[8];const x=m.map(j=>({connection:j,metric:f.get(j.id)})).filter(Sr).sort(p).slice(0,5),b=x[0]?.metric?_e(x[0].metric,n):1;if(x.length===0){o=null;break e}i="space-y-1.5 mt-2",c=x.map(j=>{const{connection:v,metric:g}=j,h=_e(g,n),u=b>0?Math.min(h/b*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ae,{icon:v.icon,name:v.title,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4!"}),s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-20",children:v.title}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",l),style:{width:`${u}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:Nr(g,n)})]},v.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=n,e[4]=i,e[5]=c,e[6]=o}else i=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let d;return e[9]!==i||e[10]!==c?(d=s.jsx("div",{className:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function Sr(t){return t.metric}function Cr(t){return[t.connectionId,t]}function Ir(t){const e=re.c(8),{displayDateRange:a,connectionIds:r,excludeConnectionIds:n,toolName:l,status:i,connections:c,isStreaming:o,selectedMetric:d,onMetricSelect:f}=t,m=Jt(a),p=o?He.streamingRefetchInterval:!1;let x;e[0]!==p?(x={refetchInterval:p},e[0]=p,e[1]=x):x=e[1];const{data:b}=Za({interval:m,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionIds:r.length>0?r:void 0,excludeConnectionIds:n,toolNames:l?[l]:void 0,status:i},x),j=b?{totalCalls:b.totalCalls,totalErrors:b.totalErrors,avgDurationMs:b.avgDurationMs,p95DurationMs:b.p95DurationMs,data:Zt(b.timeseries,a,m)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},v="border-b border-border";let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Tool Calls"})}),e[2]=g):g=e[2];const h="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",u=yr.map(N=>{const{id:P,dataKey:D,colorNum:I,barColor:M,leaderboardMode:L,chartMetrics:E,renderTitle:T,getNextMetric:C}=N,_=E.includes(d),O=()=>{f(_?C(d):E[0])};return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:O,children:[_&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${I})`}}),s.jsx(Ne,{title:T(j,d),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:j.data,dataKey:typeof D=="function"?D(d):D,colorNum:I,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(wr,{metrics:b?.connectionBreakdown??[],connections:c,mode:L,barColor:M})]})})]},P)});let y;e[3]!==u?(y=s.jsx("div",{className:h,children:u}),e[3]=u,e[4]=y):y=e[4];let S;return e[5]!==g||e[6]!==y?(S=s.jsxs("div",{className:v,children:[g,y]}),e[5]=g,e[6]=y,e[7]=S):S=e[7],S}const Xt=Object.assign(Ir,{Skeleton:fs});function Dr(t){const e=re.c(9),{topTools:a,barColor:r}=t;if(a.length===0)return null;const n=a[0]?.calls??1;let l;if(e[0]!==r||e[1]!==n||e[2]!==a){let c;e[4]!==r||e[5]!==n?(c=o=>{const{toolName:d,calls:f}=o,m=n>0?Math.min(f/n*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-24",children:d}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",r),style:{width:`${m}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:f.toLocaleString()})]},d)},e[4]=r,e[5]=n,e[6]=c):c=e[6],l=a.map(c),e[0]=r,e[1]=n,e[2]=a,e[3]=l}else l=e[3];let i;return e[7]!==l?(i=s.jsx("div",{className:"space-y-1.5 mt-2",children:l}),e[7]=l,e[8]=i):i=e[8],i}function Tr(t){const e=re.c(8),{displayDateRange:a,isStreaming:r,selectedMetric:n,onMetricSelect:l}=t,i=Jt(a),c=r?He.streamingRefetchInterval:!1;let o;e[0]!==c?(o={refetchInterval:c},e[0]=c,e[1]=o):o=e[1];const{data:d}=qt({interval:i,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString()},o),f=d?{totalCalls:d.totalCalls,totalErrors:d.totalErrors,avgDurationMs:d.avgDurationMs,p95DurationMs:d.p95DurationMs,data:Zt(d.timeseries,a,i)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},m=d?.topTools??[],p=[{id:"llm-calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",chartMetric:"llm-calls",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Usage"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalCalls.toLocaleString()})]})},{id:"llm-latency",dataKey:"avg",colorNum:4,barColor:"bg-chart-4",chartMetric:"llm-latency-avg",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]})},{id:"llm-errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",chartMetric:"llm-errors",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalErrors.toLocaleString()})]})}],x="border-b border-border";let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"AI Usage"})}),e[2]=b):b=e[2];const j="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",v=p.map(u=>{const{id:y,dataKey:S,colorNum:N,barColor:P,chartMetric:D,renderTitle:I}=u,M=n===D;return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:()=>l(D),children:[M&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${N})`}}),s.jsx(Ne,{title:I(),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:f.data,dataKey:S,colorNum:N,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(Dr,{topTools:m,barColor:P})]})})]},y)});let g;e[3]!==v?(g=s.jsx("div",{className:j,children:v}),e[3]=v,e[4]=g):g=e[4];let h;return e[5]!==b||e[6]!==g?(h=s.jsxs("div",{className:x,children:[b,g]}),e[5]=b,e[6]=g,e[7]=h):h=e[7],h}function kr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"border-b border-border",children:[e,s.jsx("div",{className:"grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",children:[...Array(3)].map(Mr)})]}),t[1]=a):a=t[1],a}function Mr(t,e){return s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-5 md:h-6 w-12 rounded bg-muted animate-pulse"})]}),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx("div",{className:"h-[30px] md:h-[40px] w-full rounded bg-muted animate-pulse"}),s.jsx("div",{className:"space-y-1.5 mt-2",children:Array.from({length:3}).map(_r)})]})},e)}function _r(t,e){return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"h-2.5 w-24 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-1.5 flex-1 bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-8 rounded bg-muted animate-pulse shrink-0"})]},e)}const Yt=Object.assign(Tr,{Skeleton:kr}),Pr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Ar({connectionIds:t,virtualMcpIds:e,tool:a,status:r,hideSystem:n,propertyFilters:l,connectionOptions:i,virtualMcpOptions:c,activeFiltersCount:o,onUpdateFilters:d}){const[f,m]=w.useState(!1),[p,x]=w.useState("raw"),[b,j]=w.useState(a),[v,g]=w.useState(l),[h,u]=w.useState(ke(l)),y=w.useRef(a),S=w.useRef(je(l));y.current!==a&&(y.current=a,b!==a&&j(a));const N=je(l);S.current!==N&&(S.current=N,g(l),u(ke(l)));const P=(T,C)=>{const _=[...v],O=_[T];O&&(_[T]={key:C.key??O.key,operator:C.operator??O.operator,value:C.value??O.value},g(_))},D=()=>{g([...v,{key:"",operator:"eq",value:""}])},I=T=>{const C=v.filter((_,O)=>O!==T);g(C),u(ke(C)),d({propertyFilters:je(C)})},M=()=>{d({propertyFilters:je(v)})},L=()=>{const T=Ze(h);g(T),d({propertyFilters:je(T)})},E=()=>{if(p==="raw"){const T=Ze(h);g(T),x("form")}else u(ke(v)),x("raw")};return s.jsxs(_t,{open:f,onOpenChange:m,children:[s.jsx(kt,{asChild:!0,children:s.jsxs(ue,{variant:"outline",size:"sm",children:[s.jsx(Es,{size:16}),"Filters",o>0&&s.jsx(Le,{variant:"default",className:"ml-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:o})]})}),s.jsx(Mt,{align:"end",className:"w-[320px]",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{children:s.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Gs,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),s.jsx(Us,{id:"hide-system-calls",checked:n,onCheckedChange:T=>d({hideSystem:!!T})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),s.jsx(ft,{options:i,defaultValue:t,onValueChange:T=>d({connectionId:T}),placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),s.jsx(ft,{options:c,defaultValue:e,onValueChange:T=>d({virtualMcpId:T}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),s.jsx(Oe,{id:"filter-tool",placeholder:"Filter by tool...",value:b,onChange:T=>j(T.target.value),onBlur:()=>{b!==a&&d({tool:b})},onKeyDown:T=>{T.key==="Enter"&&b!==a&&d({tool:b})},className:"w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),s.jsxs(tt,{value:r,onValueChange:T=>d({status:T}),children:[s.jsx(st,{className:"w-full",children:s.jsx(at,{})}),s.jsxs(rt,{children:[s.jsx(Me,{value:"all",children:"All Status"}),s.jsx(Me,{value:"success",children:"Success Only"}),s.jsx(Me,{value:"errors",children:"Errors Only"})]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),s.jsxs(Vs,{children:[s.jsx(Ws,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:E,children:p==="raw"?s.jsx(Os,{size:14}):s.jsx(Ls,{size:14})})}),s.jsx(Hs,{children:p==="raw"?"Switch to form view":"Switch to raw text"})]})]}),p==="raw"?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Fs,{placeholder:`Paste property filters here:
|
|
1
|
+
import{r as w,c5 as ss,c as re,y as fe,j as s,u as pe,E as Fe,x as as,e as Ve,v as rs,K as Pe,B as ue,w as Ee,O as gt,d as ns}from"./index-DJtnEPc7.js";import{C as ls}from"./collection-search-BeqmTWUU.js";import{P as xe}from"./index-qxqsMecG.js";import{B as vt,a as bt,b as jt,c as Nt}from"./breadcrumb-7YipRD-p.js";import{E as We}from"./empty-state-COoAU6KF.js";import{E as os,d as is,e as Je,b as cs,T as ds,M as He,p as ke,s as je,a as Ze}from"./time-range-picker-DKvAeQX-.js";import{I as Ae}from"./integration-icon-DrTDJ354.js";import{B as Le}from"./badge-7TJrkuyd.js";import{t as Re}from"./ChevronDown-CIjXFJfV.js";import{i as ms}from"./ChevronRight-DmvbXNWu.js";import{e as de,b as we,d as yt,T as wt,a as St,c as ne}from"./table-Cd-wCYBh.js";import{S as us,b as xs,H as Ne,M as fs,K as Ct}from"./monitoring-stats-row-Bk2P-uOc.js";import{a as Ie,u as De,W as ps}from"./constants-4hZfe-FX.js";import{u as Ue}from"./use-mcp-tools-CoXbW9dQ.js";import{i as hs}from"./DotsVertical-ZHHEIIAw.js";import{i as gs}from"./Edit05-DW3L1ev9.js";import{s as It}from"./Plus-CGe5wBcS.js";import{s as Dt}from"./Trash01-DPMbpRnj.js";import{C as vs}from"./connection-card-D3SNWej3.js";import{D as bs,a as js,b as Ns,c as Xe}from"./dropdown-menu-ur1Ui41o.js";import{f as ys,a as ws,b as Ss,c as Cs,d as Is,e as Ds,A as Ts,h as ks}from"./alert-dialog-BoQV9ycw.js";import{u as Ms}from"./use-infinite-scroll-BZWlWT4v.js";import{u as _s}from"./use-members-CKrsZLkR.js";import{u as Ps}from"./useSuspenseInfiniteQuery-lgWDbCQ9.js";import{b as Tt}from"./use-connection-2T7CNTjX.js";import{b as As}from"./use-virtual-mcp-B8_wDvx9.js";import{i as Ls}from"./Code01-Cq3-F_YX.js";import{n as $e}from"./Container-C_pBhYQm.js";import{i as Es}from"./FilterLines-BFSA7yHa.js";import{c as Os}from"./Grid01-BSBJv9eJ.js";import{I as Oe}from"./input-j_5WJy1c.js";import{C as Ye}from"./checkbox-BRXa8FNh.js";import{c as Rs,d as $s,e as et,a as zs,C as Ks,b as Bs}from"./command-DVQ8NWzo.js";import{P as kt,a as Mt,b as _t}from"./popover-B_9jK9T6.js";import{S as tt,a as st,b as at,c as rt,d as Me}from"./select-roICowiz.js";import{T as Fs}from"./textarea-BJkI1dfy.js";import{T as Vs,a as Ws,b as Hs}from"./tooltip-Bms1Xn3i.js";import{C as Pt}from"./collection-tabs-CBTc1SAx.js";import{S as Us}from"./switch-7_yekA3p.js";import{L as Gs}from"./label-Dmque-mN.js";import{c as Ge,s as At,d as qs,e as Lt,f as Et,g as Qs,i as Js,h as nt,p as Zs,r as Ot,D as Xs,u as Rt,R as Ys,S as ea,j as ta,k as $t,l as sa,n as aa,m as ra,o as na,q as la,t as oa,v as ia,Z as ca,L as da,G as ma,w as zt,x as lt,y as ot,z as ua,J as xa,A as ye,B as fa,E as pa,F as ha,H as ga,I as va,K as ba,C as it,a as ct}from"./chart-DtzgRcs7.js";import{g as ja,A as Na,D as ya,X as dt}from"./XAxis-BmVXiq6v.js";import"./Loading01-CSUxQOK0.js";import"./SearchMd-CrngVZhh.js";import"./useQuery-DLey6Pvf.js";import"./useMutation-D77LVetF.js";import"./Check-DsclgHfU.js";import"./Copy01-CFr3FQ5x.js";import"./Download01-CYaxYM2W.js";import"./Key01-yVAqC10q.js";import"./Play-D223AznW.js";import"./monaco-editor-BI48gu97.js";import"./spinner-qX5-Mz-A.js";import"./scroll-area-DXeQheGE.js";import"./ChevronUp-C8129itH.js";import"./Clock-CQzMyEYR.js";import"./ChevronLeft-tQ1_QiuA.js";import"./card-D9sP6AvS.js";import"./infiniteQueryObserver-DPmZK5SE.js";import"./use-collections-uyyRdHl8.js";import"./index-3d9-dYhc.js";import"./index-biN0aic_.js";import"./index-B5Wny992.js";const ze=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));ze.displayName="BarChart07";const Kt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Kt.displayName="PauseCircle";const Bt=({size:t=24,color:e="currentColor",...a})=>w.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...a},w.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),w.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Bt.displayName="PlayCircle";var Ft=(t,e,a,r)=>Lt(t,"xAxis",e,r),Vt=(t,e,a,r)=>Et(t,"xAxis",e,r),Wt=(t,e,a,r)=>Lt(t,"yAxis",a,r),Ht=(t,e,a,r)=>Et(t,"yAxis",a,r),wa=Ge([At,Ft,Wt,Vt,Ht],(t,e,a,r,n)=>Js(t,"xAxis")?nt(e,r,!1):nt(a,n,!1)),Sa=(t,e,a,r,n)=>n;function Ca(t){return t.type==="line"}var Ia=Ge([Qs,Sa],(t,e)=>t.filter(Ca).find(a=>a.id===e)),Da=Ge([At,Ft,Wt,Vt,Ht,Ia,wa,qs],(t,e,a,r,n,l,i,c)=>{var{chartData:o,dataStartIndex:d,dataEndIndex:f}=c;if(!(l==null||e==null||a==null||r==null||n==null||r.length===0||n.length===0||i==null||t!=="horizontal"&&t!=="vertical")){var{dataKey:m,data:p}=l,x;if(p!=null&&p.length>0?x=p:x=o?.slice(d,f+1),x!=null)return Ga({layout:t,xAxis:e,yAxis:a,xAxisTicks:r,yAxisTicks:n,dataKey:m,bandSize:i,displayedData:x})}}),Ta=["id"],ka=["type","layout","connectNulls","needClip","shape"],Ma=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Se(){return Se=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var r in a)({}).hasOwnProperty.call(a,r)&&(t[r]=a[r])}return t},Se.apply(null,arguments)}function mt(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),a.push.apply(a,r)}return a}function me(t){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(a),!0).forEach(function(r){_a(t,r,a[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):mt(Object(a)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(a,r))})}return t}function _a(t,e,a){return(e=Pa(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function Pa(t){var e=Aa(t,"string");return typeof e=="symbol"?e:e+""}function Aa(t,e){if(typeof t!="object"||!t)return t;var a=t[Symbol.toPrimitive];if(a!==void 0){var r=a.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qe(t,e){if(t==null)return{};var a,r,n=La(t,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);for(r=0;r<l.length;r++)a=l[r],e.indexOf(a)===-1&&{}.propertyIsEnumerable.call(t,a)&&(n[a]=t[a])}return n}function La(t,e){if(t==null)return{};var a={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;a[r]=t[r]}return a}var Ea=t=>{var{dataKey:e,name:a,stroke:r,legendType:n,hide:l}=t;return[{inactive:l,dataKey:e,type:n,color:r,value:$t(a,e),payload:t}]},Oa=w.memo(t=>{var{dataKey:e,data:a,stroke:r,strokeWidth:n,fill:l,name:i,hide:c,unit:o,tooltipType:d,id:f}=t,m={dataDefinedOnItem:a,getPosition:aa,settings:{stroke:r,strokeWidth:n,fill:l,dataKey:e,nameKey:void 0,name:$t(i,e),hide:c,type:d,color:r,unit:o,graphicalItemId:f}};return w.createElement(sa,{tooltipEntrySettings:m})}),Ut=(t,e)=>"".concat(e,"px ").concat(t,"px");function Ra(t,e){for(var a=t.length%2!==0?[...t,0]:t,r=[],n=0;n<e;++n)r.push(...a);return r}var $a=(t,e,a)=>{var r=a.reduce((p,x)=>p+x,0);if(!r)return Ut(e,t);for(var n=Math.floor(t/r),l=t%r,i=[],c=0,o=0;c<a.length;o+=(d=a[c])!==null&&d!==void 0?d:0,++c){var d,f=a[c];if(f!=null&&o+f>l){i=[...a.slice(0,c),l-o];break}}var m=i.length%2===0?[0,e]:[e];return[...Ra(a,n),...i,...m].map(p=>"".concat(p,"px")).join(", ")};function za(t){var{clipPathId:e,points:a,props:r}=t,{dot:n,dataKey:l,needClip:i}=r,{id:c}=r,o=qe(r,Ta),d=ga(o);return w.createElement(ya,{points:a,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:d,needClip:i,clipPathId:e})}function Ka(t){var{showLabels:e,children:a,points:r}=t,n=w.useMemo(()=>r?.map(l=>{var i,c,o={x:(i=l.x)!==null&&i!==void 0?i:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return me(me({},o),{},{value:l.value,payload:l.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[r]);return w.createElement(pa,{value:e?n:void 0},a)}function ut(t){var{clipPathId:e,pathRef:a,points:r,strokeDasharray:n,props:l}=t,{type:i,layout:c,connectNulls:o,needClip:d,shape:f}=l,m=qe(l,ka),p=me(me({},ha(m)),{},{fill:"none",className:"recharts-line-curve",clipPath:d?"url(#clipPath-".concat(e,")"):void 0,points:r,type:i,layout:c,connectNulls:o,strokeDasharray:n??l.strokeDasharray});return w.createElement(w.Fragment,null,r?.length>1&&w.createElement(xs,Se({shapeType:"curve",option:f},p,{pathRef:a})),w.createElement(za,{points:r,clipPathId:e,props:l}))}function Ba(t){try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch{return 0}}function Fa(t){var{clipPathId:e,props:a,pathRef:r,previousPointsRef:n,longestAnimatedLengthRef:l}=t,{points:i,strokeDasharray:c,isAnimationActive:o,animationBegin:d,animationDuration:f,animationEasing:m,animateNewValues:p,width:x,height:b,onAnimationEnd:j,onAnimationStart:v}=a,g=n.current,h=ua(i,"recharts-line-"),u=w.useRef(h),[y,S]=w.useState(!1),N=!y,P=w.useCallback(()=>{typeof j=="function"&&j(),S(!1)},[j]),D=w.useCallback(()=>{typeof v=="function"&&v(),S(!0)},[v]),I=Ba(r.current),M=w.useRef(0);u.current!==h&&(M.current=l.current,u.current=h);var L=M.current;return w.createElement(Ka,{points:i,showLabels:N},a.children,w.createElement(xa,{animationId:h,begin:d,duration:f,isActive:o,easing:m,onAnimationEnd:P,onAnimationStart:D,key:h},E=>{var T=ye(L,I+L,E),C=Math.min(T,I),_;if(o)if(c){var O="".concat(c).split(/[,\s]+/gim).map(K=>parseFloat(K));_=$a(C,I,O)}else _=Ut(I,C);else _=c==null?void 0:String(c);if(E>0&&I>0&&(n.current=i,l.current=Math.max(l.current,C)),g){var F=g.length/i.length,W=E===1?i:i.map((K,z)=>{var A=Math.floor(z*F);if(g[A]){var k=g[A];return me(me({},K),{},{x:ye(k.x,K.x,E),y:ye(k.y,K.y,E)})}return p?me(me({},K),{},{x:ye(x*2,K.x,E),y:ye(b/2,K.y,E)}):me(me({},K),{},{x:K.x,y:K.y})});return n.current=W,w.createElement(ut,{props:a,points:W,clipPathId:e,pathRef:r,strokeDasharray:_})}return w.createElement(ut,{props:a,points:i,clipPathId:e,pathRef:r,strokeDasharray:_})}),w.createElement(fa,{label:a.label}))}function Va(t){var{clipPathId:e,props:a}=t,r=w.useRef(null),n=w.useRef(0),l=w.useRef(null);return w.createElement(Fa,{props:a,clipPathId:e,previousPointsRef:r,longestAnimatedLengthRef:n,pathRef:l})}var Wa=(t,e)=>{var a,r;return{x:(a=t.x)!==null&&a!==void 0?a:void 0,y:(r=t.y)!==null&&r!==void 0?r:void 0,value:t.value,errorVal:zt(t.payload,e)}};class Ha extends w.Component{render(){var{hide:e,dot:a,points:r,className:n,xAxisId:l,yAxisId:i,top:c,left:o,width:d,height:f,id:m,needClip:p,zIndex:x}=this.props;if(e)return null;var b=ss("recharts-line",n),j=m,{r:v,strokeWidth:g}=ja(a),h=ia(a),u=v*2+g,y=p?"url(#clipPath-".concat(h?"":"dots-").concat(j,")"):void 0;return w.createElement(ca,{zIndex:x},w.createElement(da,{className:b},p&&w.createElement("defs",null,w.createElement(ma,{clipPathId:j,xAxisId:l,yAxisId:i}),!h&&w.createElement("clipPath",{id:"clipPath-dots-".concat(j)},w.createElement("rect",{x:o-u/2,y:c-u/2,width:d+u,height:f+u}))),w.createElement(us,{xAxisId:l,yAxisId:i,data:r,dataPointFormatter:Wa,errorBarOffset:0},w.createElement(Va,{props:this.props,clipPathId:j}))),w.createElement(Na,{activeDot:this.props.activeDot,points:r,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:y}))}}var Gt={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Xs.line,type:"linear"};function Ua(t){var e=Ot(t,Gt),{activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,connectNulls:c,dot:o,hide:d,isAnimationActive:f,label:m,legendType:p,xAxisId:x,yAxisId:b,id:j}=e,v=qe(e,Ma),{needClip:g}=ra(x,b),h=na(),u=la(),y=Rt(),S=oa(M=>Da(M,x,b,y,j));if(u!=="horizontal"&&u!=="vertical"||S==null||h==null)return null;var{height:N,width:P,x:D,y:I}=h;return w.createElement(Ha,Se({},v,{id:j,connectNulls:c,dot:o,activeDot:a,animateNewValues:r,animationBegin:n,animationDuration:l,animationEasing:i,isAnimationActive:f,hide:d,label:m,legendType:p,xAxisId:x,yAxisId:b,points:S,layout:u,height:N,width:P,left:D,top:I,needClip:g}))}function Ga(t){var{layout:e,xAxis:a,yAxis:r,xAxisTicks:n,yAxisTicks:l,dataKey:i,bandSize:c,displayedData:o}=t;return o.map((d,f)=>{var m=zt(d,i);if(e==="horizontal"){var p=lt({axis:a,ticks:n,bandSize:c,entry:d,index:f}),x=ot(m)?null:r.scale.map(m);return{x:p,y:x??null,value:m,payload:d}}var b=ot(m)?null:a.scale.map(m),j=lt({axis:r,ticks:l,bandSize:c,entry:d,index:f});return b==null||j==null?null:{x:b,y:j,value:m,payload:d}}).filter(Boolean)}function qa(t){var e=Ot(t,Gt),a=Rt();return w.createElement(Ys,{id:e.id,type:"line"},r=>w.createElement(w.Fragment,null,w.createElement(ea,{legendPayload:Ea(e)}),w.createElement(Oa,{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:r}),w.createElement(ta,{type:"line",id:r,data:e.data,xAxisId:e.xAxisId,yAxisId:e.yAxisId,zAxisId:0,dataKey:e.dataKey,hide:e.hide,isPanorama:a}),w.createElement(Ua,Se({},e,{id:r}))))}var Ke=w.memo(qa,Zs);Ke.displayName="Line";var Qa=["axis"],xt=w.forwardRef((t,e)=>w.createElement(va,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Qa,tooltipPayloadSearcher:ba,categoricalChartProps:t,ref:e}));function Ja(t){const e=re.c(49),{log:a,isExpanded:r,connection:n,virtualMcpName:l,onToggle:i,lastLogRef:c}=t;let o,d;if(e[0]!==a.timestamp){const C=new Date(a.timestamp);o=C.toLocaleDateString("en-US",{month:"short",day:"numeric"}),d=C.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=a.timestamp,e[1]=o,e[2]=d}else o=e[1],d=e[2];const f=d,m=r?"bg-muted/30 hover:bg-accent/80":"hover:bg-muted/40";let p;e[3]!==m?(p=fe("h-14 md:h-16 transition-colors cursor-pointer",m),e[3]=m,e[4]=p):p=e[4];let x;e[5]!==r?(x=s.jsx(de,{className:"w-10 md:w-12 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:r?s.jsx(Re,{size:16,className:"text-muted-foreground"}):s.jsx(ms,{size:16,className:"text-muted-foreground"})})}),e[5]=r,e[6]=x):x=e[6];const b=n?.icon||null;let j;e[7]!==a.connectionTitle||e[8]!==b?(j=s.jsx(de,{className:"w-12 md:w-16 px-2 md:px-4",children:s.jsx("div",{className:"flex items-center justify-center",children:s.jsx(Ae,{icon:b,name:a.connectionTitle,size:"xs",className:"shadow-sm"})})}),e[7]=a.connectionTitle,e[8]=b,e[9]=j):j=e[9];let v;e[10]!==a.toolName?(v=s.jsx("div",{className:"text-xs font-medium text-foreground truncate block",children:a.toolName}),e[10]=a.toolName,e[11]=v):v=e[11];let g;e[12]!==a.connectionTitle?(g=s.jsx("div",{className:"text-xs text-muted-foreground truncate block",children:a.connectionTitle}),e[12]=a.connectionTitle,e[13]=g):g=e[13];let h;e[14]!==v||e[15]!==g?(h=s.jsxs(de,{className:"min-w-0 pr-2 md:pr-4",children:[v,g]}),e[14]=v,e[15]=g,e[16]=h):h=e[16];let u;e[17]!==l?(u=s.jsx(de,{className:"w-24 md:w-32 px-2 md:px-3 text-xs text-muted-foreground",children:s.jsx("div",{className:"truncate",children:l})}),e[17]=l,e[18]=u):u=e[18];let y;e[19]!==a.userName?(y=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:a.userName}),e[19]=a.userName,e[20]=y):y=e[20];let S;e[21]!==o?(S=s.jsx(de,{className:"w-20 md:w-24 px-2 md:px-3 text-xs text-muted-foreground",children:o}),e[21]=o,e[22]=S):S=e[22];let N;e[23]!==f?(N=s.jsx(de,{className:"w-20 md:w-28 px-2 md:px-3 text-xs text-muted-foreground",children:f}),e[23]=f,e[24]=N):N=e[24];let P;e[25]!==a.durationMs?(P=s.jsxs(de,{className:"w-16 md:w-20 px-2 md:px-3 text-xs text-muted-foreground font-mono text-right",children:[a.durationMs,"ms"]}),e[25]=a.durationMs,e[26]=P):P=e[26];const D=a.isError?"destructive":"success",I=a.isError?"Error":"OK";let M;e[27]!==D||e[28]!==I?(M=s.jsx(de,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"flex items-center justify-end",children:s.jsx(Le,{variant:D,className:"text-xs px-1.5 md:px-2 py-0.5 md:py-1",children:I})})}),e[27]=D,e[28]=I,e[29]=M):M=e[29];let L;e[30]!==c||e[31]!==i||e[32]!==u||e[33]!==y||e[34]!==S||e[35]!==N||e[36]!==P||e[37]!==M||e[38]!==p||e[39]!==x||e[40]!==j||e[41]!==h?(L=s.jsxs(we,{ref:c,className:p,onClick:i,children:[x,j,h,u,y,S,N,P,M]}),e[30]=c,e[31]=i,e[32]=u,e[33]=y,e[34]=S,e[35]=N,e[36]=P,e[37]=M,e[38]=p,e[39]=x,e[40]=j,e[41]=h,e[42]=L):L=e[42];let E;e[43]!==r||e[44]!==a?(E=r&&s.jsx(we,{children:s.jsx(de,{colSpan:9,className:"p-0",children:s.jsx(os,{log:a})})}),e[43]=r,e[44]=a,e[45]=E):E=e[45];let T;return e[46]!==L||e[47]!==E?(T=s.jsxs(w.Fragment,{children:[L,E]}),e[46]=L,e[47]=E,e[48]=T):T=e[48],T}const Qe="decopilot";function Za(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:Xa},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function Xa(t){return t.structuredContent??t}function Ya(t,e){const a=re.c(13),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]!==t.excludeConnectionIds?(i=t.excludeConnectionIds??[],a[2]=t.excludeConnectionIds,a[3]=i):i=a[3];let c;a[4]!==i?(c=[Qe,...i],a[4]=i,a[5]=c):c=a[5];let o;a[6]!==t||a[7]!==c?(o={...t,excludeConnectionIds:c},a[6]=t,a[7]=c,a[8]=o):o=a[8];let d;return a[9]!==l||a[10]!==e||a[11]!==o?(d={client:l,toolName:"MONITORING_STATS",toolArguments:o,staleTime:3e4,...e,select:er},a[9]=l,a[10]=e,a[11]=o,a[12]=d):d=a[12],Ue(d)}function er(t){return t.structuredContent??t}function qt(t,e){const a=re.c(9),{org:r}=pe();let n;a[0]!==r.id?(n={connectionId:Ie,orgId:r.id},a[0]=r.id,a[1]=n):n=a[1];const l=De(n);let i;a[2]===Symbol.for("react.memo_cache_sentinel")?(i=[Qe],a[2]=i):i=a[2];let c;a[3]!==t?(c={...t,connectionIds:i,topN:5},a[3]=t,a[4]=c):c=a[4];let o;return a[5]!==l||a[6]!==e||a[7]!==c?(o={client:l,toolName:"MONITORING_STATS",toolArguments:c,staleTime:3e4,...e,select:tr},a[5]=l,a[6]=e,a[7]=c,a[8]=o):o=a[8],Ue(o)}function tr(t){return t.structuredContent??t}function sr(){const{org:t,project:e,locator:a}=pe(),r=as(),n=Ve(),l=De({connectionId:Ie,orgId:t.id}),[i,c]=w.useState(null),[o,d]=w.useState(!1),[f,m]=w.useState(!1),{data:p}=rs({queryKey:Pe.monitoringDashboards(a),queryFn:async()=>{if(!l)throw new Error("MCP client is not available");const h=await l.callTool({name:"MONITORING_DASHBOARD_LIST",arguments:{}});return h.structuredContent??h}}),x=p?.dashboards??[],b=async()=>{if(l){m(!0);try{const h=await l.callTool({name:"MONITORING_DASHBOARD_CREATE",arguments:{name:"Untitled Dashboard",widgets:[{id:crypto.randomUUID(),name:"New Widget",type:"metric",source:{path:"$.usage.total_tokens",from:"output"},aggregation:{fn:"sum"}}]}}),u=(h.structuredContent??h).id;r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)}),n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:u}})}catch(h){Ee.error("Failed to create dashboard"),console.error(h)}finally{m(!1)}}},j=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId",params:{org:t.slug,project:e.slug,dashboardId:h}})},v=h=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:t.slug,project:e.slug,dashboardId:h}})},g=async h=>{if(l){d(!0);try{await l.callTool({name:"MONITORING_DASHBOARD_DELETE",arguments:{id:h}}),Ee.success("Dashboard deleted"),r.invalidateQueries({queryKey:Pe.monitoringDashboards(a)})}catch(u){Ee.error("Failed to delete dashboard"),console.error(u)}finally{d(!1),c(null)}}};return s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[x.length===0?s.jsx(We,{title:"No dashboards yet",description:"Create a dashboard to aggregate and visualize your monitoring data",image:s.jsx(ze,{size:48,className:"text-muted-foreground/50"}),actions:s.jsxs(ue,{onClick:b,size:"sm",disabled:f,children:[s.jsx(It,{size:16,className:"mr-1.5"}),"Create Dashboard"]})}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:x.map(h=>s.jsx(vs,{connection:{id:h.id,title:h.name,description:h.description},fallbackIcon:s.jsx(ze,{}),onClick:()=>j(h.id),headerActions:s.jsxs(bs,{children:[s.jsx(js,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:u=>u.stopPropagation(),children:s.jsx(hs,{size:20})})}),s.jsxs(Ns,{align:"end",onClick:u=>u.stopPropagation(),children:[s.jsxs(Xe,{onClick:()=>v(h.id),children:[s.jsx(gs,{size:16}),"Edit"]}),s.jsxs(Xe,{onClick:()=>c(h.id),className:"text-destructive",children:[s.jsx(Dt,{size:16}),"Delete"]})]})]}),footer:s.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[s.jsxs("span",{children:[h.widgets.length," widget",h.widgets.length!==1?"s":""]}),s.jsx("span",{children:"·"}),s.jsx("span",{children:new Date(h.createdAt).toLocaleDateString()})]})},h.id))}),s.jsx(ys,{open:!!i,onOpenChange:()=>c(null),children:s.jsxs(ws,{children:[s.jsxs(Ss,{children:[s.jsx(Cs,{children:"Delete Dashboard"}),s.jsx(Is,{children:"Are you sure you want to delete this dashboard? This action cannot be undone."})]}),s.jsxs(Ds,{children:[s.jsx(Ts,{disabled:o,children:"Cancel"}),s.jsx(ks,{disabled:o,onClick:()=>i&&g(i),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:o?"Deleting...":"Delete"})]})]})})]})}function ar(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex items-center justify-between mb-6",children:[s.jsxs("div",{children:[s.jsx("div",{className:"h-6 w-40 bg-muted rounded animate-pulse"}),s.jsx("div",{className:"h-4 w-64 bg-muted rounded animate-pulse mt-2"})]}),s.jsx("div",{className:"h-8 w-32 bg-muted rounded animate-pulse"})]}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[e,s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[1,2,3].map(rr)})]}),t[1]=a):a=t[1],a}function rr(t){return s.jsxs("div",{className:"border rounded-lg p-4",children:[s.jsx("div",{className:"h-5 w-32 bg-muted rounded animate-pulse mb-2"}),s.jsx("div",{className:"h-4 w-full bg-muted rounded animate-pulse mb-3"}),s.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]},t)}function nr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboards"}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Fe,{fallback:e,children:s.jsx(w.Suspense,{fallback:s.jsx(ar,{}),children:s.jsx(sr,{})})}),t[1]=a):a=t[1],a}function ft(t){const e=re.c(72),{options:a,onValueChange:r,defaultValue:n,placeholder:l,variant:i,animation:c,maxCount:o,modalPopover:d,asChild:f,className:m,disabled:p}=t;let x;e[0]!==n?(x=n===void 0?[]:n,e[0]=n,e[1]=x):x=e[1];const b=x,j=l===void 0?"Select items":l,v=i===void 0?"default":i,g=c===void 0?0:c,h=o===void 0?3:o,u=d===void 0?!1:d,y=f===void 0?!1:f,S=p===void 0?!1:p,[N,P]=w.useState(b),[D,I]=w.useState(!1);let M,L;e[2]!==b||e[3]!==N?(M=()=>{JSON.stringify(N)!==JSON.stringify(b)&&P(b)},L=[b,N],e[2]=b,e[3]=N,e[4]=M,e[5]=L):(M=e[4],L=e[5]),w.useEffect(M,L);let E;e[6]!==r||e[7]!==N?(E=Q=>{if(Q.key==="Enter")I(!0);else if(Q.key==="Backspace"&&!Q.currentTarget.value){const ee=[...N];ee.pop(),P(ee),r(ee)}},e[6]=r,e[7]=N,e[8]=E):E=e[8];const T=E;let C;e[9]!==r||e[10]!==N?(C=Q=>{const ee=N.includes(Q.value)?N.filter(ie=>ie!==Q.value):[...N,Q.value];P(ee),r(ee)},e[9]=r,e[10]=N,e[11]=C):C=e[11];const _=C;let O;e[12]!==r?(O=()=>{P([]),r([])},e[12]=r,e[13]=O):O=e[13];const F=O;let W;e[14]===Symbol.for("react.memo_cache_sentinel")?(W=()=>{I(cr)},e[14]=W):W=e[14];const K=W;let z;e[15]!==F||e[16]!==r||e[17]!==a||e[18]!==N.length?(z=()=>{if(N.length===a.length)F();else{const Q=a.map(ir);P(Q),r(Q)}},e[15]=F,e[16]=r,e[17]=a,e[18]=N.length,e[19]=z):z=e[19];const A=z;let k;e[20]!==y?(k=y?{}:{variant:"outline"},e[20]=y,e[21]=k):k=e[21];let R;e[22]!==m?(R=fe("border-input data-[placeholder]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full max-w-xs items-center justify-between gap-2 rounded-xl border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 h-10 min-h-10",m),e[22]=m,e[23]=R):R=e[23];let $;e[24]!==g||e[25]!==h||e[26]!==a||e[27]!==j||e[28]!==N||e[29]!==v?($=N.length>0?s.jsxs("div",{className:"flex items-center justify-between w-full min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[N.slice(0,h).map(Q=>{const ee=a.find(ce=>ce.value===Q),ie=ee?.icon;return s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"max-w-24",style:{animationDuration:`${g}s`},children:[ie&&s.jsx(ie,{className:"h-3 w-3 shrink-0"}),s.jsx("span",{className:"truncate",children:ee?.label})]},Q)}),N.length>h&&s.jsxs(Le,{variant:v==="default"?"default":"secondary",className:"flex-shrink-0",style:{animationDuration:`${g}s`},children:["+",N.length-h]})]}),s.jsx("div",{className:"flex items-center shrink-0 ml-2",children:s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsx("span",{className:"text-sm text-muted-foreground",children:j}),s.jsx(Re,{size:20,className:"shrink-0 opacity-50"})]}),e[24]=g,e[25]=h,e[26]=a,e[27]=j,e[28]=N,e[29]=v,e[30]=$):$=e[30];let q;e[31]!==S||e[32]!==k||e[33]!==R||e[34]!==$?(q=s.jsx(kt,{asChild:!0,children:s.jsx(ue,{ref:null,...k,onClick:K,className:R,disabled:S,children:$})}),e[31]=S,e[32]=k,e[33]=R,e[34]=$,e[35]=q):q=e[35];let te;e[36]===Symbol.for("react.memo_cache_sentinel")?(te=()=>I(!1),e[36]=te):te=e[36];let Z;e[37]!==T?(Z=s.jsx(Rs,{placeholder:"Search...",onKeyDown:T,className:"rounded-t-xl"}),e[37]=T,e[38]=Z):Z=e[38];let V;e[39]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx($s,{children:"No results found."}),e[39]=V):V=e[39];let U;e[40]!==A?(U=()=>{A()},e[40]=A,e[41]=U):U=e[41];let G;e[42]!==A?(G=Q=>{Q.stopPropagation(),A()},e[42]=A,e[43]=G):G=e[43];const J=N.length===a.length&&a.length>0;let B;e[44]!==J||e[45]!==A?(B=s.jsx(Ye,{checked:J,onCheckedChange:A,className:"mr-2 [&_svg]:!text-primary-foreground",onClick:or}),e[44]=J,e[45]=A,e[46]=B):B=e[46];let X;e[47]===Symbol.for("react.memo_cache_sentinel")?(X=s.jsx("span",{children:"(Select All)"}),e[47]=X):X=e[47];let H;e[48]!==G||e[49]!==B?(H=s.jsxs("div",{className:"flex items-center w-full",onClick:G,children:[B,X]}),e[48]=G,e[49]=B,e[50]=H):H=e[50];let se;e[51]!==U||e[52]!==H?(se=s.jsx(et,{onSelect:U,className:"cursor-pointer",children:H},"all"),e[51]=U,e[52]=H,e[53]=se):se=e[53];let ae;if(e[54]!==a||e[55]!==N||e[56]!==_){let Q;e[58]!==N||e[59]!==_?(Q=ee=>{const ie=N.includes(ee.value);return s.jsx(et,{onSelect:()=>{_(ee)},className:"cursor-pointer",children:s.jsxs("div",{className:"flex items-center w-full",onClick:ce=>{ce.stopPropagation(),_(ee)},children:[s.jsx(Ye,{checked:ie,onCheckedChange:()=>{_(ee)},className:"mr-2 [&_svg]:!text-primary-foreground",onClick:lr}),ee.icon&&s.jsx(ee.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),s.jsx("span",{children:ee.label})]})},ee.value)},e[58]=N,e[59]=_,e[60]=Q):Q=e[60],ae=a.map(Q),e[54]=a,e[55]=N,e[56]=_,e[57]=ae}else ae=e[57];let Y;e[61]!==se||e[62]!==ae?(Y=s.jsxs(zs,{className:"rounded-b-xl",children:[V,s.jsxs(Ks,{children:[se,ae]})]}),e[61]=se,e[62]=ae,e[63]=Y):Y=e[63];let le;e[64]!==Z||e[65]!==Y?(le=s.jsx(Mt,{className:"w-auto p-0 max-w-xs rounded-xl",align:"start",onEscapeKeyDown:te,children:s.jsxs(Bs,{className:"rounded-xl",children:[Z,Y]})}),e[64]=Z,e[65]=Y,e[66]=le):le=e[66];let oe;return e[67]!==D||e[68]!==u||e[69]!==q||e[70]!==le?(oe=s.jsxs(_t,{open:D,onOpenChange:I,modal:u,children:[q,le]}),e[67]=D,e[68]=u,e[69]=q,e[70]=le,e[71]=oe):oe=e[71],oe}function lr(t){return t.stopPropagation()}function or(t){return t.stopPropagation()}function ir(t){return t.value}function cr(t){return!t}function Qt(t,e){return e==="1d"?t.toLocaleDateString([],{month:"short",day:"numeric"}):t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function dr(t,e,a,r,n){const l=t.map(u=>u.toolName),i=new Map,c=20,o=a.getTime(),f=(r.getTime()-o)/(c-1);for(let u=0;u<c;u++){const y=Math.round(o+u*f),S=new Date(y);i.set(String(y),{t:S.toISOString(),ts:y,label:Qt(S,n),tools:new Map})}const m=[...i.keys()].map(Number).sort((u,y)=>u-y);for(const u of e){const y=u.timestamp.includes("T")?u.timestamp:u.timestamp.replace(" ","T"),S=new Date(y).getTime();let N=m[0],P=Math.abs(S-N);for(const M of m){const L=Math.abs(S-M);L<P&&(P=L,N=M)}const D=i.get(String(N)),I=D.tools.get(u.toolName);I?D.tools.set(u.toolName,{calls:I.calls+u.calls,errors:I.errors+u.errors,avg:(I.avg*I.calls+u.avg*u.calls)/(I.calls+u.calls),p95:Math.max(I.p95,u.p95)}):D.tools.set(u.toolName,{calls:u.calls,errors:u.errors,avg:u.avg,p95:u.p95})}const p=[...i.values()].sort((u,y)=>u.ts-y.ts),x=[],b=[],j=[],v=[];for(const u of p){const y={t:u.t,ts:u.ts,label:u.label},S={...y},N={...y},P={...y},D={...y};for(const I of l){const M=u.tools.get(I)??{calls:0,errors:0,avg:0,p95:0};S[I]=M.calls,D[I]=M.errors,N[I]=Math.round(M.avg),P[I]=Math.round(M.p95)}x.push(S),b.push(N),j.push(P),v.push(D)}const g={},h=new Map;return t.forEach((u,y)=>{const N=`var(--chart-${y%5+1})`;h.set(u.toolName,N),g[u.toolName]={label:u.toolName,color:N}}),{callsBuckets:x,latencyAvgBuckets:b,latencyP95Buckets:j,errorsBuckets:v,chartConfig:g,toolColors:h}}function mr(t,e){let a=0,r=Math.abs(t-e[0]);for(let n=1;n<e.length;n++){const l=Math.abs(t-e[n]);l<r&&(r=l,a=n)}return a}function ur(t,e,a,r){const l=e.getTime(),c=(a.getTime()-l)/19,o=[],d=[];for(let m=0;m<20;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:Qt(new Date(p),r),calls:0,errors:0,avg:0,p95:0})}const f=new Array(20).fill(0);for(const m of t){const p=new Date(m.timestamp).getTime(),x=mr(p,d),b=o[x];b.calls+=m.calls,b.errors+=m.errors,b.avg+=m.avg,b.p95=Math.max(b.p95,m.p95),f[x]++}for(let m=0;m<20;m++)f[m]>0&&(o[m].avg=o[m].avg/f[m]);return o}const pt={calls:"Top Tools — Calls","latency-avg":"Top Tools — Average Latency","latency-p95":"Top Tools — P95 Latency",errors:"Top Tools — Errors","llm-calls":"AI Usage","llm-latency-avg":"AI Latency","llm-latency-p95":"AI P95 Latency","llm-errors":"AI Errors"};function xr(t){return t.startsWith("llm-")}function ht(t,e){return e==="latency-avg"||e==="latency-p95"||e==="llm-latency-avg"||e==="llm-latency-p95"?t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`:String(t)}function fr(t){const e=re.c(34),{metricsMode:a,dateRange:r,connectionIds:n,excludeConnectionIds:l,toolName:i,status:c,isStreaming:o,streamingRefetchInterval:d}=t,{org:f}=pe(),m=Ve(),p=Tt()??[],x=r;if(!x)throw new Error("TopTools requires an explicit date range");const b=new Date(x.startDate),j=new Date(x.endDate),v=j.getTime()-b.getTime(),g=v<=36e5?"1m":v<=9e7?"1h":"1d",h=xr(a),u=n?.length?n:void 0;let y;e[0]!==i?(y=i?[i]:void 0,e[0]=i,e[1]=y):y=e[1];let S;e[2]!==x.endDate||e[3]!==x.startDate||e[4]!==l||e[5]!==g||e[6]!==c||e[7]!==u||e[8]!==y?(S={interval:g,startDate:x.startDate,endDate:x.endDate,topN:10,connectionIds:u,excludeConnectionIds:l,toolNames:y,status:c},e[2]=x.endDate,e[3]=x.startDate,e[4]=l,e[5]=g,e[6]=c,e[7]=u,e[8]=y,e[9]=S):S=e[9];const N=o?d:!1;let P;e[10]!==N?(P={refetchInterval:N},e[10]=N,e[11]=P):P=e[11];const{data:D}=Ya(S,P);let I;e[12]!==x.endDate||e[13]!==x.startDate||e[14]!==g?(I={interval:g,startDate:x.startDate,endDate:x.endDate},e[12]=x.endDate,e[13]=x.startDate,e[14]=g,e[15]=I):I=e[15];const M=o?d:!1;let L;e[16]!==M?(L={refetchInterval:M},e[16]=M,e[17]=L):L=e[17];const{data:E}=qt(I,L),T=D?.topTools??[],{callsBuckets:C,latencyAvgBuckets:_,latencyP95Buckets:O,errorsBuckets:F,chartConfig:W,toolColors:K}=dr(T,D?.topToolsTimeseries??[],b,j,g),z=ur(E?.timeseries??[],b,j,g),A=a==="llm-latency-avg"?"avg":a==="llm-latency-p95"?"p95":a==="llm-errors"?"errors":"calls",k=a==="latency-avg"?_:a==="latency-p95"?O:a==="errors"?F:C,R=new Map(p.map(hr));let $;e[18]!==m||e[19]!==f.slug?($=()=>{m({to:"/$org/$project/monitoring",params:{org:f.slug,project:gt}})},e[18]=m,e[19]=f.slug,e[20]=$):$=e[20];const q=$;if(h){let V;e[21]!==A?(V={label:A,color:"var(--chart-1)"},e[21]=A,e[22]=V):V=e[22];let U;e[23]!==A||e[24]!==V?(U={[A]:V},e[23]=A,e[24]=V,e[25]=U):U=e[25];const G=U,J=pt[a];let B;e[26]!==J?(B=s.jsx("div",{className:"flex flex-col gap-1.5",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:J})}),e[26]=J,e[27]=B):B=e[27];const X=(E?.timeseries?.length??0)===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No AI activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:G,children:s.jsxs(xt,{data:z,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:se=>{const{active:ae,payload:Y}=se;if(!ae||!Y||Y.length===0)return null;const le=Y[0]&&typeof Y[0]=="object"&&"payload"in Y[0]?Y[0].payload?.label??"":"",oe=typeof Y[0]?.value=="number"?Y[0].value:0;return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:le}),s.jsx("div",{className:"text-xs font-medium",children:ht(oe,a)})]})}}),s.jsx(Ke,{type:"monotone",dataKey:A,stroke:"var(--chart-1)",strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}})]})})});let H;return e[28]!==q||e[29]!==B||e[30]!==X?(H=s.jsx(Ne,{title:B,onTitleClick:q,children:X}),e[28]=q,e[29]=B,e[30]=X,e[31]=H):H=e[31],H}const te=pt[a];let Z;return e[32]!==te?(Z=s.jsx("p",{className:"text-sm text-muted-foreground",children:te}),e[32]=te,e[33]=Z):Z=e[33],s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-1.5",children:[Z,s.jsx("div",{className:"flex items-center gap-3",children:T.slice(0,3).map(V=>{const U=R.get(V.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(Ae,{icon:U?.icon||null,name:V.toolName,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4! aspect-square rounded-sm"}),s.jsx("span",{className:"text-[10px] text-foreground truncate max-w-32",children:V.toolName})]},V.toolName)})})]}),onTitleClick:q,children:T.length===0?s.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"No tool activity in this time range"}):s.jsx("div",{className:"flex flex-col gap-2 w-full h-full",children:s.jsx(it,{className:"flex-1 min-h-0 max-h-[140px] w-full",config:W,children:s.jsxs(xt,{data:k,margin:{left:8,right:8,top:5,bottom:5},children:[s.jsx(dt,{dataKey:"label",axisLine:!1,tickLine:!1,tick:{fontSize:10,fill:"var(--muted-foreground)"}}),s.jsx(ct,{content:V=>{const{active:U,payload:G}=V;if(!U||!G||G.length===0)return null;const J=G[0]&&typeof G[0]=="object"&&"payload"in G[0]?G[0].payload?.label??"":"";return s.jsxs("div",{className:"rounded-lg border bg-background p-2 shadow-sm",children:[s.jsx("div",{className:"mb-1.5 text-xs text-muted-foreground",children:J}),s.jsx("div",{className:"flex flex-col gap-1",children:[...G].sort(pr).map(B=>{const X=String(B.dataKey??""),H=typeof B.value=="number"?B.value:0,se=typeof B.color=="string"?B.color:void 0;if(!H||H===0)return null;const ae=T.find(le=>le.toolName===X),Y=R.get(ae?.connectionId||"");return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:se}}),s.jsx(Ae,{icon:Y?.icon||null,name:X,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[X,":"]}),s.jsx("span",{className:"text-xs font-medium",children:ht(H,a)})]},X)})})]})}}),T.map(V=>s.jsx(Ke,{type:"monotone",dataKey:V.toolName,stroke:K.get(V.toolName),strokeWidth:2,animationDuration:200,dot:!1,activeDot:{r:4}},V.toolName))]})})})})}function pr(t,e){const a=typeof t.value=="number"?t.value:0;return(typeof e.value=="number"?e.value:0)-a}function hr(t){return[t.id,t]}function gr(){const t=re.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t[0]=e):e=t[0];let a;t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[e,s.jsx("div",{className:"flex items-center gap-2",children:Array.from({length:3}).map(vr)})]}),t[1]=a):a=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ne,{title:a,children:s.jsx("div",{className:"flex flex-col gap-2 w-full",children:s.jsx("div",{className:"h-[140px] w-full rounded bg-muted animate-pulse"})})}),t[2]=r):r=t[2],r}function vr(t,e){return s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"size-4 aspect-square rounded-md bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-16 rounded bg-muted animate-pulse"})]},e)}const Be={Content:fr,Skeleton:gr};function Jt(t){const e=t.endDate.getTime()-t.startDate.getTime(),a=3600*1e3,r=25*a;return e<=a?"1m":e<=r?"1h":"1d"}function br(t,e){const a=new Date(t);return e==="1d"?a.toLocaleDateString([],{month:"short",day:"numeric"}):a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function jr(t,e){const a=new Date(t);return e==="1d"?(a.setHours(0,0,0,0),a):e==="1h"?(a.setMinutes(0,0,0),a):(a.setSeconds(0,0),a)}function Zt(t,e,a){const r=new Map(t.map(m=>[jr(new Date(m.timestamp),a).getTime(),m])),n=20,l=e.startDate.getTime(),c=(e.endDate.getTime()-l)/(n-1),o=[],d=[];for(let m=0;m<n;m++){const p=Math.round(l+m*c);d.push(p),o.push({t:new Date(p).toISOString(),ts:p,label:br(new Date(p).toISOString(),a),calls:0,errors:0,errorRate:0,avg:0,p50:0,p95:0})}const f=new Array(n).fill(0);for(const[m,p]of r){let x=0,b=Math.abs(m-d[0]);for(let v=1;v<d.length;v++){const g=Math.abs(m-d[v]);g<b&&(b=g,x=v)}const j=o[x];j.calls+=p.calls,j.errors+=p.errors,j.errorRate+=p.errorRate,j.avg+=p.avg,j.p50+=p.p50,j.p95=Math.max(j.p95,p.p95),f[x]++}for(let m=0;m<n;m++)f[m]>0&&(o[m].errorRate=o[m].errorRate/f[m],o[m].avg=o[m].avg/f[m],o[m].p50=o[m].p50/f[m]);return o}function _e(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ce(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Nr(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:Ce(t.avgDurationMs)}const yr=[{id:"calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",leaderboardMode:"requests",chartMetrics:["calls"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Tool Calls"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalCalls.toLocaleString()})]}),getNextMetric:()=>"calls"},{id:"latency",dataKey:t=>t==="latency-avg"?"avg":"p95",colorNum:4,barColor:"bg-chart-4",leaderboardMode:"latency",chartMetrics:["latency-avg","latency-p95"],renderTitle:(t,e)=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{className:fe("pb-0.5",e==="latency-avg"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{className:fe("pb-0.5",e==="latency-p95"?"border-b-2 border-chart-4":"border-b-2 border-transparent"),children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(t.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]}),getNextMetric:t=>t==="latency-avg"?"latency-p95":"latency-avg"},{id:"errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",leaderboardMode:"errors",chartMetrics:["errors"],renderTitle:t=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:t.totalErrors.toLocaleString()})]}),getNextMetric:()=>"errors"}];function wr(t){const e=re.c(12),{metrics:a,connections:r,mode:n,barColor:l}=t;let i,c,o;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==n){o=Symbol.for("react.early_return_sentinel");e:{const f=new Map(a.map(Cr)),m=r??[];let p;e[7]!==n?(p=(j,v)=>_e(v.metric,n)-_e(j.metric,n),e[7]=n,e[8]=p):p=e[8];const x=m.map(j=>({connection:j,metric:f.get(j.id)})).filter(Sr).sort(p).slice(0,5),b=x[0]?.metric?_e(x[0].metric,n):1;if(x.length===0){o=null;break e}i="space-y-1.5 mt-2",c=x.map(j=>{const{connection:v,metric:g}=j,h=_e(g,n),u=b>0?Math.min(h/b*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ae,{icon:v.icon,name:v.title,size:"xs",fallbackIcon:s.jsx($e,{}),className:"shrink-0 size-4! min-w-4!"}),s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-20",children:v.title}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",l),style:{width:`${u}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:Nr(g,n)})]},v.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=n,e[4]=i,e[5]=c,e[6]=o}else i=e[4],c=e[5],o=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;let d;return e[9]!==i||e[10]!==c?(d=s.jsx("div",{className:i,children:c}),e[9]=i,e[10]=c,e[11]=d):d=e[11],d}function Sr(t){return t.metric}function Cr(t){return[t.connectionId,t]}function Ir(t){const e=re.c(8),{displayDateRange:a,connectionIds:r,excludeConnectionIds:n,toolName:l,status:i,connections:c,isStreaming:o,selectedMetric:d,onMetricSelect:f}=t,m=Jt(a),p=o?He.streamingRefetchInterval:!1;let x;e[0]!==p?(x={refetchInterval:p},e[0]=p,e[1]=x):x=e[1];const{data:b}=Za({interval:m,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionIds:r.length>0?r:void 0,excludeConnectionIds:n,toolNames:l?[l]:void 0,status:i},x),j=b?{totalCalls:b.totalCalls,totalErrors:b.totalErrors,avgDurationMs:b.avgDurationMs,p95DurationMs:b.p95DurationMs,data:Zt(b.timeseries,a,m)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},v="border-b border-border";let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Tool Calls"})}),e[2]=g):g=e[2];const h="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",u=yr.map(N=>{const{id:P,dataKey:D,colorNum:I,barColor:M,leaderboardMode:L,chartMetrics:E,renderTitle:T,getNextMetric:C}=N,_=E.includes(d),O=()=>{f(_?C(d):E[0])};return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:O,children:[_&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${I})`}}),s.jsx(Ne,{title:T(j,d),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:j.data,dataKey:typeof D=="function"?D(d):D,colorNum:I,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(wr,{metrics:b?.connectionBreakdown??[],connections:c,mode:L,barColor:M})]})})]},P)});let y;e[3]!==u?(y=s.jsx("div",{className:h,children:u}),e[3]=u,e[4]=y):y=e[4];let S;return e[5]!==g||e[6]!==y?(S=s.jsxs("div",{className:v,children:[g,y]}),e[5]=g,e[6]=y,e[7]=S):S=e[7],S}const Xt=Object.assign(Ir,{Skeleton:fs});function Dr(t){const e=re.c(9),{topTools:a,barColor:r}=t;if(a.length===0)return null;const n=a[0]?.calls??1;let l;if(e[0]!==r||e[1]!==n||e[2]!==a){let c;e[4]!==r||e[5]!==n?(c=o=>{const{toolName:d,calls:f}=o,m=n>0?Math.min(f/n*100,100):0;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("span",{className:"text-[10px] text-foreground truncate min-w-0 w-24",children:d}),s.jsx("div",{className:"relative h-1.5 bg-muted/50 overflow-hidden flex-1",children:s.jsx("div",{className:fe("h-full",r),style:{width:`${m}%`}})}),s.jsx("span",{className:"text-[10px] tabular-nums shrink-0 text-foreground",children:f.toLocaleString()})]},d)},e[4]=r,e[5]=n,e[6]=c):c=e[6],l=a.map(c),e[0]=r,e[1]=n,e[2]=a,e[3]=l}else l=e[3];let i;return e[7]!==l?(i=s.jsx("div",{className:"space-y-1.5 mt-2",children:l}),e[7]=l,e[8]=i):i=e[8],i}function Tr(t){const e=re.c(8),{displayDateRange:a,isStreaming:r,selectedMetric:n,onMetricSelect:l}=t,i=Jt(a),c=r?He.streamingRefetchInterval:!1;let o;e[0]!==c?(o={refetchInterval:c},e[0]=c,e[1]=o):o=e[1];const{data:d}=qt({interval:i,startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString()},o),f=d?{totalCalls:d.totalCalls,totalErrors:d.totalErrors,avgDurationMs:d.avgDurationMs,p95DurationMs:d.p95DurationMs,data:Zt(d.timeseries,a,i)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},m=d?.topTools??[],p=[{id:"llm-calls",dataKey:"calls",colorNum:1,barColor:"bg-chart-1",chartMetric:"llm-calls",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Usage"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalCalls.toLocaleString()})]})},{id:"llm-latency",dataKey:"avg",colorNum:4,barColor:"bg-chart-4",chartMetric:"llm-latency-avg",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Latency"}),s.jsxs("div",{className:"flex items-baseline gap-3",children:[s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.avgDurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"avg"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"text-sm md:text-lg font-medium",children:Ce(f.p95DurationMs)}),s.jsx("span",{className:"text-[10px] md:text-xs text-muted-foreground ml-1",children:"p95"})]})]})]})},{id:"llm-errors",dataKey:"errors",colorNum:3,barColor:"bg-chart-3",chartMetric:"llm-errors",renderTitle:()=>s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground",children:"AI Errors"}),s.jsx("p",{className:"text-sm md:text-lg font-medium",children:f.totalErrors.toLocaleString()})]})}],x="border-b border-border";let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"AI Usage"})}),e[2]=b):b=e[2];const j="grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",v=p.map(u=>{const{id:y,dataKey:S,colorNum:N,barColor:P,chartMetric:D,renderTitle:I}=u,M=n===D;return s.jsxs("div",{className:"bg-background relative cursor-pointer",onClick:()=>l(D),children:[M&&s.jsx("div",{className:"absolute top-0 left-0 right-0 h-0.5 z-10",style:{backgroundColor:`var(--chart-${N})`}}),s.jsx(Ne,{title:I(),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx(Ct,{data:f.data,dataKey:S,colorNum:N,chartHeight:"h-[30px] md:h-[40px]"}),s.jsx(Dr,{topTools:m,barColor:P})]})})]},y)});let g;e[3]!==v?(g=s.jsx("div",{className:j,children:v}),e[3]=v,e[4]=g):g=e[4];let h;return e[5]!==b||e[6]!==g?(h=s.jsxs("div",{className:x,children:[b,g]}),e[5]=b,e[6]=g,e[7]=h):h=e[7],h}function kr(){const t=re.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"px-5 py-2 bg-muted/30 border-b border-border",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t[0]=e):e=t[0];let a;return t[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"border-b border-border",children:[e,s.jsx("div",{className:"grid grid-cols-3 gap-[0.5px] bg-border flex-shrink-0",children:[...Array(3)].map(Mr)})]}),t[1]=a):a=t[1],a}function Mr(t,e){return s.jsx(Ne,{title:s.jsxs("div",{className:"flex flex-col gap-0.5 md:gap-1",children:[s.jsx("div",{className:"h-4 w-16 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-5 md:h-6 w-12 rounded bg-muted animate-pulse"})]}),children:s.jsxs("div",{className:"flex flex-col w-full",children:[s.jsx("div",{className:"h-[30px] md:h-[40px] w-full rounded bg-muted animate-pulse"}),s.jsx("div",{className:"space-y-1.5 mt-2",children:Array.from({length:3}).map(_r)})]})},e)}function _r(t,e){return s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"h-2.5 w-24 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-1.5 flex-1 bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-8 rounded bg-muted animate-pulse shrink-0"})]},e)}const Yt=Object.assign(Tr,{Skeleton:kr}),Pr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Ar({connectionIds:t,virtualMcpIds:e,tool:a,status:r,hideSystem:n,propertyFilters:l,connectionOptions:i,virtualMcpOptions:c,activeFiltersCount:o,onUpdateFilters:d}){const[f,m]=w.useState(!1),[p,x]=w.useState("raw"),[b,j]=w.useState(a),[v,g]=w.useState(l),[h,u]=w.useState(ke(l)),y=w.useRef(a),S=w.useRef(je(l));y.current!==a&&(y.current=a,b!==a&&j(a));const N=je(l);S.current!==N&&(S.current=N,g(l),u(ke(l)));const P=(T,C)=>{const _=[...v],O=_[T];O&&(_[T]={key:C.key??O.key,operator:C.operator??O.operator,value:C.value??O.value},g(_))},D=()=>{g([...v,{key:"",operator:"eq",value:""}])},I=T=>{const C=v.filter((_,O)=>O!==T);g(C),u(ke(C)),d({propertyFilters:je(C)})},M=()=>{d({propertyFilters:je(v)})},L=()=>{const T=Ze(h);g(T),d({propertyFilters:je(T)})},E=()=>{if(p==="raw"){const T=Ze(h);g(T),x("form")}else u(ke(v)),x("raw")};return s.jsxs(_t,{open:f,onOpenChange:m,children:[s.jsx(kt,{asChild:!0,children:s.jsxs(ue,{variant:"outline",size:"sm",children:[s.jsx(Es,{size:16}),"Filters",o>0&&s.jsx(Le,{variant:"default",className:"ml-1 h-5 w-5 rounded-full p-0 flex items-center justify-center text-xs",children:o})]})}),s.jsx(Mt,{align:"end",className:"w-[320px]",children:s.jsxs("div",{className:"space-y-4",children:[s.jsx("div",{children:s.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(Gs,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),s.jsx(Us,{id:"hide-system-calls",checked:n,onCheckedChange:T=>d({hideSystem:!!T})})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),s.jsx(ft,{options:i,defaultValue:t,onValueChange:T=>d({connectionId:T}),placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),s.jsx(ft,{options:c,defaultValue:e,onValueChange:T=>d({virtualMcpId:T}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),s.jsx(Oe,{id:"filter-tool",placeholder:"Filter by tool...",value:b,onChange:T=>j(T.target.value),onBlur:()=>{b!==a&&d({tool:b})},onKeyDown:T=>{T.key==="Enter"&&b!==a&&d({tool:b})},className:"w-full"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),s.jsxs(tt,{value:r,onValueChange:T=>d({status:T}),children:[s.jsx(st,{className:"w-full",children:s.jsx(at,{})}),s.jsxs(rt,{children:[s.jsx(Me,{value:"all",children:"All Status"}),s.jsx(Me,{value:"success",children:"Success Only"}),s.jsx(Me,{value:"errors",children:"Errors Only"})]})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),s.jsxs(Vs,{children:[s.jsx(Ws,{asChild:!0,children:s.jsx(ue,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:E,children:p==="raw"?s.jsx(Os,{size:14}):s.jsx(Ls,{size:14})})}),s.jsx(Hs,{children:p==="raw"?"Switch to form view":"Switch to raw text"})]})]}),p==="raw"?s.jsxs("div",{className:"space-y-1.5",children:[s.jsx(Fs,{placeholder:`Paste property filters here:
|
|
2
2
|
thread_id=abc123
|
|
3
3
|
user~test
|
|
4
4
|
debug?`,value:h,onChange:T=>u(T.target.value),onBlur:L,onKeyDown:T=>{T.key==="Enter"&&T.metaKey&&L()},className:"font-mono text-sm min-h-[80px] resize-none"}),s.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",s.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):s.jsxs("div",{className:"space-y-3",children:[v.map((T,C)=>s.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",C+1]}),s.jsx(ue,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>I(C),children:s.jsx(Dt,{size:12})})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(Oe,{placeholder:"Key (e.g., thread_id)",value:T.key,onChange:_=>P(C,{key:_.target.value}),onBlur:M,onKeyDown:_=>{_.key==="Enter"&&M()},className:"flex-1 font-mono text-sm"}),s.jsxs(tt,{value:T.operator,onValueChange:_=>{const O=[...v],F=O[C];F&&(O[C]={...F,operator:_,value:_==="exists"?"":F.value},g(O),d({propertyFilters:je(O)}))},children:[s.jsx(st,{className:"w-28",children:s.jsx(at,{})}),s.jsx(rt,{children:Pr.map(_=>s.jsx(Me,{value:_.value,children:_.label},_.value))})]})]}),T.operator!=="exists"&&s.jsx(Oe,{placeholder:"Value",value:T.value,onChange:_=>P(C,{value:_.target.value}),onBlur:M,onKeyDown:_=>{_.key==="Enter"&&M()},className:"w-full font-mono text-sm"})]},C)),s.jsxs(ue,{variant:"outline",size:"sm",className:"w-full",onClick:D,children:[s.jsx(It,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),o>0&&s.jsx(ue,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{j(""),g([]),u(""),d({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),m(!1)},children:"Clear all filters"})]})})]})}function Lr(t){const e=re.c(17),{connectionIds:a,virtualMcpIds:r,tool:n,status:l,search:i,logs:c,hasMore:o,onLoadMore:d,isLoadingMore:f,connections:m,virtualMcps:p,membersData:x}=t,b=m??[],j=p??[];let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=new Set,e[0]=v):v=e[0];const[g,h]=w.useState(v),u=Ms(d,o,f),y=x?.data?.members??[],S=new Map(y.map(Rr)),N=new Map(j.map(Or));let D=c.map(k=>{const R=S.get(k.userId??""),$=k.virtualMcpId?N.get(k.virtualMcpId):null;return{...k,userName:R?.name??k.userId??"Unknown",userImage:R?.image,virtualMcpName:$?.title??null}});if(a.length>1){let k;e[1]!==a?(k=R=>a.includes(R.connectionId),e[1]=a,e[2]=k):k=e[2],D=D.filter(k)}if(r.length>1){let k;e[3]!==r?(k=R=>R.virtualMcpId&&r.includes(R.virtualMcpId),e[3]=r,e[4]=k):k=e[4],D=D.filter(k)}if(i){const k=i.toLowerCase();D=D.filter(R=>R.toolName.toLowerCase().includes(k)||R.connectionTitle.toLowerCase().includes(k)||R.errorMessage?.toLowerCase().includes(k))}let I;e[5]===Symbol.for("react.memo_cache_sentinel")?(I=k=>{h(R=>{const $=new Set(R);return $.has(k.id)?$.delete(k.id):$.add(k.id),$})},e[5]=I):I=e[5];const M=I,L=new Map(b.map(Er));if(D.length===0){let k;e[6]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[6]=k):k=e[6];const R=i||a.length>0||r.length>0||n||l!=="all"?"No logs match your filters":"No logs found in this time range";let $;return e[7]!==R?($=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(We,{image:k,title:"No logs found",description:R})}),e[7]=R,e[8]=$):$=e[8],$}const E="flex-1 flex flex-col overflow-hidden",T="flex-1 overflow-auto",C="min-w-[600px] md:min-w-0 bg-background",_=wt,O="w-full border-collapse";let F;e[9]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(St,{className:"border-b-0 z-20",children:s.jsxs(we,{className:"h-9 hover:bg-transparent border-b border-border",children:[s.jsx(ne,{className:"w-10 md:w-12 px-2 md:px-4"}),s.jsx(ne,{className:"w-5"}),s.jsx(ne,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),s.jsx(ne,{className:"w-24 md:w-32 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User Name"}),s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),s.jsx(ne,{className:"w-20 md:w-28 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Time"}),s.jsx(ne,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right",children:"Latency"}),s.jsx(ne,{className:"w-16 md:w-24 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide text-right pr-3 md:pr-5",children:"Status"})]})}),e[9]=F):F=e[9];const W=yt,K=D.map((k,R)=>s.jsx(Ja,{log:k,isExpanded:g.has(k.id),connection:L.get(k.connectionId),virtualMcpName:k.virtualMcpName??"",onToggle:()=>M(k),lastLogRef:R===D.length-1?u:void 0},k.id));let z;e[10]!==W||e[11]!==K?(z=s.jsx(W,{children:K}),e[10]=W,e[11]=K,e[12]=z):z=e[12];let A;return e[13]!==_||e[14]!==F||e[15]!==z?(A=s.jsx("div",{className:E,children:s.jsx("div",{className:T,children:s.jsx("div",{className:C,children:s.jsxs(_,{className:O,children:[F,z]})})})}),e[13]=_,e[14]=F,e[15]=z,e[16]=A):A=e[16],A}function Er(t){return[t.id,t]}function Or(t){return[t.id,t]}function Rr(t){return[t.userId,t.user]}function $r(){const t=re.c(10);let e,a;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ne,{className:"w-10 md:w-12 px-2 md:px-4"}),a=s.jsx(ne,{className:"w-5"}),t[0]=e,t[1]=a):(e=t[0],a=t[1]);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(ne,{className:"pr-2 md:pr-4",children:s.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),t[2]=r):r=t[2];let n;t[3]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ne,{className:"w-24 md:w-32 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),t[3]=n):n=t[3];let l;t[4]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t[4]=l):l=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(ne,{className:"w-20 md:w-24 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),t[5]=i):i=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(ne,{className:"w-20 md:w-28 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),t[6]=c):c=t[6];let o;t[7]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ne,{className:"w-16 md:w-20 px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t[7]=o):o=t[7];let d;t[8]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(St,{className:"border-b-0 z-20",children:s.jsxs(we,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,a,r,n,l,i,c,o,s.jsx(ne,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),t[8]=d):d=t[8];let f;return t[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsx("div",{className:"min-w-[600px] md:min-w-0 bg-background",children:s.jsxs(wt,{className:"w-full border-collapse",children:[d,s.jsx(yt,{children:Array.from({length:8}).map(zr)})]})})})}),t[9]=f):f=t[9],f}function zr(t,e){return s.jsxs(we,{className:"h-12 border-b border-border",children:[s.jsx("td",{className:"px-2 md:px-4",children:s.jsx("div",{className:"size-4 rounded bg-muted animate-pulse"})}),s.jsx("td",{children:s.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"pr-2 md:pr-4",children:s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),s.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),s.jsx("td",{className:"px-2 md:px-3",children:s.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:s.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const es=Object.assign(Lr,{Skeleton:$r});function Kr(t){const e=re.c(44),{client:a,locator:r,baseParams:n,pageSize:l,isStreaming:i,streamingRefetchInterval:c,connectionIds:o,virtualMcpIds:d,tool:f,status:m,searchQuery:p,onUpdateFilters:x,allConnections:b,allVirtualMcps:j,membersData:v}=t;let g;e[0]!==n||e[1]!==r?(g=Pe.monitoringLogsInfinite(r,JSON.stringify(n)),e[0]=n,e[1]=r,e[2]=g):g=e[2];let h;e[3]!==n||e[4]!==a||e[5]!==l?(h=async z=>{const{pageParam:A}=z,k=A===void 0?0:A;if(!a)throw new Error("MCP client is not available");const R=await a.callTool({name:"MONITORING_LOGS_LIST",arguments:{...n,limit:l,offset:k}});return R.structuredContent??R},e[3]=n,e[4]=a,e[5]=l,e[6]=h):h=e[6];let u;e[7]!==l?(u=(z,A)=>{if(!((z?.logs?.length??0)<l))return A.length*l},e[7]=l,e[8]=u):u=e[8];const y=i?c:!1;let S;e[9]!==g||e[10]!==h||e[11]!==u||e[12]!==y?(S={queryKey:g,queryFn:h,initialPageParam:0,getNextPageParam:u,staleTime:0,refetchInterval:y},e[9]=g,e[10]=h,e[11]=u,e[12]=y,e[13]=S):S=e[13];const{data:N,fetchNextPage:P,hasNextPage:D,isFetchingNextPage:I}=Ps(S);let M;e[14]!==N.pages?(M=N.pages.flatMap(Br),e[14]=N.pages,e[15]=M):M=e[15];const L=M;let E;e[16]!==P||e[17]!==D||e[18]!==I?(E=()=>{D&&!I&&P()},e[16]=P,e[17]=D,e[18]=I,e[19]=E):E=e[19];const T=E;let C;e[20]!==x?(C=z=>x({search:z}),e[20]=x,e[21]=C):C=e[21];let _;e[22]!==x?(_=z=>{z.key==="Escape"&&(x({search:""}),z.target.blur())},e[22]=x,e[23]=_):_=e[23];let O;e[24]!==p||e[25]!==C||e[26]!==_?(O=s.jsx(ls,{value:p,onChange:C,placeholder:"Search by tool name, connection, or error...",className:"border-t",onKeyDown:_}),e[24]=p,e[25]=C,e[26]=_,e[27]=O):O=e[27];const F=D??!1;let W;e[28]!==b||e[29]!==L||e[30]!==j||e[31]!==o||e[32]!==T||e[33]!==I||e[34]!==v||e[35]!==p||e[36]!==m||e[37]!==F||e[38]!==f||e[39]!==d?(W=s.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:s.jsx(es,{connectionIds:o,virtualMcpIds:d,tool:f,status:m,search:p,logs:L,hasMore:F,onLoadMore:T,isLoadingMore:I,connections:b,virtualMcps:j,membersData:v})}),e[28]=b,e[29]=L,e[30]=j,e[31]=o,e[32]=T,e[33]=I,e[34]=v,e[35]=p,e[36]=m,e[37]=F,e[38]=f,e[39]=d,e[40]=W):W=e[40];let K;return e[41]!==O||e[42]!==W?(K=s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[O,W]}),e[41]=O,e[42]=W,e[43]=K):K=e[43],K}function Br(t){return t.logs??[]}function Fr(t){const e=re.c(85),{tab:a,dateRange:r,displayDateRange:n,connectionIds:l,virtualMcpIds:i,tool:c,status:o,search:d,streaming:f,hideSystem:m,activeFiltersCount:p,from:x,to:b,propertyFilters:j,onUpdateFilters:v,onTimeRangeChange:g,onStreamingToggle:h,onTabChange:u}=t,y=Tt(),S=As(),{data:N}=_s();let P;e[0]!==y?(P=y??[],e[0]=y,e[1]=P):P=e[1];let D;e[2]!==P?(D=P.map(Wr),e[2]=P,e[3]=D):D=e[3];const I=D;let M;e[4]!==S?(M=S.map(Vr),e[4]=S,e[5]=M):M=e[5];const L=M,{pageSize:E,streamingRefetchInterval:T}=He,{org:C,locator:_}=pe();let O;e[6]!==C.id?(O={connectionId:Ie,orgId:C.id},e[6]=C.id,e[7]=O):O=e[7];const F=De(O);let W;e[8]!==j?(W=cs(j),e[8]=j,e[9]=W):W=e[9];const K=W;let z;e[10]!==m||e[11]!==C.id?(z=m?[ps.SELF(C.id)]:void 0,e[10]=m,e[11]=C.id,e[12]=z):z=e[12];const A=z,[k,R]=w.useState(!1);let $;e[13]!==r.startDate?($=r.startDate.toISOString(),e[13]=r.startDate,e[14]=$):$=e[14];let q;e[15]!==r.endDate?(q=r.endDate.toISOString(),e[15]=r.endDate,e[16]=q):q=e[16];const te=k?"decopilot":l.length===1?l[0]:void 0,Z=i.length===1?i[0]:void 0,V=c||void 0,U=o==="errors"?!0:o==="success"?!1:void 0;let G;e[17]!==A||e[18]!==K||e[19]!==Z||e[20]!==V||e[21]!==U||e[22]!==$||e[23]!==q||e[24]!==te?(G={startDate:$,endDate:q,connectionId:te,excludeConnectionIds:A,virtualMcpId:Z,toolName:V,isError:U,...K},e[17]=A,e[18]=K,e[19]=Z,e[20]=V,e[21]=U,e[22]=$,e[23]=q,e[24]=te,e[25]=G):G=e[25];const J=G,[B,X]=w.useState("calls");let H;e[26]!==n.startDate?(H=n.startDate.toISOString(),e[26]=n.startDate,e[27]=H):H=e[27];let se;e[28]!==n.endDate?(se=n.endDate.toISOString(),e[28]=n.endDate,e[29]=se):se=e[29];let ae;e[30]!==H||e[31]!==se?(ae={startDate:H,endDate:se},e[30]=H,e[31]=se,e[32]=ae):ae=e[32];const Y=ae;let le;e[33]===Symbol.for("react.memo_cache_sentinel")?(le={id:"overview",label:"Overview"},e[33]=le):le=e[33];let oe;e[34]===Symbol.for("react.memo_cache_sentinel")?(oe={id:"audit",label:"Audit"},e[34]=oe):oe=e[34];let Q;e[35]===Symbol.for("react.memo_cache_sentinel")?(Q=[le,oe,{id:"dashboards",label:"Dashboards"}],e[35]=Q):Q=e[35];const ee=Q;let ie;e[36]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(xe.Header.Left,{children:s.jsx(vt,{children:s.jsx(bt,{children:s.jsx(jt,{children:s.jsx(Nt,{children:"Monitoring"})})})})}),e[36]=ie):ie=e[36];let ce;e[37]!==p||e[38]!==k||e[39]!==l||e[40]!==I||e[41]!==x||e[42]!==m||e[43]!==f||e[44]!==h||e[45]!==g||e[46]!==v||e[47]!==j||e[48]!==o||e[49]!==a||e[50]!==b||e[51]!==c||e[52]!==i||e[53]!==L?(ce=(a==="overview"||a==="audit")&&s.jsx(xe.Header.Right,{children:s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsx(Ar,{connectionIds:l,virtualMcpIds:i,tool:c,status:o,hideSystem:m,propertyFilters:j,connectionOptions:I,virtualMcpOptions:L,activeFiltersCount:p,onUpdateFilters:v}),a==="audit"&&s.jsx(ue,{variant:k?"secondary":"outline",size:"sm",className:"h-7 px-2 sm:px-3 text-xs",onClick:()=>R(!k),children:"AI Usage"}),s.jsxs(ue,{variant:f?"secondary":"outline",size:"sm",className:fe("h-7 px-2 sm:px-3 gap-1.5",f&&"bg-muted hover:bg-muted/80"),onClick:h,children:[f?s.jsx(Kt,{size:16,className:"animate-pulse"}):s.jsx(Bt,{size:16}),s.jsx("span",{className:"hidden sm:inline",children:f?"Streaming":"Stream"})]}),s.jsx(ds,{value:{from:x,to:b},onChange:g})]})}),e[37]=p,e[38]=k,e[39]=l,e[40]=I,e[41]=x,e[42]=m,e[43]=f,e[44]=h,e[45]=g,e[46]=v,e[47]=j,e[48]=o,e[49]=a,e[50]=b,e[51]=c,e[52]=i,e[53]=L,e[54]=ce):ce=e[54];let he;e[55]!==ce?(he=s.jsxs(xe.Header,{children:[ie,ce]}),e[55]=ce,e[56]=he):he=e[56];let ge;e[57]!==u?(ge=ts=>u(ts),e[57]=u,e[58]=ge):ge=e[58];let ve;e[59]!==ge||e[60]!==a?(ve=s.jsx("div",{className:"px-5 py-3 border-b border-border",children:s.jsx(Pt,{tabs:ee,activeTab:a,onTabChange:ge})}),e[59]=ge,e[60]=a,e[61]=ve):ve=e[61];let be;e[62]!==y||e[63]!==S||e[64]!==Y||e[65]!==J||e[66]!==F||e[67]!==l||e[68]!==n||e[69]!==A||e[70]!==f||e[71]!==_||e[72]!==N||e[73]!==v||e[74]!==d||e[75]!==o||e[76]!==a||e[77]!==c||e[78]!==B||e[79]!==i?(be=a==="dashboards"?s.jsx(nr,{}):a==="audit"?s.jsx(Kr,{client:F,locator:_,baseParams:J,pageSize:E,isStreaming:f,streamingRefetchInterval:T,connectionIds:l,virtualMcpIds:i,tool:c,status:o,searchQuery:d,onUpdateFilters:v,allConnections:y,allVirtualMcps:S,membersData:N}):s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[s.jsx("div",{className:"border-b border-border relative z-10",children:s.jsx(Fe,{fallback:null,children:s.jsx(w.Suspense,{fallback:s.jsx(Be.Skeleton,{}),children:s.jsx(Be.Content,{metricsMode:B,dateRange:Y,connectionIds:l,excludeConnectionIds:A,toolName:c||void 0,status:o==="errors"?"error":o==="success"?"success":void 0,isStreaming:f,streamingRefetchInterval:T})})})}),s.jsx(Xt,{displayDateRange:n,connectionIds:l,excludeConnectionIds:A,toolName:c||void 0,status:o==="errors"?"error":o==="success"?"success":void 0,connections:y,isStreaming:f,selectedMetric:B,onMetricSelect:X}),s.jsx(Yt,{displayDateRange:n,isStreaming:f,selectedMetric:B,onMetricSelect:X})]}),e[62]=y,e[63]=S,e[64]=Y,e[65]=J,e[66]=F,e[67]=l,e[68]=n,e[69]=A,e[70]=f,e[71]=_,e[72]=N,e[73]=v,e[74]=d,e[75]=o,e[76]=a,e[77]=c,e[78]=B,e[79]=i,e[80]=be):be=e[80];let Te;return e[81]!==he||e[82]!==ve||e[83]!==be?(Te=s.jsxs(s.Fragment,{children:[he,ve,be]}),e[81]=he,e[82]=ve,e[83]=be,e[84]=Te):Te=e[84],Te}function Vr(t){return{value:t.id??"",label:t.title??"Decopilot"}}function Wr(t){return{value:t.id,label:t.title||t.id}}function sl(){const t=re.c(81),{org:e}=pe(),a=Ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/monitoring"},t[0]=r):r=t[0];const n=ns(r),{tab:l,from:i,to:c,connectionId:o,virtualMcpId:d,tool:f,search:m,status:p,streaming:x,propertyFilters:b,hideSystem:j}=n,v=l===void 0?"overview":l;let g;t[1]!==o?(g=o===void 0?[]:o,t[1]=o,t[2]=g):g=t[2];const h=g;let u;t[3]!==d?(u=d===void 0?[]:d,t[3]=d,t[4]=u):u=t[4];const y=u,S=x===void 0?!0:x,N=b===void 0?"":b,P=j===void 0?!1:j;let D,I,M,L,E,T,C;if(t[5]!==h.length||t[6]!==i||t[7]!==P||t[8]!==a||t[9]!==e.slug||t[10]!==N||t[11]!==n||t[12]!==p||t[13]!==S||t[14]!==c||t[15]!==f||t[16]!==y.length){E=is(N);let U;t[24]!==a||t[25]!==e.slug||t[26]!==n?(U=H=>{a({to:"/$org/$project/monitoring",params:{org:e.slug,project:gt},search:{...n,...H}})},t[24]=a,t[25]=e.slug,t[26]=n,t[27]=U):U=t[27],C=U;let G;t[28]!==C?(G=H=>{C({from:H.from,to:H.to})},t[28]=C,t[29]=G):G=t[29],L=G;let J,B;if(t[30]!==i||t[31]!==S||t[32]!==c){const H=Je(i),se=Je(c);B=H.date||new Date(Date.now()-18e5);const ae=se.date||new Date;M={startDate:B,endDate:ae},J=ae,S&&c==="now"&&(J=new Date(ae),J.setHours(J.getHours()+1)),t[30]=i,t[31]=S,t[32]=c,t[33]=M,t[34]=J,t[35]=B}else M=t[33],J=t[34],B=t[35];let X;t[36]!==J||t[37]!==B?(X={startDate:B,endDate:J},t[36]=J,t[37]=B,t[38]=X):X=t[38],I=X,D=0,h.length>0&&D++,y.length>0&&D++,f&&D++,p!=="all"&&D++,P&&D++,T=E.filter(Hr),t[5]=h.length,t[6]=i,t[7]=P,t[8]=a,t[9]=e.slug,t[10]=N,t[11]=n,t[12]=p,t[13]=S,t[14]=c,t[15]=f,t[16]=y.length,t[17]=D,t[18]=I,t[19]=M,t[20]=L,t[21]=E,t[22]=T,t[23]=C}else D=t[17],I=t[18],M=t[19],L=t[20],E=t[21],T=t[22],C=t[23];const _=T;_.length>0&&(D=D+_.length);let O;t[39]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(xe.Header,{children:s.jsx(xe.Header.Left,{children:s.jsx("h1",{className:"text-sm font-medium text-foreground",children:"Monitoring"})})}),t[39]=O):O=t[39];let F;t[40]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-[0.5px] bg-border shrink-0 border-b",children:s.jsx("div",{className:"bg-background p-5 text-sm text-muted-foreground",children:"Failed to load monitoring data"})}),t[40]=F):F=t[40];let W;t[41]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsxs(s.Fragment,{children:[O,s.jsx(xe.Content,{children:s.jsxs("div",{className:"flex flex-col overflow-auto md:overflow-hidden h-full",children:[F,s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(We,{title:"Failed to load logs",description:"There was an error loading the monitoring data. Please try again."})})]})})]}),t[41]=W):W=t[41];let K;t[42]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(xe.Header,{children:s.jsx(xe.Header.Left,{children:s.jsx(vt,{children:s.jsx(bt,{children:s.jsx(jt,{children:s.jsx(Nt,{children:"Monitoring"})})})})})}),t[42]=K):K=t[42];let z;t[43]===Symbol.for("react.memo_cache_sentinel")?(z=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"dashboards",label:"Dashboards"}],t[43]=z):z=t[43];let A;t[44]!==C?(A=U=>C({tab:U}),t[44]=C,t[45]=A):A=t[45];let k;t[46]!==A||t[47]!==v?(k=s.jsx("div",{className:"px-5 py-3 border-b border-border",children:s.jsx(Pt,{tabs:z,activeTab:v,onTabChange:A})}),t[46]=A,t[47]=v,t[48]=k):k=t[48];let R;t[49]!==v?(R=v==="audit"?s.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:s.jsx(es.Skeleton,{})}):v==="dashboards"?s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-muted-foreground",children:"Loading dashboards..."})}):s.jsxs("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:[s.jsx("div",{className:"border-b border-border",children:s.jsx(Be.Skeleton,{})}),s.jsx(Xt.Skeleton,{}),s.jsx(Yt.Skeleton,{})]}),t[49]=v,t[50]=R):R=t[50];let $;t[51]!==k||t[52]!==R?($=s.jsxs(s.Fragment,{children:[K,k,R]}),t[51]=k,t[52]=R,t[53]=$):$=t[53];let q;t[54]!==S||t[55]!==C?(q=()=>C({streaming:!S}),t[54]=S,t[55]=C,t[56]=q):q=t[56];let te;t[57]!==C?(te=U=>C({tab:U}),t[57]=C,t[58]=te):te=t[58];let Z;t[59]!==D||t[60]!==h||t[61]!==I||t[62]!==M||t[63]!==i||t[64]!==L||t[65]!==P||t[66]!==E||t[67]!==m||t[68]!==p||t[69]!==S||t[70]!==q||t[71]!==te||t[72]!==v||t[73]!==c||t[74]!==f||t[75]!==C||t[76]!==y?(Z=s.jsx(Fr,{tab:v,dateRange:I,displayDateRange:M,connectionIds:h,virtualMcpIds:y,tool:f,status:p,search:m,streaming:S,hideSystem:P,activeFiltersCount:D,from:i,to:c,propertyFilters:E,onUpdateFilters:C,onTimeRangeChange:L,onStreamingToggle:q,onTabChange:te}),t[59]=D,t[60]=h,t[61]=I,t[62]=M,t[63]=i,t[64]=L,t[65]=P,t[66]=E,t[67]=m,t[68]=p,t[69]=S,t[70]=q,t[71]=te,t[72]=v,t[73]=c,t[74]=f,t[75]=C,t[76]=y,t[77]=Z):Z=t[77];let V;return t[78]!==$||t[79]!==Z?(V=s.jsx(xe,{children:s.jsx(Fe,{fallback:W,children:s.jsx(w.Suspense,{fallback:$,children:Z})})}),t[78]=$,t[79]=Z,t[80]=V):V=t[80],V}function Hr(t){return t.key.trim()}export{sl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as C,c as we,g as Be,j as t,al as Fe,E as Te,u as Ee,x as Me,v as Re,K as ve,J as ze,B as re,w as pe}from"./index-SkQC2bL2.js";import{b as Oe}from"./use-connection-DSkVzqSP.js";import{u as $e,a as Ae}from"./constants-BZUBXkLq.js";import{I as le}from"./input-C4xXFdLa.js";import{I as ke}from"./integration-icon-9nN5AvVn.js";import{C as We}from"./checkbox-B92JdB3t.js";import{b as Le,P as Ve,a as Ue}from"./popover-U_QlVu0r.js";import{i as Ge}from"./AlignLeft-CJvAdEi-.js";import{t as Ie}from"./ChevronDown-BURkaeCD.js";import{n as Ke}from"./ChevronUp-Ql_IhfwF.js";import{s as qe}from"./Hash02-BPlWtian.js";import{i as He}from"./Play-DSE8IZVS.js";import{s as Je}from"./Plus-OTc7Ql1V.js";import{s as Qe}from"./Trash01-DhGTBhjv.js";import{S as je,a as be,b as ye,c as Ne,d as w}from"./select-Bqr12jkn.js";import{T as Ye,a as Se}from"./toggle-group-abCGptw4.js";import{a as Ze,V as Xe}from"./layout-DIeoK390.js";import{S as et}from"./save-actions-AenTNPs2.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-h9Dq7GJ0.js";import"./use-collections-C3CSj681.js";import"./useMutation-CXgAMvoC.js";import"./Container-De-pv4QL.js";import"./Check-CN56KhoF.js";import"./index-AtuNXtl1.js";import"./index-Bs-gkatC.js";import"./useQuery-CtOvMPbo.js";import"./tooltip-Ckpai_jH.js";import"./Save01-Df_qJsfN.js";import"./Loading01-CDOurw-F.js";import"./ChevronRight-Df5oEIdG.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Qe,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let J;e[80]!==o||e[81]!==s?(J=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=J):J=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let Q;e[85]!==J||e[86]!==s.aggregationFn?(Q=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:J,children:[xe,he]})]}),e[85]=J,e[86]=s.aggregationFn,e[87]=Q):Q=e[87];let Y;e[88]!==H||e[89]!==Q?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,Q]}),e[88]=H,e[89]=Q,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Je,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
|
|
1
|
+
import{r as C,c as we,g as Be,j as t,al as Fe,E as Te,u as Ee,x as Me,v as Re,K as ve,J as ze,B as re,w as pe}from"./index-DJtnEPc7.js";import{b as Oe}from"./use-connection-2T7CNTjX.js";import{u as $e,a as Ae}from"./constants-4hZfe-FX.js";import{I as le}from"./input-j_5WJy1c.js";import{I as ke}from"./integration-icon-DrTDJ354.js";import{C as We}from"./checkbox-BRXa8FNh.js";import{b as Le,P as Ve,a as Ue}from"./popover-B_9jK9T6.js";import{i as Ge}from"./AlignLeft-BtdVdG2m.js";import{t as Ie}from"./ChevronDown-CIjXFJfV.js";import{n as Ke}from"./ChevronUp-C8129itH.js";import{s as qe}from"./Hash02-zbrPaDCt.js";import{i as He}from"./Play-D223AznW.js";import{s as Je}from"./Plus-CGe5wBcS.js";import{s as Qe}from"./Trash01-DPMbpRnj.js";import{S as je,a as be,b as ye,c as Ne,d as w}from"./select-roICowiz.js";import{T as Ye,a as Se}from"./toggle-group-O3ssRQZp.js";import{a as Ze,V as Xe}from"./layout-Cyh0KCTx.js";import{S as et}from"./save-actions-DRE_2Nh6.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-7YipRD-p.js";import"./use-collections-uyyRdHl8.js";import"./useMutation-D77LVetF.js";import"./Container-C_pBhYQm.js";import"./Check-DsclgHfU.js";import"./index-biN0aic_.js";import"./index-qxqsMecG.js";import"./useQuery-DLey6Pvf.js";import"./tooltip-Bms1Xn3i.js";import"./Save01-CYi2R4Ht.js";import"./Loading01-CSUxQOK0.js";import"./ChevronRight-DmvbXNWu.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 3H7.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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Qe,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let J;e[80]!==o||e[81]!==s?(J=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=J):J=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let Q;e[85]!==J||e[86]!==s.aggregationFn?(Q=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:J,children:[xe,he]})]}),e[85]=J,e[86]=s.aggregationFn,e[87]=Q):Q=e[87];let Y;e[88]!==H||e[89]!==Q?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,Q]}),e[88]=H,e[89]=Q,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Je,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as $,j as t,B as R,c as D,x as xe,al as re,E as ge,u as fe,v as ne,K as oe,J as pe,g as he,e as je}from"./index-
|
|
1
|
+
import{r as $,j as t,B as R,c as D,x as xe,al as re,E as ge,u as fe,v as ne,K as oe,J as pe,g as he,e as je}from"./index-DJtnEPc7.js";import{a as be,u as ye}from"./constants-4hZfe-FX.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-DKvAeQX-.js";import{i as ke}from"./Edit05-DW3L1ev9.js";import{V as Se,a as Ce}from"./layout-Cyh0KCTx.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-7YipRD-p.js";import{B as _e}from"./badge-7TJrkuyd.js";import{I as ue}from"./input-j_5WJy1c.js";import{b as Pe,P as Ie,a as Me}from"./popover-B_9jK9T6.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-roICowiz.js";import{T as Ke}from"./textarea-BJkI1dfy.js";import{T as Le,a as Ve,b as qe}from"./tooltip-Bms1Xn3i.js";import{i as Qe}from"./Code01-Cq3-F_YX.js";import{i as We}from"./FilterLines-BFSA7yHa.js";import{c as Ge}from"./Grid01-BSBJv9eJ.js";import{s as He}from"./Plus-CGe5wBcS.js";import{s as Ye}from"./Trash01-DPMbpRnj.js";import{s as Je}from"./XClose-ndXrBTVc.js";import"./Check-DsclgHfU.js";import"./Copy01-CFr3FQ5x.js";import"./Download01-CYaxYM2W.js";import"./Key01-yVAqC10q.js";import"./Play-D223AznW.js";import"./monaco-editor-BI48gu97.js";import"./spinner-qX5-Mz-A.js";import"./scroll-area-DXeQheGE.js";import"./ChevronUp-C8129itH.js";import"./ChevronDown-CIjXFJfV.js";import"./Clock-CQzMyEYR.js";import"./ChevronLeft-tQ1_QiuA.js";import"./ChevronRight-DmvbXNWu.js";import"./index-qxqsMecG.js";import"./useQuery-DLey6Pvf.js";import"./useMutation-D77LVetF.js";import"./index-biN0aic_.js";const Ue=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,F)=>F!==x);e(h)},children:t.jsx(Je,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
|
|
2
2
|
thread_id=abc123
|
|
3
3
|
user~test
|
|
4
4
|
debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(ze,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter(F=>F.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Ue.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:be,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=ye(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ve(N);k=N.length>0?Ne(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:F}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx(Fe,{asChild:!0,children:t.jsx(pe,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let J;e[37]===Symbol.for("react.memo_cache_sentinel")?(J=t.jsx(Re,{}),e[37]=J):J=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx($e,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let U;e[40]!==_||e[41]!==P?(U=t.jsx(De,{children:t.jsxs(Te,{children:[_,J,P]})}),e[40]=_,e[41]=P,e[42]=U):U=e[42];const te=U;let I;e[43]!==n?(I=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(ke,{size:14})}),e[43]=n,e[44]=I):I=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let M;e[46]!==c?(M=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=M):M=e[47];let z;e[48]!==m||e[49]!==l?(z=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=z):z=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==I||e[58]!==M||e[59]!==z||e[60]!==E?(O=t.jsxs(Se,{children:[I,M,z,E]}),e[57]=I,e[58]=M,e[59]=z,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==F?(V=F&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=F,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ge,{fallback:j,children:t.jsx($.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Qt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=he(e),{org:i,project:l}=fe(),n=je();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Qt as default};
|
package/dist/client/assets/{monitoring-stats-row-DOJg3snj.js → monitoring-stats-row-Bk2P-uOc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,c5 as se,bR as ct,ck as ut,c as $e,y as _r,j as P}from"./index-
|
|
1
|
+
import{r as d,c5 as se,bR as ct,ck as ut,c as $e,y as _r,j as P}from"./index-DJtnEPc7.js";import{aH as vt,aI as ve,F as ee,M as le,aJ as Nr,r as Ae,z as Le,aK as $r,J as Ke,aL as I,A as w,aM as Q,aN as pe,W as me,aO as H,aP as Ue,L as re,aw as ft,a2 as Re,aQ as dt,aR as pt,aS as mt,aT as ht,y as Ie,ax as we,ar as gt,c as G,aU as yt,aa as bt,s as ne,an as xt,ap as Y,e as te,aq as V,f as ae,h as Lr,g as Kr,aV as Rr,aW as Ot,aX as Pt,as as He,aY as jt,aZ as Ze,at as At,p as It,u as zr,R as St,S as Et,j as kt,Z as ze,D as We,k as Wr,l as Tt,n as wt,m as Mt,q as Ct,a_ as Bt,t as he,w as Fr,G as Dt,P as qr,T as _t,a0 as Gr,a$ as Nt,b0 as $t,b1 as Ye,B as Lt,E as Kt,H as Rt,b2 as zt,av as Wt,I as Ft,K as qt,a as Gt,b as Ut,C as Ht}from"./chart-DtzgRcs7.js";const Ur=Math.cos,ge=Math.sin,$=Math.sqrt,ye=Math.PI,Se=2*ye,Fe={draw(r,e){const t=$(e/ye);r.moveTo(t,0),r.arc(0,0,t,0,Se)}},Zt={draw(r,e){const t=$(e/5)/2;r.moveTo(-3*t,-t),r.lineTo(-t,-t),r.lineTo(-t,-3*t),r.lineTo(t,-3*t),r.lineTo(t,-t),r.lineTo(3*t,-t),r.lineTo(3*t,t),r.lineTo(t,t),r.lineTo(t,3*t),r.lineTo(-t,3*t),r.lineTo(-t,t),r.lineTo(-3*t,t),r.closePath()}},Hr=$(1/3),Yt=Hr*2,Vt={draw(r,e){const t=$(e/Yt),a=t*Hr;r.moveTo(0,-t),r.lineTo(a,0),r.lineTo(0,t),r.lineTo(-a,0),r.closePath()}},Xt={draw(r,e){const t=$(e),a=-t/2;r.rect(a,a,t,t)}},Jt=.8908130915292852,Zr=ge(ye/10)/ge(7*ye/10),Qt=ge(Se/10)*Zr,ea=-Ur(Se/10)*Zr,ra={draw(r,e){const t=$(e*Jt),a=Qt*t,i=ea*t;r.moveTo(0,-t),r.lineTo(a,i);for(let n=1;n<5;++n){const o=Se*n/5,s=Ur(o),u=ge(o);r.lineTo(u*t,-s*t),r.lineTo(s*a-u*i,u*a+s*i)}r.closePath()}},Ee=$(3),ta={draw(r,e){const t=-$(e/(Ee*3));r.moveTo(0,t*2),r.lineTo(-Ee*t,-t),r.lineTo(Ee*t,-t),r.closePath()}},_=-.5,N=$(3)/2,Me=1/$(12),aa=(Me/2+1)*3,na={draw(r,e){const t=$(e/aa),a=t/2,i=t*Me,n=a,o=t*Me+t,s=-n,u=o;r.moveTo(a,i),r.lineTo(n,o),r.lineTo(s,u),r.lineTo(_*a-N*i,N*a+_*i),r.lineTo(_*n-N*o,N*n+_*o),r.lineTo(_*s-N*u,N*s+_*u),r.lineTo(_*a+N*i,_*i-N*a),r.lineTo(_*n+N*o,_*o-N*n),r.lineTo(_*s+N*u,_*u-N*s),r.closePath()}};function ia(r,e){let t=null,a=vt(i);r=typeof r=="function"?r:ve(r||Fe),e=typeof e=="function"?e:ve(e===void 0?64:+e);function i(){let n;if(t||(t=n=a()),r.apply(this,arguments).draw(t,+e.apply(this,arguments)),n)return t=null,n+""||null}return i.type=function(n){return arguments.length?(r=typeof n=="function"?n:ve(n),i):r},i.size=function(n){return arguments.length?(e=typeof n=="function"?n:ve(+n),i):e},i.context=function(n){return arguments.length?(t=n??null,i):t},i}var oa=["type","size","sizeType"];function Ce(){return Ce=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},Ce.apply(null,arguments)}function Ve(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,a)}return t}function Xe(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ve(Object(t),!0).forEach(function(a){la(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ve(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function la(r,e,t){return(e=sa(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sa(r){var e=ca(r,"string");return typeof e=="symbol"?e:e+""}function ca(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function ua(r,e){if(r==null)return{};var t,a,i=va(r,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);for(a=0;a<n.length;a++)t=n[a],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function va(r,e){if(r==null)return{};var t={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(e.indexOf(a)!==-1)continue;t[a]=r[a]}return t}var Yr={symbolCircle:Fe,symbolCross:Zt,symbolDiamond:Vt,symbolSquare:Xt,symbolStar:ra,symbolTriangle:ta,symbolWye:na},fa=Math.PI/180,da=r=>{var e="symbol".concat(Nr(r));return Yr[e]||Fe},pa=(r,e,t)=>{if(e==="area")return r;switch(t){case"cross":return 5*r*r/9;case"diamond":return .5*r*r/Math.sqrt(3);case"square":return r*r;case"star":{var a=18*fa;return 1.25*r*r*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*r*r/4;case"wye":return(21-10*Math.sqrt(3))*r*r/8;default:return Math.PI*r*r/4}},ma=(r,e)=>{Yr["symbol".concat(Nr(r))]=e},Vr=r=>{var{type:e="circle",size:t=64,sizeType:a="area"}=r,i=ua(r,oa),n=Xe(Xe({},i),{},{type:e,size:t,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var s=()=>{var v=da(o),m=ia().type(v).size(pa(t,a,o)),h=m();if(h!==null)return h},{className:u,cx:c,cy:l}=n,f=ee(n);return le(c)&&le(l)&&le(t)?d.createElement("path",Ce({},f,{className:se("recharts-symbols",u),transform:"translate(".concat(c,", ").concat(l,")"),d:s()})):null};Vr.registerSymbol=ma;var ha=["radius"],ga=["radius"],Je,Qe,er,rr,tr,ar,nr,ir,or,lr;function sr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(r);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,a)}return t}function cr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?sr(Object(t),!0).forEach(function(a){ya(r,a,t[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):sr(Object(t)).forEach(function(a){Object.defineProperty(r,a,Object.getOwnPropertyDescriptor(t,a))})}return r}function ya(r,e,t){return(e=ba(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function ba(r){var e=xa(r,"string");return typeof e=="symbol"?e:e+""}function xa(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var a=t.call(r,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function be(){return be=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var a in t)({}).hasOwnProperty.call(t,a)&&(r[a]=t[a])}return r},be.apply(null,arguments)}function ur(r,e){if(r==null)return{};var t,a,i=Oa(r,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);for(a=0;a<n.length;a++)t=n[a],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(r,t)&&(i[t]=r[t])}return i}function Oa(r,e){if(r==null)return{};var t={};for(var a in r)if({}.hasOwnProperty.call(r,a)){if(e.indexOf(a)!==-1)continue;t[a]=r[a]}return t}function K(r,e){return e||(e=r.slice(0)),Object.freeze(Object.defineProperties(r,{raw:{value:Object.freeze(e)}}))}var vr=(r,e,t,a,i)=>{var n=Q(t),o=Q(a),s=Math.min(Math.abs(n)/2,Math.abs(o)/2),u=o>=0?1:-1,c=n>=0?1:-1,l=o>=0&&n>=0||o<0&&n<0?1:0,f;if(s>0&&Array.isArray(i)){for(var v=[0,0,0,0],m=0,h=4;m<h;m++){var g,b=(g=i[m])!==null&&g!==void 0?g:0;v[m]=b>s?s:b}f=I(Je||(Je=K(["M",",",""])),r,e+u*v[0]),v[0]>0&&(f+=I(Qe||(Qe=K(["A ",",",",0,0,",",",",",""])),v[0],v[0],l,r+c*v[0],e)),f+=I(er||(er=K(["L ",",",""])),r+t-c*v[1],e),v[1]>0&&(f+=I(rr||(rr=K(["A ",",",",0,0,",`,
|
|
2
2
|
`,",",""])),v[1],v[1],l,r+t,e+u*v[1])),f+=I(tr||(tr=K(["L ",",",""])),r+t,e+a-u*v[2]),v[2]>0&&(f+=I(ar||(ar=K(["A ",",",",0,0,",`,
|
|
3
3
|
`,",",""])),v[2],v[2],l,r+t-c*v[2],e+a)),f+=I(nr||(nr=K(["L ",",",""])),r+c*v[3],e+a),v[3]>0&&(f+=I(ir||(ir=K(["A ",",",",0,0,",`,
|
|
4
4
|
`,",",""])),v[3],v[3],l,r,e+a-u*v[3])),f+="Z"}else if(s>0&&i===+i&&i>0){var p=Math.min(s,i);f=I(or||(or=K(["M ",",",`
|