@decocms/mesh 2.72.1 → 2.74.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 (171) hide show
  1. package/dist/client/assets/{AlertCircle-BOIQEKjW.js → AlertCircle-C_hR5usO.js} +1 -1
  2. package/dist/client/assets/{ArrowUp-BRclUYsx.js → ArrowUp-DnJUZ1OS.js} +1 -1
  3. package/dist/client/assets/{Calendar-DydX5uRn.js → Calendar-Dnf0_EY9.js} +1 -1
  4. package/dist/client/assets/{Check-Bkb61eVw.js → Check-Sa4xK5Hg.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-ZkjIkaWv.js → CheckCircle-DRhauZbp.js} +1 -1
  6. package/dist/client/assets/{CheckDone01-BusS8ANA.js → CheckDone01-I6GfoGdi.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-DqJTvBdv.js → ChevronDown-DmXLJeAy.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-BBcOJkyP.js → ChevronRight-By4KEpZh.js} +1 -1
  9. package/dist/client/assets/{Code01-DEMYMNLO.js → Code01-h_k8K-1e.js} +1 -1
  10. package/dist/client/assets/{Copy01-BvgMlJ5t.js → Copy01-jvqvZrKj.js} +1 -1
  11. package/dist/client/assets/{DotsHorizontal-C3Pu-YCA.js → DotsHorizontal-CQJNqVgu.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DMOP2SMU.js → DotsVertical-gLXmVMYI.js} +1 -1
  13. package/dist/client/assets/{Download01-VwSgop8U.js → Download01-BKmVPJWY.js} +1 -1
  14. package/dist/client/assets/{Edit01-ByF-cYbh.js → Edit01-BT8zEtQL.js} +1 -1
  15. package/dist/client/assets/{File02-D6OcKUS4.js → File02-BNE7fmK0.js} +1 -1
  16. package/dist/client/assets/{File06-CkTcogsG.js → File06-WU23pV9H.js} +1 -1
  17. package/dist/client/assets/{FilterLines-BL17m8OO.js → FilterLines-DJEB3mgx.js} +1 -1
  18. package/dist/client/assets/{Globe02-CwdZK2H5.js → Globe02-Dp5eUbS2.js} +1 -1
  19. package/dist/client/assets/{Grid01-zbmmdox0.js → Grid01-CSAsqBFD.js} +1 -1
  20. package/dist/client/assets/{Home02-DPzckV1r.js → Home02-BUr926Eo.js} +1 -1
  21. package/dist/client/assets/{Image01-BuXlAy8i.js → Image01-BnbXZOf7.js} +1 -1
  22. package/dist/client/assets/{Inbox01-Czow08Bp.js → Inbox01-XFeiQPbg.js} +1 -1
  23. package/dist/client/assets/{InfoCircle-C8GtqndP.js → InfoCircle-5xWfOa8P.js} +1 -1
  24. package/dist/client/assets/{LinkExternal01-DJasjN8P.js → LinkExternal01-BJLPX8tt.js} +1 -1
  25. package/dist/client/assets/{List-BvAv-Mbv.js → List-kXpaJIIp.js} +1 -1
  26. package/dist/client/assets/{Loading01-DOPFYU4m.js → Loading01-D8zw0cyg.js} +1 -1
  27. package/dist/client/assets/{Lock01-BALKEl0l.js → Lock01-DCDiY4HG.js} +1 -1
  28. package/dist/client/assets/{Pin01-Dk_x7uai.js → Pin01-DWsvacVo.js} +1 -1
  29. package/dist/client/assets/{Play-CjfPPVn_.js → Play-Yhg_pcqU.js} +1 -1
  30. package/dist/client/assets/{Plus-WaQ7hmj5.js → Plus-BBD2SckJ.js} +1 -1
  31. package/dist/client/assets/{SearchMd-Ds-ERWzq.js → SearchMd-CGuwiAQe.js} +1 -1
  32. package/dist/client/assets/{Settings01-CMNXJNnf.js → Settings01-D7-sGWon.js} +1 -1
  33. package/dist/client/assets/{Share07-w2-wABEW.js → Share07-C8iek9k4.js} +1 -1
  34. package/dist/client/assets/{Terminal-CrrxpXUI.js → Terminal-CyioLjuI.js} +1 -1
  35. package/dist/client/assets/{Tool01-Cn8FHCpZ.js → Tool01-DF-lT9RC.js} +1 -1
  36. package/dist/client/assets/{Trash01-C-euKa34.js → Trash01-CLqhrRia.js} +1 -1
  37. package/dist/client/assets/{Upload01-Dc0hOrKX.js → Upload01-DrtXkSgF.js} +1 -1
  38. package/dist/client/assets/{Users03-zsvZ9QWQ.js → Users03-oV4Gx6fu.js} +1 -1
  39. package/dist/client/assets/{X-DUGfq2_H.js → X-CuhyLwhM.js} +1 -1
  40. package/dist/client/assets/{XClose-Cv_qbaYN.js → XClose-BFt2trBc.js} +1 -1
  41. package/dist/client/assets/{agent-connections-preview-C15fpCN8.js → agent-connections-preview-D4bn0NTx.js} +1 -1
  42. package/dist/client/assets/{agent-detail-BQXrWX9M.js → agent-detail-D8YR1Y7H.js} +1 -1
  43. package/dist/client/assets/{agents-NgYS-NWl.js → agents-BMyluA59.js} +1 -1
  44. package/dist/client/assets/{alert-dialog-B4H6MrIT.js → alert-dialog-BxcV0D_1.js} +2 -2
  45. package/dist/client/assets/{auth-catchall-GUc2KujY.js → auth-catchall-DLJkIPQ0.js} +1 -1
  46. package/dist/client/assets/{avatar-B-AS-16N.js → avatar-D3z5_V3I.js} +1 -1
  47. package/dist/client/assets/{badge-BFm6jM0d.js → badge-BklHLRcK.js} +1 -1
  48. package/dist/client/assets/{binder-C4CQlgMb.js → binder-ak1AkjZY.js} +1 -1
  49. package/dist/client/assets/{breadcrumb-Cvo4WJJ5.js → breadcrumb-B_Yxwj4p.js} +1 -1
  50. package/dist/client/assets/{button-Cl3WMTWk.js → button-CcO5M7F7.js} +1 -1
  51. package/dist/client/assets/{card-B-73zAje.js → card-BNt4WjQv.js} +1 -1
  52. package/dist/client/assets/{checkbox-kN_xGJfO.js → checkbox-CirsSPdM.js} +1 -1
  53. package/dist/client/assets/{circle-alert-BEtzK3t3.js → circle-alert-BcHtOytY.js} +1 -1
  54. package/dist/client/assets/{collection-detail-C9AV2Fn9.js → collection-detail-iX-6m_0X.js} +2 -2
  55. package/dist/client/assets/{collection-search-Aeh0FXZR.js → collection-search-Cyt8_oQV.js} +1 -1
  56. package/dist/client/assets/{collection-tab-CgMRLj1Y.js → collection-tab-Cbay3Q2-.js} +1 -1
  57. package/dist/client/assets/{collection-table-wrapper-CmBNNf0K.js → collection-table-wrapper-CFNweZN1.js} +1 -1
  58. package/dist/client/assets/{collection-tabs-2AUf3kZ2.js → collection-tabs-Dh2bhvAY.js} +1 -1
  59. package/dist/client/assets/{command-DICG2vo0.js → command-8Q_FGz0v.js} +1 -1
  60. package/dist/client/assets/{connect-DoxLTvbh.js → connect-1mhMrmD4.js} +1 -1
  61. package/dist/client/assets/{connection-card-ChzuU2dT.js → connection-card-BGd7kcn-.js} +1 -1
  62. package/dist/client/assets/connection-detail-dEdcHJ4u.js +1 -0
  63. package/dist/client/assets/connections-DmGFiu1f.js +1 -0
  64. package/dist/client/assets/{constants-1q3hobyw.js → constants-DuSOM18S.js} +1 -1
  65. package/dist/client/assets/constants-QC26G_cT.js +1 -0
  66. package/dist/client/assets/{create-organization-dialog-DWV2eGAF.js → create-organization-dialog-j_P7xuhv.js} +1 -1
  67. package/dist/client/assets/create-project-dialog-C-mSn_Ux.js +1 -0
  68. package/dist/client/assets/{dialog-BmGDp4UV.js → dialog-B_iTVR3h.js} +1 -1
  69. package/dist/client/assets/dropdown-menu-BTPpCOPE.js +1 -0
  70. package/dist/client/assets/{dynamic-plugin-layout-C_HHJRk0.js → dynamic-plugin-layout-BsqDni3U.js} +1 -1
  71. package/dist/client/assets/{empty-state-oU8PNga_.js → empty-state--JD6ZxUc.js} +1 -1
  72. package/dist/client/assets/{empty-state-DFIrBrC-.js → empty-state-Ct1fZFlf.js} +1 -1
  73. package/dist/client/assets/{env-vars-editor-Bmnp2cvo.js → env-vars-editor-B4EebJEK.js} +1 -1
  74. package/dist/client/assets/{error-boundary-D7C5xzme.js → error-boundary-DlgelpJG.js} +1 -1
  75. package/dist/client/assets/{extract-connection-data-CQQ4ZZEG.js → extract-connection-data-BM37afPK.js} +1 -1
  76. package/dist/client/assets/file-browser-DQeqPq9E.js +2 -0
  77. package/dist/client/assets/form-CSsv2IBt.js +1 -0
  78. package/dist/client/assets/grid-view-DBKftgaD.js +1 -0
  79. package/dist/client/assets/home-D16zlSya.js +1 -0
  80. package/dist/client/assets/{index-9vOB29ZB.js → index-BHu7Lc_d.js} +1 -1
  81. package/dist/client/assets/{index-BV-rIyOx.js → index-Bn2rDd42.js} +6 -6
  82. package/dist/client/assets/{index-CxyQJKsK.js → index-Bo7hWTur.js} +1 -1
  83. package/dist/client/assets/{index-5T3tdhiA.js → index-CHcJPAjT.js} +1 -1
  84. package/dist/client/assets/{index-BA6gcyzW.js → index-CZtqakWK.js} +14 -14
  85. package/dist/client/assets/{index-Dolyg0HI.js → index-DJCm-wAr.js} +1 -1
  86. package/dist/client/assets/index-DZ7G-bvr.js +1 -0
  87. package/dist/client/assets/index-a2nqbblp.js +1 -0
  88. package/dist/client/assets/{index-fCCl5Un_.js → index-fr6MaGoE.js} +1 -1
  89. package/dist/client/assets/{infiniteQueryObserver-CrYps4St.js → infiniteQueryObserver-VnhrjjoH.js} +1 -1
  90. package/dist/client/assets/{input-Dv5qvD5N.js → input-DBvMwxwE.js} +1 -1
  91. package/dist/client/assets/integration-icon-C8seGsuO.js +1 -0
  92. package/dist/client/assets/label-BjQxQJkg.js +1 -0
  93. package/dist/client/assets/layout-ZTsfxACA.js +1 -0
  94. package/dist/client/assets/{localstorage-keys-Ds2uOTRP.js → localstorage-keys-BhunmwZg.js} +1 -1
  95. package/dist/client/assets/{login-BpnfmGBt.js → login-H0BwFxqL.js} +1 -1
  96. package/dist/client/assets/{mcp-oauth-C_XpjqFg.js → mcp-oauth-ZUujauBG.js} +1 -1
  97. package/dist/client/assets/{mcp-server-card-CiGvO9aP.js → mcp-server-card-KgRAONYw.js} +1 -1
  98. package/dist/client/assets/{mcp-server-detail-SQfpDpYc.js → mcp-server-detail-Ce9SGjoZ.js} +2 -2
  99. package/dist/client/assets/members-C925BdC6.js +3 -0
  100. package/dist/client/assets/{monaco-editor-q53ZLBJ5.js → monaco-editor-D7Ghoc8y.js} +1 -1
  101. package/dist/client/assets/{monitoring-CK4xcQzM.js → monitoring-DI8QAuDx.js} +19 -19
  102. package/dist/client/assets/{oauth-callback-CeLfnx5m.js → oauth-callback-DqKFxIqr.js} +1 -1
  103. package/dist/client/assets/page-B2cjdb1f.js +1 -0
  104. package/dist/client/assets/{page-jzi-88Nr.js → page-DCfXF14g.js} +1 -1
  105. package/dist/client/assets/plugin-empty-state-BYB8Yhjv.js +1 -0
  106. package/dist/client/assets/plugin-header-CLRCQ1W3.js +1 -0
  107. package/dist/client/assets/popover-BkKSdvGf.js +1 -0
  108. package/dist/client/assets/{project-layout-CH4wXxX2.js → project-layout-DzX_Lv0I.js} +1 -1
  109. package/dist/client/assets/project-settings-lapjGGi3.js +1 -0
  110. package/dist/client/assets/projects-list-DZgOrcLS.js +1 -0
  111. package/dist/client/assets/{registry-utils-CqOx6XXE.js → registry-utils-BsLp7zXK.js} +1 -1
  112. package/dist/client/assets/{resizable-CZuYHBhW.js → resizable-CdUSPFqv.js} +1 -1
  113. package/dist/client/assets/select-J2aavKNi.js +1 -0
  114. package/dist/client/assets/{shell-layout-BxNK1bDI.js → shell-layout-DOBmQ9ah.js} +2 -2
  115. package/dist/client/assets/{spinner-BPZfVVyD.js → spinner-Bn-tqgsf.js} +1 -1
  116. package/dist/client/assets/{store-invite-ICTVmn8_.js → store-invite-C8stGp_k.js} +1 -1
  117. package/dist/client/assets/switch-CG0LWjwI.js +1 -0
  118. package/dist/client/assets/{table-BBnlXDKe.js → table-BNxQWMxG.js} +1 -1
  119. package/dist/client/assets/{tasks-CpdqRpYU.js → tasks-C_RAoHGr.js} +1 -1
  120. package/dist/client/assets/{textarea-DK_SwVx9.js → textarea-CKlKOzV4.js} +1 -1
  121. package/dist/client/assets/{tools-list-B5iaOgKy.js → tools-list-D0G5KWHg.js} +1 -1
  122. package/dist/client/assets/{typewriter-title-C_OsyMAQ.js → typewriter-title-BqfnndCW.js} +2 -2
  123. package/dist/client/assets/{use-binding-BVOuBiur.js → use-binding-Dgjl_Htk.js} +1 -1
  124. package/dist/client/assets/{use-connection-B8DnjeO8.js → use-connection-CVk8Bzpz.js} +1 -1
  125. package/dist/client/assets/{use-create-virtual-mcp-7fubOknm.js → use-create-virtual-mcp-BpXLuk-p.js} +1 -1
  126. package/dist/client/assets/{use-deco-chat-open-cMRvRYVG.js → use-deco-chat-open-CfZI9mqc.js} +5 -5
  127. package/dist/client/assets/{use-install-from-registry-ClVbT6BY.js → use-install-from-registry-5UUqPBO7.js} +1 -1
  128. package/dist/client/assets/{use-list-state-DjV5kR97.js → use-list-state-D_1V56-b.js} +1 -1
  129. package/dist/client/assets/{use-llm-H-K3anTg.js → use-llm-Ca3pgrIB.js} +1 -1
  130. package/dist/client/assets/{use-mcp-prompts-Chz_2-6S.js → use-mcp-prompts-Cn7tm6ug.js} +1 -1
  131. package/dist/client/assets/{use-mcp-tools-CXMetymP.js → use-mcp-tools-Ddi2i1Nb.js} +1 -1
  132. package/dist/client/assets/{use-mobile-B2CDnK8i.js → use-mobile-p03CcGW0.js} +1 -1
  133. package/dist/client/assets/{use-organization-settings-Bu92wRjl.js → use-organization-settings-DHZKDAPt.js} +1 -1
  134. package/dist/client/assets/{use-project-CzroiUzj.js → use-project-D-mK4K9b.js} +1 -1
  135. package/dist/client/assets/{use-virtual-mcp-ayu_K6US.js → use-virtual-mcp-C83o4Rih.js} +1 -1
  136. package/dist/client/assets/useInfiniteQuery-DDUEUpOZ.js +1 -0
  137. package/dist/client/assets/{useMutation-BOrtlNTb.js → useMutation-CnTeRHmv.js} +1 -1
  138. package/dist/client/assets/useQuery-Ct96KcZp.js +1 -0
  139. package/dist/client/assets/utils-Ckc2UwOp.js +1 -0
  140. package/dist/client/assets/{view-mode-toggle-CHHKGadJ.js → view-mode-toggle-CJkT6m07.js} +1 -1
  141. package/dist/client/assets/{workflow-BBKpGvON.js → workflow-2rDY9uo2.js} +1 -1
  142. package/dist/client/index.html +1 -1
  143. package/dist/server/cli.js +150 -150
  144. package/dist/server/migrate.js +1 -1
  145. package/dist/server/server.js +129 -129
  146. package/package.json +1 -1
  147. package/dist/client/assets/connection-detail-CVNpoyUm.js +0 -1
  148. package/dist/client/assets/connections-BHOwcUB0.js +0 -1
  149. package/dist/client/assets/constants-DzWq-50V.js +0 -1
  150. package/dist/client/assets/create-project-dialog-49RtElmv.js +0 -1
  151. package/dist/client/assets/dropdown-menu-6IaHSzwJ.js +0 -1
  152. package/dist/client/assets/file-browser-CHtfSNHu.js +0 -2
  153. package/dist/client/assets/form-qYB4UriD.js +0 -1
  154. package/dist/client/assets/grid-view-B4Eut3Xi.js +0 -1
  155. package/dist/client/assets/home-BYm3DFU4.js +0 -1
  156. package/dist/client/assets/index-BYzsWn1B.js +0 -1
  157. package/dist/client/assets/index-Vp0uDDij.js +0 -1
  158. package/dist/client/assets/integration-icon-DKM9NBX1.js +0 -1
  159. package/dist/client/assets/layout-B7afTuaN.js +0 -1
  160. package/dist/client/assets/members-CQSBREQS.js +0 -3
  161. package/dist/client/assets/page-CrfNBuC7.js +0 -1
  162. package/dist/client/assets/plugin-empty-state-Bnssy2Oj.js +0 -1
  163. package/dist/client/assets/plugin-header-DoQQAOys.js +0 -1
  164. package/dist/client/assets/popover-DuZ2ZN5J.js +0 -1
  165. package/dist/client/assets/project-settings-CKgnjrBp.js +0 -1
  166. package/dist/client/assets/projects-list-D0sSao6e.js +0 -1
  167. package/dist/client/assets/select-ODRW9YrY.js +0 -1
  168. package/dist/client/assets/switch-B-1QAIh-.js +0 -1
  169. package/dist/client/assets/useInfiniteQuery-TqDHdib1.js +0 -1
  170. package/dist/client/assets/useQuery-DDYln2BW.js +0 -1
  171. package/dist/client/assets/utils-CfR4kXxZ.js +0 -1
