decocms 2.306.12 → 2.306.13

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 (214) hide show
  1. package/dist/client/assets/{AlertCircle-Ot2CLMxw.js → AlertCircle-UghQPlAa.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-CA2U4-LB.js → ArrowNarrowLeft-1BfkUm85.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-D_v7OVFz.js → ArrowUpRight-1rqShrTM.js} +1 -1
  4. package/dist/client/assets/{Check-B7lQX-U6.js → Check-DBWnyOFJ.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-DQVTFDuD.js → CheckCircle-CBMgXE-F.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-BHHmj_90.js → ChevronDown-D452dgSU.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-CMwA4MWg.js → ChevronRight-DoY3rcf9.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-DZMg9j3Z.js → ChevronUp-BlZFoG59.js} +1 -1
  9. package/dist/client/assets/{Container-BPn2KqkB.js → Container-BQVUd9tN.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-C0-av-w_.js → DotsVertical-CAgAGLKz.js} +1 -1
  11. package/dist/client/assets/{LinkExternal01-Cr974KZi.js → LinkExternal01-CGcDVdEi.js} +1 -1
  12. package/dist/client/assets/{Lock01-chX0YN7M.js → Lock01-FiMk9Cv6.js} +1 -1
  13. package/dist/client/assets/{Palette-Cmsuc3m0.js → Palette-DXyBGBQu.js} +1 -1
  14. package/dist/client/assets/{Play-C_yrNjMw.js → Play-CDjH79to.js} +1 -1
  15. package/dist/client/assets/{Plus-BHVhclrE.js → Plus-FC_C8qkl.js} +1 -1
  16. package/dist/client/assets/{RefreshCcw01-Yl__XBgH.js → RefreshCcw01-Cd8Km121.js} +1 -1
  17. package/dist/client/assets/{SearchMd-BJVwn_ke.js → SearchMd-B780aQOS.js} +1 -1
  18. package/dist/client/assets/{Settings02-BCqAnzCC.js → Settings02--XuHa5eI.js} +1 -1
  19. package/dist/client/assets/{Shield01-BzDWvNLz.js → Shield01-Bg1T1EGa.js} +1 -1
  20. package/dist/client/assets/{Star01-t5c8OzJ1.js → Star01-DRidtrYn.js} +1 -1
  21. package/dist/client/assets/{Sun-fUlV2CSc.js → Sun-Bpli4t2N.js} +1 -1
  22. package/dist/client/assets/{Tool01-DHF_L3KH.js → Tool01-NWIcFn9q.js} +1 -1
  23. package/dist/client/assets/{Trash01-12UJulVC.js → Trash01-4w6_aW9X.js} +1 -1
  24. package/dist/client/assets/{User01-BjX-G1vE.js → User01-CxpWRrdM.js} +1 -1
  25. package/dist/client/assets/{Users03-CZn6wNJ2.js → Users03-CK1Aa1HI.js} +1 -1
  26. package/dist/client/assets/{X-DRGbU-sk.js → X-BGh8G2l7.js} +1 -1
  27. package/dist/client/assets/{XCircle-DH7bOaGY.js → XCircle-CYGTZyzW.js} +1 -1
  28. package/dist/client/assets/{XClose-CdyVyCLn.js → XClose-Dz5yGfpm.js} +1 -1
  29. package/dist/client/assets/{Zap-DVRtpQ6o.js → Zap-Druw6RpX.js} +1 -1
  30. package/dist/client/assets/{ZapSquare-CU44MpAH.js → ZapSquare-BLhBRchY.js} +1 -1
  31. package/dist/client/assets/{accordion-o4uEL-I1.js → accordion-DdQd4o33.js} +1 -1
  32. package/dist/client/assets/{agent-icon-C1jmOFVg.js → agent-icon-CznXZlOI.js} +1 -1
  33. package/dist/client/assets/{agents-list-ksM75Z6l.js → agents-list-CaQhK_9Q.js} +1 -1
  34. package/dist/client/assets/ai-providers-C_QaV2LV.js +1 -0
  35. package/dist/client/assets/{alert-dialog-DKLXK-1u.js → alert-dialog-BiN56dOX.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-GUJWINn8.js → auth-catchall-6Av77aQi.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-CKsxLzIm.js → automation-list-row-DdlSuO-v.js} +1 -1
  38. package/dist/client/assets/{automations-CMxgpl5P.js → automations-BMuo3AXx.js} +1 -1
  39. package/dist/client/assets/{avatar-BHCqEDVT.js → avatar-Z1wN1pq-.js} +1 -1
  40. package/dist/client/assets/{badge-CkKVCYBi.js → badge-CTmf2TW8.js} +1 -1
  41. package/dist/client/assets/{brand-context-BlmY1E4z.js → brand-context-CUDRGuTh.js} +1 -1
  42. package/dist/client/assets/{card-BPF7ycIj.js → card-Bd8klEwI.js} +1 -1
  43. package/dist/client/assets/{chat-context-cuD-y97U.js → chat-context-DGU47jw7.js} +1 -1
  44. package/dist/client/assets/{checkbox-nNLHENdc.js → checkbox-B3EwrxkO.js} +1 -1
  45. package/dist/client/assets/{collection-detail-RicC_Sa1.js → collection-detail-Cgmw3RVY.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-DluRs55o.js → collection-display-button-DMmbKfya.js} +1 -1
  47. package/dist/client/assets/{collection-search-c41oWBJf.js → collection-search-D-x3SJ1z.js} +1 -1
  48. package/dist/client/assets/{collection-search-fbQaa98h.js → collection-search-Do2r8Bif.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-D5c_AqvG.js → collection-table-wrapper-CtvRahI-.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-DqCBG7jb.js → collection-tabs-BKqleLTU.js} +1 -1
  51. package/dist/client/assets/{collections-DdU4I50l.js → collections-67ZnQ_LS.js} +1 -1
  52. package/dist/client/assets/{command-DbmRiBqo.js → command-BAMG06m5.js} +1 -1
  53. package/dist/client/assets/{connection-card-QcsFV35H.js → connection-card-DQm8aezN.js} +1 -1
  54. package/dist/client/assets/{connection-detail-CU37TDrz.js → connection-detail-BhxCMY6j.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-Ub-yYKls.js → connection-form-helpers--6zqXj9i.js} +1 -1
  56. package/dist/client/assets/{connections-Cx1j-a9X.js → connections-C0gQbHBs.js} +1 -1
  57. package/dist/client/assets/{constants-xZGcpYKv.js → constants-BDk5hb7z.js} +1 -1
  58. package/dist/client/assets/{constants-ggwtj_b2.js → constants-DXQgV2hu.js} +1 -1
  59. package/dist/client/assets/{dialog-CNOF2ZMK.js → dialog-DUgfuVrb.js} +1 -1
  60. package/dist/client/assets/{domain-settings-sx9KWI1e.js → domain-settings-DpONcUPd.js} +1 -1
  61. package/dist/client/assets/{drawer-Df34zS04.js → drawer-DeyjQQc7.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-C3kAm_Er.js → dropdown-menu-Cbx_bdO_.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-C8WyvfVv.js → dynamic-plugin-layout-D7HG8B_t.js} +1 -1
  64. package/dist/client/assets/{empty-state-DyTFpS0l.js → empty-state-BIAZXmQO.js} +1 -1
  65. package/dist/client/assets/{empty-state-Dw_gVxIS.js → empty-state-BnjbbhBR.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-C7nRmph4.js → extract-connection-data-Dgw7Sgd3.js} +1 -1
  67. package/dist/client/assets/{features-CbtmnrZ6.js → features-De6GvAAs.js} +1 -1
  68. package/dist/client/assets/{form-B11RrkrM.js → form-O0xus6j8.js} +1 -1
  69. package/dist/client/assets/{general-DSgFWSrp.js → general-tEcdYerZ.js} +1 -1
  70. package/dist/client/assets/index-BZ6nkz4a.js +1 -0
  71. package/dist/client/assets/{index-BB5P8isj.js → index-CG3ceZHc.js} +1 -1
  72. package/dist/client/assets/{index-CDVvjofj.js → index-CZLTTN-z.js} +1 -1
  73. package/dist/client/assets/{index-BsrxFreR.js → index-CdFJkiAN.js} +1 -1
  74. package/dist/client/assets/{index-3PRXeBfP.js → index-CqFBXkjQ.js} +1 -1
  75. package/dist/client/assets/{index-BM8jECEp.js → index-CuVn0uMY.js} +1 -1
  76. package/dist/client/assets/{index-Cy0GY2u3.js → index-DJiWK6lj.js} +1 -1
  77. package/dist/client/assets/{index-CnlV8NnU.js → index-DPM8__xA.js} +1 -1
  78. package/dist/client/assets/{index-C3ldIVUr.js → index-DV-VioVg.js} +1 -1
  79. package/dist/client/assets/{index-DANPLo87.js → index-DZjKh5eS.js} +3 -3
  80. package/dist/client/assets/{index-BkiajC9R.js → index-Dcg8Qevd.js} +2 -2
  81. package/dist/client/assets/{index-BJIwjxxl.js → index-DdsW868M.js} +1 -1
  82. package/dist/client/assets/{index-Bq9Gbm0H.js → index-DtUGvIts.js} +1 -1
  83. package/dist/client/assets/{index-DFlPdciX.js → index-EV8zcDnc.js} +1 -1
  84. package/dist/client/assets/{index-SKWAKGeB.js → index-XGdWuQyL.js} +1 -1
  85. package/dist/client/assets/{index-BFicVTdP.js → index-i68m5nvc.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-DapJgjCy.js → infiniteQueryObserver-D9yYekai.js} +1 -1
  87. package/dist/client/assets/{input-jGTjkEgf.js → input-Cvo2jJQf.js} +1 -1
  88. package/dist/client/assets/{integration-icon-BvsSfF2G.js → integration-icon-DTJ2wb4X.js} +1 -1
  89. package/dist/client/assets/{label-BwHLLLjG.js → label-_jNQo8Ll.js} +1 -1
  90. package/dist/client/assets/{layout-yZTsEXBs.js → layout-DbwGS2qx.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-cCvcDvSF.js → lean-canvas-recruit-modal-tP8fRQib.js} +1 -1
  92. package/dist/client/assets/{login-46RSYdDj.js → login-DehPjhCM.js} +1 -1
  93. package/dist/client/assets/{members-D4Mf2IQe.js → members-BMPf1BpS.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-ymd_jUTr.js → monaco-editor-BVARKKWN.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-D9yNQE2b.js → monitoring-stats-row-D7tWgW-Q.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-DZRkgpAw.js → oauth-callback-ai-provider-DC-UED8v.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-Dd82POES.js → oauth-callback-l4PY6t1A.js} +1 -1
  98. package/dist/client/assets/{onboarding-BIO4cqmI.js → onboarding-Bd6pQbk3.js} +1 -1
  99. package/dist/client/assets/{org-layout-CN2fB-vu.js → org-layout-COoj2PVG.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-CKCTv0lC.js → org-plugin-layout-DGnpwRtk.js} +1 -1
  101. package/dist/client/assets/{pair-CkdIVJLN.js → pair-_253DGSq.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-C2sVpvFW.js → plugin-empty-state-CakFVZ2i.js} +1 -1
  103. package/dist/client/assets/{plugin-header-DqxMpFAT.js → plugin-header-6TMFE3Ls.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-sfjMan0F.js → plugin-layout-3m9okTPI.js} +1 -1
  105. package/dist/client/assets/{popover-Qhd5GKAf.js → popover-DNu8C4Ll.js} +1 -1
  106. package/dist/client/assets/{profile-CVXH0cog.js → profile-CLBWN3L8.js} +1 -1
  107. package/dist/client/assets/{project-app-view-Dr4s0FIv.js → project-app-view-5ZnU4fo7.js} +1 -1
  108. package/dist/client/assets/registry-D_jmaKr2.js +2 -0
  109. package/dist/client/assets/{registry-layout-xR6rLrDK.js → registry-layout-Hazgpecz.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-CwLXPn7_.js → required-auth-layout-Cg8CZTlk.js} +1 -1
  111. package/dist/client/assets/{reset-password-Mf0kA3DN.js → reset-password-CzwUFBho.js} +1 -1
  112. package/dist/client/assets/{roles-CHPJSwkL.js → roles-DUtgWupV.js} +1 -1
  113. package/dist/client/assets/{scroll-area-BEarfPUC.js → scroll-area-DGEAK3pH.js} +1 -1
  114. package/dist/client/assets/{search-input-BNv3WxnU.js → search-input-C50ImRzg.js} +1 -1
  115. package/dist/client/assets/{select-1F7nfWqc.js → select-DkBE5ypj.js} +1 -1
  116. package/dist/client/assets/{select-model-CG5HxXo0.js → select-model-B9xghDV8.js} +1 -1
  117. package/dist/client/assets/{settings-layout-DxEs_4Uz.js → settings-layout-u6gOtHmU.js} +1 -1
  118. package/dist/client/assets/{settings-section-DV5Tzhsa.js → settings-section-DeAx6MsQ.js} +1 -1
  119. package/dist/client/assets/{shell-layout-Bvmr4Ir9.js → shell-layout-xLg1cKrj.js} +1 -1
  120. package/dist/client/assets/{skeleton-Bx5y3Xmp.js → skeleton-BL7idETO.js} +1 -1
  121. package/dist/client/assets/{sso-2Feex-XD.js → sso-UHrPOY4-.js} +1 -1
  122. package/dist/client/assets/{store-Cipg9Lj9.js → store-CCrp-zDu.js} +1 -1
  123. package/dist/client/assets/store-registry-dlSCWL84.js +2 -0
  124. package/dist/client/assets/{switch-BMcphIES.js → switch-Ba2DX0J8.js} +1 -1
  125. package/dist/client/assets/{table-BpJjOmgy.js → table-Dpjp6sno.js} +1 -1
  126. package/dist/client/assets/{tabs-BlzUVMC9.js → tabs-CUXWIghp.js} +1 -1
  127. package/dist/client/assets/{task-status-BLDsdEd0.js → task-status-D6HaLDfU.js} +1 -1
  128. package/dist/client/assets/{textarea-s7PVXilr.js → textarea-e7WVG0Uq.js} +1 -1
  129. package/dist/client/assets/{toggle-group-Dj05trYJ.js → toggle-group-Bzjy8IQq.js} +1 -1
  130. package/dist/client/assets/{tools-list-CR_2tWrg.js → tools-list-ddVo-6Vs.js} +1 -1
  131. package/dist/client/assets/{tooltip-CZbLg-Hf.js → tooltip-sn7TXXXA.js} +1 -1
  132. package/dist/client/assets/{types-wbD5gTmt.js → types-ClFDwb3j.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-by3zafwF.js → use-ai-providers-D1ZzNZfi.js} +1 -1
  134. package/dist/client/assets/{use-collections-BIsV5dcA.js → use-collections-DDocavcC.js} +1 -1
  135. package/dist/client/assets/{use-connection-BLJ6BaWy.js → use-connection-wzOJDB7e.js} +1 -1
  136. package/dist/client/assets/{use-copy-ORR4yHnB.js → use-copy-D0VCYdzD.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-BjiLekp8.js → use-create-virtual-mcp-BQ9UAVGc.js} +1 -1
  138. package/dist/client/assets/{use-debounced-autosave-DmAET555.js → use-debounced-autosave-vxXjJ2-V.js} +1 -1
  139. package/dist/client/assets/{use-decopilot-events-D1WuhDgD.js → use-decopilot-events-CQn9-0iO.js} +1 -1
  140. package/dist/client/assets/{use-delete-connection-DaROE5av.js → use-delete-connection-C1mV-M2x.js} +1 -1
  141. package/dist/client/assets/{use-infinite-scroll-jzFqUD4-.js → use-infinite-scroll-CyUixfAd.js} +1 -1
  142. package/dist/client/assets/{use-list-state-DhHkWiyj.js → use-list-state-BkqBgDIi.js} +1 -1
  143. package/dist/client/assets/{use-mcp-tools-henGoqsi.js → use-mcp-tools-Cu2GPPjO.js} +1 -1
  144. package/dist/client/assets/{use-members-DBih95tA.js → use-members-Bw_9meIY.js} +1 -1
  145. package/dist/client/assets/{use-navigate-to-agent-CucJsCgb.js → use-navigate-to-agent-BvnJAyr6.js} +1 -1
  146. package/dist/client/assets/{use-org-auth-client-B3WZtWV1.js → use-org-auth-client-uXh4lV5h.js} +1 -1
  147. package/dist/client/assets/{use-org-sso-guN7zSCH.js → use-org-sso-Co0XjU-j.js} +1 -1
  148. package/dist/client/assets/{use-organization-roles-BE030zs4.js → use-organization-roles-CXi0dKrO.js} +1 -1
  149. package/dist/client/assets/{use-organization-settings-ro4iJPpY.js → use-organization-settings-OER3kM7D.js} +1 -1
  150. package/dist/client/assets/{use-registry-connections-B-EpYSQR.js → use-registry-connections-LYUFCGgQ.js} +1 -1
  151. package/dist/client/assets/{use-status-sounds-0D0UbNhQ.js → use-status-sounds-CQVr-jwf.js} +1 -1
  152. package/dist/client/assets/{use-tasks-CCgL71pE.js → use-tasks-B8ZzLgVK.js} +1 -1
  153. package/dist/client/assets/{use-view-mode-Dq8SK5jL.js → use-view-mode-ti5AMLDX.js} +1 -1
  154. package/dist/client/assets/{use-virtual-mcp-DnJsvDcW.js → use-virtual-mcp-Cvy2Xx_N.js} +1 -1
  155. package/dist/client/assets/useInfiniteQuery-eCacXMD5.js +1 -0
  156. package/dist/client/assets/useSuspenseInfiniteQuery-Ck-t1SMi.js +1 -0
  157. package/dist/client/assets/{user-Cifqeo4n.js → user-Dst4Prvf.js} +1 -1
  158. package/dist/client/assets/{view-mode-toggle-DgvGEUt1.js → view-mode-toggle-Ca3EQ8LL.js} +1 -1
  159. package/dist/client/assets/{workflow-oA9SWgD2.js → workflow-BUQXpyzH.js} +1 -1
  160. package/dist/client/assets/workflow-detail-DLo-hD09.js +1 -0
  161. package/dist/client/index.html +1 -1
  162. package/dist/server/cli.js +7 -1
  163. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  164. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  165. package/dist/server/node_modules/ansi-styles/license +9 -0
  166. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  167. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  168. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  169. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  170. package/dist/server/node_modules/mimic-fn/license +9 -0
  171. package/dist/server/node_modules/mimic-fn/package.json +42 -0
  172. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  173. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  174. package/dist/server/node_modules/onetime/index.js +44 -0
  175. package/dist/server/node_modules/onetime/license +9 -0
  176. package/dist/server/node_modules/onetime/package.json +43 -0
  177. package/dist/server/node_modules/onetime/readme.md +94 -0
  178. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  179. package/dist/server/node_modules/pg-int8/README.md +16 -0
  180. package/dist/server/node_modules/pg-int8/index.js +100 -0
  181. package/dist/server/node_modules/pg-int8/package.json +24 -0
  182. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  183. package/dist/server/node_modules/postgres-array/index.js +97 -0
  184. package/dist/server/node_modules/postgres-array/license +21 -0
  185. package/dist/server/node_modules/postgres-array/package.json +35 -0
  186. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  187. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  188. package/dist/server/node_modules/postgres-bytea/license +21 -0
  189. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  190. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  191. package/dist/server/node_modules/postgres-date/index.js +116 -0
  192. package/dist/server/node_modules/postgres-date/license +21 -0
  193. package/dist/server/node_modules/postgres-date/package.json +33 -0
  194. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  195. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  196. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  197. package/dist/server/node_modules/postgres-interval/license +21 -0
  198. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  199. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  200. package/dist/server/node_modules/split2/LICENSE +13 -0
  201. package/dist/server/node_modules/split2/README.md +85 -0
  202. package/dist/server/node_modules/split2/bench.js +27 -0
  203. package/dist/server/node_modules/split2/index.js +141 -0
  204. package/dist/server/node_modules/split2/package.json +39 -0
  205. package/dist/server/node_modules/split2/test.js +409 -0
  206. package/dist/server/server.js +6 -0
  207. package/package.json +1 -1
  208. package/dist/client/assets/ai-providers-Crvwlm_n.js +0 -1
  209. package/dist/client/assets/index-CXY3EUsW.js +0 -1
  210. package/dist/client/assets/registry-C6e5KXgL.js +0 -2
  211. package/dist/client/assets/store-registry-aUgT6Hv2.js +0 -2
  212. package/dist/client/assets/useInfiniteQuery-BJJhbE0g.js +0 -1
  213. package/dist/client/assets/useSuspenseInfiniteQuery-Bjt0Pxxe.js +0 -1
  214. package/dist/client/assets/workflow-detail-DTRwxa9v.js +0 -1
