decocms 2.443.0 → 2.443.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/dist/client/assets/{AlertCircle-C0w7vkhj.js → AlertCircle-CZWA2nH8.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-DNyQYu-V.js → ArrowUpRight-DXFfY2Nq.js} +1 -1
  3. package/dist/client/assets/{Check-8AgR6ZjG.js → Check-B7DufF9O.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-CEi1N2Mq.js → CheckCircle-B3a532XL.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-DhOfQXzQ.js → ChevronDown-DhIkdEzt.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DQs4tkMm.js → ChevronRight-BQDeINW7.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BJ7RKHi2.js → ChevronUp-BMLC4SgN.js} +1 -1
  8. package/dist/client/assets/{Container-nZYBPJRv.js → Container-DprTine2.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-C00j11Qg.js → DotsVertical-BebTEDkn.js} +1 -1
  10. package/dist/client/assets/{Eye-B7Xkt1CB.js → Eye-DgcZpf5x.js} +1 -1
  11. package/dist/client/assets/{FilterLines-FHjfh1pF.js → FilterLines-uT-sk3rc.js} +1 -1
  12. package/dist/client/assets/{Globe01-Uo6KHfk2.js → Globe01-Dd7C_j_O.js} +1 -1
  13. package/dist/client/assets/{HardDrive-CGMuM2Oy.js → HardDrive-BtjljIRu.js} +1 -1
  14. package/dist/client/assets/{Key01-BIkGax_i.js → Key01-D1UyWXgw.js} +1 -1
  15. package/dist/client/assets/{LinkExternal01-DycVPnNy.js → LinkExternal01-Brj_TJxd.js} +1 -1
  16. package/dist/client/assets/{Monitor01-D1U6Pa3W.js → Monitor01-DFXqifzv.js} +1 -1
  17. package/dist/client/assets/{Palette-Toq4eQ-J.js → Palette-Bq9PMsoj.js} +1 -1
  18. package/dist/client/assets/{Play-CA-oDPY7.js → Play-C9o4InoB.js} +1 -1
  19. package/dist/client/assets/{Plus-DgS5eNSe.js → Plus-DdlGCl-J.js} +1 -1
  20. package/dist/client/assets/{RefreshCcw01-DVTjMN9w.js → RefreshCcw01-CZGSpPEW.js} +1 -1
  21. package/dist/client/assets/{SearchMd-WbJoDaWs.js → SearchMd-88EikaJB.js} +1 -1
  22. package/dist/client/assets/{Settings02-rrw51k4M.js → Settings02-B1lp2SVd.js} +1 -1
  23. package/dist/client/assets/{Shield01-5itVZGiR.js → Shield01-_I_z0Yxe.js} +1 -1
  24. package/dist/client/assets/{Star01-CeDy0qEH.js → Star01-b362v54F.js} +1 -1
  25. package/dist/client/assets/{Stars01-DYDsxZnS.js → Stars01-DAcarfyW.js} +1 -1
  26. package/dist/client/assets/{Stars02-ButLG8tI.js → Stars02-BFmBskXR.js} +1 -1
  27. package/dist/client/assets/{Sun-DB_K22EW.js → Sun-BaMRN3tl.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-5B3DSr8e.js → SwitchHorizontal01-LvHBRitv.js} +1 -1
  29. package/dist/client/assets/{Tool01-BcHwzAg_.js → Tool01-B3nr_Qai.js} +1 -1
  30. package/dist/client/assets/{Trash01-C9vkf5T6.js → Trash01-DzP4bSXT.js} +1 -1
  31. package/dist/client/assets/{Upload01-BXTkAAEz.js → Upload01-DJAirPOl.js} +1 -1
  32. package/dist/client/assets/{User01-C3qNbl-c.js → User01-D7oZ1u1w.js} +1 -1
  33. package/dist/client/assets/{Users01-C95xm0Ia.js → Users01-CQa1tUzy.js} +1 -1
  34. package/dist/client/assets/{Users03-Cgth-3GS.js → Users03-C7bMD3jg.js} +1 -1
  35. package/dist/client/assets/{X-FDfBE4i9.js → X-DEXMke5_.js} +1 -1
  36. package/dist/client/assets/{XCircle-8FTuCNvR.js → XCircle-B5jqknVe.js} +1 -1
  37. package/dist/client/assets/{XClose-BfJTW_HK.js → XClose-CpZzpgAq.js} +1 -1
  38. package/dist/client/assets/{Zap-DK6MOOIv.js → Zap-8zhK1JZ1.js} +1 -1
  39. package/dist/client/assets/{ZapSquare-wTPdLQod.js → ZapSquare-DT1D4OAA.js} +1 -1
  40. package/dist/client/assets/{ZoomOut-NkImUVHk.js → ZoomOut-C10GWzTz.js} +1 -1
  41. package/dist/client/assets/{access-gate-DwKbtSzY.js → access-gate-ChprljzU.js} +1 -1
  42. package/dist/client/assets/accordion-Dk7Q-28t.js +1 -0
  43. package/dist/client/assets/{add-section-modal-D23n3egw.js → add-section-modal-5UNgBmcq.js} +1 -1
  44. package/dist/client/assets/{agent-capabilities-CpWXCeRz.js → agent-capabilities-DtKIatZt.js} +1 -1
  45. package/dist/client/assets/{agent-icon-ExlCX9f5.js → agent-icon-DJnCVbR0.js} +1 -1
  46. package/dist/client/assets/{agent-icons-DAJPmC7Z.js → agent-icons-gxkxqZlA.js} +1 -1
  47. package/dist/client/assets/{agents-list-DdCb3QPP.js → agents-list-D-EW2m0k.js} +1 -1
  48. package/dist/client/assets/{ai-providers-D52L7y0S.js → ai-providers-DU29lPIn.js} +1 -1
  49. package/dist/client/assets/{alert-saVtzR2u.js → alert-CJmrA1-_.js} +1 -1
  50. package/dist/client/assets/{alert-dialog-rlUwGNsJ.js → alert-dialog-Bfzm0Sn1.js} +1 -1
  51. package/dist/client/assets/app-editor-BA0Rnv-W.js +1 -0
  52. package/dist/client/assets/{auth-catchall-DtCKOmFI.js → auth-catchall-Bmq1g-xe.js} +1 -1
  53. package/dist/client/assets/{auth-split-layout-DaXnlxNx.js → auth-split-layout-dlovNwqZ.js} +1 -1
  54. package/dist/client/assets/{automation-list-row-BYivUbaE.js → automation-list-row-DfQIV2Dv.js} +1 -1
  55. package/dist/client/assets/{automation-runs-B9Hv9eE-.js → automation-runs-B2hZA4Kn.js} +1 -1
  56. package/dist/client/assets/{automations-A6uZCwrZ.js → automations-DLu0_3ZB.js} +1 -1
  57. package/dist/client/assets/{avatar-GGBvmgaP.js → avatar-BCcehYOw.js} +1 -1
  58. package/dist/client/assets/{badge-BYAYJbYP.js → badge-Dxvv_o2R.js} +1 -1
  59. package/dist/client/assets/{brand-context-C7vqZWF-.js → brand-context-B9uo781k.js} +1 -1
  60. package/dist/client/assets/{buckets-Cv2ETh1T.js → buckets-B2ukbmRF.js} +1 -1
  61. package/dist/client/assets/{calendar-xjXZIDeb.js → calendar-alfK9fhJ.js} +1 -1
  62. package/dist/client/assets/{capability-load-error-CUPCgjg9.js → capability-load-error-Dz7EyokS.js} +1 -1
  63. package/dist/client/assets/{card-7rOCFixx.js → card-DwoGuIpq.js} +1 -1
  64. package/dist/client/assets/{chat-context-T6Hxtz67.js → chat-context-D4gb0Scc.js} +1 -1
  65. package/dist/client/assets/{checkbox-DotF6hoA.js → checkbox-CWwDb0cu.js} +1 -1
  66. package/dist/client/assets/{cli-auth-success-C_1kF7Fn.js → cli-auth-success-CKRlzllD.js} +1 -1
  67. package/dist/client/assets/collection-detail-DcSclG2P.js +1 -0
  68. package/dist/client/assets/{collection-display-button-Cn72Xu3L.js → collection-display-button-BoA_VnYw.js} +1 -1
  69. package/dist/client/assets/{collection-search-loHJ7IYX.js → collection-search-C5IBLwI6.js} +1 -1
  70. package/dist/client/assets/{collection-table-wrapper-CB8ynCFf.js → collection-table-wrapper-CT-F8LmT.js} +1 -1
  71. package/dist/client/assets/{collection-tabs-IuChGrKO.js → collection-tabs-Bm-12qTR.js} +1 -1
  72. package/dist/client/assets/{collections-BY2lU4NZ.js → collections-D79oYVs-.js} +1 -1
  73. package/dist/client/assets/{command-CYcMZe50.js → command-DbOdOn2n.js} +1 -1
  74. package/dist/client/assets/{connect-desktop-dialog-BjjpdcQ_.js → connect-desktop-dialog-Cl2Sz5Lx.js} +1 -1
  75. package/dist/client/assets/{connection-card-C98P6TUE.js → connection-card-JnLktoFU.js} +1 -1
  76. package/dist/client/assets/{connection-detail-DzFlb_go.js → connection-detail-BhA_swsb.js} +1 -1
  77. package/dist/client/assets/{connection-form-helpers-B_et0Rp5.js → connection-form-helpers-DGv50Ov6.js} +1 -1
  78. package/dist/client/assets/{connections-B1EHRtVn.js → connections-D7jUJRkf.js} +1 -1
  79. package/dist/client/assets/{constants-P1xnRFeX.js → constants-h1Hu02Pl.js} +1 -1
  80. package/dist/client/assets/{decopilot-sse-pool-CnTXTZP-.js → decopilot-sse-pool-CsEl5FJL.js} +1 -1
  81. package/dist/client/assets/{dialog-C3j-c3SR.js → dialog-C-asYC2o.js} +1 -1
  82. package/dist/client/assets/{domain-settings-8dDTfx0k.js → domain-settings-B1U-lr-C.js} +1 -1
  83. package/dist/client/assets/{drawer-ySjhgvkO.js → drawer-BgbFTtty.js} +1 -1
  84. package/dist/client/assets/{dropdown-menu-DKiorR9d.js → dropdown-menu-DLTe8MWs.js} +1 -1
  85. package/dist/client/assets/{dynamic-plugin-layout-CtrFibYD.js → dynamic-plugin-layout-BLaOVD7L.js} +1 -1
  86. package/dist/client/assets/{empty-state-D0UPz__M.js → empty-state-CBUfB2GJ.js} +1 -1
  87. package/dist/client/assets/{empty-state-CsQfijIL.js → empty-state-DDTXMCO_.js} +1 -1
  88. package/dist/client/assets/{extract-connection-data-DQPoIIzo.js → extract-connection-data-DHULaZ4q.js} +1 -1
  89. package/dist/client/assets/{features-DOYt53uh.js → features-n0dTbit2.js} +1 -1
  90. package/dist/client/assets/{file-explorer-BcIDvGnY.js → file-explorer-BAFEd0NP.js} +1 -1
  91. package/dist/client/assets/{file-preview-kcOvLrSx.js → file-preview-CVTyFcNA.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-DWtzaQPp.js → file-type-icon-DiMBps0i.js} +1 -1
  93. package/dist/client/assets/{files-x6DVqY52.js → files-Dp4-coqo.js} +1 -1
  94. package/dist/client/assets/{form-w7JkvptQ.js → form-DcYfsvAB.js} +1 -1
  95. package/dist/client/assets/{general-BPDsNgDe.js → general-BHPyq_-g.js} +1 -1
  96. package/dist/client/assets/{generate-id-BsvOSxwt.js → generate-id-CHF9qC8v.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-B_v87FGw.js → github-repo-picker-vgbSu5iY.js} +1 -1
  98. package/dist/client/assets/{hover-card-B_RJCrCA.js → hover-card-Bi21pBU4.js} +1 -1
  99. package/dist/client/assets/{image-field-Cru0b2ZK.js → image-field-DoKub9f6.js} +1 -1
  100. package/dist/client/assets/{index-CswQOvGx.js → index-BBtzzfJI.js} +1 -1
  101. package/dist/client/assets/index-BCtg-ofa.js +1 -0
  102. package/dist/client/assets/{index-pO-YX1wf.js → index-BKi6N-tx.js} +25 -25
  103. package/dist/client/assets/{index-NioO90_M.js → index-BLjO-ihk.js} +1 -1
  104. package/dist/client/assets/{index-EVJ_UeFF.js → index-Bs5fxOOB.js} +3 -3
  105. package/dist/client/assets/{index-Cwd5mIBy.js → index-CDgtzHtW.js} +1 -1
  106. package/dist/client/assets/{index-BiOB1WZm.js → index-C_zwlUYa.js} +1 -1
  107. package/dist/client/assets/{index-B7LqxKQ-.js → index-DDGP_6P-.js} +1 -1
  108. package/dist/client/assets/{index-vNb1uvqd.js → index-Dh4s8pMn.js} +1 -1
  109. package/dist/client/assets/{index-CJoBkEf_.js → index-DoLgm5xJ.js} +3 -3
  110. package/dist/client/assets/{index-mPypacb-.js → index-DqPY9Bgk.js} +1 -1
  111. package/dist/client/assets/{index-C4kuSARI.js → index-Dvc_l9fe.js} +1 -1
  112. package/dist/client/assets/{index-Ck3k86Ip.js → index-a11Lx-OW.js} +1 -1
  113. package/dist/client/assets/{index-redirect-mdT-wByU.js → index-redirect-lTXXknoq.js} +1 -1
  114. package/dist/client/assets/{index-CKPUoGqe.js → index-yh2aXH-0.js} +1 -1
  115. package/dist/client/assets/{infiniteQueryObserver-hzkIseBw.js → infiniteQueryObserver-DvYnKas5.js} +1 -1
  116. package/dist/client/assets/{input-BZDQfdYn.js → input-DKgzjTqx.js} +1 -1
  117. package/dist/client/assets/{integration-icon-DYz5eywh.js → integration-icon-DOg8lUEK.js} +1 -1
  118. package/dist/client/assets/{label-09bf4ZUr.js → label-CFa8MFdj.js} +1 -1
  119. package/dist/client/assets/{layout-hMbyvZRj.js → layout-BONESzv4.js} +1 -1
  120. package/dist/client/assets/{login-BWhh5Wx9.js → login-BUll2EP0.js} +1 -1
  121. package/dist/client/assets/{members-PDEQDpHB.js → members-DdoqCGvI.js} +1 -1
  122. package/dist/client/assets/{monaco-editor-B2MBxzPo.js → monaco-editor-DtMDBznS.js} +1 -1
  123. package/dist/client/assets/{monitoring-stats-row-D8gHIB7G.js → monitoring-stats-row-BapIOHm7.js} +1 -1
  124. package/dist/client/assets/{oauth-callback-BlANIrYK.js → oauth-callback-C-zOQYfK.js} +1 -1
  125. package/dist/client/assets/{oauth-callback-ai-provider-ClHHYRKz.js → oauth-callback-ai-provider-DlnjgMD7.js} +1 -1
  126. package/dist/client/assets/{onboarding-lvXp9VmW.js → onboarding-g1-Y-MfC.js} +1 -1
  127. package/dist/client/assets/{org-install-C2fZgqt9.js → org-install-BTJrtDpZ.js} +1 -1
  128. package/dist/client/assets/{org-layout-NE6bn4Sq.js → org-layout-CvrkU3K2.js} +1 -1
  129. package/dist/client/assets/{org-plugin-layout-hZqikTN5.js → org-plugin-layout-BExflMAw.js} +1 -1
  130. package/dist/client/assets/{page-seo-form-aB22X3RV.js → page-seo-form-CubEWrg6.js} +1 -1
  131. package/dist/client/assets/page-seo-sheet-B5ltGvRt.js +1 -0
  132. package/dist/client/assets/{pair-B1HhmTC2.js → pair-CcKUxOpV.js} +1 -1
  133. package/dist/client/assets/{plugin-empty-state-Bq8PMk0Q.js → plugin-empty-state-DLFBKaPz.js} +1 -1
  134. package/dist/client/assets/{plugin-header-C3QgrcHM.js → plugin-header-CLwSjE0J.js} +1 -1
  135. package/dist/client/assets/{plugin-layout-D8j3qU9M.js → plugin-layout-C02I389s.js} +1 -1
  136. package/dist/client/assets/{popover-D7H0zNnu.js → popover-CAUP1BNb.js} +1 -1
  137. package/dist/client/assets/{post-editor-Q0aCt3BM.js → post-editor-Drz2Eab1.js} +1 -1
  138. package/dist/client/assets/{primitives-JHMgB1o-.js → primitives-CXryVT6L.js} +1 -1
  139. package/dist/client/assets/{profile-B9yqAVYS.js → profile-D65b5iWG.js} +1 -1
  140. package/dist/client/assets/{project-app-view-CQ14p1sb.js → project-app-view-BbeatmvL.js} +1 -1
  141. package/dist/client/assets/record-editor-CekyWQKV.js +1 -0
  142. package/dist/client/assets/registry-D2u_uWpG.js +2 -0
  143. package/dist/client/assets/{registry-layout-DYhQxzqY.js → registry-layout-B1tTNZCj.js} +1 -1
  144. package/dist/client/assets/{require-capability-DJDpC59C.js → require-capability-kQtzy73_.js} +1 -1
  145. package/dist/client/assets/{required-auth-layout-D_pVrMnQ.js → required-auth-layout-DoJBYTK7.js} +1 -1
  146. package/dist/client/assets/{reset-password-DzpB5VA8.js → reset-password-Dj6PXWH2.js} +1 -1
  147. package/dist/client/assets/{roles-BIa4EfJE.js → roles-C8T8UgqZ.js} +1 -1
  148. package/dist/client/assets/{save-status-B_RrNks8.js → save-status-DcbUOEsL.js} +1 -1
  149. package/dist/client/assets/schema-form-DGKrspeM.js +1 -0
  150. package/dist/client/assets/{scroll-area-DCO9LjjC.js → scroll-area-BhZZYQyk.js} +1 -1
  151. package/dist/client/assets/{search-input-BkjmAgNX.js → search-input-D-UUT0vq.js} +1 -1
  152. package/dist/client/assets/{secrets-eB4KGgEb.js → secrets-CYRDbt9b.js} +1 -1
  153. package/dist/client/assets/{sections-editor-DcoSMLUX.js → sections-editor-x1CRZCFt.js} +2 -2
  154. package/dist/client/assets/{select-D3xFKLhW.js → select-BqVzUjvA.js} +1 -1
  155. package/dist/client/assets/{select-model-DClZJUk2.js → select-model-rPu-NTfe.js} +1 -1
  156. package/dist/client/assets/{seo-editor-DEb43_7H.js → seo-editor-CWxIx22-.js} +1 -1
  157. package/dist/client/assets/{settings-layout-Y8ddbgRB.js → settings-layout-CwfaDJUd.js} +1 -1
  158. package/dist/client/assets/{settings-section-xKZ0B7RQ.js → settings-section-BaJoW4YL.js} +1 -1
  159. package/dist/client/assets/{sheet-y48NbizY.js → sheet-BJnnVAor.js} +1 -1
  160. package/dist/client/assets/{shell-controls-DTs3k-tY.js → shell-controls-Di_I0aR7.js} +1 -1
  161. package/dist/client/assets/{shell-layout-CtsnLkL0.js → shell-layout-C8xCDde2.js} +1 -1
  162. package/dist/client/assets/{shell-route-loading-2R_HkOJm.js → shell-route-loading-SSKWvym2.js} +1 -1
  163. package/dist/client/assets/{sidebar-BNHENVF_.js → sidebar-BItduOLp.js} +1 -1
  164. package/dist/client/assets/{skeleton-BWDI6b5B.js → skeleton-BITJK7H7.js} +1 -1
  165. package/dist/client/assets/{sortable.esm-D1-ateSo.js → sortable.esm-2KwbcifU.js} +1 -1
  166. package/dist/client/assets/{spinner-BLcfraim.js → spinner-D3DwAv1t.js} +1 -1
  167. package/dist/client/assets/{sso-B-Hyr04j.js → sso-AGe3fKNz.js} +1 -1
  168. package/dist/client/assets/{store-DtSOq-my.js → store-CiA5SmK4.js} +1 -1
  169. package/dist/client/assets/store-registry-0coppvYh.js +2 -0
  170. package/dist/client/assets/{switch-DFEmgVSQ.js → switch-C7IedEah.js} +1 -1
  171. package/dist/client/assets/{tab-id-BfrA42Sy.js → tab-id-DkCs8lF_.js} +1 -1
  172. package/dist/client/assets/{table-zHqbyGEy.js → table-CgfREqGw.js} +1 -1
  173. package/dist/client/assets/{tabs-Dj3HihPI.js → tabs-D8e1US14.js} +1 -1
  174. package/dist/client/assets/{task-status-gyYC-BVM.js → task-status-CxSktPB-.js} +1 -1
  175. package/dist/client/assets/{textarea-Kw6SbqZA.js → textarea-07GHniRL.js} +1 -1
  176. package/dist/client/assets/{toggle-group-CgAd7Mg_.js → toggle-group-vrtDLNQt.js} +1 -1
  177. package/dist/client/assets/{toolbar-D7UKSzZi.js → toolbar-DHbG5RVx.js} +1 -1
  178. package/dist/client/assets/{tools-list-X7Olg8ty.js → tools-list-CBmqUrzf.js} +1 -1
  179. package/dist/client/assets/{tooltip-BseNApEN.js → tooltip-C4Mvcc3-.js} +1 -1
  180. package/dist/client/assets/{types-CEUmohd_.js → types-CU1XYsZ6.js} +1 -1
  181. package/dist/client/assets/{use-ai-providers-DSjz3Xn-.js → use-ai-providers-BrNyOb2S.js} +1 -1
  182. package/dist/client/assets/{use-automations-DD-gzzG-.js → use-automations-kjzpslcz.js} +1 -1
  183. package/dist/client/assets/{use-capability-BETReHdP.js → use-capability-DMQVY-z7.js} +1 -1
  184. package/dist/client/assets/{use-collections-C-e494pb.js → use-collections-0elTitFK.js} +1 -1
  185. package/dist/client/assets/{use-connection-COB3wZyv.js → use-connection-BFK8HgLm.js} +1 -1
  186. package/dist/client/assets/{use-copy-B4ijm3eQ.js → use-copy--KxUwDht.js} +1 -1
  187. package/dist/client/assets/{use-create-virtual-mcp-DHggusOz.js → use-create-virtual-mcp-xfijFFeU.js} +1 -1
  188. package/dist/client/assets/{use-debounced-autosave-7RLEJTRO.js → use-debounced-autosave-EPr2q190.js} +1 -1
  189. package/dist/client/assets/{use-delete-connection-CWde71K0.js → use-delete-connection-DThowArC.js} +1 -1
  190. package/dist/client/assets/{use-file-configs-BXchIe2N.js → use-file-configs-BFWFGnU_.js} +1 -1
  191. package/dist/client/assets/{use-infinite-scroll-BTrNIqxO.js → use-infinite-scroll-Bsai9Hjv.js} +1 -1
  192. package/dist/client/assets/{use-list-state-DSHFjIyq.js → use-list-state-bJ_RuI2S.js} +1 -1
  193. package/dist/client/assets/{use-mcp-prompts-CLrlZKHJ.js → use-mcp-prompts-B0SzsQFQ.js} +1 -1
  194. package/dist/client/assets/{use-mcp-tools-BdUmFkbH.js → use-mcp-tools-CQC_DvOV.js} +1 -1
  195. package/dist/client/assets/{use-members-CaSqF02H.js → use-members-Bmr4BOrW.js} +1 -1
  196. package/dist/client/assets/{use-navigate-to-agent-BLkLok3n.js → use-navigate-to-agent-DHuSnk-7.js} +1 -1
  197. package/dist/client/assets/{use-org-auth-client-Bl3vPuak.js → use-org-auth-client-rr7_FC67.js} +1 -1
  198. package/dist/client/assets/{use-org-sso-Bm8Zb6fp.js → use-org-sso-CUWrIQka.js} +1 -1
  199. package/dist/client/assets/{use-organization-roles-JDC-YH-l.js → use-organization-roles-G_sIrmcQ.js} +1 -1
  200. package/dist/client/assets/{use-organization-settings-D5g7NFw1.js → use-organization-settings-Y6xPrKF0.js} +1 -1
  201. package/dist/client/assets/{use-registry-connections-BfC5RU93.js → use-registry-connections-D2Pb5Zae.js} +1 -1
  202. package/dist/client/assets/{use-secrets-BjVtsdxA.js → use-secrets-B2BL0CXw.js} +1 -1
  203. package/dist/client/assets/{use-status-sounds-9imVHc_4.js → use-status-sounds-BgSY6E7R.js} +1 -1
  204. package/dist/client/assets/{use-view-mode-CUhYlh8A.js → use-view-mode-BzGrBtpu.js} +1 -1
  205. package/dist/client/assets/{use-virtual-mcp-C09vm-BM.js → use-virtual-mcp-C5RbeZo0.js} +1 -1
  206. package/dist/client/assets/useInfiniteQuery-C0Nzygow.js +1 -0
  207. package/dist/client/assets/{useRouterState-BjzQ0bsm.js → useRouterState-CAzgDa1e.js} +1 -1
  208. package/dist/client/assets/useSuspenseInfiniteQuery-DhuueYPO.js +1 -0
  209. package/dist/client/assets/{user-Coaz5g4K.js → user-C3BOkzKG.js} +1 -1
  210. package/dist/client/assets/{view-mode-toggle-CoifNzqg.js → view-mode-toggle-BM4piPkb.js} +1 -1
  211. package/dist/client/assets/workflow-detail-CVGljoUQ.js +1 -0
  212. package/dist/client/assets/{workflow-53Ic0UX5.js → workflow-zG_0zF_e.js} +1 -1
  213. package/dist/client/index.html +1 -1
  214. package/dist/server/cli.js +2 -2
  215. package/dist/server/server.js +1 -1
  216. package/package.json +1 -1
  217. package/dist/client/assets/accordion-BrfX2IfA.js +0 -1
  218. package/dist/client/assets/app-editor-DR7rTN1y.js +0 -1
  219. package/dist/client/assets/collection-detail-Bfy-MA_d.js +0 -1
  220. package/dist/client/assets/index-D935qYUN.js +0 -1
  221. package/dist/client/assets/page-seo-sheet-9U2O7bHl.js +0 -1
  222. package/dist/client/assets/record-editor-DcoIPsEz.js +0 -1
  223. package/dist/client/assets/registry-a7dn3L4L.js +0 -2
  224. package/dist/client/assets/schema-form-B58UjuIl.js +0 -1
  225. package/dist/client/assets/store-registry-D5nKgOXT.js +0 -2
  226. package/dist/client/assets/useInfiniteQuery--C6hdwWo.js +0 -1
  227. package/dist/client/assets/useSuspenseInfiniteQuery-BZeP3q20.js +0 -1
  228. package/dist/client/assets/workflow-detail-xBmS8ZJ3.js +0 -1
