decocms 4.365.1 → 4.366.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 (356) hide show
  1. package/dist/client/assets/{AlertCircle-BPZWT1gc.js → AlertCircle-XJuKHE4v.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CxCPUfZu.js → AreaChart-BCoaFhTr.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-c3HIgil5.js → ArrowLeft-DQxSh6p-.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-BHzAyFwu.js → ArrowRight-B8kkUle9.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-DywwLYcR.js → ArrowUp-DxhEfgUF.js} +1 -1
  6. package/dist/client/assets/{Check-PyGET9iL.js → Check-C1q-PHCd.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-4Be5K85Z.js → CheckCircle-DJ2_kCSw.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-vY_5m8VB.js → ChevronRight-KrD_lvs_.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B9QGJbr0.js → ChevronUp-BoMcO3mB.js} +1 -1
  10. package/dist/client/assets/{Copy01-BbtQlTnV.js → Copy01-Dpbu0g_H.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-2jrzrshR.js → CreditCard01-BWqJGPbs.js} +1 -1
  12. package/dist/client/assets/{Database01-B8rfUUUF.js → Database01-DnV6gOgy.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-zFAA_as9.js → DotsVertical-qmKIPEY-.js} +1 -1
  14. package/dist/client/assets/{Download01-CSiLQIib.js → Download01-Dgak1Fxu.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-D7xML5iT.js → ErrorBarContext-CvwOCT-2.js} +1 -1
  16. package/dist/client/assets/{Eye-BRXlESxS.js → Eye-0IX71tH3.js} +1 -1
  17. package/dist/client/assets/{File02-D4JZqTxD.js → File02-D24jfSXr.js} +1 -1
  18. package/dist/client/assets/{GitBranch01-95kZh6WB.js → GitBranch01-CUORzB3l.js} +1 -1
  19. package/dist/client/assets/{Globe01-Dej65_H6.js → Globe01-CUYpQQw5.js} +1 -1
  20. package/dist/client/assets/{HardDrive-DCLQ4vdy.js → HardDrive-DVjlYw4P.js} +1 -1
  21. package/dist/client/assets/{Image01-Dd-Rx_B5.js → Image01-eFB14jbm.js} +1 -1
  22. package/dist/client/assets/{Key01-CQFO2R8H.js → Key01-BxQMUsAT.js} +1 -1
  23. package/dist/client/assets/{Link01-pGxgI9VT.js → Link01-B5g-C-EB.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-Jetqi62I.js → LinkExternal01-nAvM9RDc.js} +1 -1
  25. package/dist/client/assets/{MessageCircle01-D2dDPrBD.js → MessageCircle01-A1ZRNwnF.js} +1 -1
  26. package/dist/client/assets/{Monitor01-Bw-h-DKp.js → Monitor01-BhVb_zrL.js} +1 -1
  27. package/dist/client/assets/{Package-CF-S4NRB.js → Package-DYTkMUtn.js} +1 -1
  28. package/dist/client/assets/{Palette-DuCZiZH-.js → Palette-BQYb1MUW.js} +1 -1
  29. package/dist/client/assets/{Play-BTJRmkRf.js → Play-BsnTlatx.js} +1 -1
  30. package/dist/client/assets/{Plus-BUGmioCX.js → Plus-yEjTZ3xq.js} +1 -1
  31. package/dist/client/assets/{Printer-B2Ij2s1c.js → Printer-tPJPBad0.js} +1 -1
  32. package/dist/client/assets/{SearchLg-De3yWxzK.js → SearchLg-CVlNOv3Z.js} +1 -1
  33. package/dist/client/assets/{SearchMd-DanltqT5.js → SearchMd-BMTY9cLH.js} +1 -1
  34. package/dist/client/assets/{Sector-DqvqR1iU.js → Sector-C5c1W9AQ.js} +1 -1
  35. package/dist/client/assets/{Settings02-C-HNbNsn.js → Settings02-vefA7RGu.js} +1 -1
  36. package/dist/client/assets/{Share07-C4Gw_nzw.js → Share07-DF3BVvZU.js} +1 -1
  37. package/dist/client/assets/{Shield01-7bhnSYVs.js → Shield01-B7o7Mevu.js} +1 -1
  38. package/dist/client/assets/{Stars01-BmtGexbk.js → Stars01-t5rRlm9e.js} +1 -1
  39. package/dist/client/assets/{Sun-D5AClOdh.js → Sun-CGPKa4sR.js} +1 -1
  40. package/dist/client/assets/{SwitchHorizontal01-CCmSX-Ww.js → SwitchHorizontal01-jAePQEzl.js} +1 -1
  41. package/dist/client/assets/{Tool01-C1VYYGhf.js → Tool01-BHp1TvjV.js} +1 -1
  42. package/dist/client/assets/{Tool02-A5gv-OOO.js → Tool02-BsXDs0ea.js} +1 -1
  43. package/dist/client/assets/{Trash01-DkwdEhkp.js → Trash01-Bti0BEOH.js} +1 -1
  44. package/dist/client/assets/{TrendUp01-CQWL_vX5.js → TrendUp01-C7dvyZSf.js} +1 -1
  45. package/dist/client/assets/{Upload01-BlEOH700.js → Upload01-BaBM0fiO.js} +1 -1
  46. package/dist/client/assets/{User01-C2ILPAHc.js → User01-BFA_iIf6.js} +1 -1
  47. package/dist/client/assets/{UserSquare-DY1wI6ZR.js → UserSquare-zmRwIuPT.js} +1 -1
  48. package/dist/client/assets/{Users01-bydaoxbh.js → Users01-CFU3MtAQ.js} +1 -1
  49. package/dist/client/assets/{Users03-3yW32m45.js → Users03-DzNeC3KW.js} +1 -1
  50. package/dist/client/assets/{X-DejWyAyX.js → X-BQCsevd6.js} +1 -1
  51. package/dist/client/assets/{XCircle-SVZraRfE.js → XCircle-DsvQU1nM.js} +1 -1
  52. package/dist/client/assets/{XClose-wkdnmhrB.js → XClose-jA5JdXrD.js} +1 -1
  53. package/dist/client/assets/{Zap-0km1-ru7.js → Zap-BuDb189W.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-BA2ZiotX.js → ZoomOut-C8Giq-qB.js} +1 -1
  55. package/dist/client/assets/{access-gate-DpZqBld0.js → access-gate-aS3ZSQNG.js} +1 -1
  56. package/dist/client/assets/{add-connection-dialog-DB5JJjad.js → add-connection-dialog--vUKhnf0.js} +1 -1
  57. package/dist/client/assets/{agent-analytics-CAHUVirD.js → agent-analytics-BsvbNtRu.js} +1 -1
  58. package/dist/client/assets/agent-app-BgX5tmDs.js +1 -0
  59. package/dist/client/assets/{agent-assets-DsMv2xEg.js → agent-assets-r05qyq7M.js} +1 -1
  60. package/dist/client/assets/{agent-automation-BY5j9rqa.js → agent-automation-Bw_0atKJ.js} +1 -1
  61. package/dist/client/assets/{agent-automations-1_XWI0cB.js → agent-automations-mDyxJXZ-.js} +1 -1
  62. package/dist/client/assets/{agent-connect-sources-CGYs_l_4.js → agent-connect-sources-CYq4rZl5.js} +1 -1
  63. package/dist/client/assets/agent-deck-2IaPBRAG.js +1 -0
  64. package/dist/client/assets/{agent-e2e-DSg6pAM6.js → agent-e2e-D4To2z2i.js} +1 -1
  65. package/dist/client/assets/agent-file-DCf5dUWO.js +1 -0
  66. package/dist/client/assets/{agent-git-B5SGdxwk.js → agent-git-ZGfK5mrD.js} +1 -1
  67. package/dist/client/assets/{agent-hosting-CWM0TAgK.js → agent-hosting-BkqnI4yD.js} +1 -1
  68. package/dist/client/assets/{agent-icon-BjknPEfN.js → agent-icon-BayCJ1XK.js} +1 -1
  69. package/dist/client/assets/agent-library-file-DpZgptcF.js +1 -0
  70. package/dist/client/assets/{agent-monitor-D0SLtbEO.js → agent-monitor-Dr27iFK6.js} +1 -1
  71. package/dist/client/assets/{agent-overview-4MzJb6Tv.js → agent-overview-MpkHwxGY.js} +1 -1
  72. package/dist/client/assets/agent-settings-Ch0rJx38.js +1 -0
  73. package/dist/client/assets/{agent-site-editor-BDP-vSUl.js → agent-site-editor-8xYWVw5o.js} +1 -1
  74. package/dist/client/assets/agent-site-editor-code-ChIvOb2u.js +2 -0
  75. package/dist/client/assets/{agent-site-editor-content-JPYekiK_.js → agent-site-editor-content-CaS96oto.js} +2 -2
  76. package/dist/client/assets/{agent-site-editor-preview-CFLjaarK.js → agent-site-editor-preview-BT81wMtG.js} +3 -3
  77. package/dist/client/assets/agent-view-BZM6EzoY.js +1 -0
  78. package/dist/client/assets/{agent-view-guard-B7qYW-b3.js → agent-view-guard-C3muZtcp.js} +1 -1
  79. package/dist/client/assets/{agents-list-h96XaSKk.js → agents-list-LyPFGSzB.js} +1 -1
  80. package/dist/client/assets/{ai-providers-COWdzwzu.js → ai-providers-BnZyZvgS.js} +1 -1
  81. package/dist/client/assets/{alert-CvK2RkF3.js → alert-D2_bDwwt.js} +1 -1
  82. package/dist/client/assets/{alert-dialog-CDARhUOh.js → alert-dialog-C7QvHg2N.js} +1 -1
  83. package/dist/client/assets/api-keys-DqWbRfTI.js +1 -0
  84. package/dist/client/assets/{api-keys-Ba-S9F5Y.js → api-keys-GYe2WKoE.js} +1 -1
  85. package/dist/client/assets/app-editor-B1geIunv.js +1 -0
  86. package/dist/client/assets/{asset-utils-DQpbxjwd.js → asset-utils-Bjna15we.js} +1 -1
  87. package/dist/client/assets/{auth-catchall-BbOJ2FpE.js → auth-catchall-Bvf8LzyF.js} +1 -1
  88. package/dist/client/assets/{auth-entry-CIc1-YG9.js → auth-entry-DT34wonq.js} +1 -1
  89. package/dist/client/assets/{auth-Cyjh0UQp.js → auth-iWs2Fll8.js} +1 -1
  90. package/dist/client/assets/{auth-split-layout-WGnYlU-M.js → auth-split-layout-CZmbnVcH.js} +1 -1
  91. package/dist/client/assets/{authenticate-and-persist-oauth-Dgc5b4Jr.js → authenticate-and-persist-oauth-DySlq_Uz.js} +1 -1
  92. package/dist/client/assets/{automation-list-row-Dyqat6cE.js → automation-list-row-Dn5spis4.js} +1 -1
  93. package/dist/client/assets/{automation-runs-DkHp_jZr.js → automation-runs-CqG4y7Ce.js} +1 -1
  94. package/dist/client/assets/{automations-BSGRkynt.js → automations-B2DIuWhi.js} +1 -1
  95. package/dist/client/assets/{autosend-BBoss6Ia.js → autosend-Cui6QYML.js} +1 -1
  96. package/dist/client/assets/{avatar-CO3n6wLC.js → avatar-Chvwe6CH.js} +1 -1
  97. package/dist/client/assets/{badge-DUpgRwQu.js → badge-Bpi-bEgv.js} +1 -1
  98. package/dist/client/assets/{block-document-CVyeCLBq.js → block-document-BuxP8Crs.js} +1 -1
  99. package/dist/client/assets/{blocks-preview-workspace-context-CLQbGv9t.js → blocks-preview-workspace-context-Buv2D3Jl.js} +1 -1
  100. package/dist/client/assets/{breadcrumb-FJ1G6kmP.js → breadcrumb-BpphN_b3.js} +1 -1
  101. package/dist/client/assets/{buckets-BTZUX3pR.js → buckets-CdBQgn0_.js} +1 -1
  102. package/dist/client/assets/{build-improve-prompt-doc-CcAYvBOj.js → build-improve-prompt-doc-B_ubqk7c.js} +1 -1
  103. package/dist/client/assets/{bulk-category-panel-9cEfFq4L.js → bulk-category-panel-CJHqLMZD.js} +1 -1
  104. package/dist/client/assets/{calendar-Bb8OUNd8.js → calendar-Bv35C1ab.js} +1 -1
  105. package/dist/client/assets/{capability-load-error-Ctg9pY-k.js → capability-load-error-DQhiwip8.js} +1 -1
  106. package/dist/client/assets/{cards-CbRL3hJc.js → cards-C9ouoOLf.js} +1 -1
  107. package/dist/client/assets/category-editor-CT7pGo6h.js +1 -0
  108. package/dist/client/assets/{chart-DqNrc8dZ.js → chart-Dt0bzQmG.js} +1 -1
  109. package/dist/client/assets/{chat-context-B40ngn3f.js → chat-context-CQfynmbs.js} +1 -1
  110. package/dist/client/assets/{checkbox-STVvKX8k.js → checkbox-CFnSur5S.js} +1 -1
  111. package/dist/client/assets/{choose-editor-DVdbAy2O.js → choose-editor-BDdFG0AK.js} +1 -1
  112. package/dist/client/assets/{cli-auth-success-DmTxFaq5.js → cli-auth-success-B6dF4CkI.js} +1 -1
  113. package/dist/client/assets/{client-icons-CR99ZCoE.js → client-icons-DWHe8UUx.js} +1 -1
  114. package/dist/client/assets/{collapsible-Cf4ZreOo.js → collapsible-DM7kUiaH.js} +1 -1
  115. package/dist/client/assets/{collection-detail-oWaNi-hD.js → collection-detail-D0E2zvyY.js} +1 -1
  116. package/dist/client/assets/{collection-display-button-CkKXuKd-.js → collection-display-button-rOJe9HxS.js} +1 -1
  117. package/dist/client/assets/{collection-search-CDaDEv2c.js → collection-search-hghYGxIR.js} +1 -1
  118. package/dist/client/assets/{collection-table-wrapper-B036tBOl.js → collection-table-wrapper-BOgV2UJf.js} +1 -1
  119. package/dist/client/assets/{collection-tabs-CkeFxbT3.js → collection-tabs-B5FMyHR6.js} +1 -1
  120. package/dist/client/assets/{command-D7YFT70c.js → command-DkQDbWvX.js} +1 -1
  121. package/dist/client/assets/{command-palette-store-BcwFt5eE.js → command-palette-store-BZa_pZih.js} +1 -1
  122. package/dist/client/assets/{commerce-onboarding-BcoYZTQG.js → commerce-onboarding-C6atsXy1.js} +1 -1
  123. package/dist/client/assets/{companion-mcps-section-CS9qQ8v0.js → companion-mcps-section-DOV9ASHT.js} +1 -1
  124. package/dist/client/assets/{connect-BM6ZfhOz.js → connect-CppHC-0m.js} +1 -1
  125. package/dist/client/assets/{connect-layout-De5w9TxQ.js → connect-layout-TfX5Xr-V.js} +1 -1
  126. package/dist/client/assets/{connection-di4Fldx3.js → connection-C5by_7-w.js} +1 -1
  127. package/dist/client/assets/{connection-card-kANJRcvf.js → connection-card-CIm7CAF2.js} +1 -1
  128. package/dist/client/assets/{connection-detail-Ckkh02Py.js → connection-detail-BZRvhztL.js} +1 -1
  129. package/dist/client/assets/{connection-form-helpers-fWne-kOd.js → connection-form-helpers-MBoiNuM1.js} +1 -1
  130. package/dist/client/assets/{connections-BKm7IMTt.js → connections-Bexdo6ot.js} +1 -1
  131. package/dist/client/assets/{create-organization-dialog-BmgLNeEx.js → create-organization-dialog-CoEOmU3m.js} +1 -1
  132. package/dist/client/assets/{decofile-api-BhjpITFN.js → decofile-api-C_KdReLg.js} +1 -1
  133. package/dist/client/assets/{decopilot-ClO0uusm.js → decopilot-055IFff8.js} +1 -1
  134. package/dist/client/assets/{dialog-Dxe0Jgna.js → dialog-CeIxtPXR.js} +1 -1
  135. package/dist/client/assets/{discover-BdugM7FR.js → discover-CUTidJwM.js} +1 -1
  136. package/dist/client/assets/{domain-settings-Dp-mWih8.js → domain-settings-BzmIDyZ_.js} +1 -1
  137. package/dist/client/assets/{download-app-dialog-lwMMuYsF.js → download-app-dialog-DR0vSmtX.js} +1 -1
  138. package/dist/client/assets/{drawer-1GzYkddr.js → drawer-B1EgD4Vp.js} +1 -1
  139. package/dist/client/assets/{dropdown-menu-Bws_0K_q.js → dropdown-menu-BGNWIYx7.js} +1 -1
  140. package/dist/client/assets/{editor-U5ucetu-.js → editor-mbH0e5JY.js} +1 -1
  141. package/dist/client/assets/{empty-state-C3Z_6q55.js → empty-state-BCbvEzAs.js} +1 -1
  142. package/dist/client/assets/{empty-state-BjMIbq91.js → empty-state-kLQdVwor.js} +1 -1
  143. package/dist/client/assets/{extract-connection-data-BAjOM4U5.js → extract-connection-data-CkjHAGlh.js} +1 -1
  144. package/dist/client/assets/{file-explorer-LFC3Ac60.js → file-explorer-BsgzsRXw.js} +1 -1
  145. package/dist/client/assets/{file-preview-n35lcg8c.js → file-preview-Dt-0WoSN.js} +1 -1
  146. package/dist/client/assets/{file-share-button-D04rfik7.js → file-share-button-BEGbkFdF.js} +1 -1
  147. package/dist/client/assets/{file-type-icon-C4dI9q_n.js → file-type-icon-HWuHxj-a.js} +1 -1
  148. package/dist/client/assets/{folder-icon-pWHmymOf.js → folder-icon-Dq-1z23e.js} +1 -1
  149. package/dist/client/assets/{form-CRSWplOb.js → form-CLpS84nN.js} +1 -1
  150. package/dist/client/assets/{gateway-client-D45uHvIc.js → gateway-client-BjVHcW6F.js} +1 -1
  151. package/dist/client/assets/{general-C7RGB0Oj.js → general-D8KTsCfw.js} +1 -1
  152. package/dist/client/assets/{github-icon-CsH29e4W.js → github-icon-CX5G8yKI.js} +1 -1
  153. package/dist/client/assets/{home-CpLcM3nB.js → home-gbcG8VY1.js} +1 -1
  154. package/dist/client/assets/{hooks-CE7d6Dy1.js → hooks-A22NZVjF.js} +1 -1
  155. package/dist/client/assets/{hooks-CxBYuMc8.js → hooks-BqIq5c7A.js} +1 -1
  156. package/dist/client/assets/{index-CVJEcf37.js → index-BMJCLbj5.js} +2 -2
  157. package/dist/client/assets/{index-Clbrhj--.js → index-BYpQoJPO.js} +1 -1
  158. package/dist/client/assets/{index-BRigOSQu.js → index-COEhLDjd.js} +1 -1
  159. package/dist/client/assets/{index-BJDZS0O4.js → index-CTarYheD.js} +3 -3
  160. package/dist/client/assets/{index-4fsCOuPz.js → index-CukAZjhb.js} +1 -1
  161. package/dist/client/assets/{index-B53DWiGz.js → index-DEHfBZJE.js} +1 -1
  162. package/dist/client/assets/{index-DsI9yqDT.js → index-DXKIkJj_.js} +1 -1
  163. package/dist/client/assets/{index-CBcq1VSB.js → index-DomshhPl.js} +1 -1
  164. package/dist/client/assets/{index-CyYEAXEU.js → index-Dq_pIFW4.js} +1 -1
  165. package/dist/client/assets/{index-Dio39w6e.js → index-DtZ4Xdhl.js} +1 -1
  166. package/dist/client/assets/{index-CxOPSFx9.js → index-DwyoyS-u.js} +1 -1
  167. package/dist/client/assets/{index-CcEd_wWL.js → index-S02-0oEV.js} +1 -1
  168. package/dist/client/assets/{index-DAN6A7hZ.js → index-XMcYehIU.js} +1 -1
  169. package/dist/client/assets/{index-BQwroePl.js → index-hS97rVcF.js} +1 -1
  170. package/dist/client/assets/{index-CFUteTrc.js → index-jRUJ2Odt.js} +1 -1
  171. package/dist/client/assets/{index-redirect-Bw20Ba6Y.js → index-redirect-C2-YpKqU.js} +1 -1
  172. package/dist/client/assets/{index-CblYf_yB.js → index-xNOJUK_V.js} +1 -1
  173. package/dist/client/assets/{infiniteQueryObserver-BSmIgXE3.js → infiniteQueryObserver-BpxpVSEY.js} +1 -1
  174. package/dist/client/assets/{infra-billing-DFEuQtvU.js → infra-billing-4VvMq4f7.js} +1 -1
  175. package/dist/client/assets/{input-C8MQoDCb.js → input-BHyVG0eO.js} +1 -1
  176. package/dist/client/assets/{input-DD_DI_Km.js → input-czh8s2Kx.js} +1 -1
  177. package/dist/client/assets/{input-CQyA0V5b.js → input-hZ73BeN6.js} +1 -1
  178. package/dist/client/assets/{integration-icon-BV7Q9XOu.js → integration-icon-BEcN9aOn.js} +1 -1
  179. package/dist/client/assets/{label-Cfl8uGDP.js → label-Cn5P-MxH.js} +1 -1
  180. package/dist/client/assets/{last-preview-page-B_KVLuYW.js → last-preview-page-CGY2ekfv.js} +1 -1
  181. package/dist/client/assets/{layout-Dm4T-Vne.js → layout-DWBUXuba.js} +1 -1
  182. package/dist/client/assets/{legacy-agents-deep-Dd57JUEI.js → legacy-agents-deep-Dp_UGZ0N.js} +1 -1
  183. package/dist/client/assets/{legacy-main-redirect-CWvMqmhB.js → legacy-main-redirect-tszfeXT6.js} +1 -1
  184. package/dist/client/assets/{library-3DHQWojm.js → library-ClsXt0Rx.js} +1 -1
  185. package/dist/client/assets/{login-CupMnybl.js → login-CuNrlb8L.js} +1 -1
  186. package/dist/client/assets/{markdown-BvSl7QX1.js → markdown-D53j_yF1.js} +1 -1
  187. package/dist/client/assets/{mcp-app-renderer-DJ7Ve9Yy.js → mcp-app-renderer-MmA5afeR.js} +1 -1
  188. package/dist/client/assets/{mcp-oauth-OvlzbMCP.js → mcp-oauth-wZEV-nrV.js} +1 -1
  189. package/dist/client/assets/{members-Cuiahh5G.js → members-BDern1X1.js} +1 -1
  190. package/dist/client/assets/{message-templates-wocfrCJF.js → message-templates-BVWUC7db.js} +1 -1
  191. package/dist/client/assets/{mini-report-page-4Bd0cMlr.js → mini-report-page-CBhNyhHF.js} +1 -1
  192. package/dist/client/assets/{monaco-editor-B2KCfh7a.js → monaco-editor-Bs2NlVt9.js} +1 -1
  193. package/dist/client/assets/{monitoring-stats-row-CufhVlNy.js → monitoring-stats-row-BCnT0CYV.js} +1 -1
  194. package/dist/client/assets/{multi-select-BHFunwbq.js → multi-select-np6GoSDC.js} +1 -1
  195. package/dist/client/assets/{mustache-DyjElMuJ.js → mustache-BFUzNb8Y.js} +1 -1
  196. package/dist/client/assets/{oauth-callback-ai-provider-Czk5gVgf.js → oauth-callback-ai-provider-CkxJpC38.js} +1 -1
  197. package/dist/client/assets/{oauth-callback-4BOm__rV.js → oauth-callback-dtMqJWcs.js} +1 -1
  198. package/dist/client/assets/{onboarding-D2PsWH4h.js → onboarding-Ccv0iKAy.js} +1 -1
  199. package/dist/client/assets/{optimistic-project-sidebar-views-B3vU1qR8.js → optimistic-project-sidebar-views-CXv7s88e.js} +1 -1
  200. package/dist/client/assets/{organization-choice-C-PRPVPc.js → organization-choice-DDIIA4r_.js} +1 -1
  201. package/dist/client/assets/{orgs-DpmY6dw4.js → orgs-Dh7PvVlK.js} +1 -1
  202. package/dist/client/assets/{page-seo-form-gUB5sB3u.js → page-seo-form-B4hHysuS.js} +1 -1
  203. package/dist/client/assets/{pair-98UY-0wm.js → pair-CC2n4e8O.js} +1 -1
  204. package/dist/client/assets/{popover-DAJR0ej2.js → popover-C4BN0JR_.js} +1 -1
  205. package/dist/client/assets/{post-calendar-4XiTJrif.js → post-calendar-CqjbypuY.js} +1 -1
  206. package/dist/client/assets/{post-editor-CXRn_RK8.js → post-editor-BWSgYmr7.js} +1 -1
  207. package/dist/client/assets/{preview-content-Tw_jYCgT.js → preview-content-B1sbXWxj.js} +1 -1
  208. package/dist/client/assets/{preview-dialog-Bg_Wo7YI.js → preview-dialog-BpdP9L1J.js} +1 -1
  209. package/dist/client/assets/{primitives-BfIYsPoI.js → primitives-ClrTve8u.js} +1 -1
  210. package/dist/client/assets/{profile-CDs1X-Le.js → profile-C62Csgxs.js} +1 -1
  211. package/dist/client/assets/{project-app-view-BPLB01Cj.js → project-app-view-DuZ0al0I.js} +1 -1
  212. package/dist/client/assets/{project-feed-CeGbFvMT.js → project-feed-e56BAulp.js} +1 -1
  213. package/dist/client/assets/{project-icon-D1x6NEST.js → project-icon-DNZ9K5Pu.js} +1 -1
  214. package/dist/client/assets/project-reports-qkJYJvf_.js +1 -0
  215. package/dist/client/assets/project-tasks-CuBIIqQe.js +1 -0
  216. package/dist/client/assets/{prompts-B-VqD1p-.js → prompts-CvfXhtmL.js} +1 -1
  217. package/dist/client/assets/record-editor-BgdpiMZZ.js +1 -0
  218. package/dist/client/assets/{redirect-editor-CgXt_KHn.js → redirect-editor-DZqPekvg.js} +1 -1
  219. package/dist/client/assets/registry-CpSQCNCo.js +2 -0
  220. package/dist/client/assets/{registry-layout-SseogjtO.js → registry-layout-EwRdwTrZ.js} +1 -1
  221. package/dist/client/assets/{reports-Q6oueood.js → reports-B7gb9J4r.js} +1 -1
  222. package/dist/client/assets/{reports-tab-DE-TYPly.js → reports-tab-A4b9K1C9.js} +2 -2
  223. package/dist/client/assets/reports-u1fvgaiq.js +1 -0
  224. package/dist/client/assets/{repositories-BoiOgwFm.js → repositories-CetKo6mn.js} +1 -1
  225. package/dist/client/assets/{repository-import-picker-DyEfEliR.js → repository-import-picker-B2eEODjs.js} +1 -1
  226. package/dist/client/assets/{repository-picker-DWJtJkZW.js → repository-picker-RITOXfgy.js} +1 -1
  227. package/dist/client/assets/{require-capability-DljrHpsM.js → require-capability-v3_FPkyC.js} +1 -1
  228. package/dist/client/assets/{required-auth-layout-TTElzhIM.js → required-auth-layout-Udaxv9eU.js} +1 -1
  229. package/dist/client/assets/{reset-password-B1ylDKoe.js → reset-password-BekScov3.js} +1 -1
  230. package/dist/client/assets/{resizable-DOW_fL7z.js → resizable-BH4I1yXS.js} +1 -1
  231. package/dist/client/assets/{review-settings-DHvMG4G0.js → review-settings-BSCl1l21.js} +1 -1
  232. package/dist/client/assets/{rich-text-link-control-HLhFAha7.js → rich-text-link-control-2exMlBO3.js} +1 -1
  233. package/dist/client/assets/{roles-BWbTlJZc.js → roles-CVOjxj6F.js} +1 -1
  234. package/dist/client/assets/{route-D26IsMv1.js → route-BIkrj02L.js} +1 -1
  235. package/dist/client/assets/{route-D_kbg4iH.js → route-D_umqTlk.js} +1 -1
  236. package/dist/client/assets/{route-jdsFbZW7.js → route-Nea_-0wb.js} +1 -1
  237. package/dist/client/assets/{runnable-block-editor-Bi0Cv7yD.js → runnable-block-editor-tdcflVCm.js} +1 -1
  238. package/dist/client/assets/{sandbox-lifecycle-context-BbTDNpeS.js → sandbox-lifecycle-context-qEhBBhZu.js} +1 -1
  239. package/dist/client/assets/{schema-BegvnGCM.js → schema-B763_7WQ.js} +1 -1
  240. package/dist/client/assets/{scroll-area-CxxMejtk.js → scroll-area-rekkGy6B.js} +1 -1
  241. package/dist/client/assets/{search-input-axkgbTZ7.js → search-input-BNWWtT__.js} +1 -1
  242. package/dist/client/assets/{secrets-kzqIbFmd.js → secrets-DWkk0n1_.js} +1 -1
  243. package/dist/client/assets/{sections-editor-B_t9OrnC.js → sections-editor-DC9tNRXs.js} +1 -1
  244. package/dist/client/assets/{select-B2GRzoG3.js → select-NGX2S-jl.js} +1 -1
  245. package/dist/client/assets/{select-model-BRHN792B.js → select-model-otNOnmWQ.js} +1 -1
  246. package/dist/client/assets/{seo-editor-DvngP1ti.js → seo-editor-DlBT_48J.js} +1 -1
  247. package/dist/client/assets/{settings-tab-DFjZ-Fkn.js → settings-tab-BdBT7bp-.js} +1 -1
  248. package/dist/client/assets/{sheet-BePDARR0.js → sheet-zj8JvjRG.js} +1 -1
  249. package/dist/client/assets/{shell-layout-D2wS-FNX.js → shell-layout-DJaYVrhN.js} +1 -1
  250. package/dist/client/assets/{sidebar-IspuJbto.js → sidebar-8Wi6Oive.js} +1 -1
  251. package/dist/client/assets/{skill-preview-BdtuUFgV.js → skill-preview-_tRqFXnw.js} +1 -1
  252. package/dist/client/assets/{skills-QJ3mhNvI.js → skills-fa444avf.js} +1 -1
  253. package/dist/client/assets/{sso-DKhL-ARh.js → sso-BYGtZudI.js} +1 -1
  254. package/dist/client/assets/{store-B9Az6md3.js → store-RInt4c6N.js} +1 -1
  255. package/dist/client/assets/store-registry-DZRSLoUe.js +2 -0
  256. package/dist/client/assets/{switch-DJ4Dr2_V.js → switch-BYmXNEWm.js} +1 -1
  257. package/dist/client/assets/{synced-repos-flbNGs20.js → synced-repos-wQG6FrsT.js} +1 -1
  258. package/dist/client/assets/{table-CrJ9LOSc.js → table-ly1wsT3x.js} +1 -1
  259. package/dist/client/assets/{tabs-DVMaAAMA.js → tabs-VVgXU6J_.js} +1 -1
  260. package/dist/client/assets/{task-board-SlBuwhrX.js → task-board-BOE8KmlV.js} +1 -1
  261. package/dist/client/assets/{task-route-B4hPzw6u.js → task-route-Do0hSewl.js} +1 -1
  262. package/dist/client/assets/{task-status-DhZZzZ6G.js → task-status-N3H46jqP.js} +1 -1
  263. package/dist/client/assets/tasks-katsCy3p.js +1 -0
  264. package/dist/client/assets/{tasks-B_rqCvr1.js → tasks-momKk7wX.js} +1 -1
  265. package/dist/client/assets/{textarea-BDMLJ5G-.js → textarea-BxuD2hUP.js} +1 -1
  266. package/dist/client/assets/{thread-intent-C7DpKTRQ.js → thread-intent-Dm0IBq_B.js} +1 -1
  267. package/dist/client/assets/{thread-route-BzWllNYG.js → thread-route-BBIxLMFt.js} +1 -1
  268. package/dist/client/assets/{thread-route-Bc63tvFc.js → thread-route-C8bWbEqf.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-CiausLhX.js → thread-sheet-body-B2nleyoO.js} +1 -1
  270. package/dist/client/assets/{toggle-group-BW8cP6lf.js → toggle-group-Ce7pnXJo.js} +1 -1
  271. package/dist/client/assets/{toolbar-icon-button-A2ebiBUr.js → toolbar-icon-button-CW5-GSO0.js} +1 -1
  272. package/dist/client/assets/{tooltip-B7VLfO9w.js → tooltip-Duh82s_3.js} +1 -1
  273. package/dist/client/assets/{track-BGU8HJCB.js → track-UC7tcaDa.js} +1 -1
  274. package/dist/client/assets/{types-CrAbOCy3.js → types-9rIOtXyt.js} +1 -1
  275. package/dist/client/assets/{usage-stats-Bf1Ukas_.js → usage-stats-BVTzfYab.js} +1 -1
  276. package/dist/client/assets/{use-ai-providers-R1Jac-4Q.js → use-ai-providers-C1gC5KZd.js} +1 -1
  277. package/dist/client/assets/{use-automations-BzLd_Cf7.js → use-automations-l3TtnJzn.js} +1 -1
  278. package/dist/client/assets/{use-autosave-BezKrA6F.js → use-autosave-CrWD9EGm.js} +1 -1
  279. package/dist/client/assets/{use-commerce-diagnostic-DTGIqIpu.js → use-commerce-diagnostic-D_4QVDXA.js} +1 -1
  280. package/dist/client/assets/{use-connect-companion-CgerJAPe.js → use-connect-companion-BmZOXkYb.js} +1 -1
  281. package/dist/client/assets/{use-connection-B4t4VJEN.js → use-connection-BqdoJ4Oy.js} +1 -1
  282. package/dist/client/assets/{use-copy-DQwrjGi4.js → use-copy-CNVX7-Qb.js} +1 -1
  283. package/dist/client/assets/{use-create-virtual-mcp-CHEKOqdh.js → use-create-virtual-mcp-Ban-XwYm.js} +1 -1
  284. package/dist/client/assets/{use-date-fns-locale-m0Q-8AAg.js → use-date-fns-locale-DT8uuZ88.js} +1 -1
  285. package/dist/client/assets/{use-debounced-autosave-C82NqRut.js → use-debounced-autosave-CpgUZnAZ.js} +1 -1
  286. package/dist/client/assets/{use-debounced-value-SjJ8k_tD.js → use-debounced-value-D0zC9Ypj.js} +1 -1
  287. package/dist/client/assets/{use-deco-credits-CIfhJ3OU.js → use-deco-credits-D3zsqMir.js} +1 -1
  288. package/dist/client/assets/{use-decopilot-events-DDnHJjGY.js → use-decopilot-events-BhWToYSR.js} +1 -1
  289. package/dist/client/assets/{use-delete-connection-BWW3Qwe4.js → use-delete-connection-BiX9HqWG.js} +1 -1
  290. package/dist/client/assets/{use-deployment-admin-D4Et99Id.js → use-deployment-admin-BeJGIguj.js} +1 -1
  291. package/dist/client/assets/{use-fast-preview-draft-url-B8C-G0p2.js → use-fast-preview-draft-url-CsLWv0Mh.js} +1 -1
  292. package/dist/client/assets/{use-file-configs-CKcyFOK-.js → use-file-configs-CELrFXoI.js} +1 -1
  293. package/dist/client/assets/{use-infinite-scroll-C88xvDJq.js → use-infinite-scroll-PJEXgCMU.js} +1 -1
  294. package/dist/client/assets/{use-join-requests-CtMSd2H7.js → use-join-requests-BgWAmaKE.js} +1 -1
  295. package/dist/client/assets/use-main-panel-tabs-VRnQG3gd.js +1 -0
  296. package/dist/client/assets/{use-mcp-auth-status-CF5e5Swp.js → use-mcp-auth-status-9X4Uzes7.js} +1 -1
  297. package/dist/client/assets/{use-mcp-client-DmOwsV3f.js → use-mcp-client-D_FU7Mvk.js} +1 -1
  298. package/dist/client/assets/{use-mcp-prompts-BKFfTbQi.js → use-mcp-prompts-CYS_vs6v.js} +1 -1
  299. package/dist/client/assets/{use-mcp-tools-eOThR6gd.js → use-mcp-tools-CFx3Lmte.js} +1 -1
  300. package/dist/client/assets/{use-members-mw1URW2v.js → use-members-Du0dxWYm.js} +1 -1
  301. package/dist/client/assets/{use-mobile-WPuOYoIV.js → use-mobile-DSAvRL1q.js} +1 -1
  302. package/dist/client/assets/{use-navigate-to-agent-zGc1-u-z.js → use-navigate-to-agent-Bc_emVs6.js} +1 -1
  303. package/dist/client/assets/{use-open-billing-url-BYWSUicc.js → use-open-billing-url-WHswF0xn.js} +1 -1
  304. package/dist/client/assets/{use-org-auth-client-mMTl8cKp.js → use-org-auth-client-BzNNDK0c.js} +1 -1
  305. package/dist/client/assets/{use-org-fs-Ck9VysIz.js → use-org-fs-BNYqWw9K.js} +1 -1
  306. package/dist/client/assets/{use-org-notice-Cb7z4nA0.js → use-org-notice-BY38CaDI.js} +1 -1
  307. package/dist/client/assets/{use-org-sso-CvkPQsKr.js → use-org-sso-DVgcOl01.js} +1 -1
  308. package/dist/client/assets/{use-organization-roles-wnmrYWSM.js → use-organization-roles-PSOGQNFW.js} +1 -1
  309. package/dist/client/assets/{use-organization-settings-CRw6qdb3.js → use-organization-settings-DOCBD9db.js} +1 -1
  310. package/dist/client/assets/{use-panel-navigate-ez3OqVq8.js → use-panel-navigate-DYL1ayEh.js} +1 -1
  311. package/dist/client/assets/{use-project-native-view-presence-DFjsPIlC.js → use-project-native-view-presence-C96QJnXu.js} +1 -1
  312. package/dist/client/assets/{use-project-scope-D9t-w7F3.js → use-project-scope-DRMW-kAl.js} +1 -1
  313. package/dist/client/assets/{use-registry-connections-BC1Pt8V1.js → use-registry-connections-DbpMOIpO.js} +1 -1
  314. package/dist/client/assets/{use-releases-B_ioEYcb.js → use-releases-CYB3Z3el.js} +1 -1
  315. package/dist/client/assets/{use-route-default-main-B8Ci266p.js → use-route-default-main-BnL4Z4OM.js} +1 -1
  316. package/dist/client/assets/{use-secrets-BZEH47Ed.js → use-secrets-BGF1KQAu.js} +1 -1
  317. package/dist/client/assets/{use-section-preview-base-D8ddLJeY.js → use-section-preview-base-DlnI4MwN.js} +1 -1
  318. package/dist/client/assets/{use-session-runtime-CKDTMwlz.js → use-session-runtime-BDvQix3x.js} +1 -1
  319. package/dist/client/assets/{use-tags-BnnveSvi.js → use-tags-BUUTr7aM.js} +1 -1
  320. package/dist/client/assets/{use-task-metadata-DQ-jzCVZ.js → use-task-metadata-BTxoWON1.js} +1 -1
  321. package/dist/client/assets/{use-thread-outputs-ChimPCUk.js → use-thread-outputs-CiqJCIW4.js} +1 -1
  322. package/dist/client/assets/{use-view-mode-CpyVGfy9.js → use-view-mode-DF5iokPZ.js} +1 -1
  323. package/dist/client/assets/{use-virtual-mcp-DvSX4N6q.js → use-virtual-mcp-B-R_fMeI.js} +1 -1
  324. package/dist/client/assets/useInfiniteQuery-C23wLcYP.js +1 -0
  325. package/dist/client/assets/{useQueries-CCVXh4wK.js → useQueries-iH2sfRa-.js} +1 -1
  326. package/dist/client/assets/useSuspenseInfiniteQuery-CbVbJFMx.js +1 -0
  327. package/dist/client/assets/{users-DgkJfwRz.js → users-D_LhbXm3.js} +1 -1
  328. package/dist/client/assets/{utils-D06E4WDv.js → utils-B_h95VEK.js} +1 -1
  329. package/dist/client/assets/{variant-calendar-B2YQFxru.js → variant-calendar-Bfr5lPy8.js} +1 -1
  330. package/dist/client/assets/{variant-matcher-override-POFwaaTG.js → variant-matcher-override-DyhilZEH.js} +1 -1
  331. package/dist/client/assets/{view-mode-toggle-B09x-ETl.js → view-mode-toggle--BOjpHZ1.js} +1 -1
  332. package/dist/client/assets/{virtual-mcp-D-br_N6s.js → virtual-mcp-CFyEtCKb.js} +1 -1
  333. package/dist/client/index.html +1 -1
  334. package/dist/server/cli.js +1 -1
  335. package/dist/server/server.js +1 -1
  336. package/package.json +1 -1
  337. package/dist/client/assets/agent-app-BeMC8z8k.js +0 -1
  338. package/dist/client/assets/agent-deck-BqKNWwGC.js +0 -1
  339. package/dist/client/assets/agent-file-QzuIvb2U.js +0 -1
  340. package/dist/client/assets/agent-library-file-DOj4Pso1.js +0 -1
  341. package/dist/client/assets/agent-settings-D4SL-PIa.js +0 -1
  342. package/dist/client/assets/agent-site-editor-code-C2z-Az-Y.js +0 -2
  343. package/dist/client/assets/agent-view-Bp9ooHxf.js +0 -1
  344. package/dist/client/assets/api-keys-DeCwNgs3.js +0 -1
  345. package/dist/client/assets/app-editor-CsOLGnt4.js +0 -1
  346. package/dist/client/assets/category-editor-DLB1OCyq.js +0 -1
  347. package/dist/client/assets/project-reports-fH8-r6df.js +0 -1
  348. package/dist/client/assets/project-tasks-tas6EPem.js +0 -1
  349. package/dist/client/assets/record-editor-LOQZDk0V.js +0 -1
  350. package/dist/client/assets/registry-YMo7WLlx.js +0 -2
  351. package/dist/client/assets/reports-DC8tSFj3.js +0 -1
  352. package/dist/client/assets/store-registry-hcgHbNGW.js +0 -2
  353. package/dist/client/assets/tasks-CViGtGHm.js +0 -1
  354. package/dist/client/assets/use-main-panel-tabs-BLf-yD79.js +0 -1
  355. package/dist/client/assets/useInfiniteQuery-CuoCKqDV.js +0 -1
  356. package/dist/client/assets/useSuspenseInfiniteQuery-BGyZ2Zcs.js +0 -1
