decocms 2.300.1 → 2.300.2

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 (202) hide show
  1. package/dist/client/assets/{AlertCircle-CtSiN7Dh.js → AlertCircle-CDtbI_oO.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-CjMD5YtT.js → ArrowNarrowLeft-CJ8McWmC.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-VGEco3p8.js → ArrowUpRight-CfmSEQdr.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BOjQcSoZ.js → CheckCircle-BfnVNP63.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-B21GyFLP.js → ChevronDown-BKNJxAvQ.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-C7fFXCXU.js → ChevronRight-DmLVJ7rn.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-DLJe-Ifh.js → ChevronUp-CsX2yfUc.js} +1 -1
  8. package/dist/client/assets/{Container-DVwtR0PY.js → Container-DASuUdbK.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-_1yE4PFi.js → DotsVertical-CiluvdTj.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-BeNjIA73.js → LinkExternal01-CPmlMGsQ.js} +1 -1
  11. package/dist/client/assets/{Lock01-y9D26Lk9.js → Lock01-BjCX4hvk.js} +1 -1
  12. package/dist/client/assets/{Palette-xIvgAE_U.js → Palette-CmFr12m3.js} +1 -1
  13. package/dist/client/assets/{Play-esUCyQh5.js → Play-AcQdYeyW.js} +1 -1
  14. package/dist/client/assets/{Plus-8zlfW9Nb.js → Plus-DkESyBkp.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-DV-_PfmV.js → RefreshCcw01-DLpzNYLg.js} +1 -1
  16. package/dist/client/assets/{SearchMd-BgpZuBQH.js → SearchMd-RHgmu5nb.js} +1 -1
  17. package/dist/client/assets/{Settings02-B2DHZxlV.js → Settings02-BgsL1r4k.js} +1 -1
  18. package/dist/client/assets/{Shield01-CewVSi37.js → Shield01-BndBIezR.js} +1 -1
  19. package/dist/client/assets/{Star01-DupDdRAe.js → Star01-CRQ6Bc0M.js} +1 -1
  20. package/dist/client/assets/{Sun-B1MYWGMj.js → Sun-DKXWmMuG.js} +1 -1
  21. package/dist/client/assets/{Tool01-73PH4njb.js → Tool01-CRyHj4QJ.js} +1 -1
  22. package/dist/client/assets/{Trash01-_-2EAUWH.js → Trash01-CfK96-qY.js} +1 -1
  23. package/dist/client/assets/{User01-DLnrd0WJ.js → User01-KY-MO20F.js} +1 -1
  24. package/dist/client/assets/{Users03-CtQ_adLe.js → Users03-BCFGwdah.js} +1 -1
  25. package/dist/client/assets/{X-DavTUkoo.js → X-ZLJ81KrS.js} +1 -1
  26. package/dist/client/assets/{XCircle-BKeTm8Ww.js → XCircle-B2dZZ7-3.js} +1 -1
  27. package/dist/client/assets/{XClose-BpjQA_dF.js → XClose-DXU_tOKb.js} +1 -1
  28. package/dist/client/assets/{Zap-DT_tBFfJ.js → Zap-25qc4enN.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-BL-_ZEqM.js → ZapSquare-D6uI2CIK.js} +1 -1
  30. package/dist/client/assets/{accordion-pRq2Jalt.js → accordion-D3bxaM5e.js} +1 -1
  31. package/dist/client/assets/{agent-icon-DnE1m294.js → agent-icon-Y41Xl4RB.js} +1 -1
  32. package/dist/client/assets/{agents-list-BoAFCp78.js → agents-list-mS9MVQZN.js} +1 -1
  33. package/dist/client/assets/ai-providers-BRoGM2rY.js +1 -0
  34. package/dist/client/assets/ai-providers-logos-DD3qZ33J.js +1 -0
  35. package/dist/client/assets/{alert-dialog-DvcLf48w.js → alert-dialog-DnoDZh7l.js} +1 -1
  36. package/dist/client/assets/{auth-catchall-CAJD1PoQ.js → auth-catchall-BoFlqYg1.js} +1 -1
  37. package/dist/client/assets/{automation-list-row-DsEcFwqj.js → automation-list-row-CAHW7UMQ.js} +1 -1
  38. package/dist/client/assets/{automations-0IJqtFMr.js → automations-PZEFUnMk.js} +1 -1
  39. package/dist/client/assets/{avatar-B1YFr91G.js → avatar-C1td1Be6.js} +1 -1
  40. package/dist/client/assets/{badge-BnwDLyJj.js → badge-BQ5WsTn4.js} +1 -1
  41. package/dist/client/assets/{brand-context-D5_IL-aX.js → brand-context-DIIOMD2x.js} +1 -1
  42. package/dist/client/assets/{card-Hve9iIpZ.js → card-DQYOkC6d.js} +1 -1
  43. package/dist/client/assets/{chat-context-C2vjARhO.js → chat-context-hgW5gAmm.js} +1 -1
  44. package/dist/client/assets/{checkbox-DmWLCJJH.js → checkbox-DkmOdGV4.js} +1 -1
  45. package/dist/client/assets/{collection-detail-D8wvqyeL.js → collection-detail-tXsv3iGO.js} +1 -1
  46. package/dist/client/assets/{collection-display-button-CQ2KlZSu.js → collection-display-button-8PlYmXiO.js} +1 -1
  47. package/dist/client/assets/{collection-search-DffILLk0.js → collection-search-B7ehvlGW.js} +1 -1
  48. package/dist/client/assets/{collection-search-D_mJKf_N.js → collection-search-CqdVjZKz.js} +1 -1
  49. package/dist/client/assets/{collection-table-wrapper-fO254CQy.js → collection-table-wrapper-DtBSTmHD.js} +1 -1
  50. package/dist/client/assets/{collection-tabs-Bcs-_tfj.js → collection-tabs-BymkuH-J.js} +1 -1
  51. package/dist/client/assets/{collections-CISD8jzc.js → collections-DusXIGhy.js} +1 -1
  52. package/dist/client/assets/{command-CsVFknP_.js → command-BCmTpu4J.js} +1 -1
  53. package/dist/client/assets/{connection-card-aTu5Xl4N.js → connection-card-Bfng1y5O.js} +1 -1
  54. package/dist/client/assets/{connection-detail-BUr0xwe0.js → connection-detail-BvkQKjE1.js} +1 -1
  55. package/dist/client/assets/{connection-form-helpers-BEHWki2e.js → connection-form-helpers-DmVfKyR2.js} +1 -1
  56. package/dist/client/assets/{connections-BJwQ4V76.js → connections-BOpJFAVW.js} +1 -1
  57. package/dist/client/assets/{constants-DZ5y4NEu.js → constants-Da2DvZbd.js} +1 -1
  58. package/dist/client/assets/{constants-BwurOShK.js → constants-Dm-yPW31.js} +1 -1
  59. package/dist/client/assets/{dialog-BSlhJimL.js → dialog-D0LCITx0.js} +1 -1
  60. package/dist/client/assets/{domain-settings-D65HSgmV.js → domain-settings-D2GqzT5W.js} +1 -1
  61. package/dist/client/assets/{drawer-DwurUbp0.js → drawer-DWuqMoty.js} +1 -1
  62. package/dist/client/assets/{dropdown-menu-Dn3K1Gpo.js → dropdown-menu-BooeaeZW.js} +1 -1
  63. package/dist/client/assets/{dynamic-plugin-layout-uzPcJgAD.js → dynamic-plugin-layout-BBI0fzcH.js} +1 -1
  64. package/dist/client/assets/{empty-state-B4R6bbr3.js → empty-state-DtXUXgFg.js} +1 -1
  65. package/dist/client/assets/{empty-state-DbgILpoj.js → empty-state-V_MWZYVh.js} +1 -1
  66. package/dist/client/assets/{extract-connection-data-Bp5NDOhQ.js → extract-connection-data-JkyrF-5k.js} +1 -1
  67. package/dist/client/assets/{features-MuQDQTKd.js → features-BRMl1rr6.js} +1 -1
  68. package/dist/client/assets/{form-DTt4fIHo.js → form-3xE0OqGj.js} +1 -1
  69. package/dist/client/assets/{general-C7YvzevF.js → general-CkXiaAh9.js} +1 -1
  70. package/dist/client/assets/{index-DRnP8Xhy.js → index-BOmAbn3-.js} +2 -2
  71. package/dist/client/assets/{index-CbEM9IOV.js → index-BSli4TIm.js} +1 -1
  72. package/dist/client/assets/{index-Day-HjXR.js → index-BUabcSp1.js} +1 -1
  73. package/dist/client/assets/{index-D1LVHcIe.js → index-BXOHXvkd.js} +1 -1
  74. package/dist/client/assets/{index-uTtq-reU.js → index-Bh9ip1xM.js} +1 -1
  75. package/dist/client/assets/{index-COQkJrV6.js → index-By-OUdid.js} +1 -1
  76. package/dist/client/assets/{index-h0Ny6VA2.js → index-C2XzR7MH.js} +1 -1
  77. package/dist/client/assets/index-CUHQFzXU.js +1 -0
  78. package/dist/client/assets/{index-DHKldY3y.js → index-CdUEwHcT.js} +1 -1
  79. package/dist/client/assets/{index-BZwRn_mX.js → index-Cm97pdLv.js} +1 -1
  80. package/dist/client/assets/{index-ygN6PiaU.js → index-D1vwSlce.js} +1 -1
  81. package/dist/client/assets/{index-XlHohbXo.js → index-D2cvrx8-.js} +1 -1
  82. package/dist/client/assets/{index-DBY00Q2Z.js → index-Db1yn84L.js} +3 -3
  83. package/dist/client/assets/{index-BJz9Oj-t.js → index-DcLrVfh1.js} +1 -1
  84. package/dist/client/assets/{index-BTM4S0x-.js → index-DqWkjFjy.js} +1 -1
  85. package/dist/client/assets/{index-D9wcQMm5.js → index-oZ72eHkF.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-BFZ15R1_.js → infiniteQueryObserver-ruN3KSWZ.js} +1 -1
  87. package/dist/client/assets/{input-liZY-axz.js → input-DFMPKZJm.js} +1 -1
  88. package/dist/client/assets/{integration-icon-Cz-seBmA.js → integration-icon-Bu4bZk46.js} +1 -1
  89. package/dist/client/assets/{label-CrXFAdsO.js → label-DZwWOqq7.js} +1 -1
  90. package/dist/client/assets/{layout-bMTJXFfz.js → layout-DktxHUWV.js} +1 -1
  91. package/dist/client/assets/{lean-canvas-recruit-modal-DZ6knxg9.js → lean-canvas-recruit-modal-KLORFsWq.js} +1 -1
  92. package/dist/client/assets/{login-CWW3hrOg.js → login-Qjtx70Ay.js} +1 -1
  93. package/dist/client/assets/{members-DKWnDmHd.js → members-CB5ygrXY.js} +1 -1
  94. package/dist/client/assets/{monaco-editor-Cx68yuxi.js → monaco-editor-BMXf_ICC.js} +1 -1
  95. package/dist/client/assets/{monitoring-stats-row-BFqk7UYd.js → monitoring-stats-row-hB6Djn4O.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-nz50ugwL.js → oauth-callback-Cgk_ji97.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-ai-provider-ONRq40Il.js → oauth-callback-ai-provider-BWQb53Zq.js} +1 -1
  98. package/dist/client/assets/{onboarding-CbZyKtbC.js → onboarding-BJq0uANa.js} +1 -1
  99. package/dist/client/assets/{org-layout-DkS2FRIV.js → org-layout-BOmngSEh.js} +1 -1
  100. package/dist/client/assets/{org-plugin-layout-DnoycXXu.js → org-plugin-layout-DYC_-fTx.js} +1 -1
  101. package/dist/client/assets/{pair-rqe3skqp.js → pair-Ds1EbiW2.js} +1 -1
  102. package/dist/client/assets/{plugin-empty-state-DAJtqa_X.js → plugin-empty-state-D34qTA46.js} +1 -1
  103. package/dist/client/assets/{plugin-header-DnTysGuR.js → plugin-header-D19z2yPe.js} +1 -1
  104. package/dist/client/assets/{plugin-layout-Zl5kAJLg.js → plugin-layout-DBmHNWl4.js} +1 -1
  105. package/dist/client/assets/{popover-B6ijC2Zf.js → popover-Cvs9u_0D.js} +1 -1
  106. package/dist/client/assets/{profile-Wj3GJkbr.js → profile-_mVuN_Pw.js} +1 -1
  107. package/dist/client/assets/{project-app-view-DufFnF1s.js → project-app-view-BWTIFTZt.js} +1 -1
  108. package/dist/client/assets/registry-BYjdxPj0.js +2 -0
  109. package/dist/client/assets/{registry-layout-BvfKYFzg.js → registry-layout-BiMLaZ5I.js} +1 -1
  110. package/dist/client/assets/{required-auth-layout-CKQlCfyf.js → required-auth-layout-CGJ5rk5i.js} +1 -1
  111. package/dist/client/assets/{reset-password-4dmtvYgx.js → reset-password-CaWZrhgz.js} +1 -1
  112. package/dist/client/assets/{roles-DlsIbipv.js → roles-ychtuZ_l.js} +1 -1
  113. package/dist/client/assets/{scroll-area-D_0eTXQI.js → scroll-area-DaS5ALMq.js} +1 -1
  114. package/dist/client/assets/{search-input-CbBz2_I7.js → search-input-C4vXNPxO.js} +1 -1
  115. package/dist/client/assets/{select-DwQCWni4.js → select-Czs_bVht.js} +1 -1
  116. package/dist/client/assets/{select-model-CSzGroxj.js → select-model-BAqBST4u.js} +1 -1
  117. package/dist/client/assets/{settings-layout-D2TzHadG.js → settings-layout-CKeL2zhm.js} +1 -1
  118. package/dist/client/assets/{settings-section-CVNbjkC4.js → settings-section-D1IZyeMZ.js} +1 -1
  119. package/dist/client/assets/{shell-layout-BK74oWLU.js → shell-layout-C3cZnoYI.js} +1 -1
  120. package/dist/client/assets/{skeleton-DnMJGIDK.js → skeleton-DFL6A56z.js} +1 -1
  121. package/dist/client/assets/{sso-ByZblLmU.js → sso-C4f0AfMQ.js} +1 -1
  122. package/dist/client/assets/{store-D02KrT4m.js → store-CEIp74Dt.js} +1 -1
  123. package/dist/client/assets/store-registry-B0W6zcCj.js +2 -0
  124. package/dist/client/assets/{switch-BwYbkaPM.js → switch-CgZ8SLcM.js} +1 -1
  125. package/dist/client/assets/{table-dOL69UsN.js → table-bZ3KC8o2.js} +1 -1
  126. package/dist/client/assets/{tabs-CGg7lV45.js → tabs-CQg6na0A.js} +1 -1
  127. package/dist/client/assets/{task-status-DAgh3LfT.js → task-status-ZLGfD6LC.js} +1 -1
  128. package/dist/client/assets/{textarea-CkxfQbxI.js → textarea-dZeCqaKZ.js} +1 -1
  129. package/dist/client/assets/{toggle-group-C5VhmQig.js → toggle-group-BWbe6Sle.js} +1 -1
  130. package/dist/client/assets/{tools-list-CwM3RxlF.js → tools-list-Cs00fcMQ.js} +1 -1
  131. package/dist/client/assets/{tooltip-CUw8WpYG.js → tooltip-f4eQJmkn.js} +1 -1
  132. package/dist/client/assets/{types-slR7lXH6.js → types-BxKF_I-u.js} +1 -1
  133. package/dist/client/assets/{use-ai-providers-DespFg1Y.js → use-ai-providers-CTaSMN44.js} +1 -1
  134. package/dist/client/assets/{use-collections-CDG0ivO9.js → use-collections-ciAA_3Td.js} +1 -1
  135. package/dist/client/assets/{use-connection-DDedfw7l.js → use-connection-DcySEqVV.js} +1 -1
  136. package/dist/client/assets/{use-copy-Czy0YFNn.js → use-copy-VDNca3ax.js} +1 -1
  137. package/dist/client/assets/{use-create-virtual-mcp-Bhi93QNY.js → use-create-virtual-mcp-BosIHDl_.js} +1 -1
  138. package/dist/client/assets/{use-decopilot-events-DkzJQYGR.js → use-decopilot-events-CJG2rWbg.js} +1 -1
  139. package/dist/client/assets/{use-delete-connection-CG2J3Cjn.js → use-delete-connection-BHdNUeNC.js} +1 -1
  140. package/dist/client/assets/{use-infinite-scroll-qjXoMT8U.js → use-infinite-scroll-Cd7090oj.js} +1 -1
  141. package/dist/client/assets/{use-list-state-D2VmPCpI.js → use-list-state-B_mnqmDh.js} +1 -1
  142. package/dist/client/assets/{use-mcp-tools-nd8RTEJZ.js → use-mcp-tools-C9cj3BH6.js} +1 -1
  143. package/dist/client/assets/{use-members-BWz4qY4v.js → use-members-YqP0IEDf.js} +1 -1
  144. package/dist/client/assets/{use-navigate-to-agent-Dj0boPYr.js → use-navigate-to-agent-KmcfdsLb.js} +1 -1
  145. package/dist/client/assets/{use-org-auth-client-_7iLBAbg.js → use-org-auth-client-DKAFGF5X.js} +1 -1
  146. package/dist/client/assets/{use-org-sso-CXTYwYuw.js → use-org-sso-BUVEFfyx.js} +1 -1
  147. package/dist/client/assets/{use-organization-roles-BmJJrwum.js → use-organization-roles-BY88cyRn.js} +1 -1
  148. package/dist/client/assets/{use-organization-settings-C516uAxZ.js → use-organization-settings-BrpxY44K.js} +1 -1
  149. package/dist/client/assets/{use-registry-connections-BH65PVKK.js → use-registry-connections-C5Res-NO.js} +1 -1
  150. package/dist/client/assets/{use-status-sounds-COJng9ez.js → use-status-sounds-DF_LdFlX.js} +1 -1
  151. package/dist/client/assets/{use-tasks-BMtiaufW.js → use-tasks-DjQnA3sr.js} +1 -1
  152. package/dist/client/assets/{use-view-mode-B3HPjSsa.js → use-view-mode-pmOkpC-l.js} +1 -1
  153. package/dist/client/assets/{use-virtual-mcp-Dkco3wCF.js → use-virtual-mcp-D8YFOZwW.js} +1 -1
  154. package/dist/client/assets/useInfiniteQuery-z1Rh4SPR.js +1 -0
  155. package/dist/client/assets/useSuspenseInfiniteQuery-DmArxoRp.js +1 -0
  156. package/dist/client/assets/{user-BCVAIUhB.js → user-BG2r6Yob.js} +1 -1
  157. package/dist/client/assets/{view-mode-toggle-Bbj9P-zr.js → view-mode-toggle-iIz_yTY4.js} +1 -1
  158. package/dist/client/assets/workflow-detail-hy-jKDKn.js +1 -0
  159. package/dist/client/assets/{workflow-DZKRFLJh.js → workflow-w5_7cK4m.js} +1 -1
  160. package/dist/client/index.html +1 -1
  161. package/dist/server/cli.js +1 -1
  162. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  163. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  164. package/dist/server/node_modules/ansi-styles/license +9 -0
  165. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  166. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  167. package/dist/server/node_modules/environment/index.d.ts +74 -0
  168. package/dist/server/node_modules/environment/index.js +47 -0
  169. package/dist/server/node_modules/environment/license +9 -0
  170. package/dist/server/node_modules/environment/package.json +74 -0
  171. package/dist/server/node_modules/environment/readme.md +94 -0
  172. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  173. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  174. package/dist/server/node_modules/escape-string-regexp/license +9 -0
  175. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  176. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  177. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  178. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  179. package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
  180. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  181. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  182. package/dist/server/node_modules/string-width/index.d.ts +39 -0
  183. package/dist/server/node_modules/string-width/index.js +82 -0
  184. package/dist/server/node_modules/string-width/license +9 -0
  185. package/dist/server/node_modules/string-width/package.json +64 -0
  186. package/dist/server/node_modules/string-width/readme.md +66 -0
  187. package/package.json +1 -1
  188. package/dist/client/assets/ai-providers-CAEYBEbx.js +0 -1
  189. package/dist/client/assets/ai-providers-logos-D6a8kmGH.js +0 -1
  190. package/dist/client/assets/index-CKNbLfs9.js +0 -1
  191. package/dist/client/assets/registry-D49ZAHvu.js +0 -2
  192. package/dist/client/assets/store-registry-C02mfQOQ.js +0 -2
  193. package/dist/client/assets/useInfiniteQuery-mbgOLEDd.js +0 -1
  194. package/dist/client/assets/useSuspenseInfiniteQuery-DZGLPMRe.js +0 -1
  195. package/dist/client/assets/workflow-detail-Bm0PdrL9.js +0 -1
  196. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  197. package/dist/server/node_modules/xtend/LICENSE +0 -20
  198. package/dist/server/node_modules/xtend/README.md +0 -32
  199. package/dist/server/node_modules/xtend/immutable.js +0 -19
  200. package/dist/server/node_modules/xtend/mutable.js +0 -17
  201. package/dist/server/node_modules/xtend/package.json +0 -55
  202. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +1 @@
