@decocms/mesh 2.120.0 → 2.121.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/dist/README.md +0 -1
  2. package/dist/client/assets/{AlertCircle-X2kjJKuS.js → AlertCircle-BvhzS1YT.js} +1 -1
  3. package/dist/client/assets/{AlertOctagon-DLJusa0l.js → AlertOctagon-BUf3xaDz.js} +1 -1
  4. package/dist/client/assets/{AlertTriangle-J1aMZo_t.js → AlertTriangle-BUE7sdod.js} +1 -1
  5. package/dist/client/assets/{ArrowLeft-DYNgwVgM.js → ArrowLeft-BU2sm27g.js} +1 -1
  6. package/dist/client/assets/{ArrowUp-CSya8adc.js → ArrowUp-CkjIXBAe.js} +1 -1
  7. package/dist/client/assets/{Check-CMQRE0Z3.js → Check-DYZ8kvzv.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-DIqKQn49.js → CheckCircle-DTVGXl8H.js} +1 -1
  9. package/dist/client/assets/{CheckDone01-BIaMp9Ux.js → CheckDone01-CWio5h0R.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-Basl7o-s.js → CheckVerified02-lDwU0JKj.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-Zj9jdKZo.js → ChevronDown-DugvEHIv.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-CTtu-iRd.js → ChevronRight-B5elpXGa.js} +1 -1
  13. package/dist/client/assets/{Clock--QUEDWET.js → Clock-BWKgsoiG.js} +1 -1
  14. package/dist/client/assets/{Code01-Ck86YmZE.js → Code01-Dv0mdRP8.js} +1 -1
  15. package/dist/client/assets/{Container-Cjh2pCCW.js → Container-83NFZamb.js} +1 -1
  16. package/dist/client/assets/{Copy01-BjOOhIDq.js → Copy01-CqukwIfv.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-BZC_9iWk.js → Dataflow03-C__zTPE5.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-CG9muV5a.js → DotsHorizontal-Bh5e-6rc.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-CAgc4P-N.js → DotsVertical-jfuFTzKE.js} +1 -1
  20. package/dist/client/assets/{Download01-r7CRE8M5.js → Download01-DFCfNrum.js} +1 -1
  21. package/dist/client/assets/{Edit01-xblBqI9r.js → Edit01-CO8VRSTn.js} +1 -1
  22. package/dist/client/assets/{Eye-CepSd54m.js → Eye-B5D7LmIz.js} +1 -1
  23. package/dist/client/assets/{File02-CWdjjOXF.js → File02-DbRoaSSj.js} +1 -1
  24. package/dist/client/assets/{File06-BNrrzVLr.js → File06-BCPbJ79i.js} +1 -1
  25. package/dist/client/assets/{FilterLines-LaHtSLMf.js → FilterLines-C7xWgmCm.js} +1 -1
  26. package/dist/client/assets/{Globe01-C7MUpiY0.js → Globe01-C--nEoR6.js} +1 -1
  27. package/dist/client/assets/{Globe02-Deg4rMeL.js → Globe02-CaREPjt_.js} +1 -1
  28. package/dist/client/assets/{Grid01-d-qwGeVg.js → Grid01-BWlobPSC.js} +1 -1
  29. package/dist/client/assets/{Hash02-Dj-W-nmZ.js → Hash02-C8PvyKUH.js} +1 -1
  30. package/dist/client/assets/{Home02-CJB59hGd.js → Home02-DUurisPV.js} +1 -1
  31. package/dist/client/assets/{Image01-Dv-pE6zn.js → Image01-CiXOk6aA.js} +1 -1
  32. package/dist/client/assets/{Inbox01-CEBZGs5x.js → Inbox01-BjRCuorQ.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-mP3Y6LiB.js → InfoCircle-DXIZ30Xe.js} +1 -1
  34. package/dist/client/assets/{Key01-VCm3-ECf.js → Key01-DGayuWvT.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-z8oBxPh1.js → LinkExternal01-B0wN3aw-.js} +1 -1
  36. package/dist/client/assets/{List-Pl6U3sKm.js → List-Bm2F0wOt.js} +1 -1
  37. package/dist/client/assets/{Loading01-CKWEqcZg.js → Loading01-DVlzuDXC.js} +1 -1
  38. package/dist/client/assets/{Lock01-CNZPGiK_.js → Lock01-Dlsr6mr6.js} +1 -1
  39. package/dist/client/assets/{Pin01-B7bS6Yjs.js → Pin01-CTbGsypg.js} +1 -1
  40. package/dist/client/assets/{Play-83YD8IvK.js → Play--vga6A7y.js} +1 -1
  41. package/dist/client/assets/{Plus-CfLCGiAf.js → Plus-BgTScIjT.js} +1 -1
  42. package/dist/client/assets/{RefreshCcw01-Bs0KiNkG.js → RefreshCcw01-C9q1gCtA.js} +1 -1
  43. package/dist/client/assets/{RefreshCw01-B6gU1Bkw.js → RefreshCw01-DlEvV3CS.js} +1 -1
  44. package/dist/client/assets/{Rows03-48BOUq2S.js → Rows03-BvTFjz3x.js} +1 -1
  45. package/dist/client/assets/{Save01-CQAJzDdZ.js → Save01-s6loxod6.js} +1 -1
  46. package/dist/client/assets/{SearchMd-CV9kmFqk.js → SearchMd-qPELZ8ba.js} +1 -1
  47. package/dist/client/assets/{Settings01-D6b4DSIm.js → Settings01-B3ha2umj.js} +1 -1
  48. package/dist/client/assets/{Shield01-ISySf3AF.js → Shield01-CmaBuhqg.js} +1 -1
  49. package/dist/client/assets/{Terminal-CkjfRFA4.js → Terminal-CLx6qyUj.js} +1 -1
  50. package/dist/client/assets/{Tool01-CFaI9EtR.js → Tool01-BBuFYp2z.js} +1 -1
  51. package/dist/client/assets/{Trash01-CjqI6fsU.js → Trash01-BwVrCeYG.js} +1 -1
  52. package/dist/client/assets/{Upload01-CP-nBPop.js → Upload01-O1LTk7kl.js} +1 -1
  53. package/dist/client/assets/{Users03-C3bXmMpu.js → Users03-mLhLYYpx.js} +1 -1
  54. package/dist/client/assets/{XCircle-BDaLZ1d-.js → XCircle-DYabZgm3.js} +1 -1
  55. package/dist/client/assets/{XClose-CNt_xFER.js → XClose-CUkPQHX7.js} +1 -1
  56. package/dist/client/assets/{agent-connections-preview-DhaInVtE.js → agent-connections-preview-C0ZC1Uys.js} +1 -1
  57. package/dist/client/assets/{agent-detail-DpigYOHV.js → agent-detail-PNk7yJqH.js} +1 -1
  58. package/dist/client/assets/{agents-bu9aFfQq.js → agents-BgVLYh1H.js} +1 -1
  59. package/dist/client/assets/{alert-dialog-DVQAOpFZ.js → alert-dialog-IbckaySD.js} +1 -1
  60. package/dist/client/assets/{auth-catchall-CqhHW602.js → auth-catchall-DnzAukzZ.js} +1 -1
  61. package/dist/client/assets/{avatar-BVnor85N.js → avatar-De3rgEZe.js} +1 -1
  62. package/dist/client/assets/{badge-CVOE70Oq.js → badge-Dic8iag_.js} +1 -1
  63. package/dist/client/assets/{binder-Cifzj0i3.js → binder-kzm2-hR4.js} +1 -1
  64. package/dist/client/assets/{breadcrumb-Bab33tKi.js → breadcrumb-DA-aLp2Z.js} +1 -1
  65. package/dist/client/assets/{button-Cfxn7wqN.js → button-COjpHvkK.js} +1 -1
  66. package/dist/client/assets/{card-9xqlyMpU.js → card-BiC_BjTe.js} +1 -1
  67. package/dist/client/assets/{checkbox-DPjyXRXd.js → checkbox-pPAN-LtC.js} +1 -1
  68. package/dist/client/assets/{circle-alert-ClUw-Z5t.js → circle-alert-D41wsw8X.js} +1 -1
  69. package/dist/client/assets/{collection-detail-CJSKusKz.js → collection-detail-CTsvweAq.js} +1 -1
  70. package/dist/client/assets/{collection-tab-BVN1M0aq.js → collection-tab-C561L5WF.js} +1 -1
  71. package/dist/client/assets/{collection-table-wrapper-BeK1Pj2G.js → collection-table-wrapper-qfYRj5nQ.js} +1 -1
  72. package/dist/client/assets/{collection-tabs-C6xAYPKI.js → collection-tabs-CZ7jNcIU.js} +1 -1
  73. package/dist/client/assets/{command-DkvlAXDB.js → command-CpW6wMAK.js} +1 -1
  74. package/dist/client/assets/{connect-3ifnCh4D.js → connect-BOSD5VhT.js} +1 -1
  75. package/dist/client/assets/{connection-card-C6Td1IH2.js → connection-card-ClRCfHxD.js} +1 -1
  76. package/dist/client/assets/{connection-detail-DC2NFPpJ.js → connection-detail-CrRrhObV.js} +1 -1
  77. package/dist/client/assets/{connections-C69UMIuw.js → connections-BJH0-etY.js} +1 -1
  78. package/dist/client/assets/{constants-BSvkjyhN.js → constants-D-wlluJ1.js} +1 -1
  79. package/dist/client/assets/constants-DNU7gsUd.js +1 -0
  80. package/dist/client/assets/{context-6sKpCgEp.js → context-JZ9bzUIC.js} +2 -2
  81. package/dist/client/assets/{create-organization-dialog-Dto3Jj5z.js → create-organization-dialog-CtvnKlw-.js} +1 -1
  82. package/dist/client/assets/{create-project-dialog-DQ8S80XC.js → create-project-dialog-pcTtT4gK.js} +1 -1
  83. package/dist/client/assets/{dialog-DpH29EaC.js → dialog-DbMPbzlh.js} +1 -1
  84. package/dist/client/assets/{dropdown-menu-DfwxFlvC.js → dropdown-menu-DFSc-v7C.js} +1 -1
  85. package/dist/client/assets/{dynamic-plugin-layout-DVybhIqs.js → dynamic-plugin-layout-DW7MYlbX.js} +1 -1
  86. package/dist/client/assets/{empty-state-BpMz1MuK.js → empty-state-CWevsb-G.js} +1 -1
  87. package/dist/client/assets/{empty-state-DacR9KFX.js → empty-state-DnI_qH-Y.js} +1 -1
  88. package/dist/client/assets/{env-vars-editor-sZfDE_af.js → env-vars-editor-BU2Y2-Ll.js} +1 -1
  89. package/dist/client/assets/{error-boundary-DHZz1JDM.js → error-boundary-CCf2jUlG.js} +1 -1
  90. package/dist/client/assets/{extract-connection-data-oVqYUQI2.js → extract-connection-data-DZvBZ10P.js} +1 -1
  91. package/dist/client/assets/{file-browser-B8ZKRcFS.js → file-browser-BIlLUTHf.js} +2 -2
  92. package/dist/client/assets/{form-CZU_YdS4.js → form-ek51qwAH.js} +1 -1
  93. package/dist/client/assets/{grid-view-B__CKwRC.js → grid-view-CENvKEY6.js} +1 -1
  94. package/dist/client/assets/{home-ocVc4tiW.js → home-XXv2oXrf.js} +1 -1
  95. package/dist/client/assets/{index-C7iRHHsV.js → index-Ba79Kla7.js} +1 -1
  96. package/dist/client/assets/{index-D2_GV3Ro.js → index-BbQ4Bnn7.js} +1 -1
  97. package/dist/client/assets/{index-xP5y29l_.js → index-CEFIvFnf.js} +3 -3
  98. package/dist/client/assets/{index-ByQpGZ0G.js → index-CjOTWUhd.js} +1 -1
  99. package/dist/client/assets/{index-D_V0aPzE.js → index-Cl2GHryt.js} +1 -1
  100. package/dist/client/assets/{index-BvHHjYvT.js → index-DqBwvK0E.js} +1 -1
  101. package/dist/client/assets/{index-Bs1MlwLl.js → index-UItETm2j.js} +1 -1
  102. package/dist/client/assets/{index-DWKuFbNq.js → index-XxwFMzDI.js} +1 -1
  103. package/dist/client/assets/{infiniteQueryObserver-vfmoS5-W.js → infiniteQueryObserver-B9nwx2aL.js} +1 -1
  104. package/dist/client/assets/{input-_pBQXMva.js → input-UPbtT6D5.js} +1 -1
  105. package/dist/client/assets/{integration-icon-BkxLRlWc.js → integration-icon-D3KY1sTg.js} +1 -1
  106. package/dist/client/assets/{label-QWs_YlR3.js → label-OGiRqcEX.js} +1 -1
  107. package/dist/client/assets/{layout-B04Z18Uh.js → layout-CvVtUUQW.js} +1 -1
  108. package/dist/client/assets/{localstorage-keys-D7a-z9NY.js → localstorage-keys-CRTQAB4C.js} +1 -1
  109. package/dist/client/assets/{login-De2uukSl.js → login-CdLmE4NZ.js} +1 -1
  110. package/dist/client/assets/{markdown-B0W3-Xl7.js → markdown-Ca1p_aAP.js} +1 -1
  111. package/dist/client/assets/{mcp-oauth-CqLoMIwv.js → mcp-oauth-BbnOwrZd.js} +1 -1
  112. package/dist/client/assets/{mcp-server-card-BSbsW_Yg.js → mcp-server-card-CWlDBaaF.js} +1 -1
  113. package/dist/client/assets/{mcp-server-detail--t_4j-yg.js → mcp-server-detail-B-5zNwGt.js} +2 -2
  114. package/dist/client/assets/{members-BOgetcfr.js → members-UNx8dAjn.js} +1 -1
  115. package/dist/client/assets/{monitoring-BPR80OIe.js → monitoring-CNQyYNJh.js} +1 -1
  116. package/dist/client/assets/{monitoring-dashboard-edit-Czr6OHiD.js → monitoring-dashboard-edit-D1I_fFwn.js} +1 -1
  117. package/dist/client/assets/{monitoring-dashboard-view-M1ez2iV1.js → monitoring-dashboard-view-BBoKWBp9.js} +1 -1
  118. package/dist/client/assets/{oauth-callback-BQTArYrD.js → oauth-callback-tVkX9nfx.js} +1 -1
  119. package/dist/client/assets/{page-BmssLGHX.js → page-B9N0sRu5.js} +1 -1
  120. package/dist/client/assets/{page-CuXW2uKK.js → page-CiWneucU.js} +1 -1
  121. package/dist/client/assets/{plugin-empty-state-3a0blaBN.js → plugin-empty-state-Dap_lue3.js} +1 -1
  122. package/dist/client/assets/{plugin-empty-state-OyGImmbX.js → plugin-empty-state-DtpXQISJ.js} +1 -1
  123. package/dist/client/assets/{plugin-header-ByFBOg2Y.js → plugin-header-BMtZYqR-.js} +1 -1
  124. package/dist/client/assets/{plugin-header-VTgB-05_.js → plugin-header-mbAE6Sve.js} +1 -1
  125. package/dist/client/assets/{popover-CIcPf4R8.js → popover-CJJX7cOM.js} +1 -1
  126. package/dist/client/assets/{project-layout-WWWa265M.js → project-layout-06BwdR0x.js} +1 -1
  127. package/dist/client/assets/{projects-list-DCPw4_OC.js → projects-list-BmWZdC4b.js} +1 -1
  128. package/dist/client/assets/{ranking-layout-DuAHvUBr.js → ranking-layout-BqQuRiQh.js} +1 -1
  129. package/dist/client/assets/{readme-viewer-Cv8IK1rx.js → readme-viewer-CgSAdR9I.js} +1 -1
  130. package/dist/client/assets/{registry-layout-BWhTmPVP.js → registry-layout-DgsXq9Iy.js} +1 -1
  131. package/dist/client/assets/{registry-utils-CkRAtRVs.js → registry-utils-DNrODt4G.js} +1 -1
  132. package/dist/client/assets/{reports-layout-BccEU2qP.js → reports-layout-rm_1mJnU.js} +1 -1
  133. package/dist/client/assets/{reset-password-DhCzaF1V.js → reset-password-CARUWrH0.js} +1 -1
  134. package/dist/client/assets/{resizable-BMK1LDSL.js → resizable-BeAVlcw0.js} +1 -1
  135. package/dist/client/assets/{save-actions-CK8c_8dn.js → save-actions-CcxXXbVc.js} +1 -1
  136. package/dist/client/assets/{scroll-area-DiAzoZoS.js → scroll-area-CItFqOci.js} +1 -1
  137. package/dist/client/assets/{select-Co2iUr9x.js → select-CwgyA5Wi.js} +1 -1
  138. package/dist/client/assets/{shell-layout-D4izNfN0.js → shell-layout-BeAkZvQA.js} +1 -1
  139. package/dist/client/assets/{skeleton-OF5RJTfR.js → skeleton-B5wseAX1.js} +1 -1
  140. package/dist/client/assets/{spinner-CQ7zK-M9.js → spinner-JsI3DFrV.js} +1 -1
  141. package/dist/client/assets/{store-invite-vusKicj4.js → store-invite-D3LF9Yde.js} +1 -1
  142. package/dist/client/assets/{switch-DFVio9zT.js → switch-BYuPAsrN.js} +1 -1
  143. package/dist/client/assets/{table-ZqCGmh0v.js → table-C25e3lsO.js} +1 -1
  144. package/dist/client/assets/{tasks-Dzhl1bpl.js → tasks-CzwD0Q_Q.js} +1 -1
  145. package/dist/client/assets/{textarea-BNxSwLAt.js → textarea-BzrbRDMZ.js} +1 -1
  146. package/dist/client/assets/{time-range-picker-D2EIIeig.js → time-range-picker-U_fyer52.js} +1 -1
  147. package/dist/client/assets/{toggle-group-B4s12p7v.js → toggle-group-DwUL9sIJ.js} +1 -1
  148. package/dist/client/assets/{tools-list-CfforrLM.js → tools-list-Beeckj80.js} +1 -1
  149. package/dist/client/assets/{tooltip-BBATyAM-.js → tooltip-WTQ1Sf9I.js} +1 -1
  150. package/dist/client/assets/{topbar-portal-XcM3Kejd.js → topbar-portal-CzctQPFH.js} +1 -1
  151. package/dist/client/assets/{typewriter-title-CMHEN5nz.js → typewriter-title-yszFjZyk.js} +1 -1
  152. package/dist/client/assets/{use-binding-CGN0qjvd.js → use-binding-Xiu53R3H.js} +1 -1
  153. package/dist/client/assets/{use-connection-CxKjjTvJ.js → use-connection-Cn_KCAac.js} +1 -1
  154. package/dist/client/assets/{use-copy-C_RFVJa8.js → use-copy-DxEdnDUl.js} +1 -1
  155. package/dist/client/assets/{use-create-virtual-mcp-bvy2w8pH.js → use-create-virtual-mcp-D2iqPR2G.js} +1 -1
  156. package/dist/client/assets/{use-deco-chat-open--jDn3w1r.js → use-deco-chat-open-gpgx82-l.js} +1 -1
  157. package/dist/client/assets/{use-install-from-registry-CbQe_b4c.js → use-install-from-registry-xTriX8BS.js} +1 -1
  158. package/dist/client/assets/{use-list-state-DiiXUk4C.js → use-list-state-DbHjmI2c.js} +1 -1
  159. package/dist/client/assets/{use-llm-pAvsze0k.js → use-llm-1lq-QT_E.js} +1 -1
  160. package/dist/client/assets/{use-mcp-prompts-Bl2fHtAe.js → use-mcp-prompts-VDHthI2F.js} +1 -1
  161. package/dist/client/assets/{use-mcp-tools-BTP6hCPq.js → use-mcp-tools-D-6_rATb.js} +1 -1
  162. package/dist/client/assets/{use-mobile-DsUWUK3r.js → use-mobile-DZvuCyAg.js} +1 -1
  163. package/dist/client/assets/{use-organization-settings-BowjVv32.js → use-organization-settings-BzT6x8GT.js} +1 -1
  164. package/dist/client/assets/{use-project-DttZXwdk.js → use-project-Cpu_jAWh.js} +1 -1
  165. package/dist/client/assets/{use-settings-modal-BQWGVnQX.js → use-settings-modal-DWpwYi2w.js} +1 -1
  166. package/dist/client/assets/{use-view-mode-DIAblwfe.js → use-view-mode-1Gj9Ftyw.js} +1 -1
  167. package/dist/client/assets/{use-virtual-mcp-DRarJ7wW.js → use-virtual-mcp-CzLaRfMK.js} +1 -1
  168. package/dist/client/assets/useInfiniteQuery-BkWiNIx3.js +1 -0
  169. package/dist/client/assets/{useMutation-ChHDbbEd.js → useMutation-CRJhwh4V.js} +1 -1
  170. package/dist/client/assets/useQuery-DMUhrQv9.js +1 -0
  171. package/dist/client/assets/useSuspenseInfiniteQuery-CvuCfv37.js +1 -0
  172. package/dist/client/assets/{workflow-C3z9nLFK.js → workflow-I781PsAJ.js} +1 -1
  173. package/dist/client/index.html +1 -1
  174. package/dist/server/cli.js +198 -198
  175. package/dist/server/migrate.js +166 -166
  176. package/dist/server/server.js +179 -179
  177. package/package.json +1 -1
  178. package/dist/client/assets/constants-DDU2Ixpf.js +0 -1
  179. package/dist/client/assets/useInfiniteQuery-C-pXHKUh.js +0 -1
  180. package/dist/client/assets/useQuery-D_Xi1UKi.js +0 -1
  181. package/dist/client/assets/useSuspenseInfiniteQuery-P-iDxKWK.js +0 -1
