decocms 2.299.0 → 2.300.1

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 (225) hide show
  1. package/dist/client/assets/{AlertCircle-aQgTv3kr.js → AlertCircle-CtSiN7Dh.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-C_pLc5t-.js → ArrowNarrowLeft-CjMD5YtT.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-Bws5ir-q.js → ArrowUpRight-VGEco3p8.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-Cwc7BvQq.js → CheckCircle-BOjQcSoZ.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-C4MI00HX.js → ChevronDown-B21GyFLP.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-DDkghuaf.js → ChevronRight-C7fFXCXU.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BjFGxYUb.js → ChevronUp-DLJe-Ifh.js} +1 -1
  8. package/dist/client/assets/{Container-U4v06cth.js → Container-DVwtR0PY.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BCK2nFhn.js → DotsVertical-_1yE4PFi.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-C_yQygSO.js → LinkExternal01-BeNjIA73.js} +1 -1
  11. package/dist/client/assets/{Lock01-rLvN1xbd.js → Lock01-y9D26Lk9.js} +1 -1
  12. package/dist/client/assets/{Palette-CA95sDHj.js → Palette-xIvgAE_U.js} +1 -1
  13. package/dist/client/assets/{Play-BlOman6C.js → Play-esUCyQh5.js} +1 -1
  14. package/dist/client/assets/{Plus-B5soxpbi.js → Plus-8zlfW9Nb.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-onzNEsM4.js → RefreshCcw01-DV-_PfmV.js} +1 -1
  16. package/dist/client/assets/{SearchMd-fvAW1pa8.js → SearchMd-BgpZuBQH.js} +1 -1
  17. package/dist/client/assets/{Settings02-Cro6-7q4.js → Settings02-B2DHZxlV.js} +1 -1
  18. package/dist/client/assets/{Shield01-DtWtqZJ1.js → Shield01-CewVSi37.js} +1 -1
  19. package/dist/client/assets/{Star01-BHGJRtit.js → Star01-DupDdRAe.js} +1 -1
  20. package/dist/client/assets/{Sun-C6J9iUe_.js → Sun-B1MYWGMj.js} +1 -1
  21. package/dist/client/assets/{Tool01-DeRpug6W.js → Tool01-73PH4njb.js} +1 -1
  22. package/dist/client/assets/{Trash01-BSFNbfe8.js → Trash01-_-2EAUWH.js} +1 -1
  23. package/dist/client/assets/{User01-C-8Fo7RS.js → User01-DLnrd0WJ.js} +1 -1
  24. package/dist/client/assets/{Users03-C25Ink_E.js → Users03-CtQ_adLe.js} +1 -1
  25. package/dist/client/assets/{X-Cf3FFZEE.js → X-DavTUkoo.js} +1 -1
  26. package/dist/client/assets/{XCircle-CLM44_6-.js → XCircle-BKeTm8Ww.js} +1 -1
  27. package/dist/client/assets/{XClose-B9H_q-Ab.js → XClose-BpjQA_dF.js} +1 -1
  28. package/dist/client/assets/{Zap-BQvzqOLx.js → Zap-DT_tBFfJ.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-CjSpwpWX.js → ZapSquare-BL-_ZEqM.js} +1 -1
  30. package/dist/client/assets/{accordion-YUzrCziW.js → accordion-pRq2Jalt.js} +1 -1
  31. package/dist/client/assets/{agent-icon-CyFFhaia.js → agent-icon-DnE1m294.js} +1 -1
  32. package/dist/client/assets/{agents-list-W7eiHZAH.js → agents-list-BoAFCp78.js} +1 -1
  33. package/dist/client/assets/ai-providers-CAEYBEbx.js +1 -0
  34. package/dist/client/assets/{alert-dialog-BRriT9Rx.js → alert-dialog-DvcLf48w.js} +1 -1
  35. package/dist/client/assets/{auth-catchall-dvNJT_HW.js → auth-catchall-CAJD1PoQ.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-Dr5BqZcR.js → automation-list-row-DsEcFwqj.js} +1 -1
  37. package/dist/client/assets/{automations-DThDEBhK.js → automations-0IJqtFMr.js} +1 -1
  38. package/dist/client/assets/{avatar-DZ7Lcia3.js → avatar-B1YFr91G.js} +1 -1
  39. package/dist/client/assets/{badge-CNKFpwCQ.js → badge-BnwDLyJj.js} +1 -1
  40. package/dist/client/assets/{brand-context-FHNmQTmw.js → brand-context-D5_IL-aX.js} +1 -1
  41. package/dist/client/assets/{card-DVXldwSE.js → card-Hve9iIpZ.js} +1 -1
  42. package/dist/client/assets/{chat-context-clHOazkR.js → chat-context-C2vjARhO.js} +1 -1
  43. package/dist/client/assets/{checkbox-EVw79nds.js → checkbox-DmWLCJJH.js} +1 -1
  44. package/dist/client/assets/{collection-detail-C13v-yoJ.js → collection-detail-D8wvqyeL.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-BM4OZbbR.js → collection-display-button-CQ2KlZSu.js} +1 -1
  46. package/dist/client/assets/{collection-search-DoSMDd39.js → collection-search-D_mJKf_N.js} +1 -1
  47. package/dist/client/assets/{collection-search-DjqZM35U.js → collection-search-DffILLk0.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-jyvgWmq5.js → collection-table-wrapper-fO254CQy.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-Nu6UZ0Wa.js → collection-tabs-Bcs-_tfj.js} +1 -1
  50. package/dist/client/assets/{collections-_TpL4Kbd.js → collections-CISD8jzc.js} +1 -1
  51. package/dist/client/assets/{command-BGK9JNiv.js → command-CsVFknP_.js} +1 -1
  52. package/dist/client/assets/{connection-card-h503T7yE.js → connection-card-aTu5Xl4N.js} +1 -1
  53. package/dist/client/assets/{connection-detail-E3ZTKIWY.js → connection-detail-BUr0xwe0.js} +1 -1
  54. package/dist/client/assets/{connection-form-helpers-B5DiwUxU.js → connection-form-helpers-BEHWki2e.js} +1 -1
  55. package/dist/client/assets/{connections-Ba8EED2x.js → connections-BJwQ4V76.js} +1 -1
  56. package/dist/client/assets/{constants-lTcLVS5n.js → constants-BwurOShK.js} +1 -1
  57. package/dist/client/assets/{constants-CiJRSGoE.js → constants-DZ5y4NEu.js} +1 -1
  58. package/dist/client/assets/{dialog-BRB-AdlQ.js → dialog-BSlhJimL.js} +1 -1
  59. package/dist/client/assets/{domain-settings-vcc_x35P.js → domain-settings-D65HSgmV.js} +1 -1
  60. package/dist/client/assets/{drawer-rKfRlJNC.js → drawer-DwurUbp0.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-DaYjsctt.js → dropdown-menu-Dn3K1Gpo.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-Bs-dtzIc.js → dynamic-plugin-layout-uzPcJgAD.js} +1 -1
  63. package/dist/client/assets/{empty-state-DpWDEkDd.js → empty-state-B4R6bbr3.js} +1 -1
  64. package/dist/client/assets/{empty-state-DLaWKneQ.js → empty-state-DbgILpoj.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-DIDviCIp.js → extract-connection-data-Bp5NDOhQ.js} +1 -1
  66. package/dist/client/assets/{features-CE8oBb9H.js → features-MuQDQTKd.js} +1 -1
  67. package/dist/client/assets/{form-mI6GLCMQ.js → form-DTt4fIHo.js} +1 -1
  68. package/dist/client/assets/{general-27HuvgYf.js → general-C7YvzevF.js} +1 -1
  69. package/dist/client/assets/index-B4J1yAvl.css +1 -0
  70. package/dist/client/assets/{index-Ccm19Owr.js → index-BJz9Oj-t.js} +1 -1
  71. package/dist/client/assets/{index-B11-oLok.js → index-BTM4S0x-.js} +1 -1
  72. package/dist/client/assets/{index-D8ZWoKb1.js → index-BZwRn_mX.js} +1 -1
  73. package/dist/client/assets/index-CKNbLfs9.js +1 -0
  74. package/dist/client/assets/{index-cC9WxUf7.js → index-COQkJrV6.js} +1 -1
  75. package/dist/client/assets/{index-BdrUauLh.js → index-CbEM9IOV.js} +1 -1
  76. package/dist/client/assets/{index-oMBghIJJ.js → index-D1LVHcIe.js} +1 -1
  77. package/dist/client/assets/{index-BLqORW7O.js → index-D9wcQMm5.js} +1 -1
  78. package/dist/client/assets/{index-WenLlWbb.js → index-DBY00Q2Z.js} +19 -19
  79. package/dist/client/assets/{index-C4eEdhdn.js → index-DHKldY3y.js} +1 -1
  80. package/dist/client/assets/{index-hcEg81hB.js → index-DRnP8Xhy.js} +10 -10
  81. package/dist/client/assets/{index-CHiZkXhm.js → index-Day-HjXR.js} +1 -1
  82. package/dist/client/assets/{index-CD-vU91r.js → index-XlHohbXo.js} +1 -1
  83. package/dist/client/assets/{index-DHZDsons.js → index-h0Ny6VA2.js} +1 -1
  84. package/dist/client/assets/{index-B3FEpuQw.js → index-uTtq-reU.js} +1 -1
  85. package/dist/client/assets/{index-B3zZp_Qu.js → index-ygN6PiaU.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-DkM0VxlF.js → infiniteQueryObserver-BFZ15R1_.js} +1 -1
  87. package/dist/client/assets/{input-Cuud93wX.js → input-liZY-axz.js} +1 -1
  88. package/dist/client/assets/{integration-icon-CsrRg2Lu.js → integration-icon-Cz-seBmA.js} +1 -1
  89. package/dist/client/assets/{label-Bk3DQN0Y.js → label-CrXFAdsO.js} +1 -1
  90. package/dist/client/assets/{layout-BtQea4Qg.js → layout-bMTJXFfz.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-CbbipZjJ.js → lean-canvas-recruit-modal-DZ6knxg9.js} +1 -1
  92. package/dist/client/assets/{login-BgZ8a57W.js → login-CWW3hrOg.js} +1 -1
  93. package/dist/client/assets/{members-BrEtD2C0.js → members-DKWnDmHd.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-B5h0xAd0.js → monaco-editor-Cx68yuxi.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-FmuYstq7.js → monitoring-stats-row-BFqk7UYd.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-D2JxS3R_.js → oauth-callback-ai-provider-ONRq40Il.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-BOHYAMsk.js → oauth-callback-nz50ugwL.js} +1 -1
  98. package/dist/client/assets/{onboarding-Dls-YBag.js → onboarding-CbZyKtbC.js} +1 -1
  99. package/dist/client/assets/{org-layout-B0WpG86a.js → org-layout-DkS2FRIV.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-fSkxW1jN.js → org-plugin-layout-DnoycXXu.js} +1 -1
  101. package/dist/client/assets/{pair-CqYfP4a_.js → pair-rqe3skqp.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-C3M4-bHq.js → plugin-empty-state-DAJtqa_X.js} +1 -1
  103. package/dist/client/assets/{plugin-header-Bhl8FTKN.js → plugin-header-DnTysGuR.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-DOuAk8f9.js → plugin-layout-Zl5kAJLg.js} +1 -1
  105. package/dist/client/assets/{popover-BWawolwL.js → popover-B6ijC2Zf.js} +1 -1
  106. package/dist/client/assets/{profile-DKggoElb.js → profile-Wj3GJkbr.js} +1 -1
  107. package/dist/client/assets/{project-app-view-BTqqbkYN.js → project-app-view-DufFnF1s.js} +1 -1
  108. package/dist/client/assets/registry-D49ZAHvu.js +2 -0
  109. package/dist/client/assets/{registry-layout-Bcb0ETu2.js → registry-layout-BvfKYFzg.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-B0aP_BYa.js → required-auth-layout-CKQlCfyf.js} +1 -1
  111. package/dist/client/assets/{reset-password-DAQu9CHm.js → reset-password-4dmtvYgx.js} +1 -1
  112. package/dist/client/assets/{roles-CV8Id8qK.js → roles-DlsIbipv.js} +1 -1
  113. package/dist/client/assets/{scroll-area-0g8Z_dWS.js → scroll-area-D_0eTXQI.js} +1 -1
  114. package/dist/client/assets/{search-input-jyuCy7Ai.js → search-input-CbBz2_I7.js} +1 -1
  115. package/dist/client/assets/{select-hpzuL2n7.js → select-DwQCWni4.js} +1 -1
  116. package/dist/client/assets/{select-model-CtHOnPsy.js → select-model-CSzGroxj.js} +1 -1
  117. package/dist/client/assets/{settings-layout-ClllTp0r.js → settings-layout-D2TzHadG.js} +1 -1
  118. package/dist/client/assets/{settings-section-DTpTGGC-.js → settings-section-CVNbjkC4.js} +1 -1
  119. package/dist/client/assets/{shell-layout-B405kN5F.js → shell-layout-BK74oWLU.js} +1 -1
  120. package/dist/client/assets/{skeleton-B9GboYxM.js → skeleton-DnMJGIDK.js} +1 -1
  121. package/dist/client/assets/{sso-Dh1NgG1u.js → sso-ByZblLmU.js} +1 -1
  122. package/dist/client/assets/{store-2uy2qIUV.js → store-D02KrT4m.js} +1 -1
  123. package/dist/client/assets/store-registry-C02mfQOQ.js +2 -0
  124. package/dist/client/assets/{switch-CD5xHhwa.js → switch-BwYbkaPM.js} +1 -1
  125. package/dist/client/assets/{table-Bl-CW2Ey.js → table-dOL69UsN.js} +1 -1
  126. package/dist/client/assets/{tabs-8bRAvOFB.js → tabs-CGg7lV45.js} +1 -1
  127. package/dist/client/assets/{task-status-Df19deFg.js → task-status-DAgh3LfT.js} +1 -1
  128. package/dist/client/assets/{textarea-0ebJKTCS.js → textarea-CkxfQbxI.js} +1 -1
  129. package/dist/client/assets/{toggle-group-BqrVPEZw.js → toggle-group-C5VhmQig.js} +1 -1
  130. package/dist/client/assets/{tools-list-1YgWwNhM.js → tools-list-CwM3RxlF.js} +1 -1
  131. package/dist/client/assets/{tooltip-CGmvkTM6.js → tooltip-CUw8WpYG.js} +1 -1
  132. package/dist/client/assets/{types-CN-G9hqy.js → types-slR7lXH6.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-BtZzelvz.js → use-ai-providers-DespFg1Y.js} +1 -1
  134. package/dist/client/assets/{use-collections-DjbmBbmU.js → use-collections-CDG0ivO9.js} +1 -1
  135. package/dist/client/assets/{use-connection-CffI5S47.js → use-connection-DDedfw7l.js} +1 -1
  136. package/dist/client/assets/{use-copy-DNx2iDfI.js → use-copy-Czy0YFNn.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-BFp1mbc9.js → use-create-virtual-mcp-Bhi93QNY.js} +1 -1
  138. package/dist/client/assets/{use-decopilot-events-D5TlUkky.js → use-decopilot-events-DkzJQYGR.js} +1 -1
  139. package/dist/client/assets/{use-delete-connection-O5X9Xo4O.js → use-delete-connection-CG2J3Cjn.js} +1 -1
  140. package/dist/client/assets/{use-infinite-scroll-FZg8WuOv.js → use-infinite-scroll-qjXoMT8U.js} +1 -1
  141. package/dist/client/assets/{use-list-state-CbWjR069.js → use-list-state-D2VmPCpI.js} +1 -1
  142. package/dist/client/assets/{use-mcp-tools-CxZifaYv.js → use-mcp-tools-nd8RTEJZ.js} +1 -1
  143. package/dist/client/assets/{use-members-CXQMD9Vu.js → use-members-BWz4qY4v.js} +1 -1
  144. package/dist/client/assets/{use-navigate-to-agent-C0C5E43c.js → use-navigate-to-agent-Dj0boPYr.js} +1 -1
  145. package/dist/client/assets/{use-org-auth-client-Dy4G77my.js → use-org-auth-client-_7iLBAbg.js} +1 -1
  146. package/dist/client/assets/{use-org-sso-Drj77Zm1.js → use-org-sso-CXTYwYuw.js} +1 -1
  147. package/dist/client/assets/{use-organization-roles-DmSBxwGY.js → use-organization-roles-BmJJrwum.js} +1 -1
  148. package/dist/client/assets/{use-organization-settings--1KNcya1.js → use-organization-settings-C516uAxZ.js} +1 -1
  149. package/dist/client/assets/{use-registry-connections-BaBm7Ii1.js → use-registry-connections-BH65PVKK.js} +1 -1
  150. package/dist/client/assets/{use-status-sounds-BDL4IJ6A.js → use-status-sounds-COJng9ez.js} +1 -1
  151. package/dist/client/assets/{use-tasks-DF42FEXc.js → use-tasks-BMtiaufW.js} +1 -1
  152. package/dist/client/assets/{use-view-mode-CBcjjJZG.js → use-view-mode-B3HPjSsa.js} +1 -1
  153. package/dist/client/assets/{use-virtual-mcp-CTmQF3FY.js → use-virtual-mcp-Dkco3wCF.js} +1 -1
  154. package/dist/client/assets/useInfiniteQuery-mbgOLEDd.js +1 -0
  155. package/dist/client/assets/useSuspenseInfiniteQuery-DZGLPMRe.js +1 -0
  156. package/dist/client/assets/{user-DNhBNgsY.js → user-BCVAIUhB.js} +1 -1
  157. package/dist/client/assets/{view-mode-toggle-KbDgQNkg.js → view-mode-toggle-Bbj9P-zr.js} +1 -1
  158. package/dist/client/assets/{workflow-DZzf5GRI.js → workflow-DZKRFLJh.js} +1 -1
  159. package/dist/client/assets/workflow-detail-Bm0PdrL9.js +1 -0
  160. package/dist/client/index.html +2 -2
  161. package/dist/server/cli.js +3 -3
  162. package/dist/server/node_modules/ansi-regex/index.d.ts +33 -0
  163. package/dist/server/node_modules/ansi-regex/index.js +14 -0
  164. package/dist/server/node_modules/{ansi-styles → ansi-regex}/package.json +20 -13
  165. package/dist/server/node_modules/ansi-regex/readme.md +66 -0
  166. package/dist/server/node_modules/mimic-fn/index.d.ts +54 -0
  167. package/dist/server/node_modules/mimic-fn/index.js +13 -0
  168. package/dist/server/node_modules/mimic-fn/package.json +42 -0
  169. package/dist/server/node_modules/mimic-fn/readme.md +69 -0
  170. package/dist/server/node_modules/pg-int8/LICENSE +13 -0
  171. package/dist/server/node_modules/pg-int8/README.md +16 -0
  172. package/dist/server/node_modules/pg-int8/index.js +100 -0
  173. package/dist/server/node_modules/pg-int8/package.json +24 -0
  174. package/dist/server/node_modules/postgres-array/index.d.ts +4 -0
  175. package/dist/server/node_modules/postgres-array/index.js +97 -0
  176. package/dist/server/node_modules/postgres-array/license +21 -0
  177. package/dist/server/node_modules/postgres-array/package.json +35 -0
  178. package/dist/server/node_modules/postgres-array/readme.md +43 -0
  179. package/dist/server/node_modules/postgres-bytea/index.js +33 -0
  180. package/dist/server/node_modules/postgres-bytea/license +21 -0
  181. package/dist/server/node_modules/postgres-bytea/package.json +34 -0
  182. package/dist/server/node_modules/postgres-bytea/readme.md +34 -0
  183. package/dist/server/node_modules/postgres-date/index.js +116 -0
  184. package/dist/server/node_modules/postgres-date/license +21 -0
  185. package/dist/server/node_modules/postgres-date/package.json +33 -0
  186. package/dist/server/node_modules/postgres-date/readme.md +49 -0
  187. package/dist/server/node_modules/postgres-interval/index.d.ts +20 -0
  188. package/dist/server/node_modules/postgres-interval/index.js +125 -0
  189. package/dist/server/node_modules/postgres-interval/license +21 -0
  190. package/dist/server/node_modules/postgres-interval/package.json +36 -0
  191. package/dist/server/node_modules/postgres-interval/readme.md +48 -0
  192. package/dist/server/server.js +2 -2
  193. package/package.json +1 -1
  194. package/dist/client/assets/ai-providers-D112U5ed.js +0 -1
  195. package/dist/client/assets/index-CLgHTXwu.js +0 -1
  196. package/dist/client/assets/index-DT63_YMm.css +0 -1
  197. package/dist/client/assets/registry-BOvZQpcE.js +0 -2
  198. package/dist/client/assets/store-registry-LkT6leWD.js +0 -2
  199. package/dist/client/assets/useInfiniteQuery-BugVQNDu.js +0 -1
  200. package/dist/client/assets/useSuspenseInfiniteQuery-CMPA3kQv.js +0 -1
  201. package/dist/client/assets/workflow-detail-OXlDN5sZ.js +0 -1
  202. package/dist/server/node_modules/ansi-styles/index.d.ts +0 -236
  203. package/dist/server/node_modules/ansi-styles/index.js +0 -223
  204. package/dist/server/node_modules/ansi-styles/readme.md +0 -173
  205. package/dist/server/node_modules/environment/index.d.ts +0 -74
  206. package/dist/server/node_modules/environment/index.js +0 -47
  207. package/dist/server/node_modules/environment/license +0 -9
  208. package/dist/server/node_modules/environment/package.json +0 -74
  209. package/dist/server/node_modules/environment/readme.md +0 -94
  210. package/dist/server/node_modules/escape-string-regexp/index.d.ts +0 -18
  211. package/dist/server/node_modules/escape-string-regexp/index.js +0 -11
  212. package/dist/server/node_modules/escape-string-regexp/package.json +0 -43
  213. package/dist/server/node_modules/escape-string-regexp/readme.md +0 -29
  214. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  215. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  216. package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
  217. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  218. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  219. package/dist/server/node_modules/string-width/index.d.ts +0 -39
  220. package/dist/server/node_modules/string-width/index.js +0 -82
  221. package/dist/server/node_modules/string-width/license +0 -9
  222. package/dist/server/node_modules/string-width/package.json +0 -64
  223. package/dist/server/node_modules/string-width/readme.md +0 -66
  224. /package/dist/server/node_modules/{ansi-styles → ansi-regex}/license +0 -0
  225. /package/dist/server/node_modules/{escape-string-regexp → mimic-fn}/license +0 -0
