decocms 4.198.2 → 4.199.0

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 (227) hide show
  1. package/dist/client/assets/{AlertCircle-BWppLd8c.js → AlertCircle-1FZS3v-O.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CMqdqW-X.js → AreaChart-6BJhVF5T.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-cFWJcCye.js → ArrowLeft-CR4vxoJp.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-CK7po7JD.js → ArrowUp-CC_mbqe1.js} +1 -1
  5. package/dist/client/assets/{ArrowUpRight-7JgIYGFf.js → ArrowUpRight-CbCF70v1.js} +1 -1
  6. package/dist/client/assets/{Check-Dc66au0h.js → Check-COUqEm5U.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-UOyFv4rE.js → CheckCircle-OafhoQfB.js} +1 -1
  8. package/dist/client/assets/{ChevronDown-LNz16DWG.js → ChevronDown-BQOZpawT.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DjBVHQoY.js → ChevronRight-cIZXph7r.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-DZ-mKv_H.js → ChevronUp-1zullNEp.js} +1 -1
  11. package/dist/client/assets/{Copy01-DPPY_ooc.js → Copy01-DOQujw91.js} +1 -1
  12. package/dist/client/assets/{CpuChip01-DyWba75a.js → CpuChip01-DP6ksU24.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-e79FUmFN.js → CreditCard01-CufFLIFI.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-CILzGe_q.js → DotsVertical-wivS0onw.js} +1 -1
  15. package/dist/client/assets/{Eye-BT74JrOy.js → Eye-DrB86SUu.js} +1 -1
  16. package/dist/client/assets/{FilterLines-DcRWfBwT.js → FilterLines-D-22jIZj.js} +1 -1
  17. package/dist/client/assets/{Globe01-W4lyjKuH.js → Globe01-4yOmtvQc.js} +1 -1
  18. package/dist/client/assets/{Globe04-_uS8YiyQ.js → Globe04-m8WcbUjt.js} +1 -1
  19. package/dist/client/assets/{HardDrive-D7RLSuvq.js → HardDrive-DZ-Roc4G.js} +1 -1
  20. package/dist/client/assets/{Key01-Bk2QhvNY.js → Key01-Dkj1imoI.js} +1 -1
  21. package/dist/client/assets/{LayoutLeft-P7wDvRlA.js → LayoutLeft-qMb6nkLN.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-CP1N0ekO.js → LinkExternal01-B8ehDauF.js} +1 -1
  23. package/dist/client/assets/{LogOut01-BNm98lqM.js → LogOut01-oc8d9SJs.js} +1 -1
  24. package/dist/client/assets/{Monitor01-D9pvMYQd.js → Monitor01-BOSd8wQ1.js} +1 -1
  25. package/dist/client/assets/{Palette-DJfFKmjP.js → Palette-CSOJeVFB.js} +1 -1
  26. package/dist/client/assets/{Play-DrC9uZbx.js → Play-H-b9CdPO.js} +1 -1
  27. package/dist/client/assets/{Plus-9KDBMlCX.js → Plus-DJU_4kbx.js} +1 -1
  28. package/dist/client/assets/{SearchLg-BSg_Ve-L.js → SearchLg-BQmUG7S4.js} +1 -1
  29. package/dist/client/assets/{SearchMd-CDwUuDyr.js → SearchMd-SbBW-oPu.js} +1 -1
  30. package/dist/client/assets/{Settings02-D_by58BO.js → Settings02-CtYuLrf4.js} +1 -1
  31. package/dist/client/assets/{Share07-DFtUk4DH.js → Share07-CT2dyret.js} +1 -1
  32. package/dist/client/assets/{Shield01-2VpHyEx6.js → Shield01-W_oC4KLS.js} +1 -1
  33. package/dist/client/assets/{Star01-YV_bqOAU.js → Star01-COyWVOwH.js} +1 -1
  34. package/dist/client/assets/{Stars01-CyMHMvzU.js → Stars01-B9M6VkZj.js} +1 -1
  35. package/dist/client/assets/{Stars02-D6uxt7rn.js → Stars02-l4Bi009V.js} +1 -1
  36. package/dist/client/assets/{Sun-CvD6V1mt.js → Sun-BgLBLrAR.js} +1 -1
  37. package/dist/client/assets/{SwitchHorizontal01-BJcUWOrf.js → SwitchHorizontal01-D3zKTM_Y.js} +1 -1
  38. package/dist/client/assets/{Tool01-BsXkza2k.js → Tool01-C-9oM8hx.js} +1 -1
  39. package/dist/client/assets/{Tool02-Bk0Wi_jc.js → Tool02-CWP-2wPJ.js} +1 -1
  40. package/dist/client/assets/{Trash01-Dk2U_er_.js → Trash01-DUPlExuW.js} +1 -1
  41. package/dist/client/assets/{TrendUp01-BQPOQTfU.js → TrendUp01-9IbbL3_o.js} +1 -1
  42. package/dist/client/assets/{Upload01-De1aQPW9.js → Upload01-CykCKPTH.js} +1 -1
  43. package/dist/client/assets/{User01-DZLXXgFt.js → User01-DdCsns_p.js} +1 -1
  44. package/dist/client/assets/{Users01-D-f87RLp.js → Users01-DddX3P2e.js} +1 -1
  45. package/dist/client/assets/{Users03-CmtC3U6j.js → Users03-Bx6UOYkE.js} +1 -1
  46. package/dist/client/assets/{X-DmV-M3--.js → X-B3ybq5w2.js} +1 -1
  47. package/dist/client/assets/{XCircle-Cj1jhbDm.js → XCircle-C4ggJi18.js} +1 -1
  48. package/dist/client/assets/{XClose-8V-NoWeD.js → XClose-DAaNDUux.js} +1 -1
  49. package/dist/client/assets/{Zap-BxOODR1h.js → Zap-Bo7ywofH.js} +1 -1
  50. package/dist/client/assets/{ZapSquare-BesqE3Kv.js → ZapSquare-Bg5_XykS.js} +1 -1
  51. package/dist/client/assets/{access-gate-CcFlUK4A.js → access-gate-CM__cLeC.js} +1 -1
  52. package/dist/client/assets/{agent-icon-DrJqDdNd.js → agent-icon-ChlSj_zC.js} +1 -1
  53. package/dist/client/assets/{agents-list-B1lrsW_H.js → agents-list-FKXfmE0I.js} +1 -1
  54. package/dist/client/assets/{ai-providers-Kv5WIAV1.js → ai-providers-BFIskFbw.js} +1 -1
  55. package/dist/client/assets/{alert-C4a51Bkg.js → alert-CYsDgWPP.js} +1 -1
  56. package/dist/client/assets/{alert-dialog-Bpd-0p4I.js → alert-dialog-CEWyrZ_Z.js} +1 -1
  57. package/dist/client/assets/{app-editor-wt5YFcqv.js → app-editor-BhYIbVrX.js} +1 -1
  58. package/dist/client/assets/{auth-catchall-B_zCiAnJ.js → auth-catchall-cwMYBp3y.js} +1 -1
  59. package/dist/client/assets/{auth-entry-BcKY1S7E.js → auth-entry-utz1nSNV.js} +1 -1
  60. package/dist/client/assets/{auth-split-layout-D_earcwe.js → auth-split-layout-CSD4ZOjw.js} +1 -1
  61. package/dist/client/assets/{auth-B56MWIKT.js → auth-v89NYv9q.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-DgNMLRjT.js → authenticate-and-persist-oauth-Bx2wnD4m.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-CF0CYhrz.js → automation-list-row-CtwPJ_qi.js} +1 -1
  64. package/dist/client/assets/{automation-runs-DkpIo76-.js → automation-runs-jWstZftP.js} +2 -2
  65. package/dist/client/assets/{automations-DFe_tV_r.js → automations-DYLWv316.js} +1 -1
  66. package/dist/client/assets/{avatar-BN3TMI7O.js → avatar-BpypxYS_.js} +1 -1
  67. package/dist/client/assets/{badge-CXZR0JJ6.js → badge-D7AIZASF.js} +1 -1
  68. package/dist/client/assets/{billing-CYgiUsj0.js → billing-DvQB5EP4.js} +1 -1
  69. package/dist/client/assets/{block-document-DTEuQoSM.js → block-document-BieiLkD8.js} +1 -1
  70. package/dist/client/assets/{brand-context-1EzU2len.js → brand-context-CyT0dJvx.js} +1 -1
  71. package/dist/client/assets/{buckets-BFKqGOhH.js → buckets-CEQI-s6s.js} +1 -1
  72. package/dist/client/assets/{bulk-category-panel-CsOSjWnO.js → bulk-category-panel-DGtK7V8c.js} +1 -1
  73. package/dist/client/assets/{capability-load-error-CKW0147S.js → capability-load-error-BL2lrddy.js} +1 -1
  74. package/dist/client/assets/{card-B-Mzv0lS.js → card-CoBKo1D2.js} +1 -1
  75. package/dist/client/assets/{cards-BfTjTHpY.js → cards-OWxF4nj0.js} +1 -1
  76. package/dist/client/assets/{category-editor-BbGetzYN.js → category-editor-Dn0rz6Sk.js} +1 -1
  77. package/dist/client/assets/{chat-context-B91LcyJ6.js → chat-context-C5IpUGyL.js} +1 -1
  78. package/dist/client/assets/{checkbox-DU-r9RK1.js → checkbox-B_axFhC0.js} +1 -1
  79. package/dist/client/assets/{cli-auth-success-Cm6QoDUK.js → cli-auth-success-D_b0jLm-.js} +1 -1
  80. package/dist/client/assets/{collection-detail-tAe3Dmgp.js → collection-detail-BaUxPBtg.js} +1 -1
  81. package/dist/client/assets/{collection-display-button-BLCZ2vkr.js → collection-display-button-TeFEpehu.js} +1 -1
  82. package/dist/client/assets/{collection-search-yhxjYY4J.js → collection-search-jgJieFUU.js} +1 -1
  83. package/dist/client/assets/{collection-table-wrapper-B10YZ9u0.js → collection-table-wrapper-VyWx7MWu.js} +1 -1
  84. package/dist/client/assets/{collection-tabs-SNVmmaXX.js → collection-tabs-D8Hgew32.js} +1 -1
  85. package/dist/client/assets/{command-Cz9Vx3RB.js → command-mz5vaCyb.js} +1 -1
  86. package/dist/client/assets/{commerce-onboarding-CcIJiyl8.js → commerce-onboarding-oCzW05oi.js} +1 -1
  87. package/dist/client/assets/{connect-BfBt9RNI.js → connect-B55TAI-T.js} +1 -1
  88. package/dist/client/assets/{connection-BUKTSmLs.js → connection-DKRnbF5j.js} +1 -1
  89. package/dist/client/assets/{connection-card-m4tgOItf.js → connection-card-BBnyhURe.js} +1 -1
  90. package/dist/client/assets/{connection-detail-BkPBxKFf.js → connection-detail-jFa2SZOI.js} +1 -1
  91. package/dist/client/assets/{connection-form-helpers-BkrR5b_e.js → connection-form-helpers-DmMFoW_E.js} +1 -1
  92. package/dist/client/assets/{connections-Elpblskc.js → connections-B2phlZuI.js} +1 -1
  93. package/dist/client/assets/{decopilot-sse-pool-DjQPpjDZ.js → decopilot-sse-pool-D6eFDIhm.js} +1 -1
  94. package/dist/client/assets/{dialog-Cg0277WK.js → dialog-CFILfZOA.js} +1 -1
  95. package/dist/client/assets/{domain-settings-BraWpz77.js → domain-settings-Dz8mlaOV.js} +1 -1
  96. package/dist/client/assets/{drawer-Dfn3cqSh.js → drawer-CUdV6oxw.js} +1 -1
  97. package/dist/client/assets/{dropdown-menu-DPde1UkW.js → dropdown-menu-CvmqCZWH.js} +1 -1
  98. package/dist/client/assets/{empty-state-BvR4kC3B.js → empty-state-B-59kVV9.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-BudtEuf9.js → extract-connection-data-DXrSXKT4.js} +1 -1
  100. package/dist/client/assets/{file-explorer-CEqyHkOE.js → file-explorer-DKr1xc8P.js} +1 -1
  101. package/dist/client/assets/{file-type-icon-DjpfQdvY.js → file-type-icon-ClrRx9NG.js} +1 -1
  102. package/dist/client/assets/{form-PWBx8QQq.js → form-BjBdY0X7.js} +1 -1
  103. package/dist/client/assets/{general-aWH4SlEd.js → general-ATn8tjRI.js} +1 -1
  104. package/dist/client/assets/{github-repo-picker-x1X872QG.js → github-repo-picker-D-sEtEsJ.js} +1 -1
  105. package/dist/client/assets/{hooks-DE78iZyB.js → hooks-CdOH0sr_.js} +1 -1
  106. package/dist/client/assets/{index-BZrHlw0j.js → index--OjyTwFQ.js} +1 -1
  107. package/dist/client/assets/{index-C-bJCsC6.css → index-BEdBSIIA.css} +1 -1
  108. package/dist/client/assets/{index-GlvqvXVJ.js → index-BHRSTVbm.js} +1 -1
  109. package/dist/client/assets/index-BPPqwJmq.js +5 -0
  110. package/dist/client/assets/{index-X6wqL5Rn.js → index-BzRGcU66.js} +1 -1
  111. package/dist/client/assets/{index-BfpQCjmG.js → index-CFJJgkw9.js} +1 -1
  112. package/dist/client/assets/{index-SRgwcnf7.js → index-COzRe4rY.js} +1 -1
  113. package/dist/client/assets/{index-Dh6yRBua.js → index-D1wTzn4-.js} +1 -1
  114. package/dist/client/assets/{index-BfE9EYhg.js → index-DoiZIymS.js} +5 -5
  115. package/dist/client/assets/{index-BQFOspRh.js → index-HpF4ydE2.js} +6 -6
  116. package/dist/client/assets/{index-YHwob8Sm.js → index-kMw37nKO.js} +1 -1
  117. package/dist/client/assets/{index-redirect-BdzOsvXL.js → index-redirect-B8Hgwnpy.js} +1 -1
  118. package/dist/client/assets/{input-DLmq-Bri.js → input-Dw4GelAn.js} +1 -1
  119. package/dist/client/assets/{integration-icon-FPSluFwK.js → integration-icon-Cyu5omdT.js} +1 -1
  120. package/dist/client/assets/{invite-member-dialog-BjF0_uLE.js → invite-member-dialog-B7Q8c3nD.js} +1 -1
  121. package/dist/client/assets/{label-B1DonsU-.js → label-CJtuYe4Q.js} +1 -1
  122. package/dist/client/assets/{layout-BV0PSd_m.js → layout-LadKSCFh.js} +1 -1
  123. package/dist/client/assets/{login-BnLip_s5.js → login-k6W7OWLC.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-0Wpz4XYZ.js → mcp-oauth-JmfL6YDg.js} +1 -1
  125. package/dist/client/assets/{members-CdtAdhlo.js → members-Cax5phLv.js} +1 -1
  126. package/dist/client/assets/{monaco-editor-CrpwfOtU.js → monaco-editor-DsEoV7tZ.js} +1 -1
  127. package/dist/client/assets/{monitoring-stats-row-Bf4ASMnO.js → monitoring-stats-row-hSnWEB1g.js} +1 -1
  128. package/dist/client/assets/{multi-select-DegmZzJM.js → multi-select-C_9JXCXf.js} +1 -1
  129. package/dist/client/assets/{oauth-callback-iu-wcPts.js → oauth-callback-CbwDrfNN.js} +1 -1
  130. package/dist/client/assets/{oauth-callback-ai-provider-hu1Pvh_J.js → oauth-callback-ai-provider-bqe7WxPA.js} +1 -1
  131. package/dist/client/assets/{onboarding-DLQPdZwW.js → onboarding-BMg-CQb8.js} +1 -1
  132. package/dist/client/assets/{org-layout-DTN_XooU.js → org-layout-BPZhd6ha.js} +1 -1
  133. package/dist/client/assets/{organization-choice-D1zMzhki.js → organization-choice-DQcCIgDf.js} +1 -1
  134. package/dist/client/assets/{orgs-7aGZzQVk.js → orgs-C5W9WsQP.js} +1 -1
  135. package/dist/client/assets/{page-seo-form-M3-RVvpj.js → page-seo-form-C7E_eneh.js} +1 -1
  136. package/dist/client/assets/{popover-BYTopHKb.js → popover-DCriArZo.js} +1 -1
  137. package/dist/client/assets/{post-editor-z0QRZmIL.js → post-editor-CmqSuVDD.js} +1 -1
  138. package/dist/client/assets/{primitives-S2CqucHt.js → primitives-Dt6-h_k5.js} +1 -1
  139. package/dist/client/assets/{profile-Hutoer3r.js → profile-Dqn8oDYU.js} +1 -1
  140. package/dist/client/assets/{project-app-view-BVmBtQTJ.js → project-app-view-B6KrZpsP.js} +1 -1
  141. package/dist/client/assets/record-editor-CP7nR48h.js +1 -0
  142. package/dist/client/assets/{redirect-editor-Dd2TDz4G.js → redirect-editor-toR3MzGX.js} +1 -1
  143. package/dist/client/assets/registry-CgsXhhHY.js +2 -0
  144. package/dist/client/assets/{registry-layout-Cm227W9R.js → registry-layout-Crop-FRo.js} +1 -1
  145. package/dist/client/assets/{reports-ab0wxN51.js → reports-Cd0v7eMn.js} +1 -1
  146. package/dist/client/assets/{require-capability-B3XvoArB.js → require-capability--L_GlXpd.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-D4xEI9J8.js → required-auth-layout-BAhPwscS.js} +1 -1
  148. package/dist/client/assets/{reset-password-BAG9ZsbJ.js → reset-password-CNmC6-k_.js} +1 -1
  149. package/dist/client/assets/roles-DWnvl1bF.js +1 -0
  150. package/dist/client/assets/{search-input-C9pC3WrF.js → search-input-BnJDFRMl.js} +1 -1
  151. package/dist/client/assets/{secrets-DVNv8yxX.js → secrets-DJInY_nu.js} +1 -1
  152. package/dist/client/assets/{sections-editor-Cq6s5Oed.js → sections-editor-DCBUfbWr.js} +1 -1
  153. package/dist/client/assets/{select-BoHatn08.js → select--icxBUQG.js} +1 -1
  154. package/dist/client/assets/{select-model-CaoH2ToV.js → select-model-CoTowZP9.js} +1 -1
  155. package/dist/client/assets/{self-tool-result-m7izFHM4.js → self-tool-result-CZm-aTd6.js} +1 -1
  156. package/dist/client/assets/{seo-editor-BmA8_Ouc.js → seo-editor-D4CFsGBp.js} +1 -1
  157. package/dist/client/assets/{settings-layout-CtQk6Z90.js → settings-layout-468cimaL.js} +1 -1
  158. package/dist/client/assets/{settings-section-XmYJ6Nk2.js → settings-section-B3ifPXpy.js} +1 -1
  159. package/dist/client/assets/{shell-controls-DtrTq4G_.js → shell-controls-okLnfuDR.js} +1 -1
  160. package/dist/client/assets/{shell-layout-Cd3V9av7.js → shell-layout-B2-xnSYQ.js} +1 -1
  161. package/dist/client/assets/{sidebar-nvbJrgVY.js → sidebar-CY8kI7Hv.js} +1 -1
  162. package/dist/client/assets/{skeleton-DxXAcunF.js → skeleton-BzHO_UZ_.js} +1 -1
  163. package/dist/client/assets/{spinner-BoBi9JH7.js → spinner-CR38v4SM.js} +1 -1
  164. package/dist/client/assets/{sso-BwhmanKT.js → sso-DaxZcPHF.js} +1 -1
  165. package/dist/client/assets/{store-CFuLGHOE.js → store-DmtY-Ut9.js} +1 -1
  166. package/dist/client/assets/store-registry-cv-3taNw.js +2 -0
  167. package/dist/client/assets/{studio-tools-BETupmQh.js → studio-tools-B9uOZhNU.js} +1 -1
  168. package/dist/client/assets/{switch-D5nHMM9-.js → switch-CicvP6tN.js} +1 -1
  169. package/dist/client/assets/{synced-repos-BC7dcdDm.js → synced-repos-1QYY_o14.js} +1 -1
  170. package/dist/client/assets/{tab-id-BdQ_M6R3.js → tab-id-D78T7QdF.js} +1 -1
  171. package/dist/client/assets/{table-DHyF1BO5.js → table-Cmvfib2K.js} +1 -1
  172. package/dist/client/assets/{tabs-bgoBmYh1.js → tabs-BBQmojOt.js} +1 -1
  173. package/dist/client/assets/{textarea-DLfz9L-W.js → textarea-D_MBsxxq.js} +1 -1
  174. package/dist/client/assets/{toggle-group-DVALkDJ2.js → toggle-group-D7E7rM45.js} +1 -1
  175. package/dist/client/assets/{toolbar-BseEnCPh.js → toolbar-DavdshhZ.js} +1 -1
  176. package/dist/client/assets/{tooltip-CpPLj5ml.js → tooltip-ZrjhT2HZ.js} +1 -1
  177. package/dist/client/assets/{use-ai-providers-DFLh4od7.js → use-ai-providers-jug9WjpB.js} +1 -1
  178. package/dist/client/assets/{use-automations-xk7Cu5D8.js → use-automations-CSTZ3886.js} +1 -1
  179. package/dist/client/assets/{use-autosave-BkJZ15dZ.js → use-autosave-ChvE0G33.js} +1 -1
  180. package/dist/client/assets/{use-capability-CxUt0m8I.js → use-capability-CD2_oMAe.js} +1 -1
  181. package/dist/client/assets/{use-clock-tick--4azGxeb.js → use-clock-tick-5wPqFXoc.js} +1 -1
  182. package/dist/client/assets/{use-connection-B7w0W3ts.js → use-connection-Cq-TmGuZ.js} +1 -1
  183. package/dist/client/assets/{use-copy-C6oZHBaC.js → use-copy-qVFT-iwH.js} +1 -1
  184. package/dist/client/assets/{use-create-virtual-mcp-BfVXbnRO.js → use-create-virtual-mcp-BKePGkVk.js} +1 -1
  185. package/dist/client/assets/{use-debounced-autosave-BMFBm4Py.js → use-debounced-autosave-BD5uwc1n.js} +1 -1
  186. package/dist/client/assets/{use-debounced-value-usyjdfzM.js → use-debounced-value-ZcGR3H0U.js} +1 -1
  187. package/dist/client/assets/{use-deco-credits-CGRraY5U.js → use-deco-credits-DZXadVhu.js} +1 -1
  188. package/dist/client/assets/{use-decopilot-events-CfIikgvk.js → use-decopilot-events-Da84Mplm.js} +1 -1
  189. package/dist/client/assets/{use-delete-connection-WvDQKt5f.js → use-delete-connection-CUI5WjpR.js} +1 -1
  190. package/dist/client/assets/{use-deployment-admin-Rs8yRNEE.js → use-deployment-admin-BXpDgUni.js} +1 -1
  191. package/dist/client/assets/{use-file-configs-Bp6CR8ct.js → use-file-configs-Cr6Dl2n3.js} +1 -1
  192. package/dist/client/assets/{use-infinite-scroll-Bct8OYtv.js → use-infinite-scroll-Cuq5t_LZ.js} +1 -1
  193. package/dist/client/assets/{use-join-requests-1tzcg5D1.js → use-join-requests-B-BwVS7j.js} +1 -1
  194. package/dist/client/assets/{use-mcp-client-B9fn1TBn.js → use-mcp-client-DguMnEWc.js} +1 -1
  195. package/dist/client/assets/{use-mcp-tools-Cry83Gza.js → use-mcp-tools-Bc0RjdGq.js} +1 -1
  196. package/dist/client/assets/{use-members-HbYBEeJu.js → use-members-BSnfTEP4.js} +1 -1
  197. package/dist/client/assets/{use-mobile-CnfmCPF3.js → use-mobile-DMf3bWCn.js} +1 -1
  198. package/dist/client/assets/{use-navigate-to-agent-BKt6uZhU.js → use-navigate-to-agent-BpKSuM9c.js} +1 -1
  199. package/dist/client/assets/{use-open-billing-url-DJ4izovt.js → use-open-billing-url-COnZPFfP.js} +1 -1
  200. package/dist/client/assets/{use-org-auth-client-DDDMIikQ.js → use-org-auth-client-Bvzf-tUx.js} +1 -1
  201. package/dist/client/assets/{use-org-sso-TyWjgGeP.js → use-org-sso-CPuDLMAO.js} +1 -1
  202. package/dist/client/assets/{use-organization-roles-C0bVuJXK.js → use-organization-roles-CGLPno6a.js} +1 -1
  203. package/dist/client/assets/{use-organization-settings-BN4kKknX.js → use-organization-settings-BVocOGaq.js} +1 -1
  204. package/dist/client/assets/{use-registry-connections-VTJBa0En.js → use-registry-connections-C0HsNyAs.js} +1 -1
  205. package/dist/client/assets/{use-secrets-D6-WGKvN.js → use-secrets-BP-H3C8p.js} +1 -1
  206. package/dist/client/assets/{use-section-preview-base-DcK97OvO.js → use-section-preview-base-DowNDHjh.js} +1 -1
  207. package/dist/client/assets/{use-status-sounds-CzyM6HAc.js → use-status-sounds-CjmrYixb.js} +1 -1
  208. package/dist/client/assets/{use-tags-BS8JieCa.js → use-tags-Cg8znnEF.js} +1 -1
  209. package/dist/client/assets/{use-view-mode-Qv39nezx.js → use-view-mode-2Cvl7LGq.js} +1 -1
  210. package/dist/client/assets/{use-virtual-mcp-C7NRfPhc.js → use-virtual-mcp-DnVlCNEk.js} +1 -1
  211. package/dist/client/assets/useInfiniteQuery-DJ3TPFA7.js +1 -0
  212. package/dist/client/assets/{useRouterState-CjR4UZBL.js → useRouterState-ClmonZrX.js} +1 -1
  213. package/dist/client/assets/useSuspenseInfiniteQuery-BKyBbyvL.js +1 -0
  214. package/dist/client/assets/{users-BF3gSgZn.js → users-CGfdaZgy.js} +1 -1
  215. package/dist/client/assets/{variant-calendar-By4-97I2.js → variant-calendar-Djt_WQR_.js} +1 -1
  216. package/dist/client/assets/{view-mode-toggle-DGzElltC.js → view-mode-toggle-DOCvJ3u_.js} +1 -1
  217. package/dist/client/index.html +2 -2
  218. package/dist/server/cli.js +552 -552
  219. package/dist/server/server.js +325 -325
  220. package/package.json +1 -1
  221. package/dist/client/assets/index-BqKCSZFF.js +0 -5
  222. package/dist/client/assets/record-editor-7pz_uGMj.js +0 -1
  223. package/dist/client/assets/registry-Cn1toh1T.js +0 -2
  224. package/dist/client/assets/roles-BKn8lA_3.js +0 -1
  225. package/dist/client/assets/store-registry-ZIu_RLpB.js +0 -2
  226. package/dist/client/assets/useInfiniteQuery-C-kiHDyf.js +0 -1
  227. package/dist/client/assets/useSuspenseInfiniteQuery-9epNuRWF.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "4.198.2",