@@ -1 +1 @@
1
- import{H as C,aI as Y,aJ as W,J as m,aK as O,ap as ke,a_ as L,a$ as Re,I as $,b0 as Ct,s as he,b as kt,x as ae,r as j,j as n,b1 as _t,b2 as Rt,aY as Ie,aX as xe,T as It,b3 as Tt,b4 as Dt,b5 as At,aS as Te,aT as De,aV as Et,a7 as J,b6 as X,aQ as Pt,a8 as q,aR as Ae,aW as Bt,ae as ge,b7 as Ee,b8 as Pe,b9 as Ft,e as V,c as be,B as le,l as ve,f as Mt,E as Ot,aL as Vt}from"./index-BkiajC9R.js";import{E as Be}from"./empty-state-Dw_gVxIS.js";import{i as $t,u as zt}from"./constants-ggwtj_b2.js";import{c as Lt}from"./use-mcp-tools-henGoqsi.js";import{A as Fe,F as Ut}from"./agent-icon-C1jmOFVg.js";import{i as Kt,a as Gt}from"./SearchMd-BJVwn_ke.js";import{b as Wt,u as qt,a as Ht}from"./use-connection-BLJ6BaWy.js";import{F as Yt,T as Z,g as oe,a as Q,b as ye,c as Jt,d as ee,e as Xt,S as Zt,R as Qt,f as en,h as tn,i as nn,t as sn,j as Me,k as rn,l as on,A as an,s as ln,m as cn,n as je,o as Oe,p as dn,q as un,r as re,u as H,v as Ve,w as mn,x as pn,y as ue,z as fn,B as hn}from"./index-C3ldIVUr.js";import{B as xn,c as gn}from"./collections-DdU4I50l.js";import{i as bn,c as vn,b as yn,e as jn}from"./extract-connection-data-C7nRmph4.js";import{u as wn}from"./use-registry-connections-B-EpYSQR.js";import{a as Sn}from"./use-organization-settings-ro4iJPpY.js";import{s as Nn}from"./Plus-BHVhclrE.js";import{e as $e,S as Cn,a as kn,b as _n,c as Rn,d as In}from"./select-1F7nfWqc.js";import"./index-3PRXeBfP.js";import{_ as te}from"./index-BM8jECEp.js";import{I as Tn}from"./input-jGTjkEgf.js";import{P as Dn,a as An,b as En}from"./popover-Qhd5GKAf.js";import{u as Pn,b as Bn,a as Fn,c as Mn,T as On}from"./tooltip-CZbLg-Hf.js";import{b as Vn}from"./use-virtual-mcp-DnJsvDcW.js";import{i as $n}from"./Check-B7lQX-U6.js";import{a as zn}from"./Users03-CZn6wNJ2.js";import{u as Ln}from"./use-create-virtual-mcp-BjiLekp8.js";function Un(t){return{isImplementedBy:e=>{for(const s of t){const r=typeof s.name=="string"?new RegExp(`^${s.name}$`):s.name,o=e.find(i=>r.test(i.name));if(!(!o&&s.opt)&&!o)return!1}return!0}}}const Kn=C({id:m(),name:m(),description:m().optional(),inputSchema:Y(m(),W()),outputSchema:Y(m(),W()).optional()}),Gn=xn.extend({_meta:C({"io.decocms":C({id:m(),verified:L(),scopeName:m(),appName:m(),friendlyName:m().nullable().optional(),metadata:Y(m(),W()).nullable().optional(),publishedAt:m().datetime().optional(),updatedAt:m().datetime().optional(),tools:O(Kn).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:C({$schema:m().optional(),_meta:Y(m(),W()).optional(),name:m().describe("The server name (scope/app)"),title:m().optional().describe("User-friendly title"),description:m().optional().describe("Server description"),icons:O(C({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ke(["light","dark"]).optional()})).optional(),remotes:O(C({type:ke(["http","stdio","sse"]),url:m().optional(),headers:O(W()).optional()})).optional(),packages:O(W()).optional(),repository:C({url:m(),source:m().optional(),subfolder:m().optional()}).optional(),version:m().optional(),websiteUrl:m().optional()})});gn("registry_app",Gn,{readOnly:!0});const Wn=C({specversion:Re("1.0").describe("CloudEvents specification version"),id:m().describe("Unique identifier for this event (UUID recommended)"),source:m().describe("Connection ID of the event publisher"),type:m().describe("Event type (e.g., 'order.created', 'user.signup')"),time:m().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:m().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:m().optional().default("application/json").describe("Content type of the data attribute"),dataschema:m().url().optional().describe("URI to the schema for the data attribute"),data:W().optional().describe("Event payload (any JSON value)")});C({events:O(Wn).min(1).describe("Batch of CloudEvents to process")});const qn=C({success:L().optional().describe("Whether this event was processed successfully"),error:m().optional().describe("Error message for this event"),retryAfter:$().int().positive().optional().describe("Re-deliver this event after this many ms")});C({success:L().optional().describe("Batch success - applies to events not in results"),error:m().optional().describe("Batch error message - applies to events not in results"),processedCount:$().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:$().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Y(m(),qn).optional().describe("Per-event results keyed by event ID")});C({type:m().min(1).max(255).describe("Event type identifier"),subject:m().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:W().optional().describe("Event payload"),deliverAt:m().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:m().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});C({id:m().describe("Unique event ID"),type:m().describe("Event type"),source:m().describe("Source connection ID"),time:m().describe("Event timestamp")});C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")});C({subscription:C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")})});const Hn=C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")}),Yn=C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")});C({subscriptions:O(Hn).describe("Desired subscriptions - system will create/update/delete to match")});C({created:$().int().min(0).describe("Number of subscriptions created"),updated:$().int().min(0).describe("Number of subscriptions with filter updated"),deleted:$().int().min(0).describe("Number of subscriptions removed"),unchanged:$().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:O(Yn).describe("Current subscriptions after sync")});C({subscriptionId:m().describe("Subscription ID to remove")});C({success:L().describe("Whether unsubscribe was successful"),subscriptionId:m().describe("Subscription ID that was removed")});C({eventId:m().describe("Event ID to cancel")});C({success:L().describe("Whether cancellation was successful"),eventId:m().describe("Event ID that was cancelled")});C({eventId:m().describe("Event ID to acknowledge")});C({success:L().describe("Whether ACK was successful"),eventId:m().describe("Event ID that was acknowledged")});const Jn=C({type:Re("string"),enum:O(m()).optional(),description:m().optional()}),Xn=C({type:m(),description:m(),paramsSchema:Y(m(),Jn)});C({});C({triggers:O(Xn)});C({type:m(),params:Y(m(),m()),enabled:L(),callbackUrl:Ct().optional(),callbackToken:m().min(1).optional()});C({success:L()});C({prefix:m().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:$().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:m().optional().describe("Token for pagination from previous response"),delimiter:m().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});C({objects:O(C({key:m().describe("Object key/path"),size:$().describe("Object size in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object")})),nextContinuationToken:m().optional().describe("Token for fetching next page of results"),isTruncated:L().describe("Whether there are more results available"),commonPrefixes:O(m()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});C({key:m().describe("Object key/path to get metadata for")});C({contentType:m().optional().describe("MIME type of the object"),contentLength:$().describe("Size of the object in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object"),metadata:Y(m(),m()).optional().describe("Custom metadata key-value pairs")});C({key:m().describe("Object key/path to generate URL for"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});C({url:m().describe("Presigned URL for downloading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path for the upload"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:m().optional().describe("MIME type for the object being uploaded")});C({url:m().describe("Presigned URL for uploading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path to delete")});C({success:L().describe("Whether the deletion was successful"),key:m().describe("The key that was deleted")});C({keys:O(m()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});C({deleted:O(m()).describe("Array of successfully deleted keys"),errors:O(C({key:m(),message:m()})).describe("Array of errors for failed deletions")});const Zn=C({primary:m().optional().describe("Primary brand color (hex)"),secondary:m().optional().describe("Secondary brand color (hex)"),accent:m().optional().describe("Accent / highlight color (hex)"),background:m().optional().describe("Background color (hex)"),foreground:m().optional().describe("Foreground / text color (hex)")}),Qn=C({heading:m().optional().describe("Font family for headings"),body:m().optional().describe("Font family for body text"),code:m().optional().describe("Font family for code / monospace")}),es=C({logo:m().optional().describe("Logo URL"),favicon:m().optional().describe("Favicon URL"),ogImage:m().optional().describe("Open Graph image URL")}),ts=C({id:m(),name:m().describe("Brand / company name"),domain:m().optional().describe("Company domain (e.g. example.com)"),colors:Zn.optional().describe("Semantic color palette"),fonts:Qn.optional().describe("Font families by role"),assets:es.optional().describe("Visual identity assets"),overview:m().optional().describe("Company overview / description"),tagline:m().optional().describe("Brand tagline"),tone:m().optional().describe("Tone of voice description"),metadata:Y(m(),W()).optional().describe("Extra design tokens and metadata")});C({id:m().optional().describe("Brand ID. Omit to get the default brand.")});C({});C({items:O(ts)});const ns={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function ss(t){if(t)return ns[t]}function Yo(t,e){const s=t.tools;if(!s||s.length===0)return!1;const r=s.map(a=>({name:a.name,inputSchema:a.inputSchema})),o=e.map(a=>({name:a.name,inputSchema:a.inputSchema,opt:a.opt}));return Un(o).isImplementedBy(r)}function rs(t){return t.startsWith("@")?t:`@${t}`}function os(){const{org:t}=he(),{data:e}=kt.useSession(),s=Wt(),r=wn(),o=Sn(),i=r.filter(c=>o(c.id));return{installByBinding:async c=>{if(!t||!e?.user?.id){ae.error("Not authenticated");return}const u=rs(c),p=(await Promise.all(i.map(async b=>{const v=bn(b.id,t.id);try{const y=await vn(b.id,t.id,t.slug,v,{where:{appName:u}});return yn(y??[])[0]??null}catch{return null}}))).find(b=>b!==null);if(!p){ae.error(`MCP Server not found in registry: ${c}`);return}const l=jn(p,t.id,e.user.id),d=l.connection_type==="STDIO",g=!!l.connection_url,h=d&&l.connection_headers&&typeof l.connection_headers=="object"&&"command"in l.connection_headers;if(!g&&!h){ae.error("This MCP Server cannot be connected: no connection method available");return}return await s.create.mutateAsync(l),{id:l.id,connection:l}},isInstalling:s.create.isPending}}function is(t){return j.forwardRef(({fields:e,widgets:s,templates:r,...o},i)=>(e={...t?.fields,...e},s={...t?.widgets,...s},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},n.jsx(Yt,{...t,...o,fields:e,widgets:s,templates:r,ref:i})))}const as=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ls=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,r)=>r?r.toUpperCase():s.toLowerCase()),_e=t=>{const e=ls(t);return e.charAt(0).toUpperCase()+e.slice(1)},ze=(...t)=>t.filter((e,s,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===s).join(" ").trim(),cs=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var ds={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 us=j.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>j.createElement("svg",{ref:u,...ds,width:e,height:e,stroke:t,strokeWidth:r?Number(s)*24/Number(e):s,className:ze("lucide",o),...!i&&!cs(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,p])=>j.createElement(f,p)),...Array.isArray(i)?i:[i]]));const K=(t,e)=>{const s=j.forwardRef(({className:r,...o},i)=>j.createElement(us,{ref:i,iconNode:e,className:ze(`lucide-${as(_e(t))}`,`lucide-${t}`,r),...o}));return s.displayName=_e(t),s};const ms=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ps=K("check",ms);const fs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Le=K("chevron-down",fs);const hs=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xs=K("chevron-up",hs);const gs=[["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"}]],bs=K("circle-alert",gs);const vs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Ue=K("circle-plus",vs);const ys=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],js=K("circle",ys);const ws=[["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"}]],Ss=K("copy",ws);const Ns=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cs=K("search",Ns);const ks=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_s=K("trash-2",ks);const Rs=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ke=K("x",Rs);function I(...t){return _t(Rt(t))}const Is=xe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md 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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs 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 shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function we({className:t,variant:e,size:s,asChild:r=!1,...o}){const i=r?Ie:"button";return n.jsx(i,{"data-slot":"button",className:I(Is({variant:e,size:s,className:t})),...o})}function Ts({uiSchema:t,registry:e,className:s,...r}){const{translateString:o}=e;return n.jsx("div",{className:"p-0 m-0",children:n.jsxs(we,{...r,className:I("w-fit gap-2",s),variant:"outline",type:"button",children:[n.jsx(Ue,{size:16})," ",o(Z.AddItemButton)]})})}function Ds(t){const{children:e,buttonsProps:s,displayLabel:r,hasDescription:o,hasToolbar:i,uiSchema:a,registry:c}=t,u=oe(a),f=Q("ArrayFieldItemButtonsTemplate",c,u),p=o?-6:22;return n.jsx("div",{children:n.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[n.jsx("div",{className:"grow shrink",children:e}),n.jsx("div",{className:"flex items-end justify-end p-0.5",children:i&&n.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${p}px`:void 0},children:n.jsx(f,{...s})})})]})})}function As(t){const{canAdd:e,disabled:s,fieldPathId:r,uiSchema:o,items:i,optionalDataControl:a,onAddClick:c,readonly:u,registry:f,required:p,schema:l,title:d}=t,g=oe(o),h=Q("ArrayFieldDescriptionTemplate",f,g),b=Q("ArrayFieldTitleTemplate",f,g),v=!u&&!s,{ButtonTemplates:{AddButton:y}}=f.templates;return n.jsx("div",{children:n.jsx("div",{className:"m-0 flex p-0",children:n.jsxs("div",{className:"m-0 w-full p-0",children:[n.jsx(b,{fieldPathId:r,title:g.title||d,schema:l,uiSchema:o,required:p,registry:f,optionalDataControl:v?a:void 0}),n.jsx(h,{fieldPathId:r,description:g.description||l.description,schema:l,uiSchema:o,registry:f}),n.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[v?void 0:a,i,e&&n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:s||u,uiSchema:o,registry:f})})]},`array-item-list-${r.$id}`)]})})})}function Ge({className:t,type:e,...s}){return n.jsx("input",{type:e,"data-slot":"input",className:I("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",t),...s})}function Es({id:t,htmlName:e,placeholder:s,required:r,readonly:o,disabled:i,type:a,value:c,onChange:u,onChangeOverride:f,onBlur:p,onFocus:l,autofocus:d,options:g,schema:h,rawErrors:b=[],children:v,extraProps:y,className:x,registry:w}){const{ClearButton:N}=w.templates.ButtonTemplates,R={...y,...Jt(h,a,g)},k=({target:{value:E}})=>u(E===""?g.emptyValue:E),S=({target:E})=>p(t,E&&E.value),_=({target:E})=>l(t,E&&E.value),D=j.useCallback(E=>{var T;E.preventDefault(),E.stopPropagation(),u((T=g.emptyValue)!==null&&T!==void 0?T:"")},[u,g.emptyValue]);return n.jsxs("div",{className:"p-0.5",children:[n.jsx(Ge,{id:t,name:e||t,type:a,placeholder:s,autoFocus:d,required:r,disabled:i,readOnly:o,className:I({"border-destructive focus-visible:ring-0":b.length>0},x),list:h.examples?Xt(t):void 0,...R,value:c||c===0?c:"",onChange:f||k,onBlur:S,onFocus:_,"aria-describedby":ee(t,!!h.examples)}),g.allowClearTextInputs&&!o&&!i&&c&&n.jsx(N,{onClick:D,registry:w}),v,n.jsx(Zt,{id:t,schema:h})]})}function Ps({id:t,description:e,registry:s,uiSchema:r}){return e?n.jsx("div",{children:n.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:n.jsx(Qt,{description:e,registry:s,uiSchema:r})})}):null}const Bs=xe("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Fs({className:t,variant:e,...s}){return n.jsx("div",{"data-slot":"alert",role:"alert",className:I(Bs({variant:e}),t),...s})}function Ms({className:t,...e}){return n.jsx("div",{"data-slot":"alert-title",className:I("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Os({className:t,...e}){return n.jsx("div",{"data-slot":"alert-description",className:I("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function Vs({errors:t,registry:e}){const{translateString:s}=e;return n.jsxs(Fs,{variant:"destructive",className:"mb-2",children:[n.jsx(bs,{className:"h-4 w-4"}),n.jsx(Ms,{children:s(Z.ErrorsLabel)}),n.jsx(Os,{className:"flex flex-col gap-1",children:t.map((r,o)=>n.jsxs("span",{children:["• ",r.stack]},o))})]})}function $s(t){const{errors:e=[],fieldPathId:s}=t;if(e.length===0)return null;const r=en(s);return n.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((o,i)=>n.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:o},i))})}function zs(t){const{fieldPathId:e,help:s,uiSchema:r,registry:o,hasErrors:i}=t;return s?n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{"text-destructive":i}),id:nn(e),children:n.jsx(tn,{help:s,registry:o,uiSchema:r})}):null}function Ls({id:t,children:e,displayLabel:s,rawErrors:r=[],errors:o,help:i,description:a,rawDescription:c,classNames:u,style:f,disabled:p,label:l,hidden:d,onKeyRename:g,onKeyRenameBlur:h,onRemoveProperty:b,readonly:v,required:y,schema:x,uiSchema:w,registry:N}){const R=oe(w),k=Q("WrapIfAdditionalTemplate",N,R);if(d)return n.jsx("div",{className:"hidden",children:e});const S=R.widget==="checkbox";return n.jsx(k,{classNames:u,style:f,disabled:p,id:t,label:l,displayLabel:s,onKeyRename:g,onKeyRenameBlur:h,onRemoveProperty:b,rawDescription:c,readonly:v,required:y,schema:x,uiSchema:w,registry:N,children:n.jsxs("div",{className:"flex flex-col gap-2",children:[s&&!S&&n.jsxs("label",{className:I("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[l,y?"*":null]}),e,s&&c&&!S&&n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:a}),o,i]})})}function Us(t){const{children:e,column:s,className:r,...o}=t;return n.jsx("div",{className:I("grid gap-2",r),...o,children:e})}function ne(t){const{icon:e,iconType:s,className:r,uiSchema:o,registry:i,...a}=t;return n.jsx(we,{size:"icon",variant:"outline",className:r,...a,type:"button",children:e})}function Ks(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.CopyButton),...t,icon:n.jsx(Ss,{className:"h-4 w-4"})})}function Gs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveDownButton),...t,icon:n.jsx(Le,{className:"h-4 w-4"})})}function Ws(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveUpButton),...t,icon:n.jsx(xs,{className:"h-4 w-4"})})}function We(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.RemoveButton),...t,className:"border-destructive",icon:n.jsx(_s,{className:"h-4 w-4 stroke-destructive"})})}function qs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.ClearButton),...t,icon:n.jsx(Ke,{})})}function Hs({selector:t,optionSchemaField:e}){return n.jsxs("div",{className:I("p-4 border rounded-md bg-background shadow-sm"),children:[n.jsx("div",{className:I("mb-4"),children:t}),e]})}function Ys({description:t,title:e,properties:s,required:r,uiSchema:o,fieldPathId:i,schema:a,formData:c,optionalDataControl:u,onAddProperty:f,disabled:p,readonly:l,registry:d}){const g=oe(o),h=Q("TitleFieldTemplate",d,g),b=Q("DescriptionFieldTemplate",d,g),v=!l&&!p,{ButtonTemplates:{AddButton:y}}=d.templates;return n.jsxs(n.Fragment,{children:[e&&n.jsx(h,{id:sn(i),title:e,required:r,schema:a,uiSchema:o,registry:d,optionalDataControl:v?u:void 0}),t&&n.jsx(b,{id:Me(i),description:t,schema:a,uiSchema:o,registry:d}),n.jsxs("div",{className:"flex flex-col gap-2",children:[v?void 0:u,s.map((x,w)=>n.jsx("div",{className:`${x.hidden?"hidden":""} flex`,children:n.jsx("div",{className:"w-full",children:x.content})},w)),rn(a,o,c)?n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(i,"add"),onClick:f,disabled:p||l,className:"rjsf-object-property-expand",uiSchema:o,registry:d})}):null]})]})}function Js(t){const{id:e,registry:s,label:r,onAddClick:o,onRemoveClick:i}=t;return o?n.jsx(ne,{id:e,registry:s,className:"rjsf-add-optional-data",onClick:o,title:r,icon:n.jsx(Ue,{}),size:"xs"}):i?n.jsx(We,{id:e,registry:s,className:"rjsf-remove-optional-data",onClick:i,title:r,size:"xs"}):n.jsx("em",{id:e,children:r})}function Xs(t){const{submitText:e,norender:s,props:r}=on(t.uiSchema);return s?null:n.jsx("div",{children:n.jsx(we,{type:"submit",...r,className:I("my-2",r?.className),children:e})})}function qe({className:t,orientation:e="horizontal",decorative:s=!0,...r}){return n.jsx(It,{"data-slot":"separator",decorative:s,orientation:e,className:I("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Zs({id:t,title:e,uiSchema:s,optionalDataControl:r}){const o=oe(s);let i=n.jsx("h5",{children:o.title||e});return r&&(i=n.jsxs("div",{className:"flex flex-row",children:[n.jsx("div",{className:"flex-grow",children:i}),n.jsx("div",{className:"flex",children:r})]})),n.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[i,n.jsx(qe,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Qs({classNames:t,style:e,children:s,disabled:r,id:o,label:i,displayLabel:a,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:f,readonly:p,required:l,schema:d,uiSchema:g,registry:h}){const{templates:b,translateString:v}=h,{RemoveButton:y}=b.ButtonTemplates,x=v(Z.KeyLabel,[i]);if(!(an in d))return n.jsx("div",{className:t,style:e,children:s});const R=a?22+(f?-28:0):0,k=`${o}-key`;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[n.jsx("div",{className:"grid gap-2 col-span-5",children:n.jsxs("div",{className:"flex flex-col gap-2",children:[a&&n.jsx("label",{htmlFor:k,className:"text-sm font-medium text-muted-foreground leading-none",children:x}),n.jsx("div",{className:"pl-0.5",children:n.jsx(Ge,{required:l,defaultValue:i,disabled:r||p,id:k,name:k,onBlur:p?void 0:u,type:"text",className:"w-full border shadow-sm"},i)}),!!f&&n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),n.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:s}),n.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${R}px`},children:n.jsx(y,{id:ye(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||p,onClick:c,uiSchema:g,registry:h})})]}),n.jsx(qe,{dir:"horizontal",className:"mt-2"})]})}function er(){return{ArrayFieldItemTemplate:Ds,ArrayFieldTemplate:As,BaseInputTemplate:Es,ButtonTemplates:{AddButton:Ts,CopyButton:Ks,MoveDownButton:Gs,MoveUpButton:Ws,RemoveButton:We,SubmitButton:Xs,ClearButton:qs},DescriptionFieldTemplate:Ps,ErrorListTemplate:Vs,FieldErrorTemplate:$s,FieldHelpTemplate:zs,FieldTemplate:Ls,GridTemplate:Us,MultiSchemaFieldTemplate:Hs,ObjectFieldTemplate:Ys,OptionalDataControlsTemplate:Js,TitleFieldTemplate:Zs,WrapIfAdditionalTemplate:Qs}}function tr(t,e){if(t==null)return{};var s={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(s[o]=t[o]);return s}var nr=["color"],sr=j.forwardRef(function(t,e){var s=t.color,r=s===void 0?"currentColor":s,o=tr(t,nr);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function He({className:t,...e}){return n.jsx(Tt,{"data-slot":"checkbox",className:I("peer border-input 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",t),...e,children:n.jsx(Dt,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:n.jsx(sr,{className:"size-3.5"})})})}function Se({className:t,...e}){return n.jsx(At,{"data-slot":"label",className:I("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function rr(t){const{id:e,htmlName:s,value:r,disabled:o,readonly:i,label:a,hideLabel:c,schema:u,autofocus:f,options:p,onChange:l,onBlur:d,onFocus:g,registry:h,uiSchema:b,className:v}=t,y=ln(u),x=Q("DescriptionFieldTemplate",h,p),w=S=>l(S),N=()=>d(e,r),R=()=>g(e,r),k=p.description||u.description;return n.jsxs("div",{className:`relative ${o||i?"cursor-not-allowed opacity-50":""}`,"aria-describedby":ee(e),children:[!c&&k&&n.jsx(x,{id:Me(e),description:k,schema:u,uiSchema:b,registry:h}),n.jsxs("div",{className:"flex items-center gap-2 my-2",children:[n.jsx(He,{id:e,name:s||e,checked:typeof r>"u"?!1:!!r,required:y,disabled:o||i,autoFocus:f,onCheckedChange:w,onBlur:N,onFocus:R,className:v}),n.jsx(Se,{className:"leading-tight",htmlFor:e,children:cn(a,c||!a)})]})]})}function or({id:t,htmlName:e,disabled:s,options:r,value:o,autofocus:i,readonly:a,required:c,onChange:u,onBlur:f,onFocus:p,className:l}){const{enumOptions:d,enumDisabled:g,inline:h,emptyValue:b}=r,v=je(r),y=Array.isArray(o)?o:[o],x=({target:N})=>f(t,H(N&&N.value,d,v,b)),w=({target:N})=>p(t,H(N&&N.value,d,v,b));return n.jsx("div",{className:I({"flex flex-col gap-2":!h,"flex flex-row gap-4 flex-wrap":h}),children:Array.isArray(d)&&d.map((N,R)=>{const k=Oe(N.value,y),S=Array.isArray(g)&&g.indexOf(N.value)!==-1,_=re(t,R);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(He,{id:_,name:e||t,required:c,disabled:s||S||a,onCheckedChange:D=>{u(D?dn(R,y,d):un(R,y,d))},className:l,checked:k,autoFocus:i&&R===0,onBlur:x,onFocus:w,"aria-describedby":ee(t)}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,R),children:N.label})]},_)})})}var Ne="Radio",[ir,Ye]=ge(Ne),[ar,lr]=ir(Ne),Je=j.forwardRef((t,e)=>{const{__scopeRadio:s,name:r,checked:o=!1,required:i,disabled:a,value:c="on",onCheck:u,form:f,...p}=t,[l,d]=j.useState(null),g=X(e,v=>d(v)),h=j.useRef(!1),b=l?f||!!l.closest("form"):!0;return n.jsxs(ar,{scope:s,checked:o,disabled:a,children:[n.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":et(o),"data-disabled":a?"":void 0,disabled:a,value:c,...p,ref:g,onClick:q(t.onClick,v=>{o||u?.(),b&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),b&&n.jsx(Qe,{control:l,bubbles:!h.current,name:r,value:c,checked:o,required:i,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});Je.displayName=Ne;var Xe="RadioIndicator",Ze=j.forwardRef((t,e)=>{const{__scopeRadio:s,forceMount:r,...o}=t,i=lr(Xe,s);return n.jsx(Bt,{present:r||i.checked,children:n.jsx(J.span,{"data-state":et(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:e})})});Ze.displayName=Xe;var cr="RadioBubbleInput",Qe=j.forwardRef(({__scopeRadio:t,control:e,checked:s,bubbles:r=!0,...o},i)=>{const a=j.useRef(null),c=X(a,i),u=Ee(s),f=Pe(e);return j.useEffect(()=>{const p=a.current;if(!p)return;const l=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(l,"checked").set;if(u!==s&&g){const h=new Event("click",{bubbles:r});g.call(p,s),p.dispatchEvent(h)}},[u,s,r]),n.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:s,...o,tabIndex:-1,ref:c,style:{...o.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qe.displayName=cr;function et(t){return t?"checked":"unchecked"}var dr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ce="RadioGroup",[ur]=ge(ce,[Ae,Ye]),tt=Ae(),nt=Ye(),[mr,pr]=ur(ce),st=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,name:r,defaultValue:o,value:i,required:a=!1,disabled:c=!1,orientation:u,dir:f,loop:p=!0,onValueChange:l,...d}=t,g=tt(s),h=Te(f),[b,v]=De({prop:i,defaultProp:o??null,onChange:l,caller:ce});return n.jsx(mr,{scope:s,name:r,required:a,disabled:c,value:b,onValueChange:v,children:n.jsx(Et,{asChild:!0,...g,orientation:u,dir:h,loop:p,children:n.jsx(J.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":c?"":void 0,dir:h,...d,ref:e})})})});st.displayName=ce;var rt="RadioGroupItem",ot=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,disabled:r,...o}=t,i=pr(rt,s),a=i.disabled||r,c=tt(s),u=nt(s),f=j.useRef(null),p=X(e,f),l=i.value===o.value,d=j.useRef(!1);return j.useEffect(()=>{const g=b=>{dr.includes(b.key)&&(d.current=!0)},h=()=>d.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",h)}},[]),n.jsx(Pt,{asChild:!0,...c,focusable:!a,active:l,children:n.jsx(Je,{disabled:a,required:i.required,checked:l,...u,...o,name:i.name,ref:p,onCheck:()=>i.onValueChange(o.value),onKeyDown:q(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:q(o.onFocus,()=>{d.current&&f.current?.click()})})})});ot.displayName=rt;var fr="RadioGroupIndicator",it=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,...r}=t,o=nt(s);return n.jsx(Ze,{...o,...r,ref:e})});it.displayName=fr;var hr=st,xr=ot,gr=it;function br({className:t,...e}){return n.jsx(hr,{"data-slot":"radio-group",className:I("grid gap-3",t),...e})}function vr({className:t,...e}){return n.jsx(xr,{"data-slot":"radio-group-item",className:I("border-input text-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 dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:n.jsx(gr,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:n.jsx(js,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function yr({id:t,options:e,value:s,required:r,disabled:o,readonly:i,onChange:a,onBlur:c,onFocus:u,className:f}){const{enumOptions:p,enumDisabled:l,emptyValue:d}=e,g=je(e),h=x=>a(H(x,p,g,d)),b=({target:x})=>c(t,H(x&&x.value,p,g,d)),v=({target:x})=>u(t,H(x&&x.value,p,g,d)),y=!!(e&&e.inline);return n.jsx("div",{className:"mb-0",children:n.jsx(br,{defaultValue:s?.toString(),required:r,disabled:o||i,onValueChange:x=>{h(x)},onBlur:b,onFocus:v,"aria-describedby":ee(t),orientation:y?"horizontal":"vertical",className:I("flex flex-wrap",{"flex-col":!y},f),children:Array.isArray(p)&&p.map((x,w)=>{const N=Array.isArray(l)&&l.indexOf(x.value)!==-1,R=Oe(x.value,s);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vr,{checked:R,value:Ve(x.value,w,g),id:re(t,w),disabled:N}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,w),children:x.label})]},re(t,w))})})})}var at=["PageUp","PageDown"],lt=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ct={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},se="Slider",[me,jr,wr]=Ft(se),[dt]=ge(se,[wr]),[Sr,de]=dt(se),ut=j.forwardRef((t,e)=>{const{name:s,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:p,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:g=!1,form:h,...b}=t,v=j.useRef(new Set),y=j.useRef(0),w=a==="horizontal"?Nr:Cr,[N=[],R]=De({prop:p,defaultProp:f,onChange:T=>{[...v.current][y.current]?.focus(),l(T)}}),k=j.useRef(N);function S(T){const A=Tr(N,T);E(T,A)}function _(T){E(T,y.current)}function D(){const T=k.current[y.current];N[y.current]!==T&&d(N)}function E(T,A,{commit:P}={commit:!1}){const F=Pr(i),M=Br(Math.round((T-r)/i)*i+r,F),B=$e(M,[r,o]);R((z=[])=>{const U=Rr(z,B,A);if(Er(U,u*i)){y.current=U.indexOf(B);const G=String(U)!==String(z);return G&&P&&d(U),G?U:z}else return z})}return n.jsx(Sr,{scope:t.__scopeSlider,name:s,disabled:c,min:r,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:N,orientation:a,form:h,children:n.jsx(me.Provider,{scope:t.__scopeSlider,children:n.jsx(me.Slot,{scope:t.__scopeSlider,children:n.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:e,onPointerDown:q(b.onPointerDown,()=>{c||(k.current=N)}),min:r,max:o,inverted:g,onSlideStart:c?void 0:S,onSlideMove:c?void 0:_,onSlideEnd:c?void 0:D,onHomeKeyDown:()=>!c&&E(r,0,{commit:!0}),onEndKeyDown:()=>!c&&E(o,N.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:A})=>{if(!c){const M=at.includes(T.key)||T.shiftKey&&lt.includes(T.key)?10:1,B=y.current,z=N[B],U=i*M*A;E(z+U,B,{commit:!0})}}})})})})});ut.displayName=se;var[mt,pt]=dt(se,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nr=j.forwardRef((t,e)=>{const{min:s,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:c,onSlideEnd:u,onStepKeyDown:f,...p}=t,[l,d]=j.useState(null),g=X(e,w=>d(w)),h=j.useRef(void 0),b=Te(o),v=b==="ltr",y=v&&!i||!v&&i;function x(w){const N=h.current||l.getBoundingClientRect(),R=[0,N.width],S=Ce(R,y?[s,r]:[r,s]);return h.current=N,S(w-N.left)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:n.jsx(ft,{dir:b,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const N=x(w.clientX);a?.(N)},onSlideMove:w=>{const N=x(w.clientX);c?.(N)},onSlideEnd:()=>{h.current=void 0,u?.()},onStepKeyDown:w=>{const R=ct[y?"from-left":"from-right"].includes(w.key);f?.({event:w,direction:R?-1:1})}})})}),Cr=j.forwardRef((t,e)=>{const{min:s,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=t,p=j.useRef(null),l=X(e,p),d=j.useRef(void 0),g=!o;function h(b){const v=d.current||p.current.getBoundingClientRect(),y=[0,v.height],w=Ce(y,g?[r,s]:[s,r]);return d.current=v,w(b-v.top)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:n.jsx(ft,{"data-orientation":"vertical",...f,ref:l,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const v=h(b.clientY);i?.(v)},onSlideMove:b=>{const v=h(b.clientY);a?.(v)},onSlideEnd:()=>{d.current=void 0,c?.()},onStepKeyDown:b=>{const y=ct[g?"from-bottom":"from-top"].includes(b.key);u?.({event:b,direction:y?-1:1})}})})}),ft=j.forwardRef((t,e)=>{const{__scopeSlider:s,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:c,onStepKeyDown:u,...f}=t,p=de(se,s);return n.jsx(J.span,{...f,ref:e,onKeyDown:q(t.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(c(l),l.preventDefault()):at.concat(lt).includes(l.key)&&(u(l),l.preventDefault())}),onPointerDown:q(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),p.thumbs.has(d)?d.focus():r(l)}),onPointerMove:q(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&o(l)}),onPointerUp:q(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),ht="SliderTrack",xt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(ht,s);return n.jsx(J.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:e})});xt.displayName=ht;var pe="SliderRange",gt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(pe,s),i=pt(pe,s),a=j.useRef(null),c=X(e,a),u=o.values.length,f=o.values.map(d=>yt(d,o.min,o.max)),p=u>1?Math.min(...f):0,l=100-Math.max(...f);return n.jsx(J.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...t.style,[i.startEdge]:p+"%",[i.endEdge]:l+"%"}})});gt.displayName=pe;var fe="SliderThumb",bt=j.forwardRef((t,e)=>{const s=jr(t.__scopeSlider),[r,o]=j.useState(null),i=X(e,c=>o(c)),a=j.useMemo(()=>r?s().findIndex(c=>c.ref.current===r):-1,[s,r]);return n.jsx(kr,{...t,ref:i,index:a})}),kr=j.forwardRef((t,e)=>{const{__scopeSlider:s,index:r,name:o,...i}=t,a=de(fe,s),c=pt(fe,s),[u,f]=j.useState(null),p=X(e,x=>f(x)),l=u?a.form||!!u.closest("form"):!0,d=Pe(u),g=a.values[r],h=g===void 0?0:yt(g,a.min,a.max),b=Ir(r,a.values.length),v=d?.[c.size],y=v?Dr(v,h,c.direction):0;return j.useEffect(()=>{if(u)return a.thumbs.add(u),()=>{a.thumbs.delete(u)}},[u,a.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${y}px)`},children:[n.jsx(me.ItemSlot,{scope:t.__scopeSlider,children:n.jsx(J.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":a.min,"aria-valuenow":g,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:p,style:g===void 0?{display:"none"}:t.style,onFocus:q(t.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&n.jsx(vt,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:g},r)]})});bt.displayName=fe;var _r="RadioBubbleInput",vt=j.forwardRef(({__scopeSlider:t,value:e,...s},r)=>{const o=j.useRef(null),i=X(o,r),a=Ee(e);return j.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==e&&p){const l=new Event("input",{bubbles:!0});p.call(c,e),c.dispatchEvent(l)}},[a,e]),n.jsx(J.input,{style:{display:"none"},...s,ref:i,defaultValue:e})});vt.displayName=_r;function Rr(t=[],e,s){const r=[...t];return r[s]=e,r.sort((o,i)=>o-i)}function yt(t,e,s){const i=100/(s-e)*(t-e);return $e(i,[0,100])}function Ir(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function Tr(t,e){if(t.length===1)return 0;const s=t.map(o=>Math.abs(o-e)),r=Math.min(...s);return s.indexOf(r)}function Dr(t,e,s){const r=t/2,i=Ce([0,50],[0,r]);return(r-i(e)*s)*s}function Ar(t){return t.slice(0,-1).map((e,s)=>t[s+1]-e)}function Er(t,e){if(e>0){const s=Ar(t);return Math.min(...s)>=e}return!0}function Ce(t,e){return s=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(s-t[0])}}function Pr(t){return(String(t).split(".")[1]||"").length}function Br(t,e){const s=Math.pow(10,e);return Math.round(t*s)/s}var Fr=ut,Mr=xt,Or=gt,Vr=bt;function $r({className:t,defaultValue:e,value:s,min:r=0,max:o=100,...i}){const a=j.useMemo(()=>Array.isArray(s)?s:Array.isArray(e)?e:[r,o],[s,e,r,o]);return n.jsxs(Fr,{"data-slot":"slider",defaultValue:e,value:s,min:r,max:o,className:I("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...i,children:[n.jsx(Mr,{"data-slot":"slider-track",className:I("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:n.jsx(Or,{"data-slot":"slider-range",className:I("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(c,u)=>n.jsx(Vr,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},u))]})}const zr=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Lr({value:t,readonly:e,disabled:s,options:r,schema:o,onChange:i,label:a,id:c}){const u=l=>i(l[0]),f={...mn(o)},p={id:c,...pn(r.props||{},zr)};return n.jsxs(n.Fragment,{children:[n.jsx($r,{disabled:s||e,min:f.min,max:f.max,step:f.step,value:[t],onValueChange:u,...p,"aria-describedby":ee(c)}),t]})}const Ur=xe("inline-flex items-center justify-center rounded-md 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",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Kr({className:t,variant:e,asChild:s=!1,...r}){const o=s?Ie:"span";return n.jsx(o,{"data-slot":"badge",className:I(Ur({variant:e}),t),...r})}const jt=j.forwardRef(({className:t,...e},s)=>n.jsx(te,{ref:s,"data-slot":"command",className:I("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Gr=j.forwardRef(({className:t,...e},s)=>n.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsx(Cs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsx(te.Input,{ref:s,className:I("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Gr.displayName=te.Input.displayName;function wt({className:t,...e}){return n.jsx(te.List,{"data-slot":"command-list",className:I("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function St({className:t,...e}){return n.jsx(te.Group,{"data-slot":"command-group",className:I("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Nt({className:t,...e}){return n.jsx(te.Item,{"data-slot":"command-item",className:I("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function Wr({multiple:t,items:e=[],selected:s,onValueChange:r,autoFocus:o=!1,disabled:i=!1,ariaDescribedby:a,ariaPlaceholder:c,onFocus:u,onBlur:f,className:p,id:l}){const d=j.useRef(null),[g,h]=j.useState(!1),[b,v]=j.useState(""),y=j.useMemo(()=>e.filter(S=>s.some(_=>ue(S.value,_))),[e,s]),x=j.useMemo(()=>e.filter(S=>!y.some(_=>ue(_.value,S.value))),[e,y]),w=j.useCallback(S=>{if(i)return;const _=y.filter(D=>!ue(D.value,S.value));r?.(_.map(D=>D.index))},[y,r,i]),N=j.useCallback(S=>{if(!(i||!d.current||d.current.value!==""))if(S.key==="Delete"||S.key==="Backspace"){const _=y.slice(0,-1);r?.(_.map(D=>D.index))}else S.key==="Escape"&&d.current.blur()},[y,r,i]),R=j.useCallback(S=>{if(i)return;v("");const _=t?[...y,S]:[S];r?.(_.map(D=>D.index))},[t,y,r,i]),k=j.useCallback(S=>{i||h(!0),u?.(S)},[i,u]);return n.jsxs(jt,{onKeyDown:N,className:I("overflow-visible bg-transparent",p),autoFocus:o,"aria-disabled":i,onBlur:f,onFocus:k,"aria-describedby":a,"aria-placeholder":c,children:[n.jsx("div",{className:I("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",i&&"opacity-50 cursor-not-allowed"),children:n.jsxs("div",{className:"flex gap-1 flex-wrap",children:[y.map(S=>n.jsxs(Kr,{variant:"secondary",children:[S.label,n.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:_=>_.key==="Enter"&&!i&&w(S),onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},onClick:()=>w(S),disabled:i,children:n.jsx(Ke,{className:I("h-3 w-3 text-muted-foreground hover:text-foreground",i&&"pointer-events-none")})})]},S.value)),n.jsx(te.Input,{ref:d,value:b,onValueChange:v,onBlur:()=>h(!1),onFocus:()=>!i&&h(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:i,"aria-controls":`command-item-input-${l}`,"aria-labelledby":`command-item-input-${l}`,id:`command-item-input-${l}`})]})}),g&&!i&&x.length>0&&n.jsx("div",{className:"relative mt-2",children:n.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:x.map(S=>n.jsx(Nt,{disabled:S.disabled,onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},"aria-controls":`${S.value}-command-item`,"aria-labelledby":`${S.value}-command-item`,id:`${S.value}-command-item`,onSelect:()=>R(S),className:"cursor-pointer",children:S.label},`${S.value}-command-item`))})})})})]})}function qr({items:t,selected:e,onValueChange:s,autoFocus:r=!1,disabled:o=!1,required:i=!1,placeholder:a="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:f,onBlur:p,className:l}){const[d,g]=j.useState(!1),h=t?.find(x=>x.value===e),b=j.useRef(null),v=j.useRef(null);j.useEffect(()=>{d&&b.current&&requestAnimationFrame(()=>{var x;(x=b.current)===null||x===void 0||x.scrollIntoView({block:"nearest"})})},[d]);const y=x=>{v.current&&!v.current.contains(x.relatedTarget)&&g(!1),p?.(x)};return n.jsxs(jt,{ref:v,className:I("overflow-visible bg-transparent",l),autoFocus:r,"aria-disabled":o,onBlur:y,onFocus:f,"aria-describedby":c,"aria-placeholder":u,children:[n.jsxs("div",{onClick:()=>!o&&g(!d),className:I("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!h&&i&&"border-red-500",o&&"opacity-50 cursor-not-allowed",l),children:[n.jsx("span",{className:I("flex-1 line-clamp-1",!h&&"text-muted-foreground"),children:h?.label||a}),n.jsx(Le,{className:"h-4 w-4 opacity-50"})]}),n.jsx("div",{className:"relative",children:d&&t&&t.length>0?n.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:t.map(x=>n.jsxs(Nt,{ref:x.value===e?b:void 0,onMouseDown:w=>{w.preventDefault(),w.stopPropagation()},onSelect:()=>{x.disabled||(s?.(x.value),g(!1))},className:I("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",x.value===e&&"font-semibold",x.disabled&&"opacity-50 cursor-not-allowed"),children:[n.jsx("span",{children:x.label}),n.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:x.value===e&&n.jsx(ps,{className:"h-4 w-4"})})]},x.value))})})}):null})]})}function Hr({id:t,options:e,required:s,disabled:r,readonly:o,value:i,multiple:a,autofocus:c,onChange:u,onBlur:f,onFocus:p,placeholder:l,rawErrors:d=[],className:g}){const{enumOptions:h,enumDisabled:b,emptyValue:v}=e,y=je(e),x=()=>{p(t,H(i,h,y,v))},w=()=>{f(t,H(i,h,y,v))},N=h?.map(({value:k,label:S},_)=>({value:a?k:Ve(k,_,y),label:S,index:_,disabled:Array.isArray(b)&&b.includes(k)})),R=I({"border-destructive":d.length>0},g);return n.jsx("div",{className:"p-0.5",children:a?n.jsx(Wr,{id:t,autoFocus:c,disabled:r||o,multiple:!0,className:R,items:N,selected:i,onValueChange:k=>{u(H(k.map(String),h,y,v))},onFocus:x,onBlur:w}):n.jsx(qr,{items:N,selected:fn(i,h,!1,y,""),onValueChange:k=>{u(H(k,h,y,v))},autoFocus:c,disabled:r||o,required:s,placeholder:l,className:R,onFocus:x,onBlur:w,ariaDescribedby:ee(t)})})}function Yr({className:t,...e}){return n.jsx("textarea",{"data-slot":"textarea",className:I("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Jr({id:t,htmlName:e,placeholder:s,value:r,required:o,disabled:i,autofocus:a,readonly:c,onBlur:u,onFocus:f,onChange:p,options:l,className:d}){const g=({target:{value:v}})=>p(v===""?l.emptyValue:v),h=({target:v})=>u(t,v&&v.value),b=({target:v})=>f(t,v&&v.value);return n.jsx("div",{className:"flex p-0.5",children:n.jsx(Yr,{id:t,name:e||t,placeholder:s,disabled:i,readOnly:c,value:r??"",required:o,autoFocus:a,rows:l.rows||5,onChange:g,onBlur:h,onFocus:b,"aria-describedby":ee(t),className:d})})}function Xr(){return{CheckboxWidget:rr,CheckboxesWidget:or,RadioWidget:yr,RangeWidget:Lr,SelectWidget:Hr,TextareaWidget:Jr}}function Zr(){return{templates:er(),widgets:Xr()}}function Qr(){return is(Zr())}const eo=Qr();function to(t){const e=V.c(21),{virtualMcp:s,isSelected:r}=t,o=r&&"bg-accent";let i;e[0]!==o?(i=be("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",o),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s.icon||e[3]!==s.title?(a=n.jsx(Fe,{icon:s.icon,name:s.title,size:"sm"}),e[2]=s.icon,e[3]=s.title,e[4]=a):a=e[4];let c;e[5]!==s.title?(c=n.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==r?(u=r&&n.jsx($n,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=u):u=e[8];let f;e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:"flex items-center justify-between",children:[c,u]}),e[9]=c,e[10]=u,e[11]=f):f=e[11];let p;e[12]!==s.description?(p=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:s.description}),e[12]=s.description,e[13]=p):p=e[13];let l;e[14]!==f||e[15]!==p?(l=n.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,p]}),e[14]=f,e[15]=p,e[16]=l):l=e[16];let d;return e[17]!==i||e[18]!==a||e[19]!==l?(d=n.jsxs("div",{className:i,children:[a,l]}),e[17]=i,e[18]=a,e[19]=l,e[20]=d):d=e[20],d}function no(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ve,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function so(t){const e=V.c(33),{selectedVirtualMcpId:s,onVirtualMcpChange:r,searchInputRef:o}=t,i=Vn(),[a,c]=j.useState(""),u=j.useRef(null),f=o??u;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={navigateOnCreate:!0},e[0]=p):p=e[0];const{createVirtualMCP:l,isCreating:d}=Ln(p);let g,h,b,v;if(e[1]!==l||e[2]!==f||e[3]!==d||e[4]!==r||e[5]!==a||e[6]!==s||e[7]!==i){let w;e:{const A=i.filter(ro);if(!a.trim()){w=A;break e}const P=a.toLowerCase();w=A.filter(F=>F.title.toLowerCase().includes(P)||F.description?.toLowerCase().includes(P))}const N=w;let R;e[12]!==r?(R=A=>{r(A),c("")},e[12]=r,e[13]=R):R=e[13];const k=R;b="flex flex-col max-h-[min(400px,60dvh)]";let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Kt,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=S):S=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=A=>c(A.target.value),e[15]=_):_=e[15];let D;e[16]!==f||e[17]!==a?(D=n.jsx(Tn,{ref:f,type:"text",placeholder:"Search for an agent...",value:a,onChange:_,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=f,e[17]=a,e[18]=D):D=e[18];const E=d?"Creating...":"Create Agent";let T;e[19]!==l||e[20]!==d||e[21]!==E?(T=n.jsx(le,{onClick:l,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:d,children:E}),e[19]=l,e[20]=d,e[21]=E,e[22]=T):T=e[22],e[23]!==D||e[24]!==T?(v=n.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:n.jsxs("div",{className:"relative flex items-center gap-2",children:[S,D,T]})}),e[23]=D,e[24]=T,e[25]=v):v=e[25],g="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",h=N.length>0?n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:N.map(A=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>k(A.id),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),k(A.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:n.jsx(to,{virtualMcp:A,isSelected:A.id===s})},A.id))}):n.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=l,e[2]=f,e[3]=d,e[4]=r,e[5]=a,e[6]=s,e[7]=i,e[8]=g,e[9]=h,e[10]=b,e[11]=v}else g=e[8],h=e[9],b=e[10],v=e[11];let y;e[26]!==g||e[27]!==h?(y=n.jsx("div",{className:g,children:h}),e[26]=g,e[27]=h,e[28]=y):y=e[28];let x;return e[29]!==b||e[30]!==v||e[31]!==y?(x=n.jsxs("div",{className:b,children:[v,y]}),e[29]=b,e[30]=v,e[31]=y,e[32]=x):x=e[32],x}function ro(t){return!t.id||!$t(t.id)}function oo(t){const e=V.c(3);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(no,{}),e[0]=s):s=e[0];let r;return e[1]!==t?(r=n.jsx(j.Suspense,{fallback:s,children:n.jsx(so,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function io(t){const e=V.c(32),{selectedVirtualMcpId:s,selectedVirtualMcp:r,onVirtualMcpChange:o,className:i,placeholder:a,showTooltip:c,disabled:u}=t,f=a===void 0?"Select Agent":a,p=c===void 0?!0:c,l=u===void 0?!1:u,[d,g]=j.useState(!1),h=j.useRef(null);let b;e[0]!==o?(b=B=>{o(B),g(!1)},e[0]=o,e[1]=b):b=e[1];const v=b,y=Pn();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=B=>{g(B)},e[2]=x):x=e[2];const w=x;let N,R;e[3]!==y||e[4]!==d?(N=()=>{d&&!y&&setTimeout(()=>{h.current?.focus()},0)},R=[d,y],e[3]=y,e[4]=d,e[5]=N,e[6]=R):(N=e[5],R=e[6]),j.useEffect(N,R);const k=l?!1:d,S=l?void 0:w,_=l?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let D;e[7]!==i||e[8]!==_?(D=be("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",_,i),e[7]=i,e[8]=_,e[9]=D):D=e[9];let E;e[10]!==r?(E=r?n.jsx(Fe,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[n.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),n.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),n.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),n.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),n.jsx(zn,{size:16})]}),e[10]=r,e[11]=E):E=e[11];let T;e[12]!==l||e[13]!==f||e[14]!==D||e[15]!==E?(T=n.jsx(Fn,{asChild:!0,children:n.jsx(Dn,{asChild:!0,children:n.jsx("button",{type:"button",disabled:l,className:D,"aria-label":f,children:E})})}),e[12]=l,e[13]=f,e[14]=D,e[15]=E,e[16]=T):T=e[16];let A;e[17]!==d||e[18]!==r?.title||e[19]!==p?(A=p&&!d&&n.jsx(Bn,{side:"top",className:"text-xs",children:r?.title??"Choose an agent to chat with"}),e[17]=d,e[18]=r?.title,e[19]=p,e[20]=A):A=e[20];let P;e[21]!==T||e[22]!==A?(P=n.jsx(Mn,{children:n.jsxs(On,{children:[T,A]})}),e[21]=T,e[22]=A,e[23]=P):P=e[23];let F;e[24]!==v||e[25]!==s?(F=n.jsx(An,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:n.jsx(oo,{selectedVirtualMcpId:s,onVirtualMcpChange:v,searchInputRef:h})}),e[24]=v,e[25]=s,e[26]=F):F=e[26];let M;return e[27]!==P||e[28]!==F||e[29]!==k||e[30]!==S?(M=n.jsxs(En,{open:k,onOpenChange:S,children:[P,F]}),e[27]=P,e[28]=F,e[29]=k,e[30]=S,e[31]=M):M=e[31],M}function ao(t){const e=t.properties;if(!e)return!1;const s=e.__type,r=e.__binding;return!!(s?.const||r?.const)}function lo(t){const e=t.properties;if(!e)return{};const s=e.__type,r=e.__binding;return{bindingType:s?.const,bindingSchema:r?.const}}function co(t){const e=V.c(10),{bindingSchema:s,bindingType:r,currentValue:o,onValueChange:i,placeholder:a,onAddNew:c,className:u}=t;let f;e[0]!==r?(f=ss(r),e[0]=r,e[1]=f):f=e[1];const l=f??(typeof s=="string"?s:s??void 0);let d;return e[2]!==r||e[3]!==u||e[4]!==o||e[5]!==c||e[6]!==i||e[7]!==a||e[8]!==l?(d=n.jsx(uo,{value:o,onValueChange:i,placeholder:a,binding:l,bindingType:r,onAddNew:c,className:u}),e[2]=r,e[3]=u,e[4]=o,e[5]=c,e[6]=i,e[7]=a,e[8]=l,e[9]=d):d=e[9],d}function uo({value:t,onValueChange:e,placeholder:s="Select a connection...",binding:r,bindingType:o,onAddNew:i,className:a}){const[c,u]=j.useState(!1),{installByBinding:f,isInstalling:p}=os(),l=c||p,d=r?void 0:o||void 0,g=qt(r?{binding:r}:d?{filters:[{column:"app_name",value:d}]}:{}),h=Ht(t&&!g.some(x=>x.id===t)?t:void 0),b=h?[h,...g]:g,v=o?.startsWith("@"),y=async()=>{if(v&&o){u(!0);try{const x=await f(o);x&&e(x.id)}catch(x){const w=x instanceof Error?x.message:String(x);ae.error(`Failed to connect MCP: ${w}`)}finally{u(!1)}return}i?.()};return n.jsxs(Cn,{value:t,onValueChange:e,children:[n.jsx(kn,{size:"sm",className:be("w-[200px]",a),children:n.jsx(_n,{placeholder:s})}),n.jsxs(Rn,{children:[b.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):b.map(x=>n.jsx(In,{value:x.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?n.jsx("img",{src:x.icon,alt:x.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:x.title})]})},x.id)),(i||v)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(le,{onClick:x=>{x.preventDefault(),x.stopPropagation(),y()},disabled:l,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:l?n.jsxs(n.Fragment,{children:[n.jsx(ve,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(Nn,{size:16}),n.jsx("span",{children:"Custom Connection"})]})})})]})]})}function mo(t){const e=V.c(49),{schema:s,formData:r,title:o,description:i,registry:a}=t,c=a.formContext,u=o||"",f=o||"";if(ao(s)){const d=s;let g;e[0]!==d?(g=lo(d),e[0]=d,e[1]=g):g=e[1];const{bindingType:h,bindingSchema:b}=g,y=(c?.formData?.[u]?.value??r?.value)||"";let x;e[2]!==h||e[3]!==u||e[4]!==c||e[5]!==r?(x=M=>{const B={...r,value:M??"",...h&&{__type:h}};c?.onFieldChange(u,B)},e[2]=h,e[3]=u,e[4]=c,e[5]=r,e[6]=x):x=e[6];const w=x,N=fo;let R;e[7]!==f||e[8]!==u||e[9]!==o?(R=N(o||f||u),e[7]=f,e[8]=u,e[9]=o,e[10]=R):R=e[10];const k=R;if(h==="@deco/agent"){let M;e[11]!==k?(M=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[11]=k,e[12]=M):M=e[12];let B;e[13]!==i?(B=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[13]=i,e[14]=B):B=e[14];let z;e[15]!==M||e[16]!==B?(z=n.jsxs("div",{className:"flex-1 min-w-0",children:[M,B]}),e[15]=M,e[16]=B,e[17]=z):z=e[17];const U=y||void 0;let G;e[18]!==w||e[19]!==U?(G=n.jsx(io,{selectedVirtualMcpId:U,onVirtualMcpChange:w,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=w,e[19]=U,e[20]=G):G=e[20];let ie;return e[21]!==z||e[22]!==G?(ie=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[z,G]}),e[21]=z,e[22]=G,e[23]=ie):ie=e[23],ie}let S;e[24]!==k?(S=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[24]=k,e[25]=S):S=e[25];let _;e[26]!==i?(_=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[26]=i,e[27]=_):_=e[27];let D;e[28]!==S||e[29]!==_?(D=n.jsxs("div",{className:"flex-1 min-w-0",children:[S,_]}),e[28]=S,e[29]=_,e[30]=D):D=e[30];let E;e[31]!==k?(E=k.toLowerCase(),e[31]=k,e[32]=E):E=e[32];const T=`Select ${E}...`;let A;e[33]!==c?(A=()=>c?.onAddNew(),e[33]=c,e[34]=A):A=e[34];let P;e[35]!==b||e[36]!==h||e[37]!==y||e[38]!==w||e[39]!==T||e[40]!==A?(P=n.jsx(co,{bindingSchema:b,bindingType:h,currentValue:y,onValueChange:w,placeholder:T,onAddNew:A,className:"w-[200px] shrink-0"}),e[35]=b,e[36]=h,e[37]=y,e[38]=w,e[39]=T,e[40]=A,e[41]=P):P=e[41];let F;return e[42]!==P||e[43]!==D?(F=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[D,P]}),e[42]=P,e[43]=D,e[44]=F):F=e[44],F}let p;e[45]!==t.properties?(p=t.properties.map(po),e[45]=t.properties,e[46]=p):p=e[46];let l;return e[47]!==p?(l=n.jsx("div",{className:"flex flex-col gap-4",children:p}),e[47]=p,e[48]=l):l=e[48],l}function po(t){return t.content}function fo(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,ho)}function ho(t){return t.toUpperCase()}function xo(t){const e=V.c(13),{label:s,children:r,description:o,id:i,schema:a}=t;if(i.includes("__type")||i.includes("__binding"))return null;if(a.type==="object")return r;let c;e[0]!==i||e[1]!==s?(c=s&&n.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:i,children:s}),e[0]=i,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==o?(u=o&&n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o}),e[3]=o,e[4]=u):u=e[4];let f;e[5]!==c||e[6]!==u?(f=n.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[5]=c,e[6]=u,e[7]=f):f=e[7];let p;e[8]!==r?(p=n.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=p):p=e[9];let l;return e[10]!==f||e[11]!==p?(l=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[f,p]}),e[10]=f,e[11]=p,e[12]=l):l=e[12],l}const go={ObjectFieldTemplate:mo,FieldTemplate:xo};function bo(t){const e=V.c(19),{formKey:s,formState:r,onFormStateChange:o,stateSchema:i}=t,{org:a}=he(),c=Mt();let u;e[0]!==o?(u=x=>{x.formData&&o(x.formData)},e[0]=o,e[1]=u):u=e[1];const f=u;let p;e[2]!==r||e[3]!==o?(p=(x,w)=>{const N={...r,[x]:w};o(N)},e[2]=r,e[3]=o,e[4]=p):p=e[4];const l=p;let d;e[5]!==c||e[6]!==a?(d=()=>{c({to:"/$org/settings/connections",params:{org:a.slug},search:{action:"create"}})},e[5]=c,e[6]=a,e[7]=d):d=e[7];const g=d;let h;e[8]!==r||e[9]!==g||e[10]!==l?(h={onFieldChange:l,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=l,e[11]=h):h=e[11];const b=h;let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(n.Fragment,{}),e[12]=v):v=e[12];let y;return e[13]!==b||e[14]!==s||e[15]!==r||e[16]!==f||e[17]!==i?(y=n.jsx("div",{className:"flex flex-col h-full overflow-auto",children:n.jsx(eo,{schema:i,validator:hn,formData:r,onChange:f,formContext:b,liveValidate:!1,showErrorList:!1,templates:go,children:v},s)}),e[13]=b,e[14]=s,e[15]=r,e[16]=f,e[17]=i,e[18]=y):y=e[18],y}function vo(t){const e=V.c(14),{org:s}=he();let r;e[0]!==t||e[1]!==s.id||e[2]!==s.slug?(r={connectionId:t,orgId:s.id,orgSlug:s.slug},e[0]=t,e[1]=s.id,e[2]=s.slug,e[3]=r):r=e[3];const o=zt(r);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={},e[4]=i):i=e[4];let a;e[5]!==o?(a={client:o,toolName:"MCP_CONFIGURATION",toolArguments:i,select:yo},e[5]=o,e[6]=a):a=e[6];const{data:c}=Lt(a);let u;e[7]!==c.stateSchema?(u=c.stateSchema??{type:"object",properties:{}},e[7]=c.stateSchema,e[8]=u):u=e[8];const f=u;let p;e[9]!==c.scopes?(p=c.scopes??[],e[9]=c.scopes,e[10]=p):p=e[10];const l=p;let d;return e[11]!==l||e[12]!==f?(d={stateSchema:f,scopes:l},e[11]=l,e[12]=f,e[13]=d):d=e[13],d}function yo(t){return t.structuredContent??t}function jo(t){const e=V.c(4),{onAuthenticate:s,buttonText:r}=t,o=r===void 0?"Authenticate":r;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=i):i=e[0];let a;return e[1]!==o||e[2]!==s?(a=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,n.jsx(le,{onClick:s,size:"default",children:o})]})}),e[1]=o,e[2]=s,e[3]=a):a=e[3],a}function wo(t){const e=V.c(7),{hasReadme:s,onViewReadme:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Gt,{size:36,className:"text-muted-foreground"}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Manual Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r?(a=s&&r&&n.jsxs(le,{onClick:r,variant:"outline",size:"lg",children:[n.jsx(Ut,{size:18,className:"mr-2"}),"View README"]}),e[2]=s,e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==a?(c=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[o,i,a]})}),e[5]=a,e[6]=c):c=e[6],c}function So(){const t=V.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=s):s=t[1],s}function No(t){const e=V.c(12),{connection:s,form:r}=t,{stateSchema:o}=vo(s.id);let i;e[0]!==r.control?(i={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=i):i=e[1];const a=Vt(i);let c;e[2]!==r?(c=d=>{r.setValue("configuration_state",d,{shouldDirty:!0})},e[2]=r,e[3]=c):c=e[3];const u=c;if(!(o&&o.properties&&typeof o.properties=="object"&&Object.keys(o.properties).length>0)){let d;return e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[4]=d):d=e[4],d}let p;e[5]!==a?(p=a??{},e[5]=a,e[6]=p):p=e[6];let l;return e[7]!==s.id||e[8]!==u||e[9]!==o||e[10]!==p?(l=n.jsx("div",{className:"flex-1 overflow-auto",children:n.jsx(bo,{formKey:s.id,stateSchema:o,formState:p,onFormStateChange:u})}),e[7]=s.id,e[8]=u,e[9]=o,e[10]=p,e[11]=l):l=e[11],l}function Co(t){const e=V.c(11),{connection:s,form:r,hasMcpBinding:o,isMCPAuthenticated:i,supportsOAuth:a,isServerError:c,onAuthenticate:u,onViewReadme:f}=t,l=!!s?.metadata?.repository?.url;if(!i){if(c){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(So,{}),e[0]=b):b=e[0],b}if(a){let b;return e[1]!==u?(b=n.jsx(jo,{onAuthenticate:u}),e[1]=u,e[2]=b):b=e[2],b}let h;return e[3]!==l||e[4]!==f?(h=n.jsx(wo,{hasReadme:l,onViewReadme:f}),e[3]=l,e[4]=f,e[5]=h):h=e[5],h}if(!o){let h;return e[6]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=h):h=e[6],h}let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),e[7]=d):d=e[7];let g;return e[8]!==s||e[9]!==r?(g=n.jsx(Ot,{children:n.jsx(j.Suspense,{fallback:d,children:n.jsx(No,{connection:s,form:r})})}),e[8]=s,e[9]=r,e[10]=g):g=e[10],g}function Jo(t){const e=V.c(2);let s;return e[0]!==t?(s=n.jsx("div",{className:"flex-1 flex h-full",children:n.jsx(Co,{...t})}),e[0]=t,e[1]=s):s=e[1],s}export{wo as M,jo as O,Jo as S,Yo as c};
1
+ import{H as C,aI as Y,aJ as W,J as m,aK as O,ap as ke,a_ as L,a$ as Re,I as $,b0 as Ct,s as he,b as kt,x as ae,r as j,j as n,b1 as _t,b2 as Rt,aY as Ie,aX as xe,T as It,b3 as Tt,b4 as Dt,b5 as At,aS as Te,aT as De,aV as Et,a7 as J,b6 as X,aQ as Pt,a8 as q,aR as Ae,aW as Bt,ae as ge,b7 as Ee,b8 as Pe,b9 as Ft,e as V,c as be,B as le,l as ve,f as Mt,E as Ot,aL as Vt}from"./index-Dcg8Qevd.js";import{E as Be}from"./empty-state-BnjbbhBR.js";import{i as $t,u as zt}from"./constants-DXQgV2hu.js";import{c as Lt}from"./use-mcp-tools-Cu2GPPjO.js";import{A as Fe,F as Ut}from"./agent-icon-CznXZlOI.js";import{i as Kt,a as Gt}from"./SearchMd-B780aQOS.js";import{b as Wt,u as qt,a as Ht}from"./use-connection-wzOJDB7e.js";import{F as Yt,T as Z,g as oe,a as Q,b as ye,c as Jt,d as ee,e as Xt,S as Zt,R as Qt,f as en,h as tn,i as nn,t as sn,j as Me,k as rn,l as on,A as an,s as ln,m as cn,n as je,o as Oe,p as dn,q as un,r as re,u as H,v as Ve,w as mn,x as pn,y as ue,z as fn,B as hn}from"./index-DV-VioVg.js";import{B as xn,c as gn}from"./collections-67ZnQ_LS.js";import{i as bn,c as vn,b as yn,e as jn}from"./extract-connection-data-Dgw7Sgd3.js";import{u as wn}from"./use-registry-connections-LYUFCGgQ.js";import{a as Sn}from"./use-organization-settings-OER3kM7D.js";import{s as Nn}from"./Plus-FC_C8qkl.js";import{e as $e,S as Cn,a as kn,b as _n,c as Rn,d as In}from"./select-DkBE5ypj.js";import"./index-CqFBXkjQ.js";import{_ as te}from"./index-CuVn0uMY.js";import{I as Tn}from"./input-Cvo2jJQf.js";import{P as Dn,a as An,b as En}from"./popover-DNu8C4Ll.js";import{u as Pn,b as Bn,a as Fn,c as Mn,T as On}from"./tooltip-sn7TXXXA.js";import{b as Vn}from"./use-virtual-mcp-Cvy2Xx_N.js";import{i as $n}from"./Check-DBWnyOFJ.js";import{a as zn}from"./Users03-CK1Aa1HI.js";import{u as Ln}from"./use-create-virtual-mcp-BQ9UAVGc.js";function Un(t){return{isImplementedBy:e=>{for(const s of t){const r=typeof s.name=="string"?new RegExp(`^${s.name}$`):s.name,o=e.find(i=>r.test(i.name));if(!(!o&&s.opt)&&!o)return!1}return!0}}}const Kn=C({id:m(),name:m(),description:m().optional(),inputSchema:Y(m(),W()),outputSchema:Y(m(),W()).optional()}),Gn=xn.extend({_meta:C({"io.decocms":C({id:m(),verified:L(),scopeName:m(),appName:m(),friendlyName:m().nullable().optional(),metadata:Y(m(),W()).nullable().optional(),publishedAt:m().datetime().optional(),updatedAt:m().datetime().optional(),tools:O(Kn).nullable().optional().describe("Available tools exposed by this app")}).optional()}).optional(),server:C({$schema:m().optional(),_meta:Y(m(),W()).optional(),name:m().describe("The server name (scope/app)"),title:m().optional().describe("User-friendly title"),description:m().optional().describe("Server description"),icons:O(C({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ke(["light","dark"]).optional()})).optional(),remotes:O(C({type:ke(["http","stdio","sse"]),url:m().optional(),headers:O(W()).optional()})).optional(),packages:O(W()).optional(),repository:C({url:m(),source:m().optional(),subfolder:m().optional()}).optional(),version:m().optional(),websiteUrl:m().optional()})});gn("registry_app",Gn,{readOnly:!0});const Wn=C({specversion:Re("1.0").describe("CloudEvents specification version"),id:m().describe("Unique identifier for this event (UUID recommended)"),source:m().describe("Connection ID of the event publisher"),type:m().describe("Event type (e.g., 'order.created', 'user.signup')"),time:m().datetime().optional().describe("Timestamp of when the event occurred (ISO 8601)"),subject:m().optional().describe("Subject/resource identifier (e.g., order ID, user ID)"),datacontenttype:m().optional().default("application/json").describe("Content type of the data attribute"),dataschema:m().url().optional().describe("URI to the schema for the data attribute"),data:W().optional().describe("Event payload (any JSON value)")});C({events:O(Wn).min(1).describe("Batch of CloudEvents to process")});const qn=C({success:L().optional().describe("Whether this event was processed successfully"),error:m().optional().describe("Error message for this event"),retryAfter:$().int().positive().optional().describe("Re-deliver this event after this many ms")});C({success:L().optional().describe("Batch success - applies to events not in results"),error:m().optional().describe("Batch error message - applies to events not in results"),processedCount:$().int().min(0).optional().describe("Number of events successfully processed"),retryAfter:$().int().positive().optional().describe("Batch retryAfter - applies to events not in results"),results:Y(m(),qn).optional().describe("Per-event results keyed by event ID")});C({type:m().min(1).max(255).describe("Event type identifier"),subject:m().max(255).optional().describe("Subject/resource identifier (e.g., order ID)"),data:W().optional().describe("Event payload"),deliverAt:m().datetime().optional().describe("Scheduled delivery time (ISO 8601). Omit for immediate delivery."),cron:m().max(100).optional().describe("Cron expression for recurring delivery. Use EVENT_CANCEL to stop.")});C({id:m().describe("Unique event ID"),type:m().describe("Event type"),source:m().describe("Source connection ID"),time:m().describe("Event timestamp")});C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")});C({subscription:C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")})});const Hn=C({eventType:m().min(1).max(255).describe("Event type to subscribe to"),publisher:m().optional().describe("Filter events by publisher connection ID"),filter:m().max(1e3).optional().describe("JSONPath filter expression on event data")}),Yn=C({id:m().describe("Subscription ID"),connectionId:m().describe("Subscriber connection ID"),eventType:m().describe("Event type pattern"),publisher:m().nullable().describe("Publisher connection filter"),filter:m().nullable().describe("JSONPath filter expression"),enabled:L().describe("Whether subscription is enabled"),createdAt:m().datetime().describe("Created timestamp (ISO 8601)"),updatedAt:m().datetime().describe("Updated timestamp (ISO 8601)")});C({subscriptions:O(Hn).describe("Desired subscriptions - system will create/update/delete to match")});C({created:$().int().min(0).describe("Number of subscriptions created"),updated:$().int().min(0).describe("Number of subscriptions with filter updated"),deleted:$().int().min(0).describe("Number of subscriptions removed"),unchanged:$().int().min(0).describe("Number of subscriptions unchanged"),subscriptions:O(Yn).describe("Current subscriptions after sync")});C({subscriptionId:m().describe("Subscription ID to remove")});C({success:L().describe("Whether unsubscribe was successful"),subscriptionId:m().describe("Subscription ID that was removed")});C({eventId:m().describe("Event ID to cancel")});C({success:L().describe("Whether cancellation was successful"),eventId:m().describe("Event ID that was cancelled")});C({eventId:m().describe("Event ID to acknowledge")});C({success:L().describe("Whether ACK was successful"),eventId:m().describe("Event ID that was acknowledged")});const Jn=C({type:Re("string"),enum:O(m()).optional(),description:m().optional()}),Xn=C({type:m(),description:m(),paramsSchema:Y(m(),Jn)});C({});C({triggers:O(Xn)});C({type:m(),params:Y(m(),m()),enabled:L(),callbackUrl:Ct().optional(),callbackToken:m().min(1).optional()});C({success:L()});C({prefix:m().optional().describe("Filter objects by prefix (e.g., 'folder/' for folder contents)"),maxKeys:$().optional().default(1e3).describe("Maximum number of keys to return (default: 1000)"),continuationToken:m().optional().describe("Token for pagination from previous response"),delimiter:m().optional().describe("Delimiter for grouping keys (typically '/'). When set, commonPrefixes returns folder paths.")});C({objects:O(C({key:m().describe("Object key/path"),size:$().describe("Object size in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object")})),nextContinuationToken:m().optional().describe("Token for fetching next page of results"),isTruncated:L().describe("Whether there are more results available"),commonPrefixes:O(m()).optional().describe("Folder paths when delimiter is used (e.g., ['photos/2024/', 'photos/2025/'])")});C({key:m().describe("Object key/path to get metadata for")});C({contentType:m().optional().describe("MIME type of the object"),contentLength:$().describe("Size of the object in bytes"),lastModified:m().describe("Last modified timestamp"),etag:m().describe("Entity tag for the object"),metadata:Y(m(),m()).optional().describe("Custom metadata key-value pairs")});C({key:m().describe("Object key/path to generate URL for"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)")});C({url:m().describe("Presigned URL for downloading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path for the upload"),expiresIn:$().optional().describe("URL expiration time in seconds (default: from state config or 3600)"),contentType:m().optional().describe("MIME type for the object being uploaded")});C({url:m().describe("Presigned URL for uploading the object"),expiresIn:$().describe("Expiration time in seconds that was used")});C({key:m().describe("Object key/path to delete")});C({success:L().describe("Whether the deletion was successful"),key:m().describe("The key that was deleted")});C({keys:O(m()).max(1e3).describe("Array of object keys/paths to delete (max 1000)")});C({deleted:O(m()).describe("Array of successfully deleted keys"),errors:O(C({key:m(),message:m()})).describe("Array of errors for failed deletions")});const Zn=C({primary:m().optional().describe("Primary brand color (hex)"),secondary:m().optional().describe("Secondary brand color (hex)"),accent:m().optional().describe("Accent / highlight color (hex)"),background:m().optional().describe("Background color (hex)"),foreground:m().optional().describe("Foreground / text color (hex)")}),Qn=C({heading:m().optional().describe("Font family for headings"),body:m().optional().describe("Font family for body text"),code:m().optional().describe("Font family for code / monospace")}),es=C({logo:m().optional().describe("Logo URL"),favicon:m().optional().describe("Favicon URL"),ogImage:m().optional().describe("Open Graph image URL")}),ts=C({id:m(),name:m().describe("Brand / company name"),domain:m().optional().describe("Company domain (e.g. example.com)"),colors:Zn.optional().describe("Semantic color palette"),fonts:Qn.optional().describe("Font families by role"),assets:es.optional().describe("Visual identity assets"),overview:m().optional().describe("Company overview / description"),tagline:m().optional().describe("Brand tagline"),tone:m().optional().describe("Tone of voice description"),metadata:Y(m(),W()).optional().describe("Extra design tokens and metadata")});C({id:m().optional().describe("Brand ID. Omit to get the default brand.")});C({});C({items:O(ts)});const ns={"@deco/event-bus":"EVENT_BUS","@deco/llm":"LLMS","@deco/trigger":"TRIGGER","@deco/object-storage":"OBJECT_STORAGE","@deco/brand":"BRAND"};function ss(t){if(t)return ns[t]}function Yo(t,e){const s=t.tools;if(!s||s.length===0)return!1;const r=s.map(a=>({name:a.name,inputSchema:a.inputSchema})),o=e.map(a=>({name:a.name,inputSchema:a.inputSchema,opt:a.opt}));return Un(o).isImplementedBy(r)}function rs(t){return t.startsWith("@")?t:`@${t}`}function os(){const{org:t}=he(),{data:e}=kt.useSession(),s=Wt(),r=wn(),o=Sn(),i=r.filter(c=>o(c.id));return{installByBinding:async c=>{if(!t||!e?.user?.id){ae.error("Not authenticated");return}const u=rs(c),p=(await Promise.all(i.map(async b=>{const v=bn(b.id,t.id);try{const y=await vn(b.id,t.id,t.slug,v,{where:{appName:u}});return yn(y??[])[0]??null}catch{return null}}))).find(b=>b!==null);if(!p){ae.error(`MCP Server not found in registry: ${c}`);return}const l=jn(p,t.id,e.user.id),d=l.connection_type==="STDIO",g=!!l.connection_url,h=d&&l.connection_headers&&typeof l.connection_headers=="object"&&"command"in l.connection_headers;if(!g&&!h){ae.error("This MCP Server cannot be connected: no connection method available");return}return await s.create.mutateAsync(l),{id:l.id,connection:l}},isInstalling:s.create.isPending}}function is(t){return j.forwardRef(({fields:e,widgets:s,templates:r,...o},i)=>(e={...t?.fields,...e},s={...t?.widgets,...s},r={...t?.templates,...r,ButtonTemplates:{...t?.templates?.ButtonTemplates,...r?.ButtonTemplates}},n.jsx(Yt,{...t,...o,fields:e,widgets:s,templates:r,ref:i})))}const as=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ls=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,r)=>r?r.toUpperCase():s.toLowerCase()),_e=t=>{const e=ls(t);return e.charAt(0).toUpperCase()+e.slice(1)},ze=(...t)=>t.filter((e,s,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===s).join(" ").trim(),cs=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var ds={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 us=j.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:s=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...c},u)=>j.createElement("svg",{ref:u,...ds,width:e,height:e,stroke:t,strokeWidth:r?Number(s)*24/Number(e):s,className:ze("lucide",o),...!i&&!cs(c)&&{"aria-hidden":"true"},...c},[...a.map(([f,p])=>j.createElement(f,p)),...Array.isArray(i)?i:[i]]));const K=(t,e)=>{const s=j.forwardRef(({className:r,...o},i)=>j.createElement(us,{ref:i,iconNode:e,className:ze(`lucide-${as(_e(t))}`,`lucide-${t}`,r),...o}));return s.displayName=_e(t),s};const ms=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ps=K("check",ms);const fs=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Le=K("chevron-down",fs);const hs=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],xs=K("chevron-up",hs);const gs=[["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"}]],bs=K("circle-alert",gs);const vs=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],Ue=K("circle-plus",vs);const ys=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],js=K("circle",ys);const ws=[["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"}]],Ss=K("copy",ws);const Ns=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cs=K("search",Ns);const ks=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_s=K("trash-2",ks);const Rs=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ke=K("x",Rs);function I(...t){return _t(Rt(t))}const Is=xe("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md 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",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs 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 shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",xs:"h-6 rounded-md gap-1 px-2 has-[>svg]:px-2",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function we({className:t,variant:e,size:s,asChild:r=!1,...o}){const i=r?Ie:"button";return n.jsx(i,{"data-slot":"button",className:I(Is({variant:e,size:s,className:t})),...o})}function Ts({uiSchema:t,registry:e,className:s,...r}){const{translateString:o}=e;return n.jsx("div",{className:"p-0 m-0",children:n.jsxs(we,{...r,className:I("w-fit gap-2",s),variant:"outline",type:"button",children:[n.jsx(Ue,{size:16})," ",o(Z.AddItemButton)]})})}function Ds(t){const{children:e,buttonsProps:s,displayLabel:r,hasDescription:o,hasToolbar:i,uiSchema:a,registry:c}=t,u=oe(a),f=Q("ArrayFieldItemButtonsTemplate",c,u),p=o?-6:22;return n.jsx("div",{children:n.jsxs("div",{className:"mb-2 flex flex-row flex-wrap items-center",children:[n.jsx("div",{className:"grow shrink",children:e}),n.jsx("div",{className:"flex items-end justify-end p-0.5",children:i&&n.jsx("div",{className:"flex gap-2",style:{marginLeft:"5px",marginTop:r?`${p}px`:void 0},children:n.jsx(f,{...s})})})]})})}function As(t){const{canAdd:e,disabled:s,fieldPathId:r,uiSchema:o,items:i,optionalDataControl:a,onAddClick:c,readonly:u,registry:f,required:p,schema:l,title:d}=t,g=oe(o),h=Q("ArrayFieldDescriptionTemplate",f,g),b=Q("ArrayFieldTitleTemplate",f,g),v=!u&&!s,{ButtonTemplates:{AddButton:y}}=f.templates;return n.jsx("div",{children:n.jsx("div",{className:"m-0 flex p-0",children:n.jsxs("div",{className:"m-0 w-full p-0",children:[n.jsx(b,{fieldPathId:r,title:g.title||d,schema:l,uiSchema:o,required:p,registry:f,optionalDataControl:v?a:void 0}),n.jsx(h,{fieldPathId:r,description:g.description||l.description,schema:l,uiSchema:o,registry:f}),n.jsxs("div",{className:"p-0 m-0 w-full mb-2",children:[v?void 0:a,i,e&&n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(r,"add"),className:"rjsf-array-item-add",onClick:c,disabled:s||u,uiSchema:o,registry:f})})]},`array-item-list-${r.$id}`)]})})})}function Ge({className:t,type:e,...s}){return n.jsx("input",{type:e,"data-slot":"input",className:I("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",t),...s})}function Es({id:t,htmlName:e,placeholder:s,required:r,readonly:o,disabled:i,type:a,value:c,onChange:u,onChangeOverride:f,onBlur:p,onFocus:l,autofocus:d,options:g,schema:h,rawErrors:b=[],children:v,extraProps:y,className:x,registry:w}){const{ClearButton:N}=w.templates.ButtonTemplates,R={...y,...Jt(h,a,g)},k=({target:{value:E}})=>u(E===""?g.emptyValue:E),S=({target:E})=>p(t,E&&E.value),_=({target:E})=>l(t,E&&E.value),D=j.useCallback(E=>{var T;E.preventDefault(),E.stopPropagation(),u((T=g.emptyValue)!==null&&T!==void 0?T:"")},[u,g.emptyValue]);return n.jsxs("div",{className:"p-0.5",children:[n.jsx(Ge,{id:t,name:e||t,type:a,placeholder:s,autoFocus:d,required:r,disabled:i,readOnly:o,className:I({"border-destructive focus-visible:ring-0":b.length>0},x),list:h.examples?Xt(t):void 0,...R,value:c||c===0?c:"",onChange:f||k,onBlur:S,onFocus:_,"aria-describedby":ee(t,!!h.examples)}),g.allowClearTextInputs&&!o&&!i&&c&&n.jsx(N,{onClick:D,registry:w}),v,n.jsx(Zt,{id:t,schema:h})]})}function Ps({id:t,description:e,registry:s,uiSchema:r}){return e?n.jsx("div",{children:n.jsx("div",{id:t,className:"text-sm text-muted-foreground",children:n.jsx(Qt,{description:e,registry:s,uiSchema:r})})}):null}const Bs=xe("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Fs({className:t,variant:e,...s}){return n.jsx("div",{"data-slot":"alert",role:"alert",className:I(Bs({variant:e}),t),...s})}function Ms({className:t,...e}){return n.jsx("div",{"data-slot":"alert-title",className:I("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...e})}function Os({className:t,...e}){return n.jsx("div",{"data-slot":"alert-description",className:I("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...e})}function Vs({errors:t,registry:e}){const{translateString:s}=e;return n.jsxs(Fs,{variant:"destructive",className:"mb-2",children:[n.jsx(bs,{className:"h-4 w-4"}),n.jsx(Ms,{children:s(Z.ErrorsLabel)}),n.jsx(Os,{className:"flex flex-col gap-1",children:t.map((r,o)=>n.jsxs("span",{children:["• ",r.stack]},o))})]})}function $s(t){const{errors:e=[],fieldPathId:s}=t;if(e.length===0)return null;const r=en(s);return n.jsx("div",{className:"flex flex-col gap-1",id:r,children:e.map((o,i)=>n.jsx("span",{className:"text-xs font-medium text-destructive mb-1",children:o},i))})}function zs(t){const{fieldPathId:e,help:s,uiSchema:r,registry:o,hasErrors:i}=t;return s?n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{"text-destructive":i}),id:nn(e),children:n.jsx(tn,{help:s,registry:o,uiSchema:r})}):null}function Ls({id:t,children:e,displayLabel:s,rawErrors:r=[],errors:o,help:i,description:a,rawDescription:c,classNames:u,style:f,disabled:p,label:l,hidden:d,onKeyRename:g,onKeyRenameBlur:h,onRemoveProperty:b,readonly:v,required:y,schema:x,uiSchema:w,registry:N}){const R=oe(w),k=Q("WrapIfAdditionalTemplate",N,R);if(d)return n.jsx("div",{className:"hidden",children:e});const S=R.widget==="checkbox";return n.jsx(k,{classNames:u,style:f,disabled:p,id:t,label:l,displayLabel:s,onKeyRename:g,onKeyRenameBlur:h,onRemoveProperty:b,rawDescription:c,readonly:v,required:y,schema:x,uiSchema:w,registry:N,children:n.jsxs("div",{className:"flex flex-col gap-2",children:[s&&!S&&n.jsxs("label",{className:I("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",{" text-destructive":r.length>0}),htmlFor:t,children:[l,y?"*":null]}),e,s&&c&&!S&&n.jsx("span",{className:I("text-xs font-medium text-muted-foreground",{" text-destructive":r.length>0}),children:a}),o,i]})})}function Us(t){const{children:e,column:s,className:r,...o}=t;return n.jsx("div",{className:I("grid gap-2",r),...o,children:e})}function ne(t){const{icon:e,iconType:s,className:r,uiSchema:o,registry:i,...a}=t;return n.jsx(we,{size:"icon",variant:"outline",className:r,...a,type:"button",children:e})}function Ks(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.CopyButton),...t,icon:n.jsx(Ss,{className:"h-4 w-4"})})}function Gs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveDownButton),...t,icon:n.jsx(Le,{className:"h-4 w-4"})})}function Ws(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.MoveUpButton),...t,icon:n.jsx(xs,{className:"h-4 w-4"})})}function We(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.RemoveButton),...t,className:"border-destructive",icon:n.jsx(_s,{className:"h-4 w-4 stroke-destructive"})})}function qs(t){const{registry:{translateString:e}}=t;return n.jsx(ne,{title:e(Z.ClearButton),...t,icon:n.jsx(Ke,{})})}function Hs({selector:t,optionSchemaField:e}){return n.jsxs("div",{className:I("p-4 border rounded-md bg-background shadow-sm"),children:[n.jsx("div",{className:I("mb-4"),children:t}),e]})}function Ys({description:t,title:e,properties:s,required:r,uiSchema:o,fieldPathId:i,schema:a,formData:c,optionalDataControl:u,onAddProperty:f,disabled:p,readonly:l,registry:d}){const g=oe(o),h=Q("TitleFieldTemplate",d,g),b=Q("DescriptionFieldTemplate",d,g),v=!l&&!p,{ButtonTemplates:{AddButton:y}}=d.templates;return n.jsxs(n.Fragment,{children:[e&&n.jsx(h,{id:sn(i),title:e,required:r,schema:a,uiSchema:o,registry:d,optionalDataControl:v?u:void 0}),t&&n.jsx(b,{id:Me(i),description:t,schema:a,uiSchema:o,registry:d}),n.jsxs("div",{className:"flex flex-col gap-2",children:[v?void 0:u,s.map((x,w)=>n.jsx("div",{className:`${x.hidden?"hidden":""} flex`,children:n.jsx("div",{className:"w-full",children:x.content})},w)),rn(a,o,c)?n.jsx("div",{className:"mt-2 flex justify-end",children:n.jsx(y,{id:ye(i,"add"),onClick:f,disabled:p||l,className:"rjsf-object-property-expand",uiSchema:o,registry:d})}):null]})]})}function Js(t){const{id:e,registry:s,label:r,onAddClick:o,onRemoveClick:i}=t;return o?n.jsx(ne,{id:e,registry:s,className:"rjsf-add-optional-data",onClick:o,title:r,icon:n.jsx(Ue,{}),size:"xs"}):i?n.jsx(We,{id:e,registry:s,className:"rjsf-remove-optional-data",onClick:i,title:r,size:"xs"}):n.jsx("em",{id:e,children:r})}function Xs(t){const{submitText:e,norender:s,props:r}=on(t.uiSchema);return s?null:n.jsx("div",{children:n.jsx(we,{type:"submit",...r,className:I("my-2",r?.className),children:e})})}function qe({className:t,orientation:e="horizontal",decorative:s=!0,...r}){return n.jsx(It,{"data-slot":"separator",decorative:s,orientation:e,className:I("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function Zs({id:t,title:e,uiSchema:s,optionalDataControl:r}){const o=oe(s);let i=n.jsx("h5",{children:o.title||e});return r&&(i=n.jsxs("div",{className:"flex flex-row",children:[n.jsx("div",{className:"flex-grow",children:i}),n.jsx("div",{className:"flex",children:r})]})),n.jsxs("div",{id:t,className:"my-1 flex flex-col gap-0.5",children:[i,n.jsx(qe,{dir:"horizontal",style:{height:"1px"},className:"my-1"})]})}function Qs({classNames:t,style:e,children:s,disabled:r,id:o,label:i,displayLabel:a,onRemoveProperty:c,onKeyRenameBlur:u,rawDescription:f,readonly:p,required:l,schema:d,uiSchema:g,registry:h}){const{templates:b,translateString:v}=h,{RemoveButton:y}=b.ButtonTemplates,x=v(Z.KeyLabel,[i]);if(!(an in d))return n.jsx("div",{className:t,style:e,children:s});const R=a?22+(f?-28:0):0,k=`${o}-key`;return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:`grid grid-cols-12 col-span-12 items-center gap-2 ${t}`,style:e,children:[n.jsx("div",{className:"grid gap-2 col-span-5",children:n.jsxs("div",{className:"flex flex-col gap-2",children:[a&&n.jsx("label",{htmlFor:k,className:"text-sm font-medium text-muted-foreground leading-none",children:x}),n.jsx("div",{className:"pl-0.5",children:n.jsx(Ge,{required:l,defaultValue:i,disabled:r||p,id:k,name:k,onBlur:p?void 0:u,type:"text",className:"w-full border shadow-sm"},i)}),!!f&&n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.jsx("div",{className:"text-sm text-muted-foreground",children:" "})})]})}),n.jsx("div",{className:"grid gap-2 col-span-6 pr-0.5",children:s}),n.jsx("div",{className:"grid gap-2 col-span-1",style:{marginTop:`${R}px`},children:n.jsx(y,{id:ye(o,"remove"),iconType:"block",className:"rjsf-object-property-remove w-full",disabled:r||p,onClick:c,uiSchema:g,registry:h})})]}),n.jsx(qe,{dir:"horizontal",className:"mt-2"})]})}function er(){return{ArrayFieldItemTemplate:Ds,ArrayFieldTemplate:As,BaseInputTemplate:Es,ButtonTemplates:{AddButton:Ts,CopyButton:Ks,MoveDownButton:Gs,MoveUpButton:Ws,RemoveButton:We,SubmitButton:Xs,ClearButton:qs},DescriptionFieldTemplate:Ps,ErrorListTemplate:Vs,FieldErrorTemplate:$s,FieldHelpTemplate:zs,FieldTemplate:Ls,GridTemplate:Us,MultiSchemaFieldTemplate:Hs,ObjectFieldTemplate:Ys,OptionalDataControlsTemplate:Js,TitleFieldTemplate:Zs,WrapIfAdditionalTemplate:Qs}}function tr(t,e){if(t==null)return{};var s={},r=Object.keys(t),o,i;for(i=0;i<r.length;i++)o=r[i],!(e.indexOf(o)>=0)&&(s[o]=t[o]);return s}var nr=["color"],sr=j.forwardRef(function(t,e){var s=t.color,r=s===void 0?"currentColor":s,o=tr(t,nr);return j.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:e}),j.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function He({className:t,...e}){return n.jsx(Tt,{"data-slot":"checkbox",className:I("peer border-input 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",t),...e,children:n.jsx(Dt,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:n.jsx(sr,{className:"size-3.5"})})})}function Se({className:t,...e}){return n.jsx(At,{"data-slot":"label",className:I("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...e})}function rr(t){const{id:e,htmlName:s,value:r,disabled:o,readonly:i,label:a,hideLabel:c,schema:u,autofocus:f,options:p,onChange:l,onBlur:d,onFocus:g,registry:h,uiSchema:b,className:v}=t,y=ln(u),x=Q("DescriptionFieldTemplate",h,p),w=S=>l(S),N=()=>d(e,r),R=()=>g(e,r),k=p.description||u.description;return n.jsxs("div",{className:`relative ${o||i?"cursor-not-allowed opacity-50":""}`,"aria-describedby":ee(e),children:[!c&&k&&n.jsx(x,{id:Me(e),description:k,schema:u,uiSchema:b,registry:h}),n.jsxs("div",{className:"flex items-center gap-2 my-2",children:[n.jsx(He,{id:e,name:s||e,checked:typeof r>"u"?!1:!!r,required:y,disabled:o||i,autoFocus:f,onCheckedChange:w,onBlur:N,onFocus:R,className:v}),n.jsx(Se,{className:"leading-tight",htmlFor:e,children:cn(a,c||!a)})]})]})}function or({id:t,htmlName:e,disabled:s,options:r,value:o,autofocus:i,readonly:a,required:c,onChange:u,onBlur:f,onFocus:p,className:l}){const{enumOptions:d,enumDisabled:g,inline:h,emptyValue:b}=r,v=je(r),y=Array.isArray(o)?o:[o],x=({target:N})=>f(t,H(N&&N.value,d,v,b)),w=({target:N})=>p(t,H(N&&N.value,d,v,b));return n.jsx("div",{className:I({"flex flex-col gap-2":!h,"flex flex-row gap-4 flex-wrap":h}),children:Array.isArray(d)&&d.map((N,R)=>{const k=Oe(N.value,y),S=Array.isArray(g)&&g.indexOf(N.value)!==-1,_=re(t,R);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(He,{id:_,name:e||t,required:c,disabled:s||S||a,onCheckedChange:D=>{u(D?dn(R,y,d):un(R,y,d))},className:l,checked:k,autoFocus:i&&R===0,onBlur:x,onFocus:w,"aria-describedby":ee(t)}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,R),children:N.label})]},_)})})}var Ne="Radio",[ir,Ye]=ge(Ne),[ar,lr]=ir(Ne),Je=j.forwardRef((t,e)=>{const{__scopeRadio:s,name:r,checked:o=!1,required:i,disabled:a,value:c="on",onCheck:u,form:f,...p}=t,[l,d]=j.useState(null),g=X(e,v=>d(v)),h=j.useRef(!1),b=l?f||!!l.closest("form"):!0;return n.jsxs(ar,{scope:s,checked:o,disabled:a,children:[n.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":et(o),"data-disabled":a?"":void 0,disabled:a,value:c,...p,ref:g,onClick:q(t.onClick,v=>{o||u?.(),b&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})}),b&&n.jsx(Qe,{control:l,bubbles:!h.current,name:r,value:c,checked:o,required:i,disabled:a,form:f,style:{transform:"translateX(-100%)"}})]})});Je.displayName=Ne;var Xe="RadioIndicator",Ze=j.forwardRef((t,e)=>{const{__scopeRadio:s,forceMount:r,...o}=t,i=lr(Xe,s);return n.jsx(Bt,{present:r||i.checked,children:n.jsx(J.span,{"data-state":et(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:e})})});Ze.displayName=Xe;var cr="RadioBubbleInput",Qe=j.forwardRef(({__scopeRadio:t,control:e,checked:s,bubbles:r=!0,...o},i)=>{const a=j.useRef(null),c=X(a,i),u=Ee(s),f=Pe(e);return j.useEffect(()=>{const p=a.current;if(!p)return;const l=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(l,"checked").set;if(u!==s&&g){const h=new Event("click",{bubbles:r});g.call(p,s),p.dispatchEvent(h)}},[u,s,r]),n.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:s,...o,tabIndex:-1,ref:c,style:{...o.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qe.displayName=cr;function et(t){return t?"checked":"unchecked"}var dr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ce="RadioGroup",[ur]=ge(ce,[Ae,Ye]),tt=Ae(),nt=Ye(),[mr,pr]=ur(ce),st=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,name:r,defaultValue:o,value:i,required:a=!1,disabled:c=!1,orientation:u,dir:f,loop:p=!0,onValueChange:l,...d}=t,g=tt(s),h=Te(f),[b,v]=De({prop:i,defaultProp:o??null,onChange:l,caller:ce});return n.jsx(mr,{scope:s,name:r,required:a,disabled:c,value:b,onValueChange:v,children:n.jsx(Et,{asChild:!0,...g,orientation:u,dir:h,loop:p,children:n.jsx(J.div,{role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":c?"":void 0,dir:h,...d,ref:e})})})});st.displayName=ce;var rt="RadioGroupItem",ot=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,disabled:r,...o}=t,i=pr(rt,s),a=i.disabled||r,c=tt(s),u=nt(s),f=j.useRef(null),p=X(e,f),l=i.value===o.value,d=j.useRef(!1);return j.useEffect(()=>{const g=b=>{dr.includes(b.key)&&(d.current=!0)},h=()=>d.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",h)}},[]),n.jsx(Pt,{asChild:!0,...c,focusable:!a,active:l,children:n.jsx(Je,{disabled:a,required:i.required,checked:l,...u,...o,name:i.name,ref:p,onCheck:()=>i.onValueChange(o.value),onKeyDown:q(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:q(o.onFocus,()=>{d.current&&f.current?.click()})})})});ot.displayName=rt;var fr="RadioGroupIndicator",it=j.forwardRef((t,e)=>{const{__scopeRadioGroup:s,...r}=t,o=nt(s);return n.jsx(Ze,{...o,...r,ref:e})});it.displayName=fr;var hr=st,xr=ot,gr=it;function br({className:t,...e}){return n.jsx(hr,{"data-slot":"radio-group",className:I("grid gap-3",t),...e})}function vr({className:t,...e}){return n.jsx(xr,{"data-slot":"radio-group-item",className:I("border-input text-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 dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:n.jsx(gr,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:n.jsx(js,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}function yr({id:t,options:e,value:s,required:r,disabled:o,readonly:i,onChange:a,onBlur:c,onFocus:u,className:f}){const{enumOptions:p,enumDisabled:l,emptyValue:d}=e,g=je(e),h=x=>a(H(x,p,g,d)),b=({target:x})=>c(t,H(x&&x.value,p,g,d)),v=({target:x})=>u(t,H(x&&x.value,p,g,d)),y=!!(e&&e.inline);return n.jsx("div",{className:"mb-0",children:n.jsx(br,{defaultValue:s?.toString(),required:r,disabled:o||i,onValueChange:x=>{h(x)},onBlur:b,onFocus:v,"aria-describedby":ee(t),orientation:y?"horizontal":"vertical",className:I("flex flex-wrap",{"flex-col":!y},f),children:Array.isArray(p)&&p.map((x,w)=>{const N=Array.isArray(l)&&l.indexOf(x.value)!==-1,R=Oe(x.value,s);return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vr,{checked:R,value:Ve(x.value,w,g),id:re(t,w),disabled:N}),n.jsx(Se,{className:"leading-tight",htmlFor:re(t,w),children:x.label})]},re(t,w))})})})}var at=["PageUp","PageDown"],lt=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ct={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},se="Slider",[me,jr,wr]=Ft(se),[dt]=ge(se,[wr]),[Sr,de]=dt(se),ut=j.forwardRef((t,e)=>{const{name:s,min:r=0,max:o=100,step:i=1,orientation:a="horizontal",disabled:c=!1,minStepsBetweenThumbs:u=0,defaultValue:f=[r],value:p,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:g=!1,form:h,...b}=t,v=j.useRef(new Set),y=j.useRef(0),w=a==="horizontal"?Nr:Cr,[N=[],R]=De({prop:p,defaultProp:f,onChange:T=>{[...v.current][y.current]?.focus(),l(T)}}),k=j.useRef(N);function S(T){const A=Tr(N,T);E(T,A)}function _(T){E(T,y.current)}function D(){const T=k.current[y.current];N[y.current]!==T&&d(N)}function E(T,A,{commit:P}={commit:!1}){const F=Pr(i),M=Br(Math.round((T-r)/i)*i+r,F),B=$e(M,[r,o]);R((z=[])=>{const U=Rr(z,B,A);if(Er(U,u*i)){y.current=U.indexOf(B);const G=String(U)!==String(z);return G&&P&&d(U),G?U:z}else return z})}return n.jsx(Sr,{scope:t.__scopeSlider,name:s,disabled:c,min:r,max:o,valueIndexToChangeRef:y,thumbs:v.current,values:N,orientation:a,form:h,children:n.jsx(me.Provider,{scope:t.__scopeSlider,children:n.jsx(me.Slot,{scope:t.__scopeSlider,children:n.jsx(w,{"aria-disabled":c,"data-disabled":c?"":void 0,...b,ref:e,onPointerDown:q(b.onPointerDown,()=>{c||(k.current=N)}),min:r,max:o,inverted:g,onSlideStart:c?void 0:S,onSlideMove:c?void 0:_,onSlideEnd:c?void 0:D,onHomeKeyDown:()=>!c&&E(r,0,{commit:!0}),onEndKeyDown:()=>!c&&E(o,N.length-1,{commit:!0}),onStepKeyDown:({event:T,direction:A})=>{if(!c){const M=at.includes(T.key)||T.shiftKey&&lt.includes(T.key)?10:1,B=y.current,z=N[B],U=i*M*A;E(z+U,B,{commit:!0})}}})})})})});ut.displayName=se;var[mt,pt]=dt(se,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Nr=j.forwardRef((t,e)=>{const{min:s,max:r,dir:o,inverted:i,onSlideStart:a,onSlideMove:c,onSlideEnd:u,onStepKeyDown:f,...p}=t,[l,d]=j.useState(null),g=X(e,w=>d(w)),h=j.useRef(void 0),b=Te(o),v=b==="ltr",y=v&&!i||!v&&i;function x(w){const N=h.current||l.getBoundingClientRect(),R=[0,N.width],S=Ce(R,y?[s,r]:[r,s]);return h.current=N,S(w-N.left)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:y?"left":"right",endEdge:y?"right":"left",direction:y?1:-1,size:"width",children:n.jsx(ft,{dir:b,"data-orientation":"horizontal",...p,ref:g,style:{...p.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const N=x(w.clientX);a?.(N)},onSlideMove:w=>{const N=x(w.clientX);c?.(N)},onSlideEnd:()=>{h.current=void 0,u?.()},onStepKeyDown:w=>{const R=ct[y?"from-left":"from-right"].includes(w.key);f?.({event:w,direction:R?-1:1})}})})}),Cr=j.forwardRef((t,e)=>{const{min:s,max:r,inverted:o,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:u,...f}=t,p=j.useRef(null),l=X(e,p),d=j.useRef(void 0),g=!o;function h(b){const v=d.current||p.current.getBoundingClientRect(),y=[0,v.height],w=Ce(y,g?[r,s]:[s,r]);return d.current=v,w(b-v.top)}return n.jsx(mt,{scope:t.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:n.jsx(ft,{"data-orientation":"vertical",...f,ref:l,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:b=>{const v=h(b.clientY);i?.(v)},onSlideMove:b=>{const v=h(b.clientY);a?.(v)},onSlideEnd:()=>{d.current=void 0,c?.()},onStepKeyDown:b=>{const y=ct[g?"from-bottom":"from-top"].includes(b.key);u?.({event:b,direction:y?-1:1})}})})}),ft=j.forwardRef((t,e)=>{const{__scopeSlider:s,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:c,onStepKeyDown:u,...f}=t,p=de(se,s);return n.jsx(J.span,{...f,ref:e,onKeyDown:q(t.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(c(l),l.preventDefault()):at.concat(lt).includes(l.key)&&(u(l),l.preventDefault())}),onPointerDown:q(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),p.thumbs.has(d)?d.focus():r(l)}),onPointerMove:q(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&o(l)}),onPointerUp:q(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),ht="SliderTrack",xt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(ht,s);return n.jsx(J.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:e})});xt.displayName=ht;var pe="SliderRange",gt=j.forwardRef((t,e)=>{const{__scopeSlider:s,...r}=t,o=de(pe,s),i=pt(pe,s),a=j.useRef(null),c=X(e,a),u=o.values.length,f=o.values.map(d=>yt(d,o.min,o.max)),p=u>1?Math.min(...f):0,l=100-Math.max(...f);return n.jsx(J.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:c,style:{...t.style,[i.startEdge]:p+"%",[i.endEdge]:l+"%"}})});gt.displayName=pe;var fe="SliderThumb",bt=j.forwardRef((t,e)=>{const s=jr(t.__scopeSlider),[r,o]=j.useState(null),i=X(e,c=>o(c)),a=j.useMemo(()=>r?s().findIndex(c=>c.ref.current===r):-1,[s,r]);return n.jsx(kr,{...t,ref:i,index:a})}),kr=j.forwardRef((t,e)=>{const{__scopeSlider:s,index:r,name:o,...i}=t,a=de(fe,s),c=pt(fe,s),[u,f]=j.useState(null),p=X(e,x=>f(x)),l=u?a.form||!!u.closest("form"):!0,d=Pe(u),g=a.values[r],h=g===void 0?0:yt(g,a.min,a.max),b=Ir(r,a.values.length),v=d?.[c.size],y=v?Dr(v,h,c.direction):0;return j.useEffect(()=>{if(u)return a.thumbs.add(u),()=>{a.thumbs.delete(u)}},[u,a.thumbs]),n.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[c.startEdge]:`calc(${h}% + ${y}px)`},children:[n.jsx(me.ItemSlot,{scope:t.__scopeSlider,children:n.jsx(J.span,{role:"slider","aria-label":t["aria-label"]||b,"aria-valuemin":a.min,"aria-valuenow":g,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:p,style:g===void 0?{display:"none"}:t.style,onFocus:q(t.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&n.jsx(vt,{name:o??(a.name?a.name+(a.values.length>1?"[]":""):void 0),form:a.form,value:g},r)]})});bt.displayName=fe;var _r="RadioBubbleInput",vt=j.forwardRef(({__scopeSlider:t,value:e,...s},r)=>{const o=j.useRef(null),i=X(o,r),a=Ee(e);return j.useEffect(()=>{const c=o.current;if(!c)return;const u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==e&&p){const l=new Event("input",{bubbles:!0});p.call(c,e),c.dispatchEvent(l)}},[a,e]),n.jsx(J.input,{style:{display:"none"},...s,ref:i,defaultValue:e})});vt.displayName=_r;function Rr(t=[],e,s){const r=[...t];return r[s]=e,r.sort((o,i)=>o-i)}function yt(t,e,s){const i=100/(s-e)*(t-e);return $e(i,[0,100])}function Ir(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function Tr(t,e){if(t.length===1)return 0;const s=t.map(o=>Math.abs(o-e)),r=Math.min(...s);return s.indexOf(r)}function Dr(t,e,s){const r=t/2,i=Ce([0,50],[0,r]);return(r-i(e)*s)*s}function Ar(t){return t.slice(0,-1).map((e,s)=>t[s+1]-e)}function Er(t,e){if(e>0){const s=Ar(t);return Math.min(...s)>=e}return!0}function Ce(t,e){return s=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(s-t[0])}}function Pr(t){return(String(t).split(".")[1]||"").length}function Br(t,e){const s=Math.pow(10,e);return Math.round(t*s)/s}var Fr=ut,Mr=xt,Or=gt,Vr=bt;function $r({className:t,defaultValue:e,value:s,min:r=0,max:o=100,...i}){const a=j.useMemo(()=>Array.isArray(s)?s:Array.isArray(e)?e:[r,o],[s,e,r,o]);return n.jsxs(Fr,{"data-slot":"slider",defaultValue:e,value:s,min:r,max:o,className:I("relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col",t),...i,children:[n.jsx(Mr,{"data-slot":"slider-track",className:I("bg-muted relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),children:n.jsx(Or,{"data-slot":"slider-range",className:I("bg-primary absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")})}),Array.from({length:a.length},(c,u)=>n.jsx(Vr,{"data-slot":"slider-thumb",className:"border-primary bg-background ring-ring/50 block size-4 shrink-0 rounded-full border shadow-sm transition-[color,box-shadow] hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"},u))]})}const zr=["name","min","max","step","orientation","disabled","defaultValue","value","onValueChange","className","dir","inverted","minStepsBetweenThumbs"];function Lr({value:t,readonly:e,disabled:s,options:r,schema:o,onChange:i,label:a,id:c}){const u=l=>i(l[0]),f={...mn(o)},p={id:c,...pn(r.props||{},zr)};return n.jsxs(n.Fragment,{children:[n.jsx($r,{disabled:s||e,min:f.min,max:f.max,step:f.step,value:[t],onValueChange:u,...p,"aria-describedby":ee(c)}),t]})}const Ur=xe("inline-flex items-center justify-center rounded-md 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",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Kr({className:t,variant:e,asChild:s=!1,...r}){const o=s?Ie:"span";return n.jsx(o,{"data-slot":"badge",className:I(Ur({variant:e}),t),...r})}const jt=j.forwardRef(({className:t,...e},s)=>n.jsx(te,{ref:s,"data-slot":"command",className:I("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})),Gr=j.forwardRef(({className:t,...e},s)=>n.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[n.jsx(Cs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),n.jsx(te.Input,{ref:s,className:I("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));Gr.displayName=te.Input.displayName;function wt({className:t,...e}){return n.jsx(te.List,{"data-slot":"command-list",className:I("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}function St({className:t,...e}){return n.jsx(te.Group,{"data-slot":"command-group",className:I("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}function Nt({className:t,...e}){return n.jsx(te.Item,{"data-slot":"command-item",className:I("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}function Wr({multiple:t,items:e=[],selected:s,onValueChange:r,autoFocus:o=!1,disabled:i=!1,ariaDescribedby:a,ariaPlaceholder:c,onFocus:u,onBlur:f,className:p,id:l}){const d=j.useRef(null),[g,h]=j.useState(!1),[b,v]=j.useState(""),y=j.useMemo(()=>e.filter(S=>s.some(_=>ue(S.value,_))),[e,s]),x=j.useMemo(()=>e.filter(S=>!y.some(_=>ue(_.value,S.value))),[e,y]),w=j.useCallback(S=>{if(i)return;const _=y.filter(D=>!ue(D.value,S.value));r?.(_.map(D=>D.index))},[y,r,i]),N=j.useCallback(S=>{if(!(i||!d.current||d.current.value!==""))if(S.key==="Delete"||S.key==="Backspace"){const _=y.slice(0,-1);r?.(_.map(D=>D.index))}else S.key==="Escape"&&d.current.blur()},[y,r,i]),R=j.useCallback(S=>{if(i)return;v("");const _=t?[...y,S]:[S];r?.(_.map(D=>D.index))},[t,y,r,i]),k=j.useCallback(S=>{i||h(!0),u?.(S)},[i,u]);return n.jsxs(jt,{onKeyDown:N,className:I("overflow-visible bg-transparent",p),autoFocus:o,"aria-disabled":i,onBlur:f,onFocus:k,"aria-describedby":a,"aria-placeholder":c,children:[n.jsx("div",{className:I("group border border-input px-3 py-2 text-sm ring-offset-background rounded-md focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-1",i&&"opacity-50 cursor-not-allowed"),children:n.jsxs("div",{className:"flex gap-1 flex-wrap",children:[y.map(S=>n.jsxs(Kr,{variant:"secondary",children:[S.label,n.jsx("button",{type:"button",className:"rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1",onKeyDown:_=>_.key==="Enter"&&!i&&w(S),onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},onClick:()=>w(S),disabled:i,children:n.jsx(Ke,{className:I("h-3 w-3 text-muted-foreground hover:text-foreground",i&&"pointer-events-none")})})]},S.value)),n.jsx(te.Input,{ref:d,value:b,onValueChange:v,onBlur:()=>h(!1),onFocus:()=>!i&&h(!0),placeholder:"Select ...",className:"rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1",disabled:i,"aria-controls":`command-item-input-${l}`,"aria-labelledby":`command-item-input-${l}`,id:`command-item-input-${l}`})]})}),g&&!i&&x.length>0&&n.jsx("div",{className:"relative mt-2",children:n.jsx("div",{className:"absolute w-full z-10 top-0 rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:x.map(S=>n.jsx(Nt,{disabled:S.disabled,onMouseDown:_=>{_.preventDefault(),_.stopPropagation()},"aria-controls":`${S.value}-command-item`,"aria-labelledby":`${S.value}-command-item`,id:`${S.value}-command-item`,onSelect:()=>R(S),className:"cursor-pointer",children:S.label},`${S.value}-command-item`))})})})})]})}function qr({items:t,selected:e,onValueChange:s,autoFocus:r=!1,disabled:o=!1,required:i=!1,placeholder:a="Select...",ariaDescribedby:c,ariaPlaceholder:u,onFocus:f,onBlur:p,className:l}){const[d,g]=j.useState(!1),h=t?.find(x=>x.value===e),b=j.useRef(null),v=j.useRef(null);j.useEffect(()=>{d&&b.current&&requestAnimationFrame(()=>{var x;(x=b.current)===null||x===void 0||x.scrollIntoView({block:"nearest"})})},[d]);const y=x=>{v.current&&!v.current.contains(x.relatedTarget)&&g(!1),p?.(x)};return n.jsxs(jt,{ref:v,className:I("overflow-visible bg-transparent",l),autoFocus:r,"aria-disabled":o,onBlur:y,onFocus:f,"aria-describedby":c,"aria-placeholder":u,children:[n.jsxs("div",{onClick:()=>!o&&g(!d),className:I("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",!h&&i&&"border-red-500",o&&"opacity-50 cursor-not-allowed",l),children:[n.jsx("span",{className:I("flex-1 line-clamp-1",!h&&"text-muted-foreground"),children:h?.label||a}),n.jsx(Le,{className:"h-4 w-4 opacity-50"})]}),n.jsx("div",{className:"relative",children:d&&t&&t.length>0?n.jsx("div",{style:{top:"0.5rem"},className:"absolute w-full z-10 rounded-md border bg-popover text-popover-foreground shadow-md outline-none",children:n.jsx(St,{className:"h-full overflow-auto",children:n.jsx(wt,{children:t.map(x=>n.jsxs(Nt,{ref:x.value===e?b:void 0,onMouseDown:w=>{w.preventDefault(),w.stopPropagation()},onSelect:()=>{x.disabled||(s?.(x.value),g(!1))},className:I("cursor-pointer relative flex items-center justify-between rounded-sm py-1.5 gap-2 rtl:flex-row-reverse",x.value===e&&"font-semibold",x.disabled&&"opacity-50 cursor-not-allowed"),children:[n.jsx("span",{children:x.label}),n.jsx("span",{className:"flex h-3.5 w-3.5 items-center justify-center",children:x.value===e&&n.jsx(ps,{className:"h-4 w-4"})})]},x.value))})})}):null})]})}function Hr({id:t,options:e,required:s,disabled:r,readonly:o,value:i,multiple:a,autofocus:c,onChange:u,onBlur:f,onFocus:p,placeholder:l,rawErrors:d=[],className:g}){const{enumOptions:h,enumDisabled:b,emptyValue:v}=e,y=je(e),x=()=>{p(t,H(i,h,y,v))},w=()=>{f(t,H(i,h,y,v))},N=h?.map(({value:k,label:S},_)=>({value:a?k:Ve(k,_,y),label:S,index:_,disabled:Array.isArray(b)&&b.includes(k)})),R=I({"border-destructive":d.length>0},g);return n.jsx("div",{className:"p-0.5",children:a?n.jsx(Wr,{id:t,autoFocus:c,disabled:r||o,multiple:!0,className:R,items:N,selected:i,onValueChange:k=>{u(H(k.map(String),h,y,v))},onFocus:x,onBlur:w}):n.jsx(qr,{items:N,selected:fn(i,h,!1,y,""),onValueChange:k=>{u(H(k,h,y,v))},autoFocus:c,disabled:r||o,required:s,placeholder:l,className:R,onFocus:x,onBlur:w,ariaDescribedby:ee(t)})})}function Yr({className:t,...e}){return n.jsx("textarea",{"data-slot":"textarea",className:I("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...e})}function Jr({id:t,htmlName:e,placeholder:s,value:r,required:o,disabled:i,autofocus:a,readonly:c,onBlur:u,onFocus:f,onChange:p,options:l,className:d}){const g=({target:{value:v}})=>p(v===""?l.emptyValue:v),h=({target:v})=>u(t,v&&v.value),b=({target:v})=>f(t,v&&v.value);return n.jsx("div",{className:"flex p-0.5",children:n.jsx(Yr,{id:t,name:e||t,placeholder:s,disabled:i,readOnly:c,value:r??"",required:o,autoFocus:a,rows:l.rows||5,onChange:g,onBlur:h,onFocus:b,"aria-describedby":ee(t),className:d})})}function Xr(){return{CheckboxWidget:rr,CheckboxesWidget:or,RadioWidget:yr,RangeWidget:Lr,SelectWidget:Hr,TextareaWidget:Jr}}function Zr(){return{templates:er(),widgets:Xr()}}function Qr(){return is(Zr())}const eo=Qr();function to(t){const e=V.c(21),{virtualMcp:s,isSelected:r}=t,o=r&&"bg-accent";let i;e[0]!==o?(i=be("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",o),e[0]=o,e[1]=i):i=e[1];let a;e[2]!==s.icon||e[3]!==s.title?(a=n.jsx(Fe,{icon:s.icon,name:s.title,size:"sm"}),e[2]=s.icon,e[3]=s.title,e[4]=a):a=e[4];let c;e[5]!==s.title?(c=n.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[5]=s.title,e[6]=c):c=e[6];let u;e[7]!==r?(u=r&&n.jsx($n,{size:16,className:"text-foreground shrink-0"}),e[7]=r,e[8]=u):u=e[8];let f;e[9]!==c||e[10]!==u?(f=n.jsxs("div",{className:"flex items-center justify-between",children:[c,u]}),e[9]=c,e[10]=u,e[11]=f):f=e[11];let p;e[12]!==s.description?(p=s.description&&n.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:s.description}),e[12]=s.description,e[13]=p):p=e[13];let l;e[14]!==f||e[15]!==p?(l=n.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[f,p]}),e[14]=f,e[15]=p,e[16]=l):l=e[16];let d;return e[17]!==i||e[18]!==a||e[19]!==l?(d=n.jsxs("div",{className:i,children:[a,l]}),e[17]=i,e[18]=a,e[19]=l,e[20]=d):d=e[20],d}function no(){const t=V.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex items-center justify-center py-12",children:n.jsx(ve,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function so(t){const e=V.c(33),{selectedVirtualMcpId:s,onVirtualMcpChange:r,searchInputRef:o}=t,i=Vn(),[a,c]=j.useState(""),u=j.useRef(null),f=o??u;let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={navigateOnCreate:!0},e[0]=p):p=e[0];const{createVirtualMCP:l,isCreating:d}=Ln(p);let g,h,b,v;if(e[1]!==l||e[2]!==f||e[3]!==d||e[4]!==r||e[5]!==a||e[6]!==s||e[7]!==i){let w;e:{const A=i.filter(ro);if(!a.trim()){w=A;break e}const P=a.toLowerCase();w=A.filter(F=>F.title.toLowerCase().includes(P)||F.description?.toLowerCase().includes(P))}const N=w;let R;e[12]!==r?(R=A=>{r(A),c("")},e[12]=r,e[13]=R):R=e[13];const k=R;b="flex flex-col max-h-[min(400px,60dvh)]";let S;e[14]===Symbol.for("react.memo_cache_sentinel")?(S=n.jsx(Kt,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=S):S=e[14];let _;e[15]===Symbol.for("react.memo_cache_sentinel")?(_=A=>c(A.target.value),e[15]=_):_=e[15];let D;e[16]!==f||e[17]!==a?(D=n.jsx(Tn,{ref:f,type:"text",placeholder:"Search for an agent...",value:a,onChange:_,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=f,e[17]=a,e[18]=D):D=e[18];const E=d?"Creating...":"Create Agent";let T;e[19]!==l||e[20]!==d||e[21]!==E?(T=n.jsx(le,{onClick:l,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:d,children:E}),e[19]=l,e[20]=d,e[21]=E,e[22]=T):T=e[22],e[23]!==D||e[24]!==T?(v=n.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:n.jsxs("div",{className:"relative flex items-center gap-2",children:[S,D,T]})}),e[23]=D,e[24]=T,e[25]=v):v=e[25],g="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",h=N.length>0?n.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:N.map(A=>n.jsx("div",{role:"button",tabIndex:0,onClick:()=>k(A.id),onKeyDown:P=>{(P.key==="Enter"||P.key===" ")&&(P.preventDefault(),k(A.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:n.jsx(to,{virtualMcp:A,isSelected:A.id===s})},A.id))}):n.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=l,e[2]=f,e[3]=d,e[4]=r,e[5]=a,e[6]=s,e[7]=i,e[8]=g,e[9]=h,e[10]=b,e[11]=v}else g=e[8],h=e[9],b=e[10],v=e[11];let y;e[26]!==g||e[27]!==h?(y=n.jsx("div",{className:g,children:h}),e[26]=g,e[27]=h,e[28]=y):y=e[28];let x;return e[29]!==b||e[30]!==v||e[31]!==y?(x=n.jsxs("div",{className:b,children:[v,y]}),e[29]=b,e[30]=v,e[31]=y,e[32]=x):x=e[32],x}function ro(t){return!t.id||!$t(t.id)}function oo(t){const e=V.c(3);let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(no,{}),e[0]=s):s=e[0];let r;return e[1]!==t?(r=n.jsx(j.Suspense,{fallback:s,children:n.jsx(so,{...t})}),e[1]=t,e[2]=r):r=e[2],r}function io(t){const e=V.c(32),{selectedVirtualMcpId:s,selectedVirtualMcp:r,onVirtualMcpChange:o,className:i,placeholder:a,showTooltip:c,disabled:u}=t,f=a===void 0?"Select Agent":a,p=c===void 0?!0:c,l=u===void 0?!1:u,[d,g]=j.useState(!1),h=j.useRef(null);let b;e[0]!==o?(b=B=>{o(B),g(!1)},e[0]=o,e[1]=b):b=e[1];const v=b,y=Pn();let x;e[2]===Symbol.for("react.memo_cache_sentinel")?(x=B=>{g(B)},e[2]=x):x=e[2];const w=x;let N,R;e[3]!==y||e[4]!==d?(N=()=>{d&&!y&&setTimeout(()=>{h.current?.focus()},0)},R=[d,y],e[3]=y,e[4]=d,e[5]=N,e[6]=R):(N=e[5],R=e[6]),j.useEffect(N,R);const k=l?!1:d,S=l?void 0:w,_=l?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let D;e[7]!==i||e[8]!==_?(D=be("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",_,i),e[7]=i,e[8]=_,e[9]=D):D=e[9];let E;e[10]!==r?(E=r?n.jsx(Fe,{icon:r.icon,name:r.title,size:"sm",className:"absolute inset-0 size-full"}):n.jsxs(n.Fragment,{children:[n.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[n.jsx("defs",{children:n.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[n.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),n.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),n.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),n.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),n.jsx(zn,{size:16})]}),e[10]=r,e[11]=E):E=e[11];let T;e[12]!==l||e[13]!==f||e[14]!==D||e[15]!==E?(T=n.jsx(Fn,{asChild:!0,children:n.jsx(Dn,{asChild:!0,children:n.jsx("button",{type:"button",disabled:l,className:D,"aria-label":f,children:E})})}),e[12]=l,e[13]=f,e[14]=D,e[15]=E,e[16]=T):T=e[16];let A;e[17]!==d||e[18]!==r?.title||e[19]!==p?(A=p&&!d&&n.jsx(Bn,{side:"top",className:"text-xs",children:r?.title??"Choose an agent to chat with"}),e[17]=d,e[18]=r?.title,e[19]=p,e[20]=A):A=e[20];let P;e[21]!==T||e[22]!==A?(P=n.jsx(Mn,{children:n.jsxs(On,{children:[T,A]})}),e[21]=T,e[22]=A,e[23]=P):P=e[23];let F;e[24]!==v||e[25]!==s?(F=n.jsx(An,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:n.jsx(oo,{selectedVirtualMcpId:s,onVirtualMcpChange:v,searchInputRef:h})}),e[24]=v,e[25]=s,e[26]=F):F=e[26];let M;return e[27]!==P||e[28]!==F||e[29]!==k||e[30]!==S?(M=n.jsxs(En,{open:k,onOpenChange:S,children:[P,F]}),e[27]=P,e[28]=F,e[29]=k,e[30]=S,e[31]=M):M=e[31],M}function ao(t){const e=t.properties;if(!e)return!1;const s=e.__type,r=e.__binding;return!!(s?.const||r?.const)}function lo(t){const e=t.properties;if(!e)return{};const s=e.__type,r=e.__binding;return{bindingType:s?.const,bindingSchema:r?.const}}function co(t){const e=V.c(10),{bindingSchema:s,bindingType:r,currentValue:o,onValueChange:i,placeholder:a,onAddNew:c,className:u}=t;let f;e[0]!==r?(f=ss(r),e[0]=r,e[1]=f):f=e[1];const l=f??(typeof s=="string"?s:s??void 0);let d;return e[2]!==r||e[3]!==u||e[4]!==o||e[5]!==c||e[6]!==i||e[7]!==a||e[8]!==l?(d=n.jsx(uo,{value:o,onValueChange:i,placeholder:a,binding:l,bindingType:r,onAddNew:c,className:u}),e[2]=r,e[3]=u,e[4]=o,e[5]=c,e[6]=i,e[7]=a,e[8]=l,e[9]=d):d=e[9],d}function uo({value:t,onValueChange:e,placeholder:s="Select a connection...",binding:r,bindingType:o,onAddNew:i,className:a}){const[c,u]=j.useState(!1),{installByBinding:f,isInstalling:p}=os(),l=c||p,d=r?void 0:o||void 0,g=qt(r?{binding:r}:d?{filters:[{column:"app_name",value:d}]}:{}),h=Ht(t&&!g.some(x=>x.id===t)?t:void 0),b=h?[h,...g]:g,v=o?.startsWith("@"),y=async()=>{if(v&&o){u(!0);try{const x=await f(o);x&&e(x.id)}catch(x){const w=x instanceof Error?x.message:String(x);ae.error(`Failed to connect MCP: ${w}`)}finally{u(!1)}return}i?.()};return n.jsxs(Cn,{value:t,onValueChange:e,children:[n.jsx(kn,{size:"sm",className:be("w-[200px]",a),children:n.jsx(_n,{placeholder:s})}),n.jsxs(Rn,{children:[b.length===0?n.jsx("div",{className:"px-2 py-4 text-center text-sm text-muted-foreground",children:"No connections found"}):b.map(x=>n.jsx(In,{value:x.id,children:n.jsxs("div",{className:"flex items-center gap-2",children:[x.icon?n.jsx("img",{src:x.icon,alt:x.title,className:"w-4 h-4 rounded"}):n.jsx("div",{className:"w-4 h-4 rounded bg-linear-to-br from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:x.title.slice(0,1).toUpperCase()}),n.jsx("span",{children:x.title})]})},x.id)),(i||v)&&n.jsx("div",{className:"border-t border-border",children:n.jsx(le,{onClick:x=>{x.preventDefault(),x.stopPropagation(),y()},disabled:l,variant:"ghost",className:"w-full justify-start gap-2 px-2 py-2 h-auto hover:bg-muted rounded-md text-sm disabled:opacity-50 disabled:cursor-not-allowed",type:"button",children:l?n.jsxs(n.Fragment,{children:[n.jsx(ve,{size:16,className:"animate-spin"}),n.jsx("span",{children:"Connecting..."})]}):n.jsxs(n.Fragment,{children:[n.jsx(Nn,{size:16}),n.jsx("span",{children:"Custom Connection"})]})})})]})]})}function mo(t){const e=V.c(49),{schema:s,formData:r,title:o,description:i,registry:a}=t,c=a.formContext,u=o||"",f=o||"";if(ao(s)){const d=s;let g;e[0]!==d?(g=lo(d),e[0]=d,e[1]=g):g=e[1];const{bindingType:h,bindingSchema:b}=g,y=(c?.formData?.[u]?.value??r?.value)||"";let x;e[2]!==h||e[3]!==u||e[4]!==c||e[5]!==r?(x=M=>{const B={...r,value:M??"",...h&&{__type:h}};c?.onFieldChange(u,B)},e[2]=h,e[3]=u,e[4]=c,e[5]=r,e[6]=x):x=e[6];const w=x,N=fo;let R;e[7]!==f||e[8]!==u||e[9]!==o?(R=N(o||f||u),e[7]=f,e[8]=u,e[9]=o,e[10]=R):R=e[10];const k=R;if(h==="@deco/agent"){let M;e[11]!==k?(M=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[11]=k,e[12]=M):M=e[12];let B;e[13]!==i?(B=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[13]=i,e[14]=B):B=e[14];let z;e[15]!==M||e[16]!==B?(z=n.jsxs("div",{className:"flex-1 min-w-0",children:[M,B]}),e[15]=M,e[16]=B,e[17]=z):z=e[17];const U=y||void 0;let G;e[18]!==w||e[19]!==U?(G=n.jsx(io,{selectedVirtualMcpId:U,onVirtualMcpChange:w,variant:"bordered",placeholder:"Select Agent",className:"w-[200px] shrink-0"}),e[18]=w,e[19]=U,e[20]=G):G=e[20];let ie;return e[21]!==z||e[22]!==G?(ie=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[z,G]}),e[21]=z,e[22]=G,e[23]=ie):ie=e[23],ie}let S;e[24]!==k?(S=n.jsx("label",{className:"text-sm font-medium truncate block",children:k}),e[24]=k,e[25]=S):S=e[25];let _;e[26]!==i?(_=i&&n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[26]=i,e[27]=_):_=e[27];let D;e[28]!==S||e[29]!==_?(D=n.jsxs("div",{className:"flex-1 min-w-0",children:[S,_]}),e[28]=S,e[29]=_,e[30]=D):D=e[30];let E;e[31]!==k?(E=k.toLowerCase(),e[31]=k,e[32]=E):E=e[32];const T=`Select ${E}...`;let A;e[33]!==c?(A=()=>c?.onAddNew(),e[33]=c,e[34]=A):A=e[34];let P;e[35]!==b||e[36]!==h||e[37]!==y||e[38]!==w||e[39]!==T||e[40]!==A?(P=n.jsx(co,{bindingSchema:b,bindingType:h,currentValue:y,onValueChange:w,placeholder:T,onAddNew:A,className:"w-[200px] shrink-0"}),e[35]=b,e[36]=h,e[37]=y,e[38]=w,e[39]=T,e[40]=A,e[41]=P):P=e[41];let F;return e[42]!==P||e[43]!==D?(F=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[D,P]}),e[42]=P,e[43]=D,e[44]=F):F=e[44],F}let p;e[45]!==t.properties?(p=t.properties.map(po),e[45]=t.properties,e[46]=p):p=e[46];let l;return e[47]!==p?(l=n.jsx("div",{className:"flex flex-col gap-4",children:p}),e[47]=p,e[48]=l):l=e[48],l}function po(t){return t.content}function fo(t){return t.toLowerCase().replace(/_/g," ").replace(/\b\w/g,ho)}function ho(t){return t.toUpperCase()}function xo(t){const e=V.c(13),{label:s,children:r,description:o,id:i,schema:a}=t;if(i.includes("__type")||i.includes("__binding"))return null;if(a.type==="object")return r;let c;e[0]!==i||e[1]!==s?(c=s&&n.jsx("label",{className:"text-sm font-medium truncate block",htmlFor:i,children:s}),e[0]=i,e[1]=s,e[2]=c):c=e[2];let u;e[3]!==o?(u=o&&n.jsx("div",{className:"text-xs text-muted-foreground truncate",children:o}),e[3]=o,e[4]=u):u=e[4];let f;e[5]!==c||e[6]!==u?(f=n.jsxs("div",{className:"flex-1 min-w-0",children:[c,u]}),e[5]=c,e[6]=u,e[7]=f):f=e[7];let p;e[8]!==r?(p=n.jsx("div",{className:"w-[200px] shrink-0",children:r}),e[8]=r,e[9]=p):p=e[9];let l;return e[10]!==f||e[11]!==p?(l=n.jsxs("div",{className:"flex items-center gap-3 justify-between",children:[f,p]}),e[10]=f,e[11]=p,e[12]=l):l=e[12],l}const go={ObjectFieldTemplate:mo,FieldTemplate:xo};function bo(t){const e=V.c(19),{formKey:s,formState:r,onFormStateChange:o,stateSchema:i}=t,{org:a}=he(),c=Mt();let u;e[0]!==o?(u=x=>{x.formData&&o(x.formData)},e[0]=o,e[1]=u):u=e[1];const f=u;let p;e[2]!==r||e[3]!==o?(p=(x,w)=>{const N={...r,[x]:w};o(N)},e[2]=r,e[3]=o,e[4]=p):p=e[4];const l=p;let d;e[5]!==c||e[6]!==a?(d=()=>{c({to:"/$org/settings/connections",params:{org:a.slug},search:{action:"create"}})},e[5]=c,e[6]=a,e[7]=d):d=e[7];const g=d;let h;e[8]!==r||e[9]!==g||e[10]!==l?(h={onFieldChange:l,formData:r,onAddNew:g},e[8]=r,e[9]=g,e[10]=l,e[11]=h):h=e[11];const b=h;let v;e[12]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(n.Fragment,{}),e[12]=v):v=e[12];let y;return e[13]!==b||e[14]!==s||e[15]!==r||e[16]!==f||e[17]!==i?(y=n.jsx("div",{className:"flex flex-col h-full overflow-auto",children:n.jsx(eo,{schema:i,validator:hn,formData:r,onChange:f,formContext:b,liveValidate:!1,showErrorList:!1,templates:go,children:v},s)}),e[13]=b,e[14]=s,e[15]=r,e[16]=f,e[17]=i,e[18]=y):y=e[18],y}function vo(t){const e=V.c(14),{org:s}=he();let r;e[0]!==t||e[1]!==s.id||e[2]!==s.slug?(r={connectionId:t,orgId:s.id,orgSlug:s.slug},e[0]=t,e[1]=s.id,e[2]=s.slug,e[3]=r):r=e[3];const o=zt(r);let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i={},e[4]=i):i=e[4];let a;e[5]!==o?(a={client:o,toolName:"MCP_CONFIGURATION",toolArguments:i,select:yo},e[5]=o,e[6]=a):a=e[6];const{data:c}=Lt(a);let u;e[7]!==c.stateSchema?(u=c.stateSchema??{type:"object",properties:{}},e[7]=c.stateSchema,e[8]=u):u=e[8];const f=u;let p;e[9]!==c.scopes?(p=c.scopes??[],e[9]=c.scopes,e[10]=p):p=e[10];const l=p;let d;return e[11]!==l||e[12]!==f?(d={stateSchema:f,scopes:l},e[11]=l,e[12]=f,e[13]=d):d=e[13],d}function yo(t){return t.structuredContent??t}function jo(t){const e=V.c(4),{onAuthenticate:s,buttonText:r}=t,o=r===void 0?"Authenticate":r;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This connection requires OAuth authentication to access resources."})]}),e[0]=i):i=e[0];let a;return e[1]!==o||e[2]!==s?(a=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[i,n.jsx(le,{onClick:s,size:"default",children:o})]})}),e[1]=o,e[2]=s,e[3]=a):a=e[3],a}function wo(t){const e=V.c(7),{hasReadme:s,onViewReadme:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Gt,{size:36,className:"text-muted-foreground"}),e[0]=o):o=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-sm font-semibold",children:"Manual Authentication Required"}),n.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center",children:"This server requires an API key or token that must be configured manually. Check the server's documentation for instructions on obtaining credentials."})]}),e[1]=i):i=e[1];let a;e[2]!==s||e[3]!==r?(a=s&&r&&n.jsxs(le,{onClick:r,variant:"outline",size:"lg",children:[n.jsx(Ut,{size:18,className:"mr-2"}),"View README"]}),e[2]=s,e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==a?(c=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[o,i,a]})}),e[5]=a,e[6]=c):c=e[6],c}function So(){const t=V.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("img",{src:"/empty-state-error.svg",alt:"",width:160,height:160,"aria-hidden":"true"}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsxs("div",{className:"flex flex-col items-center gap-4 max-w-md text-center",children:[e,n.jsxs("div",{className:"flex flex-col gap-2",children:[n.jsx("h3",{className:"text-lg font-semibold",children:"Server Error"}),n.jsx("p",{className:"text-sm text-muted-foreground max-w-md text-center",children:"The MCP server is currently experiencing issues. Please try again later or check the server's status."})]})]})}),t[1]=s):s=t[1],s}function No(t){const e=V.c(12),{connection:s,form:r}=t,{stateSchema:o}=vo(s.id);let i;e[0]!==r.control?(i={control:r.control,name:"configuration_state"},e[0]=r.control,e[1]=i):i=e[1];const a=Vt(i);let c;e[2]!==r?(c=d=>{r.setValue("configuration_state",d,{shouldDirty:!0})},e[2]=r,e[3]=c):c=e[3];const u=c;if(!(o&&o.properties&&typeof o.properties=="object"&&Object.keys(o.properties).length>0)){let d;return e[4]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[4]=d):d=e[4],d}let p;e[5]!==a?(p=a??{},e[5]=a,e[6]=p):p=e[6];let l;return e[7]!==s.id||e[8]!==u||e[9]!==o||e[10]!==p?(l=n.jsx("div",{className:"flex-1 overflow-auto",children:n.jsx(bo,{formKey:s.id,stateSchema:o,formState:p,onFormStateChange:u})}),e[7]=s.id,e[8]=u,e[9]=o,e[10]=p,e[11]=l):l=e[11],l}function Co(t){const e=V.c(11),{connection:s,form:r,hasMcpBinding:o,isMCPAuthenticated:i,supportsOAuth:a,isServerError:c,onAuthenticate:u,onViewReadme:f}=t,l=!!s?.metadata?.repository?.url;if(!i){if(c){let b;return e[0]===Symbol.for("react.memo_cache_sentinel")?(b=n.jsx(So,{}),e[0]=b):b=e[0],b}if(a){let b;return e[1]!==u?(b=n.jsx(jo,{onAuthenticate:u}),e[1]=u,e[2]=b):b=e[2],b}let h;return e[3]!==l||e[4]!==f?(h=n.jsx(wo,{hasReadme:l,onViewReadme:f}),e[3]=l,e[4]=f,e[5]=h):h=e[5],h}if(!o){let h;return e[6]===Symbol.for("react.memo_cache_sentinel")?(h=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(Be,{image:n.jsx("img",{src:"/empty-state-success-muted.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),title:"This server is all set!",description:"No additional configuration is needed. Everything is ready to go."})}),e[6]=h):h=e[6],h}let d;e[7]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(ve,{size:32,className:"animate-spin text-muted-foreground"})}),e[7]=d):d=e[7];let g;return e[8]!==s||e[9]!==r?(g=n.jsx(Ot,{children:n.jsx(j.Suspense,{fallback:d,children:n.jsx(No,{connection:s,form:r})})}),e[8]=s,e[9]=r,e[10]=g):g=e[10],g}function Jo(t){const e=V.c(2);let s;return e[0]!==t?(s=n.jsx("div",{className:"flex-1 flex h-full",children:n.jsx(Co,{...t})}),e[0]=t,e[1]=s):s=e[1],s}export{wo as M,jo as O,Jo as S,Yo as c};
@@ -1,4 +1,4 @@
1
- import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-BkiajC9R.js";import{D as Ts,F as Es,B as $s}from"./index-C3ldIVUr.js";import{e as Fe,i as Os,u as ae}from"./constants-ggwtj_b2.js";import{b as fn}from"./use-virtual-mcp-DnJsvDcW.js";import{M as Re}from"./monaco-editor-ymd_jUTr.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-o4uEL-I1.js";import{B as le}from"./badge-CkKVCYBi.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-1F7nfWqc.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-CDVvjofj.js";import{V as Xs}from"./view-mode-toggle-DgvGEUt1.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-C1jmOFVg.js";import{i as hn}from"./Play-C_yrNjMw.js";import{b as ro,a as io,V as Qe}from"./layout-yZTsEXBs.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-CZbLg-Hf.js";import{u as lo,a as co}from"./use-connection-BLJ6BaWy.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-henGoqsi.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-CNOF2ZMK.js";import"./index-3PRXeBfP.js";import{S as ho}from"./index-BB5P8isj.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-C3kAm_Er.js";import{s as go}from"./Plus-BHVhclrE.js";import{b as kn}from"./Tool01-DHF_L3KH.js";import{i as He}from"./Check-B7lQX-U6.js";import{s as Mt}from"./XClose-CdyVyCLn.js";import{I as Lt}from"./integration-icon-BvsSfF2G.js";import{a as bo,S as So}from"./scroll-area-BEarfPUC.js";import"./index-CnlV8NnU.js";import{i as _n}from"./X-DRGbU-sk.js";import{u as Cn,a as jo}from"./use-collections-BIsV5dcA.js";import{E as In}from"./empty-state-DyTFpS0l.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-jGTjkEgf.js";const Tn=ne("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 En=ne("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 ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("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 On=ne("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 Rn=ne("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 Mn=ne("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 No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("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 ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("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"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=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},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(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 Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>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(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};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},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(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},Mo=(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 Lo(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:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(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{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-Dcg8Qevd.js";import{D as Ts,F as Es,B as $s}from"./index-DV-VioVg.js";import{e as Fe,i as Os,u as ae}from"./constants-DXQgV2hu.js";import{b as fn}from"./use-virtual-mcp-Cvy2Xx_N.js";import{M as Re}from"./monaco-editor-BVARKKWN.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-DdQd4o33.js";import{B as le}from"./badge-CTmf2TW8.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-DkBE5ypj.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-CZLTTN-z.js";import{V as Xs}from"./view-mode-toggle-Ca3EQ8LL.js";import{a9 as Js,aa as Gs,i as Qs,a1 as mn,ab as Ys,P as Zs,r as eo,ac as pn,Y as to,U as xn,ad as no,ae as so,S as bt,af as oo}from"./agent-icon-CznXZlOI.js";import{i as hn}from"./Play-CDjH79to.js";import{b as ro,a as io,V as Qe}from"./layout-DbwGS2qx.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-sn7TXXXA.js";import{u as lo,a as co}from"./use-connection-wzOJDB7e.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-Cu2GPPjO.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-DUgfuVrb.js";import"./index-CqFBXkjQ.js";import{S as ho}from"./index-CG3ceZHc.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-Cbx_bdO_.js";import{s as go}from"./Plus-FC_C8qkl.js";import{b as kn}from"./Tool01-NWIcFn9q.js";import{i as He}from"./Check-DBWnyOFJ.js";import{s as Mt}from"./XClose-Dz5yGfpm.js";import{I as Lt}from"./integration-icon-DTJ2wb4X.js";import{a as bo,S as So}from"./scroll-area-DGEAK3pH.js";import"./index-DPM8__xA.js";import{i as _n}from"./X-BGh8G2l7.js";import{u as Cn,a as jo}from"./use-collections-DDocavcC.js";import{E as In}from"./empty-state-BIAZXmQO.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-Cvo2jJQf.js";const Tn=ne("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 En=ne("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 ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("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 On=ne("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 Rn=ne("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 Mn=ne("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 No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("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 ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("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"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=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},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(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 Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>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(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};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},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(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},Mo=(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 Lo(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:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(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
  `)}
@@ -1,4 +1,4 @@
1
- import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,x as qe,c as le,ba as Rn,n as Ys,K as At,E as os,d as zs,t as Bt}from"./index-BkiajC9R.js";import{S as Bs}from"./search-input-BNv3WxnU.js";import{r as is,c as ls,d as cs,e as ds,P as Ue}from"./index-Bq9Gbm0H.js";import{E as dn}from"./empty-state-Dw_gVxIS.js";import{B as Ke}from"./badge-CkKVCYBi.js";import{b as ct,P as dt,a as ut}from"./popover-Qhd5GKAf.js";import{T as Mt,a as kt,b as Ct}from"./tooltip-CZbLg-Hf.js";import{i as Ht}from"./Check-B7lQX-U6.js";import{e as un,c as _t,n as Wn}from"./XCircle-DH7bOaGY.js";import{a as Hs}from"./SearchMd-BJVwn_ke.js";import{i as qs}from"./Play-C_yrNjMw.js";import{X as Vs,Y as Us,x as Ks,W as Gs}from"./agent-icon-C1jmOFVg.js";import{M as An}from"./monaco-editor-ymd_jUTr.js";import{u as Qs}from"./use-members-DBih95tA.js";import{u as $n}from"./use-connection-BLJ6BaWy.js";import{S as mn,u as fn,i as Js,g as Xs,d as Zs}from"./constants-ggwtj_b2.js";import{b as ea}from"./use-virtual-mcp-DnJsvDcW.js";import{n as Ge}from"./Container-BPn2KqkB.js";import{c as ta}from"./XClose-CdyVyCLn.js";import{s as na}from"./Plus-BHVhclrE.js";import{s as sa}from"./Trash01-12UJulVC.js";import{I as pt}from"./input-jGTjkEgf.js";import{C as Yn}from"./checkbox-nNLHENdc.js";import{t as gt}from"./ChevronDown-BHHmj_90.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la}from"./command-DbmRiBqo.js";import{a as Pt,b as Tt,c as Ot,d as Re,S as Ft}from"./select-1F7nfWqc.js";import{S as ca}from"./scroll-area-BEarfPUC.js";import{n as da}from"./ZapSquare-CU44MpAH.js";import{i as ua}from"./ChevronRight-CMwA4MWg.js";import{T as ma}from"./textarea-s7PVXilr.js";import{C as us}from"./collection-tabs-DqCBG7jb.js";import{S as fa}from"./switch-BMcphIES.js";import{L as ha}from"./label-BwHLLLjG.js";import{I as ze}from"./integration-icon-BvsSfF2G.js";import{A as $t}from"./avatar-BHCqEDVT.js";import{C as ms}from"./card-BPF7ycIj.js";import{K as st}from"./monitoring-stats-row-D9yNQE2b.js";import{c as fs}from"./use-mcp-tools-henGoqsi.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{u as hs}from"./useSuspenseInfiniteQuery-Bjt0Pxxe.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-BpJjOmgy.js";import{n as xs}from"./ChevronUp-DZMg9j3Z.js";import{u as gn}from"./use-infinite-scroll-jzFqUD4-.js";import{u as pa}from"./useInfiniteQuery-BJJhbE0g.js";import{w as ga,x as va}from"./pair-CkdIVJLN.js";import{S as Lt}from"./task-status-BLDsdEd0.js";import"./X-DRGbU-sk.js";import"./AlertCircle-Ot2CLMxw.js";import"./Tool01-DHF_L3KH.js";import"./RefreshCcw01-Yl__XBgH.js";import"./ArrowNarrowLeft-CA2U4-LB.js";import"./ArrowUpRight-D_v7OVFz.js";import"./Users03-CZn6wNJ2.js";import"./CheckCircle-DQVTFDuD.js";import"./DotsVertical-C0-av-w_.js";import"./Star01-t5c8OzJ1.js";import"./Palette-Cmsuc3m0.js";import"./LinkExternal01-Cr974KZi.js";import"./Lock01-chX0YN7M.js";import"./Sun-fUlV2CSc.js";import"./Settings02-BCqAnzCC.js";import"./Shield01-BzDWvNLz.js";import"./User01-BjX-G1vE.js";import"./Zap-DVRtpQ6o.js";import"./index-CDVvjofj.js";import"./use-org-auth-client-B3WZtWV1.js";import"./use-collections-BIsV5dcA.js";import"./index-BM8jECEp.js";import"./index-3PRXeBfP.js";import"./infiniteQueryObserver-DapJgjCy.js";import"./use-copy-ORR4yHnB.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-CNOF2ZMK.js";import"./content-blocks-o63cs2vh.js";import"./types-wbD5gTmt.js";import"./chat-context-cuD-y97U.js";import"./use-ai-providers-by3zafwF.js";import"./use-decopilot-events-D1WuhDgD.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-CCgL71pE.js";import"./use-organization-settings-ro4iJPpY.js";import"./shell-layout-Bvmr4Ir9.js";import"./required-auth-layout-CwLXPn7_.js";import"./use-org-sso-guN7zSCH.js";const tn={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Qe(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),a=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${a}`}).join(",")}function ba(t){return t?t.split(",").map(e=>{const[n,a,...r]=e.split(":");return{key:decodeURIComponent(n||""),operator:a||"eq",value:decodeURIComponent(r.join(":")||"")}}):[]}function St(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,x as qe,c as le,ba as Rn,n as Ys,K as At,E as os,d as zs,t as Bt}from"./index-Dcg8Qevd.js";import{S as Bs}from"./search-input-C50ImRzg.js";import{r as is,c as ls,d as cs,e as ds,P as Ue}from"./index-DtUGvIts.js";import{E as dn}from"./empty-state-BnjbbhBR.js";import{B as Ke}from"./badge-CTmf2TW8.js";import{b as ct,P as dt,a as ut}from"./popover-DNu8C4Ll.js";import{T as Mt,a as kt,b as Ct}from"./tooltip-sn7TXXXA.js";import{i as Ht}from"./Check-DBWnyOFJ.js";import{e as un,c as _t,n as Wn}from"./XCircle-CYGTZyzW.js";import{a as Hs}from"./SearchMd-B780aQOS.js";import{i as qs}from"./Play-CDjH79to.js";import{X as Vs,Y as Us,x as Ks,W as Gs}from"./agent-icon-CznXZlOI.js";import{M as An}from"./monaco-editor-BVARKKWN.js";import{u as Qs}from"./use-members-Bw_9meIY.js";import{u as $n}from"./use-connection-wzOJDB7e.js";import{S as mn,u as fn,i as Js,g as Xs,d as Zs}from"./constants-DXQgV2hu.js";import{b as ea}from"./use-virtual-mcp-Cvy2Xx_N.js";import{n as Ge}from"./Container-BQVUd9tN.js";import{c as ta}from"./XClose-Dz5yGfpm.js";import{s as na}from"./Plus-FC_C8qkl.js";import{s as sa}from"./Trash01-4w6_aW9X.js";import{I as pt}from"./input-Cvo2jJQf.js";import{C as Yn}from"./checkbox-B3EwrxkO.js";import{t as gt}from"./ChevronDown-D452dgSU.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la}from"./command-BAMG06m5.js";import{a as Pt,b as Tt,c as Ot,d as Re,S as Ft}from"./select-DkBE5ypj.js";import{S as ca}from"./scroll-area-DGEAK3pH.js";import{n as da}from"./ZapSquare-BLhBRchY.js";import{i as ua}from"./ChevronRight-DoY3rcf9.js";import{T as ma}from"./textarea-e7WVG0Uq.js";import{C as us}from"./collection-tabs-BKqleLTU.js";import{S as fa}from"./switch-Ba2DX0J8.js";import{L as ha}from"./label-_jNQo8Ll.js";import{I as ze}from"./integration-icon-DTJ2wb4X.js";import{A as $t}from"./avatar-Z1wN1pq-.js";import{C as ms}from"./card-Bd8klEwI.js";import{K as st}from"./monitoring-stats-row-D7tWgW-Q.js";import{c as fs}from"./use-mcp-tools-Cu2GPPjO.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{u as hs}from"./useSuspenseInfiniteQuery-Ck-t1SMi.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-Dpjp6sno.js";import{n as xs}from"./ChevronUp-BlZFoG59.js";import{u as gn}from"./use-infinite-scroll-CyUixfAd.js";import{u as pa}from"./useInfiniteQuery-eCacXMD5.js";import{w as ga,x as va}from"./pair-_253DGSq.js";import{S as Lt}from"./task-status-D6HaLDfU.js";import"./X-BGh8G2l7.js";import"./AlertCircle-UghQPlAa.js";import"./Tool01-NWIcFn9q.js";import"./RefreshCcw01-Cd8Km121.js";import"./ArrowNarrowLeft-1BfkUm85.js";import"./ArrowUpRight-1rqShrTM.js";import"./Users03-CK1Aa1HI.js";import"./CheckCircle-CBMgXE-F.js";import"./DotsVertical-CAgAGLKz.js";import"./Star01-DRidtrYn.js";import"./Palette-DXyBGBQu.js";import"./LinkExternal01-CGcDVdEi.js";import"./Lock01-FiMk9Cv6.js";import"./Sun-Bpli4t2N.js";import"./Settings02--XuHa5eI.js";import"./Shield01-Bg1T1EGa.js";import"./User01-CxpWRrdM.js";import"./Zap-Druw6RpX.js";import"./index-CZLTTN-z.js";import"./use-org-auth-client-uXh4lV5h.js";import"./use-collections-DDocavcC.js";import"./index-CuVn0uMY.js";import"./index-CqFBXkjQ.js";import"./infiniteQueryObserver-D9yYekai.js";import"./use-copy-D0VCYdzD.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-DUgfuVrb.js";import"./content-blocks-o63cs2vh.js";import"./types-ClFDwb3j.js";import"./chat-context-DGU47jw7.js";import"./use-ai-providers-D1ZzNZfi.js";import"./use-decopilot-events-CQn9-0iO.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-B8ZzLgVK.js";import"./use-organization-settings-OER3kM7D.js";import"./shell-layout-xLg1cKrj.js";import"./required-auth-layout-Cg8CZTlk.js";import"./use-org-sso-Co0XjU-j.js";const tn={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Qe(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),a=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${a}`}).join(",")}function ba(t){return t?t.split(",").map(e=>{const[n,a,...r]=e.split(":");return{key:decodeURIComponent(n||""),operator:a||"eq",value:decodeURIComponent(r.join(":")||"")}}):[]}function St(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Bn(t){return t.trim()?t.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[n,...a]=e.split("=");return{key:n||"",operator:"eq",value:a.join("=")}}if(e.includes("~")){const[n,...a]=e.split("~");return{key:n||"",operator:"contains",value:a.join("~")}}if(e.includes("@")){const[n,...a]=e.split("@");return{key:n||"",operator:"in",value:a.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function ya(t){const e={},n={},a=[],r={};for(const o of t)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(n[o.key]=`%${o.value}%`);break;case"exists":a.push(o.key);break;case"in":o.value&&(r[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(n).length>0?n:void 0,propertyKeys:a.length>0?a:void 0,propertyInValues:Object.keys(r).length>0?r:void 0}}function Hn(t){if(!t)return{content:"null",isTruncated:!1,originalSize:4};if(typeof t._decocms_truncated=="string")return{content:t._decocms_truncated,isTruncated:!0,originalSize:t._decocms_truncated.length};const e=JSON.stringify(t,null,2),n=e.length;return n<=tn.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:n}:{content:e.slice(0,tn.maxJsonRenderSize)+`
4
4
 
@@ -1 +1 @@
1
- import{dw as d,dx as f,dy as v,dz as x}from"./index-BkiajC9R.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
1
+ import{dw as d,dx as f,dy as v,dz as x}from"./index-Dcg8Qevd.js";var N=class extends d{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:f()})}getOptimisticResult(e){return e.behavior=f(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:P,isError:c,isRefetchError:g}=i,r=s.fetchMeta?.fetchMore?.direction,h=c&&r==="forward",o=a&&r==="forward",n=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:v(t,s.data),isFetchNextPageError:h,isFetchingNextPage:o,isFetchPreviousPageError:n,isFetchingPreviousPage:u,isRefetchError:g&&!h&&!n,isRefetching:P&&!o&&!u}}};export{N as I};
@@ -1 +1 @@
1
- import{e as s,c as a,j as d}from"./index-BkiajC9R.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
1
+ import{e as s,c as a,j as d}from"./index-Dcg8Qevd.js";function f(l){const e=s.c(10);let i,t,r;e[0]!==l?({className:i,type:r,...t}=l,e[0]=l,e[1]=i,e[2]=t,e[3]=r):(i=e[1],t=e[2],r=e[3]);let n;e[4]!==i?(n=a("file:text-foreground text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-lg bg-background dark:bg-input/30 px-3 py-1 text-sm transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:opacity-50 card-shadow","focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),e[4]=i,e[5]=n):n=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==r?(o=d.jsx("input",{type:r,"data-slot":"input",className:n,...t}),e[6]=t,e[7]=n,e[8]=r,e[9]=o):o=e[9],o}export{f as I};
@@ -1 +1 @@
1
- import{e as A,j as h,r as z,c as _}from"./index-BkiajC9R.js";import{n as L}from"./Container-BPn2KqkB.js";import{A as k}from"./agent-icon-C1jmOFVg.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
1
+ import{e as A,j as h,r as z,c as _}from"./index-Dcg8Qevd.js";import{n as L}from"./Container-BQVUd9tN.js";import{A as k}from"./agent-icon-CznXZlOI.js";const C={"2xs":"h-4 w-4",xs:"h-6 w-6",sm:"h-9 w-9",md:"h-12 w-12",lg:"h-16 w-16",xl:"h-14 w-14"},Z={"2xs":"min-w-4",xs:"min-w-6",sm:"min-w-9",md:"min-w-12",lg:"min-w-16",xl:"min-w-14"},y={"2xs":8,xs:12,sm:16,md:24,lg:32,xl:28},M={"2xs":"xs",xs:"xs",sm:"sm",md:"md",lg:"lg",xl:"lg"};function q(E){const e=A.c(12),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w;if(t?.startsWith("icon://")||t?.includes("#agentcolor=")){const r=M[n];let l;return e[0]!==o||e[1]!==t||e[2]!==s||e[3]!==r?(l=h.jsx(k,{icon:t,name:s,size:r,className:o}),e[0]=o,e[1]=t,e[2]=s,e[3]=r,e[4]=l):l=e[4],l}const g=t??"no-icon";let i;return e[5]!==o||e[6]!==c||e[7]!==t||e[8]!==s||e[9]!==n||e[10]!==g?(i=h.jsx(R,{icon:t,name:s,size:n,className:o,fallbackIcon:c},g),e[5]=o,e[6]=c,e[7]=t,e[8]=s,e[9]=n,e[10]=g,e[11]=i):i=e[11],i}function R(E){const e=A.c(24),{icon:t,name:s,size:w,className:o,fallbackIcon:c}=E,n=w===void 0?"md":w,[g,i]=z.useState(!1),r=!!t&&g,l=C[n],b=Z[n];let a;e[0]!==o||e[1]!==l||e[2]!==b?(a=_("rounded-lg border border-border shrink-0 overflow-hidden aspect-square bg-white",l,b,o),e[0]=o,e[1]=l,e[2]=b,e[3]=a):a=e[3];const p=t||void 0,N=!r&&"hidden";let m;e[4]!==N?(m=_("h-full w-full object-cover",N),e[4]=N,e[5]=m):m=e[5];let I,S;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=()=>i(!1),S=()=>i(!0),e[6]=I,e[7]=S):(I=e[6],S=e[7]);let d;e[8]!==s||e[9]!==p||e[10]!==m?(d=h.jsx("img",{src:p,alt:s,className:m,onError:I,onLoad:S}),e[8]=s,e[9]=p,e[10]=m,e[11]=d):d=e[11];const v=r&&"hidden";let f;e[12]!==v?(f=_("h-full w-full flex items-center justify-center bg-muted/20",v),e[12]=v,e[13]=f):f=e[13];let x;e[14]!==c||e[15]!==n?(x=c??h.jsx(L,{size:y[n],className:"text-muted-foreground"}),e[14]=c,e[15]=n,e[16]=x):x=e[16];let u;e[17]!==f||e[18]!==x?(u=h.jsx("div",{className:f,children:x}),e[17]=f,e[18]=x,e[19]=u):u=e[19];let j;return e[20]!==d||e[21]!==u||e[22]!==a?(j=h.jsxs("div",{className:a,children:[d,u]}),e[20]=d,e[21]=u,e[22]=a,e[23]=j):j=e[23],j}export{q as I};
@@ -1 +1 @@
1
- import{e as n,c as r,j as i,b5 as p}from"./index-BkiajC9R.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
1
+ import{e as n,c as r,j as i,b5 as p}from"./index-Dcg8Qevd.js";function c(l){const e=n.c(8);let t,s;e[0]!==l?({className:t,...s}=l,e[0]=l,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=r("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==s||e[6]!==a?(o=i.jsx(p,{"data-slot":"label",className:a,...s}),e[5]=s,e[6]=a,e[7]=o):o=e[7],o}export{c as L};
@@ -1 +1 @@
1
- import{e as C,r as i,c as A,j as a,ao as V}from"./index-BkiajC9R.js";import{P as E}from"./index-Bq9Gbm0H.js";const H=i.createContext(null);function z(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const B=D;function F(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{F as V,B as a,z as b};
1
+ import{e as C,r as i,c as A,j as a,ao as V}from"./index-Dcg8Qevd.js";import{P as E}from"./index-DtUGvIts.js";const H=i.createContext(null);function z(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.tabsEl)return null;let c;return e[0]!==l||e[1]!==s.tabsEl?(c=V.createPortal(l,s.tabsEl),e[0]=l,e[1]=s.tabsEl,e[2]=c):c=e[2],c}function D(x){const e=C.c(3),{children:l}=x,s=i.useContext(H);if(!s?.actionsEl)return null;let c;return e[0]!==l||e[1]!==s.actionsEl?(c=V.createPortal(l,s.actionsEl),e[0]=l,e[1]=s.actionsEl,e[2]=c):c=e[2],c}const B=D;function F(x){const e=C.c(21),{children:l,breadcrumb:s,hideHeader:c}=x;let b;e[0]===Symbol.for("react.memo_cache_sentinel")?(b={leftEl:null,tabsEl:null,actionsEl:null},e[0]=b):b=e[0];const[w,g]=i.useState(b),N=i.useRef(null),P=i.useRef(null),L=i.useRef(null);let h;e[1]===Symbol.for("react.memo_cache_sentinel")?(h=t=>{N.current=t,t&&g(n=>n.leftEl===t?n:{...n,leftEl:t})},e[1]=h):h=e[1];const $=h;let R;e[2]===Symbol.for("react.memo_cache_sentinel")?(R=t=>{P.current=t,t&&g(n=>n.tabsEl===t?n:{...n,tabsEl:t})},e[2]=R):R=e[2];const _=R;let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t=>{L.current=t,t&&g(n=>n.actionsEl===t?n:{...n,actionsEl:t})},e[3]=d):d=e[3];const k=d,p=c&&"hidden";let o;e[4]!==p?(o=A(p),e[4]=p,e[5]=o):o=e[5];let j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=a.jsx("div",{ref:$,className:"flex items-center gap-2 min-w-0"}),e[6]=j):j=e[6];let r;e[7]!==s?(r=a.jsxs(E.Header.Left,{children:[s,j]}),e[7]=s,e[8]=r):r=e[8];let y;e[9]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsxs(E.Header.Right,{children:[a.jsx("div",{ref:_,className:"flex items-center gap-2 overflow-x-auto min-w-0"}),a.jsx("div",{ref:k,className:"flex items-center gap-2 shrink-0"})]}),e[9]=y):y=e[9];let f;e[10]!==o||e[11]!==r?(f=a.jsxs(E.Header,{className:o,children:[r,y]}),e[10]=o,e[11]=r,e[12]=f):f=e[12];let m;e[13]!==l?(m=a.jsx(E.Content,{children:l}),e[13]=l,e[14]=m):m=e[14];let u;e[15]!==f||e[16]!==m?(u=a.jsxs(E,{children:[f,m]}),e[15]=f,e[16]=m,e[17]=u):u=e[17];let S;return e[18]!==w||e[19]!==u?(S=a.jsx(H,{value:w,children:u}),e[18]=w,e[19]=u,e[20]=S):S=e[20],S}export{F as V,B as a,z as b};