@@ -1 +1 @@
1
- import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index-hcEg81hB.js";import{P as x}from"./index-oMBghIJJ.js";import{d as I}from"./use-organization-settings--1KNcya1.js";import{S as Q}from"./switch-CD5xHhwa.js";import{n as R}from"./Container-U4v06cth.js";import{b as w,S as z,a as F,d as M}from"./settings-section-DTpTGGC-.js";import"./tooltip-CGmvkTM6.js";import"./X-Cf3FFZEE.js";import"./constants-CiJRSGoE.js";import"./card-DVXldwSE.js";import"./ArrowUpRight-Bws5ir-q.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
1
+ import{e as b,s as k,o as E,bM as P,j as i,X as K,aG as _,K as S,x as q}from"./index-DRnP8Xhy.js";import{P as x}from"./index-D1LVHcIe.js";import{d as I}from"./use-organization-settings-C516uAxZ.js";import{S as Q}from"./switch-BwYbkaPM.js";import{n as R}from"./Container-DVwtR0PY.js";import{b as w,S as z,a as F,d as M}from"./settings-section-CVNbjkC4.js";import"./tooltip-CUw8WpYG.js";import"./X-DavTUkoo.js";import"./constants-DZ5y4NEu.js";import"./card-Hve9iIpZ.js";import"./ArrowUpRight-VGEco3p8.js";function N(){const e=b.c(17),{org:t,project:s}=k(),o=E();let u;e[0]!==s.enabledPlugins?(u=s.enabledPlugins??[],e[0]=s.enabledPlugins,e[1]=u):u=e[1];const c=u,l=I();let m;e[2]!==t||e[3]!==s.slug||e[4]!==o?(m=()=>{o.invalidateQueries({queryKey:S.project(t.id,s.slug)}),o.invalidateQueries({queryKey:S.projects(t.id)}),o.invalidateQueries({predicate:n=>{const r=n.queryKey;return r[1]===t.id&&r[3]==="collection"&&r[4]==="VIRTUAL_MCP"}})},e[2]=t,e[3]=s.slug,e[4]=o,e[5]=m):m=e[5];const j=m;let g;e[6]!==j||e[7]!==l||e[8]!==c?(g=(n,r)=>{const d=new Set(c);r?d.add(n):d.delete(n),l.mutate({enabled_plugins:Array.from(d)},{onSuccess:j,onError:A})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=$,C=U;if(P.length===0){let n;return e[10]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("p",{className:"text-sm text-muted-foreground",children:"No plugins available."}),e[10]=n):n=e[10],n}let a;e[11]!==p||e[12]!==l||e[13]!==c?(a=P.map(n=>{const r=y(n.id),d=C(n.id),h=c.includes(n.id);return i.jsx(w,{title:r?.label??n.id,description:d??void 0,icon:i.jsx("span",{className:"text-muted-foreground [&>svg]:size-4",children:r?.icon??i.jsx(R,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(Q,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:T})},n.id)}),e[11]=p,e[12]=l,e[13]=c,e[14]=a):a=e[14];let f;return e[15]!==a?(f=i.jsx(z,{children:i.jsx(F,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function T(e){return e.stopPropagation()}function U(e){return P.find(s=>s.id===e)?.description??null}function $(e){const t=K.find(o=>o.pluginId===e);if(t)return{label:t.label,icon:t.items[0]?.icon};const s=_.find(o=>o.pluginId===e);return s?{label:s.label,icon:s.icon}:null}function A(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function D(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(x,{children:i.jsx(x.Content,{children:i.jsx(x.Body,{children:i.jsxs(M,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(N,{})]})})})}),e[0]=t):t=e[0],t}function ee(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(D,{}),e[0]=t):t=e[0],t}export{ee as default};
@@ -1 +1 @@
1
- import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index-hcEg81hB.js";import{L as N}from"./label-Bk3DQN0Y.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
1
+ import{bW as b,e as f,j as c,D as C,r as d,c as p,aY as j,bX as v,bY as h}from"./index-DRnP8Xhy.js";import{L as N}from"./label-CrXFAdsO.js";const E=b,g=d.createContext({}),M=t=>{const e=f.c(9);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;e[2]!==s.name?(o={name:s.name},e[2]=s.name,e[3]=o):o=e[3];let n;e[4]!==s?(n=c.jsx(C,{...s}),e[4]=s,e[5]=n):n=e[5];let r;return e[6]!==o||e[7]!==n?(r=c.jsx(g.Provider,{value:o,children:n}),e[6]=o,e[7]=n,e[8]=r):r=e[8],r},x=()=>{const t=f.c(13),e=d.useContext(g),s=d.useContext($),{getFieldState:o}=v();let n;t[0]!==e.name?(n={name:e.name},t[0]=e.name,t[1]=n):n=t[1];const r=h(n);let a;t[2]!==e.name||t[3]!==r||t[4]!==o?(a=o(e.name,r),t[2]=e.name,t[3]=r,t[4]=o,t[5]=a):a=t[5];const l=a;if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=s,m=`${i}-form-item`,F=`${i}-form-item-description`,I=`${i}-form-item-message`;let u;return t[6]!==e.name||t[7]!==l||t[8]!==i||t[9]!==m||t[10]!==F||t[11]!==I?(u={id:i,name:e.name,formItemId:m,formDescriptionId:F,formMessageId:I,...l},t[6]=e.name,t[7]=l,t[8]=i,t[9]=m,t[10]=F,t[11]=I,t[12]=u):u=t[12],u},$=d.createContext({});function w(t){const e=f.c(13);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const n=d.useId();let r;e[3]!==n?(r={id:n},e[3]=n,e[4]=r):r=e[4];let a;e[5]!==s?(a=p("grid gap-2",s),e[5]=s,e[6]=a):a=e[6];let l;e[7]!==o||e[8]!==a?(l=c.jsx("div",{"data-slot":"form-item",className:a,...o}),e[7]=o,e[8]=a,e[9]=l):l=e[9];let i;return e[10]!==r||e[11]!==l?(i=c.jsx($.Provider,{value:r,children:l}),e[10]=r,e[11]=l,e[12]=i):i=e[12],i}function L(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formItemId:r}=x(),a=!!n;let l;e[3]!==s?(l=p("text-foreground data-[error=true]:text-destructive",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==r||e[6]!==o||e[7]!==a||e[8]!==l?(i=c.jsx(N,{"data-slot":"form-label","data-error":a,className:l,htmlFor:r,...o}),e[5]=r,e[6]=o,e[7]=a,e[8]=l,e[9]=i):i=e[9],i}function P(t){const e=f.c(7);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];const{error:o,formItemId:n,formDescriptionId:r,formMessageId:a}=x(),l=o?`${r} ${a}`:`${r}`,i=!!o;let m;return e[2]!==n||e[3]!==s||e[4]!==l||e[5]!==i?(m=c.jsx(j,{"data-slot":"form-control",id:n,"aria-describedby":l,"aria-invalid":i,...s}),e[2]=n,e[3]=s,e[4]=l,e[5]=i,e[6]=m):m=e[6],m}function y(t){const e=f.c(9);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{formDescriptionId:n}=x();let r;e[3]!==s?(r=p("text-muted-foreground text-sm",s),e[3]=s,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==o||e[7]!==r?(a=c.jsx("p",{"data-slot":"form-description",id:n,className:r,...o}),e[5]=n,e[6]=o,e[7]=r,e[8]=a):a=e[8],a}function R(t){const e=f.c(10);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);const{error:n,formMessageId:r}=x(),a=n?String(n?.message??""):o.children;if(!a)return null;let l;e[3]!==s?(l=p("text-destructive text-sm",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==a||e[6]!==r||e[7]!==o||e[8]!==l?(i=c.jsx("p",{"data-slot":"form-message",id:r,className:l,...o,children:a}),e[5]=a,e[6]=r,e[7]=o,e[8]=l,e[9]=i):i=e[9],i}export{M as F,E as a,w as b,L as c,P as d,y as e,R as f};
@@ -1 +1 @@
1
- import{f as re,s as ce,o as de,r as U,z as me,C as ue,a as fe,t as Y,x as q,K as te,j as s,B as K,H as ge,J as W,e as L,c as xe,M as pe}from"./index-hcEg81hB.js";import{P as V}from"./index-oMBghIJJ.js";import{u as he}from"./use-org-auth-client-Dy4G77my.js";import{A as be}from"./avatar-DZ7Lcia3.js";import{I as je}from"./input-Cuud93wX.js";import{S as X,a as Z,b as Q,c as ie,d as ve}from"./settings-section-DTpTGGC-.js";import{D as Se}from"./domain-settings-vcc_x35P.js";import{u as ye,a as se,D as Ne,c as Ce,S as we,v as _e,K as ze,P as De,d as Ae,C as Pe,s as ke,b as Ie,e as Ee}from"./collection-search-DjqZM35U.js";import{W as ee,i as Oe}from"./constants-CiJRSGoE.js";import{b as le}from"./use-virtual-mcp-CTmQF3FY.js";import{b as Te,P as Re,a as Fe}from"./popover-BWawolwL.js";import{S as Le}from"./skeleton-B9GboYxM.js";import{z as $e}from"./agent-icon-CyFFhaia.js";import{s as Me}from"./Plus-B5soxpbi.js";import{a as ae}from"./Users03-C25Ink_E.js";import{i as He}from"./X-Cf3FFZEE.js";import{I as J}from"./integration-icon-CsrRg2Lu.js";import{u as Ke,c as Ue}from"./use-organization-settings--1KNcya1.js";import"./tooltip-CGmvkTM6.js";import"./User01-C-8Fo7RS.js";import"./card-DVXldwSE.js";import"./ArrowUpRight-Bws5ir-q.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-CD5xHhwa.js";import"./SearchMd-fvAW1pa8.js";import"./use-collections-DjbmBbmU.js";import"./AlertCircle-aQgTv3kr.js";import"./Tool01-DeRpug6W.js";import"./XClose-B9H_q-Ab.js";import"./RefreshCcw01-onzNEsM4.js";import"./ArrowNarrowLeft-C_pLc5t-.js";import"./XCircle-CLM44_6-.js";import"./ZapSquare-CjSpwpWX.js";import"./CheckCircle-Cwc7BvQq.js";import"./ChevronDown-C4MI00HX.js";import"./ChevronRight-DDkghuaf.js";import"./ChevronUp-BjFGxYUb.js";import"./DotsVertical-BCK2nFhn.js";import"./Container-U4v06cth.js";import"./Star01-BHGJRtit.js";import"./Palette-CA95sDHj.js";import"./LinkExternal01-C_yQygSO.js";import"./Lock01-rLvN1xbd.js";import"./Sun-C6J9iUe_.js";import"./Play-BlOman6C.js";import"./Settings02-Cro6-7q4.js";import"./Shield01-DtWtqZJ1.js";import"./Trash01-BSFNbfe8.js";import"./Zap-BQvzqOLx.js";const qe=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Be(t){const e=L.c(13),{value:l,onChange:i,name:u,disabled:a}=t,n=U.useRef(null);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>n.current?.click(),e[0]=v):v=e[0];const _=v;let S;e[1]!==i?(S=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){q.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=Ge,h.onloadend=()=>{h.result&&i(h.result),n.current&&(n.current.value="")},h.readAsDataURL(x)},e[1]=i,e[2]=S):S=e[2];const r=S;let d;e[3]!==a||e[4]!==r?(d=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:r,className:"hidden",disabled:a}),e[3]=a,e[4]=r,e[5]=d):d=e[5];const o=l||void 0,f=u??"?";let m;e[6]!==o||e[7]!==f?(m=s.jsx(be,{url:o,fallback:f,shape:"square",size:"base"}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let g;return e[9]!==a||e[10]!==d||e[11]!==m?(g=s.jsxs("button",{type:"button",onClick:_,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[d,m]}),e[9]=a,e[10]=d,e[11]=m,e[12]=g):g=e[12],g}function Ge(){return q.error("Failed to read image")}function Ve(){const t=re(),{org:e}=ce(),l=he(),i=de(),[u,a]=U.useState(!1),n=me({resolver:ue(qe),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),v=fe({mutationFn:async o=>{const f={name:o.name,slug:o.slug};o.logo&&(f.logo=o.logo);const m=await l.organization.update({data:f});if(m?.error)throw new Error(m.error.message||"Failed to update organization");return m},onSuccess:o=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields)}),i.invalidateQueries({queryKey:te.organizations()}),i.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),q.success("Organization settings updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:o=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields),error:o instanceof Error?o.message:String(o)}),q.error(o instanceof Error?o.message:"Failed to update organization")},onSettled:()=>{a(!1)}}),_=o=>{a(!0),v.mutate(o)},S=n.formState.isDirty,r=n.formState.errors,d=typeof window<"u"?`${window.location.host}/`:"";return s.jsx("form",{onSubmit:n.handleSubmit(_),className:"flex flex-col gap-3",children:s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Be,{value:n.watch("logo"),onChange:o=>n.setValue("logo",o??"",{shouldDirty:!0}),name:n.watch("name"),disabled:u})}),s.jsx(Q,{title:"Name",action:s.jsx(je,{id:"org-name",...n.register("name"),placeholder:"Organization name",disabled:u,className:"w-[280px]"})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[d&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:d}),s.jsx("input",{id:"org-slug",...n.register("slug"),placeholder:"my-organization",disabled:u,className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const f=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");n.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}})]})}),(r.name||r.slug||r.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&s.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&s.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&s.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]}),S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",size:"sm",onClick:()=>n.reset(),disabled:u,children:"Cancel"}),s.jsx(K,{type:"submit",disabled:u,size:"sm",children:u?"Saving…":"Save"})]})]})})})}const ne=["site-editor","site-diagnostics","ai-image","ai-research"],oe=8;function We(t,e,l){const i=e.find(a=>a.id===t);if(i)return{id:i.id,title:i.title,icon:i.icon,kind:"template"};const u=l.find(a=>a.id===t);return u?{id:t,title:u.title,icon:u.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Qe(t){const e=L.c(39),{agent:l,onRemove:i}=t;let u;e[0]!==l.id?(u={id:l.id},e[0]=l.id,e[1]=u):u=e[1];const{attributes:a,listeners:n,setNodeRef:v,transform:_,transition:S,isDragging:r}=Ae(u);let d;e[2]!==_?(d=Pe.Transform.toString(_),e[2]=_,e[3]=d):d=e[3];const o=r?.5:void 0,f=r?100:void 0;let m;e[4]!==d||e[5]!==o||e[6]!==f||e[7]!==S?(m={transform:d,transition:S,opacity:o,zIndex:f},e[4]=d,e[5]=o,e[6]=f,e[7]=S,e[8]=m):m=e[8];const g=m,z=r&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const h=`Drag to reorder ${l.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx($e,{size:14}),e[11]=D):D=e[11];let k;e[12]!==a||e[13]!==n||e[14]!==h?(k=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:D}),e[12]=a,e[13]=n,e[14]=h,e[15]=k):k=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ae,{size:14}),e[16]=y):y=e[16];let C;e[17]!==l.icon||e[18]!==l.title?(C=s.jsx(J,{icon:l.icon,name:l.title,size:"xs",fallbackIcon:y}),e[17]=l.icon,e[18]=l.title,e[19]=C):C=e[19];let b;e[20]!==l.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:l.title}),e[20]=l.title,e[21]=b):b=e[21];const w=l.kind==="template"?"Template":l.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==w?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:w}),e[22]=w,e[23]=p):p=e[23];let j;e[24]!==b||e[25]!==p?(j=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,p]}),e[24]=b,e[25]=p,e[26]=j):j=e[26];const I=`Remove ${l.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(He,{size:14}),e[27]=A):A=e[27];let N;e[28]!==i||e[29]!==I?(N=s.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=i,e[29]=I,e[30]=N):N=e[30];let P;return e[31]!==v||e[32]!==g||e[33]!==k||e[34]!==C||e[35]!==j||e[36]!==N||e[37]!==x?(P=s.jsxs("div",{ref:v,style:g,className:x,children:[k,C,j,N]}),e[31]=v,e[32]=g,e[33]=k,e[34]=C,e[35]=j,e[36]=N,e[37]=x,e[38]=P):P=e[38],P}function Ye(t){const e=L.c(48),{selectedIds:l,onAdd:i}=t,[u,a]=U.useState(!1),[n,v]=U.useState(""),_=le();let S;e[0]!==l?(S=new Set(l),e[0]=l,e[1]=S):S=e[1];const r=S;let d,o,f,m,g,z,x,h,D,k,y,C,b;if(e[2]!==_||e[3]!==i||e[4]!==u||e[5]!==n||e[6]!==r){const A=n.toLowerCase();m=ee.filter(c=>!r.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let N;e[20]!==r?(N=c=>c.id!==null&&!Oe(c.id)&&!r.has(c.id),e[20]=r,e[21]=N):N=e[21],f=_.filter(N).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==i?(P=c=>{i(c),a(!1),v("")},e[22]=i,e[23]=P):P=e[23];const O=P;o=Te,C=u,b=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Re,{asChild:!0,children:s.jsxs(K,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Me,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],d=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(y=s.jsx(Ee,{value:n,onChange:v,placeholder:"Search agents..."}),e[25]=n,e[26]=y):y=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=m.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=_,e[3]=i,e[4]=u,e[5]=n,e[6]=r,e[7]=d,e[8]=o,e[9]=f,e[10]=m,e[11]=g,e[12]=z,e[13]=x,e[14]=h,e[15]=D,e[16]=k,e[17]=y,e[18]=C,e[19]=b}else d=e[7],o=e[8],f=e[9],m=e[10],g=e[11],z=e[12],x=e[13],h=e[14],D=e[15],k=e[16],y=e[17],C=e[18],b=e[19];let w;e[27]!==f||e[28]!==m.length||e[29]!==n?(w=m.length===0&&f.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=f,e[28]=m.length,e[29]=n,e[30]=w):w=e[30];let p;e[31]!==w||e[32]!==z||e[33]!==x||e[34]!==h?(p=s.jsxs("div",{className:z,children:[x,h,w]}),e[31]=w,e[32]=z,e[33]=x,e[34]=h,e[35]=p):p=e[35];let j;e[36]!==d||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==y?(j=s.jsxs(d,{className:D,align:k,children:[y,p]}),e[36]=d,e[37]=p,e[38]=D,e[39]=k,e[40]=y,e[41]=j):j=e[41];let I;return e[42]!==o||e[43]!==g||e[44]!==j||e[45]!==C||e[46]!==b?(I=s.jsxs(o,{open:C,onOpenChange:b,children:[g,j]}),e[42]=o,e[43]=g,e[44]=j,e[45]=C,e[46]=b,e[47]=I):I=e[47],I}function Je(){const t=L.c(61),e=Ke(),l=le(),i=Ue();let u;t[0]!==e?.ids?(u=e?.ids??[...ne],t[0]=e?.ids,t[1]=u):u=t[1];const a=u,[n,v]=U.useState(a);let _;t[2]!==n||t[3]!==a?(_=n.length!==a.length||n.some((E,T)=>E!==a[T]),t[2]=n,t[3]=a,t[4]=_):_=t[4];const S=_;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d={coordinateGetter:ke},t[6]=d):d=t[6];const o=ye(se(De,r),se(ze,d));let f;t[7]!==n?(f=E=>{const{active:T,over:R}=E;if(!R||T.id===R.id)return;const F=n.indexOf(T.id),G=n.indexOf(R.id);F===-1||G===-1||v(Ie([...n],F,G))},t[7]=n,t[8]=f):f=t[8];const m=f;let g;t[9]!==n?(g=E=>{n.includes(E)||v([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{v(n.filter(T=>T!==E))},t[11]=n,t[12]=x):x=t[12];const h=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{v([...ne])},t[13]=D):D=t[13];const k=D;let y;t[14]!==n||t[15]!==i?(y=()=>{i.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(Ze).length}),q.success("Default home agents updated")},onError:Xe})},t[14]=n,t[15]=i,t[16]=y):y=t[16];const C=y;let b,w,p,j,I,A,N;if(t[17]!==l||t[18]!==n||t[19]!==m||t[20]!==h||t[21]!==o||t[22]!==i.isPending){let E;t[30]!==l?(E=F=>We(F,ee,l),t[30]=l,t[31]=E):E=t[31];const T=n.map(E);p=Math.max(0,n.length-oe),w=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==i.isPending?(A=s.jsxs(K,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:i.isPending,children:[R,"Reset defaults"]}),t[33]=i.isPending,t[34]=A):A=t[34],b=Z,N="px-5 py-5 flex flex-col gap-3",j=T.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ne,{sensors:o,collisionDetection:Ce,onDragEnd:m,children:s.jsx(we,{items:n,strategy:_e,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map((F,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===oe&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Qe,{agent:F,onRemove:()=>h(F.id)})]},F.id))})})}),t[17]=l,t[18]=n,t[19]=m,t[20]=h,t[21]=o,t[22]=i.isPending,t[23]=b,t[24]=w,t[25]=p,t[26]=j,t[27]=I,t[28]=A,t[29]=N}else b=t[23],w=t[24],p=t[25],j=t[26],I=t[27],A=t[28],N=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Ye,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let O;t[38]!==p?(O=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=O):O=t[39];let c;t[40]!==P||t[41]!==O?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,O]}),t[40]=P,t[41]=O,t[42]=c):c=t[42];let $;t[43]!==j||t[44]!==c||t[45]!==N?($=s.jsxs("div",{className:N,children:[j,c]}),t[43]=j,t[44]=c,t[45]=N,t[46]=$):$=t[46];let M;t[47]!==C||t[48]!==a||t[49]!==S||t[50]!==i.isPending?(M=S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",onClick:()=>v(a),disabled:i.isPending,children:"Cancel"}),s.jsx(K,{type:"button",onClick:C,disabled:i.isPending,children:i.isPending?"Saving…":"Save"})]}),t[47]=C,t[48]=a,t[49]=S,t[50]=i.isPending,t[51]=M):M=t[51];let H;t[52]!==b||t[53]!==$||t[54]!==M?(H=s.jsxs(b,{children:[$,M]}),t[52]=b,t[53]=$,t[54]=M,t[55]=H):H=t[55];let B;return t[56]!==w||t[57]!==I||t[58]!==A||t[59]!==H?(B=s.jsx(w,{title:I,actions:A,children:H}),t[56]=w,t[57]=I,t[58]=A,t[59]=H,t[60]=B):B=t[60],B}function Xe(t){q.error(t instanceof Error?t.message:"Failed to update default home agents")}function Ze(t){return ee.some(e=>e.id===t)}function et(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(tt)})})}),t[0]=e):e=t[0],e}function tt(t,e){return s.jsx(Le,{className:"h-12 w-full rounded-lg"},e)}function st(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U.Suspense,{fallback:s.jsx(et,{}),children:s.jsx(Je,{})}),t[0]=e):e=t[0],e}function nt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ve,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Ve,{}),s.jsx(Se,{}),s.jsx(st,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{}),t[0]=e):e=t[0],e}export{Zt as default};
1
+ import{f as re,s as ce,o as de,r as U,z as me,C as ue,a as fe,t as Y,x as q,K as te,j as s,B as K,H as ge,J as W,e as L,c as xe,M as pe}from"./index-DRnP8Xhy.js";import{P as V}from"./index-D1LVHcIe.js";import{u as he}from"./use-org-auth-client-_7iLBAbg.js";import{A as be}from"./avatar-B1YFr91G.js";import{I as je}from"./input-liZY-axz.js";import{S as X,a as Z,b as Q,c as ie,d as ve}from"./settings-section-CVNbjkC4.js";import{D as Se}from"./domain-settings-D65HSgmV.js";import{u as ye,a as se,D as Ne,c as Ce,S as we,v as _e,K as ze,P as De,d as Ae,C as Pe,s as ke,b as Ie,e as Ee}from"./collection-search-DffILLk0.js";import{W as ee,i as Oe}from"./constants-DZ5y4NEu.js";import{b as le}from"./use-virtual-mcp-Dkco3wCF.js";import{b as Te,P as Re,a as Fe}from"./popover-B6ijC2Zf.js";import{S as Le}from"./skeleton-DnMJGIDK.js";import{z as $e}from"./agent-icon-DnE1m294.js";import{s as Me}from"./Plus-8zlfW9Nb.js";import{a as ae}from"./Users03-CtQ_adLe.js";import{i as He}from"./X-DavTUkoo.js";import{I as J}from"./integration-icon-Cz-seBmA.js";import{u as Ke,c as Ue}from"./use-organization-settings-C516uAxZ.js";import"./tooltip-CUw8WpYG.js";import"./User01-DLnrd0WJ.js";import"./card-Hve9iIpZ.js";import"./ArrowUpRight-VGEco3p8.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-BwYbkaPM.js";import"./SearchMd-BgpZuBQH.js";import"./use-collections-CDG0ivO9.js";import"./AlertCircle-CtSiN7Dh.js";import"./Tool01-73PH4njb.js";import"./XClose-BpjQA_dF.js";import"./RefreshCcw01-DV-_PfmV.js";import"./ArrowNarrowLeft-CjMD5YtT.js";import"./XCircle-BKeTm8Ww.js";import"./ZapSquare-BL-_ZEqM.js";import"./CheckCircle-BOjQcSoZ.js";import"./ChevronDown-B21GyFLP.js";import"./ChevronRight-C7fFXCXU.js";import"./ChevronUp-DLJe-Ifh.js";import"./DotsVertical-_1yE4PFi.js";import"./Container-DVwtR0PY.js";import"./Star01-DupDdRAe.js";import"./Palette-xIvgAE_U.js";import"./LinkExternal01-BeNjIA73.js";import"./Lock01-y9D26Lk9.js";import"./Sun-B1MYWGMj.js";import"./Play-esUCyQh5.js";import"./Settings02-B2DHZxlV.js";import"./Shield01-CewVSi37.js";import"./Trash01-_-2EAUWH.js";import"./Zap-DT_tBFfJ.js";const qe=ge({name:W().min(1,"Name is required").max(255,"Name is too long"),slug:W().min(1,"Slug is required").max(50,"Slug is too long").regex(/^[a-z0-9-]+$/,"Slug must contain only lowercase letters, numbers, and hyphens"),logo:W().optional()});function Be(t){const e=L.c(13),{value:l,onChange:i,name:u,disabled:a}=t,n=U.useRef(null);let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v=()=>n.current?.click(),e[0]=v):v=e[0];const _=v;let S;e[1]!==i?(S=z=>{const x=z.target.files?.[0];if(!x)return;if(x.size>2097152){q.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=Ge,h.onloadend=()=>{h.result&&i(h.result),n.current&&(n.current.value="")},h.readAsDataURL(x)},e[1]=i,e[2]=S):S=e[2];const r=S;let d;e[3]!==a||e[4]!==r?(d=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:r,className:"hidden",disabled:a}),e[3]=a,e[4]=r,e[5]=d):d=e[5];const o=l||void 0,f=u??"?";let m;e[6]!==o||e[7]!==f?(m=s.jsx(be,{url:o,fallback:f,shape:"square",size:"base"}),e[6]=o,e[7]=f,e[8]=m):m=e[8];let g;return e[9]!==a||e[10]!==d||e[11]!==m?(g=s.jsxs("button",{type:"button",onClick:_,disabled:a,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[d,m]}),e[9]=a,e[10]=d,e[11]=m,e[12]=g):g=e[12],g}function Ge(){return q.error("Failed to read image")}function Ve(){const t=re(),{org:e}=ce(),l=he(),i=de(),[u,a]=U.useState(!1),n=me({resolver:ue(qe),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),v=fe({mutationFn:async o=>{const f={name:o.name,slug:o.slug};o.logo&&(f.logo=o.logo);const m=await l.organization.update({data:f});if(m?.error)throw new Error(m.error.message||"Failed to update organization");return m},onSuccess:o=>{Y("organization_settings_updated",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields)}),i.invalidateQueries({queryKey:te.organizations()}),i.invalidateQueries({queryKey:te.activeOrganization(e.slug)}),q.success("Organization settings updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:o=>{Y("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(n.formState.dirtyFields),error:o instanceof Error?o.message:String(o)}),q.error(o instanceof Error?o.message:"Failed to update organization")},onSettled:()=>{a(!1)}}),_=o=>{a(!0),v.mutate(o)},S=n.formState.isDirty,r=n.formState.errors,d=typeof window<"u"?`${window.location.host}/`:"";return s.jsx("form",{onSubmit:n.handleSubmit(_),className:"flex flex-col gap-3",children:s.jsx(X,{children:s.jsxs(Z,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(Be,{value:n.watch("logo"),onChange:o=>n.setValue("logo",o??"",{shouldDirty:!0}),name:n.watch("name"),disabled:u})}),s.jsx(Q,{title:"Name",action:s.jsx(je,{id:"org-name",...n.register("name"),placeholder:"Organization name",disabled:u,className:"w-[280px]"})}),s.jsx(Q,{title:"URL",action:s.jsxs("div",{className:"flex items-center w-[280px] rounded-md border border-input bg-input/30 focus-within:ring-2 focus-within:ring-ring/50 overflow-hidden",children:[d&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:d}),s.jsx("input",{id:"org-slug",...n.register("slug"),placeholder:"my-organization",disabled:u,className:"flex-1 min-w-0 bg-transparent px-2 py-1.5 text-sm text-foreground placeholder:text-muted-foreground/60 outline-none",onChange:o=>{const f=o.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");n.setValue("slug",f,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}})]})}),(r.name||r.slug||r.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[r.name&&s.jsx("p",{className:"text-xs text-destructive",children:r.name.message}),r.slug&&s.jsx("p",{className:"text-xs text-destructive",children:r.slug.message}),r.logo&&s.jsx("p",{className:"text-xs text-destructive",children:r.logo.message})]}),S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",size:"sm",onClick:()=>n.reset(),disabled:u,children:"Cancel"}),s.jsx(K,{type:"submit",disabled:u,size:"sm",children:u?"Saving…":"Save"})]})]})})})}const ne=["site-editor","site-diagnostics","ai-image","ai-research"],oe=8;function We(t,e,l){const i=e.find(a=>a.id===t);if(i)return{id:i.id,title:i.title,icon:i.icon,kind:"template"};const u=l.find(a=>a.id===t);return u?{id:t,title:u.title,icon:u.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function Qe(t){const e=L.c(39),{agent:l,onRemove:i}=t;let u;e[0]!==l.id?(u={id:l.id},e[0]=l.id,e[1]=u):u=e[1];const{attributes:a,listeners:n,setNodeRef:v,transform:_,transition:S,isDragging:r}=Ae(u);let d;e[2]!==_?(d=Pe.Transform.toString(_),e[2]=_,e[3]=d):d=e[3];const o=r?.5:void 0,f=r?100:void 0;let m;e[4]!==d||e[5]!==o||e[6]!==f||e[7]!==S?(m={transform:d,transition:S,opacity:o,zIndex:f},e[4]=d,e[5]=o,e[6]=f,e[7]=S,e[8]=m):m=e[8];const g=m,z=r&&"shadow-lg";let x;e[9]!==z?(x=xe("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",z),e[9]=z,e[10]=x):x=e[10];const h=`Drag to reorder ${l.title}`;let D;e[11]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx($e,{size:14}),e[11]=D):D=e[11];let k;e[12]!==a||e[13]!==n||e[14]!==h?(k=s.jsx("button",{type:"button",...a,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:D}),e[12]=a,e[13]=n,e[14]=h,e[15]=k):k=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(ae,{size:14}),e[16]=y):y=e[16];let C;e[17]!==l.icon||e[18]!==l.title?(C=s.jsx(J,{icon:l.icon,name:l.title,size:"xs",fallbackIcon:y}),e[17]=l.icon,e[18]=l.title,e[19]=C):C=e[19];let b;e[20]!==l.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:l.title}),e[20]=l.title,e[21]=b):b=e[21];const w=l.kind==="template"?"Template":l.kind==="custom"?"Custom agent":"Unavailable";let p;e[22]!==w?(p=s.jsx("span",{className:"text-xs text-muted-foreground",children:w}),e[22]=w,e[23]=p):p=e[23];let j;e[24]!==b||e[25]!==p?(j=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,p]}),e[24]=b,e[25]=p,e[26]=j):j=e[26];const I=`Remove ${l.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(He,{size:14}),e[27]=A):A=e[27];let N;e[28]!==i||e[29]!==I?(N=s.jsx("button",{type:"button",onClick:i,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":I,children:A}),e[28]=i,e[29]=I,e[30]=N):N=e[30];let P;return e[31]!==v||e[32]!==g||e[33]!==k||e[34]!==C||e[35]!==j||e[36]!==N||e[37]!==x?(P=s.jsxs("div",{ref:v,style:g,className:x,children:[k,C,j,N]}),e[31]=v,e[32]=g,e[33]=k,e[34]=C,e[35]=j,e[36]=N,e[37]=x,e[38]=P):P=e[38],P}function Ye(t){const e=L.c(48),{selectedIds:l,onAdd:i}=t,[u,a]=U.useState(!1),[n,v]=U.useState(""),_=le();let S;e[0]!==l?(S=new Set(l),e[0]=l,e[1]=S):S=e[1];const r=S;let d,o,f,m,g,z,x,h,D,k,y,C,b;if(e[2]!==_||e[3]!==i||e[4]!==u||e[5]!==n||e[6]!==r){const A=n.toLowerCase();m=ee.filter(c=>!r.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let N;e[20]!==r?(N=c=>c.id!==null&&!Oe(c.id)&&!r.has(c.id),e[20]=r,e[21]=N):N=e[21],f=_.filter(N).filter(c=>!n||c.title.toLowerCase().includes(A));let P;e[22]!==i?(P=c=>{i(c),a(!1),v("")},e[22]=i,e[23]=P):P=e[23];const O=P;o=Te,C=u,b=a,e[24]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Re,{asChild:!0,children:s.jsxs(K,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Me,{size:14}),"Add agent"]})}),e[24]=g):g=e[24],d=Fe,D="w-[320px] p-0 overflow-hidden",k="start",e[25]!==n?(y=s.jsx(Ee,{value:n,onChange:v,placeholder:"Search agents..."}),e[25]=n,e[26]=y):y=e[26],z="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",x=m.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Templates"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=f.length>0&&s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground px-1",children:"Custom agents"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>O(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(J,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ae,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=_,e[3]=i,e[4]=u,e[5]=n,e[6]=r,e[7]=d,e[8]=o,e[9]=f,e[10]=m,e[11]=g,e[12]=z,e[13]=x,e[14]=h,e[15]=D,e[16]=k,e[17]=y,e[18]=C,e[19]=b}else d=e[7],o=e[8],f=e[9],m=e[10],g=e[11],z=e[12],x=e[13],h=e[14],D=e[15],k=e[16],y=e[17],C=e[18],b=e[19];let w;e[27]!==f||e[28]!==m.length||e[29]!==n?(w=m.length===0&&f.length===0&&s.jsx("div",{className:"text-xs text-muted-foreground text-center py-6",children:n?"No agents found":"All agents are already added"}),e[27]=f,e[28]=m.length,e[29]=n,e[30]=w):w=e[30];let p;e[31]!==w||e[32]!==z||e[33]!==x||e[34]!==h?(p=s.jsxs("div",{className:z,children:[x,h,w]}),e[31]=w,e[32]=z,e[33]=x,e[34]=h,e[35]=p):p=e[35];let j;e[36]!==d||e[37]!==p||e[38]!==D||e[39]!==k||e[40]!==y?(j=s.jsxs(d,{className:D,align:k,children:[y,p]}),e[36]=d,e[37]=p,e[38]=D,e[39]=k,e[40]=y,e[41]=j):j=e[41];let I;return e[42]!==o||e[43]!==g||e[44]!==j||e[45]!==C||e[46]!==b?(I=s.jsxs(o,{open:C,onOpenChange:b,children:[g,j]}),e[42]=o,e[43]=g,e[44]=j,e[45]=C,e[46]=b,e[47]=I):I=e[47],I}function Je(){const t=L.c(61),e=Ke(),l=le(),i=Ue();let u;t[0]!==e?.ids?(u=e?.ids??[...ne],t[0]=e?.ids,t[1]=u):u=t[1];const a=u,[n,v]=U.useState(a);let _;t[2]!==n||t[3]!==a?(_=n.length!==a.length||n.some((E,T)=>E!==a[T]),t[2]=n,t[3]=a,t[4]=_):_=t[4];const S=_;let r;t[5]===Symbol.for("react.memo_cache_sentinel")?(r={activationConstraint:{distance:5}},t[5]=r):r=t[5];let d;t[6]===Symbol.for("react.memo_cache_sentinel")?(d={coordinateGetter:ke},t[6]=d):d=t[6];const o=ye(se(De,r),se(ze,d));let f;t[7]!==n?(f=E=>{const{active:T,over:R}=E;if(!R||T.id===R.id)return;const F=n.indexOf(T.id),G=n.indexOf(R.id);F===-1||G===-1||v(Ie([...n],F,G))},t[7]=n,t[8]=f):f=t[8];const m=f;let g;t[9]!==n?(g=E=>{n.includes(E)||v([...n,E])},t[9]=n,t[10]=g):g=t[10];const z=g;let x;t[11]!==n?(x=E=>{v(n.filter(T=>T!==E))},t[11]=n,t[12]=x):x=t[12];const h=x;let D;t[13]===Symbol.for("react.memo_cache_sentinel")?(D=()=>{v([...ne])},t[13]=D):D=t[13];const k=D;let y;t[14]!==n||t[15]!==i?(y=()=>{i.mutate({ids:n},{onSuccess:()=>{Y("default_home_agents_updated",{count:n.length,template_count:n.filter(Ze).length}),q.success("Default home agents updated")},onError:Xe})},t[14]=n,t[15]=i,t[16]=y):y=t[16];const C=y;let b,w,p,j,I,A,N;if(t[17]!==l||t[18]!==n||t[19]!==m||t[20]!==h||t[21]!==o||t[22]!==i.isPending){let E;t[30]!==l?(E=F=>We(F,ee,l),t[30]=l,t[31]=E):E=t[31];const T=n.map(E);p=Math.max(0,n.length-oe),w=X,I="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(pe,{size:14}),t[32]=R):R=t[32],t[33]!==i.isPending?(A=s.jsxs(K,{type:"button",variant:"ghost",size:"sm",onClick:k,disabled:i.isPending,children:[R,"Reset defaults"]}),t[33]=i.isPending,t[34]=A):A=t[34],b=Z,N="px-5 py-5 flex flex-col gap-3",j=T.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-border p-6 text-center text-xs text-muted-foreground",children:'No agents selected. The home view will only show "Create agent".'}):s.jsx(Ne,{sensors:o,collisionDetection:Ce,onDragEnd:m,children:s.jsx(we,{items:n,strategy:_e,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map((F,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===oe&&s.jsxs("div",{className:"flex items-center gap-2 px-1 py-1 text-xs text-muted-foreground",children:[s.jsx("div",{className:"flex-1 h-px bg-border"}),s.jsx("span",{children:"Below this line is hidden on the home view"}),s.jsx("div",{className:"flex-1 h-px bg-border"})]}),s.jsx(Qe,{agent:F,onRemove:()=>h(F.id)})]},F.id))})})}),t[17]=l,t[18]=n,t[19]=m,t[20]=h,t[21]=o,t[22]=i.isPending,t[23]=b,t[24]=w,t[25]=p,t[26]=j,t[27]=I,t[28]=A,t[29]=N}else b=t[23],w=t[24],p=t[25],j=t[26],I=t[27],A=t[28],N=t[29];let P;t[35]!==n||t[36]!==z?(P=s.jsx(Ye,{selectedIds:n,onAdd:z}),t[35]=n,t[36]=z,t[37]=P):P=t[37];let O;t[38]!==p?(O=p>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[p," agent",p===1?"":"s"," won't fit on the home view"]}),t[38]=p,t[39]=O):O=t[39];let c;t[40]!==P||t[41]!==O?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[P,O]}),t[40]=P,t[41]=O,t[42]=c):c=t[42];let $;t[43]!==j||t[44]!==c||t[45]!==N?($=s.jsxs("div",{className:N,children:[j,c]}),t[43]=j,t[44]=c,t[45]=N,t[46]=$):$=t[46];let M;t[47]!==C||t[48]!==a||t[49]!==S||t[50]!==i.isPending?(M=S&&s.jsxs(ie,{children:[s.jsx(K,{type:"button",variant:"outline",onClick:()=>v(a),disabled:i.isPending,children:"Cancel"}),s.jsx(K,{type:"button",onClick:C,disabled:i.isPending,children:i.isPending?"Saving…":"Save"})]}),t[47]=C,t[48]=a,t[49]=S,t[50]=i.isPending,t[51]=M):M=t[51];let H;t[52]!==b||t[53]!==$||t[54]!==M?(H=s.jsxs(b,{children:[$,M]}),t[52]=b,t[53]=$,t[54]=M,t[55]=H):H=t[55];let B;return t[56]!==w||t[57]!==I||t[58]!==A||t[59]!==H?(B=s.jsx(w,{title:I,actions:A,children:H}),t[56]=w,t[57]=I,t[58]=A,t[59]=H,t[60]=B):B=t[60],B}function Xe(t){q.error(t instanceof Error?t.message:"Failed to update default home agents")}function Ze(t){return ee.some(e=>e.id===t)}function et(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(X,{title:"Default home agents",children:s.jsx(Z,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(tt)})})}),t[0]=e):e=t[0],e}function tt(t,e){return s.jsx(Le,{className:"h-12 w-full rounded-lg"},e)}function st(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U.Suspense,{fallback:s.jsx(et,{}),children:s.jsx(Je,{})}),t[0]=e):e=t[0],e}function nt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(V,{children:s.jsx(V.Content,{children:s.jsx(V.Body,{children:s.jsxs(ve,{children:[s.jsx(V.Title,{children:"Organization"}),s.jsx(Ve,{}),s.jsx(Se,{}),s.jsx(st,{})]})})})}),t[0]=e):e=t[0],e}function Zt(){const t=L.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(nt,{}),t[0]=e):e=t[0],e}export{Zt as default};