3
+ "version": "4.199.0",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1,5 +0,0 @@
1
- import{c as Me,r as ie,d as os,F as Tt,b as Ge,j as t,B as xe,t as Qe,m as qe,K as Qt,n as rs,z as Es,u as As,p as Wt,E as Vs}from"./index-BQFOspRh.js";import{S as Us}from"./search-input-C9pC3WrF.js";import{P as et}from"./index-BZrHlw0j.js";import{E as is}from"./empty-state-BvR4kC3B.js";import{R as Ks}from"./require-capability-B3XvoArB.js";import{aj as ms,a6 as qs,B as Bs,ak as Hs,al as us,am as Xt,an as qt,ao as ys,ap as Js,aq as fs,ar as ws,ah as Qs,as as Gs}from"./automation-runs-DkpIo76-.js";import{u as ts}from"./use-connection-B7w0W3ts.js";import{g as Ss}from"./connection-slug-eyAPH6o3.js";import{B as kt}from"./badge-CXZR0JJ6.js";import{P as $t,a as zt,b as Et}from"./popover-BYTopHKb.js";import{c as Bt,T as Ht,a as Jt}from"./tooltip-CpPLj5ml.js";import{i as Yt}from"./Check-Dc66au0h.js";import{a as Ut}from"./Copy01-DPPY_ooc.js";import{n as xs}from"./Globe01-W4lyjKuH.js";import{i as ns}from"./FilterLines-DcRWfBwT.js";import{i as Ws}from"./Key01-Bk2QhvNY.js";import{i as Xs}from"./Play-DrC9uZbx.js";import{aJ as Ys,a7 as Zs,_ as el}from"./agent-icon-DrJqDdNd.js";import{M as ps}from"./monaco-editor-CrpwfOtU.js";import{u as tl}from"./use-members-HbYBEeJu.js";import{S as sl,u as ll,W as ol}from"./use-mcp-client-B9fn1TBn.js";import{a as rl}from"./use-virtual-mcp-C7NRfPhc.js";import{n as At}from"./Tool02-Bk0Wi_jc.js";import{c as il}from"./SwitchHorizontal01-BJcUWOrf.js";import{s as nl}from"./Plus-9KDBMlCX.js";import{s as al}from"./Trash01-Dk2U_er_.js";import{I as Dt}from"./input-DLmq-Bri.js";import{M as Rt}from"./multi-select-DegmZzJM.js";import{a as Pt,b as Ft,d as He,c as _t,S as Ot}from"./select-BoHatn08.js";import{t as Is}from"./ChevronDown-LNz16DWG.js";import{s as cl}from"./Stars02-D6uxt7rn.js";import{T as dl}from"./textarea-DLfz9L-W.js";import{C as ks}from"./collection-tabs-SNVmmaXX.js";import{S as ml}from"./switch-D5nHMM9-.js";import{L as ul}from"./label-B1DonsU-.js";import{I as Ct}from"./integration-icon-FPSluFwK.js";import{A as Cs}from"./avatar-BN3TMI7O.js";import{A as fl,a as xl,b as pl}from"./alert-C4a51Bkg.js";import{C as Ts}from"./card-B-Mzv0lS.js";import{K as Ye}from"./monitoring-stats-row-Bf4ASMnO.js";import{u as Ms}from"./studio-tools-BETupmQh.js";import{u as gl}from"./useSuspenseInfiniteQuery-9epNuRWF.js";import{o as hl,m as vl,p as jl,q as Nl}from"./sidebar-nvbJrgVY.js";import{T as tt,a as Gt,b as Ls,c as Ds,d as Ee,e as Rs}from"./table-DHyF1BO5.js";import{n as bl}from"./ChevronUp-DZ-mKv_H.js";import{u as yl}from"./use-infinite-scroll-Bct8OYtv.js";import{c as wl,b as Sl}from"./use-automations-xk7Cu5D8.js";import"./SearchMd-CDwUuDyr.js";import"./use-capability-CxUt0m8I.js";import"./access-gate-CcFlUK4A.js";import"./capability-load-error-CKW0147S.js";import"./ChevronRight-DjBVHQoY.js";import"./useInfiniteQuery-C-kiHDyf.js";import"./use-clock-tick--4azGxeb.js";import"./AlertCircle-BWppLd8c.js";import"./CheckCircle-UOyFv4rE.js";import"./DotsVertical-CILzGe_q.js";import"./XCircle-Cj1jhbDm.js";import"./Stars01-CyMHMvzU.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C6oZHBaC.js";import"./dialog-Cg0277WK.js";import"./X-DmV-M3--.js";import"./use-mobile-CnfmCPF3.js";import"./tab-id-BdQ_M6R3.js";import"./hooks-DE78iZyB.js";import"./decopilot-sse-pool-DjQPpjDZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./chat-context-B91LcyJ6.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-ai-providers-DFLh4od7.js";import"./use-decopilot-events-CfIikgvk.js";import"./use-organization-settings-BN4kKknX.js";import"./index-X6wqL5Rn.js";import"./Eye-BT74JrOy.js";import"./Star01-YV_bqOAU.js";import"./XClose-8V-NoWeD.js";import"./ZapSquare-BesqE3Kv.js";import"./Tool01-BsXkza2k.js";import"./Share07-DFtUk4DH.js";import"./Monitor01-D9pvMYQd.js";import"./Upload01-De1aQPW9.js";import"./shell-layout-Cd3V9av7.js";import"./Users03-CmtC3U6j.js";import"./SearchLg-BSg_Ve-L.js";import"./CpuChip01-DyWba75a.js";import"./Zap-BxOODR1h.js";import"./required-auth-layout-D4xEI9J8.js";import"./use-org-sso-TyWjgGeP.js";import"./LinkExternal01-CP1N0ekO.js";import"./ArrowUpRight-7JgIYGFf.js";import"./Palette-DJfFKmjP.js";import"./use-navigate-to-agent-BKt6uZhU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CMqdqW-X.js";import"./form-PWBx8QQq.js";import"./spinner-BoBi9JH7.js";import"./file-type-icon-DjpfQdvY.js";import"./ArrowUp-CK7po7JD.js";import"./ArrowLeft-cFWJcCye.js";import"./TrendUp01-BQPOQTfU.js";import"./CreditCard01-e79FUmFN.js";import"./Settings02-D_by58BO.js";import"./Globe04-_uS8YiyQ.js";import"./HardDrive-D7RLSuvq.js";import"./LayoutLeft-P7wDvRlA.js";import"./LogOut01-BNm98lqM.js";import"./Sun-CvD6V1mt.js";import"./Shield01-2VpHyEx6.js";import"./User01-DZLXXgFt.js";import"./Users01-D-f87RLp.js";import"./use-org-auth-client-DDDMIikQ.js";import"./auth-B56MWIKT.js";import"./checkbox-DU-r9RK1.js";import"./command-Cz9Vx3RB.js";import"./index-SRgwcnf7.js";const ss={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3},Il=["eq","contains","exists","in"];function kl(s){return Il.includes(s)}function st(s){return s.filter(e=>e.key.trim()).map(e=>{const l=encodeURIComponent(e.key.trim()),i=encodeURIComponent(e.value||"");return`${l}:${e.operator}:${i}`}).join(",")}function Cl(s){return!s||typeof s!="string"?[]:s.split(",").map(e=>{if(!e)return;const[l,i,...d]=e.split(":"),n=l?decodeURIComponent(l):"";if(n.trim())return{key:n,operator:i&&kl(i)?i:"eq",value:decodeURIComponent(d.join(":")||"")}}).filter(e=>e!==void 0)}function Kt(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
- `)}function gs(s){return s.trim()?s.split(`
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[l,...i]=e.split("=");return{key:l||"",operator:"eq",value:i.join("=")}}if(e.includes("~")){const[l,...i]=e.split("~");return{key:l||"",operator:"contains",value:i.join("~")}}if(e.includes("@")){const[l,...i]=e.split("@");return{key:l||"",operator:"in",value:i.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function Tl(s){const e={},l={},i=[],d={};for(const n of s)if(n.key.trim())switch(n.operator){case"eq":n.value&&(e[n.key]=n.value);break;case"contains":n.value&&(l[n.key]=`%${n.value}%`);break;case"exists":i.push(n.key);break;case"in":n.value&&(d[n.key]=n.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(l).length>0?l:void 0,propertyKeys:i.length>0?i:void 0,propertyInValues:Object.keys(d).length>0?d:void 0}}function hs(s){if(!s)return{content:"null",isTruncated:!1,originalSize:4};const e=s._decocms_truncated;if(typeof e=="string"&&e.length>0)return{content:e,isTruncated:!0,originalSize:e.length};let l;try{l=JSON.stringify(s,null,2)}catch{return{content:"[Unable to serialize JSON]",isTruncated:!1,originalSize:0}}const i=l.length;return i<=ss.maxJsonRenderSize?{content:l,isTruncated:!1,originalSize:i}:{content:l.slice(0,ss.maxJsonRenderSize)+`
4
-
5
- ... [TRUNCATED - content too large to display]`,isTruncated:!0,originalSize:i}}function Ml(s){const e=Me.c(167),{log:l}=s,[i,d]=ie.useState(!1),[n,f]=ie.useState(!1),u=os(),{org:m}=Tt(),r=Ge(),b=ts(),o=hs(l.input),y=hs(l.output),w=Ll;let g;e[0]!==l.input||e[1]!==l.output||e[2]!==r?(g=async fe=>{const pe=w(fe==="input"?l.input:l.output);try{await navigator.clipboard.writeText(pe),fe==="input"?(d(!0),setTimeout(()=>d(!1),2e3)):(f(!0),setTimeout(()=>f(!1),2e3))}catch{Qe.error(r("monitoring.types.failedToCopy"))}},e[0]=l.input,e[1]=l.output,e[2]=r,e[3]=g):g=e[3];const a=g;let I;e[4]!==l.id||e[5]!==l.input||e[6]!==l.output||e[7]!==l.toolName?(I=fe=>{const pe=w(fe==="input"?l.input:l.output),ge=new Blob([pe],{type:"application/json"}),Ce=URL.createObjectURL(ge),Ke=document.createElement("a");Ke.href=Ce,Ke.download=`${l.toolName}-${fe}-${l.id}.json`,Ke.click(),URL.revokeObjectURL(Ce)},e[4]=l.id,e[5]=l.input,e[6]=l.output,e[7]=l.toolName,e[8]=I):I=e[8];const h=I;let p;e[9]!==b||e[10]!==l.connectionId||e[11]!==l.input||e[12]!==l.toolName||e[13]!==u||e[14]!==m||e[15]!==r?(p=()=>{const fe=b.find(ge=>ge.id===l.connectionId);if(!fe){Qe.error(r("monitoring.types.connectionNotFound"));return}const pe=crypto.randomUUID();sessionStorage.setItem(`replay-${pe}`,JSON.stringify(l.input)),u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:m.slug,appSlug:Ss(fe),collectionName:"tools",itemId:encodeURIComponent(l.toolName)},search:{replayId:pe}})},e[9]=b,e[10]=l.connectionId,e[11]=l.input,e[12]=l.toolName,e[13]=u,e[14]=m,e[15]=r,e[16]=p):p=e[16];const R=p,[c,S]=ie.useState(!1);let v;e[17]!==l.requestId||e[18]!==r?(v=async()=>{try{await navigator.clipboard.writeText(l.requestId),S(!0),setTimeout(()=>S(!1),2e3)}catch{Qe.error(r("monitoring.types.failedToCopy"))}},e[17]=l.requestId,e[18]=r,e[19]=v):v=e[19];const j=v;let x;e[20]!==l.timestamp?(x=new Date(l.timestamp).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[20]=l.timestamp,e[21]=x):x=e[21];const N=x,_="text-sm px-5 md:px-6 py-5 space-y-5";let T;e[22]!==r?(T=r("monitoring.types.timestamp"),e[22]=r,e[23]=T):T=e[23];let k;e[24]!==T?(k=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:T}),e[24]=T,e[25]=k):k=e[25];let P;e[26]!==N?(P=t.jsx("div",{className:"text-sm text-foreground",children:N}),e[26]=N,e[27]=P):P=e[27];let z;e[28]!==k||e[29]!==P?(z=t.jsxs("div",{children:[k,P]}),e[28]=k,e[29]=P,e[30]=z):z=e[30];let D;e[31]!==r?(D=r("monitoring.types.duration"),e[31]=r,e[32]=D):D=e[32];let W;e[33]!==D?(W=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:D}),e[33]=D,e[34]=W):W=e[34];let V;e[35]!==l.durationMs?(V=t.jsxs("div",{className:"text-sm font-mono text-foreground",children:[l.durationMs,"ms"]}),e[35]=l.durationMs,e[36]=V):V=e[36];let X;e[37]!==W||e[38]!==V?(X=t.jsxs("div",{children:[W,V]}),e[37]=W,e[38]=V,e[39]=X):X=e[39];let C;e[40]!==r?(C=r("monitoring.types.user"),e[40]=r,e[41]=C):C=e[41];let F;e[42]!==C?(F=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:C}),e[42]=C,e[43]=F):F=e[43];let L;e[44]!==l.userName?(L=t.jsx("div",{className:"text-sm text-foreground",children:l.userName}),e[44]=l.userName,e[45]=L):L=e[45];let $;e[46]!==F||e[47]!==L?($=t.jsxs("div",{children:[F,L]}),e[46]=F,e[47]=L,e[48]=$):$=e[48];let q;e[49]!==l.virtualMcpName||e[50]!==r?(q=l.virtualMcpName&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.agent")}),t.jsx("div",{className:"text-sm text-foreground",children:l.virtualMcpName})]}),e[49]=l.virtualMcpName,e[50]=r,e[51]=q):q=e[51];let B;e[52]!==r?(B=r("monitoring.types.requestId"),e[52]=r,e[53]=B):B=e[53];let Q;e[54]!==B?(Q=t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:B}),e[54]=B,e[55]=Q):Q=e[55];let U;e[56]!==l.requestId?(U=t.jsx("code",{className:"font-mono text-foreground text-[11px]",children:l.requestId}),e[56]=l.requestId,e[57]=U):U=e[57];let E;e[58]!==r?(E=r("monitoring.types.copyRequestId"),e[58]=r,e[59]=E):E=e[59];let K;e[60]!==c?(K=c?t.jsx(Yt,{size:12}):t.jsx(Ut,{size:12}),e[60]=c,e[61]=K):K=e[61];let A;e[62]!==j||e[63]!==E||e[64]!==K?(A=t.jsx(xe,{size:"icon",variant:"ghost",onClick:j,"aria-label":E,className:"h-5 w-5 text-muted-foreground hover:text-foreground",children:K}),e[62]=j,e[63]=E,e[64]=K,e[65]=A):A=e[65];let G;e[66]!==U||e[67]!==A?(G=t.jsxs("div",{className:"flex items-center gap-1",children:[U,A]}),e[66]=U,e[67]=A,e[68]=G):G=e[68];let H;e[69]!==Q||e[70]!==G?(H=t.jsxs("div",{children:[Q,G]}),e[69]=Q,e[70]=G,e[71]=H):H=e[71];let J;e[72]!==l.userAgent||e[73]!==r?(J=l.userAgent&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:r("monitoring.types.client")}),t.jsx("div",{className:"text-sm font-mono text-foreground",children:l.userAgent})]}),e[72]=l.userAgent,e[73]=r,e[74]=J):J=e[74];let ee;e[75]!==l.properties||e[76]!==u||e[77]!==m||e[78]!==r?(ee=l.properties&&Object.keys(l.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:r("monitoring.types.properties")}),t.jsx("div",{className:"flex flex-wrap gap-1.5",children:Object.entries(l.properties).map(fe=>{const[pe,ge]=fe;return t.jsxs($t,{children:[t.jsx(zt,{asChild:!0,children:t.jsxs(kt,{variant:"secondary",className:"font-mono text-xs px-2 py-0.5 cursor-pointer hover:bg-secondary/80 transition-colors",children:[pe,"=",ge]})}),t.jsx(Et,{className:"w-auto p-1",align:"end",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsxs(xe,{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 Ce={key:pe,operator:"eq",value:ge};u({to:"/$org/settings/monitor",params:{org:m.slug},search:{propertyFilters:st([Ce])}})},children:[t.jsx(ns,{size:14,className:"mr-2"}),r("monitoring.types.filterByProperty")]}),t.jsxs(xe,{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(`${pe}=${ge}`),Qe.success(r("monitoring.types.copiedFilter"))}catch{Qe.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Ut,{size:14,className:"mr-2"}),r("monitoring.types.copyFilter")]}),t.jsxs(xe,{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(pe),Qe.success(r("monitoring.types.copiedKey"))}catch{Qe.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Ws,{size:14,className:"mr-2"}),r("monitoring.types.copyKey")]}),t.jsxs(xe,{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(ge),Qe.success(r("monitoring.types.copiedValue"))}catch{Qe.error(r("monitoring.types.failedToCopy"))}},children:[t.jsx(Ys,{size:14,className:"mr-2"}),r("monitoring.types.copyValue")]})]})})]},pe)})})]}),e[75]=l.properties,e[76]=u,e[77]=m,e[78]=r,e[79]=ee):ee=e[79];let Y;e[80]!==z||e[81]!==X||e[82]!==$||e[83]!==q||e[84]!==H||e[85]!==J||e[86]!==ee?(Y=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[z,X,$,q,H,J,ee]}),e[80]=z,e[81]=X,e[82]=$,e[83]=q,e[84]=H,e[85]=J,e[86]=ee,e[87]=Y):Y=e[87];let ce;e[88]!==l.errorMessage||e[89]!==r?(ce=l.errorMessage&&t.jsxs("div",{children:[t.jsx("div",{className:"text-xs text-destructive mb-1",children:r("monitoring.types.error")}),t.jsx("div",{className:"text-destructive font-mono text-xs bg-destructive/10 p-2 rounded break-all",children:l.errorMessage})]}),e[88]=l.errorMessage,e[89]=r,e[90]=ce):ce=e[90];const ve="space-y-4";let Z;e[91]!==r?(Z=r("monitoring.types.input"),e[91]=r,e[92]=Z):Z=e[92];let me;e[93]!==Z?(me=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:Z}),e[93]=Z,e[94]=me):me=e[94];const ae=o.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",ms(o.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let ne;e[95]!==me||e[96]!==ae?(ne=t.jsxs("div",{className:"flex items-center gap-2",children:[me,ae]}),e[95]=me,e[96]=ae,e[97]=ne):ne=e[97];let te;e[98]!==R||e[99]!==l.input||e[100]!==r?(te=l.input&&t.jsxs(Bt,{children:[t.jsx(Ht,{asChild:!0,children:t.jsx(xe,{size:"icon",variant:"ghost",onClick:R,"aria-label":r("monitoring.types.replayToolCall"),className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(Xs,{size:14})})}),t.jsx(Jt,{children:r("monitoring.types.replayToolCall")})]}),e[98]=R,e[99]=l.input,e[100]=r,e[101]=te):te=e[101];let se;e[102]!==h||e[103]!==o||e[104]!==r?(se=o.isTruncated&&t.jsxs(Bt,{children:[t.jsx(Ht,{asChild:!0,children:t.jsx(xe,{size:"icon",variant:"ghost",onClick:()=>h("input"),"aria-label":r("monitoring.types.downloadFullInput"),className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(xs,{size:14})})}),t.jsx(Jt,{children:r("monitoring.types.downloadFullInput")})]}),e[102]=h,e[103]=o,e[104]=r,e[105]=se):se=e[105];let le;e[106]!==a?(le=()=>a("input"),e[106]=a,e[107]=le):le=e[107];let M;e[108]!==r?(M=r("monitoring.types.copyInput"),e[108]=r,e[109]=M):M=e[109];let O;e[110]!==i?(O=i?t.jsx(Yt,{size:14}):t.jsx(Ut,{size:14}),e[110]=i,e[111]=O):O=e[111];let oe;e[112]!==le||e[113]!==M||e[114]!==O?(oe=t.jsx(xe,{size:"icon",variant:"ghost",onClick:le,"aria-label":M,className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:O}),e[112]=le,e[113]=M,e[114]=O,e[115]=oe):oe=e[115];let re;e[116]!==te||e[117]!==se||e[118]!==oe?(re=t.jsxs("div",{className:"flex items-center gap-1",children:[te,se,oe]}),e[116]=te,e[117]=se,e[118]=oe,e[119]=re):re=e[119];let ue;e[120]!==ne||e[121]!==re?(ue=t.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 border-b border-border",children:[ne,re]}),e[120]=ne,e[121]=re,e[122]=ue):ue=e[122];let he;e[123]!==o?(he=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(ps,{code:o.content,language:"json",height:"100%",readOnly:!0})}),e[123]=o,e[124]=he):he=e[124];let de;e[125]!==ue||e[126]!==he?(de=t.jsx("div",{children:t.jsxs("div",{className:"rounded-lg overflow-hidden border border-border",children:[ue,he]})}),e[125]=ue,e[126]=he,e[127]=de):de=e[127];const Te="rounded-lg overflow-hidden border border-border",je="flex items-center justify-between p-1 pl-4 border-b border-border",Re="flex items-center gap-2";let Ne;e[128]!==r?(Ne=r("monitoring.types.output"),e[128]=r,e[129]=Ne):Ne=e[129];let Pe;e[130]!==Ne?(Pe=t.jsx("span",{className:"text-xs text-muted-foreground select-none",children:Ne}),e[130]=Ne,e[131]=Pe):Pe=e[131];const Fe=y.isTruncated&&t.jsxs("span",{className:"text-xs text-warning",children:["(",ms(y.originalSize)," -"," ",r("monitoring.types.truncated"),")"]});let be;e[132]!==Pe||e[133]!==Fe?(be=t.jsxs("div",{className:Re,children:[Pe,Fe]}),e[132]=Pe,e[133]=Fe,e[134]=be):be=e[134];let Le;e[135]!==h||e[136]!==y.isTruncated||e[137]!==r?(Le=y.isTruncated&&t.jsxs(Bt,{children:[t.jsx(Ht,{asChild:!0,children:t.jsx(xe,{size:"icon",variant:"ghost",onClick:()=>h("output"),"aria-label":r("monitoring.types.downloadFullOutput"),className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:t.jsx(xs,{size:14})})}),t.jsx(Jt,{children:r("monitoring.types.downloadFullOutput")})]}),e[135]=h,e[136]=y.isTruncated,e[137]=r,e[138]=Le):Le=e[138];let _e;e[139]!==a?(_e=()=>a("output"),e[139]=a,e[140]=_e):_e=e[140];let ye;e[141]!==r?(ye=r("monitoring.types.copyOutput"),e[141]=r,e[142]=ye):ye=e[142];let Oe;e[143]!==n?(Oe=n?t.jsx(Yt,{size:14}):t.jsx(Ut,{size:14}),e[143]=n,e[144]=Oe):Oe=e[144];let we;e[145]!==_e||e[146]!==ye||e[147]!==Oe?(we=t.jsx(xe,{size:"icon",variant:"ghost",onClick:_e,"aria-label":ye,className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:Oe}),e[145]=_e,e[146]=ye,e[147]=Oe,e[148]=we):we=e[148];let Se;e[149]!==Le||e[150]!==we?(Se=t.jsxs("div",{className:"flex items-center gap-1",children:[Le,we]}),e[149]=Le,e[150]=we,e[151]=Se):Se=e[151];let Ie;e[152]!==be||e[153]!==Se?(Ie=t.jsxs("div",{className:je,children:[be,Se]}),e[152]=be,e[153]=Se,e[154]=Ie):Ie=e[154];let $e;e[155]!==y.content?($e=t.jsx("div",{className:"h-[200px] md:h-[280px] overflow-auto",children:t.jsx(ps,{code:y.content,language:"json",height:"100%",readOnly:!0})}),e[155]=y.content,e[156]=$e):$e=e[156];let ke;e[157]!==Ie||e[158]!==$e?(ke=t.jsx("div",{children:t.jsxs("div",{className:Te,children:[Ie,$e]})}),e[157]=Ie,e[158]=$e,e[159]=ke):ke=e[159];let ze;e[160]!==de||e[161]!==ke?(ze=t.jsxs("div",{className:ve,children:[de,ke]}),e[160]=de,e[161]=ke,e[162]=ze):ze=e[162];let De;return e[163]!==Y||e[164]!==ce||e[165]!==ze?(De=t.jsxs("div",{className:_,children:[Y,ce,ze]}),e[163]=Y,e[164]=ce,e[165]=ze,e[166]=De):De=e[166],De}function Ll(s){return JSON.stringify(s,null,2)}const Ps=/^now(?:-(\d+)([mhdwM]))?$/,Dl={m:"minute",h:"hour",d:"day",w:"week",M:"month"};function Fs(s){const e=s.trim();if(e==="now")return{isNow:!0,offset:0,unit:null};const l=e.match(Ps);if(!l)return null;const i=l[1]?Number.parseInt(l[1],10):0,d=l[2]||null;return{isNow:!0,offset:i,unit:d}}function Je(s){const e=s.trim(),l=new Date(e);if(!Number.isNaN(l.getTime())&&e.includes("-"))return{valid:!0,date:l};const i=Fs(e);if(!i)return{valid:!1,date:null,error:'Invalid expression. Use "now" or "now-Xu" (e.g., now-2d, now-3h)'};const d=new Date,n=new Date(d);if(i.offset===0||!i.unit)return{valid:!0,date:n};switch(i.unit){case"m":n.setMinutes(n.getMinutes()-i.offset);break;case"h":n.setHours(n.getHours()-i.offset);break;case"d":n.setDate(n.getDate()-i.offset);break;case"w":n.setDate(n.getDate()-i.offset*7);break;case"M":n.setMonth(n.getMonth()-i.offset);break}return{valid:!0,date:n}}function Rl(s){return s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function _s(s){const e=s.trim();return Ps.test(e)}function vs(s){const e=s.trim();if(e==="now")return"Now";const l=Fs(e);if(!l||!l.unit){const n=Je(e);return n.valid&&n.date?Rl(n.date):e}const i=Dl[l.unit],d=l.offset!==1?"s":"";return`${l.offset} ${i}${d} ago`}const Os=[{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 Pl(s,e){const l=Os.find(i=>i.from===s&&i.to===e);return l?l.label:`${vs(s)} to ${vs(e)}`}function Lt(s){const e=s.getFullYear(),l=String(s.getMonth()+1).padStart(2,"0"),i=String(s.getDate()).padStart(2,"0"),d=String(s.getHours()).padStart(2,"0"),n=String(s.getMinutes()).padStart(2,"0"),f=String(s.getSeconds()).padStart(2,"0");return`${e}-${l}-${i} ${d}:${n}:${f}`}function Fl(s){const e=s.match(/^(\d{4})-(\d{2})-(\d{2})\s+(\d{2}):(\d{2}):(\d{2})$/);if(!e)return null;const[,l,i,d,n,f,u]=e,m=new Date(Number(l),Number(i)-1,Number(d),Number(n),Number(f),Number(u));return Number.isNaN(m.getTime())?null:m}function Zt(s){if(_s(s))return s;const e=Je(s);return e.valid&&e.date?Lt(e.date):s}function js({value:s,onChange:e,placeholder:l="now or now-2d",className:i,disabled:d,error:n}){const[f,u]=ie.useState(!1),[m,r]=ie.useState(()=>Zt(s)),[b,o]=ie.useState(),[y,w]=ie.useState(!1),g=ie.useRef(s);g.current!==s&&(g.current=s,y||r(Zt(s)));const a=x=>{const N=x.target.value;r(N),o(void 0)},I=()=>{w(!0)},h=()=>{w(!1);const x=m.trim();if(_s(x)){o(void 0),e(x);return}const N=Fl(x);if(N){o(void 0),e(N.toISOString()),r(Lt(N));return}const _=Je(x);if(_.valid&&_.date){o(void 0),e(x),r(Lt(_.date));return}r(Zt(s)),o(void 0)},p=x=>{if(x){const _=Je(s).date||new Date;x.setHours(_.getHours()),x.setMinutes(_.getMinutes()),x.setSeconds(0),x.setMilliseconds(0);const T=x.toISOString();r(Lt(x)),e(T),o(void 0)}u(!1)},R=x=>{const[N,_]=x.target.value.split(":").map(Number),k=Je(s).date||new Date;k.setHours(N||0),k.setMinutes(_||0),k.setSeconds(0),k.setMilliseconds(0);const P=k.toISOString();r(Lt(k)),e(P)},c=Je(s),S=c.valid?c.date:new Date,v=S?`${String(S.getHours()).padStart(2,"0")}:${String(S.getMinutes()).padStart(2,"0")}`:"",j=n||b;return t.jsxs("div",{className:qe("flex gap-1",i),children:[t.jsxs("div",{className:"flex-1 relative",children:[t.jsx(Dt,{value:m,onChange:a,onFocus:I,onBlur:h,placeholder:l,disabled:d,className:qe("text-sm h-8",j&&"border-destructive focus-visible:ring-destructive")}),j&&t.jsx("p",{className:"text-xs text-destructive mt-1",children:j})]}),t.jsxs($t,{open:f,onOpenChange:u,children:[t.jsx(zt,{asChild:!0,children:t.jsx(xe,{variant:"outline",size:"icon",className:"h-8 w-8 shrink-0",disabled:d,children:t.jsx(Zs,{className:"h-4 w-4"})})}),t.jsxs(Et,{className:"w-auto p-0",align:"end",children:[t.jsx(qs,{mode:"single",selected:S||void 0,onSelect:p,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(Dt,{type:"time",value:v,onChange:R,className:"text-sm h-8"})]})]})]})]})}function _l({value:s,onChange:e,className:l,disabled:i,quickRanges:d=Os,labels:n}){const f=n?.absoluteTimeRange??"Absolute time range",u=n?.from??"From",m=n?.to??"To",r=n?.applyTimeRange??"Apply time range",[b,o]=ie.useState(!1),[y,w]=ie.useState(s.from),[g,a]=ie.useState(s.to),[I,h]=ie.useState(null),p=ie.useRef({from:s.from,to:s.to});(p.current.from!==s.from||p.current.to!==s.to)&&(p.current={from:s.from,to:s.to},w(s.from),a(s.to));const R=j=>{p.current={from:j.from,to:j.to},w(j.from),a(j.to),o(!1),e({from:j.from,to:j.to})},c=()=>{const j=Je(y),x=Je(g);if(!j.valid||!j.date){h("Invalid 'From' date");return}if(!x.valid||!x.date){h("Invalid 'To' date");return}if(j.date>=x.date){h("'From' must be before 'To'");return}h(null),e({from:y,to:g}),o(!1)},S=j=>s.from===j.from&&s.to===j.to,v=Pl(s.from,s.to);return t.jsxs($t,{open:b,onOpenChange:o,children:[t.jsx(zt,{asChild:!0,children:t.jsxs(xe,{variant:"outline",className:qe("gap-1.5 min-w-[160px] justify-between",l),disabled:i,children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(cl,{className:"size-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:v})]}),t.jsx(Is,{className:"size-4 text-muted-foreground"})]})}),t.jsx(Et,{className:"w-[540px] p-0",align:"end",sideOffset:4,onCloseAutoFocus:j=>j.preventDefault(),style:b?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:f}),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:u}),t.jsx(js,{value:y,onChange:w,placeholder:"now-24h"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs text-muted-foreground mb-1.5 block",children:m}),t.jsx(js,{value:g,onChange:a,placeholder:"now"})]}),I&&t.jsx("p",{className:"text-xs text-destructive",children:I}),t.jsx(xe,{onClick:c,className:"w-full",size:"sm",children:r})]})]}),t.jsx("div",{className:"w-[200px]",children:t.jsx(Bs,{className:"h-[280px]",children:t.jsx("div",{className:"p-2",children:d.map(j=>{const x=S(j);return t.jsx("button",{type:"button",onClick:()=>R(j),className:qe("w-full text-left px-3 py-2 text-sm rounded-md transition-colors","hover:bg-accent hover:text-accent-foreground",x&&"bg-accent text-accent-foreground font-medium"),children:j.label},j.value)})})})})]})})]})}const $s="decopilot";async function zs(s,e){return await s.call("MONITORING_STATS",e)}function Ol(s,e){const l=Me.c(12),{org:i}=Tt(),d=Ms();let n,f,u;l[0]!==i.id||l[1]!==s?(u={...s,excludeConnectionIds:[$s,...s.excludeConnectionIds??[]]},f=rs,n=Qt.monitoringStatsToolCalls(i.id,JSON.stringify(u)),l[0]=i.id,l[1]=s,l[2]=n,l[3]=f,l[4]=u):(n=l[2],f=l[3],u=l[4]);let m;l[5]!==d||l[6]!==u?(m=()=>zs(d,u),l[5]=d,l[6]=u,l[7]=m):m=l[7];let r;return l[8]!==e||l[9]!==n||l[10]!==m?(r={queryKey:n,queryFn:m,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=n,l[10]=m,l[11]=r):r=l[11],f(r)}function $l(s,e){const l=Me.c(12),{org:i}=Tt(),d=Ms();let n,f,u;l[0]!==i.id||l[1]!==s?(u={...s,connectionIds:[$s],topN:5,llmUsage:!0,userIds:s.userIds?.length?s.userIds:void 0},f=rs,n=Qt.monitoringStatsLlm(i.id,JSON.stringify(u)),l[0]=i.id,l[1]=s,l[2]=n,l[3]=f,l[4]=u):(n=l[2],f=l[3],u=l[4]);let m;l[5]!==d||l[6]!==u?(m=()=>zs(d,u),l[5]=d,l[6]=u,l[7]=m):m=l[7];let r;return l[8]!==e||l[9]!==n||l[10]!==m?(r={queryKey:n,queryFn:m,staleTime:3e4,retry:!1,...e},l[8]=e,l[9]=n,l[10]=m,l[11]=r):r=l[11],f(r)}function Ze(s){const e=Me.c(20),{title:l,value:i,action:d,children:n,className:f}=s;let u;e[0]!==f?(u=qe("pt-4 px-4 pb-6 gap-8",f),e[0]=f,e[1]=u):u=e[1];let m;e[2]!==l?(m=t.jsx("span",{className:"text-sm text-foreground/70",children:l}),e[2]=l,e[3]=m):m=e[3];let r;e[4]!==i?(r=t.jsx("span",{className:"text-4xl font-normal",children:i}),e[4]=i,e[5]=r):r=e[5];let b;e[6]!==m||e[7]!==r?(b=t.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[m,r]}),e[6]=m,e[7]=r,e[8]=b):b=e[8];let o;e[9]!==d?(o=d&&t.jsx("div",{className:"shrink-0",children:d}),e[9]=d,e[10]=o):o=e[10];let y;e[11]!==b||e[12]!==o?(y=t.jsxs("div",{className:"flex items-start justify-between",children:[b,o]}),e[11]=b,e[12]=o,e[13]=y):y=e[13];let w;e[14]!==n?(w=n&&t.jsx("div",{className:"flex flex-col gap-6",children:n}),e[14]=n,e[15]=w):w=e[15];let g;return e[16]!==u||e[17]!==y||e[18]!==w?(g=t.jsxs(Ts,{className:u,children:[y,w]}),e[16]=u,e[17]=y,e[18]=w,e[19]=g):g=e[19],g}function es(s){const e=Me.c(14),{metrics:l,connections:i,mode:d,total:n}=s,{org:f}=Tt(),u=os();let m,r,b;if(e[0]!==i||e[1]!==l||e[2]!==d||e[3]!==u||e[4]!==f||e[5]!==n){b=Symbol.for("react.early_return_sentinel");e:{const y=i??[],w=new Map(l.map(El));let g;e[9]!==d?(g=(I,h)=>{const p=fs(I.metric,d);return fs(h.metric,d)-p},e[9]=d,e[10]=g):g=e[10];const a=y.map(I=>({connection:I,metric:w.get(I.id)})).filter(zl).sort(g).slice(0,4);if(a.length===0){b=null;break e}m="flex flex-col",r=a.map((I,h)=>{const{connection:p,metric:R}=I,c=n>0?(R.calls/n*100).toFixed(1):"0.0",S=d==="errors"?`${R.errorRate.toFixed(1)}%`:`${c}%`,v=h===a.length-1;return t.jsxs("div",{className:qe("flex items-center h-10 px-3 cursor-pointer hover:bg-accent/50 transition-colors",!v&&"border-b border-border/50"),onClick:()=>u({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:Ss(p)}}),children:[t.jsxs("div",{className:"flex flex-1 items-center gap-2 min-w-0",children:[t.jsx(Ct,{icon:p.icon,name:p.title,size:"xs",fallbackIcon:t.jsx(At,{}),className:"shrink-0 size-6! min-w-6! rounded-md"}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:p.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:S}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:Js(R,d)})]})]},p.id)})}e[0]=i,e[1]=l,e[2]=d,e[3]=u,e[4]=f,e[5]=n,e[6]=m,e[7]=r,e[8]=b}else m=e[6],r=e[7],b=e[8];if(b!==Symbol.for("react.early_return_sentinel"))return b;let o;return e[11]!==m||e[12]!==r?(o=t.jsx("div",{className:m,children:r}),e[11]=m,e[12]=r,e[13]=o):o=e[13],o}function zl(s){return s.metric}function El(s){return[s.connectionId,s]}const Ns=["var(--chart-1)","var(--chart-2)","var(--chart-3)","var(--chart-4)","var(--chart-5)"];function bs(s){let e=0;for(let l=0;l<s.length;l++)e=e*31+s.charCodeAt(l)>>>0;return Ns[e%Ns.length]}function Mt(s){const e=Me.c(21),{models:l,mode:i}=s,d=i===void 0?"calls":i;if(l.length===0)return null;let n;e[0]!==d?(n=g=>d==="tokens"?(g.inputTokens??0)+(g.outputTokens??0):d==="cost"?g.costUsd??0:g.calls,e[0]=d,e[1]=n):n=e[1];const f=n;let u;e[2]!==d?(u=g=>d==="cost"?ys(g):d==="tokens"?qt(g):g.toLocaleString(),e[2]=d,e[3]=u):u=e[3];const m=u;let r;e[4]!==f?(r=(g,a)=>g+f(a),e[4]=f,e[5]=r):r=e[5];const b=l.reduce(r,0);let o,y;if(e[6]!==m||e[7]!==l||e[8]!==b||e[9]!==f){let g;e[12]!==f?(g=(h,p)=>f(p)-f(h),e[12]=f,e[13]=g):g=e[13];const a=[...l].sort(g).slice(0,4);o="flex flex-col";let I;e[14]!==m||e[15]!==b||e[16]!==f?(I=(h,p,R)=>{const c=f(h),S=b>0?(c/b*100).toFixed(1):"0.0",v=p===R.length-1;return t.jsxs("div",{className:qe("flex items-center h-10 px-3",!v&&"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, ${bs(h.toolName)} 18%, transparent)`},children:t.jsx(At,{size:14,style:{color:bs(h.toolName)}})}),t.jsx("span",{className:"text-sm text-muted-foreground flex-1 truncate",children:h.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:[S,"%"]}),t.jsx("span",{className:"text-sm text-foreground tabular-nums",children:m(c)})]})]},h.toolName)},e[14]=m,e[15]=b,e[16]=f,e[17]=I):I=e[17],y=a.map(I),e[6]=m,e[7]=l,e[8]=b,e[9]=f,e[10]=o,e[11]=y}else o=e[10],y=e[11];let w;return e[18]!==o||e[19]!==y?(w=t.jsx("div",{className:o,children:y}),e[18]=o,e[19]=y,e[20]=w):w=e[20],w}function Al(s){const e=Me.c(113),{displayDateRange:l,connectionIds:i,excludeConnectionIds:d,toolName:n,status:f,connections:u,isStreaming:m,streamingRefetchInterval:r,llmUserIds:b}=s,o=Ge(),y=Hs(l),w=m?r:!1;let g;e[0]!==w?(g={refetchInterval:w},e[0]=w,e[1]=g):g=e[1];const{data:a,isError:I}=Ol({interval:y,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),connectionIds:i.length>0?i:void 0,excludeConnectionIds:d,toolNames:n?[n]:void 0,status:f},g);let h;e[2]!==w?(h={refetchInterval:w},e[2]=w,e[3]=h):h=e[3];const{data:p,isError:R}=$l({interval:y,startDate:l.startDate.toISOString(),endDate:l.endDate.toISOString(),userIds:b?.length?b:void 0},h),c=I||R,S=a?{totalCalls:a.totalCalls,totalErrors:a.totalErrors,avgDurationMs:a.avgDurationMs,p95DurationMs:a.p95DurationMs,data:us(a.timeseries,l,y)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]},v=p?{totalCalls:p.totalCalls,totalErrors:p.totalErrors,avgDurationMs:p.avgDurationMs,p95DurationMs:p.p95DurationMs,data:us(p.timeseries,l,y)}:{totalCalls:0,totalErrors:0,avgDurationMs:0,p95DurationMs:0,data:[]};let j;e[4]!==p?.topTools?(j=p?.topTools??[],e[4]=p?.topTools,e[5]=j):j=e[5];const x=j,N=p?.totalInputTokens??0,_=p?.totalOutputTokens??0,T=p?.totalTokens??0,k=p?.totalCostUsd??0;let P;e[6]!==a?.connectionBreakdown?(P=a?.connectionBreakdown??[],e[6]=a?.connectionBreakdown,e[7]=P):P=e[7];const z=P,[D,W]=ie.useState("avg");let V;e[8]!==c||e[9]!==o?(V=c&&t.jsxs(fl,{variant:"destructive",children:[t.jsx(Es,{}),t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx(xl,{children:o("orgs.overview.failedToLoadTitle")}),t.jsx(pl,{children:o("orgs.overview.failedToLoadDescription")})]})]}),e[8]=c,e[9]=o,e[10]=V):V=e[10];let X;e[11]!==o?(X=o("orgs.overview.toolCalls"),e[11]=o,e[12]=X):X=e[12];const C=S.totalCalls.toLocaleString(),F=S.data;let L;e[13]!==o?(L=o("orgs.overview.toolCallsAriaLabel"),e[13]=o,e[14]=L):L=e[14];let $;e[15]!==o?($=o("orgs.overview.latency"),e[15]=o,e[16]=$):$=e[16];const q=Xt(D==="avg"?S.avgDurationMs:S.p95DurationMs);let B;e[17]===Symbol.for("react.memo_cache_sentinel")?(B=We=>W(We),e[17]=B):B=e[17];let Q;e[18]===Symbol.for("react.memo_cache_sentinel")?(Q=t.jsx(Pt,{className:"w-[120px]",children:t.jsx(Ft,{})}),e[18]=Q):Q=e[18];let U;e[19]!==o?(U=o("orgs.overview.latencyAvg"),e[19]=o,e[20]=U):U=e[20];let E;e[21]!==U?(E=t.jsx(He,{value:"avg",children:U}),e[21]=U,e[22]=E):E=e[22];let K;e[23]!==o?(K=o("orgs.overview.latencyP95"),e[23]=o,e[24]=K):K=e[24];let A;e[25]!==K?(A=t.jsx(He,{value:"p95",children:K}),e[25]=K,e[26]=A):A=e[26];let G;e[27]!==E||e[28]!==A?(G=t.jsxs(_t,{children:[E,A]}),e[27]=E,e[28]=A,e[29]=G):G=e[29];let H;e[30]!==D||e[31]!==G?(H=t.jsxs(Ot,{value:D,onValueChange:B,children:[Q,G]}),e[30]=D,e[31]=G,e[32]=H):H=e[32];const J=S.data;let ee;e[33]!==D||e[34]!==o?(ee=o("orgs.overview.latencyAriaLabel",{type:D==="avg"?o("orgs.overview.average"):"P95"}),e[33]=D,e[34]=o,e[35]=ee):ee=e[35];let Y;e[36]!==o?(Y=o("orgs.overview.errors"),e[36]=o,e[37]=Y):Y=e[37];const ce=S.totalErrors.toLocaleString(),ve=S.data;let Z;e[38]!==o?(Z=o("orgs.overview.errorsAriaLabel"),e[38]=o,e[39]=Z):Z=e[39];let me;e[40]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[40]=me):me=e[40];let ae;e[41]!==o?(ae=o("orgs.overview.aiUsage"),e[41]=o,e[42]=ae):ae=e[42];let ne;e[43]!==ae?(ne=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:ae}),e[43]=ae,e[44]=ne):ne=e[44];let te;e[45]===Symbol.for("react.memo_cache_sentinel")?(te=t.jsx("div",{className:"h-px flex-1 bg-border"}),e[45]=te):te=e[45];let se;e[46]!==ne?(se=t.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[me,ne,te]}),e[46]=ne,e[47]=se):se=e[47];let le;e[48]!==o?(le=o("orgs.overview.aiCalls"),e[48]=o,e[49]=le):le=e[49];const M=v.totalCalls.toLocaleString(),O=v.data;let oe;e[50]!==o?(oe=o("orgs.overview.aiCallsAriaLabel"),e[50]=o,e[51]=oe):oe=e[51];let re;e[52]!==x?(re=t.jsx(Mt,{models:x,mode:"calls"}),e[52]=x,e[53]=re):re=e[53];let ue;e[54]!==o?(ue=o("orgs.overview.tokens"),e[54]=o,e[55]=ue):ue=e[55];let he;e[56]!==T?(he=qt(T),e[56]=T,e[57]=he):he=e[57];let de;e[58]!==N?(de=qt(N),e[58]=N,e[59]=de):de=e[59];let Te;e[60]!==o?(Te=o("orgs.overview.tokensIn"),e[60]=o,e[61]=Te):Te=e[61];let je;e[62]!==_?(je=qt(_),e[62]=_,e[63]=je):je=e[63];let Re;e[64]!==o?(Re=o("orgs.overview.tokensOut"),e[64]=o,e[65]=Re):Re=e[65];let Ne;e[66]!==de||e[67]!==Te||e[68]!==je||e[69]!==Re?(Ne=t.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[de," ",Te," ·"," ",je," ",Re]}),e[66]=de,e[67]=Te,e[68]=je,e[69]=Re,e[70]=Ne):Ne=e[70];const Pe=v.data;let Fe;e[71]!==o?(Fe=o("orgs.overview.tokensAriaLabel"),e[71]=o,e[72]=Fe):Fe=e[72];let be;e[73]!==x?(be=t.jsx(Mt,{models:x,mode:"tokens"}),e[73]=x,e[74]=be):be=e[74];let Le;e[75]!==o?(Le=o("orgs.overview.cost"),e[75]=o,e[76]=Le):Le=e[76];let _e;e[77]!==k?(_e=k>0?ys(k):"—",e[77]=k,e[78]=_e):_e=e[78];let ye;e[79]!==o||e[80]!==k?(ye=k===0?t.jsx("span",{className:"text-xs text-muted-foreground",children:o("orgs.overview.noCostData")}):void 0,e[79]=o,e[80]=k,e[81]=ye):ye=e[81];const Oe=v.data;let we;e[82]!==o?(we=o("orgs.overview.costAriaLabel"),e[82]=o,e[83]=we):we=e[83];let Se;e[84]!==x||e[85]!==o||e[86]!==k?(Se=k>0?t.jsx(Mt,{models:x,mode:"cost"}):t.jsx("div",{className:"flex items-center justify-center h-20 text-center text-xs text-muted-foreground px-4",children:o("orgs.overview.costProvidersNotice")}),e[84]=x,e[85]=o,e[86]=k,e[87]=Se):Se=e[87];let Ie;e[88]!==o?(Ie=o("orgs.overview.aiLatency"),e[88]=o,e[89]=Ie):Ie=e[89];const $e=Xt(v.avgDurationMs);let ke;e[90]!==o?(ke=o("orgs.overview.p95Prefix"),e[90]=o,e[91]=ke):ke=e[91];const ze=v.data;let De;e[92]!==o?(De=o("orgs.overview.aiLatencyAriaLabel"),e[92]=o,e[93]=De):De=e[93];let fe;e[94]!==x?(fe=t.jsx(Mt,{models:x,mode:"calls"}),e[94]=x,e[95]=fe):fe=e[95];const pe=Ze;let ge;e[96]!==o?(ge=o("orgs.overview.aiErrors"),e[96]=o,e[97]=ge):ge=e[97];const Ce=v.totalErrors.toLocaleString(),Ke=v.data;let Ae;e[98]!==o?(Ae=o("orgs.overview.aiErrorsAriaLabel"),e[98]=o,e[99]=Ae):Ae=e[99];let Ve;e[100]!==v.data||e[101]!==Ae?(Ve=t.jsx(Ye,{data:Ke,dataKey:"errors",colorNum:3,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Ae}),e[100]=v.data,e[101]=Ae,e[102]=Ve):Ve=e[102];let Ue;e[103]!==x||e[104]!==v.totalErrors||e[105]!==o?(Ue=v.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:o("orgs.overview.noAiErrors")}):t.jsx(Mt,{models:x,mode:"calls"}),e[103]=x,e[104]=v.totalErrors,e[105]=o,e[106]=Ue):Ue=e[106];let Be;return e[107]!==pe||e[108]!==ge||e[109]!==Ce||e[110]!==Ve||e[111]!==Ue?(Be=t.jsxs(pe,{title:ge,value:Ce,children:[Ve,Ue]}),e[107]=pe,e[108]=ge,e[109]=Ce,e[110]=Ve,e[111]=Ue,e[112]=Be):Be=e[112],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:[V,t.jsxs(Ze,{title:X,value:C,children:[t.jsx(Ye,{data:F,dataKey:"calls",colorNum:1,chartHeight:"h-[120px] md:h-[180px]",variant:"area",ariaLabel:L}),t.jsx(es,{metrics:z,connections:u,mode:"requests",total:S.totalCalls})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Ze,{title:$,value:q,action:H,children:[t.jsx(Ye,{data:J,dataKey:D,colorNum:4,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:ee}),t.jsx(es,{metrics:z,connections:u,mode:"latency",total:S.totalCalls})]}),t.jsxs(Ze,{title:Y,value:ce,children:[t.jsx(Ye,{data:ve,dataKey:"errors",colorNum:3,chartHeight:"h-[120px] md:h-[180px]",ariaLabel:Z}),S.totalErrors===0?t.jsx("div",{className:"flex items-center justify-center h-20 text-sm text-muted-foreground",children:o("orgs.overview.noErrors")}):t.jsx(es,{metrics:z,connections:u,mode:"errors",total:S.totalErrors})]})]}),se,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsxs(Ze,{title:le,value:M,children:[t.jsx(Ye,{data:O,dataKey:"calls",colorNum:1,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:oe}),re]}),t.jsxs(Ze,{title:ue,value:he,action:Ne,children:[t.jsx(Ye,{data:Pe,dataKey:"totalTokens",colorNum:2,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:Fe}),be]}),t.jsxs(Ze,{title:Le,value:_e,action:ye,children:[t.jsx(Ye,{data:Oe,dataKey:"costUsd",colorNum:5,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:we}),Se]})]}),t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsxs(Ze,{title:Ie,value:$e,action:t.jsxs("span",{className:"text-xs text-muted-foreground",children:[ke,Xt(v.p95DurationMs)]}),children:[t.jsx(Ye,{data:ze,dataKey:"avg",colorNum:4,chartHeight:"h-[80px] md:h-[120px]",ariaLabel:De}),fe]}),Be]})]})}function It(s){const e=Me.c(8),{className:l}=s;let i;e[0]!==l?(i=qe("pt-4 px-4 pb-6 gap-8",l),e[0]=l,e[1]=i):i=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=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]=d):d=e[2];let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-[180px] w-full rounded bg-muted/60 animate-pulse"}),e[3]=n):n=e[3];let f;e[4]===Symbol.for("react.memo_cache_sentinel")?(f=Array.from({length:4}).map(Vl),e[4]=f):f=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsxs("div",{className:"flex flex-col gap-6",children:[n,t.jsxs("div",{className:"flex flex-col",children:[f,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]=u):u=e[5];let m;return e[6]!==i?(m=t.jsxs(Ts,{className:i,children:[d,u]}),e[6]=i,e[7]=m):m=e[7],m}function Vl(s,e){return t.jsxs("div",{className:qe("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 Ul(){const s=Me.c(4);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(It,{}),s[0]=e):e=s[0];let l,i;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(It,{}),t.jsx(It,{})]}),i=t.jsx("div",{className:"border-t border-border"}),s[1]=l,s[2]=i):(l=s[1],i=s[2]);let d;return s[3]===Symbol.for("react.memo_cache_sentinel")?(d=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,l,i,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[t.jsx(It,{}),t.jsx(It,{}),t.jsx(It,{})]})]}),s[3]=d):d=s[3],d}function Kl(s){const e=Me.c(49),{log:l,connection:i,virtualMcpName:d,virtualMcpIcon:n,onClick:f,lastLogRef:u}=s,m=Ge();let r,b;if(e[0]!==l.timestamp){const D=new Date(l.timestamp);r=D.toLocaleDateString("en-US",{month:"short",day:"numeric"}),b=D.toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[0]=l.timestamp,e[1]=r,e[2]=b}else r=e[1],b=e[2];const o=b,y=i?.icon||null,w=i?.title??l.connectionId;let g;e[3]!==y||e[4]!==w?(g=t.jsx(tt,{className:"w-12 md:w-16 px-2 md:px-4",children:t.jsx("div",{className:"flex items-center justify-center",children:t.jsx(Ct,{icon:y,name:w,size:"xs",className:"shadow-sm"})})}),e[3]=y,e[4]=w,e[5]=g):g=e[5];let a;e[6]!==l.toolName?(a=t.jsx("div",{className:"font-medium text-foreground truncate block",children:l.toolName}),e[6]=l.toolName,e[7]=a):a=e[7];const I=i?.title??l.connectionId;let h;e[8]!==I?(h=t.jsx("div",{className:"text-muted-foreground truncate block text-xs",children:I}),e[8]=I,e[9]=h):h=e[9];let p;e[10]!==a||e[11]!==h?(p=t.jsxs(tt,{className:"min-w-0 pr-2 md:pr-4",children:[a,h]}),e[10]=a,e[11]=h,e[12]=p):p=e[12];let R;e[13]!==n||e[14]!==d?(R=t.jsx(tt,{className:"w-36 md:w-44 px-2 md:px-3 text-muted-foreground",children:d?t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(Ct,{icon:n,name:d,size:"xs",fallbackIcon:t.jsx(At,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),t.jsx("span",{className:"truncate",children:d})]}):t.jsx("span",{className:"text-muted-foreground/40",children:"—"})}),e[13]=n,e[14]=d,e[15]=R):R=e[15];let c;e[16]!==l.userImage||e[17]!==l.userName?(c=t.jsx(Cs,{url:l.userImage,fallback:l.userName,shape:"circle",size:"2xs",className:"shrink-0"}),e[16]=l.userImage,e[17]=l.userName,e[18]=c):c=e[18];let S;e[19]!==l.userName?(S=t.jsx("span",{className:"truncate",children:l.userName}),e[19]=l.userName,e[20]=S):S=e[20];let v;e[21]!==c||e[22]!==S?(v=t.jsx(tt,{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:[c,S]})}),e[21]=c,e[22]=S,e[23]=v):v=e[23];let j;e[24]!==r?(j=t.jsx("div",{children:r}),e[24]=r,e[25]=j):j=e[25];let x;e[26]!==o?(x=t.jsx("div",{className:"text-xs text-muted-foreground/60",children:o}),e[26]=o,e[27]=x):x=e[27];let N;e[28]!==j||e[29]!==x?(N=t.jsxs(tt,{className:"w-32 md:w-40 px-2 md:px-3 text-muted-foreground",children:[j,x]}),e[28]=j,e[29]=x,e[30]=N):N=e[30];let _;e[31]!==l.durationMs?(_=t.jsxs(tt,{className:"w-16 md:w-20 px-2 md:px-3 text-muted-foreground font-mono",children:[l.durationMs,"ms"]}),e[31]=l.durationMs,e[32]=_):_=e[32];const T=l.isError?"destructive":"success";let k;e[33]!==l.isError||e[34]!==m?(k=l.isError?m("monitoring.logRow.statusError"):m("monitoring.logRow.statusOk"),e[33]=l.isError,e[34]=m,e[35]=k):k=e[35];let P;e[36]!==T||e[37]!==k?(P=t.jsx(tt,{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(kt,{variant:T,className:"px-1.5 md:px-2 py-0.5 md:py-1",children:k})})}),e[36]=T,e[37]=k,e[38]=P):P=e[38];let z;return e[39]!==u||e[40]!==f||e[41]!==v||e[42]!==N||e[43]!==_||e[44]!==P||e[45]!==g||e[46]!==p||e[47]!==R?(z=t.jsxs(Gt,{ref:u,className:"h-14 md:h-16 transition-colors cursor-pointer hover:bg-muted/40 border-b-0",onClick:f,children:[g,p,R,v,N,_,P]}),e[39]=u,e[40]=f,e[41]=v,e[42]=N,e[43]=_,e[44]=P,e[45]=g,e[46]=p,e[47]=R,e[48]=z):z=e[48],z}function ql(s){const e=Me.c(67),{connectionIds:l,virtualMcpIds:i,tool:d,status:n,search:f,logs:u,hasMore:m,onLoadMore:r,isLoadingMore:b,connections:o,virtualMcps:y,membersData:w,client:g}=s,a=Ge(),I=o??[],h=y??[],[p,R]=ie.useState(null),c=yl(r,m,b),S=ws(w),v=new Map(S.map(Ql)),j=new Map(h.map(Jl));let N=u.map(M=>{const O=v.get(M.userId??""),oe=M.virtualMcpId?j.get(M.virtualMcpId):null;return{...M,userName:O?.name??M.userId??"Unknown",userImage:O?.image??void 0,virtualMcpName:oe?.title??null,virtualMcpIcon:oe?.icon??null}});if(l.length>1){let M;e[0]!==l?(M=O=>l.includes(O.connectionId),e[0]=l,e[1]=M):M=e[1],N=N.filter(M)}if(i.length>1){let M;e[2]!==i?(M=O=>O.virtualMcpId&&i.includes(O.virtualMcpId),e[2]=i,e[3]=M):M=e[3],N=N.filter(M)}const _=new Map(I.map(Hl));if(f){const M=f.toLowerCase();N=N.filter(O=>O.toolName.toLowerCase().includes(M)||(_.get(O.connectionId)?.title??O.connectionId).toLowerCase().includes(M)||O.errorMessage?.toLowerCase().includes(M))}const T=p!==null?N[p]??null:null,k=rs({queryKey:Qt.monitoringLogDetail(T?.id??""),queryFn:async()=>{if(!g)throw new Error("MCP client is not available");const M=await g.callTool({name:"MONITORING_LOG_GET",arguments:{id:T.id}});return M.structuredContent??M},enabled:T!==null}),P=k.data?.log,z=T&&P?{...T,input:P.input,output:P.output}:T;if(N.length===0){let M;e[4]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("img",{src:"/empty-state-logs.svg",alt:"",width:336,height:320,"aria-hidden":"true"}),e[4]=M):M=e[4];let O;e[5]!==a?(O=a("orgs.audit.noLogsFound"),e[5]=a,e[6]=O):O=e[6];let oe;e[7]!==l.length||e[8]!==f||e[9]!==n||e[10]!==a||e[11]!==d||e[12]!==i.length?(oe=f||l.length>0||i.length>0||d||n!=="all"?a("orgs.audit.noLogsMatchFilters"):a("orgs.audit.noLogsInTimeRange"),e[7]=l.length,e[8]=f,e[9]=n,e[10]=a,e[11]=d,e[12]=i.length,e[13]=oe):oe=e[13];let re;return e[14]!==O||e[15]!==oe?(re=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(is,{image:M,title:O,description:oe})}),e[14]=O,e[15]=oe,e[16]=re):re=e[16],re}const D="flex-1 flex flex-col min-w-0",W="flex-1 min-w-0 pt-1",V="min-w-[600px] md:min-w-0",X=Ds,C="w-full border-collapse";let F;e[17]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(Ee,{className:"w-5"}),e[17]=F):F=e[17];let L;e[18]!==a?(L=a("orgs.audit.toolConnection"),e[18]=a,e[19]=L):L=e[19];let $;e[20]!==L?($=t.jsx(Ee,{className:"pr-2 md:pr-4 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:L}),e[20]=L,e[21]=$):$=e[21];let q;e[22]!==a?(q=a("orgs.audit.agent"),e[22]=a,e[23]=q):q=e[23];let B;e[24]!==q?(B=t.jsx(Ee,{className:"w-36 md:w-44 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:q}),e[24]=q,e[25]=B):B=e[25];let Q;e[26]!==a?(Q=a("orgs.audit.user"),e[26]=a,e[27]=Q):Q=e[27];let U;e[28]!==Q?(U=t.jsx(Ee,{className:"w-28 md:w-36 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:Q}),e[28]=Q,e[29]=U):U=e[29];let E;e[30]!==a?(E=a("orgs.audit.date"),e[30]=a,e[31]=E):E=e[31];let K;e[32]!==E?(K=t.jsx(Ee,{className:"w-32 md:w-40 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:E}),e[32]=E,e[33]=K):K=e[33];let A;e[34]!==a?(A=a("orgs.audit.latency"),e[34]=a,e[35]=A):A=e[35];let G;e[36]!==A?(G=t.jsx(Ee,{className:"w-16 md:w-20 px-2 md:px-3 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:A}),e[36]=A,e[37]=G):G=e[37];let H;e[38]!==a?(H=a("orgs.audit.status"),e[38]=a,e[39]=H):H=e[39];let J;e[40]!==H?(J=t.jsx(Ee,{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:H}),e[40]=H,e[41]=J):J=e[41];let ee;e[42]!==U||e[43]!==K||e[44]!==G||e[45]!==J||e[46]!==$||e[47]!==B?(ee=t.jsx(Rs,{className:"border-b-0 z-20",children:t.jsxs(Gt,{className:"h-9 hover:bg-transparent border-b border-border",children:[F,$,B,U,K,G,J]})}),e[42]=U,e[43]=K,e[44]=G,e[45]=J,e[46]=$,e[47]=B,e[48]=ee):ee=e[48];const Y=Ls,ce=N.map((M,O)=>t.jsx(Kl,{log:M,connection:_.get(M.connectionId),virtualMcpName:M.virtualMcpName??"",virtualMcpIcon:M.virtualMcpIcon,onClick:()=>R(O),lastLogRef:O===N.length-1?c:void 0},M.id));let ve;e[49]!==Y||e[50]!==ce?(ve=t.jsx(Y,{children:ce}),e[49]=Y,e[50]=ce,e[51]=ve):ve=e[51];let Z;e[52]!==X||e[53]!==ee||e[54]!==ve?(Z=t.jsx("div",{className:W,children:t.jsx("div",{className:V,children:t.jsxs(X,{className:C,children:[ee,ve]})})}),e[52]=X,e[53]=ee,e[54]=ve,e[55]=Z):Z=e[55];const me=p!==null;let ae;e[56]!==R?(ae=M=>{M||R(null)},e[56]=R,e[57]=ae):ae=e[57];const ne=T&&p!==null&&t.jsxs(t.Fragment,{children:[t.jsx(hl,{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(Ct,{icon:_.get(T.connectionId)?.icon||null,name:_.get(T.connectionId)?.title??T.connectionId,size:"sm",className:"shadow-sm shrink-0"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx(vl,{className:"text-sm leading-snug truncate",children:T.toolName}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:_.get(T.connectionId)?.title??T.connectionId})]})]}),t.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[t.jsx(xe,{size:"icon",variant:"ghost",onClick:()=>R(Bl),disabled:p===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.previousEntry"),children:t.jsx(bl,{size:14})}),t.jsx(xe,{size:"icon",variant:"ghost",onClick:()=>R(M=>M!==null&&M<N.length-1?M+1:M),disabled:p===N.length-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.audit.nextEntry"),children:t.jsx(Is,{size:14})})]})]})}),t.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:k.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"})}):k.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:a("orgs.audit.failedLoadLogDetails")}),t.jsx(xe,{variant:"outline",size:"sm",onClick:()=>k.refetch(),children:a("orgs.audit.retry")})]}):t.jsx(Ml,{log:z})})]});let te;e[58]!==ne?(te=t.jsx(jl,{className:"sm:max-w-2xl flex flex-col p-0 gap-0",children:ne}),e[58]=ne,e[59]=te):te=e[59];let se;e[60]!==me||e[61]!==ae||e[62]!==te?(se=t.jsx(Nl,{open:me,onOpenChange:ae,children:te}),e[60]=me,e[61]=ae,e[62]=te,e[63]=se):se=e[63];let le;return e[64]!==Z||e[65]!==se?(le=t.jsxs("div",{className:D,children:[Z,se]}),e[64]=Z,e[65]=se,e[66]=le):le=e[66],le}function Bl(s){return s!==null&&s>0?s-1:s}function Hl(s){return[s.id,s]}function Jl(s){return[s.id,s]}function Ql(s){return[s.userId,s.user]}function Gl(){const s=Me.c(8);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ee,{className:"w-12 md:w-16 px-2 md:px-4"}),s[0]=e):e=s[0];let l;s[1]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ee,{className:"pr-2 md:pr-4",children:t.jsx("div",{className:"h-3 w-24 rounded bg-muted animate-pulse"})}),s[1]=l):l=s[1];let i;s[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ee,{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]=i):i=s[2];let d;s[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx(Ee,{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]=d):d=s[3];let n;s[4]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(Ee,{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]=n):n=s[4];let f;s[5]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Ee,{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]=f):f=s[5];let u;s[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Rs,{className:"border-b-0 z-20",children:t.jsxs(Gt,{className:"h-9 hover:bg-transparent border-b border-border",children:[e,l,i,d,n,f,t.jsx(Ee,{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]=u):u=s[6];let m;return s[7]===Symbol.for("react.memo_cache_sentinel")?(m=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(Ds,{className:"w-full border-collapse",children:[u,t.jsx(Ls,{children:Array.from({length:8}).map(Wl)})]})})}),s[7]=m):m=s[7],m}function Wl(s,e){return t.jsxs(Gt,{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 ls=Object.assign(ql,{Skeleton:Gl});function Xl(s){const e=Me.c(34),{client:l,locator:i,baseParams:d,pageSize:n,isStreaming:f,streamingRefetchInterval:u,connectionIds:m,virtualMcpIds:r,tool:b,status:o,searchQuery:y,allConnections:w,allVirtualMcps:g,membersData:a}=s;let I;e[0]!==d||e[1]!==i?(I=Qt.monitoringLogsInfinite(i,JSON.stringify(d)),e[0]=d,e[1]=i,e[2]=I):I=e[2];let h;e[3]!==d||e[4]!==l||e[5]!==n?(h=async D=>{const{pageParam:W}=D,V=W===void 0?0:W;if(!l)throw new Error("MCP client is not available");const X=await l.callTool({name:"MONITORING_LOGS_LIST",arguments:{...d,limit:n,offset:V}});return X.structuredContent??X},e[3]=d,e[4]=l,e[5]=n,e[6]=h):h=e[6];let p;e[7]!==n?(p=(D,W)=>{if(!((D?.logs?.length??0)<n))return W.length*n},e[7]=n,e[8]=p):p=e[8];const R=f?u:!1;let c;e[9]!==I||e[10]!==h||e[11]!==p||e[12]!==R?(c={queryKey:I,queryFn:h,initialPageParam:0,getNextPageParam:p,staleTime:0,refetchInterval:R},e[9]=I,e[10]=h,e[11]=p,e[12]=R,e[13]=c):c=e[13];const{data:S,fetchNextPage:v,hasNextPage:j,isFetchingNextPage:x}=gl(c);let N;e[14]!==S.pages?(N=S.pages.flatMap(Yl),e[14]=S.pages,e[15]=N):N=e[15];const _=N;let T;e[16]!==v||e[17]!==j||e[18]!==x?(T=()=>{j&&!x&&v()},e[16]=v,e[17]=j,e[18]=x,e[19]=T):T=e[19];const k=T,P=j??!1;let z;return e[20]!==w||e[21]!==g||e[22]!==l||e[23]!==m||e[24]!==k||e[25]!==x||e[26]!==a||e[27]!==_||e[28]!==y||e[29]!==o||e[30]!==P||e[31]!==b||e[32]!==r?(z=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(ls,{connectionIds:m,virtualMcpIds:r,tool:b,status:o,search:y,logs:_,hasMore:P,onLoadMore:k,isLoadingMore:x,connections:w,virtualMcps:g,membersData:a,client:l})})})}),e[20]=w,e[21]=g,e[22]=l,e[23]=m,e[24]=k,e[25]=x,e[26]=a,e[27]=_,e[28]=y,e[29]=o,e[30]=P,e[31]=b,e[32]=r,e[33]=z):z=e[33],z}function Yl(s){return s.logs??[]}function Zl(s){const e=Me.c(97),{filterAgentIds:l,filterUserIds:i,filterStatus:d,virtualMcpOptions:n,memberOptions:f,activeFiltersCount:u,onUpdateFilters:m}=s,[r,b]=ie.useState(!1),o=Ge();let y;e[0]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(ns,{size:16}),e[0]=y):y=e[0];let w;e[1]!==o?(w=o("orgs.threadsFiltersPopover.filters"),e[1]=o,e[2]=w):w=e[2];let g;e[3]!==w?(g=t.jsx("span",{className:"hidden sm:inline",children:w}),e[3]=w,e[4]=g):g=e[4];let a;e[5]!==u?(a=u>0&&t.jsxs(t.Fragment,{children:[t.jsx(kt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:u}),t.jsx(kt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:u})]}),e[5]=u,e[6]=a):a=e[6];let I;e[7]!==g||e[8]!==a?(I=t.jsx(zt,{asChild:!0,children:t.jsxs(xe,{variant:"outline",className:"relative",children:[y,g,a]})}),e[7]=g,e[8]=a,e[9]=I):I=e[9];let h;e[10]!==o?(h=o("orgs.threadsFiltersPopover.filterChats"),e[10]=o,e[11]=h):h=e[11];let p;e[12]!==h?(p=t.jsx("h4",{className:"font-medium text-sm",children:h}),e[12]=h,e[13]=p):p=e[13];let R;e[14]!==o?(R=o("orgs.threadsFiltersPopover.agent"),e[14]=o,e[15]=R):R=e[15];let c;e[16]!==R?(c=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:R}),e[16]=R,e[17]=c):c=e[17];let S;e[18]!==m?(S=Y=>m({filterAgentIds:Y.slice(0,1)}),e[18]=m,e[19]=S):S=e[19];let v;e[20]!==o?(v=o("orgs.threadsFiltersPopover.allAgents"),e[20]=o,e[21]=v):v=e[21];let j;e[22]!==l||e[23]!==S||e[24]!==v||e[25]!==n?(j=t.jsx(Rt,{options:n,defaultValue:l,onValueChange:S,placeholder:v,variant:"secondary",className:"w-full",maxCount:1}),e[22]=l,e[23]=S,e[24]=v,e[25]=n,e[26]=j):j=e[26];let x;e[27]!==j||e[28]!==c?(x=t.jsxs("div",{children:[c,j]}),e[27]=j,e[28]=c,e[29]=x):x=e[29];let N;e[30]!==o?(N=o("orgs.threadsFiltersPopover.user"),e[30]=o,e[31]=N):N=e[31];let _;e[32]!==N?(_=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:N}),e[32]=N,e[33]=_):_=e[33];let T;e[34]!==m?(T=Y=>m({filterUserIds:Y.slice(0,1)}),e[34]=m,e[35]=T):T=e[35];let k;e[36]!==o?(k=o("orgs.threadsFiltersPopover.allUsers"),e[36]=o,e[37]=k):k=e[37];let P;e[38]!==i||e[39]!==f||e[40]!==T||e[41]!==k?(P=t.jsx(Rt,{options:f,defaultValue:i,onValueChange:T,placeholder:k,variant:"secondary",className:"w-full",maxCount:1}),e[38]=i,e[39]=f,e[40]=T,e[41]=k,e[42]=P):P=e[42];let z;e[43]!==_||e[44]!==P?(z=t.jsxs("div",{children:[_,P]}),e[43]=_,e[44]=P,e[45]=z):z=e[45];let D;e[46]!==o?(D=o("orgs.threadsFiltersPopover.status"),e[46]=o,e[47]=D):D=e[47];let W;e[48]!==D?(W=t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:D}),e[48]=D,e[49]=W):W=e[49];let V;e[50]!==m?(V=Y=>m({filterStatus:Y}),e[50]=m,e[51]=V):V=e[51];let X;e[52]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(Pt,{className:"w-full",children:t.jsx(Ft,{})}),e[52]=X):X=e[52];let C;e[53]!==o?(C=o("orgs.threadsFiltersPopover.allStatuses"),e[53]=o,e[54]=C):C=e[54];let F;e[55]!==C?(F=t.jsx(He,{value:"all",children:C}),e[55]=C,e[56]=F):F=e[56];let L;e[57]!==o?(L=o("orgs.threadsFiltersPopover.completed"),e[57]=o,e[58]=L):L=e[58];let $;e[59]!==L?($=t.jsx(He,{value:"completed",children:L}),e[59]=L,e[60]=$):$=e[60];let q;e[61]!==o?(q=o("orgs.threadsFiltersPopover.active"),e[61]=o,e[62]=q):q=e[62];let B;e[63]!==q?(B=t.jsx(He,{value:"active",children:q}),e[63]=q,e[64]=B):B=e[64];let Q;e[65]!==o?(Q=o("orgs.threadsFiltersPopover.failed"),e[65]=o,e[66]=Q):Q=e[66];let U;e[67]!==Q?(U=t.jsx(He,{value:"failed",children:Q}),e[67]=Q,e[68]=U):U=e[68];let E;e[69]!==F||e[70]!==$||e[71]!==B||e[72]!==U?(E=t.jsxs(_t,{children:[F,$,B,U]}),e[69]=F,e[70]=$,e[71]=B,e[72]=U,e[73]=E):E=e[73];let K;e[74]!==d||e[75]!==V||e[76]!==E?(K=t.jsxs(Ot,{value:d,onValueChange:V,children:[X,E]}),e[74]=d,e[75]=V,e[76]=E,e[77]=K):K=e[77];let A;e[78]!==W||e[79]!==K?(A=t.jsxs("div",{children:[W,K]}),e[78]=W,e[79]=K,e[80]=A):A=e[80];let G;e[81]!==x||e[82]!==z||e[83]!==A?(G=t.jsxs("div",{className:"space-y-3",children:[x,z,A]}),e[81]=x,e[82]=z,e[83]=A,e[84]=G):G=e[84];let H;e[85]!==u||e[86]!==m||e[87]!==o?(H=u>0&&t.jsx(xe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{m({filterAgentIds:[],filterUserIds:[],filterStatus:"all"}),b(!1)},children:o("orgs.threadsFiltersPopover.clearAllFilters")}),e[85]=u,e[86]=m,e[87]=o,e[88]=H):H=e[88];let J;e[89]!==G||e[90]!==H||e[91]!==p?(J=t.jsx(Et,{align:"end",className:"w-[280px]",children:t.jsxs("div",{className:"space-y-4",children:[p,G,H]})}),e[89]=G,e[90]=H,e[91]=p,e[92]=J):J=e[92];let ee;return e[93]!==r||e[94]!==J||e[95]!==I?(ee=t.jsxs($t,{open:r,onOpenChange:b,children:[I,J]}),e[93]=r,e[94]=J,e[95]=I,e[96]=ee):ee=e[96],ee}function eo(s){const e=Me.c(16),{dateRange:l}=s,i=Ge(),{data:d,isLoading:n}=wl(void 0);let f;e[0]!==d?(f=d===void 0?[]:d,e[0]=d,e[1]=f):f=e[1];const u=f,[m,r]=ie.useState(null),b=m??u[0]?.id??null,{data:o}=Sl(b??"");let y;e[2]!==l.startDate?(y=l.startDate.toISOString(),e[2]=l.startDate,e[3]=y):y=e[3];let w;e[4]!==l.endDate?(w=l.endDate.toISOString(),e[4]=l.endDate,e[5]=w):w=e[5];let g;e[6]!==y||e[7]!==w?(g={startDate:y,endDate:w},e[6]=y,e[7]=w,e[8]=g):g=e[8];const a=g;let I;return e[9]!==o||e[10]!==u||e[11]!==b||e[12]!==n||e[13]!==a||e[14]!==i?(I=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:n?t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:i("orgs.automations.loading")}):u.length===0?t.jsx("div",{className:"py-16",children:t.jsx(is,{title:i("orgs.automations.emptyTitle"),description:i("orgs.automations.emptyDescription")})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Ot,{value:b??"",onValueChange:h=>r(h),children:[t.jsx(Pt,{className:"w-72",children:t.jsx(Ft,{placeholder:i("orgs.automations.selectPlaceholder")})}),t.jsx(_t,{children:u.map(so)})]})}),o?t.jsx(Qs,{automationId:o.id,triggerIds:o.triggers.map(to),range:a}):t.jsx("div",{className:"py-16 text-center text-sm text-muted-foreground",children:i("orgs.automations.loading")})]})})}),e[9]=o,e[10]=u,e[11]=b,e[12]=n,e[13]=a,e[14]=i,e[15]=I):I=e[15],I}function to(s){return s.id}function so(s){return t.jsx(He,{value:s.id,children:s.name},s.id)}const lo=[{value:"eq",labelKey:"orgs.monitoring.operatorEquals"},{value:"contains",labelKey:"orgs.monitoring.operatorContains"},{value:"in",labelKey:"orgs.monitoring.operatorIn"},{value:"exists",labelKey:"orgs.monitoring.operatorExists"}];function oo({connectionIds:s,virtualMcpIds:e,tool:l,status:i,hideSystem:d,propertyFilters:n,connectionOptions:f,virtualMcpOptions:u,activeFiltersCount:m,onUpdateFilters:r,onConnectionSearchChange:b,memberOptions:o,llmUserIds:y=[],onLlmUserIdsChange:w,showMemberFilter:g}){const a=Ge(),[I,h]=ie.useState(!1),[p,R]=ie.useState("form"),[c,S]=ie.useState(l),[v,j]=ie.useState(n),[x,N]=ie.useState(Kt(n)),_=ie.useRef(l),T=ie.useRef(st(n));_.current!==l&&(_.current=l,c!==l&&S(l));const k=st(n);T.current!==k&&(T.current=k,j(n),N(Kt(n)));const P=(C,F)=>{const L=[...v],$=L[C];$&&(L[C]={key:F.key??$.key,operator:F.operator??$.operator,value:F.value??$.value},j(L))},z=()=>{j([...v,{key:"",operator:"eq",value:""}])},D=C=>{const F=v.filter((L,$)=>$!==C);j(F),N(Kt(F)),r({propertyFilters:st(F)})},W=()=>{r({propertyFilters:st(v)})},V=()=>{const C=gs(x);j(C),r({propertyFilters:st(C)})},X=()=>{if(p==="raw"){const C=gs(x);j(C),R("form")}else N(Kt(v)),R("raw")};return t.jsxs($t,{open:I,onOpenChange:h,children:[t.jsx(zt,{asChild:!0,children:t.jsxs(xe,{variant:"outline",className:"relative",children:[t.jsx(ns,{size:16}),t.jsx("span",{className:"hidden sm:inline",children:a("orgs.monitoring.filters")}),m>0&&t.jsxs(t.Fragment,{children:[t.jsx(kt,{variant:"default",className:"sm:hidden absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:m}),t.jsx(kt,{variant:"default",className:"hidden sm:flex ml-1 h-5 w-5 rounded-full p-0 items-center justify-center text-xs",children:m})]})]})}),t.jsx(Et,{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:a("orgs.monitoring.filterLogs")})}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx(ul,{htmlFor:"hide-system-calls",className:"text-xs font-medium text-muted-foreground cursor-pointer",children:a("orgs.monitoring.hideSystemCalls")}),t.jsx(ml,{id:"hide-system-calls",checked:d,onCheckedChange:C=>r({hideSystem:!!C})})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.connections")}),t.jsx(Rt,{options:f,defaultValue:s,onValueChange:C=>r({connectionId:C}),onSearchChange:b,placeholder:a("orgs.monitoring.allServers"),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:a("orgs.monitoring.agents")}),t.jsx(Rt,{options:u,defaultValue:e,onValueChange:C=>r({virtualMcpId:C}),placeholder:a("orgs.monitoring.allAgents"),variant:"secondary",className:"w-full",maxCount:2})]}),g&&t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.members")}),t.jsx(Rt,{options:o??[],defaultValue:y,onValueChange:C=>w?.(C),placeholder:a("orgs.monitoring.allMembers"),variant:"secondary",className:"w-full",maxCount:2}),t.jsx("p",{className:"text-[11px] text-muted-foreground mt-1",children:a("orgs.monitoring.filtersAiUsageOnly")})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.toolName")}),t.jsx(Dt,{id:"filter-tool",placeholder:a("orgs.monitoring.filterByToolPlaceholder"),value:c,onChange:C=>S(C.target.value),onBlur:()=>{c!==l&&r({tool:c})},onKeyDown:C=>{C.key==="Enter"&&c!==l&&r({tool:c})},className:"w-full"})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground mb-1.5 block",children:a("orgs.monitoring.status")}),t.jsxs(Ot,{value:i,onValueChange:C=>r({status:C}),children:[t.jsx(Pt,{className:"w-full",children:t.jsx(Ft,{})}),t.jsxs(_t,{children:[t.jsx(He,{value:"all",children:a("orgs.monitoring.allStatus")}),t.jsx(He,{value:"success",children:a("orgs.monitoring.successOnly")}),t.jsx(He,{value:"errors",children:a("orgs.monitoring.errorsOnly")})]})]})]}),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:a("orgs.monitoring.propertyFilters")}),t.jsxs(Bt,{children:[t.jsx(Ht,{asChild:!0,children:t.jsx(xe,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:X,children:p==="raw"?t.jsx(il,{size:14}):t.jsx(el,{size:14})})}),t.jsx(Jt,{children:a(p==="raw"?"orgs.monitoring.switchToFormView":"orgs.monitoring.switchToRawText")})]})]}),p==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(dl,{placeholder:a("orgs.monitoring.pastePropertyFiltersPlaceholder"),value:x,onChange:C=>N(C.target.value),onBlur:V,onKeyDown:C=>{C.key==="Enter"&&C.metaKey&&V()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("orgs.monitoring.onePerLine")," ",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:[v.map((C,F)=>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.jsx("span",{className:"text-xs text-muted-foreground",children:a("orgs.monitoring.filter",{number:(F+1).toString()})}),t.jsx(xe,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>D(F),children:t.jsx(al,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(Dt,{placeholder:a("orgs.monitoring.keyPlaceholder"),value:C.key,onChange:L=>P(F,{key:L.target.value}),onBlur:W,onKeyDown:L=>{L.key==="Enter"&&W()},className:"flex-1 font-mono text-sm"}),t.jsxs(Ot,{value:C.operator,onValueChange:L=>{const $=[...v],q=$[F];q&&($[F]={...q,operator:L,value:L==="exists"?"":q.value},j($),r({propertyFilters:st($)}))},children:[t.jsx(Pt,{className:"w-28",children:t.jsx(Ft,{})}),t.jsx(_t,{children:lo.map(L=>t.jsx(He,{value:L.value,children:a(L.labelKey)},L.value))})]})]}),C.operator!=="exists"&&t.jsx(Dt,{placeholder:a("orgs.monitoring.valuePlaceholder"),value:C.value,onChange:L=>P(F,{value:L.target.value}),onBlur:W,onKeyDown:L=>{L.key==="Enter"&&W()},className:"w-full font-mono text-sm"})]},F)),t.jsxs(xe,{variant:"outline",size:"sm",className:"w-full",onClick:z,children:[t.jsx(nl,{size:14,className:"mr-1.5"}),a("orgs.monitoring.addFilter")]})]})]})]}),m>0&&t.jsx(xe,{variant:"ghost",size:"sm",className:"w-full",onClick:()=>{S(""),j([]),N(""),r({connectionId:[],virtualMcpId:[],tool:"",status:"all",propertyFilters:""}),h(!1)},children:a("orgs.monitoring.clearAllFilters")})]})})]})}function ro(s){const e=Me.c(208),{tab:l,dateRange:i,displayDateRange:d,connectionIds:n,virtualMcpIds:f,tool:u,status:m,search:r,streaming:b,hideSystem:o,activeFiltersCount:y,from:w,to:g,propertyFilters:a,onUpdateFilters:I,onTimeRangeChange:h,onStreamingToggle:p,onTabChange:R}=s,c=Ge(),S=ts(),v=rl(),{data:j}=tl(),[x,N]=ie.useState(""),_=x||void 0;let T;e[0]!==_?(T={searchTerm:_},e[0]=_,e[1]=T):T=e[1];const k=ts(T);let P;e[2]!==k?(P=k??[],e[2]=k,e[3]=P):P=e[3];let z;e[4]!==P?(z=P.map(ao),e[4]=P,e[5]=z):z=e[5];const D=z;let W;e[6]!==v?(W=v.map(no),e[6]=v,e[7]=W):W=e[7];const V=W,{pageSize:X,streamingRefetchInterval:C}=ss,{org:F,locator:L}=Tt();let $;e[8]!==F.id||e[9]!==F.slug?($={connectionId:sl,orgId:F.id,orgSlug:F.slug},e[8]=F.id,e[9]=F.slug,e[10]=$):$=e[10];const q=ll($);let B;e[11]!==a?(B=Tl(a),e[11]=a,e[12]=B):B=e[12];const Q=B;let U;e[13]!==o||e[14]!==F.id?(U=o?[ol.SELF(F.id)]:void 0,e[13]=o,e[14]=F.id,e[15]=U):U=e[15];const E=U;let K;e[16]===Symbol.for("react.memo_cache_sentinel")?(K=[],e[16]=K):K=e[16];const[A,G]=ie.useState(K);let H;e[17]===Symbol.for("react.memo_cache_sentinel")?(H=[],e[17]=H):H=e[17];const[J,ee]=ie.useState(H);let Y;e[18]===Symbol.for("react.memo_cache_sentinel")?(Y=[],e[18]=Y):Y=e[18];const[ce,ve]=ie.useState(Y),[Z,me]=ie.useState("all"),ae=(J.length>0?1:0)+(ce.length>0?1:0)+(Z!=="all"?1:0);let ne;e[19]!==j?(ne=ws(j).map(io),e[19]=j,e[20]=ne):ne=e[20];const te=ne;let se;e[21]!==i.startDate?(se=i.startDate.toISOString(),e[21]=i.startDate,e[22]=se):se=e[22];let le;e[23]!==i.endDate?(le=i.endDate.toISOString(),e[23]=i.endDate,e[24]=le):le=e[24];const M=n.length===1?n[0]:void 0,O=f.length===1?f[0]:void 0,oe=u||void 0,re=m==="errors"?!0:m==="success"?!1:void 0;let ue;e[25]!==E||e[26]!==Q||e[27]!==se||e[28]!==le||e[29]!==M||e[30]!==O||e[31]!==oe||e[32]!==re?(ue={startDate:se,endDate:le,connectionId:M,excludeConnectionIds:E,virtualMcpId:O,toolName:oe,isError:re,...Q},e[25]=E,e[26]=Q,e[27]=se,e[28]=le,e[29]=M,e[30]=O,e[31]=oe,e[32]=re,e[33]=ue):ue=e[33];const he=ue;let de;e[34]!==c?(de=c("orgs.monitoring.overview"),e[34]=c,e[35]=de):de=e[35];let Te;e[36]!==de?(Te={id:"overview",label:de},e[36]=de,e[37]=Te):Te=e[37];let je;e[38]!==c?(je=c("orgs.monitoring.audit"),e[38]=c,e[39]=je):je=e[39];let Re;e[40]!==je?(Re={id:"audit",label:je},e[40]=je,e[41]=Re):Re=e[41];let Ne;e[42]!==c?(Ne=c("orgs.monitoring.chats"),e[42]=c,e[43]=Ne):Ne=e[43];let Pe;e[44]!==Ne?(Pe={id:"threads",label:Ne},e[44]=Ne,e[45]=Pe):Pe=e[45];let Fe;e[46]!==c?(Fe=c("orgs.monitoring.automations"),e[46]=c,e[47]=Fe):Fe=e[47];let be;e[48]!==Fe?(be={id:"automations",label:Fe},e[48]=Fe,e[49]=be):be=e[49];let Le;e[50]!==Te||e[51]!==Re||e[52]!==Pe||e[53]!==be?(Le=[Te,Re,Pe,be],e[50]=Te,e[51]=Re,e[52]=Pe,e[53]=be,e[54]=Le):Le=e[54];const _e=Le;let ye;e[55]!==c?(ye=c("orgs.monitoring.title"),e[55]=c,e[56]=ye):ye=e[56];let Oe;e[57]!==ye?(Oe=t.jsx(et.Title,{children:ye}),e[57]=ye,e[58]=Oe):Oe=e[58];let we;e[59]!==R?(we=Xe=>R(Xe),e[59]=R,e[60]=we):we=e[60];let Se;e[61]!==we||e[62]!==l||e[63]!==_e?(Se=t.jsx(ks,{tabs:_e,activeTab:l,onTabChange:we}),e[61]=we,e[62]=l,e[63]=_e,e[64]=Se):Se=e[64];let Ie;e[65]!==y||e[66]!==n||e[67]!==D||e[68]!==x||e[69]!==o||e[70]!==b||e[71]!==A||e[72]!==te||e[73]!==p||e[74]!==I||e[75]!==a||e[76]!==m||e[77]!==c||e[78]!==l||e[79]!==u||e[80]!==f||e[81]!==V?(Ie=(l==="overview"||l==="audit")&&t.jsxs(t.Fragment,{children:[t.jsxs(xe,{variant:b?"secondary":"outline",className:"gap-1.5",onClick:p,children:[b&&t.jsx("span",{className:"size-2 rounded-full bg-success animate-pulse"}),t.jsx("span",{children:c("orgs.monitoring.live")}),b&&t.jsx("span",{className:"text-muted-foreground text-xs",children:"3s"})]}),t.jsx(oo,{connectionIds:n,virtualMcpIds:f,tool:u,status:m,hideSystem:o,propertyFilters:a,connectionOptions:D,virtualMcpOptions:V,activeFiltersCount:y,onUpdateFilters:I,connectionSearchTerm:x,onConnectionSearchChange:N,memberOptions:te,llmUserIds:A,onLlmUserIdsChange:G,showMemberFilter:l==="overview"})]}),e[65]=y,e[66]=n,e[67]=D,e[68]=x,e[69]=o,e[70]=b,e[71]=A,e[72]=te,e[73]=p,e[74]=I,e[75]=a,e[76]=m,e[77]=c,e[78]=l,e[79]=u,e[80]=f,e[81]=V,e[82]=Ie):Ie=e[82];let $e;e[83]!==te||e[84]!==l||e[85]!==ae||e[86]!==J||e[87]!==Z||e[88]!==ce||e[89]!==V?($e=l==="threads"&&t.jsx(Zl,{filterAgentIds:J,filterUserIds:ce,filterStatus:Z,virtualMcpOptions:V,memberOptions:te,activeFiltersCount:ae,onUpdateFilters:Xe=>{const{filterAgentIds:as,filterUserIds:cs,filterStatus:ds}=Xe;as!==void 0&&ee(as),cs!==void 0&&ve(cs),ds!==void 0&&me(ds)}}),e[83]=te,e[84]=l,e[85]=ae,e[86]=J,e[87]=Z,e[88]=ce,e[89]=V,e[90]=$e):$e=e[90];let ke;e[91]!==w||e[92]!==g?(ke={from:w,to:g},e[91]=w,e[92]=g,e[93]=ke):ke=e[93];let ze;e[94]!==c?(ze=c("monitoring.timeRangePicker.absoluteTimeRange"),e[94]=c,e[95]=ze):ze=e[95];let De;e[96]!==c?(De=c("monitoring.timeRangePicker.from"),e[96]=c,e[97]=De):De=e[97];let fe;e[98]!==c?(fe=c("monitoring.timeRangePicker.to"),e[98]=c,e[99]=fe):fe=e[99];let pe;e[100]!==c?(pe=c("monitoring.timeRangePicker.applyTimeRange"),e[100]=c,e[101]=pe):pe=e[101];let ge;e[102]!==ze||e[103]!==De||e[104]!==fe||e[105]!==pe?(ge={absoluteTimeRange:ze,from:De,to:fe,applyTimeRange:pe},e[102]=ze,e[103]=De,e[104]=fe,e[105]=pe,e[106]=ge):ge=e[106];let Ce;e[107]!==c?(Ce=c("monitoring.timeRangePicker.last5Minutes"),e[107]=c,e[108]=Ce):Ce=e[108];let Ke;e[109]!==Ce?(Ke={label:Ce,from:"now-5m",to:"now",value:"5m"},e[109]=Ce,e[110]=Ke):Ke=e[110];let Ae;e[111]!==c?(Ae=c("monitoring.timeRangePicker.last15Minutes"),e[111]=c,e[112]=Ae):Ae=e[112];let Ve;e[113]!==Ae?(Ve={label:Ae,from:"now-15m",to:"now",value:"15m"},e[113]=Ae,e[114]=Ve):Ve=e[114];let Ue;e[115]!==c?(Ue=c("monitoring.timeRangePicker.last30Minutes"),e[115]=c,e[116]=Ue):Ue=e[116];let Be;e[117]!==Ue?(Be={label:Ue,from:"now-30m",to:"now",value:"30m"},e[117]=Ue,e[118]=Be):Be=e[118];let We;e[119]!==c?(We=c("monitoring.timeRangePicker.last1Hour"),e[119]=c,e[120]=We):We=e[120];let lt;e[121]!==We?(lt={label:We,from:"now-1h",to:"now",value:"1h"},e[121]=We,e[122]=lt):lt=e[122];let ot;e[123]!==c?(ot=c("monitoring.timeRangePicker.last3Hours"),e[123]=c,e[124]=ot):ot=e[124];let rt;e[125]!==ot?(rt={label:ot,from:"now-3h",to:"now",value:"3h"},e[125]=ot,e[126]=rt):rt=e[126];let it;e[127]!==c?(it=c("monitoring.timeRangePicker.last6Hours"),e[127]=c,e[128]=it):it=e[128];let nt;e[129]!==it?(nt={label:it,from:"now-6h",to:"now",value:"6h"},e[129]=it,e[130]=nt):nt=e[130];let at;e[131]!==c?(at=c("monitoring.timeRangePicker.last12Hours"),e[131]=c,e[132]=at):at=e[132];let ct;e[133]!==at?(ct={label:at,from:"now-12h",to:"now",value:"12h"},e[133]=at,e[134]=ct):ct=e[134];let dt;e[135]!==c?(dt=c("monitoring.timeRangePicker.last24Hours"),e[135]=c,e[136]=dt):dt=e[136];let mt;e[137]!==dt?(mt={label:dt,from:"now-24h",to:"now",value:"24h"},e[137]=dt,e[138]=mt):mt=e[138];let ut;e[139]!==c?(ut=c("monitoring.timeRangePicker.last2Days"),e[139]=c,e[140]=ut):ut=e[140];let ft;e[141]!==ut?(ft={label:ut,from:"now-2d",to:"now",value:"2d"},e[141]=ut,e[142]=ft):ft=e[142];let xt;e[143]!==c?(xt=c("monitoring.timeRangePicker.last7Days"),e[143]=c,e[144]=xt):xt=e[144];let pt;e[145]!==xt?(pt={label:xt,from:"now-7d",to:"now",value:"7d"},e[145]=xt,e[146]=pt):pt=e[146];let gt;e[147]!==c?(gt=c("monitoring.timeRangePicker.last30Days"),e[147]=c,e[148]=gt):gt=e[148];let ht;e[149]!==gt?(ht={label:gt,from:"now-30d",to:"now",value:"30d"},e[149]=gt,e[150]=ht):ht=e[150];let vt;e[151]!==Ke||e[152]!==Ve||e[153]!==Be||e[154]!==lt||e[155]!==rt||e[156]!==nt||e[157]!==ct||e[158]!==mt||e[159]!==ft||e[160]!==pt||e[161]!==ht?(vt=[Ke,Ve,Be,lt,rt,nt,ct,mt,ft,pt,ht],e[151]=Ke,e[152]=Ve,e[153]=Be,e[154]=lt,e[155]=rt,e[156]=nt,e[157]=ct,e[158]=mt,e[159]=ft,e[160]=pt,e[161]=ht,e[162]=vt):vt=e[162];let jt;e[163]!==h||e[164]!==ke||e[165]!==ge||e[166]!==vt?(jt=t.jsx(_l,{value:ke,onChange:h,labels:ge,quickRanges:vt}),e[163]=h,e[164]=ke,e[165]=ge,e[166]=vt,e[167]=jt):jt=e[167];let Nt;e[168]!==Ie||e[169]!==$e||e[170]!==jt?(Nt=t.jsxs("div",{className:"flex items-center gap-2",children:[Ie,$e,jt]}),e[168]=Ie,e[169]=$e,e[170]=jt,e[171]=Nt):Nt=e[171];let bt;e[172]!==Se||e[173]!==Nt?(bt=t.jsxs("div",{className:"flex items-center justify-between gap-4",children:[Se,Nt]}),e[172]=Se,e[173]=Nt,e[174]=bt):bt=e[174];let yt;e[175]!==I||e[176]!==r||e[177]!==c||e[178]!==l?(yt=(l==="audit"||l==="threads")&&t.jsx(Us,{value:r,onChange:Xe=>I({search:Xe}),placeholder:c(l==="threads"?"orgs.monitoring.searchByTitlePlaceholder":"orgs.monitoring.searchByToolPlaceholder"),onKeyDown:Xe=>{Xe.key==="Escape"&&(I({search:""}),Xe.target.blur())},className:"w-full md:w-[375px]"}),e[175]=I,e[176]=r,e[177]=c,e[178]=l,e[179]=yt):yt=e[179];let wt;e[180]!==Oe||e[181]!==bt||e[182]!==yt?(wt=t.jsx(et.Body,{className:"!pb-4",children:t.jsxs("div",{className:"flex flex-col gap-5",children:[Oe,bt,yt]})}),e[180]=Oe,e[181]=bt,e[182]=yt,e[183]=wt):wt=e[183];let St;e[184]!==S||e[185]!==v||e[186]!==he||e[187]!==q||e[188]!==n||e[189]!==i||e[190]!==d||e[191]!==E||e[192]!==b||e[193]!==A||e[194]!==L||e[195]!==j||e[196]!==r||e[197]!==m||e[198]!==l||e[199]!==J||e[200]!==Z||e[201]!==ce||e[202]!==u||e[203]!==f?(St=l==="automations"?t.jsx(eo,{dateRange:i}):l==="threads"?t.jsx(Gs,{client:q,locator:L,membersData:j,allConnections:S,allVirtualMcps:v,dateRange:i,searchQuery:r,filterAgentIds:J,filterUserIds:ce,filterStatus:Z}):l==="audit"?t.jsx(Xl,{client:q,locator:L,baseParams:he,pageSize:X,isStreaming:b,streamingRefetchInterval:C,connectionIds:n,virtualMcpIds:f,tool:u,status:m,searchQuery:r,allConnections:S,allVirtualMcps:v,membersData:j}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto min-w-0",children:t.jsx(Al,{displayDateRange:d,connectionIds:n,excludeConnectionIds:E,toolName:u||void 0,status:m==="errors"?"error":m==="success"?"success":void 0,connections:S,isStreaming:b,streamingRefetchInterval:C,llmUserIds:A})}),e[184]=S,e[185]=v,e[186]=he,e[187]=q,e[188]=n,e[189]=i,e[190]=d,e[191]=E,e[192]=b,e[193]=A,e[194]=L,e[195]=j,e[196]=r,e[197]=m,e[198]=l,e[199]=J,e[200]=Z,e[201]=ce,e[202]=u,e[203]=f,e[204]=St):St=e[204];let Vt;return e[205]!==wt||e[206]!==St?(Vt=t.jsxs(t.Fragment,{children:[wt,St]}),e[205]=wt,e[206]=St,e[207]=Vt):Vt=e[207],Vt}function io(s){const e=s.user.name??s.user.email??s.userId,l=s.user.image??void 0;return{value:s.userId,label:e,icon:i=>{const{className:d}=i;return t.jsx(Cs,{url:l,fallback:e,shape:"circle",size:"2xs",className:qe("shrink-0",d)})}}}function no(s){const e=s.icon,l=s.title??"Super Agent";return{value:s.id??"",label:l,icon:i=>{const{className:d}=i;return t.jsx(Ct,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(At,{}),className:qe("size-4! min-w-4! rounded-sm shrink-0",d)})}}}function ao(s){const e=s.icon,l=s.title||s.id;return{value:s.id,label:l,icon:i=>{const{className:d}=i;return t.jsx(Ct,{icon:e,name:l,size:"xs",fallbackIcon:t.jsx(At,{}),className:qe("size-4! min-w-4! rounded-sm shrink-0",d)})}}}function bi(){const s=Me.c(125),e=Ge(),{org:l}=Tt(),i=os();let d;s[0]===Symbol.for("react.memo_cache_sentinel")?(d={from:"/shell/$org/settings/monitor"},s[0]=d):d=s[0];const n=As(d),{tab:f,from:u,to:m,connectionId:r,virtualMcpId:b,tool:o,search:y,status:w,streaming:g,propertyFilters:a,hideSystem:I}=n,h=f===void 0?"overview":f;let p;s[1]!==r?(p=r===void 0?[]:r,s[1]=r,s[2]=p):p=s[2];const R=p;let c;s[3]!==b?(c=b===void 0?[]:b,s[3]=b,s[4]=c):c=s[4];const S=c,v=g===void 0?!0:g,j=a===void 0?"":a,x=I===void 0?!1:I;let N,_,T,k,P,z,D;if(s[5]!==R.length||s[6]!==u||s[7]!==x||s[8]!==i||s[9]!==l.slug||s[10]!==j||s[11]!==n||s[12]!==w||s[13]!==v||s[14]!==m||s[15]!==o||s[16]!==S.length){P=Cl(j);let O;s[24]!==i||s[25]!==l.slug||s[26]!==n?(O=de=>{i({to:"/$org/settings/monitor",params:{org:l.slug},search:{...n,...de}})},s[24]=i,s[25]=l.slug,s[26]=n,s[27]=O):O=s[27],D=O;let oe;s[28]!==D?(oe=de=>{D({from:de.from,to:de.to})},s[28]=D,s[29]=oe):oe=s[29],k=oe;let re,ue;if(s[30]!==u||s[31]!==v||s[32]!==m){const de=Je(u),Te=Je(m);ue=de.date||new Date(Date.now()-18e5);const je=Te.date||new Date;T={startDate:ue,endDate:je},re=je,v&&m==="now"&&(re=new Date(je),re.setHours(re.getHours()+1)),s[30]=u,s[31]=v,s[32]=m,s[33]=T,s[34]=re,s[35]=ue}else T=s[33],re=s[34],ue=s[35];let he;s[36]!==re||s[37]!==ue?(he={startDate:ue,endDate:re},s[36]=re,s[37]=ue,s[38]=he):he=s[38],_=he,N=0,R.length>0&&N++,S.length>0&&N++,o&&N++,w!=="all"&&N++,x&&N++,z=P.filter(co),s[5]=R.length,s[6]=u,s[7]=x,s[8]=i,s[9]=l.slug,s[10]=j,s[11]=n,s[12]=w,s[13]=v,s[14]=m,s[15]=o,s[16]=S.length,s[17]=N,s[18]=_,s[19]=T,s[20]=k,s[21]=P,s[22]=z,s[23]=D}else N=s[17],_=s[18],T=s[19],k=s[20],P=s[21],z=s[22],D=s[23];const W=z;W.length>0&&(N=N+W.length);let V;s[39]!==e?(V=e("orgs.monitoring.title"),s[39]=e,s[40]=V):V=s[40];let X;s[41]!==V?(X=t.jsx(et.Body,{className:"!pb-3",children:t.jsx(et.Title,{children:V})}),s[41]=V,s[42]=X):X=s[42];let C;s[43]!==e?(C=e("orgs.monitoring.failedLoadTitle"),s[43]=e,s[44]=C):C=s[44];let F;s[45]!==e?(F=e("orgs.monitoring.failedLoadDescription"),s[45]=e,s[46]=F):F=s[46];let L;s[47]!==C||s[48]!==F?(L=t.jsx(et.Content,{children:t.jsx("div",{className:"flex-1 flex items-center justify-center h-full",children:t.jsx(is,{title:C,description:F})})}),s[47]=C,s[48]=F,s[49]=L):L=s[49];let $;s[50]!==X||s[51]!==L?($=t.jsxs(t.Fragment,{children:[X,L]}),s[50]=X,s[51]=L,s[52]=$):$=s[52];let q;s[53]!==e?(q=e("orgs.monitoring.title"),s[53]=e,s[54]=q):q=s[54];let B;s[55]!==q?(B=t.jsx(et.Title,{children:q}),s[55]=q,s[56]=B):B=s[56];let Q;s[57]!==e?(Q=e("orgs.monitoring.overview"),s[57]=e,s[58]=Q):Q=s[58];let U;s[59]!==Q?(U={id:"overview",label:Q},s[59]=Q,s[60]=U):U=s[60];let E;s[61]!==e?(E=e("orgs.monitoring.audit"),s[61]=e,s[62]=E):E=s[62];let K;s[63]!==E?(K={id:"audit",label:E},s[63]=E,s[64]=K):K=s[64];let A;s[65]!==e?(A=e("orgs.monitoring.chats"),s[65]=e,s[66]=A):A=s[66];let G;s[67]!==A?(G={id:"threads",label:A},s[67]=A,s[68]=G):G=s[68];let H;s[69]!==e?(H=e("orgs.monitoring.automations"),s[69]=e,s[70]=H):H=s[70];let J;s[71]!==H?(J={id:"automations",label:H},s[71]=H,s[72]=J):J=s[72];let ee;s[73]!==U||s[74]!==K||s[75]!==G||s[76]!==J?(ee=[U,K,G,J],s[73]=U,s[74]=K,s[75]=G,s[76]=J,s[77]=ee):ee=s[77];let Y;s[78]!==D?(Y=O=>D({tab:O}),s[78]=D,s[79]=Y):Y=s[79];let ce;s[80]!==ee||s[81]!==Y||s[82]!==h?(ce=t.jsx(ks,{tabs:ee,activeTab:h,onTabChange:Y}),s[80]=ee,s[81]=Y,s[82]=h,s[83]=ce):ce=s[83];let ve;s[84]!==B||s[85]!==ce?(ve=t.jsx(et.Body,{className:"!pb-3",children:t.jsxs("div",{className:"flex flex-col gap-4",children:[B,ce]})}),s[84]=B,s[85]=ce,s[86]=ve):ve=s[86];let Z;s[87]!==h?(Z=h==="threads"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(ls.Skeleton,{})}):h==="audit"?t.jsx("div",{className:"flex-1 flex flex-col overflow-auto md:overflow-hidden",children:t.jsx(ls.Skeleton,{})}):t.jsx("div",{className:"flex-1 flex flex-col overflow-auto",children:t.jsx(Ul,{})}),s[87]=h,s[88]=Z):Z=s[88];let me;s[89]!==ve||s[90]!==Z?(me=t.jsxs(t.Fragment,{children:[ve,Z]}),s[89]=ve,s[90]=Z,s[91]=me):me=s[91];let ae;s[92]!==k?(ae=O=>{Wt("monitoring_time_range_changed",{from:O.from,to:O.to}),k(O)},s[92]=k,s[93]=ae):ae=s[93];let ne;s[94]!==v||s[95]!==D?(ne=()=>{Wt("monitoring_live_toggled",{enabled:!v}),D({streaming:!v})},s[94]=v,s[95]=D,s[96]=ne):ne=s[96];let te;s[97]!==h||s[98]!==D?(te=O=>{O!==h&&Wt("monitoring_tab_changed",{from_tab:h,to_tab:O}),D({tab:O})},s[97]=h,s[98]=D,s[99]=te):te=s[99];let se;s[100]!==N||s[101]!==R||s[102]!==_||s[103]!==T||s[104]!==u||s[105]!==x||s[106]!==P||s[107]!==y||s[108]!==w||s[109]!==v||s[110]!==ae||s[111]!==ne||s[112]!==te||s[113]!==h||s[114]!==m||s[115]!==o||s[116]!==D||s[117]!==S?(se=t.jsx(ro,{tab:h,dateRange:_,displayDateRange:T,connectionIds:R,virtualMcpIds:S,tool:o,status:w,search:y,streaming:v,hideSystem:x,activeFiltersCount:N,from:u,to:m,propertyFilters:P,onUpdateFilters:D,onTimeRangeChange:ae,onStreamingToggle:ne,onTabChange:te}),s[100]=N,s[101]=R,s[102]=_,s[103]=T,s[104]=u,s[105]=x,s[106]=P,s[107]=y,s[108]=w,s[109]=v,s[110]=ae,s[111]=ne,s[112]=te,s[113]=h,s[114]=m,s[115]=o,s[116]=D,s[117]=S,s[118]=se):se=s[118];let le;s[119]!==me||s[120]!==se?(le=t.jsx(ie.Suspense,{fallback:me,children:se}),s[119]=me,s[120]=se,s[121]=le):le=s[121];let M;return s[122]!==$||s[123]!==le?(M=t.jsx(Ks,{capability:"monitoring:view",area:"monitoring",children:t.jsx(et,{children:t.jsx(Vs,{fallback:$,children:le})})}),s[122]=$,s[123]=le,s[124]=M):M=s[124],M}function co(s){return s.key.trim()}export{bi as default};
@@ -1 +0,0 @@
1
- import{c as L,b as R,j as r}from"./index-BQFOspRh.js";import{I as A}from"./input-DLmq-Bri.js";import{L as I}from"./label-B1DonsU-.js";import{S as z,a as J,b as O,c as V,d as $}from"./select-BoHatn08.js";import{T as D}from"./textarea-DLfz9L-W.js";import{R as M,T as U,U as W,J as q,W as G,$ as H}from"./index-BfE9EYhg.js";import{s as F}from"./primitives-S2CqucHt.js";import{u as Q}from"./use-autosave-BkJZ15dZ.js";import"./tooltip-CpPLj5ml.js";import"./Check-Dc66au0h.js";import"./ChevronDown-LNz16DWG.js";import"./ChevronUp-DZ-mKv_H.js";import"./ArrowUp-CK7po7JD.js";import"./chat-context-B91LcyJ6.js";import"./tab-id-BdQ_M6R3.js";import"./dialog-Cg0277WK.js";import"./X-DmV-M3--.js";import"./Copy01-DPPY_ooc.js";import"./hooks-DE78iZyB.js";import"./use-mcp-client-B9fn1TBn.js";import"./auth-B56MWIKT.js";import"./decopilot-sse-pool-DjQPpjDZ.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-C7NRfPhc.js";import"./use-ai-providers-DFLh4od7.js";import"./studio-tools-BETupmQh.js";import"./use-decopilot-events-CfIikgvk.js";import"./use-organization-settings-BN4kKknX.js";import"./automation-runs-DkpIo76-.js";import"./agent-icon-DrJqDdNd.js";import"./AlertCircle-BWppLd8c.js";import"./Tool01-BsXkza2k.js";import"./ArrowLeft-cFWJcCye.js";import"./Tool02-Bk0Wi_jc.js";import"./XCircle-Cj1jhbDm.js";import"./ArrowUpRight-7JgIYGFf.js";import"./TrendUp01-BQPOQTfU.js";import"./ZapSquare-BesqE3Kv.js";import"./Users03-CmtC3U6j.js";import"./CheckCircle-UOyFv4rE.js";import"./ChevronRight-DjBVHQoY.js";import"./DotsVertical-CILzGe_q.js";import"./Stars02-D6uxt7rn.js";import"./CpuChip01-DyWba75a.js";import"./CreditCard01-e79FUmFN.js";import"./Globe01-W4lyjKuH.js";import"./Settings02-D_by58BO.js";import"./Eye-BT74JrOy.js";import"./FilterLines-DcRWfBwT.js";import"./Share07-DFtUk4DH.js";import"./Star01-YV_bqOAU.js";import"./Globe04-_uS8YiyQ.js";import"./SwitchHorizontal01-BJcUWOrf.js";import"./HardDrive-D7RLSuvq.js";import"./Key01-Bk2QhvNY.js";import"./LayoutLeft-P7wDvRlA.js";import"./LinkExternal01-CP1N0ekO.js";import"./LogOut01-BNm98lqM.js";import"./Monitor01-D9pvMYQd.js";import"./Sun-CvD6V1mt.js";import"./Palette-DJfFKmjP.js";import"./Play-DrC9uZbx.js";import"./Plus-9KDBMlCX.js";import"./SearchLg-BSg_Ve-L.js";import"./SearchMd-CDwUuDyr.js";import"./Shield01-2VpHyEx6.js";import"./Stars01-CyMHMvzU.js";import"./Trash01-Dk2U_er_.js";import"./Upload01-De1aQPW9.js";import"./User01-DZLXXgFt.js";import"./Users01-D-f87RLp.js";import"./XClose-8V-NoWeD.js";import"./Zap-BxOODR1h.js";import"./useInfiniteQuery-C-kiHDyf.js";import"./use-infinite-scroll-Bct8OYtv.js";import"./use-connection-B7w0W3ts.js";import"./card-B-Mzv0lS.js";import"./sidebar-nvbJrgVY.js";import"./use-mobile-CnfmCPF3.js";import"./table-DHyF1BO5.js";import"./empty-state-BvR4kC3B.js";import"./use-members-HbYBEeJu.js";import"./use-org-auth-client-DDDMIikQ.js";import"./use-clock-tick--4azGxeb.js";import"./use-automations-xk7Cu5D8.js";import"./useSuspenseInfiniteQuery-9epNuRWF.js";import"./avatar-BN3TMI7O.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-C6oZHBaC.js";import"./monaco-editor-CrpwfOtU.js";import"./spinner-BoBi9JH7.js";import"./index-X6wqL5Rn.js";import"./shell-layout-Cd3V9av7.js";import"./required-auth-layout-D4xEI9J8.js";import"./use-org-sso-TyWjgGeP.js";import"./integration-icon-FPSluFwK.js";import"./use-navigate-to-agent-BKt6uZhU.js";import"./reusable-new-chat-CouMjkYR.js";import"./AreaChart-CMqdqW-X.js";import"./form-PWBx8QQq.js";import"./file-type-icon-DjpfQdvY.js";import"./drawer-Dfn3cqSh.js";import"./collection-search-yhxjYY4J.js";import"./tabs-bgoBmYh1.js";import"./toggle-group-DVALkDJ2.js";import"./use-deco-credits-CGRraY5U.js";import"./popover-BYTopHKb.js";import"./alert-dialog-Bpd-0p4I.js";import"./toolbar-BseEnCPh.js";import"./skeleton-DxXAcunF.js";import"./github-repo-picker-x1X872QG.js";import"./use-debounced-value-usyjdfzM.js";import"./authenticate-and-persist-oauth-DgNMLRjT.js";import"./mcp-oauth-0Wpz4XYZ.js";import"./use-mcp-tools-Cry83Gza.js";import"./extract-connection-data-BudtEuf9.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-ufuvpGD9.js";import"./agent-capabilities-cXfbMfjV.js";import"./connection-card-m4tgOItf.js";import"./use-registry-connections-VTJBa0En.js";import"./retry-CErkP7V6.js";import"./connection-slug-eyAPH6o3.js";import"./connection-form-helpers-BkrR5b_e.js";import"./collection-tabs-SNVmmaXX.js";import"./badge-CXZR0JJ6.js";import"./use-open-billing-url-DJ4izovt.js";import"./select-model-CaoH2ToV.js";import"./checkbox-DU-r9RK1.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-XmYJ6Nk2.js";import"./cards-BfTjTHpY.js";import"./dropdown-menu-DPde1UkW.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CzyM6HAc.js";import"./deco-site-production-url-CaKZ7xBn.js";import"./use-capability-CxUt0m8I.js";import"./pt-BR-CLy76QW2.js";import"./switch-D5nHMM9-.js";import"./use-debounced-autosave-BMFBm4Py.js";import"./index-BZrHlw0j.js";import"./search-input-C9pC3WrF.js";import"./index-BfpQCjmG.js";import"./use-secrets-D6-WGKvN.js";import"./self-tool-result-m7izFHM4.js";import"./use-tags-BS8JieCa.js";import"./get-initials-D-f_fDFw.js";import"./command-Cz9Vx3RB.js";import"./index-SRgwcnf7.js";import"./use-file-configs-Bp6CR8ct.js";import"./automation-list-row-CF0CYhrz.js";const X={authors:[{key:"name",labelKey:"sandbox.recordEditor.fieldName",widget:"text"},{key:"type",labelKey:"sandbox.recordEditor.fieldType",widget:"select",options:[{value:"Person",labelKey:"sandbox.recordEditor.optionPerson"},{value:"Organization",labelKey:"sandbox.recordEditor.optionOrganization"}]},{key:"email",labelKey:"sandbox.recordEditor.fieldEmail",widget:"text",placeholderKey:"sandbox.recordEditor.placeholderEmail"},{key:"jobTitle",labelKey:"sandbox.recordEditor.fieldJobTitle",widget:"text"},{key:"company",labelKey:"sandbox.recordEditor.fieldCompany",widget:"text"},{key:"avatar",labelKey:"sandbox.recordEditor.fieldAvatar",widget:"image"}]},Y={authors:"sandbox.recordEditor.titleAuthor"};function Wr(C){const t=L.c(40),{orgSlug:K,virtualMcpId:h,branch:w,kind:a,blockKey:g,block:f}=C,i=R(),P=M(h);let b;t[0]!==w||t[1]!==K||t[2]!==P||t[3]!==h?(b={orgSlug:K,virtualMcpId:h,branch:w,packagePath:P},t[0]=w,t[1]=K,t[2]=P,t[3]=h,t[4]=b):b=t[4];const p=U(b);let k;t[5]!==f||t[6]!==a?(k=W(f,a),t[5]=f,t[6]=a,t[7]=k):k=t[7];const B=k;let v;t[8]!==g||t[9]!==a||t[10]!==p?(v=l=>{p.mutate({blockKey:g,data:G(g,a,l)})},t[8]=g,t[9]=a,t[10]=p,t[11]=v):v=t[11];const[e,S]=Q(B,v);let j;t[12]!==e||t[13]!==S?(j=(l,o)=>S({...e,[l]:o}),t[12]=e,t[13]=S,t[14]=j):j=t[14];const s=j,T=Y[a];let n;t[15]!==i||t[16]!==T?(n=i(T),t[15]=i,t[16]=T,t[17]=n):n=t[17];let c;t[18]!==n?(c=r.jsx("span",{className:"text-sm font-medium",children:n}),t[18]=n,t[19]=c):c=t[19];let d;t[20]!==p.isError||t[21]!==p.isPending?(d=r.jsx(q,{isPending:p.isPending,isError:p.isError}),t[20]=p.isError,t[21]=p.isPending,t[22]=d):d=t[22];let y;t[23]!==c||t[24]!==d?(y=r.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,d]}),t[23]=c,t[24]=d,t[25]=y):y=t[25];const N=X[a];let x;if(t[26]!==e||t[27]!==s||t[28]!==i||t[29]!==N){let l;t[31]!==e||t[32]!==s||t[33]!==i?(l=o=>r.jsx("div",{className:"space-y-2",children:o.widget==="image"?r.jsx(H,{schema:{type:"string",format:"image-uri",title:i(o.labelKey)},value:e[o.key],onChange:m=>s(o.key,m),path:o.key,label:i(o.labelKey)}):o.widget==="select"?r.jsxs(r.Fragment,{children:[r.jsx(I,{htmlFor:o.key,children:i(o.labelKey)}),r.jsxs(z,{value:F(e[o.key])||o.options?.[0]?.value,onValueChange:m=>s(o.key,m),children:[r.jsx(J,{id:o.key,className:"h-10 w-full",children:r.jsx(O,{placeholder:i(o.labelKey)})}),r.jsx(V,{children:(o.options??[]).map(m=>r.jsx($,{value:m.value,children:i(m.labelKey)},m.value))})]})]}):r.jsxs(r.Fragment,{children:[r.jsx(I,{htmlFor:o.key,children:i(o.labelKey)}),o.widget==="textarea"?r.jsx(D,{id:o.key,value:F(e[o.key]),onChange:m=>s(o.key,m.target.value),rows:3}):r.jsx(A,{id:o.key,value:F(e[o.key]),placeholder:o.placeholderKey?i(o.placeholderKey):void 0,onChange:m=>s(o.key,m.target.value),className:"h-10"})]})},o.key),t[31]=e,t[32]=s,t[33]=i,t[34]=l):l=t[34],x=N.map(l),t[26]=e,t[27]=s,t[28]=i,t[29]=N,t[30]=x}else x=t[30];let u;t[35]!==x?(u=r.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto px-6 py-6",children:r.jsx("div",{className:"mx-auto max-w-xl space-y-6",children:x})}),t[35]=x,t[36]=u):u=t[36];let E;return t[37]!==y||t[38]!==u?(E=r.jsxs("div",{className:"flex h-full flex-col",children:[y,u]}),t[37]=y,t[38]=u,t[39]=E):E=t[39],E}export{Wr as RecordEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-Cm227W9R.js","assets/index-BQFOspRh.js","assets/index-C-bJCsC6.css","assets/Tool02-Bk0Wi_jc.js","assets/CheckCircle-UOyFv4rE.js","assets/Settings02-D_by58BO.js","assets/use-mcp-client-B9fn1TBn.js","assets/auth-B56MWIKT.js","assets/useInfiniteQuery-C-kiHDyf.js","assets/use-infinite-scroll-Bct8OYtv.js","assets/studio-tools-BETupmQh.js","assets/badge-CXZR0JJ6.js","assets/input-DLmq-Bri.js","assets/dropdown-menu-DPde1UkW.js","assets/Check-Dc66au0h.js","assets/ChevronRight-DjBVHQoY.js","assets/DotsVertical-CILzGe_q.js","assets/table-DHyF1BO5.js","assets/toggle-group-DVALkDJ2.js","assets/use-view-mode-Qv39nezx.js","assets/use-mobile-CnfmCPF3.js","assets/FilterLines-DcRWfBwT.js","assets/Globe01-W4lyjKuH.js","assets/SearchMd-CDwUuDyr.js","assets/dialog-Cg0277WK.js","assets/X-DmV-M3--.js","assets/AlertCircle-BWppLd8c.js","assets/Upload01-De1aQPW9.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-Bpd-0p4I.js","assets/card-B-Mzv0lS.js","assets/Trash01-Dk2U_er_.js","assets/label-B1DonsU-.js","assets/select-BoHatn08.js","assets/tooltip-CpPLj5ml.js","assets/ChevronDown-LNz16DWG.js","assets/ChevronUp-DZ-mKv_H.js","assets/switch-D5nHMM9-.js","assets/textarea-DLfz9L-W.js","assets/ArrowLeft-cFWJcCye.js","assets/XCircle-Cj1jhbDm.js","assets/checkbox-DU-r9RK1.js","assets/Eye-BT74JrOy.js","assets/LinkExternal01-CP1N0ekO.js","assets/use-copy-C6oZHBaC.js","assets/Copy01-DPPY_ooc.js","assets/Key01-Bk2QhvNY.js","assets/Plus-9KDBMlCX.js","assets/mcp-oauth-0Wpz4XYZ.js","assets/Play-DrC9uZbx.js"])))=>i.map(i=>d[i]);
2
- import{c as i,j as e,r as s,k as a,aG as o}from"./index-BQFOspRh.js";import{R as m}from"./require-capability-B3XvoArB.js";import"./use-capability-CxUt0m8I.js";import"./access-gate-CcFlUK4A.js";import"./capability-load-error-CKW0147S.js";const n=s.lazy(()=>o(()=>import("./registry-layout-Cm227W9R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function f(){const r=i.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(n,{})})}),r[0]=t):t=r[0],t}export{f as default};
@@ -1 +0,0 @@
1
- import{b as re,r as $,F as Be,K as me,n as Ke,j as s,m as W,k as je,B as ce,c as J,Z as Xe,_ as Ue,$ as ae,a3 as Je,a4 as et,o as rt,a1 as Ot,a2 as jt,e as at,t as Me,p as Fe,y as ct,z as Mt,E as Dt,d as vt,u as yt}from"./index-BQFOspRh.js";import{u as Pt}from"./use-organization-roles-C0bVuJXK.js";import{u as $e}from"./use-org-auth-client-DDDMIikQ.js";import{g as dt,a as Lt}from"./role-color-Dn2tXDDF.js";import{B as De}from"./badge-CXZR0JJ6.js";import{g as mt,f as ut,A as ft,a as gt,b as ht,c as xt,d as pt,e as Tt}from"./alert-dialog-Bpd-0p4I.js";import{c as wt,D as Gt,b as kt,a as Ut}from"./dropdown-menu-DPde1UkW.js";import{a as Bt}from"./DotsVertical-CILzGe_q.js";import{s as ze}from"./Plus-9KDBMlCX.js";import{s as Vt}from"./Trash01-Dk2U_er_.js";import{C as Yt}from"./collection-table-wrapper-B10YZ9u0.js";import{P as ie}from"./index-BZrHlw0j.js";import{E as tt}from"./empty-state-BvR4kC3B.js";import{S as Qe}from"./search-input-C9pC3WrF.js";import{P as Et,D as _t}from"./ai-providers-logos-DD3qZ33J.js";import{I as Ze}from"./integration-icon-FPSluFwK.js";import{u as zt}from"./use-infinite-scroll-Bct8OYtv.js";import{C as He}from"./checkbox-DU-r9RK1.js";import{i as Kt}from"./ArrowLeft-cFWJcCye.js";import{u as Ft}from"./useSuspenseInfiniteQuery-9epNuRWF.js";import{u as $t,S as Qt}from"./use-mcp-client-B9fn1TBn.js";import{C as Zt}from"./collection-search-yhxjYY4J.js";import{p as Ht}from"./connection-BUKTSmLs.js";import{u as It}from"./use-members-HbYBEeJu.js";import{g as Rt}from"./get-initials-D-f_fDFw.js";import{u as qt}from"./use-connection-B7w0W3ts.js";import{u as Wt,g as Xt}from"./use-ai-providers-DFLh4od7.js";import{A as St}from"./avatar-BN3TMI7O.js";import{S as ve}from"./switch-D5nHMM9-.js";import{b as ye,c as Pe,T as Le,a as we}from"./tooltip-CpPLj5ml.js";import{S as st,a as lt,b as ot}from"./settings-section-XmYJ6Nk2.js";import{t as Jt}from"./ChevronDown-LNz16DWG.js";import{i as es}from"./ChevronRight-DjBVHQoY.js";import{i as nt}from"./X-DmV-M3--.js";import{a as ts}from"./use-capability-CxUt0m8I.js";import{A as ss}from"./access-gate-CcFlUK4A.js";import"./Check-Dc66au0h.js";import"./table-DHyF1BO5.js";import"./ArrowUp-CK7po7JD.js";import"./sidebar-nvbJrgVY.js";import"./LayoutLeft-P7wDvRlA.js";import"./use-mobile-CnfmCPF3.js";import"./SearchMd-CDwUuDyr.js";import"./Tool02-Bk0Wi_jc.js";import"./agent-icon-DrJqDdNd.js";import"./AlertCircle-BWppLd8c.js";import"./Tool01-BsXkza2k.js";import"./XCircle-Cj1jhbDm.js";import"./ArrowUpRight-7JgIYGFf.js";import"./TrendUp01-BQPOQTfU.js";import"./ZapSquare-BesqE3Kv.js";import"./Users03-CmtC3U6j.js";import"./CheckCircle-UOyFv4rE.js";import"./ChevronUp-DZ-mKv_H.js";import"./Stars02-D6uxt7rn.js";import"./Copy01-DPPY_ooc.js";import"./CpuChip01-DyWba75a.js";import"./CreditCard01-e79FUmFN.js";import"./Globe01-W4lyjKuH.js";import"./Settings02-D_by58BO.js";import"./Eye-BT74JrOy.js";import"./FilterLines-DcRWfBwT.js";import"./Share07-DFtUk4DH.js";import"./Star01-YV_bqOAU.js";import"./Globe04-_uS8YiyQ.js";import"./SwitchHorizontal01-BJcUWOrf.js";import"./HardDrive-D7RLSuvq.js";import"./Key01-Bk2QhvNY.js";import"./LinkExternal01-CP1N0ekO.js";import"./LogOut01-BNm98lqM.js";import"./Monitor01-D9pvMYQd.js";import"./Sun-CvD6V1mt.js";import"./Palette-DJfFKmjP.js";import"./Play-DrC9uZbx.js";import"./SearchLg-BSg_Ve-L.js";import"./Shield01-2VpHyEx6.js";import"./Stars01-CyMHMvzU.js";import"./Upload01-De1aQPW9.js";import"./User01-DZLXXgFt.js";import"./Users01-D-f87RLp.js";import"./XClose-8V-NoWeD.js";import"./Zap-BxOODR1h.js";import"./auth-B56MWIKT.js";import"./studio-tools-BETupmQh.js";import"./card-B-Mzv0lS.js";import"./capability-load-error-CKW0147S.js";const qe="basic-usage",We=[{id:qe,label:"Basic Usage",description:"Tools all org members can access by default",section:"Basic Usage",tools:["COLLECTION_CONNECTIONS_LIST","COLLECTION_CONNECTIONS_GET","CONNECTION_TEST","COLLECTION_VIRTUAL_MCP_LIST","COLLECTION_VIRTUAL_MCP_GET","VIRTUAL_MCP_PLUGIN_CONFIG_GET","VIRTUAL_MCP_LAST_USED_LIST","AUTOMATION_GET","AUTOMATION_LIST","AUTOMATION_RUN_STATS","AI_PROVIDERS_LIST","AI_PROVIDERS_LIST_MODELS","AI_PROVIDERS_ACTIVE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_CREDITS","AI_PROVIDER_TOPUP_URL","LIST_OBJECTS","GET_OBJECT_METADATA","GET_PRESIGNED_URL","PUT_PRESIGNED_URL","FILE_OBJECTS_LIST","ORG_REPO_SYNC_LIST","SANDBOX_START","SANDBOX_DELETE","GLOBAL_SEARCH","ORGANIZATION_SETTINGS_GET","USER_GET","BRAND_CONTEXT_LIST","COLLECTION_THREADS_CREATE","COLLECTION_THREADS_LIST","COLLECTION_THREADS_GET","COLLECTION_THREADS_UPDATE","COLLECTION_THREADS_DELETE","COLLECTION_THREAD_MESSAGES_LIST","TASK_BOARD_ITEM_CREATE","TASK_BOARD_ITEM_LIST","TASK_BOARD_ITEM_UPDATE","TASK_BOARD_ITEM_DELETE","TASK_BOARD_ITEM_PRS_GET","TASK_BOARD_ITEM_PR_LINK","TASK_BOARD_ITEM_RERUN","TASK_BOARD_REVIEW_DECISION","TASK_BOARD_PROMOTE_TO_PRODUCTION","TASK_BOARD_ACTIVITY_LIST","TASK_BOARD_COMMENT_LIST","TASK_BOARD_COMMENT_CREATE","TASK_BOARD_COMMENT_UPDATE","TASK_BOARD_COMMENT_DELETE","TASK_BOARD_DISMISSED_LIST","TASK_BOARD_DISMISSED_RESTORE"]},{id:"org:manage",label:"Manage organization",description:"Edit organization settings, brand context, and domain configuration",section:"Organization",tools:["ORGANIZATION_GET","ORGANIZATION_LIST","ORGANIZATION_UPDATE","ORGANIZATION_SETTINGS_GET","ORGANIZATION_SETTINGS_UPDATE","BRAND_CONTEXT_LIST","BRAND_CONTEXT_GET","BRAND_CONTEXT_CREATE","BRAND_CONTEXT_UPDATE","BRAND_CONTEXT_DELETE","BRAND_CONTEXT_EXTRACT","BRAND_GET","BRAND_LIST","ORGANIZATION_DOMAIN_LIST","ORGANIZATION_DOMAIN_ADD","ORGANIZATION_DOMAIN_UPDATE","ORGANIZATION_DOMAIN_VERIFY","ORGANIZATION_DOMAIN_REMOVE"]},{id:"members:manage",label:"Manage members",description:"Invite members, remove them, and change their roles",section:"Organization",tools:["ORGANIZATION_MEMBER_LIST","ORGANIZATION_MEMBER_ADD","ORGANIZATION_MEMBER_REMOVE","ORGANIZATION_MEMBER_UPDATE_ROLE","ORGANIZATION_BILLING_CHECKOUT_START","ORGANIZATION_BILLING_PORTAL","ORGANIZATION_TASK_QUOTA_GET","ORGANIZATION_JOIN_REQUEST_LIST","ORGANIZATION_JOIN_REQUEST_APPROVE","ORGANIZATION_JOIN_REQUEST_DENY"],dangerous:!0},{id:"connections:manage",label:"Manage connections",description:"Create, update, and delete connections",section:"Connections & Agents",tools:["COLLECTION_CONNECTIONS_CREATE","COLLECTION_CONNECTIONS_UPDATE","COLLECTION_CONNECTIONS_DELETE","COMMERCE_DISCOVERY_SETUP","COMMERCE_DISCOVERY_RUN","COMMERCE_DISCOVERY_BIND","COMMERCE_DISCOVERY_CONNECTION_STATUS"],dangerous:!0},{id:"agents:manage",label:"Manage agents",description:"Create, configure, and delete agents",section:"Connections & Agents",tools:["COLLECTION_VIRTUAL_MCP_CREATE","COLLECTION_VIRTUAL_MCP_UPDATE","COLLECTION_VIRTUAL_MCP_DELETE","VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE","VIRTUAL_MCP_PINNED_VIEWS_UPDATE"],dangerous:!0},{id:"automations:manage",label:"Manage automations",description:"Create, update, run, and delete automations",section:"Automations",tools:["AUTOMATION_CREATE","AUTOMATION_UPDATE","AUTOMATION_DELETE","AUTOMATION_TRIGGER_ADD","AUTOMATION_TRIGGER_REMOVE","AUTOMATION_TRIGGER_ROTATE_TOKEN","AUTOMATION_RUN"],dangerous:!0},{id:"monitoring:view",label:"View monitoring",description:"Access logs and usage statistics",section:"Monitoring",tools:["MONITORING_LOG_GET","MONITORING_LOGS_LIST","MONITORING_STATS","MONITORING_THREAD_USAGE"]},{id:"secrets:manage",label:"Manage secrets",description:"Create and list secrets stored in the credential vault",section:"Organization",tools:["SECRET_CREATE","SECRET_LIST"]},{id:"file-configs:manage",label:"Manage file configs",description:"Create, list, update and delete S3 bucket configurations and synced GitHub repositories",section:"Organization",tools:["FILE_CONFIG_CREATE","FILE_CONFIG_LIST","FILE_CONFIG_UPDATE","FILE_CONFIG_DELETE","FILE_OBJECTS_LIST","ORG_REPO_SYNC_CREATE","ORG_REPO_SYNC_LIST","ORG_REPO_SYNC_UPDATE","ORG_REPO_SYNC_DELETE","ORG_REPO_SYNC_RUN"]},{id:"ai-providers:manage",label:"Manage AI providers",description:"Add or remove API keys and provision provider credentials",section:"AI Providers",tools:["AI_PROVIDER_KEY_CREATE","AI_PROVIDER_KEY_LIST","AI_PROVIDER_KEY_DELETE","AI_PROVIDER_KEY_UPDATE","AI_PROVIDER_KEY_PREVIEW","AI_PROVIDER_OAUTH_URL","AI_PROVIDER_OAUTH_EXCHANGE","AI_PROVIDER_PROVISION_KEY","AI_PROVIDER_TOPUP_URL","AI_PROVIDER_CREDITS","CLAUDE_SUBSCRIPTION_CONNECT","CLAUDE_SUBSCRIPTION_STATUS","CLAUDE_SUBSCRIPTION_DISCONNECT"]},{id:"tags:manage",label:"Manage tags",description:"Create, assign, and delete organization tags",section:"Organization",tools:["TAGS_LIST","TAGS_CREATE","TAGS_DELETE","MEMBER_TAGS_GET","MEMBER_TAGS_SET"]},{id:"registry:manage",label:"Manage registry",description:"Browse, publish, and manage items in the registry",section:"Store & Registry",tools:["COLLECTION_REGISTRY_APP_LIST","COLLECTION_REGISTRY_APP_GET","COLLECTION_REGISTRY_APP_VERSIONS","COLLECTION_REGISTRY_APP_FILTERS","REGISTRY_ITEM_LIST","REGISTRY_ITEM_SEARCH","REGISTRY_ITEM_GET","REGISTRY_ITEM_VERSIONS","REGISTRY_ITEM_FILTERS","REGISTRY_DISCOVER_TOOLS","REGISTRY_ITEM_CREATE","REGISTRY_ITEM_BULK_CREATE","REGISTRY_ITEM_UPDATE","REGISTRY_ITEM_DELETE","REGISTRY_AI_GENERATE","REGISTRY_PUBLISH_REQUEST_LIST","REGISTRY_PUBLISH_REQUEST_REVIEW","REGISTRY_PUBLISH_REQUEST_COUNT","REGISTRY_PUBLISH_REQUEST_DELETE","REGISTRY_PUBLISH_API_KEY_GENERATE","REGISTRY_PUBLISH_API_KEY_LIST","REGISTRY_PUBLISH_API_KEY_REVOKE"],dangerous:!0},{id:"registry:monitor",label:"Monitor registry health",description:"Run health checks on registry connections and view results",section:"Store & Registry",tools:["REGISTRY_MONITOR_RUN_START","REGISTRY_MONITOR_RUN_LIST","REGISTRY_MONITOR_RUN_GET","REGISTRY_MONITOR_RUN_CANCEL","REGISTRY_MONITOR_RESULT_LIST","REGISTRY_MONITOR_CONNECTION_LIST","REGISTRY_MONITOR_CONNECTION_SYNC","REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH"]},{id:"api-keys:manage",label:"Manage API keys",description:"Create, update, and revoke API keys",section:"Developer",tools:["API_KEY_CREATE","API_KEY_LIST","API_KEY_UPDATE","API_KEY_DELETE"]},{id:"storage:delete",label:"Delete from storage",description:"Permanently delete files from object storage",section:"Developer",tools:["DELETE_OBJECT","DELETE_OBJECTS"],dangerous:!0},{id:"connections:sql",label:"Run SQL queries",description:"Execute raw SQL against connected databases",section:"Developer",tools:["DATABASES_RUN_SQL"],dangerous:!0}];[...We.find(t=>t.id===qe)?.tools??[]];const ls=["agents:manage","connections:manage"];new Set(We.filter(t=>ls.includes(t.id)).flatMap(t=>t.tools));function os(){const t=new Map;for(const e of We){if(e.id===qe)continue;const l=t.get(e.section)??[];l.push(e),t.set(e.section,l)}return Array.from(t.entries()).map(([e,l])=>({section:e,capabilities:l}))}function ns(t,e,l){return l?!0:t.tools.every(n=>e.includes(n))}function is(t,e,l){if(l){const i=new Set(e);for(const o of t.tools)i.add(o);return Array.from(i)}const n=new Set(e);for(const i of t.tools)n.delete(i);return Array.from(n)}function rs(t){const e=J.c(21),{connection:l,isSelected:n,hasToolsEnabled:i,activeToolsCount:o,totalToolsCount:c,onSelect:g,onToggle:h}=t,m=n?"bg-accent/50":"hover:bg-muted/50";let f;e[0]!==m?(f=W("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",m),e[0]=m,e[1]=f):f=e[1];let a;e[2]!==l.icon||e[3]!==l.title?(a=s.jsx(Ze,{icon:l.icon,name:l.title,size:"xs"}),e[2]=l.icon,e[3]=l.title,e[4]=a):a=e[4];let u;e[5]!==l.title?(u=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:l.title})}),e[5]=l.title,e[6]=u):u=e[6];let x;e[7]!==g||e[8]!==a||e[9]!==u?(x=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:g,children:[a,u]}),e[7]=g,e[8]=a,e[9]=u,e[10]=x):x=e[10];let d;e[11]!==o||e[12]!==l.tools||e[13]!==i||e[14]!==h||e[15]!==c?(d=l.tools&&l.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[o,"/",c]}),s.jsx(He,{checked:i,onCheckedChange:h,onClick:as})]}),e[11]=o,e[12]=l.tools,e[13]=i,e[14]=h,e[15]=c,e[16]=d):d=e[16];let p;return e[17]!==f||e[18]!==x||e[19]!==d?(p=s.jsxs("div",{className:f,children:[x,d]}),e[17]=f,e[18]=x,e[19]=d,e[20]=p):p=e[20],p}function as(t){return t.stopPropagation()}function cs(t){const e=J.c(18),{connectionId:l,tool:n,isSelected:i,onToggle:o}=t,c=`tool-${l}-${n.name}`,g=i?"text-foreground":"text-muted-foreground";let h;e[0]!==g?(h=W("text-sm font-medium",g),e[0]=g,e[1]=h):h=e[1];let m;e[2]!==h||e[3]!==n.name?(m=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:h,children:n.name})}),e[2]=h,e[3]=n.name,e[4]=m):m=e[4];let f;e[5]!==n.description?(f=n.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:n.description}),e[5]=n.description,e[6]=f):f=e[6];let a;e[7]!==m||e[8]!==f?(a=s.jsxs("div",{className:"flex-1 min-w-0",children:[m,f]}),e[7]=m,e[8]=f,e[9]=a):a=e[9];const u=`tool-${l}-${n.name}`;let x;e[10]!==i||e[11]!==o||e[12]!==u?(x=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(He,{id:u,checked:i,onCheckedChange:o,onClick:ds})}),e[10]=i,e[11]=o,e[12]=u,e[13]=x):x=e[13];let d;return e[14]!==c||e[15]!==a||e[16]!==x?(d=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:c,children:[a,x]}),e[14]=c,e[15]=a,e[16]=x,e[17]=d):d=e[17],d}function ds(t){return t.stopPropagation()}function ms({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:l,searchQuery:n}){const i=re(),[o,c]=$.useState(""),g=n!==void 0?n:o,h=$.useDeferredValue(g),[m,f]=$.useState("all"),[a,u]=$.useState(!1),x=$.useRef(new Set(Object.keys(t))),{org:d}=Be(),p=$t({connectionId:Qt,orgId:d.id,orgSlug:d.slug}),b=100,R=h.trim(),I=R?{operator:"or",conditions:[{field:["title"],operator:"contains",value:R},{field:["description"],operator:"contains",value:R}]}:void 0,A=!!l,N={...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:b,offset:0,...A&&{include_virtual:!0}},M=JSON.stringify(N),{data:S,fetchNextPage:O,hasNextPage:D,isFetchingNextPage:E}=Ft({queryKey:me.collectionListInfinite(p,d.id,"","CONNECTIONS",M),queryFn:async({pageParam:T=0})=>(await p.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...I&&{where:I},orderBy:[{field:["updated_at"],direction:"asc"}],limit:b,offset:T,...A&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(T,G)=>{if(T?.hasMore)return G.reduce((Q,q)=>Q+(q?.items?.length??0),0)},staleTime:3e4}),C=S?.pages.flatMap(T=>T?.items??[])??[],v=zt(O,D??!1,E),r=l?C.filter(T=>T.connection_type!=="VIRTUAL"?!0:Ht(T.connection_url)!==l):C,_=x.current,k=[..._.values()].map(T=>r.find(G=>G.id===T)).filter(T=>T!==void 0),w=r.filter(T=>!_.has(T.id)),Y=[...k,...w],y=T=>{const G=t[T];return G!==void 0&&G.length>0},z=Y.filter(T=>{if(m==="all")return!0;const G=y(T.id);return m==="selected"?G:m==="unselected"?!G:!0}),[P,K]=$.useState(Y[0]?.id??null),V=P?Y.find(T=>T.id===P)??null:null,{data:U,isFetching:B}=Ke({queryKey:me.collectionItem(p,d.id,"","CONNECTIONS",P??""),queryFn:async()=>P?(await p.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:P}})).structuredContent?.item??null:null,enabled:!!P,staleTime:3e4}),Z=U?.tools??[],X=(T,G)=>t[T]?.includes(G)??!1,te=(T,G)=>{const Q=t[T]??[],q=Q.includes(G),ne={...t};if(q){const se=Q.filter(oe=>oe!==G);se.length===0?delete ne[T]:ne[T]=se}else ne[T]=[...Q,G];e(ne)},le=T=>{const G=T===P?Z:[];if(!G.length)return;const Q=t[T]??[],q=G.map(oe=>oe.name),ne=Q.length>0&&q.every(oe=>Q.includes(oe)),se={...t};ne?delete se[T]:(se[T]=q,K(T)),e(se)},F=T=>{K(T),u(!0)},H=()=>{u(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:W("w-full md:w-80 border-r border-border flex flex-col",a&&"hidden md:flex"),children:[n===void 0&&s.jsx(Zt,{value:o,onChange:c,placeholder:i("common.toolSetSelector.searchPlaceholder")}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>f("all"),className:W("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterAll")}),s.jsx("button",{onClick:()=>f("selected"),className:W("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterSelected")}),s.jsx("button",{onClick:()=>f("unselected"),className:W("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",m==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:i("common.toolSetSelector.filterUnselected")})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:z.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:i(g?"common.toolSetSelector.noConnectionsFound":m==="selected"?"common.toolSetSelector.noServersSelected":m==="unselected"?"common.toolSetSelector.noUnselectedServers":"common.toolSetSelector.noConnectionsAvailable")}):s.jsxs("div",{className:"p-2 space-y-1",children:[z.map(T=>{const G=P===T.id,Q=G?Z.length:0,q=t[T.id]?.length??0;return s.jsx(rs,{connection:{...T,tools:G?Z:T.tools},isSelected:G,hasToolsEnabled:y(T.id),activeToolsCount:q,totalToolsCount:Q,onSelect:()=>F(T.id),onToggle:()=>le(T.id)},T.id)}),s.jsx("div",{ref:v,className:"h-4"}),E&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(je,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:W("flex-1 flex-col",a?"flex":"hidden md:flex"),children:V?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ce,{variant:"ghost",size:"sm",onClick:H,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(Kt,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Ze,{icon:V.icon,name:V.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:V.title}),V.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:V.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:B?s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(je,{size:18,className:"animate-spin text-muted-foreground"})}):Z.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:i("common.toolSetSelector.noToolsAvailable")}):s.jsx("div",{className:"space-y-2",children:Z.map(T=>s.jsx(cs,{connectionId:V.id,tool:T,isSelected:X(V.id,T.name),onToggle:()=>te(V.id,T.name)},T.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:i("common.toolSetSelector.selectConnection")})})})]})}const us=Xe({role:Xe({id:ae().optional(),slug:ae().optional(),label:ae()}),allowAllStaticPermissions:et(),staticPermissions:Ue(ae()),toolSet:Je(ae(),Ue(ae())),allowAllModels:et(),modelSet:Je(ae(),Ue(ae())),memberIds:Ue(ae())});function it(t,e,l,n){const i=s.jsx(ve,{checked:e,disabled:l,onCheckedChange:n});return l?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:i})}),s.jsx(we,{children:s.jsx("p",{children:t("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):i}function fs(t){const e=J.c(41),{allowAllStaticPermissions:l,staticPermissions:n,onAllowAllChange:i,onPermissionsChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=re();let f;e[0]!==g?(f=g.trim().toLowerCase(),e[0]=g,e[1]=f):f=e[1];const a=$.useDeferredValue(f);let u;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==o||e[6]!==h||e[7]!==g||e[8]!==n||e[9]!==m){const x=os(),d=(E,C)=>{if(!h){if(l&&C){const v=x.flatMap(xs).flatMap(hs);i(!1),o(v.filter(r=>!E.tools.includes(r)));return}l||o(is(E,n,!C))}};let p;e[11]!==a?(p=E=>{const{section:C,capabilities:v}=E;return{section:C,capabilities:v.filter(r=>!a||r.label.toLowerCase().includes(a)||r.description.toLowerCase().includes(a))}},e[11]=a,e[12]=p):p=e[12];const b=x.map(p).filter(gs);let R;e[13]!==m?(R=m("settings.orgRoleDetail.general"),e[13]=m,e[14]=R):R=e[14];let I;e[15]!==m?(I=m("settings.orgRoleDetail.allOrgPermissions"),e[15]=m,e[16]=I):I=e[16];let A;e[17]!==m?(A=m("settings.orgRoleDetail.grantFullAccessToAllFeaturesBelow"),e[17]=m,e[18]=A):A=e[18];let N;e[19]!==l||e[20]!==i||e[21]!==o?(N=()=>{i(!l),o([])},e[19]=l,e[20]=i,e[21]=o,e[22]=N):N=e[22];let M;e[23]!==l||e[24]!==h||e[25]!==m||e[26]!==N?(M=it(m,l,h,N),e[23]=l,e[24]=h,e[25]=m,e[26]=N,e[27]=M):M=e[27];let S;e[28]!==l||e[29]!==i||e[30]!==o||e[31]!==h?(S=h?void 0:()=>{i(!l),o([])},e[28]=l,e[29]=i,e[30]=o,e[31]=h,e[32]=S):S=e[32];let O;e[33]!==S||e[34]!==I||e[35]!==A||e[36]!==M?(O=s.jsx(lt,{children:s.jsx(ot,{title:I,description:A,action:M,onClick:S})}),e[33]=S,e[34]=I,e[35]=A,e[36]=M,e[37]=O):O=e[37];let D;e[38]!==O||e[39]!==R?(D=s.jsx(st,{title:R,children:O}),e[38]=O,e[39]=R,e[40]=D):D=e[40],u=s.jsx("div",{children:s.jsxs("div",{className:"flex flex-col gap-10 py-4",children:[D,b.length===0&&a?s.jsx("p",{className:"text-sm text-muted-foreground py-4",children:m("settings.orgRoleDetail.noPermissionsMatch",{searchQuery:g})}):b.map(E=>{const{section:C,capabilities:v}=E;return s.jsx(st,{title:C,children:s.jsx(lt,{children:v.map(r=>{const _=ns(r,n,l);return s.jsx(ot,{title:s.jsxs("span",{className:"flex items-center gap-1.5",children:[r.label,r.dangerous&&s.jsx(Mt,{size:12,className:"text-warning shrink-0"})]}),description:r.description,action:it(m,_,h,()=>d(r,_)),onClick:h?void 0:()=>d(r,_)},r.id)})})},C)})]})}),e[2]=l,e[3]=a,e[4]=i,e[5]=o,e[6]=h,e[7]=g,e[8]=n,e[9]=m,e[10]=u}else u=e[10];return u}function gs(t){return t.capabilities.length>0}function hs(t){return t.tools}function xs(t){return t.capabilities}const Nt={anthropic:"Anthropic",openrouter:"OpenRouter"},ps={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function Ts(t,e){const l=t.indexOf("/"),n=l>0?t.slice(0,l):e;return n.startsWith("~")?n.slice(1):n}function Es(t){return ps[t]??Nt[t]??t}function _s(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const Ct=30;function Is(t){const e=J.c(40),{connectionId:l,subProviderId:n,subProviderName:i,groupLogo:o,models:c,allConnectionModelIds:g,selectedModels:h,allowAllModels:m,allConnectionModelsSelected:f,onToggleModel:a,onExitAllowAll:u,readOnly:x,defaultExpanded:d}=t,p=re(),[b,R]=$.useState(d),I=d||b,A=R,[N,M]=$.useState(Ct);let S;e[0]!==f||e[1]!==m||e[2]!==h?(S=E=>m||f||h.includes("*")||h.includes(E),e[0]=f,e[1]=m,e[2]=h,e[3]=S):S=e[3];const O=S;let D;if(e[4]!==g||e[5]!==m||e[6]!==l||e[7]!==I||e[8]!==o||e[9]!==O||e[10]!==c||e[11]!==u||e[12]!==a||e[13]!==x||e[14]!==n||e[15]!==i||e[16]!==p||e[17]!==N){let E;e[19]!==O?(E=B=>O(B.id),e[19]=O,e[20]=E):E=e[20];const C=c.filter(E).length,v=c.slice(0,N),r=c.length>N;let _;e[21]===Symbol.for("react.memo_cache_sentinel")?(_=()=>A(Cs),e[21]=_):_=e[21];const k=o??Et[n]??_t;let w;e[22]!==i||e[23]!==k?(w=s.jsx(Ze,{icon:k,name:i,size:"sm"}),e[22]=i,e[23]=k,e[24]=w):w=e[24];let Y;e[25]!==i?(Y=s.jsx("span",{className:"text-sm font-medium truncate",children:i}),e[25]=i,e[26]=Y):Y=e[26];let y;e[27]!==w||e[28]!==Y?(y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[w,Y]}),e[27]=w,e[28]=Y,e[29]=y):y=e[29];const z=p("settings.orgRoleDetail.enabledCount",{enabledCount:C,total:c.length});let P;e[30]!==z?(P=s.jsx(De,{variant:"secondary",className:"text-xs text-muted-foreground",children:z}),e[30]=z,e[31]=P):P=e[31];let K;e[32]!==I?(K=I?s.jsx(Jt,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(es,{size:16,className:"text-muted-foreground shrink-0"}),e[32]=I,e[33]=K):K=e[33];let V;e[34]!==P||e[35]!==K?(V=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[P,K]}),e[34]=P,e[35]=K,e[36]=V):V=e[36];let U;e[37]!==V||e[38]!==y?(U=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:_,children:[y,V]}),e[37]=V,e[38]=y,e[39]=U):U=e[39],D=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[U,I&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[v.map(B=>{const Z=O(B.id),X=()=>{if(!x){if(m){u(l,g,B.id);return}a(l,B.id)}};return s.jsxs("div",{className:W("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!x&&"hover:bg-muted/50 cursor-pointer"),onClick:X,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:B.title})}),s.jsx("div",{onClick:Ns,children:x?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(ve,{checked:Z,disabled:!0,onCheckedChange:Ss})})}),s.jsx(we,{children:s.jsx("p",{children:p("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ve,{checked:Z,onCheckedChange:X})})]},B.id)}),r&&s.jsx("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>M(Rs),children:p("settings.orgRoleDetail.showMore",{remaining:c.length-N})})]})]}),e[4]=g,e[5]=m,e[6]=l,e[7]=I,e[8]=o,e[9]=O,e[10]=c,e[11]=u,e[12]=a,e[13]=x,e[14]=n,e[15]=i,e[16]=p,e[17]=N,e[18]=D}else D=e[18];return D}function Rs(t){return t+Ct}function Ss(){}function Ns(t){return t.stopPropagation()}function Cs(t){return!t}function bs(t){const e=J.c(33),{connection:l,selectedModels:n,allowAllModels:i,onToggleModel:o,onExitAllowAll:c,allConnectionModelsSelected:g,searchQuery:h,readOnly:m}=t,f=Xt(l.id);let a,u,x,d,p;if(e[0]!==g||e[1]!==i||e[2]!==l.id||e[3]!==l.label||e[4]!==l.providerId||e[5]!==c||e[6]!==o||e[7]!==f||e[8]!==m||e[9]!==h||e[10]!==n){p=Symbol.for("react.early_return_sentinel");e:{let I;e[16]!==l.label?(I=_=>({..._,id:_.modelId,provider:l.label}),e[16]=l.label,e[17]=I):I=e[17];const A=f.filter(Ms).map(I),N=h.trim().toLowerCase(),M=N?A.filter(_=>_.title.toLowerCase().includes(N)||_.id.toLowerCase().includes(N)||_.provider?.toLowerCase().includes(N)):A;if(M.length===0){p=null;break e}const S=new Map;for(const _ of M){const k=Ts(_.id,l.providerId),w=S.get(k)??{models:[],logo:null};w.models.push({id:_.id,title:_s(_.title),logo:_.logo}),!w.logo&&_.logo&&(w.logo=_.logo),S.set(k,w)}const O=Array.from(S.entries()).map(js).sort(Os),D=O.length===1||N.length>0;x="flex flex-col gap-3";const E=Et[l.providerId]??_t;let C;e[18]!==l.providerId||e[19]!==E?(C=s.jsx("img",{src:E,alt:l.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=l.providerId,e[19]=E,e[20]=C):C=e[20];const v=Nt[l.providerId]??l.providerId;let r;e[21]!==v?(r=s.jsx("h4",{className:"text-sm font-medium",children:v}),e[21]=v,e[22]=r):r=e[22],e[23]!==r||e[24]!==C?(d=s.jsxs("div",{className:"flex items-center gap-2",children:[C,r]}),e[23]=r,e[24]=C,e[25]=d):d=e[25],a="flex flex-col gap-3",u=O.map(_=>s.jsx(Is,{connectionId:l.id,subProviderId:_.id,subProviderName:_.name,groupLogo:_.logo,models:_.models,allConnectionModelIds:A.map(As),selectedModels:n,allowAllModels:i,allConnectionModelsSelected:g,onToggleModel:o,onExitAllowAll:c,readOnly:m,defaultExpanded:D},_.id))}e[0]=g,e[1]=i,e[2]=l.id,e[3]=l.label,e[4]=l.providerId,e[5]=c,e[6]=o,e[7]=f,e[8]=m,e[9]=h,e[10]=n,e[11]=a,e[12]=u,e[13]=x,e[14]=d,e[15]=p}else a=e[11],u=e[12],x=e[13],d=e[14],p=e[15];if(p!==Symbol.for("react.early_return_sentinel"))return p;let b;e[26]!==a||e[27]!==u?(b=s.jsx("div",{className:a,children:u}),e[26]=a,e[27]=u,e[28]=b):b=e[28];let R;return e[29]!==x||e[30]!==d||e[31]!==b?(R=s.jsxs("div",{className:x,children:[d,b]}),e[29]=x,e[30]=d,e[31]=b,e[32]=R):R=e[32],R}function As(t){return t.id}function Os(t,e){return t.name.localeCompare(e.name)}function js(t){const[e,l]=t;return{id:e,name:Es(e),logo:l.logo,models:l.models}}function Ms(t,e,l){return l.findIndex(n=>n.modelId===t.modelId)===e}function Ds(t){const e=J.c(41),{allowAllModels:l,modelSet:n,onAllowAllChange:i,onModelSetChange:o,readOnly:c,searchQuery:g}=t,h=c===void 0?!1:c,m=re(),f=$.useDeferredValue(g),a=Wt();let u;e[0]!==n||e[1]!==o?(u=(E,C)=>{const v=n[E]??[],r={...n};if(v.includes(C)){const _=v.filter(k=>k!==C);_.length===0?delete r[E]:r[E]=_}else r[E]=[...v,C];o(r)},e[0]=n,e[1]=o,e[2]=u):u=e[2];const x=u;let d;e[3]!==n||e[4]!==i||e[5]!==o?(d=(E,C,v)=>{i(!1),o({...n,[E]:C.filter(r=>r!==v)})},e[3]=n,e[4]=i,e[5]=o,e[6]=d):d=e[6];const p=d,b=!h&&"hover:bg-muted/50 cursor-pointer";let R;e[7]!==b?(R=W("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",b),e[7]=b,e[8]=R):R=e[8];let I;e[9]!==l||e[10]!==i||e[11]!==o||e[12]!==h?(I=()=>{if(h)return;const E=!l;i(E),E&&o({})},e[9]=l,e[10]=i,e[11]=o,e[12]=h,e[13]=I):I=e[13];let A;e[14]!==m?(A=m("settings.orgRoleDetail.allModels"),e[14]=m,e[15]=A):A=e[15];let N;e[16]!==A?(N=s.jsx("span",{className:"text-sm font-medium",children:A}),e[16]=A,e[17]=N):N=e[17];let M;e[18]!==l||e[19]!==i||e[20]!==o||e[21]!==h||e[22]!==m?(M=s.jsx("div",{onClick:ys,children:h?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(ve,{checked:l,disabled:!0,onCheckedChange:vs})})}),s.jsx(we,{children:s.jsx("p",{children:m("settings.orgRoleDetail.builtinRolePermissionsCannotBeChanged")})})]})}):s.jsx(ve,{checked:l,onCheckedChange:E=>{i(E),E&&o({})}})}),e[18]=l,e[19]=i,e[20]=o,e[21]=h,e[22]=m,e[23]=M):M=e[23];let S;e[24]!==R||e[25]!==I||e[26]!==N||e[27]!==M?(S=s.jsxs("div",{className:R,onClick:I,children:[N,M]}),e[24]=R,e[25]=I,e[26]=N,e[27]=M,e[28]=S):S=e[28];let O;e[29]!==a||e[30]!==l||e[31]!==f||e[32]!==p||e[33]!==n||e[34]!==h||e[35]!==m||e[36]!==x?(O=a.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:m("settings.orgRoleDetail.noLlmConnectionsConfigured")}):a.map(E=>s.jsx($.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(je,{className:"size-4 animate-spin"}),m("settings.orgRoleDetail.loadingModels")]}),children:s.jsx(bs,{connection:E,selectedModels:n[E.id]??[],allowAllModels:l,onToggleModel:x,onExitAllowAll:p,allConnectionModelsSelected:(n[E.id]??[]).includes("*"),searchQuery:f,readOnly:h})},E.id)),e[29]=a,e[30]=l,e[31]=f,e[32]=p,e[33]=n,e[34]=h,e[35]=m,e[36]=x,e[37]=O):O=e[37];let D;return e[38]!==S||e[39]!==O?(D=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[S,O]}),e[38]=S,e[39]=O,e[40]=D):D=e[40],D}function vs(){}function ys(t){return t.stopPropagation()}function Ps(t){const e=J.c(75),{open:l,onOpenChange:n,selectedMemberIds:i,onAddMembers:o}=t,c=re(),[g,h]=$.useState(""),m=$.useDeferredValue(g);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=[],e[0]=f):f=e[0];const[a,u]=$.useState(f),{data:x}=It();let d,p,b,R,I,A,N,M,S,O,D;if(e[1]!==x?.data?.members||e[2]!==m||e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==a||e[7]!==g||e[8]!==i||e[9]!==c){const P=x?.data?.members??[];let K;e[21]!==m?(K=F=>{const H=m.toLowerCase();return F.user?.name?.toLowerCase().includes(H)||F.user?.email?.toLowerCase().includes(H)},e[21]=m,e[22]=K):K=e[22];const V=P.filter(K);let U;e[23]!==o||e[24]!==n||e[25]!==a?(U=()=>{o(a),u([]),n(!1)},e[23]=o,e[24]=n,e[25]=a,e[26]=U):U=e[26],b=U,p=mt,O=l,D=n,d=ut,M="sm:max-w-md p-0";let B;e[27]!==c?(B=c("settings.orgRoleDetail.addMembersToRole"),e[27]=c,e[28]=B):B=e[28];let Z;e[29]!==B?(Z=s.jsx(ft,{children:B}),e[29]=B,e[30]=Z):Z=e[30];let X;e[31]!==c?(X=c("settings.orgRoleDetail.selectMembersToAddToThisRole"),e[31]=c,e[32]=X):X=e[32];let te;e[33]!==X?(te=s.jsx(gt,{children:X}),e[33]=X,e[34]=te):te=e[34],e[35]!==Z||e[36]!==te?(S=s.jsxs(ht,{className:"px-6 pt-6",children:[Z,te]}),e[35]=Z,e[36]=te,e[37]=S):S=e[37],A="flex flex-col h-80";let le;e[38]!==c?(le=c("settings.orgRoleDetail.searchMembers"),e[38]=c,e[39]=le):le=e[39],e[40]!==g||e[41]!==le?(N=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(Qe,{value:g,onChange:h,placeholder:le,className:"w-full"})}),e[40]=g,e[41]=le,e[42]=N):N=e[42],R="flex-1 overflow-auto",I=V.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:c(g?"settings.orgRoleDetail.noMembersFound":"settings.orgRoleDetail.noMembersAvailable")})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:V.map(F=>{const H=F.role!=="owner",T=i.includes(F.id),G=a.includes(F.id);return s.jsxs("label",{className:W("flex items-center gap-3 p-2 rounded-lg",!H||T?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(He,{checked:G||T,onCheckedChange:()=>{!H||T||u(Q=>Q.includes(F.id)?Q.filter(q=>q!==F.id):[...Q,F.id])},disabled:!H||T}),s.jsx(St,{url:F.user?.image??void 0,fallback:Rt(F.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:F.user?.name||c("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:F.user?.email})]}),!H&&s.jsx(De,{variant:"secondary",className:"shrink-0",children:c("settings.orgRoleDetail.owner")}),T&&H&&s.jsx(De,{variant:"outline",className:"shrink-0",children:c("settings.orgRoleDetail.added")})]},F.id)})}),e[1]=x?.data?.members,e[2]=m,e[3]=o,e[4]=n,e[5]=l,e[6]=a,e[7]=g,e[8]=i,e[9]=c,e[10]=d,e[11]=p,e[12]=b,e[13]=R,e[14]=I,e[15]=A,e[16]=N,e[17]=M,e[18]=S,e[19]=O,e[20]=D}else d=e[10],p=e[11],b=e[12],R=e[13],I=e[14],A=e[15],N=e[16],M=e[17],S=e[18],O=e[19],D=e[20];let E;e[43]!==R||e[44]!==I?(E=s.jsx("div",{className:R,children:I}),e[43]=R,e[44]=I,e[45]=E):E=e[45];let C;e[46]!==E||e[47]!==A||e[48]!==N?(C=s.jsxs("div",{className:A,children:[N,E]}),e[46]=E,e[47]=A,e[48]=N,e[49]=C):C=e[49];let v;e[50]!==c?(v=c("settings.orgRoleDetail.cancel"),e[50]=c,e[51]=v):v=e[51];let r;e[52]!==v?(r=s.jsx(xt,{children:v}),e[52]=v,e[53]=r):r=e[53];const _=a.length===0;let k;e[54]!==a.length||e[55]!==c?(k=c("settings.orgRoleDetail.addWithCount",{count:a.length}),e[54]=a.length,e[55]=c,e[56]=k):k=e[56];let w;e[57]!==b||e[58]!==_||e[59]!==k?(w=s.jsx(pt,{onClick:b,disabled:_,children:k}),e[57]=b,e[58]=_,e[59]=k,e[60]=w):w=e[60];let Y;e[61]!==r||e[62]!==w?(Y=s.jsxs(Tt,{className:"px-6 pb-6",children:[r,w]}),e[61]=r,e[62]=w,e[63]=Y):Y=e[63];let y;e[64]!==d||e[65]!==C||e[66]!==Y||e[67]!==M||e[68]!==S?(y=s.jsxs(d,{className:M,children:[S,C,Y]}),e[64]=d,e[65]=C,e[66]=Y,e[67]=M,e[68]=S,e[69]=y):y=e[69];let z;return e[70]!==p||e[71]!==y||e[72]!==O||e[73]!==D?(z=s.jsx(p,{open:O,onOpenChange:D,children:y}),e[70]=p,e[71]=y,e[72]=O,e[73]=D,e[74]=z):z=e[74],z}function Ls(t){const e=J.c(33),{memberIds:l,onMemberIdsChange:n,readOnly:i,readOnlyMessage:o,searchQuery:c,addMemberDialogOpen:g,onAddMemberDialogOpenChange:h}=t,m=i===void 0?!1:i,f=o===void 0?void 0:o,a=re(),u=$.useDeferredValue(c),{data:x}=It();let d,p,b;if(e[0]!==x?.data?.members||e[1]!==u||e[2]!==l||e[3]!==n||e[4]!==m||e[5]!==f||e[6]!==c||e[7]!==a){const M=x?.data?.members??[];let S;e[11]!==l?(S=r=>l.includes(r.id),e[11]=l,e[12]=S):S=e[12];const O=M.filter(S);let D;e[13]!==u?(D=r=>{const _=u.toLowerCase();return r.user?.name?.toLowerCase().includes(_)||r.user?.email?.toLowerCase().includes(_)},e[13]=u,e[14]=D):D=e[14];const E=O.filter(D);let C;e[15]!==f||e[16]!==a?(C=f??a("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[15]=f,e[16]=a,e[17]=C):C=e[17];const v=C;b="flex flex-col h-full",d="flex-1 overflow-auto",p=O.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:a("settings.orgRoleDetail.noMembers")}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.addMembersToGrantPermissions")})]})}):E.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:a("settings.orgRoleDetail.noMembersMatch",{searchQuery:c})})}):s.jsx("div",{className:"p-4 space-y-2",children:E.map(r=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(St,{url:r.user?.image??void 0,fallback:Rt(r.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:r.user?.name||a("settings.orgRoleDetail.unknown")}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:r.user?.email})]}),m?s.jsx(ye,{children:s.jsxs(Pe,{children:[s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsx(ce,{variant:"ghost",size:"sm",disabled:!0,"aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),children:s.jsx(nt,{size:16})})})}),s.jsx(we,{children:s.jsx("p",{children:v})})]})}):s.jsx(ce,{variant:"ghost",size:"sm","aria-label":a("settings.orgRoleDetail.removeMember",{name:r.user?.name||a("settings.orgRoleDetail.unknown")}),onClick:()=>n(l.filter(_=>_!==r.id)),children:s.jsx(nt,{size:16})})]},r.id))}),e[0]=x?.data?.members,e[1]=u,e[2]=l,e[3]=n,e[4]=m,e[5]=f,e[6]=c,e[7]=a,e[8]=d,e[9]=p,e[10]=b}else d=e[8],p=e[9],b=e[10];let R;e[18]!==d||e[19]!==p?(R=s.jsx("div",{className:d,children:p}),e[18]=d,e[19]=p,e[20]=R):R=e[20];let I;e[21]!==l||e[22]!==n?(I=M=>n([...l,...M]),e[21]=l,e[22]=n,e[23]=I):I=e[23];let A;e[24]!==g||e[25]!==l||e[26]!==h||e[27]!==I?(A=s.jsx(Ps,{open:g,onOpenChange:h,selectedMemberIds:l,onAddMembers:I}),e[24]=g,e[25]=l,e[26]=h,e[27]=I,e[28]=A):A=e[28];let N;return e[29]!==b||e[30]!==R||e[31]!==A?(N=s.jsxs("div",{className:b,children:[R,A]}),e[29]=b,e[30]=R,e[31]=A,e[32]=N):N=e[32],N}function ws(t){const e=J.c(3);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=l):l=e[0];let n;return e[1]!==t?(n=s.jsx($.Suspense,{fallback:l,children:s.jsx(Ls,{...t})}),e[1]=t,e[2]=n):n=e[2],n}const Gs={owner:[],admin:[],user:[]};function ks(t,e,l,n){const i=t==="owner"||t==="admin";return{role:{id:l?.id,slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:i,staticPermissions:Gs[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(o=>o.role===t).map(o=>o.id)}}function Us(t,e,l){const n=t.permission||{},i=n.self||[],o=i.includes("*"),c=o?[]:i.filter(a=>a!=="*"),g={};for(const[a,u]of Object.entries(n))if(!(a==="self"||a==="models"))if(a==="*")for(const x of l)g[x.id]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u;else{const x=l.find(d=>d.id===a);x&&(g[a]=u.includes("*")?x.tools?.map(d=>d.name)??[]:u)}const h=n.models||[],m=h.length===0||h.includes("*:*"),f={};if(!m)for(const a of h){const u=a.indexOf(":");if(u===-1)continue;const x=a.slice(0,u),d=a.slice(u+1);f[x]||(f[x]=[]),f[x].push(d)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:o,staticPermissions:c,toolSet:g,allowAllModels:m,modelSet:f,memberIds:e.filter(a=>a.role===t.role).map(a=>a.id)}}function Bs(t,e){const l={};t.allowAllStaticPermissions?l.self=["*"]:t.staticPermissions.length>0&&(l.self=t.staticPermissions);for(const[n,i]of Object.entries(t.toolSet))if(i.length>0){const c=e.find(g=>g.id===n)?.tools?.map(g=>g.name)??[];l[n]=c.length>0&&c.every(g=>i.includes(g))?["*"]:i}if(t.allowAllModels)l.models=["*:*"];else{const n=[];for(const[i,o]of Object.entries(t.modelSet))for(const c of o)n.push(`${i}:${c}`);n.length>0&&(l.models=n)}return l}function Vs(t,e,l){return t.kind==="builtin"?ks(t.role,e,void 0):t.kind==="custom"?Us(t.role,e,l):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function Ys(t){const e=J.c(19),{readOnly:l,readOnlyMessage:n,onOpen:i}=t,o=n===void 0?void 0:n,c=re();let g;e[0]!==o||e[1]!==c?(g=o??c("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),e[0]=o,e[1]=c,e[2]=g):g=e[2];const h=g;if(l){let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ze,{size:16}),e[3]=u):u=e[3];let x;e[4]!==c?(x=c("settings.orgRoleDetail.addMember"),e[4]=c,e[5]=x):x=e[5];let d;e[6]!==x?(d=s.jsx(Le,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ce,{variant:"outline",size:"sm",disabled:!0,children:[u,x]})})}),e[6]=x,e[7]=d):d=e[7];let p;e[8]!==h?(p=s.jsx(we,{children:s.jsx("p",{children:h})}),e[8]=h,e[9]=p):p=e[9];let b;return e[10]!==d||e[11]!==p?(b=s.jsx(ye,{children:s.jsxs(Pe,{children:[d,p]})}),e[10]=d,e[11]=p,e[12]=b):b=e[12],b}let m;e[13]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ze,{size:16}),e[13]=m):m=e[13];let f;e[14]!==c?(f=c("settings.orgRoleDetail.addMember"),e[14]=c,e[15]=f):f=e[15];let a;return e[16]!==i||e[17]!==f?(a=s.jsxs(ce,{variant:"outline",size:"sm",onClick:i,children:[m,f]}),e[16]=i,e[17]=f,e[18]=a):a=e[18],a}function zs(t){const e=J.c(14),{locator:l}=Be(),n=$e(),i=qt();let o;e[0]!==l?(o=me.members(l),e[0]=l,e[1]=o):o=e[1];let c;e[2]!==n?(c=()=>n.organization.listMembers(),e[2]=n,e[3]=c):c=e[3];let g;e[4]!==o||e[5]!==c?(g={queryKey:o,queryFn:c},e[4]=o,e[5]=c,e[6]=g):g=e[6];const{data:h,isPending:m}=Ke(g);if(m||!i){let x;return e[7]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{size:32,className:"animate-spin text-muted-foreground"})})}),e[7]=x):x=e[7],x}let f;e[8]!==h?.data?.members?(f=h?.data?.members??[],e[8]=h?.data?.members,e[9]=f):f=e[9];const a=f;let u;return e[10]!==i||e[11]!==a||e[12]!==t?(u=s.jsx(Ks,{...t,members:a,connections:i}),e[10]=i,e[11]=a,e[12]=t,e[13]=u):u=e[13],u}function Ks({target:t,onBack:e,onSaved:l,members:n,connections:i}){const o=re(),{locator:c}=Be(),g=$e(),h=rt(),m=t.kind==="builtin",f=t.kind==="builtin"&&t.role==="owner",a=t.kind==="new",[u,x]=$.useState(m?"org":"mcp"),d=Ot({resolver:jt(us),defaultValues:Vs(t,n,i)}),p=d.formState.isValid,b=d.formState.isDirty,R=at({mutationFn:async r=>{const _=Bs(r,i),k=r.role.slug||r.role.label.toLowerCase().replace(/\s+/g,"-"),w=(r.role.slug==="owner"||r.role.slug==="admin"||r.role.slug==="user")&&!r.role.id,Y=async(y,z)=>{const P=n.filter(U=>U.role===(z??y)).map(U=>U.id),K=r.memberIds.filter(U=>!P.includes(U)),V=P.filter(U=>!r.memberIds.includes(U));for(const U of K){const B=await g.organization.updateMemberRole({memberId:U,role:[y]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}for(const U of V){const B=await g.organization.updateMemberRole({memberId:U,role:["user"]});if(B?.error)throw new Error(B.error.message??o("settings.orgRoleDetail.somethingWentWrong"))}};if(w)return await Y(r.role.slug),r;if(r.role.id){const y=r.role.label.toLowerCase().replace(/\s+/g,"-"),z=r.role.slug,P=y!==z,K=await g.organization.updateRole({roleId:r.role.id,data:{permission:_,...P?{roleName:y}:{}}});if(K?.error)throw new Error(K.error.message??o("settings.orgRoleDetail.somethingWentWrong"));return await Y(P?y:z,P?z:void 0),P?{...r,role:{...r.role,slug:y}}:r}else{const y=await g.organization.createRole({role:k,permission:_});if(y?.error)throw new Error(y.error.message??o("settings.orgRoleDetail.somethingWentWrong"));for(const z of r.memberIds){const P=await g.organization.updateMemberRole({memberId:z,role:[k]});if(P?.error)throw new Error(P.error.message)}return{...r,role:{...r.role,id:y.data?.roleData?.id,slug:k}}}},onSuccess:(r,_)=>{h.invalidateQueries({queryKey:me.members(c)}),h.invalidateQueries({queryKey:me.organizationRoles(c)});const k=!_.role.id&&!_.role.slug,w=_.role.slug==="owner"&&!_.role.id;Fe(w?"role_members_updated":k?"role_created":"role_updated",{role_slug:_.role.slug??null}),Me.success(o(w?"settings.orgRoleDetail.membersUpdatedSuccessfully":k?"settings.orgRoleDetail.roleCreatedSuccessfully":"settings.orgRoleDetail.roleUpdatedSuccessfully")),d.reset(r),l(r.role.id)},onError:r=>{Me.error(r instanceof Error?r.message:o("settings.orgRoleDetail.failedToSaveRole"))}}),I=d.handleSubmit(r=>{if(!r.role.label.trim()){Me.error(o("settings.orgRoleDetail.roleNameIsRequired")),d.setFocus("role.label");return}R.mutate(r)}),A=!f,N=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",M=[...f?[]:[{id:"mcp",label:o("settings.orgRoleDetail.mcpPermissions")}],{id:"org",label:o("settings.orgRoleDetail.organizationPermissions")},{id:"models",label:o("settings.orgRoleDetail.models")},{id:"members",label:o("settings.orgRoleDetail.members")}],[S,O]=$.useState(""),[D,E]=$.useState(!1),C=r=>{x(r),O("")},v={mcp:o("settings.orgRoleDetail.searchMcpServers"),org:o("settings.orgRoleDetail.searchPermissions"),models:o("settings.orgRoleDetail.searchModels"),members:o("settings.orgRoleDetail.searchMembers")};return s.jsx(ie,{children:s.jsxs(ie.Content,{className:W("flex flex-col",u!=="org"&&"overflow-hidden"),children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(ie.Title,{actions:A&&s.jsxs(s.Fragment,{children:[s.jsx(ce,{variant:"outline",size:"sm",onClick:e,disabled:R.isPending,children:o("settings.orgRoleDetail.cancel")}),s.jsx(ce,{size:"sm",onClick:I,disabled:R.isPending||!p||!b,children:R.isPending?o("settings.orgRoleDetail.saving"):o(a?"settings.orgRoleDetail.createRole":"settings.orgRoleDetail.saveChanges")})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:W("size-2.5 rounded-full shrink-0",t.kind==="builtin"?dt(t.role,!0):Lt(d.watch("role.label")))}),f&&s.jsx(ct,{size:16,className:"text-muted-foreground shrink-0"}),a||t.kind==="custom"?s.jsx("input",{...d.register("role.label"),placeholder:o("settings.orgRoleDetail.roleName"),className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:a}):s.jsx("span",{className:"truncate",children:N})]})}),s.jsx("div",{className:"flex items-center gap-2",children:M.map(r=>s.jsx("button",{type:"button",onClick:()=>C(r.id),className:W("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",u===r.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:r.label},r.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(Qe,{value:S,onChange:O,placeholder:v[u]??"Search...",className:"w-full md:w-[375px]"}),u==="members"&&s.jsx(Ys,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>E(!0)})]})]})}),s.jsx("div",{className:W("mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",u!=="org"&&"flex-1 min-h-0"),children:s.jsxs("div",{className:W(u!=="org"&&"h-full overflow-hidden",u!=="models"&&u!=="org"&&"border border-border rounded-xl bg-card"),children:[u==="mcp"&&!f&&s.jsx(ms,{toolSet:d.watch("toolSet"),onToolSetChange:r=>d.setValue("toolSet",r,{shouldDirty:!0}),searchQuery:S}),u==="org"&&s.jsx(fs,{allowAllStaticPermissions:d.watch("allowAllStaticPermissions"),staticPermissions:d.watch("staticPermissions"),onAllowAllChange:r=>d.setValue("allowAllStaticPermissions",r,{shouldDirty:!0}),onPermissionsChange:r=>d.setValue("staticPermissions",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="models"&&s.jsx(Ds,{allowAllModels:d.watch("allowAllModels"),modelSet:d.watch("modelSet"),onAllowAllChange:r=>d.setValue("allowAllModels",r,{shouldDirty:!0}),onModelSetChange:r=>d.setValue("modelSet",r,{shouldDirty:!0}),readOnly:f,searchQuery:S}),u==="members"&&s.jsx(ws,{memberIds:d.watch("memberIds"),onMemberIdsChange:r=>d.setValue("memberIds",r,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&(t.role==="owner"||t.role==="user"),readOnlyMessage:t.kind==="builtin"&&t.role==="user"?o("settings.orgRoleDetail.userIsDefaultRoleMessage"):o("settings.orgRoleDetail.ownerMembershipCannotBeChanged"),searchQuery:S,addMemberDialogOpen:D,onAddMemberDialogOpenChange:E})]})})]})})}function Fs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}function $s(t){const e=J.c(6),{area:l,children:n}=t,{isPrivileged:i,loading:o,error:c}=ts();let g;return e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==i||e[4]!==o?(g=s.jsx(ss,{granted:i,loading:o,error:c,area:l,children:n}),e[0]=l,e[1]=n,e[2]=c,e[3]=i,e[4]=o,e[5]=g):g=e[5],g}const Qs=[{role:"owner",labelKey:"settings.roles.roleOwner"},{role:"admin",labelKey:"settings.roles.roleAdmin"},{role:"user",labelKey:"settings.roles.roleUser"}];function Zs(){const t=J.c(135),e=re(),[l,n]=$.useState(""),[i,o]=$.useState(null),c=vt();let g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},t[0]=g):g=t[0];const{role:h}=yt(g),{locator:m}=Be(),f=$e(),a=rt(),{customRoles:u,refetch:x}=Pt();let d;t[1]!==c?(d=j=>c({to:".",search:L=>({...L,role:j})}),t[1]=c,t[2]=d):d=t[2];const p=d;let b;e:{if(!h){b=null;break e}if(h==="new"){b={kind:"new"};break e}if(h.startsWith("builtin-")){b={kind:"builtin",role:h.slice(8)};break e}let j;t[3]!==h?(j=ee=>ee.id===h,t[3]=h,t[4]=j):j=t[4];const L=u.find(j);b=L?{kind:"custom",role:L}:null}const R=b;let I;t[5]!==m?(I=me.members(m),t[5]=m,t[6]=I):I=t[6];let A;t[7]!==f?(A=()=>f.organization.listMembers(),t[7]=f,t[8]=A):A=t[8];let N;t[9]!==I||t[10]!==A?(N={queryKey:I,queryFn:A},t[9]=I,t[10]=A,t[11]=N):N=t[11];const{data:M}=Ke(N);let S;t[12]!==M?.data?.members?(S=M?.data?.members??[],t[12]=M?.data?.members,t[13]=S):S=t[13];const O=S;let D;t[14]!==O?(D=j=>O.filter(L=>L.role===j).length,t[14]=O,t[15]=D):D=t[15];const E=D;let C;if(t[16]!==u||t[17]!==E||t[18]!==l||t[19]!==e){let j;t[21]!==E||t[22]!==e?(j=de=>({kind:"builtin",role:{...de,memberCount:E(de.role),label:e(de.labelKey)}}),t[21]=E,t[22]=e,t[23]=j):j=t[23];const L=Qs.map(j);let ee;t[24]!==E?(ee=de=>({kind:"custom",role:{...de,memberCount:E(de.role)}}),t[24]=E,t[25]=ee):ee=t[25];const bt=u.map(ee);if(C=[...L,...bt],l){const de=l.toLowerCase();C=C.filter(At=>At.role.label.toLowerCase().includes(de))}t[16]=u,t[17]=E,t[18]=l,t[19]=e,t[20]=C}else C=t[20];let v;t[26]!==f?(v=async j=>{const L=await f.organization.deleteRole({roleId:j});if(L?.error)throw new Error(L.error.message);return L?.data},t[26]=f,t[27]=v):v=t[27];const r=at({mutationFn:v,onSuccess:(j,L)=>{Fe("role_deleted",{role_id:L}),a.invalidateQueries({queryKey:me.members(m)}),a.invalidateQueries({queryKey:me.organizationRoles(m)}),Me.success(e("settings.roles.deletedSuccessfully")),x(),R?.kind==="custom"&&R.role.id===L&&p(void 0)},onError:Js});let _;t[28]!==e?(_=e("settings.roles.columnRole"),t[28]=e,t[29]=_):_=t[29];let k;t[30]!==_?(k={id:"role",header:_,render:Xs,cellClassName:"flex-1 min-w-0",sortable:!0},t[30]=_,t[31]=k):k=t[31];let w;t[32]!==e?(w=e("settings.roles.columnType"),t[32]=e,t[33]=w):w=t[33];let Y;t[34]!==e?(Y=j=>j.kind==="builtin"?s.jsx(De,{variant:"secondary",className:"text-xs",children:e("settings.roles.builtIn")}):s.jsx(De,{variant:"outline",className:"text-xs",children:e("settings.roles.custom")}),t[34]=e,t[35]=Y):Y=t[35];let y;t[36]!==w||t[37]!==Y?(y={id:"type",header:w,render:Y,cellClassName:"w-28 shrink-0"},t[36]=w,t[37]=Y,t[38]=y):y=t[38];let z;t[39]!==e?(z=e("settings.roles.columnPermissions"),t[39]=e,t[40]=z):z=t[40];let P;t[41]!==e?(P=j=>{if(j.kind==="builtin")return j.role.role==="owner"||j.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.fullAccess")}):s.jsx("span",{className:"text-sm text-muted-foreground",children:e("settings.roles.basicAccess")});const L=j.role,ee=[];return L.allowsAllStaticPermissions?ee.push(e("settings.roles.fullOrgAccess")):L.staticPermissionCount&&L.staticPermissionCount>0&&ee.push(e("settings.roles.orgPermsCount",{count:L.staticPermissionCount})),L.allowsAllConnections?ee.push(e("settings.roles.allConnections")):L.connectionCount&&L.connectionCount>0&&ee.push(e("settings.roles.connectionCount",{count:L.connectionCount})),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:ee.length>0?ee.join(", "):e("settings.roles.noPermissions")})},t[41]=e,t[42]=P):P=t[42];let K;t[43]!==z||t[44]!==P?(K={id:"permissions",header:z,render:P,cellClassName:"flex-1 min-w-0"},t[43]=z,t[44]=P,t[45]=K):K=t[45];let V;t[46]!==e?(V=e("settings.roles.columnMembers"),t[46]=e,t[47]=V):V=t[47];let U;t[48]!==V?(U={id:"members",header:V,render:Ws,cellClassName:"w-24 shrink-0"},t[48]=V,t[49]=U):U=t[49];let B;t[50]!==e?(B={id:"actions",header:"",render:j=>j.kind==="builtin"?null:s.jsxs(wt,{children:[s.jsx(Gt,{asChild:!0,children:s.jsx(ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:qs,children:s.jsx(Bt,{size:16})})}),s.jsx(kt,{align:"end",onClick:Hs,children:s.jsxs(Ut,{variant:"destructive",onClick:()=>{const L=j.role;L.id&&o({id:L.id,label:L.label})},children:[s.jsx(Vt,{size:16}),e("settings.roles.delete")]})})]}),cellClassName:"w-12 shrink-0"},t[50]=e,t[51]=B):B=t[51];let Z;t[52]!==k||t[53]!==y||t[54]!==K||t[55]!==U||t[56]!==B?(Z=[k,y,K,U,B],t[52]=k,t[53]=y,t[54]=K,t[55]=U,t[56]=B,t[57]=Z):Z=t[57];const X=Z;let te;t[58]!==p?(te=j=>{if(j.kind==="builtin")p(`builtin-${j.role.role}`);else{const L=j.role;p(L.id)}},t[58]=p,t[59]=te):te=t[59];const le=te;if(R){let j;t[60]!==p?(j=()=>p(void 0),t[60]=p,t[61]=j):j=t[61];let L;return t[62]!==x||t[63]!==p?(L=()=>{x(),p(void 0)},t[62]=x,t[63]=p,t[64]=L):L=t[64],s.jsx(zs,{target:R,onBack:j,onSaved:L},Fs(R))}let F;t[65]!==e?(F=e("settings.roles.pageTitle"),t[65]=e,t[66]=F):F=t[66];let H;t[67]!==F?(H=s.jsx(ie.Title,{children:F}),t[67]=F,t[68]=H):H=t[68];let T;t[69]!==e?(T=e("settings.roles.searchPlaceholder"),t[69]=e,t[70]=T):T=t[70];let G;t[71]===Symbol.for("react.memo_cache_sentinel")?(G=j=>{j.key==="Escape"&&(n(""),j.target.blur())},t[71]=G):G=t[71];let Q;t[72]!==l||t[73]!==T?(Q=s.jsx(Qe,{value:l,onChange:n,placeholder:T,className:"w-full md:w-[375px]",onKeyDown:G}),t[72]=l,t[73]=T,t[74]=Q):Q=t[74];let q;t[75]!==p?(q=()=>p("new"),t[75]=p,t[76]=q):q=t[76];let ne;t[77]===Symbol.for("react.memo_cache_sentinel")?(ne=s.jsx(ze,{size:16}),t[77]=ne):ne=t[77];let se;t[78]!==e?(se=e("settings.roles.createRole"),t[78]=e,t[79]=se):se=t[79];let oe;t[80]!==q||t[81]!==se?(oe=s.jsxs(ce,{onClick:q,children:[ne,se]}),t[80]=q,t[81]=se,t[82]=oe):oe=t[82];let ue;t[83]!==Q||t[84]!==oe?(ue=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[Q,oe]}),t[83]=Q,t[84]=oe,t[85]=ue):ue=t[85];let fe;t[86]!==l||t[87]!==e?(fe=l?s.jsx(tt,{title:e("settings.roles.noRolesFound"),description:e("settings.roles.noRolesMatchSearch",{search:l})}):s.jsx(tt,{title:e("settings.roles.noRoles"),description:e("settings.roles.createRoleGetStarted")}),t[86]=l,t[87]=e,t[88]=fe):fe=t[88];let ge;t[89]!==C||t[90]!==X||t[91]!==le||t[92]!==fe?(ge=s.jsx(Yt,{columns:X,data:C,isLoading:!1,onRowClick:le,emptyState:fe}),t[89]=C,t[90]=X,t[91]=le,t[92]=fe,t[93]=ge):ge=t[93];let he;t[94]!==H||t[95]!==ue||t[96]!==ge?(he=s.jsx(ie.Content,{children:s.jsx(ie.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[H,ue,ge]})})}),t[94]=H,t[95]=ue,t[96]=ge,t[97]=he):he=t[97];const Ve=i!==null;let Ge;t[98]===Symbol.for("react.memo_cache_sentinel")?(Ge=j=>!j&&o(null),t[98]=Ge):Ge=t[98];let xe;t[99]!==e?(xe=e("settings.roles.deleteRoleTitle"),t[99]=e,t[100]=xe):xe=t[100];let pe;t[101]!==xe?(pe=s.jsx(ft,{children:xe}),t[101]=xe,t[102]=pe):pe=t[102];const Ye=i?.label??"";let Te;t[103]!==e||t[104]!==Ye?(Te=e("settings.roles.deleteRoleConfirm",{role:Ye}),t[103]=e,t[104]=Ye,t[105]=Te):Te=t[105];let Ee;t[106]!==Te?(Ee=s.jsx(gt,{children:Te}),t[106]=Te,t[107]=Ee):Ee=t[107];let _e;t[108]!==pe||t[109]!==Ee?(_e=s.jsxs(ht,{children:[pe,Ee]}),t[108]=pe,t[109]=Ee,t[110]=_e):_e=t[110];let Ie;t[111]!==e?(Ie=e("settings.roles.cancel"),t[111]=e,t[112]=Ie):Ie=t[112];let Re;t[113]!==Ie?(Re=s.jsx(xt,{children:Ie}),t[113]=Ie,t[114]=Re):Re=t[114];let Se;t[115]!==r||t[116]!==i?(Se=()=>{i?.id&&r.mutate(i.id),o(null)},t[115]=r,t[116]=i,t[117]=Se):Se=t[117];let Ne;t[118]!==e?(Ne=e("settings.roles.delete"),t[118]=e,t[119]=Ne):Ne=t[119];let Ce;t[120]!==Se||t[121]!==Ne?(Ce=s.jsx(pt,{onClick:Se,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:Ne}),t[120]=Se,t[121]=Ne,t[122]=Ce):Ce=t[122];let be;t[123]!==Re||t[124]!==Ce?(be=s.jsxs(Tt,{children:[Re,Ce]}),t[123]=Re,t[124]=Ce,t[125]=be):be=t[125];let Ae;t[126]!==_e||t[127]!==be?(Ae=s.jsxs(ut,{children:[_e,be]}),t[126]=_e,t[127]=be,t[128]=Ae):Ae=t[128];let Oe;t[129]!==Ve||t[130]!==Ae?(Oe=s.jsx(mt,{open:Ve,onOpenChange:Ge,children:Ae}),t[129]=Ve,t[130]=Ae,t[131]=Oe):Oe=t[131];let ke;return t[132]!==he||t[133]!==Oe?(ke=s.jsxs(ie,{children:[he,Oe]}),t[132]=he,t[133]=Oe,t[134]=ke):ke=t[134],ke}function Hs(t){return t.stopPropagation()}function qs(t){return t.stopPropagation()}function Ws(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function Xs(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:W("size-2.5 rounded-full shrink-0",dt(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(ct,{size:12,className:"text-muted-foreground shrink-0"})]})}function Js(t,e){Fe("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),Me.error(t instanceof Error?t.message:"Failed to delete role")}function el(){const t=J.c(7),e=re();let l;t[0]!==e?(l=e("settings.roles.failedToLoad"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n=s.jsx(ie,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:l})})}),t[2]=l,t[3]=n):n=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx($.Suspense,{fallback:s.jsx(ie,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(je,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Zs,{})}),t[4]=i):i=t[4];let o;return t[5]!==n?(o=s.jsx(Dt,{fallback:n,children:i}),t[5]=n,t[6]=o):o=t[6],o}function Po(){const t=J.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx($s,{area:"roles",children:s.jsx(el,{})}),t[0]=e):e=t[0],e}export{Po as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-Cm227W9R.js","assets/index-BQFOspRh.js","assets/index-C-bJCsC6.css","assets/Tool02-Bk0Wi_jc.js","assets/CheckCircle-UOyFv4rE.js","assets/Settings02-D_by58BO.js","assets/use-mcp-client-B9fn1TBn.js","assets/auth-B56MWIKT.js","assets/useInfiniteQuery-C-kiHDyf.js","assets/use-infinite-scroll-Bct8OYtv.js","assets/studio-tools-BETupmQh.js","assets/badge-CXZR0JJ6.js","assets/input-DLmq-Bri.js","assets/dropdown-menu-DPde1UkW.js","assets/Check-Dc66au0h.js","assets/ChevronRight-DjBVHQoY.js","assets/DotsVertical-CILzGe_q.js","assets/table-DHyF1BO5.js","assets/toggle-group-DVALkDJ2.js","assets/use-view-mode-Qv39nezx.js","assets/use-mobile-CnfmCPF3.js","assets/FilterLines-DcRWfBwT.js","assets/Globe01-W4lyjKuH.js","assets/SearchMd-CDwUuDyr.js","assets/dialog-Cg0277WK.js","assets/X-DmV-M3--.js","assets/AlertCircle-BWppLd8c.js","assets/Upload01-De1aQPW9.js","assets/metadata-dUsYcpuu.js","assets/alert-dialog-Bpd-0p4I.js","assets/card-B-Mzv0lS.js","assets/Trash01-Dk2U_er_.js","assets/label-B1DonsU-.js","assets/select-BoHatn08.js","assets/tooltip-CpPLj5ml.js","assets/ChevronDown-LNz16DWG.js","assets/ChevronUp-DZ-mKv_H.js","assets/switch-D5nHMM9-.js","assets/textarea-DLfz9L-W.js","assets/ArrowLeft-cFWJcCye.js","assets/XCircle-Cj1jhbDm.js","assets/checkbox-DU-r9RK1.js","assets/Eye-BT74JrOy.js","assets/LinkExternal01-CP1N0ekO.js","assets/use-copy-C6oZHBaC.js","assets/Copy01-DPPY_ooc.js","assets/Key01-Bk2QhvNY.js","assets/Plus-9KDBMlCX.js","assets/mcp-oauth-0Wpz4XYZ.js","assets/Play-DrC9uZbx.js"])))=>i.map(i=>d[i]);
2
- import{c as m,d as n,f as c,j as t,k as f,r as l,aG as p}from"./index-BQFOspRh.js";import{R as u}from"./require-capability-B3XvoArB.js";import"./use-capability-CxUt0m8I.js";import"./access-gate-CcFlUK4A.js";import"./capability-load-error-CKW0147S.js";const g=l.lazy(()=>p(()=>import("./registry-layout-Cm227W9R.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49])));function j(){const e=m.c(5),i=n();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org"},e[0]=s):s=e[0];const{org:o}=c(s);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"h-full flex items-center justify-center",children:t.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=r):r=e[1];let a;return e[2]!==i||e[3]!==o?(a=t.jsx(u,{capability:"registry:manage",area:"the registry",children:t.jsx(l.Suspense,{fallback:r,children:t.jsx(g,{onBack:()=>i({to:"/$org/settings/store",params:{org:o}})})})}),e[2]=i,e[3]=o,e[4]=a):a=e[4],a}export{j as default};
@@ -1 +0,0 @@
1
- import{I as u}from"./use-infinite-scroll-Bct8OYtv.js";import{e4 as i}from"./index-BQFOspRh.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./use-infinite-scroll-Bct8OYtv.js";import{e4 as u,b2 as n}from"./index-BQFOspRh.js";function a(e,r){return u({...e,enabled:!0,suspense:!0,throwOnError:n},s,r)}export{a as u};