@@ -1 +1 @@
1
- import{c as ne,j as t,r as X,u as ie,m as ae,O as V}from"./index-BV-rIyOx.js";import{C as le,a as ce}from"./collection-table-wrapper-CmBNNf0K.js";import{C as de}from"./collection-search-Aeh0FXZR.js";import{P as j}from"./index-9vOB29ZB.js";import{B as me,a as pe,b as ge,c as ue}from"./breadcrumb-Cvo4WJJ5.js";import{C as fe}from"./connection-card-ChzuU2dT.js";import{E as q}from"./empty-state-oU8PNga_.js";import{E as he}from"./error-boundary-D7C5xzme.js";import{I as xe}from"./integration-icon-DKM9NBX1.js";import{u as je,s as Y,U as Ce}from"./use-list-state-DjV5kR97.js";import{u as be}from"./use-create-virtual-mcp-7fubOknm.js";import{i as ye}from"./constants-1q3hobyw.js";import{b as we,a as De}from"./use-virtual-mcp-ayu_K6US.js";import{c as Ne,b as Se,d as _e,A as ke,e as $e,g as ve,a as Ae,f as Me}from"./alert-dialog-B4H6MrIT.js";import{B as Q}from"./button-Cl3WMTWk.js";import{D as Z,a as ee,b as te,c as R}from"./dropdown-menu-6IaHSzwJ.js";import{i as se}from"./DotsVertical-DMOP2SMU.js";import{i as Ie}from"./Loading01-DOPFYU4m.js";import{s as oe}from"./Trash01-C-euKa34.js";import{t as C}from"./Users03-zsvZ9QWQ.js";import{A as re}from"./agent-connections-preview-C15fpCN8.js";import{d as Pe}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-BRclUYsx.js";import"./Check-Bkb61eVw.js";import"./Grid01-zbmmdox0.js";import"./List-BvAv-Mbv.js";import"./view-mode-toggle-CHHKGadJ.js";import"./utils-CfR4kXxZ.js";import"./table-BBnlXDKe.js";import"./SearchMd-Ds-ERWzq.js";import"./input-Dv5qvD5N.js";import"./ChevronRight-BBcOJkyP.js";import"./card-B-73zAje.js";import"./index-BYzsWn1B.js";import"./avatar-B-AS-16N.js";import"./useQuery-DDYln2BW.js";import"./use-mobile-B2CDnK8i.js";import"./use-connection-B8DnjeO8.js";import"./useMutation-BOrtlNTb.js";function ze(e){const o=Pe(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function Be(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Oe(){const e=ne.c(65),{org:o}=ie(),i=ae();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=De();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=X.useReducer(Be,D);let S;e[4]!==U||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||ye(r)))try{await U.delete.mutateAsync(r)}catch{}},e[4]=U,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,$,v,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Ge,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Fe,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},$={id:"connections",header:"Connections",render:Le,cellClassName:"w-28 shrink-0"},v={id:"updated_by",header:"Updated by",render:Ue,cellClassName:"w-32 shrink-0",sortable:!0},A={id:"updated_at",header:"Updated",render:Te,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=$,e[11]=v,e[12]=A):(_=e[8],k=e[9],$=e[10],v=e[11],A=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,$,v,A,{id:"actions",header:"",render:r=>t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Re,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ve,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,F=w?"Creating...":"Create Agent";let I;e[16]!==T||e[17]!==w||e[18]!==F?(I=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=I):I=e[19];const G=I,J=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ne,{children:"Delete Agent?"}),e[21]=z):z=e[21];const W=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[z,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs($e,{children:[B,t.jsx(ve,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Me,{open:J,onOpenChange:P,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:t.jsx(ue,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==G||e[42]!==p?(g=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(fe,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ke,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ee,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let K;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(K=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=K):K=e[64],K}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return e.stopPropagation()}function Te(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Ue(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Le(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Fe(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ge(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function It(){const e=ne.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Oe,{})})}),e[0]=o):o=e[0],o}export{It as default};
1
+ import{c as ne,j as t,r as X,u as ie,m as ae,O as V}from"./index-Bn2rDd42.js";import{C as le,a as ce}from"./collection-table-wrapper-CFNweZN1.js";import{C as de}from"./collection-search-Cyt8_oQV.js";import{P as j}from"./index-BHu7Lc_d.js";import{B as me,a as pe,b as ge,c as ue}from"./breadcrumb-B_Yxwj4p.js";import{C as fe}from"./connection-card-BGd7kcn-.js";import{E as q}from"./empty-state--JD6ZxUc.js";import{E as he}from"./error-boundary-DlgelpJG.js";import{I as xe}from"./integration-icon-C8seGsuO.js";import{u as je,s as Y,U as Ce}from"./use-list-state-D_1V56-b.js";import{u as be}from"./use-create-virtual-mcp-BpXLuk-p.js";import{i as ye}from"./constants-DuSOM18S.js";import{b as we,a as De}from"./use-virtual-mcp-C83o4Rih.js";import{c as Ne,b as Se,d as _e,A as ke,e as $e,g as ve,a as Ae,f as Me}from"./alert-dialog-BxcV0D_1.js";import{B as Q}from"./button-CcO5M7F7.js";import{D as Z,a as ee,b as te,c as R}from"./dropdown-menu-BTPpCOPE.js";import{i as se}from"./DotsVertical-gLXmVMYI.js";import{i as Ie}from"./Loading01-D8zw0cyg.js";import{s as oe}from"./Trash01-CLqhrRia.js";import{t as C}from"./Users03-oV4Gx6fu.js";import{A as re}from"./agent-connections-preview-D4bn0NTx.js";import{d as Pe}from"./differenceInSeconds-NQ4PDo0z.js";import"./ArrowUp-DnJUZ1OS.js";import"./Check-Sa4xK5Hg.js";import"./Grid01-CSAsqBFD.js";import"./List-kXpaJIIp.js";import"./view-mode-toggle-CJkT6m07.js";import"./utils-Ckc2UwOp.js";import"./table-BNxQWMxG.js";import"./SearchMd-CGuwiAQe.js";import"./input-DBvMwxwE.js";import"./ChevronRight-By4KEpZh.js";import"./card-BNt4WjQv.js";import"./index-DZ7G-bvr.js";import"./avatar-D3z5_V3I.js";import"./useQuery-Ct96KcZp.js";import"./use-mobile-p03CcGW0.js";import"./use-connection-CVk8Bzpz.js";import"./useMutation-CnTeRHmv.js";function ze(e){const o=Pe(new Date,e);return o<60?"<1m":o<3600?`${Math.floor(o/60)}m ago`:o<86400?`${Math.floor(o/3600)}h ago`:o<604800?`${Math.floor(o/86400)}d ago`:o<2592e3?`${Math.floor(o/604800)}w ago`:o<31536e3?`${Math.floor(o/2592e3)}mo ago`:`${Math.floor(o/31536e3)}y ago`}function Be(e,o){switch(o.type){case"delete":return{mode:"deleting",virtualMcp:o.virtualMcp};case"close":return{mode:"idle"}}}function Oe(){const e=ne.c(65),{org:o}=ie(),i=ae();let b;e[0]!==o.slug?(b={namespace:o.slug,resource:"agents"},e[0]=o.slug,e[1]=b):b=e[1];const s=je(b),x=we(s);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y={navigateOnCreate:!0},e[2]=y):y=e[2];const{createVirtualMCP:T,isCreating:w}=be(y),U=De();let D;e[3]===Symbol.for("react.memo_cache_sentinel")?(D={mode:"idle"},e[3]=D):D=e[3];const[n,N]=X.useReducer(Be,D);let S;e[4]!==U||e[5]!==n.mode||e[6]!==n.virtualMcp?(S=async()=>{if(n.mode!=="deleting")return;const r=n.virtualMcp.id;if(N({type:"close"}),!(!r||ye(r)))try{await U.delete.mutateAsync(r)}catch{}},e[4]=U,e[5]=n.mode,e[6]=n.virtualMcp,e[7]=S):S=e[7];const L=S;let _,k,$,v,A;e[8]===Symbol.for("react.memo_cache_sentinel")?(_={id:"title",header:"Name",render:Ge,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},k={id:"description",header:"Description",render:Fe,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},$={id:"connections",header:"Connections",render:Le,cellClassName:"w-28 shrink-0"},v={id:"updated_by",header:"Updated by",render:Ue,cellClassName:"w-32 shrink-0",sortable:!0},A={id:"updated_at",header:"Updated",render:Te,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},e[8]=_,e[9]=k,e[10]=$,e[11]=v,e[12]=A):(_=e[8],k=e[9],$=e[10],v=e[11],A=e[12]);let M;e[13]!==i||e[14]!==o.slug?(M=[_,k,$,v,A,{id:"actions",header:"",render:r=>t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Re,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ve,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"}],e[13]=i,e[14]=o.slug,e[15]=M):M=e[15];const H=M,F=w?"Creating...":"Create Agent";let I;e[16]!==T||e[17]!==w||e[18]!==F?(I=t.jsx(Q,{onClick:T,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:w,children:F}),e[16]=T,e[17]=w,e[18]=F,e[19]=I):I=e[19];const G=I,J=n.mode==="deleting";let P;e[20]===Symbol.for("react.memo_cache_sentinel")?(P=r=>!r&&N({type:"close"}),e[20]=P):P=e[20];let z;e[21]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ne,{children:"Delete Agent?"}),e[21]=z):z=e[21];const W=n.mode==="deleting"&&n.virtualMcp.title;let l;e[22]!==W?(l=t.jsxs(Se,{children:[z,t.jsxs(_e,{children:["This action cannot be undone. This will permanently delete"," ",t.jsx("span",{className:"font-medium text-foreground",children:W}),"."]})]}),e[22]=W,e[23]=l):l=e[23];let B;e[24]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ke,{children:"Cancel"}),e[24]=B):B=e[24];let c;e[25]!==L?(c=t.jsxs($e,{children:[B,t.jsx(ve,{onClick:L,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[25]=L,e[26]=c):c=e[26];let d;e[27]!==l||e[28]!==c?(d=t.jsxs(Ae,{children:[l,c]}),e[27]=l,e[28]=c,e[29]=d):d=e[29];let m;e[30]!==J||e[31]!==d?(m=t.jsx(Me,{open:J,onOpenChange:P,children:d}),e[30]=J,e[31]=d,e[32]=m):m=e[32];let O;e[33]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsx(j.Header.Left,{children:t.jsx(me,{children:t.jsx(pe,{children:t.jsx(ge,{children:t.jsx(ue,{children:"Agents"})})})})}),e[33]=O):O=e[33];let E;e[34]===Symbol.for("react.memo_cache_sentinel")?(E=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],e[34]=E):E=e[34];let p;e[35]!==s.handleSort||e[36]!==s.setViewMode||e[37]!==s.sortDirection||e[38]!==s.sortKey||e[39]!==s.viewMode?(p=t.jsx(le,{viewMode:s.viewMode,onViewModeChange:s.setViewMode,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,sortOptions:E}),e[35]=s.handleSort,e[36]=s.setViewMode,e[37]=s.sortDirection,e[38]=s.sortKey,e[39]=s.viewMode,e[40]=p):p=e[40];let g;e[41]!==G||e[42]!==p?(g=t.jsxs(j.Header,{children:[O,t.jsxs(j.Header.Right,{children:[p,G]})]}),e[41]=G,e[42]=p,e[43]=g):g=e[43];let u;e[44]!==s?(u=r=>{r.key==="Escape"&&(s.setSearch(""),r.target.blur())},e[44]=s,e[45]=u):u=e[45];let f;e[46]!==s.search||e[47]!==s.setSearch||e[48]!==u?(f=t.jsx(de,{value:s.search,onChange:s.setSearch,placeholder:"Search for an agent...",onKeyDown:u}),e[46]=s.search,e[47]=s.setSearch,e[48]=u,e[49]=f):f=e[49];let h;e[50]!==H||e[51]!==s.handleSort||e[52]!==s.search||e[53]!==s.sortDirection||e[54]!==s.sortKey||e[55]!==s.viewMode||e[56]!==i||e[57]!==o.slug||e[58]!==x?(h=t.jsx(j.Content,{children:s.viewMode==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:x.length===0?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:s.search?"No agents found":"No agents yet",description:s.search?`No agents match "${s.search}"`:"Create an agent to aggregate tools from multiple Connections."}):t.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4",children:x.map(r=>t.jsx(fe,{connection:{id:r.id??"",title:r.title,description:r.description,icon:r.icon,status:r.status},fallbackIcon:t.jsx(C,{}),onClick:()=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),footer:t.jsx("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:t.jsxs("span",{children:[r.connections.length," connection",r.connections.length!==1?"s":""]})}),headerActions:t.jsxs(Z,{children:[t.jsx(ee,{asChild:!0,children:t.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:Ke,children:t.jsx(se,{size:20})})}),t.jsxs(te,{align:"end",onClick:Ee,children:[t.jsxs(R,{onClick:a=>{a.stopPropagation(),i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}})},children:[t.jsx(Y,{size:16}),"Open"]}),t.jsxs(R,{variant:"destructive",onClick:a=>{a.stopPropagation(),N({type:"delete",virtualMcp:r})},children:[t.jsx(oe,{size:16}),"Delete"]})]})]})},r.id??"default"))})}):t.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:t.jsx(ce,{columns:H,data:x,isLoading:!1,sortKey:s.sortKey,sortDirection:s.sortDirection,onSort:s.handleSort,onRowClick:r=>i({to:"/$org/$project/agents/$agentId",params:{org:o.slug,project:V,agentId:r.id}}),emptyState:s.search?t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${s.search}"`}):t.jsx(q,{image:t.jsx(C,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})}),e[50]=H,e[51]=s.handleSort,e[52]=s.search,e[53]=s.sortDirection,e[54]=s.sortKey,e[55]=s.viewMode,e[56]=i,e[57]=o.slug,e[58]=x,e[59]=h):h=e[59];let K;return e[60]!==m||e[61]!==g||e[62]!==f||e[63]!==h?(K=t.jsxs(j,{children:[m,g,f,h]}),e[60]=m,e[61]=g,e[62]=f,e[63]=h,e[64]=K):K=e[64],K}function Ee(e){return e.stopPropagation()}function Ke(e){return e.stopPropagation()}function Ve(e){return e.stopPropagation()}function Re(e){return e.stopPropagation()}function Te(e){return t.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:e.updated_at?ze(new Date(e.updated_at)):"—"})}function Ue(e){return t.jsx(Ce,{id:e.updated_by??e.created_by,size:"3xs"})}function Le(e){return t.jsx(X.Suspense,{fallback:t.jsx(re.Fallback,{}),children:t.jsx(re,{connectionIds:e.connections.map(He),maxVisibleIcons:2})})}function He(e){return e.connection_id}function Fe(e){return t.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:e.description||"—"})}function Ge(e){return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx(xe,{icon:e.icon,name:e.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(C,{size:16})}),t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:e.title})]})}function It(){const e=ne.c(1);let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(he,{children:t.jsx(X.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(Ie,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Oe,{})})}),e[0]=o):o=e[0],o}export{It as default};
@@ -1,7 +1,7 @@
1
- import{r as n,j as s,T as w,al as m,aG as O,w as M,an as I,B as A,R as z,D as F,aH as D,x as G,aI as L,aq as H,z as k,y as q,c as i}from"./index-BV-rIyOx.js";import{c as p}from"./utils-CfR4kXxZ.js";import{b as v}from"./button-Cl3WMTWk.js";var x="AlertDialog",[B]=H(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(z,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(k,{...o,...a,ref:e})});y.displayName=V;var W="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(G,{...a,...t})};j.displayName=W;var Y="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=L("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,r=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return s.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:s.jsx(J,{scope:t,cancelRef:u,children:s.jsxs(M,{role:"alertdialog",...r,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[s.jsx(Q,{children:a}),s.jsx(X,{contentRef:c})]})})})});h.displayName=f;var b="AlertDialogTitle",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(w,{...o,...a,ref:e})});R.displayName=b;var $="AlertDialogDescription",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(F,{...o,...a,ref:e})});E.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),r=d(t),c=m(e,o);return s.jsx(A,{...r,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as n,j as s,T as w,al as m,aG as O,D as I,an as M,J as A,B as G,E as z,aH as D,G as F,aI as H,aq as L,I as k,H as q,c as i}from"./index-Bn2rDd42.js";import{c as p}from"./utils-Ckc2UwOp.js";import{b as v}from"./button-CcO5M7F7.js";var x="AlertDialog",[B]=L(x,[D]),d=D(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(G,{...a,...t,modal:!0})};N.displayName=x;var V="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(k,{...o,...a,ref:e})});y.displayName=V;var W="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return s.jsx(F,{...a,...t})};j.displayName=W;var Y="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(q,{...o,...a,ref:e})});_.displayName=Y;var f="AlertDialogContent",[J,K]=B(f),Q=H("AlertDialogContent"),h=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,r=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return s.jsx(O,{contentName:f,titleName:b,docsSlug:"alert-dialog",children:s.jsx(J,{scope:t,cancelRef:u,children:s.jsxs(I,{role:"alertdialog",...r,...o,ref:P,onOpenAutoFocus:M(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[s.jsx(Q,{children:a}),s.jsx(X,{contentRef:c})]})})})});h.displayName=f;var b="AlertDialogTitle",E=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(w,{...o,...a,ref:e})});E.displayName=b;var $="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(z,{...o,...a,ref:e})});R.displayName=$;var U="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return s.jsx(A,{...o,...a,ref:e})});C.displayName=U;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(S,t),r=d(t),c=m(e,o);return s.jsx(A,{...r,...a,ref:c})});T.displayName=S;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${$}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
5
5
  Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${f}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
6
6
 
7
- For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=j,ae=_,oe=h,le=C,re=T,se=R,ie=E;function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ue(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function me(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{}),e[3]=o):o=e[3];let r;e[4]!==t?(r=p("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=r):r=e[5];let c;return e[6]!==a||e[7]!==r?(c=s.jsxs(ne,{children:[o,s.jsx(oe,{"data-slot":"alert-dialog-content",className:r,...a})]}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Ne(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ye(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(re,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}export{ye as A,me as a,Ae as b,ve as c,xe as d,De as e,ge as f,Ne as g,ue as h};
7
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return n.useEffect(()=>{document.getElementById(l.current?.getAttribute("aria-describedby"))||console.warn(e)},[e,l]),null},Z=N,ee=y,te=j,ae=_,oe=h,le=C,re=T,se=E,ie=R;function ge(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(Z,{"data-slot":"alert-dialog",...t}),e[2]=t,e[3]=a):a=e[3],a}function ue(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(ee,{"data-slot":"alert-dialog-trigger",...t}),e[2]=t,e[3]=a):a=e[3],a}function ne(l){const e=i.c(4);let t;e[0]!==l?({...t}=l,e[0]=l,e[1]=t):t=e[1];let a;return e[2]!==t?(a=s.jsx(te,{"data-slot":"alert-dialog-portal",...t}),e[2]=t,e[3]=a):a=e[3],a}function ce(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ae,{"data-slot":"alert-dialog-overlay",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function me(l){const e=i.c(9);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(ce,{}),e[3]=o):o=e[3];let r;e[4]!==t?(r=p("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-xl border p-6 shadow-lg duration-200 sm:max-w-lg",t),e[4]=t,e[5]=r):r=e[5];let c;return e[6]!==a||e[7]!==r?(c=s.jsxs(ne,{children:[o,s.jsx(oe,{"data-slot":"alert-dialog-content",className:r,...a})]}),e[6]=a,e[7]=r,e[8]=c):c=e[8],c}function Ae(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col gap-2 text-center sm:text-left",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-header",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function De(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx("div",{"data-slot":"alert-dialog-footer",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ve(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-lg font-semibold",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(se,{"data-slot":"alert-dialog-title",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function xe(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p("text-muted-foreground text-sm",t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(ie,{"data-slot":"alert-dialog-description",className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function Ne(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v(),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(le,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}function ye(l){const e=i.c(8);let t,a;e[0]!==l?({className:t,...a}=l,e[0]=l,e[1]=t,e[2]=a):(t=e[1],a=e[2]);let o;e[3]!==t?(o=p(v({variant:"outline"}),t),e[3]=t,e[4]=o):o=e[4];let r;return e[5]!==a||e[6]!==o?(r=s.jsx(re,{className:o,...a}),e[5]=a,e[6]=o,e[7]=r):r=e[7],r}export{ye as A,me as a,Ae as b,ve as c,xe as d,De as e,ge as f,Ne as g,ue as h};
@@ -1 +1 @@
1
- import{c as r,a as m,j as n,A as o}from"./index-BV-rIyOx.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
1
+ import{c as r,a as m,j as n,A as o}from"./index-Bn2rDd42.js";function i(){const e=r.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/auth/$pathname"},e[0]=t):t=e[0];const{pathname:s}=m(t);let a;return e[1]!==s?(a=n.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:n.jsx(o,{pathname:s})}),e[1]=s,e[2]=a):a=e[2],a}export{i as default};
@@ -1 +1 @@
1
- import{r as R,c as j,j as i,n as I,aJ as U,aK as $,aL as M}from"./index-BV-rIyOx.js";import{c as f}from"./utils-CfR4kXxZ.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function K(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{className:f(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function Z(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(K,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}Z.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{Z as A};
1
+ import{r as R,c as j,j as i,x as I,aJ as U,aK as $,aL as M}from"./index-Bn2rDd42.js";import{c as f}from"./utils-Ckc2UwOp.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=f("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-xs font-semibold","2xs":"w-4 h-4 text-xs font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),J=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function K(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[m,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=f(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==m||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:f("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:J(h)})}):i.jsxs(i.Fragment,{children:[l&&!m&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:f(D({objectFit:u})),onError:()=>x(!0)}),(!l||m)&&i.jsx(W,{className:f(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=m,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function Z(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,m=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==m||e[16]!==l?(x=i.jsx(K,{shape:b,url:l,fallback:t,size:m,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=m,e[16]=l,e[17]=x):x=e[17],x}Z.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:f(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{Z as A};
@@ -1 +1 @@
1
- import{c as d,j as u,E as l,n as v}from"./index-BV-rIyOx.js";import{c as g}from"./utils-CfR4kXxZ.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
1
+ import{c as d,j as u,q as l,x as v}from"./index-Bn2rDd42.js";import{c as g}from"./utils-Ckc2UwOp.js";const f=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function m(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?l:"span";let i;e[5]!==r||e[6]!==t?(i=g(f({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=u.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{m as B};
@@ -1 +1 @@
1
- import"./index-BV-rIyOx.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
1
+ import"./index-Bn2rDd42.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
@@ -1 +1 @@
1
- import{c,j as n,E as f}from"./index-BV-rIyOx.js";import{i as u}from"./ChevronRight-BBcOJkyP.js";import{c as m}from"./utils-CfR4kXxZ.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
1
+ import{c,j as n,q as f}from"./index-Bn2rDd42.js";import{i as u}from"./ChevronRight-By4KEpZh.js";import{c as m}from"./utils-Ckc2UwOp.js";function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function j(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?f:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==l||e[7]!==s||e[8]!==i?(o=n.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function h(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-normal truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=n.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function B(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??n.jsx(u,{}),e[6]=a,e[7]=i):i=e[7];let o;return e[8]!==s||e[9]!==l||e[10]!==i?(o=n.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=o):o=e[11],o}export{x as B,N as a,g as b,h as c,j as d,B as e};
@@ -1 +1 @@
1
- import{c as g,j as l,E as u,n as v}from"./index-BV-rIyOx.js";import{c as b}from"./utils-CfR4kXxZ.js";const p=v("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function m(d){const e=g.c(14);let t,r,i,a,s;e[0]!==d?({className:t,variant:s,size:i,asChild:a,...r}=d,e[0]=d,e[1]=t,e[2]=r,e[3]=i,e[4]=a,e[5]=s):(t=e[1],r=e[2],i=e[3],a=e[4],s=e[5]);const c=(a===void 0?!1:a)?u:"button";let n;e[6]!==t||e[7]!==i||e[8]!==s?(n=b(p({variant:s,size:i,className:t})),e[6]=t,e[7]=i,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==r||e[12]!==n?(o=l.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=o):o=e[13],o}export{m as B,p as b};
1
+ import{c as g,j as l,q as u,x as v}from"./index-Bn2rDd42.js";import{c as b}from"./utils-Ckc2UwOp.js";const p=v("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border text-foreground bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-foreground/80 hover:text-foreground",brand:"bg-brand-green-light text-brand-green-dark hover:bg-brand-green-light/90"},size:{default:"h-10 px-4 py-2 has-[>svg]:px-3",sm:"h-7 gap-1.5 px-3 has-[>svg]:px-2.5",xs:"h-6 gap-1 px-2 text-xs has-[>svg]:px-1.5",lg:"h-10 px-6 has-[>svg]:px-4",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}});function m(d){const e=g.c(14);let t,r,i,a,s;e[0]!==d?({className:t,variant:s,size:i,asChild:a,...r}=d,e[0]=d,e[1]=t,e[2]=r,e[3]=i,e[4]=a,e[5]=s):(t=e[1],r=e[2],i=e[3],a=e[4],s=e[5]);const c=(a===void 0?!1:a)?u:"button";let n;e[6]!==t||e[7]!==i||e[8]!==s?(n=b(p({variant:s,size:i,className:t})),e[6]=t,e[7]=i,e[8]=s,e[9]=n):n=e[9];let o;return e[10]!==c||e[11]!==r||e[12]!==n?(o=l.jsx(c,{"data-slot":"button",className:n,...r}),e[10]=c,e[11]=r,e[12]=n,e[13]=o):o=e[13],o}export{m as B,p as b};
@@ -1 +1 @@
1
- import{c,j as l}from"./index-BV-rIyOx.js";import{c as n}from"./utils-CfR4kXxZ.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
1
+ import{c,j as l}from"./index-Bn2rDd42.js";import{c as n}from"./utils-Ckc2UwOp.js";function f(o){const e=c.c(8);let r,t;e[0]!==o?({className:r,...t}=o,e[0]=o,e[1]=r,e[2]=t):(r=e[1],t=e[2]);let s;e[3]!==r?(s=n("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75",r),e[3]=r,e[4]=s):s=e[4];let a;return e[5]!==t||e[6]!==s?(a=l.jsx("div",{"data-slot":"card",className:s,...t}),e[5]=t,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=c.c(4);let r;e[0]!==o?({...r}=o,e[0]=o,e[1]=r):r=e[1];let t;return e[2]!==r?(t=l.jsx("div",{"data-slot":"card-content",...r}),e[2]=r,e[3]=t):t=e[3],t}export{f as C,p as a};
@@ -1 +1 @@
1
- import{c as d,j as c,a1 as n,a2 as l}from"./index-BV-rIyOx.js";import{i as m}from"./Check-Bkb61eVw.js";import{c as b}from"./utils-CfR4kXxZ.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
1
+ import{c as d,j as c,a6 as n,a7 as l}from"./index-Bn2rDd42.js";import{i as m}from"./Check-Sa4xK5Hg.js";import{c as b}from"./utils-Ckc2UwOp.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-BV-rIyOx.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-Bn2rDd42.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1,4 +1,4 @@
1
- import{aW as G,r as k,o as Fs,s as xt,c as C,j as o,bt as $t,u as X,k as Vs,n as Bs,a as re,f as Us,aN as qe,O as Ke,t as Sn,bv as W,bG as qs,au as Ks,_ as Tt,an as te,av as wn,aw as Js,am as Et,as as Gs,ax as Nn,al as Cn,aD as Xs,aE as Zs,aq as kn,aF as Qs,bH as Ot,bI as Ys,at as eo,b1 as to,a$ as no,bJ as so,bK as In}from"./index-BV-rIyOx.js";import{E as _n}from"./empty-state-oU8PNga_.js";import{E as $n}from"./error-boundary-D7C5xzme.js";import{d as Rt,u as At,f as Ye,h as oo}from"./use-connection-B8DnjeO8.js";import{u as Z,i as ro}from"./constants-1q3hobyw.js";import{S as Tn,P as Mt}from"./index-Vp0uDDij.js";import{F as ht,a as io,b as Pt,d as Lt}from"./form-qYB4UriD.js";import{I as Dt}from"./input-Dv5qvD5N.js";import{T as wt}from"./textarea-DK_SwVx9.js";import{b as En,V as zt,a as ce}from"./layout-B7afTuaN.js";import{c as O}from"./utils-CfR4kXxZ.js";import{B as U}from"./button-Cl3WMTWk.js";import{S as On,a as Rn,b as An,c as Mn,d as Nt}from"./select-ODRW9YrY.js";import{I as et,c as Wt,b as Ht,T as Ft,a as Vt,n as lo}from"./integration-icon-DKM9NBX1.js";import{i as co}from"./AlertCircle-BOIQEKjW.js";import{s as ao,M as Te}from"./monaco-editor-q53ZLBJ5.js";import{i as uo}from"./Code01-DEMYMNLO.js";import{a as fo}from"./Copy01-BvgMlJ5t.js";import{i as Me}from"./Loading01-DOPFYU4m.js";import{i as Bt}from"./Play-CjfPPVn_.js";import{s as Ut}from"./XClose-Cv_qbaYN.js";import{B as Pn,a as Ln,b as $e,d as Je,e as Ge,c as Dn}from"./breadcrumb-Cvo4WJJ5.js";import{u as mo,O as po,M as xo,F as ho,v as go}from"./index-Dolyg0HI.js";import{d as qt,b as Kt,a as Jt}from"./use-mcp-tools-CXMetymP.js";import{E as Gt}from"./empty-state-DFIrBrC-.js";import{D as bo,a as jo}from"./use-binding-BVOuBiur.js";import{b as zn}from"./use-virtual-mcp-ayu_K6US.js";import{b as vo,a as dn,R as yo}from"./resizable-CZuYHBhW.js";import{S as tt}from"./spinner-BPZfVVyD.js";import{V as So}from"./view-mode-toggle-CHHKGadJ.js";import{N as wo,S as No,a as Co,c as ko,m as Ve,P as Io,b as _o,R as $o,d as To,e as Eo,f as un,E as Oo,g as Ro}from"./index-BA6gcyzW.js";import{b as Ao,c as Mo,d as Po,e as Lo,a as Do,D as zo}from"./dialog-BmGDp4UV.js";import"./index-CxyQJKsK.js";import{s as Wn}from"./Plus-WaQ7hmj5.js";import{n as Wo}from"./Calendar-DydX5uRn.js";import{i as Xt}from"./Check-Bkb61eVw.js";import{i as Ho}from"./DotsHorizontal-C3Pu-YCA.js";import{a as Fo}from"./Tool01-Cn8FHCpZ.js";import{D as Vo,a as Bo,b as Uo,c as fn}from"./dropdown-menu-6IaHSzwJ.js";import{T as qo,R as Ko,e as Jo,f as Hn}from"./use-deco-chat-open-cMRvRYVG.js";import{i as Go}from"./ChevronRight-BBcOJkyP.js";import{B as _e}from"./badge-BFm6jM0d.js";import{i as Fn}from"./X-DUGfq2_H.js";import"./useMutation-BOrtlNTb.js";import"./Pin01-Dk_x7uai.js";import"./use-organization-settings-Bu92wRjl.js";import"./index-9vOB29ZB.js";import"./index-BYzsWn1B.js";import"./ChevronDown-DqJTvBdv.js";import"./infiniteQueryObserver-CrYps4St.js";import"./mcp-oauth-C_XpjqFg.js";import"./File06-CkTcogsG.js";import"./index-5T3tdhiA.js";import"./constants-DzWq-50V.js";import"./registry-utils-CqOx6XXE.js";import"./extract-connection-data-CQQ4ZZEG.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-ClVbT6BY.js";import"./circle-alert-BEtzK3t3.js";import"./useQuery-DDYln2BW.js";import"./binder-C4CQlgMb.js";import"./popover-DuZ2ZN5J.js";import"./use-mcp-prompts-Chz_2-6S.js";import"./ArrowUp-BRclUYsx.js";import"./Edit01-ByF-cYbh.js";import"./Users03-zsvZ9QWQ.js";import"./Terminal-CrrxpXUI.js";import"./localstorage-keys-Ds2uOTRP.js";import"./SearchMd-Ds-ERWzq.js";import"./Trash01-C-euKa34.js";import"./use-create-virtual-mcp-7fubOknm.js";import"./use-llm-H-K3anTg.js";import"./Grid01-zbmmdox0.js";import"./Image01-BuXlAy8i.js";const Vn=G("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Bn=G("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Zt=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Qt=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Xo=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Zo=G("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Qo=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Un=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const qn=G("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Kn=G("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const Jn=G("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Gn=G("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Yt=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));Yt.displayName="AlertOctagon";const Xn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));Xn.displayName="Box";const Zn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Zn.displayName="ClockFastForward";const Qn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Qn.displayName="Code02";const Be=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Be.displayName="Columns01";const Yn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Yn.displayName="CornerDownRight";const es=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));es.displayName="Database01";const ts=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));ts.displayName="GitBranch01";const ns=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ns.displayName="Repeat03";Fs({title:xt().min(1),description:xt().nullable(),body:xt()});function gt(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Yo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function er(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(ht,{control:n.control,name:"title",render:sr}),o.jsx(ht,{control:n.control,name:"description",render:nr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(ht,{control:n.control,name:"body",render:tr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let u;return e[10]!==n||e[11]!==a?(u=o.jsx(io,{...n,children:a}),e[10]=n,e[11]=a,e[12]=u):u=e[12],u}function tr(t){const{field:e}=t;return o.jsx(Pt,{children:o.jsx(Lt,{children:o.jsx(wt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function nr(t){const{field:e}=t;return o.jsxs(Pt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Lt,{children:o.jsx(Dt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function sr(t){const{field:e}=t;return o.jsxs(Pt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Lt,{children:o.jsx(Dt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function or(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=$t().location.href,{org:l}=X(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const u=Z(a),d=Rt(n,"PROMPT",s,u),f=At(n,"PROMPT",u),m=f.update.isPending;let x;e[3]!==d?(x=d?{title:d.title,description:d.description??null,body:gt(d)}:void 0,e[3]=d,e[4]=x):x=e[4];let p;e[5]!==x?(p={values:x},e[5]=x,e[6]=p):p=e[6];const h=Vs(p);let g;e[7]!==h||e[8]!==d?(g=()=>{d&&h.reset({title:d.title,description:d.description??null,body:gt(d)})},e[7]=h,e[8]=d,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==h||e[12]!==s?(j=h.handleSubmit(async M=>{const L=await f.update.mutateAsync({id:s,data:{title:M.title,description:M.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:M.body}}]}});h.reset({title:L.title,description:L.description??null,body:gt(L)})}),e[10]=f.update,e[11]=h,e[12]=s,e[13]=j):j=e[13];const y=j;if(!d){let M;return e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(_n,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=M):M=e[14],M}let S;e[15]!==d.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[15]=d.title,e[16]=S):S=e[16];let v;e[17]!==d.description?(v=d.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[17]=d.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx(En,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let _;e[24]!==h.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(_=o.jsx(Tn,{onSave:N,onUndo:b,isDirty:h.formState.isDirty,isSaving:m}),e[24]=h.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=_):_=e[28];let I;e[29]!==d.title||e[30]!==r?(I=o.jsx(Mt,{title:d.title,url:r,icon:"description"}),e[29]=d.title,e[30]=r,e[31]=I):I=e[31];let E;e[32]!==_||e[33]!==I?(E=o.jsxs(zt,{children:[_,I]}),e[32]=_,e[33]=I,e[34]=E):E=e[34];let R;e[35]!==h?(R=o.jsx("div",{className:"h-full",children:o.jsx(er,{form:h})}),e[35]=h,e[36]=R):R=e[36];let P;return e[37]!==E||e[38]!==R||e[39]!==w?(P=o.jsxs(ce,{children:[w,E,R]}),e[37]=E,e[38]=R,e[39]=w,e[40]=P):P=e[40],P}function rr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Yo(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(_n,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(or,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const ir=Bs("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function lr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(ir({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function ar(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const mn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function dr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=mo(r);if(!l.isAuthenticated){let u;return e[2]!==l.supportsOAuth||e[3]!==i?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(po,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(xo,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(ur,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function ur({toolName:t,connectionId:e}){const s=$t().location.href,{replayId:i}=Us({strict:!1}),r=(()=>{if(!i)return null;const $=`replay-${i}`,T=sessionStorage.getItem($);if(!T)return null;sessionStorage.removeItem($);try{return JSON.parse(T)}catch{return null}})(),l=(()=>{if(!r)return null;const $={};for(const[T,A]of Object.entries(r))A!==null&&typeof A=="object"?$[T]=JSON.stringify(A,null,2):$[T]=A;return $})(),[c,a]=k.useState(l??{}),[u,d]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=X(),S=Ye(e),v=Z({connectionId:e,orgId:y.id}),w=qt({client:v}),N=w.data?.tools?.find($=>$.name===t),_=N?.inputSchema?.properties,I=_?Object.keys(_):[],E=I.length>0,R={};if(E&&N?.inputSchema?.properties)for(const $ of I)R[$]=N.inputSchema.required?.includes($)?"":void 0;const P=$=>Object.prototype.hasOwnProperty.call(c,$),M=async()=>{g(!0),p(null),m(null),j(null);const $=performance.now();try{if(!v)throw new Error("MCP client is not available");const T=E?{...R,...c}:(()=>{const V=u.trim();if(!V)return{};const J=JSON.parse(V);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();E&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([V,J])=>{if((J.type==="object"||J.type==="array")&&typeof T[V]=="string")try{T[V]=JSON.parse(T[V])}catch{}});const A=await v.callTool({name:t,arguments:T}),B=A.structuredContent??A,oe=performance.now(),Q=Math.round(oe-$);m(B);const se=JSON.stringify(B),K=new TextEncoder().encode(se).length;j({duration:`${Q}ms`,bytes:`${K} bytes`,tokens:`~${Math.ceil(K/4)} tokens`,cost:"$0.0000"})}catch(T){const A=T instanceof Error?T.message:String(T);p(A||"Unknown error occurred");const B=performance.now();j({duration:`${Math.round(B-$)}ms`})}finally{g(!1)}},L=($,T)=>{a(A=>({...A,[$]:T}))},D=()=>{m(null),p(null),j(null)},H=N?.name??mn(t),ee=o.jsx(Pn,{children:o.jsxs(Ln,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps",params:{org:y.slug,project:Ke},children:"Connections"})})}),o.jsx(Ge,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps/$connectionId",params:{org:y.slug,project:Ke,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(Ge,{})]}),o.jsx($e,{children:o.jsx(Dn,{children:H})})]})});return o.jsxs(ce,{breadcrumb:ee,children:[o.jsx(zt,{children:o.jsx(Mt,{title:N?.name??mn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(et,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Me,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:E&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([$,T])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[$,N.inputSchema?.required?.includes($)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:T.type})]}),T.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:T.description}),T.type==="object"||T.type==="array"?o.jsx(wt,{className:"font-mono text-xs",value:P($)?c[$]??"":R[$]??"",onChange:A=>L($,A.target.value),placeholder:`Enter ${$} as JSON...`,rows:3}):T.type==="boolean"?o.jsxs(On,{value:P($)?String(c[$]??""):"",onValueChange:A=>L($,A==="true"),children:[o.jsx(Rn,{children:o.jsx(An,{placeholder:"Select true or false..."})}),o.jsxs(Mn,{children:[o.jsx(Nt,{value:"true",children:"true"}),o.jsx(Nt,{value:"false",children:"false"})]})]}):o.jsx(Dt,{value:P($)?c[$]??"":R[$]??"",onChange:A=>L($,A.target.value),placeholder:`Enter ${$}...`})]},$)):N?.inputSchema&&!E?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(wt,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:$=>d($.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ao,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Xn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(es,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(U,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Me,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Bt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Wt,{children:o.jsxs(Ht,{children:[o.jsx(Ft,{asChild:!0,children:o.jsx(U,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:D,disabled:!f&&!x,children:o.jsx(Ut,{size:14})})}),o.jsx(Vt,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),x&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(lr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(co,{className:"h-4 w-4"}),o.jsx(cr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(ar,{className:"text-xs text-destructive",children:x})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Te,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(U,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),Sn.success("Copied to clipboard")},children:o.jsx(fo,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(uo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function fr(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=re(i).connectionId;if(!Ye(l)||!l){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let u;return e[3]!==l||e[4]!==s||e[5]!==n?(u=o.jsx(k.Suspense,{fallback:a,children:o.jsx(dr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=u):u=e[6],u}const pn=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},en=(t=>t?pn(t):pn),mr=t=>t;function Ct(t,e=mr){const n=W.useSyncExternalStore(t.subscribe,W.useCallback(()=>e(t.getState()),[t,e]),W.useCallback(()=>e(t.getInitialState()),[t,e]));return W.useDebugValue(n),n}const pr=t=>{const e=en(t),n=s=>Ct(e,s);return Object.assign(n,e),n},xr=(t=>pr);function ss(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const kt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return kt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return kt(s)(n)}}}},hr=(t,e)=>(n,s,i)=>{let r={storage:ss(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return kt(d.getItem.bind(d))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,u.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},os=hr,{useSyncExternalStoreWithSelector:gr}=qs,br=t=>t;function jr(t,e=br,n){const s=gr(t.subscribe,t.getState,t.getInitialState,e,n);return W.useDebugValue(s),s}const xn=t=>Symbol.iterator in t,hn=t=>"entries"in t,gn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},vr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function yr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:xn(t)&&xn(e)?hn(t)&&hn(e)?gn(t,e):vr(t,e):gn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Sr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{aW as G,r as k,o as Fs,s as xt,c as C,j as o,bt as $t,u as X,k as Vs,x as Bs,a as re,f as Us,aN as qe,O as Ke,t as Sn,bv as W,bG as qs,au as Ks,a3 as Tt,an as te,av as wn,aw as Js,am as Et,as as Gs,ax as Nn,al as Cn,aD as Xs,aE as Zs,aq as kn,aF as Qs,bH as Ot,bI as Ys,at as eo,b1 as to,a$ as no,bJ as so,bK as In}from"./index-Bn2rDd42.js";import{E as _n}from"./empty-state--JD6ZxUc.js";import{E as $n}from"./error-boundary-DlgelpJG.js";import{d as Rt,u as At,f as Ye,h as oo}from"./use-connection-CVk8Bzpz.js";import{u as Z,i as ro}from"./constants-DuSOM18S.js";import{S as Tn,P as Mt}from"./index-a2nqbblp.js";import{F as ht,a as io,b as Pt,d as Lt}from"./form-CSsv2IBt.js";import{I as Dt}from"./input-DBvMwxwE.js";import{T as wt}from"./textarea-CKlKOzV4.js";import{b as En,V as zt,a as ce}from"./layout-ZTsfxACA.js";import{c as O}from"./utils-Ckc2UwOp.js";import{B as U}from"./button-CcO5M7F7.js";import{S as On,a as Rn,b as An,c as Mn,d as Nt}from"./select-J2aavKNi.js";import{I as et,c as Wt,b as Ht,T as Ft,a as Vt,n as lo}from"./integration-icon-C8seGsuO.js";import{i as co}from"./AlertCircle-C_hR5usO.js";import{s as ao,M as Te}from"./monaco-editor-D7Ghoc8y.js";import{i as uo}from"./Code01-h_k8K-1e.js";import{a as fo}from"./Copy01-jvqvZrKj.js";import{i as Me}from"./Loading01-D8zw0cyg.js";import{i as Bt}from"./Play-Yhg_pcqU.js";import{s as Ut}from"./XClose-BFt2trBc.js";import{B as Pn,a as Ln,b as $e,d as Je,e as Ge,c as Dn}from"./breadcrumb-B_Yxwj4p.js";import{u as mo,O as po,M as xo,F as ho,v as go}from"./index-DJCm-wAr.js";import{d as qt,b as Kt,a as Jt}from"./use-mcp-tools-Ddi2i1Nb.js";import{E as Gt}from"./empty-state-Ct1fZFlf.js";import{D as bo,a as jo}from"./use-binding-Dgjl_Htk.js";import{b as zn}from"./use-virtual-mcp-C83o4Rih.js";import{b as vo,a as dn,R as yo}from"./resizable-CdUSPFqv.js";import{S as tt}from"./spinner-Bn-tqgsf.js";import{V as So}from"./view-mode-toggle-CJkT6m07.js";import{N as wo,S as No,a as Co,c as ko,m as Ve,P as Io,b as _o,R as $o,d as To,e as Eo,f as un,E as Oo,g as Ro}from"./index-CZtqakWK.js";import{b as Ao,c as Mo,d as Po,e as Lo,a as Do,D as zo}from"./dialog-B_iTVR3h.js";import"./index-Bo7hWTur.js";import{s as Wn}from"./Plus-BBD2SckJ.js";import{n as Wo}from"./Calendar-Dnf0_EY9.js";import{i as Xt}from"./Check-Sa4xK5Hg.js";import{i as Ho}from"./DotsHorizontal-CQJNqVgu.js";import{a as Fo}from"./Tool01-DF-lT9RC.js";import{D as Vo,a as Bo,b as Uo,c as fn}from"./dropdown-menu-BTPpCOPE.js";import{T as qo,R as Ko,e as Jo,f as Hn}from"./use-deco-chat-open-CfZI9mqc.js";import{i as Go}from"./ChevronRight-By4KEpZh.js";import{B as _e}from"./badge-BklHLRcK.js";import{i as Fn}from"./X-CuhyLwhM.js";import"./useMutation-CnTeRHmv.js";import"./Pin01-DWsvacVo.js";import"./use-organization-settings-DHZKDAPt.js";import"./label-BjQxQJkg.js";import"./index-BHu7Lc_d.js";import"./index-DZ7G-bvr.js";import"./ChevronDown-DmXLJeAy.js";import"./infiniteQueryObserver-VnhrjjoH.js";import"./mcp-oauth-ZUujauBG.js";import"./File06-WU23pV9H.js";import"./index-CHcJPAjT.js";import"./constants-QC26G_cT.js";import"./registry-utils-BsLp7zXK.js";import"./extract-connection-data-BM37afPK.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-5UUqPBO7.js";import"./circle-alert-BcHtOytY.js";import"./useQuery-Ct96KcZp.js";import"./binder-ak1AkjZY.js";import"./popover-BkKSdvGf.js";import"./use-mcp-prompts-Cn7tm6ug.js";import"./ArrowUp-DnJUZ1OS.js";import"./Edit01-BT8zEtQL.js";import"./Users03-oV4Gx6fu.js";import"./Terminal-CyioLjuI.js";import"./localstorage-keys-BhunmwZg.js";import"./SearchMd-CGuwiAQe.js";import"./Trash01-CLqhrRia.js";import"./use-create-virtual-mcp-BpXLuk-p.js";import"./use-llm-Ca3pgrIB.js";import"./Grid01-CSAsqBFD.js";import"./Image01-BnbXZOf7.js";const Vn=G("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const Bn=G("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const Zt=G("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const Qt=G("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Xo=G("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Zo=G("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Qo=G("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Un=G("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const qn=G("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Kn=G("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const Jn=G("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const Gn=G("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),Yt=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M12 8v4m0 4h.01M2 8.523v6.954c0 .245 0 .367.028.482a1 1 0 0 0 .12.29c.061.1.148.187.32.36l4.923 4.922c.173.173.26.26.36.322.09.054.188.095.29.12.115.027.237.027.482.027h6.954c.245 0 .367 0 .482-.028a.998.998 0 0 0 .29-.12c.1-.061.187-.148.36-.32l4.922-4.923c.173-.173.26-.26.322-.36a.998.998 0 0 0 .12-.29c.027-.115.027-.237.027-.482V8.523c0-.245 0-.367-.028-.482a.998.998 0 0 0-.12-.29c-.061-.1-.148-.187-.32-.36L16.608 2.47c-.173-.173-.26-.26-.36-.322a1 1 0 0 0-.29-.12C15.844 2 15.722 2 15.477 2H8.523c-.245 0-.367 0-.482.028a1 1 0 0 0-.29.12c-.1.061-.187.148-.36.32L2.47 7.392c-.173.173-.26.26-.322.36a1 1 0 0 0-.12.29C2 8.156 2 8.278 2 8.523Z"}));Yt.displayName="AlertOctagon";const Xn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));Xn.displayName="Box";const Zn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));Zn.displayName="ClockFastForward";const Qn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));Qn.displayName="Code02";const Be=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Be.displayName="Columns01";const Yn=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));Yn.displayName="CornerDownRight";const es=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));es.displayName="Database01";const ts=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));ts.displayName="GitBranch01";const ns=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ns.displayName="Repeat03";Fs({title:xt().min(1),description:xt().nullable(),body:xt()});function gt(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Yo(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function er(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(ht,{control:n.control,name:"title",render:sr}),o.jsx(ht,{control:n.control,name:"description",render:nr})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(ht,{control:n.control,name:"body",render:tr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let u;return e[10]!==n||e[11]!==a?(u=o.jsx(io,{...n,children:a}),e[10]=n,e[11]=a,e[12]=u):u=e[12],u}function tr(t){const{field:e}=t;return o.jsx(Pt,{children:o.jsx(Lt,{children:o.jsx(wt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function nr(t){const{field:e}=t;return o.jsxs(Pt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Lt,{children:o.jsx(Dt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function sr(t){const{field:e}=t;return o.jsxs(Pt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Lt,{children:o.jsx(Dt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function or(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=$t().location.href,{org:l}=X(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const u=Z(a),d=Rt(n,"PROMPT",s,u),f=At(n,"PROMPT",u),m=f.update.isPending;let x;e[3]!==d?(x=d?{title:d.title,description:d.description??null,body:gt(d)}:void 0,e[3]=d,e[4]=x):x=e[4];let p;e[5]!==x?(p={values:x},e[5]=x,e[6]=p):p=e[6];const h=Vs(p);let g;e[7]!==h||e[8]!==d?(g=()=>{d&&h.reset({title:d.title,description:d.description??null,body:gt(d)})},e[7]=h,e[8]=d,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==h||e[12]!==s?(j=h.handleSubmit(async M=>{const L=await f.update.mutateAsync({id:s,data:{title:M.title,description:M.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:M.body}}]}});h.reset({title:L.title,description:L.description??null,body:gt(L)})}),e[10]=f.update,e[11]=h,e[12]=s,e[13]=j):j=e[13];const y=j;if(!d){let M;return e[14]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(_n,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=M):M=e[14],M}let S;e[15]!==d.title?(S=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:d.title}),e[15]=d.title,e[16]=S):S=e[16];let v;e[17]!==d.description?(v=d.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:d.description})]}):null,e[17]=d.description,e[18]=v):v=e[18];let w;e[19]!==S||e[20]!==v?(w=o.jsx(En,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[S,v]})}),e[19]=S,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==y?(N=()=>{y()},e[22]=y,e[23]=N):N=e[23];let _;e[24]!==h.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(_=o.jsx(Tn,{onSave:N,onUndo:b,isDirty:h.formState.isDirty,isSaving:m}),e[24]=h.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=_):_=e[28];let I;e[29]!==d.title||e[30]!==r?(I=o.jsx(Mt,{title:d.title,url:r,icon:"description"}),e[29]=d.title,e[30]=r,e[31]=I):I=e[31];let E;e[32]!==_||e[33]!==I?(E=o.jsxs(zt,{children:[_,I]}),e[32]=_,e[33]=I,e[34]=E):E=e[34];let R;e[35]!==h?(R=o.jsx("div",{className:"h-full",children:o.jsx(er,{form:h})}),e[35]=h,e[36]=R):R=e[36];let P;return e[37]!==E||e[38]!==R||e[39]!==w?(P=o.jsxs(ce,{children:[w,E,R]}),e[37]=E,e[38]=R,e[39]=w,e[40]=P):P=e[40],P}function rr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Yo(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(_n,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(or,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const ir=Bs("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function lr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=O(ir({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function ar(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=O("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const mn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function dr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=mo(r);if(!l.isAuthenticated){let u;return e[2]!==l.supportsOAuth||e[3]!==i?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(po,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(xo,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=u):u=e[4],u}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(ur,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function ur({toolName:t,connectionId:e}){const s=$t().location.href,{replayId:i}=Us({strict:!1}),r=(()=>{if(!i)return null;const $=`replay-${i}`,T=sessionStorage.getItem($);if(!T)return null;sessionStorage.removeItem($);try{return JSON.parse(T)}catch{return null}})(),l=(()=>{if(!r)return null;const $={};for(const[T,A]of Object.entries(r))A!==null&&typeof A=="object"?$[T]=JSON.stringify(A,null,2):$[T]=A;return $})(),[c,a]=k.useState(l??{}),[u,d]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[x,p]=k.useState(null),[h,g]=k.useState(!1),[b,j]=k.useState(null),{org:y}=X(),S=Ye(e),v=Z({connectionId:e,orgId:y.id}),w=qt({client:v}),N=w.data?.tools?.find($=>$.name===t),_=N?.inputSchema?.properties,I=_?Object.keys(_):[],E=I.length>0,R={};if(E&&N?.inputSchema?.properties)for(const $ of I)R[$]=N.inputSchema.required?.includes($)?"":void 0;const P=$=>Object.prototype.hasOwnProperty.call(c,$),M=async()=>{g(!0),p(null),m(null),j(null);const $=performance.now();try{if(!v)throw new Error("MCP client is not available");const T=E?{...R,...c}:(()=>{const V=u.trim();if(!V)return{};const J=JSON.parse(V);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();E&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([V,J])=>{if((J.type==="object"||J.type==="array")&&typeof T[V]=="string")try{T[V]=JSON.parse(T[V])}catch{}});const A=await v.callTool({name:t,arguments:T}),B=A.structuredContent??A,oe=performance.now(),Q=Math.round(oe-$);m(B);const se=JSON.stringify(B),K=new TextEncoder().encode(se).length;j({duration:`${Q}ms`,bytes:`${K} bytes`,tokens:`~${Math.ceil(K/4)} tokens`,cost:"$0.0000"})}catch(T){const A=T instanceof Error?T.message:String(T);p(A||"Unknown error occurred");const B=performance.now();j({duration:`${Math.round(B-$)}ms`})}finally{g(!1)}},L=($,T)=>{a(A=>({...A,[$]:T}))},D=()=>{m(null),p(null),j(null)},H=N?.name??mn(t),ee=o.jsx(Pn,{children:o.jsxs(Ln,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps",params:{org:y.slug,project:Ke},children:"Connections"})})}),o.jsx(Ge,{}),S&&o.jsxs(o.Fragment,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps/$connectionId",params:{org:y.slug,project:Ke,connectionId:e},search:{tab:"tools"},children:S.title})})}),o.jsx(Ge,{})]}),o.jsx($e,{children:o.jsx(Dn,{children:H})})]})});return o.jsxs(ce,{breadcrumb:ee,children:[o.jsx(zt,{children:o.jsx(Mt,{title:N?.name??mn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(et,{icon:S?.icon||null,name:S?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Me,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:E&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([$,T])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[$,N.inputSchema?.required?.includes($)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:T.type})]}),T.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:T.description}),T.type==="object"||T.type==="array"?o.jsx(wt,{className:"font-mono text-xs",value:P($)?c[$]??"":R[$]??"",onChange:A=>L($,A.target.value),placeholder:`Enter ${$} as JSON...`,rows:3}):T.type==="boolean"?o.jsxs(On,{value:P($)?String(c[$]??""):"",onValueChange:A=>L($,A==="true"),children:[o.jsx(Rn,{children:o.jsx(An,{placeholder:"Select true or false..."})}),o.jsxs(Mn,{children:[o.jsx(Nt,{value:"true",children:"true"}),o.jsx(Nt,{value:"false",children:"false"})]})]}):o.jsx(Dt,{value:P($)?c[$]??"":R[$]??"",onChange:A=>L($,A.target.value),placeholder:`Enter ${$}...`})]},$)):N?.inputSchema&&!E?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(wt,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:$=>d($.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ao,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(Xn,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(es,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(U,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:M,disabled:h,children:h?o.jsxs(o.Fragment,{children:[o.jsx(Me,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Bt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Wt,{children:o.jsxs(Ht,{children:[o.jsx(Ft,{asChild:!0,children:o.jsx(U,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:D,disabled:!f&&!x,children:o.jsx(Ut,{size:14})})}),o.jsx(Vt,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),x&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(lr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(co,{className:"h-4 w-4"}),o.jsx(cr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(ar,{className:"text-xs text-destructive",children:x})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Te,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(U,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),Sn.success("Copied to clipboard")},children:o.jsx(fo,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(uo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function fr(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=re(i).connectionId;if(!Ye(l)||!l){let d;return e[1]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=d):d=e[1],d}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let u;return e[3]!==l||e[4]!==s||e[5]!==n?(u=o.jsx(k.Suspense,{fallback:a,children:o.jsx(dr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=u):u=e[6],u}const pn=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},en=(t=>t?pn(t):pn),mr=t=>t;function Ct(t,e=mr){const n=W.useSyncExternalStore(t.subscribe,W.useCallback(()=>e(t.getState()),[t,e]),W.useCallback(()=>e(t.getInitialState()),[t,e]));return W.useDebugValue(n),n}const pr=t=>{const e=en(t),n=s=>Ct(e,s);return Object.assign(n,e),n},xr=(t=>pr);function ss(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const kt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return kt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return kt(s)(n)}}}},hr=(t,e)=>(n,s,i)=>{let r={storage:ss(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(S=>{var v;return S((v=s())!=null?v:x)});const y=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return kt(d.getItem.bind(d))(r.name).then(S=>{if(S)if(typeof S.version=="number"&&S.version!==r.version){if(r.migrate){const v=r.migrate(S.state,S.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,S.state];return[!1,void 0]}).then(S=>{var v;if(j!==c)return;const[w,N]=S;if(p=r.merge(N,(v=s())!=null?v:x),n(p,!0),w)return f()}).then(()=>{j===c&&(y?.(p,void 0),p=s(),l=!0,u.forEach(S=>S(p)))}).catch(S=>{j===c&&y?.(void 0,S)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},os=hr,{useSyncExternalStoreWithSelector:gr}=qs,br=t=>t;function jr(t,e=br,n){const s=gr(t.subscribe,t.getState,t.getInitialState,e,n);return W.useDebugValue(s),s}const xn=t=>Symbol.iterator in t,hn=t=>"entries"in t,gn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},vr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function yr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:xn(t)&&xn(e)?hn(t)&&hn(e)?gn(t,e):vr(t,e):gn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Sr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -23,4 +23,4 @@ export default async function(input: Input): Promise<Output> {
23
23
  return {
24
24
  result: input,
25
25
  };
26
- }`;s(n.name,{action:{...n.action,transformCode:I}}),l(Bl)},e[2]=m,e[3]=n.action,e[4]=n.name,e[5]=s,e[6]=x):x=e[6];const p=x;let h;e[7]!==n.action||e[8]!==n.name||e[9]!==s?(h=(_,I)=>{s(n.name,{action:{...n.action,transformCode:_},...I?{outputSchema:I}:{}})},e[7]=n.action,e[8]=n.name,e[9]=s,e[10]=h):h=e[10];const g=h;if("code"in n.action&&n.action.code)return null;const b=r?"flex-1 min-h-0 overflow-hidden":"shrink-0";let j;e[11]!==b?(j=O("flex flex-col flex-1 min-h-0 overflow-hidden border-b border-border",b),e[11]=b,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Transform Code"}),e[13]=y):y=e[13];let S;e[14]!==r?(S=o.jsxs("div",{className:"flex items-center justify-between",children:[y,r?o.jsx(Qt,{size:14,className:"text-muted-foreground"}):o.jsx(Zt,{size:14,className:"text-muted-foreground"})]}),e[14]=r,e[15]=S):S=e[15];let v;e[16]!==S||e[17]!==p?(v=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:p,children:S}),e[16]=S,e[17]=p,e[18]=v):v=e[18];let w;e[19]!==g||e[20]!==r||e[21]!==n.name||e[22]!==i||e[23]!==d?(w=r&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Te,{code:d,language:"typescript",readOnly:i!==void 0,onSave:g,height:"100%"},`transform-code-${n.name}-${i}`)}),e[19]=g,e[20]=r,e[21]=n.name,e[22]=i,e[23]=d,e[24]=w):w=e[24];let N;return e[25]!==j||e[26]!==v||e[27]!==w?(N=o.jsxs("div",{className:j,children:[v,w]}),e[25]=j,e[26]=v,e[27]=w,e[28]=N):N=e[28],N}function Bl(t){return!t}function Ul(t){return!t}function ql(t){const e=C.c(24),{step:n}=t,[s,i]=k.useState(!1),{updateStep:r}=q(),l="code"in n.action&&n.action.code?n.action.code:null,c=z();let a;e[0]!==n.action||e[1]!==n.name||e[2]!==r?(a=(j,y)=>{r(n.name,{action:{...n.action,code:j},...y?{outputSchema:y}:{}})},e[0]=n.action,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const u=a;if(!l)return null;const d=s?"flex-1 min-h-0 overflow-hidden":"shrink-0";let f;e[4]!==d?(f=O("flex flex-col border-b border-border",d),e[4]=d,e[5]=f):f=e[5];let m;e[6]!==s?(m=()=>i(!s),e[6]=s,e[7]=m):m=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Step Code"}),e[8]=x):x=e[8];let p;e[9]!==s?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[x,s?o.jsx(Qt,{size:14,className:"text-muted-foreground"}):o.jsx(Zt,{size:14,className:"text-muted-foreground"})]}),e[9]=s,e[10]=p):p=e[10];let h;e[11]!==m||e[12]!==p?(h=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:m,children:p}),e[11]=m,e[12]=p,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==u||e[16]!==s||e[17]!==n.name||e[18]!==c?(g=s&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Te,{onSave:(j,y)=>u(j,y),code:l,language:"typescript",height:"100%",readOnly:c!==void 0},`step-code-${n.name}-${c}`)}),e[14]=l,e[15]=u,e[16]=s,e[17]=n.name,e[18]=c,e[19]=g):g=e[19];let b;return e[20]!==f||e[21]!==h||e[22]!==g?(b=o.jsxs("div",{className:f,children:[h,g]}),e[20]=f,e[21]=h,e[22]=g,e[23]=b):b=e[23],b}function Ue(t){if(Array.isArray(t.type))return t.type.map(n=>Ue({...t,type:n})).join(" | ");switch(t.type){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return t.items?`${Ue(t.items)}[]`:"unknown[]";case"object":return t.properties?`{ ${Object.entries(t.properties).map(([s,i])=>{const r=Ue(i),l=!t.required?.includes(s);return`${s}${l?"?":""}: ${r}`}).join("; ")} }`:"Record<string, unknown>";case"null":return"null";default:return"unknown"}}function Kl(t){switch(t){case"success":return o.jsxs(_e,{variant:"success",className:"gap-1",children:[o.jsx(Xt,{size:11}),"Success"]});case"error":case"failed":return o.jsxs(_e,{variant:"destructive",className:"gap-1",children:[o.jsx(Yt,{size:11}),"Error"]});case"running":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),"Running"]});case"enqueued":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),"On hold"]});case"cancelled":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Fn,{size:11}),"Cancelled"]});default:return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),t]})}}function Jl(t){return`Run #${t.slice(-4).toUpperCase()}`}function Gl(t){const e=C.c(21),{className:n}=t,{executions:s,isLoading:i}=Pr(),{setShowExecutionsList:r}=tn(),{setTrackingExecutionId:l}=q(),c=z();let a;e[0]!==l?(a=y=>{l(y)},e[0]=l,e[1]=a):a=e[1];const u=a;let d;e[2]!==r?(d=()=>{r(!1)},e[2]=r,e[3]=d):d=e[3];const f=d;let m;e[4]!==n?(m=O("flex flex-col h-full bg-sidebar border-l border-border",n),e[4]=n,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:"Runs"}),e[6]=x):x=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(Fn,{size:11}),e[7]=p):p=e[7];let h;e[8]!==f?(h=o.jsxs("div",{className:"flex items-center h-12 px-5 border-b border-border shrink-0",children:[x,o.jsx(U,{variant:"ghost",size:"icon",className:"size-7",onClick:f,children:p})]}),e[8]=f,e[9]=h):h=e[9];let g;e[10]!==s||e[11]!==u||e[12]!==i||e[13]!==c?(g=i?o.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading executions..."}):s.map((y,S)=>o.jsx(Xl,{execution:y,isSelected:y.id===c,isFirst:S===0,onSelect:()=>u(y.id)},y.id)),e[10]=s,e[11]=u,e[12]=i,e[13]=c,e[14]=g):g=e[14];let b;e[15]!==g?(b=o.jsx("div",{className:"flex-1 overflow-auto",children:g}),e[15]=g,e[16]=b):b=e[16];let j;return e[17]!==m||e[18]!==h||e[19]!==b?(j=o.jsxs("div",{className:m,children:[h,b]}),e[17]=m,e[18]=h,e[19]=b,e[20]=j):j=e[20],j}function Xl(t){const e=C.c(17),{execution:n,isSelected:s,isFirst:i,onSelect:r}=t,l=s&&"bg-accent/50",c=i&&s&&"bg-accent/50",a=!s&&"hover:bg-accent/30";let u;e[0]!==l||e[1]!==c||e[2]!==a?(u=O("flex flex-col justify-center h-[60px] px-4 border-b border-border cursor-pointer transition-colors",l,c,a),e[0]=l,e[1]=c,e[2]=a,e[3]=u):u=e[3];let d;e[4]!==n.status?(d=Kl(n.status),e[4]=n.status,e[5]=d):d=e[5];let f;e[6]!==n.id?(f=Jl(n.id),e[6]=n.id,e[7]=f):f=e[7];let m;e[8]!==f?(m=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let x;e[10]!==d||e[11]!==m?(x=o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[d,m]}),e[10]=d,e[11]=m,e[12]=x):x=e[12];let p;return e[13]!==r||e[14]!==u||e[15]!==x?(p=o.jsx("div",{className:u,onClick:r,children:x}),e[13]=r,e[14]=u,e[15]=x,e[16]=p):p=e[16],p}function Ms(t){const e=C.c(11),{itemId:n}=t,[s,i]=k.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=r):r=e[0];const{connectionId:l}=re(r),c=l??"no-connection",{org:a}=X(),u=l??null;let d;e[1]!==a.id||e[2]!==u?(d={connectionId:u,orgId:a.id},e[1]=a.id,e[2]=u,e[3]=d):d=e[3];const f=Z(d),m=Rt(c,"WORKFLOW",n,f),x=At(c,"WORKFLOW",f);let p;e[4]!==x||e[5]!==n?(p=async b=>{i(!0),await x.update.mutateAsync({id:n,data:b}).finally(()=>{i(!1)})},e[4]=x,e[5]=n,e[6]=p):p=e[6];const h=p;let g;return e[7]!==s||e[8]!==m||e[9]!==h?(g={item:m,update:h,isUpdating:s},e[7]=s,e[8]=m,e[9]=h,e[10]=g):g=e[10],g}function Zl(t){const e=C.c(18),{workflow:n,onUpdate:s}=t,{setWorkflow:i}=q();let r,l,c,a;if(e[0]!==n.description||e[1]!==n.id||e[2]!==n.steps||e[3]!==n.title){const f={title:n.title,description:n.description,steps:n.steps};r=Te,l=`workflow-${n.id}`,c="100%",a=JSON.stringify(f,null,2),e[0]=n.description,e[1]=n.id,e[2]=n.steps,e[3]=n.title,e[4]=r,e[5]=l,e[6]=c,e[7]=a}else r=e[4],l=e[5],c=e[6],a=e[7];let u;e[8]!==s||e[9]!==i||e[10]!==n?(u=f=>{const m=JSON.parse(f);i({...n,...m}),s(m)},e[8]=s,e[9]=i,e[10]=n,e[11]=u):u=e[11];let d;return e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==a||e[16]!==u?(d=o.jsx(r,{height:c,code:a,language:"json",onSave:u},l),e[12]=r,e[13]=l,e[14]=c,e[15]=a,e[16]=u,e[17]=d):d=e[17],d}function Ql(){const t=C.c(9),e=z(),{item:n}=ie(e),s=n?.start_at_epoch_ms,i=n?.completed_at_epoch_ms,r=n?.status==="running"&&s&&!i;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Date.now(),t[0]=l):l=t[0];const c=k.useRef(l);let a;t[1]!==r?(a=h=>{if(!r)return Yl;const g=setInterval(()=>{c.current=Date.now(),h()},50);return()=>clearInterval(g)},t[1]=r,t[2]=a):a=t[2];const u=a;let d;t[3]!==r?(d=()=>r?c.current:0,t[3]=r,t[4]=d):d=t[4];const f=d,m=k.useSyncExternalStore(u,f,f),x=i&&s?Math.max(0,i-s):null;let p=null;if(s){let h;t[5]!==s?(h=new Date(s).getTime(),t[5]=s,t[6]=h):h=t[6];const g=h;if(i){let b;t[7]!==i?(b=new Date(i).getTime(),t[7]=i,t[8]=b):b=t[8],p=Math.max(0,b-g)}else r&&(p=Math.max(0,m-g))}return p??x}function Yl(){}function ec(t){if(t<1e3)return`${t}ms`;const e=t/1e3,n=e%60,s=Math.floor(e/60),i=s%60,r=Math.floor(s/60);return r>0?`${r}h ${i}m ${n.toFixed(3)}s`:i>0?`${i}m ${n.toFixed(3)}s`:`${n.toFixed(3)}s`}function tc(){const t=C.c(20),{setTrackingExecutionId:e}=q(),n=z(),s=Ql();let i;t[0]!==s?(i=s!=null?ec(s):null,t[0]=s,t[1]=i):i=t[1];const r=i;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex items-center justify-center h-full w-12",children:o.jsx(so,{className:"w-4 h-4 text-muted-foreground"})}),t[2]=l):l=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("strong",{className:"text-base text-foreground",children:"Run"}),t[3]=c):c=t[3];let a;t[4]!==n?(a=o.jsxs("p",{className:"flex gap-3 items-center h-full",children:[c,o.jsxs("span",{className:"text-sm text-muted-foreground",children:["#",n]})]}),t[4]=n,t[5]=a):a=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Xo,{className:"w-4 h-4 text-muted-foreground"}),t[6]=u):u=t[6];let d;t[7]!==r?(d=o.jsxs("div",{className:"flex items-center gap-1 ml-6",children:[u,o.jsx("span",{className:"text-sm text-muted-foreground",children:r})]}),t[7]=r,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==d?(f=o.jsxs("div",{className:"flex items-center h-full",children:[l,a,d]}),t[9]=a,t[10]=d,t[11]=f):f=t[11];let m;t[12]!==e?(m=()=>e(void 0),t[12]=e,t[13]=m):m=t[13];let x;t[14]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Ot,{className:"w-4 h-4 text-muted-foreground"}),t[14]=x):x=t[14];let p;t[15]!==m?(p=o.jsx(U,{variant:"ghost",size:"xs",onClick:m,children:x}),t[15]=m,t[16]=p):p=t[16];let h;return t[17]!==f||t[18]!==p?(h=o.jsxs("div",{className:"h-10 bg-accent flex items-center justify-between border-b border-border",children:[f,p]}),t[17]=f,t[18]=p,t[19]=h):h=t[19],h}function nc(){const t=C.c(15);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=re(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i,update:r,isUpdating:l}=Ms(s);let c;t[3]!==i?(c=JSON.stringify(i),t[3]=i,t[4]=c):c=t[4];const a=c;if(!i){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ce,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Gt,{icon:o.jsx(qn,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow not found",description:"This workflow may have been deleted or you may not have access to it."})})}),t[5]=m):m=t[5],m}let u;t[6]!==i?(u={workflow:i,trackingExecutionId:void 0,currentStepTab:"input"},t[6]=i,t[7]=u):u=t[7];let d;t[8]!==l||t[9]!==r?(d=o.jsx(sc,{onUpdate:r,isUpdating:l}),t[8]=l,t[9]=r,t[10]=d):d=t[10];let f;return t[11]!==a||t[12]!==u||t[13]!==d?(f=o.jsx(Cr,{initialState:u,children:d},a),t[11]=a,t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function sc(t){const e=C.c(21),{onUpdate:n,isUpdating:s}=t,i=Ee(),r=z(),{viewMode:l,showExecutionsList:c}=tn(),a=Le();let u;e[0]!==n||e[1]!==i?(u=async()=>{await n(i)},e[0]=n,e[1]=i,e[2]=u):u=e[2];const d=u,f=a&&"toolName"in a.action,m=f?a.action.toolName:null,x=f&&!m&&!r,p=!x&&(a||r||!c);let h;e[3]!==d||e[4]!==s||e[5]!==i.description||e[6]!==i.title?(h=o.jsx(Fi,{title:i.title,description:i.description,onSave:d,isSaving:s}),e[3]=d,e[4]=s,e[5]=i.description,e[6]=i.title,e[7]=h):h=e[7];let g;e[8]!==r?(g=r&&o.jsx(tc,{}),e[8]=r,e[9]=g):g=e[9];let b;e[10]!==n||e[11]!==c||e[12]!==p||e[13]!==x||e[14]!==l||e[15]!==i?(b=o.jsx("div",{className:"flex-1 overflow-hidden",children:l==="code"?o.jsx(Zl,{workflow:i,onUpdate:n}):o.jsxs(vo,{direction:"horizontal",className:"flex w-full h-full",children:[o.jsx(dn,{defaultSize:50,minSize:30,children:o.jsx(ll,{})}),o.jsx(yo,{}),o.jsxs(dn,{defaultSize:50,minSize:25,children:[x&&o.jsx(dl,{className:"border-l border-border"}),c&&o.jsx(Gl,{}),p&&o.jsx(Al,{className:"border-l border-border"})]})]})}),e[10]=n,e[11]=c,e[12]=p,e[13]=x,e[14]=l,e[15]=i,e[16]=b):b=e[16];let j;return e[17]!==h||e[18]!==g||e[19]!==b?(j=o.jsx(ce,{children:o.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[h,g,b]})}),e[17]=h,e[18]=g,e[19]=b,e[20]=j):j=e[20],j}function oc(t){const e=C.c(3),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=s):s=e[0];const{connectionId:i}=re(s),l=Rt(i??"no-connection","WORKFLOW_EXECUTION",n,i);let c;return e[1]!==l?(c={item:l},e[1]=l,e[2]=c):c=e[2],c}function rc(){const t=C.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=re(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i}=oc(s);if(!i){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(ce,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Gt,{icon:o.jsx(qn,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow execution not found",description:"This workflow execution may have been deleted or you may not have access to it."})})}),t[3]=c):c=t[3],c}let r;t[4]!==i?(r=JSON.stringify(i,null,2),t[4]=i,t[5]=r):r=t[5];let l;return t[6]!==r?(l=o.jsx(ce,{children:o.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:o.jsx(Te,{height:"100%",code:r,language:"json",readOnly:!0})})}),t[6]=r,t[7]=l):l=t[7],l}const ic={workflow:nc,workflow_execution:rc,prompt:rr};function lc(){const t=C.c(6),e=In();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=re(n),i=decodeURIComponent(s.itemId);let r;t[1]!==e.history?(r=()=>{e.history.back()},t[1]=e.history,t[2]=r):r=t[2];const l=r,c=cc;let a;return t[3]!==l||t[4]!==i?(a=o.jsx(fr,{itemId:i,onBack:l,onUpdate:c}),t[3]=l,t[4]=i,t[5]=a):a=t[5],a}async function cc(t){return Promise.resolve()}function ac(t){return t.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function dc(){const t=C.c(38),e=In();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=re(n),i=s.connectionId,r=decodeURIComponent(s.collectionName),l=decodeURIComponent(s.itemId);let c;t[1]!==e.history?(c=()=>{e.history.back()},t[1]=e.history,t[2]=c):c=t[2];const a=c,u=i??"no-connection",{org:d}=X(),f=Ye(i),m=i??null;let x;t[3]!==d.id||t[4]!==m?(x={connectionId:m,orgId:d.id},t[3]=d.id,t[4]=m,t[5]=x):x=t[5];const p=Z(x),h=At(u,r,p);let g;t[6]!==h||t[7]!==l?(g=async H=>{l&&await h.update.mutateAsync({id:l,data:H})},t[6]=h,t[7]=l,t[8]=g):g=t[8];const b=g;let j;t[9]!==r?(j=r?.toLowerCase(),t[9]=r,t[10]=j):j=t[10];const y=j,S=y&&ic[y];let v;t[11]!==r?(v=ac(r),t[11]=r,t[12]=v):v=t[12];const w=v;let N;t[13]!==d.slug?(N=o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps",params:{org:d.slug,project:Ke},children:"Connections"})})}),t[13]=d.slug,t[14]=N):N=t[14];let _;t[15]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Ge,{}),t[15]=_):_=t[15];let I;t[16]!==r||t[17]!==f||t[18]!==i||t[19]!==d.slug?(I=f&&o.jsxs(o.Fragment,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps/$connectionId",params:{org:d.slug,project:Ke,connectionId:i},search:{tab:r},children:f.title})})}),o.jsx(Ge,{})]}),t[16]=r,t[17]=f,t[18]=i,t[19]=d.slug,t[20]=I):I=t[20];let E;t[21]!==w?(E=o.jsx($e,{children:o.jsx(Dn,{children:w})}),t[21]=w,t[22]=E):E=t[22];let R;t[23]!==E||t[24]!==N||t[25]!==I?(R=o.jsx(Pn,{children:o.jsxs(Ln,{children:[N,_,I,E]})}),t[23]=E,t[24]=N,t[25]=I,t[26]=R):R=t[26];const P=R;if(S){let H;return t[27]!==S||t[28]!==a||t[29]!==b||t[30]!==l?(H=o.jsx(S,{itemId:l,onBack:a,onUpdate:b}),t[27]=S,t[28]=a,t[29]=b,t[30]=l,t[31]=H):H=t[31],H}let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(lo,{size:36,className:"text-muted-foreground"}),t[32]=M):M=t[32];let L;t[33]!==a?(L=o.jsx(Gt,{icon:M,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:a,children:"Go back"}}),t[33]=a,t[34]=L):L=t[34];let D;return t[35]!==P||t[36]!==L?(D=o.jsx(ce,{breadcrumb:P,children:L}),t[35]=P,t[36]=L,t[37]=D):D=t[37],D}function uc(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const n=re(e);if(decodeURIComponent(n.collectionName)==="tools"){let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(lc,{}),t[1]=l):l=t[1],l}let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(dc,{}),t[2]=r):r=t[2],r}function Aa(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(uc,{})})}),t[0]=e):e=t[0],e}export{Aa as default};
26
+ }`;s(n.name,{action:{...n.action,transformCode:I}}),l(Bl)},e[2]=m,e[3]=n.action,e[4]=n.name,e[5]=s,e[6]=x):x=e[6];const p=x;let h;e[7]!==n.action||e[8]!==n.name||e[9]!==s?(h=(_,I)=>{s(n.name,{action:{...n.action,transformCode:_},...I?{outputSchema:I}:{}})},e[7]=n.action,e[8]=n.name,e[9]=s,e[10]=h):h=e[10];const g=h;if("code"in n.action&&n.action.code)return null;const b=r?"flex-1 min-h-0 overflow-hidden":"shrink-0";let j;e[11]!==b?(j=O("flex flex-col flex-1 min-h-0 overflow-hidden border-b border-border",b),e[11]=b,e[12]=j):j=e[12];let y;e[13]===Symbol.for("react.memo_cache_sentinel")?(y=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Transform Code"}),e[13]=y):y=e[13];let S;e[14]!==r?(S=o.jsxs("div",{className:"flex items-center justify-between",children:[y,r?o.jsx(Qt,{size:14,className:"text-muted-foreground"}):o.jsx(Zt,{size:14,className:"text-muted-foreground"})]}),e[14]=r,e[15]=S):S=e[15];let v;e[16]!==S||e[17]!==p?(v=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:p,children:S}),e[16]=S,e[17]=p,e[18]=v):v=e[18];let w;e[19]!==g||e[20]!==r||e[21]!==n.name||e[22]!==i||e[23]!==d?(w=r&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Te,{code:d,language:"typescript",readOnly:i!==void 0,onSave:g,height:"100%"},`transform-code-${n.name}-${i}`)}),e[19]=g,e[20]=r,e[21]=n.name,e[22]=i,e[23]=d,e[24]=w):w=e[24];let N;return e[25]!==j||e[26]!==v||e[27]!==w?(N=o.jsxs("div",{className:j,children:[v,w]}),e[25]=j,e[26]=v,e[27]=w,e[28]=N):N=e[28],N}function Bl(t){return!t}function Ul(t){return!t}function ql(t){const e=C.c(24),{step:n}=t,[s,i]=k.useState(!1),{updateStep:r}=q(),l="code"in n.action&&n.action.code?n.action.code:null,c=z();let a;e[0]!==n.action||e[1]!==n.name||e[2]!==r?(a=(j,y)=>{r(n.name,{action:{...n.action,code:j},...y?{outputSchema:y}:{}})},e[0]=n.action,e[1]=n.name,e[2]=r,e[3]=a):a=e[3];const u=a;if(!l)return null;const d=s?"flex-1 min-h-0 overflow-hidden":"shrink-0";let f;e[4]!==d?(f=O("flex flex-col border-b border-border",d),e[4]=d,e[5]=f):f=e[5];let m;e[6]!==s?(m=()=>i(!s),e[6]=s,e[7]=m):m=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:"Step Code"}),e[8]=x):x=e[8];let p;e[9]!==s?(p=o.jsxs("div",{className:"flex items-center justify-between",children:[x,s?o.jsx(Qt,{size:14,className:"text-muted-foreground"}):o.jsx(Zt,{size:14,className:"text-muted-foreground"})]}),e[9]=s,e[10]=p):p=e[10];let h;e[11]!==m||e[12]!==p?(h=o.jsx("div",{className:"p-5 shrink-0 cursor-pointer hover:bg-accent/50 transition-colors",onClick:m,children:p}),e[11]=m,e[12]=p,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==u||e[16]!==s||e[17]!==n.name||e[18]!==c?(g=s&&o.jsx("div",{className:"flex-1 min-h-0",children:o.jsx(Te,{onSave:(j,y)=>u(j,y),code:l,language:"typescript",height:"100%",readOnly:c!==void 0},`step-code-${n.name}-${c}`)}),e[14]=l,e[15]=u,e[16]=s,e[17]=n.name,e[18]=c,e[19]=g):g=e[19];let b;return e[20]!==f||e[21]!==h||e[22]!==g?(b=o.jsxs("div",{className:f,children:[h,g]}),e[20]=f,e[21]=h,e[22]=g,e[23]=b):b=e[23],b}function Ue(t){if(Array.isArray(t.type))return t.type.map(n=>Ue({...t,type:n})).join(" | ");switch(t.type){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"array":return t.items?`${Ue(t.items)}[]`:"unknown[]";case"object":return t.properties?`{ ${Object.entries(t.properties).map(([s,i])=>{const r=Ue(i),l=!t.required?.includes(s);return`${s}${l?"?":""}: ${r}`}).join("; ")} }`:"Record<string, unknown>";case"null":return"null";default:return"unknown"}}function Kl(t){switch(t){case"success":return o.jsxs(_e,{variant:"success",className:"gap-1",children:[o.jsx(Xt,{size:11}),"Success"]});case"error":case"failed":return o.jsxs(_e,{variant:"destructive",className:"gap-1",children:[o.jsx(Yt,{size:11}),"Error"]});case"running":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),"Running"]});case"enqueued":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),"On hold"]});case"cancelled":return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Fn,{size:11}),"Cancelled"]});default:return o.jsxs(_e,{variant:"secondary",className:"gap-1",children:[o.jsx(Be,{size:11}),t]})}}function Jl(t){return`Run #${t.slice(-4).toUpperCase()}`}function Gl(t){const e=C.c(21),{className:n}=t,{executions:s,isLoading:i}=Pr(),{setShowExecutionsList:r}=tn(),{setTrackingExecutionId:l}=q(),c=z();let a;e[0]!==l?(a=y=>{l(y)},e[0]=l,e[1]=a):a=e[1];const u=a;let d;e[2]!==r?(d=()=>{r(!1)},e[2]=r,e[3]=d):d=e[3];const f=d;let m;e[4]!==n?(m=O("flex flex-col h-full bg-sidebar border-l border-border",n),e[4]=n,e[5]=m):m=e[5];let x;e[6]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:"Runs"}),e[6]=x):x=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsx(Fn,{size:11}),e[7]=p):p=e[7];let h;e[8]!==f?(h=o.jsxs("div",{className:"flex items-center h-12 px-5 border-b border-border shrink-0",children:[x,o.jsx(U,{variant:"ghost",size:"icon",className:"size-7",onClick:f,children:p})]}),e[8]=f,e[9]=h):h=e[9];let g;e[10]!==s||e[11]!==u||e[12]!==i||e[13]!==c?(g=i?o.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground",children:"Loading executions..."}):s.map((y,S)=>o.jsx(Xl,{execution:y,isSelected:y.id===c,isFirst:S===0,onSelect:()=>u(y.id)},y.id)),e[10]=s,e[11]=u,e[12]=i,e[13]=c,e[14]=g):g=e[14];let b;e[15]!==g?(b=o.jsx("div",{className:"flex-1 overflow-auto",children:g}),e[15]=g,e[16]=b):b=e[16];let j;return e[17]!==m||e[18]!==h||e[19]!==b?(j=o.jsxs("div",{className:m,children:[h,b]}),e[17]=m,e[18]=h,e[19]=b,e[20]=j):j=e[20],j}function Xl(t){const e=C.c(17),{execution:n,isSelected:s,isFirst:i,onSelect:r}=t,l=s&&"bg-accent/50",c=i&&s&&"bg-accent/50",a=!s&&"hover:bg-accent/30";let u;e[0]!==l||e[1]!==c||e[2]!==a?(u=O("flex flex-col justify-center h-[60px] px-4 border-b border-border cursor-pointer transition-colors",l,c,a),e[0]=l,e[1]=c,e[2]=a,e[3]=u):u=e[3];let d;e[4]!==n.status?(d=Kl(n.status),e[4]=n.status,e[5]=d):d=e[5];let f;e[6]!==n.id?(f=Jl(n.id),e[6]=n.id,e[7]=f):f=e[7];let m;e[8]!==f?(m=o.jsx("p",{className:"flex-1 text-base font-medium text-foreground",children:f}),e[8]=f,e[9]=m):m=e[9];let x;e[10]!==d||e[11]!==m?(x=o.jsxs("div",{className:"flex items-center gap-2 w-full",children:[d,m]}),e[10]=d,e[11]=m,e[12]=x):x=e[12];let p;return e[13]!==r||e[14]!==u||e[15]!==x?(p=o.jsx("div",{className:u,onClick:r,children:x}),e[13]=r,e[14]=u,e[15]=x,e[16]=p):p=e[16],p}function Ms(t){const e=C.c(11),{itemId:n}=t,[s,i]=k.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=r):r=e[0];const{connectionId:l}=re(r),c=l??"no-connection",{org:a}=X(),u=l??null;let d;e[1]!==a.id||e[2]!==u?(d={connectionId:u,orgId:a.id},e[1]=a.id,e[2]=u,e[3]=d):d=e[3];const f=Z(d),m=Rt(c,"WORKFLOW",n,f),x=At(c,"WORKFLOW",f);let p;e[4]!==x||e[5]!==n?(p=async b=>{i(!0),await x.update.mutateAsync({id:n,data:b}).finally(()=>{i(!1)})},e[4]=x,e[5]=n,e[6]=p):p=e[6];const h=p;let g;return e[7]!==s||e[8]!==m||e[9]!==h?(g={item:m,update:h,isUpdating:s},e[7]=s,e[8]=m,e[9]=h,e[10]=g):g=e[10],g}function Zl(t){const e=C.c(18),{workflow:n,onUpdate:s}=t,{setWorkflow:i}=q();let r,l,c,a;if(e[0]!==n.description||e[1]!==n.id||e[2]!==n.steps||e[3]!==n.title){const f={title:n.title,description:n.description,steps:n.steps};r=Te,l=`workflow-${n.id}`,c="100%",a=JSON.stringify(f,null,2),e[0]=n.description,e[1]=n.id,e[2]=n.steps,e[3]=n.title,e[4]=r,e[5]=l,e[6]=c,e[7]=a}else r=e[4],l=e[5],c=e[6],a=e[7];let u;e[8]!==s||e[9]!==i||e[10]!==n?(u=f=>{const m=JSON.parse(f);i({...n,...m}),s(m)},e[8]=s,e[9]=i,e[10]=n,e[11]=u):u=e[11];let d;return e[12]!==r||e[13]!==l||e[14]!==c||e[15]!==a||e[16]!==u?(d=o.jsx(r,{height:c,code:a,language:"json",onSave:u},l),e[12]=r,e[13]=l,e[14]=c,e[15]=a,e[16]=u,e[17]=d):d=e[17],d}function Ql(){const t=C.c(9),e=z(),{item:n}=ie(e),s=n?.start_at_epoch_ms,i=n?.completed_at_epoch_ms,r=n?.status==="running"&&s&&!i;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=Date.now(),t[0]=l):l=t[0];const c=k.useRef(l);let a;t[1]!==r?(a=h=>{if(!r)return Yl;const g=setInterval(()=>{c.current=Date.now(),h()},50);return()=>clearInterval(g)},t[1]=r,t[2]=a):a=t[2];const u=a;let d;t[3]!==r?(d=()=>r?c.current:0,t[3]=r,t[4]=d):d=t[4];const f=d,m=k.useSyncExternalStore(u,f,f),x=i&&s?Math.max(0,i-s):null;let p=null;if(s){let h;t[5]!==s?(h=new Date(s).getTime(),t[5]=s,t[6]=h):h=t[6];const g=h;if(i){let b;t[7]!==i?(b=new Date(i).getTime(),t[7]=i,t[8]=b):b=t[8],p=Math.max(0,b-g)}else r&&(p=Math.max(0,m-g))}return p??x}function Yl(){}function ec(t){if(t<1e3)return`${t}ms`;const e=t/1e3,n=e%60,s=Math.floor(e/60),i=s%60,r=Math.floor(s/60);return r>0?`${r}h ${i}m ${n.toFixed(3)}s`:i>0?`${i}m ${n.toFixed(3)}s`:`${n.toFixed(3)}s`}function tc(){const t=C.c(20),{setTrackingExecutionId:e}=q(),n=z(),s=Ql();let i;t[0]!==s?(i=s!=null?ec(s):null,t[0]=s,t[1]=i):i=t[1];const r=i;let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex items-center justify-center h-full w-12",children:o.jsx(so,{className:"w-4 h-4 text-muted-foreground"})}),t[2]=l):l=t[2];let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("strong",{className:"text-base text-foreground",children:"Run"}),t[3]=c):c=t[3];let a;t[4]!==n?(a=o.jsxs("p",{className:"flex gap-3 items-center h-full",children:[c,o.jsxs("span",{className:"text-sm text-muted-foreground",children:["#",n]})]}),t[4]=n,t[5]=a):a=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx(Xo,{className:"w-4 h-4 text-muted-foreground"}),t[6]=u):u=t[6];let d;t[7]!==r?(d=o.jsxs("div",{className:"flex items-center gap-1 ml-6",children:[u,o.jsx("span",{className:"text-sm text-muted-foreground",children:r})]}),t[7]=r,t[8]=d):d=t[8];let f;t[9]!==a||t[10]!==d?(f=o.jsxs("div",{className:"flex items-center h-full",children:[l,a,d]}),t[9]=a,t[10]=d,t[11]=f):f=t[11];let m;t[12]!==e?(m=()=>e(void 0),t[12]=e,t[13]=m):m=t[13];let x;t[14]===Symbol.for("react.memo_cache_sentinel")?(x=o.jsx(Ot,{className:"w-4 h-4 text-muted-foreground"}),t[14]=x):x=t[14];let p;t[15]!==m?(p=o.jsx(U,{variant:"ghost",size:"xs",onClick:m,children:x}),t[15]=m,t[16]=p):p=t[16];let h;return t[17]!==f||t[18]!==p?(h=o.jsxs("div",{className:"h-10 bg-accent flex items-center justify-between border-b border-border",children:[f,p]}),t[17]=f,t[18]=p,t[19]=h):h=t[19],h}function nc(){const t=C.c(15);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=re(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i,update:r,isUpdating:l}=Ms(s);let c;t[3]!==i?(c=JSON.stringify(i),t[3]=i,t[4]=c):c=t[4];const a=c;if(!i){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=o.jsx(ce,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Gt,{icon:o.jsx(qn,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow not found",description:"This workflow may have been deleted or you may not have access to it."})})}),t[5]=m):m=t[5],m}let u;t[6]!==i?(u={workflow:i,trackingExecutionId:void 0,currentStepTab:"input"},t[6]=i,t[7]=u):u=t[7];let d;t[8]!==l||t[9]!==r?(d=o.jsx(sc,{onUpdate:r,isUpdating:l}),t[8]=l,t[9]=r,t[10]=d):d=t[10];let f;return t[11]!==a||t[12]!==u||t[13]!==d?(f=o.jsx(Cr,{initialState:u,children:d},a),t[11]=a,t[12]=u,t[13]=d,t[14]=f):f=t[14],f}function sc(t){const e=C.c(21),{onUpdate:n,isUpdating:s}=t,i=Ee(),r=z(),{viewMode:l,showExecutionsList:c}=tn(),a=Le();let u;e[0]!==n||e[1]!==i?(u=async()=>{await n(i)},e[0]=n,e[1]=i,e[2]=u):u=e[2];const d=u,f=a&&"toolName"in a.action,m=f?a.action.toolName:null,x=f&&!m&&!r,p=!x&&(a||r||!c);let h;e[3]!==d||e[4]!==s||e[5]!==i.description||e[6]!==i.title?(h=o.jsx(Fi,{title:i.title,description:i.description,onSave:d,isSaving:s}),e[3]=d,e[4]=s,e[5]=i.description,e[6]=i.title,e[7]=h):h=e[7];let g;e[8]!==r?(g=r&&o.jsx(tc,{}),e[8]=r,e[9]=g):g=e[9];let b;e[10]!==n||e[11]!==c||e[12]!==p||e[13]!==x||e[14]!==l||e[15]!==i?(b=o.jsx("div",{className:"flex-1 overflow-hidden",children:l==="code"?o.jsx(Zl,{workflow:i,onUpdate:n}):o.jsxs(vo,{direction:"horizontal",className:"flex w-full h-full",children:[o.jsx(dn,{defaultSize:50,minSize:30,children:o.jsx(ll,{})}),o.jsx(yo,{}),o.jsxs(dn,{defaultSize:50,minSize:25,children:[x&&o.jsx(dl,{className:"border-l border-border"}),c&&o.jsx(Gl,{}),p&&o.jsx(Al,{className:"border-l border-border"})]})]})}),e[10]=n,e[11]=c,e[12]=p,e[13]=x,e[14]=l,e[15]=i,e[16]=b):b=e[16];let j;return e[17]!==h||e[18]!==g||e[19]!==b?(j=o.jsx(ce,{children:o.jsxs("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:[h,g,b]})}),e[17]=h,e[18]=g,e[19]=b,e[20]=j):j=e[20],j}function oc(t){const e=C.c(3),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},e[0]=s):s=e[0];const{connectionId:i}=re(s),l=Rt(i??"no-connection","WORKFLOW_EXECUTION",n,i);let c;return e[1]!==l?(c={item:l},e[1]=l,e[2]=c):c=e[2],c}function rc(){const t=C.c(8);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const{itemId:n}=re(e);let s;t[1]!==n?(s={itemId:n},t[1]=n,t[2]=s):s=t[2];const{item:i}=oc(s);if(!i){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(ce,{children:o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Gt,{icon:o.jsx(qn,{className:"w-10 h-10 text-muted-foreground"}),title:"Workflow execution not found",description:"This workflow execution may have been deleted or you may not have access to it."})})}),t[3]=c):c=t[3],c}let r;t[4]!==i?(r=JSON.stringify(i,null,2),t[4]=i,t[5]=r):r=t[5];let l;return t[6]!==r?(l=o.jsx(ce,{children:o.jsx("div",{className:"flex flex-col h-full overflow-hidden bg-background",children:o.jsx(Te,{height:"100%",code:r,language:"json",readOnly:!0})})}),t[6]=r,t[7]=l):l=t[7],l}const ic={workflow:nc,workflow_execution:rc,prompt:rr};function lc(){const t=C.c(6),e=In();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=re(n),i=decodeURIComponent(s.itemId);let r;t[1]!==e.history?(r=()=>{e.history.back()},t[1]=e.history,t[2]=r):r=t[2];const l=r,c=cc;let a;return t[3]!==l||t[4]!==i?(a=o.jsx(fr,{itemId:i,onBack:l,onUpdate:c}),t[3]=l,t[4]=i,t[5]=a):a=t[5],a}async function cc(t){return Promise.resolve()}function ac(t){return t.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function dc(){const t=C.c(38),e=In();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=n):n=t[0];const s=re(n),i=s.connectionId,r=decodeURIComponent(s.collectionName),l=decodeURIComponent(s.itemId);let c;t[1]!==e.history?(c=()=>{e.history.back()},t[1]=e.history,t[2]=c):c=t[2];const a=c,u=i??"no-connection",{org:d}=X(),f=Ye(i),m=i??null;let x;t[3]!==d.id||t[4]!==m?(x={connectionId:m,orgId:d.id},t[3]=d.id,t[4]=m,t[5]=x):x=t[5];const p=Z(x),h=At(u,r,p);let g;t[6]!==h||t[7]!==l?(g=async H=>{l&&await h.update.mutateAsync({id:l,data:H})},t[6]=h,t[7]=l,t[8]=g):g=t[8];const b=g;let j;t[9]!==r?(j=r?.toLowerCase(),t[9]=r,t[10]=j):j=t[10];const y=j,S=y&&ic[y];let v;t[11]!==r?(v=ac(r),t[11]=r,t[12]=v):v=t[12];const w=v;let N;t[13]!==d.slug?(N=o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps",params:{org:d.slug,project:Ke},children:"Connections"})})}),t[13]=d.slug,t[14]=N):N=t[14];let _;t[15]===Symbol.for("react.memo_cache_sentinel")?(_=o.jsx(Ge,{}),t[15]=_):_=t[15];let I;t[16]!==r||t[17]!==f||t[18]!==i||t[19]!==d.slug?(I=f&&o.jsxs(o.Fragment,{children:[o.jsx($e,{children:o.jsx(Je,{asChild:!0,children:o.jsx(qe,{to:"/$org/$project/mcps/$connectionId",params:{org:d.slug,project:Ke,connectionId:i},search:{tab:r},children:f.title})})}),o.jsx(Ge,{})]}),t[16]=r,t[17]=f,t[18]=i,t[19]=d.slug,t[20]=I):I=t[20];let E;t[21]!==w?(E=o.jsx($e,{children:o.jsx(Dn,{children:w})}),t[21]=w,t[22]=E):E=t[22];let R;t[23]!==E||t[24]!==N||t[25]!==I?(R=o.jsx(Pn,{children:o.jsxs(Ln,{children:[N,_,I,E]})}),t[23]=E,t[24]=N,t[25]=I,t[26]=R):R=t[26];const P=R;if(S){let H;return t[27]!==S||t[28]!==a||t[29]!==b||t[30]!==l?(H=o.jsx(S,{itemId:l,onBack:a,onUpdate:b}),t[27]=S,t[28]=a,t[29]=b,t[30]=l,t[31]=H):H=t[31],H}let M;t[32]===Symbol.for("react.memo_cache_sentinel")?(M=o.jsx(lo,{size:36,className:"text-muted-foreground"}),t[32]=M):M=t[32];let L;t[33]!==a?(L=o.jsx(Gt,{icon:M,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:a,children:"Go back"}}),t[33]=a,t[34]=L):L=t[34];let D;return t[35]!==P||t[36]!==L?(D=o.jsx(ce,{breadcrumb:P,children:L}),t[35]=P,t[36]=L,t[37]=D):D=t[37],D}function uc(){const t=C.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/$project/mcps/$connectionId/$collectionName/$itemId"},t[0]=e):e=t[0];const n=re(e);if(decodeURIComponent(n.collectionName)==="tools"){let l;return t[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx(lc,{}),t[1]=l):l=t[1],l}let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(dc,{}),t[2]=r):r=t[2],r}function Ma(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx($n,{children:o.jsx(k.Suspense,{fallback:o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Me,{size:32,className:"animate-spin text-muted-foreground"})}),children:o.jsx(uc,{})})}),t[0]=e):e=t[0],e}export{Ma as default};
@@ -1 +1 @@
1
- import{c as v,j as i}from"./index-BV-rIyOx.js";import{i as w}from"./Loading01-DOPFYU4m.js";import{i as C}from"./SearchMd-Ds-ERWzq.js";import{I as k}from"./input-Dv5qvD5N.js";import{c as b}from"./utils-CfR4kXxZ.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
1
+ import{c as v,j as i}from"./index-Bn2rDd42.js";import{i as w}from"./Loading01-D8zw0cyg.js";import{i as C}from"./SearchMd-CGuwiAQe.js";import{I as k}from"./input-DBvMwxwE.js";import{c as b}from"./utils-Ckc2UwOp.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};