@@ -1 +1 @@
1
- import{r as v,c as M,j as s,m as O,t as w,H as q}from"./index-xP5y29l_.js";import{u as D}from"./topbar-portal-XcM3Kejd.js";import{K as L,u as Z,g as R,s as Q,a as W,f as U}from"./file-browser-B8ZKRcFS.js";import{c as I,B as E}from"./button-Cfxn7wqN.js";import{i as S}from"./AlertCircle-X2kjJKuS.js";import{n as A}from"./Download01-r7CRE8M5.js";import{i as $}from"./File02-CWdjjOXF.js";import{i as J}from"./File06-BNrrzVLr.js";import{a as P}from"./Image01-Dv-pE6zn.js";import{i as T}from"./Loading01-CKWEqcZg.js";import{s as V}from"./Trash01-CjqI6fsU.js";import{i as Y}from"./Upload01-CP-nBPop.js";import{u as _}from"./useMutation-ChHDbbEd.js";import{u as X}from"./useQuery-D_Xi1UKi.js";import"./useInfiniteQuery-C-pXHKUh.js";import"./infiniteQueryObserver-vfmoS5-W.js";import"./checkbox-DPjyXRXd.js";import"./Check-CMQRE0Z3.js";import"./ChevronRight-CTtu-iRd.js";import"./Grid01-d-qwGeVg.js";import"./Home02-CJB59hGd.js";import"./List-Pl6U3sKm.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const H=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));H.displayName="FileCode01";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));K.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),a=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{a.current&&(a.current.disconnect(),a.current=null),u&&!d.current&&(a.current=new IntersectionObserver(y=>{const[c]=y;c?.isIntersecting&&!d.current&&(d.current=!0,g(!0),a.current?.disconnect(),a.current=null)},i),a.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:a}=i,d=a===void 0?"":a,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let c;e[1]!==n||e[2]!==t?(c=L.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=c):c=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==c||e[9]!==f?(k={queryKey:c,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=c,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=I("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:K,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:H,Folder:q};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:a,onDelete:d}=i;let n;e[0]!==t.key?(n=R(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const c=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!c&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=I("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==c||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=c?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:I(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=c,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==c||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=c?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=c,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==a?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),a(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=a,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function Ee({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),a=O(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:c,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${R(r)}`),a.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),a.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=R(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&c()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{Ee as default};
1
+ import{r as v,c as M,j as s,m as O,t as w,H as q}from"./index-CEFIvFnf.js";import{u as D}from"./topbar-portal-CzctQPFH.js";import{K as L,u as Z,g as R,s as Q,a as W,f as U}from"./file-browser-BIlLUTHf.js";import{c as I,B as E}from"./button-COjpHvkK.js";import{i as S}from"./AlertCircle-BvhzS1YT.js";import{n as A}from"./Download01-DFCfNrum.js";import{i as $}from"./File02-DbRoaSSj.js";import{i as J}from"./File06-BCPbJ79i.js";import{a as P}from"./Image01-CiXOk6aA.js";import{i as T}from"./Loading01-DVlzuDXC.js";import{s as V}from"./Trash01-BwVrCeYG.js";import{i as Y}from"./Upload01-O1LTk7kl.js";import{u as _}from"./useMutation-CRJhwh4V.js";import{u as X}from"./useQuery-DMUhrQv9.js";import"./useInfiniteQuery-BkWiNIx3.js";import"./infiniteQueryObserver-B9nwx2aL.js";import"./checkbox-pPAN-LtC.js";import"./Check-DYZ8kvzv.js";import"./ChevronRight-B5elpXGa.js";import"./Grid01-BWlobPSC.js";import"./Home02-DUurisPV.js";import"./List-Bm2F0wOt.js";const B=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437C14.76 8 15.04 8 15.6 8h4.13M20 9.988V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));B.displayName="File04";const G=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M8 15v3m8-5v5m-4-7.5V18m8-8.012V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));G.displayName="File07";const H=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M14 2.27V6.4c0 .56 0 .84.109 1.054a1 1 0 0 0 .437.437c.214.11.494.11 1.054.11h4.13M14 17.5l2.5-2.5-2.5-2.5m-4 0L7.5 15l2.5 2.5m10-7.512V17.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C17.72 22 16.88 22 15.2 22H8.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C4 19.72 4 18.88 4 17.2V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C6.28 2 7.12 2 8.8 2h3.212c.733 0 1.1 0 1.446.083.306.073.598.195.867.36.303.185.562.444 1.08.963l3.19 3.188c.518.519.777.778.963 1.081a3 3 0 0 1 .36.867c.082.346.082.712.082 1.446Z"}));H.displayName="FileCode01";const K=({size:i=24,color:e="currentColor",...t})=>v.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},v.createElement("path",{d:"M22 8.931c0-.605 0-.908-.12-1.049a.5.5 0 0 0-.42-.173c-.183.014-.397.228-.826.657L17 12l3.634 3.634c.429.429.643.643.827.657a.5.5 0 0 0 .42-.173c.119-.14.119-.444.119-1.05V8.932ZM2 9.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 5 5.12 5 6.8 5h5.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C17 7.28 17 8.12 17 9.8v4.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C14.72 19 13.88 19 12.2 19H6.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C2 16.72 2 15.88 2 14.2V9.8Z"}));K.displayName="VideoRecorder";function ee(i){const e=M.c(5),[t,g]=v.useState(!1),a=v.useRef(null),d=v.useRef(!1);let n;e[0]!==i?(n=u=>{a.current&&(a.current.disconnect(),a.current=null),u&&!d.current&&(a.current=new IntersectionObserver(y=>{const[c]=y;c?.isIntersecting&&!d.current&&(d.current=!0,g(!0),a.current?.disconnect(),a.current=null)},i),a.current.observe(u))},e[0]=i,e[1]=n):n=e[1];const l=n;let h;return e[2]!==t||e[3]!==l?(h=[t,l],e[2]=t,e[3]=l,e[4]=h):h=e[4],h}function te(i){const e=M.c(24),{objectKey:t,alt:g,className:a}=i,d=a===void 0?"":a,{connectionId:n,toolCaller:l}=D();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={rootMargin:"100px",threshold:0},e[0]=h):h=e[0];const[u,y]=ee(h);let c;e[1]!==n||e[2]!==t?(c=L.imagePreview(n,t),e[1]=n,e[2]=t,e[3]=c):c=e[3];let f;e[4]!==t||e[5]!==l?(f=async()=>{const{url:m}=await l("GET_PRESIGNED_URL",{key:t});return m},e[4]=t,e[5]=l,e[6]=f):f=e[6];let k;e[7]!==u||e[8]!==c||e[9]!==f?(k={queryKey:c,queryFn:f,enabled:u,staleTime:3e5,gcTime:6e5},e[7]=u,e[8]=c,e[9]=f,e[10]=k):k=e[10];const{data:b,isLoading:x,error:j}=X(k);let p;e[11]!==d?(p=I("relative w-full h-full flex items-center justify-center overflow-hidden",d),e[11]=d,e[12]=p):p=e[12];let r;e[13]!==g||e[14]!==j||e[15]!==b||e[16]!==x||e[17]!==u||e[18]!==t?(r=!u||x?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:x?s.jsx(T,{size:24,className:"animate-spin"}):s.jsx(P,{size:48})}):j?s.jsx("div",{className:"flex flex-col items-center justify-center text-muted-foreground",children:s.jsx(S,{size:24})}):b?s.jsx("img",{src:b,alt:g||t,className:"w-full h-full object-cover",loading:"lazy"}):null,e[13]=g,e[14]=j,e[15]=b,e[16]=x,e[17]=u,e[18]=t,e[19]=r):r=e[19];let o;return e[20]!==y||e[21]!==p||e[22]!==r?(o=s.jsx("div",{ref:y,className:p,children:r}),e[20]=y,e[21]=p,e[22]=r,e[23]=o):o=e[23],o}const z=12,se={Image01:P,VideoRecorder:K,Music01:$,File02:$,File04:B,File06:J,File07:G,FileCode01:H,Folder:q};function re(i){const e=i.split(".").pop()?.toLowerCase();return["jpg","jpeg","png","gif","webp","svg","bmp","ico"].includes(e||"")}function oe(i){const e=M.c(41),{item:t,onNavigate:g,onDownload:a,onDelete:d}=i;let n;e[0]!==t.key?(n=R(t.key),e[0]=t.key,e[1]=n):n=e[1];const l=n,h=t.isFolder?"Folder":W(t.key),u=se[h]||$;let y;e[2]!==t.isFolder||e[3]!==t.key?(y=!t.isFolder&&re(t.key),e[2]=t.isFolder,e[3]=t.key,e[4]=y):y=e[4];const c=y;let f;e[5]!==t.isFolder||e[6]!==t.key||e[7]!==g?(f=()=>t.isFolder?g(t.key):void 0,e[5]=t.isFolder,e[6]=t.key,e[7]=g,e[8]=f):f=e[8];const k=!c&&"p-4",b=t.isFolder?"cursor-pointer":"cursor-default";let x;e[9]!==k||e[10]!==b?(x=I("flex flex-col items-center justify-center w-full h-full",k,b),e[9]=k,e[10]=b,e[11]=x):x=e[11];let j;e[12]!==u||e[13]!==c||e[14]!==t.isFolder||e[15]!==t.key||e[16]!==l?(j=c?s.jsx("div",{className:"absolute inset-0",children:s.jsx(te,{objectKey:t.key,alt:l})}):s.jsx(u,{size:48,className:I(t.isFolder?"text-amber-500":"text-muted-foreground")}),e[12]=u,e[13]=c,e[14]=t.isFolder,e[15]=t.key,e[16]=l,e[17]=j):j=e[17];let p;e[18]!==c||e[19]!==t.isFolder||e[20]!==t.size||e[21]!==l?(p=c?s.jsxs("div",{className:"absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black/70 to-transparent p-2 pt-6",children:[s.jsx("span",{className:"text-sm text-white text-center line-clamp-1 block",children:l}),s.jsx("span",{className:"text-xs text-white/70 text-center block",children:U(t.size)})]}):s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"mt-3 text-sm text-center line-clamp-2 px-2",children:l}),!t.isFolder&&s.jsx("span",{className:"mt-1 text-xs text-muted-foreground",children:U(t.size)})]}),e[18]=c,e[19]=t.isFolder,e[20]=t.size,e[21]=l,e[22]=p):p=e[22];let r;e[23]!==f||e[24]!==x||e[25]!==j||e[26]!==p?(r=s.jsxs("button",{type:"button",onClick:f,className:x,children:[j,p]}),e[23]=f,e[24]=x,e[25]=j,e[26]=p,e[27]=r):r=e[27];let o;e[28]!==t.isFolder||e[29]!==t.key||e[30]!==d||e[31]!==a?(o=!t.isFolder&&s.jsxs("div",{className:"absolute top-2 right-2 flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0",onClick:F=>{F.stopPropagation(),a(t.key)},children:s.jsx(A,{size:14})}),s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})]}),e[28]=t.isFolder,e[29]=t.key,e[30]=d,e[31]=a,e[32]=o):o=e[32];let m;e[33]!==t.isFolder||e[34]!==t.key||e[35]!==d?(m=t.isFolder&&s.jsx("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",children:s.jsx(E,{variant:"secondary",size:"sm",className:"size-7 p-0 text-destructive hover:text-destructive",onClick:F=>{F.stopPropagation(),d(t.key)},children:s.jsx(V,{size:14})})}),e[33]=t.isFolder,e[34]=t.key,e[35]=d,e[36]=m):m=e[36];let N;return e[37]!==o||e[38]!==m||e[39]!==r?(N=s.jsxs("div",{className:"group relative aspect-square bg-muted/30 rounded-lg border border-border hover:border-primary/50 hover:bg-muted/50 transition-colors overflow-hidden",children:[r,o,m]}),e[37]=o,e[38]=m,e[39]=r,e[40]=N):N=e[40],N}function Ee({prefix:i,flat:e,onNavigate:t}){const g=v.useRef(null),a=O(),{connectionId:d,toolCaller:n}=D(),{objects:l,isLoading:h,isFetchingMore:u,hasMore:y,loadMore:c,error:f}=Z({prefix:i,flat:e,pageSize:z}),k=_({mutationFn:async r=>{const o=i+r.name,{url:m}=await n("PUT_PRESIGNED_URL",{key:o,contentType:r.type||"application/octet-stream"}),N=await fetch(m,{method:"PUT",body:r,headers:{"Content-Type":r.type||"application/octet-stream"}});if(!N.ok)throw new Error(`Upload failed: ${N.statusText}`);return o},onSuccess:r=>{w.success(`Uploaded ${R(r)}`),a.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Upload failed: ${r.message}`)}}),b=_({mutationFn:async r=>r.length===1&&r[0]?n("DELETE_OBJECT",{key:r[0]}):n("DELETE_OBJECTS",{keys:r}),onSuccess:()=>{w.success("Deleted successfully"),a.invalidateQueries({queryKey:L.objects(d,i,e,z)})},onError:r=>{w.error(`Delete failed: ${r.message}`)}}),x=async r=>{try{const{url:o}=await n("GET_PRESIGNED_URL",{key:r}),m=await fetch(o);if(!m.ok)throw new Error(`Failed to fetch file: ${m.statusText}`);const N=await m.blob(),F=URL.createObjectURL(N),C=document.createElement("a");C.href=F,C.download=R(r),document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(F)}catch(o){w.error(`Download failed: ${o instanceof Error?o.message:"Unknown error"}`)}},j=r=>{const o=r.target.files;if(o){for(const m of Array.from(o))k.mutate(m);r.target.value=""}},p=r=>{if(!y||u)return;const o=r.currentTarget;o.scrollHeight-o.scrollTop-o.clientHeight<200&&c()};return f?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(S,{size:48,className:"text-destructive mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading files"}),s.jsx("p",{className:"text-muted-foreground text-center",children:f.message})]}):s.jsx("div",{className:"flex-1 overflow-y-auto p-4",onScroll:p,children:h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12",children:[s.jsx(T,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading files..."})]}):l.length===0?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(Q,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"This folder is empty"}),s.jsx("p",{className:"text-muted-foreground mb-4",children:"Upload files to get started"}),s.jsx("input",{ref:g,type:"file",multiple:!0,className:"hidden",onChange:j}),s.jsxs(E,{variant:"outline",onClick:()=>g.current?.click(),children:[s.jsx(Y,{size:14,className:"mr-1"}),"Upload files"]})]}):s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:l.map(r=>s.jsx(oe,{item:r,onNavigate:t,onDownload:x,onDelete:o=>b.mutate([o])},r.key))}),u&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsx(T,{size:24,className:"animate-spin text-muted-foreground"})})]})})}export{Ee as default};
@@ -1 +1 @@
1
- import{c as f,j as s,d as I,r as C,b6 as F,b as E,m as O,t as w}from"./index-xP5y29l_.js";import{C as k}from"./card-9xqlyMpU.js";import{c as y,B as $}from"./button-Cfxn7wqN.js";import{A as R}from"./avatar-BVnor85N.js";import{i as D}from"./AlertCircle-X2kjJKuS.js";import{i as H}from"./Check-CMQRE0Z3.js";import{s as G}from"./Plus-CfLCGiAf.js";import{i as Q}from"./SearchMd-CV9kmFqk.js";import{s as q}from"./XClose-CNt_xFER.js";import{I as B}from"./input-_pBQXMva.js";import{C as T}from"./create-organization-dialog-Dto3Jj5z.js";import"./alert-dialog-DVQAOpFZ.js";import"./form-CZU_YdS4.js";import"./label-QWs_YlR3.js";import"./spinner-CQ7zK-M9.js";import"./useMutation-ChHDbbEd.js";function U(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:r}=t,d=r===void 0?!1:r;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",a=d&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==x||e[4]!==a?(c=y("group transition-all flex flex-col gap-0",x,a,l),e[2]=l,e[3]=x,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=s.jsx(k,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function M(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:r,objectFit:d,className:o}=t,m=i===void 0?"square":i,x=r===void 0?"lg":r,a=d===void 0?"contain":d;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==x||e[5]!==n?(c=s.jsx(R,{url:n,fallback:l,shape:m,size:x,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=x,e[5]=n,e[6]=c):c=e[6],c}function P(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function V(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Z(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(U,{Avatar:M,AvatarSection:J,Header:P,Title:V,Subtitle:X,Content:Y,Footer:K,Badge:W,Skeleton:Z}),ee={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},te={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},se={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ie={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},le={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},ne={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:r}=t;let d;e[0]!==l?(d=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=d):d=e[1];const o=d,x=ee[i===void 0?4:i],a=o.sm&&te[o.sm],c=o.md&&se[o.md],g=o.lg&&ie[o.lg],p=o.xl&&le[o.xl],v=o["2xl"]&&ne[o["2xl"]];let N;e[2]!==r||e[3]!==x||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,a,c,g,p,v,r),e[2]=r,e[3]=x,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function re(t){const e=f.c(9),{count:n,columns:l,gap:i,className:r}=t,d=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let a;e[2]!==d?(a=Array.from({length:d}).map(ae),e[2]=d,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==x||e[7]!==a?(c=s.jsx(L,{columns:m,gap:x,className:r,children:a}),e[4]=r,e[5]=m,e[6]=x,e[7]=a,e[8]=c):c=e[8],c}function ae(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const A=Object.assign(L,{Skeleton:re});function oe({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),r=O(),d=E(),o=async()=>{n(!0);try{const a=await I.organization.acceptInvitation({invitationId:t.id});if(a.error)w.error(a.error.message),n(!1);else{const c=await I.organization.setActive({organizationId:t.organizationId});c?.data?.slug?(w.success("Invitation accepted!"),d({to:"/$org",params:{org:c.data.slug}})):(w.success("Invitation accepted! Redirecting..."),d({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const a=await I.organization.rejectInvitation({invitationId:t.id});a.error?(w.error(a.error.message),i(!1)):(w.success("Invitation rejected"),await r.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(H,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Decline"]})})]})})]})}function ce({query:t}){const e=C.useContext(F),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(d=>d.status==="pending"&&new Date(d.expiresAt)>new Date),r=t?(()=>{const d=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(d)||o.organizationId.toLowerCase().includes(d))})():i;return r.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(A,{columns:{sm:2,md:3,lg:4},children:r.map(d=>s.jsx(oe,{invitation:d},d.id))})]})}function de(t){const e=f.c(14),{query:n}=t,{data:l}=I.useListOrganizations(),i=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const d=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(d.length===0){let a;return e[4]!==n?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==d||e[8]!==i){let a;e[10]!==i?(a=c=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:c.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",c.slug]}),s.jsx(u.Title,{children:c.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=i,e[11]=a):a=e[11],m=d.map(a),e[7]=d,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(A,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function me(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(D,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function xe(){const t=f.c(27),{error:e,isPending:n}=I.useListOrganizations(),[l,i]=C.useState(""),[r,d]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(me,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(ce,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=j=>i(j.target.value),t[7]=c):c=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[a,s.jsx(B,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:c})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>d(!0),children:[s.jsx(G,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(de,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==r?(z=s.jsx(T,{open:r,onOpenChange:d}),t[22]=r,t[23]=z):z=t[23];let _;return t[24]!==S||t[25]!==z?(_=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=_):_=t[26],_}function Ae(){const t=f.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-full",children:s.jsx(xe,{})}),t[0]=e):e=t[0],e}export{Ae as default};
1
+ import{c as f,j as s,d as I,r as C,b6 as F,b as E,m as O,t as w}from"./index-CEFIvFnf.js";import{C as k}from"./card-BiC_BjTe.js";import{c as y,B as $}from"./button-COjpHvkK.js";import{A as R}from"./avatar-De3rgEZe.js";import{i as D}from"./AlertCircle-BvhzS1YT.js";import{i as H}from"./Check-DYZ8kvzv.js";import{s as G}from"./Plus-BgTScIjT.js";import{i as Q}from"./SearchMd-qPELZ8ba.js";import{s as q}from"./XClose-CUkPQHX7.js";import{I as B}from"./input-UPbtT6D5.js";import{C as T}from"./create-organization-dialog-CtvnKlw-.js";import"./alert-dialog-IbckaySD.js";import"./form-ek51qwAH.js";import"./label-OGiRqcEX.js";import"./spinner-JsI3DFrV.js";import"./useMutation-CRJhwh4V.js";function U(t){const e=f.c(10),{children:n,className:l,onNavigate:i,showHoverRing:r}=t,d=r===void 0?!1:r;let o;e[0]!==i?(o=p=>{i&&i(p)},e[0]=i,e[1]=o):o=e[1];const m=o,x=i&&"cursor-pointer",a=d&&"hover:ring-2 hover:ring-primary";let c;e[2]!==l||e[3]!==x||e[4]!==a?(c=y("group transition-all flex flex-col gap-0",x,a,l),e[2]=l,e[3]=x,e[4]=a,e[5]=c):c=e[5];let g;return e[6]!==n||e[7]!==m||e[8]!==c?(g=s.jsx(k,{className:c,onClick:m,children:n}),e[6]=n,e[7]=m,e[8]=c,e[9]=g):g=e[9],g}function M(t){const e=f.c(7),{url:n,fallback:l,shape:i,size:r,objectFit:d,className:o}=t,m=i===void 0?"square":i,x=r===void 0?"lg":r,a=d===void 0?"contain":d;let c;return e[0]!==o||e[1]!==l||e[2]!==a||e[3]!==m||e[4]!==x||e[5]!==n?(c=s.jsx(R,{url:n,fallback:l,shape:m,size:x,objectFit:a,className:o}),e[0]=o,e[1]=l,e[2]=a,e[3]=m,e[4]=x,e[5]=n,e[6]=c):c=e[6],c}function P(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 flex flex-col gap-4",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function V(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("font-medium truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("p",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function X(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("text-sm text-muted-foreground truncate",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("h3",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Y(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex flex-col gap-[2px]",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function J(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex justify-between items-start",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function K(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("p-4 border-t border-border flex justify-between items-center",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function W(t){const e=f.c(5),{children:n,className:l}=t;let i;e[0]!==l?(i=y("flex items-center text-xs text-muted-foreground",l),e[0]=l,e[1]=i):i=e[1];let r;return e[2]!==n||e[3]!==i?(r=s.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=r):r=e[4],r}function Z(){const t=f.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex justify-between items-start",children:s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg animate-pulse"})}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[e,s.jsxs("div",{className:"flex flex-col gap-[2px]",children:[s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg animate-pulse"}),s.jsx("div",{className:"h-4 w-40 bg-muted rounded-lg animate-pulse"})]})]}),t[1]=n):n=t[1];let l;return t[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(k,{className:"group transition-colors flex flex-col",children:[n,s.jsxs("div",{className:"p-4 border-t border-border flex justify-between items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]}),t[2]=l):l=t[2],l}const u=Object.assign(U,{Avatar:M,AvatarSection:J,Header:P,Title:V,Subtitle:X,Content:Y,Footer:K,Badge:W,Skeleton:Z}),ee={0:"gap-0",1:"gap-1",2:"gap-2",3:"gap-3",4:"gap-4",5:"gap-5",6:"gap-6",8:"gap-8"},te={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8"},se={1:"@min-3xl:grid-cols-1",2:"@min-3xl:grid-cols-2",3:"@min-3xl:grid-cols-3",4:"@min-3xl:grid-cols-4",5:"@min-3xl:grid-cols-5",6:"@min-3xl:grid-cols-6",7:"@min-3xl:grid-cols-7",8:"@min-3xl:grid-cols-8"},ie={1:"@min-6xl:grid-cols-1",2:"@min-6xl:grid-cols-2",3:"@min-6xl:grid-cols-3",4:"@min-6xl:grid-cols-4",5:"@min-6xl:grid-cols-5",6:"@min-6xl:grid-cols-6",7:"@min-6xl:grid-cols-7",8:"@min-6xl:grid-cols-8"},le={1:"@min-7xl:grid-cols-1",2:"@min-7xl:grid-cols-2",3:"@min-7xl:grid-cols-3",4:"@min-7xl:grid-cols-4",5:"@min-7xl:grid-cols-5",6:"@min-7xl:grid-cols-6",7:"@min-7xl:grid-cols-7",8:"@min-7xl:grid-cols-8"},ne={1:"@min-8xl:grid-cols-1",2:"@min-8xl:grid-cols-2",3:"@min-8xl:grid-cols-3",4:"@min-8xl:grid-cols-4",5:"@min-8xl:grid-cols-5",6:"@min-8xl:grid-cols-6",7:"@min-8xl:grid-cols-7",8:"@min-8xl:grid-cols-8"};function L(t){const e=f.c(13),{children:n,columns:l,gap:i,className:r}=t;let d;e[0]!==l?(d=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=d):d=e[1];const o=d,x=ee[i===void 0?4:i],a=o.sm&&te[o.sm],c=o.md&&se[o.md],g=o.lg&&ie[o.lg],p=o.xl&&le[o.xl],v=o["2xl"]&&ne[o["2xl"]];let N;e[2]!==r||e[3]!==x||e[4]!==a||e[5]!==c||e[6]!==g||e[7]!==p||e[8]!==v?(N=y("w-full grid",x,a,c,g,p,v,r),e[2]=r,e[3]=x,e[4]=a,e[5]=c,e[6]=g,e[7]=p,e[8]=v,e[9]=N):N=e[9];const b=N;let h;return e[10]!==n||e[11]!==b?(h=s.jsx("div",{className:b,children:n}),e[10]=n,e[11]=b,e[12]=h):h=e[12],h}function re(t){const e=f.c(9),{count:n,columns:l,gap:i,className:r}=t,d=n===void 0?8:n;let o;e[0]!==l?(o=l===void 0?{sm:2,md:3,lg:4}:l,e[0]=l,e[1]=o):o=e[1];const m=o,x=i===void 0?4:i;let a;e[2]!==d?(a=Array.from({length:d}).map(ae),e[2]=d,e[3]=a):a=e[3];let c;return e[4]!==r||e[5]!==m||e[6]!==x||e[7]!==a?(c=s.jsx(L,{columns:m,gap:x,className:r,children:a}),e[4]=r,e[5]=m,e[6]=x,e[7]=a,e[8]=c):c=e[8],c}function ae(t,e){return s.jsxs("div",{className:"bg-card hover:bg-accent transition-colors flex flex-col rounded-lg animate-pulse",children:[s.jsxs("div",{className:"p-4 flex flex-col gap-4",children:[s.jsx("div",{className:"h-12 w-12 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"}),s.jsx("div",{className:"h-4 w-32 bg-muted rounded-lg"})]}),s.jsxs("div",{className:"p-4 border-t border-border flex items-center",children:[s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"}),s.jsx("div",{className:"h-6 w-6 bg-muted rounded-full animate-pulse -ml-2"})]})]},e)}const A=Object.assign(L,{Skeleton:re});function oe({invitation:t}){const[e,n]=C.useState(!1),[l,i]=C.useState(!1),r=O(),d=E(),o=async()=>{n(!0);try{const a=await I.organization.acceptInvitation({invitationId:t.id});if(a.error)w.error(a.error.message),n(!1);else{const c=await I.organization.setActive({organizationId:t.organizationId});c?.data?.slug?(w.success("Invitation accepted!"),d({to:"/$org",params:{org:c.data.slug}})):(w.success("Invitation accepted! Redirecting..."),d({to:"/"}))}}catch{w.error("Failed to accept invitation"),n(!1)}},m=async()=>{i(!0);try{const a=await I.organization.rejectInvitation({invitationId:t.id});a.error?(w.error(a.error.message),i(!1)):(w.success("Invitation rejected"),await r.invalidateQueries(),i(!1))}catch{w.error("Failed to reject invitation"),i(!1)}},x=t.organizationName||t.organizationId;return s.jsxs(u,{className:"border-dashed",children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:"",fallback:x,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsx(u.Subtitle,{children:"You've been invited to join"}),s.jsx(u.Title,{children:x})]})]}),s.jsx(u.Footer,{className:"border-t border-dashed",children:s.jsxs("div",{className:"flex h-3.5 items-center gap-2 w-full",children:[s.jsx($,{onClick:o,disabled:e||l,className:"flex-1",size:"sm",children:e?"Accepting...":s.jsxs(s.Fragment,{children:[s.jsx(H,{size:16}),"Accept"]})}),s.jsx($,{variant:"outline",onClick:m,disabled:e||l,className:"flex-1",size:"sm",children:l?"Declining...":s.jsxs(s.Fragment,{children:[s.jsx(q,{size:16}),"Decline"]})})]})})]})}function ce({query:t}){const e=C.useContext(F),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).filter(d=>d.status==="pending"&&new Date(d.expiresAt)>new Date),r=t?(()=>{const d=t.toLowerCase();return i.filter(o=>o.organizationName?.toLowerCase().includes(d)||o.organizationId.toLowerCase().includes(d))})():i;return r.length===0?null:s.jsxs("div",{className:"mb-16",children:[s.jsx("h2",{className:"text-lg font-medium pb-2 border-b border-border/50 mb-6 px-2",children:"Invitations"}),s.jsx(A,{columns:{sm:2,md:3,lg:4},children:r.map(d=>s.jsx(oe,{invitation:d},d.id))})]})}function de(t){const e=f.c(14),{query:n}=t,{data:l}=I.useListOrganizations(),i=E();let r;e[0]!==l||e[1]!==n?(r=l?n?(()=>{const a=n.toLowerCase();return l.filter(c=>c.name.toLowerCase().includes(a)||c.slug.toLowerCase().includes(a))})():l:[],e[0]=l,e[1]=n,e[2]=r):r=e[2];const d=r;if(!l||l.length===0){let a;return e[3]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"No organizations yet. Create your first organization to get started."})}),e[3]=a):a=e[3],a}if(d.length===0){let a;return e[4]!==n?(a=s.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:['No organizations found matching "',n,'".']})}),e[4]=n,e[5]=a):a=e[5],a}let o;e[6]===Symbol.for("react.memo_cache_sentinel")?(o={sm:2,md:3,lg:4},e[6]=o):o=e[6];let m;if(e[7]!==d||e[8]!==i){let a;e[10]!==i?(a=c=>s.jsxs(u,{onNavigate:()=>i({to:"/$org",params:{org:c.slug}}),children:[s.jsxs(u.Header,{children:[s.jsx(u.AvatarSection,{children:s.jsx(u.Avatar,{url:c.logo||"",fallback:c.name,size:"lg",objectFit:"contain"})}),s.jsxs(u.Content,{children:[s.jsxs(u.Subtitle,{children:["@",c.slug]}),s.jsx(u.Title,{children:c.name})]})]}),s.jsx(u.Footer,{children:s.jsxs("div",{className:"flex h-3.5 items-center text-xs text-muted-foreground",children:["Created:"," ",new Date(c.createdAt).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})]})})]},c.id),e[10]=i,e[11]=a):a=e[11],m=d.map(a),e[7]=d,e[8]=i,e[9]=m}else m=e[9];let x;return e[12]!==m?(x=s.jsx(A,{columns:o,children:m}),e[12]=m,e[13]=x):x=e[13],x}function me(t){const e=f.c(3),{error:n}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(D,{size:24,className:"text-destructive"}),e[0]=l):l=e[0];let i;return e[1]!==n.message?(i=s.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] gap-4",children:[l,s.jsxs("div",{className:"text-sm text-muted-foreground text-center",children:["Error loading organizations: ",n.message]})]}),e[1]=n.message,e[2]=i):i=e[2],i}function xe(){const t=f.c(27),{error:e,isPending:n}=I.useListOrganizations(),[l,i]=C.useState(""),[r,d]=C.useState(!1),o=C.useDeferredValue(l);if(n){let j;return t[0]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx("div",{className:"@container",children:s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}})})}),t[0]=j):j=t[0],j}if(e){let j;return t[1]!==e?(j=s.jsx("div",{className:"max-w-6xl mx-auto p-8",children:s.jsx(me,{error:e})}),t[1]=e,t[2]=j):j=t[2],j}let m;t[3]!==o?(m=s.jsx(C.Suspense,{fallback:null,children:s.jsx(ce,{query:o})}),t[3]=o,t[4]=m):m=t[4];let x;t[5]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("h2",{className:"text-lg font-medium",children:"My organizations"}),t[5]=x):x=t[5];let a;t[6]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Q,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),t[6]=a):a=t[6];let c;t[7]===Symbol.for("react.memo_cache_sentinel")?(c=j=>i(j.target.value),t[7]=c):c=t[7];let g;t[8]!==l?(g=s.jsxs("div",{className:"relative",children:[a,s.jsx(B,{className:"pl-8 h-8 w-52 border-none shadow-none focus-visible:ring-0",placeholder:"Search organizations...",value:l,onChange:c})]}),t[8]=l,t[9]=g):g=t[9];let p;t[10]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs($,{size:"sm",onClick:()=>d(!0),children:[s.jsx(G,{size:16}),s.jsx("span",{children:"New organization"})]}),t[10]=p):p=t[10];let v;t[11]!==g?(v=s.jsxs("div",{className:"flex items-center justify-between pb-2 border-b border-border/50 mb-6 px-2",children:[x,s.jsxs("div",{className:"flex items-center gap-3",children:[g,p]})]}),t[11]=g,t[12]=v):v=t[12];let N;t[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(A.Skeleton,{count:8,columns:{sm:2,md:3,lg:4}}),t[13]=N):N=t[13];let b;t[14]!==o?(b=s.jsx(C.Suspense,{fallback:N,children:s.jsx(de,{query:o})}),t[14]=o,t[15]=b):b=t[15];let h;t[16]!==v||t[17]!==b?(h=s.jsxs("div",{children:[v,b]}),t[16]=v,t[17]=b,t[18]=h):h=t[18];let S;t[19]!==m||t[20]!==h?(S=s.jsxs("div",{className:"@container",children:[m,h]}),t[19]=m,t[20]=h,t[21]=S):S=t[21];let z;t[22]!==r?(z=s.jsx(T,{open:r,onOpenChange:d}),t[22]=r,t[23]=z):z=t[23];let _;return t[24]!==S||t[25]!==z?(_=s.jsxs("div",{className:"max-w-6xl mx-auto p-8",children:[S,z]}),t[24]=S,t[25]=z,t[26]=_):_=t[26],_}function Ae(){const t=f.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"min-h-full",children:s.jsx(xe,{})}),t[0]=e):e=t[0],e}export{Ae as default};
@@ -1 +1 @@
1
- import{c as q,u as K,j as i,r as v,ao as U,ap as V,aq as H,ar as y,as as E,at as W,au as g,av as j,aw as X,ax as w,ay as Y,az as $}from"./index-xP5y29l_.js";import{B as J}from"./button-Cfxn7wqN.js";import{a as Q,b as Z,c as ee,T as oe}from"./tooltip-BBATyAM-.js";import{c as te}from"./Pin01-B7bS6Yjs.js";import{u as re,a as ae}from"./use-organization-settings-BowjVv32.js";function xe(d){const e=q.c(19),{title:t,url:r,icon:o}=d,{org:s}=K(),a=re(s.id),m=ae(s.id);let l;e[0]!==a?.sidebar_items||e[1]!==r?(l=a?.sidebar_items?.some(_=>_.url===r),e[0]=a?.sidebar_items,e[1]=r,e[2]=l):l=e[2];const u=!!l;let p;e[3]!==m.update||e[4]!==o||e[5]!==u||e[6]!==a?.sidebar_items||e[7]!==t||e[8]!==r?(p=async()=>{const _=a?.sidebar_items||[];let P;u?P=_.filter(L=>L.url!==r):P=[..._,{title:t,url:r,icon:o}],await m.update.mutateAsync({sidebar_items:P})},e[3]=m.update,e[4]=o,e[5]=u,e[6]=a?.sidebar_items,e[7]=t,e[8]=r,e[9]=p):p=e[9];const f=p,b=u?"secondary":"outline";let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(te,{size:16}),e[10]=c):c=e[10];let n;e[11]!==f||e[12]!==b?(n=i.jsx(Q,{asChild:!0,children:i.jsx(J,{onClick:f,size:"icon",variant:b,className:"size-7 border border-input",children:c})}),e[11]=f,e[12]=b,e[13]=n):n=e[13];const h=u?"Pinned":"Pin to sidebar";let R;e[14]!==h?(R=i.jsx(Z,{children:h}),e[14]=h,e[15]=R):R=e[15];let x;return e[16]!==n||e[17]!==R?(x=i.jsx(ee,{children:i.jsxs(oe,{children:[n,R]})}),e[16]=n,e[17]=R,e[18]=x):x=e[18],x}var I="Radio",[se,S]=w(I),[ne,ie]=se(I),k=v.forwardRef((d,e)=>{const{__scopeRadio:t,name:r,checked:o=!1,required:s,disabled:a,value:m="on",onCheck:l,form:u,...p}=d,[f,b]=v.useState(null),c=E(e,R=>b(R)),n=v.useRef(!1),h=f?u||!!f.closest("form"):!0;return i.jsxs(ne,{scope:t,checked:o,disabled:a,children:[i.jsx(y.button,{type:"button",role:"radio","aria-checked":o,"data-state":T(o),"data-disabled":a?"":void 0,disabled:a,value:m,...p,ref:c,onClick:g(d.onClick,R=>{o||l?.(),h&&(n.current=R.isPropagationStopped(),n.current||R.stopPropagation())})}),h&&i.jsx(N,{control:f,bubbles:!n.current,name:r,value:m,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var A="RadioIndicator",G=v.forwardRef((d,e)=>{const{__scopeRadio:t,forceMount:r,...o}=d,s=ie(A,t);return i.jsx(X,{present:r||s.checked,children:i.jsx(y.span,{"data-state":T(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});G.displayName=A;var ce="RadioBubbleInput",N=v.forwardRef(({__scopeRadio:d,control:e,checked:t,bubbles:r=!0,...o},s)=>{const a=v.useRef(null),m=E(a,s),l=Y(t),u=$(e);return v.useEffect(()=>{const p=a.current;if(!p)return;const f=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==t&&c){const n=new Event("click",{bubbles:r});c.call(p,t),p.dispatchEvent(n)}},[l,t,r]),i.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:m,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=ce;function T(d){return d?"checked":"unchecked"}var de=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[ue]=w(C,[j,S]),D=j(),O=S(),[le,pe]=ue(C),B=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:o,value:s,required:a=!1,disabled:m=!1,orientation:l,dir:u,loop:p=!0,onValueChange:f,...b}=d,c=D(t),n=U(u),[h,R]=V({prop:s,defaultProp:o??null,onChange:f,caller:C});return i.jsx(le,{scope:t,name:r,required:a,disabled:m,value:h,onValueChange:R,children:i.jsx(H,{asChild:!0,...c,orientation:l,dir:n,loop:p,children:i.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":m?"":void 0,dir:n,...b,ref:e})})})});B.displayName=C;var M="RadioGroupItem",z=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,disabled:r,...o}=d,s=pe(M,t),a=s.disabled||r,m=D(t),l=O(t),u=v.useRef(null),p=E(e,u),f=s.value===o.value,b=v.useRef(!1);return v.useEffect(()=>{const c=h=>{de.includes(h.key)&&(b.current=!0)},n=()=>b.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",n)}},[]),i.jsx(W,{asChild:!0,...m,focusable:!a,active:f,children:i.jsx(k,{disabled:a,required:s.required,checked:f,...l,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{b.current&&u.current?.click()})})})});z.displayName=M;var fe="RadioGroupIndicator",F=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,...r}=d,o=O(t);return i.jsx(G,{...o,...r,ref:e})});F.displayName=fe;var _e=B,ye=z,Ce=F;export{ye as I,xe as P,_e as R,Ce as a};
1
+ import{c as q,u as K,j as i,r as v,ao as U,ap as V,aq as H,ar as y,as as E,at as W,au as g,av as j,aw as X,ax as w,ay as Y,az as $}from"./index-CEFIvFnf.js";import{B as J}from"./button-COjpHvkK.js";import{a as Q,b as Z,c as ee,T as oe}from"./tooltip-WTQ1Sf9I.js";import{c as te}from"./Pin01-CTbGsypg.js";import{u as re,a as ae}from"./use-organization-settings-BzT6x8GT.js";function xe(d){const e=q.c(19),{title:t,url:r,icon:o}=d,{org:s}=K(),a=re(s.id),m=ae(s.id);let l;e[0]!==a?.sidebar_items||e[1]!==r?(l=a?.sidebar_items?.some(_=>_.url===r),e[0]=a?.sidebar_items,e[1]=r,e[2]=l):l=e[2];const u=!!l;let p;e[3]!==m.update||e[4]!==o||e[5]!==u||e[6]!==a?.sidebar_items||e[7]!==t||e[8]!==r?(p=async()=>{const _=a?.sidebar_items||[];let P;u?P=_.filter(L=>L.url!==r):P=[..._,{title:t,url:r,icon:o}],await m.update.mutateAsync({sidebar_items:P})},e[3]=m.update,e[4]=o,e[5]=u,e[6]=a?.sidebar_items,e[7]=t,e[8]=r,e[9]=p):p=e[9];const f=p,b=u?"secondary":"outline";let c;e[10]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(te,{size:16}),e[10]=c):c=e[10];let n;e[11]!==f||e[12]!==b?(n=i.jsx(Q,{asChild:!0,children:i.jsx(J,{onClick:f,size:"icon",variant:b,className:"size-7 border border-input",children:c})}),e[11]=f,e[12]=b,e[13]=n):n=e[13];const h=u?"Pinned":"Pin to sidebar";let R;e[14]!==h?(R=i.jsx(Z,{children:h}),e[14]=h,e[15]=R):R=e[15];let x;return e[16]!==n||e[17]!==R?(x=i.jsx(ee,{children:i.jsxs(oe,{children:[n,R]})}),e[16]=n,e[17]=R,e[18]=x):x=e[18],x}var I="Radio",[se,S]=w(I),[ne,ie]=se(I),k=v.forwardRef((d,e)=>{const{__scopeRadio:t,name:r,checked:o=!1,required:s,disabled:a,value:m="on",onCheck:l,form:u,...p}=d,[f,b]=v.useState(null),c=E(e,R=>b(R)),n=v.useRef(!1),h=f?u||!!f.closest("form"):!0;return i.jsxs(ne,{scope:t,checked:o,disabled:a,children:[i.jsx(y.button,{type:"button",role:"radio","aria-checked":o,"data-state":T(o),"data-disabled":a?"":void 0,disabled:a,value:m,...p,ref:c,onClick:g(d.onClick,R=>{o||l?.(),h&&(n.current=R.isPropagationStopped(),n.current||R.stopPropagation())})}),h&&i.jsx(N,{control:f,bubbles:!n.current,name:r,value:m,checked:o,required:s,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});k.displayName=I;var A="RadioIndicator",G=v.forwardRef((d,e)=>{const{__scopeRadio:t,forceMount:r,...o}=d,s=ie(A,t);return i.jsx(X,{present:r||s.checked,children:i.jsx(y.span,{"data-state":T(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:e})})});G.displayName=A;var ce="RadioBubbleInput",N=v.forwardRef(({__scopeRadio:d,control:e,checked:t,bubbles:r=!0,...o},s)=>{const a=v.useRef(null),m=E(a,s),l=Y(t),u=$(e);return v.useEffect(()=>{const p=a.current;if(!p)return;const f=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==t&&c){const n=new Event("click",{bubbles:r});c.call(p,t),p.dispatchEvent(n)}},[l,t,r]),i.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:t,...o,tabIndex:-1,ref:m,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=ce;function T(d){return d?"checked":"unchecked"}var de=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[ue]=w(C,[j,S]),D=j(),O=S(),[le,pe]=ue(C),B=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,name:r,defaultValue:o,value:s,required:a=!1,disabled:m=!1,orientation:l,dir:u,loop:p=!0,onValueChange:f,...b}=d,c=D(t),n=U(u),[h,R]=V({prop:s,defaultProp:o??null,onChange:f,caller:C});return i.jsx(le,{scope:t,name:r,required:a,disabled:m,value:h,onValueChange:R,children:i.jsx(H,{asChild:!0,...c,orientation:l,dir:n,loop:p,children:i.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":l,"data-disabled":m?"":void 0,dir:n,...b,ref:e})})})});B.displayName=C;var M="RadioGroupItem",z=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,disabled:r,...o}=d,s=pe(M,t),a=s.disabled||r,m=D(t),l=O(t),u=v.useRef(null),p=E(e,u),f=s.value===o.value,b=v.useRef(!1);return v.useEffect(()=>{const c=h=>{de.includes(h.key)&&(b.current=!0)},n=()=>b.current=!1;return document.addEventListener("keydown",c),document.addEventListener("keyup",n),()=>{document.removeEventListener("keydown",c),document.removeEventListener("keyup",n)}},[]),i.jsx(W,{asChild:!0,...m,focusable:!a,active:f,children:i.jsx(k,{disabled:a,required:s.required,checked:f,...l,...o,name:s.name,ref:p,onCheck:()=>s.onValueChange(o.value),onKeyDown:g(c=>{c.key==="Enter"&&c.preventDefault()}),onFocus:g(o.onFocus,()=>{b.current&&u.current?.click()})})})});z.displayName=M;var fe="RadioGroupIndicator",F=v.forwardRef((d,e)=>{const{__scopeRadioGroup:t,...r}=d,o=O(t);return i.jsx(G,{...o,...r,ref:e})});F.displayName=fe;var _e=B,ye=z,Ce=F;export{ye as I,xe as P,_e as R,Ce as a};
@@ -1 +1 @@
1
- import{C as i,L as n,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-xP5y29l_.js";import{E as M,b as L,a as g,c as d,u as E,d as T,e as S,f as x,g as O,h as y}from"./use-connection-CxKjjTvJ.js";import{S as e}from"./constants-BSvkjyhN.js";import{K as f,a as b,W as h,c as A,g as I,b as R,d as K,e as V,f as D,h as W,i as U,u as w,j as Q}from"./constants-BSvkjyhN.js";import{u as j,a as Y,b as F,c as G,d as k}from"./use-mcp-tools-BTP6hCPq.js";import{g as B,l as H,a as J,r as q,u as z,b as X,c as Z,d as $}from"./use-mcp-prompts-Bl2fHtAe.js";import{u as es,a as ts,b as as}from"./use-virtual-mcp-DRarJ7wW.js";import{A as rs,D as is}from"./decopilot-events-Brt4gAR6.js";import{a as ls,h as us,i as Cs}from"./mcp-oauth-CqLoMIwv.js";import{a as Ps,c as ps,e as ms,g as Ms}from"./usage-B8eRkRZY.js";import"./useMutation-ChHDbbEd.js";import"./useQuery-D_Xi1UKi.js";export{rs as ALL_DECOPILOT_EVENT_TYPES,i as ConnectionEntitySchema,is as DECOPILOT_EVENTS,M as EMPTY_COLLECTION_LIST_RESULT,f as KEYS,n as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,b as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,h as WellKnownOrgMCPId,Ps as addUsage,ls as authenticateMcp,L as buildCollectionQueryKey,g as buildOrderByExpression,d as buildWhereExpression,ps as calculateUsageStats,A as createMCPClient,ms as emptyUsageStats,Ms as getCostFromUsage,I as getDecopilotId,B as getPrompt,R as getWellKnownCommunityRegistryConnection,K as getWellKnownDecopilotVirtualMCP,V as getWellKnownMcpStudioConnection,D as getWellKnownOpenRouterConnection,W as getWellKnownRegistryConnection,us as handleOAuthCallback,Cs as isConnectionAuthenticated,U as isDecopilot,c as isStdioParameters,H as listPrompts,J as listResources,P as parseVirtualUrl,q as readResource,E as useCollectionActions,T as useCollectionItem,S as useCollectionList,x as useConnection,O as useConnectionActions,y as useConnections,w as useMCPClient,Q as useMCPClientOptional,z as useMCPPromptsList,X as useMCPPromptsListQuery,Z as useMCPResourcesList,$ as useMCPResourcesListQuery,j as useMCPToolCall,Y as useMCPToolCallMutation,F as useMCPToolCallQuery,G as useMCPToolsList,k as useMCPToolsListQuery,p as useProjectContext,es as useVirtualMCP,ts as useVirtualMCPActions,as as useVirtualMCPs};
1
+ import{C as i,L as n,O as l,P as u,V as C,i as c,p as P,u as p}from"./index-CEFIvFnf.js";import{E as M,b as L,a as g,c as d,u as E,d as T,e as S,f as x,g as O,h as y}from"./use-connection-Cn_KCAac.js";import{S as e}from"./constants-D-wlluJ1.js";import{K as f,a as b,W as h,c as A,g as I,b as R,d as K,e as V,f as D,h as W,i as U,u as w,j as Q}from"./constants-D-wlluJ1.js";import{u as j,a as Y,b as F,c as G,d as k}from"./use-mcp-tools-D-6_rATb.js";import{g as B,l as H,a as J,r as q,u as z,b as X,c as Z,d as $}from"./use-mcp-prompts-VDHthI2F.js";import{u as es,a as ts,b as as}from"./use-virtual-mcp-CzLaRfMK.js";import{A as rs,D as is}from"./decopilot-events-Brt4gAR6.js";import{a as ls,h as us,i as Cs}from"./mcp-oauth-BbnOwrZd.js";import{a as Ps,c as ps,e as ms,g as Ms}from"./usage-B8eRkRZY.js";import"./useMutation-CRJhwh4V.js";import"./useQuery-DMUhrQv9.js";export{rs as ALL_DECOPILOT_EVENT_TYPES,i as ConnectionEntitySchema,is as DECOPILOT_EVENTS,M as EMPTY_COLLECTION_LIST_RESULT,f as KEYS,n as Locator,l as ORG_ADMIN_PROJECT_SLUG,u as ProjectContextProvider,b as SELF_MCP_ALIAS_ID,e as StreamableHTTPClientTransport,C as VirtualMCPEntitySchema,h as WellKnownOrgMCPId,Ps as addUsage,ls as authenticateMcp,L as buildCollectionQueryKey,g as buildOrderByExpression,d as buildWhereExpression,ps as calculateUsageStats,A as createMCPClient,ms as emptyUsageStats,Ms as getCostFromUsage,I as getDecopilotId,B as getPrompt,R as getWellKnownCommunityRegistryConnection,K as getWellKnownDecopilotVirtualMCP,V as getWellKnownMcpStudioConnection,D as getWellKnownOpenRouterConnection,W as getWellKnownRegistryConnection,us as handleOAuthCallback,Cs as isConnectionAuthenticated,U as isDecopilot,c as isStdioParameters,H as listPrompts,J as listResources,P as parseVirtualUrl,q as readResource,E as useCollectionActions,T as useCollectionItem,S as useCollectionList,x as useConnection,O as useConnectionActions,y as useConnections,w as useMCPClient,Q as useMCPClientOptional,z as useMCPPromptsList,X as useMCPPromptsListQuery,Z as useMCPResourcesList,$ as useMCPResourcesListQuery,j as useMCPToolCall,Y as useMCPToolCallMutation,F as useMCPToolCallQuery,G as useMCPToolsList,k as useMCPToolsListQuery,p as useProjectContext,es as useVirtualMCP,ts as useVirtualMCPActions,as as useVirtualMCPs};