decocms 2.390.0 → 2.391.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 (285) hide show
  1. package/dist/client/assets/{AlertCircle-C_7Pr4dy.js → AlertCircle-D833Ltv-.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-Zf8tvfpV.js → ArrowUpRight-CrasW2I3.js} +1 -1
  3. package/dist/client/assets/{Check-Cgs_Ieiz.js → Check-B-Snf346.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-Ws5jIF72.js → CheckCircle-Da1q2cG-.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BEPxXMEW.js → ChevronDown-BvZFsep5.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-B3uEK8Up.js → ChevronRight-CNXVJ2DZ.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-CGb1Z9d-.js → ChevronUp-CLQmelYz.js} +1 -1
  8. package/dist/client/assets/{Container-Ba4KEZmY.js → Container-Cs9tbOj1.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-CnrlerAd.js → DotsVertical-BF7lQrGo.js} +1 -1
  10. package/dist/client/assets/{FilterLines-CiCglWXp.js → FilterLines-DMWymvCD.js} +1 -1
  11. package/dist/client/assets/{HardDrive-BErHWn5D.js → HardDrive-CYl4X54q.js} +1 -1
  12. package/dist/client/assets/{Key01-BhdD2jeG.js → Key01-DrmRQ9bQ.js} +1 -1
  13. package/dist/client/assets/{LinkExternal01-BMPLHN-8.js → LinkExternal01-BwOlCt0z.js} +1 -1
  14. package/dist/client/assets/{Lock01-Bdorlsjo.js → Lock01-FBg4tUR8.js} +1 -1
  15. package/dist/client/assets/{Monitor01-D1gAe0to.js → Monitor01-DpahDMVO.js} +1 -1
  16. package/dist/client/assets/{Palette-c8ZIWUhe.js → Palette-DsjYkIAm.js} +1 -1
  17. package/dist/client/assets/{Play-DDY4sH4l.js → Play-C_TiwHSZ.js} +1 -1
  18. package/dist/client/assets/{Plus-DAjWQbOS.js → Plus-pn49dx0X.js} +1 -1
  19. package/dist/client/assets/{RefreshCcw01-VWfVcJ_k.js → RefreshCcw01-C_M5ucZA.js} +1 -1
  20. package/dist/client/assets/{SearchMd-BBiHSx-2.js → SearchMd-ItgHq67b.js} +1 -1
  21. package/dist/client/assets/{Settings02-uck5BGEM.js → Settings02-BnWl2AAW.js} +1 -1
  22. package/dist/client/assets/{Shield01-CG_dTxg9.js → Shield01-D1FxKad8.js} +1 -1
  23. package/dist/client/assets/{Star01-882PVAAF.js → Star01-B3pqpeOo.js} +1 -1
  24. package/dist/client/assets/{Stars02-DLq0ELXY.js → Stars02-B-2qVnjt.js} +1 -1
  25. package/dist/client/assets/{Sun-DvNoBaRg.js → Sun-DsPGStQy.js} +1 -1
  26. package/dist/client/assets/{SwitchHorizontal01-BmYbPnsz.js → SwitchHorizontal01-Vb6nTk77.js} +1 -1
  27. package/dist/client/assets/{Tool01-CfGF28aS.js → Tool01-Me7z4aVw.js} +1 -1
  28. package/dist/client/assets/{Trash01-D0VodJcn.js → Trash01-9HT5dT2T.js} +1 -1
  29. package/dist/client/assets/{Upload01-CtxMN-V1.js → Upload01-CWsYex6m.js} +1 -1
  30. package/dist/client/assets/{User01-Z8vjMM2Q.js → User01-SXBYgWls.js} +1 -1
  31. package/dist/client/assets/{Users01-DaLasEg_.js → Users01-BprBjMXf.js} +1 -1
  32. package/dist/client/assets/{Users03-CZw3VUm8.js → Users03-Cr2QcycS.js} +1 -1
  33. package/dist/client/assets/{X-C2UB3gqF.js → X-ztVwMZpQ.js} +1 -1
  34. package/dist/client/assets/{XCircle-Dl1nnD8d.js → XCircle-CWhlQPxr.js} +1 -1
  35. package/dist/client/assets/{XClose-CVuJ-jWb.js → XClose-BW7B2d42.js} +1 -1
  36. package/dist/client/assets/{Zap-CNd3spCf.js → Zap-4DwoO8-E.js} +1 -1
  37. package/dist/client/assets/{ZapSquare-kGYRH_Lu.js → ZapSquare-CMBh1a8Y.js} +1 -1
  38. package/dist/client/assets/{access-gate-BUeG_V5u.js → access-gate-DI7D3beo.js} +1 -1
  39. package/dist/client/assets/{accordion-BirllTny.js → accordion-DaGjUiGE.js} +1 -1
  40. package/dist/client/assets/{add-section-modal-D50t-02_.js → add-section-modal-RHCmDLGk.js} +1 -1
  41. package/dist/client/assets/{agent-icon-BdiD0RLx.js → agent-icon-CY89NnPl.js} +1 -1
  42. package/dist/client/assets/{agent-icons-SEcV4C-v.js → agent-icons-D9qcuvjS.js} +1 -1
  43. package/dist/client/assets/{agents-list-BabGOlPG.js → agents-list-DmgZRjSH.js} +1 -1
  44. package/dist/client/assets/{ai-providers-DzfJy5JY.js → ai-providers-DiDaVv0R.js} +1 -1
  45. package/dist/client/assets/{alert-CKpf2djk.js → alert-CsfEK-pW.js} +1 -1
  46. package/dist/client/assets/{alert-dialog-CG4nfj_z.js → alert-dialog-Dv2nOtyH.js} +1 -1
  47. package/dist/client/assets/{auth-catchall-C_rzLmdJ.js → auth-catchall-lmRiIw97.js} +1 -1
  48. package/dist/client/assets/{auth-split-layout-CTUQz9Kl.js → auth-split-layout-C0BuEx0Y.js} +1 -1
  49. package/dist/client/assets/{automation-list-row-BLRlR0X6.js → automation-list-row-B43-OISE.js} +1 -1
  50. package/dist/client/assets/{automations-CLAvlZLj.js → automations-BpGfD0qZ.js} +1 -1
  51. package/dist/client/assets/{avatar-3vqxDD1E.js → avatar-CIl9WOil.js} +1 -1
  52. package/dist/client/assets/{badge-BmO5u7_s.js → badge-BsmgKXBP.js} +1 -1
  53. package/dist/client/assets/{brand-context-DYCf6vlw.js → brand-context-Bg7qOwel.js} +1 -1
  54. package/dist/client/assets/{calendar-DW_r7qvX.js → calendar-sIddgWRt.js} +1 -1
  55. package/dist/client/assets/{capability-load-error-qul8SOEe.js → capability-load-error-DNEUh47e.js} +1 -1
  56. package/dist/client/assets/{card-BWW6R_6X.js → card-BIluY4Aq.js} +1 -1
  57. package/dist/client/assets/{chat-context-DBBmTPXK.js → chat-context-B-JG5oa1.js} +2 -2
  58. package/dist/client/assets/{checkbox-Sb6ecTlU.js → checkbox-BmubIr1M.js} +1 -1
  59. package/dist/client/assets/{cli-auth-success-LXsmSgTF.js → cli-auth-success-MXAXVQ6a.js} +1 -1
  60. package/dist/client/assets/{collection-detail-CER191S5.js → collection-detail-DLgJrnXh.js} +1 -1
  61. package/dist/client/assets/{collection-display-button-DjgujJT7.js → collection-display-button-D0fGYFIL.js} +1 -1
  62. package/dist/client/assets/{collection-search-Cxln4u6P.js → collection-search-BZRhH-iz.js} +1 -1
  63. package/dist/client/assets/{collection-table-wrapper-BdBD2u9X.js → collection-table-wrapper-CGZy2zWc.js} +1 -1
  64. package/dist/client/assets/{collection-tabs-Ci4DFONy.js → collection-tabs-TUq1NkiU.js} +1 -1
  65. package/dist/client/assets/{collections-7iRm9JeX.js → collections-DUaCJTyY.js} +1 -1
  66. package/dist/client/assets/{command-CrRBXwYJ.js → command-C13zK3Ht.js} +1 -1
  67. package/dist/client/assets/{connect-desktop-dialog-NIZOWGHv.js → connect-desktop-dialog-CdVxXsY6.js} +1 -1
  68. package/dist/client/assets/{connection-card-CJWFkQPW.js → connection-card-CLKDaTfE.js} +1 -1
  69. package/dist/client/assets/{connection-detail-BK0ML7rZ.js → connection-detail-cwq9aLQz.js} +1 -1
  70. package/dist/client/assets/{connection-form-helpers-CMqA2R0p.js → connection-form-helpers-D1Vc0bR5.js} +1 -1
  71. package/dist/client/assets/{connections-CeANA-Uy.js → connections-CkT0_UGI.js} +1 -1
  72. package/dist/client/assets/{constants-BWDiAmgI.js → constants-Cs7fB5Fz.js} +1 -1
  73. package/dist/client/assets/{decopilot-sse-pool-DJoZ3XrI.js → decopilot-sse-pool-D4kwiVhA.js} +1 -1
  74. package/dist/client/assets/{dialog-BXAoEbia.js → dialog-0ciXFW-Z.js} +1 -1
  75. package/dist/client/assets/{domain-settings-YJ4ND65O.js → domain-settings-BaYQoreR.js} +1 -1
  76. package/dist/client/assets/{drawer-D__v6aJ0.js → drawer-ByzTvH1N.js} +1 -1
  77. package/dist/client/assets/{dropdown-menu-DQ8l1U7a.js → dropdown-menu-C-OdW-YG.js} +1 -1
  78. package/dist/client/assets/{dynamic-plugin-layout-CLYWK_u2.js → dynamic-plugin-layout-64bDGLQW.js} +1 -1
  79. package/dist/client/assets/{empty-state-Bfkah6CX.js → empty-state-Bu34R0Ge.js} +1 -1
  80. package/dist/client/assets/{empty-state-z_QlyOw8.js → empty-state-DD8Ex2ET.js} +1 -1
  81. package/dist/client/assets/{extract-connection-data-Cu2-kqzT.js → extract-connection-data-BifWZIpC.js} +1 -1
  82. package/dist/client/assets/{features-DQZMf0mT.js → features-BKNvc12e.js} +1 -1
  83. package/dist/client/assets/{file-explorer-CPl8-KK_.js → file-explorer-DuSyaYSO.js} +1 -1
  84. package/dist/client/assets/{files-Bn3HcYnb.js → files-Dic8gSms.js} +1 -1
  85. package/dist/client/assets/{form-T5LuiwS8.js → form-D3vgRHP1.js} +1 -1
  86. package/dist/client/assets/{general-D-2meCyX.js → general-wwPRVFzd.js} +1 -1
  87. package/dist/client/assets/{generate-id-DncrbeM3.js → generate-id-CK8apMBl.js} +1 -1
  88. package/dist/client/assets/{github-repo-picker-BRuA_FEr.js → github-repo-picker-SXWdqHV5.js} +1 -1
  89. package/dist/client/assets/{hover-card-62Nk_Zl7.js → hover-card-qQqTzhfd.js} +1 -1
  90. package/dist/client/assets/index-1U_6QEoR.js +3 -0
  91. package/dist/client/assets/{index-D2hb6HAs.js → index-9XFiI_cQ.js} +1 -1
  92. package/dist/client/assets/{index-GaiIam-g.js → index-BWswuQI7.js} +1 -1
  93. package/dist/client/assets/{index-BfBEiyau.js → index-BXtbhLzx.js} +1 -1
  94. package/dist/client/assets/{index-ByaHk_g4.js → index-BkFXYyEN.js} +1 -1
  95. package/dist/client/assets/{index-BFfMeyqC.js → index-Cf4jx0jn.js} +1 -1
  96. package/dist/client/assets/index-CfaVK5lN.js +1 -0
  97. package/dist/client/assets/{index-BjV8LBDh.js → index-CmhL1r7_.js} +1 -1
  98. package/dist/client/assets/{index-RrZmhiYH.css → index-DscYvBUa.css} +1 -1
  99. package/dist/client/assets/{index-DCp7HEPF.js → index-UC1l_H0T.js} +3 -3
  100. package/dist/client/assets/{index-BGCG9e6B.js → index-Wh01ccFt.js} +1 -1
  101. package/dist/client/assets/{index-DcSwUOCL.js → index-bhqxeP1Q.js} +1 -1
  102. package/dist/client/assets/{index-DZJFEPqr.js → index-hYNfskTj.js} +24 -24
  103. package/dist/client/assets/{index-redirect-Ba_dziKx.js → index-redirect-CABzexD-.js} +1 -1
  104. package/dist/client/assets/{index-Czi70gSy.js → index-rlMTPXaY.js} +1 -1
  105. package/dist/client/assets/{index-DPeeRxPG.js → index-vedw9sXS.js} +1 -1
  106. package/dist/client/assets/{index-D7gjc6EA.js → index-xKyKnuDm.js} +1 -1
  107. package/dist/client/assets/{infiniteQueryObserver-DMW65Y_x.js → infiniteQueryObserver-CCz1lrGk.js} +1 -1
  108. package/dist/client/assets/{input-CoK19GuW.js → input-DsrZ-ooH.js} +1 -1
  109. package/dist/client/assets/{integration-icon-DM6HURzh.js → integration-icon-CFCAsXBi.js} +1 -1
  110. package/dist/client/assets/{label-PYEKUwvw.js → label-C52V0YQz.js} +1 -1
  111. package/dist/client/assets/{layout-bWUYtZto.js → layout-D5T7gOAZ.js} +1 -1
  112. package/dist/client/assets/{login-QRHCuQhL.js → login-CuXJUHKa.js} +1 -1
  113. package/dist/client/assets/{members-hbHFmyBY.js → members-DnAkiDqK.js} +1 -1
  114. package/dist/client/assets/{monaco-editor-cwfoQ5Mr.js → monaco-editor-C5sim7vP.js} +1 -1
  115. package/dist/client/assets/{monitoring-stats-row-DPmHOaiI.js → monitoring-stats-row-5-mLjHDJ.js} +1 -1
  116. package/dist/client/assets/{oauth-callback-Cqik5iuj.js → oauth-callback-CYv5Cw_K.js} +1 -1
  117. package/dist/client/assets/{oauth-callback-ai-provider-Ds7-vlKu.js → oauth-callback-ai-provider-DpW7p84f.js} +1 -1
  118. package/dist/client/assets/{onboarding-BpCZ1-Fk.js → onboarding-CK3bOf2b.js} +1 -1
  119. package/dist/client/assets/{org-layout-BmHKCvHi.js → org-layout-CVkjzoQd.js} +1 -1
  120. package/dist/client/assets/{org-plugin-layout-CsX4wzAA.js → org-plugin-layout-DkOg1NNq.js} +1 -1
  121. package/dist/client/assets/{pair-QI485pVY.js → pair-DuifxCP-.js} +2 -2
  122. package/dist/client/assets/{plugin-empty-state-ClGqQD85.js → plugin-empty-state-CRg-yg2h.js} +1 -1
  123. package/dist/client/assets/{plugin-header-DRFFfCpI.js → plugin-header-C7mIppY_.js} +1 -1
  124. package/dist/client/assets/{plugin-layout-CYGQt3sX.js → plugin-layout-Ce5zELj9.js} +1 -1
  125. package/dist/client/assets/{popover-cIIlkH6K.js → popover-BySx8Yy1.js} +1 -1
  126. package/dist/client/assets/{profile-D6IpMsS8.js → profile-DQS2RnO_.js} +1 -1
  127. package/dist/client/assets/{project-app-view-j_nxOyBm.js → project-app-view-BBNViERL.js} +1 -1
  128. package/dist/client/assets/registry-bTT6sC4k.js +2 -0
  129. package/dist/client/assets/{registry-layout-2FXod7wG.js → registry-layout-BHvN84rj.js} +1 -1
  130. package/dist/client/assets/{require-capability-B4jltmGb.js → require-capability-DXveCq4o.js} +1 -1
  131. package/dist/client/assets/{required-auth-layout-DbThbvdw.js → required-auth-layout-ByChgpTu.js} +1 -1
  132. package/dist/client/assets/{reset-password-6VTk_zJ2.js → reset-password-BGFgEL2-.js} +1 -1
  133. package/dist/client/assets/{roles-FRNhgx23.js → roles-fGPRaevq.js} +1 -1
  134. package/dist/client/assets/{scroll-area-DHFZrobk.js → scroll-area-kdWO_XIf.js} +1 -1
  135. package/dist/client/assets/{search-input-DoLbGa1Y.js → search-input-hCQ4CIxC.js} +1 -1
  136. package/dist/client/assets/{secrets-C_NrnMlt.js → secrets-dd9urQTh.js} +1 -1
  137. package/dist/client/assets/{sections-editor-bJOziJGi.js → sections-editor-CLjRvVZM.js} +1 -1
  138. package/dist/client/assets/{select-DB5O0_48.js → select-C79R2QFd.js} +1 -1
  139. package/dist/client/assets/{settings-layout-BKMAtYNw.js → settings-layout-di44lhti.js} +1 -1
  140. package/dist/client/assets/{settings-section-C8jEfvhM.js → settings-section-CnVikxon.js} +1 -1
  141. package/dist/client/assets/{sheet-BWD0UYNA.js → sheet-hxQW4lrM.js} +1 -1
  142. package/dist/client/assets/{shell-controls-CWvVgXCS.js → shell-controls-B7jgOw1A.js} +1 -1
  143. package/dist/client/assets/{shell-layout-DQhzT6wR.js → shell-layout-cAhx7nwo.js} +1 -1
  144. package/dist/client/assets/{sidebar-D5BcYVrs.js → sidebar-Bf-Wr1hs.js} +1 -1
  145. package/dist/client/assets/{skeleton-CdHs8ihJ.js → skeleton-CeRahJgb.js} +1 -1
  146. package/dist/client/assets/{sortable.esm-B3rsvJD6.js → sortable.esm-DGwNfCNj.js} +1 -1
  147. package/dist/client/assets/{spinner-DvoeSjuB.js → spinner-BwiMhd03.js} +1 -1
  148. package/dist/client/assets/{sso-BHzcYu85.js → sso-A3mgNvab.js} +1 -1
  149. package/dist/client/assets/{store-BJVSFmBB.js → store-B1ZNxr8I.js} +1 -1
  150. package/dist/client/assets/store-registry-CA42oPfz.js +2 -0
  151. package/dist/client/assets/{switch-aCgbPhbN.js → switch-BoSXcbci.js} +1 -1
  152. package/dist/client/assets/{tab-id-DRhzsO2q.js → tab-id-sG-YwvQY.js} +1 -1
  153. package/dist/client/assets/{table-AeAUBYNy.js → table-D5j7pewX.js} +1 -1
  154. package/dist/client/assets/{tabs-A8p2lpkg.js → tabs-K7JDwDCm.js} +1 -1
  155. package/dist/client/assets/{task-status-Cn23kLE-.js → task-status-BbaOoCEJ.js} +1 -1
  156. package/dist/client/assets/{textarea-DyS2wlP2.js → textarea-DHADmpP7.js} +1 -1
  157. package/dist/client/assets/{toggle-group-dzbobbSH.js → toggle-group-DhYShFZn.js} +1 -1
  158. package/dist/client/assets/{toolbar-C7cSDXIs.js → toolbar-B7eXBOSC.js} +1 -1
  159. package/dist/client/assets/{tools-list-DUkZN7Ty.js → tools-list-9DGVlsWM.js} +1 -1
  160. package/dist/client/assets/{tooltip-DbEod1mn.js → tooltip-D99J2opT.js} +1 -1
  161. package/dist/client/assets/{types-DcSrmxgv.js → types-CV-R3YJI.js} +1 -1
  162. package/dist/client/assets/{use-ai-providers-Bt6fBHoi.js → use-ai-providers-YYcsx8QH.js} +1 -1
  163. package/dist/client/assets/{use-capability-DdtlKz_v.js → use-capability-s7F5ltPc.js} +1 -1
  164. package/dist/client/assets/{use-collections-CdbQrbKk.js → use-collections-BTet4gbf.js} +1 -1
  165. package/dist/client/assets/{use-connection-CDL88IlU.js → use-connection-DBaDqCrX.js} +1 -1
  166. package/dist/client/assets/{use-copy-CoQfk21l.js → use-copy-DjD9mpB1.js} +1 -1
  167. package/dist/client/assets/{use-create-virtual-mcp-DuxMg9Qb.js → use-create-virtual-mcp-BfWQXjFB.js} +1 -1
  168. package/dist/client/assets/{use-debounced-autosave-6uXdvcir.js → use-debounced-autosave-DPs4sPcH.js} +1 -1
  169. package/dist/client/assets/{use-delete-connection-B27p116n.js → use-delete-connection-D0A8QTyE.js} +1 -1
  170. package/dist/client/assets/{use-file-configs-Be-kUZjo.js → use-file-configs-DwpwyHz8.js} +1 -1
  171. package/dist/client/assets/{use-infinite-scroll-B7s6hEeR.js → use-infinite-scroll-C8COlVH5.js} +1 -1
  172. package/dist/client/assets/{use-list-state-DBXJ2wmz.js → use-list-state-_quSpESz.js} +1 -1
  173. package/dist/client/assets/{use-mcp-prompts-BFGdNKhE.js → use-mcp-prompts-C30Pwn4d.js} +1 -1
  174. package/dist/client/assets/{use-mcp-tools-C_WdZ5mk.js → use-mcp-tools-DNGR_0Mv.js} +1 -1
  175. package/dist/client/assets/{use-members-BtOmTNIb.js → use-members-CuvbA1Jk.js} +1 -1
  176. package/dist/client/assets/{use-navigate-to-agent-ByC4bR_a.js → use-navigate-to-agent-mMKG1Kz-.js} +1 -1
  177. package/dist/client/assets/{use-org-auth-client-B87BItmA.js → use-org-auth-client-P53inDkn.js} +1 -1
  178. package/dist/client/assets/{use-org-sso-C5LBVu7K.js → use-org-sso-6mIiyURD.js} +1 -1
  179. package/dist/client/assets/{use-organization-roles-CP10Npq7.js → use-organization-roles-BSaTQq5s.js} +1 -1
  180. package/dist/client/assets/{use-organization-settings-BrhMCOo5.js → use-organization-settings-zgxousJq.js} +1 -1
  181. package/dist/client/assets/{use-registry-connections-BD6K2lOq.js → use-registry-connections-XMNP50oa.js} +1 -1
  182. package/dist/client/assets/{use-secrets-xrf2L_e3.js → use-secrets-C48m2leJ.js} +1 -1
  183. package/dist/client/assets/{use-status-sounds-Gyxj8_HU.js → use-status-sounds-COuUXyeW.js} +1 -1
  184. package/dist/client/assets/{use-view-mode-a_9x4z_S.js → use-view-mode-dJJYweFh.js} +1 -1
  185. package/dist/client/assets/{use-virtual-mcp-BQRVNAq-.js → use-virtual-mcp-D0WYBO2Q.js} +1 -1
  186. package/dist/client/assets/useInfiniteQuery-EQnbj896.js +1 -0
  187. package/dist/client/assets/{useRouterState-CAwLzT0Y.js → useRouterState-BW1upcty.js} +1 -1
  188. package/dist/client/assets/useSuspenseInfiniteQuery-Dd6prvrJ.js +1 -0
  189. package/dist/client/assets/{user-Bx8ki2ht.js → user-CqzasT-1.js} +1 -1
  190. package/dist/client/assets/{view-mode-toggle-N3CPWQZE.js → view-mode-toggle-lh_SmTz1.js} +1 -1
  191. package/dist/client/assets/{workflow-DVu60KvV.js → workflow-BeHOQQuz.js} +1 -1
  192. package/dist/client/assets/workflow-detail-IpyJtXyx.js +1 -0
  193. package/dist/client/index.html +2 -2
  194. package/dist/server/cli.js +1 -1
  195. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js +36 -6
  196. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/generated/root.js.map +1 -1
  197. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +15 -0
  198. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
  199. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js +36 -6
  200. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/generated/root.js.map +1 -1
  201. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +15 -0
  202. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
  203. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js +36 -6
  204. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/generated/root.js.map +1 -1
  205. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +15 -0
  206. package/dist/server/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
  207. package/dist/server/node_modules/@opentelemetry/otlp-transformer/package.json +12 -14
  208. package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
  209. package/dist/server/node_modules/ansi-regex/index.js +14 -0
  210. package/dist/server/node_modules/ansi-regex/package.json +61 -0
  211. package/dist/server/node_modules/ansi-regex/readme.md +66 -0
  212. package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
  213. package/dist/server/node_modules/emoji-regex/README.md +107 -0
  214. package/dist/server/node_modules/emoji-regex/index.d.ts +3 -0
  215. package/dist/server/node_modules/emoji-regex/index.js +4 -0
  216. package/dist/server/node_modules/emoji-regex/index.mjs +4 -0
  217. package/dist/server/node_modules/emoji-regex/package.json +45 -0
  218. package/dist/server/node_modules/pg-cloudflare/LICENSE +21 -0
  219. package/dist/server/node_modules/pg-cloudflare/README.md +112 -0
  220. package/dist/server/node_modules/pg-cloudflare/dist/empty.d.ts +2 -0
  221. package/dist/server/node_modules/pg-cloudflare/dist/empty.js +6 -0
  222. package/dist/server/node_modules/pg-cloudflare/dist/empty.js.map +1 -0
  223. package/dist/server/node_modules/pg-cloudflare/dist/index.d.ts +31 -0
  224. package/dist/server/node_modules/pg-cloudflare/dist/index.js +152 -0
  225. package/dist/server/node_modules/pg-cloudflare/dist/index.js.map +1 -0
  226. package/dist/server/node_modules/pg-cloudflare/esm/index.mjs +3 -0
  227. package/dist/server/node_modules/pg-cloudflare/package.json +39 -0
  228. package/dist/server/node_modules/pg-cloudflare/src/empty.ts +3 -0
  229. package/dist/server/node_modules/pg-cloudflare/src/index.ts +166 -0
  230. package/dist/server/node_modules/pg-cloudflare/src/types.d.ts +25 -0
  231. package/dist/server/node_modules/pg-connection-string/LICENSE +21 -0
  232. package/dist/server/node_modules/pg-connection-string/README.md +105 -0
  233. package/dist/server/node_modules/pg-connection-string/esm/index.mjs +8 -0
  234. package/dist/server/node_modules/pg-connection-string/index.d.ts +36 -0
  235. package/dist/server/node_modules/pg-connection-string/index.js +231 -0
  236. package/dist/server/node_modules/pg-connection-string/package.json +52 -0
  237. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  238. package/dist/server/node_modules/pg-int8/README.md +16 -0
  239. package/dist/server/node_modules/pg-int8/index.js +100 -0
  240. package/dist/server/node_modules/pg-int8/package.json +24 -0
  241. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  242. package/dist/server/node_modules/postgres-array/index.js +97 -0
  243. package/dist/server/node_modules/postgres-array/license +21 -0
  244. package/dist/server/node_modules/postgres-array/package.json +35 -0
  245. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  246. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  247. package/dist/server/node_modules/postgres-bytea/license +21 -0
  248. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  249. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  250. package/dist/server/node_modules/postgres-date/index.js +116 -0
  251. package/dist/server/node_modules/postgres-date/license +21 -0
  252. package/dist/server/node_modules/postgres-date/package.json +33 -0
  253. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  254. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  255. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  256. package/dist/server/node_modules/postgres-interval/license +21 -0
  257. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  258. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  259. package/dist/server/node_modules/split2/LICENSE +13 -0
  260. package/dist/server/node_modules/split2/README.md +85 -0
  261. package/dist/server/node_modules/split2/bench.js +27 -0
  262. package/dist/server/node_modules/split2/index.js +141 -0
  263. package/dist/server/node_modules/split2/package.json +39 -0
  264. package/dist/server/node_modules/split2/test.js +409 -0
  265. package/package.json +1 -1
  266. package/dist/client/assets/index-Cebt8Vmf.js +0 -1
  267. package/dist/client/assets/index-qicwPvdr.js +0 -3
  268. package/dist/client/assets/registry-CyfY9aU7.js +0 -2
  269. package/dist/client/assets/store-registry-TEKlj2aS.js +0 -2
  270. package/dist/client/assets/useInfiniteQuery-DD7euD4X.js +0 -1
  271. package/dist/client/assets/useSuspenseInfiniteQuery-BqbAqOcb.js +0 -1
  272. package/dist/client/assets/workflow-detail-nRnFPm6I.js +0 -1
  273. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  274. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  275. package/dist/server/node_modules/get-east-asian-width/license +0 -9
  276. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  277. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  278. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  279. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  280. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  281. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  282. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  283. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  284. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  285. /package/dist/server/node_modules/{is-fullwidth-code-point → ansi-regex}/license +0 -0
