decocms 2.314.0 → 2.315.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/client/assets/{AlertCircle-7o1P0zzm.js → AlertCircle-DBo9AAMH.js} +1 -1
  2. package/dist/client/assets/{Archive-DSPPL-j9.js → Archive-DmnBOtki.js} +1 -1
  3. package/dist/client/assets/{ArrowNarrowLeft-qDflnb8N.js → ArrowNarrowLeft-deV6RKN9.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-C3mm8yK_.js → ArrowUpRight-CyleC_fI.js} +1 -1
  5. package/dist/client/assets/{Check-Dz5ZLQmL.js → Check-CWMsutx6.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-A2guVcAG.js → CheckCircle-CtqrLFo6.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-Bau6LlOi.js → ChevronDown-DBDCamK8.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-ChQ95U2k.js → ChevronRight-D0Db_yfd.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-COL031vn.js → ChevronUp-Dx3CWQDk.js} +1 -1
  10. package/dist/client/assets/{Container-BcMn23kd.js → Container-RAn51RkG.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-CII1YBBc.js → DotsVertical-D9jz1TQ0.js} +1 -1
  12. package/dist/client/assets/{LayoutLeft-BCU3zX1U.js → LayoutLeft-Bz-byvkb.js} +1 -1
  13. package/dist/client/assets/{LinkExternal01-oqIx4SAa.js → LinkExternal01-C0Smk2lu.js} +1 -1
  14. package/dist/client/assets/{Lock01-CJ14jIMg.js → Lock01-IggrtR3m.js} +1 -1
  15. package/dist/client/assets/{Palette-g_FAi23c.js → Palette-Cg9Tm5aJ.js} +1 -1
  16. package/dist/client/assets/{Play-BZl-q_yI.js → Play-DW0LITiR.js} +1 -1
  17. package/dist/client/assets/{Plus-CKCuUTsd.js → Plus-Dhbk7Oxt.js} +1 -1
  18. package/dist/client/assets/{RefreshCcw01-8Ibm16Pu.js → RefreshCcw01-CIoWX0oI.js} +1 -1
  19. package/dist/client/assets/{SearchMd-AJN6VuJg.js → SearchMd-1jGzATDG.js} +1 -1
  20. package/dist/client/assets/{Settings02-CDcaxP04.js → Settings02-DRIFxfHn.js} +1 -1
  21. package/dist/client/assets/{Shield01-D1Hywoy5.js → Shield01-5EtEh1c3.js} +1 -1
  22. package/dist/client/assets/{Star01-BcHjnr98.js → Star01-B3h6tOF6.js} +1 -1
  23. package/dist/client/assets/{Sun-hliFotLP.js → Sun-CkFgevjR.js} +1 -1
  24. package/dist/client/assets/{Tool01-bqF4BUeR.js → Tool01-D-ahtGaO.js} +1 -1
  25. package/dist/client/assets/{Trash01-BqVS-Vu_.js → Trash01-BERBzkhG.js} +1 -1
  26. package/dist/client/assets/{User01-B9MhRcqZ.js → User01-DHE4nBvX.js} +1 -1
  27. package/dist/client/assets/{Users03-oWGgz1_B.js → Users03-Cy-1ZCAV.js} +1 -1
  28. package/dist/client/assets/{X-Bs68LwBc.js → X-C1OoauoK.js} +1 -1
  29. package/dist/client/assets/{XCircle-H0Nc2jh5.js → XCircle-pEn9ROt8.js} +1 -1
  30. package/dist/client/assets/{XClose-Cilpzhqm.js → XClose-DzM42Vw-.js} +1 -1
  31. package/dist/client/assets/{Zap-DhYtqMa9.js → Zap-BNWDUN_3.js} +1 -1
  32. package/dist/client/assets/{ZapSquare-BmqW5YQ-.js → ZapSquare-D1rioSCt.js} +1 -1
  33. package/dist/client/assets/{accordion-CfzkzHFA.js → accordion-pCBdHp9x.js} +1 -1
  34. package/dist/client/assets/{agent-icon-kpWVPj85.js → agent-icon-uifQLn7r.js} +1 -1
  35. package/dist/client/assets/{agents-list-GApGpFoC.js → agents-list-BdIIZeGh.js} +1 -1
  36. package/dist/client/assets/ai-providers-Bhh9Y6Dv.js +1 -0
  37. package/dist/client/assets/{alert-dialog-DS13tR4C.js → alert-dialog-BkIzeg-f.js} +1 -1
  38. package/dist/client/assets/{auth-catchall-qIi1Yg3W.js → auth-catchall-Dk7BbFKA.js} +1 -1
  39. package/dist/client/assets/{automation-list-row-B5q6RXF7.js → automation-list-row-Bvgyi-LF.js} +1 -1
  40. package/dist/client/assets/{automations-C6LU_2_K.js → automations-CY-zZERQ.js} +1 -1
  41. package/dist/client/assets/{avatar-CmUFzi3F.js → avatar-Cz46we3J.js} +1 -1
  42. package/dist/client/assets/{badge-DTxL6xUH.js → badge-DlK7sduG.js} +1 -1
  43. package/dist/client/assets/{brand-context-CTWUekUV.js → brand-context-jzzqwWBQ.js} +1 -1
  44. package/dist/client/assets/{card-D-Cbo6xY.js → card-2xC00NeJ.js} +1 -1
  45. package/dist/client/assets/{chat-context-CdZvecT8.js → chat-context-ByfbtfrN.js} +1 -1
  46. package/dist/client/assets/{checkbox-DMz97A6W.js → checkbox-DsgKhADc.js} +1 -1
  47. package/dist/client/assets/{collection-detail-BfdHOcH7.js → collection-detail-C56pcSau.js} +1 -1
  48. package/dist/client/assets/{collection-display-button-CbYIYYup.js → collection-display-button-CI5u7nQD.js} +1 -1
  49. package/dist/client/assets/{collection-search-B43ATSBX.js → collection-search-NHcUUFC9.js} +1 -1
  50. package/dist/client/assets/{collection-search-DcN3WCBc.js → collection-search-yy57Ug8m.js} +1 -1
  51. package/dist/client/assets/{collection-table-wrapper-ChYShKZS.js → collection-table-wrapper-qcm_l5Ey.js} +1 -1
  52. package/dist/client/assets/{collection-tabs-BygOMFvP.js → collection-tabs-CXdaxoaN.js} +1 -1
  53. package/dist/client/assets/{collections-BxKz1gM7.js → collections-Cjw9obtS.js} +1 -1
  54. package/dist/client/assets/{command-Bkkhvz88.js → command-DRyumRWB.js} +1 -1
  55. package/dist/client/assets/{connection-card-DwuPCVad.js → connection-card-Dk55kTl8.js} +1 -1
  56. package/dist/client/assets/{connection-detail-CrK0sm-c.js → connection-detail-DUP91Ojg.js} +1 -1
  57. package/dist/client/assets/{connection-form-helpers-Zh2UA8De.js → connection-form-helpers-CyAEGoC0.js} +1 -1
  58. package/dist/client/assets/{connections-DjYU3SLo.js → connections-BOqrnzGe.js} +1 -1
  59. package/dist/client/assets/{constants-ZaDhARcT.js → constants-BayN-yld.js} +1 -1
  60. package/dist/client/assets/{constants-Pxhsjio1.js → constants-DB87On7u.js} +1 -1
  61. package/dist/client/assets/{dialog-C_Z_peKj.js → dialog-DwOIY1UM.js} +1 -1
  62. package/dist/client/assets/{domain-settings-9OZffLbB.js → domain-settings-15c_0wEz.js} +1 -1
  63. package/dist/client/assets/{drawer-Zoq78wzr.js → drawer-C_2I8f4S.js} +1 -1
  64. package/dist/client/assets/{dropdown-menu-D2TItq8w.js → dropdown-menu-CjlIX0cw.js} +1 -1
  65. package/dist/client/assets/{dynamic-plugin-layout-BNQeiFD-.js → dynamic-plugin-layout-DYFXKOHu.js} +1 -1
  66. package/dist/client/assets/{empty-state-Nd37WS0U.js → empty-state-BBQwipf0.js} +1 -1
  67. package/dist/client/assets/{empty-state-DmNyyTs_.js → empty-state-CJUpyycw.js} +1 -1
  68. package/dist/client/assets/{extract-connection-data-BrLjI2XN.js → extract-connection-data-CXWvMJKK.js} +1 -1
  69. package/dist/client/assets/{features-BMBXNzKR.js → features-B2B8fUD_.js} +1 -1
  70. package/dist/client/assets/{form-CHyUU2aZ.js → form-DuX6xbr5.js} +1 -1
  71. package/dist/client/assets/{general-BmNgsifZ.js → general-B3K7KcXe.js} +1 -1
  72. package/dist/client/assets/{index-4JTQs1c6.js → index-5CBkac_m.js} +1 -1
  73. package/dist/client/assets/{index-DNKOi0uM.js → index-BSQ56kKS.js} +1 -1
  74. package/dist/client/assets/{index-CzeuUc9U.css → index-Bo94M6wo.css} +1 -1
  75. package/dist/client/assets/{index-CKMzeZJu.js → index-Bs9l9sgs.js} +1 -1
  76. package/dist/client/assets/{index-DlEamKDn.js → index-C1tCttKh.js} +1 -1
  77. package/dist/client/assets/{index-IoVTnIlz.js → index-COMOhhst.js} +1 -1
  78. package/dist/client/assets/{index-LSlqVMbE.js → index-CodtVFa8.js} +1 -1
  79. package/dist/client/assets/{index-CNLaZeow.js → index-CpI01aVT.js} +1 -1
  80. package/dist/client/assets/{index-Br-Caa-t.js → index-CsD6nKsw.js} +3 -3
  81. package/dist/client/assets/{index-DILJMZJ-.js → index-D4K9PTQn.js} +1 -1
  82. package/dist/client/assets/{index-C677F7dG.js → index-DGUC54zs.js} +1 -1
  83. package/dist/client/assets/{index-CSmi-vs_.js → index-DOcAAsz8.js} +1 -1
  84. package/dist/client/assets/{index-lom4XGsv.js → index-DnB8sRlu.js} +1 -1
  85. package/dist/client/assets/{index-Ci4MsFGg.js → index-DyvHytn-.js} +1 -1
  86. package/dist/client/assets/{index-C98EzEx6.js → index-KerpDg0f.js} +1 -1
  87. package/dist/client/assets/{index-C_yGpzc7.js → index-iV247muO.js} +1 -1
  88. package/dist/client/assets/{index-DTTgUjL4.js → index-z6P4iLmn.js} +2 -2
  89. package/dist/client/assets/{infiniteQueryObserver-B091eeMg.js → infiniteQueryObserver-DG4oU5QG.js} +1 -1
  90. package/dist/client/assets/{input-CjWKkTcV.js → input-DDq-8B8D.js} +1 -1
  91. package/dist/client/assets/{integration-icon-Daxcsp7E.js → integration-icon-nAICH2vf.js} +1 -1
  92. package/dist/client/assets/{label-CuUYxm88.js → label-Bkzo9n9W.js} +1 -1
  93. package/dist/client/assets/{layout-BeSp3Oh9.js → layout-hGgp6KcA.js} +1 -1
  94. package/dist/client/assets/{lean-canvas-recruit-modal-CwFVPVmY.js → lean-canvas-recruit-modal-Caab3ket.js} +1 -1
  95. package/dist/client/assets/{login-B9iFfUWB.js → login-DrUu9CAR.js} +1 -1
  96. package/dist/client/assets/{members-jW5-cfkB.js → members-B4BgapXa.js} +1 -1
  97. package/dist/client/assets/{monaco-editor-D_4gsArT.js → monaco-editor-Cf3iDvFI.js} +1 -1
  98. package/dist/client/assets/{monitoring-stats-row-Cd380L7N.js → monitoring-stats-row-BKSo1B8N.js} +1 -1
  99. package/dist/client/assets/{oauth-callback-BIIrmyR_.js → oauth-callback-C4APhxln.js} +1 -1
  100. package/dist/client/assets/{oauth-callback-ai-provider-Ct3x9lXY.js → oauth-callback-ai-provider-DqU9borq.js} +1 -1
  101. package/dist/client/assets/{onboarding-P0GSgrOf.js → onboarding-CWGzEGrE.js} +1 -1
  102. package/dist/client/assets/{org-layout-BJJDusCD.js → org-layout-CH2BSz6a.js} +1 -1
  103. package/dist/client/assets/{org-plugin-layout-Ds6qy0vM.js → org-plugin-layout-BoB21QNL.js} +1 -1
  104. package/dist/client/assets/{pair-BFx5Qm41.js → pair-CsA-kA9X.js} +1 -1
  105. package/dist/client/assets/{plugin-empty-state-RSWe6UFb.js → plugin-empty-state-BQLMlF6o.js} +1 -1
  106. package/dist/client/assets/{plugin-header-CZW0YM31.js → plugin-header-DSRM-4yQ.js} +1 -1
  107. package/dist/client/assets/{plugin-layout-CKQPXqV_.js → plugin-layout-0l5aE9yu.js} +1 -1
  108. package/dist/client/assets/{popover-BsaIAZff.js → popover-D1LgcRgW.js} +1 -1
  109. package/dist/client/assets/{profile-DZGaisjJ.js → profile-_LtgicDY.js} +1 -1
  110. package/dist/client/assets/{project-app-view-DrCNkPvv.js → project-app-view-DCmHXwRc.js} +1 -1
  111. package/dist/client/assets/registry-Cg9k50mz.js +2 -0
  112. package/dist/client/assets/{registry-layout-BRdqsUee.js → registry-layout-D1Oo5n4g.js} +1 -1
  113. package/dist/client/assets/{required-auth-layout-d6mCY6f7.js → required-auth-layout-_LlHFgAQ.js} +1 -1
  114. package/dist/client/assets/{reset-password-BJIcH7kI.js → reset-password-BH07s9g0.js} +1 -1
  115. package/dist/client/assets/{roles--r_o8-6E.js → roles-BweIAPZg.js} +1 -1
  116. package/dist/client/assets/{scroll-area-QdubrRQt.js → scroll-area-DRfh3y2I.js} +1 -1
  117. package/dist/client/assets/{search-input-DQThAugc.js → search-input-LHp6WbZ8.js} +1 -1
  118. package/dist/client/assets/{select-Bc7FbSIp.js → select-DEYcF0JB.js} +1 -1
  119. package/dist/client/assets/select-model-BbmvZEL_.js +4 -0
  120. package/dist/client/assets/{settings-layout-BELegTve.js → settings-layout-Dg-MbJa4.js} +1 -1
  121. package/dist/client/assets/{settings-section-9_iK7u6X.js → settings-section-CnKm_zFi.js} +1 -1
  122. package/dist/client/assets/{shell-layout-Dp5_NwRV.js → shell-layout-BrapIdet.js} +1 -1
  123. package/dist/client/assets/{sidebar-DhPirxvV.js → sidebar-B9xBBJwp.js} +1 -1
  124. package/dist/client/assets/{skeleton-eCg5poGw.js → skeleton-BAst9SOO.js} +1 -1
  125. package/dist/client/assets/{spinner-Dxocm3j_.js → spinner-rKXgQqAk.js} +1 -1
  126. package/dist/client/assets/{sso-B4IKwnqS.js → sso-DW-lKH8S.js} +1 -1
  127. package/dist/client/assets/{store-DaysWhlR.js → store-ChsblA-_.js} +1 -1
  128. package/dist/client/assets/store-registry-DgSs_75r.js +2 -0
  129. package/dist/client/assets/{switch-B8o7MEY9.js → switch-CxAZv9yX.js} +1 -1
  130. package/dist/client/assets/{table-DYiQpBVl.js → table-BN6PHtUf.js} +1 -1
  131. package/dist/client/assets/{tabs-BCMGnbuG.js → tabs-DiNALrC0.js} +1 -1
  132. package/dist/client/assets/{task-status-C_2rdQW8.js → task-status-Bu4uKZob.js} +1 -1
  133. package/dist/client/assets/{textarea-C8ZFrqCw.js → textarea-CaaYBEq5.js} +1 -1
  134. package/dist/client/assets/{toggle-group-C-cIsKer.js → toggle-group-CLzH7VcU.js} +1 -1
  135. package/dist/client/assets/{tools-list-KDjJD9bB.js → tools-list-Bb9DL4-R.js} +1 -1
  136. package/dist/client/assets/{tooltip-3OBm7oI6.js → tooltip-Bw2Gbk6i.js} +1 -1
  137. package/dist/client/assets/{types-D4WcWxjq.js → types-BDSwKXoZ.js} +1 -1
  138. package/dist/client/assets/{use-ai-providers-DvE8tTc0.js → use-ai-providers-dNlKFItH.js} +1 -1
  139. package/dist/client/assets/{use-collections-B_AeR68F.js → use-collections-DwzrzR7x.js} +1 -1
  140. package/dist/client/assets/{use-connection-fL8Bdy-2.js → use-connection-Cs4MqZHR.js} +1 -1
  141. package/dist/client/assets/{use-copy-BH9cfEYN.js → use-copy-D_36SjQe.js} +1 -1
  142. package/dist/client/assets/{use-create-virtual-mcp-vUi8t55-.js → use-create-virtual-mcp-DklejMow.js} +1 -1
  143. package/dist/client/assets/{use-debounced-autosave-IcGCZv-N.js → use-debounced-autosave-ePDNWMLl.js} +1 -1
  144. package/dist/client/assets/{use-decopilot-events-1cGHr_e6.js → use-decopilot-events-BSdLD1zv.js} +1 -1
  145. package/dist/client/assets/{use-delete-connection-an2fbIpK.js → use-delete-connection-CnJi1BUf.js} +1 -1
  146. package/dist/client/assets/{use-infinite-scroll-BLSqYlPF.js → use-infinite-scroll-BsRyX00I.js} +1 -1
  147. package/dist/client/assets/{use-list-state-aza5fd_3.js → use-list-state-qXvm0Rn6.js} +1 -1
  148. package/dist/client/assets/{use-mcp-tools-B4pwuY-v.js → use-mcp-tools-Bdf0_v40.js} +1 -1
  149. package/dist/client/assets/{use-members-B1BsOSEO.js → use-members-Dy9f9-ET.js} +1 -1
  150. package/dist/client/assets/{use-navigate-to-agent-B-DziSLT.js → use-navigate-to-agent-_FHkP3HP.js} +1 -1
  151. package/dist/client/assets/{use-org-auth-client-CQ4fKhJD.js → use-org-auth-client-Cyg62sX1.js} +1 -1
  152. package/dist/client/assets/{use-org-sso-DLgTKJXm.js → use-org-sso-D9MJvQ_s.js} +1 -1
  153. package/dist/client/assets/{use-organization-roles-CnVpqv0t.js → use-organization-roles-DtglihXA.js} +1 -1
  154. package/dist/client/assets/{use-organization-settings-F4a6zVGw.js → use-organization-settings-oGq90ndm.js} +1 -1
  155. package/dist/client/assets/{use-registry-connections-Dqv2-jKJ.js → use-registry-connections-BM5hIh0Z.js} +1 -1
  156. package/dist/client/assets/{use-status-sounds-u8Owkhk7.js → use-status-sounds-D_payzk4.js} +1 -1
  157. package/dist/client/assets/{use-tasks-C1EcT2Me.js → use-tasks-DjLQLna-.js} +1 -1
  158. package/dist/client/assets/{use-view-mode-DRlYzhbj.js → use-view-mode-BOjU5oCn.js} +1 -1
  159. package/dist/client/assets/{use-virtual-mcp-CjWnWBVR.js → use-virtual-mcp-D0R2VmhD.js} +1 -1
  160. package/dist/client/assets/useInfiniteQuery-Dssa7ddx.js +1 -0
  161. package/dist/client/assets/useSuspenseInfiniteQuery-g1_E19Vj.js +1 -0
  162. package/dist/client/assets/{user-BO8smULi.js → user-DR-uev4E.js} +1 -1
  163. package/dist/client/assets/{view-mode-toggle-0NgrTiKE.js → view-mode-toggle-87gK3y50.js} +1 -1
  164. package/dist/client/assets/{workflow-j8cOJEmO.js → workflow-CHq9DO6y.js} +1 -1
  165. package/dist/client/assets/workflow-detail-CoEWiVrM.js +1 -0
  166. package/dist/client/index.html +2 -2
  167. package/dist/server/cli.js +1 -1
  168. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  169. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  170. package/dist/server/node_modules/ansi-styles/license +9 -0
  171. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  172. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  173. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  174. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  175. package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
  176. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  177. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  178. package/dist/server/node_modules/xtend/.jshintrc +30 -0
  179. package/dist/server/node_modules/{postgres-array/license → xtend/LICENSE} +1 -2
  180. package/dist/server/node_modules/xtend/README.md +32 -0
  181. package/dist/server/node_modules/xtend/immutable.js +19 -0
  182. package/dist/server/node_modules/xtend/mutable.js +17 -0
  183. package/dist/server/node_modules/xtend/package.json +55 -0
  184. package/dist/server/node_modules/xtend/test.js +103 -0
  185. package/package.json +1 -1
  186. package/dist/client/assets/ai-providers-BUwxJWPA.js +0 -1
  187. package/dist/client/assets/registry-ckfqFSXi.js +0 -2
  188. package/dist/client/assets/select-model-wWpcRuqG.js +0 -4
  189. package/dist/client/assets/store-registry-Cy1BNsop.js +0 -2
  190. package/dist/client/assets/useInfiniteQuery-fBvMjRX2.js +0 -1
  191. package/dist/client/assets/useSuspenseInfiniteQuery-B0lprudQ.js +0 -1
  192. package/dist/client/assets/workflow-detail-D1bP-LWr.js +0 -1
  193. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  194. package/dist/server/node_modules/pg-int8/README.md +0 -16
  195. package/dist/server/node_modules/pg-int8/index.js +0 -100
  196. package/dist/server/node_modules/pg-int8/package.json +0 -24
  197. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  198. package/dist/server/node_modules/postgres-array/index.js +0 -97
  199. package/dist/server/node_modules/postgres-array/package.json +0 -35
  200. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  201. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  202. package/dist/server/node_modules/postgres-bytea/license +0 -21
  203. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  204. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  205. package/dist/server/node_modules/postgres-date/index.js +0 -116
  206. package/dist/server/node_modules/postgres-date/license +0 -21
  207. package/dist/server/node_modules/postgres-date/package.json +0 -33
  208. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  209. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  210. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  211. package/dist/server/node_modules/postgres-interval/license +0 -21
  212. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  213. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  214. package/dist/server/node_modules/split2/LICENSE +0 -13
  215. package/dist/server/node_modules/split2/README.md +0 -85
  216. package/dist/server/node_modules/split2/bench.js +0 -27
  217. package/dist/server/node_modules/split2/index.js +0 -141
  218. package/dist/server/node_modules/split2/package.json +0 -39
  219. package/dist/server/node_modules/split2/test.js +0 -409