@@ -1 +1 @@
1
- import{cE as O,ag as U,c as P,j as r,r as G,E as ee,b as F,B as q,M as te,K as Q,n as se,l as ne}from"./index-CVJEcf37.js";import{u as re}from"./useSuspenseInfiniteQuery-BGyZ2Zcs.js";import{S as ae,c as ie}from"./sheet-BePDARR0.js";import{A as le}from"./avatar-CO3n6wLC.js";import{n as oe,t as ce}from"./ChevronUp-B9QGJbr0.js";import{n as W}from"./Tool02-A5gv-OOO.js";import{a as ue,M as de}from"./pair-98UY-0wm.js";import{D as me}from"./chat-context-B40ngn3f.js";import{I as Y}from"./integration-icon-BV7Q9XOu.js";import{u as fe}from"./use-decopilot-events-DDnHJjGY.js";import{u as ge}from"./use-infinite-scroll-C88xvDJq.js";import{g as xe}from"./task-status-DhZZzZ6G.js";const z=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],he=40;function He(t){const s=(t.endDate.getTime()-t.startDate.getTime())/he;return z.find(i=>i.ms>=s)?.label??z[z.length-1].label}function K(t){const e=z.find(l=>l.label===t);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(t);if(!s)return 6e4;const n=parseInt(s[1],10),i=s[2];return i==="h"?n*36e5:i==="d"?n*864e5:n*6e4}function pe(t,e){const s=new Date(t);return K(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function H(t,e){const s=K(e);return new Date(Math.floor(t.getTime()/s)*s)}function be(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Oe(t){return Number.isFinite(t)?t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toLocaleString():"0"}function Ue(t){return Number.isFinite(t)?`$${t.toFixed(t<1?4:2)}`:"$0.00"}function Ge(t,e,s){const n=K(s),i=H(e.startDate,s).getTime(),l=e.endDate.getTime(),a=new Map(t.map(c=>[H(new Date(c.timestamp),s).getTime(),c])),u=[];for(let c=i;c<=l;c+=n){const m=a.get(c),h=new Date(c).toISOString();u.push({t:h,ts:c,label:pe(h,s),calls:m?.calls??0,errors:m?.errors??0,errorRate:m?.errorRate??0,avg:m?.avg??0,p50:m?.p50??0,p95:m?.p95??0,inputTokens:m?.inputTokens??0,outputTokens:m?.outputTokens??0,totalTokens:m?.totalTokens??0,costUsd:m?.costUsd??0})}return u}function Qe(t,e,s,n){const i=new Map;for(const o of t)i.set(o.toolName,(i.get(o.toolName)??0)+o[e]);const l=[...i.entries()].sort((o,d)=>d[1]-o[1]).slice(0,s).map(([o])=>o),a=new Set(l),u=new Map,c=new Map;for(const o of t){if(!a.has(o.toolName))continue;const d=o.virtualMcpId??"";u.set(d,(u.get(d)??0)+o[e]),c.set(`${d}::${o.toolName}`,{calls:o.calls,errors:o.errors,outputSize:o.outputSize})}const m=[...u.entries()].sort((o,d)=>d[1]-o[1]).slice(0,n).map(([o])=>o);let h=0;for(const o of m)for(const d of l){const g=c.get(`${o}::${d}`);g&&g[e]>h&&(h=g[e])}return{topTools:l,topAgentIds:m,cellMap:c,maxValue:h}}function We(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ye(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:be(t.avgDurationMs)}function Z(t){return(t.run_config??{}).agent?.id??(t.virtual_mcp_id||null)}function J(t,e,s,n){if(!t)return n;const i=e.find(a=>a.id===t)??s?.find(a=>a.id===t);if(i?.title)return i.title;const l=O(t);return l?U(l).title??n:t}function X(t,e,s){if(!t)return null;const n=e.find(l=>l.id===t)??s?.find(l=>l.id===t);if(n?.icon)return n.icon;const i=O(t);return i?U(i).icon??null:null}function je(t){return t?.data?.members??[]}function V(t){const e=P.c(32),{thread:s,connections:n,virtualMcps:i,nav:l}=t,a=F();let u,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const N=Z(s);u=J(N,i,n,""),c=X(N,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=u,e[4]=c}else u=e[3],c=e[4];const m=c;let h;e[5]!==u||e[6]!==a||e[7]!==s.title?(h=u||s.title||a("orgs.threads.untitledChat"),e[5]=u,e[6]=a,e[7]=s.title,e[8]=h):h=e[8];let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(W,{}),e[9]=o):o=e[9];let d;e[10]!==m||e[11]!==h?(d=r.jsx(Y,{icon:m,name:h,size:"sm",fallbackIcon:o,className:"shadow-sm shrink-0 rounded-md"}),e[10]=m,e[11]=h,e[12]=d):d=e[12];let g;e[13]!==a||e[14]!==s.title?(g=s.title||a("orgs.threads.untitledChat"),e[13]=a,e[14]=s.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=r.jsx(ae,{className:"text-sm leading-snug truncate",children:g}),e[16]=g,e[17]=b):b=e[17];let v;e[18]!==u?(v=u&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:u}),e[18]=u,e[19]=v):v=e[19];let p;e[20]!==b||e[21]!==v?(p=r.jsxs("div",{className:"min-w-0",children:[b,v]}),e[20]=b,e[21]=v,e[22]=p):p=e[22];let f;e[23]!==d||e[24]!==p?(f=r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d,p]}),e[23]=d,e[24]=p,e[25]=f):f=e[25];let x;e[26]!==l||e[27]!==a?(x=l&&r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[r.jsx(q,{size:"icon",variant:"ghost",onClick:l.onPrev,disabled:l.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.previousChat"),children:r.jsx(oe,{size:14})}),r.jsx(q,{size:"icon",variant:"ghost",onClick:l.onNext,disabled:l.index===l.total-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.nextChat"),children:r.jsx(ce,{size:14})})]}),e[26]=l,e[27]=a,e[28]=x):x=e[28];let j;return e[29]!==x||e[30]!==f?(j=r.jsx(ie,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:r.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[f,x]})}),e[29]=x,e[30]=f,e[31]=j):j=e[31],j}function ve(t){const e=P.c(62),{thread:s,connections:n,virtualMcps:i,members:l}=t,a=F();let u,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const I=Z(s);u=J(I,i,n,""),c=X(I,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=u,e[4]=c}else u=e[3],c=e[4];const m=c;let h;if(e[5]!==l||e[6]!==s.created_by){const I=je(l);let R;e[8]!==s.created_by?(R=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=R):R=e[9],h=I.find(R),e[5]=l,e[6]=s.created_by,e[7]=h}else h=e[7];const o=h;let d;e[10]!==o?.user.email||e[11]!==o?.user.name||e[12]!==s.created_by?(d=o?.user.name??o?.user.email??s.created_by?.substring(0,8)??"—",e[10]=o?.user.email,e[11]=o?.user.name,e[12]=s.created_by,e[13]=d):d=e[13];const g=d,b=o?.user.image??void 0;let v;e[14]!==s.created_at?(v=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=v):v=e[15];const p=v;let f,x,j,N,w,E;if(e[16]!==a||e[17]!==s.status){const I=xe(s.status),R=I.icon;f="px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm";let L;e[24]!==a?(L=a("orgs.threads.status"),e[24]=a,e[25]=L):L=e[25],e[26]!==L?(E=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[26]=L,e[27]=E):E=e[27],N="flex items-center gap-1.5",w=r.jsx(R,{size:13,className:I.iconClassName}),x=ne("text-sm",I.labelColor),j=a(I.labelKey),e[16]=a,e[17]=s.status,e[18]=f,e[19]=x,e[20]=j,e[21]=N,e[22]=w,e[23]=E}else f=e[18],x=e[19],j=e[20],N=e[21],w=e[22],E=e[23];let T;e[28]!==x||e[29]!==j?(T=r.jsx("span",{className:x,children:j}),e[28]=x,e[29]=j,e[30]=T):T=e[30];let S;e[31]!==T||e[32]!==N||e[33]!==w?(S=r.jsxs("div",{className:N,children:[w,T]}),e[31]=T,e[32]=N,e[33]=w,e[34]=S):S=e[34];let y;e[35]!==S||e[36]!==E?(y=r.jsxs("div",{children:[E,S]}),e[35]=S,e[36]=E,e[37]=y):y=e[37];let C;e[38]!==a?(C=a("orgs.threads.date"),e[38]=a,e[39]=C):C=e[39];let _;e[40]!==C?(_=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:C}),e[40]=C,e[41]=_):_=e[41];let M;e[42]!==p?(M=r.jsx("div",{className:"text-sm text-foreground",children:p}),e[42]=p,e[43]=M):M=e[43];let D;e[44]!==_||e[45]!==M?(D=r.jsxs("div",{children:[_,M]}),e[44]=_,e[45]=M,e[46]=D):D=e[46];let $;e[47]!==a||e[48]!==s.created_by||e[49]!==b||e[50]!==g?($=s.created_by&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.user")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(le,{url:b,fallback:g,shape:"circle",size:"2xs",className:"shrink-0"}),r.jsx("span",{className:"text-sm text-foreground",children:g})]})]}),e[47]=a,e[48]=s.created_by,e[49]=b,e[50]=g,e[51]=$):$=e[51];let k;e[52]!==m||e[53]!==u||e[54]!==a?(k=u&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.agent")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:m,name:u,size:"xs",fallbackIcon:r.jsx(W,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),r.jsx("span",{className:"text-sm text-foreground",children:u})]})]}),e[52]=m,e[53]=u,e[54]=a,e[55]=k):k=e[55];let A;return e[56]!==f||e[57]!==y||e[58]!==D||e[59]!==$||e[60]!==k?(A=r.jsxs("div",{className:f,children:[y,D,$,k]}),e[56]=f,e[57]=y,e[58]=D,e[59]=$,e[60]=k,e[61]=A):A=e[61],A}const B=100;function Ne(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.noMessagesInChat"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Me(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingMore"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}const Te=400,Se=5e3;function ye(t,e,s){const n=P.c(8),i=se(),l=G.useRef(null);let a;n[0]!==e||n[1]!==i||n[2]!==s?(a=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.invalidateQueries({queryKey:Q.threadMessages(e,s)})},Te)},n[0]=e,n[1]=i,n[2]=s,n[3]=a):a=n[3];const u=a;let c;n[4]!==t||n[5]!==u||n[6]!==s?(c={orgSlug:t,taskId:s,onStep:u,onFinish:u,onReconnect:u},n[4]=t,n[5]=u,n[6]=s,n[7]=c):c=n[7],fe(c)}function _e(t){const e=P.c(36),{client:s,locator:n,thread:i,connections:l,virtualMcps:a,members:u,nav:c,meta:m}=t,{org:h}=te();let o;e[0]!==n||e[1]!==i.id?(o=Q.threadMessages(n,i.id),e[0]=n,e[1]=i.id,e[2]=o):o=e[2];let d;e[3]!==s||e[4]!==i.id?(d=async _=>{const{pageParam:M}=_,D=M===void 0?0:M;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:i.id,limit:B,offset:D}});return $.structuredContent??$},e[3]=s,e[4]=i.id,e[5]=d):d=e[5];let g;e[6]!==o||e[7]!==d?(g={queryKey:o,queryFn:d,initialPageParam:0,getNextPageParam:Ce,staleTime:0,refetchInterval:Se},e[6]=o,e[7]=d,e[8]=g):g=e[8];const{data:b,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:f}=re(g);ye(h.slug,n,i.id);let x;e[9]!==b.pages?(x=b.pages.flatMap(we).filter(Ee),e[9]=b.pages,e[10]=x):x=e[10];const j=x,N=ue(j);let w;e[11]!==v||e[12]!==p||e[13]!==f?(w=()=>{p&&!f&&v()},e[11]=v,e[12]=p,e[13]=f,e[14]=w):w=e[14];const E=ge(w,p??!1,f);let T;e[15]!==l||e[16]!==c||e[17]!==i||e[18]!==a?(T=r.jsx(V,{thread:i,connections:l,virtualMcps:a,nav:c}),e[15]=l,e[16]=c,e[17]=i,e[18]=a,e[19]=T):T=e[19];let S;e[20]!==l||e[21]!==u||e[22]!==m||e[23]!==i||e[24]!==a?(S=m&&r.jsx(ve,{thread:i,connections:l,virtualMcps:a,members:u}),e[20]=l,e[21]=u,e[22]=m,e[23]=i,e[24]=a,e[25]=S):S=e[25];let y;e[26]!==f||e[27]!==E||e[28]!==N||e[29]!==j.length||e[30]!==i.status?(y=j.length===0?r.jsx(Ne,{}):r.jsx("div",{"data-chat-scroller":!0,className:"flex-1 overflow-y-auto min-h-0",children:r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[N.map((_,M)=>r.jsx("div",{ref:M===N.length-1?E:void 0,children:r.jsx(de,{pair:_,isLastPair:M===N.length-1,status:M===N.length-1&&i.status==="in_progress"?"streaming":"ready"})},`pair-${_.user?.id??_.assistant?.id}`)),f&&r.jsx(Me,{})]})}),e[26]=f,e[27]=E,e[28]=N,e[29]=j.length,e[30]=i.status,e[31]=y):y=e[31];let C;return e[32]!==T||e[33]!==S||e[34]!==y?(C=r.jsxs(r.Fragment,{children:[T,S,y]}),e[32]=T,e[33]=S,e[34]=y,e[35]=C):C=e[35],C}function Ee(t){return t.role==="user"||t.role==="assistant"}function we(t){return t.items??[]}function Ce(t,e){const s=t,n=e;if(!((s?.items?.length??0)<B))return n.length*B}function Ie(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.failedToLoadMessages"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingConversation"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Ze(t){const e=P.c(31),{thread:s,client:n,locator:i,connections:l,virtualMcps:a,members:u,nav:c,meta:m}=t,h=m===void 0?!0:m;let o;e[0]!==l||e[1]!==c||e[2]!==s||e[3]!==a?(o=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[0]=l,e[1]=c,e[2]=s,e[3]=a,e[4]=o):o=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ie,{}),e[5]=d):d=e[5];let g;e[6]!==o?(g=r.jsxs(r.Fragment,{children:[o,d]}),e[6]=o,e[7]=g):g=e[7];let b;e[8]!==l||e[9]!==c||e[10]!==s||e[11]!==a?(b=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[8]=l,e[9]=c,e[10]=s,e[11]=a,e[12]=b):b=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx($e,{}),e[13]=v):v=e[13];let p;e[14]!==b?(p=r.jsxs(r.Fragment,{children:[b,v]}),e[14]=b,e[15]=p):p=e[15];let f;e[16]!==n||e[17]!==l||e[18]!==i||e[19]!==u||e[20]!==h||e[21]!==c||e[22]!==s||e[23]!==a?(f=r.jsx(_e,{client:n,locator:i,thread:s,connections:l,virtualMcps:a,members:u,nav:c,meta:h}),e[16]=n,e[17]=l,e[18]=i,e[19]=u,e[20]=h,e[21]=c,e[22]=s,e[23]=a,e[24]=f):f=e[24];let x;e[25]!==p||e[26]!==f?(x=r.jsx(G.Suspense,{fallback:p,children:f}),e[25]=p,e[26]=f,e[27]=x):x=e[27];let j;return e[28]!==g||e[29]!==x?(j=r.jsx(me,{children:r.jsx(ee,{fallback:g,children:x})}),e[28]=g,e[29]=x,e[30]=j):j=e[30],j}export{Ze as T,Ue as a,Ge as b,be as c,Ye as d,We as e,Oe as f,He as g,Qe as h,je as i,Z as j,X as k,J as r};
1
+ import{cE as O,ag as U,c as P,j as r,r as G,E as ee,b as F,B as q,M as te,K as Q,n as se,l as ne}from"./index-BMJCLbj5.js";import{u as re}from"./useSuspenseInfiniteQuery-CbVbJFMx.js";import{S as ae,c as ie}from"./sheet-zj8JvjRG.js";import{A as le}from"./avatar-Chvwe6CH.js";import{n as oe,t as ce}from"./ChevronUp-BoMcO3mB.js";import{n as W}from"./Tool02-BsXDs0ea.js";import{a as ue,M as de}from"./pair-CC2n4e8O.js";import{D as me}from"./chat-context-CQfynmbs.js";import{I as Y}from"./integration-icon-BEcN9aOn.js";import{u as fe}from"./use-decopilot-events-BhWToYSR.js";import{u as ge}from"./use-infinite-scroll-PJEXgCMU.js";import{g as xe}from"./task-status-N3H46jqP.js";const z=[{ms:6e4,label:"1m"},{ms:12e4,label:"2m"},{ms:3e5,label:"5m"},{ms:6e5,label:"10m"},{ms:9e5,label:"15m"},{ms:18e5,label:"30m"},{ms:36e5,label:"1h"},{ms:72e5,label:"2h"},{ms:216e5,label:"6h"},{ms:432e5,label:"12h"},{ms:864e5,label:"1d"},{ms:6048e5,label:"7d"}],he=40;function He(t){const s=(t.endDate.getTime()-t.startDate.getTime())/he;return z.find(i=>i.ms>=s)?.label??z[z.length-1].label}function K(t){const e=z.find(l=>l.label===t);if(e)return e.ms;const s=/^(\d+)([mhd])$/.exec(t);if(!s)return 6e4;const n=parseInt(s[1],10),i=s[2];return i==="h"?n*36e5:i==="d"?n*864e5:n*6e4}function pe(t,e){const s=new Date(t);return K(e)>=864e5?s.toLocaleDateString([],{month:"short",day:"numeric"}):s.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function H(t,e){const s=K(e);return new Date(Math.floor(t.getTime()/s)*s)}function be(t){return t>=1e4?`${(t/1e3).toFixed(1)}s`:`${Math.round(t)}ms`}function Oe(t){return Number.isFinite(t)?t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:Math.round(t).toLocaleString():"0"}function Ue(t){return Number.isFinite(t)?`$${t.toFixed(t<1?4:2)}`:"$0.00"}function Ge(t,e,s){const n=K(s),i=H(e.startDate,s).getTime(),l=e.endDate.getTime(),a=new Map(t.map(c=>[H(new Date(c.timestamp),s).getTime(),c])),u=[];for(let c=i;c<=l;c+=n){const m=a.get(c),h=new Date(c).toISOString();u.push({t:h,ts:c,label:pe(h,s),calls:m?.calls??0,errors:m?.errors??0,errorRate:m?.errorRate??0,avg:m?.avg??0,p50:m?.p50??0,p95:m?.p95??0,inputTokens:m?.inputTokens??0,outputTokens:m?.outputTokens??0,totalTokens:m?.totalTokens??0,costUsd:m?.costUsd??0})}return u}function Qe(t,e,s,n){const i=new Map;for(const o of t)i.set(o.toolName,(i.get(o.toolName)??0)+o[e]);const l=[...i.entries()].sort((o,d)=>d[1]-o[1]).slice(0,s).map(([o])=>o),a=new Set(l),u=new Map,c=new Map;for(const o of t){if(!a.has(o.toolName))continue;const d=o.virtualMcpId??"";u.set(d,(u.get(d)??0)+o[e]),c.set(`${d}::${o.toolName}`,{calls:o.calls,errors:o.errors,outputSize:o.outputSize})}const m=[...u.entries()].sort((o,d)=>d[1]-o[1]).slice(0,n).map(([o])=>o);let h=0;for(const o of m)for(const d of l){const g=c.get(`${o}::${d}`);g&&g[e]>h&&(h=g[e])}return{topTools:l,topAgentIds:m,cellMap:c,maxValue:h}}function We(t,e){return e==="requests"?t.calls:e==="errors"?t.errorRate:t.avgDurationMs}function Ye(t,e){return e==="requests"?t.calls.toLocaleString():e==="errors"?`${t.errorRate.toFixed(1)}%`:be(t.avgDurationMs)}function Z(t){return(t.run_config??{}).agent?.id??(t.virtual_mcp_id||null)}function J(t,e,s,n){if(!t)return n;const i=e.find(a=>a.id===t)??s?.find(a=>a.id===t);if(i?.title)return i.title;const l=O(t);return l?U(l).title??n:t}function X(t,e,s){if(!t)return null;const n=e.find(l=>l.id===t)??s?.find(l=>l.id===t);if(n?.icon)return n.icon;const i=O(t);return i?U(i).icon??null:null}function je(t){return t?.data?.members??[]}function V(t){const e=P.c(32),{thread:s,connections:n,virtualMcps:i,nav:l}=t,a=F();let u,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const N=Z(s);u=J(N,i,n,""),c=X(N,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=u,e[4]=c}else u=e[3],c=e[4];const m=c;let h;e[5]!==u||e[6]!==a||e[7]!==s.title?(h=u||s.title||a("orgs.threads.untitledChat"),e[5]=u,e[6]=a,e[7]=s.title,e[8]=h):h=e[8];let o;e[9]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(W,{}),e[9]=o):o=e[9];let d;e[10]!==m||e[11]!==h?(d=r.jsx(Y,{icon:m,name:h,size:"sm",fallbackIcon:o,className:"shadow-sm shrink-0 rounded-md"}),e[10]=m,e[11]=h,e[12]=d):d=e[12];let g;e[13]!==a||e[14]!==s.title?(g=s.title||a("orgs.threads.untitledChat"),e[13]=a,e[14]=s.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=r.jsx(ae,{className:"text-sm leading-snug truncate",children:g}),e[16]=g,e[17]=b):b=e[17];let v;e[18]!==u?(v=u&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5 truncate",children:u}),e[18]=u,e[19]=v):v=e[19];let p;e[20]!==b||e[21]!==v?(p=r.jsxs("div",{className:"min-w-0",children:[b,v]}),e[20]=b,e[21]=v,e[22]=p):p=e[22];let f;e[23]!==d||e[24]!==p?(f=r.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d,p]}),e[23]=d,e[24]=p,e[25]=f):f=e[25];let x;e[26]!==l||e[27]!==a?(x=l&&r.jsxs("div",{className:"flex items-center gap-0.5 shrink-0",children:[r.jsx(q,{size:"icon",variant:"ghost",onClick:l.onPrev,disabled:l.index===0,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.previousChat"),children:r.jsx(oe,{size:14})}),r.jsx(q,{size:"icon",variant:"ghost",onClick:l.onNext,disabled:l.index===l.total-1,className:"h-7 w-7 text-muted-foreground","aria-label":a("orgs.threads.nextChat"),children:r.jsx(ce,{size:14})})]}),e[26]=l,e[27]=a,e[28]=x):x=e[28];let j;return e[29]!==x||e[30]!==f?(j=r.jsx(ie,{className:"px-5 md:px-6 pt-6 pb-5 border-b border-border shrink-0",children:r.jsxs("div",{className:"flex items-start justify-between gap-3 pr-8",children:[f,x]})}),e[29]=x,e[30]=f,e[31]=j):j=e[31],j}function ve(t){const e=P.c(62),{thread:s,connections:n,virtualMcps:i,members:l}=t,a=F();let u,c;if(e[0]!==n||e[1]!==s||e[2]!==i){const I=Z(s);u=J(I,i,n,""),c=X(I,i,n),e[0]=n,e[1]=s,e[2]=i,e[3]=u,e[4]=c}else u=e[3],c=e[4];const m=c;let h;if(e[5]!==l||e[6]!==s.created_by){const I=je(l);let R;e[8]!==s.created_by?(R=L=>L.userId===s.created_by,e[8]=s.created_by,e[9]=R):R=e[9],h=I.find(R),e[5]=l,e[6]=s.created_by,e[7]=h}else h=e[7];const o=h;let d;e[10]!==o?.user.email||e[11]!==o?.user.name||e[12]!==s.created_by?(d=o?.user.name??o?.user.email??s.created_by?.substring(0,8)??"—",e[10]=o?.user.email,e[11]=o?.user.name,e[12]=s.created_by,e[13]=d):d=e[13];const g=d,b=o?.user.image??void 0;let v;e[14]!==s.created_at?(v=new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"}),e[14]=s.created_at,e[15]=v):v=e[15];const p=v;let f,x,j,N,w,E;if(e[16]!==a||e[17]!==s.status){const I=xe(s.status),R=I.icon;f="px-5 md:px-6 py-5 border-b border-border grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4 text-sm";let L;e[24]!==a?(L=a("orgs.threads.status"),e[24]=a,e[25]=L):L=e[25],e[26]!==L?(E=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:L}),e[26]=L,e[27]=E):E=e[27],N="flex items-center gap-1.5",w=r.jsx(R,{size:13,className:I.iconClassName}),x=ne("text-sm",I.labelColor),j=a(I.labelKey),e[16]=a,e[17]=s.status,e[18]=f,e[19]=x,e[20]=j,e[21]=N,e[22]=w,e[23]=E}else f=e[18],x=e[19],j=e[20],N=e[21],w=e[22],E=e[23];let T;e[28]!==x||e[29]!==j?(T=r.jsx("span",{className:x,children:j}),e[28]=x,e[29]=j,e[30]=T):T=e[30];let S;e[31]!==T||e[32]!==N||e[33]!==w?(S=r.jsxs("div",{className:N,children:[w,T]}),e[31]=T,e[32]=N,e[33]=w,e[34]=S):S=e[34];let y;e[35]!==S||e[36]!==E?(y=r.jsxs("div",{children:[E,S]}),e[35]=S,e[36]=E,e[37]=y):y=e[37];let C;e[38]!==a?(C=a("orgs.threads.date"),e[38]=a,e[39]=C):C=e[39];let _;e[40]!==C?(_=r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:C}),e[40]=C,e[41]=_):_=e[41];let M;e[42]!==p?(M=r.jsx("div",{className:"text-sm text-foreground",children:p}),e[42]=p,e[43]=M):M=e[43];let D;e[44]!==_||e[45]!==M?(D=r.jsxs("div",{children:[_,M]}),e[44]=_,e[45]=M,e[46]=D):D=e[46];let $;e[47]!==a||e[48]!==s.created_by||e[49]!==b||e[50]!==g?($=s.created_by&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.user")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(le,{url:b,fallback:g,shape:"circle",size:"2xs",className:"shrink-0"}),r.jsx("span",{className:"text-sm text-foreground",children:g})]})]}),e[47]=a,e[48]=s.created_by,e[49]=b,e[50]=g,e[51]=$):$=e[51];let k;e[52]!==m||e[53]!==u||e[54]!==a?(k=u&&r.jsxs("div",{children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:a("orgs.threads.agent")}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Y,{icon:m,name:u,size:"xs",fallbackIcon:r.jsx(W,{}),className:"shrink-0 size-5! min-w-5! rounded-md"}),r.jsx("span",{className:"text-sm text-foreground",children:u})]})]}),e[52]=m,e[53]=u,e[54]=a,e[55]=k):k=e[55];let A;return e[56]!==f||e[57]!==y||e[58]!==D||e[59]!==$||e[60]!==k?(A=r.jsxs("div",{className:f,children:[y,D,$,k]}),e[56]=f,e[57]=y,e[58]=D,e[59]=$,e[60]=k,e[61]=A):A=e[61],A}const B=100;function Ne(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.noMessagesInChat"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Me(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingMore"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"py-4 text-center text-xs text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}const Te=400,Se=5e3;function ye(t,e,s){const n=P.c(8),i=se(),l=G.useRef(null);let a;n[0]!==e||n[1]!==i||n[2]!==s?(a=()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{l.current=null,i.invalidateQueries({queryKey:Q.threadMessages(e,s)})},Te)},n[0]=e,n[1]=i,n[2]=s,n[3]=a):a=n[3];const u=a;let c;n[4]!==t||n[5]!==u||n[6]!==s?(c={orgSlug:t,taskId:s,onStep:u,onFinish:u,onReconnect:u},n[4]=t,n[5]=u,n[6]=s,n[7]=c):c=n[7],fe(c)}function _e(t){const e=P.c(36),{client:s,locator:n,thread:i,connections:l,virtualMcps:a,members:u,nav:c,meta:m}=t,{org:h}=te();let o;e[0]!==n||e[1]!==i.id?(o=Q.threadMessages(n,i.id),e[0]=n,e[1]=i.id,e[2]=o):o=e[2];let d;e[3]!==s||e[4]!==i.id?(d=async _=>{const{pageParam:M}=_,D=M===void 0?0:M;if(!s)throw new Error("MCP client is not available");const $=await s.callTool({name:"COLLECTION_THREAD_MESSAGES_LIST",arguments:{thread_id:i.id,limit:B,offset:D}});return $.structuredContent??$},e[3]=s,e[4]=i.id,e[5]=d):d=e[5];let g;e[6]!==o||e[7]!==d?(g={queryKey:o,queryFn:d,initialPageParam:0,getNextPageParam:Ce,staleTime:0,refetchInterval:Se},e[6]=o,e[7]=d,e[8]=g):g=e[8];const{data:b,fetchNextPage:v,hasNextPage:p,isFetchingNextPage:f}=re(g);ye(h.slug,n,i.id);let x;e[9]!==b.pages?(x=b.pages.flatMap(we).filter(Ee),e[9]=b.pages,e[10]=x):x=e[10];const j=x,N=ue(j);let w;e[11]!==v||e[12]!==p||e[13]!==f?(w=()=>{p&&!f&&v()},e[11]=v,e[12]=p,e[13]=f,e[14]=w):w=e[14];const E=ge(w,p??!1,f);let T;e[15]!==l||e[16]!==c||e[17]!==i||e[18]!==a?(T=r.jsx(V,{thread:i,connections:l,virtualMcps:a,nav:c}),e[15]=l,e[16]=c,e[17]=i,e[18]=a,e[19]=T):T=e[19];let S;e[20]!==l||e[21]!==u||e[22]!==m||e[23]!==i||e[24]!==a?(S=m&&r.jsx(ve,{thread:i,connections:l,virtualMcps:a,members:u}),e[20]=l,e[21]=u,e[22]=m,e[23]=i,e[24]=a,e[25]=S):S=e[25];let y;e[26]!==f||e[27]!==E||e[28]!==N||e[29]!==j.length||e[30]!==i.status?(y=j.length===0?r.jsx(Ne,{}):r.jsx("div",{"data-chat-scroller":!0,className:"flex-1 overflow-y-auto min-h-0",children:r.jsxs("div",{className:"flex flex-col min-w-0 max-w-2xl mx-auto w-full",children:[N.map((_,M)=>r.jsx("div",{ref:M===N.length-1?E:void 0,children:r.jsx(de,{pair:_,isLastPair:M===N.length-1,status:M===N.length-1&&i.status==="in_progress"?"streaming":"ready"})},`pair-${_.user?.id??_.assistant?.id}`)),f&&r.jsx(Me,{})]})}),e[26]=f,e[27]=E,e[28]=N,e[29]=j.length,e[30]=i.status,e[31]=y):y=e[31];let C;return e[32]!==T||e[33]!==S||e[34]!==y?(C=r.jsxs(r.Fragment,{children:[T,S,y]}),e[32]=T,e[33]=S,e[34]=y,e[35]=C):C=e[35],C}function Ee(t){return t.role==="user"||t.role==="assistant"}function we(t){return t.items??[]}function Ce(t,e){const s=t,n=e;if(!((s?.items?.length??0)<B))return n.length*B}function Ie(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.failedToLoadMessages"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function $e(){const t=P.c(4),e=F();let s;t[0]!==e?(s=e("orgs.threads.loadingConversation"),t[0]=e,t[1]=s):s=t[1];let n;return t[2]!==s?(n=r.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:s}),t[2]=s,t[3]=n):n=t[3],n}function Ze(t){const e=P.c(31),{thread:s,client:n,locator:i,connections:l,virtualMcps:a,members:u,nav:c,meta:m}=t,h=m===void 0?!0:m;let o;e[0]!==l||e[1]!==c||e[2]!==s||e[3]!==a?(o=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[0]=l,e[1]=c,e[2]=s,e[3]=a,e[4]=o):o=e[4];let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(Ie,{}),e[5]=d):d=e[5];let g;e[6]!==o?(g=r.jsxs(r.Fragment,{children:[o,d]}),e[6]=o,e[7]=g):g=e[7];let b;e[8]!==l||e[9]!==c||e[10]!==s||e[11]!==a?(b=r.jsx(V,{thread:s,connections:l,virtualMcps:a,nav:c}),e[8]=l,e[9]=c,e[10]=s,e[11]=a,e[12]=b):b=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=r.jsx($e,{}),e[13]=v):v=e[13];let p;e[14]!==b?(p=r.jsxs(r.Fragment,{children:[b,v]}),e[14]=b,e[15]=p):p=e[15];let f;e[16]!==n||e[17]!==l||e[18]!==i||e[19]!==u||e[20]!==h||e[21]!==c||e[22]!==s||e[23]!==a?(f=r.jsx(_e,{client:n,locator:i,thread:s,connections:l,virtualMcps:a,members:u,nav:c,meta:h}),e[16]=n,e[17]=l,e[18]=i,e[19]=u,e[20]=h,e[21]=c,e[22]=s,e[23]=a,e[24]=f):f=e[24];let x;e[25]!==p||e[26]!==f?(x=r.jsx(G.Suspense,{fallback:p,children:f}),e[25]=p,e[26]=f,e[27]=x):x=e[27];let j;return e[28]!==g||e[29]!==x?(j=r.jsx(me,{children:r.jsx(ee,{fallback:g,children:x})}),e[28]=g,e[29]=x,e[30]=j):j=e[30],j}export{Ze as T,Ue as a,Ge as b,be as c,Ye as d,We as e,Oe as f,He as g,Qe as h,je as i,Z as j,X as k,J as r};
@@ -1 +1 @@
1
- import{r as x,b2 as b,j as c,b7 as m,b8 as V,dG as p,eh as M,ei as T,b1 as S,ej as A,bk as F,aq as $,c as P,l as C}from"./index-CVJEcf37.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:V(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,q]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=q(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),H=h,L=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),k=x.createContext({size:"default",variant:"default"});function K(r){const e=P.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(k.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=P.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(k),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{Q as T,K as a};
1
+ import{r as x,b2 as b,j as c,b7 as m,b8 as V,dG as p,eh as M,ei as T,b1 as S,ej as A,bk as F,aq as $,c as P,l as C}from"./index-BMJCLbj5.js";var j="Toggle",_=x.forwardRef((r,e)=>{const{pressed:l,defaultPressed:s,onPressedChange:n,...a}=r,[t,o]=b({prop:l,onChange:n,defaultProp:s??!1,caller:j});return c.jsx(m.button,{type:"button","aria-pressed":t,"data-state":t?"on":"off","data-disabled":r.disabled?"":void 0,...a,ref:e,onClick:V(r.onClick,()=>{r.disabled||o(!t)})})});_.displayName=j;var v="ToggleGroup",[w]=F(v,[T]),I=T(),h=p.forwardRef((r,e)=>{const{type:l,...s}=r;if(l==="single"){const n=s;return c.jsx(D,{...n,ref:e})}if(l==="multiple"){const n=s;return c.jsx(B,{...n,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${v}\``)});h.displayName=v;var[z,y]=w(v),D=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??"",onChange:n,caller:v});return c.jsx(z,{scope:r.__scopeToggleGroup,type:"single",value:p.useMemo(()=>t?[t]:[],[t]),onItemActivate:o,onItemDeactivate:p.useCallback(()=>o(""),[o]),children:c.jsx(R,{...a,ref:e})})}),B=p.forwardRef((r,e)=>{const{value:l,defaultValue:s,onValueChange:n=()=>{},...a}=r,[t,o]=b({prop:l,defaultProp:s??[],onChange:n,caller:v}),i=p.useCallback(u=>o((g=[])=>[...g,u]),[o]),d=p.useCallback(u=>o((g=[])=>g.filter(E=>E!==u)),[o]);return c.jsx(z,{scope:r.__scopeToggleGroup,type:"multiple",value:t,onItemActivate:i,onItemDeactivate:d,children:c.jsx(R,{...a,ref:e})})});h.displayName=v;var[O,q]=w(v),R=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,disabled:s=!1,rovingFocus:n=!0,orientation:a,dir:t,loop:o=!0,...i}=r,d=I(l),u=S(t),g={role:"group",dir:u,...i};return c.jsx(O,{scope:l,rovingFocus:n,disabled:s,children:n?c.jsx(A,{asChild:!0,...d,orientation:a,dir:u,loop:o,children:c.jsx(m.div,{...g,ref:e})}):c.jsx(m.div,{...g,ref:e})})}),f="ToggleGroupItem",N=p.forwardRef((r,e)=>{const l=y(f,r.__scopeToggleGroup),s=q(f,r.__scopeToggleGroup),n=I(r.__scopeToggleGroup),a=l.value.includes(r.value),t=s.disabled||r.disabled,o={...r,pressed:a,disabled:t},i=p.useRef(null);return s.rovingFocus?c.jsx(M,{asChild:!0,...n,focusable:!t,active:a,ref:i,children:c.jsx(G,{...o,ref:e})}):c.jsx(G,{...o,ref:e})});N.displayName=f;var G=p.forwardRef((r,e)=>{const{__scopeToggleGroup:l,value:s,...n}=r,a=y(f,l),t={role:"radio","aria-checked":r.pressed,"aria-pressed":void 0},o=a.type==="single"?t:void 0;return c.jsx(_,{...o,...n,ref:e,onPressedChange:i=>{i?a.onItemActivate(s):a.onItemDeactivate(s)}})}),H=h,L=N;const U=$("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-2 min-w-9",sm:"h-7 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),k=x.createContext({size:"default",variant:"default"});function K(r){const e=P.c(20);let l,s,n,a,t;e[0]!==r?({className:s,variant:t,size:a,children:l,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);let o;e[6]!==s?(o=C("group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs",s),e[6]=s,e[7]=o):o=e[7];let i;e[8]!==a||e[9]!==t?(i={variant:t,size:a},e[8]=a,e[9]=t,e[10]=i):i=e[10];let d;e[11]!==l||e[12]!==i?(d=c.jsx(k.Provider,{value:i,children:l}),e[11]=l,e[12]=i,e[13]=d):d=e[13];let u;return e[14]!==n||e[15]!==a||e[16]!==o||e[17]!==d||e[18]!==t?(u=c.jsx(H,{"data-slot":"toggle-group","data-variant":t,"data-size":a,className:o,...n,children:d}),e[14]=n,e[15]=a,e[16]=o,e[17]=d,e[18]=t,e[19]=u):u=e[19],u}function Q(r){const e=P.c(18);let l,s,n,a,t;e[0]!==r?({className:s,children:l,variant:t,size:a,...n}=r,e[0]=r,e[1]=l,e[2]=s,e[3]=n,e[4]=a,e[5]=t):(l=e[1],s=e[2],n=e[3],a=e[4],t=e[5]);const o=x.useContext(k),i=o.variant||t,d=o.size||a;let u;e[6]!==s||e[7]!==o.size||e[8]!==o.variant||e[9]!==a||e[10]!==t?(u=C(U({variant:o.variant||t,size:o.size||a}),"min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",s),e[6]=s,e[7]=o.size,e[8]=o.variant,e[9]=a,e[10]=t,e[11]=u):u=e[11];let g;return e[12]!==l||e[13]!==n||e[14]!==i||e[15]!==d||e[16]!==u?(g=c.jsx(L,{"data-slot":"toggle-group-item","data-variant":i,"data-size":d,className:u,...n,children:l}),e[12]=l,e[13]=n,e[14]=i,e[15]=d,e[16]=u,e[17]=g):g=e[17],g}export{Q as T,K as a};
@@ -1 +1 @@
1
- import{l as u,c as f,j as b}from"./index-CVJEcf37.js";const d="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease]",d,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground")}function g(n){const e=f.c(14);let o,s,t,r,c;e[0]!==n?({active:o,className:s,ref:r,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=r,e[5]=c):(o=e[1],s=e[2],t=e[3],r=e[4],c=e[5]);const a=c===void 0?"button":c;let i;e[6]!==o||e[7]!==s?(i=u("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md","max-md:[&_svg]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=i):i=e[8];let l;return e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==a?(l=b.jsx("button",{ref:r,type:a,className:i,...t}),e[9]=t,e[10]=r,e[11]=i,e[12]=a,e[13]=l):l=e[13],l}export{d as I,g as T,m as p};
1
+ import{l as u,c as f,j as b}from"./index-BMJCLbj5.js";const d="focus-visible:not-forced-colors:outline-none focus-visible:forced-colors:outline-2 focus-visible:forced-colors:outline-offset-0 focus-visible:ring-0 focus-visible:border-border focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50";function m(n){return u("[transition:background-color_180ms_ease,color_180ms_ease]",d,n?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground")}function g(n){const e=f.c(14);let o,s,t,r,c;e[0]!==n?({active:o,className:s,ref:r,type:c,...t}=n,e[0]=n,e[1]=o,e[2]=s,e[3]=t,e[4]=r,e[5]=c):(o=e[1],s=e[2],t=e[3],r=e[4],c=e[5]);const a=c===void 0?"button":c;let i;e[6]!==o||e[7]!==s?(i=u("relative flex size-10 md:size-7 shrink-0 items-center justify-center rounded-md","max-md:[&_svg]:size-5",m(o),s),e[6]=o,e[7]=s,e[8]=i):i=e[8];let l;return e[9]!==t||e[10]!==r||e[11]!==i||e[12]!==a?(l=b.jsx("button",{ref:r,type:a,className:i,...t}),e[9]=t,e[10]=r,e[11]=i,e[12]=a,e[13]=l):l=e[13],l}export{d as I,g as T,m as p};
@@ -1 +1 @@
1
- import{r as i,b5 as H,j as c,b6 as K,b7 as W,b8 as y,da as S,ba as J,b4 as Q,b2 as Z,b3 as ee,bb as $,bj as te,bm as oe,bk as re,d3 as ne,bn as se,c as j,l as ae}from"./index-CVJEcf37.js";import{R as ie}from"./index-CFUteTrc.js";var[O]=re("Tooltip",[$]),D=$(),G="TooltipProvider",le=700,k="tooltip.open",[ce,L]=O(G),F=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),d=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const p=a.current;return()=>window.clearTimeout(p)},[]),c.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=G;var R="Tooltip",[ue,_]=O(R),z=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,a=L(R,o.__scopeTooltip),p=D(e),[u,v]=i.useState(null),x=Q(),f=i.useRef(0),h=l??a.disableHoverableContent,T=d??a.delayDuration,g=i.useRef(!1),[b,m]=Z({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(k))):a.onClose(),s?.(I)},caller:R}),w=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),N=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ee,{...p,children:c.jsx(ue,{scope:e,contentId:x,open:b,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?N():E()},[a.isOpenDelayedRef,N,E]),onTriggerLeave:i.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};z.displayName=R;var A="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=L(A,t),l=D(t),d=i.useRef(null),a=H(e,d,n.onTriggerChange),p=i.useRef(!1),u=i.useRef(!1),v=i.useCallback(()=>p.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(K,{asChild:!0,...l,children:c.jsx(W.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:y(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:y(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:y(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:y(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:y(o.onBlur,n.onClose),onClick:y(o.onClick,n.onClose)})})});B.displayName=A;var M="TooltipPortal",[de,pe]=O(M,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(M,e);return c.jsx(de,{scope:e,forceMount:t,children:c.jsx(S,{present:t||s.open,children:c.jsx(J,{asChild:!0,container:n,children:r})})})};U.displayName=M;var C="TooltipContent",V=i.forwardRef((o,e)=>{const t=pe(C,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(C,o.__scopeTooltip);return c.jsx(S,{present:r||l.open,children:l.disableHoverableContent?c.jsx(Y,{side:n,...s,ref:e}):c.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(C,o.__scopeTooltip),r=L(C,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,d]=i.useState(null),{trigger:a,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{d(null),v(!1)},[v]),f=i.useCallback((h,T)=>{const g=h.currentTarget,b={x:h.clientX,y:h.clientY},m=ge(b,g.getBoundingClientRect()),w=Te(b,m),E=me(T.getBoundingClientRect()),P=ye([...w,...E]);d(P),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&u){const h=g=>f(g,u),T=g=>f(g,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[a,u,f,x]),i.useEffect(()=>{if(l){const h=T=>{const g=T.target,b={x:T.clientX,y:T.clientY},m=a?.contains(g)||u?.contains(g),w=!be(b,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,l,p,x]),c.jsx(Y,{...o,ref:s})}),[ve,xe]=O(R,{isInside:!1}),he=ne("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,a=_(C,t),p=D(t),{onClose:u}=a;return i.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),i.useEffect(()=>{if(a.trigger){const v=x=>{x.target?.contains(a.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,u]),c.jsx(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(oe,{"data-state":a.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(he,{children:r}),c.jsx(ve,{scope:t,isInside:!0,children:c.jsx(ie,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=C;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return xe(q,t).isInside?null:c.jsx(se,{...n,...r,ref:e})});X.displayName=q;function ge(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Te(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function me(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function be(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],a=e[l],p=d.x,u=d.y,v=a.x,x=a.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function ye(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ce(e)}function Ce(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=F,Ee=z,Pe=B,Re=U,_e=V,je=X;function Oe(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ae(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Oe,{children:c.jsx(Ee,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Le(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Pe,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ae("notranslate bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Re,{children:c.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,translate:"no",className:d,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Le as T,Me as a,Oe as b,Ae as c};
1
+ import{r as i,b5 as H,j as c,b6 as K,b7 as W,b8 as y,da as S,ba as J,b4 as Q,b2 as Z,b3 as ee,bb as $,bj as te,bm as oe,bk as re,d3 as ne,bn as se,c as j,l as ae}from"./index-BMJCLbj5.js";import{R as ie}from"./index-jRUJ2Odt.js";var[O]=re("Tooltip",[$]),D=$(),G="TooltipProvider",le=700,k="tooltip.open",[ce,L]=O(G),F=o=>{const{__scopeTooltip:e,delayDuration:t=le,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,l=i.useRef(!0),d=i.useRef(!1),a=i.useRef(0);return i.useEffect(()=>{const p=a.current;return()=>window.clearTimeout(p)},[]),c.jsx(ce,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:i.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:i.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=G;var R="Tooltip",[ue,_]=O(R),z=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:l,delayDuration:d}=o,a=L(R,o.__scopeTooltip),p=D(e),[u,v]=i.useState(null),x=Q(),f=i.useRef(0),h=l??a.disableHoverableContent,T=d??a.delayDuration,g=i.useRef(!1),[b,m]=Z({prop:r,defaultProp:n??!1,onChange:I=>{I?(a.onOpen(),document.dispatchEvent(new CustomEvent(k))):a.onClose(),s?.(I)},caller:R}),w=i.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),E=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,m(!0)},[m]),P=i.useCallback(()=>{window.clearTimeout(f.current),f.current=0,m(!1)},[m]),N=i.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,m(!0),f.current=0},T)},[T,m]);return i.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(ee,{...p,children:c.jsx(ue,{scope:e,contentId:x,open:b,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:i.useCallback(()=>{a.isOpenDelayedRef.current?N():E()},[a.isOpenDelayedRef,N,E]),onTriggerLeave:i.useCallback(()=>{h?P():(window.clearTimeout(f.current),f.current=0)},[P,h]),onOpen:E,onClose:P,disableHoverableContent:h,children:t})})};z.displayName=R;var A="TooltipTrigger",B=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=_(A,t),s=L(A,t),l=D(t),d=i.useRef(null),a=H(e,d,n.onTriggerChange),p=i.useRef(!1),u=i.useRef(!1),v=i.useCallback(()=>p.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(K,{asChild:!0,...l,children:c.jsx(W.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:a,onPointerMove:y(o.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:y(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:y(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:y(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:y(o.onBlur,n.onClose),onClick:y(o.onClick,n.onClose)})})});B.displayName=A;var M="TooltipPortal",[de,pe]=O(M,{forceMount:void 0}),U=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=_(M,e);return c.jsx(de,{scope:e,forceMount:t,children:c.jsx(S,{present:t||s.open,children:c.jsx(J,{asChild:!0,container:n,children:r})})})};U.displayName=M;var C="TooltipContent",V=i.forwardRef((o,e)=>{const t=pe(C,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,l=_(C,o.__scopeTooltip);return c.jsx(S,{present:r||l.open,children:l.disableHoverableContent?c.jsx(Y,{side:n,...s,ref:e}):c.jsx(fe,{side:n,...s,ref:e})})}),fe=i.forwardRef((o,e)=>{const t=_(C,o.__scopeTooltip),r=L(C,o.__scopeTooltip),n=i.useRef(null),s=H(e,n),[l,d]=i.useState(null),{trigger:a,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,x=i.useCallback(()=>{d(null),v(!1)},[v]),f=i.useCallback((h,T)=>{const g=h.currentTarget,b={x:h.clientX,y:h.clientY},m=ge(b,g.getBoundingClientRect()),w=Te(b,m),E=me(T.getBoundingClientRect()),P=ye([...w,...E]);d(P),v(!0)},[v]);return i.useEffect(()=>()=>x(),[x]),i.useEffect(()=>{if(a&&u){const h=g=>f(g,u),T=g=>f(g,a);return a.addEventListener("pointerleave",h),u.addEventListener("pointerleave",T),()=>{a.removeEventListener("pointerleave",h),u.removeEventListener("pointerleave",T)}}},[a,u,f,x]),i.useEffect(()=>{if(l){const h=T=>{const g=T.target,b={x:T.clientX,y:T.clientY},m=a?.contains(g)||u?.contains(g),w=!be(b,l);m?x():w&&(x(),p())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[a,u,l,p,x]),c.jsx(Y,{...o,ref:s})}),[ve,xe]=O(R,{isInside:!1}),he=ne("TooltipContent"),Y=i.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:l,...d}=o,a=_(C,t),p=D(t),{onClose:u}=a;return i.useEffect(()=>(document.addEventListener(k,u),()=>document.removeEventListener(k,u)),[u]),i.useEffect(()=>{if(a.trigger){const v=x=>{x.target?.contains(a.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[a.trigger,u]),c.jsx(te,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(oe,{"data-state":a.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(he,{children:r}),c.jsx(ve,{scope:t,isInside:!0,children:c.jsx(ie,{id:a.contentId,role:"tooltip",children:n||r})})]})})});V.displayName=C;var q="TooltipArrow",X=i.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return xe(q,t).isInside?null:c.jsx(se,{...n,...r,ref:e})});X.displayName=q;function ge(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Te(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function me(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function be(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,l=e.length-1;s<e.length;l=s++){const d=e[s],a=e[l],p=d.x,u=d.y,v=a.x,x=a.y;u>r!=x>r&&t<(v-p)*(r-u)/(x-u)+p&&(n=!n)}return n}function ye(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),Ce(e)}function Ce(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],l=e[e.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],l=t[t.length-2];if((s.x-l.x)*(n.y-l.y)>=(s.y-l.y)*(n.x-l.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var we=F,Ee=z,Pe=B,Re=U,_e=V,je=X;function Oe(o){const e=j.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(we,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ae(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Oe,{children:c.jsx(Ee,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Le(o){const e=j.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(Pe,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function Me(o){const e=j.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const l=s===void 0?0:s;let d;e[5]!==r?(d=ae("notranslate bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=c.jsx(je,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=a):a=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==l||e[11]!==d?(p=c.jsx(Re,{children:c.jsxs(_e,{"data-slot":"tooltip-content",sideOffset:l,translate:"no",className:d,...n,children:[t,a]})}),e[8]=t,e[9]=n,e[10]=l,e[11]=d,e[12]=p):p=e[12],p}export{Le as T,Me as a,Oe as b,Ae as c};
@@ -1 +1 @@
1
- import{q as _,T as l}from"./index-CVJEcf37.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
1
+ import{q as _,T as l}from"./index-BMJCLbj5.js";let s=!1;const p="report:auth-attempt:",f=3600*1e3;function h(e){const t=new URLSearchParams(e),n=t.get("share_id")||void 0,o=t.get("email_run_id")||void 0,r=t.get("utm_source")||void 0,u=t.get("utm_medium")||void 0,a=t.get("utm_campaign")||void 0;return{entrypoint:n||r==="share"?"share":o||t.has("d")||r==="email"?"email":r?"campaign":"direct",...n?{share_id:n}:{},...o?{email_run_id:o}:{},...r?{utm_source:r}:{},...u?{utm_medium:u}:{},...a?{utm_campaign:a}:{}}}function c(){return h(typeof window>"u"?"":window.location.search)}function i(e){return`${p}${e}`}function g(){try{return globalThis.crypto.randomUUID()}catch{return`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}}function d(e){try{const t=window.sessionStorage.getItem(i(e));if(!t)return null;const n=JSON.parse(t);return n.domain!==e||typeof n.attempt_id!="string"||typeof n.gate_shown_at!="number"||Date.now()-n.gate_shown_at>f?(window.sessionStorage.removeItem(i(e)),null):n}catch{return null}}function m(e){try{window.sessionStorage.setItem(i(e.domain),JSON.stringify(e))}catch{}}function w(e){const t=d(e);if(t)return t;const n={attempt_id:g(),domain:e,gate_shown_at:Date.now(),...c()};return m(n),n}function y(e,t){const n={...w(e),...t};return m(n),n}function T(e){return{auth_attempt_id:e.attempt_id,entrypoint:e.entrypoint,...e.share_id?{share_id:e.share_id}:{},...e.email_run_id?{email_run_id:e.email_run_id}:{},...e.utm_source?{utm_source:e.utm_source}:{},...e.utm_medium?{utm_medium:e.utm_medium}:{},...e.utm_campaign?{utm_campaign:e.utm_campaign}:{}}}function R(e){const t=d(e);if(!t)return null;try{window.sessionStorage.removeItem(i(e))}catch{}return t}function S(e){const t=e.toLowerCase();return t==="invalid_email"?"invalid_email":t.includes("429")||t.includes("rate limit")?"rate_limited":t.includes("otp")||t.includes("verification code")||t.includes("invalid code")||t.includes("expired code")||t.includes("código")||t.includes("codigo")?"invalid_or_expired_code":t.includes("401")||t.includes("unauthorized")?"invalid_credentials":t.includes("409")||t.includes("already exists")?"account_exists":t.includes("network")||t.includes("fetch")?"network":t.includes("cancel")||t.includes("closed")?"cancelled":"unknown"}function I(e){s=e}function M(e,t,n){if(_())try{l.capture(e,{...c(),...t,...s?{report_preview:"reviewer"}:{}},n)}catch{}}export{S as a,w as b,M as c,T as d,R as e,h as r,I as s,y as u};
@@ -1,4 +1,4 @@
1
- import{ct as l,cy as e,br as h,ab as r,ek as b,aa as t,bp as p,bq as d,at as c,bt as m,el as v,em as E,en as I,eo as w,c5 as x,dq as T,ep as z,eq as C,er as D,bM as O,es as B,cm as V,et as W,eu as $,ev as F,ew as K,ci as J,c6 as Z,cf as j,cg as Q,ch as Y,c8 as G,ce as X,c7 as ee,cq as te}from"./index-CVJEcf37.js";import{P as oe}from"./use-mcp-client-DmOwsV3f.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let A of[...u.listeners])A(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
1
+ import{ct as l,cy as e,br as h,ab as r,ek as b,aa as t,bp as p,bq as d,at as c,bt as m,el as v,em as E,en as I,eo as w,c5 as x,dq as T,ep as z,eq as C,er as D,bM as O,es as B,cm as V,et as W,eu as $,ev as F,ew as K,ci as J,c6 as Z,cf as j,cg as Q,ch as Y,c8 as G,ce as X,c7 as ee,cq as te}from"./index-BMJCLbj5.js";import{P as oe}from"./use-mcp-client-D_FU7Mvk.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let A of[...u.listeners])A(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
2
2
 
3
3
  Individual style keys are optional - hosts may provide any subset of these values.
4
4
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -1 +1 @@
1
- import{c as A,b as K,r as V,j as t,l as P,o as X}from"./index-CVJEcf37.js";import{u as Z}from"./use-copy-DQwrjGi4.js";import{M as q}from"./markdown-BvSl7QX1.js";import{i as J}from"./Check-PyGET9iL.js";import{a as Q}from"./Copy01-BbtQlTnV.js";import{c as I,T as E,a as D}from"./tooltip-B7VLfO9w.js";import{p as Y}from"./agent-icon-BjknPEfN.js";import{b as H}from"./format-time-BtXRrtv4.js";const U={openrouter:o=>{const e=o?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function ee(o){if(!o?.providerMetadata)return 0;for(const e of Object.values(U)){const s=e(o.providerMetadata);if(s!==null)return s}return 0}function te(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function se(o,e){if(!e)return o;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,a=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:o.inputTokens+(e.inputTokens??0),outputTokens:o.outputTokens+(e.outputTokens??0),reasoningTokens:o.reasoningTokens+(e.reasoningTokens??0),totalTokens:o.totalTokens+(e.totalTokens??0),cost:o.cost+ee(e),cacheReadTokens:o.cacheReadTokens+s,cacheWriteTokens:o.cacheWriteTokens+a}}function B(o){const e=Math.max(o.inputTokens,o.cacheReadTokens+o.cacheWriteTokens);return e>0?o.cacheReadTokens/e:0}function xe(o){return o.reduce((e,s)=>se(e,s.metadata?.usage),te())}function de(o){const e=A.c(19),{id:s,part:a,copyable:c,extraActions:i,alwaysShowActions:n,animate:f}=o,r=c===void 0?!1:c,l=n===void 0?!1:n,h=f===void 0?!1:f,{handleCopy:u}=Z(),x=K(),[N,b]=V.useState(!1);let j;e[0]!==u||e[1]!==s||e[2]!==a.text?(j=async()=>{X("chat_message_copied",{message_id:s,chars:a.text.length}),await u(a.text),b(!0),setTimeout(()=>b(!1),2e3)},e[0]=u,e[1]=s,e[2]=a.text,e[3]=j):j=e[3];const T=j,g=r&&i,p=g||i;let d;e[4]!==h||e[5]!==s||e[6]!==a.text?(d=t.jsx(q,{id:s,text:a.text,animate:h}),e[4]=h,e[5]=s,e[6]=a.text,e[7]=d):d=e[7];let m;e[8]!==l||e[9]!==i||e[10]!==T||e[11]!==N||e[12]!==p||e[13]!==g||e[14]!==x?(m=p&&t.jsxs("div",{className:P("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",l?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[i,g&&i&&t.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),g&&t.jsx("button",{type:"button",onClick:T,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":x("chat.textPart.copyMessage"),children:N?t.jsx(J,{className:"size-4"}):t.jsx(Q,{className:"size-4"})})]}),e[8]=l,e[9]=i,e[10]=T,e[11]=N,e[12]=p,e[13]=g,e[14]=x,e[15]=m):m=e[15];let k;return e[16]!==d||e[17]!==m?(k=t.jsxs("div",{className:"group/part relative",children:[d,m]}),e[16]=d,e[17]=m,e[18]=k):k=e[18],k}const y=16,z=2.5,G=(y-z)/2,O=2*Math.PI*G;function me(o){const e=A.c(29),{usage:s}=o;if(!s)return null;const{totalTokens:a,inputTokens:c,outputTokens:i,cost:n}=s;if(!a&&!c&&!i)return null;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Y,{size:12}),e[0]=f):f=e[0];let r;e[1]!==n||e[2]!==a?(r=n>0?`$${n.toFixed(4)}`:a.toLocaleString(),e[1]=n,e[2]=a,e[3]=r):r=e[3];let l;e[4]!==r?(l=t.jsx(E,{asChild:!0,children:t.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[f,t.jsx("span",{className:"text-sm font-mono tabular-nums",children:r})]})}),e[4]=r,e[5]=l):l=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=h):h=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-muted",children:"in"}),e[7]=u):u=e[7];let x;e[8]!==c?(x=c.toLocaleString(),e[8]=c,e[9]=x):x=e[9];let N;e[10]!==x?(N=t.jsx("span",{className:"text-right tabular-nums",children:x}),e[10]=x,e[11]=N):N=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"text-muted",children:"out"}),e[12]=b):b=e[12];const j=i-(s.reasoningTokens??0);let T;e[13]!==j?(T=j.toLocaleString(),e[13]=j,e[14]=T):T=e[14];let g;e[15]!==T?(g=t.jsx("span",{className:"text-right tabular-nums",children:T}),e[15]=T,e[16]=g):g=e[16];let p;e[17]!==s?(p=(s.cacheReadTokens>0||s.cacheWriteTokens>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]}),e[17]=s,e[18]=p):p=e[18];let d;e[19]!==n?(d=n>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cost"}),t.jsxs("span",{className:"text-right tabular-nums",children:["$",n.toFixed(4)]})]}),e[19]=n,e[20]=d):d=e[20];let m;e[21]!==g||e[22]!==p||e[23]!==d||e[24]!==N?(m=t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[h,t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[u,N,b,g,p,d]})]}),e[21]=g,e[22]=p,e[23]=d,e[24]=N,e[25]=m):m=e[25];let k;return e[26]!==m||e[27]!==l?(k=t.jsxs(I,{children:[l,m]}),e[26]=m,e[27]=l,e[28]=k):k=e[28],k}function he(o){const e=A.c(19),{usage:s,duration:a}=o,c=a!=null&&a>0,i=s!=null&&(s.cost??0)>0,n=s!=null&&(s.totalTokens??0)>0;if(!c&&!i&&!n)return null;let f;e[0]!==a||e[1]!==c?(f=c?H(a/1e3):null,e[0]=a,e[1]=c,e[2]=f):f=e[2];const r=f;let l;e[3]!==a||e[4]!==r||e[5]!==s?(l=r&&t.jsxs(I,{children:[t.jsx(E,{asChild:!0,children:t.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:r})}),t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[t.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),t.jsx("span",{className:"tabular-nums",children:H(a/1e3)}),(s?.reasoningTokens??0)>0&&t.jsxs("span",{className:"ml-2 opacity-50",children:[s.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=a,e[4]=r,e[5]=s,e[6]=l):l=e[6];let h;e[7]!==i||e[8]!==c||e[9]!==n?(h=c&&(i||n)&&t.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=i,e[8]=c,e[9]=n,e[10]=h):h=e[10];let u;e[11]!==i||e[12]!==n||e[13]!==s?(u=(i||n)&&t.jsxs(I,{children:[t.jsx(E,{asChild:!0,children:t.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i?`$${s.cost.toFixed(4)}`:`${s.totalTokens.toLocaleString()} tok`})}),t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[t.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[t.jsx("span",{className:"opacity-60",children:"in"}),t.jsx("span",{className:"text-right tabular-nums",children:(s.inputTokens??0).toLocaleString()}),t.jsx("span",{className:"opacity-60",children:"out"}),t.jsx("span",{className:"text-right tabular-nums",children:((s.outputTokens??0)-(s?.reasoningTokens??0)).toLocaleString()}),(s?.reasoningTokens??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"opacity-60",children:"think"}),t.jsx("span",{className:"text-right tabular-nums",children:s.reasoningTokens.toLocaleString()})]}),((s?.cacheReadTokens??0)>0||(s?.cacheWriteTokens??0)>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"opacity-60",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]})]})]})]}),e[11]=i,e[12]=n,e[13]=s,e[14]=u):u=e[14];let x;return e[15]!==l||e[16]!==h||e[17]!==u?(x=t.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[l,h,u]}),e[15]=l,e[16]=h,e[17]=u,e[18]=x):x=e[18],x}function pe(o){const e=A.c(49),{usage:s,totalTokens:a,contextWindow:c,onOpenContextPanel:i}=o,n=Math.min(a/c*100,100),f=O-n/100*O,r=s?.cost??0,l=s?.inputTokens??0,h=s?.outputTokens??0;let u;e[0]!==n?(u=n.toFixed(0),e[0]=n,e[1]=u):u=e[1];let x;e[2]!==r?(x=r>0?`, $${r.toFixed(2)}`:"",e[2]=r,e[3]=x):x=e[3];const N=`Context usage: ${u}%${x}`,b=i?"cursor-pointer":"cursor-default";let j;e[4]!==b?(j=P("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",b),e[4]=b,e[5]=j):j=e[5];let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("circle",{cx:y/2,cy:y/2,r:G,fill:"none",stroke:"currentColor",strokeWidth:z,className:"opacity-15"}),e[6]=T):T=e[6];const g=n>90?"text-destructive":n>70?"text-warning":"text-muted-foreground";let p;e[7]!==g?(p=P(g),e[7]=g,e[8]=p):p=e[8];let d;e[9]!==f||e[10]!==p?(d=t.jsxs("svg",{width:y,height:y,className:"-rotate-90","aria-hidden":"true",children:[T,t.jsx("circle",{cx:y/2,cy:y/2,r:G,fill:"none",stroke:"currentColor",strokeWidth:z,strokeDasharray:O,strokeDashoffset:f,strokeLinecap:"round",className:p})]}),e[9]=f,e[10]=p,e[11]=d):d=e[11];let m;e[12]!==n?(m=n.toFixed(0),e[12]=n,e[13]=m):m=e[13];let k;e[14]!==r?(k=r>0?` · $${r.toFixed(2)}`:"",e[14]=r,e[15]=k):k=e[15];let v;e[16]!==m||e[17]!==k?(v=t.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[m,"%",k]}),e[16]=m,e[17]=k,e[18]=v):v=e[18];let S;e[19]!==i||e[20]!==v||e[21]!==N||e[22]!==j||e[23]!==d?(S=t.jsx(E,{asChild:!0,children:t.jsxs("button",{type:"button",onClick:i,"aria-label":N,className:j,children:[d,v]})}),e[19]=i,e[20]=v,e[21]=N,e[22]=j,e[23]=d,e[24]=S):S=e[24];let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("span",{className:"text-muted",children:"context"}),e[25]=L):L=e[25];let R;e[26]!==a?(R=a.toLocaleString(),e[26]=a,e[27]=R):R=e[27];let C;e[28]!==c?(C=c.toLocaleString(),e[28]=c,e[29]=C):C=e[29];let _;e[30]!==n?(_=n.toFixed(1),e[30]=n,e[31]=_):_=e[31];let $;e[32]!==R||e[33]!==C||e[34]!==_?($=t.jsxs("span",{className:"text-right tabular-nums",children:[R," / ",C," (",_,"%)"]}),e[32]=R,e[33]=C,e[34]=_,e[35]=$):$=e[35];let w;e[36]!==r||e[37]!==l||e[38]!==h?(w=r>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cost"}),t.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]}),t.jsx("span",{className:"text-muted",children:"in"}),t.jsx("span",{className:"text-right tabular-nums",children:l.toLocaleString()}),t.jsx("span",{className:"text-muted",children:"out"}),t.jsx("span",{className:"text-right tabular-nums",children:h.toLocaleString()})]}),e[36]=r,e[37]=l,e[38]=h,e[39]=w):w=e[39];let F;e[40]!==s?(F=((s?.cacheReadTokens??0)>0||(s?.cacheWriteTokens??0)>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]}),e[40]=s,e[41]=F):F=e[41];let M;e[42]!==$||e[43]!==w||e[44]!==F?(M=t.jsx(D,{side:"top",className:"font-mono text-[11px]",children:t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[L,$,w,F]})}),e[42]=$,e[43]=w,e[44]=F,e[45]=M):M=e[45];let W;return e[46]!==S||e[47]!==M?(W=t.jsxs(I,{children:[S,M]}),e[46]=S,e[47]=M,e[48]=W):W=e[48],W}export{de as M,pe as S,me as a,se as b,xe as c,he as d,te as e,ee as g};
1
+ import{c as A,b as K,r as V,j as t,l as P,o as X}from"./index-BMJCLbj5.js";import{u as Z}from"./use-copy-CNVX7-Qb.js";import{M as q}from"./markdown-D53j_yF1.js";import{i as J}from"./Check-C1q-PHCd.js";import{a as Q}from"./Copy01-Dpbu0g_H.js";import{c as I,T as E,a as D}from"./tooltip-Duh82s_3.js";import{p as Y}from"./agent-icon-BayCJ1XK.js";import{b as H}from"./format-time-BtXRrtv4.js";const U={openrouter:o=>{const e=o?.openrouter;return typeof e=="object"&&e!==null&&"usage"in e&&typeof e.usage=="object"&&e.usage!==null&&"cost"in e.usage&&typeof e.usage.cost=="number"?e.usage.cost:null}};function ee(o){if(!o?.providerMetadata)return 0;for(const e of Object.values(U)){const s=e(o.providerMetadata);if(s!==null)return s}return 0}function te(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function se(o,e){if(!e)return o;const s=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,a=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:o.inputTokens+(e.inputTokens??0),outputTokens:o.outputTokens+(e.outputTokens??0),reasoningTokens:o.reasoningTokens+(e.reasoningTokens??0),totalTokens:o.totalTokens+(e.totalTokens??0),cost:o.cost+ee(e),cacheReadTokens:o.cacheReadTokens+s,cacheWriteTokens:o.cacheWriteTokens+a}}function B(o){const e=Math.max(o.inputTokens,o.cacheReadTokens+o.cacheWriteTokens);return e>0?o.cacheReadTokens/e:0}function xe(o){return o.reduce((e,s)=>se(e,s.metadata?.usage),te())}function de(o){const e=A.c(19),{id:s,part:a,copyable:c,extraActions:i,alwaysShowActions:n,animate:f}=o,r=c===void 0?!1:c,l=n===void 0?!1:n,h=f===void 0?!1:f,{handleCopy:u}=Z(),x=K(),[N,b]=V.useState(!1);let j;e[0]!==u||e[1]!==s||e[2]!==a.text?(j=async()=>{X("chat_message_copied",{message_id:s,chars:a.text.length}),await u(a.text),b(!0),setTimeout(()=>b(!1),2e3)},e[0]=u,e[1]=s,e[2]=a.text,e[3]=j):j=e[3];const T=j,g=r&&i,p=g||i;let d;e[4]!==h||e[5]!==s||e[6]!==a.text?(d=t.jsx(q,{id:s,text:a.text,animate:h}),e[4]=h,e[5]=s,e[6]=a.text,e[7]=d):d=e[7];let m;e[8]!==l||e[9]!==i||e[10]!==T||e[11]!==N||e[12]!==p||e[13]!==g||e[14]!==x?(m=p&&t.jsxs("div",{className:P("flex w-full items-center gap-2 text-sm text-muted-foreground transition-all duration-200 mt-1 py-1",l?"opacity-100":"opacity-0 pointer-events-none group-hover/part:opacity-100 group-hover/part:pointer-events-auto"),children:[i,g&&i&&t.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),g&&t.jsx("button",{type:"button",onClick:T,className:"text-muted-foreground [@media(hover:hover)]:hover:text-foreground transition-colors active:scale-[0.97]","aria-label":x("chat.textPart.copyMessage"),children:N?t.jsx(J,{className:"size-4"}):t.jsx(Q,{className:"size-4"})})]}),e[8]=l,e[9]=i,e[10]=T,e[11]=N,e[12]=p,e[13]=g,e[14]=x,e[15]=m):m=e[15];let k;return e[16]!==d||e[17]!==m?(k=t.jsxs("div",{className:"group/part relative",children:[d,m]}),e[16]=d,e[17]=m,e[18]=k):k=e[18],k}const y=16,z=2.5,G=(y-z)/2,O=2*Math.PI*G;function me(o){const e=A.c(29),{usage:s}=o;if(!s)return null;const{totalTokens:a,inputTokens:c,outputTokens:i,cost:n}=s;if(!a&&!c&&!i)return null;let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(Y,{size:12}),e[0]=f):f=e[0];let r;e[1]!==n||e[2]!==a?(r=n>0?`$${n.toFixed(4)}`:a.toLocaleString(),e[1]=n,e[2]=a,e[3]=r):r=e[3];let l;e[4]!==r?(l=t.jsx(E,{asChild:!0,children:t.jsxs("span",{className:"inline-flex items-center text-muted-foreground [@media(hover:hover)]:hover:text-foreground pl-1 h-6 gap-1 whitespace-nowrap shrink-0 cursor-default",children:[f,t.jsx("span",{className:"text-sm font-mono tabular-nums",children:r})]})}),e[4]=r,e[5]=l):l=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("p",{className:"text-muted text-[10px] mb-1",children:"tokens"}),e[6]=h):h=e[6];let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("span",{className:"text-muted",children:"in"}),e[7]=u):u=e[7];let x;e[8]!==c?(x=c.toLocaleString(),e[8]=c,e[9]=x):x=e[9];let N;e[10]!==x?(N=t.jsx("span",{className:"text-right tabular-nums",children:x}),e[10]=x,e[11]=N):N=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx("span",{className:"text-muted",children:"out"}),e[12]=b):b=e[12];const j=i-(s.reasoningTokens??0);let T;e[13]!==j?(T=j.toLocaleString(),e[13]=j,e[14]=T):T=e[14];let g;e[15]!==T?(g=t.jsx("span",{className:"text-right tabular-nums",children:T}),e[15]=T,e[16]=g):g=e[16];let p;e[17]!==s?(p=(s.cacheReadTokens>0||s.cacheWriteTokens>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]}),e[17]=s,e[18]=p):p=e[18];let d;e[19]!==n?(d=n>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cost"}),t.jsxs("span",{className:"text-right tabular-nums",children:["$",n.toFixed(4)]})]}),e[19]=n,e[20]=d):d=e[20];let m;e[21]!==g||e[22]!==p||e[23]!==d||e[24]!==N?(m=t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[h,t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[u,N,b,g,p,d]})]}),e[21]=g,e[22]=p,e[23]=d,e[24]=N,e[25]=m):m=e[25];let k;return e[26]!==m||e[27]!==l?(k=t.jsxs(I,{children:[l,m]}),e[26]=m,e[27]=l,e[28]=k):k=e[28],k}function he(o){const e=A.c(19),{usage:s,duration:a}=o,c=a!=null&&a>0,i=s!=null&&(s.cost??0)>0,n=s!=null&&(s.totalTokens??0)>0;if(!c&&!i&&!n)return null;let f;e[0]!==a||e[1]!==c?(f=c?H(a/1e3):null,e[0]=a,e[1]=c,e[2]=f):f=e[2];const r=f;let l;e[3]!==a||e[4]!==r||e[5]!==s?(l=r&&t.jsxs(I,{children:[t.jsx(E,{asChild:!0,children:t.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:r})}),t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[t.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"thinking"}),t.jsx("span",{className:"tabular-nums",children:H(a/1e3)}),(s?.reasoningTokens??0)>0&&t.jsxs("span",{className:"ml-2 opacity-50",children:[s.reasoningTokens.toLocaleString()," tok"]})]})]}),e[3]=a,e[4]=r,e[5]=s,e[6]=l):l=e[6];let h;e[7]!==i||e[8]!==c||e[9]!==n?(h=c&&(i||n)&&t.jsx("span",{className:"text-muted-foreground/40 select-none",children:"·"}),e[7]=i,e[8]=c,e[9]=n,e[10]=h):h=e[10];let u;e[11]!==i||e[12]!==n||e[13]!==s?(u=(i||n)&&t.jsxs(I,{children:[t.jsx(E,{asChild:!0,children:t.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground cursor-default [@media(hover:hover)]:hover:text-foreground transition-colors select-none",children:i?`$${s.cost.toFixed(4)}`:`${s.totalTokens.toLocaleString()} tok`})}),t.jsxs(D,{side:"top",className:"font-mono text-[11px]",children:[t.jsx("p",{className:"opacity-60 text-[10px] mb-1",children:"tokens"}),t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[t.jsx("span",{className:"opacity-60",children:"in"}),t.jsx("span",{className:"text-right tabular-nums",children:(s.inputTokens??0).toLocaleString()}),t.jsx("span",{className:"opacity-60",children:"out"}),t.jsx("span",{className:"text-right tabular-nums",children:((s.outputTokens??0)-(s?.reasoningTokens??0)).toLocaleString()}),(s?.reasoningTokens??0)>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"opacity-60",children:"think"}),t.jsx("span",{className:"text-right tabular-nums",children:s.reasoningTokens.toLocaleString()})]}),((s?.cacheReadTokens??0)>0||(s?.cacheWriteTokens??0)>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"opacity-60",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]})]})]})]}),e[11]=i,e[12]=n,e[13]=s,e[14]=u):u=e[14];let x;return e[15]!==l||e[16]!==h||e[17]!==u?(x=t.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[l,h,u]}),e[15]=l,e[16]=h,e[17]=u,e[18]=x):x=e[18],x}function pe(o){const e=A.c(49),{usage:s,totalTokens:a,contextWindow:c,onOpenContextPanel:i}=o,n=Math.min(a/c*100,100),f=O-n/100*O,r=s?.cost??0,l=s?.inputTokens??0,h=s?.outputTokens??0;let u;e[0]!==n?(u=n.toFixed(0),e[0]=n,e[1]=u):u=e[1];let x;e[2]!==r?(x=r>0?`, $${r.toFixed(2)}`:"",e[2]=r,e[3]=x):x=e[3];const N=`Context usage: ${u}%${x}`,b=i?"cursor-pointer":"cursor-default";let j;e[4]!==b?(j=P("flex items-center gap-1.5 text-muted-foreground hover:text-foreground h-6 px-1 shrink-0",b),e[4]=b,e[5]=j):j=e[5];let T;e[6]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx("circle",{cx:y/2,cy:y/2,r:G,fill:"none",stroke:"currentColor",strokeWidth:z,className:"opacity-15"}),e[6]=T):T=e[6];const g=n>90?"text-destructive":n>70?"text-warning":"text-muted-foreground";let p;e[7]!==g?(p=P(g),e[7]=g,e[8]=p):p=e[8];let d;e[9]!==f||e[10]!==p?(d=t.jsxs("svg",{width:y,height:y,className:"-rotate-90","aria-hidden":"true",children:[T,t.jsx("circle",{cx:y/2,cy:y/2,r:G,fill:"none",stroke:"currentColor",strokeWidth:z,strokeDasharray:O,strokeDashoffset:f,strokeLinecap:"round",className:p})]}),e[9]=f,e[10]=p,e[11]=d):d=e[11];let m;e[12]!==n?(m=n.toFixed(0),e[12]=n,e[13]=m):m=e[13];let k;e[14]!==r?(k=r>0?` · $${r.toFixed(2)}`:"",e[14]=r,e[15]=k):k=e[15];let v;e[16]!==m||e[17]!==k?(v=t.jsxs("span",{className:"inline-block overflow-hidden whitespace-nowrap max-w-0 opacity-0 transition-[max-width,opacity] duration-200 ease-out @[320px]/chat-bottom:max-w-32 @[320px]/chat-bottom:opacity-100 text-[11px] font-mono tabular-nums",children:[m,"%",k]}),e[16]=m,e[17]=k,e[18]=v):v=e[18];let S;e[19]!==i||e[20]!==v||e[21]!==N||e[22]!==j||e[23]!==d?(S=t.jsx(E,{asChild:!0,children:t.jsxs("button",{type:"button",onClick:i,"aria-label":N,className:j,children:[d,v]})}),e[19]=i,e[20]=v,e[21]=N,e[22]=j,e[23]=d,e[24]=S):S=e[24];let L;e[25]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("span",{className:"text-muted",children:"context"}),e[25]=L):L=e[25];let R;e[26]!==a?(R=a.toLocaleString(),e[26]=a,e[27]=R):R=e[27];let C;e[28]!==c?(C=c.toLocaleString(),e[28]=c,e[29]=C):C=e[29];let _;e[30]!==n?(_=n.toFixed(1),e[30]=n,e[31]=_):_=e[31];let $;e[32]!==R||e[33]!==C||e[34]!==_?($=t.jsxs("span",{className:"text-right tabular-nums",children:[R," / ",C," (",_,"%)"]}),e[32]=R,e[33]=C,e[34]=_,e[35]=$):$=e[35];let w;e[36]!==r||e[37]!==l||e[38]!==h?(w=r>0&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cost"}),t.jsxs("span",{className:"text-right tabular-nums",children:["$",r.toFixed(4)]}),t.jsx("span",{className:"text-muted",children:"in"}),t.jsx("span",{className:"text-right tabular-nums",children:l.toLocaleString()}),t.jsx("span",{className:"text-muted",children:"out"}),t.jsx("span",{className:"text-right tabular-nums",children:h.toLocaleString()})]}),e[36]=r,e[37]=l,e[38]=h,e[39]=w):w=e[39];let F;e[40]!==s?(F=((s?.cacheReadTokens??0)>0||(s?.cacheWriteTokens??0)>0)&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted",children:"cache hit"}),t.jsx("span",{className:"text-right tabular-nums",children:`${(B(s)*100).toFixed(0)}%`})]}),e[40]=s,e[41]=F):F=e[41];let M;e[42]!==$||e[43]!==w||e[44]!==F?(M=t.jsx(D,{side:"top",className:"font-mono text-[11px]",children:t.jsxs("div",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[L,$,w,F]})}),e[42]=$,e[43]=w,e[44]=F,e[45]=M):M=e[45];let W;return e[46]!==S||e[47]!==M?(W=t.jsxs(I,{children:[S,M]}),e[46]=S,e[47]=M,e[48]=W):W=e[48],W}export{de as M,pe as S,me as a,se as b,xe as c,he as d,te as e,ee as g};
@@ -1 +1 @@
1
- import{c as p,M as m,_ as R,K as h,m as y,z as S,ap as D}from"./index-CVJEcf37.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},w={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function x(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||x(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,w[s]??[],F))}return t}function H(o,e){return{queryKey:h.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=m(),t=R();let n;o[0]!==e.id?(n=h.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=m();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function z(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(Q),o[0]=e,o[1]=t):t=o[1],t}function Q(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function B(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function G(o){const e=p.c(11),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{E as a,F as b,B as c,$ as d,N as e,O as f,G as g,C as i,b as p,z as u};
1
+ import{c as p,M as m,_ as R,K as h,m as y,z as S,ap as D}from"./index-BMJCLbj5.js";const P=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],M=new Set(P);function O(o){return M.has(o)}const A={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},L={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},T={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},w={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function _(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function x(o){return _(o).includes("deepresearch")}const q=["sonar","searchpreview","online"];function I(o){const e=_(o);return e.includes("deepresearch")?!1:q.some(t=>e.includes(t))}function C(o){return o.asyncResearch!==!0&&I(o.modelId)}function F(o){return o.asyncResearch===!0||x(o.modelId)||I(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function b(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=e[n.id]??[],s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,A[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,L[s]??[])),t.image||(t.image=u(i,n.id,T[s]??[],a=>a.capabilities?.includes("image")===!0)),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],C)),t.deepResearch||(t.deepResearch=u(i,n.id,w[s]??[],F))}return t}function H(o,e){return{queryKey:h.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await D(o,"AI_PROVIDER_KEY_LIST",{})}}function $(){const o=p.c(7),{org:e}=m(),t=R();let n;o[0]!==e.id?(n=h.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function N(){const o=p.c(5),{org:e}=m();let t;o[0]!==e.id||o[1]!==e.slug?(t=H(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function z(){const o=p.c(2),e=N();let t;return o[0]!==e?(t=e.filter(Q),o[0]=e,o[1]=t):t=o[1],t}function Q(o){return O(o.providerId)}function E(o){const e=p.c(15),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function B(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=b(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function G(o){const e=p.c(11),{org:t}=m(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=h.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{E as a,F as b,B as c,$ as d,N as e,O as f,G as g,C as i,b as p,z as u};
@@ -1 +1 @@
1
- import{c as U,M as q,_ as I,K as T,m as Q,n as w,e as y,t as m,x as z}from"./index-CVJEcf37.js";import{u as J}from"./use-mcp-client-DmOwsV3f.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function et(t){const e=U.c(12),{org:s}=q(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function st(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function it(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function ot(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function at(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function nt(){const t=U.c(64),{org:e}=q(),s=I(),l=w();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let E;t[30]!==s?(E=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=E):E=t[31];let S;t[32]!==i||t[33]!==o?(S=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=S):S=t[34];let K;t[35]!==E||t[36]!==S?(K={mutationFn:E,onSuccess:S},t[35]=E,t[36]=S,t[37]=K):K=t[37];const x=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const P=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let M;t[51]!==F||t[52]!==N?(M={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=M):M=t[53];const h=y(M);let b;t[54]!==s?(b={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=b):b=t[55];const v=y(b);let L;return t[56]!==D||t[57]!==k||t[58]!==v||t[59]!==x||t[60]!==h||t[61]!==P||t[62]!==j?(L={create:D,update:j,remove:k,triggerAdd:x,triggerRemove:h,triggerRotateToken:P,run:v},t[56]=D,t[57]=k,t[58]=v,t[59]=x,t[60]=h,t[61]=P,t[62]=j,t[63]=L):L=t[63],L}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{nt as a,at as b,et as c,it as d,ot as e,st as u};
1
+ import{c as U,M as q,_ as I,K as T,m as Q,n as w,e as y,t as m,x as z}from"./index-BMJCLbj5.js";import{u as J}from"./use-mcp-client-D_FU7Mvk.js";function V(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const s of t.params)e[s.name]={type:s.type,description:s.description,enum:s.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function et(t){const e=U.c(12),{org:s}=q(),l=t??z;let a;e[0]!==s.id||e[1]!==s.slug||e[2]!==l?(a={connectionId:l,orgId:s.id,orgSlug:s.slug},e[0]=s.id,e[1]=s.slug,e[2]=l,e[3]=a):a=e[3];const i=J(a);let n;e[4]!==t?(n=T.toolCall(t??"","TRIGGER_LIST",""),e[4]=t,e[5]=n):n=e[5];let o;e[6]!==i?(o=async()=>{const d=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(d.structuredContent??d).triggers.map(V)},e[6]=i,e[7]=o):o=e[7];const c=!!t;let r;return e[8]!==n||e[9]!==o||e[10]!==c?(r={queryKey:n,queryFn:o,enabled:c,staleTime:3e4},e[8]=n,e[9]=o,e[10]=c,e[11]=r):r=e[11],Q(r)}function st(t){const e=U.c(9),{org:s}=q(),l=I();let a;e[0]!==s.id||e[1]!==t?(a=T.automations(s.id,t),e[0]=s.id,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==l||e[4]!==t?(i=async()=>(await l.call("AUTOMATION_LIST",t!=null?{virtual_mcp_id:t}:{})).automations,e[3]=l,e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==a||e[7]!==i?(n={queryKey:a,queryFn:i,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n):n=e[8],Q(n)}function it(t){const e=U.c(10),{org:s}=q(),l=I();let a;e[0]!==t||e[1]!==s.id?(a=T.automation(s.id,t),e[0]=t,e[1]=s.id,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==l?(i=async()=>(await l.call("AUTOMATION_GET",{id:t})).automation,e[3]=t,e[4]=l,e[5]=i):i=e[5];const n=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==n?(o={queryKey:a,queryFn:i,enabled:n,staleTime:1e4},e[6]=a,e[7]=i,e[8]=n,e[9]=o):o=e[9],Q(o)}function ot(t,e){const s=U.c(12),{org:l}=q(),a=I();let i;s[0]!==t||s[1]!==l.id||s[2]!==e?(i=T.automationRunStats(l.id,t,JSON.stringify(e??{})),s[0]=t,s[1]=l.id,s[2]=e,s[3]=i):i=s[3];let n;s[4]!==t||s[5]!==e||s[6]!==a?(n=async()=>await a.call("AUTOMATION_RUN_STATS",{automation_id:t,...e?.startDate?{startDate:e.startDate}:{},...e?.endDate?{endDate:e.endDate}:{}}),s[4]=t,s[5]=e,s[6]=a,s[7]=n):n=s[7];const o=!!t;let c;return s[8]!==i||s[9]!==n||s[10]!==o?(c={queryKey:i,queryFn:n,enabled:o,staleTime:3e4},s[8]=i,s[9]=n,s[10]=o,s[11]=c):c=s[11],Q(c)}function at(t){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:t}}function nt(){const t=U.c(64),{org:e}=q(),s=I(),l=w();let a;t[0]!==e||t[1]!==l?(a=()=>l.invalidateQueries({queryKey:T.automationsAll(e.id)}),t[0]=e,t[1]=l,t[2]=a):a=t[2];const i=a;let n;t[3]!==e||t[4]!==l?(n=u=>l.invalidateQueries({queryKey:T.automation(e.id,u)}),t[3]=e,t[4]=l,t[5]=n):n=t[5];const o=n;let c;t[6]!==s?(c=async u=>await s.call("AUTOMATION_CREATE",u),t[6]=s,t[7]=c):c=t[7];let r;t[8]!==i?(r=()=>{i(),m.success("Automation created successfully")},t[8]=i,t[9]=r):r=t[9];let d;t[10]!==c||t[11]!==r?(d={mutationFn:c,onSuccess:r,onError:X},t[10]=c,t[11]=r,t[12]=d):d=t[12];const D=y(d);let A;t[13]!==s?(A=async u=>await s.call("AUTOMATION_UPDATE",u),t[13]=s,t[14]=A):A=t[14];let p;t[15]!==i||t[16]!==o?(p=(u,f)=>{i(),typeof f.id=="string"&&o(f.id),m.success("Automation updated successfully")},t[15]=i,t[16]=o,t[17]=p):p=t[17];let G;t[18]!==A||t[19]!==p?(G={mutationFn:A,onSuccess:p,onError:W},t[18]=A,t[19]=p,t[20]=G):G=t[20];const j=y(G);let g;t[21]!==s?(g=async u=>await s.call("AUTOMATION_DELETE",{id:u}),t[21]=s,t[22]=g):g=t[22];let _;t[23]!==i||t[24]!==e||t[25]!==l?(_=(u,f)=>{l.removeQueries({queryKey:T.automation(e.id,f)}),i(),m.success("Automation deleted successfully")},t[23]=i,t[24]=e,t[25]=l,t[26]=_):_=t[26];let $;t[27]!==g||t[28]!==_?($={mutationFn:g,onSuccess:_,onError:H},t[27]=g,t[28]=_,t[29]=$):$=t[29];const k=y($);let E;t[30]!==s?(E=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),t[30]=s,t[31]=E):E=t[31];let S;t[32]!==i||t[33]!==o?(S=u=>{i(),o(u.automation_id)},t[32]=i,t[33]=o,t[34]=S):S=t[34];let K;t[35]!==E||t[36]!==S?(K={mutationFn:E,onSuccess:S},t[35]=E,t[36]=S,t[37]=K):K=t[37];const x=y(K);let O;t[38]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),t[38]=s,t[39]=O):O=t[39];let R;t[40]!==i||t[41]!==o?(R=(u,f)=>{i(),o(f.automation_id)},t[40]=i,t[41]=o,t[42]=R):R=t[42];let C;t[43]!==O||t[44]!==R?(C={mutationFn:O,onSuccess:R},t[43]=O,t[44]=R,t[45]=C):C=t[45];const P=y(C);let F;t[46]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),t[46]=s,t[47]=F):F=t[47];let N;t[48]!==i||t[49]!==o?(N=(u,f)=>{i(),o(f.automation_id)},t[48]=i,t[49]=o,t[50]=N):N=t[50];let M;t[51]!==F||t[52]!==N?(M={mutationFn:F,onSuccess:N},t[51]=F,t[52]=N,t[53]=M):M=t[53];const h=y(M);let b;t[54]!==s?(b={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},t[54]=s,t[55]=b):b=t[55];const v=y(b);let L;return t[56]!==D||t[57]!==k||t[58]!==v||t[59]!==x||t[60]!==h||t[61]!==P||t[62]!==j?(L={create:D,update:j,remove:k,triggerAdd:x,triggerRemove:h,triggerRotateToken:P,run:v},t[56]=D,t[57]=k,t[58]=v,t[59]=x,t[60]=h,t[61]=P,t[62]=j,t[63]=L):L=t[63],L}function Y(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to run automation: ${e}`)}function B(t){t.skipped?m.info(`Automation skipped: ${t.skipped}`):t.error?m.error(`Automation failed: ${t.error}`):m.success("Automation triggered")}function H(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to delete automation: ${e}`)}function W(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to update automation: ${e}`)}function X(t){const e=t instanceof Error?t.message:String(t);m.error(`Failed to create automation: ${e}`)}export{nt as a,at as b,et as c,it as d,ot as e,st as u};
@@ -1 +1 @@
1
- import{c as T,r as o}from"./index-CVJEcf37.js";const _=700;function D(s,l,S){const e=T.c(7),a=S?.delay??_,p=S?.isSaving??!1,[f,m]=o.useState(s),[g,y]=o.useState(s),[A,d]=o.useState(!1),t=o.useRef(null);s!==g&&(y(s),!A&&!p&&m(s));let r;e[0]!==a||e[1]!==l?(r=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},a)},e[0]=a,e[1]=l,e[2]=r):r=e[2];const i=r;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==f||e[5]!==i?(n=[f,i,E],e[4]=f,e[5]=i,e[6]=n):n=e[6],n}export{D as u};
1
+ import{c as T,r as o}from"./index-BMJCLbj5.js";const _=700;function D(s,l,S){const e=T.c(7),a=S?.delay??_,p=S?.isSaving??!1,[f,m]=o.useState(s),[g,y]=o.useState(s),[A,d]=o.useState(!1),t=o.useRef(null);s!==g&&(y(s),!A&&!p&&m(s));let r;e[0]!==a||e[1]!==l?(r=u=>{m(u),d(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,d(!1),l(u)},a)},e[0]=a,e[1]=l,e[2]=r):r=e[2];const i=r;let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=u=>{m(u),t.current&&clearTimeout(t.current),t.current=null,d(!1)},e[3]=c):c=e[3];const E=c;let n;return e[4]!==f||e[5]!==i?(n=[f,i,E],e[4]=f,e[5]=i,e[6]=n):n=e[6],n}export{D as u};
@@ -1 +1 @@
1
- import{c as D,M,W as N,m,K as R,x as Q,dB as L,C as v,y as F}from"./index-CVJEcf37.js";import{m as T}from"./use-mcp-client-DmOwsV3f.js";import{u as h}from"./companions-core-CZwGf1b1.js";function A(e){return e?e.run_in_progress?"generating":e.scanned_at?"ready":"none":"none"}function K(e){return e.connectionQueryPending?!0:!e.hasConnection||e.cdClientFailed?!1:e.diagnosticQueryPending}const x=2e4;function U(e){if(typeof e!="string"||!e)return null;try{return new URL(e).hostname||null}catch{return null}}function V(){const e=D.c(24),{org:n}=M(),t=N.COMMERCE_DISCOVERY(n.id);let l;e[0]!==n.id||e[1]!==n.slug?(l=T({connectionId:Q,orgId:n.id,orgSlug:n.slug}),e[0]=n.id,e[1]=n.slug,e[2]=l):l=e[2];const{data:f}=m(l),u=m({queryKey:R.commerceDiscoveryConnection(n.id,t),enabled:!!f,retry:!1,staleTime:6e4,queryFn:async()=>{if(!f)throw new Error("selfClient not ready");const S=await f.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(S)}}),C=u.data?.item??null,{data:s,isError:y}=m({...T({connectionId:t,orgId:n.id,orgSlug:n.slug}),enabled:!!C}),E=R.commerceDiscoveryDiagnostic(n.id,t),p=!!s;let o;e[3]!==s?(o=async()=>{if(!s)throw new Error("cdClient not ready");const S=await s.callTool({name:L,arguments:{}});return h(S).diagnostic??null},e[3]=s,e[4]=o):o=e[4];let d;e[5]!==E||e[6]!==p||e[7]!==o?(d={queryKey:E,enabled:p,retry:1,refetchInterval:b,queryFn:o},e[5]=E,e[6]=p,e[7]=o,e[8]=d):d=e[8];const r=m(d),i=C?.metadata?.siteUrl,_=r.data??null,w=r.isSuccess,I=!!C;let c;e[9]!==y||e[10]!==u.isPending||e[11]!==r.isPending||e[12]!==I?(c=K({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),e[9]=y,e[10]=u.isPending,e[11]=r.isPending,e[12]=I,e[13]=c):c=e[13];const O=typeof i=="string"&&i?i:null;let a;e[14]!==i?(a=U(i),e[14]=i,e[15]=a):a=e[15];const P=s??null;let g;return e[16]!==t||e[17]!==r.isSuccess||e[18]!==a||e[19]!==P||e[20]!==_||e[21]!==c||e[22]!==O?(g={diagnostic:_,isSuccess:w,isLoading:c,siteUrl:O,host:a,connectionId:t,cdClient:P},e[16]=t,e[17]=r.isSuccess,e[18]=a,e[19]=P,e[20]=_,e[21]=c,e[22]=O,e[23]=g):g=e[23],g}function b(e){return e.state.status!=="error"&&A(e.state.data)==="generating"?x:!1}function W(e,n){return{to:v.app,params:{org:e.slug,agentId:F(e.id),connectionId:n,toolName:L},search:{}}}export{W as c,A as d,V as u};
1
+ import{c as D,M,W as N,m,K as R,x as Q,dB as L,C as v,y as F}from"./index-BMJCLbj5.js";import{m as T}from"./use-mcp-client-D_FU7Mvk.js";import{u as h}from"./companions-core-CZwGf1b1.js";function A(e){return e?e.run_in_progress?"generating":e.scanned_at?"ready":"none":"none"}function K(e){return e.connectionQueryPending?!0:!e.hasConnection||e.cdClientFailed?!1:e.diagnosticQueryPending}const x=2e4;function U(e){if(typeof e!="string"||!e)return null;try{return new URL(e).hostname||null}catch{return null}}function V(){const e=D.c(24),{org:n}=M(),t=N.COMMERCE_DISCOVERY(n.id);let l;e[0]!==n.id||e[1]!==n.slug?(l=T({connectionId:Q,orgId:n.id,orgSlug:n.slug}),e[0]=n.id,e[1]=n.slug,e[2]=l):l=e[2];const{data:f}=m(l),u=m({queryKey:R.commerceDiscoveryConnection(n.id,t),enabled:!!f,retry:!1,staleTime:6e4,queryFn:async()=>{if(!f)throw new Error("selfClient not ready");const S=await f.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:t}});return h(S)}}),C=u.data?.item??null,{data:s,isError:y}=m({...T({connectionId:t,orgId:n.id,orgSlug:n.slug}),enabled:!!C}),E=R.commerceDiscoveryDiagnostic(n.id,t),p=!!s;let o;e[3]!==s?(o=async()=>{if(!s)throw new Error("cdClient not ready");const S=await s.callTool({name:L,arguments:{}});return h(S).diagnostic??null},e[3]=s,e[4]=o):o=e[4];let d;e[5]!==E||e[6]!==p||e[7]!==o?(d={queryKey:E,enabled:p,retry:1,refetchInterval:b,queryFn:o},e[5]=E,e[6]=p,e[7]=o,e[8]=d):d=e[8];const r=m(d),i=C?.metadata?.siteUrl,_=r.data??null,w=r.isSuccess,I=!!C;let c;e[9]!==y||e[10]!==u.isPending||e[11]!==r.isPending||e[12]!==I?(c=K({connectionQueryPending:u.isPending,hasConnection:I,cdClientFailed:y,diagnosticQueryPending:r.isPending}),e[9]=y,e[10]=u.isPending,e[11]=r.isPending,e[12]=I,e[13]=c):c=e[13];const O=typeof i=="string"&&i?i:null;let a;e[14]!==i?(a=U(i),e[14]=i,e[15]=a):a=e[15];const P=s??null;let g;return e[16]!==t||e[17]!==r.isSuccess||e[18]!==a||e[19]!==P||e[20]!==_||e[21]!==c||e[22]!==O?(g={diagnostic:_,isSuccess:w,isLoading:c,siteUrl:O,host:a,connectionId:t,cdClient:P},e[16]=t,e[17]=r.isSuccess,e[18]=a,e[19]=P,e[20]=_,e[21]=c,e[22]=O,e[23]=g):g=e[23],g}function b(e){return e.state.status!=="error"&&A(e.state.data)==="generating"?x:!1}function W(e,n){return{to:v.app,params:{org:e.slug,agentId:F(e.id),connectionId:n,toolName:L},search:{}}}export{W as c,A as d,V as u};