decocms 3.27.1 → 3.27.3

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 (233) hide show
  1. package/dist/client/assets/{AlertCircle-CVfKrYvR.js → AlertCircle-BTsannAB.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-CZJ1_8ff.js → ArrowUpRight-DtMpnmAC.js} +1 -1
  3. package/dist/client/assets/{Check-4eIqLz1o.js → Check-Dw5D9iXJ.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-C6azXF6K.js → CheckCircle-Bho6B2to.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-CNQyx7xp.js → ChevronDown-CWdX7_sm.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-BiFGS012.js → ChevronLeft-ordKzex8.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-_JUGNZYN.js → ChevronRight-tUvvDqzz.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-MJGa44ay.js → ChevronUp-CVZqh7eX.js} +1 -1
  9. package/dist/client/assets/{Container-DljtwK8x.js → Container-CESuzynk.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-2Z1C6jvt.js → DotsVertical-BNgAjlpf.js} +1 -1
  11. package/dist/client/assets/{Eye-BZTA9B_k.js → Eye-CpCOO2EF.js} +1 -1
  12. package/dist/client/assets/{FilterLines-BIc99EZW.js → FilterLines-sUNPJnxX.js} +1 -1
  13. package/dist/client/assets/{Globe01-XqX0cF4u.js → Globe01-CP5QNSRl.js} +1 -1
  14. package/dist/client/assets/{HardDrive-CW-vNyxs.js → HardDrive-BP6zv7bm.js} +1 -1
  15. package/dist/client/assets/{Key01-BPeDVar3.js → Key01-CFH6lkz0.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-CRWhJz8B.js → LayoutLeft-Dr3sGtrV.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-C7wWl-UH.js → LinkExternal01-BHt-Icgs.js} +1 -1
  18. package/dist/client/assets/{Monitor01-CNSOfium.js → Monitor01-B4axAVMt.js} +1 -1
  19. package/dist/client/assets/{Palette-DpkfLWBZ.js → Palette-BSSJKY8F.js} +1 -1
  20. package/dist/client/assets/{Play-Da5sMtTS.js → Play-CWwVT1ep.js} +1 -1
  21. package/dist/client/assets/{Plus-DKKhAsjU.js → Plus-D6ZVo7op.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01--I2EXN3r.js → RefreshCcw01-DgaWok1L.js} +1 -1
  23. package/dist/client/assets/{SearchMd-DuoZUs1O.js → SearchMd-CWML-MzT.js} +1 -1
  24. package/dist/client/assets/{Settings02-BWmIO2S8.js → Settings02-DnBIVw0J.js} +1 -1
  25. package/dist/client/assets/{Shield01-tcvJIq4r.js → Shield01-CDyxjwN4.js} +1 -1
  26. package/dist/client/assets/{Star01-D71oJ2C0.js → Star01-B7S_p3mf.js} +1 -1
  27. package/dist/client/assets/{Stars01-C8Z61ENf.js → Stars01-BigO76ki.js} +1 -1
  28. package/dist/client/assets/{Stars02-Dlfu9WL9.js → Stars02-CNXKv81Q.js} +1 -1
  29. package/dist/client/assets/{Sun-u569y38Z.js → Sun-Cxxu7rF-.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-D4Pq3_cg.js → SwitchHorizontal01-BJpif5Ll.js} +1 -1
  31. package/dist/client/assets/{Tool01-DLVD3sFG.js → Tool01-Dt1EhG_-.js} +1 -1
  32. package/dist/client/assets/{Trash01-4XBt_tI7.js → Trash01-DU9k1Vtq.js} +1 -1
  33. package/dist/client/assets/{Upload01-DzLJ3gpY.js → Upload01-D-DASWOL.js} +1 -1
  34. package/dist/client/assets/{User01-CYChyPXV.js → User01-BUWoWpIi.js} +1 -1
  35. package/dist/client/assets/{Users01-_lrrXmCB.js → Users01-CuU4FaYD.js} +1 -1
  36. package/dist/client/assets/{Users03-oCa8QaJT.js → Users03-DNzqxyDz.js} +1 -1
  37. package/dist/client/assets/{X-ROAwrDEL.js → X-Bin-Wtwp.js} +1 -1
  38. package/dist/client/assets/{XCircle-qIalM-tE.js → XCircle-BOhKS6lm.js} +1 -1
  39. package/dist/client/assets/{XClose-lB-KoyXA.js → XClose-6z0C_oDP.js} +1 -1
  40. package/dist/client/assets/{Zap-DeqhXyEZ.js → Zap-D4FMWUsp.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-NjYLgWlz.js → ZapSquare-DO6_8wah.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-BrHpnwt5.js → ZoomOut-CiH8kMDs.js} +1 -1
  43. package/dist/client/assets/{access-gate-D3KhFKSJ.js → access-gate-C8Ywr7l3.js} +1 -1
  44. package/dist/client/assets/{accordion-C0246qCp.js → accordion-DnDUtyjB.js} +1 -1
  45. package/dist/client/assets/{add-section-modal-TDL4U-Qb.js → add-section-modal-BDGiAraf.js} +1 -1
  46. package/dist/client/assets/{agent-capabilities-CMLwBy-2.js → agent-capabilities-DY7PlL1Y.js} +1 -1
  47. package/dist/client/assets/{agent-icon-CpGp3Z_j.js → agent-icon-osOe3Xke.js} +1 -1
  48. package/dist/client/assets/{agent-icons-DpGrMPQz.js → agent-icons-DnwBS7UO.js} +1 -1
  49. package/dist/client/assets/{agents-list-BY5K8FU6.js → agents-list-BP_4F2HO.js} +1 -1
  50. package/dist/client/assets/{ai-providers-CSpjaISF.js → ai-providers-Bxp5C4xh.js} +1 -1
  51. package/dist/client/assets/{alert-d5fC3CNK.js → alert-CW3jDgPm.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-Ctl3oPPD.js → alert-dialog-BMks46p7.js} +1 -1
  53. package/dist/client/assets/app-editor-BATEJr9f.js +1 -0
  54. package/dist/client/assets/{auth-catchall-MFn-cdCM.js → auth-catchall-CM-p6wBC.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-BbYNWNHU.js → auth-split-layout-RlJ5glwr.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-B0Cz_xkI.js → automation-list-row-BTtnG0g-.js} +1 -1
  57. package/dist/client/assets/{automation-runs-B3gWiy9c.js → automation-runs-DX_e0E0R.js} +1 -1
  58. package/dist/client/assets/{automations-BIzauln3.js → automations-BkvRku3U.js} +1 -1
  59. package/dist/client/assets/{avatar-DxUqupGC.js → avatar-DUHP1iU3.js} +1 -1
  60. package/dist/client/assets/{badge-CF8Qbgnm.js → badge-Cez0OzTb.js} +1 -1
  61. package/dist/client/assets/{brand-context-D2E1R7Zx.js → brand-context-B6gLXdfB.js} +1 -1
  62. package/dist/client/assets/{buckets-D2iS6C-Y.js → buckets-BpaLxm7I.js} +1 -1
  63. package/dist/client/assets/{calendar-Bj6ggato.js → calendar-VohCvHjP.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-Bc9I7o1Z.js → capability-load-error-38UQQccw.js} +1 -1
  65. package/dist/client/assets/{card-DfWQEGhA.js → card-CC-M7EZ6.js} +1 -1
  66. package/dist/client/assets/{chat-context-ChsEaJrL.js → chat-context-CxtE-1u6.js} +1 -1
  67. package/dist/client/assets/{checkbox-BmkvyW16.js → checkbox-CBeySlCT.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-B0imteeI.js → cli-auth-success-hIEHTD2J.js} +1 -1
  69. package/dist/client/assets/collection-detail-BXuNBXVS.js +1 -0
  70. package/dist/client/assets/{collection-display-button-CEYkvIo0.js → collection-display-button-kzgZUh8m.js} +1 -1
  71. package/dist/client/assets/{collection-search-udFdxyyt.js → collection-search-DjpaeDqd.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-DkzHT7J9.js → collection-table-wrapper-DEWhyWe_.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-DyeSBoHz.js → collection-tabs-BDvRsxUe.js} +1 -1
  74. package/dist/client/assets/{collections-xMkSecim.js → collections-BPUYMxUg.js} +1 -1
  75. package/dist/client/assets/{command-DrkUYhCh.js → command-D2-J-HVJ.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-W-0xLr_n.js → connect-desktop-dialog-BCyvd3Xf.js} +1 -1
  77. package/dist/client/assets/{connection-card-0dTT6S9Q.js → connection-card-C7_-0Sn-.js} +1 -1
  78. package/dist/client/assets/{connection-detail-BRt-T7IO.js → connection-detail-C37HLdzH.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-Baz6qZA0.js → connection-form-helpers-C26m1Ef7.js} +1 -1
  80. package/dist/client/assets/{connections-DSoPZ6UN.js → connections-CpYQP981.js} +1 -1
  81. package/dist/client/assets/{decopilot-sse-pool-BFIK6-UW.js → decopilot-sse-pool-CFYkM7Rh.js} +1 -1
  82. package/dist/client/assets/{dialog-CakVcHgK.js → dialog-BR_cEBrt.js} +1 -1
  83. package/dist/client/assets/{domain-settings-DYYhnzsU.js → domain-settings-D9H1hX35.js} +1 -1
  84. package/dist/client/assets/{drawer-CcoGGoOo.js → drawer-Cy2Kz1Hn.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-CWTLq4L0.js → dropdown-menu-BR-D9W2L.js} +1 -1
  86. package/dist/client/assets/{dynamic-plugin-layout-BjBWJTPp.js → dynamic-plugin-layout-CI85ZtQ1.js} +1 -1
  87. package/dist/client/assets/{empty-state-DKVcL6PS.js → empty-state-BgJJwNhs.js} +1 -1
  88. package/dist/client/assets/{empty-state-vubSirat.js → empty-state-Dg8HHM9g.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-CDsxXNql.js → extract-connection-data-BxBk-cC0.js} +1 -1
  90. package/dist/client/assets/{features-0NverHtl.js → features-DmiLlpSQ.js} +1 -1
  91. package/dist/client/assets/{file-explorer-BeUbwSBm.js → file-explorer-FiO9Cf-7.js} +1 -1
  92. package/dist/client/assets/{file-type-icon-Dj5RIFdH.js → file-type-icon-BQANcS2o.js} +1 -1
  93. package/dist/client/assets/{files-CoJ9Pb-J.js → files-BAtIs-1e.js} +1 -1
  94. package/dist/client/assets/{form-Dsw-Z6di.js → form-Dk0zvzGa.js} +1 -1
  95. package/dist/client/assets/{general-C4neQf1R.js → general-DafHYOpz.js} +1 -1
  96. package/dist/client/assets/{generate-id-DqiWwIQ9.js → generate-id-BHjDNIIC.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-CjED-Ho0.js → github-repo-picker-BkgEqwQh.js} +1 -1
  98. package/dist/client/assets/{header-tab-button-C3HrUSxA.js → header-tab-button-BoMBpC0f.js} +1 -1
  99. package/dist/client/assets/{hover-card-MHetYMuh.js → hover-card-Bv_j6ODB.js} +1 -1
  100. package/dist/client/assets/{image-field-DC1TUphH.js → image-field-BqIrrPKI.js} +1 -1
  101. package/dist/client/assets/{index-Cy4lDztF.js → index-BVTMo9kc.js} +1 -1
  102. package/dist/client/assets/{index-SCafxgF4.js → index-BYrYtv_d.js} +1 -1
  103. package/dist/client/assets/{index-BYiNf1AT.js → index-Bf5fJgEn.js} +4 -4
  104. package/dist/client/assets/{index-QaJF0cy4.js → index-Bk12bx9K.js} +1 -1
  105. package/dist/client/assets/{index-jNBbW2Ko.js → index-BkeZywFC.js} +1 -1
  106. package/dist/client/assets/{index-DP2quHw4.js → index-C6xUYocu.js} +1 -1
  107. package/dist/client/assets/{index-DMSpCZuP.js → index-CKzIwisI.js} +1 -1
  108. package/dist/client/assets/{index-W5kyiqww.js → index-Ch5XdRnc.js} +1 -1
  109. package/dist/client/assets/{index-BgEqHutz.js → index-D8TzVufi.js} +1 -1
  110. package/dist/client/assets/{index-CNsOv2lg.js → index-DBJUXyq5.js} +1 -1
  111. package/dist/client/assets/{index-DJTRgajF.js → index-DaTAhfCb.js} +1 -1
  112. package/dist/client/assets/{index-CXykQoXr.js → index-DllHR6ee.js} +1 -1
  113. package/dist/client/assets/{index-BpHKT80f.js → index-IBt4YI87.js} +3 -3
  114. package/dist/client/assets/{index-DWx6bHXh.js → index-UNlOSNo_.js} +1 -1
  115. package/dist/client/assets/{index-redirect-Chn_J6r0.js → index-redirect-6YQCJuaD.js} +1 -1
  116. package/dist/client/assets/{index-CIRA-XrS.js → index-zfhl8Q7y.js} +1 -1
  117. package/dist/client/assets/{infiniteQueryObserver-D63prNq4.js → infiniteQueryObserver-BmvWohEo.js} +1 -1
  118. package/dist/client/assets/{input-CrSCUdkK.js → input-DCxahixb.js} +1 -1
  119. package/dist/client/assets/{integration-icon-Jr_UF6S2.js → integration-icon-TU0D51GL.js} +1 -1
  120. package/dist/client/assets/{label-DVsZqCyz.js → label-CdfI63_J.js} +1 -1
  121. package/dist/client/assets/{layout-BWE4r12s.js → layout-BhtdEX3U.js} +1 -1
  122. package/dist/client/assets/{login-C4SQ_CfJ.js → login-B9RS5Grh.js} +1 -1
  123. package/dist/client/assets/{members-CxCiHf1l.js → members-7EkW-zHv.js} +1 -1
  124. package/dist/client/assets/{monaco-editor-ps7H50eS.js → monaco-editor-CORr1Yst.js} +1 -1
  125. package/dist/client/assets/{monitoring-stats-row-DTWV8uJr.js → monitoring-stats-row-XmAF5Bgn.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-RgRogp_l.js → oauth-callback-5-7Rle0p.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-ai-provider-BfGfjBqL.js → oauth-callback-ai-provider-DfEpYpoj.js} +1 -1
  128. package/dist/client/assets/{onboarding-B8eFVg-n.js → onboarding-YIjsqgJl.js} +1 -1
  129. package/dist/client/assets/{org-install-oevPeVZY.js → org-install-Bf3OPqX7.js} +1 -1
  130. package/dist/client/assets/{org-layout-BZUraXql.js → org-layout-CmlO60uU.js} +1 -1
  131. package/dist/client/assets/{org-plugin-layout-D2XXmsCd.js → org-plugin-layout-DtmrEr3_.js} +1 -1
  132. package/dist/client/assets/{page-seo-form-C8q6S3Ix.js → page-seo-form-CAL1Ama2.js} +1 -1
  133. package/dist/client/assets/page-seo-sheet-CdpFODLo.js +1 -0
  134. package/dist/client/assets/{pair-CHlUpVVn.js → pair-Bxl0nM3M.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-D9GXWduc.js → plugin-empty-state-CRnS0p7x.js} +1 -1
  136. package/dist/client/assets/{plugin-header-Beeob5-q.js → plugin-header-7_Cdb1uT.js} +1 -1
  137. package/dist/client/assets/{plugin-layout-k15rvBW4.js → plugin-layout-C-8PxgM5.js} +1 -1
  138. package/dist/client/assets/{popover-BWqC53zq.js → popover-DVm7Ssxi.js} +1 -1
  139. package/dist/client/assets/{post-editor-ZY2dMuGW.js → post-editor-DmeUGzlg.js} +1 -1
  140. package/dist/client/assets/{primitives-DjKXnVwl.js → primitives-CpDtL2ZU.js} +1 -1
  141. package/dist/client/assets/{profile-D8GPYI9z.js → profile-Dm4Yb6eM.js} +1 -1
  142. package/dist/client/assets/project-app-view-JKj824Lw.js +1 -0
  143. package/dist/client/assets/record-editor-DwWcLb6L.js +1 -0
  144. package/dist/client/assets/registry-CDJxCTru.js +2 -0
  145. package/dist/client/assets/{registry-layout-DdpPnEaJ.js → registry-layout-gSzxQgBQ.js} +1 -1
  146. package/dist/client/assets/{require-capability-B9yAp304.js → require-capability-C4iKMmpy.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-DH07bG2g.js → required-auth-layout-8fkEaCnp.js} +1 -1
  148. package/dist/client/assets/{reset-password-urnXjryV.js → reset-password-CrMJvII1.js} +1 -1
  149. package/dist/client/assets/{resizable-CA1KkrSC.js → resizable-DWU3ErtZ.js} +1 -1
  150. package/dist/client/assets/{roles-CuKgR2SA.js → roles-DUH9IDU1.js} +1 -1
  151. package/dist/client/assets/save-referenced-block-BS5jTCGu.js +1 -0
  152. package/dist/client/assets/{save-status-B1NlnVv7.js → save-status-CoUVqFSZ.js} +1 -1
  153. package/dist/client/assets/{schema-form-BJb6ByJZ.js → schema-form-91G9lUBl.js} +1 -1
  154. package/dist/client/assets/{scroll-area-BdT6MEhB.js → scroll-area-XoAuLxYN.js} +1 -1
  155. package/dist/client/assets/{search-input-C47MRZ3T.js → search-input-M0Ie6ly-.js} +1 -1
  156. package/dist/client/assets/{secrets-FQwpAvNo.js → secrets-8SZt1x7l.js} +1 -1
  157. package/dist/client/assets/{sections-editor-Cl8FoxMJ.js → sections-editor-DwgJqlrA.js} +1 -1
  158. package/dist/client/assets/{select-BlwN9Vej.js → select-BCbLv4__.js} +1 -1
  159. package/dist/client/assets/{select-model-CmdnuON7.js → select-model-CyGtN1M-.js} +1 -1
  160. package/dist/client/assets/{seo-editor-DI55ZCuw.js → seo-editor-Bs32N5T3.js} +1 -1
  161. package/dist/client/assets/{settings-layout-CQtAYaM4.js → settings-layout-B9ZloRpE.js} +1 -1
  162. package/dist/client/assets/{settings-section-yQou3UeY.js → settings-section-CM1lhiXq.js} +1 -1
  163. package/dist/client/assets/{sheet-C9OeYoob.js → sheet-Dz53NwAL.js} +1 -1
  164. package/dist/client/assets/{shell-controls-Yj9zkwJT.js → shell-controls-DoInONui.js} +1 -1
  165. package/dist/client/assets/{shell-layout-CBnbPDoL.js → shell-layout-CyNNDyY2.js} +1 -1
  166. package/dist/client/assets/{shell-route-loading-BIZ6nC8J.js → shell-route-loading-C7rwAk6O.js} +1 -1
  167. package/dist/client/assets/{sidebar-ClntAuIc.js → sidebar-DHtVfRt2.js} +1 -1
  168. package/dist/client/assets/{skeleton-CwBsvOfD.js → skeleton-4_j-emR3.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-De-54tZ3.js → sortable.esm-BuYk742s.js} +1 -1
  170. package/dist/client/assets/{spinner-iV1Pb5yc.js → spinner-Bjb2nwEj.js} +1 -1
  171. package/dist/client/assets/{sso-aLCmlzL4.js → sso-DchJ1XOr.js} +1 -1
  172. package/dist/client/assets/{store-Dt0yo82v.js → store-CQwIuLfs.js} +1 -1
  173. package/dist/client/assets/store-registry-CTjj2p5X.js +2 -0
  174. package/dist/client/assets/{studio-tools-DEQRneUy.js → studio-tools-nLupF0VD.js} +1 -1
  175. package/dist/client/assets/{switch-DtUTxnab.js → switch-DgxJQICE.js} +1 -1
  176. package/dist/client/assets/{tab-id-3QcIfNPm.js → tab-id-R_vPeOM-.js} +1 -1
  177. package/dist/client/assets/{table-B0xOHukK.js → table-BtBbNaqK.js} +1 -1
  178. package/dist/client/assets/{tabs-Bf13m2Ie.js → tabs-B7rkPOQL.js} +1 -1
  179. package/dist/client/assets/{task-status-DY7Jd7M1.js → task-status-o4q7-zCb.js} +1 -1
  180. package/dist/client/assets/{textarea-8pboLFLk.js → textarea-DVqVYdU_.js} +1 -1
  181. package/dist/client/assets/{toggle-group-CytFiMoT.js → toggle-group-Bp8xPho5.js} +1 -1
  182. package/dist/client/assets/{toolbar-sicu1cLe.js → toolbar-DoGR7Gvt.js} +1 -1
  183. package/dist/client/assets/{tools-list-HKpgFTbq.js → tools-list-CzH1GRFq.js} +1 -1
  184. package/dist/client/assets/{tooltip-Bzg3apEG.js → tooltip-uidgMYZs.js} +1 -1
  185. package/dist/client/assets/{types-8hWDUU7E.js → types-D-iISL5c.js} +1 -1
  186. package/dist/client/assets/{use-ai-providers-zQf8BGqD.js → use-ai-providers-zhWaTacO.js} +1 -1
  187. package/dist/client/assets/{use-automations-EKP98ANa.js → use-automations-CnxwIRJi.js} +1 -1
  188. package/dist/client/assets/{use-capability-Bvy73ewa.js → use-capability-Iy7S17lS.js} +1 -1
  189. package/dist/client/assets/{use-collections-ZBVaGDFA.js → use-collections-Bx2is5yZ.js} +1 -1
  190. package/dist/client/assets/{use-connection-Dk0TNOQ6.js → use-connection-Cp_AfkH2.js} +1 -1
  191. package/dist/client/assets/{use-copy-B0pfAKm1.js → use-copy-BbZfKDM_.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-LZBczPxY.js → use-create-virtual-mcp-OVjH7swn.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-DdtLlSWF.js → use-debounced-autosave-COKPNHqz.js} +1 -1
  194. package/dist/client/assets/{use-delete-connection-CrGpJ3CK.js → use-delete-connection-9HqqJhIE.js} +1 -1
  195. package/dist/client/assets/{use-file-configs-blLNO8ef.js → use-file-configs-B2WdKpDl.js} +1 -1
  196. package/dist/client/assets/{use-infinite-scroll-crZE7yIL.js → use-infinite-scroll-DnRfnOse.js} +1 -1
  197. package/dist/client/assets/{use-list-state-DULVAZWB.js → use-list-state-CS_bUcVK.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-u_MHI8VY.js → use-mcp-client-BWBWxFyf.js} +1 -1
  199. package/dist/client/assets/{use-mcp-prompts-Cc6LCfnI.js → use-mcp-prompts-DceL7BOM.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-Co2Su_jT.js → use-mcp-tools-DGg_9CH1.js} +1 -1
  201. package/dist/client/assets/{use-members-D0q4Za9C.js → use-members-CMfQxSQX.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-V0Re0kfV.js → use-navigate-to-agent-BcLfXkiQ.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-_tKKyZeP.js → use-org-auth-client-CBhb39AJ.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-BFKiHzWZ.js → use-org-sso-DNHpoek2.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-BfPxhjla.js → use-organization-roles-Bp84xvDx.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-BwO5SItR.js → use-organization-settings-CKbkYw8a.js} +1 -1
  207. package/dist/client/assets/{use-registry-connections-Dt-dLPgn.js → use-registry-connections-B0kDvUPs.js} +1 -1
  208. package/dist/client/assets/{use-secrets-D9iUDVyd.js → use-secrets-B3_bXT6T.js} +1 -1
  209. package/dist/client/assets/{use-status-sounds-WJOrPbCW.js → use-status-sounds-DRJu63wo.js} +1 -1
  210. package/dist/client/assets/{use-view-mode-Cb9Ug3Fo.js → use-view-mode-BL89tUjo.js} +1 -1
  211. package/dist/client/assets/{use-virtual-mcp-CC-vnpyx.js → use-virtual-mcp--mdGOnb3.js} +1 -1
  212. package/dist/client/assets/useInfiniteQuery-DDQWxHDI.js +1 -0
  213. package/dist/client/assets/{useRouterState-B9EuTqlu.js → useRouterState-B1E0dGkV.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-CtNc8-Ct.js +1 -0
  215. package/dist/client/assets/{user-Be430j_2.js → user--ESi0l1H.js} +1 -1
  216. package/dist/client/assets/{view-mode-toggle-DaQDP0Hg.js → view-mode-toggle-YGR1OOUU.js} +1 -1
  217. package/dist/client/assets/{workflow-CwBfmaZN.js → workflow-CPoU6TIB.js} +1 -1
  218. package/dist/client/assets/workflow-detail-DZDWp4Au.js +1 -0
  219. package/dist/client/index.html +1 -1
  220. package/dist/server/cli.js +329 -329
  221. package/dist/server/server.js +223 -223
  222. package/package.json +1 -1
  223. package/dist/client/assets/app-editor-G1KMmKo5.js +0 -1
  224. package/dist/client/assets/collection-detail-Brrg3KY1.js +0 -1
  225. package/dist/client/assets/page-seo-sheet-DCfDUVar.js +0 -1
  226. package/dist/client/assets/project-app-view-CeTOGt0s.js +0 -1
  227. package/dist/client/assets/record-editor-DyRjlkvh.js +0 -1
  228. package/dist/client/assets/registry-PDIuepoN.js +0 -2
  229. package/dist/client/assets/save-referenced-block-9hc6e2Ip.js +0 -1
  230. package/dist/client/assets/store-registry-BItjuByE.js +0 -2
  231. package/dist/client/assets/useInfiniteQuery-CTHnpbKA.js +0 -1
  232. package/dist/client/assets/useSuspenseInfiniteQuery-DyRicwLF.js +0 -1
  233. package/dist/client/assets/workflow-detail-CRk5OVYF.js +0 -1
@@ -1 +1 @@
1
- import{r as c,j as d,dm as M,a7 as F,a8 as f,dp as T,ag as $,bk as O,bx as I,dq as U,dr as W,dt as z,dn as B,bh as G,dl as K,e as E,c as q}from"./index-BpHKT80f.js";var w,b="HoverCard",[N]=$(b,[T]),R=T(),[V,S]=N(b),_=o=>{const{__scopeHoverCard:e,children:t,open:r,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:u=300}=o,i=R(e),p=c.useRef(0),v=c.useRef(0),C=c.useRef(!1),h=c.useRef(!1),[m,n]=G({prop:r,defaultProp:a??!1,onChange:s,caller:b}),x=c.useCallback(()=>{clearTimeout(v.current),p.current=window.setTimeout(()=>n(!0),l)},[l,n]),L=c.useCallback(()=>{clearTimeout(p.current),!C.current&&!h.current&&(v.current=window.setTimeout(()=>n(!1),u))},[u,n]),k=c.useCallback(()=>n(!1),[n]);return c.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(v.current)},[]),d.jsx(V,{scope:e,open:m,onOpenChange:n,onOpen:x,onClose:L,onDismiss:k,hasSelectionRef:C,isPointerDownOnContentRef:h,children:d.jsx(K,{...i,children:t})})};_.displayName=b;var y="HoverCardTrigger",D=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=S(y,t),s=R(t);return d.jsx(M,{asChild:!0,...s,children:d.jsx(F.a,{"data-state":a.open?"open":"closed",...r,ref:e,onPointerEnter:f(o.onPointerEnter,P(a.onOpen)),onPointerLeave:f(o.onPointerLeave,P(a.onClose)),onFocus:f(o.onFocus,a.onOpen),onBlur:f(o.onBlur,a.onClose),onTouchStart:f(o.onTouchStart,l=>l.preventDefault())})})});D.displayName=y;var H="HoverCardPortal",[J,Q]=N(H,{forceMount:void 0}),j=o=>{const{__scopeHoverCard:e,forceMount:t,children:r,container:a}=o,s=S(H,e);return d.jsx(J,{scope:e,forceMount:t,children:d.jsx(O,{present:t||s.open,children:d.jsx(B,{asChild:!0,container:a,children:r})})})};j.displayName=H;var g="HoverCardContent",A=c.forwardRef((o,e)=>{const t=Q(g,o.__scopeHoverCard),{forceMount:r=t.forceMount,...a}=o,s=S(g,o.__scopeHoverCard);return d.jsx(O,{present:r||s.open,children:d.jsx(X,{"data-state":s.open?"open":"closed",...a,onPointerEnter:f(o.onPointerEnter,P(s.onOpen)),onPointerLeave:f(o.onPointerLeave,P(s.onClose)),ref:e})})});A.displayName=g;var X=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...u}=o,i=S(g,t),p=R(t),v=c.useRef(null),C=I(e,v),[h,m]=c.useState(!1);return c.useEffect(()=>{if(h){const n=document.body;return w=n.style.userSelect||n.style.webkitUserSelect,n.style.userSelect="none",n.style.webkitUserSelect="none",()=>{n.style.userSelect=w,n.style.webkitUserSelect=w}}},[h]),c.useEffect(()=>{if(v.current){const n=()=>{m(!1),i.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(i.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",n),()=>{document.removeEventListener("pointerup",n),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!1}}},[i.isPointerDownOnContentRef,i.hasSelectionRef]),c.useEffect(()=>{v.current&&ee(v.current).forEach(x=>x.setAttribute("tabindex","-1"))}),d.jsx(U,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:f(s,n=>{n.preventDefault()}),onDismiss:i.onDismiss,children:d.jsx(W,{...p,...u,onPointerDown:f(u.onPointerDown,n=>{n.currentTarget.contains(n.target)&&m(!0),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!0}),ref:C,style:{...u.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=R(t);return d.jsx(z,{...a,...r,ref:e})});Z.displayName=Y;function P(o){return e=>e.pointerType==="touch"?void 0:o()}function ee(o){const e=[],t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var te=_,oe=D,re=j,ne=A;function se(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(te,{"data-slot":"hover-card",...t}),e[2]=t,e[3]=r):r=e[3],r}function ie(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(oe,{"data-slot":"hover-card-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ce(o){const e=E.c(12);let t,r,a,s;e[0]!==o?({className:t,align:a,sideOffset:s,...r}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=a,e[4]=s):(t=e[1],r=e[2],a=e[3],s=e[4]);const l=a===void 0?"center":a,u=s===void 0?4:s;let i;e[5]!==t?(i=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),e[5]=t,e[6]=i):i=e[6];let p;return e[7]!==l||e[8]!==r||e[9]!==u||e[10]!==i?(p=d.jsx(re,{"data-slot":"hover-card-portal",children:d.jsx(ne,{"data-slot":"hover-card-content",align:l,sideOffset:u,className:i,...r})}),e[7]=l,e[8]=r,e[9]=u,e[10]=i,e[11]=p):p=e[11],p}export{ie as H,ce as a,se as b};
1
+ import{r as c,j as d,dm as M,a7 as F,a8 as f,dp as T,ag as $,bk as O,bx as I,dq as U,dr as W,dt as z,dn as B,bh as G,dl as K,e as E,c as q}from"./index-IBt4YI87.js";var w,b="HoverCard",[N]=$(b,[T]),R=T(),[V,S]=N(b),_=o=>{const{__scopeHoverCard:e,children:t,open:r,defaultOpen:a,onOpenChange:s,openDelay:l=700,closeDelay:u=300}=o,i=R(e),p=c.useRef(0),v=c.useRef(0),C=c.useRef(!1),h=c.useRef(!1),[m,n]=G({prop:r,defaultProp:a??!1,onChange:s,caller:b}),x=c.useCallback(()=>{clearTimeout(v.current),p.current=window.setTimeout(()=>n(!0),l)},[l,n]),L=c.useCallback(()=>{clearTimeout(p.current),!C.current&&!h.current&&(v.current=window.setTimeout(()=>n(!1),u))},[u,n]),k=c.useCallback(()=>n(!1),[n]);return c.useEffect(()=>()=>{clearTimeout(p.current),clearTimeout(v.current)},[]),d.jsx(V,{scope:e,open:m,onOpenChange:n,onOpen:x,onClose:L,onDismiss:k,hasSelectionRef:C,isPointerDownOnContentRef:h,children:d.jsx(K,{...i,children:t})})};_.displayName=b;var y="HoverCardTrigger",D=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=S(y,t),s=R(t);return d.jsx(M,{asChild:!0,...s,children:d.jsx(F.a,{"data-state":a.open?"open":"closed",...r,ref:e,onPointerEnter:f(o.onPointerEnter,P(a.onOpen)),onPointerLeave:f(o.onPointerLeave,P(a.onClose)),onFocus:f(o.onFocus,a.onOpen),onBlur:f(o.onBlur,a.onClose),onTouchStart:f(o.onTouchStart,l=>l.preventDefault())})})});D.displayName=y;var H="HoverCardPortal",[J,Q]=N(H,{forceMount:void 0}),j=o=>{const{__scopeHoverCard:e,forceMount:t,children:r,container:a}=o,s=S(H,e);return d.jsx(J,{scope:e,forceMount:t,children:d.jsx(O,{present:t||s.open,children:d.jsx(B,{asChild:!0,container:a,children:r})})})};j.displayName=H;var g="HoverCardContent",A=c.forwardRef((o,e)=>{const t=Q(g,o.__scopeHoverCard),{forceMount:r=t.forceMount,...a}=o,s=S(g,o.__scopeHoverCard);return d.jsx(O,{present:r||s.open,children:d.jsx(X,{"data-state":s.open?"open":"closed",...a,onPointerEnter:f(o.onPointerEnter,P(s.onOpen)),onPointerLeave:f(o.onPointerLeave,P(s.onClose)),ref:e})})});A.displayName=g;var X=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:l,...u}=o,i=S(g,t),p=R(t),v=c.useRef(null),C=I(e,v),[h,m]=c.useState(!1);return c.useEffect(()=>{if(h){const n=document.body;return w=n.style.userSelect||n.style.webkitUserSelect,n.style.userSelect="none",n.style.webkitUserSelect="none",()=>{n.style.userSelect=w,n.style.webkitUserSelect=w}}},[h]),c.useEffect(()=>{if(v.current){const n=()=>{m(!1),i.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(i.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",n),()=>{document.removeEventListener("pointerup",n),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!1}}},[i.isPointerDownOnContentRef,i.hasSelectionRef]),c.useEffect(()=>{v.current&&ee(v.current).forEach(x=>x.setAttribute("tabindex","-1"))}),d.jsx(U,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:l,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:f(s,n=>{n.preventDefault()}),onDismiss:i.onDismiss,children:d.jsx(W,{...p,...u,onPointerDown:f(u.onPointerDown,n=>{n.currentTarget.contains(n.target)&&m(!0),i.hasSelectionRef.current=!1,i.isPointerDownOnContentRef.current=!0}),ref:C,style:{...u.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=c.forwardRef((o,e)=>{const{__scopeHoverCard:t,...r}=o,a=R(t);return d.jsx(z,{...a,...r,ref:e})});Z.displayName=Y;function P(o){return e=>e.pointerType==="touch"?void 0:o()}function ee(o){const e=[],t=document.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;t.nextNode();)e.push(t.currentNode);return e}var te=_,oe=D,re=j,ne=A;function se(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(te,{"data-slot":"hover-card",...t}),e[2]=t,e[3]=r):r=e[3],r}function ie(o){const e=E.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=d.jsx(oe,{"data-slot":"hover-card-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function ce(o){const e=E.c(12);let t,r,a,s;e[0]!==o?({className:t,align:a,sideOffset:s,...r}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=a,e[4]=s):(t=e[1],r=e[2],a=e[3],s=e[4]);const l=a===void 0?"center":a,u=s===void 0?4:s;let i;e[5]!==t?(i=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),e[5]=t,e[6]=i):i=e[6];let p;return e[7]!==l||e[8]!==r||e[9]!==u||e[10]!==i?(p=d.jsx(re,{"data-slot":"hover-card-portal",children:d.jsx(ne,{"data-slot":"hover-card-content",align:l,sideOffset:u,className:i,...r})}),e[7]=l,e[8]=r,e[9]=u,e[10]=i,e[11]=p):p=e[11],p}export{ie as H,ce as a,se as b};
@@ -1 +1 @@
1
- import{e as w,q as be,a as Ne,K as ke,j as t,E as we,r as $,c as de,B as Y,l as Ce,P as Se,o as Q}from"./index-BpHKT80f.js";import{a as H}from"./Tool01-DLVD3sFG.js";import{s as _e}from"./Trash01-4XBt_tI7.js";import{i as fe}from"./Upload01-DzLJ3gpY.js";import{I as Ie}from"./input-CrSCUdkK.js";import{L as Pe}from"./label-DVsZqCyz.js";import{i as Ue}from"./AlertCircle-CVfKrYvR.js";import{i as ge}from"./Check-4eIqLz1o.js";import{a as $e}from"./Eye-BZTA9B_k.js";import{i as De}from"./DotsVertical-2Z1C6jvt.js";import{H as ze}from"./agent-icon-CpGp3Z_j.js";import{n as Fe}from"./LinkExternal01-C7wWl-UH.js";import{D as Te,c as Ee,e as Le,b as Oe,a as Ae}from"./dialog-CakVcHgK.js";import{c as ce,a as Re,D as Be,b as Ge}from"./dropdown-menu-CWTLq4L0.js";import{S as Me}from"./skeleton-CwBsvOfD.js";import{T as Ve,a as Ke,b as qe,c as Je}from"./tabs-Bf13m2Ie.js";import{u as Qe,c as Ye}from"./use-file-configs-blLNO8ef.js";import{u as He}from"./useInfiniteQuery-CTHnpbKA.js";import{u as We}from"./studio-tools-DEQRneUy.js";function Xe(s){if(typeof s=="string")return s;if(!s||typeof s!="object")return"";const e=s;if(Array.isArray(e.variants)){const n=e.variants,l=n.find(o=>o.rule?.__resolveType?.includes("always"));if(typeof l?.value=="string")return l.value;const i=n.find(o=>typeof o.value=="string");if(i)return i.value}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function Ze(s){const e=w.c(10),{org:n}=be(),l=We();let i;e[0]!==n.id||e[1]!==s.configId?(i=ke.filePickerObjects(n.id,s.configId),e[0]=n.id,e[1]=s.configId,e[2]=i):i=e[2];const o=s.enabled!==!1&&!!s.configId;let a;e[3]!==s.configId||e[4]!==l?(a=async m=>{const{pageParam:c}=m;return await l.call("FILE_OBJECTS_LIST",{configId:s.configId,cursor:c??void 0})},e[3]=s.configId,e[4]=l,e[5]=a):a=e[5];let r;return e[6]!==i||e[7]!==o||e[8]!==a?(r={queryKey:i,enabled:o,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:et},e[6]=i,e[7]=o,e[8]=a,e[9]=r):r=e[9],He(r)}function et(s){return s.nextCursor??void 0}function je(){const s=w.c(2),{org:e}=be();let n;return s[0]!==e?(n={mutationFn:async l=>{const i=l.file.type||"application/octet-stream",o=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:l.file});if(!o.ok){const a=await o.text().catch(tt);let r=`${o.status} ${o.statusText}`;try{const m=JSON.parse(a);m.message&&(r=m.message)}catch{a&&(r=a.slice(0,200))}throw new Error(`Upload failed: ${r}`)}return await o.json()}},s[0]=e,s[1]=n):n=s[1],Ne(n)}function tt(){return""}const ue="file-picker:last-config-id";function st(s){const e=w.c(18),n=s.mode==="image"?"Pick an image":"Pick a file";let l;e[0]!==n?(l=t.jsx(Ee,{children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{children:"Upload a new file or pick one previously uploaded to a configured bucket."}),e[2]=i):i=e[2];let o;e[3]!==l?(o=t.jsxs(Oe,{children:[l,i]}),e[3]=l,e[4]=o):o=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Me,{className:"h-64 w-full"}),e[5]=a):a=e[5];let r;e[6]!==s?(r=d=>{s.onSelect(d),s.onOpenChange(!1)},e[6]=s,e[7]=r):r=e[7];let m;e[8]!==s.mode||e[9]!==r?(m=t.jsx(we,{fallback:nt,children:t.jsx($.Suspense,{fallback:a,children:t.jsx(lt,{mode:s.mode,onSelect:r})})}),e[8]=s.mode,e[9]=r,e[10]=m):m=e[10];let c;e[11]!==o||e[12]!==m?(c=t.jsxs(Ae,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[o,m]}),e[11]=o,e[12]=m,e[13]=c):c=e[13];let p;return e[14]!==s.onOpenChange||e[15]!==s.open||e[16]!==c?(p=t.jsx(Te,{open:s.open,onOpenChange:s.onOpenChange,children:c}),e[14]=s.onOpenChange,e[15]=s.open,e[16]=c,e[17]=p):p=e[17],p}function nt(s){const{error:e}=s;return t.jsx(it,{error:e??new Error("Failed to load buckets")})}function it(s){const e=w.c(3),{error:n}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ue,{size:16}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n.message})]}),e[1]=n.message,e[2]=i):i=e[2],i}function lt(s){const e=w.c(23),{mode:n,onSelect:l}=s,i=Qe();if(i.length===0){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(at,{}),e[0]=f):f=e[0],f}if(i.length===1){const f=i[0];let g;return e[1]!==f||e[2]!==n||e[3]!==l?(g=t.jsx(pe,{config:f,mode:n,onSelect:l}),e[1]=f,e[2]=n,e[3]=l,e[4]=g):g=e[4],g}let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=typeof window<"u"?window.localStorage.getItem(ue):null,e[5]=o):o=e[5];const a=o;let r;e[6]!==i?(r=i.find(f=>f.id===a)?.id??i[0].id,e[6]=i,e[7]=r):r=e[7];const m=r;let c;e[8]!==i?(c=i.map(rt),e[8]=i,e[9]=c):c=e[9];let p;e[10]!==c?(p=t.jsx(Ke,{className:"self-start",children:c}),e[10]=c,e[11]=p):p=e[11];let d;if(e[12]!==i||e[13]!==n||e[14]!==l){let f;e[16]!==n||e[17]!==l?(f=g=>t.jsx(qe,{value:g.id,className:"min-h-0 flex-1 overflow-hidden",children:t.jsx(pe,{config:g,mode:n,onSelect:l})},g.id),e[16]=n,e[17]=l,e[18]=f):f=e[18],d=i.map(f),e[12]=i,e[13]=n,e[14]=l,e[15]=d}else d=e[15];let x;return e[19]!==m||e[20]!==p||e[21]!==d?(x=t.jsxs(Je,{defaultValue:m,onValueChange:ot,className:"min-h-0 flex-1 flex flex-col",children:[p,d]}),e[19]=m,e[20]=p,e[21]=d,e[22]=x):x=e[22],x}function rt(s){return t.jsx(Ve,{value:s.id,children:s.name},s.id)}function ot(s){typeof window<"u"&&window.localStorage.setItem(ue,s)}function at(){const s=w.c(3);let e,n;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(fe,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No bucket configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket in Settings before you can upload files."})]}),s[0]=e,s[1]=n):(e=s[0],n=s[1]);let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[e,n,t.jsx(Y,{asChild:!0,size:"sm",className:"mt-2",children:t.jsx(Se,{to:"/settings/files",children:"Configure a bucket"})})]}),s[2]=l):l=s[2],l}function pe({config:s,mode:e,onSelect:n}){const l=Ze({configId:s.id}),i=je(),[o,a]=$.useState(!1),r=$.useRef(null),m=e==="image"?"image/*":void 0;async function c(u){if(!u)return;const y=Array.from(u);if(y.length===0)return;let k=null;const b=[];for(const N of y)try{const h=await i.mutateAsync({configId:s.id,file:N});k??=h.publicUrl}catch(h){b.push(`${N.name} (${h instanceof Error?h.message:"upload failed"})`)}await l.refetch(),b.length>0&&Q.error(b.length===y.length?`Upload failed: ${b.join("; ")}`:`Some files failed: ${b.join("; ")}`),k&&n(k)}function p(u){u.preventDefault(),a(!0)}function d(){a(!1)}function x(u){u.preventDefault(),a(!1),c(u.dataTransfer.files)}const g=(l.data?.pages??[]).flatMap(u=>u.items),j=g.filter(u=>e==="image"?ye(u.key):!0);return t.jsxs("div",{className:"flex flex-col gap-3 min-h-0 h-full",children:[t.jsxs("button",{type:"button",onClick:()=>r.current?.click(),onDragOver:p,onDragLeave:d,onDrop:x,className:de("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",o&&"border-primary bg-primary/5",i.isPending&&"opacity-60 pointer-events-none"),children:[t.jsx(fe,{size:18,className:"text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium",children:i.isPending?"Uploading…":"Drop files here or click to upload"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to 100 MB."," ",e==="image"?"Images only (PNG, JPEG, WebP, GIF, SVG, AVIF).":"Common image, video, audio, and document types."]}),t.jsx("input",{ref:r,type:"file",accept:m,multiple:!0,className:"hidden",onChange:u=>{const y=u.target.files;u.target.value="",c(y)}})]}),l.isFetching&&!l.isFetchingNextPage?t.jsx("div",{className:"flex justify-end",children:t.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading…"})}):null,t.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[j.length===0?e==="image"&&g.length>0?t.jsx(dt,{}):t.jsx(ct,{}):e==="image"?t.jsx(ut,{items:j,onSelect:n}):t.jsx(mt,{items:j,onSelect:n}),l.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(Y,{type:"button",variant:"outline",size:"sm",disabled:l.isFetchingNextPage,onClick:()=>l.fetchNextPage(),children:l.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ce,{size:14,className:"animate-spin"}),"Loading…"]}):"Load more"})})]})]})}function ct(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(H,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No files in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop a file above to get started."})]}),s[0]=e):e=s[0],e}function dt(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(H,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No images in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"The bucket has other files, but none match common image formats."})]}),s[0]=e):e=s[0],e}function ye(s){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(s)}function ft(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"file":s.slice(e+1).toLowerCase()}function ut(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx(ve,{item:r,variant:"image",onSelect:l},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:i}),e[5]=i,e[6]=o):o=e[6],o}function mt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx("li",{children:t.jsx(ve,{item:r,variant:"row",onSelect:l})},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:i}),e[5]=i,e[6]=o):o=e[6],o}function ve(s){const e=w.c(58),{item:n,variant:l,onSelect:i}=s;let o;e[0]!==n.key?(o=ft(n.key),e[0]=n.key,e[1]=o):o=e[1];const a=o;if(l==="image"){let b;e[2]!==n.publicUrl||e[3]!==i?(b=()=>i(n.publicUrl),e[2]=n.publicUrl,e[3]=i,e[4]=b):b=e[4];let N;e[5]!==n.key||e[6]!==n.publicUrl?(N=t.jsx("img",{src:n.publicUrl,alt:n.key,loading:"lazy",className:"h-full w-full object-cover",onError:gt}),e[5]=n.key,e[6]=n.publicUrl,e[7]=N):N=e[7];let h;e[8]!==n.key||e[9]!==b||e[10]!==N?(h=t.jsx("button",{type:"button",onClick:b,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:n.key,children:N}),e[8]=n.key,e[9]=b,e[10]=N,e[11]=h):h=e[11];let C;e[12]!==a?(C=t.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-[10px] font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=C):C=e[13];let _;e[14]!==n||e[15]!==i?(_=t.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(xe,{item:n,onSelect:i})}),e[14]=n,e[15]=i,e[16]=_):_=e[16];let S;e[17]!==n.key?(S=he(n.key),e[17]=n.key,e[18]=S):S=e[18];let I;e[19]!==S?(I=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx("p",{className:"truncate text-xs text-white",children:S})}),e[19]=S,e[20]=I):I=e[20];let P;return e[21]!==h||e[22]!==C||e[23]!==_||e[24]!==I?(P=t.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[h,C,_,I]}),e[21]=h,e[22]=C,e[23]=_,e[24]=I,e[25]=P):P=e[25],P}let r;e[26]!==n.publicUrl||e[27]!==i?(r=()=>i(n.publicUrl),e[26]=n.publicUrl,e[27]=i,e[28]=r):r=e[28];let m;e[29]!==n.key?(m=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:ye(n.key)?t.jsx(H,{size:16,className:"text-muted-foreground"}):t.jsx(ze,{size:16,className:"text-muted-foreground"})}),e[29]=n.key,e[30]=m):m=e[30];let c;e[31]!==n.key?(c=he(n.key),e[31]=n.key,e[32]=c):c=e[32];let p;e[33]!==c?(p=t.jsx("p",{className:"truncate text-sm font-medium",children:c}),e[33]=c,e[34]=p):p=e[34];let d;e[35]!==n.key?(d=t.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:n.key}),e[35]=n.key,e[36]=d):d=e[36];let x;e[37]!==p||e[38]!==d?(x=t.jsxs("div",{className:"min-w-0 flex-1",children:[p,d]}),e[37]=p,e[38]=d,e[39]=x):x=e[39];let f;e[40]!==a?(f=t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=f):f=e[41];let g;e[42]!==n.size?(g=bt(n.size),e[42]=n.size,e[43]=g):g=e[43];let j;e[44]!==g?(j=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:g}),e[44]=g,e[45]=j):j=e[45];let u;e[46]!==j||e[47]!==r||e[48]!==m||e[49]!==x||e[50]!==f?(u=t.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[m,x,f,j]}),e[46]=j,e[47]=r,e[48]=m,e[49]=x,e[50]=f,e[51]=u):u=e[51];let y;e[52]!==n||e[53]!==i?(y=t.jsx(xe,{item:n,onSelect:i}),e[52]=n,e[53]=i,e[54]=y):y=e[54];let k;return e[55]!==u||e[56]!==y?(k=t.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-muted/50",children:[u,y]}),e[55]=u,e[56]=y,e[57]=k):k=e[57],k}function gt(s){s.target.style.display="none"}function xe(s){const e=w.c(22),{item:n,onSelect:l}=s,[i,o]=$.useState(!1);let a;e[0]!==n.publicUrl?(a=async function(b){b.preventDefault(),b.stopPropagation();try{await navigator.clipboard.writeText(n.publicUrl),o(!0),window.setTimeout(()=>o(!1),1500)}catch{Q.error("Failed to copy URL")}},e[0]=n.publicUrl,e[1]=a):a=e[1];const r=a;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Re,{asChild:!0,children:t.jsx(Y,{type:"button",variant:"ghost",size:"icon",className:"size-7 rounded-md bg-background/80 backdrop-blur-sm",onClick:ht,"aria-label":"Asset actions",children:t.jsx(De,{size:14})})}),e[2]=m):m=e[2];let c;e[3]!==n.publicUrl||e[4]!==l?(c=()=>l(n.publicUrl),e[3]=n.publicUrl,e[4]=l,e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ge,{size:14}),e[6]=p):p=e[6];let d;e[7]!==c?(d=t.jsxs(ce,{onClick:c,children:[p,"Use this"]}),e[7]=c,e[8]=d):d=e[8];let x;e[9]!==i?(x=i?t.jsx(ge,{size:14}):t.jsx($e,{size:14}),e[9]=i,e[10]=x):x=e[10];const f=i?"Copied":"Copy URL";let g;e[11]!==r||e[12]!==x||e[13]!==f?(g=t.jsxs(ce,{onClick:r,children:[x,f]}),e[11]=r,e[12]=x,e[13]=f,e[14]=g):g=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Fe,{size:14}),e[15]=j):j=e[15];let u;e[16]!==n.publicUrl?(u=t.jsx(ce,{asChild:!0,children:t.jsxs("a",{href:n.publicUrl,target:"_blank",rel:"noreferrer",onClick:pt,children:[j,"Open in new tab"]})}),e[16]=n.publicUrl,e[17]=u):u=e[17];let y;return e[18]!==u||e[19]!==d||e[20]!==g?(y=t.jsxs(Be,{children:[m,t.jsxs(Ge,{align:"end",onClick:xt,children:[d,g,u]})]}),e[18]=u,e[19]=d,e[20]=g,e[21]=y):y=e[21],y}function pt(s){return s.stopPropagation()}function xt(s){return s.stopPropagation()}function ht(s){return s.stopPropagation()}function he(s){const e=s.split("/");return e[e.length-1]??s}function bt(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function jt(s){try{const e=new URL(s).pathname;return decodeURIComponent(e.split("/").pop()??s)}catch{return s.split("/").pop()??s}}function yt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"":s.slice(e+1).toLowerCase()}const vt=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Gt(s){const e=w.c(79),{schema:n,value:l,onChange:i,path:o,label:a}=s,r=Xe(l),[m,c]=$.useState(!1),[p,d]=$.useState(!1),[x,f]=$.useState(!1),[g,j]=$.useState(!1),u=r?jt(r):"",y=u?yt(u):"",k=Ye(),b=je();let N;e[0]!==i||e[1]!==j||e[2]!==f?(N=function(v){f(!1),j(!1),i(v)},e[0]=i,e[1]=j,e[2]=f,e[3]=N):N=e[3];const h=N;let C;e[4]!==k.data?.configs?(C=function(){const v=k.data?.configs??[];if(v.length===1)return v[0].id;if(v.length===0)return null;const D=typeof window<"u"?window.localStorage.getItem(ue):null;return v.some(te=>te.id===D)?D:null},e[4]=k.data?.configs,e[5]=C):C=e[5];const _=C;let S;e[6]!==_||e[7]!==c||e[8]!==h||e[9]!==b?(S=async function(v){if(!v)return;const D=Array.from(v).filter(Nt);if(D.length===0){Q.error("Only image files are accepted here.");return}const te=_();if(!te){c(!0);return}try{const ae=await b.mutateAsync({configId:te,file:D[0]});h(ae.publicUrl),D.length>1&&Q.info(`Uploaded ${D[0].name}; extra files were ignored (single-select field).`)}catch(ae){const me=ae;Q.error(me instanceof Error?me.message:"Upload failed")}},e[6]=_,e[7]=c,e[8]=h,e[9]=b,e[10]=S):S=e[10];const I=S;let P;e[11]!==d?(P=function(v){v.preventDefault(),v.dataTransfer.types.includes("Files")&&d(!0)},e[11]=d,e[12]=P):P=e[12];const se=P;let W;e[13]!==d?(W=function(v){v.currentTarget===v.target&&d(!1)},e[13]=d,e[14]=W):W=e[14];const ne=W;let X;e[15]!==I||e[16]!==d?(X=function(v){v.preventDefault(),d(!1),I(v.dataTransfer.files)},e[15]=I,e[16]=d,e[17]=X):X=e[17];const ie=X;let z;e[18]!==a||e[19]!==o?(z=t.jsx(Pe,{htmlFor:o,className:"text-muted-foreground",children:a}),e[18]=a,e[19]=o,e[20]=z):z=e[20];let F;e[21]!==n.description?(F=n.description&&t.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=F):F=e[22];let T;e[23]!==z||e[24]!==F?(T=t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[z,F]}),e[23]=z,e[24]=F,e[25]=T):T=e[25];const le=p&&"border-primary ring-2 ring-primary/30",re=b.isPending&&"pointer-events-none opacity-60";let E;e[26]!==le||e[27]!==re?(E=de("group relative w-full overflow-hidden rounded-xl border border-border/60 bg-muted/30 transition",le,re),e[26]=le,e[27]=re,e[28]=E):E=e[28];let L;e[29]!==y||e[30]!==u||e[31]!==g||e[32]!==x||e[33]!==a||e[34]!==j||e[35]!==f||e[36]!==c||e[37]!==r||e[38]!==b.isPending?(L=r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative h-40 w-full bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",children:[!g&&t.jsx("img",{src:r,alt:a,className:de("h-full w-full object-contain transition-opacity",!x&&"opacity-0"),onLoad:()=>f(!0),onError:()=>j(!0)},r),g&&t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[t.jsx(H,{size:20}),t.jsx("p",{className:"text-xs",children:"Preview unavailable"})]}),!x&&!g&&t.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"})]}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:u}),y&&t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:y})]})]}):t.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex h-40 w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[t.jsx(H,{size:20}),t.jsx("span",{className:"text-sm font-medium",children:b.isPending?"Uploading…":"Drop an image or click to browse"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPEG, WebP, GIF, SVG, AVIF — up to 100 MB"})]}),e[29]=y,e[30]=u,e[31]=g,e[32]=x,e[33]=a,e[34]=j,e[35]=f,e[36]=c,e[37]=r,e[38]=b.isPending,e[39]=L):L=e[39];let O;e[40]!==p?(O=p&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:t.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow",children:"Drop to upload"})}),e[40]=p,e[41]=O):O=e[41];let A;e[42]!==ne||e[43]!==se||e[44]!==ie||e[45]!==E||e[46]!==L||e[47]!==O?(A=t.jsxs("div",{onDragOver:se,onDragLeave:ne,onDrop:ie,className:E,children:[L,O]}),e[42]=ne,e[43]=se,e[44]=ie,e[45]=E,e[46]=L,e[47]=O,e[48]=A):A=e[48];let R;e[49]!==h?(R=U=>h(U.target.value),e[49]=h,e[50]=R):R=e[50];let B;e[51]!==o||e[52]!==r||e[53]!==R?(B=t.jsx(Ie,{id:o,type:"url",value:r,onChange:R,placeholder:"https://...",className:"h-9 min-w-0 flex-1"}),e[51]=o,e[52]=r,e[53]=R,e[54]=B):B=e[54];let G;e[55]!==c?(G=()=>c(!0),e[55]=c,e[56]=G):G=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(fe,{size:14}),e[57]=Z):Z=e[57];const oe=r?"Replace":"Browse";let M;e[58]!==G||e[59]!==oe?(M=t.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:G,className:"h-9 shrink-0",children:[Z,oe]}),e[58]=G,e[59]=oe,e[60]=M):M=e[60];let V;e[61]!==h||e[62]!==r?(V=r&&t.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>h(""),className:"h-9 shrink-0","aria-label":"Remove image",children:t.jsx(_e,{size:14})}),e[61]=h,e[62]=r,e[63]=V):V=e[63];let K;e[64]!==B||e[65]!==M||e[66]!==V?(K=t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[B,M,V]}),e[64]=B,e[65]=M,e[66]=V,e[67]=K):K=e[67];let q;e[68]!==h?(q=U=>h(U),e[68]=h,e[69]=q):q=e[69];let J;e[70]!==m||e[71]!==c||e[72]!==q?(J=t.jsx(st,{open:m,onOpenChange:c,mode:"image",onSelect:q}),e[70]=m,e[71]=c,e[72]=q,e[73]=J):J=e[73];let ee;return e[74]!==A||e[75]!==K||e[76]!==J||e[77]!==T?(ee=t.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[T,A,K,J]}),e[74]=A,e[75]=K,e[76]=J,e[77]=T,e[78]=ee):ee=e[78],ee}function Nt(s){return vt.has(s.type||"")}export{st as F,Gt as I,ue as L,Xe as e,je as u};
1
+ import{e as w,q as be,a as Ne,K as ke,j as t,E as we,r as $,c as de,B as Y,l as Ce,P as Se,o as Q}from"./index-IBt4YI87.js";import{a as H}from"./Tool01-Dt1EhG_-.js";import{s as _e}from"./Trash01-DU9k1Vtq.js";import{i as fe}from"./Upload01-D-DASWOL.js";import{I as Ie}from"./input-DCxahixb.js";import{L as Pe}from"./label-CdfI63_J.js";import{i as Ue}from"./AlertCircle-BTsannAB.js";import{i as ge}from"./Check-Dw5D9iXJ.js";import{a as $e}from"./Eye-CpCOO2EF.js";import{i as De}from"./DotsVertical-BNgAjlpf.js";import{H as ze}from"./agent-icon-osOe3Xke.js";import{n as Fe}from"./LinkExternal01-BHt-Icgs.js";import{D as Te,c as Ee,e as Le,b as Oe,a as Ae}from"./dialog-BR_cEBrt.js";import{c as ce,a as Re,D as Be,b as Ge}from"./dropdown-menu-BR-D9W2L.js";import{S as Me}from"./skeleton-4_j-emR3.js";import{T as Ve,a as Ke,b as qe,c as Je}from"./tabs-B7rkPOQL.js";import{u as Qe,c as Ye}from"./use-file-configs-B2WdKpDl.js";import{u as He}from"./useInfiniteQuery-DDQWxHDI.js";import{u as We}from"./studio-tools-nLupF0VD.js";function Xe(s){if(typeof s=="string")return s;if(!s||typeof s!="object")return"";const e=s;if(Array.isArray(e.variants)){const n=e.variants,l=n.find(o=>o.rule?.__resolveType?.includes("always"));if(typeof l?.value=="string")return l.value;const i=n.find(o=>typeof o.value=="string");if(i)return i.value}return typeof e.src=="string"?e.src:typeof e.url=="string"?e.url:typeof e.value=="string"?e.value:""}function Ze(s){const e=w.c(10),{org:n}=be(),l=We();let i;e[0]!==n.id||e[1]!==s.configId?(i=ke.filePickerObjects(n.id,s.configId),e[0]=n.id,e[1]=s.configId,e[2]=i):i=e[2];const o=s.enabled!==!1&&!!s.configId;let a;e[3]!==s.configId||e[4]!==l?(a=async m=>{const{pageParam:c}=m;return await l.call("FILE_OBJECTS_LIST",{configId:s.configId,cursor:c??void 0})},e[3]=s.configId,e[4]=l,e[5]=a):a=e[5];let r;return e[6]!==i||e[7]!==o||e[8]!==a?(r={queryKey:i,enabled:o,staleTime:3e4,initialPageParam:null,queryFn:a,getNextPageParam:et},e[6]=i,e[7]=o,e[8]=a,e[9]=r):r=e[9],He(r)}function et(s){return s.nextCursor??void 0}function je(){const s=w.c(2),{org:e}=be();let n;return s[0]!==e?(n={mutationFn:async l=>{const i=l.file.type||"application/octet-stream",o=await fetch(`/api/${encodeURIComponent(e.slug)}/file-configs/${encodeURIComponent(l.configId)}/upload?filename=${encodeURIComponent(l.file.name)}`,{method:"POST",headers:{"Content-Type":i},body:l.file});if(!o.ok){const a=await o.text().catch(tt);let r=`${o.status} ${o.statusText}`;try{const m=JSON.parse(a);m.message&&(r=m.message)}catch{a&&(r=a.slice(0,200))}throw new Error(`Upload failed: ${r}`)}return await o.json()}},s[0]=e,s[1]=n):n=s[1],Ne(n)}function tt(){return""}const ue="file-picker:last-config-id";function st(s){const e=w.c(18),n=s.mode==="image"?"Pick an image":"Pick a file";let l;e[0]!==n?(l=t.jsx(Ee,{children:n}),e[0]=n,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Le,{children:"Upload a new file or pick one previously uploaded to a configured bucket."}),e[2]=i):i=e[2];let o;e[3]!==l?(o=t.jsxs(Oe,{children:[l,i]}),e[3]=l,e[4]=o):o=e[4];let a;e[5]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Me,{className:"h-64 w-full"}),e[5]=a):a=e[5];let r;e[6]!==s?(r=d=>{s.onSelect(d),s.onOpenChange(!1)},e[6]=s,e[7]=r):r=e[7];let m;e[8]!==s.mode||e[9]!==r?(m=t.jsx(we,{fallback:nt,children:t.jsx($.Suspense,{fallback:a,children:t.jsx(lt,{mode:s.mode,onSelect:r})})}),e[8]=s.mode,e[9]=r,e[10]=m):m=e[10];let c;e[11]!==o||e[12]!==m?(c=t.jsxs(Ae,{className:"sm:max-w-3xl max-h-[85vh] overflow-hidden flex flex-col",children:[o,m]}),e[11]=o,e[12]=m,e[13]=c):c=e[13];let p;return e[14]!==s.onOpenChange||e[15]!==s.open||e[16]!==c?(p=t.jsx(Te,{open:s.open,onOpenChange:s.onOpenChange,children:c}),e[14]=s.onOpenChange,e[15]=s.open,e[16]=c,e[17]=p):p=e[17],p}function nt(s){const{error:e}=s;return t.jsx(it,{error:e??new Error("Failed to load buckets")})}function it(s){const e=w.c(3),{error:n}=s;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(Ue,{size:16}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=t.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[l,t.jsx("span",{className:"text-sm font-medium",children:n.message})]}),e[1]=n.message,e[2]=i):i=e[2],i}function lt(s){const e=w.c(23),{mode:n,onSelect:l}=s,i=Qe();if(i.length===0){let f;return e[0]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(at,{}),e[0]=f):f=e[0],f}if(i.length===1){const f=i[0];let g;return e[1]!==f||e[2]!==n||e[3]!==l?(g=t.jsx(pe,{config:f,mode:n,onSelect:l}),e[1]=f,e[2]=n,e[3]=l,e[4]=g):g=e[4],g}let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=typeof window<"u"?window.localStorage.getItem(ue):null,e[5]=o):o=e[5];const a=o;let r;e[6]!==i?(r=i.find(f=>f.id===a)?.id??i[0].id,e[6]=i,e[7]=r):r=e[7];const m=r;let c;e[8]!==i?(c=i.map(rt),e[8]=i,e[9]=c):c=e[9];let p;e[10]!==c?(p=t.jsx(Ke,{className:"self-start",children:c}),e[10]=c,e[11]=p):p=e[11];let d;if(e[12]!==i||e[13]!==n||e[14]!==l){let f;e[16]!==n||e[17]!==l?(f=g=>t.jsx(qe,{value:g.id,className:"min-h-0 flex-1 overflow-hidden",children:t.jsx(pe,{config:g,mode:n,onSelect:l})},g.id),e[16]=n,e[17]=l,e[18]=f):f=e[18],d=i.map(f),e[12]=i,e[13]=n,e[14]=l,e[15]=d}else d=e[15];let x;return e[19]!==m||e[20]!==p||e[21]!==d?(x=t.jsxs(Je,{defaultValue:m,onValueChange:ot,className:"min-h-0 flex-1 flex flex-col",children:[p,d]}),e[19]=m,e[20]=p,e[21]=d,e[22]=x):x=e[22],x}function rt(s){return t.jsx(Ve,{value:s.id,children:s.name},s.id)}function ot(s){typeof window<"u"&&window.localStorage.setItem(ue,s)}function at(){const s=w.c(3);let e,n;s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"size-12 rounded-full bg-muted flex items-center justify-center",children:t.jsx(fe,{size:20,className:"text-muted-foreground"})}),n=t.jsxs("div",{children:[t.jsx("p",{className:"font-medium text-sm",children:"No bucket configured"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1 max-w-sm",children:"Add an S3-compatible bucket in Settings before you can upload files."})]}),s[0]=e,s[1]=n):(e=s[0],n=s[1]);let l;return s[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs("div",{className:"rounded-xl border border-dashed border-border/60 p-10 flex flex-col items-center justify-center text-center gap-3",children:[e,n,t.jsx(Y,{asChild:!0,size:"sm",className:"mt-2",children:t.jsx(Se,{to:"/settings/files",children:"Configure a bucket"})})]}),s[2]=l):l=s[2],l}function pe({config:s,mode:e,onSelect:n}){const l=Ze({configId:s.id}),i=je(),[o,a]=$.useState(!1),r=$.useRef(null),m=e==="image"?"image/*":void 0;async function c(u){if(!u)return;const y=Array.from(u);if(y.length===0)return;let k=null;const b=[];for(const N of y)try{const h=await i.mutateAsync({configId:s.id,file:N});k??=h.publicUrl}catch(h){b.push(`${N.name} (${h instanceof Error?h.message:"upload failed"})`)}await l.refetch(),b.length>0&&Q.error(b.length===y.length?`Upload failed: ${b.join("; ")}`:`Some files failed: ${b.join("; ")}`),k&&n(k)}function p(u){u.preventDefault(),a(!0)}function d(){a(!1)}function x(u){u.preventDefault(),a(!1),c(u.dataTransfer.files)}const g=(l.data?.pages??[]).flatMap(u=>u.items),j=g.filter(u=>e==="image"?ye(u.key):!0);return t.jsxs("div",{className:"flex flex-col gap-3 min-h-0 h-full",children:[t.jsxs("button",{type:"button",onClick:()=>r.current?.click(),onDragOver:p,onDragLeave:d,onDrop:x,className:de("rounded-xl border border-dashed border-border/60 p-6 flex flex-col items-center justify-center gap-2 text-center transition-colors",o&&"border-primary bg-primary/5",i.isPending&&"opacity-60 pointer-events-none"),children:[t.jsx(fe,{size:18,className:"text-muted-foreground"}),t.jsx("p",{className:"text-sm font-medium",children:i.isPending?"Uploading…":"Drop files here or click to upload"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Up to 100 MB."," ",e==="image"?"Images only (PNG, JPEG, WebP, GIF, SVG, AVIF).":"Common image, video, audio, and document types."]}),t.jsx("input",{ref:r,type:"file",accept:m,multiple:!0,className:"hidden",onChange:u=>{const y=u.target.files;u.target.value="",c(y)}})]}),l.isFetching&&!l.isFetchingNextPage?t.jsx("div",{className:"flex justify-end",children:t.jsx("span",{className:"text-xs text-muted-foreground",children:"Loading…"})}):null,t.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto pr-1",children:[j.length===0?e==="image"&&g.length>0?t.jsx(dt,{}):t.jsx(ct,{}):e==="image"?t.jsx(ut,{items:j,onSelect:n}):t.jsx(mt,{items:j,onSelect:n}),l.hasNextPage&&t.jsx("div",{className:"flex justify-center py-4",children:t.jsx(Y,{type:"button",variant:"outline",size:"sm",disabled:l.isFetchingNextPage,onClick:()=>l.fetchNextPage(),children:l.isFetchingNextPage?t.jsxs(t.Fragment,{children:[t.jsx(Ce,{size:14,className:"animate-spin"}),"Loading…"]}):"Load more"})})]})]})}function ct(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(H,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No files in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Drop a file above to get started."})]}),s[0]=e):e=s[0],e}function dt(){const s=w.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex h-full min-h-40 flex-col items-center justify-center gap-2 py-8 text-center",children:[t.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-muted",children:t.jsx(H,{size:18,className:"text-muted-foreground"})}),t.jsx("p",{className:"text-sm font-medium",children:"No images in this bucket yet"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"The bucket has other files, but none match common image formats."})]}),s[0]=e):e=s[0],e}function ye(s){return/\.(png|jpe?g|gif|webp|svg|avif|bmp)$/i.test(s)}function ft(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"file":s.slice(e+1).toLowerCase()}function ut(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx(ve,{item:r,variant:"image",onSelect:l},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3",children:i}),e[5]=i,e[6]=o):o=e[6],o}function mt(s){const e=w.c(7),{items:n,onSelect:l}=s;let i;if(e[0]!==n||e[1]!==l){let a;e[3]!==l?(a=r=>t.jsx("li",{children:t.jsx(ve,{item:r,variant:"row",onSelect:l})},r.key),e[3]=l,e[4]=a):a=e[4],i=n.map(a),e[0]=n,e[1]=l,e[2]=i}else i=e[2];let o;return e[5]!==i?(o=t.jsx("ul",{className:"divide-y divide-border/60 rounded-lg border border-border/60",children:i}),e[5]=i,e[6]=o):o=e[6],o}function ve(s){const e=w.c(58),{item:n,variant:l,onSelect:i}=s;let o;e[0]!==n.key?(o=ft(n.key),e[0]=n.key,e[1]=o):o=e[1];const a=o;if(l==="image"){let b;e[2]!==n.publicUrl||e[3]!==i?(b=()=>i(n.publicUrl),e[2]=n.publicUrl,e[3]=i,e[4]=b):b=e[4];let N;e[5]!==n.key||e[6]!==n.publicUrl?(N=t.jsx("img",{src:n.publicUrl,alt:n.key,loading:"lazy",className:"h-full w-full object-cover",onError:gt}),e[5]=n.key,e[6]=n.publicUrl,e[7]=N):N=e[7];let h;e[8]!==n.key||e[9]!==b||e[10]!==N?(h=t.jsx("button",{type:"button",onClick:b,className:"block h-full w-full transition hover:ring-2 hover:ring-primary",title:n.key,children:N}),e[8]=n.key,e[9]=b,e[10]=N,e[11]=h):h=e[11];let C;e[12]!==a?(C=t.jsx("span",{className:"pointer-events-none absolute left-1.5 top-1.5 rounded bg-background/80 px-1.5 py-0.5 text-[10px] font-medium uppercase text-foreground opacity-0 backdrop-blur-sm transition-opacity group-hover:opacity-100",children:a}),e[12]=a,e[13]=C):C=e[13];let _;e[14]!==n||e[15]!==i?(_=t.jsx("div",{className:"absolute right-1.5 top-1.5 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx(xe,{item:n,onSelect:i})}),e[14]=n,e[15]=i,e[16]=_):_=e[16];let S;e[17]!==n.key?(S=he(n.key),e[17]=n.key,e[18]=S):S=e[18];let I;e[19]!==S?(I=t.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent p-2 opacity-0 transition-opacity group-hover:opacity-100",children:t.jsx("p",{className:"truncate text-xs text-white",children:S})}),e[19]=S,e[20]=I):I=e[20];let P;return e[21]!==h||e[22]!==C||e[23]!==_||e[24]!==I?(P=t.jsxs("div",{className:"group relative aspect-square overflow-hidden rounded-lg border border-border/60 bg-muted",children:[h,C,_,I]}),e[21]=h,e[22]=C,e[23]=_,e[24]=I,e[25]=P):P=e[25],P}let r;e[26]!==n.publicUrl||e[27]!==i?(r=()=>i(n.publicUrl),e[26]=n.publicUrl,e[27]=i,e[28]=r):r=e[28];let m;e[29]!==n.key?(m=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-md bg-muted",children:ye(n.key)?t.jsx(H,{size:16,className:"text-muted-foreground"}):t.jsx(ze,{size:16,className:"text-muted-foreground"})}),e[29]=n.key,e[30]=m):m=e[30];let c;e[31]!==n.key?(c=he(n.key),e[31]=n.key,e[32]=c):c=e[32];let p;e[33]!==c?(p=t.jsx("p",{className:"truncate text-sm font-medium",children:c}),e[33]=c,e[34]=p):p=e[34];let d;e[35]!==n.key?(d=t.jsx("p",{className:"truncate font-mono text-xs text-muted-foreground",children:n.key}),e[35]=n.key,e[36]=d):d=e[36];let x;e[37]!==p||e[38]!==d?(x=t.jsxs("div",{className:"min-w-0 flex-1",children:[p,d]}),e[37]=p,e[38]=d,e[39]=x):x=e[39];let f;e[40]!==a?(f=t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:a}),e[40]=a,e[41]=f):f=e[41];let g;e[42]!==n.size?(g=bt(n.size),e[42]=n.size,e[43]=g):g=e[43];let j;e[44]!==g?(j=t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:g}),e[44]=g,e[45]=j):j=e[45];let u;e[46]!==j||e[47]!==r||e[48]!==m||e[49]!==x||e[50]!==f?(u=t.jsxs("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 text-left",children:[m,x,f,j]}),e[46]=j,e[47]=r,e[48]=m,e[49]=x,e[50]=f,e[51]=u):u=e[51];let y;e[52]!==n||e[53]!==i?(y=t.jsx(xe,{item:n,onSelect:i}),e[52]=n,e[53]=i,e[54]=y):y=e[54];let k;return e[55]!==u||e[56]!==y?(k=t.jsxs("div",{className:"group flex items-center gap-3 px-3 py-2 transition hover:bg-muted/50",children:[u,y]}),e[55]=u,e[56]=y,e[57]=k):k=e[57],k}function gt(s){s.target.style.display="none"}function xe(s){const e=w.c(22),{item:n,onSelect:l}=s,[i,o]=$.useState(!1);let a;e[0]!==n.publicUrl?(a=async function(b){b.preventDefault(),b.stopPropagation();try{await navigator.clipboard.writeText(n.publicUrl),o(!0),window.setTimeout(()=>o(!1),1500)}catch{Q.error("Failed to copy URL")}},e[0]=n.publicUrl,e[1]=a):a=e[1];const r=a;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(Re,{asChild:!0,children:t.jsx(Y,{type:"button",variant:"ghost",size:"icon",className:"size-7 rounded-md bg-background/80 backdrop-blur-sm",onClick:ht,"aria-label":"Asset actions",children:t.jsx(De,{size:14})})}),e[2]=m):m=e[2];let c;e[3]!==n.publicUrl||e[4]!==l?(c=()=>l(n.publicUrl),e[3]=n.publicUrl,e[4]=l,e[5]=c):c=e[5];let p;e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ge,{size:14}),e[6]=p):p=e[6];let d;e[7]!==c?(d=t.jsxs(ce,{onClick:c,children:[p,"Use this"]}),e[7]=c,e[8]=d):d=e[8];let x;e[9]!==i?(x=i?t.jsx(ge,{size:14}):t.jsx($e,{size:14}),e[9]=i,e[10]=x):x=e[10];const f=i?"Copied":"Copy URL";let g;e[11]!==r||e[12]!==x||e[13]!==f?(g=t.jsxs(ce,{onClick:r,children:[x,f]}),e[11]=r,e[12]=x,e[13]=f,e[14]=g):g=e[14];let j;e[15]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Fe,{size:14}),e[15]=j):j=e[15];let u;e[16]!==n.publicUrl?(u=t.jsx(ce,{asChild:!0,children:t.jsxs("a",{href:n.publicUrl,target:"_blank",rel:"noreferrer",onClick:pt,children:[j,"Open in new tab"]})}),e[16]=n.publicUrl,e[17]=u):u=e[17];let y;return e[18]!==u||e[19]!==d||e[20]!==g?(y=t.jsxs(Be,{children:[m,t.jsxs(Ge,{align:"end",onClick:xt,children:[d,g,u]})]}),e[18]=u,e[19]=d,e[20]=g,e[21]=y):y=e[21],y}function pt(s){return s.stopPropagation()}function xt(s){return s.stopPropagation()}function ht(s){return s.stopPropagation()}function he(s){const e=s.split("/");return e[e.length-1]??s}function bt(s){return s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`}function jt(s){try{const e=new URL(s).pathname;return decodeURIComponent(e.split("/").pop()??s)}catch{return s.split("/").pop()??s}}function yt(s){const e=s.lastIndexOf(".");return e<0||e===s.length-1?"":s.slice(e+1).toLowerCase()}const vt=new Set(["image/png","image/jpeg","image/gif","image/webp","image/svg+xml","image/avif"]);function Gt(s){const e=w.c(79),{schema:n,value:l,onChange:i,path:o,label:a}=s,r=Xe(l),[m,c]=$.useState(!1),[p,d]=$.useState(!1),[x,f]=$.useState(!1),[g,j]=$.useState(!1),u=r?jt(r):"",y=u?yt(u):"",k=Ye(),b=je();let N;e[0]!==i||e[1]!==j||e[2]!==f?(N=function(v){f(!1),j(!1),i(v)},e[0]=i,e[1]=j,e[2]=f,e[3]=N):N=e[3];const h=N;let C;e[4]!==k.data?.configs?(C=function(){const v=k.data?.configs??[];if(v.length===1)return v[0].id;if(v.length===0)return null;const D=typeof window<"u"?window.localStorage.getItem(ue):null;return v.some(te=>te.id===D)?D:null},e[4]=k.data?.configs,e[5]=C):C=e[5];const _=C;let S;e[6]!==_||e[7]!==c||e[8]!==h||e[9]!==b?(S=async function(v){if(!v)return;const D=Array.from(v).filter(Nt);if(D.length===0){Q.error("Only image files are accepted here.");return}const te=_();if(!te){c(!0);return}try{const ae=await b.mutateAsync({configId:te,file:D[0]});h(ae.publicUrl),D.length>1&&Q.info(`Uploaded ${D[0].name}; extra files were ignored (single-select field).`)}catch(ae){const me=ae;Q.error(me instanceof Error?me.message:"Upload failed")}},e[6]=_,e[7]=c,e[8]=h,e[9]=b,e[10]=S):S=e[10];const I=S;let P;e[11]!==d?(P=function(v){v.preventDefault(),v.dataTransfer.types.includes("Files")&&d(!0)},e[11]=d,e[12]=P):P=e[12];const se=P;let W;e[13]!==d?(W=function(v){v.currentTarget===v.target&&d(!1)},e[13]=d,e[14]=W):W=e[14];const ne=W;let X;e[15]!==I||e[16]!==d?(X=function(v){v.preventDefault(),d(!1),I(v.dataTransfer.files)},e[15]=I,e[16]=d,e[17]=X):X=e[17];const ie=X;let z;e[18]!==a||e[19]!==o?(z=t.jsx(Pe,{htmlFor:o,className:"text-muted-foreground",children:a}),e[18]=a,e[19]=o,e[20]=z):z=e[20];let F;e[21]!==n.description?(F=n.description&&t.jsx("p",{className:"text-xs leading-normal text-muted-foreground",children:n.description}),e[21]=n.description,e[22]=F):F=e[22];let T;e[23]!==z||e[24]!==F?(T=t.jsxs("div",{className:"min-w-0 space-y-0.5",children:[z,F]}),e[23]=z,e[24]=F,e[25]=T):T=e[25];const le=p&&"border-primary ring-2 ring-primary/30",re=b.isPending&&"pointer-events-none opacity-60";let E;e[26]!==le||e[27]!==re?(E=de("group relative w-full overflow-hidden rounded-xl border border-border/60 bg-muted/30 transition",le,re),e[26]=le,e[27]=re,e[28]=E):E=e[28];let L;e[29]!==y||e[30]!==u||e[31]!==g||e[32]!==x||e[33]!==a||e[34]!==j||e[35]!==f||e[36]!==c||e[37]!==r||e[38]!==b.isPending?(L=r?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative h-40 w-full bg-[image:linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%),linear-gradient(45deg,rgba(0,0,0,0.04)_25%,transparent_25%,transparent_75%,rgba(0,0,0,0.04)_75%)] bg-[position:0_0,8px_8px] [background-size:16px_16px]",children:[!g&&t.jsx("img",{src:r,alt:a,className:de("h-full w-full object-contain transition-opacity",!x&&"opacity-0"),onLoad:()=>f(!0),onError:()=>j(!0)},r),g&&t.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-1 text-muted-foreground",children:[t.jsx(H,{size:20}),t.jsx("p",{className:"text-xs",children:"Preview unavailable"})]}),!x&&!g&&t.jsx("div",{className:"absolute inset-0 animate-pulse bg-muted/60"})]}),t.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 bg-background/50 px-3 py-2",children:[t.jsx("span",{className:"min-w-0 flex-1 truncate text-xs font-medium",children:u}),y&&t.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium uppercase text-muted-foreground",children:y})]})]}):t.jsxs("button",{type:"button",onClick:()=>c(!0),className:"flex h-40 w-full flex-col items-center justify-center gap-2 text-sm text-muted-foreground hover:bg-muted/60 hover:text-foreground",children:[t.jsx(H,{size:20}),t.jsx("span",{className:"text-sm font-medium",children:b.isPending?"Uploading…":"Drop an image or click to browse"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPEG, WebP, GIF, SVG, AVIF — up to 100 MB"})]}),e[29]=y,e[30]=u,e[31]=g,e[32]=x,e[33]=a,e[34]=j,e[35]=f,e[36]=c,e[37]=r,e[38]=b.isPending,e[39]=L):L=e[39];let O;e[40]!==p?(O=p&&t.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-primary/10 backdrop-blur-[1px]",children:t.jsx("span",{className:"rounded-md bg-background px-3 py-1.5 text-xs font-medium shadow",children:"Drop to upload"})}),e[40]=p,e[41]=O):O=e[41];let A;e[42]!==ne||e[43]!==se||e[44]!==ie||e[45]!==E||e[46]!==L||e[47]!==O?(A=t.jsxs("div",{onDragOver:se,onDragLeave:ne,onDrop:ie,className:E,children:[L,O]}),e[42]=ne,e[43]=se,e[44]=ie,e[45]=E,e[46]=L,e[47]=O,e[48]=A):A=e[48];let R;e[49]!==h?(R=U=>h(U.target.value),e[49]=h,e[50]=R):R=e[50];let B;e[51]!==o||e[52]!==r||e[53]!==R?(B=t.jsx(Ie,{id:o,type:"url",value:r,onChange:R,placeholder:"https://...",className:"h-9 min-w-0 flex-1"}),e[51]=o,e[52]=r,e[53]=R,e[54]=B):B=e[54];let G;e[55]!==c?(G=()=>c(!0),e[55]=c,e[56]=G):G=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=t.jsx(fe,{size:14}),e[57]=Z):Z=e[57];const oe=r?"Replace":"Browse";let M;e[58]!==G||e[59]!==oe?(M=t.jsxs(Y,{type:"button",variant:"outline",size:"sm",onClick:G,className:"h-9 shrink-0",children:[Z,oe]}),e[58]=G,e[59]=oe,e[60]=M):M=e[60];let V;e[61]!==h||e[62]!==r?(V=r&&t.jsx(Y,{type:"button",variant:"ghost",size:"sm",onClick:()=>h(""),className:"h-9 shrink-0","aria-label":"Remove image",children:t.jsx(_e,{size:14})}),e[61]=h,e[62]=r,e[63]=V):V=e[63];let K;e[64]!==B||e[65]!==M||e[66]!==V?(K=t.jsxs("div",{className:"flex w-full min-w-0 items-center gap-2",children:[B,M,V]}),e[64]=B,e[65]=M,e[66]=V,e[67]=K):K=e[67];let q;e[68]!==h?(q=U=>h(U),e[68]=h,e[69]=q):q=e[69];let J;e[70]!==m||e[71]!==c||e[72]!==q?(J=t.jsx(st,{open:m,onOpenChange:c,mode:"image",onSelect:q}),e[70]=m,e[71]=c,e[72]=q,e[73]=J):J=e[73];let ee;return e[74]!==A||e[75]!==K||e[76]!==J||e[77]!==T?(ee=t.jsxs("div",{className:"grid w-full min-w-0 grid-cols-[minmax(0,1fr)] gap-2",children:[T,A,K,J]}),e[74]=A,e[75]=K,e[76]=J,e[77]=T,e[78]=ee):ee=e[78],ee}function Nt(s){return vt.has(s.type||"")}export{st as F,Gt as I,ue as L,Xe as e,je as u};
@@ -1,4 +1,4 @@
1
- import{e5 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e6 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e7 as Nt,e8 as es,o as Ys,v as Zs,e9 as en,ea as tn}from"./index-BpHKT80f.js";import{D as sn,F as nn,B as on}from"./index-CXykQoXr.js";import{h as De,i as rn,u as ae}from"./use-mcp-client-u_MHI8VY.js";import{a as ts}from"./use-virtual-mcp-CC-vnpyx.js";import{M as Oe}from"./monaco-editor-ps7H50eS.js";import{b as ln,R as zt,a as cn}from"./resizable-CA1KkrSC.js";import{B as le}from"./badge-CF8Qbgnm.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-BlwN9Vej.js";import{S as et}from"./spinner-iV1Pb5yc.js";import{V as an}from"./view-mode-toggle-DaQDP0Hg.js";import{aj as un,q as dn,i as fn,B as ss,ak as mn,a4 as pn,v as xn,al as ns,aa as hn,O as os,am as gn,an as bn,a6 as ft,ao as jn}from"./agent-icon-CpGp3Z_j.js";import{i as rs}from"./Play-Da5sMtTS.js";import{b as Sn,a as yn,V as Ge}from"./layout-BWE4r12s.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-Bzg3apEG.js";import{u as wn,a as vn}from"./use-connection-Dk0TNOQ6.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-Co2Su_jT.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-CakVcHgK.js";import"./index-W5kyiqww.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-BdT6MEhB.js";import{S as Fn}from"./index-CNsOv2lg.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-MHetYMuh.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-CWTLq4L0.js";import{s as Un}from"./Plus-DKKhAsjU.js";import{b as ps}from"./Tool01-DLVD3sFG.js";import{i as Fe}from"./Check-4eIqLz1o.js";import{s as _t}from"./XClose-lB-KoyXA.js";import{I as Ct}from"./integration-icon-Jr_UF6S2.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-C0246qCp.js";import"./index-DWx6bHXh.js";import{i as xs}from"./X-ROAwrDEL.js";import{u as hs,a as Gn}from"./use-collections-ZBVaGDFA.js";import{E as gs}from"./empty-state-DKVcL6PS.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-CrSCUdkK.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{e5 as se,e as I,j as o,B as te,l as Yt,b5 as Ae,e6 as Gs,r as X,q as oe,c as $,g as Qs,G as Zt,e7 as Nt,e8 as es,o as Ys,v as Zs,e9 as en,ea as tn}from"./index-IBt4YI87.js";import{D as sn,F as nn,B as on}from"./index-DllHR6ee.js";import{h as De,i as rn,u as ae}from"./use-mcp-client-BWBWxFyf.js";import{a as ts}from"./use-virtual-mcp--mdGOnb3.js";import{M as Oe}from"./monaco-editor-CORr1Yst.js";import{b as ln,R as zt,a as cn}from"./resizable-DWU3ErtZ.js";import{B as le}from"./badge-Cez0OzTb.js";import{b as xt,d as ht,c as Ze,a as gt,S as bt}from"./select-BCbLv4__.js";import{S as et}from"./spinner-Bjb2nwEj.js";import{V as an}from"./view-mode-toggle-YGR1OOUU.js";import{aj as un,q as dn,i as fn,B as ss,ak as mn,a4 as pn,v as xn,al as ns,aa as hn,O as os,am as gn,an as bn,a6 as ft,ao as jn}from"./agent-icon-osOe3Xke.js";import{i as rs}from"./Play-CWwVT1ep.js";import{b as Sn,a as yn,V as Ge}from"./layout-BhtdEX3U.js";import{c as is,b as ls,T as cs,a as as}from"./tooltip-uidgMYZs.js";import{u as wn,a as vn}from"./use-connection-Cp_AfkH2.js";import{u as kt,d as It,b as us}from"./use-mcp-tools-DGg_9CH1.js";import{b as Nn,c as kn,e as In,d as _n,a as Cn,D as Tn}from"./dialog-BR_cEBrt.js";import"./index-Ch5XdRnc.js";import{N as En,m as $n,n as On,o as Ke,P as Mn,i as Rn,R as Ln,u as zn,p as An,e as At,d as Wn,q as Pn,S as Dn}from"./scroll-area-XoAuLxYN.js";import{S as Fn}from"./index-DBJUXyq5.js";import{H as Vn,a as qn,b as Hn}from"./hover-card-Bv_j6ODB.js";import{D as ds,a as fs,b as ms,c as Qe}from"./dropdown-menu-BR-D9W2L.js";import{s as Un}from"./Plus-D6ZVo7op.js";import{b as ps}from"./Tool01-Dt1EhG_-.js";import{i as Fe}from"./Check-Dw5D9iXJ.js";import{s as _t}from"./XClose-6z0C_oDP.js";import{I as Ct}from"./integration-icon-TU0D51GL.js";import{A as Kn,c as Bn,a as Xn,b as Jn}from"./accordion-DnDUtyjB.js";import"./index-UNlOSNo_.js";import{i as xs}from"./X-Bin-Wtwp.js";import{u as hs,a as Gn}from"./use-collections-Bx2is5yZ.js";import{E as gs}from"./empty-state-BgJJwNhs.js";import{c as Qn}from"./create-sse-subscription-BS5983N4.js";import{I as Wt}from"./input-DCxahixb.js";const bs=se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const js=se("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const tt=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const st=se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const Yn=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const Ss=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const Zn=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ys=se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ws=se("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const vs=se("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const eo=se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ns=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ks=se("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const to=se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Is=se("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function so(t){const e=I.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(un,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(Yt,{size:14,className:"animate-spin"}):o.jsx(dn,{size:14}),e[5]=r,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(p=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=p):p=e[11];let x;return e[12]!==f||e[13]!==p?(x=o.jsxs(o.Fragment,{children:[f,p]}),e[12]=f,e[13]=p,e[14]=x):x=e[14],x}const Pt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(p=>p(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Tt=(t=>t?Pt(t):Pt),no=t=>t;function jt(t,e=no){const n=Ae.useSyncExternalStore(t.subscribe,Ae.useCallback(()=>e(t.getState()),[t,e]),Ae.useCallback(()=>e(t.getInitialState()),[t,e]));return Ae.useDebugValue(n),n}const oo=t=>{const e=Tt(t),n=s=>jt(e,s);return Object.assign(n,e),n},ro=(t=>oo);function _s(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const St=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return St(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return St(s)(n)}}}},io=(t,e)=>(n,s,i)=>{let r={storage:_s(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const p=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>p;let x;const h=()=>{var g,b;if(!d)return;const S=++c;l=!1,a.forEach(y=>{var j;return y((j=s())!=null?j:p)});const w=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:p))||void 0;return St(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const j=r.migrate(y.state,y.version);return j instanceof Promise?j.then(v=>[!0,v]):[!0,j]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var j;if(S!==c)return;const[v,N]=y;if(x=r.merge(N,(j=s())!=null?j:p),n(x,!0),v)return f()}).then(()=>{S===c&&(w?.(s(),void 0),x=s(),l=!0,u.forEach(y=>y(x)))}).catch(y=>{S===c&&w?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),x||p},Cs=io,{useSyncExternalStoreWithSelector:lo}=Gs,co=t=>t;function ao(t,e=co,n){const s=lo(t.subscribe,t.getState,t.getInitialState,e,n);return Ae.useDebugValue(s),s}const Dt=t=>Symbol.iterator in t,Ft=t=>"entries"in t,Vt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},uo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function fo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Dt(t)&&Dt(e)?Ft(t)&&Ft(e)?Vt(t,e):uo(t,e):Vt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Ts(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{e as k,j as o,p as T,r as N,O as D}from"./index-BpHKT80f.js";import{u as z,S as E,a as I,b as L}from"./sidebar-ClntAuIc.js";import{T as M,a as O,b as A,u as P}from"./tooltip-Bzg3apEG.js";import{S as $,a as W,b as B}from"./shell-route-loading-BIZ6nC8J.js";import{u as X,C as H}from"./chat-context-ChsEaJrL.js";import{T as F}from"./tab-id-3QcIfNPm.js";import{i as q}from"./Monitor01-CNSOfium.js";import{v as G,C as K}from"./connect-desktop-dialog-W-0xLr_n.js";import{T as Y,a as b}from"./toolbar-sicu1cLe.js";import{S as U,M as J}from"./shell-controls-Yj9zkwJT.js";import"./LayoutLeft-CRWhJz8B.js";import"./sheet-C9OeYoob.js";import"./X-ROAwrDEL.js";import"./useRouterState-B9EuTqlu.js";import"./ZoomOut-BrHpnwt5.js";import"./skeleton-CwBsvOfD.js";import"./popover-BWqC53zq.js";import"./drawer-CcoGGoOo.js";import"./SearchMd-DuoZUs1O.js";import"./Star01-D71oJ2C0.js";import"./Plus-DKKhAsjU.js";import"./use-mcp-client-u_MHI8VY.js";import"./use-virtual-mcp-CC-vnpyx.js";import"./use-collections-ZBVaGDFA.js";import"./use-create-virtual-mcp-LZBczPxY.js";import"./use-navigate-to-agent-V0Re0kfV.js";import"./github-repo-picker-CjED-Ho0.js";import"./use-connection-Dk0TNOQ6.js";import"./dialog-CakVcHgK.js";import"./RefreshCcw01--I2EXN3r.js";import"./collection-search-udFdxyyt.js";import"./checkbox-BmkvyW16.js";import"./Check-4eIqLz1o.js";import"./agent-icon-CpGp3Z_j.js";import"./AlertCircle-CVfKrYvR.js";import"./Tool01-DLVD3sFG.js";import"./SwitchHorizontal01-D4Pq3_cg.js";import"./XCircle-qIalM-tE.js";import"./ArrowUpRight-CZJ1_8ff.js";import"./ZapSquare-NjYLgWlz.js";import"./Users03-oCa8QaJT.js";import"./CheckCircle-C6azXF6K.js";import"./ChevronDown-CNQyx7xp.js";import"./ChevronLeft-BiFGS012.js";import"./ChevronRight-_JUGNZYN.js";import"./ChevronUp-MJGa44ay.js";import"./DotsVertical-2Z1C6jvt.js";import"./Container-DljtwK8x.js";import"./Eye-BZTA9B_k.js";import"./Globe01-XqX0cF4u.js";import"./FilterLines-BIc99EZW.js";import"./Palette-DpkfLWBZ.js";import"./HardDrive-CW-vNyxs.js";import"./Stars02-Dlfu9WL9.js";import"./Key01-BPeDVar3.js";import"./LinkExternal01-C7wWl-UH.js";import"./Sun-u569y38Z.js";import"./Play-Da5sMtTS.js";import"./Settings02-BWmIO2S8.js";import"./Shield01-tcvJIq4r.js";import"./Stars01-C8Z61ENf.js";import"./Trash01-4XBt_tI7.js";import"./Upload01-DzLJ3gpY.js";import"./User01-CYChyPXV.js";import"./Users01-_lrrXmCB.js";import"./XClose-lB-KoyXA.js";import"./Zap-DeqhXyEZ.js";import"./use-mcp-tools-Co2Su_jT.js";import"./extract-connection-data-CDsxXNql.js";import"./generate-id-DqiWwIQ9.js";import"./collections-xMkSecim.js";import"./shell-layout-CBnbPDoL.js";import"./avatar-DxUqupGC.js";import"./required-auth-layout-DH07bG2g.js";import"./use-organization-settings-BwO5SItR.js";import"./use-org-sso-BFKiHzWZ.js";import"./alert-dialog-Ctl3oPPD.js";import"./form-Dsw-Z6di.js";import"./label-DVsZqCyz.js";import"./input-CrSCUdkK.js";import"./spinner-iV1Pb5yc.js";import"./index-DWx6bHXh.js";import"./sortable.esm-De-54tZ3.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-0dTT6S9Q.js";import"./use-registry-connections-Dt-dLPgn.js";import"./useInfiniteQuery-CTHnpbKA.js";import"./infiniteQueryObserver-D63prNq4.js";import"./card-DfWQEGhA.js";import"./integration-icon-Jr_UF6S2.js";import"./collection-tabs-DyeSBoHz.js";import"./badge-CF8Qbgnm.js";import"./select-BlwN9Vej.js";import"./textarea-8pboLFLk.js";import"./connection-form-helpers-Baz6qZA0.js";import"./use-infinite-scroll-crZE7yIL.js";import"./useSuspenseInfiniteQuery-DyRicwLF.js";import"./use-ai-providers-zQf8BGqD.js";import"./command-DrkUYhCh.js";import"./index-DP2quHw4.js";import"./studio-tools-DEQRneUy.js";import"./use-org-auth-client-_tKKyZeP.js";import"./hover-card-MHetYMuh.js";import"./task-status-DY7Jd7M1.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./decopilot-sse-pool-BFIK6-UW.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function no(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{no as default};
1
+ import{e as k,j as o,p as T,r as N,O as D}from"./index-IBt4YI87.js";import{u as z,S as E,a as I,b as L}from"./sidebar-DHtVfRt2.js";import{T as M,a as O,b as A,u as P}from"./tooltip-uidgMYZs.js";import{S as $,a as W,b as B}from"./shell-route-loading-C7rwAk6O.js";import{u as X,C as H}from"./chat-context-CxtE-1u6.js";import{T as F}from"./tab-id-R_vPeOM-.js";import{i as q}from"./Monitor01-B4axAVMt.js";import{v as G,C as K}from"./connect-desktop-dialog-BCyvd3Xf.js";import{T as Y,a as b}from"./toolbar-DoGR7Gvt.js";import{S as U,M as J}from"./shell-controls-DoInONui.js";import"./LayoutLeft-Dr3sGtrV.js";import"./sheet-Dz53NwAL.js";import"./X-Bin-Wtwp.js";import"./useRouterState-B1E0dGkV.js";import"./ZoomOut-CiH8kMDs.js";import"./skeleton-4_j-emR3.js";import"./popover-DVm7Ssxi.js";import"./drawer-Cy2Kz1Hn.js";import"./SearchMd-CWML-MzT.js";import"./Star01-B7S_p3mf.js";import"./Plus-D6ZVo7op.js";import"./use-mcp-client-BWBWxFyf.js";import"./use-virtual-mcp--mdGOnb3.js";import"./use-collections-Bx2is5yZ.js";import"./use-create-virtual-mcp-OVjH7swn.js";import"./use-navigate-to-agent-BcLfXkiQ.js";import"./github-repo-picker-BkgEqwQh.js";import"./use-connection-Cp_AfkH2.js";import"./dialog-BR_cEBrt.js";import"./RefreshCcw01-DgaWok1L.js";import"./collection-search-DjpaeDqd.js";import"./checkbox-CBeySlCT.js";import"./Check-Dw5D9iXJ.js";import"./agent-icon-osOe3Xke.js";import"./AlertCircle-BTsannAB.js";import"./Tool01-Dt1EhG_-.js";import"./SwitchHorizontal01-BJpif5Ll.js";import"./XCircle-BOhKS6lm.js";import"./ArrowUpRight-DtMpnmAC.js";import"./ZapSquare-DO6_8wah.js";import"./Users03-DNzqxyDz.js";import"./CheckCircle-Bho6B2to.js";import"./ChevronDown-CWdX7_sm.js";import"./ChevronLeft-ordKzex8.js";import"./ChevronRight-tUvvDqzz.js";import"./ChevronUp-CVZqh7eX.js";import"./DotsVertical-BNgAjlpf.js";import"./Container-CESuzynk.js";import"./Eye-CpCOO2EF.js";import"./Globe01-CP5QNSRl.js";import"./FilterLines-sUNPJnxX.js";import"./Palette-BSSJKY8F.js";import"./HardDrive-BP6zv7bm.js";import"./Stars02-CNXKv81Q.js";import"./Key01-CFH6lkz0.js";import"./LinkExternal01-BHt-Icgs.js";import"./Sun-Cxxu7rF-.js";import"./Play-CWwVT1ep.js";import"./Settings02-DnBIVw0J.js";import"./Shield01-CDyxjwN4.js";import"./Stars01-BigO76ki.js";import"./Trash01-DU9k1Vtq.js";import"./Upload01-D-DASWOL.js";import"./User01-BUWoWpIi.js";import"./Users01-CuU4FaYD.js";import"./XClose-6z0C_oDP.js";import"./Zap-D4FMWUsp.js";import"./use-mcp-tools-DGg_9CH1.js";import"./extract-connection-data-BxBk-cC0.js";import"./generate-id-BHjDNIIC.js";import"./collections-BPUYMxUg.js";import"./shell-layout-CyNNDyY2.js";import"./avatar-DUHP1iU3.js";import"./required-auth-layout-8fkEaCnp.js";import"./use-organization-settings-CKbkYw8a.js";import"./use-org-sso-DNHpoek2.js";import"./alert-dialog-BMks46p7.js";import"./form-Dk0zvzGa.js";import"./label-CdfI63_J.js";import"./input-DCxahixb.js";import"./spinner-Bjb2nwEj.js";import"./index-UNlOSNo_.js";import"./sortable.esm-BuYk742s.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-C7_-0Sn-.js";import"./use-registry-connections-B0kDvUPs.js";import"./useInfiniteQuery-DDQWxHDI.js";import"./infiniteQueryObserver-BmvWohEo.js";import"./card-CC-M7EZ6.js";import"./integration-icon-TU0D51GL.js";import"./collection-tabs-BDvRsxUe.js";import"./badge-Cez0OzTb.js";import"./select-BCbLv4__.js";import"./textarea-DVqVYdU_.js";import"./connection-form-helpers-C26m1Ef7.js";import"./use-infinite-scroll-DnRfnOse.js";import"./useSuspenseInfiniteQuery-CtNc8-Ct.js";import"./use-ai-providers-zhWaTacO.js";import"./command-D2-J-HVJ.js";import"./index-C6xUYocu.js";import"./studio-tools-nLupF0VD.js";import"./use-org-auth-client-CBhb39AJ.js";import"./hover-card-Bv_j6ODB.js";import"./task-status-o4q7-zCb.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./decopilot-sse-pool-CFYkM7Rh.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function no(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{no as default};