1
- import{e as ge,P as ke,j as s,B as pe,s as Ae,r as P,t as w,x as we}from"./index-DRnP8Xhy.js";import{c as U,b as Ce,a as ue,D as xe}from"./dropdown-menu-Dn3K1Gpo.js";import{a as Pe}from"./Users03-CtQ_adLe.js";import{G as Te,a as Me,I as Oe,S as ze,L as Le,b as Ie}from"./lean-canvas-recruit-modal-DZ6knxg9.js";import{W as Ee,b as Ge}from"./constants-DZ5y4NEu.js";import{b as Be,a as He}from"./use-virtual-mcp-Dkco3wCF.js";import{P as ne}from"./index-D1LVHcIe.js";import{i as $e}from"./DotsVertical-_1yE4PFi.js";import{a as Re}from"./Settings02-B2DHZxlV.js";import{s as Fe}from"./Trash01-_-2EAUWH.js";import{A as ve,ai as Ve}from"./agent-icon-DnE1m294.js";import{a as be}from"./use-navigate-to-agent-Dj0boPYr.js";import{C as Ne}from"./card-Hve9iIpZ.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-DbgILpoj.js";import{u as qe}from"./use-create-virtual-mcp-Bhi93QNY.js";import{c as Je,b as Qe,d as Ue,f as Xe,e as Ye,g as Ze,a as et,A as tt}from"./alert-dialog-DvcLf48w.js";import{S as st}from"./search-input-CbBz2_I7.js";import{s as je}from"./Plus-8zlfW9Nb.js";import"./ChevronDown-B21GyFLP.js";import"./ChevronRight-C7fFXCXU.js";import"./dialog-BSlhJimL.js";import"./X-DavTUkoo.js";import"./RefreshCcw01-DV-_PfmV.js";import"./collection-search-D_mJKf_N.js";import"./SearchMd-BgpZuBQH.js";import"./checkbox-DmWLCJJH.js";import"./use-connection-DDedfw7l.js";import"./use-collections-CDG0ivO9.js";import"./Lock01-y9D26Lk9.js";import"./extract-connection-data-Bp5NDOhQ.js";import"./constants-BwurOShK.js";import"./collections-CISD8jzc.js";import"./drawer-DwurUbp0.js";import"./tooltip-CUw8WpYG.js";import"./integration-icon-Cz-seBmA.js";import"./Container-DVwtR0PY.js";import"./use-mcp-tools-nd8RTEJZ.js";import"./AlertCircle-CtSiN7Dh.js";import"./Tool01-73PH4njb.js";import"./XClose-BpjQA_dF.js";import"./ArrowNarrowLeft-CjMD5YtT.js";import"./XCircle-BKeTm8Ww.js";import"./ArrowUpRight-VGEco3p8.js";import"./ZapSquare-BL-_ZEqM.js";import"./CheckCircle-BOjQcSoZ.js";import"./ChevronUp-DLJe-Ifh.js";import"./Star01-DupDdRAe.js";import"./Palette-xIvgAE_U.js";import"./LinkExternal01-BeNjIA73.js";import"./Sun-B1MYWGMj.js";import"./Play-esUCyQh5.js";import"./Shield01-CewVSi37.js";import"./User01-DLnrd0WJ.js";import"./Zap-DT_tBFfJ.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,r=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let a;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(a=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=a):a=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==r||t[12]!==f||t[13]!==c||t[14]!==a||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:r,className:"w-48",children:[c,a,m]}),t[11]=r,t[12]=f,t[13]=c,t[14]=a,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let r;t[10]!==d||t[11]!==i.id?(r=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=r):r=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==r?(u=s.jsxs(U,{onClick:r,children:[n,"Settings"]}),t[14]=r,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let a;t[18]!==u||t[19]!==c?(a=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=a):a=t[20];let x;t[21]!==f||t[22]!==a?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,a]}),t[21]=f,t[22]=a,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:r}=qe(f),[n,u]=P.useState(null),[c,a]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==r||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(at),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?a(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let ae,re;e[30]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},re=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),a(!0)},e[30]=ae,e[31]=re):(ae=e[30],re=e[31]);let J;e[32]!==r||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:ae,onImportDeco:re,isCreating:r,align:"end"})]}),e[32]=r,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),a(!0)},isCreating:r,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=r,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:a}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function at(e){return Ge(e.id)}export{cs as default};
1
+ import{e as ge,P as ke,j as s,B as pe,s as Ae,r as P,t as w,x as we}from"./index-BOmAbn3-.js";import{c as U,b as Ce,a as ue,D as xe}from"./dropdown-menu-BooeaeZW.js";import{a as Pe}from"./Users03-BCFGwdah.js";import{G as Te,a as Me,I as Oe,S as ze,L as Le,b as Ie}from"./lean-canvas-recruit-modal-KLORFsWq.js";import{W as Ee,b as Ge}from"./constants-Da2DvZbd.js";import{b as Be,a as He}from"./use-virtual-mcp-D8YFOZwW.js";import{P as ne}from"./index-BXOHXvkd.js";import{i as $e}from"./DotsVertical-CiluvdTj.js";import{a as Re}from"./Settings02-BgsL1r4k.js";import{s as Fe}from"./Trash01-CfK96-qY.js";import{A as ve,ai as Ve}from"./agent-icon-Y41Xl4RB.js";import{a as be}from"./use-navigate-to-agent-KmcfdsLb.js";import{C as Ne}from"./card-DQYOkC6d.js";import{f as We}from"./formatDistanceToNow-Cb2QZZJn.js";import{E as Ke}from"./empty-state-V_MWZYVh.js";import{u as qe}from"./use-create-virtual-mcp-BosIHDl_.js";import{c as Je,b as Qe,d as Ue,f as Xe,e as Ye,g as Ze,a as et,A as tt}from"./alert-dialog-DnoDZh7l.js";import{S as st}from"./search-input-C4vXNPxO.js";import{s as je}from"./Plus-DkESyBkp.js";import"./ChevronDown-BKNJxAvQ.js";import"./ChevronRight-DmLVJ7rn.js";import"./dialog-D0LCITx0.js";import"./X-ZLJ81KrS.js";import"./RefreshCcw01-DLpzNYLg.js";import"./collection-search-CqdVjZKz.js";import"./SearchMd-RHgmu5nb.js";import"./checkbox-DkmOdGV4.js";import"./use-connection-DcySEqVV.js";import"./use-collections-ciAA_3Td.js";import"./Lock01-BjCX4hvk.js";import"./extract-connection-data-JkyrF-5k.js";import"./constants-Dm-yPW31.js";import"./collections-DusXIGhy.js";import"./drawer-DWuqMoty.js";import"./tooltip-f4eQJmkn.js";import"./integration-icon-Bu4bZk46.js";import"./Container-DASuUdbK.js";import"./use-mcp-tools-C9cj3BH6.js";import"./AlertCircle-CDtbI_oO.js";import"./Tool01-CRyHj4QJ.js";import"./XClose-DXU_tOKb.js";import"./ArrowNarrowLeft-CJ8McWmC.js";import"./XCircle-B2dZZ7-3.js";import"./ArrowUpRight-CfmSEQdr.js";import"./ZapSquare-D6uI2CIK.js";import"./CheckCircle-BfnVNP63.js";import"./ChevronUp-CsX2yfUc.js";import"./Star01-CRQ6Bc0M.js";import"./Palette-CmFr12m3.js";import"./LinkExternal01-CPmlMGsQ.js";import"./Sun-DKXWmMuG.js";import"./Play-AcQdYeyW.js";import"./Shield01-BndBIezR.js";import"./User01-KY-MO20F.js";import"./Zap-25qc4enN.js";import"./differenceInSeconds-NQ4PDo0z.js";function _e(e){const t=ge.c(17),{onCreateFromScratch:i,onImportGitHub:g,onImportDeco:d,isCreating:o,align:j,side:f,showBetaBadge:p}=e,r=j===void 0?"end":j,[n]=ke();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Pe,{size:14}),t[0]=u):u=t[0];let c;t[1]!==o||t[2]!==i?(c=s.jsxs(U,{disabled:o,onClick:i,children:[u,"Create from scratch"]}),t[1]=o,t[2]=i,t[3]=c):c=t[3];let a;t[4]!==g||t[5]!==n.experimental_vibecode||t[6]!==p?(a=n.experimental_vibecode&&s.jsxs(U,{onClick:g,children:[s.jsx(Te,{className:"size-3.5"}),"Import from GitHub",p&&s.jsx("span",{className:"ml-auto text-[10px] font-medium text-muted-foreground bg-muted rounded px-1 py-0.5",children:"Beta"})]}),t[4]=g,t[5]=n.experimental_vibecode,t[6]=p,t[7]=a):a=t[7];let x;t[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("img",{src:"/logos/deco%20logo.svg",alt:"deco.cx",className:"size-3.5"}),t[8]=x):x=t[8];let m;t[9]!==d?(m=s.jsxs(U,{onClick:d,children:[x,"Import from deco.cx"]}),t[9]=d,t[10]=m):m=t[10];let _;return t[11]!==r||t[12]!==f||t[13]!==c||t[14]!==a||t[15]!==m?(_=s.jsxs(Ce,{side:f,align:r,className:"w-48",children:[c,a,m]}),t[11]=r,t[12]=f,t[13]=c,t[14]=a,t[15]=m,t[16]=_):_=t[16],_}function it(e){const t=ge.c(44),{project:i,onDeleteClick:g}=e,d=be();let o;t[0]!==d||t[1]!==i.id?(o=()=>d(i.id),t[0]=d,t[1]=i.id,t[2]=o):o=t[2];let j;t[3]!==i.title||t[4]!==o?(j=s.jsx("button",{type:"button",onClick:o,className:"absolute inset-0 z-0","aria-label":i.title}),t[3]=i.title,t[4]=o,t[5]=j):j=t[5];let f;t[6]!==i.icon||t[7]!==i.title?(f=s.jsx(ve,{icon:i.icon,name:i.title,size:"sm",className:"shrink-0 shadow-sm"}),t[6]=i.icon,t[7]=i.title,t[8]=f):f=t[8];let p;t[9]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(ue,{asChild:!0,children:s.jsx(pe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx($e,{size:20})})}),t[9]=p):p=t[9];let r;t[10]!==d||t[11]!==i.id?(r=()=>d(i.id,{search:{main:"settings"}}),t[10]=d,t[11]=i.id,t[12]=r):r=t[12];let n;t[13]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{size:16}),t[13]=n):n=t[13];let u;t[14]!==r?(u=s.jsxs(U,{onClick:r,children:[n,"Settings"]}),t[14]=r,t[15]=u):u=t[15];let c;t[16]!==g?(c=g&&s.jsxs(U,{variant:"destructive",onClick:y=>{y.stopPropagation(),g(y)},children:[s.jsx(Fe,{size:16}),"Delete"]}),t[16]=g,t[17]=c):c=t[17];let a;t[18]!==u||t[19]!==c?(a=s.jsx("div",{className:"relative z-10 pointer-events-auto transition-opacity sm:opacity-0 sm:group-hover:opacity-100",children:s.jsxs(xe,{children:[p,s.jsxs(Ce,{align:"end",children:[u,c]})]})}),t[18]=u,t[19]=c,t[20]=a):a=t[20];let x;t[21]!==f||t[22]!==a?(x=s.jsxs("div",{className:"flex items-start justify-between",children:[f,a]}),t[21]=f,t[22]=a,t[23]=x):x=t[23];let m;t[24]!==i.title?(m=s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:i.title}),t[24]=i.title,t[25]=m):m=t[25];const _=i.description||"No description";let N;t[26]!==_?(N=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:_}),t[26]=_,t[27]=N):N=t[27];let v;t[28]!==m||t[29]!==N?(v=s.jsxs("div",{className:"flex flex-col gap-1",children:[m,N]}),t[28]=m,t[29]=N,t[30]=v):v=t[30];let D;t[31]!==x||t[32]!==v?(D=s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[x,v]}),t[31]=x,t[32]=v,t[33]=D):D=t[33];let b;t[34]!==i.updated_at?(b=We(new Date(i.updated_at),{addSuffix:!0}),t[34]=i.updated_at,t[35]=b):b=t[35];let S;t[36]!==b?(S=s.jsx("div",{className:"border-t border-border mt-auto",children:s.jsx("div",{className:"h-10 flex items-center px-4.5",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:b})})}),t[36]=b,t[37]=S):S=t[37];let h;t[38]!==D||t[39]!==S?(h=s.jsxs("div",{className:"flex flex-col flex-1 pointer-events-none",children:[D,S]}),t[38]=D,t[39]=S,t[40]=h):h=t[40];let C;return t[41]!==h||t[42]!==j?(C=s.jsxs(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50",children:[j,h]}),t[41]=h,t[42]=j,t[43]=C):C=t[43],C}function cs(){const e=ge.c(80),{org:t}=Ae(),i=Be(),g=He(),d=be(),[o,j]=P.useState("");let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={navigateOnCreate:!0},e[0]=f):f=e[0];const{createVirtualMCP:p,isCreating:r}=qe(f),[n,u]=P.useState(null),[c,a]=P.useState(!1),[x,m]=P.useState(!1),[_,N]=P.useState(!1),[v,D]=P.useState(!1),[b,S]=P.useState(!1);let h,C,y,T,k,A,M,O,z;if(e[1]!==g||e[2]!==i||e[3]!==p||e[4]!==n||e[5]!==r||e[6]!==d||e[7]!==t||e[8]!==o){const Q=o.toLowerCase(),de=i.filter(l=>l.id!==t.id&&(l.title.toLowerCase().includes(Q)||l.description?.toLowerCase().includes(Q)));let te;e[18]!==i?(te=i.some(at),e[18]=i,e[19]=te):te=e[19];const De=te,fe=Ee.filter(l=>(!o||l.title.toLowerCase().includes(Q))&&!(l.id==="studio-pack"&&De)),he=i.find(ot);k=i.find(lt);const Se=l=>{w("agents_list_template_clicked",{template_id:l}),l==="site-editor"?a(!0):l==="site-diagnostics"?he?d(he.id):N(!0):l==="lean-canvas"?k?d(k.id):S(!0):l==="studio-pack"&&D(!0)};let se;e[20]!==g||e[21]!==n?(se=async()=>{if(!n)return;const{id:l,title:ye}=n;u(null);try{await g.delete.mutateAsync(l),w("agent_deleted",{agent_id:l,source:"agents_list"}),we.success(`Deleted "${ye}"`)}catch{}},e[20]=g,e[21]=n,e[22]=se):se=e[22],T=se,y=ne,C=ne.Content,h=ne.Body;let ie;e[23]===Symbol.for("react.memo_cache_sentinel")?(ie=s.jsx(ne.Title,{children:"Agents"}),e[23]=ie):ie=e[23];let le;e[24]===Symbol.for("react.memo_cache_sentinel")?(le=l=>{l.key==="Escape"&&(j(""),l.target.blur())},e[24]=le):le=e[24];let K;e[25]!==o?(K=s.jsx(st,{value:o,onChange:j,placeholder:"Search for an agent...",className:"w-full md:w-[375px]",onKeyDown:le}),e[25]=o,e[26]=K):K=e[26];let oe;e[27]===Symbol.for("react.memo_cache_sentinel")?(oe=s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),e[27]=oe):oe=e[27];let q;e[28]!==p?(q=()=>{w("agent_create_clicked",{source:"agents_list",method:"scratch"}),p()},e[28]=p,e[29]=q):q=e[29];let ae,re;e[30]===Symbol.for("react.memo_cache_sentinel")?(ae=()=>{w("agent_create_clicked",{source:"agents_list",method:"github"}),m(!0)},re=()=>{w("agent_create_clicked",{source:"agents_list",method:"deco"}),a(!0)},e[30]=ae,e[31]=re):(ae=e[30],re=e[31]);let J;e[32]!==r||e[33]!==q?(J=s.jsxs(xe,{children:[oe,s.jsx(_e,{onCreateFromScratch:q,onImportGitHub:ae,onImportDeco:re,isCreating:r,align:"end"})]}),e[32]=r,e[33]=q,e[34]=J):J=e[34],e[35]!==J||e[36]!==K?(A=s.jsxs("div",{className:"flex flex-col gap-6",children:[ie,s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[K,J]})]}),e[35]=J,e[36]=K,e[37]=A):A=e[37],M=de.length===0&&fe.length===0&&s.jsx("div",{className:"flex items-center justify-center py-20",children:s.jsx(Ke,{image:s.jsx(Ve,{size:48,className:"text-muted-foreground"}),title:o?"No agents found":"No agents yet",description:o?`No agents match "${o}"`:"Create an agent to get started.",actions:!o&&s.jsxs(xe,{children:[s.jsx(ue,{asChild:!0,children:s.jsxs(pe,{size:"sm",children:[s.jsx(je,{size:14}),"Create Agent"]})}),s.jsx(_e,{onCreateFromScratch:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"scratch"}),p()},onImportGitHub:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"github"}),m(!0)},onImportDeco:()=>{w("agent_create_clicked",{source:"agents_list_empty",method:"deco"}),a(!0)},isCreating:r,align:"center",showBetaBadge:!0})]})})}),O=de.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agents"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:de.map(l=>s.jsx(it,{project:l,onDeleteClick:()=>u({id:l.id,title:l.title})},l.id))})]}),z=fe.length>0&&s.jsxs("div",{className:"mt-6 @container",children:[s.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Agent Templates"}),s.jsx("div",{className:"grid grid-cols-1 @lg:grid-cols-2 @4xl:grid-cols-3 @6xl:grid-cols-4 gap-4",children:fe.map(l=>s.jsx(Ne,{className:"relative transition-colors group overflow-hidden flex flex-col h-full hover:bg-muted/50 cursor-pointer",onClick:()=>Se(l.id),children:s.jsx("div",{className:"flex flex-col flex-1",children:s.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[s.jsx(ve,{icon:l.icon,name:l.title,size:"sm",className:"shrink-0 shadow-sm"}),s.jsxs("div",{className:"flex flex-col gap-1",children:[s.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:l.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Click to set up"})]})]})})},l.id))})]}),e[1]=g,e[2]=i,e[3]=p,e[4]=n,e[5]=r,e[6]=d,e[7]=t,e[8]=o,e[9]=h,e[10]=C,e[11]=y,e[12]=T,e[13]=k,e[14]=A,e[15]=M,e[16]=O,e[17]=z}else h=e[9],C=e[10],y=e[11],T=e[12],k=e[13],A=e[14],M=e[15],O=e[16],z=e[17];let L;e[38]!==h||e[39]!==A||e[40]!==M||e[41]!==O||e[42]!==z?(L=s.jsxs(h,{children:[A,M,O,z]}),e[38]=h,e[39]=A,e[40]=M,e[41]=O,e[42]=z,e[43]=L):L=e[43];let I;e[44]!==C||e[45]!==L?(I=s.jsx(C,{children:L}),e[44]=C,e[45]=L,e[46]=I):I=e[46];let E;e[47]!==x?(E=s.jsx(Me,{open:x,onOpenChange:m}),e[47]=x,e[48]=E):E=e[48];let G;e[49]!==c?(G=s.jsx(Oe,{open:c,onOpenChange:a}),e[49]=c,e[50]=G):G=e[50];let B;e[51]!==_?(B=s.jsx(ze,{open:_,onOpenChange:N}),e[51]=_,e[52]=B):B=e[52];let H;e[53]!==k||e[54]!==b?(H=s.jsx(Le,{open:b,onOpenChange:S,existingAgent:k}),e[53]=k,e[54]=b,e[55]=H):H=e[55];let $;e[56]!==v?($=s.jsx(Ie,{open:v,onOpenChange:D}),e[56]=v,e[57]=$):$=e[57];const ce=!!n;let X;e[58]===Symbol.for("react.memo_cache_sentinel")?(X=Q=>!Q&&u(null),e[58]=X):X=e[58];let Y;e[59]===Symbol.for("react.memo_cache_sentinel")?(Y=s.jsx(Je,{children:"Delete Agent?"}),e[59]=Y):Y=e[59];const me=n?.title;let R;e[60]!==me?(R=s.jsxs(Qe,{children:[Y,s.jsxs(Ue,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:me}),"."]})]}),e[60]=me,e[61]=R):R=e[61];let Z;e[62]===Symbol.for("react.memo_cache_sentinel")?(Z=s.jsx(Xe,{children:"Cancel"}),e[62]=Z):Z=e[62];let F;e[63]!==T?(F=s.jsxs(Ye,{children:[Z,s.jsx(Ze,{onClick:T,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[63]=T,e[64]=F):F=e[64];let V;e[65]!==R||e[66]!==F?(V=s.jsxs(et,{children:[R,F]}),e[65]=R,e[66]=F,e[67]=V):V=e[67];let W;e[68]!==ce||e[69]!==V?(W=s.jsx(tt,{open:ce,onOpenChange:X,children:V}),e[68]=ce,e[69]=V,e[70]=W):W=e[70];let ee;return e[71]!==y||e[72]!==H||e[73]!==$||e[74]!==W||e[75]!==I||e[76]!==E||e[77]!==G||e[78]!==B?(ee=s.jsxs(y,{children:[I,E,G,B,H,$,W]}),e[71]=y,e[72]=H,e[73]=$,e[74]=W,e[75]=I,e[76]=E,e[77]=G,e[78]=B,e[79]=ee):ee=e[79],ee}function lt(e){return e.metadata?.type==="lean-canvas"}function ot(e){return e.metadata?.type==="site-diagnostics"}function at(e){return Ge(e.id)}export{cs as default};
@@ -0,0 +1 @@
1
+ import{e as t,j as i}from"./index-BOmAbn3-.js";import{O as m}from"./select-model-BAqBST4u.js";import"./checkbox-DkmOdGV4.js";import"./ChevronDown-BKNJxAvQ.js";import"./input-DFMPKZJm.js";import"./dialog-D0LCITx0.js";import"./X-ZLJ81KrS.js";import"./drawer-DWuqMoty.js";import"./tooltip-f4eQJmkn.js";import"./select-Czs_bVht.js";import"./ChevronUp-CsX2yfUc.js";import"./skeleton-DFL6A56z.js";import"./Tool01-CRyHj4QJ.js";import"./RefreshCcw01-DLpzNYLg.js";import"./SearchMd-RHgmu5nb.js";import"./Settings02-BgsL1r4k.js";import"./use-ai-providers-CTaSMN44.js";import"./constants-Da2DvZbd.js";import"./chat-context-hgW5gAmm.js";import"./use-virtual-mcp-D8YFOZwW.js";import"./use-collections-ciAA_3Td.js";import"./use-decopilot-events-CJG2rWbg.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-DjQnA3sr.js";import"./use-organization-settings-BrpxY44K.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Zap-25qc4enN.js";import"./AlertCircle-CDtbI_oO.js";import"./CheckCircle-BfnVNP63.js";import"./Trash01-CfK96-qY.js";import"./index-BXOHXvkd.js";import"./settings-section-D1IZyeMZ.js";import"./card-DQYOkC6d.js";import"./ArrowUpRight-CfmSEQdr.js";import"./switch-CgZ8SLcM.js";import"./toggle-group-BWbe6Sle.js";import"./avatar-C1td1Be6.js";import"./User01-KY-MO20F.js";import"./alert-dialog-DnoDZh7l.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function T(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{T as default};
@@ -0,0 +1 @@
1
+ const c="https://assets.decocache.com/decocms/bc2ca488-2bae-4aac-8d3e-ead262dad764/agent.png",m="https://assets.decocache.com/decocms/b2e2f64f-6025-45f7-9e8c-3b3ebdd073d8/openrouter_logojpg.jpg",i="https://assets.decocache.com/decocms/51a209ae-14bc-4b6f-8216-8eb670695bd7/Anthropic-Icon--Streamline-Svg-Logos.svg";function h(s){const e=s.toLowerCase();return e.startsWith("gpt-")||e.startsWith("o1")||e.startsWith("o3")?"openai":e.startsWith("claude-")||e.startsWith("claude.")?"anthropic":e.startsWith("gemini")?"google":e.startsWith("llama")?"meta-llama":e.startsWith("mistral")||e.startsWith("mixtral")?"mistralai":e.startsWith("qwen")?"qwen":e.startsWith("deepseek")?"deepseek":e.startsWith("grok")?"x-ai":e.startsWith("command-")?"cohere":e.startsWith("phi-")?"microsoft":null}function n(s){const e=s.modelId.includes("/")?s.modelId.split("/")[0]:void 0,t=e?a[e]:void 0;if(t)return t;const d=a[s.providerId];if(d)return d;const o=h(s.modelId);return(o?a[o]:void 0)??c}const a={"aion-labs":"https://assets.decocache.com/decocms/6da18da8-0160-4b85-8bca-84eefffebe12/images-(6).png",ai21:"https://assets.decocache.com/decocms/5d8388e9-027b-4b23-b816-90cee1cd28ad/images-(5).png",alfredpros:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",alibaba:"https://assets.decocache.com/decocms/4d113b13-5412-4d3b-96ec-3c2e7c1f7a5f/images-(8).png",allenai:"https://assets.decocache.com/decocms/21d6071a-e0da-4919-9f35-902b1d0b85b8/allen.png",alpindale:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",amazon:"https://assets.decocache.com/decocms/31e7b260-6cf0-4753-bb32-bd062b15c5f1/Amazon_icon.png",anthropic:i,"claude-code":"https://assets.decocache.com/decocms/2b91e6f8-5151-4b4f-bdf9-037ee769e6ff/Claude_AI_symbol.svg.png",codex:"https://assets.decocache.com/decocms/6ac44f1c-c0cf-4480-84b5-2ae6fe742d0b/codex-app.png.png","anthracite-org":c,"arcee-ai":"https://assets.decocache.com/decocms/ee325839-6acc-48dc-8cf7-8bab74698015/126496414.png",baidu:"https://assets.decocache.com/decocms/cf4c19f1-39b5-499e-87b7-e16dc5da2b50/images-(9).png",bytedance:"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png","bytedance-seed":"https://assets.decocache.com/decocms/1c111a26-8e1d-4a48-9d3c-fe9fb728af06/images-(18).png",cognitivecomputations:c,cohere:"https://assets.decocache.com/decocms/c942091b-b3bf-4c46-af37-fc2c1086d9f7/cohere-color.png",deepcogito:"https://assets.decocache.com/decocms/4ee77a8f-a36a-4933-8cdf-d2e8676b88d8/images-(13).png",deepseek:"https://assets.decocache.com/decocms/3611e8ac-4cad-4b0e-a1f8-8f791288ce03/images-(1).png",eleutherai:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png",essentialai:"https://assets.decocache.com/decocms/c5afc6de-1e41-457e-a6dd-91810d92541e/images-(1).jpeg",google:"https://assets.decocache.com/webdraw/17df85af-1578-42ef-ae07-4300de0d1723/gemini.svg",gryphe:"https://assets.decocache.com/decocms/a5503d3b-2056-47f2-a76c-611b7416bdc8/6798c7dccaaadd0a1318d66a_66f41d1fd146c3b0b9c76453_gryphe-logo.webp","ibm-granite":"https://assets.decocache.com/decocms/2c50018d-6f70-472d-be30-65a5e8e249f0/images-(10).png",inflection:c,inception:"https://assets.decocache.com/decocms/ff9822b8-a914-482b-bd7d-b0e46b9d5a56/images-(6).jpeg",kwaipilot:"https://assets.decocache.com/decocms/cd576e1d-1184-45ba-8162-cf2bd06d684f/images-(14).png",liquid:c,mancer:"https://assets.decocache.com/decocms/79762356-a0c5-4546-b268-ad4a0b51db51/Screenshot-2026-01-08-at-18.49.42.png",meituan:c,"meta-llama":"https://assets.decocache.com/decocms/56421cb3-488c-4cc3-83a5-16d9a303850e/images-(11).png",microsoft:"https://assets.decocache.com/decocms/0e352a51-4ea5-4f35-802e-fd82bf266683/images-(12).png",minimax:"https://assets.decocache.com/decocms/f362cc4f-7ccc-4317-afda-92e6f348fdfd/images-(2).png",mistralai:"https://assets.decocache.com/decocms/73ab9971-bbbc-40dc-99a3-5fddd9a0f340/images-(3).png",morph:c,moonshotai:"https://assets.decocache.com/decocms/b8abfea7-e8b4-4b72-b653-fdf11c9e3b66/moonshot.png",neversleep:c,"nex-agi":"https://assets.decocache.com/decocms/d2ada265-160d-4959-981d-e90210d71713/241570229.jpeg",nousresearch:"https://assets.decocache.com/decocms/496acb3d-9b5d-4759-b764-16c9ca7eb6b2/nousresearch.png",nvidia:"https://assets.decocache.com/decocms/ecca3238-fa79-4648-bb55-738f13a4293f/nvidia-7.svg",opengvlab:"https://assets.decocache.com/decocms/fb2d0c32-85f1-410a-87f4-9731dfafd248/images-(2).jpeg",openai:"https://assets.decocache.com/webdraw/15dc381c-23b4-4f6b-9ceb-9690f77a7cf5/openai.svg",openrouter:m,perplexity:"https://assets.decocache.com/decocms/3a134746-f370-4089-a3c9-fe545be0441c/images-(15).png","prime-intellect":c,qwen:"https://assets.decocache.com/decocms/ab94208c-4439-4aec-a06c-c51747120e43/Qwen_logo.svg.png",raifle:c,relace:"https://assets.decocache.com/decocms/c5dbae73-3ce0-40ca-8433-c38783fb13a9/Screenshot-2026-01-08-at-18.52.09.png",sao10k:"https://assets.decocache.com/decocms/76eaa620-ce73-43d6-8817-272c1d498b53/images-(19).png","stepfun-ai":"https://assets.decocache.com/decocms/8892b883-4905-444e-b554-648565dc7fab/images-(16).png",switchpoint:"https://assets.decocache.com/decocms/0319d595-e0dd-4d8e-a0a3-b20ff4cbddcb/images-(4).jpeg",tencent:"https://assets.decocache.com/decocms/80f2f7bd-f9ea-4fcf-b89c-c58823a389ed/images-(3).jpeg",thedrummer:"https://assets.decocache.com/decocms/5c6c09fc-cf9d-43a1-a1c3-4a1ef367b824/images-(17).png",thudm:c,tngtech:"https://assets.decocache.com/decocms/5b5648ad-f858-4687-b67b-212cf186b62d/images-(7).png",undi95:c,xiaomi:"https://assets.decocache.com/decocms/2d7191b7-fc80-4867-a431-6d443d691cfc/images-(4).png","x-ai":"https://assets.decocache.com/webdraw/7a8003ff-8f2d-4988-8693-3feb20e87eca/xai.svg","z-ai":"https://assets.decocache.com/decocms/12a0877f-c978-4880-88d1-09097e606e2f/Z.ai_(company_logo).svg.png"};export{c as D,a as P,n as g};
@@ -1,4 +1,4 @@
1
- import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-DRnP8Xhy.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
1
+ import{r as i,b6 as m,j as r,cL as A,cI as w,cJ as T,du as O,be as M,a8 as I,b_ as L,dv as v,b$ as z,df as F,ae as G,cK as k,c0 as H,e as n,c as p,ba as D}from"./index-BOmAbn3-.js";var x="AlertDialog",[V]=G(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t,modal:!0})};N.displayName=x;var W="AlertDialogTrigger",Y=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(k,{...o,...a,ref:e})});Y.displayName=W;var q="AlertDialogPortal",y=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(z,{...a,...t})};y.displayName=q;var B="AlertDialogOverlay",_=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});_.displayName=B;var f="AlertDialogContent",[J,K]=V(f),Q=F("AlertDialogContent"),b=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=i.useRef(null),P=m(e,c),u=i.useRef(null);return r.jsx(O,{contentName:f,titleName:j,docsSlug:"alert-dialog",children:r.jsx(J,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,g=>{g.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:g=>g.preventDefault(),onInteractOutside:g=>g.preventDefault(),children:[r.jsx(Q,{children:a}),r.jsx(X,{contentRef:c})]})})})});b.displayName=f;var j="AlertDialogTitle",h=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(w,{...o,...a,ref:e})});h.displayName=j;var E="AlertDialogDescription",R=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(T,{...o,...a,ref:e})});R.displayName=E;var U="AlertDialogAction",$=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});$.displayName=U;var C="AlertDialogCancel",S=i.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=K(C,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});S.displayName=C;var X=({contentRef:l})=>{const e=`\`${f}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${f}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-DRnP8Xhy.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{e as l,g as m,j as t,A as f,S as h,h as x,i as r,k as p,N as u}from"./index-BOmAbn3-.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -1 +1 @@
1
- import{e as P,s as q,K as k,n as L,o as U,a as K,x as z,r as M,c as Q,j as o,B}from"./index-DRnP8Xhy.js";import{b as V,d as H,e as Y,g as J,c as W,f as X,a as Z,A as ee}from"./alert-dialog-DvcLf48w.js";import{a as te,D as ne,b as se,c as ie}from"./dropdown-menu-Dn3K1Gpo.js";import{A as oe,x as re}from"./agent-icon-DnE1m294.js";import{i as ae}from"./DotsVertical-_1yE4PFi.js";import{s as le}from"./Trash01-_-2EAUWH.js";import{i as ce}from"./Zap-DT_tBFfJ.js";import{u as ue}from"./use-virtual-mcp-Dkco3wCF.js";import{S as $,u as G}from"./constants-DZ5y4NEu.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=G(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],L(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=G(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],L(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=G(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],L(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=G(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let C;t[12]!==d||t[13]!==f?(C={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=C):C=t[14];const F=K(C);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let b;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(b={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=b):b=t[53],b}function fe(t){z.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){z.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){z.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let C;e[3]!==r?(C=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=C):C=e[4];const F=C,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let b;e[39]!==f||e[40]!==a.isPending?(b=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=b):b=e[41];let m;e[42]!==j||e[43]!==b?(m=o.jsxs(Z,{children:[j,b]}),e[42]=j,e[43]=b,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
1
+ import{e as P,s as q,K as k,n as L,o as U,a as K,x as z,r as M,c as Q,j as o,B}from"./index-BOmAbn3-.js";import{b as V,d as H,e as Y,g as J,c as W,f as X,a as Z,A as ee}from"./alert-dialog-DnoDZh7l.js";import{a as te,D as ne,b as se,c as ie}from"./dropdown-menu-BooeaeZW.js";import{A as oe,x as re}from"./agent-icon-Y41Xl4RB.js";import{i as ae}from"./DotsVertical-CiluvdTj.js";import{s as le}from"./Trash01-CfK96-qY.js";import{i as ce}from"./Zap-25qc4enN.js";import{u as ue}from"./use-virtual-mcp-D8YFOZwW.js";import{S as $,u as G}from"./constants-Da2DvZbd.js";function me(t){if(t.paramsSchema&&typeof t.paramsSchema=="object")return t;const e={};if(Array.isArray(t.params))for(const n of t.params)e[n.name]={type:n.type,description:n.description,enum:n.enum};else t.params&&typeof t.params=="object"&&Object.assign(e,t.params);return{type:t.type,description:t.description,paramsSchema:e}}function Ee(t){const e=P.c(11),{org:n}=q(),s=t??$;let r;e[0]!==n.id||e[1]!==s?(r={connectionId:s,orgId:n.id},e[0]=n.id,e[1]=s,e[2]=r):r=e[2];const a=G(r);let i;e[3]!==t?(i=k.toolCall(t??"","TRIGGER_LIST",""),e[3]=t,e[4]=i):i=e[4];let u;e[5]!==a?(u=async()=>{const f=await a.callTool({name:"TRIGGER_LIST",arguments:{}});return(f.structuredContent??f).triggers.map(me)},e[5]=a,e[6]=u):u=e[6];const l=!!t;let d;return e[7]!==i||e[8]!==u||e[9]!==l?(d={queryKey:i,queryFn:u,enabled:l,staleTime:3e4},e[7]=i,e[8]=u,e[9]=l,e[10]=d):d=e[10],L(d)}function Se(t){const e=P.c(11),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=G(s);let a;e[2]!==n.id||e[3]!==t?(a=k.automations(n.id,t),e[2]=n.id,e[3]=t,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const l=t!=null?{virtual_mcp_id:t}:{},d=await r.callTool({name:"AUTOMATION_LIST",arguments:l});return(d.structuredContent??d).automations},e[5]=r,e[6]=t,e[7]=i):i=e[7];let u;return e[8]!==a||e[9]!==i?(u={queryKey:a,queryFn:i,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u):u=e[10],L(u)}function Oe(t){const e=P.c(12),{org:n}=q();let s;e[0]!==n.id?(s={connectionId:$,orgId:n.id},e[0]=n.id,e[1]=s):s=e[1];const r=G(s);let a;e[2]!==t||e[3]!==n.id?(a=k.automation(n.id,t),e[2]=t,e[3]=n.id,e[4]=a):a=e[4];let i;e[5]!==r||e[6]!==t?(i=async()=>{const d=await r.callTool({name:"AUTOMATION_GET",arguments:{id:t}});return(d.structuredContent??d).automation},e[5]=r,e[6]=t,e[7]=i):i=e[7];const u=!!t;let l;return e[8]!==a||e[9]!==i||e[10]!==u?(l={queryKey:a,queryFn:i,enabled:u,staleTime:1e4},e[8]=a,e[9]=i,e[10]=u,e[11]=l):l=e[11],L(l)}function we(t){return{name:"New Automation",agent:t?{id:t}:void 0,messages:[],models:{credentialId:"",thinking:{id:""}},temperature:.5,active:!0,virtual_mcp_id:t}}function de(){const t=P.c(54),{org:e}=q();let n;t[0]!==e.id?(n={connectionId:$,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const s=G(n),r=U();let a;t[2]!==e.id||t[3]!==r?(a=()=>r.invalidateQueries({queryKey:k.automationsAll(e.id)}),t[2]=e.id,t[3]=r,t[4]=a):a=t[4];const i=a;let u;t[5]!==e.id||t[6]!==r?(u=m=>r.invalidateQueries({queryKey:k.automation(e.id,m)}),t[5]=e.id,t[6]=r,t[7]=u):u=t[7];const l=u;let d;t[8]!==s?(d=async m=>{const c=await s.callTool({name:"AUTOMATION_CREATE",arguments:m});return c.structuredContent??c},t[8]=s,t[9]=d):d=t[9];let f;t[10]!==i?(f=()=>{i()},t[10]=i,t[11]=f):f=t[11];let C;t[12]!==d||t[13]!==f?(C={mutationFn:d,onSuccess:f,onError:pe},t[12]=d,t[13]=f,t[14]=C):C=t[14];const F=K(C);let D;t[15]!==s?(D=async m=>{const c=await s.callTool({name:"AUTOMATION_UPDATE",arguments:m});return c.structuredContent??c},t[15]=s,t[16]=D):D=t[16];let g;t[17]!==i||t[18]!==l?(g=(m,c)=>{i(),typeof c.id=="string"&&l(c.id)},t[17]=i,t[18]=l,t[19]=g):g=t[19];let S;t[20]!==D||t[21]!==g?(S={mutationFn:D,onSuccess:g,onError:ge},t[20]=D,t[21]=g,t[22]=S):S=t[22];const N=K(S);let p;t[23]!==s?(p=async m=>{const c=await s.callTool({name:"AUTOMATION_DELETE",arguments:{id:m}});return c.structuredContent??c},t[23]=s,t[24]=p):p=t[24];let x;t[25]!==i||t[26]!==e.id||t[27]!==r?(x=(m,c)=>{r.removeQueries({queryKey:k.automation(e.id,c)}),i()},t[25]=i,t[26]=e.id,t[27]=r,t[28]=x):x=t[28];let A;t[29]!==x||t[30]!==p?(A={mutationFn:p,onSuccess:x,onError:fe},t[29]=x,t[30]=p,t[31]=A):A=t[31];const v=K(A);let _;t[32]!==s?(_=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_ADD",arguments:m});if(c.isError){const I=c.content?.[0]?.text??"Failed to add trigger";throw new Error(I)}return c.structuredContent??c},t[32]=s,t[33]=_):_=t[33];let y;t[34]!==i||t[35]!==l?(y=m=>{i(),l(m.automation_id)},t[34]=i,t[35]=l,t[36]=y):y=t[36];let E;t[37]!==_||t[38]!==y?(E={mutationFn:_,onSuccess:y},t[37]=_,t[38]=y,t[39]=E):E=t[39];const O=K(E);let h;t[40]!==s?(h=async m=>{const c=await s.callTool({name:"AUTOMATION_TRIGGER_REMOVE",arguments:{trigger_id:m.trigger_id}});return c.structuredContent??c},t[40]=s,t[41]=h):h=t[41];let T;t[42]!==i||t[43]!==l?(T=(m,c)=>{i(),l(c.automation_id)},t[42]=i,t[43]=l,t[44]=T):T=t[44];let j;t[45]!==h||t[46]!==T?(j={mutationFn:h,onSuccess:T},t[45]=h,t[46]=T,t[47]=j):j=t[47];const w=K(j);let b;return t[48]!==F||t[49]!==v||t[50]!==O||t[51]!==w||t[52]!==N?(b={create:F,update:N,remove:v,triggerAdd:O,triggerRemove:w},t[48]=F,t[49]=v,t[50]=O,t[51]=w,t[52]=N,t[53]=b):b=t[53],b}function fe(t){z.error(t instanceof Error?t.message:"Failed to delete automation")}function ge(t){z.error(t instanceof Error?t.message:"Failed to update automation")}function pe(t){z.error(t instanceof Error?t.message:"Failed to create automation")}function Fe(t){const e=P.c(51),{automation:n,showAgent:s,onClick:r}=t,{remove:a}=de(),[i,u]=M.useState(!1),l=ue(s?n.agent?.id??void 0:void 0);let d;e[0]!==n.id||e[1]!==a?(d=()=>{a.mutate(n.id),u(!1)},e[0]=n.id,e[1]=a,e[2]=d):d=e[2];const f=d;let C;e[3]!==r?(C=R=>{R.target===R.currentTarget&&(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),r())},e[3]=r,e[4]=C):C=e[4];const F=C,D=n.active&&n.trigger_count>0?"bg-emerald-500":"bg-muted-foreground/40";let g;e[5]!==D?(g=Q("inline-block size-2 rounded-full shrink-0",D),e[5]=D,e[6]=g):g=e[6];const S=n.active&&n.trigger_count>0?"Active":n.active?"No triggers configured":"Paused";let N;e[7]!==g||e[8]!==S?(N=o.jsx("span",{className:g,"aria-label":S}),e[7]=g,e[8]=S,e[9]=N):N=e[9];let p;e[10]!==l||e[11]!==s?(p=s&&l&&o.jsx(oe,{icon:l.icon??null,name:l.title,size:"xs",className:"shrink-0"}),e[10]=l,e[11]=s,e[12]=p):p=e[12];let x;e[13]!==n.name?(x=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:n.name}),e[13]=n.name,e[14]=x):x=e[14];let A;e[15]!==l||e[16]!==s?(A=s&&l&&o.jsxs("span",{className:"text-xs text-muted-foreground truncate",children:["· ",l.title]}),e[15]=l,e[16]=s,e[17]=A):A=e[17];let v;e[18]!==x||e[19]!==A?(v=o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[x,A]}),e[18]=x,e[19]=A,e[20]=v):v=e[20];let _;e[21]!==n.nearest_next_run_at||e[22]!==n.trigger_count?(_=o.jsx(ye,{triggerCount:n.trigger_count,nextRunAt:n.nearest_next_run_at}),e[21]=n.nearest_next_run_at,e[22]=n.trigger_count,e[23]=_):_=e[23];let y;e[24]!==v||e[25]!==_?(y=o.jsxs("div",{className:"flex-1 min-w-0 flex flex-col gap-0.5",children:[v,_]}),e[24]=v,e[25]=_,e[26]=y):y=e[26];let E;e[27]===Symbol.for("react.memo_cache_sentinel")?(E=o.jsx(te,{asChild:!0,children:o.jsx(B,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 opacity-0 group-hover:opacity-100 data-[state=open]:opacity-100 transition-opacity",children:o.jsx(ae,{size:16})})}),e[27]=E):E=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=o.jsx("div",{onClick:_e,onKeyDown:xe,role:"presentation",className:"shrink-0",children:o.jsxs(ne,{children:[E,o.jsx(se,{align:"end",children:o.jsxs(ie,{variant:"destructive",onClick:R=>{R.stopPropagation(),u(!0)},children:[o.jsx(le,{size:16}),"Delete"]})})]})}),e[28]=O):O=e[28];let h;e[29]!==F||e[30]!==r||e[31]!==y||e[32]!==N||e[33]!==p?(h=o.jsxs("div",{role:"button",tabIndex:0,onClick:r,onKeyDown:F,className:"group w-full flex items-center gap-3 px-4 py-3 border-b border-border text-left hover:bg-muted/50 transition-colors cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[N,p,y,O]}),e[29]=F,e[30]=r,e[31]=y,e[32]=N,e[33]=p,e[34]=h):h=e[34];let T;e[35]===Symbol.for("react.memo_cache_sentinel")?(T=o.jsx(W,{children:"Delete automation?"}),e[35]=T):T=e[35];let j;e[36]!==n.name?(j=o.jsxs(V,{children:[T,o.jsxs(H,{children:["This removes"," ",o.jsx("span",{className:"font-medium text-foreground",children:n.name})," ","and all of its triggers. This action cannot be undone."]})]}),e[36]=n.name,e[37]=j):j=e[37];let w;e[38]===Symbol.for("react.memo_cache_sentinel")?(w=o.jsx(X,{children:"Cancel"}),e[38]=w):w=e[38];let b;e[39]!==f||e[40]!==a.isPending?(b=o.jsxs(Y,{children:[w,o.jsx(J,{onClick:f,disabled:a.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),e[39]=f,e[40]=a.isPending,e[41]=b):b=e[41];let m;e[42]!==j||e[43]!==b?(m=o.jsxs(Z,{children:[j,b]}),e[42]=j,e[43]=b,e[44]=m):m=e[44];let c;e[45]!==i||e[46]!==m?(c=o.jsx(ee,{open:i,onOpenChange:u,children:m}),e[45]=i,e[46]=m,e[47]=c):c=e[47];let I;return e[48]!==h||e[49]!==c?(I=o.jsxs(o.Fragment,{children:[h,c]}),e[48]=h,e[49]=c,e[50]=I):I=e[50],I}function xe(t){return t.stopPropagation()}function _e(t){return t.stopPropagation()}function ye(t){const e=P.c(4),{triggerCount:n,nextRunAt:s}=t;if(n===0){let a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("span",{className:"text-xs text-muted-foreground",children:"No triggers configured"}),e[0]=a):a=e[0],a}let r;return e[1]!==s||e[2]!==n?(r=o.jsx("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground min-w-0",children:s?o.jsxs(o.Fragment,{children:[o.jsx(re,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:["Next run ",new Date(s).toLocaleString()]})]}):o.jsxs(o.Fragment,{children:[o.jsx(ce,{size:12,className:"shrink-0"}),o.jsxs("span",{className:"truncate",children:[n," trigger",n===1?"":"s"]})]})}),e[1]=s,e[2]=n,e[3]=r):r=e[3],r}export{Fe as A,Ee as a,Oe as b,Se as c,we as d,de as u};
@@ -1 +1 @@
1
- import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-DRnP8Xhy.js";import{s as O}from"./Plus-8zlfW9Nb.js";import{i as _}from"./Zap-DT_tBFfJ.js";import{S as V}from"./search-input-CbBz2_I7.js";import{P as p}from"./index-D1LVHcIe.js";import{E as b}from"./empty-state-DbgILpoj.js";import{c as q,A as D}from"./automation-list-row-DsEcFwqj.js";import{a as F}from"./use-navigate-to-agent-Dj0boPYr.js";import{b as G}from"./use-virtual-mcp-Dkco3wCF.js";import"./SearchMd-BgpZuBQH.js";import"./tooltip-CUw8WpYG.js";import"./X-DavTUkoo.js";import"./alert-dialog-DvcLf48w.js";import"./dropdown-menu-Dn3K1Gpo.js";import"./ChevronDown-B21GyFLP.js";import"./ChevronRight-C7fFXCXU.js";import"./DotsVertical-_1yE4PFi.js";import"./agent-icon-DnE1m294.js";import"./AlertCircle-CtSiN7Dh.js";import"./Tool01-73PH4njb.js";import"./XClose-BpjQA_dF.js";import"./RefreshCcw01-DV-_PfmV.js";import"./ArrowNarrowLeft-CjMD5YtT.js";import"./XCircle-BKeTm8Ww.js";import"./ArrowUpRight-VGEco3p8.js";import"./ZapSquare-BL-_ZEqM.js";import"./Users03-CtQ_adLe.js";import"./CheckCircle-BOjQcSoZ.js";import"./ChevronUp-DLJe-Ifh.js";import"./Container-DVwtR0PY.js";import"./Star01-DupDdRAe.js";import"./Palette-xIvgAE_U.js";import"./LinkExternal01-BeNjIA73.js";import"./Lock01-y9D26Lk9.js";import"./Sun-B1MYWGMj.js";import"./Play-esUCyQh5.js";import"./Settings02-B2DHZxlV.js";import"./Shield01-CewVSi37.js";import"./Trash01-_-2EAUWH.js";import"./User01-DLnrd0WJ.js";import"./constants-DZ5y4NEu.js";import"./use-collections-CDG0ivO9.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,B=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(B.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
1
+ import{e as L,s as R,f as T,r as M,j as e,B as $,t as S}from"./index-BOmAbn3-.js";import{s as O}from"./Plus-DkESyBkp.js";import{i as _}from"./Zap-25qc4enN.js";import{S as V}from"./search-input-C4vXNPxO.js";import{P as p}from"./index-BXOHXvkd.js";import{E as b}from"./empty-state-V_MWZYVh.js";import{c as q,A as D}from"./automation-list-row-CAHW7UMQ.js";import{a as F}from"./use-navigate-to-agent-KmcfdsLb.js";import{b as G}from"./use-virtual-mcp-D8YFOZwW.js";import"./SearchMd-RHgmu5nb.js";import"./tooltip-f4eQJmkn.js";import"./X-ZLJ81KrS.js";import"./alert-dialog-DnoDZh7l.js";import"./dropdown-menu-BooeaeZW.js";import"./ChevronDown-BKNJxAvQ.js";import"./ChevronRight-DmLVJ7rn.js";import"./DotsVertical-CiluvdTj.js";import"./agent-icon-Y41Xl4RB.js";import"./AlertCircle-CDtbI_oO.js";import"./Tool01-CRyHj4QJ.js";import"./XClose-DXU_tOKb.js";import"./RefreshCcw01-DLpzNYLg.js";import"./ArrowNarrowLeft-CJ8McWmC.js";import"./XCircle-B2dZZ7-3.js";import"./ArrowUpRight-CfmSEQdr.js";import"./ZapSquare-D6uI2CIK.js";import"./Users03-BCFGwdah.js";import"./CheckCircle-BfnVNP63.js";import"./ChevronUp-CsX2yfUc.js";import"./Container-DASuUdbK.js";import"./Star01-CRQ6Bc0M.js";import"./Palette-CmFr12m3.js";import"./LinkExternal01-CPmlMGsQ.js";import"./Lock01-BjCX4hvk.js";import"./Sun-DKXWmMuG.js";import"./Play-AcQdYeyW.js";import"./Settings02-BgsL1r4k.js";import"./Shield01-BndBIezR.js";import"./Trash01-CfK96-qY.js";import"./User01-KY-MO20F.js";import"./constants-Da2DvZbd.js";import"./use-collections-ciAA_3Td.js";function Lt(){const t=L.c(18),{org:u}=R(),{data:y}=q(void 0),d=y===void 0?[]:y,B=G(),f=F(),g=T(),[x,k]=M.useState(""),h=x.toLowerCase(),E=new Map(B.map(H)),A=d.filter(o=>{if(!h||o.name.toLowerCase().includes(h))return!0;const n=o.agent?E.get(o.agent.id):void 0;return!!(n&&n.title.toLowerCase().includes(h))});let a;t[0]!==f?(a=(o,n)=>{n&&(S("automations_list_row_clicked",{automation_id:o,agent_id:n,source:"settings_automations"}),f(n,{search:{main:"automation:"+o}}))},t[0]=f,t[1]=a):a=t[1];const P=a;let m;t[2]!==g||t[3]!==u.slug?(m=()=>{S("automations_empty_state_browse_agents_clicked"),g({to:"/$org/settings/agents",params:{org:u.slug}})},t[2]=g,t[3]=u.slug,t[4]=m):m=t[4];const z=m,j=p,w=p,v=p;let c;t[5]===Symbol.for("react.memo_cache_sentinel")?(c=e.jsx(p.Title,{children:"Automations"}),t[5]=c):c=t[5];const C=d.length>0&&e.jsx(V,{value:x,onChange:k,placeholder:"Search automations...",className:"w-full md:w-[375px]"});let s;t[6]!==C?(s=e.jsxs("div",{className:"flex flex-col gap-6",children:[c,C]}),t[6]=C,t[7]=s):s=t[7];const N=d.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations yet",description:"Automations are created per agent. Open an agent and add one from its Automations tab.",actions:e.jsxs($,{size:"sm",onClick:z,children:[e.jsx(O,{size:14}),"Browse agents"]})})}):A.length===0?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(b,{image:e.jsx(_,{size:48,className:"text-muted-foreground"}),title:"No automations found",description:`No automations match "${x}"`})}):e.jsx("div",{className:"mt-6 rounded-xl border border-border overflow-hidden",children:A.map(o=>e.jsx(D,{automation:o,showAgent:!0,onClick:()=>P(o.id,o.agent?.id??null)},o.id))});let i;t[8]!==v.Body||t[9]!==s||t[10]!==N?(i=e.jsxs(v.Body,{children:[s,N]}),t[8]=v.Body,t[9]=s,t[10]=N,t[11]=i):i=t[11];let r;t[12]!==w.Content||t[13]!==i?(r=e.jsx(w.Content,{children:i}),t[12]=w.Content,t[13]=i,t[14]=r):r=t[14];let l;return t[15]!==j||t[16]!==r?(l=e.jsx(j,{children:r}),t[15]=j,t[16]=r,t[17]=l):l=t[17],l}function H(t){return[t.id,t]}export{Lt as default};
@@ -1 +1 @@
1
- import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-DRnP8Xhy.js";import{s as L}from"./User01-DLnrd0WJ.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{e as k,j as i,r as V,c as m,aX as S,cg as $,ch as O,ci as U}from"./index-BOmAbn3-.js";import{s as L}from"./User01-KY-MO20F.js";function M(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(U,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function T(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx($,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}function _(r){const e=k.c(8);let s,t;e[0]!==r?({className:s,...t}=r,e[0]=r,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let a;return e[5]!==t||e[6]!==o?(a=i.jsx(O,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=a):a=e[7],a}const R=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],D="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function W(r){let e=0;for(let t=0;t<r.length;t++)e=r.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%R.length;return R[s]}const I=S("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),X=S("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),B=r=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[r]||e.base};function G(r){const e=k.c(35);let s,t,o,a,n,d,g,l;e[0]!==r?({url:l,fallback:t,shape:a,size:n,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,[f,x]=V.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(j){z=D;break e}if(typeof t=="string"){let c;e[11]!==t?(c=W(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=R[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(I({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(L,{size:B(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(X({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(_,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(M,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(r){const e=k.c(18);let s,t,o,a,n,d,g,l;e[0]!==r?({shape:a,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=r,e[0]=r,e[1]=s,e[2]=t,e[3]=o,e[4]=a,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],a=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=a===void 0?"square":a,h=n===void 0?"base":n,u=d===void 0?"cover":d,j=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==j||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(G,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:j,...o}),e[9]=s,e[10]=t,e[11]=j,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(I({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{e as d,c as g,j as u,aY as l,aX as v}from"./index-DRnP8Xhy.js";const b=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
1
+ import{e as d,c as g,j as u,aY as l,aX as v}from"./index-BOmAbn3-.js";const b=v("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/20 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",warning:"border-transparent bg-warning text-warning-foreground [a&]:hover:bg-warning/90 focus-visible:ring-warning/20 dark:focus-visible:ring-warning/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,i;e[0]!==o?({className:r,variant:i,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=i):(r=e[1],s=e[2],a=e[3],i=e[4]);const c=(a===void 0?!1:a)?l:"span";let t;e[5]!==r||e[6]!==i?(t=g(b({variant:i}),r),e[5]=r,e[6]=i,e[7]=t):t=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==t?(n=u.jsx(c,{"data-slot":"badge",className:t,...s}),e[8]=c,e[9]=s,e[10]=t,e[11]=n):n=e[11],n}export{x as B};
@@ -1 +1 @@
1
- import{e as q,$ as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,x as K,r as C,c as xe}from"./index-DRnP8Xhy.js";import{S as De,u as Ae}from"./constants-DZ5y4NEu.js";import{t as Be,i as Oe}from"./ChevronDown-B21GyFLP.js";import{i as Te}from"./ChevronRight-C7fFXCXU.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-DupDdRAe.js";import{n as Re}from"./LinkExternal01-BeNjIA73.js";import{s as ye}from"./Plus-8zlfW9Nb.js";import{s as $e}from"./Trash01-_-2EAUWH.js";import{i as ze}from"./X-DavTUkoo.js";import{i as Le}from"./Zap-DT_tBFfJ.js";import{c as Ue,b as Ke,d as Xe,f as qe,g as Ge,e as Me,a as He,A as Qe}from"./alert-dialog-DvcLf48w.js";import{I as M}from"./input-liZY-axz.js";import{T as Ye}from"./textarea-CkxfQbxI.js";import{P as ue}from"./index-D1LVHcIe.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./tooltip-CUw8WpYG.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(ze,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Le,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(Re,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let R;e[42]!==f?(R=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=R):R=e[43];let $;e[44]!==t.logo||e[45]!==t.name?($=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=$):$=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,z;e[62]!==_?(T=N=>{N.stopPropagation(),_()},z=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=z):(T=e[63],z=e[64]);const L=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==z||e[72]!==L||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:z,title:L,children:A}),e[69]=G,e[70]=T,e[71]=z,e[72]=L,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx($e,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==R||e[80]!==$||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[R,$,O,S,E,I,de]}),e[78]=P,e[79]=R,e[80]=$,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,R=ue,$=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const z=h.map(T);let L;s[40]!==z?(L=n.jsx("div",{className:G,children:z}),s[40]=z,s[41]=L):L=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==L?(U=n.jsxs("div",{className:ie,children:[S,E,Q,L]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=L,s[46]=U):U=s[46];let D;s[47]!==$.Body||s[48]!==U?(D=n.jsx($.Body,{children:U}),s[47]=$.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==R.Content||s[51]!==D?(A=n.jsx(R.Content,{children:D}),s[50]=R.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
1
+ import{e as q,$ as ke,s as we,o as Se,K as je,n as Ee,a as ce,j as n,B as ve,t as Y,x as K,r as C,c as xe}from"./index-BOmAbn3-.js";import{S as De,u as Ae}from"./constants-Da2DvZbd.js";import{t as Be,i as Oe}from"./ChevronDown-BKNJxAvQ.js";import{i as Te}from"./ChevronRight-DmLVJ7rn.js";import{s as Ie,t as Fe,i as Pe}from"./Star01-CRQ6Bc0M.js";import{n as Re}from"./LinkExternal01-CPmlMGsQ.js";import{s as ye}from"./Plus-DkESyBkp.js";import{s as $e}from"./Trash01-CfK96-qY.js";import{i as ze}from"./X-ZLJ81KrS.js";import{i as Le}from"./Zap-25qc4enN.js";import{c as Ue,b as Ke,d as Xe,f as qe,g as Ge,e as Me,a as He,A as Qe}from"./alert-dialog-DnoDZh7l.js";import{I as M}from"./input-DFMPKZJm.js";import{T as Ye}from"./textarea-dZeCqaKZ.js";import{P as ue}from"./index-BXOHXvkd.js";import{u as Ne}from"./unwrap-tool-result-BYXdCQMg.js";import"./tooltip-f4eQJmkn.js";function ge(s){const e=q.c(17),{title:t,children:m,onEdit:o,editing:f,onSave:u,onCancel:l,className:p}=s,v=f&&"ring-2 ring-ring/30";let c;e[0]!==p||e[1]!==v?(c=xe("group relative rounded-2xl border border-border/60 bg-background p-5",v,p),e[0]=p,e[1]=v,e[2]=c):c=e[2];let h;e[3]!==t?(h=n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t}),e[3]=t,e[4]=h):h=e[4];let d;e[5]!==f||e[6]!==l||e[7]!==o||e[8]!==u?(d=f?n.jsxs("div",{className:"flex gap-1",children:[n.jsx("button",{type:"button",onClick:l,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted hover:bg-muted-foreground/15",children:n.jsx(ze,{size:13,className:"text-muted-foreground"})}),n.jsx("button",{type:"button",onClick:u,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-primary/10 hover:bg-primary/20",children:n.jsx(Oe,{size:13,className:"text-primary"})})]}):o&&n.jsx("button",{type:"button",onClick:o,className:"flex h-7 w-7 items-center justify-center rounded-lg bg-muted opacity-0 transition-opacity duration-150 hover:bg-muted-foreground/15 group-hover:opacity-100",children:n.jsx(Pe,{size:13,className:"text-muted-foreground"})}),e[5]=f,e[6]=l,e[7]=o,e[8]=u,e[9]=d):d=e[9];let a;e[10]!==h||e[11]!==d?(a=n.jsxs("div",{className:"mb-4 flex items-center justify-between",children:[h,d]}),e[10]=h,e[11]=d,e[12]=a):a=e[12];let x;return e[13]!==m||e[14]!==c||e[15]!==a?(x=n.jsxs("div",{className:c,children:[a,m]}),e[13]=m,e[14]=c,e[15]=a,e[16]=x):x=e[16],x}function Je(s){const e=q.c(25),{onExtract:t,isExtracting:m}=s,[o,f]=C.useState("");let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-primary/10",children:n.jsx(Le,{size:18,className:"text-primary"})}),e[0]=u):u=e[0];let l,p;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("p",{className:"text-sm font-medium text-foreground",children:"Auto-extract brand context"}),p=n.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Enter your website URL and we'll automatically extract your brand colors, fonts, logos, and company overview."}),e[1]=l,e[2]=p):(l=e[1],p=e[2]);let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=r=>f(r.target.value),e[3]=v):v=e[3];let c;e[4]!==o||e[5]!==m||e[6]!==t?(c=r=>{r.key==="Enter"&&o.trim()&&!m&&t(o.trim())},e[4]=o,e[5]=m,e[6]=t,e[7]=c):c=e[7];let h;e[8]!==o||e[9]!==c?(h=n.jsx(M,{placeholder:"acme.com",value:o,onChange:v,className:"max-w-xs",onKeyDown:c}),e[8]=o,e[9]=c,e[10]=h):h=e[10];let d;e[11]!==o||e[12]!==m?(d=!o.trim()||m,e[11]=o,e[12]=m,e[13]=d):d=e[13];let a;e[14]!==o||e[15]!==t?(a=()=>t(o.trim()),e[14]=o,e[15]=t,e[16]=a):a=e[16];let x;e[17]===Symbol.for("react.memo_cache_sentinel")?(x=n.jsx(Ie,{size:14}),e[17]=x):x=e[17];const j=m?"Extracting...":"Extract";let b;e[18]!==j||e[19]!==d||e[20]!==a?(b=n.jsxs(ve,{variant:"outline",disabled:d,onClick:a,children:[x,j]}),e[18]=j,e[19]=d,e[20]=a,e[21]=b):b=e[21];let g;return e[22]!==b||e[23]!==h?(g=n.jsx("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-5",children:n.jsxs("div",{className:"flex items-start gap-4",children:[u,n.jsxs("div",{className:"flex-1",children:[l,p,n.jsxs("div",{className:"mt-3 flex gap-2",children:[h,b]})]})]})}),e[22]=b,e[23]=h,e[24]=g):g=e[24],g}function Ve(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.name??""),[p,v]=C.useState(t.domain??""),[c,h]=C.useState(t.overview??"");let d;e[0]!==t.domain||e[1]!==t.name||e[2]!==t.overview?(d=()=>{l(t.name??""),v(t.domain??""),h(t.overview??""),f(!0)},e[0]=t.domain,e[1]=t.name,e[2]=t.overview,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==m||e[7]!==c?(x=()=>{m({name:u,domain:p,overview:c}),f(!1)},e[4]=p,e[5]=u,e[6]=m,e[7]=c,e[8]=x):x=e[8];const j=x,b=!t.name&&!t.domain&&!t.overview;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.domain||e[11]!==t.name||e[12]!==t.overview||e[13]!==p||e[14]!==o||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Company name"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"Acme Corp"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Domain"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"acme.com"})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Overview"}),n.jsx(Ye,{value:c,onChange:y=>h(y.target.value),placeholder:"Brief description of what the company does...",rows:3})]})]}):b?n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No company info yet. Click edit to add your company name, domain, and overview."}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"mb-3 flex items-start justify-between gap-4",children:[n.jsx("h2",{className:"text-xl font-semibold leading-tight text-foreground",children:t.name}),t.domain&&n.jsxs("a",{href:`https://${t.domain}`,target:"_blank",rel:"noopener noreferrer",className:"mt-0.5 flex shrink-0 items-center gap-1 text-xs text-muted-foreground transition-colors hover:text-foreground",children:[n.jsx(Re,{size:11}),t.domain]})]}),t.overview&&n.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:t.overview})]}),e[10]=t.domain,e[11]=t.name,e[12]=t.overview,e[13]=p,e[14]=o,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Company Overview",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}function We(s){const e=q.c(24),{brand:t,onSave:m}=s,[o,f]=C.useState(!1),[u,l]=C.useState(t.logo??""),[p,v]=C.useState(t.favicon??""),[c,h]=C.useState(t.ogImage??"");let d;e[0]!==t.favicon||e[1]!==t.logo||e[2]!==t.ogImage?(d=()=>{l(t.logo??""),v(t.favicon??""),h(t.ogImage??""),f(!0)},e[0]=t.favicon,e[1]=t.logo,e[2]=t.ogImage,e[3]=d):d=e[3];const a=d;let x;e[4]!==p||e[5]!==u||e[6]!==c||e[7]!==m?(x=()=>{m({logo:u||null,favicon:p||null,ogImage:c||null}),f(!1)},e[4]=p,e[5]=u,e[6]=c,e[7]=m,e[8]=x):x=e[8];const j=x,b=t.logo||t.favicon||t.ogImage;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=()=>f(!1),e[9]=g):g=e[9];let r;e[10]!==t.favicon||e[11]!==t.logo||e[12]!==t.ogImage||e[13]!==o||e[14]!==p||e[15]!==b||e[16]!==u||e[17]!==c?(r=o?n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Logo URL"}),n.jsx(M,{value:u,onChange:y=>l(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"Favicon URL"}),n.jsx(M,{value:p,onChange:y=>v(y.target.value),placeholder:"https://..."})]}),n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:"OG Image URL"}),n.jsx(M,{value:c,onChange:y=>h(y.target.value),placeholder:"https://..."})]})]}):b?n.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.logo?n.jsx("img",{src:t.logo,alt:"Logo",className:"h-full w-full object-contain p-3"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No logo"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Logo"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.favicon?n.jsx("img",{src:t.favicon,alt:"Favicon",className:"h-12 w-12 object-contain"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No favicon"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Favicon"})]}),n.jsxs("div",{className:"flex flex-col gap-1.5",children:[n.jsx("div",{className:"flex aspect-video w-full items-center justify-center overflow-hidden rounded-xl",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"8px 8px",backgroundPosition:"0 0, 4px 4px",backgroundColor:"#fff"},children:t.ogImage?n.jsx("img",{src:t.ogImage,alt:"OG",className:"h-full w-full object-contain",loading:"lazy"}):n.jsx("span",{className:"text-[10px] text-muted-foreground/70",children:"No SEO image"})}),n.jsx("span",{className:"text-[10px] text-muted-foreground",children:"SEO / OG image"})]})]}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No logos added yet. Click edit to add logo, favicon, and OG image URLs."}),e[10]=t.favicon,e[11]=t.logo,e[12]=t.ogImage,e[13]=o,e[14]=p,e[15]=b,e[16]=u,e[17]=c,e[18]=r):r=e[18];let i;return e[19]!==o||e[20]!==j||e[21]!==a||e[22]!==r?(i=n.jsx(ge,{title:"Logos & Images",onEdit:a,editing:o,onSave:j,onCancel:g,children:r}),e[19]=o,e[20]=j,e[21]=a,e[22]=r,e[23]=i):i=e[23],i}const _e=[{key:"heading",label:"Headings"},{key:"body",label:"Body"},{key:"code",label:"Code"}];function Ze(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.fonts?(u=t.fonts??{},e[0]=t.fonts,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.fonts?(v=()=>{p(t.fonts??{}),f(!0)},e[2]=t.fonts,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(tt);m({fonts:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.fonts?(a=t.fonts&&Object.values(t.fonts).some(et),e[7]=t.fonts,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.fonts||e[11]!==o||e[12]!==l||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:_e.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{children:[n.jsx("label",{className:"mb-1 block text-xs text-muted-foreground",children:y}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:`Font family for ${y.toLowerCase()}`})]},i)})}):x?n.jsx("div",{className:"space-y-3",children:_e.filter(r=>{const{key:i}=r;return t.fonts?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-3",children:[n.jsx("span",{className:"w-9 text-xl font-medium leading-none text-foreground",children:"Aa"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium leading-none text-foreground",children:t.fonts[i]}),n.jsx("p",{className:"mt-0.5 text-xs text-muted-foreground",children:y})]})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No fonts defined. Click edit to add your brand fonts."}),e[10]=t.fonts,e[11]=o,e[12]=l,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Fonts",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function et(s){return s?.trim()}function tt(s){return s?.trim()}const Ce=[{key:"primary",label:"Primary"},{key:"secondary",label:"Secondary"},{key:"accent",label:"Accent"},{key:"background",label:"Background"},{key:"foreground",label:"Foreground"}];function st(s){const e=q.c(20),{brand:t,onSave:m}=s,[o,f]=C.useState(!1);let u;e[0]!==t.colors?(u=t.colors??{},e[0]=t.colors,e[1]=u):u=e[1];const[l,p]=C.useState(u);let v;e[2]!==t.colors?(v=()=>{p(t.colors??{}),f(!0)},e[2]=t.colors,e[3]=v):v=e[3];const c=v;let h;e[4]!==l||e[5]!==m?(h=()=>{const r=Object.values(l).some(ot);m({colors:r?l:null}),f(!1)},e[4]=l,e[5]=m,e[6]=h):h=e[6];const d=h;let a;e[7]!==t.colors?(a=t.colors&&Object.values(t.colors).some(nt),e[7]=t.colors,e[8]=a):a=e[8];const x=a;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=()=>f(!1),e[9]=j):j=e[9];let b;e[10]!==t.colors||e[11]!==l||e[12]!==o||e[13]!==x?(b=o?n.jsx("div",{className:"space-y-2",children:Ce.map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx("input",{type:"color",value:l[i]??"#000000",onChange:_=>p({...l,[i]:_.target.value}),className:"h-9 w-9 shrink-0 cursor-pointer rounded-lg border border-border bg-transparent p-0.5"}),n.jsx(M,{value:l[i]??"",onChange:_=>p({...l,[i]:_.target.value}),placeholder:"#000000",className:"w-28"}),n.jsx("span",{className:"flex-1 text-xs text-muted-foreground",children:y})]},i)})}):x?n.jsx("div",{className:"flex flex-wrap gap-4",children:Ce.filter(r=>{const{key:i}=r;return t.colors?.[i]}).map(r=>{const{key:i,label:y}=r;return n.jsxs("div",{className:"flex flex-col items-center gap-2",children:[n.jsx("div",{className:"h-14 w-14 rounded-full shadow-sm",style:{backgroundColor:t.colors[i],border:t.colors[i]==="#FFFFFF"?"1px solid #e5e7eb":void 0}}),n.jsx("p",{className:"font-mono text-[10px] text-muted-foreground",children:t.colors[i]}),n.jsx("p",{className:"text-[10px] text-muted-foreground",children:y})]},i)})}):n.jsx("p",{className:"text-sm text-muted-foreground/60",children:"No colors defined. Click edit to add your brand palette."}),e[10]=t.colors,e[11]=l,e[12]=o,e[13]=x,e[14]=b):b=e[14];let g;return e[15]!==o||e[16]!==d||e[17]!==c||e[18]!==b?(g=n.jsx(ge,{title:"Colors",onEdit:c,editing:o,onSave:d,onCancel:j,children:b}),e[15]=o,e[16]=d,e[17]=c,e[18]=b,e[19]=g):g=e[19],g}function nt(s){return s?.trim()}function ot(s){return s?.trim()}function at(s){const e=q.c(123),{brand:t,client:m,onChanged:o}=s,[f,u]=C.useState(t.isDefault??!1),[l,p]=C.useState(!1);let v;e[0]!==t.colors||e[1]!==t.domain||e[2]!==t.favicon||e[3]!==t.fonts||e[4]!==t.id||e[5]!==t.images||e[6]!==t.logo||e[7]!==t.name||e[8]!==t.ogImage||e[9]!==t.overview||e[10]!==m?(v=async N=>{const be={id:t.id,name:N.name??t.name??"",domain:N.domain??t.domain??"",overview:N.overview??t.overview??"",logo:"logo"in N?N.logo:t.logo,favicon:"favicon"in N?N.favicon:t.favicon,ogImage:"ogImage"in N?N.ogImage:t.ogImage,fonts:"fonts"in N?N.fonts:t.fonts,colors:"colors"in N?N.colors:t.colors,images:"images"in N?N.images:t.images};await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:be})},e[0]=t.colors,e[1]=t.domain,e[2]=t.favicon,e[3]=t.fonts,e[4]=t.id,e[5]=t.images,e[6]=t.logo,e[7]=t.name,e[8]=t.ogImage,e[9]=t.overview,e[10]=m,e[11]=v):v=e[11];let c;e[12]!==t.id||e[13]!==o?(c=(N,be)=>{Y("brand_updated",{brand_id:t.id,fields:Object.keys(be)}),o(),K.success("Brand context saved")},e[12]=t.id,e[13]=o,e[14]=c):c=e[14];let h;e[15]!==v||e[16]!==c?(h={mutationFn:v,onSuccess:c,onError:ut},e[15]=v,e[16]=c,e[17]=h):h=e[17];const{mutate:d}=ce(h);let a;e[18]!==t.id||e[19]!==m?(a=async()=>{await m.callTool({name:"BRAND_CONTEXT_DELETE",arguments:{id:t.id}})},e[18]=t.id,e[19]=m,e[20]=a):a=e[20];let x;e[21]!==t.id||e[22]!==o?(x=()=>{Y("brand_deleted",{brand_id:t.id}),p(!1),o(),K.success("Brand deleted")},e[21]=t.id,e[22]=o,e[23]=x):x=e[23];let j;e[24]!==a||e[25]!==x?(j={mutationFn:a,onSuccess:x,onError:ft},e[24]=a,e[25]=x,e[26]=j):j=e[26];const{mutate:b,isPending:g}=ce(j);let r;e[27]!==t.id||e[28]!==t.isDefault||e[29]!==m?(r=async()=>{await m.callTool({name:"BRAND_CONTEXT_UPDATE",arguments:{id:t.id,isDefault:!t.isDefault}})},e[27]=t.id,e[28]=t.isDefault,e[29]=m,e[30]=r):r=e[30];let i;e[31]!==t.id||e[32]!==t.isDefault||e[33]!==o?(i=()=>{Y(t.isDefault?"brand_unset_as_default":"brand_set_as_default",{brand_id:t.id}),o(),K.success(t.isDefault?"Removed as default brand":"Set as default brand")},e[31]=t.id,e[32]=t.isDefault,e[33]=o,e[34]=i):i=e[34];let y;e[35]!==r||e[36]!==i?(y={mutationFn:r,onSuccess:i,onError:mt},e[35]=r,e[36]=i,e[37]=y):y=e[37];const{mutate:_}=ce(y),H=t.isDefault?"border-primary/30":"border-border/60";let F;e[38]!==H?(F=xe("rounded-2xl border bg-background",H),e[38]=H,e[39]=F):F=e[39];let P;e[40]!==f?(P=()=>u(!f),e[40]=f,e[41]=P):P=e[41];let R;e[42]!==f?(R=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:f?n.jsx(Be,{size:14}):n.jsx(Te,{size:14})}),e[42]=f,e[43]=R):R=e[43];let $;e[44]!==t.logo||e[45]!==t.name?($=t.logo?n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center overflow-hidden rounded-lg",style:{backgroundImage:"linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%), linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%)",backgroundSize:"6px 6px",backgroundPosition:"0 0, 3px 3px",backgroundColor:"#fff"},children:n.jsx("img",{src:t.logo,alt:"",className:"h-full w-full object-contain p-1",onError:dt})}):n.jsx("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-muted",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:t.name?.charAt(0)?.toUpperCase()||"?"})}),e[44]=t.logo,e[45]=t.name,e[46]=$):$=e[46];const ie=t.name||"Untitled Brand";let B;e[47]!==ie?(B=n.jsx("span",{className:"text-sm font-medium text-foreground",children:ie}),e[47]=ie,e[48]=B):B=e[48];let w;e[49]!==t.domain?(w=t.domain&&n.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.domain}),e[49]=t.domain,e[50]=w):w=e[50];let O;e[51]!==B||e[52]!==w?(O=n.jsxs("div",{className:"flex flex-1 flex-col items-start gap-0.5 overflow-hidden text-left",children:[B,w]}),e[51]=B,e[52]=w,e[53]=O):O=e[53];let S;e[54]!==t.colors||e[55]!==f?(S=!f&&t.colors&&Object.values(t.colors).some(ct)&&n.jsx("div",{className:"flex shrink-0 gap-1",children:Object.entries(t.colors).filter(it).map(rt)}),e[54]=t.colors,e[55]=f,e[56]=S):S=e[56];let E;e[57]!==t.fonts||e[58]!==f?(E=!f&&t.fonts&&Object.values(t.fonts).some(lt)&&n.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Object.values(t.fonts).filter(Boolean).join(", ")}),e[57]=t.fonts,e[58]=f,e[59]=E):E=e[59];const Q=t.isDefault?"opacity-100":"opacity-0 hover:bg-muted group-hover:opacity-100";let G;e[60]!==Q?(G=xe("flex h-7 w-7 shrink-0 items-center justify-center rounded-lg transition-opacity",Q),e[60]=Q,e[61]=G):G=e[61];let T,z;e[62]!==_?(T=N=>{N.stopPropagation(),_()},z=N=>{N.key==="Enter"&&(N.stopPropagation(),_())},e[62]=_,e[63]=T,e[64]=z):(T=e[63],z=e[64]);const L=t.isDefault?"Unset as default":"Set as default",U=t.isDefault?"text-primary fill-primary":"text-muted-foreground";let D;e[65]!==U?(D=xe(U),e[65]=U,e[66]=D):D=e[66];let A;e[67]!==D?(A=n.jsx(Fe,{size:13,className:D}),e[67]=D,e[68]=A):A=e[68];let I;e[69]!==G||e[70]!==T||e[71]!==z||e[72]!==L||e[73]!==A?(I=n.jsx("span",{role:"button",tabIndex:0,className:G,onClick:T,onKeyDown:z,title:L,children:A}),e[69]=G,e[70]=T,e[71]=z,e[72]=L,e[73]=A,e[74]=I):I=e[74];let k,X;e[75]===Symbol.for("react.memo_cache_sentinel")?(k=N=>{N.stopPropagation(),p(!0)},X=N=>{N.key==="Enter"&&(N.stopPropagation(),p(!0))},e[75]=k,e[76]=X):(k=e[75],X=e[76]);let de;e[77]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("span",{role:"button",tabIndex:0,className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-lg opacity-0 transition-opacity hover:bg-destructive/10 group-hover:opacity-100",onClick:k,onKeyDown:X,title:"Delete brand",children:n.jsx($e,{size:13,className:"text-muted-foreground"})}),e[77]=de):de=e[77];let J;e[78]!==P||e[79]!==R||e[80]!==$||e[81]!==O||e[82]!==S||e[83]!==E||e[84]!==I?(J=n.jsxs("button",{type:"button",className:"flex w-full items-center gap-3 p-5",onClick:P,children:[R,$,O,S,E,I,de]}),e[78]=P,e[79]=R,e[80]=$,e[81]=O,e[82]=S,e[83]=E,e[84]=I,e[85]=J):J=e[85];let V;e[86]!==t||e[87]!==f||e[88]!==d?(V=f&&n.jsxs("div",{className:"space-y-3 px-5 pb-5",children:[n.jsx(Ve,{brand:t,onSave:d}),n.jsx(We,{brand:t,onSave:d}),n.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n.jsx(st,{brand:t,onSave:d}),n.jsx(Ze,{brand:t,onSave:d})]})]}),e[86]=t,e[87]=f,e[88]=d,e[89]=V):V=e[89];let W;e[90]!==g?(W=N=>{!N&&!g&&p(!1)},e[90]=g,e[91]=W):W=e[91];let me;e[92]===Symbol.for("react.memo_cache_sentinel")?(me=n.jsx(Ue,{children:"Delete brand?"}),e[92]=me):me=e[92];const pe=t.name||"this brand";let Z;e[93]!==pe?(Z=n.jsxs("p",{children:["This will permanently delete"," ",n.jsx("span",{className:"font-medium text-foreground",children:pe}),". This action cannot be undone."]}),e[93]=pe,e[94]=Z):Z=e[94];let ee;e[95]!==t.isDefault?(ee=t.isDefault&&n.jsxs("p",{className:"mt-2 rounded-lg border border-destructive/30 bg-destructive/5 p-2 text-destructive",children:[n.jsx("span",{className:"font-medium",children:"Heads up:"})," this is your organization's default brand. Deleting it will leave your organization without a default brand until you set another."]}),e[95]=t.isDefault,e[96]=ee):ee=e[96];let te;e[97]!==Z||e[98]!==ee?(te=n.jsxs(Ke,{children:[me,n.jsx(Xe,{asChild:!0,children:n.jsxs("div",{children:[Z,ee]})})]}),e[97]=Z,e[98]=ee,e[99]=te):te=e[99];let se;e[100]!==g?(se=n.jsx(qe,{disabled:g,children:"Cancel"}),e[100]=g,e[101]=se):se=e[101];let ne;e[102]!==b?(ne=N=>{N.preventDefault(),b()},e[102]=b,e[103]=ne):ne=e[103];const he=g?"Deleting...":"Delete";let oe;e[104]!==g||e[105]!==ne||e[106]!==he?(oe=n.jsx(Ge,{onClick:ne,disabled:g,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:he}),e[104]=g,e[105]=ne,e[106]=he,e[107]=oe):oe=e[107];let ae;e[108]!==se||e[109]!==oe?(ae=n.jsxs(Me,{children:[se,oe]}),e[108]=se,e[109]=oe,e[110]=ae):ae=e[110];let le;e[111]!==te||e[112]!==ae?(le=n.jsxs(He,{children:[te,ae]}),e[111]=te,e[112]=ae,e[113]=le):le=e[113];let re;e[114]!==l||e[115]!==W||e[116]!==le?(re=n.jsx(Qe,{open:l,onOpenChange:W,children:le}),e[114]=l,e[115]=W,e[116]=le,e[117]=re):re=e[117];let fe;return e[118]!==F||e[119]!==J||e[120]!==V||e[121]!==re?(fe=n.jsxs("div",{className:F,children:[J,V,re]}),e[118]=F,e[119]=J,e[120]=V,e[121]=re,e[122]=fe):fe=e[122],fe}function lt(s){return s}function rt(s){const[e,t]=s;return n.jsx("div",{className:"h-5 w-5 rounded-full border border-border/40",style:{backgroundColor:t},title:`${e}: ${t}`},e)}function it(s){const[,e]=s;return e}function ct(s){return s}function dt(s){s.target.style.display="none"}function mt(){return K.error("Failed to update default brand")}function ft(){return K.error("Failed to delete brand")}function ut(){return K.error("Failed to save brand context")}function xt(){const s=q.c(56),{brandExtractEnabled:e}=ke(),{org:t}=we();let m;s[0]!==t.id?(m={connectionId:De,orgId:t.id},s[0]=t.id,s[1]=m):m=s[1];const o=Ae(m),f=Se();let u;s[2]!==t.id?(u=je.brandContext(t.id),s[2]=t.id,s[3]=u):u=s[3];let l;s[4]!==o?(l=async()=>{const k=await o.callTool({name:"BRAND_CONTEXT_LIST",arguments:{includeArchived:!1}}),X=Ne(k);return Array.isArray(X?.items)?X.items:[]},s[4]=o,s[5]=l):l=s[5];let p;s[6]!==u||s[7]!==l?(p={queryKey:u,queryFn:l},s[6]=u,s[7]=l,s[8]=p):p=s[8];const{data:v}=Ee(p),h=(v===void 0?[]:v).filter(ht);let d;s[9]!==t.id||s[10]!==f?(d=()=>f.invalidateQueries({queryKey:je.brandContext(t.id),refetchType:"all"}),s[9]=t.id,s[10]=f,s[11]=d):d=s[11];const a=d;let x;s[12]!==o?(x=async()=>{await o.callTool({name:"BRAND_CONTEXT_CREATE",arguments:{name:"New Brand",domain:"example.com",overview:""}})},s[12]=o,s[13]=x):x=s[13];let j;s[14]!==a?(j=()=>{Y("brand_created"),a(),K.success("Brand created")},s[14]=a,s[15]=j):j=s[15];let b;s[16]!==x||s[17]!==j?(b={mutationFn:x,onSuccess:j,onError:pt},s[16]=x,s[17]=j,s[18]=b):b=s[18];const{mutate:g,isPending:r}=ce(b);let i;s[19]!==o?(i=async k=>{Y("brand_extract_started",{domain:k});const X=await o.callTool({name:"BRAND_CONTEXT_EXTRACT",arguments:{domain:k}});Ne(X)},s[19]=o,s[20]=i):i=s[20];let y;s[21]!==a?(y=()=>{Y("brand_extract_succeeded"),a(),K.success("Brand extracted successfully")},s[21]=a,s[22]=y):y=s[22];let _;s[23]!==y||s[24]!==i?(_={mutationFn:i,onSuccess:y,onError:gt},s[23]=y,s[24]=i,s[25]=_):_=s[25];const{mutate:H,isPending:F}=ce(_),P=ue,R=ue,$=ue,ie="flex flex-col gap-6";let B;s[26]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsxs("div",{children:[n.jsx(ue.Title,{children:"Brand Context"}),n.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Define your brand profiles. Each brand is available as an MCP prompt for AI clients."})]}),s[26]=B):B=s[26];let w;s[27]!==g?(w=()=>g(),s[27]=g,s[28]=w):w=s[28];let O;s[29]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(ye,{size:14}),s[29]=O):O=s[29];let S;s[30]!==r||s[31]!==w?(S=n.jsxs("div",{className:"flex items-center justify-between",children:[B,n.jsxs(ve,{variant:"outline",onClick:w,disabled:r,children:[O,"Add Brand"]})]}),s[30]=r,s[31]=w,s[32]=S):S=s[32];let E;s[33]!==e||s[34]!==H||s[35]!==F?(E=e&&n.jsx(Je,{onExtract:k=>H(k),isExtracting:F}),s[33]=e,s[34]=H,s[35]=F,s[36]=E):E=s[36];const Q=h.length===0&&n.jsxs("div",{className:"rounded-2xl border border-dashed border-border bg-muted/30 p-8 text-center",children:[n.jsx("p",{className:"text-sm text-muted-foreground",children:"No brands configured yet."}),n.jsxs(ve,{variant:"outline",size:"sm",className:"mt-3",onClick:()=>g(),disabled:r,children:[n.jsx(ye,{size:14}),"Add your first brand"]})]}),G="group space-y-3";let T;s[37]!==o||s[38]!==a?(T=k=>n.jsx(at,{brand:k,client:o,onChanged:a},k.id),s[37]=o,s[38]=a,s[39]=T):T=s[39];const z=h.map(T);let L;s[40]!==z?(L=n.jsx("div",{className:G,children:z}),s[40]=z,s[41]=L):L=s[41];let U;s[42]!==S||s[43]!==E||s[44]!==Q||s[45]!==L?(U=n.jsxs("div",{className:ie,children:[S,E,Q,L]}),s[42]=S,s[43]=E,s[44]=Q,s[45]=L,s[46]=U):U=s[46];let D;s[47]!==$.Body||s[48]!==U?(D=n.jsx($.Body,{children:U}),s[47]=$.Body,s[48]=U,s[49]=D):D=s[49];let A;s[50]!==R.Content||s[51]!==D?(A=n.jsx(R.Content,{children:D}),s[50]=R.Content,s[51]=D,s[52]=A):A=s[52];let I;return s[53]!==P||s[54]!==A?(I=n.jsx(P,{children:A}),s[53]=P,s[54]=A,s[55]=I):I=s[55],I}function gt(s){Y("brand_extract_failed",{error:s instanceof Error?s.message:"unknown"}),K.error(s instanceof Error?s.message:"Failed to extract brand")}function pt(){return K.error("Failed to create brand")}function ht(s){return!s.archivedAt}function It(){const s=q.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(xt,{}),s[0]=e):e=s[0],e}export{It as default};
@@ -1 +1 @@
1
- import{e as l,c as n,j as c}from"./index-DRnP8Xhy.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
1
+ import{e as l,c as n,j as c}from"./index-BOmAbn3-.js";function i(a){const e=l.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let r;e[3]!==t?(r=n("bg-card text-card-foreground flex flex-col gap-6 rounded-xl card-shadow",t),e[3]=t,e[4]=r):r=e[4];let o;return e[5]!==s||e[6]!==r?(o=c.jsx("div",{"data-slot":"card",className:r,...s}),e[5]=s,e[6]=r,e[7]=o):o=e[7],o}function f(a){const e=l.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{i as C,f as a};
@@ -1,4 +1,4 @@
1
- import{bN as ir,bO as lr,bl as q,J as m,bP as dt,bQ as ca,bR as cr,bS as ur,I as dr,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as pr,bU as $,ap as fr,bb as mr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as hr,d as da,g as gr,w as vr,b as pa,j as De,t as yr,P as br,bV as Ir}from"./index-DRnP8Xhy.js";import{E as Er,g as Sr,S as kt,u as Ot}from"./constants-DZ5y4NEu.js";import{u as fa}from"./use-virtual-mcp-Dkco3wCF.js";import{u as ma,a as he}from"./use-ai-providers-DespFg1Y.js";import{u as ha}from"./use-decopilot-events-DkzJQYGR.js";import{u as _r}from"./use-tasks-BMtiaufW.js";import{b as Tr,c as Mr}from"./use-collections-CDG0ivO9.js";import{e as ga}from"./use-organization-settings-C516uAxZ.js";var He;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(He||(He={}));var Bt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Bt||(Bt={}));He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof pt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}pt.create=e=>new pt(e);var qt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(qt||(qt={}));var w;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(w||(w={}));const wr={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},Cr={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Ar={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Rr={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},xr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},kr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function qe(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Qn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=qe(s,r.id,Cr[n]??[])),a.chat.smart||(a.chat.smart=qe(s,r.id,Ar[n]??[])),a.chat.thinking||(a.chat.thinking=qe(s,r.id,Rr[n]??[])),a.image||(a.image=qe(s,r.id,xr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=qe(s,r.id,kr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function va(e,t,a){if(e.length===0)return null;const r=wr[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}function Or(e,t){const{mimeType:a,data:r}=e;if(a.startsWith("text/"))try{const s=new TextDecoder().decode(Uint8Array.from(atob(r),n=>n.charCodeAt(0)));return[{type:"text",text:`${t}
1
+ import{bN as ir,bO as lr,bl as q,J as m,bP as dt,bQ as ca,bR as cr,bS as ur,I as dr,a_ as V,aI as Ye,aK as Xe,H as D,a$ as E,aJ as pe,bT as pr,bU as $,ap as fr,bb as mr,r as T,R as X,e as et,a1 as ua,o as mt,s as ne,K as ve,x as Ie,Q as le,f as hr,d as da,g as gr,w as vr,b as pa,j as De,t as yr,P as br,bV as Ir}from"./index-BOmAbn3-.js";import{E as Er,g as Sr,S as kt,u as Ot}from"./constants-Da2DvZbd.js";import{u as fa}from"./use-virtual-mcp-D8YFOZwW.js";import{u as ma,a as he}from"./use-ai-providers-CTaSMN44.js";import{u as ha}from"./use-decopilot-events-CJG2rWbg.js";import{u as _r}from"./use-tasks-DjQnA3sr.js";import{b as Tr,c as Mr}from"./use-collections-ciAA_3Td.js";import{e as ga}from"./use-organization-settings-BrpxY44K.js";var He;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const n={};for(const i of s)n[i]=i;return n},e.getValidEnumValues=s=>{const n=e.objectKeys(s).filter(o=>typeof s[s[o]]!="number"),i={};for(const o of n)i[o]=s[o];return e.objectValues(i)},e.objectValues=s=>e.objectKeys(s).map(function(n){return s[n]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const n=[];for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&n.push(i);return n},e.find=(s,n)=>{for(const i of s)if(n(i))return i},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,n=" | "){return s.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}e.joinValues=r,e.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n})(He||(He={}));var Bt;(function(e){e.mergeShapes=(t,a)=>({...t,...a})})(Bt||(Bt={}));He.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]);He.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class pt extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=t}format(t){const a=t||function(n){return n.message},r={_errors:[]},s=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(s);else if(i.code==="invalid_return_type")s(i.returnTypeError);else if(i.code==="invalid_arguments")s(i.argumentsError);else if(i.path.length===0)r._errors.push(a(i));else{let o=r,u=0;for(;u<i.path.length;){const l=i.path[u];u===i.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(a(i))):o[l]=o[l]||{_errors:[]},o=o[l],u++}}};return s(this),r}static assert(t){if(!(t instanceof pt))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,He.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=a=>a.message){const a=Object.create(null),r=[];for(const s of this.issues)if(s.path.length>0){const n=s.path[0];a[n]=a[n]||[],a[n].push(t(s))}else r.push(t(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}pt.create=e=>new pt(e);var qt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(qt||(qt={}));var w;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(w||(w={}));const wr={anthropic:["claude-sonnet-4-6","claude-sonnet","claude"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4-6","anthropic/claude-sonnet","anthropic/claude"],deco:["anthropic/claude-haiku-4-5","anthropic/claude-haiku","anthropic/claude"],google:["gemini-3-flash"],"claude-code":["claude-code:sonnet","claude-code:opus","claude-code:haiku"]},Cr={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],google:["gemini-2.5-flash","gemini-3-flash"],"claude-code":["claude-code:haiku","claude-code:sonnet"]},Ar={anthropic:["claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-opus-4.7","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude"],google:["gemini-3-pro","gemini-3-flash"],"claude-code":["claude-code:sonnet"]},Rr={anthropic:["claude-opus-4-7","claude-sonnet-4-6","claude-sonnet"],openrouter:["anthropic/claude-opus-4.7","anthropic/claude-sonnet-4.6:extended","anthropic/claude-sonnet-4.6","google/gemini-3-pro"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet"],google:["gemini-3-pro"],"claude-code":["claude-code:opus","claude-code:sonnet"]},xr={openrouter:["openai/gpt-image-1","google/gemini-2.0-flash-image"],deco:["openai/gpt-image-1","google/gemini-2.0-flash-image"],google:["gemini-2.0-flash-image"]},kr={openrouter:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"],deco:["perplexity/sonar","perplexity/sonar-pro","perplexity/deep-research"]};function qe(e,t,a,r){for(const s of a){const n=e.find(i=>i.modelId===s);if(n)return{keyId:t,modelId:n.modelId,title:n.title}}for(const s of a){const n=e.find(i=>i.modelId.includes(s));if(n)return{keyId:t,modelId:n.modelId,title:n.title}}if(r){const s=e.find(r);if(s)return{keyId:t,modelId:s.modelId,title:s.title}}return null}function Qn(e,t){const a={chat:{fast:null,smart:null,thinking:null},image:null,webResearch:null};for(const r of e){const s=t[r.id]??[],n=r.providerId;a.chat.fast||(a.chat.fast=qe(s,r.id,Cr[n]??[])),a.chat.smart||(a.chat.smart=qe(s,r.id,Ar[n]??[])),a.chat.thinking||(a.chat.thinking=qe(s,r.id,Rr[n]??[])),a.image||(a.image=qe(s,r.id,xr[n]??[],i=>i.capabilities?.includes("image")===!0)),a.webResearch||(a.webResearch=qe(s,r.id,kr[n]??[],i=>{const o=i.modelId.toLowerCase().replace(/[^a-z0-9]/g,"");return o.includes("sonar")||o.includes("deepresearch")}))}return a}function va(e,t,a){if(e.length===0)return null;const r=wr[t]??[],s=n=>a!==void 0?{...n,keyId:a}:n;for(const n of r){const i=e.find(o=>o.modelId===n);if(i)return s(i)}for(const n of r){const i=e.find(o=>o.modelId.includes(n));if(i)return s(i)}return s(e[0])}function Or(e,t){const{mimeType:a,data:r}=e;if(a.startsWith("text/"))try{const s=new TextDecoder().decode(Uint8Array.from(atob(r),n=>n.charCodeAt(0)));return[{type:"text",text:`${t}
2
2
  ${s}`}]}catch(s){console.error("Failed to decode text file:",s)}return[{type:"file",url:`data:${a};base64,${r}`,filename:t,mediaType:a}]}function Jt(e,t){const a=[];for(const r of e)"text"in r&&r.text?a.push({type:"text",text:`[${t}]
3
3
  ${r.text}`}):"blob"in r&&r.blob&&r.mimeType&&a.push({type:"file",url:`data:${r.mimeType};base64,${r.blob}`,filename:String(r.uri),mediaType:String(r.mimeType)});return a}function Pr(e,t){const a=[];for(const r of e){if(r.role!=="user"||!r.content)continue;const s=Array.isArray(r.content)?r.content:[r.content];for(const n of s)switch(n.type){case"text":{const i=n.text?.trim();if(!i)continue;a.push({type:"text",text:`[${t}]
4
4
  ${i}`});break}case"image":case"audio":{if(!n.data||!n.mimeType)continue;a.push({type:"file",url:`data:${n.mimeType};base64,${n.data}`,mediaType:n.mimeType});break}case"resource":{const i=n.resource;if(!i||!i.mimeType)continue;i&&("text"in i&&i.text?a.push({type:"text",text:`[${t}]
@@ -1 +1 @@
1
- import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-DRnP8Xhy.js";import{i as m}from"./ChevronDown-B21GyFLP.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};
1
+ import{e as n,c as d,j as c,b3 as l,b4 as b}from"./index-BOmAbn3-.js";import{i as m}from"./ChevronDown-BKNJxAvQ.js";function u(o){const e=n.c(9);let r,i;e[0]!==o?({className:r,...i}=o,e[0]=o,e[1]=r,e[2]=i):(r=e[1],i=e[2]);let a;e[3]!==r?(a=d("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/20 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[2px] disabled:opacity-50",r),e[3]=r,e[4]=a):a=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(b,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==i||e[7]!==a?(s=c.jsx(l,{"data-slot":"checkbox",className:a,...i,children:t}),e[6]=i,e[7]=a,e[8]=s):s=e[8],s}export{u as C};