@@ -1 +1 @@
1
- import{P as z,a as G,D as H,k as J,l as Q}from"./scroll-area-DCO9LjjC.js";function V(x){var l;const{char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:v}=x,B=b&&!P,y=Q(D),K=new RegExp(`\\s${y}$`),h=F?"^":"",M=P?"":y,N=B?new RegExp(`${h}${y}.*?(?=\\s${M}|$)`,"gm"):new RegExp(`${h}(?:^)?${y}[^\\s${M}]*`,"gm"),q=((l=v.nodeBefore)==null?void 0:l.isText)&&v.nodeBefore.text;if(!q)return null;const O=v.pos-q.length,u=Array.from(q.matchAll(N)).pop();if(!u||u.input===void 0||u.index===void 0)return null;const d=u.input.slice(Math.max(0,u.index-1),u.index),e=new RegExp(`^[${E?.join("")}\0]?$`).test(d);if(E!==null&&!e)return null;const I=O+u.index;let p=I+u[0].length;return B&&K.test(q.slice(p-1,p+1))&&(u[0]+=" ",p+=1),I<v.pos&&p>=v.pos?{range:{from:I,to:p},query:u[0].slice(D.length),text:u[0]}:null}var W=new z("suggestion");function Y({pluginKey:x=W,editor:l,char:D="@",allowSpaces:b=!1,allowToIncludeChar:P=!1,allowedPrefixes:E=[" "],startOfLine:F=!1,decorationTag:v="span",decorationClass:B="suggestion",decorationContent:y="",decorationEmptyClass:K="is-empty",command:h=()=>null,items:M=()=>[],render:N=()=>({}),allow:q=()=>!0,findSuggestionMatch:O=V,shouldShow:u}){let d;const e=N?.(),I=()=>{const n=l.state.selection.$anchor.pos,a=l.view.coordsAtPos(n),{top:r,right:s,bottom:o,left:c}=a;try{return new DOMRect(c,r,s-c,o-r)}catch{return null}},p=(n,a)=>a?()=>{const r=x.getState(l.state),s=r?.decorationId,o=n.dom.querySelector(`[data-decoration-id="${s}"]`);return o?.getBoundingClientRect()||null}:I;function U(n,a){var r;try{const o=x.getState(n.state),c=o?.decorationId?n.dom.querySelector(`[data-decoration-id="${o.decorationId}"]`):null,g={editor:l,range:o?.range||{from:0,to:0},query:o?.query||null,text:o?.text||null,items:[],command:m=>h({editor:l,range:o?.range||{from:0,to:0},props:m}),decorationNode:c,clientRect:p(n,c)};(r=e?.onExit)==null||r.call(e,g)}catch{}const s=n.state.tr.setMeta(a,{exit:!0});n.dispatch(s)}const C=new G({key:x,view(){return{update:async(n,a)=>{var r,s,o,c,g,m,S;const t=(r=this.key)==null?void 0:r.getState(a),f=(s=this.key)==null?void 0:s.getState(n.state),i=t.active&&f.active&&t.range.from!==f.range.from,_=!t.active&&f.active,k=t.active&&!f.active,R=!_&&!k&&t.query!==f.query,w=_||i&&R,A=R||i,j=k||i&&R;if(!w&&!A&&!j)return;const $=j&&!w?t:f,T=n.dom.querySelector(`[data-decoration-id="${$.decorationId}"]`);d={editor:l,range:$.range,query:$.query,text:$.text,items:[],command:L=>h({editor:l,range:$.range,props:L}),decorationNode:T,clientRect:p(n,T)},w&&((o=e?.onBeforeStart)==null||o.call(e,d)),A&&((c=e?.onBeforeUpdate)==null||c.call(e,d)),(A||w)&&(d.items=await M({editor:l,query:$.query})),j&&((g=e?.onExit)==null||g.call(e,d)),A&&((m=e?.onUpdate)==null||m.call(e,d)),w&&((S=e?.onStart)==null||S.call(e,d))},destroy:()=>{var n;d&&((n=e?.onExit)==null||n.call(e,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(n,a,r,s){const{isEditable:o}=l,{composing:c}=l.view,{selection:g}=n,{empty:m,from:S}=g,t={...a},f=n.getMeta(x);if(f&&f.exit)return t.active=!1,t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null,t;if(t.composing=c,o&&(m||l.view.composing)){(S<a.range.from||S>a.range.to)&&!c&&!a.composing&&(t.active=!1);const i=O({char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:g.$from}),_=`id_${Math.floor(Math.random()*4294967295)}`;i&&q({editor:l,state:s,range:i.range,isActive:a.active})&&(!u||u({editor:l,range:i.range,query:i.query,text:i.text,transaction:n}))?(t.active=!0,t.decorationId=a.decorationId?a.decorationId:_,t.range=i.range,t.query=i.query,t.text=i.text):t.active=!1}else t.active=!1;return t.active||(t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null),t}},props:{handleKeyDown(n,a){var r,s,o,c;const{active:g,range:m}=C.getState(n.state);if(!g)return!1;if(a.key==="Escape"||a.key==="Esc"){const t=C.getState(n.state),f=(r=d?.decorationNode)!=null?r:null,i=f??(t?.decorationId?n.dom.querySelector(`[data-decoration-id="${t.decorationId}"]`):null);if(((s=e?.onKeyDown)==null?void 0:s.call(e,{view:n,event:a,range:t.range}))||!1)return!0;const k={editor:l,range:t.range,query:t.query,text:t.text,items:[],command:R=>h({editor:l,range:t.range,props:R}),decorationNode:i,clientRect:i?()=>i.getBoundingClientRect()||null:null};return(o=e?.onExit)==null||o.call(e,k),U(n,x),!0}return((c=e?.onKeyDown)==null?void 0:c.call(e,{view:n,event:a,range:m}))||!1},decorations(n){const{active:a,range:r,decorationId:s,query:o}=C.getState(n);if(!a)return null;const c=!o?.length,g=[B];return c&&g.push(K),H.create(n.doc,[J.inline(r.from,r.to,{nodeName:v,class:g.join(" "),"data-decoration-id":s,"data-decoration-content":y})])}}});return C}export{Y as S};
1
+ import{P as z,a as G,D as H,k as J,l as Q}from"./scroll-area-BhZZYQyk.js";function V(x){var l;const{char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:v}=x,B=b&&!P,y=Q(D),K=new RegExp(`\\s${y}$`),h=F?"^":"",M=P?"":y,N=B?new RegExp(`${h}${y}.*?(?=\\s${M}|$)`,"gm"):new RegExp(`${h}(?:^)?${y}[^\\s${M}]*`,"gm"),q=((l=v.nodeBefore)==null?void 0:l.isText)&&v.nodeBefore.text;if(!q)return null;const O=v.pos-q.length,u=Array.from(q.matchAll(N)).pop();if(!u||u.input===void 0||u.index===void 0)return null;const d=u.input.slice(Math.max(0,u.index-1),u.index),e=new RegExp(`^[${E?.join("")}\0]?$`).test(d);if(E!==null&&!e)return null;const I=O+u.index;let p=I+u[0].length;return B&&K.test(q.slice(p-1,p+1))&&(u[0]+=" ",p+=1),I<v.pos&&p>=v.pos?{range:{from:I,to:p},query:u[0].slice(D.length),text:u[0]}:null}var W=new z("suggestion");function Y({pluginKey:x=W,editor:l,char:D="@",allowSpaces:b=!1,allowToIncludeChar:P=!1,allowedPrefixes:E=[" "],startOfLine:F=!1,decorationTag:v="span",decorationClass:B="suggestion",decorationContent:y="",decorationEmptyClass:K="is-empty",command:h=()=>null,items:M=()=>[],render:N=()=>({}),allow:q=()=>!0,findSuggestionMatch:O=V,shouldShow:u}){let d;const e=N?.(),I=()=>{const n=l.state.selection.$anchor.pos,a=l.view.coordsAtPos(n),{top:r,right:s,bottom:o,left:c}=a;try{return new DOMRect(c,r,s-c,o-r)}catch{return null}},p=(n,a)=>a?()=>{const r=x.getState(l.state),s=r?.decorationId,o=n.dom.querySelector(`[data-decoration-id="${s}"]`);return o?.getBoundingClientRect()||null}:I;function U(n,a){var r;try{const o=x.getState(n.state),c=o?.decorationId?n.dom.querySelector(`[data-decoration-id="${o.decorationId}"]`):null,g={editor:l,range:o?.range||{from:0,to:0},query:o?.query||null,text:o?.text||null,items:[],command:m=>h({editor:l,range:o?.range||{from:0,to:0},props:m}),decorationNode:c,clientRect:p(n,c)};(r=e?.onExit)==null||r.call(e,g)}catch{}const s=n.state.tr.setMeta(a,{exit:!0});n.dispatch(s)}const C=new G({key:x,view(){return{update:async(n,a)=>{var r,s,o,c,g,m,S;const t=(r=this.key)==null?void 0:r.getState(a),f=(s=this.key)==null?void 0:s.getState(n.state),i=t.active&&f.active&&t.range.from!==f.range.from,_=!t.active&&f.active,k=t.active&&!f.active,R=!_&&!k&&t.query!==f.query,w=_||i&&R,A=R||i,j=k||i&&R;if(!w&&!A&&!j)return;const $=j&&!w?t:f,T=n.dom.querySelector(`[data-decoration-id="${$.decorationId}"]`);d={editor:l,range:$.range,query:$.query,text:$.text,items:[],command:L=>h({editor:l,range:$.range,props:L}),decorationNode:T,clientRect:p(n,T)},w&&((o=e?.onBeforeStart)==null||o.call(e,d)),A&&((c=e?.onBeforeUpdate)==null||c.call(e,d)),(A||w)&&(d.items=await M({editor:l,query:$.query})),j&&((g=e?.onExit)==null||g.call(e,d)),A&&((m=e?.onUpdate)==null||m.call(e,d)),w&&((S=e?.onStart)==null||S.call(e,d))},destroy:()=>{var n;d&&((n=e?.onExit)==null||n.call(e,d))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(n,a,r,s){const{isEditable:o}=l,{composing:c}=l.view,{selection:g}=n,{empty:m,from:S}=g,t={...a},f=n.getMeta(x);if(f&&f.exit)return t.active=!1,t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null,t;if(t.composing=c,o&&(m||l.view.composing)){(S<a.range.from||S>a.range.to)&&!c&&!a.composing&&(t.active=!1);const i=O({char:D,allowSpaces:b,allowToIncludeChar:P,allowedPrefixes:E,startOfLine:F,$position:g.$from}),_=`id_${Math.floor(Math.random()*4294967295)}`;i&&q({editor:l,state:s,range:i.range,isActive:a.active})&&(!u||u({editor:l,range:i.range,query:i.query,text:i.text,transaction:n}))?(t.active=!0,t.decorationId=a.decorationId?a.decorationId:_,t.range=i.range,t.query=i.query,t.text=i.text):t.active=!1}else t.active=!1;return t.active||(t.decorationId=null,t.range={from:0,to:0},t.query=null,t.text=null),t}},props:{handleKeyDown(n,a){var r,s,o,c;const{active:g,range:m}=C.getState(n.state);if(!g)return!1;if(a.key==="Escape"||a.key==="Esc"){const t=C.getState(n.state),f=(r=d?.decorationNode)!=null?r:null,i=f??(t?.decorationId?n.dom.querySelector(`[data-decoration-id="${t.decorationId}"]`):null);if(((s=e?.onKeyDown)==null?void 0:s.call(e,{view:n,event:a,range:t.range}))||!1)return!0;const k={editor:l,range:t.range,query:t.query,text:t.text,items:[],command:R=>h({editor:l,range:t.range,props:R}),decorationNode:i,clientRect:i?()=>i.getBoundingClientRect()||null:null};return(o=e?.onExit)==null||o.call(e,k),U(n,x),!0}return((c=e?.onKeyDown)==null?void 0:c.call(e,{view:n,event:a,range:m}))||!1},decorations(n){const{active:a,range:r,decorationId:s,query:o}=C.getState(n);if(!a)return null;const c=!o?.length,g=[B];return c&&g.push(K),H.create(n.doc,[J.inline(r.from,r.to,{nodeName:v,class:g.join(" "),"data-decoration-id":s,"data-decoration-content":y})])}}});return C}export{Y as S};
@@ -1,8 +1,8 @@
1
- import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as rs,d as ls,t as xt,E as os}from"./index-CJoBkEf_.js";import{S as as}from"./search-input-BkjmAgNX.js";import{P as Me}from"./index-mPypacb-.js";import{E as wt}from"./empty-state-D0UPz__M.js";import{R as ns}from"./require-capability-DJDpC59C.js";import{B as rt}from"./badge-BYAYJbYP.js";import{P as ct,a as dt,b as mt}from"./popover-D7H0zNnu.js";import{b as Ze,T as et,a as tt}from"./tooltip-BseNApEN.js";import{i as ft}from"./Check-8AgR6ZjG.js";import{a as Xe}from"./Eye-B7Xkt1CB.js";import{n as Mt}from"./Globe01-Uo6KHfk2.js";import{i as Vt}from"./FilterLines-FHjfh1pF.js";import{i as is}from"./Key01-BIkGax_i.js";import{i as cs}from"./Play-CA-oDPY7.js";import{a9 as ds,aa as ms,M as us,E as xs}from"./agent-icon-ExlCX9f5.js";import{M as _t}from"./monaco-editor-B2MBxzPo.js";import{u as fs}from"./use-members-CaSqF02H.js";import{u as Dt}from"./use-connection-COB3wZyv.js";import{S as St,u as It,W as ps}from"./constants-P1xnRFeX.js";import{a as hs}from"./use-virtual-mcp-C09vm-BM.js";import{n as Qe}from"./Container-nZYBPJRv.js";import{c as gs}from"./SwitchHorizontal01-5B3DSr8e.js";import{s as js}from"./Plus-DgS5eNSe.js";import{s as vs}from"./Trash01-C9vkf5T6.js";import{I as Ge}from"./input-BZDQfdYn.js";import{g as Ns,b as Lt,f as st,a as Ut,c as pt,d as bs,e as Ft,h as Kt,A as ys,T as ws,i as Ss,M as ht}from"./automation-runs-B9Hv9eE-.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-D3xFKLhW.js";import{S as Is}from"./scroll-area-DCO9LjjC.js";import{t as qt}from"./ChevronDown-DhOfQXzQ.js";import{C as Cs}from"./calendar-xjXZIDeb.js";import{T as ks}from"./textarea-Kw6SbqZA.js";import{C as Bt}from"./collection-tabs-IuChGrKO.js";import{S as Ts}from"./switch-DFEmgVSQ.js";import{L as Ms}from"./label-09bf4ZUr.js";import{I as qe}from"./integration-icon-DYz5eywh.js";import{A as Ht}from"./avatar-GGBvmgaP.js";import{A as _s,a as Ds,b as Ls}from"./alert-saVtzR2u.js";import{C as Jt}from"./card-7rOCFixx.js";import{K as ke}from"./monitoring-stats-row-D8gHIB7G.js";import{g as Fs}from"./connection-slug-eyAPH6o3.js";import{u as $s}from"./useSuspenseInfiniteQuery-BZeP3q20.js";import{d as Rs,S as Os,a as zs,b as Es}from"./sheet-y48NbizY.js";import{T as De,a as ut,b as Gt,c as Qt,d as Wt,e as oe}from"./table-zHqbyGEy.js";import{n as As}from"./ChevronUp-BJ7RKHi2.js";import{u as Ps}from"./use-infinite-scroll-BTrNIqxO.js";import{c as Vs,b as Us}from"./use-automations-DD-gzzG-.js";import"./SearchMd-WbJoDaWs.js";import"./sidebar-BNHENVF_.js";import"./use-capability-BETReHdP.js";import"./access-gate-DwKbtSzY.js";import"./capability-load-error-CUPCgjg9.js";import"./AlertCircle-C0w7vkhj.js";import"./Tool01-BcHwzAg_.js";import"./RefreshCcw01-DVTjMN9w.js";import"./XCircle-8FTuCNvR.js";import"./ArrowUpRight-DNyQYu-V.js";import"./ZapSquare-wTPdLQod.js";import"./Users03-Cgth-3GS.js";import"./CheckCircle-CEi1N2Mq.js";import"./ChevronRight-DQs4tkMm.js";import"./DotsVertical-C00j11Qg.js";import"./ZoomOut-NkImUVHk.js";import"./Star01-CeDy0qEH.js";import"./Palette-Toq4eQ-J.js";import"./HardDrive-CGMuM2Oy.js";import"./Stars02-ButLG8tI.js";import"./LinkExternal01-DycVPnNy.js";import"./Monitor01-D1U6Pa3W.js";import"./Sun-DB_K22EW.js";import"./Settings02-rrw51k4M.js";import"./Shield01-5itVZGiR.js";import"./Stars01-DYDsxZnS.js";import"./Upload01-BXTkAAEz.js";import"./User01-C3qNbl-c.js";import"./Users01-C95xm0Ia.js";import"./XClose-BfJTW_HK.js";import"./X-FDfBE4i9.js";import"./Zap-DK6MOOIv.js";import"./spinner-BLcfraim.js";import"./use-org-auth-client-Bl3vPuak.js";import"./use-collections-C-e494pb.js";import"./useInfiniteQuery--C6hdwWo.js";import"./infiniteQueryObserver-hzkIseBw.js";import"./task-status-gyYC-BVM.js";import"./checkbox-DotF6hoA.js";import"./command-CYcMZe50.js";import"./index-CswQOvGx.js";import"./dialog-C3j-c3SR.js";import"./pair-B1HhmTC2.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B4ijm3eQ.js";import"./file-type-icon-DWtzaQPp.js";import"./content-blocks-o63cs2vh.js";import"./types-CEUmohd_.js";import"./chat-context-T6Hxtz67.js";import"./tab-id-BfrA42Sy.js";import"./decopilot-sse-pool-CnTXTZP-.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-ai-providers-DSjz3Xn-.js";import"./use-organization-settings-D5g7NFw1.js";import"./shell-layout-CtsnLkL0.js";import"./required-auth-layout-D_pVrMnQ.js";import"./useRouterState-BjzQ0bsm.js";import"./use-org-sso-Bm8Zb6fp.js";import"./use-navigate-to-agent-BLkLok3n.js";import"./use-mcp-prompts-CLrlZKHJ.js";import"./form-w7JkvptQ.js";import"./index-C4kuSARI.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function Ks(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{e as le,r as K,f as bt,q as Be,j as t,B as Z,o as Ce,c as ce,K as it,n as yt,v as rs,d as ls,t as xt,E as os}from"./index-DoLgm5xJ.js";import{S as as}from"./search-input-D-UUT0vq.js";import{P as Me}from"./index-DqPY9Bgk.js";import{E as wt}from"./empty-state-CBUfB2GJ.js";import{R as ns}from"./require-capability-kQtzy73_.js";import{B as rt}from"./badge-Dxvv_o2R.js";import{P as ct,a as dt,b as mt}from"./popover-CAUP1BNb.js";import{b as Ze,T as et,a as tt}from"./tooltip-C4Mvcc3-.js";import{i as ft}from"./Check-B7DufF9O.js";import{a as Xe}from"./Eye-DgcZpf5x.js";import{n as Mt}from"./Globe01-Dd7C_j_O.js";import{i as Vt}from"./FilterLines-uT-sk3rc.js";import{i as is}from"./Key01-D1UyWXgw.js";import{i as cs}from"./Play-C9o4InoB.js";import{aa as ds,ab as ms,P as us,E as xs}from"./agent-icon-DJnCVbR0.js";import{M as _t}from"./monaco-editor-DtMDBznS.js";import{u as fs}from"./use-members-Bmr4BOrW.js";import{u as Dt}from"./use-connection-BFK8HgLm.js";import{S as St,u as It,W as ps}from"./constants-h1Hu02Pl.js";import{a as hs}from"./use-virtual-mcp-C5RbeZo0.js";import{n as Qe}from"./Container-DprTine2.js";import{c as gs}from"./SwitchHorizontal01-LvHBRitv.js";import{s as js}from"./Plus-DdlGCl-J.js";import{s as vs}from"./Trash01-DzP4bSXT.js";import{I as Ge}from"./input-DKgzjTqx.js";import{g as Ns,b as Lt,f as st,a as Ut,c as pt,d as bs,e as Ft,h as Kt,A as ys,T as ws,i as Ss,M as ht}from"./automation-runs-B2hZA4Kn.js";import{S as lt,a as ot,b as at,c as Fe,d as nt}from"./select-BqVzUjvA.js";import{S as Is}from"./scroll-area-BhZZYQyk.js";import{t as qt}from"./ChevronDown-DhIkdEzt.js";import{C as Cs}from"./calendar-alfK9fhJ.js";import{T as ks}from"./textarea-07GHniRL.js";import{C as Bt}from"./collection-tabs-Bm-12qTR.js";import{S as Ts}from"./switch-C7IedEah.js";import{L as Ms}from"./label-CFa8MFdj.js";import{I as qe}from"./integration-icon-DOg8lUEK.js";import{A as Ht}from"./avatar-BCcehYOw.js";import{A as _s,a as Ds,b as Ls}from"./alert-CJmrA1-_.js";import{C as Jt}from"./card-DwoGuIpq.js";import{K as ke}from"./monitoring-stats-row-BapIOHm7.js";import{g as Fs}from"./connection-slug-eyAPH6o3.js";import{u as $s}from"./useSuspenseInfiniteQuery-DhuueYPO.js";import{d as Rs,S as Os,a as zs,b as Es}from"./sheet-BJnnVAor.js";import{T as De,a as ut,b as Gt,c as Qt,d as Wt,e as oe}from"./table-CgfREqGw.js";import{n as Ps}from"./ChevronUp-BMLC4SgN.js";import{u as As}from"./use-infinite-scroll-Bsai9Hjv.js";import{c as Vs,b as Us}from"./use-automations-kjzpslcz.js";import"./SearchMd-88EikaJB.js";import"./sidebar-BItduOLp.js";import"./use-capability-DMQVY-z7.js";import"./access-gate-ChprljzU.js";import"./capability-load-error-Dz7EyokS.js";import"./AlertCircle-CZWA2nH8.js";import"./Tool01-B3nr_Qai.js";import"./RefreshCcw01-CZGSpPEW.js";import"./XCircle-B5jqknVe.js";import"./ArrowUpRight-DXFfY2Nq.js";import"./ZapSquare-DT1D4OAA.js";import"./Users03-C7bMD3jg.js";import"./CheckCircle-B3a532XL.js";import"./ChevronRight-BQDeINW7.js";import"./DotsVertical-BebTEDkn.js";import"./ZoomOut-C10GWzTz.js";import"./Star01-b362v54F.js";import"./Palette-Bq9PMsoj.js";import"./HardDrive-BtjljIRu.js";import"./Stars02-BFmBskXR.js";import"./LinkExternal01-Brj_TJxd.js";import"./Monitor01-DFXqifzv.js";import"./Sun-BaMRN3tl.js";import"./Settings02-B1lp2SVd.js";import"./Shield01-_I_z0Yxe.js";import"./Stars01-DAcarfyW.js";import"./Upload01-DJAirPOl.js";import"./User01-D7oZ1u1w.js";import"./Users01-CQa1tUzy.js";import"./XClose-CpZzpgAq.js";import"./X-DEXMke5_.js";import"./Zap-8zhK1JZ1.js";import"./spinner-D3DwAv1t.js";import"./use-org-auth-client-rr7_FC67.js";import"./use-collections-0elTitFK.js";import"./useInfiniteQuery-C0Nzygow.js";import"./infiniteQueryObserver-DvYnKas5.js";import"./task-status-CxSktPB-.js";import"./checkbox-CWwDb0cu.js";import"./command-DbOdOn2n.js";import"./index-BBtzzfJI.js";import"./dialog-C-asYC2o.js";import"./pair-CcKUxOpV.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy--KxUwDht.js";import"./file-type-icon-DiMBps0i.js";import"./content-blocks-o63cs2vh.js";import"./types-CU1XYsZ6.js";import"./chat-context-D4gb0Scc.js";import"./tab-id-DkCs8lF_.js";import"./decopilot-sse-pool-CsEl5FJL.js";import"./create-sse-subscription-BS5983N4.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./use-ai-providers-BrNyOb2S.js";import"./use-organization-settings-Y6xPrKF0.js";import"./shell-layout-C8xCDde2.js";import"./required-auth-layout-DoJBYTK7.js";import"./useRouterState-CAzgDa1e.js";import"./use-org-sso-CUWrIQka.js";import"./use-navigate-to-agent-DHuSnk-7.js";import"./use-mcp-prompts-B0SzsQFQ.js";import"./form-DcYfsvAB.js";import"./index-Dvc_l9fe.js";const vt={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Le(s){return s.filter(e=>e.key.trim()).map(e=>{const r=encodeURIComponent(e.key.trim()),l=encodeURIComponent(e.value||"");return`${r}:${e.operator}:${l}`}).join(",")}function Ks(s){return s?s.split(",").map(e=>{const[r,l,...a]=e.split(":");return{key:decodeURIComponent(r||""),operator:l||"eq",value:decodeURIComponent(a.join(":")||"")}}):[]}function Ye(s){return s.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function $t(s){return s.trim()?s.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[r,...l]=e.split("=");return{key:r||"",operator:"eq",value:l.join("=")}}if(e.includes("~")){const[r,...l]=e.split("~");return{key:r||"",operator:"contains",value:l.join("~")}}if(e.includes("@")){const[r,...l]=e.split("@");return{key:r||"",operator:"in",value:l.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function qs(s){const e={},r={},l=[],a={};for(const o of s)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(r[o.key]=`%${o.value}%`);break;case"exists":l.push(o.key);break;case"in":o.value&&(a[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(r).length>0?r:void 0,propertyKeys:l.length>0?l:void 0,propertyInValues:Object.keys(a).length>0?a:void 0}}function Rt(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};if(typeof s._decocms_truncated=="string")return{content:s._decocms_truncated,isTruncated:!0,originalSize:s._decocms_truncated.length};const e=JSON.stringify(s,null,2),r=e.length;return r<=vt.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:r}:{content:e.slice(0,vt.maxJsonRenderSize)+`
4
4
 
5
- ... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function Ot(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function Bs(s){const e=le.c(116),{log:r}=s,[l,a]=K.useState(!1),[o,c]=K.useState(!1),d=bt(),{org:n}=Be(),i=Rt(r.input),m=Rt(r.output),j=Hs;let v;e[0]!==r.input||e[1]!==r.output?(v=async se=>{const re=j(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(re),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Ce.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=v):v=e[2];const b=v;let x;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(x=se=>{const re=j(se==="input"?r.input:r.output),ie=new Blob([re],{type:"application/json"}),pe=URL.createObjectURL(ie),ye=document.createElement("a");ye.href=pe,ye.download=`${r.toolName}-${se}-${r.id}.json`,ye.click(),URL.revokeObjectURL(pe)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=x):x=e[7];const L=x;let p;e[8]!==r.connectionId||e[9]!==r.input||e[10]!==r.toolName||e[11]!==d||e[12]!==n.slug?(p=()=>{const se=crypto.randomUUID();sessionStorage.setItem(`replay-${se}`,JSON.stringify(r.input)),d({to:"/$org/settings/connections/$connectionId/$collectionName/$itemId",params:{org:n.slug,connectionId:r.connectionId,collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:se}})},e[8]=r.connectionId,e[9]=r.input,e[10]=r.toolName,e[11]=d,e[12]=n.slug,e[13]=p):p=e[13];const g=p,[u,k]=K.useState(!1);let S;e[14]!==r.requestId?(S=async()=>{try{await navigator.clipboard.writeText(r.requestId),k(!0),setTimeout(()=>k(!1),2e3)}catch{Ce.error("Failed to copy to clipboard")}},e[14]=r.requestId,e[15]=S):S=e[15];const h=S;let T;e[16]!==r.timestamp?(T=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[16]=r.timestamp,e[17]=T):T=e[17];const I=T,f="text-sm px-5 md:px-6 py-5 space-y-5";let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[18]=M):M=e[18];let y;e[19]!==I?(y=t.jsxs("div",{children:[M,t.jsx("div",{className:"text-sm text-foreground",children:I})]}),e[19]=I,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[21]=R):R=e[21];let C;e[22]!==r.durationMs?(C=t.jsxs("div",{children:[R,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[22]=r.durationMs,e[23]=C):C=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[24]=E):E=e[24];let F;e[25]!==r.userName?(F=t.jsxs("div",{children:[E,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[25]=r.userName,e[26]=F):F=e[26];let H;e[27]!==r.virtualMcpName?(H=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[27]=r.virtualMcpName,e[28]=H):H=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[29]=P):P=e[29];let W;e[30]!==r.requestId?(W=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[30]=r.requestId,e[31]=W):W=e[31];let w;e[32]!==u?(w=u?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[32]=u,e[33]=w):w=e[33];let _;e[34]!==h||e[35]!==w?(_=t.jsx(Z,{size:"icon",variant:"ghost",onClick:h,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:w}),e[34]=h,e[35]=w,e[36]=_):_=e[36];let $;e[37]!==W||e[38]!==_?($=t.jsxs("div",{children:[P,t.jsxs("div",{className:"flex items-center gap-1",children:[W,_]})]}),e[37]=W,e[38]=_,e[39]=$):$=e[39];let O;e[40]!==r.userAgent?(O=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[40]=r.userAgent,e[41]=O):O=e[41];let z;e[42]!==r.properties||e[43]!==d||e[44]!==n.slug?(z=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[re,ie]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[re,"=",ie]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const pe={key:re,operator:"eq",value:ie};d({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Le([pe])}})},children:[t.jsx(Vt,{size:14,className:"mr-2"}),"Filter by this property"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${re}=${ie}`),Ce.success("Copied filter to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(re),Ce.success("Copied key to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(is,{size:14,className:"mr-2"}),"Copy key"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ie),Ce.success("Copied value to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(ds,{size:14,className:"mr-2"}),"Copy value"]})]})})]},re)})})]}),e[42]=r.properties,e[43]=d,e[44]=n.slug,e[45]=z):z=e[45];let V;e[46]!==C||e[47]!==F||e[48]!==H||e[49]!==$||e[50]!==O||e[51]!==z||e[52]!==y?(V=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[y,C,F,H,$,O,z]}),e[46]=C,e[47]=F,e[48]=H,e[49]=$,e[50]=O,e[51]=z,e[52]=y,e[53]=V):V=e[53];let q;e[54]!==r.errorMessage?(q=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[54]=r.errorMessage,e[55]=q):q=e[55];const J="space-y-4";let G;e[56]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[56]=G):G=e[56];const Q=i.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Ot(i.originalSize)," - truncated)"]});let U;e[57]!==Q?(U=t.jsxs("div",{className:"flex items-center gap-2",children:[G,Q]}),e[57]=Q,e[58]=U):U=e[58];let A;e[59]!==g||e[60]!==r.input?(A=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:g,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(cs,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[59]=g,e[60]=r.input,e[61]=A):A=e[61];let N;e[62]!==L||e[63]!==i?(N=i.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[62]=L,e[63]=i,e[64]=N):N=e[64];let D;e[65]!==b?(D=()=>b("input"),e[65]=b,e[66]=D):D=e[66];let B;e[67]!==l?(B=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[67]=l,e[68]=B):B=e[68];let ee;e[69]!==D||e[70]!==B?(ee=t.jsx(Z,{size:"icon",variant:"ghost",onClick:D,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:B}),e[69]=D,e[70]=B,e[71]=ee):ee=e[71];let X;e[72]!==A||e[73]!==N||e[74]!==ee?(X=t.jsxs("div",{className:"flex items-center gap-1",children:[A,N,ee]}),e[72]=A,e[73]=N,e[74]=ee,e[75]=X):X=e[75];let te;e[76]!==U||e[77]!==X?(te=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[U,X]}),e[76]=U,e[77]=X,e[78]=te):te=e[78];let Y;e[79]!==i?(Y=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:i.content,language:"json",height:"100%",readOnly:!0})}),e[79]=i,e[80]=Y):Y=e[80];let ae;e[81]!==te||e[82]!==Y?(ae=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[te,Y]})}),e[81]=te,e[82]=Y,e[83]=ae):ae=e[83];const _e="rounded-lg overflow-hidden border border-border",$e="flex items-center justify-between p-1 pl-4 border-b border-border",Se="flex items-center gap-2";let ne;e[84]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[84]=ne):ne=e[84];const he=m.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Ot(m.originalSize)," - truncated)"]});let ge;e[85]!==ne||e[86]!==he?(ge=t.jsxs("div",{className:Se,children:[ne,he]}),e[85]=ne,e[86]=he,e[87]=ge):ge=e[87];let je;e[88]!==L||e[89]!==m.isTruncated?(je=m.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[88]=L,e[89]=m.isTruncated,e[90]=je):je=e[90];let ve;e[91]!==b?(ve=()=>b("output"),e[91]=b,e[92]=ve):ve=e[92];let Ne;e[93]!==o?(Ne=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[93]=o,e[94]=Ne):Ne=e[94];let de;e[95]!==ve||e[96]!==Ne?(de=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:Ne}),e[95]=ve,e[96]=Ne,e[97]=de):de=e[97];let be;e[98]!==je||e[99]!==de?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[je,de]}),e[98]=je,e[99]=de,e[100]=be):be=e[100];let me;e[101]!==ge||e[102]!==be?(me=t.jsxs("div",{className:$e,children:[ge,be]}),e[101]=ge,e[102]=be,e[103]=me):me=e[103];let ue;e[104]!==m.content?(ue=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:m.content,language:"json",height:"100%",readOnly:!0})}),e[104]=m.content,e[105]=ue):ue=e[105];let xe;e[106]!==me||e[107]!==ue?(xe=t.jsx("div",{children:t.jsxs("div",{className:_e,children:[me,ue]})}),e[106]=me,e[107]=ue,e[108]=xe):xe=e[108];let fe;e[109]!==ae||e[110]!==xe?(fe=t.jsxs("div",{className:J,children:[ae,xe]}),e[109]=ae,e[110]=xe,e[111]=fe):fe=e[111];let Re;return e[112]!==V||e[113]!==q||e[114]!==fe?(Re=t.jsxs("div",{className:f,children:[V,q,fe]}),e[112]=V,e[113]=q,e[114]=fe,e[115]=Re):Re=e[115],Re}function Hs(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Js={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Yt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const r=e.match(Xt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function we(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Yt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Gs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function zt(s){const e=s.trim();if(e==="now")return"Now";const r=Yt(e);if(!r||!r.unit){const o=we(e);return o.valid&&o.date?Gs(o.date):e}const l=Js[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const es=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Qs(s,e){const r=es.find(l=>l.from===s&&l.to===e);return r?r.label:`${zt(s)} to ${zt(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${c}`}function Ws(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,c,d]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(c),Number(d));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=we(s);return e.valid&&e.date?Je(e.date):s}function Et({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[c,d]=K.useState(!1),[n,i]=K.useState(()=>gt(s)),[m,j]=K.useState(),[v,b]=K.useState(!1),x=K.useRef(s);x.current!==s&&(x.current=s,v||i(gt(s)));const L=f=>{const M=f.target.value;i(M),j(void 0)},p=()=>{b(!0)},g=()=>{b(!1);const f=n.trim();if(Zt(f)){j(void 0),e(f);return}const M=Ws(f);if(M){j(void 0),e(M.toISOString()),i(Je(M));return}const y=we(f);if(y.valid&&y.date){j(void 0),e(f),i(Je(y.date));return}i(gt(s)),j(void 0)},u=f=>{if(f){const y=we(s).date||new Date;f.setHours(y.getHours()),f.setMinutes(y.getMinutes()),f.setSeconds(0),f.setMilliseconds(0);const R=f.toISOString();i(Je(f)),e(R),j(void 0)}d(!1)},k=f=>{const[M,y]=f.target.value.split(":").map(Number),C=we(s).date||new Date;C.setHours(M||0),C.setMinutes(y||0),C.setSeconds(0),C.setMilliseconds(0);const E=C.toISOString();i(Je(C)),e(E)},S=we(s),h=S.valid?S.date:new Date,T=h?`${String(h.getHours()).padStart(2,"0")}:${String(h.getMinutes()).padStart(2,"0")}`:"",I=o||m;return t.jsxs("div",{className:ce("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ge,{value:n,onChange:L,onFocus:p,onBlur:g,placeholder:r,disabled:a,className:ce("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:c,onOpenChange:d,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(ms,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(Cs,{mode:"single",selected:h||void 0,onSelect:u,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ge,{type:"time",value:T,onChange:k,className:"text-sm h-8"})]})]})]})]})}function Xs({value:s,onChange:e,className:r,disabled:l,quickRanges:a=es}){const[o,c]=K.useState(!1),[d,n]=K.useState(s.from),[i,m]=K.useState(s.to),[j,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),m(s.to));const x=u=>{b.current={from:u.from,to:u.to},n(u.from),m(u.to),c(!1),e({from:u.from,to:u.to})},L=()=>{const u=we(d),k=we(i);if(!u.valid||!u.date){v("Invalid 'From' date");return}if(!k.valid||!k.date){v("Invalid 'To' date");return}if(u.date>=k.date){v("'From' must be before 'To'");return}v(null),e({from:d,to:i}),c(!1)},p=u=>s.from===u.from&&s.to===u.to,g=Qs(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:c,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:ce("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(us,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:g})]}),t.jsx(qt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:u=>u.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(Et,{value:d,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(Et,{value:i,onChange:m,placeholder:"now"})]}),j&&t.jsx("p",{className:"text-xs text-destructive",children:j}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(Is,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:a.map(u=>{const k=p(u);return t.jsx("button",{type:"button",onClick:()=>x(u),className:ce("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",k&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value)})})})})]})})]})}const ts="decopilot";async function ss(s,e){const r=await s.callTool({name:"MONITORING_STATS",arguments:e});if(r.isError)throw new Error("MONITORING_STATS tool returned an error");return r.structuredContent??r}function Ys(s,e){const r=le.c(15),{org:l}=Be();let a;r[0]!==l.id||r[1]!==l.slug?(a={connectionId:St,orgId:l.id,orgSlug:l.slug},r[0]=l.id,r[1]=l.slug,r[2]=a):a=r[2];const o=It(a);let c,d,n;r[3]!==l.id||r[4]!==s?(n={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},d=yt,c=it.monitoringStatsToolCalls(l.id,JSON.stringify(n)),r[3]=l.id,r[4]=s,r[5]=c,r[6]=d,r[7]=n):(c=r[5],d=r[6],n=r[7]);let i;r[8]!==o||r[9]!==n?(i=()=>ss(o,n),r[8]=o,r[9]=n,r[10]=i):i=r[10];let m;return r[11]!==e||r[12]!==c||r[13]!==i?(m={queryKey:c,queryFn:i,staleTime:3e4,retry:!1,...e},r[11]=e,r[12]=c,r[13]=i,r[14]=m):m=r[14],d(m)}function Zs(s,e){const r=le.c(15),{org:l}=Be();let a;r[0]!==l.id||r[1]!==l.slug?(a={connectionId:St,orgId:l.id,orgSlug:l.slug},r[0]=l.id,r[1]=l.slug,r[2]=a):a=r[2];const o=It(a);let c,d,n;r[3]!==l.id||r[4]!==s?(n={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},d=yt,c=it.monitoringStatsLlm(l.id,JSON.stringify(n)),r[3]=l.id,r[4]=s,r[5]=c,r[6]=d,r[7]=n):(c=r[5],d=r[6],n=r[7]);let i;r[8]!==o||r[9]!==n?(i=()=>ss(o,n),r[8]=o,r[9]=n,r[10]=i):i=r[10];let m;return r[11]!==e||r[12]!==c||r[13]!==i?(m={queryKey:c,queryFn:i,staleTime:3e4,retry:!1,...e},r[11]=e,r[12]=c,r[13]=i,r[14]=m):m=r[14],d(m)}function Te(s){const e=le.c(20),{title:r,value:l,action:a,children:o,className:c}=s;let d;e[0]!==c?(d=ce("pt-4 px-4 pb-6 gap-8",c),e[0]=c,e[1]=d):d=e[1];let n;e[2]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==l?(i=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=i):i=e[5];let m;e[6]!==n||e[7]!==i?(m=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,i]}),e[6]=n,e[7]=i,e[8]=m):m=e[8];let j;e[9]!==a?(j=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=j):j=e[10];let v;e[11]!==m||e[12]!==j?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[m,j]}),e[11]=m,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let x;return e[16]!==d||e[17]!==v||e[18]!==b?(x=t.jsxs(Jt,{className:d,children:[v,b]}),e[16]=d,e[17]=v,e[18]=b,e[19]=x):x=e[19],x}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:c}=Be(),d=bt();let n,i,m;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==d||e[4]!==c||e[5]!==o){m=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(tr));let x;e[9]!==a?(x=(p,g)=>{const u=Ft(p.metric,a);return Ft(g.metric,a)-u},e[9]=a,e[10]=x):x=e[10];const L=v.map(p=>({connection:p,metric:b.get(p.id)})).filter(er).sort(x).slice(0,4);if(L.length===0){m=null;break e}n="flex flex-col",i=L.map((p,g)=>{const{connection:u,metric:k}=p,S=o>0?(k.calls/o*100).toFixed(1):"0.0",h=a==="errors"?`${k.errorRate.toFixed(1)}%`:`${S}%`,T=g===L.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!T&&"border-b border-border/50"),onClick:()=>d({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:Fs(u)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:u.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:h}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:bs(k,a)})]})]},u.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=d,e[4]=c,e[5]=o,e[6]=n,e[7]=i,e[8]=m}else n=e[6],i=e[7],m=e[8];if(m!==Symbol.for("react.early_return_sentinel"))return m;let j;return e[11]!==n||e[12]!==i?(j=t.jsx("div",{className:n,children:i}),e[11]=n,e[12]=i,e[13]=j):j=e[13],j}function er(s){return s.metric}function tr(s){return[s.connectionId,s]}const At=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function Pt(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return At[e%At.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=x=>a==="tokens"?(x.inputTokens??0)+(x.outputTokens??0):a==="cost"?x.costUsd??0:x.calls,e[0]=a,e[1]=o):o=e[1];const c=o;let d;e[2]!==a?(d=x=>a==="cost"?Ut(x):a==="tokens"?st(x):x.toLocaleString(),e[2]=a,e[3]=d):d=e[3];const n=d;let i;e[4]!==c?(i=(x,L)=>x+c(L),e[4]=c,e[5]=i):i=e[5];const m=r.reduce(i,0);let j,v;if(e[6]!==n||e[7]!==r||e[8]!==m||e[9]!==c){let x;e[12]!==c?(x=(g,u)=>c(u)-c(g),e[12]=c,e[13]=x):x=e[13];const L=[...r].sort(x).slice(0,4);j="flex flex-col";let p;e[14]!==n||e[15]!==m||e[16]!==c?(p=(g,u,k)=>{const S=c(g),h=m>0?(S/m*100).toFixed(1):"0.0",T=u===k.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3",!T&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${Pt(g.toolName)} 18%, transparent)`},children:t.jsx(Qe,{size:14,style:{color:Pt(g.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:g.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[h,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},g.toolName)},e[14]=n,e[15]=m,e[16]=c,e[17]=p):p=e[17],v=L.map(p),e[6]=n,e[7]=r,e[8]=m,e[9]=c,e[10]=j,e[11]=v}else j=e[10],v=e[11];let b;return e[18]!==j||e[19]!==v?(b=t.jsx("div",{className:j,children:v}),e[18]=j,e[19]=v,e[20]=b):b=e[20],b}function sr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:c,connections:d,isStreaming:n,streamingRefetchInterval:i,llmUserIds:m}=s,j=Ns(r),v=n?i:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:x,isError:L}=Ys({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:c},b);let p;e[2]!==v?(p={refetchInterval:v},e[2]=v,e[3]=p):p=e[3];const{data:g,isError:u}=Zs({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:m?.length?m:void 0},p),k=L||u,S=x?{totalCalls:x.totalCalls,totalErrors:x.totalErrors,avgDurationMs:x.avgDurationMs,p95DurationMs:x.p95DurationMs,data:Lt(x.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},h=g?{totalCalls:g.totalCalls,totalErrors:g.totalErrors,avgDurationMs:g.avgDurationMs,p95DurationMs:g.p95DurationMs,data:Lt(g.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let T;e[4]!==g?.topTools?(T=g?.topTools??[],e[4]=g?.topTools,e[5]=T):T=e[5];const I=T,f=g?.totalInputTokens??0,M=g?.totalOutputTokens??0,y=g?.totalTokens??0,R=g?.totalCostUsd??0;let C;e[6]!==x?.connectionBreakdown?(C=x?.connectionBreakdown??[],e[6]=x?.connectionBreakdown,e[7]=C):C=e[7];const E=C,[F,H]=K.useState("avg");let P;e[8]!==k?(P=k&&t.jsxs(_s,{variant:"destructive",children:[t.jsx(rs,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Ds,{children:"Failed to load monitoring data"}),t.jsx(Ls,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=k,e[9]=P):P=e[9];let W;e[10]===Symbol.for("react.memo_cache_sentinel")?(W=_e=>H(_e),e[10]=W):W=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=w):w=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(at,{children:[t.jsx(Fe,{value:"avg",children:"Avg"}),t.jsx(Fe,{value:"p95",children:"P95"})]}),e[12]=_):_=e[12];let $;e[13]!==F?($=t.jsxs(nt,{value:F,onValueChange:W,children:[w,_]}),e[13]=F,e[14]=$):$=e[14];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Usage"}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),e[15]=O):O=e[15];let z;e[16]!==I?(z=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=z):z=e[17];let V;e[18]!==y?(V=st(y),e[18]=y,e[19]=V):V=e[19];let q;e[20]!==f?(q=st(f),e[20]=f,e[21]=q):q=e[21];let J;e[22]!==M?(J=st(M),e[22]=M,e[23]=J):J=e[23];let G;e[24]!==q||e[25]!==J?(G=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",J," out"]}),e[24]=q,e[25]=J,e[26]=G):G=e[26];let Q;e[27]!==I?(Q=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=Q):Q=e[28];let U;e[29]!==R?(U=R>0?Ut(R):"—",e[29]=R,e[30]=U):U=e[30];let A;e[31]!==R?(A=R===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=R,e[32]=A):A=e[32];let N;e[33]!==I||e[34]!==R?(N=R>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=R,e[35]=N):N=e[35];let D;e[36]!==I?(D=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=D):D=e[37];const B=Te,ee="AI Errors",X=h.totalErrors.toLocaleString();let te;e[38]!==h.data?(te=t.jsx(ke,{data:h.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=h.data,e[39]=te):te=e[39];let Y;e[40]!==I||e[41]!==h.totalErrors?(Y=h.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=h.totalErrors,e[42]=Y):Y=e[42];let ae;return e[43]!==B||e[44]!==X||e[45]!==te||e[46]!==Y?(ae=t.jsxs(B,{title:ee,value:X,children:[te,Y]}),e[43]=B,e[44]=X,e[45]=te,e[46]=Y,e[47]=ae):ae=e[47],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[P,t.jsxs(Te,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:E,connections:d,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"Latency",value:pt(F==="avg"?S.avgDurationMs:S.p95DurationMs),action:$,children:[t.jsx(ke,{data:S.data,dataKey:F,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:E,connections:d,mode:"latency",total:S.totalCalls})]}),t.jsxs(Te,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:E,connections:d,mode:"errors",total:S.totalErrors})]})]}),O,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(Te,{title:"AI Calls",value:h.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:h.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),z]}),t.jsxs(Te,{title:"Tokens",value:V,action:G,children:[t.jsx(ke,{data:h.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),Q]}),t.jsxs(Te,{title:"Cost",value:U,action:A,children:[t.jsx(ke,{data:h.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"AI Latency",value:pt(h.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(h.p95DurationMs)]}),children:[t.jsx(ke,{data:h.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),D]}),ae]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=ce("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(rr),e[4]=c):c=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[c,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=d):d=e[5];let n;return e[6]!==l?(n=t.jsxs(Jt,{className:l,children:[a,d]}),e[6]=l,e[7]=n):n=e[7],n}function rr(s,e){return t.jsxs("div",{className:ce("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function lr(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function or(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:c,lastLogRef:d}=s;let n,i;if(e[0]!==r.timestamp){const F=new Date(r.timestamp);n=F.toLocaleDateString("en-US",{month:"short",day:"numeric"}),i=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=i}else n=e[1],i=e[2];const m=i,j=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==j||e[4]!==v?(b=t.jsx(De,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:j,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=j,e[4]=v,e[5]=b):b=e[5];let x;e[6]!==r.toolName?(x=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=x):x=e[7];const L=l?.title??r.connectionId;let p;e[8]!==L?(p=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=t.jsxs(De,{className:"min-w-0 pr-2 md:pr-4",children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let u;e[13]!==o||e[14]!==a?(u=t.jsx(De,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=u):u=e[15];let k;e[16]!==r.userImage||e[17]!==r.userName?(k=t.jsx(Ht,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=k):k=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let h;e[21]!==k||e[22]!==S?(h=t.jsx(De,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[k,S]})}),e[21]=k,e[22]=S,e[23]=h):h=e[23];let T;e[24]!==n?(T=t.jsx("div",{children:n}),e[24]=n,e[25]=T):T=e[25];let I;e[26]!==m?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:m}),e[26]=m,e[27]=I):I=e[27];let f;e[28]!==T||e[29]!==I?(f=t.jsxs(De,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[T,I]}),e[28]=T,e[29]=I,e[30]=f):f=e[30];let M;e[31]!==r.durationMs?(M=t.jsxs(De,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=M):M=e[32];const y=r.isError?"destructive":"success",R=r.isError?"Error":"OK";let C;e[33]!==y||e[34]!==R?(C=t.jsx(De,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:y,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:R})})}),e[33]=y,e[34]=R,e[35]=C):C=e[35];let E;return e[36]!==d||e[37]!==c||e[38]!==h||e[39]!==f||e[40]!==M||e[41]!==C||e[42]!==b||e[43]!==g||e[44]!==u?(E=t.jsxs(ut,{ref:d,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[b,g,u,h,f,M,C]}),e[36]=d,e[37]=c,e[38]=h,e[39]=f,e[40]=M,e[41]=C,e[42]=b,e[43]=g,e[44]=u,e[45]=E):E=e[45],E}function ar(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:c,logs:d,hasMore:n,onLoadMore:i,isLoadingMore:m,connections:j,virtualMcps:v,membersData:b,client:x}=s,L=j??[],p=v??[],[g,u]=K.useState(null),k=Ps(i,n,m),S=Kt(b),h=new Map(S.map(dr)),T=new Map(p.map(cr));let f=d.map(N=>{const D=h.get(N.userId??""),B=N.virtualMcpId?T.get(N.virtualMcpId):null;return{...N,userName:D?.name??N.userId??"Unknown",userImage:D?.image??void 0,virtualMcpName:B?.title??null,virtualMcpIcon:B?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=D=>r.includes(D.connectionId),e[0]=r,e[1]=N):N=e[1],f=f.filter(N)}if(l.length>1){let N;e[2]!==l?(N=D=>D.virtualMcpId&&l.includes(D.virtualMcpId),e[2]=l,e[3]=N):N=e[3],f=f.filter(N)}const M=new Map(L.map(ir));if(c){const N=c.toLowerCase();f=f.filter(D=>D.toolName.toLowerCase().includes(N)||(M.get(D.connectionId)?.title??D.connectionId).toLowerCase().includes(N)||D.errorMessage?.toLowerCase().includes(N))}const y=g!==null?f[g]??null:null,R=yt({queryKey:it.monitoringLogDetail(y?.id??""),queryFn:async()=>{if(!x)throw new Error("MCP client is not available");const N=await x.callTool({name:"MONITORING_LOG_GET",arguments:{id:y.id}});return N.structuredContent??N},enabled:y!==null}),C=R.data?.log,E=y&&C?{...y,input:C.input,output:C.output}:y;if(f.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const D=c||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let B;return e[5]!==D?(B=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(wt,{image:N,title:"No logs found",description:D})}),e[5]=D,e[6]=B):B=e[6],B}const F="flex-1 flex flex-col min-w-0",H="flex-1 min-w-0 pt-1",P="min-w-[600px] md:min-w-0",W=Qt,w="w-full border-collapse";let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(oe,{className:"w-5"}),t.jsx(oe,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(oe,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(oe,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Latency"}),t.jsx(oe,{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[7]=_):_=e[7];const $=Gt,O=f.map((N,D)=>t.jsx(or,{log:N,connection:M.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>u(D),lastLogRef:D===f.length-1?k:void 0},N.id));let z;e[8]!==$||e[9]!==O?(z=t.jsx($,{children:O}),e[8]=$,e[9]=O,e[10]=z):z=e[10];let V;e[11]!==W||e[12]!==_||e[13]!==z?(V=t.jsx("div",{className:H,children:t.jsx("div",{className:P,children:t.jsxs(W,{className:w,children:[_,z]})})}),e[11]=W,e[12]=_,e[13]=z,e[14]=V):V=e[14];const q=g!==null;let J;e[15]!==u?(J=N=>{N||u(null)},e[15]=u,e[16]=J):J=e[16];const G=y&&g!==null&&t.jsxs(t.Fragment,{children:[t.jsx(Rs,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:M.get(y.connectionId)?.icon||null,name:M.get(y.connectionId)?.title??y.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Os,{className:"text-sm leading-snug truncate",children:y.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(y.connectionId)?.title??y.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>u(nr),disabled:g===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(As,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>u(N=>N!==null&&N<f.length-1?N+1:N),disabled:g===f.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(qt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:R.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"size-5 border-2 border-muted-foreground/30 border-t-muted-foreground rounded-full animate-spin"})}):R.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:"Failed to load log details"}),t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>R.refetch(),children:"Retry"})]}):t.jsx(Bs,{log:E})})]});let Q;e[17]!==G?(Q=t.jsx(zs,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:G}),e[17]=G,e[18]=Q):Q=e[18];let U;e[19]!==J||e[20]!==Q||e[21]!==q?(U=t.jsx(Es,{open:q,onOpenChange:J,children:Q}),e[19]=J,e[20]=Q,e[21]=q,e[22]=U):U=e[22];let A;return e[23]!==U||e[24]!==V?(A=t.jsxs("div",{className:F,children:[V,U]}),e[23]=U,e[24]=V,e[25]=A):A=e[25],A}function nr(s){return s!==null&&s>0?s-1:s}function ir(s){return[s.id,s]}function cr(s){return[s.id,s]}function dr(s){return[s.userId,s.user]}function mr(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(oe,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(oe,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(oe,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=c):c=s[5];let d;s[6]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,c,t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=d):d=s[6];let n;return s[7]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(Qt,{className:"w-full border-collapse",children:[d,t.jsx(Gt,{children:Array.from({length:8}).map(ur)})]})})}),s[7]=n):n=s[7],n}function ur(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const Nt=Object.assign(ar,{Skeleton:mr});function xr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:c,streamingRefetchInterval:d,connectionIds:n,virtualMcpIds:i,tool:m,status:j,searchQuery:v,allConnections:b,allVirtualMcps:x,membersData:L}=s;let p;e[0]!==a||e[1]!==l?(p=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=p):p=e[2];let g;e[3]!==a||e[4]!==r||e[5]!==o?(g=async H=>{const{pageParam:P}=H,W=P===void 0?0:P;if(!r)throw new Error("MCP client is not available");const w=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:W}});return w.structuredContent??w},e[3]=a,e[4]=r,e[5]=o,e[6]=g):g=e[6];let u;e[7]!==o?(u=(H,P)=>{if(!((H?.logs?.length??0)<o))return P.length*o},e[7]=o,e[8]=u):u=e[8];const k=c?d:!1;let S;e[9]!==p||e[10]!==g||e[11]!==u||e[12]!==k?(S={queryKey:p,queryFn:g,initialPageParam:0,getNextPageParam:u,staleTime:0,refetchInterval:k},e[9]=p,e[10]=g,e[11]=u,e[12]=k,e[13]=S):S=e[13];const{data:h,fetchNextPage:T,hasNextPage:I,isFetchingNextPage:f}=$s(S);let M;e[14]!==h.pages?(M=h.pages.flatMap(fr),e[14]=h.pages,e[15]=M):M=e[15];const y=M;let R;e[16]!==T||e[17]!==I||e[18]!==f?(R=()=>{I&&!f&&T()},e[16]=T,e[17]=I,e[18]=f,e[19]=R):R=e[19];const C=R,E=I??!1;let F;return e[20]!==b||e[21]!==x||e[22]!==r||e[23]!==n||e[24]!==C||e[25]!==f||e[26]!==L||e[27]!==y||e[28]!==v||e[29]!==j||e[30]!==E||e[31]!==m||e[32]!==i?(F=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(Nt,{connectionIds:n,virtualMcpIds:i,tool:m,status:j,search:v,logs:y,hasMore:E,onLoadMore:C,isLoadingMore:f,connections:b,virtualMcps:x,membersData:L,client:r})})})}),e[20]=b,e[21]=x,e[22]=r,e[23]=n,e[24]=C,e[25]=f,e[26]=L,e[27]=y,e[28]=v,e[29]=j,e[30]=E,e[31]=m,e[32]=i,e[33]=F):F=e[33],F}function fr(s){return s.logs??[]}function pr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Vs(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const c=o,[d,n]=K.useState(null),i=d??c[0]?.id??null,{data:m}=Us(i??"");let j;e[2]!==r.startDate?(j=r.startDate.toISOString(),e[2]=r.startDate,e[3]=j):j=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==j||e[7]!==v?(b={startDate:j,endDate:v},e[6]=j,e[7]=v,e[8]=b):b=e[8];const x=b;let L;return e[9]!==m||e[10]!==c||e[11]!==i||e[12]!==a||e[13]!==x?(L=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):c.length===0?t.jsx("div",{className:"py-16",children:t.jsx(wt,{title:"No automations",description:"Create an automation to see its runs and usage here."})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(nt,{value:i??"",onValueChange:p=>n(p),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:c.map(gr)})]})}),m?t.jsx(ys,{automationId:m.id,triggerIds:m.triggers.map(hr),range:x}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=m,e[10]=c,e[11]=i,e[12]=a,e[13]=x,e[14]=L):L=e[14],L}function hr(s){return s.id}function gr(s){return t.jsx(Fe,{value:s.id,children:s.name},s.id)}const jr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function vr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:c,virtualMcpOptions:d,activeFiltersCount:n,onUpdateFilters:i,onConnectionSearchChange:m,memberOptions:j,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:x}){const[L,p]=K.useState(!1),[g,u]=K.useState("form"),[k,S]=K.useState(r),[h,T]=K.useState(o),[I,f]=K.useState(Ye(o)),M=K.useRef(r),y=K.useRef(Le(o));M.current!==r&&(M.current=r,k!==r&&S(r));const R=Le(o);y.current!==R&&(y.current=R,T(o),f(Ye(o)));const C=(w,_)=>{const $=[...h],O=$[w];O&&($[w]={key:_.key??O.key,operator:_.operator??O.operator,value:_.value??O.value},T($))},E=()=>{T([...h,{key:"",operator:"eq",value:""}])},F=w=>{const _=h.filter(($,O)=>O!==w);T(_),f(Ye(_)),i({propertyFilters:Le(_)})},H=()=>{i({propertyFilters:Le(h)})},P=()=>{const w=$t(I);T(w),i({propertyFilters:Le(w)})},W=()=>{if(g==="raw"){const w=$t(I);T(w),u("form")}else f(Ye(h)),u("raw")};return t.jsxs(ct,{open:L,onOpenChange:p,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(Vt,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(Ms,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ts,{id:"hide-system-calls",checked:a,onCheckedChange:w=>i({hideSystem:!!w})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:c,defaultValue:s,onValueChange:w=>i({connectionId:w}),onSearchChange:m,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:d,defaultValue:e,onValueChange:w=>i({virtualMcpId:w}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),x&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(ht,{options:j??[],defaultValue:v,onValueChange:w=>b?.(w),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Ge,{id:"filter-tool",placeholder:"Filter by tool...",value:k,onChange:w=>S(w.target.value),onBlur:()=>{k!==r&&i({tool:k})},onKeyDown:w=>{w.key==="Enter"&&k!==r&&i({tool:k})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),t.jsxs(nt,{value:l,onValueChange:w=>i({status:w}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx(Fe,{value:"all",children:"All Status"}),t.jsx(Fe,{value:"success",children:"Success Only"}),t.jsx(Fe,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:W,children:g==="raw"?t.jsx(gs,{size:14}):t.jsx(xs,{size:14})})}),t.jsx(tt,{children:g==="raw"?"Switch to form view":"Switch to raw text"})]})]}),g==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ks,{placeholder:`Paste property filters here:
5
+ ... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:r}}function Ot(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function Bs(s){const e=le.c(116),{log:r}=s,[l,a]=K.useState(!1),[o,c]=K.useState(!1),d=bt(),{org:n}=Be(),i=Rt(r.input),m=Rt(r.output),j=Hs;let v;e[0]!==r.input||e[1]!==r.output?(v=async se=>{const re=j(se==="input"?r.input:r.output);try{await navigator.clipboard.writeText(re),se==="input"?(a(!0),setTimeout(()=>a(!1),2e3)):(c(!0),setTimeout(()=>c(!1),2e3))}catch{Ce.error("Failed to copy to clipboard")}},e[0]=r.input,e[1]=r.output,e[2]=v):v=e[2];const b=v;let x;e[3]!==r.id||e[4]!==r.input||e[5]!==r.output||e[6]!==r.toolName?(x=se=>{const re=j(se==="input"?r.input:r.output),ie=new Blob([re],{type:"application/json"}),pe=URL.createObjectURL(ie),ye=document.createElement("a");ye.href=pe,ye.download=`${r.toolName}-${se}-${r.id}.json`,ye.click(),URL.revokeObjectURL(pe)},e[3]=r.id,e[4]=r.input,e[5]=r.output,e[6]=r.toolName,e[7]=x):x=e[7];const L=x;let p;e[8]!==r.connectionId||e[9]!==r.input||e[10]!==r.toolName||e[11]!==d||e[12]!==n.slug?(p=()=>{const se=crypto.randomUUID();sessionStorage.setItem(`replay-${se}`,JSON.stringify(r.input)),d({to:"/$org/settings/connections/$connectionId/$collectionName/$itemId",params:{org:n.slug,connectionId:r.connectionId,collectionName:"tools",itemId:encodeURIComponent(r.toolName)},search:{replayId:se}})},e[8]=r.connectionId,e[9]=r.input,e[10]=r.toolName,e[11]=d,e[12]=n.slug,e[13]=p):p=e[13];const g=p,[u,k]=K.useState(!1);let S;e[14]!==r.requestId?(S=async()=>{try{await navigator.clipboard.writeText(r.requestId),k(!0),setTimeout(()=>k(!1),2e3)}catch{Ce.error("Failed to copy to clipboard")}},e[14]=r.requestId,e[15]=S):S=e[15];const h=S;let T;e[16]!==r.timestamp?(T=new Date(r.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[16]=r.timestamp,e[17]=T):T=e[17];const I=T,f="text-sm px-5 md:px-6 py-5 space-y-5";let M;e[18]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Timestamp"}),e[18]=M):M=e[18];let y;e[19]!==I?(y=t.jsxs("div",{children:[M,t.jsx("div",{className:"text-sm text-foreground",children:I})]}),e[19]=I,e[20]=y):y=e[20];let R;e[21]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Duration"}),e[21]=R):R=e[21];let C;e[22]!==r.durationMs?(C=t.jsxs("div",{children:[R,t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[r.durationMs,"ms"]})]}),e[22]=r.durationMs,e[23]=C):C=e[23];let E;e[24]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"User"}),e[24]=E):E=e[24];let F;e[25]!==r.userName?(F=t.jsxs("div",{children:[E,t.jsx("div",{className:"text-sm text-foreground",children:r.userName})]}),e[25]=r.userName,e[26]=F):F=e[26];let H;e[27]!==r.virtualMcpName?(H=r.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Agent"}),t.jsx("div",{className:"text-sm text-foreground",children:r.virtualMcpName})]}),e[27]=r.virtualMcpName,e[28]=H):H=e[28];let A;e[29]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Request ID"}),e[29]=A):A=e[29];let W;e[30]!==r.requestId?(W=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:r.requestId}),e[30]=r.requestId,e[31]=W):W=e[31];let w;e[32]!==u?(w=u?t.jsx(ft,{size:12}):t.jsx(Xe,{size:12}),e[32]=u,e[33]=w):w=e[33];let _;e[34]!==h||e[35]!==w?(_=t.jsx(Z,{size:"icon",variant:"ghost",onClick:h,"aria-label":"Copy request ID",className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:w}),e[34]=h,e[35]=w,e[36]=_):_=e[36];let $;e[37]!==W||e[38]!==_?($=t.jsxs("div",{children:[A,t.jsxs("div",{className:"flex items-center gap-1",children:[W,_]})]}),e[37]=W,e[38]=_,e[39]=$):$=e[39];let O;e[40]!==r.userAgent?(O=r.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:"Client"}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:r.userAgent})]}),e[40]=r.userAgent,e[41]=O):O=e[41];let z;e[42]!==r.properties||e[43]!==d||e[44]!==n.slug?(z=r.properties&&Object.keys(r.properties).length>0&&t.jsxs("div",{className:"md:col-span-2",children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1.5",children:"Properties"}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(r.properties).map(se=>{const[re,ie]=se;return t.jsxs(ct,{children:[t.jsx(dt,{asChild:!0,children:t.jsxs(rt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[re,"=",ie]})}),t.jsx(mt,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:()=>{const pe={key:re,operator:"eq",value:ie};d({to:"/$org/settings/monitor",params:{org:n.slug},search:{propertyFilters:Le([pe])}})},children:[t.jsx(Vt,{size:14,className:"mr-2"}),"Filter by this property"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(`${re}=${ie}`),Ce.success("Copied filter to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(Xe,{size:14,className:"mr-2"}),"Copy filter"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(re),Ce.success("Copied key to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(is,{size:14,className:"mr-2"}),"Copy key"]}),t.jsxs(Z,{variant:"ghost",size:"sm",className:"justify-start h-8 px-2 text-xs font-normal focus-visible:ring-0 focus-visible:ring-offset-0",onClick:async()=>{try{await navigator.clipboard.writeText(ie),Ce.success("Copied value to clipboard")}catch{Ce.error("Failed to copy to clipboard")}},children:[t.jsx(ds,{size:14,className:"mr-2"}),"Copy value"]})]})})]},re)})})]}),e[42]=r.properties,e[43]=d,e[44]=n.slug,e[45]=z):z=e[45];let V;e[46]!==C||e[47]!==F||e[48]!==H||e[49]!==$||e[50]!==O||e[51]!==z||e[52]!==y?(V=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[y,C,F,H,$,O,z]}),e[46]=C,e[47]=F,e[48]=H,e[49]=$,e[50]=O,e[51]=z,e[52]=y,e[53]=V):V=e[53];let q;e[54]!==r.errorMessage?(q=r.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:"Error"}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:r.errorMessage})]}),e[54]=r.errorMessage,e[55]=q):q=e[55];const J="space-y-4";let G;e[56]===Symbol.for("react.memo_cache_sentinel")?(G=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Input"}),e[56]=G):G=e[56];const Q=i.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Ot(i.originalSize)," - truncated)"]});let U;e[57]!==Q?(U=t.jsxs("div",{className:"flex items-center gap-2",children:[G,Q]}),e[57]=Q,e[58]=U):U=e[58];let P;e[59]!==g||e[60]!==r.input?(P=r.input&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:g,"aria-label":"Replay tool call",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(cs,{size:14})})}),t.jsx(tt,{children:"Replay tool call"})]}),e[59]=g,e[60]=r.input,e[61]=P):P=e[61];let N;e[62]!==L||e[63]!==i?(N=i.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("input"),"aria-label":"Download full input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full input"})]}),e[62]=L,e[63]=i,e[64]=N):N=e[64];let D;e[65]!==b?(D=()=>b("input"),e[65]=b,e[66]=D):D=e[66];let B;e[67]!==l?(B=l?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[67]=l,e[68]=B):B=e[68];let ee;e[69]!==D||e[70]!==B?(ee=t.jsx(Z,{size:"icon",variant:"ghost",onClick:D,"aria-label":"Copy input",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:B}),e[69]=D,e[70]=B,e[71]=ee):ee=e[71];let X;e[72]!==P||e[73]!==N||e[74]!==ee?(X=t.jsxs("div",{className:"flex items-center gap-1",children:[P,N,ee]}),e[72]=P,e[73]=N,e[74]=ee,e[75]=X):X=e[75];let te;e[76]!==U||e[77]!==X?(te=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[U,X]}),e[76]=U,e[77]=X,e[78]=te):te=e[78];let Y;e[79]!==i?(Y=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:i.content,language:"json",height:"100%",readOnly:!0})}),e[79]=i,e[80]=Y):Y=e[80];let ae;e[81]!==te||e[82]!==Y?(ae=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[te,Y]})}),e[81]=te,e[82]=Y,e[83]=ae):ae=e[83];const _e="rounded-lg overflow-hidden border border-border",$e="flex items-center justify-between p-1 pl-4 border-b border-border",Se="flex items-center gap-2";let ne;e[84]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:"Output"}),e[84]=ne):ne=e[84];const he=m.isTruncated&&t.jsxs("span",{className:"text-xs text-amber-600 dark:text-amber-400",children:["(",Ot(m.originalSize)," - truncated)"]});let ge;e[85]!==ne||e[86]!==he?(ge=t.jsxs("div",{className:Se,children:[ne,he]}),e[85]=ne,e[86]=he,e[87]=ge):ge=e[87];let je;e[88]!==L||e[89]!==m.isTruncated?(je=m.isTruncated&&t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>L("output"),"aria-label":"Download full output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Mt,{size:14})})}),t.jsx(tt,{children:"Download full output"})]}),e[88]=L,e[89]=m.isTruncated,e[90]=je):je=e[90];let ve;e[91]!==b?(ve=()=>b("output"),e[91]=b,e[92]=ve):ve=e[92];let Ne;e[93]!==o?(Ne=o?t.jsx(ft,{size:14}):t.jsx(Xe,{size:14}),e[93]=o,e[94]=Ne):Ne=e[94];let de;e[95]!==ve||e[96]!==Ne?(de=t.jsx(Z,{size:"icon",variant:"ghost",onClick:ve,"aria-label":"Copy output",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:Ne}),e[95]=ve,e[96]=Ne,e[97]=de):de=e[97];let be;e[98]!==je||e[99]!==de?(be=t.jsxs("div",{className:"flex items-center gap-1",children:[je,de]}),e[98]=je,e[99]=de,e[100]=be):be=e[100];let me;e[101]!==ge||e[102]!==be?(me=t.jsxs("div",{className:$e,children:[ge,be]}),e[101]=ge,e[102]=be,e[103]=me):me=e[103];let ue;e[104]!==m.content?(ue=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(_t,{code:m.content,language:"json",height:"100%",readOnly:!0})}),e[104]=m.content,e[105]=ue):ue=e[105];let xe;e[106]!==me||e[107]!==ue?(xe=t.jsx("div",{children:t.jsxs("div",{className:_e,children:[me,ue]})}),e[106]=me,e[107]=ue,e[108]=xe):xe=e[108];let fe;e[109]!==ae||e[110]!==xe?(fe=t.jsxs("div",{className:J,children:[ae,xe]}),e[109]=ae,e[110]=xe,e[111]=fe):fe=e[111];let Re;return e[112]!==V||e[113]!==q||e[114]!==fe?(Re=t.jsxs("div",{className:f,children:[V,q,fe]}),e[112]=V,e[113]=q,e[114]=fe,e[115]=Re):Re=e[115],Re}function Hs(s){return JSON.stringify(s,null,2)}const Xt=/^now(?:-(\d+)([mhdwM]))?$/,Js={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Yt(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const r=e.match(Xt);if(!r)return null;const l=r[1]?Number.parseInt(r[1],10):0,a=r[2]||null;return{isNow:!0,offset:l,unit:a}}function we(s){const e=s.trim(),r=new Date(e);if(!Number.isNaN(r.getTime())&&e.includes("-"))return{valid:!0,date:r};const l=Yt(e);if(!l)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const a=new Date,o=new Date(a);if(l.offset===0||!l.unit)return{valid:!0,date:o};switch(l.unit){case"m":o.setMinutes(o.getMinutes()-l.offset);break;case"h":o.setHours(o.getHours()-l.offset);break;case"d":o.setDate(o.getDate()-l.offset);break;case"w":o.setDate(o.getDate()-l.offset*7);break;case"M":o.setMonth(o.getMonth()-l.offset);break}return{valid:!0,date:o}}function Gs(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Zt(s){const e=s.trim();return Xt.test(e)}function zt(s){const e=s.trim();if(e==="now")return"Now";const r=Yt(e);if(!r||!r.unit){const o=we(e);return o.valid&&o.date?Gs(o.date):e}const l=Js[r.unit],a=r.offset!==1?"s":"";return`${r.offset} ${l}${a} ago`}const es=[{label:"Last 5 minutes",from:"now-5m",to:"now",value:"5m"},{label:"Last 15 minutes",from:"now-15m",to:"now",value:"15m"},{label:"Last 30 minutes",from:"now-30m",to:"now",value:"30m"},{label:"Last 1 hour",from:"now-1h",to:"now",value:"1h"},{label:"Last 3 hours",from:"now-3h",to:"now",value:"3h"},{label:"Last 6 hours",from:"now-6h",to:"now",value:"6h"},{label:"Last 12 hours",from:"now-12h",to:"now",value:"12h"},{label:"Last 24 hours",from:"now-24h",to:"now",value:"24h"},{label:"Last 2 days",from:"now-2d",to:"now",value:"2d"},{label:"Last 7 days",from:"now-7d",to:"now",value:"7d"},{label:"Last 30 days",from:"now-30d",to:"now",value:"30d"}];function Qs(s,e){const r=es.find(l=>l.from===s&&l.to===e);return r?r.label:`${zt(s)} to ${zt(e)}`}function Je(s){const e=s.getFullYear(),r=String(s.getMonth()+1).padStart(2,"0"),l=String(s.getDate()).padStart(2,"0"),a=String(s.getHours()).padStart(2,"0"),o=String(s.getMinutes()).padStart(2,"0"),c=String(s.getSeconds()).padStart(2,"0");return`${e}-${r}-${l} ${a}:${o}:${c}`}function Ws(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,r,l,a,o,c,d]=e,n=new Date(Number(r),Number(l)-1,Number(a),Number(o),Number(c),Number(d));return Number.isNaN(n.getTime())?null:n}function gt(s){if(Zt(s))return s;const e=we(s);return e.valid&&e.date?Je(e.date):s}function Et({value:s,onChange:e,placeholder:r="now or now-2d",className:l,disabled:a,error:o}){const[c,d]=K.useState(!1),[n,i]=K.useState(()=>gt(s)),[m,j]=K.useState(),[v,b]=K.useState(!1),x=K.useRef(s);x.current!==s&&(x.current=s,v||i(gt(s)));const L=f=>{const M=f.target.value;i(M),j(void 0)},p=()=>{b(!0)},g=()=>{b(!1);const f=n.trim();if(Zt(f)){j(void 0),e(f);return}const M=Ws(f);if(M){j(void 0),e(M.toISOString()),i(Je(M));return}const y=we(f);if(y.valid&&y.date){j(void 0),e(f),i(Je(y.date));return}i(gt(s)),j(void 0)},u=f=>{if(f){const y=we(s).date||new Date;f.setHours(y.getHours()),f.setMinutes(y.getMinutes()),f.setSeconds(0),f.setMilliseconds(0);const R=f.toISOString();i(Je(f)),e(R),j(void 0)}d(!1)},k=f=>{const[M,y]=f.target.value.split(":").map(Number),C=we(s).date||new Date;C.setHours(M||0),C.setMinutes(y||0),C.setSeconds(0),C.setMilliseconds(0);const E=C.toISOString();i(Je(C)),e(E)},S=we(s),h=S.valid?S.date:new Date,T=h?`${String(h.getHours()).padStart(2,"0")}:${String(h.getMinutes()).padStart(2,"0")}`:"",I=o||m;return t.jsxs("div",{className:ce("flex gap-1",l),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Ge,{value:n,onChange:L,onFocus:p,onBlur:g,placeholder:r,disabled:a,className:ce("text-sm h-8",I&&"border-destructive focus-visible:ring-destructive")}),I&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:I})]}),t.jsxs(ct,{open:c,onOpenChange:d,children:[t.jsx(dt,{asChild:!0,children:t.jsx(Z,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:a,children:t.jsx(ms,{className:"h-4 w-4"})})}),t.jsxs(mt,{className:"w-auto p-0",align:"end",children:[t.jsx(Cs,{mode:"single",selected:h||void 0,onSelect:u,initialFocus:!0}),t.jsxs("div",{className:"border-t p-3",children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"Time"}),t.jsx(Ge,{type:"time",value:T,onChange:k,className:"text-sm h-8"})]})]})]})]})}function Xs({value:s,onChange:e,className:r,disabled:l,quickRanges:a=es}){const[o,c]=K.useState(!1),[d,n]=K.useState(s.from),[i,m]=K.useState(s.to),[j,v]=K.useState(null),b=K.useRef({from:s.from,to:s.to});(b.current.from!==s.from||b.current.to!==s.to)&&(b.current={from:s.from,to:s.to},n(s.from),m(s.to));const x=u=>{b.current={from:u.from,to:u.to},n(u.from),m(u.to),c(!1),e({from:u.from,to:u.to})},L=()=>{const u=we(d),k=we(i);if(!u.valid||!u.date){v("Invalid 'From' date");return}if(!k.valid||!k.date){v("Invalid 'To' date");return}if(u.date>=k.date){v("'From' must be before 'To'");return}v(null),e({from:d,to:i}),c(!1)},p=u=>s.from===u.from&&s.to===u.to,g=Qs(s.from,s.to);return t.jsxs(ct,{open:o,onOpenChange:c,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:ce("gap-1.5 min-w-[160px] justify-between",r),disabled:l,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(us,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:g})]}),t.jsx(qt,{className:"size-4 text-muted-foreground"})]})}),t.jsx(mt,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:u=>u.preventDefault(),style:o?void 0:{animationDuration:"0s"},children:t.jsxs("div",{className:"flex",children:[t.jsxs("div",{className:"flex-1 p-4 border-r",children:[t.jsx("h4",{className:"text-sm font-medium mb-4",children:"Absolute time range"}),t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"From"}),t.jsx(Et,{value:d,onChange:n,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:"To"}),t.jsx(Et,{value:i,onChange:m,placeholder:"now"})]}),j&&t.jsx("p",{className:"text-xs text-destructive",children:j}),t.jsx(Z,{onClick:L,className:"w-full",size:"sm",children:"Apply time range"})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(Is,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:a.map(u=>{const k=p(u);return t.jsx("button",{type:"button",onClick:()=>x(u),className:ce("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",k&&"bg-accent text-accent-foreground font-medium"),children:u.label},u.value)})})})})]})})]})}const ts="decopilot";async function ss(s,e){const r=await s.callTool({name:"MONITORING_STATS",arguments:e});if(r.isError)throw new Error("MONITORING_STATS tool returned an error");return r.structuredContent??r}function Ys(s,e){const r=le.c(15),{org:l}=Be();let a;r[0]!==l.id||r[1]!==l.slug?(a={connectionId:St,orgId:l.id,orgSlug:l.slug},r[0]=l.id,r[1]=l.slug,r[2]=a):a=r[2];const o=It(a);let c,d,n;r[3]!==l.id||r[4]!==s?(n={...s,excludeConnectionIds:[ts,...s.excludeConnectionIds??[]]},d=yt,c=it.monitoringStatsToolCalls(l.id,JSON.stringify(n)),r[3]=l.id,r[4]=s,r[5]=c,r[6]=d,r[7]=n):(c=r[5],d=r[6],n=r[7]);let i;r[8]!==o||r[9]!==n?(i=()=>ss(o,n),r[8]=o,r[9]=n,r[10]=i):i=r[10];let m;return r[11]!==e||r[12]!==c||r[13]!==i?(m={queryKey:c,queryFn:i,staleTime:3e4,retry:!1,...e},r[11]=e,r[12]=c,r[13]=i,r[14]=m):m=r[14],d(m)}function Zs(s,e){const r=le.c(15),{org:l}=Be();let a;r[0]!==l.id||r[1]!==l.slug?(a={connectionId:St,orgId:l.id,orgSlug:l.slug},r[0]=l.id,r[1]=l.slug,r[2]=a):a=r[2];const o=It(a);let c,d,n;r[3]!==l.id||r[4]!==s?(n={...s,connectionIds:[ts],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},d=yt,c=it.monitoringStatsLlm(l.id,JSON.stringify(n)),r[3]=l.id,r[4]=s,r[5]=c,r[6]=d,r[7]=n):(c=r[5],d=r[6],n=r[7]);let i;r[8]!==o||r[9]!==n?(i=()=>ss(o,n),r[8]=o,r[9]=n,r[10]=i):i=r[10];let m;return r[11]!==e||r[12]!==c||r[13]!==i?(m={queryKey:c,queryFn:i,staleTime:3e4,retry:!1,...e},r[11]=e,r[12]=c,r[13]=i,r[14]=m):m=r[14],d(m)}function Te(s){const e=le.c(20),{title:r,value:l,action:a,children:o,className:c}=s;let d;e[0]!==c?(d=ce("pt-4 px-4 pb-6 gap-8",c),e[0]=c,e[1]=d):d=e[1];let n;e[2]!==r?(n=t.jsx("span",{className:"text-sm text-foreground/70",children:r}),e[2]=r,e[3]=n):n=e[3];let i;e[4]!==l?(i=t.jsx("span",{className:"text-4xl font-normal",children:l}),e[4]=l,e[5]=i):i=e[5];let m;e[6]!==n||e[7]!==i?(m=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[n,i]}),e[6]=n,e[7]=i,e[8]=m):m=e[8];let j;e[9]!==a?(j=a&&t.jsx("div",{className:"shrink-0",children:a}),e[9]=a,e[10]=j):j=e[10];let v;e[11]!==m||e[12]!==j?(v=t.jsxs("div",{className:"flex items-start justify-between",children:[m,j]}),e[11]=m,e[12]=j,e[13]=v):v=e[13];let b;e[14]!==o?(b=o&&t.jsx("div",{className:"flex flex-col gap-6",children:o}),e[14]=o,e[15]=b):b=e[15];let x;return e[16]!==d||e[17]!==v||e[18]!==b?(x=t.jsxs(Jt,{className:d,children:[v,b]}),e[16]=d,e[17]=v,e[18]=b,e[19]=x):x=e[19],x}function jt(s){const e=le.c(14),{metrics:r,connections:l,mode:a,total:o}=s,{org:c}=Be(),d=bt();let n,i,m;if(e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==d||e[4]!==c||e[5]!==o){m=Symbol.for("react.early_return_sentinel");e:{const v=l??[],b=new Map(r.map(tr));let x;e[9]!==a?(x=(p,g)=>{const u=Ft(p.metric,a);return Ft(g.metric,a)-u},e[9]=a,e[10]=x):x=e[10];const L=v.map(p=>({connection:p,metric:b.get(p.id)})).filter(er).sort(x).slice(0,4);if(L.length===0){m=null;break e}n="flex flex-col",i=L.map((p,g)=>{const{connection:u,metric:k}=p,S=o>0?(k.calls/o*100).toFixed(1):"0.0",h=a==="errors"?`${k.errorRate.toFixed(1)}%`:`${S}%`,T=g===L.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!T&&"border-b border-border/50"),onClick:()=>d({to:"/$org/settings/connections/$appSlug",params:{org:c.slug,appSlug:Fs(u)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:u.icon,name:u.title,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:u.title})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsx("span",{className:"text-sm text-foreground/30 tabular-nums",children:h}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:bs(k,a)})]})]},u.id)})}e[0]=l,e[1]=r,e[2]=a,e[3]=d,e[4]=c,e[5]=o,e[6]=n,e[7]=i,e[8]=m}else n=e[6],i=e[7],m=e[8];if(m!==Symbol.for("react.early_return_sentinel"))return m;let j;return e[11]!==n||e[12]!==i?(j=t.jsx("div",{className:n,children:i}),e[11]=n,e[12]=i,e[13]=j):j=e[13],j}function er(s){return s.metric}function tr(s){return[s.connectionId,s]}const Pt=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function At(s){let e=0;for(let r=0;r<s.length;r++)e=e*31+s.charCodeAt(r)>>>0;return Pt[e%Pt.length]}function He(s){const e=le.c(21),{models:r,mode:l}=s,a=l===void 0?"calls":l;if(r.length===0)return null;let o;e[0]!==a?(o=x=>a==="tokens"?(x.inputTokens??0)+(x.outputTokens??0):a==="cost"?x.costUsd??0:x.calls,e[0]=a,e[1]=o):o=e[1];const c=o;let d;e[2]!==a?(d=x=>a==="cost"?Ut(x):a==="tokens"?st(x):x.toLocaleString(),e[2]=a,e[3]=d):d=e[3];const n=d;let i;e[4]!==c?(i=(x,L)=>x+c(L),e[4]=c,e[5]=i):i=e[5];const m=r.reduce(i,0);let j,v;if(e[6]!==n||e[7]!==r||e[8]!==m||e[9]!==c){let x;e[12]!==c?(x=(g,u)=>c(u)-c(g),e[12]=c,e[13]=x):x=e[13];const L=[...r].sort(x).slice(0,4);j="flex flex-col";let p;e[14]!==n||e[15]!==m||e[16]!==c?(p=(g,u,k)=>{const S=c(g),h=m>0?(S/m*100).toFixed(1):"0.0",T=u===k.length-1;return t.jsxs("div",{className:ce("flex items-center h-10 px-3",!T&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx("div",{className:"size-6 rounded-md border border-border/10 shadow-sm flex items-center justify-center shrink-0",style:{backgroundColor:`color-mix(in oklch, ${At(g.toolName)} 18%, transparent)`},children:t.jsx(Qe,{size:14,style:{color:At(g.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:g.toolName})]}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 px-3",children:[t.jsxs("span",{className:"text-sm text-foreground/30 tabular-nums",children:[h,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:n(S)})]})]},g.toolName)},e[14]=n,e[15]=m,e[16]=c,e[17]=p):p=e[17],v=L.map(p),e[6]=n,e[7]=r,e[8]=m,e[9]=c,e[10]=j,e[11]=v}else j=e[10],v=e[11];let b;return e[18]!==j||e[19]!==v?(b=t.jsx("div",{className:j,children:v}),e[18]=j,e[19]=v,e[20]=b):b=e[20],b}function sr(s){const e=le.c(48),{displayDateRange:r,connectionIds:l,excludeConnectionIds:a,toolName:o,status:c,connections:d,isStreaming:n,streamingRefetchInterval:i,llmUserIds:m}=s,j=Ns(r),v=n?i:!1;let b;e[0]!==v?(b={refetchInterval:v},e[0]=v,e[1]=b):b=e[1];const{data:x,isError:L}=Ys({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),connectionIds:l.length>0?l:void 0,excludeConnectionIds:a,toolNames:o?[o]:void 0,status:c},b);let p;e[2]!==v?(p={refetchInterval:v},e[2]=v,e[3]=p):p=e[3];const{data:g,isError:u}=Zs({interval:j,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),userIds:m?.length?m:void 0},p),k=L||u,S=x?{totalCalls:x.totalCalls,totalErrors:x.totalErrors,avgDurationMs:x.avgDurationMs,p95DurationMs:x.p95DurationMs,data:Lt(x.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},h=g?{totalCalls:g.totalCalls,totalErrors:g.totalErrors,avgDurationMs:g.avgDurationMs,p95DurationMs:g.p95DurationMs,data:Lt(g.timeseries,r,j)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let T;e[4]!==g?.topTools?(T=g?.topTools??[],e[4]=g?.topTools,e[5]=T):T=e[5];const I=T,f=g?.totalInputTokens??0,M=g?.totalOutputTokens??0,y=g?.totalTokens??0,R=g?.totalCostUsd??0;let C;e[6]!==x?.connectionBreakdown?(C=x?.connectionBreakdown??[],e[6]=x?.connectionBreakdown,e[7]=C):C=e[7];const E=C,[F,H]=K.useState("avg");let A;e[8]!==k?(A=k&&t.jsxs(_s,{variant:"destructive",children:[t.jsx(rs,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(Ds,{children:"Failed to load monitoring data"}),t.jsx(Ls,{children:"We couldn't fetch your monitoring stats right now. Please try again later."})]})]}),e[8]=k,e[9]=A):A=e[9];let W;e[10]===Symbol.for("react.memo_cache_sentinel")?(W=_e=>H(_e),e[10]=W):W=e[10];let w;e[11]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(lt,{className:"w-[120px]",children:t.jsx(ot,{})}),e[11]=w):w=e[11];let _;e[12]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsxs(at,{children:[t.jsx(Fe,{value:"avg",children:"Avg"}),t.jsx(Fe,{value:"p95",children:"P95"})]}),e[12]=_):_=e[12];let $;e[13]!==F?($=t.jsxs(nt,{value:F,onValueChange:W,children:[w,_]}),e[13]=F,e[14]=$):$=e[14];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[t.jsx("div",{className:"h-px flex-1 bg-border"}),t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:"AI Usage"}),t.jsx("div",{className:"h-px flex-1 bg-border"})]}),e[15]=O):O=e[15];let z;e[16]!==I?(z=t.jsx(He,{models:I,mode:"calls"}),e[16]=I,e[17]=z):z=e[17];let V;e[18]!==y?(V=st(y),e[18]=y,e[19]=V):V=e[19];let q;e[20]!==f?(q=st(f),e[20]=f,e[21]=q):q=e[21];let J;e[22]!==M?(J=st(M),e[22]=M,e[23]=J):J=e[23];let G;e[24]!==q||e[25]!==J?(G=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[q," in ·"," ",J," out"]}),e[24]=q,e[25]=J,e[26]=G):G=e[26];let Q;e[27]!==I?(Q=t.jsx(He,{models:I,mode:"tokens"}),e[27]=I,e[28]=Q):Q=e[28];let U;e[29]!==R?(U=R>0?Ut(R):"—",e[29]=R,e[30]=U):U=e[30];let P;e[31]!==R?(P=R===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:"No provider cost data"}):void 0,e[31]=R,e[32]=P):P=e[32];let N;e[33]!==I||e[34]!==R?(N=R>0?t.jsx(He,{models:I,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:"Cost is reported only for the deco AI Gateway and OpenRouter providers."}),e[33]=I,e[34]=R,e[35]=N):N=e[35];let D;e[36]!==I?(D=t.jsx(He,{models:I,mode:"calls"}),e[36]=I,e[37]=D):D=e[37];const B=Te,ee="AI Errors",X=h.totalErrors.toLocaleString();let te;e[38]!==h.data?(te=t.jsx(ke,{data:h.data,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]"}),e[38]=h.data,e[39]=te):te=e[39];let Y;e[40]!==I||e[41]!==h.totalErrors?(Y=h.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No AI errors in this period"}):t.jsx(He,{models:I,mode:"calls"}),e[40]=I,e[41]=h.totalErrors,e[42]=Y):Y=e[42];let ae;return e[43]!==B||e[44]!==X||e[45]!==te||e[46]!==Y?(ae=t.jsxs(B,{title:ee,value:X,children:[te,Y]}),e[43]=B,e[44]=X,e[45]=te,e[46]=Y,e[47]=ae):ae=e[47],t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-2 pb-6 max-w-[1200px] mx-auto w-full overflow-auto",children:[A,t.jsxs(Te,{title:"Tool Calls",value:S.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area"}),t.jsx(jt,{metrics:E,connections:d,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"Latency",value:pt(F==="avg"?S.avgDurationMs:S.p95DurationMs),action:$,children:[t.jsx(ke,{data:S.data,dataKey:F,colorNum:4,chartHeight:"h-[120px] md:h-[180px]"}),t.jsx(jt,{metrics:E,connections:d,mode:"latency",total:S.totalCalls})]}),t.jsxs(Te,{title:"Errors",value:S.totalErrors.toLocaleString(),children:[t.jsx(ke,{data:S.data,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]"}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:"No errors in this period"}):t.jsx(jt,{metrics:E,connections:d,mode:"errors",total:S.totalErrors})]})]}),O,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(Te,{title:"AI Calls",value:h.totalCalls.toLocaleString(),children:[t.jsx(ke,{data:h.data,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]"}),z]}),t.jsxs(Te,{title:"Tokens",value:V,action:G,children:[t.jsx(ke,{data:h.data,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]"}),Q]}),t.jsxs(Te,{title:"Cost",value:U,action:P,children:[t.jsx(ke,{data:h.data,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]"}),N]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Te,{title:"AI Latency",value:pt(h.avgDurationMs),action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:["p95: ",pt(h.p95DurationMs)]}),children:[t.jsx(ke,{data:h.data,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]"}),D]}),ae]})]})}function Ke(s){const e=le.c(8),{className:r}=s;let l;e[0]!==r?(l=ce("pt-4 px-4 pb-6 gap-8",r),e[0]=r,e[1]=l):l=e[1];let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("div",{className:"h-5 w-20 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-10 w-14 rounded bg-muted animate-pulse"})]}),t.jsx("div",{className:"h-8 w-[120px] rounded-md bg-muted animate-pulse"})]}),e[2]=a):a=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=o):o=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=Array.from({length:4}).map(rr),e[4]=c):c=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsxs("div",{className:"flex flex-col gap-6",children:[o,t.jsxs("div",{className:"flex flex-col",children:[c,t.jsx("div",{className:"flex items-center h-10 px-4 gap-2",children:t.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"})})]})]}),e[5]=d):d=e[5];let n;return e[6]!==l?(n=t.jsxs(Jt,{className:l,children:[a,d]}),e[6]=l,e[7]=n):n=e[7],n}function rr(s,e){return t.jsxs("div",{className:ce("flex items-center h-10 px-3",e<3&&"border-b border-border/50"),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2",children:[t.jsx("div",{className:"size-6 rounded-md bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"})]}),t.jsxs("div",{className:"flex items-center gap-2 px-3",children:[t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]})]},e)}function lr(){const s=le.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ke,{}),s[0]=e):e=s[0];let r,l;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{})]}),l=t.jsx("div",{className:"border-t border-border"}),s[1]=r,s[2]=l):(r=s[1],l=s[2]);let a;return s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsxs("div",{className:"flex flex-col gap-4 px-4 md:px-10 pt-8 md:pt-12 pb-6 max-w-[1200px] mx-auto w-full",children:[e,r,l,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(Ke,{}),t.jsx(Ke,{}),t.jsx(Ke,{})]})]}),s[3]=a):a=s[3],a}function or(s){const e=le.c(46),{log:r,connection:l,virtualMcpName:a,virtualMcpIcon:o,onClick:c,lastLogRef:d}=s;let n,i;if(e[0]!==r.timestamp){const F=new Date(r.timestamp);n=F.toLocaleDateString("en-US",{month:"short",day:"numeric"}),i=F.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=r.timestamp,e[1]=n,e[2]=i}else n=e[1],i=e[2];const m=i,j=l?.icon||null,v=l?.title??r.connectionId;let b;e[3]!==j||e[4]!==v?(b=t.jsx(De,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(qe,{icon:j,name:v,size:"xs",className:"shadow-sm"})})}),e[3]=j,e[4]=v,e[5]=b):b=e[5];let x;e[6]!==r.toolName?(x=t.jsx("div",{className:"font-medium text-foreground truncate block",children:r.toolName}),e[6]=r.toolName,e[7]=x):x=e[7];const L=l?.title??r.connectionId;let p;e[8]!==L?(p=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:L}),e[8]=L,e[9]=p):p=e[9];let g;e[10]!==x||e[11]!==p?(g=t.jsxs(De,{className:"min-w-0 pr-2 md:pr-4",children:[x,p]}),e[10]=x,e[11]=p,e[12]=g):g=e[12];let u;e[13]!==o||e[14]!==a?(u=t.jsx(De,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:a?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(qe,{icon:o,name:a,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:a})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=o,e[14]=a,e[15]=u):u=e[15];let k;e[16]!==r.userImage||e[17]!==r.userName?(k=t.jsx(Ht,{url:r.userImage,fallback:r.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=r.userImage,e[17]=r.userName,e[18]=k):k=e[18];let S;e[19]!==r.userName?(S=t.jsx("span",{className:"truncate",children:r.userName}),e[19]=r.userName,e[20]=S):S=e[20];let h;e[21]!==k||e[22]!==S?(h=t.jsx(De,{className:"w-28 md:w-36 px-2 md:px-3 text-muted-foreground",children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[k,S]})}),e[21]=k,e[22]=S,e[23]=h):h=e[23];let T;e[24]!==n?(T=t.jsx("div",{children:n}),e[24]=n,e[25]=T):T=e[25];let I;e[26]!==m?(I=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:m}),e[26]=m,e[27]=I):I=e[27];let f;e[28]!==T||e[29]!==I?(f=t.jsxs(De,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[T,I]}),e[28]=T,e[29]=I,e[30]=f):f=e[30];let M;e[31]!==r.durationMs?(M=t.jsxs(De,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[r.durationMs,"ms"]}),e[31]=r.durationMs,e[32]=M):M=e[32];const y=r.isError?"destructive":"success",R=r.isError?"Error":"OK";let C;e[33]!==y||e[34]!==R?(C=t.jsx(De,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"flex items-center justify-end",children:t.jsx(rt,{variant:y,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:R})})}),e[33]=y,e[34]=R,e[35]=C):C=e[35];let E;return e[36]!==d||e[37]!==c||e[38]!==h||e[39]!==f||e[40]!==M||e[41]!==C||e[42]!==b||e[43]!==g||e[44]!==u?(E=t.jsxs(ut,{ref:d,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:c,children:[b,g,u,h,f,M,C]}),e[36]=d,e[37]=c,e[38]=h,e[39]=f,e[40]=M,e[41]=C,e[42]=b,e[43]=g,e[44]=u,e[45]=E):E=e[45],E}function ar(s){const e=le.c(26),{connectionIds:r,virtualMcpIds:l,tool:a,status:o,search:c,logs:d,hasMore:n,onLoadMore:i,isLoadingMore:m,connections:j,virtualMcps:v,membersData:b,client:x}=s,L=j??[],p=v??[],[g,u]=K.useState(null),k=As(i,n,m),S=Kt(b),h=new Map(S.map(dr)),T=new Map(p.map(cr));let f=d.map(N=>{const D=h.get(N.userId??""),B=N.virtualMcpId?T.get(N.virtualMcpId):null;return{...N,userName:D?.name??N.userId??"Unknown",userImage:D?.image??void 0,virtualMcpName:B?.title??null,virtualMcpIcon:B?.icon??null}});if(r.length>1){let N;e[0]!==r?(N=D=>r.includes(D.connectionId),e[0]=r,e[1]=N):N=e[1],f=f.filter(N)}if(l.length>1){let N;e[2]!==l?(N=D=>D.virtualMcpId&&l.includes(D.virtualMcpId),e[2]=l,e[3]=N):N=e[3],f=f.filter(N)}const M=new Map(L.map(ir));if(c){const N=c.toLowerCase();f=f.filter(D=>D.toolName.toLowerCase().includes(N)||(M.get(D.connectionId)?.title??D.connectionId).toLowerCase().includes(N)||D.errorMessage?.toLowerCase().includes(N))}const y=g!==null?f[g]??null:null,R=yt({queryKey:it.monitoringLogDetail(y?.id??""),queryFn:async()=>{if(!x)throw new Error("MCP client is not available");const N=await x.callTool({name:"MONITORING_LOG_GET",arguments:{id:y.id}});return N.structuredContent??N},enabled:y!==null}),C=R.data?.log,E=y&&C?{...y,input:C.input,output:C.output}:y;if(f.length===0){let N;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=N):N=e[4];const D=c||r.length>0||l.length>0||a||o!=="all"?"No logs match your filters":"No logs found in this time range";let B;return e[5]!==D?(B=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(wt,{image:N,title:"No logs found",description:D})}),e[5]=D,e[6]=B):B=e[6],B}const F="flex-1 flex flex-col min-w-0",H="flex-1 min-w-0 pt-1",A="min-w-[600px] md:min-w-0",W=Qt,w="w-full border-collapse";let _;e[7]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[t.jsx(oe,{className:"w-5"}),t.jsx(oe,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Tool / Connection"}),t.jsx(oe,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Agent"}),t.jsx(oe,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"User"}),t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Date"}),t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Latency"}),t.jsx(oe,{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[7]=_):_=e[7];const $=Gt,O=f.map((N,D)=>t.jsx(or,{log:N,connection:M.get(N.connectionId),virtualMcpName:N.virtualMcpName??"",virtualMcpIcon:N.virtualMcpIcon,onClick:()=>u(D),lastLogRef:D===f.length-1?k:void 0},N.id));let z;e[8]!==$||e[9]!==O?(z=t.jsx($,{children:O}),e[8]=$,e[9]=O,e[10]=z):z=e[10];let V;e[11]!==W||e[12]!==_||e[13]!==z?(V=t.jsx("div",{className:H,children:t.jsx("div",{className:A,children:t.jsxs(W,{className:w,children:[_,z]})})}),e[11]=W,e[12]=_,e[13]=z,e[14]=V):V=e[14];const q=g!==null;let J;e[15]!==u?(J=N=>{N||u(null)},e[15]=u,e[16]=J):J=e[16];const G=y&&g!==null&&t.jsxs(t.Fragment,{children:[t.jsx(Rs,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[t.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[t.jsx(qe,{icon:M.get(y.connectionId)?.icon||null,name:M.get(y.connectionId)?.title??y.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(Os,{className:"text-sm leading-snug truncate",children:y.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:M.get(y.connectionId)?.title??y.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>u(nr),disabled:g===0,className:"h-7 w-7 text-muted-foreground","aria-label":"Previous entry",children:t.jsx(Ps,{size:14})}),t.jsx(Z,{size:"icon",variant:"ghost",onClick:()=>u(N=>N!==null&&N<f.length-1?N+1:N),disabled:g===f.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":"Next entry",children:t.jsx(qt,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:R.isLoading?t.jsx("div",{className:"flex items-center justify-center py-12",children:t.jsx("div",{className:"size-5 border-2 border-muted-foreground/30 border-t-muted-foreground rounded-full animate-spin"})}):R.isError?t.jsxs("div",{className:"flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground",children:[t.jsx("p",{children:"Failed to load log details"}),t.jsx(Z,{variant:"outline",size:"sm",onClick:()=>R.refetch(),children:"Retry"})]}):t.jsx(Bs,{log:E})})]});let Q;e[17]!==G?(Q=t.jsx(zs,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:G}),e[17]=G,e[18]=Q):Q=e[18];let U;e[19]!==J||e[20]!==Q||e[21]!==q?(U=t.jsx(Es,{open:q,onOpenChange:J,children:Q}),e[19]=J,e[20]=Q,e[21]=q,e[22]=U):U=e[22];let P;return e[23]!==U||e[24]!==V?(P=t.jsxs("div",{className:F,children:[V,U]}),e[23]=U,e[24]=V,e[25]=P):P=e[25],P}function nr(s){return s!==null&&s>0?s-1:s}function ir(s){return[s.id,s]}function cr(s){return[s.id,s]}function dr(s){return[s.userId,s.user]}function mr(){const s=le.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(oe,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let r;s[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(oe,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=r):r=s[1];let l;s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(oe,{className:"w-24 md:w-32 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})}),s[2]=l):l=s[2];let a;s[3]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(oe,{className:"w-20 md:w-24 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),s[3]=a):a=s[3];let o;s[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(oe,{className:"w-32 md:w-40 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse"})}),s[4]=o):o=s[4];let c;s[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(oe,{className:"w-16 md:w-20 px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),s[5]=c):c=s[5];let d;s[6]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Wt,{className:"border-b-0 z-20",children:t.jsxs(ut,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,r,l,a,o,c,t.jsx(oe,{className:"w-16 md:w-24 px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse ml-auto"})})]})}),s[6]=d):d=s[6];let n;return s[7]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsxs(Qt,{className:"w-full border-collapse",children:[d,t.jsx(Gt,{children:Array.from({length:8}).map(ur)})]})})}),s[7]=n):n=s[7],n}function ur(s,e){return t.jsxs(ut,{className:"h-14 border-b border-border hover:bg-transparent",children:[t.jsx("td",{className:"px-2 md:px-4",children:t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"pr-2 md:pr-4",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3.5 w-32 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsxs("div",{className:"space-y-1",children:[t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),t.jsx("div",{className:"h-2.5 w-20 rounded bg-muted animate-pulse"})]})}),t.jsx("td",{className:"px-2 md:px-3",children:t.jsx("div",{className:"h-3 w-10 rounded bg-muted animate-pulse ml-auto"})}),t.jsx("td",{className:"px-2 md:px-3 pr-3 md:pr-5",children:t.jsx("div",{className:"h-5 w-14 rounded-full bg-muted animate-pulse ml-auto"})})]},e)}const Nt=Object.assign(ar,{Skeleton:mr});function xr(s){const e=le.c(34),{client:r,locator:l,baseParams:a,pageSize:o,isStreaming:c,streamingRefetchInterval:d,connectionIds:n,virtualMcpIds:i,tool:m,status:j,searchQuery:v,allConnections:b,allVirtualMcps:x,membersData:L}=s;let p;e[0]!==a||e[1]!==l?(p=it.monitoringLogsInfinite(l,JSON.stringify(a)),e[0]=a,e[1]=l,e[2]=p):p=e[2];let g;e[3]!==a||e[4]!==r||e[5]!==o?(g=async H=>{const{pageParam:A}=H,W=A===void 0?0:A;if(!r)throw new Error("MCP client is not available");const w=await r.callTool({name:"MONITORING_LOGS_LIST",arguments:{...a,limit:o,offset:W}});return w.structuredContent??w},e[3]=a,e[4]=r,e[5]=o,e[6]=g):g=e[6];let u;e[7]!==o?(u=(H,A)=>{if(!((H?.logs?.length??0)<o))return A.length*o},e[7]=o,e[8]=u):u=e[8];const k=c?d:!1;let S;e[9]!==p||e[10]!==g||e[11]!==u||e[12]!==k?(S={queryKey:p,queryFn:g,initialPageParam:0,getNextPageParam:u,staleTime:0,refetchInterval:k},e[9]=p,e[10]=g,e[11]=u,e[12]=k,e[13]=S):S=e[13];const{data:h,fetchNextPage:T,hasNextPage:I,isFetchingNextPage:f}=$s(S);let M;e[14]!==h.pages?(M=h.pages.flatMap(fr),e[14]=h.pages,e[15]=M):M=e[15];const y=M;let R;e[16]!==T||e[17]!==I||e[18]!==f?(R=()=>{I&&!f&&T()},e[16]=T,e[17]=I,e[18]=f,e[19]=R):R=e[19];const C=R,E=I??!1;let F;return e[20]!==b||e[21]!==x||e[22]!==r||e[23]!==n||e[24]!==C||e[25]!==f||e[26]!==L||e[27]!==y||e[28]!==v||e[29]!==j||e[30]!==E||e[31]!==m||e[32]!==i?(F=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0",children:t.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:t.jsx(Nt,{connectionIds:n,virtualMcpIds:i,tool:m,status:j,search:v,logs:y,hasMore:E,onLoadMore:C,isLoadingMore:f,connections:b,virtualMcps:x,membersData:L,client:r})})})}),e[20]=b,e[21]=x,e[22]=r,e[23]=n,e[24]=C,e[25]=f,e[26]=L,e[27]=y,e[28]=v,e[29]=j,e[30]=E,e[31]=m,e[32]=i,e[33]=F):F=e[33],F}function fr(s){return s.logs??[]}function pr(s){const e=le.c(15),{dateRange:r}=s,{data:l,isLoading:a}=Vs(void 0);let o;e[0]!==l?(o=l===void 0?[]:l,e[0]=l,e[1]=o):o=e[1];const c=o,[d,n]=K.useState(null),i=d??c[0]?.id??null,{data:m}=Us(i??"");let j;e[2]!==r.startDate?(j=r.startDate.toISOString(),e[2]=r.startDate,e[3]=j):j=e[3];let v;e[4]!==r.endDate?(v=r.endDate.toISOString(),e[4]=r.endDate,e[5]=v):v=e[5];let b;e[6]!==j||e[7]!==v?(b={startDate:j,endDate:v},e[6]=j,e[7]=v,e[8]=b):b=e[8];const x=b;let L;return e[9]!==m||e[10]!==c||e[11]!==i||e[12]!==a||e[13]!==x?(L=t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx("div",{className:"mx-auto w-full max-w-[1200px] px-4 md:px-10 flex flex-col flex-1 min-h-0 gap-5 pt-1",children:a?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"}):c.length===0?t.jsx("div",{className:"py-16",children:t.jsx(wt,{title:"No automations",description:"Create an automation to see its runs and usage here."})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(nt,{value:i??"",onValueChange:p=>n(p),children:[t.jsx(lt,{className:"w-72",children:t.jsx(ot,{placeholder:"Select an automation…"})}),t.jsx(at,{children:c.map(gr)})]})}),m?t.jsx(ys,{automationId:m.id,triggerIds:m.triggers.map(hr),range:x}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:"Loading…"})]})})}),e[9]=m,e[10]=c,e[11]=i,e[12]=a,e[13]=x,e[14]=L):L=e[14],L}function hr(s){return s.id}function gr(s){return t.jsx(Fe,{value:s.id,children:s.name},s.id)}const jr=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function vr({connectionIds:s,virtualMcpIds:e,tool:r,status:l,hideSystem:a,propertyFilters:o,connectionOptions:c,virtualMcpOptions:d,activeFiltersCount:n,onUpdateFilters:i,onConnectionSearchChange:m,memberOptions:j,llmUserIds:v=[],onLlmUserIdsChange:b,showMemberFilter:x}){const[L,p]=K.useState(!1),[g,u]=K.useState("form"),[k,S]=K.useState(r),[h,T]=K.useState(o),[I,f]=K.useState(Ye(o)),M=K.useRef(r),y=K.useRef(Le(o));M.current!==r&&(M.current=r,k!==r&&S(r));const R=Le(o);y.current!==R&&(y.current=R,T(o),f(Ye(o)));const C=(w,_)=>{const $=[...h],O=$[w];O&&($[w]={key:_.key??O.key,operator:_.operator??O.operator,value:_.value??O.value},T($))},E=()=>{T([...h,{key:"",operator:"eq",value:""}])},F=w=>{const _=h.filter(($,O)=>O!==w);T(_),f(Ye(_)),i({propertyFilters:Le(_)})},H=()=>{i({propertyFilters:Le(h)})},A=()=>{const w=$t(I);T(w),i({propertyFilters:Le(w)})},W=()=>{if(g==="raw"){const w=$t(I);T(w),u("form")}else f(Ye(h)),u("raw")};return t.jsxs(ct,{open:L,onOpenChange:p,children:[t.jsx(dt,{asChild:!0,children:t.jsxs(Z,{variant:"outline",className:"relative",children:[t.jsx(Vt,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:"Filters"}),n>0&&t.jsxs(t.Fragment,{children:[t.jsx(rt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:n}),t.jsx(rt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:n})]})]})}),t.jsx(mt,{align:"end",className:"w-[320px]",children:t.jsxs("div",{className:"space-y-4",children:[t.jsx("div",{children:t.jsx("h4",{className:"font-medium text-sm mb-3",children:"Filter Logs"})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(Ms,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:"Hide system calls"}),t.jsx(Ts,{id:"hide-system-calls",checked:a,onCheckedChange:w=>i({hideSystem:!!w})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Connections"}),t.jsx(ht,{options:c,defaultValue:s,onValueChange:w=>i({connectionId:w}),onSearchChange:m,placeholder:"All servers",variant:"secondary",className:"w-full",maxCount:2})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Agents"}),t.jsx(ht,{options:d,defaultValue:e,onValueChange:w=>i({virtualMcpId:w}),placeholder:"All Agents",variant:"secondary",className:"w-full",maxCount:2})]}),x&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Members"}),t.jsx(ht,{options:j??[],defaultValue:v,onValueChange:w=>b?.(w),placeholder:"All members",variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:"Filters AI usage (calls, tokens, cost) only."})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Tool Name"}),t.jsx(Ge,{id:"filter-tool",placeholder:"Filter by tool...",value:k,onChange:w=>S(w.target.value),onBlur:()=>{k!==r&&i({tool:k})},onKeyDown:w=>{w.key==="Enter"&&k!==r&&i({tool:k})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:"Status"}),t.jsxs(nt,{value:l,onValueChange:w=>i({status:w}),children:[t.jsx(lt,{className:"w-full",children:t.jsx(ot,{})}),t.jsxs(at,{children:[t.jsx(Fe,{value:"all",children:"All Status"}),t.jsx(Fe,{value:"success",children:"Success Only"}),t.jsx(Fe,{value:"errors",children:"Errors Only"})]})]})]}),t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center justify-between mb-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Property Filters"}),t.jsxs(Ze,{children:[t.jsx(et,{asChild:!0,children:t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:W,children:g==="raw"?t.jsx(gs,{size:14}):t.jsx(xs,{size:14})})}),t.jsx(tt,{children:g==="raw"?"Switch to form view":"Switch to raw text"})]})]}),g==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(ks,{placeholder:`Paste property filters here:
6
6
  thread_id=abc123
7
7
  user~test
8
- debug?`,value:I,onChange:w=>f(w.target.value),onBlur:P,onKeyDown:w=>{w.key==="Enter"&&w.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:[h.map((w,_)=>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 ",_+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>F(_),children:t.jsx(vs,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:w.key,onChange:$=>C(_,{key:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:w.operator,onValueChange:$=>{const O=[...h],z=O[_];z&&(O[_]={...z,operator:$,value:$==="exists"?"":z.value},T(O),i({propertyFilters:Le(O)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:jr.map($=>t.jsx(Fe,{value:$.value,children:$.label},$.value))})]})]}),w.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:w.value,onChange:$=>C(_,{value:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"w-full font-mono text-sm"})]},_)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:E,children:[t.jsx(js,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),T([]),f(""),i({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function Nr(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:d,status:n,search:i,streaming:m,hideSystem:j,activeFiltersCount:v,from:b,to:x,propertyFilters:L,onUpdateFilters:p,onTimeRangeChange:g,onStreamingToggle:u,onTabChange:k}=s,S=Dt(),h=hs(),{data:T}=fs(),[I,f]=K.useState(""),M=I||void 0;let y;e[0]!==M?(y={searchTerm:M},e[0]=M,e[1]=y):y=e[1];const R=Dt(y);let C;e[2]!==R?(C=R??[],e[2]=R,e[3]=C):C=e[3];let E;e[4]!==C?(E=C.map(wr),e[4]=C,e[5]=E):E=e[5];const F=E;let H;e[6]!==h?(H=h.map(yr),e[6]=h,e[7]=H):H=e[7];const P=H,{pageSize:W,streamingRefetchInterval:w}=vt,{org:_,locator:$}=Be();let O;e[8]!==_.id||e[9]!==_.slug?(O={connectionId:St,orgId:_.id,orgSlug:_.slug},e[8]=_.id,e[9]=_.slug,e[10]=O):O=e[10];const z=It(O);let V;e[11]!==L?(V=qs(L),e[11]=L,e[12]=V):V=e[12];const q=V;let J;e[13]!==j||e[14]!==_.id?(J=j?[ps.SELF(_.id)]:void 0,e[13]=j,e[14]=_.id,e[15]=J):J=e[15];const G=J;let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=[],e[16]=Q):Q=e[16];const[U,A]=K.useState(Q);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[D,B]=K.useState(N);let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[18]=ee):ee=e[18];const[X,te]=K.useState(ee),[Y,ae]=K.useState("all"),_e=(D.length>0?1:0)+(X.length>0?1:0)+(Y!=="all"?1:0);let $e;e[19]!==T?($e=Kt(T).map(br),e[19]=T,e[20]=$e):$e=e[20];const Se=$e;let ne;e[21]!==l.startDate?(ne=l.startDate.toISOString(),e[21]=l.startDate,e[22]=ne):ne=e[22];let he;e[23]!==l.endDate?(he=l.endDate.toISOString(),e[23]=l.endDate,e[24]=he):he=e[24];const ge=o.length===1?o[0]:void 0,je=c.length===1?c[0]:void 0,ve=d||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let de;e[25]!==G||e[26]!==q||e[27]!==ne||e[28]!==he||e[29]!==ge||e[30]!==je||e[31]!==ve||e[32]!==Ne?(de={startDate:ne,endDate:he,connectionId:ge,excludeConnectionIds:G,virtualMcpId:je,toolName:ve,isError:Ne,...q},e[25]=G,e[26]=q,e[27]=ne,e[28]=he,e[29]=ge,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=de):de=e[33];const be=de;let me;e[34]===Symbol.for("react.memo_cache_sentinel")?(me={id:"overview",label:"Overview"},e[34]=me):me=e[34];let ue;e[35]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"audit",label:"Audit"},e[35]=ue):ue=e[35];let xe;e[36]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"threads",label:"Threads"},e[36]=xe):xe=e[36];let fe;e[37]===Symbol.for("react.memo_cache_sentinel")?(fe=[me,ue,xe,{id:"automations",label:"Automations"}],e[37]=fe):fe=e[37];const Re=fe;let se;e[38]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(Me.Title,{children:"Monitoring"}),e[38]=se):se=e[38];let re;e[39]!==k?(re=Ie=>k(Ie),e[39]=k,e[40]=re):re=e[40];let ie;e[41]!==re||e[42]!==r?(ie=t.jsx(Bt,{tabs:Re,activeTab:r,onTabChange:re}),e[41]=re,e[42]=r,e[43]=ie):ie=e[43];let pe;e[44]!==v||e[45]!==o||e[46]!==F||e[47]!==I||e[48]!==j||e[49]!==m||e[50]!==U||e[51]!==Se||e[52]!==u||e[53]!==p||e[54]!==L||e[55]!==n||e[56]!==r||e[57]!==d||e[58]!==c||e[59]!==P?(pe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:m?"secondary":"outline",className:"gap-1.5",onClick:u,children:[m&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),m&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(vr,{connectionIds:o,virtualMcpIds:c,tool:d,status:n,hideSystem:j,propertyFilters:L,connectionOptions:F,virtualMcpOptions:P,activeFiltersCount:v,onUpdateFilters:p,connectionSearchTerm:I,onConnectionSearchChange:f,memberOptions:Se,llmUserIds:U,onLlmUserIdsChange:A,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=F,e[47]=I,e[48]=j,e[49]=m,e[50]=U,e[51]=Se,e[52]=u,e[53]=p,e[54]=L,e[55]=n,e[56]=r,e[57]=d,e[58]=c,e[59]=P,e[60]=pe):pe=e[60];let ye;e[61]!==Se||e[62]!==r||e[63]!==_e||e[64]!==D||e[65]!==Y||e[66]!==X||e[67]!==P?(ye=r==="threads"&&t.jsx(ws,{filterAgentIds:D,filterUserIds:X,filterStatus:Y,virtualMcpOptions:P,memberOptions:Se,activeFiltersCount:_e,onUpdateFilters:Ie=>{const{filterAgentIds:Ct,filterUserIds:kt,filterStatus:Tt}=Ie;Ct!==void 0&&B(Ct),kt!==void 0&&te(kt),Tt!==void 0&&ae(Tt)}}),e[61]=Se,e[62]=r,e[63]=_e,e[64]=D,e[65]=Y,e[66]=X,e[67]=P,e[68]=ye):ye=e[68];let Oe;e[69]!==b||e[70]!==x?(Oe={from:b,to:x},e[69]=b,e[70]=x,e[71]=Oe):Oe=e[71];let ze;e[72]!==g||e[73]!==Oe?(ze=t.jsx(Xs,{value:Oe,onChange:g}),e[72]=g,e[73]=Oe,e[74]=ze):ze=e[74];let Ee;e[75]!==pe||e[76]!==ye||e[77]!==ze?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[pe,ye,ze]}),e[75]=pe,e[76]=ye,e[77]=ze,e[78]=Ee):Ee=e[78];let Ae;e[79]!==ie||e[80]!==Ee?(Ae=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ie,Ee]}),e[79]=ie,e[80]=Ee,e[81]=Ae):Ae=e[81];let Pe;e[82]!==p||e[83]!==i||e[84]!==r?(Pe=(r==="audit"||r==="threads")&&t.jsx(as,{value:i,onChange:Ie=>p({search:Ie}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Ie=>{Ie.key==="Escape"&&(p({search:""}),Ie.target.blur())},className:"w-full md:w-[375px]"}),e[82]=p,e[83]=i,e[84]=r,e[85]=Pe):Pe=e[85];let Ve;e[86]!==Ae||e[87]!==Pe?(Ve=t.jsx(Me.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[se,Ae,Pe]})}),e[86]=Ae,e[87]=Pe,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==h||e[91]!==be||e[92]!==z||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==G||e[97]!==m||e[98]!==U||e[99]!==$||e[100]!==T||e[101]!==i||e[102]!==n||e[103]!==r||e[104]!==D||e[105]!==Y||e[106]!==X||e[107]!==d||e[108]!==c?(Ue=r==="automations"?t.jsx(pr,{dateRange:l}):r==="threads"?t.jsx(Ss,{client:z,locator:$,membersData:T,allConnections:S,allVirtualMcps:h,dateRange:l,searchQuery:i,filterAgentIds:D,filterUserIds:X,filterStatus:Y}):r==="audit"?t.jsx(xr,{client:z,locator:$,baseParams:be,pageSize:W,isStreaming:m,streamingRefetchInterval:w,connectionIds:o,virtualMcpIds:c,tool:d,status:n,searchQuery:i,allConnections:S,allVirtualMcps:h,membersData:T}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(sr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:G,toolName:d||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:m,streamingRefetchInterval:w,llmUserIds:U})}),e[89]=S,e[90]=h,e[91]=be,e[92]=z,e[93]=o,e[94]=l,e[95]=a,e[96]=G,e[97]=m,e[98]=U,e[99]=$,e[100]=T,e[101]=i,e[102]=n,e[103]=r,e[104]=D,e[105]=Y,e[106]=X,e[107]=d,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function br(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Ht,{url:r,fallback:e,shape:"circle",size:"2xs",className:ce("shrink-0",a)})}}}function yr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function To(){const s=le.c(83),{org:e}=Be(),r=bt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:d,connectionId:n,virtualMcpId:i,tool:m,search:j,status:v,streaming:b,propertyFilters:x,hideSystem:L}=a,p=o===void 0?"overview":o;let g;s[1]!==n?(g=n===void 0?[]:n,s[1]=n,s[2]=g):g=s[2];const u=g;let k;s[3]!==i?(k=i===void 0?[]:i,s[3]=i,s[4]=k):k=s[4];const S=k,h=b===void 0?!0:b,T=x===void 0?"":x,I=L===void 0?!1:L;let f,M,y,R,C,E,F;if(s[5]!==u.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==T||s[11]!==a||s[12]!==v||s[13]!==h||s[14]!==d||s[15]!==m||s[16]!==S.length){C=Ks(T);let A;s[24]!==r||s[25]!==e.slug||s[26]!==a?(A=X=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...X}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=A):A=s[27],F=A;let N;s[28]!==F?(N=X=>{F({from:X.from,to:X.to})},s[28]=F,s[29]=N):N=s[29],R=N;let D,B;if(s[30]!==c||s[31]!==h||s[32]!==d){const X=we(c),te=we(d);B=X.date||new Date(Date.now()-18e5);const Y=te.date||new Date;y={startDate:B,endDate:Y},D=Y,h&&d==="now"&&(D=new Date(Y),D.setHours(D.getHours()+1)),s[30]=c,s[31]=h,s[32]=d,s[33]=y,s[34]=D,s[35]=B}else y=s[33],D=s[34],B=s[35];let ee;s[36]!==D||s[37]!==B?(ee={startDate:B,endDate:D},s[36]=D,s[37]=B,s[38]=ee):ee=s[38],M=ee,f=0,u.length>0&&f++,S.length>0&&f++,m&&f++,v!=="all"&&f++,I&&f++,E=C.filter(Sr),s[5]=u.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=T,s[11]=a,s[12]=v,s[13]=h,s[14]=d,s[15]=m,s[16]=S.length,s[17]=f,s[18]=M,s[19]=y,s[20]=R,s[21]=C,s[22]=E,s[23]=F}else f=s[17],M=s[18],y=s[19],R=s[20],C=s[21],E=s[22],F=s[23];const H=E;H.length>0&&(f=f+H.length);let P;s[39]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Me.Body,{className:"!pb-3",children:t.jsx(Me.Title,{children:"Monitoring"})}),s[39]=P):P=s[39];let W;s[40]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs(t.Fragment,{children:[P,t.jsx(Me.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(wt,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=W):W=s[40];let w;s[41]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Me.Title,{children:"Monitoring"}),s[41]=w):w=s[41];let _;s[42]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=_):_=s[42];let $;s[43]!==F?($=A=>F({tab:A}),s[43]=F,s[44]=$):$=s[44];let O;s[45]!==$||s[46]!==p?(O=t.jsx(Me.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[w,t.jsx(Bt,{tabs:_,activeTab:p,onTabChange:$})]})}),s[45]=$,s[46]=p,s[47]=O):O=s[47];let z;s[48]!==p?(z=p==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):p==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(lr,{})}),s[48]=p,s[49]=z):z=s[49];let V;s[50]!==O||s[51]!==z?(V=t.jsxs(t.Fragment,{children:[O,z]}),s[50]=O,s[51]=z,s[52]=V):V=s[52];let q;s[53]!==R?(q=A=>{xt("monitoring_time_range_changed",{from:A.from,to:A.to}),R(A)},s[53]=R,s[54]=q):q=s[54];let J;s[55]!==h||s[56]!==F?(J=()=>{xt("monitoring_live_toggled",{enabled:!h}),F({streaming:!h})},s[55]=h,s[56]=F,s[57]=J):J=s[57];let G;s[58]!==p||s[59]!==F?(G=A=>{A!==p&&xt("monitoring_tab_changed",{from_tab:p,to_tab:A}),F({tab:A})},s[58]=p,s[59]=F,s[60]=G):G=s[60];let Q;s[61]!==f||s[62]!==u||s[63]!==M||s[64]!==y||s[65]!==c||s[66]!==I||s[67]!==C||s[68]!==j||s[69]!==v||s[70]!==h||s[71]!==q||s[72]!==J||s[73]!==G||s[74]!==p||s[75]!==d||s[76]!==m||s[77]!==F||s[78]!==S?(Q=t.jsx(Nr,{tab:p,dateRange:M,displayDateRange:y,connectionIds:u,virtualMcpIds:S,tool:m,status:v,search:j,streaming:h,hideSystem:I,activeFiltersCount:f,from:c,to:d,propertyFilters:C,onUpdateFilters:F,onTimeRangeChange:q,onStreamingToggle:J,onTabChange:G}),s[61]=f,s[62]=u,s[63]=M,s[64]=y,s[65]=c,s[66]=I,s[67]=C,s[68]=j,s[69]=v,s[70]=h,s[71]=q,s[72]=J,s[73]=G,s[74]=p,s[75]=d,s[76]=m,s[77]=F,s[78]=S,s[79]=Q):Q=s[79];let U;return s[80]!==V||s[81]!==Q?(U=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Me,{children:t.jsx(os,{fallback:W,children:t.jsx(K.Suspense,{fallback:V,children:Q})})})}),s[80]=V,s[81]=Q,s[82]=U):U=s[82],U}function Sr(s){return s.key.trim()}export{To as default};
8
+ debug?`,value:I,onChange:w=>f(w.target.value),onBlur:A,onKeyDown:w=>{w.key==="Enter"&&w.metaKey&&A()},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:[h.map((w,_)=>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 ",_+1]}),t.jsx(Z,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>F(_),children:t.jsx(vs,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Ge,{placeholder:"Key (e.g., thread_id)",value:w.key,onChange:$=>C(_,{key:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"flex-1 font-mono text-sm"}),t.jsxs(nt,{value:w.operator,onValueChange:$=>{const O=[...h],z=O[_];z&&(O[_]={...z,operator:$,value:$==="exists"?"":z.value},T(O),i({propertyFilters:Le(O)}))},children:[t.jsx(lt,{className:"w-28",children:t.jsx(ot,{})}),t.jsx(at,{children:jr.map($=>t.jsx(Fe,{value:$.value,children:$.label},$.value))})]})]}),w.operator!=="exists"&&t.jsx(Ge,{placeholder:"Value",value:w.value,onChange:$=>C(_,{value:$.target.value}),onBlur:H,onKeyDown:$=>{$.key==="Enter"&&H()},className:"w-full font-mono text-sm"})]},_)),t.jsxs(Z,{variant:"outline",size:"sm",className:"w-full",onClick:E,children:[t.jsx(js,{size:14,className:"mr-1.5"}),"Add filter"]})]})]})]}),n>0&&t.jsx(Z,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),T([]),f(""),i({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),p(!1)},children:"Clear all filters"})]})})]})}function Nr(s){const e=le.c(113),{tab:r,dateRange:l,displayDateRange:a,connectionIds:o,virtualMcpIds:c,tool:d,status:n,search:i,streaming:m,hideSystem:j,activeFiltersCount:v,from:b,to:x,propertyFilters:L,onUpdateFilters:p,onTimeRangeChange:g,onStreamingToggle:u,onTabChange:k}=s,S=Dt(),h=hs(),{data:T}=fs(),[I,f]=K.useState(""),M=I||void 0;let y;e[0]!==M?(y={searchTerm:M},e[0]=M,e[1]=y):y=e[1];const R=Dt(y);let C;e[2]!==R?(C=R??[],e[2]=R,e[3]=C):C=e[3];let E;e[4]!==C?(E=C.map(wr),e[4]=C,e[5]=E):E=e[5];const F=E;let H;e[6]!==h?(H=h.map(yr),e[6]=h,e[7]=H):H=e[7];const A=H,{pageSize:W,streamingRefetchInterval:w}=vt,{org:_,locator:$}=Be();let O;e[8]!==_.id||e[9]!==_.slug?(O={connectionId:St,orgId:_.id,orgSlug:_.slug},e[8]=_.id,e[9]=_.slug,e[10]=O):O=e[10];const z=It(O);let V;e[11]!==L?(V=qs(L),e[11]=L,e[12]=V):V=e[12];const q=V;let J;e[13]!==j||e[14]!==_.id?(J=j?[ps.SELF(_.id)]:void 0,e[13]=j,e[14]=_.id,e[15]=J):J=e[15];const G=J;let Q;e[16]===Symbol.for("react.memo_cache_sentinel")?(Q=[],e[16]=Q):Q=e[16];const[U,P]=K.useState(Q);let N;e[17]===Symbol.for("react.memo_cache_sentinel")?(N=[],e[17]=N):N=e[17];const[D,B]=K.useState(N);let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=[],e[18]=ee):ee=e[18];const[X,te]=K.useState(ee),[Y,ae]=K.useState("all"),_e=(D.length>0?1:0)+(X.length>0?1:0)+(Y!=="all"?1:0);let $e;e[19]!==T?($e=Kt(T).map(br),e[19]=T,e[20]=$e):$e=e[20];const Se=$e;let ne;e[21]!==l.startDate?(ne=l.startDate.toISOString(),e[21]=l.startDate,e[22]=ne):ne=e[22];let he;e[23]!==l.endDate?(he=l.endDate.toISOString(),e[23]=l.endDate,e[24]=he):he=e[24];const ge=o.length===1?o[0]:void 0,je=c.length===1?c[0]:void 0,ve=d||void 0,Ne=n==="errors"?!0:n==="success"?!1:void 0;let de;e[25]!==G||e[26]!==q||e[27]!==ne||e[28]!==he||e[29]!==ge||e[30]!==je||e[31]!==ve||e[32]!==Ne?(de={startDate:ne,endDate:he,connectionId:ge,excludeConnectionIds:G,virtualMcpId:je,toolName:ve,isError:Ne,...q},e[25]=G,e[26]=q,e[27]=ne,e[28]=he,e[29]=ge,e[30]=je,e[31]=ve,e[32]=Ne,e[33]=de):de=e[33];const be=de;let me;e[34]===Symbol.for("react.memo_cache_sentinel")?(me={id:"overview",label:"Overview"},e[34]=me):me=e[34];let ue;e[35]===Symbol.for("react.memo_cache_sentinel")?(ue={id:"audit",label:"Audit"},e[35]=ue):ue=e[35];let xe;e[36]===Symbol.for("react.memo_cache_sentinel")?(xe={id:"threads",label:"Threads"},e[36]=xe):xe=e[36];let fe;e[37]===Symbol.for("react.memo_cache_sentinel")?(fe=[me,ue,xe,{id:"automations",label:"Automations"}],e[37]=fe):fe=e[37];const Re=fe;let se;e[38]===Symbol.for("react.memo_cache_sentinel")?(se=t.jsx(Me.Title,{children:"Monitoring"}),e[38]=se):se=e[38];let re;e[39]!==k?(re=Ie=>k(Ie),e[39]=k,e[40]=re):re=e[40];let ie;e[41]!==re||e[42]!==r?(ie=t.jsx(Bt,{tabs:Re,activeTab:r,onTabChange:re}),e[41]=re,e[42]=r,e[43]=ie):ie=e[43];let pe;e[44]!==v||e[45]!==o||e[46]!==F||e[47]!==I||e[48]!==j||e[49]!==m||e[50]!==U||e[51]!==Se||e[52]!==u||e[53]!==p||e[54]!==L||e[55]!==n||e[56]!==r||e[57]!==d||e[58]!==c||e[59]!==A?(pe=(r==="overview"||r==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(Z,{variant:m?"secondary":"outline",className:"gap-1.5",onClick:u,children:[m&&t.jsx("span",{className:"size-2 rounded-full bg-emerald-500 animate-pulse"}),t.jsx("span",{children:"Live"}),m&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(vr,{connectionIds:o,virtualMcpIds:c,tool:d,status:n,hideSystem:j,propertyFilters:L,connectionOptions:F,virtualMcpOptions:A,activeFiltersCount:v,onUpdateFilters:p,connectionSearchTerm:I,onConnectionSearchChange:f,memberOptions:Se,llmUserIds:U,onLlmUserIdsChange:P,showMemberFilter:r==="overview"})]}),e[44]=v,e[45]=o,e[46]=F,e[47]=I,e[48]=j,e[49]=m,e[50]=U,e[51]=Se,e[52]=u,e[53]=p,e[54]=L,e[55]=n,e[56]=r,e[57]=d,e[58]=c,e[59]=A,e[60]=pe):pe=e[60];let ye;e[61]!==Se||e[62]!==r||e[63]!==_e||e[64]!==D||e[65]!==Y||e[66]!==X||e[67]!==A?(ye=r==="threads"&&t.jsx(ws,{filterAgentIds:D,filterUserIds:X,filterStatus:Y,virtualMcpOptions:A,memberOptions:Se,activeFiltersCount:_e,onUpdateFilters:Ie=>{const{filterAgentIds:Ct,filterUserIds:kt,filterStatus:Tt}=Ie;Ct!==void 0&&B(Ct),kt!==void 0&&te(kt),Tt!==void 0&&ae(Tt)}}),e[61]=Se,e[62]=r,e[63]=_e,e[64]=D,e[65]=Y,e[66]=X,e[67]=A,e[68]=ye):ye=e[68];let Oe;e[69]!==b||e[70]!==x?(Oe={from:b,to:x},e[69]=b,e[70]=x,e[71]=Oe):Oe=e[71];let ze;e[72]!==g||e[73]!==Oe?(ze=t.jsx(Xs,{value:Oe,onChange:g}),e[72]=g,e[73]=Oe,e[74]=ze):ze=e[74];let Ee;e[75]!==pe||e[76]!==ye||e[77]!==ze?(Ee=t.jsxs("div",{className:"flex items-center gap-2",children:[pe,ye,ze]}),e[75]=pe,e[76]=ye,e[77]=ze,e[78]=Ee):Ee=e[78];let Pe;e[79]!==ie||e[80]!==Ee?(Pe=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[ie,Ee]}),e[79]=ie,e[80]=Ee,e[81]=Pe):Pe=e[81];let Ae;e[82]!==p||e[83]!==i||e[84]!==r?(Ae=(r==="audit"||r==="threads")&&t.jsx(as,{value:i,onChange:Ie=>p({search:Ie}),placeholder:r==="threads"?"Search by title…":"Search by tool name, connection, or error...",onKeyDown:Ie=>{Ie.key==="Escape"&&(p({search:""}),Ie.target.blur())},className:"w-full md:w-[375px]"}),e[82]=p,e[83]=i,e[84]=r,e[85]=Ae):Ae=e[85];let Ve;e[86]!==Pe||e[87]!==Ae?(Ve=t.jsx(Me.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[se,Pe,Ae]})}),e[86]=Pe,e[87]=Ae,e[88]=Ve):Ve=e[88];let Ue;e[89]!==S||e[90]!==h||e[91]!==be||e[92]!==z||e[93]!==o||e[94]!==l||e[95]!==a||e[96]!==G||e[97]!==m||e[98]!==U||e[99]!==$||e[100]!==T||e[101]!==i||e[102]!==n||e[103]!==r||e[104]!==D||e[105]!==Y||e[106]!==X||e[107]!==d||e[108]!==c?(Ue=r==="automations"?t.jsx(pr,{dateRange:l}):r==="threads"?t.jsx(Ss,{client:z,locator:$,membersData:T,allConnections:S,allVirtualMcps:h,dateRange:l,searchQuery:i,filterAgentIds:D,filterUserIds:X,filterStatus:Y}):r==="audit"?t.jsx(xr,{client:z,locator:$,baseParams:be,pageSize:W,isStreaming:m,streamingRefetchInterval:w,connectionIds:o,virtualMcpIds:c,tool:d,status:n,searchQuery:i,allConnections:S,allVirtualMcps:h,membersData:T}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(sr,{displayDateRange:a,connectionIds:o,excludeConnectionIds:G,toolName:d||void 0,status:n==="errors"?"error":n==="success"?"success":void 0,connections:S,isStreaming:m,streamingRefetchInterval:w,llmUserIds:U})}),e[89]=S,e[90]=h,e[91]=be,e[92]=z,e[93]=o,e[94]=l,e[95]=a,e[96]=G,e[97]=m,e[98]=U,e[99]=$,e[100]=T,e[101]=i,e[102]=n,e[103]=r,e[104]=D,e[105]=Y,e[106]=X,e[107]=d,e[108]=c,e[109]=Ue):Ue=e[109];let We;return e[110]!==Ve||e[111]!==Ue?(We=t.jsxs(t.Fragment,{children:[Ve,Ue]}),e[110]=Ve,e[111]=Ue,e[112]=We):We=e[112],We}function br(s){const e=s.user.name??s.user.email??s.userId,r=s.user.image??void 0;return{value:s.userId,label:e,icon:l=>{const{className:a}=l;return t.jsx(Ht,{url:r,fallback:e,shape:"circle",size:"2xs",className:ce("shrink-0",a)})}}}function yr(s){const e=s.icon,r=s.title??"Decopilot";return{value:s.id??"",label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function wr(s){const e=s.icon,r=s.title||s.id;return{value:s.id,label:r,icon:l=>{const{className:a}=l;return t.jsx(qe,{icon:e,name:r,size:"xs",fallbackIcon:t.jsx(Qe,{}),className:ce("size-4! min-w-4! rounded-sm shrink-0",a)})}}}function To(){const s=le.c(83),{org:e}=Be(),r=bt();let l;s[0]===Symbol.for("react.memo_cache_sentinel")?(l={from:"/shell/$org/settings/monitor"},s[0]=l):l=s[0];const a=ls(l),{tab:o,from:c,to:d,connectionId:n,virtualMcpId:i,tool:m,search:j,status:v,streaming:b,propertyFilters:x,hideSystem:L}=a,p=o===void 0?"overview":o;let g;s[1]!==n?(g=n===void 0?[]:n,s[1]=n,s[2]=g):g=s[2];const u=g;let k;s[3]!==i?(k=i===void 0?[]:i,s[3]=i,s[4]=k):k=s[4];const S=k,h=b===void 0?!0:b,T=x===void 0?"":x,I=L===void 0?!1:L;let f,M,y,R,C,E,F;if(s[5]!==u.length||s[6]!==c||s[7]!==I||s[8]!==r||s[9]!==e.slug||s[10]!==T||s[11]!==a||s[12]!==v||s[13]!==h||s[14]!==d||s[15]!==m||s[16]!==S.length){C=Ks(T);let P;s[24]!==r||s[25]!==e.slug||s[26]!==a?(P=X=>{r({to:"/$org/settings/monitor",params:{org:e.slug},search:{...a,...X}})},s[24]=r,s[25]=e.slug,s[26]=a,s[27]=P):P=s[27],F=P;let N;s[28]!==F?(N=X=>{F({from:X.from,to:X.to})},s[28]=F,s[29]=N):N=s[29],R=N;let D,B;if(s[30]!==c||s[31]!==h||s[32]!==d){const X=we(c),te=we(d);B=X.date||new Date(Date.now()-18e5);const Y=te.date||new Date;y={startDate:B,endDate:Y},D=Y,h&&d==="now"&&(D=new Date(Y),D.setHours(D.getHours()+1)),s[30]=c,s[31]=h,s[32]=d,s[33]=y,s[34]=D,s[35]=B}else y=s[33],D=s[34],B=s[35];let ee;s[36]!==D||s[37]!==B?(ee={startDate:B,endDate:D},s[36]=D,s[37]=B,s[38]=ee):ee=s[38],M=ee,f=0,u.length>0&&f++,S.length>0&&f++,m&&f++,v!=="all"&&f++,I&&f++,E=C.filter(Sr),s[5]=u.length,s[6]=c,s[7]=I,s[8]=r,s[9]=e.slug,s[10]=T,s[11]=a,s[12]=v,s[13]=h,s[14]=d,s[15]=m,s[16]=S.length,s[17]=f,s[18]=M,s[19]=y,s[20]=R,s[21]=C,s[22]=E,s[23]=F}else f=s[17],M=s[18],y=s[19],R=s[20],C=s[21],E=s[22],F=s[23];const H=E;H.length>0&&(f=f+H.length);let A;s[39]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Me.Body,{className:"!pb-3",children:t.jsx(Me.Title,{children:"Monitoring"})}),s[39]=A):A=s[39];let W;s[40]===Symbol.for("react.memo_cache_sentinel")?(W=t.jsxs(t.Fragment,{children:[A,t.jsx(Me.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(wt,{title:"Failed to load monitoring data",description:"There was an error loading the monitoring data. Please try again."})})})]}),s[40]=W):W=s[40];let w;s[41]===Symbol.for("react.memo_cache_sentinel")?(w=t.jsx(Me.Title,{children:"Monitoring"}),s[41]=w):w=s[41];let _;s[42]===Symbol.for("react.memo_cache_sentinel")?(_=[{id:"overview",label:"Overview"},{id:"audit",label:"Audit"},{id:"threads",label:"Threads"},{id:"automations",label:"Automations"}],s[42]=_):_=s[42];let $;s[43]!==F?($=P=>F({tab:P}),s[43]=F,s[44]=$):$=s[44];let O;s[45]!==$||s[46]!==p?(O=t.jsx(Me.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[w,t.jsx(Bt,{tabs:_,activeTab:p,onTabChange:$})]})}),s[45]=$,s[46]=p,s[47]=O):O=s[47];let z;s[48]!==p?(z=p==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):p==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(Nt.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(lr,{})}),s[48]=p,s[49]=z):z=s[49];let V;s[50]!==O||s[51]!==z?(V=t.jsxs(t.Fragment,{children:[O,z]}),s[50]=O,s[51]=z,s[52]=V):V=s[52];let q;s[53]!==R?(q=P=>{xt("monitoring_time_range_changed",{from:P.from,to:P.to}),R(P)},s[53]=R,s[54]=q):q=s[54];let J;s[55]!==h||s[56]!==F?(J=()=>{xt("monitoring_live_toggled",{enabled:!h}),F({streaming:!h})},s[55]=h,s[56]=F,s[57]=J):J=s[57];let G;s[58]!==p||s[59]!==F?(G=P=>{P!==p&&xt("monitoring_tab_changed",{from_tab:p,to_tab:P}),F({tab:P})},s[58]=p,s[59]=F,s[60]=G):G=s[60];let Q;s[61]!==f||s[62]!==u||s[63]!==M||s[64]!==y||s[65]!==c||s[66]!==I||s[67]!==C||s[68]!==j||s[69]!==v||s[70]!==h||s[71]!==q||s[72]!==J||s[73]!==G||s[74]!==p||s[75]!==d||s[76]!==m||s[77]!==F||s[78]!==S?(Q=t.jsx(Nr,{tab:p,dateRange:M,displayDateRange:y,connectionIds:u,virtualMcpIds:S,tool:m,status:v,search:j,streaming:h,hideSystem:I,activeFiltersCount:f,from:c,to:d,propertyFilters:C,onUpdateFilters:F,onTimeRangeChange:q,onStreamingToggle:J,onTabChange:G}),s[61]=f,s[62]=u,s[63]=M,s[64]=y,s[65]=c,s[66]=I,s[67]=C,s[68]=j,s[69]=v,s[70]=h,s[71]=q,s[72]=J,s[73]=G,s[74]=p,s[75]=d,s[76]=m,s[77]=F,s[78]=S,s[79]=Q):Q=s[79];let U;return s[80]!==V||s[81]!==Q?(U=t.jsx(ns,{capability:"monitoring:view",area:"monitoring",children:t.jsx(Me,{children:t.jsx(os,{fallback:W,children:t.jsx(K.Suspense,{fallback:V,children:Q})})})}),s[80]=V,s[81]=Q,s[82]=U):U=s[82],U}function Sr(s){return s.key.trim()}export{To as default};
@@ -1 +1 @@
1
- import{e as k,j as o,p as T,r as N,O as D}from"./index-CJoBkEf_.js";import{u as z,S as E,a as I,b as L}from"./sidebar-BNHENVF_.js";import{T as M,a as O,b as A,u as P}from"./tooltip-BseNApEN.js";import{S as $,a as W,b as B}from"./shell-route-loading-2R_HkOJm.js";import{u as X,C as H}from"./chat-context-T6Hxtz67.js";import{T as F}from"./tab-id-BfrA42Sy.js";import{i as q}from"./Monitor01-D1U6Pa3W.js";import{v as G,C as K}from"./connect-desktop-dialog-BjjpdcQ_.js";import{T as Y,a as b}from"./toolbar-D7UKSzZi.js";import{S as U,M as J}from"./shell-controls-DTs3k-tY.js";import"./sheet-y48NbizY.js";import"./X-FDfBE4i9.js";import"./useRouterState-BjzQ0bsm.js";import"./ZoomOut-NkImUVHk.js";import"./agent-icon-ExlCX9f5.js";import"./AlertCircle-C0w7vkhj.js";import"./Tool01-BcHwzAg_.js";import"./SwitchHorizontal01-5B3DSr8e.js";import"./RefreshCcw01-DVTjMN9w.js";import"./XCircle-8FTuCNvR.js";import"./ArrowUpRight-DNyQYu-V.js";import"./ZapSquare-wTPdLQod.js";import"./Users03-Cgth-3GS.js";import"./CheckCircle-CEi1N2Mq.js";import"./Check-8AgR6ZjG.js";import"./ChevronDown-DhOfQXzQ.js";import"./ChevronRight-DQs4tkMm.js";import"./ChevronUp-BJ7RKHi2.js";import"./DotsVertical-C00j11Qg.js";import"./Container-nZYBPJRv.js";import"./Eye-B7Xkt1CB.js";import"./Globe01-Uo6KHfk2.js";import"./FilterLines-FHjfh1pF.js";import"./Star01-CeDy0qEH.js";import"./Palette-Toq4eQ-J.js";import"./HardDrive-CGMuM2Oy.js";import"./Stars02-ButLG8tI.js";import"./Key01-BIkGax_i.js";import"./LinkExternal01-DycVPnNy.js";import"./Sun-DB_K22EW.js";import"./Play-CA-oDPY7.js";import"./Plus-DgS5eNSe.js";import"./SearchMd-WbJoDaWs.js";import"./Settings02-rrw51k4M.js";import"./Shield01-5itVZGiR.js";import"./Stars01-DYDsxZnS.js";import"./Trash01-C9vkf5T6.js";import"./Upload01-BXTkAAEz.js";import"./User01-C3qNbl-c.js";import"./Users01-C95xm0Ia.js";import"./XClose-BfJTW_HK.js";import"./Zap-DK6MOOIv.js";import"./skeleton-BWDI6b5B.js";import"./popover-D7H0zNnu.js";import"./drawer-ySjhgvkO.js";import"./constants-P1xnRFeX.js";import"./use-virtual-mcp-C09vm-BM.js";import"./use-collections-C-e494pb.js";import"./use-create-virtual-mcp-DHggusOz.js";import"./use-navigate-to-agent-BLkLok3n.js";import"./github-repo-picker-B_v87FGw.js";import"./use-connection-COB3wZyv.js";import"./dialog-C3j-c3SR.js";import"./collection-search-loHJ7IYX.js";import"./checkbox-DotF6hoA.js";import"./use-mcp-tools-BdUmFkbH.js";import"./extract-connection-data-DQPoIIzo.js";import"./generate-id-BsvOSxwt.js";import"./collections-BY2lU4NZ.js";import"./shell-layout-CtsnLkL0.js";import"./avatar-GGBvmgaP.js";import"./required-auth-layout-D_pVrMnQ.js";import"./use-organization-settings-D5g7NFw1.js";import"./use-org-sso-Bm8Zb6fp.js";import"./alert-dialog-rlUwGNsJ.js";import"./form-w7JkvptQ.js";import"./label-09bf4ZUr.js";import"./input-BZDQfdYn.js";import"./spinner-BLcfraim.js";import"./index-vNb1uvqd.js";import"./sortable.esm-D1-ateSo.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C98P6TUE.js";import"./use-registry-connections-BfC5RU93.js";import"./useInfiniteQuery--C6hdwWo.js";import"./infiniteQueryObserver-hzkIseBw.js";import"./card-7rOCFixx.js";import"./integration-icon-DYz5eywh.js";import"./collection-tabs-IuChGrKO.js";import"./badge-BYAYJbYP.js";import"./select-D3xFKLhW.js";import"./textarea-Kw6SbqZA.js";import"./connection-form-helpers-B_et0Rp5.js";import"./use-infinite-scroll-BTrNIqxO.js";import"./useSuspenseInfiniteQuery-BZeP3q20.js";import"./use-ai-providers-DSjz3Xn-.js";import"./command-CYcMZe50.js";import"./index-CswQOvGx.js";import"./use-org-auth-client-Bl3vPuak.js";import"./hover-card-B_RJCrCA.js";import"./task-status-gyYC-BVM.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./decopilot-sse-pool-CnTXTZP-.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function ro(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{ro as default};
1
+ import{e as k,j as o,p as T,r as N,O as D}from"./index-DoLgm5xJ.js";import{u as z,S as E,a as I,b as L}from"./sidebar-BItduOLp.js";import{T as M,a as O,b as A,u as P}from"./tooltip-C4Mvcc3-.js";import{S as $,a as W,b as B}from"./shell-route-loading-SSKWvym2.js";import{u as X,C as H}from"./chat-context-D4gb0Scc.js";import{T as F}from"./tab-id-DkCs8lF_.js";import{i as q}from"./Monitor01-DFXqifzv.js";import{v as G,C as K}from"./connect-desktop-dialog-Cl2Sz5Lx.js";import{T as Y,a as b}from"./toolbar-DHbG5RVx.js";import{S as U,M as J}from"./shell-controls-Di_I0aR7.js";import"./sheet-BJnnVAor.js";import"./X-DEXMke5_.js";import"./useRouterState-CAzgDa1e.js";import"./ZoomOut-C10GWzTz.js";import"./agent-icon-DJnCVbR0.js";import"./AlertCircle-CZWA2nH8.js";import"./Tool01-B3nr_Qai.js";import"./SwitchHorizontal01-LvHBRitv.js";import"./RefreshCcw01-CZGSpPEW.js";import"./XCircle-B5jqknVe.js";import"./ArrowUpRight-DXFfY2Nq.js";import"./ZapSquare-DT1D4OAA.js";import"./Users03-C7bMD3jg.js";import"./CheckCircle-B3a532XL.js";import"./Check-B7DufF9O.js";import"./ChevronDown-DhIkdEzt.js";import"./ChevronRight-BQDeINW7.js";import"./ChevronUp-BMLC4SgN.js";import"./DotsVertical-BebTEDkn.js";import"./Container-DprTine2.js";import"./Eye-DgcZpf5x.js";import"./Globe01-Dd7C_j_O.js";import"./FilterLines-uT-sk3rc.js";import"./Star01-b362v54F.js";import"./Palette-Bq9PMsoj.js";import"./HardDrive-BtjljIRu.js";import"./Stars02-BFmBskXR.js";import"./Key01-D1UyWXgw.js";import"./LinkExternal01-Brj_TJxd.js";import"./Sun-BaMRN3tl.js";import"./Play-C9o4InoB.js";import"./Plus-DdlGCl-J.js";import"./SearchMd-88EikaJB.js";import"./Settings02-B1lp2SVd.js";import"./Shield01-_I_z0Yxe.js";import"./Stars01-DAcarfyW.js";import"./Trash01-DzP4bSXT.js";import"./Upload01-DJAirPOl.js";import"./User01-D7oZ1u1w.js";import"./Users01-CQa1tUzy.js";import"./XClose-CpZzpgAq.js";import"./Zap-8zhK1JZ1.js";import"./skeleton-BITJK7H7.js";import"./popover-CAUP1BNb.js";import"./drawer-BgbFTtty.js";import"./constants-h1Hu02Pl.js";import"./use-virtual-mcp-C5RbeZo0.js";import"./use-collections-0elTitFK.js";import"./use-create-virtual-mcp-xfijFFeU.js";import"./use-navigate-to-agent-DHuSnk-7.js";import"./github-repo-picker-vgbSu5iY.js";import"./use-connection-BFK8HgLm.js";import"./dialog-C-asYC2o.js";import"./collection-search-C5IBLwI6.js";import"./checkbox-CWwDb0cu.js";import"./use-mcp-tools-CQC_DvOV.js";import"./extract-connection-data-DHULaZ4q.js";import"./generate-id-CHF9qC8v.js";import"./collections-D79oYVs-.js";import"./shell-layout-C8xCDde2.js";import"./avatar-BCcehYOw.js";import"./required-auth-layout-DoJBYTK7.js";import"./use-organization-settings-Y6xPrKF0.js";import"./use-org-sso-CUWrIQka.js";import"./alert-dialog-Bfzm0Sn1.js";import"./form-DcYfsvAB.js";import"./label-CFa8MFdj.js";import"./input-DKgzjTqx.js";import"./spinner-D3DwAv1t.js";import"./index-Dh4s8pMn.js";import"./sortable.esm-2KwbcifU.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-JnLktoFU.js";import"./use-registry-connections-D2Pb5Zae.js";import"./useInfiniteQuery-C0Nzygow.js";import"./infiniteQueryObserver-DvYnKas5.js";import"./card-DwoGuIpq.js";import"./integration-icon-DOg8lUEK.js";import"./collection-tabs-Bm-12qTR.js";import"./badge-Dxvv_o2R.js";import"./select-BqVzUjvA.js";import"./textarea-07GHniRL.js";import"./connection-form-helpers-DGv50Ov6.js";import"./use-infinite-scroll-Bsai9Hjv.js";import"./useSuspenseInfiniteQuery-DhuueYPO.js";import"./use-ai-providers-BrNyOb2S.js";import"./command-DbOdOn2n.js";import"./index-BBtzzfJI.js";import"./use-org-auth-client-rr7_FC67.js";import"./hover-card-Bi21pBU4.js";import"./task-status-CxSktPB-.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./decopilot-sse-pool-CsEl5FJL.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function ro(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{ro as default};