@@ -1 +1 @@
1
- import{e as b,s as k,o as E,bL as P,j as i,X as K,aF as _,K as S,x as q}from"./index-DTTgUjL4.js";import{P as x}from"./index-IoVTnIlz.js";import{d as F}from"./use-organization-settings-F4a6zVGw.js";import{S as I}from"./switch-B8o7MEY9.js";import{n as Q}from"./Container-BcMn23kd.js";import{b as R,S as w,a as z,d as N}from"./settings-section-9_iK7u6X.js";import"./sidebar-DhPirxvV.js";import"./LayoutLeft-BCU3zX1U.js";import"./tooltip-3OBm7oI6.js";import"./X-Bs68LwBc.js";import"./constants-Pxhsjio1.js";import"./card-D-Cbo6xY.js";import"./ArrowUpRight-C3mm8yK_.js";function T(){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=F();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:D})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=A,C=$;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(R,{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(Q,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(I,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:U})},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(w,{children:i.jsx(z,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function U(e){return e.stopPropagation()}function $(e){return P.find(s=>s.id===e)?.description??null}function A(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 D(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function L(){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(N,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(T,{})]})})})}),e[0]=t):t=e[0],t}function ne(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(L,{}),e[0]=t):t=e[0],t}export{ne as default};
1
+ import{e as b,s as k,o as E,bL as P,j as i,X as K,aF as _,K as S,x as q}from"./index-z6P4iLmn.js";import{P as x}from"./index-COMOhhst.js";import{d as F}from"./use-organization-settings-oGq90ndm.js";import{S as I}from"./switch-CxAZv9yX.js";import{n as Q}from"./Container-RAn51RkG.js";import{b as R,S as w,a as z,d as N}from"./settings-section-CnKm_zFi.js";import"./sidebar-B9xBBJwp.js";import"./LayoutLeft-Bz-byvkb.js";import"./tooltip-Bw2Gbk6i.js";import"./X-C1OoauoK.js";import"./constants-DB87On7u.js";import"./card-2xC00NeJ.js";import"./ArrowUpRight-CyleC_fI.js";function T(){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=F();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:D})},e[6]=j,e[7]=l,e[8]=c,e[9]=g):g=e[9];const p=g,y=A,C=$;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(R,{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(Q,{size:14})}),onClick:()=>!l.isPending&&p(n.id,!h),action:i.jsx(I,{checked:h,onCheckedChange:v=>p(n.id,v),disabled:l.isPending,onClick:U})},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(w,{children:i.jsx(z,{children:a})}),e[15]=a,e[16]=f):f=e[16],f}function U(e){return e.stopPropagation()}function $(e){return P.find(s=>s.id===e)?.description??null}function A(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 D(e){q.error("Failed to update plugin: "+(e instanceof Error?e.message:"Unknown error"))}function L(){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(N,{children:[i.jsx(x.Title,{children:"Plugins"}),i.jsx(T,{})]})})})}),e[0]=t):t=e[0],t}function ne(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(L,{}),e[0]=t):t=e[0],t}export{ne as default};
@@ -1 +1 @@
1
- import{bV as C,e as f,j as c,C as b,r as d,c as p,aX as j,bW as v,bX as h}from"./index-DTTgUjL4.js";import{L as N}from"./label-CuUYxm88.js";const E=C,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(b,{...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{bV as C,e as f,j as c,C as b,r as d,c as p,aX as j,bW as v,bX as h}from"./index-z6P4iLmn.js";import{L as N}from"./label-Bkzo9n9W.js";const E=C,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(b,{...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 ae,s as re,o as ce,z as fe,D as xe,a as de,t as W,x as M,K as Y,j as s,C as se,H as pe,J as X,e as F,r as K,B as H,c as he,M as je,R as ne}from"./index-DTTgUjL4.js";import{P as U}from"./index-IoVTnIlz.js";import{u as ve}from"./use-org-auth-client-CQ4fKhJD.js";import{u as be}from"./use-debounced-autosave-IcGCZv-N.js";import{A as ye}from"./avatar-CmUFzi3F.js";import{I as me}from"./input-CjWKkTcV.js";import{S as Z,a as J,b as Q,c as Se,d as Ce}from"./settings-section-9_iK7u6X.js";import{D as Ne}from"./domain-settings-9OZffLbB.js";import{u as _e,a as oe,D as De,c as ze,S as Ae,v as we,K as Pe,P as Oe,d as Ee,C as Ie,s as ke,b as Te,e as Fe}from"./collection-search-DcN3WCBc.js";import{W as te,i as Le,S as Re,u as $e}from"./constants-Pxhsjio1.js";import{b as ue}from"./use-virtual-mcp-CjWnWBVR.js";import{b as Me,P as Ke,a as qe}from"./popover-BsaIAZff.js";import{S as Be}from"./skeleton-eCg5poGw.js";import{y as He}from"./agent-icon-kpWVPj85.js";import{s as Ve}from"./Plus-CKCuUTsd.js";import{a as ge}from"./Users03-oWGgz1_B.js";import{i as Ge}from"./X-Bs68LwBc.js";import{I as ee}from"./integration-icon-Daxcsp7E.js";import{u as Ue,c as Qe}from"./use-organization-settings-F4a6zVGw.js";import{c as We,b as Ye,d as Ze,f as Je,e as Xe,g as et,a as tt,A as st}from"./alert-dialog-DS13tR4C.js";import"./sidebar-DhPirxvV.js";import"./LayoutLeft-BCU3zX1U.js";import"./tooltip-3OBm7oI6.js";import"./User01-B9MhRcqZ.js";import"./card-D-Cbo6xY.js";import"./ArrowUpRight-C3mm8yK_.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-B8o7MEY9.js";import"./SearchMd-AJN6VuJg.js";import"./use-collections-B_AeR68F.js";import"./AlertCircle-7o1P0zzm.js";import"./Tool01-bqF4BUeR.js";import"./Archive-DSPPL-j9.js";import"./XClose-Cilpzhqm.js";import"./RefreshCcw01-8Ibm16Pu.js";import"./ArrowNarrowLeft-qDflnb8N.js";import"./XCircle-H0Nc2jh5.js";import"./ZapSquare-BmqW5YQ-.js";import"./CheckCircle-A2guVcAG.js";import"./Check-Dz5ZLQmL.js";import"./ChevronDown-Bau6LlOi.js";import"./ChevronRight-ChQ95U2k.js";import"./ChevronUp-COL031vn.js";import"./DotsVertical-CII1YBBc.js";import"./Container-BcMn23kd.js";import"./Star01-BcHjnr98.js";import"./Palette-g_FAi23c.js";import"./LinkExternal01-oqIx4SAa.js";import"./Lock01-CJ14jIMg.js";import"./Sun-hliFotLP.js";import"./Play-BZl-q_yI.js";import"./Settings02-CDcaxP04.js";import"./Shield01-D1Hywoy5.js";import"./Trash01-BqVS-Vu_.js";import"./Zap-DhYtqMa9.js";const nt=pe({name:X().min(1,"Name is required").max(255,"Name is too long"),slug:X().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:X().optional()});function ot(t){const e=F.c(13),{value:r,onChange:l,name:a,disabled:u}=t,n=K.useRef(null);let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=()=>n.current?.click(),e[0]=S):S=e[0];const g=S;let C;e[1]!==l?(C=P=>{const p=P.target.files?.[0];if(!p)return;if(p.size>2097152){M.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=it,h.onloadend=()=>{h.result&&l(h.result),n.current&&(n.current.value="")},h.readAsDataURL(p)},e[1]=l,e[2]=C):C=e[2];const o=C;let i;e[3]!==u||e[4]!==o?(i=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:u}),e[3]=u,e[4]=o,e[5]=i):i=e[5];const d=r||void 0,m=a??"?";let f;e[6]!==d||e[7]!==m?(f=s.jsx(ye,{url:d,fallback:m,shape:"square",size:"base"}),e[6]=d,e[7]=m,e[8]=f):f=e[8];let x;return e[9]!==u||e[10]!==i||e[11]!==f?(x=s.jsxs("button",{type:"button",onClick:g,disabled:u,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[i,f]}),e[9]=u,e[10]=i,e[11]=f,e[12]=x):x=e[12],x}function it(){return M.error("Failed to read image")}function lt(){const t=ae(),{org:e}=re(),r=ve(),l=ce(),a=fe({resolver:xe(nt),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),u=de({mutationFn:async o=>{const i={name:o.name,slug:o.slug};o.logo&&(i.logo=o.logo);const d=await r.organization.update({data:i});if(d?.error)throw new Error(d.error.message||"Failed to update organization");return d},onSuccess:(o,i)=>{W("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i)}),l.invalidateQueries({queryKey:Y.organizations()}),l.invalidateQueries({queryKey:Y.activeOrganization(e.slug)}),M.success("Organization updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:(o,i)=>{W("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i),error:o instanceof Error?o.message:String(o)}),M.error(o instanceof Error?o.message:"Failed to update organization")}}),{schedule:n,flush:S}=be({save:async()=>{const o=a.control._formState.dirtyFields;if(Object.keys(o).length===0||!await a.trigger())return;const d=a.getValues(),m=a.control._defaultValues;a.reset(d,{keepValues:!0});try{await u.mutateAsync(d)}catch{a.reset(m,{keepValues:!0})}}}),g=a.formState.errors,C=typeof window<"u"?`${window.location.host}/`:"";return s.jsx(Z,{children:s.jsxs(J,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(ot,{value:a.watch("logo"),onChange:o=>{a.setValue("logo",o??"",{shouldDirty:!0}),S()},name:a.watch("name")})}),s.jsx(Q,{title:"Name",action:s.jsx(se,{control:a.control,name:"name",render:({field:o})=>s.jsx(me,{id:"org-name",...o,onChange:i=>{o.onChange(i),n()},onBlur:()=>{o.onBlur(),S()},placeholder:"Organization name",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:[C&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:C}),s.jsx(se,{control:a.control,name:"slug",render:({field:o})=>s.jsx("input",{id:"org-slug",value:o.value??"",name:o.name,ref:o.ref,placeholder:"my-organization",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:i=>{const d=i.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",d,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),n()},onBlur:()=>{o.onBlur(),S()}})})]})}),(g.name||g.slug||g.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[g.name&&s.jsx("p",{className:"text-xs text-destructive",children:g.name.message}),g.slug&&s.jsx("p",{className:"text-xs text-destructive",children:g.slug.message}),g.logo&&s.jsx("p",{className:"text-xs text-destructive",children:g.logo.message})]})]})})}const ie=["site-editor","site-diagnostics","ai-image","ai-research"],le=8;function at(t,e,r){const l=e.find(u=>u.id===t);if(l)return{id:l.id,title:l.title,icon:l.icon,kind:"template"};const a=r.find(u=>u.id===t);return a?{id:t,title:a.title,icon:a.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function rt(t){const e=F.c(39),{agent:r,onRemove:l}=t;let a;e[0]!==r.id?(a={id:r.id},e[0]=r.id,e[1]=a):a=e[1];const{attributes:u,listeners:n,setNodeRef:S,transform:g,transition:C,isDragging:o}=Ee(a);let i;e[2]!==g?(i=Ie.Transform.toString(g),e[2]=g,e[3]=i):i=e[3];const d=o?.5:void 0,m=o?100:void 0;let f;e[4]!==i||e[5]!==d||e[6]!==m||e[7]!==C?(f={transform:i,transition:C,opacity:d,zIndex:m},e[4]=i,e[5]=d,e[6]=m,e[7]=C,e[8]=f):f=e[8];const x=f,P=o&&"shadow-lg";let p;e[9]!==P?(p=he("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",P),e[9]=P,e[10]=p):p=e[10];const h=`Drag to reorder ${r.title}`;let z;e[11]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(He,{size:14}),e[11]=z):z=e[11];let E;e[12]!==u||e[13]!==n||e[14]!==h?(E=s.jsx("button",{type:"button",...u,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:z}),e[12]=u,e[13]=n,e[14]=h,e[15]=E):E=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ge,{size:14}),e[16]=v):v=e[16];let N;e[17]!==r.icon||e[18]!==r.title?(N=s.jsx(ee,{icon:r.icon,name:r.title,size:"xs",fallbackIcon:v}),e[17]=r.icon,e[18]=r.title,e[19]=N):N=e[19];let b;e[20]!==r.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:r.title}),e[20]=r.title,e[21]=b):b=e[21];const _=r.kind==="template"?"Template":r.kind==="custom"?"Custom agent":"Unavailable";let j;e[22]!==_?(j=s.jsx("span",{className:"text-xs text-muted-foreground",children:_}),e[22]=_,e[23]=j):j=e[23];let D;e[24]!==b||e[25]!==j?(D=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,j]}),e[24]=b,e[25]=j,e[26]=D):D=e[26];const w=`Remove ${r.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ge,{size:14}),e[27]=A):A=e[27];let y;e[28]!==l||e[29]!==w?(y=s.jsx("button",{type:"button",onClick:l,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":w,children:A}),e[28]=l,e[29]=w,e[30]=y):y=e[30];let O;return e[31]!==S||e[32]!==x||e[33]!==E||e[34]!==N||e[35]!==D||e[36]!==y||e[37]!==p?(O=s.jsxs("div",{ref:S,style:x,className:p,children:[E,N,D,y]}),e[31]=S,e[32]=x,e[33]=E,e[34]=N,e[35]=D,e[36]=y,e[37]=p,e[38]=O):O=e[38],O}function ct(t){const e=F.c(48),{selectedIds:r,onAdd:l}=t,[a,u]=K.useState(!1),[n,S]=K.useState(""),g=ue();let C;e[0]!==r?(C=new Set(r),e[0]=r,e[1]=C):C=e[1];const o=C;let i,d,m,f,x,P,p,h,z,E,v,N,b;if(e[2]!==g||e[3]!==l||e[4]!==a||e[5]!==n||e[6]!==o){const A=n.toLowerCase();f=te.filter(c=>!o.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let y;e[20]!==o?(y=c=>c.id!==null&&!Le(c.id)&&!o.has(c.id),e[20]=o,e[21]=y):y=e[21],m=g.filter(y).filter(c=>!n||c.title.toLowerCase().includes(A));let O;e[22]!==l?(O=c=>{l(c),u(!1),S("")},e[22]=l,e[23]=O):O=e[23];const I=O;d=Me,N=a,b=u,e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ke,{asChild:!0,children:s.jsxs(H,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Ve,{size:14}),"Add agent"]})}),e[24]=x):x=e[24],i=qe,z="w-[320px] p-0 overflow-hidden",E="start",e[25]!==n?(v=s.jsx(Fe,{value:n,onChange:S,placeholder:"Search agents..."}),e[25]=n,e[26]=v):v=e[26],P="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",p=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:"Templates"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>I(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ee,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=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:"Custom agents"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>I(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ee,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ge,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=g,e[3]=l,e[4]=a,e[5]=n,e[6]=o,e[7]=i,e[8]=d,e[9]=m,e[10]=f,e[11]=x,e[12]=P,e[13]=p,e[14]=h,e[15]=z,e[16]=E,e[17]=v,e[18]=N,e[19]=b}else i=e[7],d=e[8],m=e[9],f=e[10],x=e[11],P=e[12],p=e[13],h=e[14],z=e[15],E=e[16],v=e[17],N=e[18],b=e[19];let _;e[27]!==m||e[28]!==f.length||e[29]!==n?(_=f.length===0&&m.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]=m,e[28]=f.length,e[29]=n,e[30]=_):_=e[30];let j;e[31]!==_||e[32]!==P||e[33]!==p||e[34]!==h?(j=s.jsxs("div",{className:P,children:[p,h,_]}),e[31]=_,e[32]=P,e[33]=p,e[34]=h,e[35]=j):j=e[35];let D;e[36]!==i||e[37]!==j||e[38]!==z||e[39]!==E||e[40]!==v?(D=s.jsxs(i,{className:z,align:E,children:[v,j]}),e[36]=i,e[37]=j,e[38]=z,e[39]=E,e[40]=v,e[41]=D):D=e[41];let w;return e[42]!==d||e[43]!==x||e[44]!==D||e[45]!==N||e[46]!==b?(w=s.jsxs(d,{open:N,onOpenChange:b,children:[x,D]}),e[42]=d,e[43]=x,e[44]=D,e[45]=N,e[46]=b,e[47]=w):w=e[47],w}function dt(){const t=F.c(61),e=Ue(),r=ue(),l=Qe();let a;t[0]!==e?.ids?(a=e?.ids??[...ie],t[0]=e?.ids,t[1]=a):a=t[1];const u=a,[n,S]=K.useState(u);let g;t[2]!==n||t[3]!==u?(g=n.length!==u.length||n.some((k,T)=>k!==u[T]),t[2]=n,t[3]=u,t[4]=g):g=t[4];const C=g;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o={activationConstraint:{distance:5}},t[5]=o):o=t[5];let i;t[6]===Symbol.for("react.memo_cache_sentinel")?(i={coordinateGetter:ke},t[6]=i):i=t[6];const d=_e(oe(Oe,o),oe(Pe,i));let m;t[7]!==n?(m=k=>{const{active:T,over:R}=k;if(!R||T.id===R.id)return;const $=n.indexOf(T.id),G=n.indexOf(R.id);$===-1||G===-1||S(Te([...n],$,G))},t[7]=n,t[8]=m):m=t[8];const f=m;let x;t[9]!==n?(x=k=>{n.includes(k)||S([...n,k])},t[9]=n,t[10]=x):x=t[10];const P=x;let p;t[11]!==n?(p=k=>{S(n.filter(T=>T!==k))},t[11]=n,t[12]=p):p=t[12];const h=p;let z;t[13]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{S([...ie])},t[13]=z):z=t[13];const E=z;let v;t[14]!==n||t[15]!==l?(v=()=>{l.mutate({ids:n},{onSuccess:()=>{W("default_home_agents_updated",{count:n.length,template_count:n.filter(ut).length}),M.success("Default home agents updated")},onError:mt})},t[14]=n,t[15]=l,t[16]=v):v=t[16];const N=v;let b,_,j,D,w,A,y;if(t[17]!==r||t[18]!==n||t[19]!==f||t[20]!==h||t[21]!==d||t[22]!==l.isPending){let k;t[30]!==r?(k=$=>at($,te,r),t[30]=r,t[31]=k):k=t[31];const T=n.map(k);j=Math.max(0,n.length-le),_=Z,w="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(je,{size:14}),t[32]=R):R=t[32],t[33]!==l.isPending?(A=s.jsxs(H,{type:"button",variant:"ghost",size:"sm",onClick:E,disabled:l.isPending,children:[R,"Reset defaults"]}),t[33]=l.isPending,t[34]=A):A=t[34],b=J,y="px-5 py-5 flex flex-col gap-3",D=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(De,{sensors:d,collisionDetection:ze,onDragEnd:f,children:s.jsx(Ae,{items:n,strategy:we,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map(($,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===le&&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(rt,{agent:$,onRemove:()=>h($.id)})]},$.id))})})}),t[17]=r,t[18]=n,t[19]=f,t[20]=h,t[21]=d,t[22]=l.isPending,t[23]=b,t[24]=_,t[25]=j,t[26]=D,t[27]=w,t[28]=A,t[29]=y}else b=t[23],_=t[24],j=t[25],D=t[26],w=t[27],A=t[28],y=t[29];let O;t[35]!==n||t[36]!==P?(O=s.jsx(ct,{selectedIds:n,onAdd:P}),t[35]=n,t[36]=P,t[37]=O):O=t[37];let I;t[38]!==j?(I=j>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[j," agent",j===1?"":"s"," won't fit on the home view"]}),t[38]=j,t[39]=I):I=t[39];let c;t[40]!==O||t[41]!==I?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[O,I]}),t[40]=O,t[41]=I,t[42]=c):c=t[42];let L;t[43]!==D||t[44]!==c||t[45]!==y?(L=s.jsxs("div",{className:y,children:[D,c]}),t[43]=D,t[44]=c,t[45]=y,t[46]=L):L=t[46];let q;t[47]!==N||t[48]!==u||t[49]!==C||t[50]!==l.isPending?(q=C&&s.jsxs(Se,{children:[s.jsx(H,{type:"button",variant:"outline",onClick:()=>S(u),disabled:l.isPending,children:"Cancel"}),s.jsx(H,{type:"button",onClick:N,disabled:l.isPending,children:l.isPending?"Saving…":"Save"})]}),t[47]=N,t[48]=u,t[49]=C,t[50]=l.isPending,t[51]=q):q=t[51];let B;t[52]!==b||t[53]!==L||t[54]!==q?(B=s.jsxs(b,{children:[L,q]}),t[52]=b,t[53]=L,t[54]=q,t[55]=B):B=t[55];let V;return t[56]!==_||t[57]!==w||t[58]!==A||t[59]!==B?(V=s.jsx(_,{title:w,actions:A,children:B}),t[56]=_,t[57]=w,t[58]=A,t[59]=B,t[60]=V):V=t[60],V}function mt(t){M.error(t instanceof Error?t.message:"Failed to update default home agents")}function ut(t){return te.some(e=>e.id===t)}function gt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z,{title:"Default home agents",children:s.jsx(J,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(ft)})})}),t[0]=e):e=t[0],e}function ft(t,e){return s.jsx(Be,{className:"h-12 w-full rounded-lg"},e)}function xt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(K.Suspense,{fallback:s.jsx(gt,{}),children:s.jsx(dt,{})}),t[0]=e):e=t[0],e}function pt(){const t=F.c(47),{org:e}=re(),r=ae(),l=ce(),[a,u]=K.useState(!1),[n,S]=K.useState("");let g;t[0]!==e.id||t[1]!==e.slug?(g={connectionId:Re,orgSlug:e.slug,orgId:e.id},t[0]=e.id,t[1]=e.slug,t[2]=g):g=t[2];const C=$e(g);let o;t[3]!==e.id||t[4]!==C?(o=async()=>{const I=await C.callTool({name:"ORGANIZATION_DELETE",arguments:{id:e.id}});if(I.isError){const c=I.content,L=Array.isArray(c)&&c[0]?.type==="text"&&typeof c[0].text=="string"?c[0].text:"Failed to delete organization";throw new Error(L)}},t[3]=e.id,t[4]=C,t[5]=o):o=t[5];let i;t[6]!==r||t[7]!==e.id||t[8]!==e.slug||t[9]!==l?(i=()=>{W("organization_deleted",{organization_id:e.id}),localStorage.getItem(ne.lastOrgSlug())===e.slug&&localStorage.removeItem(ne.lastOrgSlug()),l.removeQueries({queryKey:Y.activeOrganization(e.slug)}),l.invalidateQueries({queryKey:Y.organizations()}),M.success("Organization deleted"),r({to:"/"})},t[6]=r,t[7]=e.id,t[8]=e.slug,t[9]=l,t[10]=i):i=t[10];let d;t[11]!==o||t[12]!==i?(d={mutationFn:o,onSuccess:i,onError:ht},t[11]=o,t[12]=i,t[13]=d):d=t[13];const m=de(d);let f;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),t[14]=f):f=t[14];let x;t[15]!==m.isPending?(x=s.jsx(Z,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:s.jsx(J,{className:"border-destructive/40",children:s.jsx(Q,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:s.jsx(H,{variant:"destructive",size:"sm",onClick:f,disabled:m.isPending,children:"Delete"})})})}),t[15]=m.isPending,t[16]=x):x=t[16];let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{u(I),I||S("")},t[17]=P):P=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(We,{children:"Delete Organization?"}),t[18]=p):p=t[18];let h;t[19]!==e.name?(h=s.jsxs("p",{children:["This will permanently delete all data associated with"," ",s.jsx("span",{className:"font-medium text-foreground",children:e.name}),". This action cannot be undone."]}),t[19]=e.name,t[20]=h):h=t[20];let z;t[21]!==e.name?(z=s.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",s.jsx("span",{className:"font-medium text-foreground",children:e.name})," ","to confirm:"]}),t[21]=e.name,t[22]=z):z=t[22];let E;t[23]===Symbol.for("react.memo_cache_sentinel")?(E=I=>S(I.target.value),t[23]=E):E=t[23];let v;t[24]!==n||t[25]!==e.name?(v=s.jsx(me,{value:n,onChange:E,placeholder:e.name,autoFocus:!0}),t[24]=n,t[25]=e.name,t[26]=v):v=t[26];let N;t[27]!==v||t[28]!==h||t[29]!==z?(N=s.jsxs(Ye,{children:[p,s.jsx(Ze,{asChild:!0,children:s.jsxs("div",{children:[h,z,v]})})]}),t[27]=v,t[28]=h,t[29]=z,t[30]=N):N=t[30];let b;t[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Je,{children:"Cancel"}),t[31]=b):b=t[31];let _;t[32]!==m?(_=()=>m.mutate(),t[32]=m,t[33]=_):_=t[33];const j=n!==e.name||m.isPending,D=m.isPending?"Deleting…":"Delete organization";let w;t[34]!==_||t[35]!==j||t[36]!==D?(w=s.jsxs(Xe,{children:[b,s.jsx(et,{onClick:_,disabled:j,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:D})]}),t[34]=_,t[35]=j,t[36]=D,t[37]=w):w=t[37];let A;t[38]!==N||t[39]!==w?(A=s.jsxs(tt,{children:[N,w]}),t[38]=N,t[39]=w,t[40]=A):A=t[40];let y;t[41]!==a||t[42]!==A?(y=s.jsx(st,{open:a,onOpenChange:P,children:A}),t[41]=a,t[42]=A,t[43]=y):y=t[43];let O;return t[44]!==y||t[45]!==x?(O=s.jsxs(s.Fragment,{children:[x,y]}),t[44]=y,t[45]=x,t[46]=O):O=t[46],O}function ht(t){M.error(t instanceof Error?t.message:"Failed to delete organization")}function jt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U,{children:s.jsx(U.Content,{children:s.jsx(U.Body,{children:s.jsxs(Ce,{children:[s.jsx(U.Title,{children:"Organization"}),s.jsx(lt,{}),s.jsx(Ne,{}),s.jsx(xt,{}),s.jsx(pt,{})]})})})}),t[0]=e):e=t[0],e}function bs(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jt,{}),t[0]=e):e=t[0],e}export{bs as default};
1
+ import{f as ae,s as re,o as ce,z as fe,D as xe,a as de,t as W,x as M,K as Y,j as s,C as se,H as pe,J as X,e as F,r as K,B as H,c as he,M as je,R as ne}from"./index-z6P4iLmn.js";import{P as U}from"./index-COMOhhst.js";import{u as ve}from"./use-org-auth-client-Cyg62sX1.js";import{u as be}from"./use-debounced-autosave-ePDNWMLl.js";import{A as ye}from"./avatar-Cz46we3J.js";import{I as me}from"./input-DDq-8B8D.js";import{S as Z,a as J,b as Q,c as Se,d as Ce}from"./settings-section-CnKm_zFi.js";import{D as Ne}from"./domain-settings-15c_0wEz.js";import{u as _e,a as oe,D as De,c as ze,S as Ae,v as we,K as Pe,P as Oe,d as Ee,C as Ie,s as ke,b as Te,e as Fe}from"./collection-search-yy57Ug8m.js";import{W as te,i as Le,S as Re,u as $e}from"./constants-DB87On7u.js";import{b as ue}from"./use-virtual-mcp-D0R2VmhD.js";import{b as Me,P as Ke,a as qe}from"./popover-D1LgcRgW.js";import{S as Be}from"./skeleton-BAst9SOO.js";import{y as He}from"./agent-icon-uifQLn7r.js";import{s as Ve}from"./Plus-Dhbk7Oxt.js";import{a as ge}from"./Users03-Cy-1ZCAV.js";import{i as Ge}from"./X-C1OoauoK.js";import{I as ee}from"./integration-icon-nAICH2vf.js";import{u as Ue,c as Qe}from"./use-organization-settings-oGq90ndm.js";import{c as We,b as Ye,d as Ze,f as Je,e as Xe,g as et,a as tt,A as st}from"./alert-dialog-BkIzeg-f.js";import"./sidebar-B9xBBJwp.js";import"./LayoutLeft-Bz-byvkb.js";import"./tooltip-Bw2Gbk6i.js";import"./User01-DHE4nBvX.js";import"./card-2xC00NeJ.js";import"./ArrowUpRight-CyleC_fI.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./switch-CxAZv9yX.js";import"./SearchMd-1jGzATDG.js";import"./use-collections-DwzrzR7x.js";import"./AlertCircle-DBo9AAMH.js";import"./Tool01-D-ahtGaO.js";import"./Archive-DmnBOtki.js";import"./XClose-DzM42Vw-.js";import"./RefreshCcw01-CIoWX0oI.js";import"./ArrowNarrowLeft-deV6RKN9.js";import"./XCircle-pEn9ROt8.js";import"./ZapSquare-D1rioSCt.js";import"./CheckCircle-CtqrLFo6.js";import"./Check-CWMsutx6.js";import"./ChevronDown-DBDCamK8.js";import"./ChevronRight-D0Db_yfd.js";import"./ChevronUp-Dx3CWQDk.js";import"./DotsVertical-D9jz1TQ0.js";import"./Container-RAn51RkG.js";import"./Star01-B3h6tOF6.js";import"./Palette-Cg9Tm5aJ.js";import"./LinkExternal01-C0Smk2lu.js";import"./Lock01-IggrtR3m.js";import"./Sun-CkFgevjR.js";import"./Play-DW0LITiR.js";import"./Settings02-DRIFxfHn.js";import"./Shield01-5EtEh1c3.js";import"./Trash01-BERBzkhG.js";import"./Zap-BNWDUN_3.js";const nt=pe({name:X().min(1,"Name is required").max(255,"Name is too long"),slug:X().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:X().optional()});function ot(t){const e=F.c(13),{value:r,onChange:l,name:a,disabled:u}=t,n=K.useRef(null);let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S=()=>n.current?.click(),e[0]=S):S=e[0];const g=S;let C;e[1]!==l?(C=P=>{const p=P.target.files?.[0];if(!p)return;if(p.size>2097152){M.error("Image must be smaller than 2MB");return}const h=new FileReader;h.onerror=it,h.onloadend=()=>{h.result&&l(h.result),n.current&&(n.current.value="")},h.readAsDataURL(p)},e[1]=l,e[2]=C):C=e[2];const o=C;let i;e[3]!==u||e[4]!==o?(i=s.jsx("input",{ref:n,type:"file",accept:"image/*",onChange:o,className:"hidden",disabled:u}),e[3]=u,e[4]=o,e[5]=i):i=e[5];const d=r||void 0,m=a??"?";let f;e[6]!==d||e[7]!==m?(f=s.jsx(ye,{url:d,fallback:m,shape:"square",size:"base"}),e[6]=d,e[7]=m,e[8]=f):f=e[8];let x;return e[9]!==u||e[10]!==i||e[11]!==f?(x=s.jsxs("button",{type:"button",onClick:g,disabled:u,className:"rounded-lg overflow-hidden hover:ring-2 hover:ring-border transition-all disabled:opacity-50","aria-label":"Upload organization logo",children:[i,f]}),e[9]=u,e[10]=i,e[11]=f,e[12]=x):x=e[12],x}function it(){return M.error("Failed to read image")}function lt(){const t=ae(),{org:e}=re(),r=ve(),l=ce(),a=fe({resolver:xe(nt),values:{name:e.name??"",slug:e.slug??"",logo:e.logo??""}}),u=de({mutationFn:async o=>{const i={name:o.name,slug:o.slug};o.logo&&(i.logo=o.logo);const d=await r.organization.update({data:i});if(d?.error)throw new Error(d.error.message||"Failed to update organization");return d},onSuccess:(o,i)=>{W("organization_settings_updated",{organization_id:e.id,fields:Object.keys(i)}),l.invalidateQueries({queryKey:Y.organizations()}),l.invalidateQueries({queryKey:Y.activeOrganization(e.slug)}),M.success("Organization updated successfully"),o?.data?.slug&&o.data.slug!==e.slug&&t({to:"/$org/settings/general",params:{org:o.data.slug}})},onError:(o,i)=>{W("organization_settings_update_failed",{organization_id:e.id,fields:Object.keys(i),error:o instanceof Error?o.message:String(o)}),M.error(o instanceof Error?o.message:"Failed to update organization")}}),{schedule:n,flush:S}=be({save:async()=>{const o=a.control._formState.dirtyFields;if(Object.keys(o).length===0||!await a.trigger())return;const d=a.getValues(),m=a.control._defaultValues;a.reset(d,{keepValues:!0});try{await u.mutateAsync(d)}catch{a.reset(m,{keepValues:!0})}}}),g=a.formState.errors,C=typeof window<"u"?`${window.location.host}/`:"";return s.jsx(Z,{children:s.jsxs(J,{children:[s.jsx(Q,{title:"Logo",description:"Recommended size is 256x256px",action:s.jsx(ot,{value:a.watch("logo"),onChange:o=>{a.setValue("logo",o??"",{shouldDirty:!0}),S()},name:a.watch("name")})}),s.jsx(Q,{title:"Name",action:s.jsx(se,{control:a.control,name:"name",render:({field:o})=>s.jsx(me,{id:"org-name",...o,onChange:i=>{o.onChange(i),n()},onBlur:()=>{o.onBlur(),S()},placeholder:"Organization name",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:[C&&s.jsx("span",{className:"pl-3 text-sm text-muted-foreground select-none",children:C}),s.jsx(se,{control:a.control,name:"slug",render:({field:o})=>s.jsx("input",{id:"org-slug",value:o.value??"",name:o.name,ref:o.ref,placeholder:"my-organization",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:i=>{const d=i.target.value.toLowerCase().replace(/[^a-z0-9-]/g,"");a.setValue("slug",d,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0}),n()},onBlur:()=>{o.onBlur(),S()}})})]})}),(g.name||g.slug||g.logo)&&s.jsxs("div",{className:"px-5 pb-3 flex flex-col gap-1",children:[g.name&&s.jsx("p",{className:"text-xs text-destructive",children:g.name.message}),g.slug&&s.jsx("p",{className:"text-xs text-destructive",children:g.slug.message}),g.logo&&s.jsx("p",{className:"text-xs text-destructive",children:g.logo.message})]})]})})}const ie=["site-editor","site-diagnostics","ai-image","ai-research"],le=8;function at(t,e,r){const l=e.find(u=>u.id===t);if(l)return{id:l.id,title:l.title,icon:l.icon,kind:"template"};const a=r.find(u=>u.id===t);return a?{id:t,title:a.title,icon:a.icon??null,kind:"custom"}:{id:t,title:t,icon:null,kind:"missing"}}function rt(t){const e=F.c(39),{agent:r,onRemove:l}=t;let a;e[0]!==r.id?(a={id:r.id},e[0]=r.id,e[1]=a):a=e[1];const{attributes:u,listeners:n,setNodeRef:S,transform:g,transition:C,isDragging:o}=Ee(a);let i;e[2]!==g?(i=Ie.Transform.toString(g),e[2]=g,e[3]=i):i=e[3];const d=o?.5:void 0,m=o?100:void 0;let f;e[4]!==i||e[5]!==d||e[6]!==m||e[7]!==C?(f={transform:i,transition:C,opacity:d,zIndex:m},e[4]=i,e[5]=d,e[6]=m,e[7]=C,e[8]=f):f=e[8];const x=f,P=o&&"shadow-lg";let p;e[9]!==P?(p=he("flex items-center gap-3 px-3 py-2 rounded-lg border border-border bg-background",P),e[9]=P,e[10]=p):p=e[10];const h=`Drag to reorder ${r.title}`;let z;e[11]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(He,{size:14}),e[11]=z):z=e[11];let E;e[12]!==u||e[13]!==n||e[14]!==h?(E=s.jsx("button",{type:"button",...u,...n,className:"text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing","aria-label":h,children:z}),e[12]=u,e[13]=n,e[14]=h,e[15]=E):E=e[15];let v;e[16]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ge,{size:14}),e[16]=v):v=e[16];let N;e[17]!==r.icon||e[18]!==r.title?(N=s.jsx(ee,{icon:r.icon,name:r.title,size:"xs",fallbackIcon:v}),e[17]=r.icon,e[18]=r.title,e[19]=N):N=e[19];let b;e[20]!==r.title?(b=s.jsx("span",{className:"text-sm text-foreground truncate",children:r.title}),e[20]=r.title,e[21]=b):b=e[21];const _=r.kind==="template"?"Template":r.kind==="custom"?"Custom agent":"Unavailable";let j;e[22]!==_?(j=s.jsx("span",{className:"text-xs text-muted-foreground",children:_}),e[22]=_,e[23]=j):j=e[23];let D;e[24]!==b||e[25]!==j?(D=s.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[b,j]}),e[24]=b,e[25]=j,e[26]=D):D=e[26];const w=`Remove ${r.title}`;let A;e[27]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(Ge,{size:14}),e[27]=A):A=e[27];let y;e[28]!==l||e[29]!==w?(y=s.jsx("button",{type:"button",onClick:l,className:"text-muted-foreground hover:text-foreground p-1 rounded","aria-label":w,children:A}),e[28]=l,e[29]=w,e[30]=y):y=e[30];let O;return e[31]!==S||e[32]!==x||e[33]!==E||e[34]!==N||e[35]!==D||e[36]!==y||e[37]!==p?(O=s.jsxs("div",{ref:S,style:x,className:p,children:[E,N,D,y]}),e[31]=S,e[32]=x,e[33]=E,e[34]=N,e[35]=D,e[36]=y,e[37]=p,e[38]=O):O=e[38],O}function ct(t){const e=F.c(48),{selectedIds:r,onAdd:l}=t,[a,u]=K.useState(!1),[n,S]=K.useState(""),g=ue();let C;e[0]!==r?(C=new Set(r),e[0]=r,e[1]=C):C=e[1];const o=C;let i,d,m,f,x,P,p,h,z,E,v,N,b;if(e[2]!==g||e[3]!==l||e[4]!==a||e[5]!==n||e[6]!==o){const A=n.toLowerCase();f=te.filter(c=>!o.has(c.id)&&(!n||c.title.toLowerCase().includes(A)));let y;e[20]!==o?(y=c=>c.id!==null&&!Le(c.id)&&!o.has(c.id),e[20]=o,e[21]=y):y=e[21],m=g.filter(y).filter(c=>!n||c.title.toLowerCase().includes(A));let O;e[22]!==l?(O=c=>{l(c),u(!1),S("")},e[22]=l,e[23]=O):O=e[23];const I=O;d=Me,N=a,b=u,e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(Ke,{asChild:!0,children:s.jsxs(H,{type:"button",variant:"outline",size:"sm",children:[s.jsx(Ve,{size:14}),"Add agent"]})}),e[24]=x):x=e[24],i=qe,z="w-[320px] p-0 overflow-hidden",E="start",e[25]!==n?(v=s.jsx(Fe,{value:n,onChange:S,placeholder:"Search agents..."}),e[25]=n,e[26]=v):v=e[26],P="max-h-[320px] overflow-y-auto p-2 flex flex-col gap-3",p=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:"Templates"}),f.map(c=>s.jsxs("button",{type:"button",onClick:()=>I(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ee,{icon:c.icon,name:c.title,size:"xs"}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),h=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:"Custom agents"}),m.map(c=>s.jsxs("button",{type:"button",onClick:()=>I(c.id),className:"flex items-center gap-2 px-2 py-1.5 rounded-md hover:bg-accent text-left",children:[s.jsx(ee,{icon:c.icon,name:c.title,size:"xs",fallbackIcon:s.jsx(ge,{size:14})}),s.jsx("span",{className:"text-sm truncate",children:c.title})]},c.id))]}),e[2]=g,e[3]=l,e[4]=a,e[5]=n,e[6]=o,e[7]=i,e[8]=d,e[9]=m,e[10]=f,e[11]=x,e[12]=P,e[13]=p,e[14]=h,e[15]=z,e[16]=E,e[17]=v,e[18]=N,e[19]=b}else i=e[7],d=e[8],m=e[9],f=e[10],x=e[11],P=e[12],p=e[13],h=e[14],z=e[15],E=e[16],v=e[17],N=e[18],b=e[19];let _;e[27]!==m||e[28]!==f.length||e[29]!==n?(_=f.length===0&&m.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]=m,e[28]=f.length,e[29]=n,e[30]=_):_=e[30];let j;e[31]!==_||e[32]!==P||e[33]!==p||e[34]!==h?(j=s.jsxs("div",{className:P,children:[p,h,_]}),e[31]=_,e[32]=P,e[33]=p,e[34]=h,e[35]=j):j=e[35];let D;e[36]!==i||e[37]!==j||e[38]!==z||e[39]!==E||e[40]!==v?(D=s.jsxs(i,{className:z,align:E,children:[v,j]}),e[36]=i,e[37]=j,e[38]=z,e[39]=E,e[40]=v,e[41]=D):D=e[41];let w;return e[42]!==d||e[43]!==x||e[44]!==D||e[45]!==N||e[46]!==b?(w=s.jsxs(d,{open:N,onOpenChange:b,children:[x,D]}),e[42]=d,e[43]=x,e[44]=D,e[45]=N,e[46]=b,e[47]=w):w=e[47],w}function dt(){const t=F.c(61),e=Ue(),r=ue(),l=Qe();let a;t[0]!==e?.ids?(a=e?.ids??[...ie],t[0]=e?.ids,t[1]=a):a=t[1];const u=a,[n,S]=K.useState(u);let g;t[2]!==n||t[3]!==u?(g=n.length!==u.length||n.some((k,T)=>k!==u[T]),t[2]=n,t[3]=u,t[4]=g):g=t[4];const C=g;let o;t[5]===Symbol.for("react.memo_cache_sentinel")?(o={activationConstraint:{distance:5}},t[5]=o):o=t[5];let i;t[6]===Symbol.for("react.memo_cache_sentinel")?(i={coordinateGetter:ke},t[6]=i):i=t[6];const d=_e(oe(Oe,o),oe(Pe,i));let m;t[7]!==n?(m=k=>{const{active:T,over:R}=k;if(!R||T.id===R.id)return;const $=n.indexOf(T.id),G=n.indexOf(R.id);$===-1||G===-1||S(Te([...n],$,G))},t[7]=n,t[8]=m):m=t[8];const f=m;let x;t[9]!==n?(x=k=>{n.includes(k)||S([...n,k])},t[9]=n,t[10]=x):x=t[10];const P=x;let p;t[11]!==n?(p=k=>{S(n.filter(T=>T!==k))},t[11]=n,t[12]=p):p=t[12];const h=p;let z;t[13]===Symbol.for("react.memo_cache_sentinel")?(z=()=>{S([...ie])},t[13]=z):z=t[13];const E=z;let v;t[14]!==n||t[15]!==l?(v=()=>{l.mutate({ids:n},{onSuccess:()=>{W("default_home_agents_updated",{count:n.length,template_count:n.filter(ut).length}),M.success("Default home agents updated")},onError:mt})},t[14]=n,t[15]=l,t[16]=v):v=t[16];const N=v;let b,_,j,D,w,A,y;if(t[17]!==r||t[18]!==n||t[19]!==f||t[20]!==h||t[21]!==d||t[22]!==l.isPending){let k;t[30]!==r?(k=$=>at($,te,r),t[30]=r,t[31]=k):k=t[31];const T=n.map(k);j=Math.max(0,n.length-le),_=Z,w="Default home agents";let R;t[32]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(je,{size:14}),t[32]=R):R=t[32],t[33]!==l.isPending?(A=s.jsxs(H,{type:"button",variant:"ghost",size:"sm",onClick:E,disabled:l.isPending,children:[R,"Reset defaults"]}),t[33]=l.isPending,t[34]=A):A=t[34],b=J,y="px-5 py-5 flex flex-col gap-3",D=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(De,{sensors:d,collisionDetection:ze,onDragEnd:f,children:s.jsx(Ae,{items:n,strategy:we,children:s.jsx("div",{className:"flex flex-col gap-1.5",children:T.map(($,G)=>s.jsxs("div",{className:"flex flex-col gap-1.5",children:[G===le&&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(rt,{agent:$,onRemove:()=>h($.id)})]},$.id))})})}),t[17]=r,t[18]=n,t[19]=f,t[20]=h,t[21]=d,t[22]=l.isPending,t[23]=b,t[24]=_,t[25]=j,t[26]=D,t[27]=w,t[28]=A,t[29]=y}else b=t[23],_=t[24],j=t[25],D=t[26],w=t[27],A=t[28],y=t[29];let O;t[35]!==n||t[36]!==P?(O=s.jsx(ct,{selectedIds:n,onAdd:P}),t[35]=n,t[36]=P,t[37]=O):O=t[37];let I;t[38]!==j?(I=j>0&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[j," agent",j===1?"":"s"," won't fit on the home view"]}),t[38]=j,t[39]=I):I=t[39];let c;t[40]!==O||t[41]!==I?(c=s.jsxs("div",{className:"flex items-center justify-between",children:[O,I]}),t[40]=O,t[41]=I,t[42]=c):c=t[42];let L;t[43]!==D||t[44]!==c||t[45]!==y?(L=s.jsxs("div",{className:y,children:[D,c]}),t[43]=D,t[44]=c,t[45]=y,t[46]=L):L=t[46];let q;t[47]!==N||t[48]!==u||t[49]!==C||t[50]!==l.isPending?(q=C&&s.jsxs(Se,{children:[s.jsx(H,{type:"button",variant:"outline",onClick:()=>S(u),disabled:l.isPending,children:"Cancel"}),s.jsx(H,{type:"button",onClick:N,disabled:l.isPending,children:l.isPending?"Saving…":"Save"})]}),t[47]=N,t[48]=u,t[49]=C,t[50]=l.isPending,t[51]=q):q=t[51];let B;t[52]!==b||t[53]!==L||t[54]!==q?(B=s.jsxs(b,{children:[L,q]}),t[52]=b,t[53]=L,t[54]=q,t[55]=B):B=t[55];let V;return t[56]!==_||t[57]!==w||t[58]!==A||t[59]!==B?(V=s.jsx(_,{title:w,actions:A,children:B}),t[56]=_,t[57]=w,t[58]=A,t[59]=B,t[60]=V):V=t[60],V}function mt(t){M.error(t instanceof Error?t.message:"Failed to update default home agents")}function ut(t){return te.some(e=>e.id===t)}function gt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z,{title:"Default home agents",children:s.jsx(J,{children:s.jsx("div",{className:"px-5 py-5 flex flex-col gap-2",children:Array.from({length:4}).map(ft)})})}),t[0]=e):e=t[0],e}function ft(t,e){return s.jsx(Be,{className:"h-12 w-full rounded-lg"},e)}function xt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(K.Suspense,{fallback:s.jsx(gt,{}),children:s.jsx(dt,{})}),t[0]=e):e=t[0],e}function pt(){const t=F.c(47),{org:e}=re(),r=ae(),l=ce(),[a,u]=K.useState(!1),[n,S]=K.useState("");let g;t[0]!==e.id||t[1]!==e.slug?(g={connectionId:Re,orgSlug:e.slug,orgId:e.id},t[0]=e.id,t[1]=e.slug,t[2]=g):g=t[2];const C=$e(g);let o;t[3]!==e.id||t[4]!==C?(o=async()=>{const I=await C.callTool({name:"ORGANIZATION_DELETE",arguments:{id:e.id}});if(I.isError){const c=I.content,L=Array.isArray(c)&&c[0]?.type==="text"&&typeof c[0].text=="string"?c[0].text:"Failed to delete organization";throw new Error(L)}},t[3]=e.id,t[4]=C,t[5]=o):o=t[5];let i;t[6]!==r||t[7]!==e.id||t[8]!==e.slug||t[9]!==l?(i=()=>{W("organization_deleted",{organization_id:e.id}),localStorage.getItem(ne.lastOrgSlug())===e.slug&&localStorage.removeItem(ne.lastOrgSlug()),l.removeQueries({queryKey:Y.activeOrganization(e.slug)}),l.invalidateQueries({queryKey:Y.organizations()}),M.success("Organization deleted"),r({to:"/"})},t[6]=r,t[7]=e.id,t[8]=e.slug,t[9]=l,t[10]=i):i=t[10];let d;t[11]!==o||t[12]!==i?(d={mutationFn:o,onSuccess:i,onError:ht},t[11]=o,t[12]=i,t[13]=d):d=t[13];const m=de(d);let f;t[14]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),t[14]=f):f=t[14];let x;t[15]!==m.isPending?(x=s.jsx(Z,{title:"Danger Zone",description:"Irreversible actions that affect your entire organization.",children:s.jsx(J,{className:"border-destructive/40",children:s.jsx(Q,{title:"Delete organization",description:"Permanently delete this organization and all of its data. This action cannot be undone.",action:s.jsx(H,{variant:"destructive",size:"sm",onClick:f,disabled:m.isPending,children:"Delete"})})})}),t[15]=m.isPending,t[16]=x):x=t[16];let P;t[17]===Symbol.for("react.memo_cache_sentinel")?(P=I=>{u(I),I||S("")},t[17]=P):P=t[17];let p;t[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(We,{children:"Delete Organization?"}),t[18]=p):p=t[18];let h;t[19]!==e.name?(h=s.jsxs("p",{children:["This will permanently delete all data associated with"," ",s.jsx("span",{className:"font-medium text-foreground",children:e.name}),". This action cannot be undone."]}),t[19]=e.name,t[20]=h):h=t[20];let z;t[21]!==e.name?(z=s.jsxs("p",{className:"mt-3 mb-1.5",children:["Type"," ",s.jsx("span",{className:"font-medium text-foreground",children:e.name})," ","to confirm:"]}),t[21]=e.name,t[22]=z):z=t[22];let E;t[23]===Symbol.for("react.memo_cache_sentinel")?(E=I=>S(I.target.value),t[23]=E):E=t[23];let v;t[24]!==n||t[25]!==e.name?(v=s.jsx(me,{value:n,onChange:E,placeholder:e.name,autoFocus:!0}),t[24]=n,t[25]=e.name,t[26]=v):v=t[26];let N;t[27]!==v||t[28]!==h||t[29]!==z?(N=s.jsxs(Ye,{children:[p,s.jsx(Ze,{asChild:!0,children:s.jsxs("div",{children:[h,z,v]})})]}),t[27]=v,t[28]=h,t[29]=z,t[30]=N):N=t[30];let b;t[31]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Je,{children:"Cancel"}),t[31]=b):b=t[31];let _;t[32]!==m?(_=()=>m.mutate(),t[32]=m,t[33]=_):_=t[33];const j=n!==e.name||m.isPending,D=m.isPending?"Deleting…":"Delete organization";let w;t[34]!==_||t[35]!==j||t[36]!==D?(w=s.jsxs(Xe,{children:[b,s.jsx(et,{onClick:_,disabled:j,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50",children:D})]}),t[34]=_,t[35]=j,t[36]=D,t[37]=w):w=t[37];let A;t[38]!==N||t[39]!==w?(A=s.jsxs(tt,{children:[N,w]}),t[38]=N,t[39]=w,t[40]=A):A=t[40];let y;t[41]!==a||t[42]!==A?(y=s.jsx(st,{open:a,onOpenChange:P,children:A}),t[41]=a,t[42]=A,t[43]=y):y=t[43];let O;return t[44]!==y||t[45]!==x?(O=s.jsxs(s.Fragment,{children:[x,y]}),t[44]=y,t[45]=x,t[46]=O):O=t[46],O}function ht(t){M.error(t instanceof Error?t.message:"Failed to delete organization")}function jt(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(U,{children:s.jsx(U.Content,{children:s.jsx(U.Body,{children:s.jsxs(Ce,{children:[s.jsx(U.Title,{children:"Organization"}),s.jsx(lt,{}),s.jsx(Ne,{}),s.jsx(xt,{}),s.jsx(pt,{})]})})})}),t[0]=e):e=t[0],e}function bs(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(jt,{}),t[0]=e):e=t[0],e}export{bs as default};
@@ -1,4 +1,4 @@
1
- import{ci as ne,e as _,j as o,B as te,l as ln,bb as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,a7 as hs,a8 as fe,aV as an,c5 as gs,aS as bs,c3 as Ss,c6 as un,b5 as js,cc as ys,cd as vs,ae as ws,ce as Ns,ck as $t,cl as dn,x as ks,y as _s,cm as Cs,cn as Is}from"./index-DTTgUjL4.js";import{D as Ts,F as Es,B as $s}from"./index-C_yGpzc7.js";import{e as Fe,i as Os,u as ae}from"./constants-Pxhsjio1.js";import{b as fn}from"./use-virtual-mcp-CjWnWBVR.js";import{M as Re}from"./monaco-editor-D_4gsArT.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-CfzkzHFA.js";import{B as le}from"./badge-DTxL6xUH.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-Bc7FbSIp.js";import{S as st}from"./spinner-Dxocm3j_.js";import{V as Ws}from"./view-mode-toggle-0NgrTiKE.js";import{a8 as Ds,a9 as Fs,i as Hs,a0 as mn,aa as Vs,P as Us,u as qs,ab as pn,X as Ks,T as xn,ac as Bs,ad as Xs,R as bt,ae as Js}from"./agent-icon-kpWVPj85.js";import{i as hn}from"./Play-BZl-q_yI.js";import{b as Gs,a as Qs,V as Qe}from"./layout-BeSp3Oh9.js";import{c as gn,b as bn,T as Sn,a as jn}from"./tooltip-3OBm7oI6.js";import{u as Ys,a as Zs}from"./use-connection-fL8Bdy-2.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-B4pwuY-v.js";import{c as eo,d as to,e as no,D as so,a as oo,b as ro}from"./dialog-C_Z_peKj.js";import"./index-CNLaZeow.js";import{N as io,h as lo,j as co,m as Be,P as ao,i as uo,R as fo,c as mo,k as po,e as qt,d as xo}from"./index-LSlqVMbE.js";import{S as ho}from"./index-CKMzeZJu.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-D2TItq8w.js";import{s as go}from"./Plus-CKCuUTsd.js";import{b as kn}from"./Tool01-bqF4BUeR.js";import{i as He}from"./Check-Dz5ZLQmL.js";import{s as Mt}from"./XClose-Cilpzhqm.js";import{I as Lt}from"./integration-icon-Daxcsp7E.js";import{a as bo,S as So}from"./scroll-area-QdubrRQt.js";import"./index-C98EzEx6.js";import{i as _n}from"./X-Bs68LwBc.js";import{u as Cn,a as jo}from"./use-collections-B_AeR68F.js";import{E as In}from"./empty-state-Nd37WS0U.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-CjWKkTcV.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(Ds,{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(Fs,{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{ci as ne,e as _,j as o,B as te,l as ln,bb as ze,cj as ms,r as T,s as oe,c as O,g as ps,o as cn,c4 as xs,a7 as hs,a8 as fe,aV as an,c5 as gs,aS as bs,c3 as Ss,c6 as un,b5 as js,cc as ys,cd as vs,ae as ws,ce as Ns,ck as $t,cl as dn,x as ks,y as _s,cm as Cs,cn as Is}from"./index-z6P4iLmn.js";import{D as Ts,F as Es,B as $s}from"./index-iV247muO.js";import{e as Fe,i as Os,u as ae}from"./constants-DB87On7u.js";import{b as fn}from"./use-virtual-mcp-D0R2VmhD.js";import{M as Re}from"./monaco-editor-Cf3iDvFI.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-pCBdHp9x.js";import{B as le}from"./badge-DlK7sduG.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-DEYcF0JB.js";import{S as st}from"./spinner-rKXgQqAk.js";import{V as Ws}from"./view-mode-toggle-87gK3y50.js";import{a8 as Ds,a9 as Fs,i as Hs,a0 as mn,aa as Vs,P as Us,u as qs,ab as pn,X as Ks,T as xn,ac as Bs,ad as Xs,R as bt,ae as Js}from"./agent-icon-uifQLn7r.js";import{i as hn}from"./Play-DW0LITiR.js";import{b as Gs,a as Qs,V as Qe}from"./layout-hGgp6KcA.js";import{c as gn,b as bn,T as Sn,a as jn}from"./tooltip-Bw2Gbk6i.js";import{u as Ys,a as Zs}from"./use-connection-Cs4MqZHR.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-Bdf0_v40.js";import{c as eo,d as to,e as no,D as so,a as oo,b as ro}from"./dialog-DwOIY1UM.js";import"./index-CpI01aVT.js";import{N as io,h as lo,j as co,m as Be,P as ao,i as uo,R as fo,c as mo,k as po,e as qt,d as xo}from"./index-CodtVFa8.js";import{S as ho}from"./index-Bs9l9sgs.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-CjlIX0cw.js";import{s as go}from"./Plus-Dhbk7Oxt.js";import{b as kn}from"./Tool01-D-ahtGaO.js";import{i as He}from"./Check-CWMsutx6.js";import{s as Mt}from"./XClose-DzM42Vw-.js";import{I as Lt}from"./integration-icon-nAICH2vf.js";import{a as bo,S as So}from"./scroll-area-DRfh3y2I.js";import"./index-KerpDg0f.js";import{i as _n}from"./X-C1OoauoK.js";import{u as Cn,a as jo}from"./use-collections-DwzrzR7x.js";import{E as In}from"./empty-state-BBQwipf0.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-DDq-8B8D.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(Ds,{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(Fs,{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
  `)}