@@ -1 +1 @@
1
- import{r as i,j as e,l as n,m as l}from"./index-DCp7HEPF.js";function d(){const[t,r]=i.useState(null),[c,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const s=await l();if(!s.success){r(s.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(s){r(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[c&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!c&&!t&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),t&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t?"Authentication Failed":c?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:t}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):c?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{d as default};
1
+ import{r as i,j as e,l as n,m as l}from"./index-UC1l_H0T.js";function d(){const[t,r]=i.useState(null),[c,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const s=await l();if(!s.success){r(s.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(s){r(s instanceof Error?s.message:String(s)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[c&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!c&&!t&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),t&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:t?"Authentication Failed":c?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:t}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):c?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{d as default};
@@ -1 +1 @@
1
- import{r,j as e,l as d}from"./index-DCp7HEPF.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
1
+ import{r,j as e,l as d}from"./index-UC1l_H0T.js";function m(){const[s,i]=r.useState("loading"),[o,l]=r.useState(null),c=r.useRef(!1);return c.current||(c.current=!0,queueMicrotask(()=>{try{const t=new URLSearchParams(window.location.search),a=t.get("code"),n=t.get("state");if(!a||!n)throw new Error("Missing code or state parameter");if(window.opener)window.opener.postMessage({type:"AI_PROVIDER_OAUTH_CALLBACK",code:a,stateToken:n},window.location.origin),i("success"),setTimeout(()=>window.close(),1500);else throw new Error("No opener window found")}catch(t){console.error("OAuth callback error:",t),l(t instanceof Error?t.message:String(t)),i("error"),setTimeout(()=>window.close(),3e3)}})),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[s==="success"&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),s==="loading"&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(d,{size:32,className:"animate-spin text-primary"})}),s==="error"&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s==="error"?"Authentication Failed":s==="success"?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s==="error"?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:o}),e.jsx("p",{className:"mt-2",children:"This window will close automatically."})]}):s==="success"?e.jsx("p",{children:"Authentication complete. This window will close automatically."}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{m as default};
@@ -1 +1 @@
1
- import{e as K,j as t,b as me,l as Q,a as ne,r as F,n as he,K as pe,B as oe,c as H,o as de}from"./index-DCp7HEPF.js";import{R as xe}from"./required-auth-layout-DbThbvdw.js";import{A as Y}from"./auth-split-layout-CTUQz9Kl.js";import{A as ee}from"./avatar-3vqxDD1E.js";import{I as be}from"./input-CoK19GuW.js";import{L as je}from"./label-PYEKUwvw.js";import{S as ye}from"./switch-aCgbPhbN.js";import{t as Ne,a as ve}from"./Users03-CZw3VUm8.js";import{i as we}from"./CheckCircle-Ws5jIF72.js";import{t as Se,a as ke}from"./Palette-c8ZIWUhe.js";import{i as ze}from"./Upload01-CtxMN-V1.js";import"./useRouterState-CAwLzT0Y.js";import"./User01-Z8vjMM2Q.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function le(r){return r.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function He(){const r=K.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(_e,{})}),r[0]=e):e=r[0],e}function te(r){const e=K.c(13),{title:g,description:l,logoUrl:f,logoFallback:s}=r;let a;e[0]!==s||e[1]!==f?(a=t.jsx("div",{children:f?t.jsx(ee,{url:f,fallback:s??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=s,e[1]=f,e[2]=a):a=e[2];let i;e[3]!==g?(i=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=i):i=e[4];let o;e[5]!==l?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:l}),e[5]=l,e[6]=o):o=e[6];let h;e[7]!==i||e[8]!==o?(h=t.jsxs("div",{className:"space-y-2",children:[i,o]}),e[7]=i,e[8]=o,e[9]=h):h=e[9];let n;return e[10]!==a||e[11]!==h?(n=t.jsxs("div",{className:"grid gap-10",children:[a,h]}),e[10]=a,e[11]=h,e[12]=n):n=e[12],n}function _e(){const r=K.c(4),{data:e,isPending:g}=me.useSession();if(g){let a;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"})})}),r[0]=a):a=r[0],a}const l=e?.user?.email??"",f=e?.user?.name;let s;return r[1]!==f||r[2]!==l?(s=t.jsx(Oe,{email:l,userName:f}),r[1]=f,r[2]=l,r[3]=s):s=r[3],s}function Oe(r){const e=K.c(70),{email:g,userName:l}=r;let f,s,a,i,o,h;if(e[0]!==g||e[1]!==l){a=g.split("@")[1]?.toLowerCase()??"",i=!!a&&!Ce.has(a);const m=a.split(".")[0]??"";s=m.charAt(0).toUpperCase()+m.slice(1);let x;e[8]!==s||e[9]!==i||e[10]!==l?(x=i?s:l?.split(" ")[0]??"",e[8]=s,e[9]=i,e[10]=l,e[11]=x):x=e[11],f=x,h=he,o=pe.domainLookup(a),e[0]=g,e[1]=l,e[2]=f,e[3]=s,e[4]=a,e[5]=i,e[6]=o,e[7]=h}else f=e[2],s=e[3],a=e[4],i=e[5],o=e[6],h=e[7];let n;e[12]!==i||e[13]!==o?(n={queryKey:o,queryFn:Ae,enabled:i},e[12]=i,e[13]=o,e[14]=n):n=e[14];const{data:v,isLoading:d}=h(n);let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k={mutationFn:Pe},e[15]=k):k=e[15];const c=ne(k),[D,P]=F.useState(!1);if(d){let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=m):m=e[16];let x;return e[17]!==a?(x=t.jsx(Y,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[m,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=x):x=e[18],x}let E,y,z;if(e[19]!==D||e[20]!==s||e[21]!==v?.organizations||e[22]!==a||e[23]!==i||e[24]!==c||e[25]!==l){z=Symbol.for("react.early_return_sentinel");e:{y=v?.organizations??[];const m=y.filter(Ee);E=y.length>0;const x=m.length>0,N=c.variables??null;if(D){let u;e[29]!==l?(u=l?.split(" ")[0]??"",e[29]=l,e[30]=u):u=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=()=>P(!1),e[31]=b):b=e[31];let p;e[32]!==s||e[33]!==a||e[34]!==i||e[35]!==u?(p=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:u,allowDomainClaim:!1,onBack:b}),e[32]=s,e[33]=a,e[34]=i,e[35]=u,e[36]=p):p=e[36],z=p;break e}if(x){const u=m.length===1?"You have access to an organization":"You have access to multiple organizations",b=m.length===1?"Your email domain matches an existing organization.":"Your email domain matches more than one. Pick one to join.";let p;e[37]!==u||e[38]!==b?(p=t.jsx(te,{title:u,description:b}),e[37]=u,e[38]=b,e[39]=p):p=e[39];let w;e[40]!==a||e[41]!==c||e[42]!==N?(w=O=>{const G=c.isPending&&N===O.slug;return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:O.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:O.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:O.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx(oe,{size:"default",onClick:()=>c.mutate(O.slug),disabled:c.isPending,children:G?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," ","Joining..."]}):"Join"})]},O.id)},e[40]=a,e[41]=c,e[42]=N,e[43]=w):w=e[43];const _=t.jsx("div",{className:"grid gap-2",children:m.map(w)});let S;e[44]!==c.error?(S=c.error&&t.jsx("p",{className:"text-xs text-destructive",children:c.error instanceof Error?c.error.message:"Failed to join organization"}),e[44]=c.error,e[45]=S):S=e[45];let $;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>P(!0),children:"Create a new organization instead"}),e[46]=$):$=e[46];let L;e[47]!==_||e[48]!==S||e[49]!==p?(L=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[p,_,S,$]})}),e[47]=_,e[48]=S,e[49]=p,e[50]=L):L=e[50],z=L;break e}}e[19]=D,e[20]=s,e[21]=v?.organizations,e[22]=a,e[23]=i,e[24]=c,e[25]=l,e[26]=E,e[27]=y,e[28]=z}else E=e[26],y=e[27],z=e[28];if(z!==Symbol.for("react.early_return_sentinel"))return z;if(E){const m=y.length===1?`${y[0].name} is already set up`:`${y.length} organizations use @${a}`,x=y.length===1?"This organization doesn't have auto-join enabled.":"None of them have auto-join enabled — ask an admin for an invitation, or create your own.";let N;e[51]!==m||e[52]!==x?(N=t.jsx(te,{title:m,description:x}),e[51]=m,e[52]=x,e[53]=N):N=e[53];let u;if(e[54]!==a||e[55]!==y){let _;e[57]!==a?(_=S=>t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:S.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:S.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Ask admin for invitation"})]},S.id),e[57]=a,e[58]=_):_=e[58],u=y.map(_),e[54]=a,e[55]=y,e[56]=u}else u=e[56];let b;e[59]!==u?(b=t.jsx("div",{className:"grid gap-2",children:u}),e[59]=u,e[60]=b):b=e[60];let p;e[61]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(oe,{size:"xl",className:"w-full",onClick:()=>P(!0),children:"Create a new organization"}),e[61]=p):p=e[61];let w;return e[62]!==b||e[63]!==N?(w=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[N,b,p]})}),e[62]=b,e[63]=N,e[64]=w):w=e[64],w}let A;return e[65]!==f||e[66]!==s||e[67]!==a||e[68]!==i?(A=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:f}),e[65]=f,e[66]=s,e[67]=a,e[68]=i,e[69]=A):A=e[69],A}function Ee(r){return r.autoJoinEnabled}async function Pe(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),g=await e.json();if(!e.ok||!g.success)throw new Error(g.error||"Failed to join organization");window.location.href=`/${g.slug}`}async function Ae(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function re(r){const e=K.c(70),{isCorporateEmail:g,emailDomain:l,domainLabel:f,defaultName:s,allowDomainClaim:a,onBack:i}=r,o=a===void 0?!0:a,h=g&&o?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null,[n,v]=F.useState(s),[d,k]=F.useState(h),[c,D]=F.useState(!0),[P,E]=F.useState(null);let y;e[0]!==c||e[1]!==d||e[2]!==n?(y=async()=>{const j=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.trim()||void 0,logo:d??void 0,claimDomain:c})}),C=await j.json();if(!j.ok||!C.success)throw new Error(C.error||"Failed to set up organization");return C},e[0]=c,e[1]=d,e[2]=n,e[3]=y):y=e[3];let z;e[4]!==c?(z=j=>{if(!j.slug)return;const C=ue.filter(ge=>c||!ge.claimOnly).length,W=fe*(C-1)+800;E(j.slug),setTimeout(()=>{window.location.href=`/${j.slug}`},W)},e[4]=c,e[5]=z):z=e[5];let A;e[6]!==y||e[7]!==z?(A={mutationFn:y,onSuccess:z},e[6]=y,e[7]=z,e[8]=A):A=e[8];const m=ne(A);let x;e[9]!==d||e[10]!==n?(x={mutationFn:async()=>{const j=n.trim(),C=le(j);if(!C)throw new Error("Invalid organization name");const W=await me.organization.create({name:j,slug:C,...d?{logo:d}:{}});if(W?.error)throw new Error(W.error.message||"Failed to create organization");window.location.href=`/${W?.data?.slug??C}`}},e[9]=d,e[10]=n,e[11]=x):x=e[11];const N=ne(x);if(m.isPending||P){let j;e[12]!==f||e[13]!==n?(j=n.trim()||f,e[12]=f,e[13]=n,e[14]=j):j=e[14];let C;return e[15]!==c||e[16]!==l||e[17]!==d||e[18]!==j?(C=t.jsx(Y,{children:t.jsx(Fe,{orgName:j,domain:l,claimDomain:c,logoUrl:d})}),e[15]=c,e[16]=l,e[17]=d,e[18]=j,e[19]=C):C=e[19],C}const u=N.isPending;let b;e[20]!==n?(b=le(n.trim()),e[20]=n,e[21]=b):b=e[21];const p=!!b,w=m.error||N.error||null;let _;e[22]!==o||e[23]!==p||e[24]!==N||e[25]!==m||e[26]!==g?(_=j=>{j.preventDefault(),p&&(g&&o?m.mutate():N.mutate())},e[22]=o,e[23]=p,e[24]=N,e[25]=m,e[26]=g,e[27]=_):_=e[27];const S=_;let $;e[28]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=$):$=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=L):L=e[29];let O;e[30]!==s||e[31]!==n?(O=(n.trim()||s||"?").charAt(0).toUpperCase(),e[30]=s,e[31]=n,e[32]=O):O=e[32];const G=u||m.isPending;let R;e[33]!==d||e[34]!==O||e[35]!==G?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[L,t.jsx($e,{value:d,fallback:O,onChange:k,disabled:G})]}),e[33]=d,e[34]=O,e[35]=G,e[36]=R):R=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(je,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=V):V=e[37];let X;e[38]===Symbol.for("react.memo_cache_sentinel")?(X=j=>v(j.target.value),e[38]=X):X=e[38];const ae=s||"My Organization",se=u||m.isPending;let T;e[39]!==n||e[40]!==ae||e[41]!==se?(T=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[V,t.jsx(be,{id:"org-name",value:n,onChange:X,placeholder:ae,disabled:se,className:"h-10 max-w-[220px]"})]}),e[39]=n,e[40]=ae,e[41]=se,e[42]=T):T=e[42];let U;e[43]!==o||e[44]!==c||e[45]!==m.isPending||e[46]!==l||e[47]!==g||e[48]!==u?(U=g&&o&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",l," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",l," email can join this org"]})]}),t.jsx(ye,{checked:c,onCheckedChange:D,disabled:u||m.isPending})]}),e[43]=o,e[44]=c,e[45]=m.isPending,e[46]=l,e[47]=g,e[48]=u,e[49]=U):U=e[49];let M;e[50]!==R||e[51]!==T||e[52]!==U?(M=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,T,U]}),e[50]=R,e[51]=T,e[52]=U,e[53]=M):M=e[53];let I;e[54]!==w?(I=w&&t.jsx("p",{className:"text-xs text-destructive",children:w instanceof Error?w.message:"Failed to create organization"}),e[54]=w,e[55]=I):I=e[55];const ie=!p||u||m.isPending;let J;e[56]!==m.isPending||e[57]!==u?(J=u||m.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=m.isPending,e[57]=u,e[58]=J):J=e[58];let q;e[59]!==ie||e[60]!==J?(q=t.jsx(oe,{type:"submit",size:"xl",className:"w-full",disabled:ie,children:J}),e[59]=ie,e[60]=J,e[61]=q):q=e[61];let B;e[62]!==i?(B=i&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:i,children:"See available organizations"}),e[62]=i,e[63]=B):B=e[63];let Z;return e[64]!==S||e[65]!==M||e[66]!==I||e[67]!==q||e[68]!==B?(Z=t.jsx(Y,{children:t.jsxs("form",{onSubmit:S,className:"grid gap-10",children:[$,M,I,q,B]})}),e[64]=S,e[65]=M,e[66]=I,e[67]=q,e[68]=B,e[69]=Z):Z=e[69],Z}function $e(r){const e=K.c(14),{value:g,fallback:l,onChange:f,disabled:s}=r,a=F.useRef(null);let i;e[0]!==f?(i=D=>{const P=D.target.files?.[0];if(!P)return;if(P.size>2097152){de.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const E=new FileReader;E.onerror=Le,E.onloadend=()=>{E.result&&f(E.result),a.current&&(a.current.value="")},E.readAsDataURL(P)},e[0]=f,e[1]=i):i=e[1];const o=i;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>a.current?.click(),e[2]=h):h=e[2];let n;e[3]!==s||e[4]!==o?(n=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[3]=s,e[4]=o,e[5]=n):n=e[5];const v=g??void 0;let d;e[6]!==l||e[7]!==v?(d=t.jsx(ee,{url:v,fallback:l,shape:"square",size:"base"}),e[6]=l,e[7]=v,e[8]=d):d=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ze,{size:14,className:"text-white"})}),e[9]=k):k=e[9];let c;return e[10]!==s||e[11]!==n||e[12]!==d?(c=t.jsxs("button",{type:"button",onClick:h,disabled:s,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[n,d,k]}),e[10]=s,e[11]=n,e[12]=d,e[13]=c):c=e[13],c}function Le(){return de.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:Se,label:"Claiming email domain",claimOnly:!0},{icon:ve,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,ce=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:r,domain:e,claimDomain:g,logoUrl:l}){const f=ue.filter(o=>g||!o.claimOnly),[s,a]=F.useState(0),i=F.useRef(!1);if(!i.current){i.current=!0;for(let o=1;o<f.length;o++)setTimeout(()=>a(o),fe*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(te,{title:`Setting up ${r}`,description:`Getting everything ready from ${e}`,logoUrl:l??null,logoFallback:r.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:f.map((o,h)=>{const n=o.icon,v=h===s,d=h<s,k=ce[h%ce.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||v?1:.4},children:[t.jsxs("span",{className:H("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:k.bg,color:k.fg}:void 0,children:[t.jsx(we,{size:16,className:H("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(Q,{size:16,className:H("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(n,{size:16,className:H("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:H("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||d?"text-foreground":"text-muted-foreground"),children:o.label})]},o.label)})})]})}export{He as default};
1
+ import{e as K,j as t,b as me,l as Q,a as ne,r as F,n as he,K as pe,B as oe,c as H,o as de}from"./index-UC1l_H0T.js";import{R as xe}from"./required-auth-layout-ByChgpTu.js";import{A as Y}from"./auth-split-layout-C0BuEx0Y.js";import{A as ee}from"./avatar-CIl9WOil.js";import{I as be}from"./input-DsrZ-ooH.js";import{L as je}from"./label-C52V0YQz.js";import{S as ye}from"./switch-BoSXcbci.js";import{t as Ne,a as ve}from"./Users03-Cr2QcycS.js";import{i as we}from"./CheckCircle-Da1q2cG-.js";import{t as Se,a as ke}from"./Palette-DsjYkIAm.js";import{i as ze}from"./Upload01-CWsYex6m.js";import"./useRouterState-BW1upcty.js";import"./User01-SXBYgWls.js";const Ce=new Set(["gmail.com","googlemail.com","outlook.com","hotmail.com","live.com","yahoo.com","yahoo.co.uk","icloud.com","me.com","mac.com","aol.com","protonmail.com","proton.me","zoho.com","yandex.com","mail.com","gmx.com","gmx.net","tutanota.com","fastmail.com"]);function le(r){return r.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}function He(){const r=K.c(1);let e;return r[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(xe,{children:t.jsx(_e,{})}),r[0]=e):e=r[0],e}function te(r){const e=K.c(13),{title:g,description:l,logoUrl:f,logoFallback:s}=r;let a;e[0]!==s||e[1]!==f?(a=t.jsx("div",{children:f?t.jsx(ee,{url:f,fallback:s??"?",shape:"square",size:"base",className:"h-12 w-12"}):t.jsxs(t.Fragment,{children:[t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"})]})}),e[0]=s,e[1]=f,e[2]=a):a=e[2];let i;e[3]!==g?(i=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:g}),e[3]=g,e[4]=i):i=e[4];let o;e[5]!==l?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:l}),e[5]=l,e[6]=o):o=e[6];let h;e[7]!==i||e[8]!==o?(h=t.jsxs("div",{className:"space-y-2",children:[i,o]}),e[7]=i,e[8]=o,e[9]=h):h=e[9];let n;return e[10]!==a||e[11]!==h?(n=t.jsxs("div",{className:"grid gap-10",children:[a,h]}),e[10]=a,e[11]=h,e[12]=n):n=e[12],n}function _e(){const r=K.c(4),{data:e,isPending:g}=me.useSession();if(g){let a;return r[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{children:t.jsx("div",{className:"flex items-center gap-2",children:t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"})})}),r[0]=a):a=r[0],a}const l=e?.user?.email??"",f=e?.user?.name;let s;return r[1]!==f||r[2]!==l?(s=t.jsx(Oe,{email:l,userName:f}),r[1]=f,r[2]=l,r[3]=s):s=r[3],s}function Oe(r){const e=K.c(70),{email:g,userName:l}=r;let f,s,a,i,o,h;if(e[0]!==g||e[1]!==l){a=g.split("@")[1]?.toLowerCase()??"",i=!!a&&!Ce.has(a);const m=a.split(".")[0]??"";s=m.charAt(0).toUpperCase()+m.slice(1);let x;e[8]!==s||e[9]!==i||e[10]!==l?(x=i?s:l?.split(" ")[0]??"",e[8]=s,e[9]=i,e[10]=l,e[11]=x):x=e[11],f=x,h=he,o=pe.domainLookup(a),e[0]=g,e[1]=l,e[2]=f,e[3]=s,e[4]=a,e[5]=i,e[6]=o,e[7]=h}else f=e[2],s=e[3],a=e[4],i=e[5],o=e[6],h=e[7];let n;e[12]!==i||e[13]!==o?(n={queryKey:o,queryFn:Ae,enabled:i},e[12]=i,e[13]=o,e[14]=n):n=e[14];const{data:v,isLoading:d}=h(n);let k;e[15]===Symbol.for("react.memo_cache_sentinel")?(k={mutationFn:Pe},e[15]=k):k=e[15];const c=ne(k),[D,P]=F.useState(!1);if(d){let m;e[16]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Q,{size:14,className:"animate-spin text-muted-foreground"}),e[16]=m):m=e[16];let x;return e[17]!==a?(x=t.jsx(Y,{children:t.jsxs("div",{className:"flex items-center gap-2 py-4",children:[m,t.jsxs("span",{className:"text-sm text-muted-foreground",children:["Checking ",a,"..."]})]})}),e[17]=a,e[18]=x):x=e[18],x}let E,y,z;if(e[19]!==D||e[20]!==s||e[21]!==v?.organizations||e[22]!==a||e[23]!==i||e[24]!==c||e[25]!==l){z=Symbol.for("react.early_return_sentinel");e:{y=v?.organizations??[];const m=y.filter(Ee);E=y.length>0;const x=m.length>0,N=c.variables??null;if(D){let u;e[29]!==l?(u=l?.split(" ")[0]??"",e[29]=l,e[30]=u):u=e[30];let b;e[31]===Symbol.for("react.memo_cache_sentinel")?(b=()=>P(!1),e[31]=b):b=e[31];let p;e[32]!==s||e[33]!==a||e[34]!==i||e[35]!==u?(p=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:u,allowDomainClaim:!1,onBack:b}),e[32]=s,e[33]=a,e[34]=i,e[35]=u,e[36]=p):p=e[36],z=p;break e}if(x){const u=m.length===1?"You have access to an organization":"You have access to multiple organizations",b=m.length===1?"Your email domain matches an existing organization.":"Your email domain matches more than one. Pick one to join.";let p;e[37]!==u||e[38]!==b?(p=t.jsx(te,{title:u,description:b}),e[37]=u,e[38]=b,e[39]=p):p=e[39];let w;e[40]!==a||e[41]!==c||e[42]!==N?(w=O=>{const G=c.isPending&&N===O.slug;return t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:O.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:O.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:O.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx(oe,{size:"default",onClick:()=>c.mutate(O.slug),disabled:c.isPending,children:G?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," ","Joining..."]}):"Join"})]},O.id)},e[40]=a,e[41]=c,e[42]=N,e[43]=w):w=e[43];const _=t.jsx("div",{className:"grid gap-2",children:m.map(w)});let S;e[44]!==c.error?(S=c.error&&t.jsx("p",{className:"text-xs text-destructive",children:c.error instanceof Error?c.error.message:"Failed to join organization"}),e[44]=c.error,e[45]=S):S=e[45];let $;e[46]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:()=>P(!0),children:"Create a new organization instead"}),e[46]=$):$=e[46];let L;e[47]!==_||e[48]!==S||e[49]!==p?(L=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[p,_,S,$]})}),e[47]=_,e[48]=S,e[49]=p,e[50]=L):L=e[50],z=L;break e}}e[19]=D,e[20]=s,e[21]=v?.organizations,e[22]=a,e[23]=i,e[24]=c,e[25]=l,e[26]=E,e[27]=y,e[28]=z}else E=e[26],y=e[27],z=e[28];if(z!==Symbol.for("react.early_return_sentinel"))return z;if(E){const m=y.length===1?`${y[0].name} is already set up`:`${y.length} organizations use @${a}`,x=y.length===1?"This organization doesn't have auto-join enabled.":"None of them have auto-join enabled — ask an admin for an invitation, or create your own.";let N;e[51]!==m||e[52]!==x?(N=t.jsx(te,{title:m,description:x}),e[51]=m,e[52]=x,e[53]=N):N=e[53];let u;if(e[54]!==a||e[55]!==y){let _;e[57]!==a?(_=S=>t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[t.jsx(ee,{url:S.logo??`https://www.google.com/s2/favicons?domain=${a}&sz=128`,fallback:S.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("p",{className:"text-sm font-medium truncate",children:S.name}),t.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",a]})]}),t.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Ask admin for invitation"})]},S.id),e[57]=a,e[58]=_):_=e[58],u=y.map(_),e[54]=a,e[55]=y,e[56]=u}else u=e[56];let b;e[59]!==u?(b=t.jsx("div",{className:"grid gap-2",children:u}),e[59]=u,e[60]=b):b=e[60];let p;e[61]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(oe,{size:"xl",className:"w-full",onClick:()=>P(!0),children:"Create a new organization"}),e[61]=p):p=e[61];let w;return e[62]!==b||e[63]!==N?(w=t.jsx(Y,{children:t.jsxs("div",{className:"grid gap-10",children:[N,b,p]})}),e[62]=b,e[63]=N,e[64]=w):w=e[64],w}let A;return e[65]!==f||e[66]!==s||e[67]!==a||e[68]!==i?(A=t.jsx(re,{isCorporateEmail:i,emailDomain:a,domainLabel:s,defaultName:f}),e[65]=f,e[66]=s,e[67]=a,e[68]=i,e[69]=A):A=e[69],A}function Ee(r){return r.autoJoinEnabled}async function Pe(r){const e=await fetch("/api/auth/custom/domain-join",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:r})}),g=await e.json();if(!e.ok||!g.success)throw new Error(g.error||"Failed to join organization");window.location.href=`/${g.slug}`}async function Ae(){return(await fetch("/api/auth/custom/domain-lookup",{credentials:"include"})).json()}function re(r){const e=K.c(70),{isCorporateEmail:g,emailDomain:l,domainLabel:f,defaultName:s,allowDomainClaim:a,onBack:i}=r,o=a===void 0?!0:a,h=g&&o?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null,[n,v]=F.useState(s),[d,k]=F.useState(h),[c,D]=F.useState(!0),[P,E]=F.useState(null);let y;e[0]!==c||e[1]!==d||e[2]!==n?(y=async()=>{const j=await fetch("/api/auth/custom/domain-setup",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n.trim()||void 0,logo:d??void 0,claimDomain:c})}),C=await j.json();if(!j.ok||!C.success)throw new Error(C.error||"Failed to set up organization");return C},e[0]=c,e[1]=d,e[2]=n,e[3]=y):y=e[3];let z;e[4]!==c?(z=j=>{if(!j.slug)return;const C=ue.filter(ge=>c||!ge.claimOnly).length,W=fe*(C-1)+800;E(j.slug),setTimeout(()=>{window.location.href=`/${j.slug}`},W)},e[4]=c,e[5]=z):z=e[5];let A;e[6]!==y||e[7]!==z?(A={mutationFn:y,onSuccess:z},e[6]=y,e[7]=z,e[8]=A):A=e[8];const m=ne(A);let x;e[9]!==d||e[10]!==n?(x={mutationFn:async()=>{const j=n.trim(),C=le(j);if(!C)throw new Error("Invalid organization name");const W=await me.organization.create({name:j,slug:C,...d?{logo:d}:{}});if(W?.error)throw new Error(W.error.message||"Failed to create organization");window.location.href=`/${W?.data?.slug??C}`}},e[9]=d,e[10]=n,e[11]=x):x=e[11];const N=ne(x);if(m.isPending||P){let j;e[12]!==f||e[13]!==n?(j=n.trim()||f,e[12]=f,e[13]=n,e[14]=j):j=e[14];let C;return e[15]!==c||e[16]!==l||e[17]!==d||e[18]!==j?(C=t.jsx(Y,{children:t.jsx(Fe,{orgName:j,domain:l,claimDomain:c,logoUrl:d})}),e[15]=c,e[16]=l,e[17]=d,e[18]=j,e[19]=C):C=e[19],C}const u=N.isPending;let b;e[20]!==n?(b=le(n.trim()),e[20]=n,e[21]=b):b=e[21];const p=!!b,w=m.error||N.error||null;let _;e[22]!==o||e[23]!==p||e[24]!==N||e[25]!==m||e[26]!==g?(_=j=>{j.preventDefault(),p&&(g&&o?m.mutate():N.mutate())},e[22]=o,e[23]=p,e[24]=N,e[25]=m,e[26]=g,e[27]=_):_=e[27];const S=_;let $;e[28]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(te,{title:"Welcome to deco",description:"Set up your organization to get started"}),e[28]=$):$=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsxs("div",{className:"space-y-0.5",children:[t.jsx("p",{className:"text-sm font-medium",children:"Organization avatar"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional"})]}),e[29]=L):L=e[29];let O;e[30]!==s||e[31]!==n?(O=(n.trim()||s||"?").charAt(0).toUpperCase(),e[30]=s,e[31]=n,e[32]=O):O=e[32];const G=u||m.isPending;let R;e[33]!==d||e[34]!==O||e[35]!==G?(R=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[L,t.jsx($e,{value:d,fallback:O,onChange:k,disabled:G})]}),e[33]=d,e[34]=O,e[35]=G,e[36]=R):R=e[36];let V;e[37]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(je,{htmlFor:"org-name",className:"text-sm font-medium shrink-0",children:"Organization name"}),e[37]=V):V=e[37];let X;e[38]===Symbol.for("react.memo_cache_sentinel")?(X=j=>v(j.target.value),e[38]=X):X=e[38];const ae=s||"My Organization",se=u||m.isPending;let T;e[39]!==n||e[40]!==ae||e[41]!==se?(T=t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[V,t.jsx(be,{id:"org-name",value:n,onChange:X,placeholder:ae,disabled:se,className:"h-10 max-w-[220px]"})]}),e[39]=n,e[40]=ae,e[41]=se,e[42]=T):T=e[42];let U;e[43]!==o||e[44]!==c||e[45]!==m.isPending||e[46]!==l||e[47]!==g||e[48]!==u?(U=g&&o&&t.jsxs("div",{className:"flex items-center justify-between gap-4 p-4",children:[t.jsxs("div",{className:"space-y-0.5",children:[t.jsxs("p",{className:"text-sm font-medium",children:["Allow @",l," sign-ups"]}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Anyone with a verified @",l," email can join this org"]})]}),t.jsx(ye,{checked:c,onCheckedChange:D,disabled:u||m.isPending})]}),e[43]=o,e[44]=c,e[45]=m.isPending,e[46]=l,e[47]=g,e[48]=u,e[49]=U):U=e[49];let M;e[50]!==R||e[51]!==T||e[52]!==U?(M=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 divide-y divide-border",children:[R,T,U]}),e[50]=R,e[51]=T,e[52]=U,e[53]=M):M=e[53];let I;e[54]!==w?(I=w&&t.jsx("p",{className:"text-xs text-destructive",children:w instanceof Error?w.message:"Failed to create organization"}),e[54]=w,e[55]=I):I=e[55];const ie=!p||u||m.isPending;let J;e[56]!==m.isPending||e[57]!==u?(J=u||m.isPending?t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Q,{size:14,className:"animate-spin"})," Creating..."]}):"Continue",e[56]=m.isPending,e[57]=u,e[58]=J):J=e[58];let q;e[59]!==ie||e[60]!==J?(q=t.jsx(oe,{type:"submit",size:"xl",className:"w-full",disabled:ie,children:J}),e[59]=ie,e[60]=J,e[61]=q):q=e[61];let B;e[62]!==i?(B=i&&t.jsx("button",{type:"button",className:"text-sm text-muted-foreground hover:text-foreground transition-colors text-center",onClick:i,children:"See available organizations"}),e[62]=i,e[63]=B):B=e[63];let Z;return e[64]!==S||e[65]!==M||e[66]!==I||e[67]!==q||e[68]!==B?(Z=t.jsx(Y,{children:t.jsxs("form",{onSubmit:S,className:"grid gap-10",children:[$,M,I,q,B]})}),e[64]=S,e[65]=M,e[66]=I,e[67]=q,e[68]=B,e[69]=Z):Z=e[69],Z}function $e(r){const e=K.c(14),{value:g,fallback:l,onChange:f,disabled:s}=r,a=F.useRef(null);let i;e[0]!==f?(i=D=>{const P=D.target.files?.[0];if(!P)return;if(P.size>2097152){de.error("Image must be smaller than 2MB"),a.current&&(a.current.value="");return}const E=new FileReader;E.onerror=Le,E.onloadend=()=>{E.result&&f(E.result),a.current&&(a.current.value="")},E.readAsDataURL(P)},e[0]=f,e[1]=i):i=e[1];const o=i;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>a.current?.click(),e[2]=h):h=e[2];let n;e[3]!==s||e[4]!==o?(n=t.jsx("input",{ref:a,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:s}),e[3]=s,e[4]=o,e[5]=n):n=e[5];const v=g??void 0;let d;e[6]!==l||e[7]!==v?(d=t.jsx(ee,{url:v,fallback:l,shape:"square",size:"base"}),e[6]=l,e[7]=v,e[8]=d):d=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx("span",{className:"absolute inset-0 flex items-center justify-center bg-black/50 opacity-0 group-hover:opacity-100 transition-opacity",children:t.jsx(ze,{size:14,className:"text-white"})}),e[9]=k):k=e[9];let c;return e[10]!==s||e[11]!==n||e[12]!==d?(c=t.jsxs("button",{type:"button",onClick:h,disabled:s,className:"relative rounded-lg overflow-hidden ring-1 ring-border hover:ring-2 hover:ring-ring/40 transition-all disabled:opacity-50 group","aria-label":"Upload organization logo",children:[n,d,k]}),e[10]=s,e[11]=n,e[12]=d,e[13]=c):c=e[13],c}function Le(){return de.error("Failed to read image")}const ue=[{icon:Ne,label:"Creating organization",claimOnly:!1},{icon:Se,label:"Claiming email domain",claimOnly:!0},{icon:ve,label:"Enabling auto-join for your team",claimOnly:!0},{icon:ke,label:"Extracting brand context",claimOnly:!1}],fe=1500,ce=[{bg:"var(--brand-green-light)",fg:"var(--brand-green-dark)"},{bg:"var(--brand-purple-light)",fg:"var(--brand-purple-dark)"},{bg:"var(--brand-yellow-light)",fg:"var(--brand-yellow-dark)"}];function Fe({orgName:r,domain:e,claimDomain:g,logoUrl:l}){const f=ue.filter(o=>g||!o.claimOnly),[s,a]=F.useState(0),i=F.useRef(!1);if(!i.current){i.current=!0;for(let o=1;o<f.length;o++)setTimeout(()=>a(o),fe*o)}return t.jsxs("div",{className:"grid gap-10",children:[t.jsx(te,{title:`Setting up ${r}`,description:`Getting everything ready from ${e}`,logoUrl:l??null,logoFallback:r.charAt(0).toUpperCase()||"?"}),t.jsx("ul",{className:"grid gap-5",children:f.map((o,h)=>{const n=o.icon,v=h===s,d=h<s,k=ce[h%ce.length];return t.jsxs("li",{className:"flex items-center gap-4 motion-safe:transition-opacity motion-safe:duration-300 motion-safe:ease-out",style:{opacity:d||v?1:.4},children:[t.jsxs("span",{className:H("relative grid h-8 w-8 shrink-0 place-items-center rounded-lg","motion-safe:transition-colors motion-safe:duration-300",!d&&(v?"bg-muted text-foreground":"bg-muted text-muted-foreground")),style:d?{backgroundColor:k.bg,color:k.fg}:void 0,children:[t.jsx(we,{size:16,className:H("absolute motion-safe:transition-all motion-safe:duration-300 motion-safe:ease-out",d?"scale-100 opacity-100":"scale-75 opacity-0"),"aria-hidden":"true"}),t.jsx(Q,{size:16,className:H("absolute animate-spin","motion-safe:transition-opacity motion-safe:duration-200",v?"opacity-100":"opacity-0"),"aria-hidden":"true"}),t.jsx(n,{size:16,className:H("absolute motion-safe:transition-opacity motion-safe:duration-200",!d&&!v?"opacity-100":"opacity-0"),"aria-hidden":"true"})]}),t.jsx("span",{className:H("text-base leading-6 motion-safe:transition-colors motion-safe:duration-300",v||d?"text-foreground":"text-muted-foreground"),children:o.label})]},o.label)})})]})}export{He as default};
@@ -1 +1 @@
1
- import{e as o,j as r,O as s}from"./index-DCp7HEPF.js";function m(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{m as default};
1
+ import{e as o,j as r,O as s}from"./index-UC1l_H0T.js";function m(){const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=r.jsx(s,{}),e[0]=t):t=e[0],t}export{m as default};
@@ -1 +1 @@
1
- import{e as f,g as p,c8 as x,j as r,r as c,l as u}from"./index-DCp7HEPF.js";import{P as g}from"./plugin-layout-CYGQt3sX.js";import"./use-connection-CDL88IlU.js";import"./use-collections-CdbQrbKk.js";import"./constants-BWDiAmgI.js";import"./Settings02-uck5BGEM.js";import"./index-D7gjc6EA.js";import"./sidebar-D5BcYVrs.js";import"./sheet-BWD0UYNA.js";import"./X-C2UB3gqF.js";import"./tooltip-DbEod1mn.js";function v(){const e=f.c(13);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/plugins/$pluginId"},e[0]=i):i=e[0];const{pluginId:s}=p(i);let l;e[1]!==s?(l=x.find(n=>n.id===s),e[1]=s,e[2]=l):l=e[2];const t=l;if(t?.renderHeader&&t?.renderEmptyState&&t?.bindingName){let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[3]=n):n=e[3];let d;return e[4]!==t.bindingName||e[5]!==t.renderEmptyState||e[6]!==t.renderHeader?(d=r.jsx(c.Suspense,{fallback:n,children:r.jsx(g,{bindingName:t.bindingName,renderHeader:t.renderHeader,renderEmptyState:t.renderEmptyState})}),e[4]=t.bindingName,e[5]=t.renderEmptyState,e[6]=t.renderHeader,e[7]=d):d=e[7],d}const a=t?.LayoutComponent;if(!a){let n;return e[8]!==s?(n=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Plugin "',s,'" not found']})}),e[8]=s,e[9]=n):n=e[9],n}let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[10]=m):m=e[10];let o;return e[11]!==a?(o=r.jsx(c.Suspense,{fallback:m,children:r.jsx(a,{})}),e[11]=a,e[12]=o):o=e[12],o}export{v as default};
1
+ import{e as f,g as p,c8 as x,j as r,r as c,l as u}from"./index-UC1l_H0T.js";import{P as g}from"./plugin-layout-Ce5zELj9.js";import"./use-connection-DBaDqCrX.js";import"./use-collections-BTet4gbf.js";import"./constants-Cs7fB5Fz.js";import"./Settings02-BnWl2AAW.js";import"./index-xKyKnuDm.js";import"./sidebar-Bf-Wr1hs.js";import"./sheet-hxQW4lrM.js";import"./X-ztVwMZpQ.js";import"./tooltip-D99J2opT.js";function v(){const e=f.c(13);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={from:"/shell/$org/plugins/$pluginId"},e[0]=i):i=e[0];const{pluginId:s}=p(i);let l;e[1]!==s?(l=x.find(n=>n.id===s),e[1]=s,e[2]=l):l=e[2];const t=l;if(t?.renderHeader&&t?.renderEmptyState&&t?.bindingName){let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[3]=n):n=e[3];let d;return e[4]!==t.bindingName||e[5]!==t.renderEmptyState||e[6]!==t.renderHeader?(d=r.jsx(c.Suspense,{fallback:n,children:r.jsx(g,{bindingName:t.bindingName,renderHeader:t.renderHeader,renderEmptyState:t.renderEmptyState})}),e[4]=t.bindingName,e[5]=t.renderEmptyState,e[6]=t.renderHeader,e[7]=d):d=e[7],d}const a=t?.LayoutComponent;if(!a){let n;return e[8]!==s?(n=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:['Plugin "',s,'" not found']})}),e[8]=s,e[9]=n):n=e[9],n}let m;e[10]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[r.jsx(u,{size:32,className:"animate-spin text-muted-foreground mb-4"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading plugin..."})]}),e[10]=m):m=e[10];let o;return e[11]!==a?(o=r.jsx(c.Suspense,{fallback:m,children:r.jsx(a,{})}),e[11]=a,e[12]=o):o=e[12],o}export{v as default};
@@ -1,4 +1,4 @@
1
- import{e as Z,r as ue,M as HE,G as H1,F as $1,j as g,B as rn,Q as Id,c as Se,br as Ac,b0 as Rt,bs as pr,bt as j1,t as q1,q as zt,D as z1,a as G1,K as Pt,o as Qu,n as kc,f as Hn,E as V1,z as W1,bu as Ic}from"./index-DCp7HEPF.js";import{a5 as Y1,a6 as K1,O as X1,a1 as Z1,B as Q1,a7 as J1,$ as eS,r as xd,a8 as tS,a9 as nS,S as rS,a0 as $E,aa as aS,ab as iS,A as jE,ac as mt,ad as sS,ae as oS,af as lS}from"./agent-icon-BdiD0RLx.js";import{b as uS,i as cS,a as Vr,t as xc}from"./Tool01-CfGF28aS.js";import{n as Nc,b as qE,t as dS,c as Xn,a as pS,e as fS}from"./XCircle-Dl1nnD8d.js";import{i as $n}from"./Check-Cgs_Ieiz.js";import{i as Nd}from"./ChevronRight-B3uEK8Up.js";import{a as Ar,s as mS}from"./RefreshCcw01-VWfVcJ_k.js";import{a as wt,c as Rd,t as gS}from"./format-time-Cy7tTmZp.js";import{N as zE,R as GE,e as VE,C as hS,f as bS,g as ES,u as TS,i as SS,d as yS}from"./scroll-area-DHFZrobk.js";import{u as WE}from"./use-copy-CoQfk21l.js";import{T as Ut,a as Ht,b as $t}from"./tooltip-DbEod1mn.js";import{d as YE,c as _S,D as AS,a as kS,b as KE,f as IS,g as xS}from"./dialog-BXAoEbia.js";import{c as NS}from"./content-blocks-o63cs2vh.js";import{g as XE,M as RS}from"./types-DcSrmxgv.js";import{f as kr,k as CS,a as vS,i as ZE,u as wS}from"./chat-context-DBBmTPXK.js";import{S as OS,u as Rc,c as LS,b as DS}from"./constants-BWDiAmgI.js";import{b as MS,f as PS}from"./tab-id-DRhzsO2q.js";import{i as QE}from"./AlertCircle-C_7Pr4dy.js";import{s as fr,t as JE}from"./Star01-882PVAAF.js";import{s as FS}from"./XClose-CVuJ-jWb.js";import{b as e0}from"./ZapSquare-kGYRH_Lu.js";import{i as sr}from"./Monitor01-D1gAe0to.js";import{i as BS}from"./SearchMd-BBiHSx-2.js";import{i as US}from"./Upload01-CtxMN-V1.js";import{u as HS,c as $S}from"./shell-layout-DQhzT6wR.js";import{n as t0}from"./LinkExternal01-BMPLHN-8.js";import{I as Ir}from"./integration-icon-DM6HURzh.js";import{u as jS}from"./use-virtual-mcp-BQRVNAq-.js";import{a as n0}from"./Users03-CZw3VUm8.js";import{a as gt}from"./Palette-c8ZIWUhe.js";import{k as r0}from"./use-navigate-to-agent-ByC4bR_a.js";import{a as qS}from"./use-connection-CDL88IlU.js";import{s as zS}from"./Stars02-DLq0ELXY.js";import{g as GS}from"./use-mcp-prompts-BFGdNKhE.js";import{a as VS,F as WS,b as YS,c as KS,d as XS,f as ZS}from"./form-T5LuiwS8.js";import{I as QS}from"./input-CoK19GuW.js";import{S as JS}from"./spinner-DvoeSjuB.js";const ey={openrouter:t=>{const e=t?.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 a0(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(ey)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function i0(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function s0(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+a0(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function iB(t){return t.reduce((e,n)=>s0(e,n.metadata?.usage),i0())}function ty(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Cc(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function vc(t,e){if(!e)return t;const n=`${ty(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function ny(t,e){return vc(t,e).replace(/[_-]/g," ").toLowerCase()}function ry(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?Id().min(1,"Required"):Id();return HE(e)}function ay(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function iy(t){const e=Z.c(66),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=ue.useId();let o;if(e[0]!==n){const j=n?ry(n):HE({});o=H1(j),e[0]=n,e[1]=o}else o=e[1];const l=o;let c;e[2]!==i||e[3]!==n?(c=n?ay(n,i):{},e[2]=i,e[3]=n,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==c?(d={resolver:l,defaultValues:c,mode:"onChange"},e[5]=l,e[6]=c,e[7]=d):d=e[7];const p=$1(d);let m;e[8]!==n?.arguments?(m=n?.arguments??[],e[8]=n?.arguments,e[9]=m):m=e[9];const h=m;let E;e[10]!==p||e[11]!==a||e[12]!==r?(E=async j=>{await a(j),r(null),p.reset()},e[10]=p,e[11]=a,e[12]=r,e[13]=E):E=e[13];const y=E;let T;e[14]!==p||e[15]!==r?(T=j=>{j||(p.reset(),r(null))},e[14]=p,e[15]=r,e[16]=T):T=e[16];const _=T;if(!n)return null;let S;e[17]!==n._meta||e[18]!==n.name||e[19]!==n.title?(S=n.title||ny(n.name,Cc(n._meta)),e[17]=n._meta,e[18]=n.name,e[19]=n.title,e[20]=S):S=e[20];let k;e[21]!==S?(k=g.jsx(YE,{children:g.jsx("span",{className:"capitalize",children:S})}),e[21]=S,e[22]=k):k=e[22];let A;e[23]!==n.description?(A=n.description&&g.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[23]=n.description,e[24]=A):A=e[24];let b;e[25]!==A||e[26]!==k?(b=g.jsxs(_S,{children:[k,A]}),e[25]=A,e[26]=k,e[27]=b):b=e[27];let N;e[28]!==p||e[29]!==y?(N=j=>{j.stopPropagation(),p.handleSubmit(y)(j)},e[28]=p,e[29]=y,e[30]=N):N=e[30];let L;if(e[31]!==h||e[32]!==p.control||e[33]!==p.formState.isSubmitting){let j;e[35]!==p.control||e[36]!==p.formState.isSubmitting?(j=K=>g.jsx(WS,{control:p.control,name:K.name,render:v=>{const{field:X}=v;return g.jsxs(YS,{children:[g.jsxs(KS,{className:"text-xs",children:[K.name,K.required?null:g.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),g.jsx(XS,{children:g.jsx(QS,{...X,value:X.value??"",required:K.required,placeholder:K.description??"",className:"h-9",disabled:p.formState.isSubmitting})}),g.jsx(ZS,{})]})}},K.name),e[35]=p.control,e[36]=p.formState.isSubmitting,e[37]=j):j=e[37],L=h.map(j),e[31]=h,e[32]=p.control,e[33]=p.formState.isSubmitting,e[34]=L}else L=e[34];let O;e[38]!==_?(O=()=>_(!1),e[38]=_,e[39]=O):O=e[39];let R;e[40]!==p.formState.isSubmitting||e[41]!==O?(R=g.jsx(rn,{type:"button",variant:"ghost",onClick:O,disabled:p.formState.isSubmitting,children:"Cancel"}),e[40]=p.formState.isSubmitting,e[41]=O,e[42]=R):R=e[42];let D;e[43]!==p.formState.isSubmitting?(D=p.formState.isSubmitting?g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(JS,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=p.formState.isSubmitting,e[44]=D):D=e[44];let P;e[45]!==p.formState.isSubmitting||e[46]!==s||e[47]!==D?(P=g.jsx(rn,{type:"submit",form:s,disabled:p.formState.isSubmitting,children:D}),e[45]=p.formState.isSubmitting,e[46]=s,e[47]=D,e[48]=P):P=e[48];let $;e[49]!==R||e[50]!==P?($=g.jsxs(AS,{children:[R,P]}),e[49]=R,e[50]=P,e[51]=$):$=e[51];let H;e[52]!==s||e[53]!==N||e[54]!==L||e[55]!==$?(H=g.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[L,$]}),e[52]=s,e[53]=N,e[54]=L,e[55]=$,e[56]=H):H=e[56];let F;e[57]!==p||e[58]!==H?(F=g.jsx(VS,{...p,children:H}),e[57]=p,e[58]=H,e[59]=F):F=e[59];let W;e[60]!==b||e[61]!==F?(W=g.jsxs(kS,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[b,F]}),e[60]=b,e[61]=F,e[62]=W):W=e[62];let Y;return e[63]!==_||e[64]!==W?(Y=g.jsx(KE,{open:!0,onOpenChange:_,children:W}),e[63]=_,e[64]=W,e[65]=Y):Y=e[65],Y}function o0(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function lt(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function ln(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}function sy(t){return t.storage.mention}function sB(t,e,n){t.chain().focus().insertContentAt(e,[l0(n),{type:"text",text:" "}]).run()}function l0(t){return{type:"mention",attrs:t}}function oy(t){const e=Z.c(19),{node:n,selected:r,view:a,editor:i,getPos:s}=t,{name:o,char:u,kind:l,id:c,args:d}=n.attrs,p=r&&a.editable,m=u==="@",h=a.editable&&u==="/"&&l!=="resource";let E;e[0]!==d||e[1]!==i||e[2]!==s||e[3]!==c||e[4]!==h||e[5]!==o?(E=L=>{if(!h)return;const R=sy(i)?.onEditChip;if(!R||typeof s!="function")return;const D=s();typeof D=="number"&&(L.preventDefault(),L.stopPropagation(),R({promptId:c,promptName:o,args:d??{},pos:D}))},e[0]=d,e[1]=i,e[2]=s,e[3]=c,e[4]=h,e[5]=o,e[6]=E):E=e[6];const y=E,T=h?"cursor-pointer":"cursor-default",_=m?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",S=p&&"outline-2 outline-blue-300 outline-offset-0",k=h&&"hover:brightness-95";let A;e[7]!==T||e[8]!==_||e[9]!==S||e[10]!==k?(A=Se("px-1 py-1 rounded","inline-flex items-center gap-1",T,"select-none","text-xs font-light",_,S,k,"capitalize"),e[7]=T,e[8]=_,e[9]=S,e[10]=k,e[11]=A):A=e[11];let b;e[12]!==o?(b=o?o0(o):"",e[12]=o,e[13]=b):b=e[13];let N;return e[14]!==u||e[15]!==y||e[16]!==A||e[17]!==b?(N=g.jsxs(VE,{onClick:y,className:A,children:[u,b]}),e[14]=u,e[15]=y,e[16]=A,e[17]=b,e[18]=N):N=e[18],N}const ly=zE.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id")||null,renderHTML:t=>t.id?{"data-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||null,renderHTML:t=>t.name?{"data-name":t.name}:{}},char:{default:"/",parseHTML:t=>t.getAttribute("data-char")||"/",renderHTML:t=>t.char?{"data-char":t.char}:{}},metadata:{default:null,parseHTML:t=>{try{return JSON.parse(t.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:t=>t.metadata?{"data-metadata":JSON.stringify(t.metadata)}:{}},kind:{default:null,parseHTML:t=>t.getAttribute("data-kind")||null,renderHTML:t=>t.kind?{"data-kind":t.kind}:{}},args:{default:null,parseHTML:t=>{try{return JSON.parse(t.getAttribute("data-args")||"null")}catch{return null}},renderHTML:t=>t.args?{"data-args":JSON.stringify(t.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:t,HTMLAttributes:e}){const n={"data-type":"mention"};return t.attrs.id&&(n["data-id"]=t.attrs.id),t.attrs.name&&(n["data-name"]=t.attrs.name),t.attrs.char&&(n["data-char"]=t.attrs.char),t.attrs.metadata&&(n["data-metadata"]=JSON.stringify(t.attrs.metadata)),t.attrs.kind&&(n["data-kind"]=t.attrs.kind),t.attrs.args&&(n["data-args"]=JSON.stringify(t.attrs.args)),["span",{...e,...n}]},renderText({node:t}){const e=t.attrs.char??"@",n=t.attrs.name??"";return`${e}${n}`},addNodeView(){return GE(oy)}}),uy=/^mcp__[a-zA-Z0-9_-]+__/;function u0(t){return t.replace(uy,"")}function wc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=wc();function c0(t){Gt=t}var In={exec:()=>null};function be(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ve.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},cy=/^(?:[ \t]*(?:\n|$))+/,dy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,py=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oc=/(?:[*+-]|\d{1,9}[.)])/,d0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p0=be(d0).replace(/bull/g,Oc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),my=be(d0).replace(/bull/g,Oc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gy=/^[^\n]+/,Dc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,hy=be(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Dc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),by=be(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oc).getRegex(),xr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ey=be("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mc).replace("tag",xr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f0=be(Lc).replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),Ty=be(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f0).getRegex(),Pc={blockquote:Ty,code:dy,def:hy,fences:py,heading:fy,hr:jn,html:Ey,lheading:p0,list:by,newline:cy,paragraph:f0,table:In,text:gy},Cd=be("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),Sy={...Pc,lheading:my,table:Cd,paragraph:be(Lc).replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex()},yy={...Pc,html:be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:In,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:be(Lc).replace("hr",jn).replace("heading",` *#{1,6} *[^
1
+ import{e as Z,r as ue,M as HE,G as H1,F as $1,j as g,B as rn,Q as Id,c as Se,br as Ac,b0 as Rt,bs as pr,bt as j1,t as q1,q as zt,D as z1,a as G1,K as Pt,o as Qu,n as kc,f as Hn,E as V1,z as W1,bu as Ic}from"./index-UC1l_H0T.js";import{a5 as Y1,a6 as K1,O as X1,a1 as Z1,B as Q1,a7 as J1,$ as eS,r as xd,a8 as tS,a9 as nS,S as rS,a0 as $E,aa as aS,ab as iS,A as jE,ac as mt,ad as sS,ae as oS,af as lS}from"./agent-icon-CY89NnPl.js";import{b as uS,i as cS,a as Vr,t as xc}from"./Tool01-Me7z4aVw.js";import{n as Nc,b as qE,t as dS,c as Xn,a as pS,e as fS}from"./XCircle-CWhlQPxr.js";import{i as $n}from"./Check-B-Snf346.js";import{i as Nd}from"./ChevronRight-CNXVJ2DZ.js";import{a as Ar,s as mS}from"./RefreshCcw01-C_M5ucZA.js";import{a as wt,c as Rd,t as gS}from"./format-time-Cy7tTmZp.js";import{N as zE,R as GE,e as VE,C as hS,f as bS,g as ES,u as TS,i as SS,d as yS}from"./scroll-area-kdWO_XIf.js";import{u as WE}from"./use-copy-DjD9mpB1.js";import{T as Ut,a as Ht,b as $t}from"./tooltip-D99J2opT.js";import{d as YE,c as _S,D as AS,a as kS,b as KE,f as IS,g as xS}from"./dialog-0ciXFW-Z.js";import{c as NS}from"./content-blocks-o63cs2vh.js";import{g as XE,M as RS}from"./types-CV-R3YJI.js";import{i as kr,k as CS,a as vS,c as ZE,u as wS}from"./chat-context-B-JG5oa1.js";import{S as OS,u as Rc,c as LS,b as DS}from"./constants-Cs7fB5Fz.js";import{b as MS,f as PS}from"./tab-id-sG-YwvQY.js";import{i as QE}from"./AlertCircle-D833Ltv-.js";import{s as fr,t as JE}from"./Star01-B3pqpeOo.js";import{s as FS}from"./XClose-BW7B2d42.js";import{b as e0}from"./ZapSquare-CMBh1a8Y.js";import{i as sr}from"./Monitor01-DpahDMVO.js";import{i as BS}from"./SearchMd-ItgHq67b.js";import{i as US}from"./Upload01-CWsYex6m.js";import{u as HS,c as $S}from"./shell-layout-cAhx7nwo.js";import{n as t0}from"./LinkExternal01-BwOlCt0z.js";import{I as Ir}from"./integration-icon-CFCAsXBi.js";import{u as jS}from"./use-virtual-mcp-D0WYBO2Q.js";import{a as n0}from"./Users03-Cr2QcycS.js";import{a as gt}from"./Palette-DsjYkIAm.js";import{k as r0}from"./use-navigate-to-agent-mMKG1Kz-.js";import{a as qS}from"./use-connection-DBaDqCrX.js";import{s as zS}from"./Stars02-B-2qVnjt.js";import{g as GS}from"./use-mcp-prompts-C30Pwn4d.js";import{a as VS,F as WS,b as YS,c as KS,d as XS,f as ZS}from"./form-D3vgRHP1.js";import{I as QS}from"./input-DsrZ-ooH.js";import{S as JS}from"./spinner-BwiMhd03.js";const ey={openrouter:t=>{const e=t?.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 a0(t){if(!t?.providerMetadata)return 0;for(const e of Object.values(ey)){const n=e(t.providerMetadata);if(n!==null)return n}return 0}function i0(){return{inputTokens:0,outputTokens:0,reasoningTokens:0,totalTokens:0,cost:0,cacheReadTokens:0,cacheWriteTokens:0}}function s0(t,e){if(!e)return t;const n=e.inputTokenDetails?.cacheReadTokens??e.cachedInputTokens??0,r=e.inputTokenDetails?.cacheWriteTokens??0;return{inputTokens:t.inputTokens+(e.inputTokens??0),outputTokens:t.outputTokens+(e.outputTokens??0),reasoningTokens:t.reasoningTokens+(e.reasoningTokens??0),totalTokens:t.totalTokens+(e.totalTokens??0),cost:t.cost+a0(e),cacheReadTokens:t.cacheReadTokens+n,cacheWriteTokens:t.cacheWriteTokens+r}}function iB(t){return t.reduce((e,n)=>s0(e,n.metadata?.usage),i0())}function ty(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}function Cc(t){if(t&&typeof t=="object"&&"gatewayClientId"in t&&typeof t.gatewayClientId=="string")return t.gatewayClientId}function vc(t,e){if(!e)return t;const n=`${ty(e)}_`;return t.startsWith(n)?t.slice(n.length):t}function ny(t,e){return vc(t,e).replace(/[_-]/g," ").toLowerCase()}function ry(t){const e={};for(const n of t.arguments??[])e[n.name]=n.required?Id().min(1,"Required"):Id();return HE(e)}function ay(t,e){const n={};for(const r of t.arguments??[])n[r.name]=e?.[r.name]??"";return n}function iy(t){const e=Z.c(66),{prompt:n,setPrompt:r,onSubmit:a,defaultValues:i}=t,s=ue.useId();let o;if(e[0]!==n){const j=n?ry(n):HE({});o=H1(j),e[0]=n,e[1]=o}else o=e[1];const l=o;let c;e[2]!==i||e[3]!==n?(c=n?ay(n,i):{},e[2]=i,e[3]=n,e[4]=c):c=e[4];let d;e[5]!==l||e[6]!==c?(d={resolver:l,defaultValues:c,mode:"onChange"},e[5]=l,e[6]=c,e[7]=d):d=e[7];const p=$1(d);let m;e[8]!==n?.arguments?(m=n?.arguments??[],e[8]=n?.arguments,e[9]=m):m=e[9];const h=m;let E;e[10]!==p||e[11]!==a||e[12]!==r?(E=async j=>{await a(j),r(null),p.reset()},e[10]=p,e[11]=a,e[12]=r,e[13]=E):E=e[13];const y=E;let T;e[14]!==p||e[15]!==r?(T=j=>{j||(p.reset(),r(null))},e[14]=p,e[15]=r,e[16]=T):T=e[16];const _=T;if(!n)return null;let S;e[17]!==n._meta||e[18]!==n.name||e[19]!==n.title?(S=n.title||ny(n.name,Cc(n._meta)),e[17]=n._meta,e[18]=n.name,e[19]=n.title,e[20]=S):S=e[20];let k;e[21]!==S?(k=g.jsx(YE,{children:g.jsx("span",{className:"capitalize",children:S})}),e[21]=S,e[22]=k):k=e[22];let A;e[23]!==n.description?(A=n.description&&g.jsx("p",{className:"text-sm text-muted-foreground",children:n.description}),e[23]=n.description,e[24]=A):A=e[24];let b;e[25]!==A||e[26]!==k?(b=g.jsxs(_S,{children:[k,A]}),e[25]=A,e[26]=k,e[27]=b):b=e[27];let N;e[28]!==p||e[29]!==y?(N=j=>{j.stopPropagation(),p.handleSubmit(y)(j)},e[28]=p,e[29]=y,e[30]=N):N=e[30];let L;if(e[31]!==h||e[32]!==p.control||e[33]!==p.formState.isSubmitting){let j;e[35]!==p.control||e[36]!==p.formState.isSubmitting?(j=K=>g.jsx(WS,{control:p.control,name:K.name,render:v=>{const{field:X}=v;return g.jsxs(YS,{children:[g.jsxs(KS,{className:"text-xs",children:[K.name,K.required?null:g.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ","(optional)"]})]}),g.jsx(XS,{children:g.jsx(QS,{...X,value:X.value??"",required:K.required,placeholder:K.description??"",className:"h-9",disabled:p.formState.isSubmitting})}),g.jsx(ZS,{})]})}},K.name),e[35]=p.control,e[36]=p.formState.isSubmitting,e[37]=j):j=e[37],L=h.map(j),e[31]=h,e[32]=p.control,e[33]=p.formState.isSubmitting,e[34]=L}else L=e[34];let O;e[38]!==_?(O=()=>_(!1),e[38]=_,e[39]=O):O=e[39];let R;e[40]!==p.formState.isSubmitting||e[41]!==O?(R=g.jsx(rn,{type:"button",variant:"ghost",onClick:O,disabled:p.formState.isSubmitting,children:"Cancel"}),e[40]=p.formState.isSubmitting,e[41]=O,e[42]=R):R=e[42];let D;e[43]!==p.formState.isSubmitting?(D=p.formState.isSubmitting?g.jsxs("span",{className:"flex items-center gap-2",children:[g.jsx(JS,{size:"xs"}),"Loading..."]}):"Use prompt",e[43]=p.formState.isSubmitting,e[44]=D):D=e[44];let P;e[45]!==p.formState.isSubmitting||e[46]!==s||e[47]!==D?(P=g.jsx(rn,{type:"submit",form:s,disabled:p.formState.isSubmitting,children:D}),e[45]=p.formState.isSubmitting,e[46]=s,e[47]=D,e[48]=P):P=e[48];let $;e[49]!==R||e[50]!==P?($=g.jsxs(AS,{children:[R,P]}),e[49]=R,e[50]=P,e[51]=$):$=e[51];let H;e[52]!==s||e[53]!==N||e[54]!==L||e[55]!==$?(H=g.jsxs("form",{id:s,className:"space-y-4 py-4",autoComplete:"off",onSubmit:N,children:[L,$]}),e[52]=s,e[53]=N,e[54]=L,e[55]=$,e[56]=H):H=e[56];let F;e[57]!==p||e[58]!==H?(F=g.jsx(VS,{...p,children:H}),e[57]=p,e[58]=H,e[59]=F):F=e[59];let W;e[60]!==b||e[61]!==F?(W=g.jsxs(kS,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[b,F]}),e[60]=b,e[61]=F,e[62]=W):W=e[62];let Y;return e[63]!==_||e[64]!==W?(Y=g.jsx(KE,{open:!0,onOpenChange:_,children:W}),e[63]=_,e[64]=W,e[65]=Y):Y=e[65],Y}function o0(t){return t?t.replace(/[_-]/g," ").toLowerCase().split(" ").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""}function lt(t,e){return t==="output-error"||t==="output-denied"?"error":t==="approval-requested"?"approval":t==="input-streaming"||t==="input-available"||t==="output-available"&&e===!0?"loading":"idle"}function ln(t){if(t==null||typeof t!="object")return;const e=t;if(e.structuredContent&&typeof e.structuredContent=="object")return e.structuredContent;if(Array.isArray(e.content)){const n=e.content[0];if(n?.type==="text"&&typeof n.text=="string")try{return JSON.parse(n.text)}catch{return}return}return t}function sy(t){return t.storage.mention}function sB(t,e,n){t.chain().focus().insertContentAt(e,[l0(n),{type:"text",text:" "}]).run()}function l0(t){return{type:"mention",attrs:t}}function oy(t){const e=Z.c(19),{node:n,selected:r,view:a,editor:i,getPos:s}=t,{name:o,char:u,kind:l,id:c,args:d}=n.attrs,p=r&&a.editable,m=u==="@",h=a.editable&&u==="/"&&l!=="resource";let E;e[0]!==d||e[1]!==i||e[2]!==s||e[3]!==c||e[4]!==h||e[5]!==o?(E=L=>{if(!h)return;const R=sy(i)?.onEditChip;if(!R||typeof s!="function")return;const D=s();typeof D=="number"&&(L.preventDefault(),L.stopPropagation(),R({promptId:c,promptName:o,args:d??{},pos:D}))},e[0]=d,e[1]=i,e[2]=s,e[3]=c,e[4]=h,e[5]=o,e[6]=E):E=e[6];const y=E,T=h?"cursor-pointer":"cursor-default",_=m?"bg-violet-100 text-violet-700 dark:bg-violet-900/30 dark:text-violet-400":"bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-300",S=p&&"outline-2 outline-blue-300 outline-offset-0",k=h&&"hover:brightness-95";let A;e[7]!==T||e[8]!==_||e[9]!==S||e[10]!==k?(A=Se("px-1 py-1 rounded","inline-flex items-center gap-1",T,"select-none","text-xs font-light",_,S,k,"capitalize"),e[7]=T,e[8]=_,e[9]=S,e[10]=k,e[11]=A):A=e[11];let b;e[12]!==o?(b=o?o0(o):"",e[12]=o,e[13]=b):b=e[13];let N;return e[14]!==u||e[15]!==y||e[16]!==A||e[17]!==b?(N=g.jsxs(VE,{onClick:y,className:A,children:[u,b]}),e[14]=u,e[15]=y,e[16]=A,e[17]=b,e[18]=N):N=e[18],N}const ly=zE.create({name:"mention",group:"inline",inline:!0,atom:!0,addStorage(){return{onEditChip:null}},addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-id")||null,renderHTML:t=>t.id?{"data-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||null,renderHTML:t=>t.name?{"data-name":t.name}:{}},char:{default:"/",parseHTML:t=>t.getAttribute("data-char")||"/",renderHTML:t=>t.char?{"data-char":t.char}:{}},metadata:{default:null,parseHTML:t=>{try{return JSON.parse(t.getAttribute("data-metadata")||"null")}catch{return null}},renderHTML:t=>t.metadata?{"data-metadata":JSON.stringify(t.metadata)}:{}},kind:{default:null,parseHTML:t=>t.getAttribute("data-kind")||null,renderHTML:t=>t.kind?{"data-kind":t.kind}:{}},args:{default:null,parseHTML:t=>{try{return JSON.parse(t.getAttribute("data-args")||"null")}catch{return null}},renderHTML:t=>t.args?{"data-args":JSON.stringify(t.args)}:{}}}},parseHTML(){return[{tag:'span[data-type="mention"]'}]},renderHTML({node:t,HTMLAttributes:e}){const n={"data-type":"mention"};return t.attrs.id&&(n["data-id"]=t.attrs.id),t.attrs.name&&(n["data-name"]=t.attrs.name),t.attrs.char&&(n["data-char"]=t.attrs.char),t.attrs.metadata&&(n["data-metadata"]=JSON.stringify(t.attrs.metadata)),t.attrs.kind&&(n["data-kind"]=t.attrs.kind),t.attrs.args&&(n["data-args"]=JSON.stringify(t.attrs.args)),["span",{...e,...n}]},renderText({node:t}){const e=t.attrs.char??"@",n=t.attrs.name??"";return`${e}${n}`},addNodeView(){return GE(oy)}}),uy=/^mcp__[a-zA-Z0-9_-]+__/;function u0(t){return t.replace(uy,"")}function wc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Gt=wc();function c0(t){Gt=t}var In={exec:()=>null};function be(t,e=""){let n=typeof t=="string"?t:t.source;const r={replace:(a,i)=>{let s=typeof i=="string"?i:i.source;return s=s.replace(Ve.caret,"$1"),n=n.replace(a,s),r},getRegex:()=>new RegExp(n,e)};return r}var Ve={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},cy=/^(?:[ \t]*(?:\n|$))+/,dy=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,py=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,fy=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Oc=/(?:[*+-]|\d{1,9}[.)])/,d0=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,p0=be(d0).replace(/bull/g,Oc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),my=be(d0).replace(/bull/g,Oc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,gy=/^[^\n]+/,Dc=/(?!\s*\])(?:\\.|[^\[\]\\])+/,hy=be(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Dc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),by=be(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Oc).getRegex(),xr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Mc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ey=be("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Mc).replace("tag",xr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),f0=be(Lc).replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),Ty=be(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",f0).getRegex(),Pc={blockquote:Ty,code:dy,def:hy,fences:py,heading:fy,hr:jn,html:Ey,lheading:p0,list:by,newline:cy,paragraph:f0,table:In,text:gy},Cd=be("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex(),Sy={...Pc,lheading:my,table:Cd,paragraph:be(Lc).replace("hr",jn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Cd).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xr).getRegex()},yy={...Pc,html:be(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Mc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:In,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:be(Lc).replace("hr",jn).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",p0).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},_y=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ay=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,m0=/^( {2,}|\\)\n(?!\s*$)/,ky=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Nr=/[\p{P}\p{S}]/u,Fc=/[\s\p{P}\p{S}]/u,g0=/[^\s\p{P}\p{S}]/u,Iy=be(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Fc).getRegex(),h0=/(?!~)[\p{P}\p{S}]/u,xy=/(?!~)[\s\p{P}\p{S}]/u,Ny=/(?:[^\s\p{P}\p{S}]|~)/u,Ry=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,b0=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Cy=be(b0,"u").replace(/punct/g,Nr).getRegex(),vy=be(b0,"u").replace(/punct/g,h0).getRegex(),E0="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",wy=be(E0,"gu").replace(/notPunctSpace/g,g0).replace(/punctSpace/g,Fc).replace(/punct/g,Nr).getRegex(),Oy=be(E0,"gu").replace(/notPunctSpace/g,Ny).replace(/punctSpace/g,xy).replace(/punct/g,h0).getRegex(),Ly=be("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,g0).replace(/punctSpace/g,Fc).replace(/punct/g,Nr).getRegex(),Dy=be(/\\(punct)/,"gu").replace(/punct/g,Nr).getRegex(),My=be(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Py=be(Mc).replace("(?:-->|$)","-->").getRegex(),Fy=be("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Py).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),mr=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,By=be(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",mr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),T0=be(/^!?\[(label)\]\[(ref)\]/).replace("label",mr).replace("ref",Dc).getRegex(),S0=be(/^!?\[(ref)\](?:\[\])?/).replace("ref",Dc).getRegex(),Uy=be("reflink|nolink(?!\\()","g").replace("reflink",T0).replace("nolink",S0).getRegex(),Bc={_backpedal:In,anyPunctuation:Dy,autolink:My,blockSkip:Ry,br:m0,code:Ay,del:In,emStrongLDelim:Cy,emStrongRDelimAst:wy,emStrongRDelimUnd:Ly,escape:_y,link:By,nolink:S0,punctuation:Iy,reflink:T0,reflinkSearch:Uy,tag:Fy,text:ky,url:In},Hy={...Bc,link:be(/^!?\[(label)\]\((.*?)\)/).replace("label",mr).getRegex(),reflink:be(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",mr).getRegex()},Ju={...Bc,emStrongRDelimAst:Oy,emStrongLDelim:vy,url:be(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$y={...Ju,br:be(m0).replace("{2,}","*").getRegex(),text:be(Ju.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Zn={normal:Pc,gfm:Sy,pedantic:yy},hn={normal:Bc,gfm:Ju,breaks:$y,pedantic:Hy},jy={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vd=t=>jy[t];function dt(t,e){if(e){if(Ve.escapeTest.test(t))return t.replace(Ve.escapeReplace,vd)}else if(Ve.escapeTestNoEncode.test(t))return t.replace(Ve.escapeReplaceNoEncode,vd);return t}function wd(t){try{t=encodeURI(t).replace(Ve.percentDecode,"%")}catch{return null}return t}function Od(t,e){const n=t.replace(Ve.findPipe,(i,s,o)=>{let u=!1,l=s;for(;--l>=0&&o[l]==="\\";)u=!u;return u?"|":" |"}),r=n.split(Ve.splitPipe);let a=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;a<r.length;a++)r[a]=r[a].trim().replace(Ve.slashPipe,"|");return r}function bn(t,e,n){const r=t.length;if(r===0)return"";let a=0;for(;a<r&&t.charAt(r-a-1)===e;)a++;return t.slice(0,r-a)}function qy(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let r=0;r<t.length;r++)if(t[r]==="\\")r++;else if(t[r]===e[0])n++;else if(t[r]===e[1]&&(n--,n<0))return r;return n>0?-2:-1}function Ld(t,e,n,r,a){const i=e.href,s=e.title||null,o=t[1].replace(a.other.outputLinkReplace,"$1");r.state.inLink=!0;const u={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:s,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,u}function zy(t,e,n){const r=t.match(n.other.indentCodeCompensation);if(r===null)return e;const a=r[1];return e.split(`
3
3
  `).map(i=>{const s=i.match(n.other.beginningSpace);if(s===null)return i;const[o]=s;return o.length>=a.length?i.slice(a.length):i}).join(`
4
4
  `)}var gr=class{options;rules;lexer;constructor(t){this.options=t||Gt}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:bn(n,`
@@ -129,4 +129,4 @@ ${p}`;return{fallbackTitle:l,summary:d,usage:e?.usage,latency:n,detail:m,state:u
129
129
  `).trim().split(`
130
130
  `).filter(Boolean),k=a?S[S.length-1]??"":S[0]??"";l=!s&&k?k.length>100?k.slice(0,100)+"…":k:void 0,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];const c=l;let d;if(e[8]!==s||e[9]!==r){const _=r.map(i6).join(`
131
131
 
132
- `);d=!s&&_.trim()?_:null,e[8]=s,e[9]=r,e[10]=d}else d=e[10];const p=d,m=!a&&n!=null?n/1e3:void 0;let h;e[11]!==a?(h=a?g.jsx(xc,{className:"size-4"}):g.jsx(oS,{className:"size-4"}),e[11]=a,e[12]=h):h=e[12];const E=a?"Thinking...":u,y=a?"loading":"idle";let T;return e[13]!==p||e[14]!==m||e[15]!==c||e[16]!==h||e[17]!==E||e[18]!==y?(T=g.jsx(me,{icon:h,title:E,summary:c,detail:p,state:y,detailVariant:"prose",latency:m}),e[13]=p,e[14]=m,e[15]=c,e[16]=h,e[17]=E,e[18]=y,e[19]=T):T=e[19],T}function i6(t){return t.text??""}function s6(t){return t.text??""}function o6(t){return t.text?.includes("REDACTED")}const l6=3;function u6(t,e){let n=-1;for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.kind==="part"&&e[a.index]?.type==="text"){n=r;break}}return n===-1?{collapsed:[],tail:t}:{collapsed:t.slice(0,n),tail:t.slice(n)}}function c6(t,e){let n=0,r=0;for(const a of t)if(a.kind==="reasoning-group")r++;else{const i=e[a.index]?.type;i==="text"?r++:(i==="dynamic-tool"||i?.startsWith("tool-"))&&i!=="tool-todo_write"&&i!=="tool-update_interests"&&n++}return{toolCalls:n,messages:r}}function d6(t){const e=Z.c(8),{toolCalls:n,messages:r}=t;let a;e[0]!==r||e[1]!==n?(a=n>0&&g.jsxs(g.Fragment,{children:[g.jsx(fS,{className:"size-3.5 shrink-0"}),g.jsxs("span",{children:[n," tool call",n===1?"":"s",r>0?",":""]})]}),e[0]=r,e[1]=n,e[2]=a):a=e[2];let i;e[3]!==r?(i=r>0&&g.jsxs(g.Fragment,{children:[g.jsx(lS,{className:"size-3.5 shrink-0"}),g.jsxs("span",{children:[r," message",r===1?"":"s"]})]}),e[3]=r,e[4]=i):i=e[4];let s;return e[5]!==a||e[6]!==i?(s=g.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[a,i]}),e[5]=a,e[6]=i,e[7]=s):s=e[7],s}function p6(t){const e=Z.c(28),{items:n,message:r,reasoningGroups:a,isReasoningActive:i,totalDuration:s,dataParts:o,isLoading:u,isLast:l}=t;let c;e[0]!==n||e[1]!==r.parts?(c=c6(n,r.parts),e[0]=n,e[1]=r.parts,e[2]=c):c=e[2];const{toolCalls:d,messages:p}=c;if(d===0&&p===0)return null;let m;e[3]!==p||e[4]!==d?(m=g.jsx(d6,{toolCalls:d,messages:p}),e[3]=p,e[4]=d,e[5]=m):m=e[5];let h;if(e[6]!==o||e[7]!==l||e[8]!==u||e[9]!==i||e[10]!==n||e[11]!==r||e[12]!==a||e[13]!==s){let T;e[15]!==o||e[16]!==l||e[17]!==u||e[18]!==i||e[19]!==r||e[20]!==a||e[21]!==s?(T=(_,S)=>B1({item:_,renderIndex:S,message:r,reasoningGroups:a,isReasoningActive:i,totalDuration:s,dataParts:o,isLoading:u,isLast:l,isLastVisiblePart:!1}),e[15]=o,e[16]=l,e[17]=u,e[18]=i,e[19]=r,e[20]=a,e[21]=s,e[22]=T):T=e[22],h=n.map(T),e[6]=o,e[7]=l,e[8]=u,e[9]=i,e[10]=n,e[11]=r,e[12]=a,e[13]=s,e[14]=h}else h=e[14];let E;e[23]!==h?(E=g.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:h}),e[23]=h,e[24]=E):E=e[24];let y;return e[25]!==m||e[26]!==E?(y=g.jsx(me,{icon:null,alwaysChevron:!0,title:m,state:"idle",children:E}),e[25]=m,e[26]=E,e[27]=y):y=e[27],y}function B1({item:t,renderIndex:e,message:n,reasoningGroups:r,isReasoningActive:a,totalDuration:i,dataParts:s,isLoading:o,isLast:u,isLastVisiblePart:l,renderOrder:c}){if(t.kind==="reasoning-group"){const{group:h}=t,E=h===r[r.length-1],y=a&&E;if(!h.parts.some(S=>S.text?.trim())&&!y)return null;const _=r.length===1?i:null;return g.jsx(a6,{duration:_,parts:h.parts,isStreaming:y},`${n.id}-reasoning-${h.startIndex}`)}const d=n.parts[t.index],p=l||(c?c.findLastIndex(h=>h.kind==="part")===e:!1),m=p?s0(i0(),n.metadata?.usage):null;return g.jsx(f6,{part:d,id:n.id,usageStats:p&&g.jsx(_F,{usage:m,duration:i}),dataParts:s,isLoading:o,isLastMessage:u},`${n.id}-${t.index}`)}function f6(t){const e=Z.c(120),{part:n,id:r,usageStats:a,dataParts:i,isLoading:s,isLastMessage:o}=t;let u;e[0]!==i.toolMetadata?(u=p=>i.toolMetadata.get(p),e[0]=i.toolMetadata,e[1]=u):u=e[1];const l=u;let c;e[2]!==i.toolSubtaskMetadata?(c=p=>i.toolSubtaskMetadata.get(p),e[2]=i.toolSubtaskMetadata,e[3]=c):c=e[3];const d=c;switch(n.type){case"dynamic-tool":{let p;e[4]!==l||e[5]!==n.toolCallId?(p=l(n.toolCallId)?.annotations,e[4]=l,e[5]=n.toolCallId,e[6]=p):p=e[6];let m;e[7]!==l||e[8]!==n.toolCallId?(m=l(n.toolCallId)?.latencySeconds,e[7]=l,e[8]=n.toolCallId,e[9]=m):m=e[9];let h;e[10]!==l||e[11]!==n.toolCallId?(h=l(n.toolCallId)?.outputBytes,e[10]=l,e[11]=n.toolCallId,e[12]=h):h=e[12];let E;e[13]!==l||e[14]!==n.toolCallId?(E=l(n.toolCallId)?._meta,e[13]=l,e[14]=n.toolCallId,e[15]=E):E=e[15];let y;return e[16]!==o||e[17]!==n||e[18]!==p||e[19]!==m||e[20]!==h||e[21]!==E?(y=g.jsx(PE,{part:n,annotations:p,latency:m,outputBytes:h,isLastMessage:o,toolMeta:E}),e[16]=o,e[17]=n,e[18]=p,e[19]=m,e[20]=h,e[21]=E,e[22]=y):y=e[22],y}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let p;e[23]!==l||e[24]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[23]=l,e[24]=n.toolCallId,e[25]=p):p=e[25];let m;return e[26]!==n||e[27]!==p?(m=g.jsx(n4,{part:n,latency:p}),e[26]=n,e[27]=p,e[28]=m):m=e[28],m}case"tool-propose_plan":{let p;return e[29]!==n?(p=g.jsx(s4,{part:n}),e[29]=n,e[30]=p):p=e[30],p}case"tool-generate_image":{let p;e[31]!==l||e[32]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[31]=l,e[32]=n.toolCallId,e[33]=p):p=e[33];let m;return e[34]!==n||e[35]!==p?(m=g.jsx($F,{part:n,latency:p}),e[34]=n,e[35]=p,e[36]=m):m=e[36],m}case"tool-take_screenshot":{let p;e[37]!==l||e[38]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[37]=l,e[38]=n.toolCallId,e[39]=p):p=e[39];let m;return e[40]!==n||e[41]!==p?(m=g.jsx(zF,{part:n,latency:p}),e[40]=n,e[41]=p,e[42]=m):m=e[42],m}case"tool-web_search":{let p;e[43]!==l||e[44]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[43]=l,e[44]=n.toolCallId,e[45]=p):p=e[45];let m;e[46]!==i.webSearchStreaming||e[47]!==n.toolCallId?(m=i.webSearchStreaming.get(n.toolCallId),e[46]=i.webSearchStreaming,e[47]=n.toolCallId,e[48]=m):m=e[48];let h;return e[49]!==n||e[50]!==p||e[51]!==m?(h=g.jsx(t4,{part:n,latency:p,streamingText:m}),e[49]=n,e[50]=p,e[51]=m,e[52]=h):h=e[52],h}case"tool-subtask":{let p;e[53]!==d||e[54]!==n.toolCallId?(p=d(n.toolCallId),e[53]=d,e[54]=n.toolCallId,e[55]=p):p=e[55];let m;e[56]!==l||e[57]!==n.toolCallId?(m=l(n.toolCallId)?.annotations,e[56]=l,e[57]=n.toolCallId,e[58]=m):m=e[58];let h;e[59]!==l||e[60]!==n.toolCallId?(h=l(n.toolCallId)?.latencySeconds,e[59]=l,e[60]=n.toolCallId,e[61]=h):h=e[61];let E;e[62]!==n||e[63]!==p||e[64]!==m||e[65]!==h?(E={part:n,subtaskMeta:p,annotations:m,latency:h},e[62]=n,e[63]=p,e[64]=m,e[65]=h,e[66]=E):E=e[66];const y=E;let T;return e[67]!==y?(T=g.jsx(ue.Suspense,{fallback:g.jsx(a4,{...y}),children:g.jsx(i4,{...y})}),e[67]=y,e[68]=T):T=e[68],T}case"text":{const p=!!a&&!s;let m;return e[69]!==r||e[70]!==n||e[71]!==p||e[72]!==a?(m=g.jsx(Td,{id:r,part:n,extraActions:a,copyable:!0,alwaysShowActions:p}),e[69]=r,e[70]=n,e[71]=p,e[72]=a,e[73]=m):m=e[73],m}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const p=n;if(p.type==="tool-brand_context_setup"||p.type==="tool-BRAND_CONTEXT_EXTRACT"){let m;e[74]!==p.toolCallId||e[75]!==l?(m=l(p.toolCallId)?.latencySeconds,e[74]=p.toolCallId,e[75]=l,e[76]=m):m=e[76];let h;return e[77]!==p||e[78]!==m?(h=g.jsx(E4,{part:p,latency:m}),e[77]=p,e[78]=m,e[79]=h):h=e[79],h}if(p.type==="tool-BRAND_CONTEXT_GET"){let m;e[80]!==p.toolCallId||e[81]!==l?(m=l(p.toolCallId)?.latencySeconds,e[80]=p.toolCallId,e[81]=l,e[82]=m):m=e[82];let h;return e[83]!==p||e[84]!==m?(h=g.jsx(T4,{part:p,latency:m}),e[83]=p,e[84]=m,e[85]=h):h=e[85],h}if(p.type==="tool-BRAND_CONTEXT_LIST"){let m;e[86]!==p.toolCallId||e[87]!==l?(m=l(p.toolCallId)?.latencySeconds,e[86]=p.toolCallId,e[87]=l,e[88]=m):m=e[88];let h;return e[89]!==p||e[90]!==m?(h=g.jsx(S4,{part:p,latency:m}),e[89]=p,e[90]=m,e[91]=h):h=e[91],h}if(p.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let m;e[92]!==p.toolCallId||e[93]!==l?(m=l(p.toolCallId)?.latencySeconds,e[92]=p.toolCallId,e[93]=l,e[94]=m):m=e[94];let h;return e[95]!==p||e[96]!==m?(h=g.jsx(x4,{part:p,latency:m}),e[95]=p,e[96]=m,e[97]=h):h=e[97],h}if(p.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let m;e[98]!==p.toolCallId||e[99]!==l?(m=l(p.toolCallId)?.latencySeconds,e[98]=p.toolCallId,e[99]=l,e[100]=m):m=e[100];let h;return e[101]!==p||e[102]!==m?(h=g.jsx(v4,{part:p,latency:m}),e[101]=p,e[102]=m,e[103]=h):h=e[103],h}if(p.type==="tool-COLLECTION_CONNECTIONS_LIST"){let m;e[104]!==p.toolCallId||e[105]!==l?(m=l(p.toolCallId)?.latencySeconds,e[104]=p.toolCallId,e[105]=l,e[106]=m):m=e[106];let h;return e[107]!==p||e[108]!==m?(h=g.jsx(D4,{part:p,latency:m}),e[107]=p,e[108]=m,e[109]=h):h=e[109],h}if(p.type.startsWith("tool-")){const m=p.toolCallId;let h;e[110]!==i.toolMetadata||e[111]!==m?(h=i.toolMetadata.get(m),e[110]=i.toolMetadata,e[111]=m,e[112]=h):h=e[112];const E=h,y=E?.annotations,T=E?.latencySeconds,_=E?.outputBytes,S=E?._meta;let k;return e[113]!==p||e[114]!==o||e[115]!==y||e[116]!==T||e[117]!==_||e[118]!==S?(k=g.jsx(PE,{part:p,annotations:y,latency:T,outputBytes:_,isLastMessage:o,toolMeta:S}),e[113]=p,e[114]=o,e[115]=y,e[116]=T,e[117]=_,e[118]=S,e[119]=k):k=e[119],k}if(p.type.startsWith("data-"))return null;throw new Error(`Unknown part type: ${p.type}`)}}}function m6(t){const e=Z.c(2),{isRunInProgress:n}=t;if(n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx(xc,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),g.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:"Resuming task..."})]})}),e[0]=a):a=e[0],a}let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:"No response was generated"}),e[1]=r):r=e[1],r}function g6(t){const e=Z.c(7),{className:n,children:r}=t;let a;e[0]!==n?(a=Se("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",n),e[0]=n,e[1]=a):a=e[1];let i;e[2]!==r?(i=g.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:g.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:r})}),e[2]=r,e[3]=i):i=e[3];let s;return e[4]!==a||e[5]!==i?(s=g.jsx("div",{className:a,children:i}),e[4]=a,e[5]=i,e[6]=s):s=e[6],s}function h6(t){const e=Z.c(42),{message:n,status:r,className:a,isLast:i}=t,s=i===void 0?!1:i,{isRunInProgress:o}=kr()??{},u=o===void 0?!1:o,l=ZE()?.taskId??null,c=r==="streaming",p=c||r==="submitted",m=n?.metadata?.created_at;let h;e[0]!==m?(h=gS(m),e[0]=m,e[1]=h):h=e[1];const E=h;let y;e[2]!==p?(y=()=>p?Date.now():null,e[2]=p,e[3]=y):y=e[3];const[T,_]=ue.useState(y),[S,k]=ue.useState(p);S!==p&&(k(p),_(p?Date.now():null));const A=E??T,b=n!==null&&n.parts.length>0,{reasoningGroups:N,renderOrder:L,dataParts:O}=X4(n),R=n&&n.parts.length>0?n.parts[n.parts.length-1]:null,D=c&&R?.type==="reasoning";let P;if(e[4]!==n){const x=n?.metadata?.reasoning_start_at?new Date(n.metadata.reasoning_start_at):null,te=n?.metadata?.reasoning_end_at?new Date(n.metadata.reasoning_end_at):new Date;P=x!==null?te.getTime()-x.getTime():null,e[4]=n,e[5]=P}else P=e[5];const $=P;let H;e[6]!==s||e[7]!==n?(H=!s||!n||!n.parts.some(E6),e[6]=s,e[7]=n,e[8]=H):H=e[8];const F=H;let W;e[9]!==b||e[10]!==p||e[11]!==F||e[12]!==n||e[13]!==L?(W=!p&&b&&F&&(()=>{let x=0;for(const te of L)if(te.kind==="part"){const ne=n.parts[te.index]?.type;(ne==="dynamic-tool"||ne?.startsWith("tool-"))&&x++}return x>=l6})(),e[9]=b,e[10]=p,e[11]=F,e[12]=n,e[13]=L,e[14]=W):W=e[14];const Y=W;let j,K,v;if(e[15]!==a||e[16]!==O||e[17]!==b||e[18]!==s||e[19]!==p||e[20]!==D||e[21]!==u||e[22]!==F||e[23]!==n||e[24]!==N||e[25]!==L||e[26]!==Y||e[27]!==A||e[28]!==l||e[29]!==$){const{collapsed:x,tail:te}=Y?u6(L,n.parts):{collapsed:[],tail:L};j=g6,v=a,K=b?g.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[x.length>0&&g.jsx(p6,{items:x,message:n,reasoningGroups:N,isReasoningActive:D,totalDuration:$,dataParts:O,isLoading:p,isLast:s}),te.map((ne,re)=>{const oe=x.length+re,de=te.findLastIndex(b6)===re;return B1({item:ne,renderIndex:oe,message:n,reasoningGroups:N,isReasoningActive:D,totalDuration:$,dataParts:O,isLoading:p,isLast:s,isLastVisiblePart:de,renderOrder:L})}),s&&p&&A!==null&&g.jsx(r6,{startedAt:A}),s&&!p&&l&&g.jsxs(g.Fragment,{children:[g.jsx(j4,{}),g.jsx(G4,{threadId:l}),F&&g.jsx(F4,{})]})]}):p?g.jsx(n6,{}):g.jsx(m6,{isRunInProgress:s&&u}),e[15]=a,e[16]=O,e[17]=b,e[18]=s,e[19]=p,e[20]=D,e[21]=u,e[22]=F,e[23]=n,e[24]=N,e[25]=L,e[26]=Y,e[27]=A,e[28]=l,e[29]=$,e[30]=j,e[31]=K,e[32]=v}else j=e[30],K=e[31],v=e[32];let X;e[33]!==s||e[34]!==c||e[35]!==n?.parts?(X=s&&c&&g.jsx(H4,{parts:n?.parts}),e[33]=s,e[34]=c,e[35]=n?.parts,e[36]=X):X=e[36];let Q;return e[37]!==j||e[38]!==K||e[39]!==X||e[40]!==v?(Q=g.jsxs(j,{className:v,children:[K,X]}),e[37]=j,e[38]=K,e[39]=X,e[40]=v,e[41]=Q):Q=e[41],Q}function b6(t){return t.kind==="part"}function E6(t){const e=t.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const n=t.state;return n==="input-streaming"||n==="input-available"||n==="approval-requested"}const T6=[SS.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),ly,SF];function S6(t){const e=Z.c(5),{tiptapDoc:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=r):r=e[0];let a;e[1]!==n?(a={extensions:T6,content:n,editable:!1,editorProps:r},e[1]=n,e[2]=a):a=e[2];const i=TS(a);if(!i)return null;let s;return e[3]!==i?(s=g.jsx(yS,{editor:i,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=i,e[4]=s):s=e[4],s}function y6(t){const e=Z.c(27),{message:n,className:r,onScrollToPair:a}=t,{id:i,parts:s,metadata:o}=n,[u,l]=ue.useState(!1),[c,d]=ue.useState(!1),p=ue.useRef(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=P=>{P&&!p.current&&(p.current=!0,d(P.scrollHeight>P.clientHeight))},e[0]=m):m=e[0];const h=m;if(!s||s.length===0)return null;let E;e[1]!==a?(E=()=>{l(!0),a?.()},e[1]=a,e[2]=E):E=e[2];const y=E,T=o?.tiptapDoc;let _;e[3]!==r?(_=Se("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",r),e[3]=r,e[4]=_):_=e[4];let S,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=()=>l(!0),k=()=>l(!1),e[5]=S,e[6]=k):(S=e[5],k=e[6]);let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=A):A=e[7];let b;e[8]!==u||e[9]!==c?(b=Se("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":Se("max-h-[84px] overflow-hidden opacity-99",c&&"mask-b-from-1%")),e[8]=u,e[9]=c,e[10]=b):b=e[10];let N;e[11]!==T||e[12]!==i||e[13]!==o||e[14]!==s?(N=T?g.jsx(S6,{tiptapDoc:o.tiptapDoc}):s.map((P,$)=>P.type==="text"?g.jsx(Td,{id:i,part:P},`${i}-${$}`):null),e[11]=T,e[12]=i,e[13]=o,e[14]=s,e[15]=N):N=e[15];let L;e[16]!==N?(L=g.jsx("div",{children:N}),e[16]=N,e[17]=L):L=e[17];let O;e[18]!==b||e[19]!==L?(O=g.jsx("div",{ref:h,className:b,children:L}),e[18]=b,e[19]=L,e[20]=O):O=e[20];let R;e[21]!==y||e[22]!==O?(R=g.jsxs("div",{tabIndex:0,onClick:y,onFocus:S,onBlur:k,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[A,O]}),e[21]=y,e[22]=O,e[23]=R):R=e[23];let D;return e[24]!==R||e[25]!==_?(D=g.jsx(g.Fragment,{children:g.jsx("div",{className:_,children:R})}),e[24]=R,e[25]=_,e[26]=D):D=e[26],D}function uB(t){const e=[],n=t.filter(r=>r.role!=="system");for(let r=0;r<n.length;r++){const a=n[r];if(a)if(a.role==="user"){const i=n[r+1];i&&i.role==="assistant"?(e.push({user:a,assistant:i}),r++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function cB(t){const e=Z.c(17),{pair:n,isLastPair:r,status:a}=t,i=ue.useRef(null),s=ue.useRef(!1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{i.current&&i.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=o):o=e[0];const u=o;let l;e[1]!==r||e[2]!==a?(l=y=>{if(i.current=y,!r||!y||s.current)return;if(s.current=!0,a==="submitted"||a==="streaming"){y.scrollIntoView({behavior:"smooth",block:"start"});return}const T=y.closest("[data-chat-scroller]");T?T.scrollTop=T.scrollHeight:y.scrollIntoView({behavior:"instant",block:"start"})},e[1]=r,e[2]=a,e[3]=l):l=e[3];const c=l,d=!n.user&&"pt-8 sm:pt-6";let p;e[4]!==d?(p=Se("flex flex-col pb-2 sm:pb-2",d),e[4]=d,e[5]=p):p=e[5];let m;e[6]!==n.user?(m=n.user&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),g.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:g.jsx(y6,{message:n.user,onScrollToPair:u})})]}),e[6]=n.user,e[7]=m):m=e[7];let h;e[8]!==r||e[9]!==n.assistant||e[10]!==a?(h=g.jsx(h6,{message:n.assistant,status:a,isLast:r}),e[8]=r,e[9]=n.assistant,e[10]=a,e[11]=h):h=e[11];let E;return e[12]!==c||e[13]!==p||e[14]!==m||e[15]!==h?(E=g.jsxs("div",{ref:c,className:p,children:[m,h]}),e[12]=c,e[13]=p,e[14]=m,e[15]=h,e[16]=E):E=e[16],E}export{SF as F,Q4 as G,Ed as M,iy as P,lB as S,l0 as a,u0 as b,iB as c,ny as d,Td as e,sB as f,Cc as g,sy as h,oB as i,ly as j,cB as k,vc as s,o0 as t,uB as u};
132
+ `);d=!s&&_.trim()?_:null,e[8]=s,e[9]=r,e[10]=d}else d=e[10];const p=d,m=!a&&n!=null?n/1e3:void 0;let h;e[11]!==a?(h=a?g.jsx(xc,{className:"size-4"}):g.jsx(oS,{className:"size-4"}),e[11]=a,e[12]=h):h=e[12];const E=a?"Thinking...":u,y=a?"loading":"idle";let T;return e[13]!==p||e[14]!==m||e[15]!==c||e[16]!==h||e[17]!==E||e[18]!==y?(T=g.jsx(me,{icon:h,title:E,summary:c,detail:p,state:y,detailVariant:"prose",latency:m}),e[13]=p,e[14]=m,e[15]=c,e[16]=h,e[17]=E,e[18]=y,e[19]=T):T=e[19],T}function i6(t){return t.text??""}function s6(t){return t.text??""}function o6(t){return t.text?.includes("REDACTED")}const l6=3;function u6(t,e){let n=-1;for(let r=t.length-1;r>=0;r--){const a=t[r];if(a.kind==="part"&&e[a.index]?.type==="text"){n=r;break}}return n===-1?{collapsed:[],tail:t}:{collapsed:t.slice(0,n),tail:t.slice(n)}}function c6(t,e){let n=0,r=0;for(const a of t)if(a.kind==="reasoning-group")r++;else{const i=e[a.index]?.type;i==="text"?r++:(i==="dynamic-tool"||i?.startsWith("tool-"))&&i!=="tool-todo_write"&&i!=="tool-update_interests"&&n++}return{toolCalls:n,messages:r}}function d6(t){const e=Z.c(8),{toolCalls:n,messages:r}=t;let a;e[0]!==r||e[1]!==n?(a=n>0&&g.jsxs(g.Fragment,{children:[g.jsx(fS,{className:"size-3.5 shrink-0"}),g.jsxs("span",{children:[n," tool call",n===1?"":"s",r>0?",":""]})]}),e[0]=r,e[1]=n,e[2]=a):a=e[2];let i;e[3]!==r?(i=r>0&&g.jsxs(g.Fragment,{children:[g.jsx(lS,{className:"size-3.5 shrink-0"}),g.jsxs("span",{children:[r," message",r===1?"":"s"]})]}),e[3]=r,e[4]=i):i=e[4];let s;return e[5]!==a||e[6]!==i?(s=g.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[a,i]}),e[5]=a,e[6]=i,e[7]=s):s=e[7],s}function p6(t){const e=Z.c(28),{items:n,message:r,reasoningGroups:a,isReasoningActive:i,totalDuration:s,dataParts:o,isLoading:u,isLast:l}=t;let c;e[0]!==n||e[1]!==r.parts?(c=c6(n,r.parts),e[0]=n,e[1]=r.parts,e[2]=c):c=e[2];const{toolCalls:d,messages:p}=c;if(d===0&&p===0)return null;let m;e[3]!==p||e[4]!==d?(m=g.jsx(d6,{toolCalls:d,messages:p}),e[3]=p,e[4]=d,e[5]=m):m=e[5];let h;if(e[6]!==o||e[7]!==l||e[8]!==u||e[9]!==i||e[10]!==n||e[11]!==r||e[12]!==a||e[13]!==s){let T;e[15]!==o||e[16]!==l||e[17]!==u||e[18]!==i||e[19]!==r||e[20]!==a||e[21]!==s?(T=(_,S)=>B1({item:_,renderIndex:S,message:r,reasoningGroups:a,isReasoningActive:i,totalDuration:s,dataParts:o,isLoading:u,isLast:l,isLastVisiblePart:!1}),e[15]=o,e[16]=l,e[17]=u,e[18]=i,e[19]=r,e[20]=a,e[21]=s,e[22]=T):T=e[22],h=n.map(T),e[6]=o,e[7]=l,e[8]=u,e[9]=i,e[10]=n,e[11]=r,e[12]=a,e[13]=s,e[14]=h}else h=e[14];let E;e[23]!==h?(E=g.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:h}),e[23]=h,e[24]=E):E=e[24];let y;return e[25]!==m||e[26]!==E?(y=g.jsx(me,{icon:null,alwaysChevron:!0,title:m,state:"idle",children:E}),e[25]=m,e[26]=E,e[27]=y):y=e[27],y}function B1({item:t,renderIndex:e,message:n,reasoningGroups:r,isReasoningActive:a,totalDuration:i,dataParts:s,isLoading:o,isLast:u,isLastVisiblePart:l,renderOrder:c}){if(t.kind==="reasoning-group"){const{group:h}=t,E=h===r[r.length-1],y=a&&E;if(!h.parts.some(S=>S.text?.trim())&&!y)return null;const _=r.length===1?i:null;return g.jsx(a6,{duration:_,parts:h.parts,isStreaming:y},`${n.id}-reasoning-${h.startIndex}`)}const d=n.parts[t.index],p=l||(c?c.findLastIndex(h=>h.kind==="part")===e:!1),m=p?s0(i0(),n.metadata?.usage):null;return g.jsx(f6,{part:d,id:n.id,usageStats:p&&g.jsx(_F,{usage:m,duration:i}),dataParts:s,isLoading:o,isLastMessage:u},`${n.id}-${t.index}`)}function f6(t){const e=Z.c(120),{part:n,id:r,usageStats:a,dataParts:i,isLoading:s,isLastMessage:o}=t;let u;e[0]!==i.toolMetadata?(u=p=>i.toolMetadata.get(p),e[0]=i.toolMetadata,e[1]=u):u=e[1];const l=u;let c;e[2]!==i.toolSubtaskMetadata?(c=p=>i.toolSubtaskMetadata.get(p),e[2]=i.toolSubtaskMetadata,e[3]=c):c=e[3];const d=c;switch(n.type){case"dynamic-tool":{let p;e[4]!==l||e[5]!==n.toolCallId?(p=l(n.toolCallId)?.annotations,e[4]=l,e[5]=n.toolCallId,e[6]=p):p=e[6];let m;e[7]!==l||e[8]!==n.toolCallId?(m=l(n.toolCallId)?.latencySeconds,e[7]=l,e[8]=n.toolCallId,e[9]=m):m=e[9];let h;e[10]!==l||e[11]!==n.toolCallId?(h=l(n.toolCallId)?.outputBytes,e[10]=l,e[11]=n.toolCallId,e[12]=h):h=e[12];let E;e[13]!==l||e[14]!==n.toolCallId?(E=l(n.toolCallId)?._meta,e[13]=l,e[14]=n.toolCallId,e[15]=E):E=e[15];let y;return e[16]!==o||e[17]!==n||e[18]!==p||e[19]!==m||e[20]!==h||e[21]!==E?(y=g.jsx(PE,{part:n,annotations:p,latency:m,outputBytes:h,isLastMessage:o,toolMeta:E}),e[16]=o,e[17]=n,e[18]=p,e[19]=m,e[20]=h,e[21]=E,e[22]=y):y=e[22],y}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let p;e[23]!==l||e[24]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[23]=l,e[24]=n.toolCallId,e[25]=p):p=e[25];let m;return e[26]!==n||e[27]!==p?(m=g.jsx(n4,{part:n,latency:p}),e[26]=n,e[27]=p,e[28]=m):m=e[28],m}case"tool-propose_plan":{let p;return e[29]!==n?(p=g.jsx(s4,{part:n}),e[29]=n,e[30]=p):p=e[30],p}case"tool-generate_image":{let p;e[31]!==l||e[32]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[31]=l,e[32]=n.toolCallId,e[33]=p):p=e[33];let m;return e[34]!==n||e[35]!==p?(m=g.jsx($F,{part:n,latency:p}),e[34]=n,e[35]=p,e[36]=m):m=e[36],m}case"tool-take_screenshot":{let p;e[37]!==l||e[38]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[37]=l,e[38]=n.toolCallId,e[39]=p):p=e[39];let m;return e[40]!==n||e[41]!==p?(m=g.jsx(zF,{part:n,latency:p}),e[40]=n,e[41]=p,e[42]=m):m=e[42],m}case"tool-web_search":{let p;e[43]!==l||e[44]!==n.toolCallId?(p=l(n.toolCallId)?.latencySeconds,e[43]=l,e[44]=n.toolCallId,e[45]=p):p=e[45];let m;e[46]!==i.webSearchStreaming||e[47]!==n.toolCallId?(m=i.webSearchStreaming.get(n.toolCallId),e[46]=i.webSearchStreaming,e[47]=n.toolCallId,e[48]=m):m=e[48];let h;return e[49]!==n||e[50]!==p||e[51]!==m?(h=g.jsx(t4,{part:n,latency:p,streamingText:m}),e[49]=n,e[50]=p,e[51]=m,e[52]=h):h=e[52],h}case"tool-subtask":{let p;e[53]!==d||e[54]!==n.toolCallId?(p=d(n.toolCallId),e[53]=d,e[54]=n.toolCallId,e[55]=p):p=e[55];let m;e[56]!==l||e[57]!==n.toolCallId?(m=l(n.toolCallId)?.annotations,e[56]=l,e[57]=n.toolCallId,e[58]=m):m=e[58];let h;e[59]!==l||e[60]!==n.toolCallId?(h=l(n.toolCallId)?.latencySeconds,e[59]=l,e[60]=n.toolCallId,e[61]=h):h=e[61];let E;e[62]!==n||e[63]!==p||e[64]!==m||e[65]!==h?(E={part:n,subtaskMeta:p,annotations:m,latency:h},e[62]=n,e[63]=p,e[64]=m,e[65]=h,e[66]=E):E=e[66];const y=E;let T;return e[67]!==y?(T=g.jsx(ue.Suspense,{fallback:g.jsx(a4,{...y}),children:g.jsx(i4,{...y})}),e[67]=y,e[68]=T):T=e[68],T}case"text":{const p=!!a&&!s;let m;return e[69]!==r||e[70]!==n||e[71]!==p||e[72]!==a?(m=g.jsx(Td,{id:r,part:n,extraActions:a,copyable:!0,alwaysShowActions:p}),e[69]=r,e[70]=n,e[71]=p,e[72]=a,e[73]=m):m=e[73],m}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const p=n;if(p.type==="tool-brand_context_setup"||p.type==="tool-BRAND_CONTEXT_EXTRACT"){let m;e[74]!==p.toolCallId||e[75]!==l?(m=l(p.toolCallId)?.latencySeconds,e[74]=p.toolCallId,e[75]=l,e[76]=m):m=e[76];let h;return e[77]!==p||e[78]!==m?(h=g.jsx(E4,{part:p,latency:m}),e[77]=p,e[78]=m,e[79]=h):h=e[79],h}if(p.type==="tool-BRAND_CONTEXT_GET"){let m;e[80]!==p.toolCallId||e[81]!==l?(m=l(p.toolCallId)?.latencySeconds,e[80]=p.toolCallId,e[81]=l,e[82]=m):m=e[82];let h;return e[83]!==p||e[84]!==m?(h=g.jsx(T4,{part:p,latency:m}),e[83]=p,e[84]=m,e[85]=h):h=e[85],h}if(p.type==="tool-BRAND_CONTEXT_LIST"){let m;e[86]!==p.toolCallId||e[87]!==l?(m=l(p.toolCallId)?.latencySeconds,e[86]=p.toolCallId,e[87]=l,e[88]=m):m=e[88];let h;return e[89]!==p||e[90]!==m?(h=g.jsx(S4,{part:p,latency:m}),e[89]=p,e[90]=m,e[91]=h):h=e[91],h}if(p.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let m;e[92]!==p.toolCallId||e[93]!==l?(m=l(p.toolCallId)?.latencySeconds,e[92]=p.toolCallId,e[93]=l,e[94]=m):m=e[94];let h;return e[95]!==p||e[96]!==m?(h=g.jsx(x4,{part:p,latency:m}),e[95]=p,e[96]=m,e[97]=h):h=e[97],h}if(p.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let m;e[98]!==p.toolCallId||e[99]!==l?(m=l(p.toolCallId)?.latencySeconds,e[98]=p.toolCallId,e[99]=l,e[100]=m):m=e[100];let h;return e[101]!==p||e[102]!==m?(h=g.jsx(v4,{part:p,latency:m}),e[101]=p,e[102]=m,e[103]=h):h=e[103],h}if(p.type==="tool-COLLECTION_CONNECTIONS_LIST"){let m;e[104]!==p.toolCallId||e[105]!==l?(m=l(p.toolCallId)?.latencySeconds,e[104]=p.toolCallId,e[105]=l,e[106]=m):m=e[106];let h;return e[107]!==p||e[108]!==m?(h=g.jsx(D4,{part:p,latency:m}),e[107]=p,e[108]=m,e[109]=h):h=e[109],h}if(p.type.startsWith("tool-")){const m=p.toolCallId;let h;e[110]!==i.toolMetadata||e[111]!==m?(h=i.toolMetadata.get(m),e[110]=i.toolMetadata,e[111]=m,e[112]=h):h=e[112];const E=h,y=E?.annotations,T=E?.latencySeconds,_=E?.outputBytes,S=E?._meta;let k;return e[113]!==p||e[114]!==o||e[115]!==y||e[116]!==T||e[117]!==_||e[118]!==S?(k=g.jsx(PE,{part:p,annotations:y,latency:T,outputBytes:_,isLastMessage:o,toolMeta:S}),e[113]=p,e[114]=o,e[115]=y,e[116]=T,e[117]=_,e[118]=S,e[119]=k):k=e[119],k}if(p.type.startsWith("data-"))return null;throw new Error(`Unknown part type: ${p.type}`)}}}function m6(t){const e=Z.c(2),{isRunInProgress:n}=t;if(n){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=g.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:g.jsxs("span",{className:"flex items-center gap-1.5",children:[g.jsx(xc,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),g.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:"Resuming task..."})]})}),e[0]=a):a=e[0],a}let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=g.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:"No response was generated"}),e[1]=r):r=e[1],r}function g6(t){const e=Z.c(7),{className:n,children:r}=t;let a;e[0]!==n?(a=Se("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",n),e[0]=n,e[1]=a):a=e[1];let i;e[2]!==r?(i=g.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:g.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:r})}),e[2]=r,e[3]=i):i=e[3];let s;return e[4]!==a||e[5]!==i?(s=g.jsx("div",{className:a,children:i}),e[4]=a,e[5]=i,e[6]=s):s=e[6],s}function h6(t){const e=Z.c(42),{message:n,turnStartedAt:r,status:a,className:i,isLast:s}=t,o=s===void 0?!1:s,{isRunInProgress:u}=kr()??{},l=u===void 0?!1:u,c=ZE()?.taskId??null,d=a==="streaming",m=d||a==="submitted";let h;e[0]!==r?(h=gS(r),e[0]=r,e[1]=h):h=e[1];const E=h;let y;e[2]!==m?(y=()=>m?Date.now():null,e[2]=m,e[3]=y):y=e[3];const[T,_]=ue.useState(y),[S,k]=ue.useState(m);S!==m&&(k(m),_(m?Date.now():null));const A=E??T,b=n!==null&&n.parts.length>0,{reasoningGroups:N,renderOrder:L,dataParts:O}=X4(n),R=n&&n.parts.length>0?n.parts[n.parts.length-1]:null,D=d&&R?.type==="reasoning";let P;if(e[4]!==n){const x=n?.metadata?.reasoning_start_at?new Date(n.metadata.reasoning_start_at):null,te=n?.metadata?.reasoning_end_at?new Date(n.metadata.reasoning_end_at):new Date;P=x!==null?te.getTime()-x.getTime():null,e[4]=n,e[5]=P}else P=e[5];const $=P;let H;e[6]!==o||e[7]!==n?(H=!o||!n||!n.parts.some(E6),e[6]=o,e[7]=n,e[8]=H):H=e[8];const F=H;let W;e[9]!==b||e[10]!==m||e[11]!==F||e[12]!==n||e[13]!==L?(W=!m&&b&&F&&(()=>{let x=0;for(const te of L)if(te.kind==="part"){const ne=n.parts[te.index]?.type;(ne==="dynamic-tool"||ne?.startsWith("tool-"))&&x++}return x>=l6})(),e[9]=b,e[10]=m,e[11]=F,e[12]=n,e[13]=L,e[14]=W):W=e[14];const Y=W;let j,K,v;if(e[15]!==i||e[16]!==O||e[17]!==b||e[18]!==o||e[19]!==m||e[20]!==D||e[21]!==l||e[22]!==F||e[23]!==n||e[24]!==N||e[25]!==L||e[26]!==Y||e[27]!==A||e[28]!==c||e[29]!==$){const{collapsed:x,tail:te}=Y?u6(L,n.parts):{collapsed:[],tail:L};j=g6,K=i,v=b?g.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[x.length>0&&g.jsx(p6,{items:x,message:n,reasoningGroups:N,isReasoningActive:D,totalDuration:$,dataParts:O,isLoading:m,isLast:o}),te.map((ne,re)=>{const oe=x.length+re,de=te.findLastIndex(b6)===re;return B1({item:ne,renderIndex:oe,message:n,reasoningGroups:N,isReasoningActive:D,totalDuration:$,dataParts:O,isLoading:m,isLast:o,isLastVisiblePart:de,renderOrder:L})}),o&&m&&A!==null&&g.jsx(r6,{startedAt:A}),o&&!m&&c&&g.jsxs(g.Fragment,{children:[g.jsx(j4,{}),g.jsx(G4,{threadId:c}),F&&g.jsx(F4,{})]})]}):m?g.jsx(n6,{}):g.jsx(m6,{isRunInProgress:o&&l}),e[15]=i,e[16]=O,e[17]=b,e[18]=o,e[19]=m,e[20]=D,e[21]=l,e[22]=F,e[23]=n,e[24]=N,e[25]=L,e[26]=Y,e[27]=A,e[28]=c,e[29]=$,e[30]=j,e[31]=K,e[32]=v}else j=e[30],K=e[31],v=e[32];let X;e[33]!==o||e[34]!==d||e[35]!==n?.parts?(X=o&&d&&g.jsx(H4,{parts:n?.parts}),e[33]=o,e[34]=d,e[35]=n?.parts,e[36]=X):X=e[36];let Q;return e[37]!==j||e[38]!==X||e[39]!==K||e[40]!==v?(Q=g.jsxs(j,{className:K,children:[v,X]}),e[37]=j,e[38]=X,e[39]=K,e[40]=v,e[41]=Q):Q=e[41],Q}function b6(t){return t.kind==="part"}function E6(t){const e=t.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const n=t.state;return n==="input-streaming"||n==="input-available"||n==="approval-requested"}const T6=[SS.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),ly,SF];function S6(t){const e=Z.c(5),{tiptapDoc:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=r):r=e[0];let a;e[1]!==n?(a={extensions:T6,content:n,editable:!1,editorProps:r},e[1]=n,e[2]=a):a=e[2];const i=TS(a);if(!i)return null;let s;return e[3]!==i?(s=g.jsx(yS,{editor:i,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=i,e[4]=s):s=e[4],s}function y6(t){const e=Z.c(27),{message:n,className:r,onScrollToPair:a}=t,{id:i,parts:s,metadata:o}=n,[u,l]=ue.useState(!1),[c,d]=ue.useState(!1),p=ue.useRef(!1);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=P=>{P&&!p.current&&(p.current=!0,d(P.scrollHeight>P.clientHeight))},e[0]=m):m=e[0];const h=m;if(!s||s.length===0)return null;let E;e[1]!==a?(E=()=>{l(!0),a?.()},e[1]=a,e[2]=E):E=e[2];const y=E,T=o?.tiptapDoc;let _;e[3]!==r?(_=Se("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",r),e[3]=r,e[4]=_):_=e[4];let S,k;e[5]===Symbol.for("react.memo_cache_sentinel")?(S=()=>l(!0),k=()=>l(!1),e[5]=S,e[6]=k):(S=e[5],k=e[6]);let A;e[7]===Symbol.for("react.memo_cache_sentinel")?(A=g.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=A):A=e[7];let b;e[8]!==u||e[9]!==c?(b=Se("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":Se("max-h-[84px] overflow-hidden opacity-99",c&&"mask-b-from-1%")),e[8]=u,e[9]=c,e[10]=b):b=e[10];let N;e[11]!==T||e[12]!==i||e[13]!==o||e[14]!==s?(N=T?g.jsx(S6,{tiptapDoc:o.tiptapDoc}):s.map((P,$)=>P.type==="text"?g.jsx(Td,{id:i,part:P},`${i}-${$}`):null),e[11]=T,e[12]=i,e[13]=o,e[14]=s,e[15]=N):N=e[15];let L;e[16]!==N?(L=g.jsx("div",{children:N}),e[16]=N,e[17]=L):L=e[17];let O;e[18]!==b||e[19]!==L?(O=g.jsx("div",{ref:h,className:b,children:L}),e[18]=b,e[19]=L,e[20]=O):O=e[20];let R;e[21]!==y||e[22]!==O?(R=g.jsxs("div",{tabIndex:0,onClick:y,onFocus:S,onBlur:k,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[A,O]}),e[21]=y,e[22]=O,e[23]=R):R=e[23];let D;return e[24]!==R||e[25]!==_?(D=g.jsx(g.Fragment,{children:g.jsx("div",{className:_,children:R})}),e[24]=R,e[25]=_,e[26]=D):D=e[26],D}function uB(t){const e=[],n=t.filter(r=>r.role!=="system");for(let r=0;r<n.length;r++){const a=n[r];if(a)if(a.role==="user"){const i=n[r+1];i&&i.role==="assistant"?(e.push({user:a,assistant:i}),r++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function cB(t){const e=Z.c(18),{pair:n,isLastPair:r,status:a}=t,i=ue.useRef(null),s=ue.useRef(!1);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{i.current&&i.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=o):o=e[0];const u=o;let l;e[1]!==r||e[2]!==a?(l=T=>{if(i.current=T,!r||!T||s.current)return;if(s.current=!0,a==="submitted"||a==="streaming"){T.scrollIntoView({behavior:"smooth",block:"start"});return}const _=T.closest("[data-chat-scroller]");_?_.scrollTop=_.scrollHeight:T.scrollIntoView({behavior:"instant",block:"start"})},e[1]=r,e[2]=a,e[3]=l):l=e[3];const c=l,d=!n.user&&"pt-8 sm:pt-6";let p;e[4]!==d?(p=Se("flex flex-col pb-2 sm:pb-2",d),e[4]=d,e[5]=p):p=e[5];let m;e[6]!==n.user?(m=n.user&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),g.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:g.jsx(y6,{message:n.user,onScrollToPair:u})})]}),e[6]=n.user,e[7]=m):m=e[7];const h=n.user?.created_at??null;let E;e[8]!==r||e[9]!==n.assistant||e[10]!==a||e[11]!==h?(E=g.jsx(h6,{message:n.assistant,turnStartedAt:h,status:a,isLast:r}),e[8]=r,e[9]=n.assistant,e[10]=a,e[11]=h,e[12]=E):E=e[12];let y;return e[13]!==c||e[14]!==p||e[15]!==m||e[16]!==E?(y=g.jsxs("div",{ref:c,className:p,children:[m,E]}),e[13]=c,e[14]=p,e[15]=m,e[16]=E,e[17]=y):y=e[17],y}export{SF as F,Q4 as G,Ed as M,iy as P,lB as S,l0 as a,u0 as b,iB as c,ny as d,Td as e,sB as f,Cc as g,sy as h,oB as i,ly as j,cB as k,vc as s,o0 as t,uB as u};
@@ -1 +1 @@
1
- import{e as o,j as t,dj as n}from"./index-DCp7HEPF.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
1
+ import{e as o,j as t,dj as n}from"./index-UC1l_H0T.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
@@ -1 +1 @@
1
- import{e as S,j as s,r as w,dj as y}from"./index-DCp7HEPF.js";import{i as R}from"./Check-Cgs_Ieiz.js";import{t as _}from"./ChevronDown-BEPxXMEW.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
1
+ import{e as S,j as s,r as w,dj as y}from"./index-UC1l_H0T.js";import{i as R}from"./Check-B-Snf346.js";import{t as _}from"./ChevronDown-BvZFsep5.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function $(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{$ as default};
@@ -1 +1 @@
1
- import{r as B,e as D,j as s,q as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-DCp7HEPF.js";import{u as ae}from"./use-connection-CDL88IlU.js";import{S as ce,u as ue,j as de}from"./constants-BWDiAmgI.js";import{a as me}from"./Settings02-uck5BGEM.js";import{P as z}from"./index-D7gjc6EA.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),T=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:k,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const q=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==q?(v={queryKey:x,queryFn:p,enabled:q},e[14]=x,e[15]=p,e[16]=q,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==T||e[40]!==t.slug||e[41]!==k||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=k??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();T({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=T,e[40]=t.slug,e[41]=k,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,U=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const $=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==U||e[55]!==$?(E={connectionId:Y,connection:U,toolCaller:$,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=U,e[55]=$,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
1
+ import{r as B,e as D,j as s,q as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-UC1l_H0T.js";import{u as ae}from"./use-connection-DBaDqCrX.js";import{S as ce,u as ue,j as de}from"./constants-Cs7fB5Fz.js";import{a as me}from"./Settings02-BnWl2AAW.js";import{P as z}from"./index-xKyKnuDm.js";const ge=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,t=h;let l;return e[0]!==m||e[1]!==t?(l=s.jsx(ge.Provider,{value:t,children:m}),e[0]=m,e[1]=t,e[2]=l):l=e[2],l}B.createContext(null);function fe(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(60),{bindingName:h,renderEmptyState:m}=i,{org:t,project:l}=X(),T=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:k,taskId:w,pluginId:g}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:f}=ne.useSession();let _;e[4]!==t.id||e[5]!==t.slug?(_={connectionId:ce,orgId:t.id,orgSlug:t.slug},e[4]=t.id,e[5]=t.slug,e[6]=_):_=e[6];const O=ue(_);let x;e[7]!==g||e[8]!==l.id?(x=se.projectPluginConfig(l.id??"",g),e[7]=g,e[8]=l.id,e[9]=x):x=e[9];let p;e[10]!==g||e[11]!==l.id||e[12]!==O?(p=async()=>{const n=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:g}});return n.structuredContent??n},e[10]=g,e[11]=l.id,e[12]=O,e[13]=p):p=e[13];const q=!!l.id&&!!g;let v;e[14]!==x||e[15]!==p||e[16]!==q?(v={queryKey:x,queryFn:p,enabled:q},e[14]=x,e[15]=p,e[16]=q,e[17]=v):v=e[17];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(n=>n.id===R):null,y=de({connectionId:C?.id,orgId:t.id,orgSlug:t.slug});let S;e[18]!==f?(S=f?.user?{user:{id:f.user.id,name:f.user.name,email:f.user.email,image:f.user.image}}:null,e[18]=f,e[19]=S):S=e[19];const a=S;let b;e[20]!==t.id||e[21]!==t.name||e[22]!==t.slug?(b={id:t.id,slug:t.slug,name:t.name},e[20]=t.id,e[21]=t.name,e[22]=t.slug,e[23]=b):b=e[23];const c=b;if(Q){let n;return e[24]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[24]=n):n=e[24],n}if(K.length===0){let n;e[25]!==c||e[26]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[25]=c,e[26]=a,e[27]=n):n=e[27];const u=n;let r;e[28]!==m?(r=m(),e[28]=m,e[29]=r):r=e[29];let o;e[30]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[30]=r,e[31]=o):o=e[31];let d;return e[32]!==u||e[33]!==o?(d=s.jsx(F,{value:u,children:o}),e[32]=u,e[33]=o,e[34]=d):d=e[34],d}if(!C){let n;e[35]!==c||e[36]!==a?(n={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[35]=c,e[36]=a,e[37]=n):n=e[37];const u=n;let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[38]=r):r=e[38];let o;e[39]!==T||e[40]!==t.slug||e[41]!==k||e[42]!==l.id||e[43]!==w||e[44]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=k??t.slug,J=G??l.id??"",W=w??crypto.randomUUID();T({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[39]=T,e[40]=t.slug,e[41]=k,e[42]=l.id,e[43]=w,e[44]=G,e[45]=o):o=e[45];let d;return e[46]!==u||e[47]!==o?(d=s.jsx(F,{value:u,children:o}),e[46]=u,e[47]=o,e[48]=d):d=e[48],d}const Y=C.id,U=fe(C);let N;e[49]!==y?(N=(n,u)=>y?y.callTool({name:n,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[49]=y,e[50]=N):N=e[50];const $=N;let E;e[51]!==C||e[52]!==c||e[53]!==a||e[54]!==U||e[55]!==$?(E={connectionId:Y,connection:U,toolCaller:$,org:c,session:a},e[51]=C,e[52]=c,e[53]=a,e[54]=U,e[55]=$,e[56]=E):E=e[56];const A=E;let L;e[57]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[57]=L):L=e[57];let M;return e[58]!==A?(M=s.jsx(F,{value:A,children:L}),e[58]=A,e[59]=M):M=e[59],M}function xe(i){return i.structuredContent??i}export{_e as P};
@@ -1 +1 @@
1
- import{r as i,b9 as $,j as c,cs as z,ba as L,bn as O,a5 as _,a6 as g,ct as b,bc as w,cu as G,cv as j,cw as H,cx as K,a8 as B,cy as U,cz as V,cA as W,cB as Z,cC as q,cD as J,e as R,c as Q}from"./index-DCp7HEPF.js";var C="Popover",[E]=B(C,[j]),P=j(),[X,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=E(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{fe as P,ve as a,ge as b};
1
+ import{r as i,b9 as $,j as c,cs as z,ba as L,bn as O,a5 as _,a6 as g,ct as b,bc as w,cu as G,cv as j,cw as H,cx as K,a8 as B,cy as U,cz as V,cA as W,cB as Z,cC as q,cD as J,e as R,c as Q}from"./index-UC1l_H0T.js";var C="Popover",[E]=B(C,[j]),P=j(),[X,d]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[u,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(z,{...p,children:c.jsx(X,{scope:e,contentId:L(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var y="PopoverTrigger",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(y,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});S.displayName=y;var A="PopoverPortal",[ee,oe]=E(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=d(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=d(v,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=U("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,u=p.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=d(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...x}=t,f=d(v,o),m=P(o);return V(),c.jsx(W,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(Z,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(q,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=d(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let u;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(u=c.jsx(le,{children:c.jsx(ue,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=u):u=e[11],u}export{fe as P,ve as a,ge as b};
@@ -1 +1 @@
1
- import{e as k,j as o,b as F,r as T,F as B,C as G,U as $,t as b,o as _}from"./index-DCp7HEPF.js";import{P as E}from"./index-D7gjc6EA.js";import{A as q}from"./avatar-3vqxDD1E.js";import{S as z}from"./switch-aCgbPhbN.js";import{S as H,a as Y,d as D,c as K}from"./select-DB5O0_48.js";import{T as M,a as L}from"./toggle-group-dzbobbSH.js";import{I as O}from"./input-CoK19GuW.js";import{i as J}from"./Monitor01-D1gAe0to.js";import{n as Q,a as W}from"./Sun-DvNoBaRg.js";import{i as X}from"./Play-DDY4sH4l.js";import{u as Z}from"./use-debounced-autosave-6uXdvcir.js";import{p as ee,q as te}from"./question-004-sINsf4GQ.js";import"./index-DcSwUOCL.js";import{c as oe,S as R,a as V,b as j}from"./settings-section-C8jEfvhM.js";import"./sidebar-D5BcYVrs.js";import"./sheet-BWD0UYNA.js";import"./X-C2UB3gqF.js";import"./tooltip-DbEod1mn.js";import"./User01-Z8vjMM2Q.js";import"./Check-Cgs_Ieiz.js";import"./ChevronDown-BEPxXMEW.js";import"./ChevronUp-CGb1Z9d-.js";import"./card-BWW6R_6X.js";import"./ArrowUpRight-Zf8tvfpV.js";function ie(e){const t=k.c(13),{value:i,name:c,isUpdating:s,onUpload:l}=e,n=T.useRef(null);let f;t[0]!==l?(f=S=>{const g=S.target.files?.[0];if(!g)return;if(g.size>2097152){_.error("Image must be smaller than 2MB");return}const x=new FileReader;x.onerror=se,x.onloadend=()=>{x.result&&l(x.result),n.current&&(n.current.value="")},x.readAsDataURL(g)},t[0]=l,t[1]=f):f=t[1];const m=f;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>n.current?.click(),t[2]=u):u=t[2];let r;t[3]!==m||t[4]!==s?(r=o.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:m,className:"hidden",disabled:s}),t[3]=m,t[4]=s,t[5]=r):r=t[5];const a=c??"U";let d;t[6]!==a||t[7]!==i?(d=o.jsx(q,{url:i,fallback:a,shape:"circle",size:"base"}),t[6]=a,t[7]=i,t[8]=d):d=t[8];let h;return t[9]!==s||t[10]!==r||t[11]!==d?(h=o.jsxs("button",{type:"button",onClick:u,disabled:s,className:"rounded-full overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload profile picture",children:[r,d]}),t[9]=s,t[10]=r,t[11]=d,t[12]=h):h=t[12],h}function se(){return _.error("Failed to read image")}function ne(){const{data:e,isPending:t}=F.useSession(),i=e?.user,c=i?.image,[s,l]=T.useState(!1),n=B({values:{name:i?.name??""}}),{schedule:f,flush:m}=Z({save:async()=>{const r=n.control._formState.dirtyFields;if(Object.keys(r).length===0)return;const a=n.getValues(),d=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await F.updateUser({name:a.name}),b("profile_updated",{fields:["name"]}),_.success("Profile updated successfully")}catch{n.reset(d,{keepValues:!0}),_.error("Failed to update profile")}}}),u=async r=>{l(!0);try{await F.updateUser({image:r}),b("profile_updated",{fields:["image"]}),_.success("Profile picture updated")}catch{_.error("Failed to update profile picture")}finally{l(!1)}};return t?null:o.jsx(R,{children:o.jsxs(V,{children:[o.jsx(j,{title:"Avatar",description:"Click to upload a new picture",action:o.jsx(ie,{value:c,name:i?.name,isUpdating:s,onUpload:u})}),o.jsx(j,{title:"Display name",action:o.jsx(G,{control:n.control,name:"name",render:({field:r})=>o.jsx(O,{id:"display-name",...r,onChange:a=>{r.onChange(a),f()},onBlur:()=>{r.onBlur(),m()},onKeyDown:a=>{a.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})})}),o.jsx(j,{title:"Email",action:o.jsx("span",{className:"text-sm text-muted-foreground",children:i?.email})})]})})}function re(){const e=k.c(48),[t,i]=$();let c;e[0]!==i?(c=async p=>{if(p&&await Notification.requestPermission()!=="granted"){b("preferences_notifications_permission_denied"),_.error("Notifications denied. Please enable them in your browser settings."),i(de);return}b("preferences_notifications_toggled",{enabled:p}),i(v=>({...v,enableNotifications:p}))},e[0]=i,e[1]=c):c=e[1];const s=c;let l;e[2]!==i?(l=p=>{p&&(b("preferences_theme_changed",{to_value:p}),i(v=>({...v,theme:p})))},e[2]=i,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(L,{value:"light","aria-label":"Light theme",children:o.jsx(Q,{size:14})}),e[4]=n):n=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(L,{value:"dark","aria-label":"Dark theme",children:o.jsx(W,{size:14})}),e[5]=f):f=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(L,{value:"system","aria-label":"System theme",children:o.jsx(J,{size:14})}),e[6]=m):m=e[6];let u;e[7]!==t.theme||e[8]!==l?(u=o.jsx(j,{title:"Theme",description:"Your preferred color scheme.",action:o.jsxs(M,{type:"single",size:"sm",variant:"outline",value:t.theme,onValueChange:l,children:[n,f,m]})}),e[7]=t.theme,e[8]=l,e[9]=u):u=e[9];let r;e[10]!==s||e[11]!==t.enableNotifications?(r=typeof Notification<"u"?()=>s(!t.enableNotifications):void 0,e[10]=s,e[11]=t.enableNotifications,e[12]=r):r=e[12];let a;e[13]!==s||e[14]!==t.enableNotifications?(a=o.jsx(z,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:s}),e[13]=s,e[14]=t.enableNotifications,e[15]=a):a=e[15];let d;e[16]!==r||e[17]!==a?(d=o.jsx(j,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:r,action:a}),e[16]=r,e[17]=a,e[18]=d):d=e[18];let h;e[19]!==t.enableSounds||e[20]!==i?(h=()=>{b("preferences_sounds_toggled",{enabled:!t.enableSounds}),i(ce)},e[19]=t.enableSounds,e[20]=i,e[21]=h):h=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:le,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:o.jsx(X,{size:11})}),e[22]=S):S=e[22];let g;e[23]!==i?(g=p=>{b("preferences_sounds_toggled",{enabled:p}),i(v=>({...v,enableSounds:p}))},e[23]=i,e[24]=g):g=e[24];let x;e[25]!==t.enableSounds||e[26]!==g?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[S,o.jsx(z,{checked:t.enableSounds,onCheckedChange:g})]}),e[25]=t.enableSounds,e[26]=g,e[27]=x):x=e[27];let y;e[28]!==x||e[29]!==h?(y=o.jsx(j,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:h,action:x}),e[28]=x,e[29]=h,e[30]=y):y=e[30];let N;e[31]!==i?(N=p=>{b("preferences_tool_approval_changed",{to_value:p}),i(v=>({...v,toolApprovalLevel:p}))},e[31]=i,e[32]=N):N=e[32];let C;e[33]!==t.toolApprovalLevel?(C={readonly:"Ask before edit",auto:"Auto approve"}[t.toolApprovalLevel]??"Ask before edit",e[33]=t.toolApprovalLevel,e[34]=C):C=e[34];let A;e[35]!==C?(A=o.jsx(Y,{className:"w-36 h-7 text-xs",children:o.jsx("span",{children:C})}),e[35]=C,e[36]=A):A=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(D,{value:"readonly",textValue:"Ask before edit",children:o.jsxs("div",{className:"flex flex-col gap-0.5",children:[o.jsx("span",{className:"font-medium",children:"Ask before edit"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=w):w=e[37];let U;e[38]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsxs(K,{children:[w,o.jsx(D,{value:"auto",textValue:"Auto approve",children:o.jsxs("div",{className:"flex flex-col gap-0.5",children:[o.jsx("span",{className:"font-medium",children:"Auto approve"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=U):U=e[38];let P;e[39]!==t.toolApprovalLevel||e[40]!==N||e[41]!==A?(P=o.jsx(j,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:o.jsxs(H,{value:t.toolApprovalLevel,onValueChange:N,children:[A,U]})}),e[39]=t.toolApprovalLevel,e[40]=N,e[41]=A,e[42]=P):P=e[42];let I;return e[43]!==y||e[44]!==P||e[45]!==u||e[46]!==d?(I=o.jsx(R,{title:"Preferences",children:o.jsxs(V,{children:[u,d,y,P]})}),e[43]=y,e[44]=P,e[45]=u,e[46]=d,e[47]=I):I=e[47],I}function le(){b("preferences_sounds_previewed"),ee(te.dataUri).catch(ae)}function ae(){}function ce(e){return{...e,enableSounds:!e.enableSounds}}function de(e){return{...e,enableNotifications:!1}}function fe(){const e=k.c(11),[t,i]=$();let c;e[0]!==t.experimental_vibecode||e[1]!==i?(c=()=>{b("preferences_experimental_vibecode_toggled",{enabled:!t.experimental_vibecode}),i(me)},e[0]=t.experimental_vibecode,e[1]=i,e[2]=c):c=e[2];let s;e[3]!==i?(s=f=>{b("preferences_experimental_vibecode_toggled",{enabled:f}),i(m=>({...m,experimental_vibecode:f}))},e[3]=i,e[4]=s):s=e[4];let l;e[5]!==t.experimental_vibecode||e[6]!==s?(l=o.jsx(z,{checked:t.experimental_vibecode,onCheckedChange:s}),e[5]=t.experimental_vibecode,e[6]=s,e[7]=l):l=e[7];let n;return e[8]!==c||e[9]!==l?(n=o.jsx(R,{title:"Experimental",children:o.jsx(V,{children:o.jsx(j,{title:"Import from GitHub",description:"Enable importing agents from GitHub repositories.",onClick:c,action:l})})}),e[8]=c,e[9]=l,e[10]=n):n=e[10],n}function me(e){return{...e,experimental_vibecode:!e.experimental_vibecode}}function ue(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(E,{children:o.jsx(E.Content,{children:o.jsx(E.Body,{children:o.jsxs(oe,{children:[o.jsx(E.Title,{children:"Profile & Preferences"}),o.jsx(ne,{}),o.jsx(re,{}),o.jsx(fe,{})]})})})}),e[0]=t):t=e[0],t}function De(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(ue,{}),e[0]=t):t=e[0],t}export{De as default};
1
+ import{e as k,j as o,b as F,r as T,F as B,C as G,U as $,t as b,o as _}from"./index-UC1l_H0T.js";import{P as E}from"./index-xKyKnuDm.js";import{A as q}from"./avatar-CIl9WOil.js";import{S as z}from"./switch-BoSXcbci.js";import{S as H,a as Y,d as D,c as K}from"./select-C79R2QFd.js";import{T as M,a as L}from"./toggle-group-DhYShFZn.js";import{I as O}from"./input-DsrZ-ooH.js";import{i as J}from"./Monitor01-DpahDMVO.js";import{n as Q,a as W}from"./Sun-DsPGStQy.js";import{i as X}from"./Play-C_TiwHSZ.js";import{u as Z}from"./use-debounced-autosave-DPs4sPcH.js";import{p as ee,q as te}from"./question-004-sINsf4GQ.js";import"./index-bhqxeP1Q.js";import{c as oe,S as R,a as V,b as j}from"./settings-section-CnVikxon.js";import"./sidebar-Bf-Wr1hs.js";import"./sheet-hxQW4lrM.js";import"./X-ztVwMZpQ.js";import"./tooltip-D99J2opT.js";import"./User01-SXBYgWls.js";import"./Check-B-Snf346.js";import"./ChevronDown-BvZFsep5.js";import"./ChevronUp-CLQmelYz.js";import"./card-BIluY4Aq.js";import"./ArrowUpRight-CrasW2I3.js";function ie(e){const t=k.c(13),{value:i,name:c,isUpdating:s,onUpload:l}=e,n=T.useRef(null);let f;t[0]!==l?(f=S=>{const g=S.target.files?.[0];if(!g)return;if(g.size>2097152){_.error("Image must be smaller than 2MB");return}const x=new FileReader;x.onerror=se,x.onloadend=()=>{x.result&&l(x.result),n.current&&(n.current.value="")},x.readAsDataURL(g)},t[0]=l,t[1]=f):f=t[1];const m=f;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>n.current?.click(),t[2]=u):u=t[2];let r;t[3]!==m||t[4]!==s?(r=o.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:m,className:"hidden",disabled:s}),t[3]=m,t[4]=s,t[5]=r):r=t[5];const a=c??"U";let d;t[6]!==a||t[7]!==i?(d=o.jsx(q,{url:i,fallback:a,shape:"circle",size:"base"}),t[6]=a,t[7]=i,t[8]=d):d=t[8];let h;return t[9]!==s||t[10]!==r||t[11]!==d?(h=o.jsxs("button",{type:"button",onClick:u,disabled:s,className:"rounded-full overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload profile picture",children:[r,d]}),t[9]=s,t[10]=r,t[11]=d,t[12]=h):h=t[12],h}function se(){return _.error("Failed to read image")}function ne(){const{data:e,isPending:t}=F.useSession(),i=e?.user,c=i?.image,[s,l]=T.useState(!1),n=B({values:{name:i?.name??""}}),{schedule:f,flush:m}=Z({save:async()=>{const r=n.control._formState.dirtyFields;if(Object.keys(r).length===0)return;const a=n.getValues(),d=n.control._defaultValues;n.reset(a,{keepValues:!0});try{await F.updateUser({name:a.name}),b("profile_updated",{fields:["name"]}),_.success("Profile updated successfully")}catch{n.reset(d,{keepValues:!0}),_.error("Failed to update profile")}}}),u=async r=>{l(!0);try{await F.updateUser({image:r}),b("profile_updated",{fields:["image"]}),_.success("Profile picture updated")}catch{_.error("Failed to update profile picture")}finally{l(!1)}};return t?null:o.jsx(R,{children:o.jsxs(V,{children:[o.jsx(j,{title:"Avatar",description:"Click to upload a new picture",action:o.jsx(ie,{value:c,name:i?.name,isUpdating:s,onUpload:u})}),o.jsx(j,{title:"Display name",action:o.jsx(G,{control:n.control,name:"name",render:({field:r})=>o.jsx(O,{id:"display-name",...r,onChange:a=>{r.onChange(a),f()},onBlur:()=>{r.onBlur(),m()},onKeyDown:a=>{a.key==="Enter"&&m()},placeholder:"Your name",className:"w-[280px]"})})}),o.jsx(j,{title:"Email",action:o.jsx("span",{className:"text-sm text-muted-foreground",children:i?.email})})]})})}function re(){const e=k.c(48),[t,i]=$();let c;e[0]!==i?(c=async p=>{if(p&&await Notification.requestPermission()!=="granted"){b("preferences_notifications_permission_denied"),_.error("Notifications denied. Please enable them in your browser settings."),i(de);return}b("preferences_notifications_toggled",{enabled:p}),i(v=>({...v,enableNotifications:p}))},e[0]=i,e[1]=c):c=e[1];const s=c;let l;e[2]!==i?(l=p=>{p&&(b("preferences_theme_changed",{to_value:p}),i(v=>({...v,theme:p})))},e[2]=i,e[3]=l):l=e[3];let n;e[4]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(L,{value:"light","aria-label":"Light theme",children:o.jsx(Q,{size:14})}),e[4]=n):n=e[4];let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=o.jsx(L,{value:"dark","aria-label":"Dark theme",children:o.jsx(W,{size:14})}),e[5]=f):f=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(L,{value:"system","aria-label":"System theme",children:o.jsx(J,{size:14})}),e[6]=m):m=e[6];let u;e[7]!==t.theme||e[8]!==l?(u=o.jsx(j,{title:"Theme",description:"Your preferred color scheme.",action:o.jsxs(M,{type:"single",size:"sm",variant:"outline",value:t.theme,onValueChange:l,children:[n,f,m]})}),e[7]=t.theme,e[8]=l,e[9]=u):u=e[9];let r;e[10]!==s||e[11]!==t.enableNotifications?(r=typeof Notification<"u"?()=>s(!t.enableNotifications):void 0,e[10]=s,e[11]=t.enableNotifications,e[12]=r):r=e[12];let a;e[13]!==s||e[14]!==t.enableNotifications?(a=o.jsx(z,{disabled:typeof Notification>"u",checked:t.enableNotifications,onCheckedChange:s}),e[13]=s,e[14]=t.enableNotifications,e[15]=a):a=e[15];let d;e[16]!==r||e[17]!==a?(d=o.jsx(j,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:r,action:a}),e[16]=r,e[17]=a,e[18]=d):d=e[18];let h;e[19]!==t.enableSounds||e[20]!==i?(h=()=>{b("preferences_sounds_toggled",{enabled:!t.enableSounds}),i(ce)},e[19]=t.enableSounds,e[20]=i,e[21]=h):h=e[21];let S;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=o.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:le,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:o.jsx(X,{size:11})}),e[22]=S):S=e[22];let g;e[23]!==i?(g=p=>{b("preferences_sounds_toggled",{enabled:p}),i(v=>({...v,enableSounds:p}))},e[23]=i,e[24]=g):g=e[24];let x;e[25]!==t.enableSounds||e[26]!==g?(x=o.jsxs("div",{className:"flex items-center gap-2",children:[S,o.jsx(z,{checked:t.enableSounds,onCheckedChange:g})]}),e[25]=t.enableSounds,e[26]=g,e[27]=x):x=e[27];let y;e[28]!==x||e[29]!==h?(y=o.jsx(j,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:h,action:x}),e[28]=x,e[29]=h,e[30]=y):y=e[30];let N;e[31]!==i?(N=p=>{b("preferences_tool_approval_changed",{to_value:p}),i(v=>({...v,toolApprovalLevel:p}))},e[31]=i,e[32]=N):N=e[32];let C;e[33]!==t.toolApprovalLevel?(C={readonly:"Ask before edit",auto:"Auto approve"}[t.toolApprovalLevel]??"Ask before edit",e[33]=t.toolApprovalLevel,e[34]=C):C=e[34];let A;e[35]!==C?(A=o.jsx(Y,{className:"w-36 h-7 text-xs",children:o.jsx("span",{children:C})}),e[35]=C,e[36]=A):A=e[36];let w;e[37]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(D,{value:"readonly",textValue:"Ask before edit",children:o.jsxs("div",{className:"flex flex-col gap-0.5",children:[o.jsx("span",{className:"font-medium",children:"Ask before edit"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=w):w=e[37];let U;e[38]===Symbol.for("react.memo_cache_sentinel")?(U=o.jsxs(K,{children:[w,o.jsx(D,{value:"auto",textValue:"Auto approve",children:o.jsxs("div",{className:"flex flex-col gap-0.5",children:[o.jsx("span",{className:"font-medium",children:"Auto approve"}),o.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=U):U=e[38];let P;e[39]!==t.toolApprovalLevel||e[40]!==N||e[41]!==A?(P=o.jsx(j,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:o.jsxs(H,{value:t.toolApprovalLevel,onValueChange:N,children:[A,U]})}),e[39]=t.toolApprovalLevel,e[40]=N,e[41]=A,e[42]=P):P=e[42];let I;return e[43]!==y||e[44]!==P||e[45]!==u||e[46]!==d?(I=o.jsx(R,{title:"Preferences",children:o.jsxs(V,{children:[u,d,y,P]})}),e[43]=y,e[44]=P,e[45]=u,e[46]=d,e[47]=I):I=e[47],I}function le(){b("preferences_sounds_previewed"),ee(te.dataUri).catch(ae)}function ae(){}function ce(e){return{...e,enableSounds:!e.enableSounds}}function de(e){return{...e,enableNotifications:!1}}function fe(){const e=k.c(11),[t,i]=$();let c;e[0]!==t.experimental_vibecode||e[1]!==i?(c=()=>{b("preferences_experimental_vibecode_toggled",{enabled:!t.experimental_vibecode}),i(me)},e[0]=t.experimental_vibecode,e[1]=i,e[2]=c):c=e[2];let s;e[3]!==i?(s=f=>{b("preferences_experimental_vibecode_toggled",{enabled:f}),i(m=>({...m,experimental_vibecode:f}))},e[3]=i,e[4]=s):s=e[4];let l;e[5]!==t.experimental_vibecode||e[6]!==s?(l=o.jsx(z,{checked:t.experimental_vibecode,onCheckedChange:s}),e[5]=t.experimental_vibecode,e[6]=s,e[7]=l):l=e[7];let n;return e[8]!==c||e[9]!==l?(n=o.jsx(R,{title:"Experimental",children:o.jsx(V,{children:o.jsx(j,{title:"Import from GitHub",description:"Enable importing agents from GitHub repositories.",onClick:c,action:l})})}),e[8]=c,e[9]=l,e[10]=n):n=e[10],n}function me(e){return{...e,experimental_vibecode:!e.experimental_vibecode}}function ue(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(E,{children:o.jsx(E.Content,{children:o.jsx(E.Body,{children:o.jsxs(oe,{children:[o.jsx(E.Title,{children:"Profile & Preferences"}),o.jsx(ne,{}),o.jsx(re,{}),o.jsx(fe,{})]})})})}),e[0]=t):t=e[0],t}function De(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(ue,{}),e[0]=t):t=e[0],t}export{De as default};
@@ -1 +1 @@
1
- import{e as H,q as $,j}from"./index-DCp7HEPF.js";import{b as q,g as O,s as D}from"./pair-QI485pVY.js";import{u as v}from"./constants-BWDiAmgI.js";import{a as L,c as B}from"./use-mcp-tools-C_WdZ5mk.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as k,M as G,b as E}from"./types-DcSrmxgv.js";import{u as V,b as z}from"./chat-context-DBBmTPXK.js";import{u as F}from"./shell-layout-DQhzT6wR.js";import"./agent-icon-BdiD0RLx.js";import"./AlertCircle-C_7Pr4dy.js";import"./Tool01-CfGF28aS.js";import"./SwitchHorizontal01-BmYbPnsz.js";import"./RefreshCcw01-VWfVcJ_k.js";import"./XCircle-Dl1nnD8d.js";import"./ArrowUpRight-Zf8tvfpV.js";import"./ZapSquare-kGYRH_Lu.js";import"./Users03-CZw3VUm8.js";import"./CheckCircle-Ws5jIF72.js";import"./Check-Cgs_Ieiz.js";import"./ChevronDown-BEPxXMEW.js";import"./ChevronRight-B3uEK8Up.js";import"./ChevronUp-CGb1Z9d-.js";import"./DotsVertical-CnrlerAd.js";import"./Container-Ba4KEZmY.js";import"./FilterLines-CiCglWXp.js";import"./Star01-882PVAAF.js";import"./Palette-c8ZIWUhe.js";import"./HardDrive-BErHWn5D.js";import"./Stars02-DLq0ELXY.js";import"./Key01-BhdD2jeG.js";import"./sheet-BWD0UYNA.js";import"./X-C2UB3gqF.js";import"./LinkExternal01-BMPLHN-8.js";import"./Lock01-Bdorlsjo.js";import"./Monitor01-D1gAe0to.js";import"./Sun-DvNoBaRg.js";import"./Play-DDY4sH4l.js";import"./Plus-DAjWQbOS.js";import"./SearchMd-BBiHSx-2.js";import"./Settings02-uck5BGEM.js";import"./Shield01-CG_dTxg9.js";import"./Trash01-D0VodJcn.js";import"./Upload01-CtxMN-V1.js";import"./User01-Z8vjMM2Q.js";import"./Users01-DaLasEg_.js";import"./XClose-CVuJ-jWb.js";import"./Zap-CNd3spCf.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-DHFZrobk.js";import"./select-DB5O0_48.js";import"./tooltip-DbEod1mn.js";import"./use-copy-CoQfk21l.js";import"./dialog-BXAoEbia.js";import"./tab-id-DRhzsO2q.js";import"./decopilot-sse-pool-DJoZ3XrI.js";import"./create-sse-subscription--G7iwTWC.js";import"./integration-icon-DM6HURzh.js";import"./use-virtual-mcp-BQRVNAq-.js";import"./use-collections-CdbQrbKk.js";import"./use-navigate-to-agent-ByC4bR_a.js";import"./use-connection-CDL88IlU.js";import"./use-mcp-prompts-BFGdNKhE.js";import"./form-T5LuiwS8.js";import"./label-PYEKUwvw.js";import"./input-CoK19GuW.js";import"./spinner-DvoeSjuB.js";import"./use-ai-providers-Bt6fBHoi.js";import"./use-organization-settings-BrhMCOo5.js";import"./avatar-3vqxDD1E.js";import"./required-auth-layout-DbThbvdw.js";import"./useRouterState-CAwLzT0Y.js";import"./use-org-sso-C5LBVu7K.js";const J={};function K(S){const t=H.c(37),{client:r,resourceURI:g,tool:e,connectionId:m,orgId:a,args:c}=S,{sendMessage:u}=V(),{setAppContext:d,clearAppContext:o}=z(),{setChatOpen:f,openTab:s}=F(),n=`${m}:${e.name}`;let l;t[0]!==s?(l=h=>h==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=l):l=t[1];const i=l,p=c??J;let T;t[2]!==r||t[3]!==e.name||t[4]!==p?(T={client:r,toolName:e.name,toolArguments:p},t[2]=r,t[3]=e.name,t[4]=p,t[5]=T):T=t[5];const{data:x}=B(T);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=O(e._meta);R=D(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let I;t[9]!==e.inputSchema?(I=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=I):I=t[10];let N;t[11]!==U||t[12]!==I||t[13]!==e?(N={...e,name:U,inputSchema:I},t[11]=U,t[12]=I,t[13]=e,t[14]=N):N=t[14];const b=N;let _;t[15]!==u||t[16]!==f?(_=h=>{const w=Y(h.content);w.content.length>0&&(f(!0),u({tiptapDoc:w}))},t[15]=u,t[16]=f,t[17]=_):_=t[17];const y=_;let C;t[18]!==b?(C={tool:b},t[18]=b,t[19]=C):C=t[19];let M;t[20]!==d||t[21]!==n?(M=h=>d(n,h),t[20]=d,t[21]=n,t[22]=M):M=t[22];let P;t[23]!==o||t[24]!==n?(P=()=>o(n),t[23]=o,t[24]=n,t[25]=P):P=t[25];let A;return t[26]!==r||t[27]!==y||t[28]!==i||t[29]!==a||t[30]!==g||t[31]!==C||t[32]!==M||t[33]!==P||t[34]!==p||t[35]!==x?(A=j.jsx(G,{resourceURI:g,orgId:a,toolInfo:C,toolInput:p,toolResult:x,displayMode:"fullscreen",minHeight:E.fullscreen.minHeight,maxHeight:E.fullscreen.maxHeight,client:r,onMessage:y,onUpdateModelContext:M,onTeardown:P,onRequestDisplayMode:i,className:"h-full"}),t[26]=r,t[27]=y,t[28]=i,t[29]=a,t[30]=g,t[31]=C,t[32]=M,t[33]=P,t[34]=p,t[35]=x,t[36]=A):A=t[36],A}function ge(S){const t=H.c(20),{connectionId:r,toolName:g,args:e}=S,{org:m}=$();let a;t[0]!==r||t[1]!==m.id||t[2]!==m.slug?(a={connectionId:r,orgId:m.id,orgSlug:m.slug},t[0]=r,t[1]=m.id,t[2]=m.slug,t[3]=a):a=t[3];const c=v(a);let u;t[4]!==c?(u={client:c},t[4]=c,t[5]=u):u=t[5];const{data:d}=L(u);let o,f,s;t[6]!==g||t[7]!==d.tools?(o=q(decodeURIComponent(g)),s=d.tools.find(i=>i.name===o)??d.tools.find(i=>{const p=O(i._meta);if(!p)return!1;if(D(i.name,p)===o)return!0;const x=D(o,p);return x!==o&&i.name===x}),f=s?._meta?k(s._meta):void 0,t[6]=g,t[7]=d.tools,t[8]=o,t[9]=f,t[10]=s):(o=t[8],f=t[9],s=t[10]);const n=f;if(!s||!n){let i;return t[11]!==o?(i=j.jsx("div",{className:"flex items-center justify-center h-full w-full",children:j.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',o,'" not found or has no UI']})}),t[11]=o,t[12]=i):i=t[12],i}let l;return t[13]!==e||t[14]!==c||t[15]!==r||t[16]!==m.id||t[17]!==n||t[18]!==s?(l=j.jsx(K,{client:c,resourceURI:n,tool:s,connectionId:r,orgId:m.id,args:e}),t[13]=e,t[14]=c,t[15]=r,t[16]=m.id,t[17]=n,t[18]=s,t[19]=l):l=t[19],l}export{ge as AppViewContent};
1
+ import{e as H,q as $,j}from"./index-UC1l_H0T.js";import{b as q,g as O,s as D}from"./pair-DuifxCP-.js";import{u as v}from"./constants-Cs7fB5Fz.js";import{a as L,c as B}from"./use-mcp-tools-DNGR_0Mv.js";import{c as Y}from"./content-blocks-o63cs2vh.js";import{g as k,M as G,b as E}from"./types-CV-R3YJI.js";import{u as V,b as z}from"./chat-context-B-JG5oa1.js";import{u as F}from"./shell-layout-cAhx7nwo.js";import"./agent-icon-CY89NnPl.js";import"./AlertCircle-D833Ltv-.js";import"./Tool01-Me7z4aVw.js";import"./SwitchHorizontal01-Vb6nTk77.js";import"./RefreshCcw01-C_M5ucZA.js";import"./XCircle-CWhlQPxr.js";import"./ArrowUpRight-CrasW2I3.js";import"./ZapSquare-CMBh1a8Y.js";import"./Users03-Cr2QcycS.js";import"./CheckCircle-Da1q2cG-.js";import"./Check-B-Snf346.js";import"./ChevronDown-BvZFsep5.js";import"./ChevronRight-CNXVJ2DZ.js";import"./ChevronUp-CLQmelYz.js";import"./DotsVertical-BF7lQrGo.js";import"./Container-Cs9tbOj1.js";import"./FilterLines-DMWymvCD.js";import"./Star01-B3pqpeOo.js";import"./Palette-DsjYkIAm.js";import"./HardDrive-CYl4X54q.js";import"./Stars02-B-2qVnjt.js";import"./Key01-DrmRQ9bQ.js";import"./sheet-hxQW4lrM.js";import"./X-ztVwMZpQ.js";import"./LinkExternal01-BwOlCt0z.js";import"./Lock01-FBg4tUR8.js";import"./Monitor01-DpahDMVO.js";import"./Sun-DsPGStQy.js";import"./Play-C_TiwHSZ.js";import"./Plus-pn49dx0X.js";import"./SearchMd-ItgHq67b.js";import"./Settings02-BnWl2AAW.js";import"./Shield01-D1FxKad8.js";import"./Trash01-9HT5dT2T.js";import"./Upload01-CWsYex6m.js";import"./User01-SXBYgWls.js";import"./Users01-BprBjMXf.js";import"./XClose-BW7B2d42.js";import"./Zap-4DwoO8-E.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./scroll-area-kdWO_XIf.js";import"./select-C79R2QFd.js";import"./tooltip-D99J2opT.js";import"./use-copy-DjD9mpB1.js";import"./dialog-0ciXFW-Z.js";import"./tab-id-sG-YwvQY.js";import"./decopilot-sse-pool-D4kwiVhA.js";import"./create-sse-subscription--G7iwTWC.js";import"./integration-icon-CFCAsXBi.js";import"./use-virtual-mcp-D0WYBO2Q.js";import"./use-collections-BTet4gbf.js";import"./use-navigate-to-agent-mMKG1Kz-.js";import"./use-connection-DBaDqCrX.js";import"./use-mcp-prompts-C30Pwn4d.js";import"./form-D3vgRHP1.js";import"./label-C52V0YQz.js";import"./input-DsrZ-ooH.js";import"./spinner-BwiMhd03.js";import"./use-ai-providers-YYcsx8QH.js";import"./use-organization-settings-zgxousJq.js";import"./avatar-CIl9WOil.js";import"./required-auth-layout-ByChgpTu.js";import"./useRouterState-BW1upcty.js";import"./use-org-sso-6mIiyURD.js";const J={};function K(S){const t=H.c(37),{client:r,resourceURI:g,tool:e,connectionId:m,orgId:a,args:c}=S,{sendMessage:u}=V(),{setAppContext:d,clearAppContext:o}=z(),{setChatOpen:f,openTab:s}=F(),n=`${m}:${e.name}`;let l;t[0]!==s?(l=h=>h==="inline"?(s("0"),"inline"):"fullscreen",t[0]=s,t[1]=l):l=t[1];const i=l,p=c??J;let T;t[2]!==r||t[3]!==e.name||t[4]!==p?(T={client:r,toolName:e.name,toolArguments:p},t[2]=r,t[3]=e.name,t[4]=p,t[5]=T):T=t[5];const{data:x}=B(T);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=O(e._meta);R=D(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const U=R;let I;t[9]!==e.inputSchema?(I=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=I):I=t[10];let N;t[11]!==U||t[12]!==I||t[13]!==e?(N={...e,name:U,inputSchema:I},t[11]=U,t[12]=I,t[13]=e,t[14]=N):N=t[14];const b=N;let _;t[15]!==u||t[16]!==f?(_=h=>{const w=Y(h.content);w.content.length>0&&(f(!0),u({tiptapDoc:w}))},t[15]=u,t[16]=f,t[17]=_):_=t[17];const y=_;let C;t[18]!==b?(C={tool:b},t[18]=b,t[19]=C):C=t[19];let M;t[20]!==d||t[21]!==n?(M=h=>d(n,h),t[20]=d,t[21]=n,t[22]=M):M=t[22];let P;t[23]!==o||t[24]!==n?(P=()=>o(n),t[23]=o,t[24]=n,t[25]=P):P=t[25];let A;return t[26]!==r||t[27]!==y||t[28]!==i||t[29]!==a||t[30]!==g||t[31]!==C||t[32]!==M||t[33]!==P||t[34]!==p||t[35]!==x?(A=j.jsx(G,{resourceURI:g,orgId:a,toolInfo:C,toolInput:p,toolResult:x,displayMode:"fullscreen",minHeight:E.fullscreen.minHeight,maxHeight:E.fullscreen.maxHeight,client:r,onMessage:y,onUpdateModelContext:M,onTeardown:P,onRequestDisplayMode:i,className:"h-full"}),t[26]=r,t[27]=y,t[28]=i,t[29]=a,t[30]=g,t[31]=C,t[32]=M,t[33]=P,t[34]=p,t[35]=x,t[36]=A):A=t[36],A}function ge(S){const t=H.c(20),{connectionId:r,toolName:g,args:e}=S,{org:m}=$();let a;t[0]!==r||t[1]!==m.id||t[2]!==m.slug?(a={connectionId:r,orgId:m.id,orgSlug:m.slug},t[0]=r,t[1]=m.id,t[2]=m.slug,t[3]=a):a=t[3];const c=v(a);let u;t[4]!==c?(u={client:c},t[4]=c,t[5]=u):u=t[5];const{data:d}=L(u);let o,f,s;t[6]!==g||t[7]!==d.tools?(o=q(decodeURIComponent(g)),s=d.tools.find(i=>i.name===o)??d.tools.find(i=>{const p=O(i._meta);if(!p)return!1;if(D(i.name,p)===o)return!0;const x=D(o,p);return x!==o&&i.name===x}),f=s?._meta?k(s._meta):void 0,t[6]=g,t[7]=d.tools,t[8]=o,t[9]=f,t[10]=s):(o=t[8],f=t[9],s=t[10]);const n=f;if(!s||!n){let i;return t[11]!==o?(i=j.jsx("div",{className:"flex items-center justify-center h-full w-full",children:j.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',o,'" not found or has no UI']})}),t[11]=o,t[12]=i):i=t[12],i}let l;return t[13]!==e||t[14]!==c||t[15]!==r||t[16]!==m.id||t[17]!==n||t[18]!==s?(l=j.jsx(K,{client:c,resourceURI:n,tool:s,connectionId:r,orgId:m.id,args:e}),t[13]=e,t[14]=c,t[15]=r,t[16]=m.id,t[17]=n,t[18]=s,t[19]=l):l=t[19],l}export{ge as AppViewContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-BHvN84rj.js","assets/index-UC1l_H0T.js","assets/index-DscYvBUa.css","assets/XCircle-CWhlQPxr.js","assets/CheckCircle-Da1q2cG-.js","assets/Container-Cs9tbOj1.js","assets/Settings02-BnWl2AAW.js","assets/constants-Cs7fB5Fz.js","assets/useInfiniteQuery-EQnbj896.js","assets/infiniteQueryObserver-CCz1lrGk.js","assets/badge-BsmgKXBP.js","assets/input-DsrZ-ooH.js","assets/dropdown-menu-C-OdW-YG.js","assets/Check-B-Snf346.js","assets/ChevronRight-CNXVJ2DZ.js","assets/DotsVertical-BF7lQrGo.js","assets/table-D5j7pewX.js","assets/toggle-group-DhYShFZn.js","assets/use-view-mode-dJJYweFh.js","assets/tooltip-D99J2opT.js","assets/FilterLines-DMWymvCD.js","assets/SearchMd-ItgHq67b.js","assets/dialog-0ciXFW-Z.js","assets/X-ztVwMZpQ.js","assets/AlertCircle-D833Ltv-.js","assets/Upload01-CWsYex6m.js","assets/alert-dialog-Dv2nOtyH.js","assets/card-BIluY4Aq.js","assets/Trash01-9HT5dT2T.js","assets/label-C52V0YQz.js","assets/select-C79R2QFd.js","assets/ChevronDown-BvZFsep5.js","assets/ChevronUp-CLQmelYz.js","assets/switch-BoSXcbci.js","assets/textarea-DHADmpP7.js","assets/RefreshCcw01-C_M5ucZA.js","assets/checkbox-BmubIr1M.js","assets/LinkExternal01-BwOlCt0z.js","assets/use-copy-DjD9mpB1.js","assets/Key01-DrmRQ9bQ.js","assets/Plus-pn49dx0X.js","assets/Play-C_TiwHSZ.js"])))=>i.map(i=>d[i]);
2
+ import{e as s,j as e,r as i,l as a,_ as o}from"./index-UC1l_H0T.js";import{R as m}from"./require-capability-DXveCq4o.js";import"./use-capability-s7F5ltPc.js";import"./access-gate-DI7D3beo.js";import"./Lock01-FBg4tUR8.js";import"./capability-load-error-DNEUh47e.js";const l=i.lazy(()=>o(()=>import("./registry-layout-BHvN84rj.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41])));function y(){const r=s.c(1);let t;return r[0]===Symbol.for("react.memo_cache_sentinel")?(t=e.jsx(m,{capability:"registry:manage",area:"the registry",children:e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsx(a,{size:20,className:"animate-spin text-muted-foreground"})}),children:e.jsx(l,{})})}),r[0]=t):t=r[0],t}export{y as default};
@@ -1,4 +1,4 @@
1
- import{e as Y,q as ie,n as Ie,D as ke,a as je,o as V,r as P,j as t,B as G,l as qe,c as Z,I as Fs,H as Bs}from"./index-DCp7HEPF.js";import{n as Qs,a as ds,d as Jt,c as Vs,e as us,b as Gs,i as Ks,t as Ys,g as Hs,f as Ws}from"./XCircle-Dl1nnD8d.js";import{i as Le}from"./CheckCircle-Ws5jIF72.js";import{n as Js}from"./Container-Ba4KEZmY.js";import{a as Zs}from"./Settings02-uck5BGEM.js";import{S as ce,u as oe,W as Xs}from"./constants-BWDiAmgI.js";import{u as ms}from"./useInfiniteQuery-DD7euD4X.js";import{B as L}from"./badge-BmO5u7_s.js";import{I as ae}from"./input-CoK19GuW.js";import{a as dt,c as Ce,D as ut,b as mt,h as Zt,k as Xt,d as er}from"./dropdown-menu-DQ8l1U7a.js";import{c as Mt,d as Dt,a as Fe,e as ue,b as Et,T as me}from"./table-AeAUBYNy.js";import{T as tr,a as es}from"./toggle-group-dzbobbSH.js";import{u as sr}from"./use-view-mode-a_9x4z_S.js";import{i as At}from"./DotsVertical-CnrlerAd.js";import{i as rr}from"./FilterLines-CiCglWXp.js";import{i as nr}from"./SearchMd-BBiHSx-2.js";import{c as xt,d as ht,e as pt,D as ft,a as gt,b as jt}from"./dialog-BXAoEbia.js";import{i as Ke}from"./AlertCircle-C_7Pr4dy.js";import{i as ts}from"./Upload01-CtxMN-V1.js";import{c as Ye,b as He,d as We,f as Je,g as Ze,e as Xe,a as et,A as tt}from"./alert-dialog-CG4nfj_z.js";import{C as ne}from"./card-BWW6R_6X.js";import{s as st}from"./Trash01-D0VodJcn.js";import{L as X}from"./label-PYEKUwvw.js";import{S as ir,a as lr,b as ar,c as or,d as St}from"./select-DB5O0_48.js";import{S as Oe}from"./switch-aCgbPhbN.js";import{T as vt}from"./textarea-DyS2wlP2.js";import{c as $t,d as cr,i as dr,s as xs,a as Rt,b as ur}from"./RefreshCcw01-VWfVcJ_k.js";import{i as mr}from"./X-C2UB3gqF.js";import{t as xr}from"./ChevronDown-BEPxXMEW.js";import{n as hr}from"./ChevronUp-CGb1Z9d-.js";import{C as ss}from"./checkbox-Sb6ecTlU.js";import{n as pr}from"./LinkExternal01-BMPLHN-8.js";import{u as Tt}from"./use-copy-CoQfk21l.js";import{i as It}from"./Check-Cgs_Ieiz.js";import{i as fr}from"./Key01-BhdD2jeG.js";import{s as gr}from"./Plus-DAjWQbOS.js";import{T as jr,a as vr,b as br}from"./tooltip-DbEod1mn.js";import{i as yr}from"./Play-DDY4sH4l.js";import"./infiniteQueryObserver-DMW65Y_x.js";import"./ChevronRight-B3uEK8Up.js";const $e="private-registry",Nr=`
1
+ import{e as Y,q as ie,n as Ie,D as ke,a as je,o as V,r as P,j as t,B as G,l as qe,c as Z,I as Fs,H as Bs}from"./index-UC1l_H0T.js";import{n as Qs,a as ds,d as Jt,c as Vs,e as us,b as Gs,i as Ks,t as Ys,g as Hs,f as Ws}from"./XCircle-CWhlQPxr.js";import{i as Le}from"./CheckCircle-Da1q2cG-.js";import{n as Js}from"./Container-Cs9tbOj1.js";import{a as Zs}from"./Settings02-BnWl2AAW.js";import{S as ce,u as oe,W as Xs}from"./constants-Cs7fB5Fz.js";import{u as ms}from"./useInfiniteQuery-EQnbj896.js";import{B as L}from"./badge-BsmgKXBP.js";import{I as ae}from"./input-DsrZ-ooH.js";import{a as dt,c as Ce,D as ut,b as mt,h as Zt,k as Xt,d as er}from"./dropdown-menu-C-OdW-YG.js";import{c as Mt,d as Dt,a as Fe,e as ue,b as Et,T as me}from"./table-D5j7pewX.js";import{T as tr,a as es}from"./toggle-group-DhYShFZn.js";import{u as sr}from"./use-view-mode-dJJYweFh.js";import{i as At}from"./DotsVertical-BF7lQrGo.js";import{i as rr}from"./FilterLines-DMWymvCD.js";import{i as nr}from"./SearchMd-ItgHq67b.js";import{c as xt,d as ht,e as pt,D as ft,a as gt,b as jt}from"./dialog-0ciXFW-Z.js";import{i as Ke}from"./AlertCircle-D833Ltv-.js";import{i as ts}from"./Upload01-CWsYex6m.js";import{c as Ye,b as He,d as We,f as Je,g as Ze,e as Xe,a as et,A as tt}from"./alert-dialog-Dv2nOtyH.js";import{C as ne}from"./card-BIluY4Aq.js";import{s as st}from"./Trash01-9HT5dT2T.js";import{L as X}from"./label-C52V0YQz.js";import{S as ir,a as lr,b as ar,c as or,d as St}from"./select-C79R2QFd.js";import{S as Oe}from"./switch-BoSXcbci.js";import{T as vt}from"./textarea-DHADmpP7.js";import{c as $t,d as cr,i as dr,s as xs,a as Rt,b as ur}from"./RefreshCcw01-C_M5ucZA.js";import{i as mr}from"./X-ztVwMZpQ.js";import{t as xr}from"./ChevronDown-BvZFsep5.js";import{n as hr}from"./ChevronUp-CLQmelYz.js";import{C as ss}from"./checkbox-BmubIr1M.js";import{n as pr}from"./LinkExternal01-BwOlCt0z.js";import{u as Tt}from"./use-copy-DjD9mpB1.js";import{i as It}from"./Check-B-Snf346.js";import{i as fr}from"./Key01-DrmRQ9bQ.js";import{s as gr}from"./Plus-pn49dx0X.js";import{T as jr,a as vr,b as br}from"./tooltip-D99J2opT.js";import{i as yr}from"./Play-C_TiwHSZ.js";import"./infiniteQueryObserver-CCz1lrGk.js";import"./ChevronRight-CNXVJ2DZ.js";const $e="private-registry",Nr=`
2
2
  You are an MCP tool tester running automated integration checks.
3
3
 
4
4
  Goal:
@@ -1 +1 @@
1
- import{e as p,j as m}from"./index-DCp7HEPF.js";import{a as l}from"./use-capability-DdtlKz_v.js";import{A as u}from"./access-gate-BUeG_V5u.js";function b(n){const t=p.c(6),{capability:c,area:e,children:a}=n,{granted:i,loading:o,error:s}=l(c);let r;return t[0]!==e||t[1]!==a||t[2]!==s||t[3]!==i||t[4]!==o?(r=m.jsx(u,{granted:i,loading:o,error:s,area:e,children:a}),t[0]=e,t[1]=a,t[2]=s,t[3]=i,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
1
+ import{e as p,j as m}from"./index-UC1l_H0T.js";import{a as l}from"./use-capability-s7F5ltPc.js";import{A as u}from"./access-gate-DI7D3beo.js";function b(n){const t=p.c(6),{capability:c,area:e,children:a}=n,{granted:i,loading:o,error:s}=l(c);let r;return t[0]!==e||t[1]!==a||t[2]!==s||t[3]!==i||t[4]!==o?(r=m.jsx(u,{granted:i,loading:o,error:s,area:e,children:a}),t[0]=e,t[1]=a,t[2]=s,t[3]=i,t[4]=o,t[5]=r):r=t[5],r}export{b as R};
@@ -1 +1 @@
1
- import{e as c,j as i,A as a,S as u,h as m,k as f,N as h}from"./index-DCp7HEPF.js";import{u as x}from"./useRouterState-CAwLzT0Y.js";function g(){const t=c.c(5),s=x().location.href;let n;t[0]!==s?(n=s==="/login"||s.startsWith("/login?"),t[0]=s,t[1]=n):n=t[1];const r=n;let o;if(t[2]!==s||t[3]!==r){const l=r?{}:{next:s};o=i.jsx(h,{to:"/login",search:l,replace:!0}),t[2]=s,t[3]=r,t[4]=o}else o=t[4];return o}function j(t){const e=c.c(6),{children:s}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(a,{children:i.jsx(u,{})}),e[0]=n):n=e[0];let r;e[1]!==s?(r=i.jsx(m,{children:s}),e[1]=s,e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(f,{children:i.jsx(g,{})}),e[3]=o):o=e[3];let l;return e[4]!==r?(l=i.jsxs(i.Fragment,{children:[n,r,o]}),e[4]=r,e[5]=l):l=e[5],l}export{j as R};
1
+ import{e as c,j as i,A as a,S as u,h as m,k as f,N as h}from"./index-UC1l_H0T.js";import{u as x}from"./useRouterState-BW1upcty.js";function g(){const t=c.c(5),s=x().location.href;let n;t[0]!==s?(n=s==="/login"||s.startsWith("/login?"),t[0]=s,t[1]=n):n=t[1];const r=n;let o;if(t[2]!==s||t[3]!==r){const l=r?{}:{next:s};o=i.jsx(h,{to:"/login",search:l,replace:!0}),t[2]=s,t[3]=r,t[4]=o}else o=t[4];return o}function j(t){const e=c.c(6),{children:s}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(a,{children:i.jsx(u,{})}),e[0]=n):n=e[0];let r;e[1]!==s?(r=i.jsx(m,{children:s}),e[1]=s,e[2]=r):r=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(f,{children:i.jsx(g,{})}),e[3]=o):o=e[3];let l;return e[4]!==r?(l=i.jsxs(i.Fragment,{children:[n,r,o]}),e[4]=r,e[5]=l):l=e[5],l}export{j as R};