decocms 2.185.0 → 2.186.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/dist/client/assets/{AlertCircle-BO0kzcBv.js → AlertCircle-K-Pdcic9.js} +1 -1
  2. package/dist/client/assets/{ArrowLeft-CrI91Scn.js → ArrowLeft-DbjuKsKJ.js} +1 -1
  3. package/dist/client/assets/{ArrowUp-FfROzAyV.js → ArrowUp-CVgf-IuM.js} +1 -1
  4. package/dist/client/assets/{Check-BXqqUm0J.js → Check-5J8pLufa.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-B6V9GzuP.js → ChevronDown-azX3X6AX.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-BSFLHUtv.js → ChevronRight-BU9wyepR.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BYpnL-9F.js → ChevronUp-ISSymo50.js} +1 -1
  8. package/dist/client/assets/{Container-BZeblIrR.js → Container-DO3SbooR.js} +1 -1
  9. package/dist/client/assets/{Dataflow03-CTwEKVcs.js → Dataflow03-DDjLJJPt.js} +1 -1
  10. package/dist/client/assets/{Download01-D7T-WxGL.js → Download01-CSi5s7rT.js} +1 -1
  11. package/dist/client/assets/{FolderClosed-BPzjOG-5.js → FolderClosed-DG1khNab.js} +1 -1
  12. package/dist/client/assets/{Grid01-Bwsn0nh2.js → Grid01-1OtRlqYA.js} +1 -1
  13. package/dist/client/assets/{List-Bq1Yvo6z.js → List-CD8zd6Wa.js} +1 -1
  14. package/dist/client/assets/{Loading01-DCKwAh-U.js → Loading01-CYdiDh3l.js} +1 -1
  15. package/dist/client/assets/{Play-Bw_aeuhq.js → Play-3YhDYx27.js} +1 -1
  16. package/dist/client/assets/{Plus-BW2fNoEy.js → Plus-V1Th1jdv.js} +1 -1
  17. package/dist/client/assets/{RefreshCcw01-YXuL16Jx.js → RefreshCcw01-Bk3rOtaE.js} +1 -1
  18. package/dist/client/assets/{SearchMd-C_bEWIlQ.js → SearchMd-BvvZzTkV.js} +1 -1
  19. package/dist/client/assets/{Settings01-BoOhxJJj.js → Settings01-BhEewSHV.js} +1 -1
  20. package/dist/client/assets/{Trash01-D9O3UWX6.js → Trash01-DEYpLJs9.js} +1 -1
  21. package/dist/client/assets/{Type01-CjsMMlh6.js → Type01-DPCWeoOo.js} +1 -1
  22. package/dist/client/assets/{Upload01-Bpjo_QI4.js → Upload01-CVsYMTIG.js} +1 -1
  23. package/dist/client/assets/{User01-BRC1qZ-u.js → User01-B6InEsCV.js} +1 -1
  24. package/dist/client/assets/{VideoRecorder-DkcbdsZk.js → VideoRecorder-DWwuCAKx.js} +1 -1
  25. package/dist/client/assets/{X-BL1q6dsE.js → X-DSEUOZBv.js} +1 -1
  26. package/dist/client/assets/{XCircle-DxcmI8rf.js → XCircle-BDF0JqjY.js} +1 -1
  27. package/dist/client/assets/{XClose-CslgPORS.js → XClose-C-lSsuAr.js} +1 -1
  28. package/dist/client/assets/{Zap-DERWnfoj.js → Zap-Md9DJ6rv.js} +1 -1
  29. package/dist/client/assets/{agent-connections-preview-Dq0Ojrk0.js → agent-connections-preview-BjYZmjl3.js} +1 -1
  30. package/dist/client/assets/{agent-detail-YxF3rQGf.js → agent-detail-Dj0OUG-D.js} +1 -1
  31. package/dist/client/assets/{agents-C2G5xDCJ.js → agents-DZR4cSbV.js} +1 -1
  32. package/dist/client/assets/{ai-providers-logos-BbTN2hb6.js → ai-providers-logos-pBxdceXx.js} +1 -1
  33. package/dist/client/assets/{alert-dialog-yWVMNVBj.js → alert-dialog-CJVLkF8s.js} +1 -1
  34. package/dist/client/assets/{auth-catchall-CTzVQ5KH.js → auth-catchall-CyapYNp9.js} +1 -1
  35. package/dist/client/assets/{automation-detail-MKjn-Qas.js → automation-detail-DUb_NKWf.js} +1 -1
  36. package/dist/client/assets/{automations-DpKH4m8F.js → automations-B339F6Fn.js} +1 -1
  37. package/dist/client/assets/{avatar-87qJKKK_.js → avatar-BiJdl6Xf.js} +1 -1
  38. package/dist/client/assets/{badge-C2jHxnoS.js → badge-BbY1Vzps.js} +1 -1
  39. package/dist/client/assets/{binder-BaB8rAtx.js → binder-3anAL5WI.js} +1 -1
  40. package/dist/client/assets/{breadcrumb-CBpEGiAs.js → breadcrumb-BM2hSfLB.js} +1 -1
  41. package/dist/client/assets/{card-CUrYBr2J.js → card-D1l6f7HS.js} +1 -1
  42. package/dist/client/assets/{checkbox-RHvkU3ym.js → checkbox-GcV7rItk.js} +1 -1
  43. package/dist/client/assets/{collapsible-BaB71DBr.js → collapsible-E7EbAleb.js} +1 -1
  44. package/dist/client/assets/{collection-detail-iBwR9WNE.js → collection-detail-md2_reRY.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-BetF6DhL.js → collection-display-button-BN69LmBz.js} +1 -1
  46. package/dist/client/assets/{collection-search-DcVVKJ8Q.js → collection-search-CcVBsN85.js} +1 -1
  47. package/dist/client/assets/{collection-table-wrapper-D9WWtdCi.js → collection-table-wrapper-BPFLr1-v.js} +1 -1
  48. package/dist/client/assets/{collection-tabs-Df3Ptc0I.js → collection-tabs-BijGeHYB.js} +1 -1
  49. package/dist/client/assets/{command-CMOZJSSv.js → command-KtP0d-HZ.js} +1 -1
  50. package/dist/client/assets/{connection-card-CKJwNgpO.js → connection-card-DT3Fx28T.js} +1 -1
  51. package/dist/client/assets/{connection-detail-Dbycfmu5.js → connection-detail-DwgDpXcB.js} +1 -1
  52. package/dist/client/assets/{connections-jKPi1hZg.js → connections-C_kRN8jY.js} +1 -1
  53. package/dist/client/assets/{constants-Dzy_AMuL.js → constants-2OCwh60p.js} +1 -1
  54. package/dist/client/assets/constants-BwEgB5ct.js +1 -0
  55. package/dist/client/assets/{context-BL_7JbXZ.js → context-CuNDOhoh.js} +1 -1
  56. package/dist/client/assets/{create-organization-dialog-Cycga0XC.js → create-organization-dialog-Cd0g9HkW.js} +1 -1
  57. package/dist/client/assets/{create-project-dialog-BRQDkCBr.js → create-project-dialog-CU5VLoep.js} +1 -1
  58. package/dist/client/assets/{danger-D5sT_SDt.js → danger-CFl_eB5k.js} +1 -1
  59. package/dist/client/assets/{danger-zone-CI7wNXdQ.js → danger-zone-BSvLmne8.js} +1 -1
  60. package/dist/client/assets/{dependencies-XXGkpDMX.js → dependencies-DDWJJnWt.js} +1 -1
  61. package/dist/client/assets/{dialog-Dmm_af5q.js → dialog-D46ZA88r.js} +1 -1
  62. package/dist/client/assets/{drawer-SktUP7-X.js → drawer-DsEaI2mC.js} +1 -1
  63. package/dist/client/assets/{dropdown-menu-BtgYu0Kc.js → dropdown-menu-BJLjCuY0.js} +1 -1
  64. package/dist/client/assets/{dynamic-plugin-layout-DncjSb8M.js → dynamic-plugin-layout-DQu_PXGi.js} +1 -1
  65. package/dist/client/assets/{editable-task-title-DBtH_3H-.js → editable-task-title-BXxkXNIX.js} +1 -1
  66. package/dist/client/assets/{empty-state-Cx44yC3Y.js → empty-state-B7nlLEUe.js} +1 -1
  67. package/dist/client/assets/{empty-state-BgKAQr0C.js → empty-state-unH0aOxb.js} +1 -1
  68. package/dist/client/assets/{env-vars-editor-DPFQeE92.js → env-vars-editor-COVavLgR.js} +1 -1
  69. package/dist/client/assets/{extract-connection-data-Zw5RYEyS.js → extract-connection-data-BxATAvFG.js} +1 -1
  70. package/dist/client/assets/{file-browser-AWmMc57j.js → file-browser-Y37oB16s.js} +2 -2
  71. package/dist/client/assets/{form-Obbe7UIk.js → form-BC654cr0.js} +1 -1
  72. package/dist/client/assets/{general-DDuzkv9d.js → general-DnNKCd5D.js} +1 -1
  73. package/dist/client/assets/{grid-view-DsTxgJvN.js → grid-view-DBiOShLC.js} +1 -1
  74. package/dist/client/assets/{home-C1G2fDyc.js → home-DoIljK7E.js} +1 -1
  75. package/dist/client/assets/{index-DLW7tZdu.js → index-BRbdC8tb.js} +3 -3
  76. package/dist/client/assets/{index-BtvKqHu_.js → index-BbKz4tLm.js} +1 -1
  77. package/dist/client/assets/{index-CQPlxt4u.js → index-CKlHjZGl.js} +1 -1
  78. package/dist/client/assets/{index-CdQYIu_6.js → index-CvdTWVPu.js} +1 -1
  79. package/dist/client/assets/{index-CDNLqNNq.js → index-DSSbY8iZ.js} +1 -1
  80. package/dist/client/assets/{index-CdK7iTUb.js → index-DSiECZF0.js} +1 -1
  81. package/dist/client/assets/{index-B1ylaSc7.js → index-DW3Gddt1.js} +1 -1
  82. package/dist/client/assets/{index-DCtU4ndp.js → index-DhwDaiqy.js} +1 -1
  83. package/dist/client/assets/{index-C0Ne6xGI.js → index-Do980wUe.js} +1 -1
  84. package/dist/client/assets/{index-75eZ1uI1.js → index-P1BeuVDU.js} +1 -1
  85. package/dist/client/assets/{index-CUtX0cOT.js → index-Z-Bosamk.js} +1 -1
  86. package/dist/client/assets/{infiniteQueryObserver-BdQSrFrR.js → infiniteQueryObserver-DozliAIg.js} +1 -1
  87. package/dist/client/assets/{input-DgJ0xjPE.js → input-BOjviNKP.js} +1 -1
  88. package/dist/client/assets/{integration-icon-C-I4Z6Dk.js → integration-icon-BxAcqR_W.js} +1 -1
  89. package/dist/client/assets/{label-BL4fRnZZ.js → label-h0Vcc2GK.js} +1 -1
  90. package/dist/client/assets/{layout-p-PoyTJz.js → layout-B-xxTjgY.js} +1 -1
  91. package/dist/client/assets/{layout-DAuICUV3.js → layout-B1L9zKc4.js} +1 -1
  92. package/dist/client/assets/{login-Bvsz1l56.js → login-DGiUNRC7.js} +1 -1
  93. package/dist/client/assets/{logo-upload-CGF8q63h.js → logo-upload-PCOmxOCx.js} +1 -1
  94. package/dist/client/assets/{mcp-app-renderer-DzztYEVX.js → mcp-app-renderer-CRS3A1HB.js} +1 -1
  95. package/dist/client/assets/{mcp-server-card-Dz2MeUmM.js → mcp-server-card-B6PFNGFX.js} +1 -1
  96. package/dist/client/assets/{mcp-server-detail-cX9p8Afl.js → mcp-server-detail-oU638r_U.js} +2 -2
  97. package/dist/client/assets/{members-BX_g15fi.js → members-CNzL9zLR.js} +1 -1
  98. package/dist/client/assets/{monaco-editor-DX4p-sBy.js → monaco-editor-vJr8RDGl.js} +1 -1
  99. package/dist/client/assets/{monitoring-C9346vXd.js → monitoring-CxIOWArS.js} +1 -1
  100. package/dist/client/assets/{monitoring-dashboard-edit-cUuCGr6O.js → monitoring-dashboard-edit-DxfJ4WNy.js} +1 -1
  101. package/dist/client/assets/{monitoring-dashboard-view-DFc0vQzd.js → monitoring-dashboard-view-BL4nPi_-.js} +1 -1
  102. package/dist/client/assets/{monitoring-stats-row-BDkVd8_E.js → monitoring-stats-row-CrNnPzpZ.js} +1 -1
  103. package/dist/client/assets/{oauth-callback-Bt5QJgEG.js → oauth-callback-Cq38djsA.js} +1 -1
  104. package/dist/client/assets/{oauth-callback-ai-provider-DgK7Rkwm.js → oauth-callback-ai-provider-CYTOAGu5.js} +1 -1
  105. package/dist/client/assets/{org-ai-providers-DQw8Ry8m.js → org-ai-providers-DtsI9IWI.js} +1 -1
  106. package/dist/client/assets/{page-BPTnb_7u.js → page-CYpcNv9e.js} +1 -1
  107. package/dist/client/assets/{page-BNkRheIf.js → page-zavfyW1i.js} +1 -1
  108. package/dist/client/assets/{plugin-empty-state-DZ2dLLg8.js → plugin-empty-state-CgDAJvPC.js} +1 -1
  109. package/dist/client/assets/{plugin-empty-state-D5d0HyD_.js → plugin-empty-state-Dl_2Uo0y.js} +1 -1
  110. package/dist/client/assets/{plugin-header-DToCRz-E.js → plugin-header-D43xaGJs.js} +1 -1
  111. package/dist/client/assets/{plugin-header-DaNytvgS.js → plugin-header-Dv9ESxEb.js} +1 -1
  112. package/dist/client/assets/plugins-DBMyeN4D.js +1 -0
  113. package/dist/client/assets/{popover-DnM-fBUa.js → popover-DWheVeA1.js} +1 -1
  114. package/dist/client/assets/{project-app-view-BmSeum6S.js → project-app-view-9tWFjZrt.js} +1 -1
  115. package/dist/client/assets/{project-layout-B6exvEKF.js → project-layout-Dv-Q6xBk.js} +1 -1
  116. package/dist/client/assets/{project-plugins-CzyuvjoL.js → project-plugins-Bw8tiinl.js} +1 -1
  117. package/dist/client/assets/{projects-list-C1JxN737.js → projects-list-DokYG2lJ.js} +1 -1
  118. package/dist/client/assets/{registry-layout-D-kGw5vE.js → registry-layout-CxVYwTXn.js} +1 -1
  119. package/dist/client/assets/{registry-utils-D6No_i4P.js → registry-utils-BSd5ITwa.js} +1 -1
  120. package/dist/client/assets/{reset-password-CUY6IwDL.js → reset-password-C7Dj7QEf.js} +1 -1
  121. package/dist/client/assets/{resizable-CAbzuUb1.js → resizable-DixBhzs0.js} +1 -1
  122. package/dist/client/assets/{save-actions-DGqTWEQL.js → save-actions-qtl58c-n.js} +1 -1
  123. package/dist/client/assets/{scroll-area-BCIFp-8p.js → scroll-area-COTWSYpJ.js} +1 -1
  124. package/dist/client/assets/{select-DeOQOwBi.js → select-Duo4-kjU.js} +1 -1
  125. package/dist/client/assets/{select-virtual-mcp-B78FWMF5.js → select-virtual-mcp-DmwglbWt.js} +1 -1
  126. package/dist/client/assets/{shell-layout-BX9tUo-C.js → shell-layout-BKPGcmv4.js} +2 -2
  127. package/dist/client/assets/{sidebar-settings-CxzW8gJz.js → sidebar-settings-Bvnz3xIL.js} +1 -1
  128. package/dist/client/assets/{skeleton-BwiQLrEa.js → skeleton-CxmuAljC.js} +1 -1
  129. package/dist/client/assets/{spinner-D4Lh5lMu.js → spinner-Bvsf8yBr.js} +1 -1
  130. package/dist/client/assets/{store-invite-CdO_aWdO.js → store-invite-B3ZITnmR.js} +1 -1
  131. package/dist/client/assets/{switch-DqWbwfAd.js → switch-DgSoD5A_.js} +1 -1
  132. package/dist/client/assets/{table-CbTCyRX5.js → table-6Exocylh.js} +1 -1
  133. package/dist/client/assets/{tabs-zzjdf6a0.js → tabs-BawFIUQp.js} +1 -1
  134. package/dist/client/assets/{task-status-hmfgdVgC.js → task-status-DCcRj1iH.js} +32 -32
  135. package/dist/client/assets/tasks-BXLnBJIq.js +1 -0
  136. package/dist/client/assets/{tasks-panel-BKxSsDFe.js → tasks-panel-DWjSzHZC.js} +1 -1
  137. package/dist/client/assets/{textarea-CJ-1DHFH.js → textarea-DdRl57bf.js} +1 -1
  138. package/dist/client/assets/{time-range-picker-BBbi_2IF.js → time-range-picker-DOqabEZA.js} +1 -1
  139. package/dist/client/assets/{toggle-group-DaaATQ-5.js → toggle-group-B0IrEjNf.js} +1 -1
  140. package/dist/client/assets/{tools-list-DLZSPKIc.js → tools-list-DbIvei1P.js} +1 -1
  141. package/dist/client/assets/{tooltip-D-QYbPJS.js → tooltip-xl3GoSVP.js} +1 -1
  142. package/dist/client/assets/{topbar-portal-D3vr1IIh.js → topbar-portal-DVwzk_zs.js} +1 -1
  143. package/dist/client/assets/{types-vQT8OD6B.js → types-DPAE4wXV.js} +1 -1
  144. package/dist/client/assets/{use-automations-BIoacnri.js → use-automations-BTjhSzA_.js} +1 -1
  145. package/dist/client/assets/{use-collections-BJxMmWLX.js → use-collections-Bqp5H9bu.js} +1 -1
  146. package/dist/client/assets/{use-connection-DPMknCkO.js → use-connection-De5rVqrE.js} +1 -1
  147. package/dist/client/assets/{use-copy-CkgWv__W.js → use-copy-CogCWJQ7.js} +1 -1
  148. package/dist/client/assets/{use-create-virtual-mcp-pWj6n63S.js → use-create-virtual-mcp-CdSUPhk5.js} +1 -1
  149. package/dist/client/assets/{use-infinite-scroll-BU1rPA0T.js → use-infinite-scroll-CQVKBMoy.js} +1 -1
  150. package/dist/client/assets/{use-install-from-registry-C1XqHuwX.js → use-install-from-registry-D7V-rpJ0.js} +1 -1
  151. package/dist/client/assets/{use-list-state-B6nYBLyk.js → use-list-state-BtvQgv8T.js} +1 -1
  152. package/dist/client/assets/{use-mcp-prompts-BmK_9UQh.js → use-mcp-prompts-k7CgkVwI.js} +1 -1
  153. package/dist/client/assets/{use-mcp-resources-DQ2GW_FE.js → use-mcp-resources-BfKeTtfq.js} +1 -1
  154. package/dist/client/assets/{use-mcp-tools-KIPxuDyk.js → use-mcp-tools-iD-VGNhw.js} +1 -1
  155. package/dist/client/assets/{use-members-BRZ5u_Eq.js → use-members-CYI2sNHs.js} +1 -1
  156. package/dist/client/assets/{use-project-DVq_144v.js → use-project-DdgxiICX.js} +1 -1
  157. package/dist/client/assets/{use-store-discovery-aQCBFuCU.js → use-store-discovery-DdbArpnw.js} +1 -1
  158. package/dist/client/assets/{use-view-mode-lmHuCoZm.js → use-view-mode-BiSEdh0M.js} +1 -1
  159. package/dist/client/assets/{use-virtual-mcp-BEia5q72.js → use-virtual-mcp-DxTKYWLn.js} +1 -1
  160. package/dist/client/assets/useInfiniteQuery-DMnx1-Vs.js +1 -0
  161. package/dist/client/assets/{useMutation-BatnVMWS.js → useMutation-C_Uj7oOe.js} +1 -1
  162. package/dist/client/assets/useQuery-C31bP6Ck.js +1 -0
  163. package/dist/client/assets/useSuspenseInfiniteQuery-D-WGLpBh.js +1 -0
  164. package/dist/client/assets/{user-Aw6SqZpK.js → user-tg9kwvXU.js} +1 -1
  165. package/dist/client/assets/{workflow-CRjl6sOP.js → workflow-D6TrKvm2.js} +1 -1
  166. package/dist/client/index.html +1 -1
  167. package/package.json +1 -1
  168. package/dist/client/assets/constants-BTMGn0Px.js +0 -1
  169. package/dist/client/assets/plugins-LyhHmrtr.js +0 -1
  170. package/dist/client/assets/tasks-C6cfAkGR.js +0 -1
  171. package/dist/client/assets/useInfiniteQuery-DpWHrz5z.js +0 -1
  172. package/dist/client/assets/useQuery-YHvrmKkI.js +0 -1
  173. package/dist/client/assets/useSuspenseInfiniteQuery-Cv31oWYI.js +0 -1
  174. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  175. package/dist/server/node_modules/pg-int8/README.md +0 -16
  176. package/dist/server/node_modules/pg-int8/index.js +0 -100
  177. package/dist/server/node_modules/pg-int8/package.json +0 -24
  178. package/dist/server/node_modules/pg-pool/LICENSE +0 -21
  179. package/dist/server/node_modules/pg-pool/README.md +0 -357
  180. package/dist/server/node_modules/pg-pool/esm/index.mjs +0 -5
  181. package/dist/server/node_modules/pg-pool/index.js +0 -517
  182. package/dist/server/node_modules/pg-pool/package.json +0 -51
  183. package/dist/server/node_modules/pg-protocol/LICENSE +0 -21
  184. package/dist/server/node_modules/pg-protocol/README.md +0 -3
  185. package/dist/server/node_modules/pg-protocol/dist/b.d.ts +0 -1
  186. package/dist/server/node_modules/pg-protocol/dist/b.js +0 -23
  187. package/dist/server/node_modules/pg-protocol/dist/b.js.map +0 -1
  188. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.d.ts +0 -15
  189. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js +0 -55
  190. package/dist/server/node_modules/pg-protocol/dist/buffer-reader.js.map +0 -1
  191. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.d.ts +0 -16
  192. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js +0 -81
  193. package/dist/server/node_modules/pg-protocol/dist/buffer-writer.js.map +0 -1
  194. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.d.ts +0 -1
  195. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js +0 -530
  196. package/dist/server/node_modules/pg-protocol/dist/inbound-parser.test.js.map +0 -1
  197. package/dist/server/node_modules/pg-protocol/dist/index.d.ts +0 -6
  198. package/dist/server/node_modules/pg-protocol/dist/index.js +0 -15
  199. package/dist/server/node_modules/pg-protocol/dist/index.js.map +0 -1
  200. package/dist/server/node_modules/pg-protocol/dist/messages.d.ts +0 -162
  201. package/dist/server/node_modules/pg-protocol/dist/messages.js +0 -160
  202. package/dist/server/node_modules/pg-protocol/dist/messages.js.map +0 -1
  203. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.d.ts +0 -1
  204. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js +0 -252
  205. package/dist/server/node_modules/pg-protocol/dist/outbound-serializer.test.js.map +0 -1
  206. package/dist/server/node_modules/pg-protocol/dist/parser.d.ts +0 -24
  207. package/dist/server/node_modules/pg-protocol/dist/parser.js +0 -324
  208. package/dist/server/node_modules/pg-protocol/dist/parser.js.map +0 -1
  209. package/dist/server/node_modules/pg-protocol/dist/serializer.d.ts +0 -42
  210. package/dist/server/node_modules/pg-protocol/dist/serializer.js +0 -189
  211. package/dist/server/node_modules/pg-protocol/dist/serializer.js.map +0 -1
  212. package/dist/server/node_modules/pg-protocol/esm/index.js +0 -11
  213. package/dist/server/node_modules/pg-protocol/package.json +0 -45
  214. package/dist/server/node_modules/pg-protocol/src/b.ts +0 -25
  215. package/dist/server/node_modules/pg-protocol/src/buffer-reader.ts +0 -58
  216. package/dist/server/node_modules/pg-protocol/src/buffer-writer.ts +0 -85
  217. package/dist/server/node_modules/pg-protocol/src/inbound-parser.test.ts +0 -575
  218. package/dist/server/node_modules/pg-protocol/src/index.ts +0 -11
  219. package/dist/server/node_modules/pg-protocol/src/messages.ts +0 -262
  220. package/dist/server/node_modules/pg-protocol/src/outbound-serializer.test.ts +0 -276
  221. package/dist/server/node_modules/pg-protocol/src/parser.ts +0 -413
  222. package/dist/server/node_modules/pg-protocol/src/serializer.ts +0 -274
  223. package/dist/server/node_modules/pg-protocol/src/testing/buffer-list.ts +0 -67
  224. package/dist/server/node_modules/pg-protocol/src/testing/test-buffers.ts +0 -166
  225. package/dist/server/node_modules/pg-protocol/src/types/chunky.d.ts +0 -1
  226. package/dist/server/node_modules/pg-types/.travis.yml +0 -7
  227. package/dist/server/node_modules/pg-types/Makefile +0 -14
  228. package/dist/server/node_modules/pg-types/README.md +0 -75
  229. package/dist/server/node_modules/pg-types/index.d.ts +0 -137
  230. package/dist/server/node_modules/pg-types/index.js +0 -47
  231. package/dist/server/node_modules/pg-types/index.test-d.ts +0 -21
  232. package/dist/server/node_modules/pg-types/lib/arrayParser.js +0 -11
  233. package/dist/server/node_modules/pg-types/lib/binaryParsers.js +0 -257
  234. package/dist/server/node_modules/pg-types/lib/builtins.js +0 -73
  235. package/dist/server/node_modules/pg-types/lib/textParsers.js +0 -215
  236. package/dist/server/node_modules/pg-types/package.json +0 -42
  237. package/dist/server/node_modules/pg-types/test/index.js +0 -24
  238. package/dist/server/node_modules/pg-types/test/types.js +0 -597
  239. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  240. package/dist/server/node_modules/postgres-array/index.js +0 -97
  241. package/dist/server/node_modules/postgres-array/license +0 -21
  242. package/dist/server/node_modules/postgres-array/package.json +0 -35
  243. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  244. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  245. package/dist/server/node_modules/postgres-bytea/license +0 -21
  246. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  247. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  248. package/dist/server/node_modules/postgres-date/index.js +0 -116
  249. package/dist/server/node_modules/postgres-date/license +0 -21
  250. package/dist/server/node_modules/postgres-date/package.json +0 -33
  251. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  252. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  253. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  254. package/dist/server/node_modules/postgres-interval/license +0 -21
  255. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  256. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  257. package/dist/server/node_modules/split2/LICENSE +0 -13
  258. package/dist/server/node_modules/split2/README.md +0 -85
  259. package/dist/server/node_modules/split2/bench.js +0 -27
  260. package/dist/server/node_modules/split2/index.js +0 -141
  261. package/dist/server/node_modules/split2/package.json +0 -39
  262. package/dist/server/node_modules/split2/test.js +0 -409
@@ -1 +1 @@
1
- import{r as c,X as nt,Y as Pe,j as d,b2 as rt,a9 as Ie,$ as L,b3 as st,_ as j,a1 as _,aa as $,b4 as lt,aL as Ne,b5 as Ee,be as at,a5 as it,aW as ct,b6 as dt,b9 as ut,b7 as pt,ba as ft,bb as mt,a4 as ht,b8 as vt,bc as gt,bd as xt,c as ee,D as oe}from"./index-DLW7tZdu.js";import{c as _e}from"./index-BdQq_4o_.js";import{V as St}from"./index-CQPlxt4u.js";import{i as wt}from"./Check-BXqqUm0J.js";import{t as Re}from"./ChevronDown-B6V9GzuP.js";import{n as Ct}from"./ChevronUp-BYpnL-9F.js";var yt=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,It]=at(J),[ne]=ht(J,[It,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,_t]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:I,required:w,form:S}=r,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),k=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:k,disabled:I,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:I,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=L(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,I,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&I(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=L(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",Le=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Nt;var Et="SelectPortal",ke=r=>d.jsx(lt,{asChild:!0,...r});ke.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),N=L(e,f=>F(f)),[O,U]=c.useState(null),[q,k]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),b=document.activeElement;for(const P of f)if(P===b||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==b))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&k(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const b=f.target,P=y.indexOf(b);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=L(e,N=>h(N)),I=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const b=q.left-O.left,P=U.left-b,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const b=O.right-q.right,P=window.innerWidth-U.right-b,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=I(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const b=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const b=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[I,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(gt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=L(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:I}=s;if(I?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,Lt]=ne(Ue),kt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Ie();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});kt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[I,w]=c.useState(!1),S=L(e,m=>a.itemRefCallback?.(m,o,n)),p=Ie(),v=c.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":I?"":void 0,"aria-selected":u&&I,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=c.useState(null),I=L(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:I}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ft=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=be;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=L(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=Le,qt=ke,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function mo(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function ho(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const I=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==I?(w=oe("p-1",I),e[11]=I,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function vo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{po as S,mo as a,fo as b,ho as c,vo as d};
1
+ import{r as c,X as nt,Y as Pe,j as d,b2 as rt,a9 as Ie,$ as L,b3 as st,_ as j,a1 as _,aa as $,b4 as lt,aL as Ne,b5 as Ee,be as at,a5 as it,aW as ct,b6 as dt,b9 as ut,b7 as pt,ba as ft,bb as mt,a4 as ht,b8 as vt,bc as gt,bd as xt,c as ee,D as oe}from"./index-BRbdC8tb.js";import{c as _e}from"./index-BdQq_4o_.js";import{V as St}from"./index-CKlHjZGl.js";import{i as wt}from"./Check-5J8pLufa.js";import{t as Re}from"./ChevronDown-azX3X6AX.js";import{n as Ct}from"./ChevronUp-ISSymo50.js";var yt=[" ","Enter","ArrowUp","ArrowDown"],bt=[" ","Enter"],J="Select",[de,ue,It]=at(J),[ne]=ht(J,[It,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,_t]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:I,required:w,form:S}=r,p=pe(e),[v,C]=c.useState(null),[m,x]=c.useState(null),[F,M]=c.useState(!1),re=nt(u),[N,O]=Pe({prop:o,defaultProp:n??!1,onChange:i,caller:J}),[U,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),k=c.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=c.useState(new Set),H=Array.from(W).map(E=>E.props.value).join(";");return d.jsx(rt,{...p,children:d.jsxs(Tt,{required:w,scope:e,trigger:v,onTriggerChange:C,valueNode:m,onValueNodeChange:x,valueNodeHasChildren:F,onValueNodeHasChildrenChange:M,contentId:Ie(),value:U,onValueChange:q,open:N,onOpenChange:O,dir:re,triggerPointerDownPosRef:k,disabled:I,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:c.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:c.useCallback(E=>{V(D=>{const z=new Set(D);return z.delete(E),z})},[]),children:t})}),B?d.jsxs(Qe,{"aria-hidden":!0,required:w,tabIndex:-1,name:h,autoComplete:g,value:U,onChange:E=>q(E.target.value),disabled:I,form:S,children:[U===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=c.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,i=pe(t),s=G(Me,t),l=s.disabled||o,a=L(e,s.onTriggerChange),u=ue(t),h=c.useRef("touch"),[g,I,w]=tt(p=>{const v=u().filter(x=>!x.disabled),C=v.find(x=>x.value===s.value),m=ot(v,p,C);m!==void 0&&s.onValueChange(m.value)}),S=p=>{l||(s.onOpenChange(!0),w()),p&&(s.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)})};return d.jsx(st,{asChild:!0,...i,children:d.jsx(j.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":et(s.value)?"":void 0,...n,ref:a,onClick:_(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:_(n.onPointerDown,p=>{h.current=p.pointerType;const v=p.target;v.hasPointerCapture(p.pointerId)&&v.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&p.pointerType==="mouse"&&(S(p),p.preventDefault())}),onKeyDown:_(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&I(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:i,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=i!==void 0,g=L(e,a.onValueNodeChange);return $(()=>{u(h)},[u,h]),d.jsx(j.span,{...l,ref:g,style:{pointerEvents:"none"},children:et(a.value)?d.jsx(d.Fragment,{children:s}):i})});De.displayName=Oe;var Nt="SelectIcon",Le=c.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});Le.displayName=Nt;var Et="SelectPortal",ke=r=>d.jsx(lt,{asChild:!0,...r});ke.displayName=Et;var Q="SelectContent",Be=c.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=c.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const i=o;return i?Ne.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),i):null}return d.jsx(He,{...r,ref:e})});Be.displayName=Q;var A=10,[Ve,Y]=ne(Q),Rt="SelectContentImpl",jt=vt("SelectContent.RemoveScroll"),He=c.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:i,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,F]=c.useState(null),[M,re]=c.useState(null),N=L(e,f=>F(f)),[O,U]=c.useState(null),[q,k]=c.useState(null),B=ue(t),[W,V]=c.useState(!1),H=c.useRef(!1);c.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=c.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),b=document.activeElement;for(const P of f)if(P===b||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==b))return},[B,M]),D=c.useCallback(()=>E([O,x]),[E,O,x]);c.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;c.useEffect(()=>{if(x){let f={x:0,y:0};const T=y=>{f={x:Math.abs(Math.round(y.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(y.pageY)-(K.current?.y??0))}},R=y=>{f.x<=10&&f.y<=10?y.preventDefault():x.contains(y.target)||z(!1),document.removeEventListener("pointermove",T),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",T),document.addEventListener("pointerup",R,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",T),document.removeEventListener("pointerup",R,{capture:!0})}}},[x,z,K]),c.useEffect(()=>{const f=()=>z(!1);return window.addEventListener("blur",f),window.addEventListener("resize",f),()=>{window.removeEventListener("blur",f),window.removeEventListener("resize",f)}},[z]);const[fe,ae]=tt(f=>{const T=B().filter(b=>!b.disabled),R=T.find(b=>b.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(U(f),y&&(H.current=!0))},[m.value]),he=c.useCallback(()=>x?.focus(),[x]),te=c.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&k(f)},[m.value]),ie=o==="popper"?Se:ze,se=ie===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:I,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v}:{};return d.jsx(Ve,{scope:t,content:x,viewport:M,onViewportChange:re,itemRefCallback:me,selectedItem:O,onItemLeave:he,itemTextRefCallback:te,focusSelectedItem:D,selectedItemText:q,position:o,isPositioned:W,searchRef:fe,children:d.jsx(pt,{as:jt,allowPinchZoom:!0,children:d.jsx(ft,{asChild:!0,trapped:m.open,onMountAutoFocus:f=>{f.preventDefault()},onUnmountAutoFocus:_(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ie,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:_(C.onKeyDown,f=>{const T=f.ctrlKey||f.altKey||f.metaKey;if(f.key==="Tab"&&f.preventDefault(),!T&&f.key.length===1&&ae(f.key),["ArrowUp","ArrowDown","Home","End"].includes(f.key)){let y=B().filter(b=>!b.disabled).map(b=>b.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const b=f.target,P=y.indexOf(b);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=c.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,i=G(Q,t),s=Y(Q,t),[l,a]=c.useState(null),[u,h]=c.useState(null),g=L(e,N=>h(N)),I=ue(t),w=c.useRef(!1),S=c.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=c.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&p&&v&&C){const N=i.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),U=i.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(i.dir!=="rtl"){const b=q.left-O.left,P=U.left-b,X=N.left-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const b=O.right-q.right,P=window.innerWidth-U.right-b,X=window.innerWidth-N.right-P,Z=N.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=_e(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const k=I(),B=window.innerHeight-A*2,W=p.scrollHeight,V=window.getComputedStyle(u),H=parseInt(V.borderTopWidth,10),E=parseInt(V.paddingTop,10),D=parseInt(V.borderBottomWidth,10),z=parseInt(V.paddingBottom,10),K=H+E+W+z+D,fe=Math.min(v.offsetHeight*5,K),ae=window.getComputedStyle(p),me=parseInt(ae.paddingTop,10),he=parseInt(ae.paddingBottom,10),te=N.top+N.height/2-A,ie=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const b=k.length>0&&v===k[k.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ie,se+(b?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const b=k.length>0&&v===k[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(b?me:0)+se)+R;l.style.height=X+"px",p.scrollTop=T-te+p.offsetTop}l.style.margin=`${A}px 0`,l.style.minHeight=fe+"px",l.style.maxHeight=B+"px",o?.(),requestAnimationFrame(()=>w.current=!0)}},[I,i.trigger,i.valueNode,l,u,p,v,C,i.dir,o]);$(()=>x(),[x]);const[F,M]=c.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=c.useCallback(N=>{N&&S.current===!0&&(x(),m?.(),S.current=!1)},[x,m]);return d.jsx(Ot,{scope:t,contentWrapper:l,shouldExpandOnScrollRef:w,onScrollButtonChange:re,children:d.jsx("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:F},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=c.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...i}=r,s=pe(t);return d.jsx(gt,{...s,...i,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Se.displayName=At;var[Ot,Te]=ne(Q,{}),we="SelectViewport",Fe=c.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,i=Y(we,t),s=Te(we,t),l=L(e,i.onViewportChange),a=c.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),d.jsx(de.Slot,{scope:t,children:d.jsx(j.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:_(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:I}=s;if(I?.current&&g){const w=Math.abs(a.current-h.scrollTop);if(w>0){const S=window.innerHeight-A*2,p=parseFloat(g.style.minHeight),v=parseFloat(g.style.height),C=Math.max(p,v);if(C<S){const m=C+w,x=Math.min(S,m),F=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=F>0?F:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Fe.displayName=we;var Ue="SelectGroup",[Dt,Lt]=ne(Ue),kt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Ie();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});kt.displayName=Ue;var We="SelectLabel",Bt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=Lt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ce="SelectItem",[Vt,Ke]=ne(ce),$e=c.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:i,...s}=r,l=G(ce,t),a=Y(ce,t),u=l.value===o,[h,g]=c.useState(i??""),[I,w]=c.useState(!1),S=L(e,m=>a.itemRefCallback?.(m,o,n)),p=Ie(),v=c.useRef("touch"),C=()=>{n||(l.onValueChange(o),l.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Vt,{scope:t,value:o,disabled:n,textId:p,isSelected:u,onItemTextChange:c.useCallback(m=>{g(x=>x||(m?.textContent??"").trim())},[]),children:d.jsx(de.ItemSlot,{scope:t,value:o,disabled:n,textValue:h,children:d.jsx(j.div,{role:"option","aria-labelledby":p,"data-highlighted":I?"":void 0,"aria-selected":u&&I,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:_(s.onFocus,()=>w(!0)),onBlur:_(s.onBlur,()=>w(!1)),onClick:_(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:_(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:_(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:_(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:_(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:_(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(bt.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ce;var le="SelectItemText",Ge=c.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...i}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=_t(le,t),[h,g]=c.useState(null),I=L(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=c.useMemo(()=>d.jsx("option",{value:a.value,disabled:a.disabled,children:w},a.value),[a.disabled,a.value,w]),{onNativeOptionAdd:p,onNativeOptionRemove:v}=u;return $(()=>(p(S),()=>v(S)),[p,v,S]),d.jsxs(d.Fragment,{children:[d.jsx(j.span,{id:a.textId,...i,ref:I}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Ne.createPortal(i.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return Ke(Ye,t).isSelected?d.jsx(j.span,{"aria-hidden":!0,...o,ref:e}):null});qe.displayName=Ye;var Ce="SelectScrollUpButton",Xe=c.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,i]=c.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;i(u)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop-a.offsetHeight)}}):null});Xe.displayName=Ce;var ye="SelectScrollDownButton",Ze=c.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,i]=c.useState(!1),s=L(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;i(h)};const a=t.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[t.viewport,t.isPositioned]),n?d.jsx(Je,{...r,ref:s,onAutoScroll:()=>{const{viewport:l,selectedItem:a}=t;l&&a&&(l.scrollTop=l.scrollTop+a.offsetHeight)}}):null});Ze.displayName=ye;var Je=c.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,i=Y("SelectScrollButton",t),s=c.useRef(null),l=ue(t),a=c.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return c.useEffect(()=>()=>a(),[a]),$(()=>{l().find(h=>h.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[l]),d.jsx(j.div,{"aria-hidden":!0,...n,ref:e,style:{flexShrink:0,...n.style},onPointerDown:_(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:_(n.onPointerMove,()=>{i.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:_(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var be="SelectArrow",Ft=c.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),i=G(be,t),s=Y(be,t);return i.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ft.displayName=be;var Ut="SelectBubbleInput",Qe=c.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=c.useRef(null),i=L(o,n),s=it(e);return c.useEffect(()=>{const l=n.current;if(!l)return;const a=window.HTMLSelectElement.prototype,h=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&h){const g=new Event("change",{bubbles:!0});h.call(l,e),l.dispatchEvent(g)}},[s,e]),d.jsx(j.select,{...t,style:{...St,...t.style},ref:i,defaultValue:e})});Qe.displayName=Ut;function et(r){return r===""||r===void 0}function tt(r){const e=ct(r),t=c.useRef(""),o=c.useRef(0),n=c.useCallback(s=>{const l=t.current+s;e(l),(function a(u){t.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>a(""),1e3))})(l)},[e]),i=c.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,i]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=t?r.indexOf(t):-1;let s=Wt(r,Math.max(i,0));n.length===1&&(s=s.filter(u=>u!==t));const a=s.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return a!==t?a:void 0}function Wt(r,e){return r.map((t,o)=>r[(e+o)%r.length])}var Kt=je,$t=Ae,Gt=De,Yt=Le,qt=ke,Xt=Be,Zt=Fe,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function po(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Kt,{"data-slot":"select",...t}),e[2]=t,e[3]=o):o=e[3],o}function fo(r){const e=ee.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let o;return e[2]!==t?(o=d.jsx(Gt,{"data-slot":"select-value",...t}),e[2]=t,e[3]=o):o=e[3],o}function mo(r){const e=ee.c(13);let t,o,n,i;e[0]!==r?({className:o,size:i,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?"default":i;let l;e[5]!==o?(l=oe("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-10 data-[size=sm]:h-7 data-[size=xs]:h-7 data-[size=xs]:px-2.5 data-[size=xs]:py-1.5 data-[size=xs]:rounded-lg *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=d.jsx(Yt,{asChild:!0,children:d.jsx(Re,{className:"size-4 opacity-50"})}),e[7]=a):a=e[7];let u;return e[8]!==t||e[9]!==n||e[10]!==s||e[11]!==l?(u=d.jsxs($t,{"data-slot":"select-trigger","data-size":s,className:l,...n,children:[t,a]}),e[8]=t,e[9]=n,e[10]=s,e[11]=l,e[12]=u):u=e[12],u}function ho(r){const e=ee.c(25);let t,o,n,i,s;e[0]!==r?({className:o,children:t,position:i,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i,e[5]=s):(t=e[1],o=e[2],n=e[3],i=e[4],s=e[5]);const l=i===void 0?"popper":i,a=s===void 0?!1:s,u=l==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";let h;e[6]!==o||e[7]!==u?(h=oe("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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg border shadow-md",u,o),e[6]=o,e[7]=u,e[8]=h):h=e[8];let g;e[9]!==a?(g=!a&&d.jsx(no,{}),e[9]=a,e[10]=g):g=e[10];const I=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==I?(w=oe("p-1",I),e[11]=I,e[12]=w):w=e[12];let S;e[13]!==t||e[14]!==w?(S=d.jsx(Zt,{className:w,children:t}),e[13]=t,e[14]=w,e[15]=S):S=e[15];let p;e[16]!==a?(p=!a&&d.jsx(ro,{}),e[16]=a,e[17]=p):p=e[17];let v;return e[18]!==l||e[19]!==n||e[20]!==h||e[21]!==g||e[22]!==S||e[23]!==p?(v=d.jsx(qt,{children:d.jsxs(Xt,{"data-slot":"select-content",className:h,position:l,...n,children:[g,S,p]})}),e[18]=l,e[19]=n,e[20]=h,e[21]=g,e[22]=S,e[23]=p,e[24]=v):v=e[24],v}function vo(r){const e=ee.c(16);let t,o,n,i;e[0]!==r?({className:o,children:t,hideCheck:i,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=i):(t=e[1],o=e[2],n=e[3],i=e[4]);const s=i===void 0?!1:i;let l;e[5]!==o?(l=oe("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",o),e[5]=o,e[6]=l):l=e[6];let a;e[7]!==s?(a=!s&&d.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:d.jsx(eo,{children:d.jsx(wt,{className:"size-4"})})}),e[7]=s,e[8]=a):a=e[8];let u;e[9]!==t?(u=d.jsx(Qt,{children:t}),e[9]=t,e[10]=u):u=e[10];let h;return e[11]!==n||e[12]!==l||e[13]!==a||e[14]!==u?(h=d.jsxs(Jt,{"data-slot":"select-item",className:l,...n,children:[a,u]}),e[11]=n,e[12]=l,e[13]=a,e[14]=u,e[15]=h):h=e[15],h}function no(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Ct,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(to,{"data-slot":"select-scroll-up-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}function ro(r){const e=ee.c(9);let t,o;e[0]!==r?({className:t,...o}=r,e[0]=r,e[1]=t,e[2]=o):(t=e[1],o=e[2]);let n;e[3]!==t?(n=oe("flex cursor-default items-center justify-center py-1",t),e[3]=t,e[4]=n):n=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=d.jsx(Re,{className:"size-4"}),e[5]=i):i=e[5];let s;return e[6]!==o||e[7]!==n?(s=d.jsx(oo,{"data-slot":"select-scroll-down-button",className:n,...o,children:i}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{po as S,mo as a,fo as b,ho as c,vo as d};
@@ -1 +1 @@
1
- import{c as B,r as L,D as F,j as t,B as H}from"./index-DLW7tZdu.js";import{A as U,t as K}from"./integration-icon-C-I4Z6Dk.js";import{I as W}from"./input-DgJ0xjPE.js";import{a as q,b as J,P as Q}from"./popover-DnM-fBUa.js";import{u as X,b as Y,a as Z,c as ee,T as te}from"./tooltip-D-QYbPJS.js";import{i as G}from"./constants-Dzy_AMuL.js";import{b as se}from"./use-virtual-mcp-BEia5q72.js";import{i as ie}from"./Check-BXqqUm0J.js";import{i as le}from"./SearchMd-C_bEWIlQ.js";import{u as oe}from"./use-create-virtual-mcp-pWj6n63S.js";function ne(m){const e=B.c(21),{virtualMcp:s,isSelected:d}=m,p=d&&"bg-accent";let f;e[0]!==p?(f=F("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",p),e[0]=p,e[1]=f):f=e[1];let o;e[2]!==s.icon||e[3]!==s.title?(o=t.jsx(U,{icon:s.icon,name:s.title,size:"sm"}),e[2]=s.icon,e[3]=s.title,e[4]=o):o=e[4];let u;e[5]!==s.title?(u=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[5]=s.title,e[6]=u):u=e[6];let x;e[7]!==d?(x=d&&t.jsx(ie,{size:16,className:"text-foreground shrink-0"}),e[7]=d,e[8]=x):x=e[8];let n;e[9]!==u||e[10]!==x?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[u,x]}),e[9]=u,e[10]=x,e[11]=n):n=e[11];let a;e[12]!==s.description?(a=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:s.description}),e[12]=s.description,e[13]=a):a=e[13];let l;e[14]!==n||e[15]!==a?(l=t.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[n,a]}),e[14]=n,e[15]=a,e[16]=l):l=e[16];let i;return e[17]!==f||e[18]!==o||e[19]!==l?(i=t.jsxs("div",{className:f,children:[o,l]}),e[17]=f,e[18]=o,e[19]=l,e[20]=i):i=e[20],i}function re(m){const e=B.c(33),{virtualMcps:s,selectedVirtualMcpId:d,onVirtualMcpChange:p,searchInputRef:f}=m,[o,u]=L.useState(""),x=L.useRef(null),n=f??x;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={navigateOnCreate:!0},e[0]=a):a=e[0];const{createVirtualMCP:l,isCreating:i}=oe(a);let b,C,k,c;if(e[1]!==l||e[2]!==n||e[3]!==i||e[4]!==p||e[5]!==o||e[6]!==d||e[7]!==s){let V;e:{const r=s.filter(ae);if(!o.trim()){V=r;break e}const v=o.toLowerCase();V=r.filter(z=>z.title.toLowerCase().includes(v)||z.description?.toLowerCase().includes(v))}const g=V;let y;e[12]!==p?(y=r=>{p(r),u("")},e[12]=p,e[13]=y):y=e[13];const T=y;k="flex flex-col max-h-[min(400px,60dvh)]";let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(le,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=N):N=e[14];let M;e[15]===Symbol.for("react.memo_cache_sentinel")?(M=r=>u(r.target.value),e[15]=M):M=e[15];let P;e[16]!==n||e[17]!==o?(P=t.jsx(W,{ref:n,type:"text",placeholder:"Search for an agent...",value:o,onChange:M,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=n,e[17]=o,e[18]=P):P=e[18];const S=i?"Creating...":"Create Agent";let j;e[19]!==l||e[20]!==i||e[21]!==S?(j=t.jsx(H,{onClick:l,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:i,children:S}),e[19]=l,e[20]=i,e[21]=S,e[22]=j):j=e[22],e[23]!==P||e[24]!==j?(c=t.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:t.jsxs("div",{className:"relative flex items-center gap-2",children:[N,P,j]})}),e[23]=P,e[24]=j,e[25]=c):c=e[25],b="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",C=g.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:g.map(r=>t.jsx("div",{role:"button",tabIndex:0,onClick:()=>T(r.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),T(r.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:t.jsx(ne,{virtualMcp:r,isSelected:r.id===d})},r.id))}):t.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=l,e[2]=n,e[3]=i,e[4]=p,e[5]=o,e[6]=d,e[7]=s,e[8]=b,e[9]=C,e[10]=k,e[11]=c}else b=e[8],C=e[9],k=e[10],c=e[11];let h;e[26]!==b||e[27]!==C?(h=t.jsx("div",{className:b,children:C}),e[26]=b,e[27]=C,e[28]=h):h=e[28];let w;return e[29]!==k||e[30]!==c||e[31]!==h?(w=t.jsxs("div",{className:k,children:[c,h]}),e[29]=k,e[30]=c,e[31]=h,e[32]=w):w=e[32],w}function ae(m){return!m.id||!G(m.id)}function be(m){const e=B.c(38),{selectedVirtualMcpId:s,onVirtualMcpChange:d,virtualMcps:p,className:f,placeholder:o,showTooltip:u,disabled:x}=m,n=o===void 0?"Select Agent":o,a=u===void 0?!0:u,l=x===void 0?!1:x,[i,b]=L.useState(!1),C=L.useRef(null),k=se(),c=p??k;let h;e[0]!==c?(h=c.filter(ce),e[0]=c,e[1]=h):h=e[1];const w=h;let V;e[2]!==c||e[3]!==s?(V=s?c.find($=>$.id===s):null,e[2]=c,e[3]=s,e[4]=V):V=e[4];const g=V;let y;e[5]!==d?(y=$=>{d($),b(!1)},e[5]=d,e[6]=y):y=e[6];const T=y,N=X();let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=$=>{b($)},e[7]=M):M=e[7];const P=M;let S,j;e[8]!==N||e[9]!==i?(S=()=>{i&&!N&&setTimeout(()=>{C.current?.focus()},0)},j=[i,N],e[8]=N,e[9]=i,e[10]=S,e[11]=j):(S=e[10],j=e[11]),L.useEffect(S,j);const r=l?!1:i,v=l?void 0:P,z=l?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let I;e[12]!==f||e[13]!==z?(I=F("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",z,f),e[12]=f,e[13]=z,e[14]=I):I=e[14];let R;e[15]!==g?(R=g?t.jsx(U,{icon:g.icon,name:g.title,size:"sm",className:"absolute inset-0 size-full"}):t.jsxs(t.Fragment,{children:[t.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(K,{size:16})]}),e[15]=g,e[16]=R):R=e[16];let D;e[17]!==l||e[18]!==n||e[19]!==I||e[20]!==R?(D=t.jsx(Z,{asChild:!0,children:t.jsx(q,{asChild:!0,children:t.jsx("button",{type:"button",disabled:l,className:I,"aria-label":n,children:R})})}),e[17]=l,e[18]=n,e[19]=I,e[20]=R,e[21]=D):D=e[21];let O;e[22]!==i||e[23]!==g?.title||e[24]!==a?(O=a&&!i&&t.jsx(Y,{side:"top",className:"text-xs",children:g?.title??"Choose an agent to chat with"}),e[22]=i,e[23]=g?.title,e[24]=a,e[25]=O):O=e[25];let A;e[26]!==D||e[27]!==O?(A=t.jsx(ee,{children:t.jsxs(te,{children:[D,O]})}),e[26]=D,e[27]=O,e[28]=A):A=e[28];let E;e[29]!==T||e[30]!==s||e[31]!==w?(E=t.jsx(J,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:t.jsx(re,{virtualMcps:w,selectedVirtualMcpId:s,onVirtualMcpChange:T,searchInputRef:C})}),e[29]=T,e[30]=s,e[31]=w,e[32]=E):E=e[32];let _;return e[33]!==r||e[34]!==v||e[35]!==A||e[36]!==E?(_=t.jsxs(Q,{open:r,onOpenChange:v,children:[A,E]}),e[33]=r,e[34]=v,e[35]=A,e[36]=E,e[37]=_):_=e[37],_}function ce(m){return!m.id||!G(m.id)}export{re as V,be as a};
1
+ import{c as B,r as L,D as F,j as t,B as H}from"./index-BRbdC8tb.js";import{A as U,t as K}from"./integration-icon-BxAcqR_W.js";import{I as W}from"./input-BOjviNKP.js";import{a as q,b as J,P as Q}from"./popover-DWheVeA1.js";import{u as X,b as Y,a as Z,c as ee,T as te}from"./tooltip-xl3GoSVP.js";import{i as G}from"./constants-2OCwh60p.js";import{b as se}from"./use-virtual-mcp-DxTKYWLn.js";import{i as ie}from"./Check-5J8pLufa.js";import{i as le}from"./SearchMd-BvvZzTkV.js";import{u as oe}from"./use-create-virtual-mcp-CdSUPhk5.js";function ne(m){const e=B.c(21),{virtualMcp:s,isSelected:d}=m,p=d&&"bg-accent";let f;e[0]!==p?(f=F("flex items-start gap-3 py-3 px-3 hover:bg-accent cursor-pointer rounded-xl transition-colors",p),e[0]=p,e[1]=f):f=e[1];let o;e[2]!==s.icon||e[3]!==s.title?(o=t.jsx(U,{icon:s.icon,name:s.title,size:"sm"}),e[2]=s.icon,e[3]=s.title,e[4]=o):o=e[4];let u;e[5]!==s.title?(u=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[5]=s.title,e[6]=u):u=e[6];let x;e[7]!==d?(x=d&&t.jsx(ie,{size:16,className:"text-foreground shrink-0"}),e[7]=d,e[8]=x):x=e[8];let n;e[9]!==u||e[10]!==x?(n=t.jsxs("div",{className:"flex items-center justify-between",children:[u,x]}),e[9]=u,e[10]=x,e[11]=n):n=e[11];let a;e[12]!==s.description?(a=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1 leading-relaxed",children:s.description}),e[12]=s.description,e[13]=a):a=e[13];let l;e[14]!==n||e[15]!==a?(l=t.jsxs("div",{className:"flex flex-col flex-1 min-w-0 gap-0.5",children:[n,a]}),e[14]=n,e[15]=a,e[16]=l):l=e[16];let i;return e[17]!==f||e[18]!==o||e[19]!==l?(i=t.jsxs("div",{className:f,children:[o,l]}),e[17]=f,e[18]=o,e[19]=l,e[20]=i):i=e[20],i}function re(m){const e=B.c(33),{virtualMcps:s,selectedVirtualMcpId:d,onVirtualMcpChange:p,searchInputRef:f}=m,[o,u]=L.useState(""),x=L.useRef(null),n=f??x;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={navigateOnCreate:!0},e[0]=a):a=e[0];const{createVirtualMCP:l,isCreating:i}=oe(a);let b,C,k,c;if(e[1]!==l||e[2]!==n||e[3]!==i||e[4]!==p||e[5]!==o||e[6]!==d||e[7]!==s){let V;e:{const r=s.filter(ae);if(!o.trim()){V=r;break e}const v=o.toLowerCase();V=r.filter(z=>z.title.toLowerCase().includes(v)||z.description?.toLowerCase().includes(v))}const g=V;let y;e[12]!==p?(y=r=>{p(r),u("")},e[12]=p,e[13]=y):y=e[13];const T=y;k="flex flex-col max-h-[min(400px,60dvh)]";let N;e[14]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx(le,{size:16,className:"text-muted-foreground pointer-events-none shrink-0"}),e[14]=N):N=e[14];let M;e[15]===Symbol.for("react.memo_cache_sentinel")?(M=r=>u(r.target.value),e[15]=M):M=e[15];let P;e[16]!==n||e[17]!==o?(P=t.jsx(W,{ref:n,type:"text",placeholder:"Search for an agent...",value:o,onChange:M,className:"flex-1 h-8 text-sm border-0 focus-visible:ring-0 focus-visible:ring-offset-0 shadow-none p-0"}),e[16]=n,e[17]=o,e[18]=P):P=e[18];const S=i?"Creating...":"Create Agent";let j;e[19]!==l||e[20]!==i||e[21]!==S?(j=t.jsx(H,{onClick:l,variant:"outline",size:"sm",className:"h-8 px-3 rounded-lg text-sm font-medium shrink-0",disabled:i,children:S}),e[19]=l,e[20]=i,e[21]=S,e[22]=j):j=e[22],e[23]!==P||e[24]!==j?(c=t.jsx("div",{className:"border-b px-4 py-3 bg-background/95 backdrop-blur sticky top-0 z-10",children:t.jsxs("div",{className:"relative flex items-center gap-2",children:[N,P,j]})}),e[23]=P,e[24]=j,e[25]=c):c=e[25],b="overflow-y-auto p-1.5 flex-1 min-h-0 [touch-action:pan-y]",C=g.length>0?t.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-0.5",children:g.map(r=>t.jsx("div",{role:"button",tabIndex:0,onClick:()=>T(r.id),onKeyDown:v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),T(r.id))},className:"outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-xl",children:t.jsx(ne,{virtualMcp:r,isSelected:r.id===d})},r.id))}):t.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No agents found"}),e[1]=l,e[2]=n,e[3]=i,e[4]=p,e[5]=o,e[6]=d,e[7]=s,e[8]=b,e[9]=C,e[10]=k,e[11]=c}else b=e[8],C=e[9],k=e[10],c=e[11];let h;e[26]!==b||e[27]!==C?(h=t.jsx("div",{className:b,children:C}),e[26]=b,e[27]=C,e[28]=h):h=e[28];let w;return e[29]!==k||e[30]!==c||e[31]!==h?(w=t.jsxs("div",{className:k,children:[c,h]}),e[29]=k,e[30]=c,e[31]=h,e[32]=w):w=e[32],w}function ae(m){return!m.id||!G(m.id)}function be(m){const e=B.c(38),{selectedVirtualMcpId:s,onVirtualMcpChange:d,virtualMcps:p,className:f,placeholder:o,showTooltip:u,disabled:x}=m,n=o===void 0?"Select Agent":o,a=u===void 0?!0:u,l=x===void 0?!1:x,[i,b]=L.useState(!1),C=L.useRef(null),k=se(),c=p??k;let h;e[0]!==c?(h=c.filter(ce),e[0]=c,e[1]=h):h=e[1];const w=h;let V;e[2]!==c||e[3]!==s?(V=s?c.find($=>$.id===s):null,e[2]=c,e[3]=s,e[4]=V):V=e[4];const g=V;let y;e[5]!==d?(y=$=>{d($),b(!1)},e[5]=d,e[6]=y):y=e[6];const T=y,N=X();let M;e[7]===Symbol.for("react.memo_cache_sentinel")?(M=$=>{b($)},e[7]=M):M=e[7];const P=M;let S,j;e[8]!==N||e[9]!==i?(S=()=>{i&&!N&&setTimeout(()=>{C.current?.focus()},0)},j=[i,N],e[8]=N,e[9]=i,e[10]=S,e[11]=j):(S=e[10],j=e[11]),L.useEffect(S,j);const r=l?!1:i,v=l?void 0:P,z=l?"cursor-not-allowed opacity-50":"cursor-pointer hover:text-muted-foreground";let I;e[12]!==f||e[13]!==z?(I=F("relative flex items-center justify-center size-8 rounded-lg text-muted-foreground/75 transition-colors shrink-0",z,f),e[12]=f,e[13]=z,e[14]=I):I=e[14];let R;e[15]!==g?(R=g?t.jsx(U,{icon:g.icon,name:g.title,size:"sm",className:"absolute inset-0 size-full"}):t.jsxs(t.Fragment,{children:[t.jsxs("svg",{className:"absolute inset-0 size-full",fill:"none",children:[t.jsx("defs",{children:t.jsxs("linearGradient",{id:"agent-border-gradient",gradientUnits:"userSpaceOnUse",x1:"0",y1:"0",x2:"32",y2:"32",children:[t.jsx("animateTransform",{attributeName:"gradientTransform",type:"rotate",from:"0 16 16",to:"360 16 16",dur:"6s",repeatCount:"indefinite"}),t.jsx("stop",{offset:"0%",stopColor:"var(--chart-1)"}),t.jsx("stop",{offset:"100%",stopColor:"var(--chart-4)"})]})}),t.jsx("rect",{x:"0.5",y:"0.5",width:"31",height:"31",rx:"7.5",stroke:"url(#agent-border-gradient)",strokeWidth:"1",strokeDasharray:"3 3"})]}),t.jsx(K,{size:16})]}),e[15]=g,e[16]=R):R=e[16];let D;e[17]!==l||e[18]!==n||e[19]!==I||e[20]!==R?(D=t.jsx(Z,{asChild:!0,children:t.jsx(q,{asChild:!0,children:t.jsx("button",{type:"button",disabled:l,className:I,"aria-label":n,children:R})})}),e[17]=l,e[18]=n,e[19]=I,e[20]=R,e[21]=D):D=e[21];let O;e[22]!==i||e[23]!==g?.title||e[24]!==a?(O=a&&!i&&t.jsx(Y,{side:"top",className:"text-xs",children:g?.title??"Choose an agent to chat with"}),e[22]=i,e[23]=g?.title,e[24]=a,e[25]=O):O=e[25];let A;e[26]!==D||e[27]!==O?(A=t.jsx(ee,{children:t.jsxs(te,{children:[D,O]})}),e[26]=D,e[27]=O,e[28]=A):A=e[28];let E;e[29]!==T||e[30]!==s||e[31]!==w?(E=t.jsx(J,{className:"w-[min(550px,calc(100vw-2rem))] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,collisionPadding:16,children:t.jsx(re,{virtualMcps:w,selectedVirtualMcpId:s,onVirtualMcpChange:T,searchInputRef:C})}),e[29]=T,e[30]=s,e[31]=w,e[32]=E):E=e[32];let _;return e[33]!==r||e[34]!==v||e[35]!==A||e[36]!==E?(_=t.jsxs(Q,{open:r,onOpenChange:v,children:[A,E]}),e[33]=r,e[34]=v,e[35]=A,e[36]=E,e[37]=_):_=e[37],_}function ce(m){return!m.id||!G(m.id)}export{re as V,be as a};
@@ -1,3 +1,3 @@
1
- import{c as I,j as s,E as Re,r as M,u as Ne,D as L,e as Le,aN as Ue,L as Ae,c6 as ft,bl as pt,O as Y,aM as xt,g as Qe,f as xe,v as pe,c7 as ht,bO as gt,w as jt,B as Oe,A as bt,S as Ye,k as Nt,m as yt,N as vt,x as St,z as Pe,K as kt,aO as Je,P as Ct}from"./index-DLW7tZdu.js";import{C as Z,c as _t,i as wt}from"./task-status-hmfgdVgC.js";import{I as $t,t as Fe,n as Te,T as zt,U as It,K as Ge,N as Pt,V as At,q as Be,W as Ot}from"./integration-icon-C-I4Z6Dk.js";import{a as Xe,P as me,i as De,f as He,g as ue,h as ce,j as ke,k as Ce,l as _e,m as Tt,n as Dt,o as Et,p as Ze,q as Mt,u as We,r as Rt,s as Lt,t as Ut,v as Ft}from"./index-75eZ1uI1.js";import{d as Ht,a as Wt,u as Kt}from"./constants-Dzy_AMuL.js";import{n as Gt}from"./Type01-CjsMMlh6.js";import{i as Bt}from"./Loading01-DCKwAh-U.js";import{s as ve}from"./Plus-BW2fNoEy.js";import{i as qe}from"./X-BL1q6dsE.js";import{E as qt,C as Vt}from"./editable-task-title-DBtH_3H-.js";import{T as Qt}from"./tasks-panel-BKxSsDFe.js";import{a as Yt,b as Jt}from"./ai-providers-logos-BbTN2hb6.js";import{a as Xt}from"./context-BL_7JbXZ.js";import{C as et}from"./create-project-dialog-BRQDkCBr.js";import{a as Zt,b as es,c as ts,D as ss}from"./dialog-Dmm_af5q.js";import{n as ns}from"./Container-BZeblIrR.js";import{e as is}from"./Dataflow03-CTwEKVcs.js";import{b as rs}from"./List-Bq1Yvo6z.js";import{a as os}from"./RefreshCcw01-YXuL16Jx.js";import{t as Ie}from"./Settings01-BoOhxJJj.js";import{u as ls,a as tt}from"./org-ai-providers-DQw8Ry8m.js";import{u as st,a as nt}from"./use-project-DVq_144v.js";import{S as ee}from"./skeleton-BwiQLrEa.js";import{n as ge,f as as}from"./XCircle-DxcmI8rf.js";import{t as it}from"./ChevronDown-B6V9GzuP.js";import{A as je}from"./avatar-87qJKKK_.js";import{c as q,i as Se,e as cs,d as ds,f as ms,b as rt,D as ot,a as lt}from"./dropdown-menu-BtgYu0Kc.js";import{i as be}from"./Check-BXqqUm0J.js";import{C as us}from"./create-organization-dialog-Cycga0XC.js";import{u as Ke}from"./tooltip-D-QYbPJS.js";import{c as fs}from"./Play-Bw_aeuhq.js";import{c as ps}from"./VideoRecorder-DkcbdsZk.js";import{b as xs,a as hs,P as gs}from"./popover-DnM-fBUa.js";import{s as js}from"./XClose-CslgPORS.js";import{b as bs}from"./use-mcp-tools-KIPxuDyk.js";import{C as Ns,a as ys,b as vs}from"./collapsible-BaB71DBr.js";import{i as Ss}from"./ChevronRight-BSFLHUtv.js";import{D as ks,a as Cs}from"./drawer-SktUP7-X.js";import{a as _s,R as at,b as ws}from"./resizable-CAbzuUb1.js";import"./spinner-D4Lh5lMu.js";import"./use-mcp-prompts-BmK_9UQh.js";import"./useQuery-YHvrmKkI.js";import"./form-Obbe7UIk.js";import"./label-BL4fRnZZ.js";import"./input-DgJ0xjPE.js";import"./index-C0Ne6xGI.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-FfROzAyV.js";import"./AlertCircle-BO0kzcBv.js";import"./select-DeOQOwBi.js";import"./index-BdQq_4o_.js";import"./index-CQPlxt4u.js";import"./ChevronUp-BYpnL-9F.js";import"./ArrowLeft-CrI91Scn.js";import"./use-copy-CkgWv__W.js";import"./marked.esm-BaswSlok.js";import"./tabs-zzjdf6a0.js";import"./checkbox-RHvkU3ym.js";import"./SearchMd-C_bEWIlQ.js";import"./select-virtual-mcp-B78FWMF5.js";import"./use-virtual-mcp-BEia5q72.js";import"./use-collections-BJxMmWLX.js";import"./useMutation-BatnVMWS.js";import"./use-create-virtual-mcp-pWj6n63S.js";import"./use-mcp-resources-DQ2GW_FE.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-DzztYEVX.js";import"./types-vQT8OD6B.js";import"./Trash01-D9O3UWX6.js";import"./useSuspenseInfiniteQuery-Cv31oWYI.js";import"./infiniteQueryObserver-BdQSrFrR.js";import"./Download01-D7T-WxGL.js";import"./FolderClosed-BPzjOG-5.js";import"./Grid01-Bwsn0nh2.js";import"./Upload01-Bpjo_QI4.js";import"./User01-BRC1qZ-u.js";import"./Zap-DERWnfoj.js";import"./collection-search-DcVVKJ8Q.js";import"./user-Aw6SqZpK.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./empty-state-Cx44yC3Y.js";import"./decopilot-events-Brt4gAR6.js";import"./index-CdK7iTUb.js";import"./textarea-CJ-1DHFH.js";import"./card-CUrYBr2J.js";import"./toggle-group-DaaATQ-5.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./alert-dialog-yWVMNVBj.js";import"./index-B1ylaSc7.js";function $s(){const t=I.c(70),{org:e}=Ne(),[,n]=Xe(),r=Yt(),{selectedVirtualMcp:o,isChatEmpty:l,activeTaskId:i,createTask:a,switchToTask:c,tasks:m}=Xt();let d;if(t[0]!==i||t[1]!==m){let B;t[3]!==i?(B=ne=>ne.id===i,t[3]=i,t[4]=B):B=t[4],d=m.find(B),t[0]=i,t[1]=m,t[2]=d}else d=t[2];const u=d,[f,p]=M.useState("chat"),[h,N]=M.useTransition();let j;t[5]!==e.id?(j=Ht(e.id),t[5]=e.id,t[6]=j):j=t[6];const y=o??j;let x;t[7]!==a?(x=()=>{N(()=>{a()})},t[7]=a,t[8]=x):x=t[8];const k=x;if(r?.providers?.length===0){let B;t[9]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(me.Header.Left,{className:"gap-2"}),t[9]=B):B=t[9];let ne;t[10]!==n?(ne=()=>n(!1),t[10]=n,t[11]=ne):ne=t[11];let he;t[12]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=he):he=t[12];let ae;t[13]!==ne?(ae=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[B,s.jsx(me.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:ne,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:he})})]}),t[13]=ne,t[14]=ae):ae=t[14];let ye;t[15]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Z.Main,{className:"flex flex-col items-center",children:s.jsx(Z.EmptyState,{children:s.jsx(Z.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features."})})}),t[15]=ye):ye=t[15];let de;return t[16]!==ae?(de=s.jsxs(Z,{className:"animate-in fade-in-0 duration-200",children:[ae,ye]}),t[16]=ae,t[17]=de):de=t[17],de}const $=f!=="chat"||h?"opacity-0 pointer-events-none":"opacity-100";let S;t[18]!==$?(S=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",$),t[18]=$,t[19]=S):S=t[19];let _;t[20]!==u||t[21]!==l?(_=!l&&u?.title&&s.jsx(qt,{taskId:u.id,text:u.title,className:"text-sm font-medium text-foreground"}),t[20]=u,t[21]=l,t[22]=_):_=t[22];let C;t[23]!==_?(C=s.jsx(me.Header.Left,{className:"gap-2",children:_}),t[23]=_,t[24]=C):C=t[24];let U;t[25]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[25]=U):U=t[25];let w;t[26]!==k||t[27]!==h?(w=s.jsx("button",{type:"button",onClick:k,disabled:h,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:U}),t[26]=k,t[27]=h,t[28]=w):w=t[28];let F;t[29]===Symbol.for("react.memo_cache_sentinel")?(F=()=>p("tasks"),t[29]=F):F=t[29];let T;t[30]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("button",{type:"button",onClick:F,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent group cursor-pointer",title:"Tasks",children:s.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[30]=T):T=t[30];let K;t[31]!==n?(K=()=>n(!1),t[31]=n,t[32]=K):K=t[32];let R;t[33]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[33]=R):R=t[33];let D;t[34]!==K?(D=s.jsx("button",{type:"button",onClick:K,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:R}),t[34]=K,t[35]=D):D=t[35];let A;t[36]!==D||t[37]!==w?(A=s.jsxs(me.Header.Right,{className:"gap-1",children:[w,T,D]}),t[36]=D,t[37]=w,t[38]=A):A=t[38];let O;t[39]!==A||t[40]!==C?(O=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[C,A]}),t[39]=A,t[40]=C,t[41]=O):O=t[41];let z;t[42]!==y||t[43]!==l?(z=s.jsx(Z.Main,{children:l?s.jsx(Z.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-3 md:gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 md:gap-4 p-0 text-center",children:[s.jsx($t,{icon:y.icon,name:y.title,size:"lg",fallbackIcon:s.jsx(Fe,{size:32}),className:"size-10 min-w-10 md:size-[60px]! md:min-w-[60px] rounded-xl md:rounded-[18px]!"}),s.jsx("h3",{className:"text-base md:text-xl font-medium text-foreground",children:y.title}),s.jsx("div",{className:"text-muted-foreground text-center text-xs md:text-sm max-w-md line-clamp-2",children:y.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(Z.IceBreakers,{})]})}):s.jsx(Z.Messages,{})}),t[42]=y,t[43]=l,t[44]=z):z=t[44];let P;t[45]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Z.Footer,{children:s.jsx(Z.Input,{onOpenContextPanel:()=>p("context")})}),t[45]=P):P=t[45];let E;t[46]!==O||t[47]!==z||t[48]!==S?(E=s.jsxs("div",{className:S,children:[O,z,P]}),t[46]=O,t[47]=z,t[48]=S,t[49]=E):E=t[49];const W=f==="tasks"?"opacity-100":"opacity-0 pointer-events-none";let te;t[50]!==W?(te=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",W),t[50]=W,t[51]=te):te=t[51];let re;t[52]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(me.Header.Left,{className:"gap-2",children:s.jsx("span",{className:"text-sm font-normal text-foreground",children:"Tasks"})}),t[52]=re):re=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>p("chat"),t[53]=oe):oe=t[53];let se;t[54]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[re,s.jsx(me.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:oe,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Back to chat",children:s.jsx(Gt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),t[54]=se):se=t[54];let J;t[55]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Bt,{size:16,className:"animate-spin text-muted-foreground"})}),t[55]=J):J=t[55];let H;t[56]!==c?(H=s.jsx(Re,{fallback:zs,children:s.jsx(M.Suspense,{fallback:J,children:s.jsx(Qt,{onTaskSelect:async B=>{await c(B),p("chat")}})})}),t[56]=c,t[57]=H):H=t[57];let G;t[58]!==te||t[59]!==H?(G=s.jsxs("div",{className:te,children:[se,H]}),t[58]=te,t[59]=H,t[60]=G):G=t[60];const ie=f==="context"?"opacity-100":"opacity-0 pointer-events-none";let V;t[61]!==ie?(V=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",ie),t[61]=ie,t[62]=V):V=t[62];let b;t[63]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Vt,{back:!0,onClose:()=>p("chat")}),t[63]=b):b=t[63];let Q;t[64]!==V?(Q=s.jsx("div",{className:V,children:b}),t[64]=V,t[65]=Q):Q=t[65];let le;return t[66]!==E||t[67]!==G||t[68]!==Q?(le=s.jsxs(Z,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[E,G,Q]}),t[66]=E,t[67]=G,t[68]=Q,t[69]=le):le=t[69],le}function zs(){return s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Unable to load tasks"})})}function Ve(){const t=I.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{fallback:e,children:s.jsx(M.Suspense,{fallback:s.jsx(Z.Skeleton,{}),children:s.jsx($s,{})})}),t[1]=n):n=t[1],n}function Is(t){const e=I.c(5),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(es,{children:s.jsx(ts,{children:"Keyboard Shortcuts"})}),e[0]=o):o=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(Zt,{className:"sm:max-w-md",children:[o,s.jsx("div",{className:"flex flex-col gap-4",children:_t.map(Ps)})]}),e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==n?(i=s.jsx(ss,{open:n,onOpenChange:r,children:l}),e[2]=r,e[3]=n,e[4]=i):i=e[4],i}function Ps(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(As)})]},t.label)}function As(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Os)})]},t.description)}function Os(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Ts(){const t=I.c(60),{locator:e,org:n}=Ne(),r=Le(),o=Ue(),[l]=ls(),{org:i,project:a}=Ae.parse(e),c=Ae.isOrgAdminProject(e),{data:m}=st(n.id,a);let d;t[0]!==m?.enabledPlugins?(d=m?.enabledPlugins??[],t[0]=m?.enabledPlugins,t[1]=d):d=t[1];const u=d,f=m?.ui?.pinnedViews??[];let p;t[2]!==u?(p=g=>u.includes(g.pluginId),t[2]=u,t[3]=p):p=t[3];const h=ft.filter(p),N=o.location.pathname,j=`/${i}/${a}`,v=N===j||N===`${j}/`;let y;t[4]!==j||t[5]!==N?(y=g=>N.startsWith(`${j}/${g}`),t[4]=j,t[5]=N,t[6]=y):y=t[6];const x=y;let k;t[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(rs,{}),t[7]=k):k=t[7];const $={key:"home",label:"Home",icon:k,isActive:v,onClick:()=>{v?window.dispatchEvent(new CustomEvent("reset-home-view")):r({to:"/$org/$project",params:{org:i,project:a}})}};let S;t[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Te,{}),t[8]=S):S=t[8];const _={key:"tasks",label:"Tasks",icon:S,isActive:x("tasks"),onClick:()=>r({to:"/$org/$project/tasks",params:{org:i,project:Y}})};let C;t[9]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ns,{}),t[9]=C):C=t[9];const U={key:"mcps",label:"Connections",icon:C,isActive:x("mcps"),onClick:()=>r({to:"/$org/$project/mcps",params:{org:i,project:Y}})};let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(xt,{}),t[10]=w):w=t[10];const F={key:"projects",label:"Projects",icon:w,isActive:x("projects"),onClick:()=>r({to:"/$org/$project/projects",params:{org:i,project:Y}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Fe,{}),t[11]=T):T=t[11];const K={key:"agents",label:"Agents",icon:T,isActive:x("agents"),onClick:()=>r({to:"/$org/$project/agents",params:{org:i,project:Y}})};let R;t[12]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(os,{}),t[12]=R):R=t[12];const D={key:"automations",label:"Automations",icon:R,isActive:x("automations"),onClick:()=>r({to:"/$org/$project/automations",params:{org:i,project:Y}})};let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(zt,{}),t[13]=A):A=t[13];const O={key:"monitoring",label:"Monitor",icon:A,isActive:x("monitoring"),onClick:()=>r({to:"/$org/$project/monitoring",params:{org:i,project:Y}})},z=h.map(g=>({key:g.pluginId,label:g.label,icon:g.icon,isActive:x(g.pluginId),onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:g.pluginId}})}));let P;t[14]!==u?(P=g=>u.includes(g.pluginId),t[14]=u,t[15]=P):P=t[15];const W=pt.filter(P).map(g=>({type:"group",group:{id:`${g.pluginId}-${g.id}`,label:g.label,items:g.items.map((X,fe)=>({key:`${g.pluginId}-${g.id}-${fe}`,label:X.label,icon:X.icon,isActive:x(g.pluginId),onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:g.pluginId}})})),defaultExpanded:g.defaultExpanded??!0}})),te=f.map(g=>({key:`app-${g.connectionId}-${g.toolName}`,label:g.label||g.toolName,icon:g.icon?s.jsx("img",{src:g.icon,alt:"",className:"size-4 rounded"}):s.jsx(De,{}),isActive:x(`apps/${g.connectionId}/${encodeURIComponent(g.toolName)}`),onClick:()=>r({to:"/$org/$project/apps/$connectionId/$toolName",params:{org:i,project:a,connectionId:g.connectionId,toolName:g.toolName}})}));let re;t[16]!==te?(re=te.length>0?{type:"group",group:{id:"apps",label:"Apps",items:te,defaultExpanded:!0}}:null,t[16]=te,t[17]=re):re=t[17];const oe=re;if(c){let g;t[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ie,{}),t[18]=g):g=t[18];let X;t[19]!==x?(X=x("settings"),t[19]=x,t[20]=X):X=t[20];let fe;t[21]!==r||t[22]!==i?(fe=()=>r({to:"/$org/$project/settings",params:{org:i,project:Y}}),t[21]=r,t[22]=i,t[23]=fe):fe=t[23];let we;t[24]!==X||t[25]!==fe?(we={key:"settings",label:"Settings",icon:g,isActive:X,onClick:fe},t[24]=X,t[25]=fe,t[26]=we):we=t[26];const ut=we,$e=[{type:"items",items:[$,_,F]},{type:"group",group:{id:"build",label:"Build",items:[...l.experimentalAutomations?[D]:[],K,U],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[O,ut],defaultExpanded:!0}}];if(z.length>0){let ze;t[27]!==z?(ze={type:"items",items:z},t[27]=z,t[28]=ze):ze=t[28],$e.push(ze)}return W.length>0&&$e.push(...W),oe&&$e.push(oe),$e}let se;t[29]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Te,{}),t[29]=se):se=t[29];let J;t[30]!==x?(J=x("tasks"),t[30]=x,t[31]=J):J=t[31];let H;t[32]!==r||t[33]!==i||t[34]!==a?(H=()=>r({to:"/$org/$project/tasks",params:{org:i,project:a}}),t[32]=r,t[33]=i,t[34]=a,t[35]=H):H=t[35];let G;t[36]!==J||t[37]!==H?(G={key:"tasks",label:"Tasks",icon:se,isActive:J,onClick:H},t[36]=J,t[37]=H,t[38]=G):G=t[38];const ie=G;let V;t[39]!==u||t[40]!==x||t[41]!==r||t[42]!==i||t[43]!==a?(V=u.includes("MCP Workflows")?{key:"Workflows",label:"Workflows",icon:s.jsx(is,{}),isActive:x("workflows"),onClick:()=>r({to:"/$org/$project/workflows",params:{org:i,project:a}})}:null,t[39]=u,t[40]=x,t[41]=r,t[42]=i,t[43]=a,t[44]=V):V=t[44];const b=V;let Q;t[45]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Ie,{}),t[45]=Q):Q=t[45];let le;t[46]!==x?(le=x("settings"),t[46]=x,t[47]=le):le=t[47];let B;t[48]!==r||t[49]!==i||t[50]!==a?(B=()=>r({to:"/$org/$project/settings/general",params:{org:i,project:a}}),t[48]=r,t[49]=i,t[50]=a,t[51]=B):B=t[51];let ne;t[52]!==le||t[53]!==B?(ne={key:"configure",label:"Settings",icon:Q,isActive:le,onClick:B},t[52]=le,t[53]=B,t[54]=ne):ne=t[54];const he=ne;let ae;t[55]!==b?(ae=b?[b]:[],t[55]=b,t[56]=ae):ae=t[56];const de=[{type:"items",items:[$,ie,...ae,he]}];if(z.length>0){let g;t[57]===Symbol.for("react.memo_cache_sentinel")?(g={type:"divider"},t[57]=g):g=t[57],de.push(g);let X;t[58]!==z?(X={type:"items",items:z},t[58]=z,t[59]=X):X=t[59],de.push(X)}return W.length>0&&de.push(...W),oe&&de.push(oe),de}function Ds(t){const e=I.c(11),{label:n,children:r,defaultExpanded:o}=t,l=o===void 0?!0:o,[i,a]=M.useState(l),{state:c}=He(),m=c==="collapsed";let d;e[0]!==i||e[1]!==m||e[2]!==n?(d=m?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs(ke,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>a(!i),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),s.jsx(it,{size:12,className:L("text-muted-foreground transition-transform duration-200",!i&&"-rotate-90")})]})})}),e[0]=i,e[1]=m,e[2]=n,e[3]=d):d=e[3];let u;e[4]!==r||e[5]!==i||e[6]!==m?(u=(m||i)&&s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:r})}),e[4]=r,e[5]=i,e[6]=m,e[7]=u):u=e[7];let f;return e[8]!==d||e[9]!==u?(f=s.jsxs(_e,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[d,u]}),e[8]=d,e[9]=u,e[10]=f):f=e[10],f}function ct(t){const e=I.c(24),{item:n}=t,{isMobile:r,setOpenMobile:o}=He();let l;e[0]!==r||e[1]!==n||e[2]!==o?(l=()=>{n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=l):l=e[3];const i=l,a=n.key,c=n.isActive,m=n.label,d=n.isExternal&&"group/external";let u;e[4]!==d?(u=L(d),e[4]=d,e[5]=u):u=e[5];let f;e[6]!==n.icon?(f=s.jsx("span",{className:"[&>svg]:size-4",children:n.icon}),e[6]=n.icon,e[7]=f):f=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=L("truncate group-data-[collapsible=icon]:hidden"),e[8]=p):p=e[8];let h;e[9]!==n.label?(h=s.jsx("span",{className:p,children:n.label}),e[9]=n.label,e[10]=h):h=e[10];let N;e[11]!==n.isExternal?(N=n.isExternal&&s.jsx(ge,{size:12,className:"ml-auto mr-1 shrink-0 opacity-0 group-hover/external:opacity-60 transition-opacity group-data-[collapsible=icon]:hidden"}),e[11]=n.isExternal,e[12]=N):N=e[12];let j;e[13]!==i||e[14]!==n.isActive||e[15]!==n.label||e[16]!==N||e[17]!==u||e[18]!==f||e[19]!==h?(j=s.jsxs(ke,{onClick:i,isActive:c,tooltip:m,className:u,children:[f,h,N]}),e[13]=i,e[14]=n.isActive,e[15]=n.label,e[16]=N,e[17]=u,e[18]=f,e[19]=h,e[20]=j):j=e[20];let v;return e[21]!==n.key||e[22]!==j?(v=s.jsx(ce,{children:j},a),e[21]=n.key,e[22]=j,e[23]=v):v=e[23],v}function Es(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Tt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let l;e[2]!==n.group.items?(l=n.group.items.map(Rs),e[2]=n.group.items,e[3]=l):l=e[3];let i;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==l?(i=s.jsx(Ds,{label:r,defaultExpanded:o,children:l}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=l,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==n.items?(r=n.items.map(Ms),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(_e,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}}}function Ms(t){return s.jsx(ct,{item:t},t.key)}function Rs(t){return s.jsx(ct,{item:t},t.key)}function dt(t){const e=I.c(14),{sections:n,header:r,footer:o,additionalContent:l,variant:i,collapsible:a,contentClassName:c}=t,m=i===void 0?"sidebar":i,d=a===void 0?"icon":a;let u;e[0]!==c?(u=L("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",c),e[0]=c,e[1]=u):u=e[1];let f;e[2]!==n?(f=n.map(Ls),e[2]=n,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==u||e[6]!==f?(p=s.jsxs(Dt,{className:u,children:[f,l]}),e[4]=l,e[5]=u,e[6]=f,e[7]=p):p=e[7];let h;return e[8]!==d||e[9]!==o||e[10]!==r||e[11]!==p||e[12]!==m?(h=s.jsxs(Et,{variant:m,collapsible:d,children:[r,p,o]}),e[8]=d,e[9]=o,e[10]=r,e[11]=p,e[12]=m,e[13]=h):h=e[13],h}function Ls(t,e){return s.jsx(Es,{section:t},e)}dt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Us(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(ee,{className:"h-8 w-full rounded-lg"}),s.jsx(ee,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Fs(t){const e=I.c(12),{organizationId:n,currentProjectSlug:r,onSelect:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={suspense:!0},e[0]=l):l=e[0];const{data:i}=nt(n,l);let a,c;if(e[1]!==r||e[2]!==o||e[3]!==i){c=Symbol.for("react.early_return_sentinel");e:{const d=i?.filter(Hs)??[];if(d.length===0){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=f):f=e[6],c=f;break e}let u;e[7]!==r||e[8]!==o?(u=f=>{const p=r===f.slug,h=f.ui?.themeColor??"#3B82F6";return s.jsxs(q,{className:L("gap-2.5",p&&"bg-accent"),onClick:()=>o(f.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:f.ui?.icon?void 0:{backgroundColor:h},children:f.ui?.icon?s.jsx("img",{src:f.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:f.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:f.name}),p&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},f.id)},e[7]=r,e[8]=o,e[9]=u):u=e[9],a=d.map(u)}e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=c}else a=e[4],c=e[5];if(c!==Symbol.for("react.early_return_sentinel"))return c;let m;return e[10]!==a?(m=s.jsx(s.Fragment,{children:a}),e[10]=a,e[11]=m):m=e[11],m}function Hs(t){return t.slug!==Y}function Ws(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function Ee(t){const e=I.c(45),{isCollapsed:n,onCreateProject:r}=t,o=n===void 0?!1:n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const{org:i,project:a}=Qe(l),{data:c}=xe.useListOrganizations(),m=Le(),d=c?.find(b=>b.slug===i),[u,f]=M.useState(!1),[p,h]=M.useState(!1),N=Ke(),j=a===Y,{data:v}=st(d?.id??"",j?"":a??"");let y;e[1]!==i?(y=(b,Q)=>b.slug===i?-1:Q.slug===i?1:b.name.localeCompare(Q.name),e[1]=i,e[2]=y):y=e[2];const x=[...c??[]].sort(y);let k;e[3]!==m||e[4]!==i?(k=()=>{i&&m({to:"/$org/$project",params:{org:i,project:Y}})},e[3]=m,e[4]=i,e[5]=k):k=e[5];const $=k;let S;e[6]!==m||e[7]!==i?(S=b=>{i&&m({to:"/$org/$project",params:{org:i,project:b}})},e[6]=m,e[7]=i,e[8]=S):S=e[8];const _=S;let C;e[9]!==m?(C=b=>{m({to:"/$org/$project",params:{org:b,project:Y}})},e[9]=m,e[10]=C):C=e[10];const U=C;let w;e[11]!==r?(w=r?()=>r():void 0,e[11]=r,e[12]=w):w=e[12];const F=w;let T;e[13]!==m||e[14]!==i||e[15]!==a?(T=()=>{if(!i||!a)return;const b=a===Y;m({to:"/$org/$project",params:{org:i,project:a},search:Q=>({...Q,settings:b?"org.general":`project:${a}:general`})})},e[13]=m,e[14]=i,e[15]=a,e[16]=T):T=e[16];const K=T,R=ot;let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=b=>{b||h(!1)},e[17]=D):D=e[17];const A=o?"w-auto pr-1.5":"w-full";let O;e[18]!==A?(O=L("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",A),e[18]=A,e[19]=O):O=e[19];const z=j?s.jsx("div",{className:L("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:d?.logo?void 0:Ws(d?.name??""),children:d?.logo?s.jsx("img",{src:d.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:L("font-semibold leading-none",o?"text-[9px]":"text-xs"),children:(d?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:L("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:v?.ui?.icon?void 0:{backgroundColor:v?.ui?.themeColor??"#60a5fa"},children:v?.ui?.icon?s.jsx("img",{src:v.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:L("font-semibold text-white",o?"text-xs":"text-lg"),children:(v?.name??a??"?").charAt(0).toUpperCase()})});let P;e[20]!==d?.name||e[21]!==v?.name||e[22]!==o||e[23]!==j||e[24]!==a?(P=!o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:d?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:j?"Studio":v?.name??a??""})]}),s.jsx(It,{size:16,className:"shrink-0 text-sidebar-foreground/40"})]}),e[20]=d?.name,e[21]=v?.name,e[22]=o,e[23]=j,e[24]=a,e[25]=P):P=e[25];let E;e[26]!==O||e[27]!==z||e[28]!==P?(E=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{type:"button",className:O,children:[z,P]})}),e[26]=O,e[27]=z,e[28]=P,e[29]=E):E=e[29];const W=rt,te="start",re="bottom",oe="w-64 flex flex-col gap-0.5",se=Ks,J=N&&p?s.jsxs(s.Fragment,{children:[x.map(b=>s.jsxs(q,{className:L("gap-2.5",b.slug===i&&"bg-accent"),onClick:()=>U(b.slug),children:[s.jsx(je,{url:b.logo??"",fallback:b.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:b.name}),b.slug===i&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},b.id)),s.jsx(Se,{}),s.jsxs(q,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(q,{className:L("gap-2.5",j&&"bg-accent"),onClick:$,children:[s.jsx(je,{url:d?.logo??"",fallback:d?.name??"",size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",d?.name]}),j&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]}),s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),d&&s.jsx(M.Suspense,{fallback:s.jsx(Us,{}),children:s.jsx(Fs,{organizationId:d.id,currentProjectSlug:a,orgSlug:i??"",onSelect:_})}),F&&s.jsxs(q,{className:"gap-2.5",onClick:F,children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),s.jsx(Se,{}),N?s.jsxs(q,{className:"gap-2.5",onSelect:b=>{b.preventDefault(),h(!0)},children:[s.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}):s.jsxs(cs,{children:[s.jsxs(ds,{className:"gap-2.5",children:[s.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),s.jsxs(ms,{className:"w-48 flex flex-col gap-0.5",children:[x.map(b=>s.jsxs(q,{className:L("gap-2.5",b.slug===i&&"bg-accent"),onClick:()=>U(b.slug),children:[s.jsx(je,{url:b.logo??"",fallback:b.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:b.name}),b.slug===i&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},b.id)),s.jsx(Se,{}),s.jsxs(q,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]})]}),s.jsxs(q,{className:"gap-2.5",onClick:K,children:[s.jsx(Ie,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]});let H;e[30]!==W||e[31]!==se||e[32]!==J?(H=s.jsx(W,{align:te,side:re,className:oe,onCloseAutoFocus:se,children:J}),e[30]=W,e[31]=se,e[32]=J,e[33]=H):H=e[33];let G;e[34]!==R||e[35]!==E||e[36]!==H||e[37]!==D?(G=s.jsxs(R,{onOpenChange:D,children:[E,H]}),e[34]=R,e[35]=E,e[36]=H,e[37]=D,e[38]=G):G=e[38];let ie;e[39]!==u||e[40]!==f?(ie=s.jsx(us,{open:u,onOpenChange:f}),e[39]=u,e[40]=f,e[41]=ie):ie=e[41];let V;return e[42]!==G||e[43]!==ie?(V=s.jsxs(s.Fragment,{children:[G,ie]}),e[42]=G,e[43]=ie,e[44]=V):V=e[44],V}function Ks(t){return t.preventDefault()}Ee.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(ee,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(ee,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function Me(t){const e=I.c(4),{onCreateProject:n}=t,{state:r,toggleSidebar:o}=He(),l=r==="collapsed";let i;return e[0]!==l||e[1]!==n||e[2]!==o?(i=s.jsx(Ze,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(ue,{children:s.jsx(ce,{children:l?s.jsxs("div",{className:"flex flex-col w-full gap-0.5",children:[s.jsx(Ee,{isCollapsed:!0,onCreateProject:n}),s.jsx(ke,{onClick:o,tooltip:"Expand sidebar",children:s.jsx(De,{})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(Ee,{isCollapsed:!1,onCreateProject:n})}),s.jsx(ke,{onClick:o,tooltip:"Collapse sidebar",className:"size-7 shrink-0",children:s.jsx(De,{})})]})})})}),e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3],i}Me.Skeleton=function(){return s.jsx(Ze,{className:"px-3",children:s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(ee,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(ee,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsx("div",{className:"flex items-center gap-0.5",children:s.jsx(ee,{className:"size-7 rounded-lg bg-sidebar-accent"})})]})})})})};function Gs(t){const e=I.c(50),{user:n,userImage:r}=t,{open:o}=tt(),[l,i]=M.useState(!1);let a;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(a=()=>{const W=`ID: ${n.id}
1
+ import{c as I,j as s,E as Re,r as M,u as Ne,D as L,e as Le,aN as Ue,L as Ae,c6 as ft,bl as pt,O as Y,aM as xt,g as Qe,f as xe,v as pe,c7 as ht,bO as gt,w as jt,B as Oe,A as bt,S as Ye,k as Nt,m as yt,N as vt,x as St,z as Pe,K as kt,aO as Je,P as Ct}from"./index-BRbdC8tb.js";import{C as Z,c as _t,i as wt}from"./task-status-DCcRj1iH.js";import{I as $t,t as Fe,n as Te,T as zt,U as It,K as Ge,N as Pt,V as At,q as Be,W as Ot}from"./integration-icon-BxAcqR_W.js";import{a as Xe,P as me,i as De,f as He,g as ue,h as ce,j as ke,k as Ce,l as _e,m as Tt,n as Dt,o as Et,p as Ze,q as Mt,u as We,r as Rt,s as Lt,t as Ut,v as Ft}from"./index-P1BeuVDU.js";import{d as Ht,a as Wt,u as Kt}from"./constants-2OCwh60p.js";import{n as Gt}from"./Type01-DPCWeoOo.js";import{i as Bt}from"./Loading01-CYdiDh3l.js";import{s as ve}from"./Plus-V1Th1jdv.js";import{i as qe}from"./X-DSEUOZBv.js";import{E as qt,C as Vt}from"./editable-task-title-BXxkXNIX.js";import{T as Qt}from"./tasks-panel-DWjSzHZC.js";import{a as Yt,b as Jt}from"./ai-providers-logos-pBxdceXx.js";import{a as Xt}from"./context-CuNDOhoh.js";import{C as et}from"./create-project-dialog-CU5VLoep.js";import{a as Zt,b as es,c as ts,D as ss}from"./dialog-D46ZA88r.js";import{n as ns}from"./Container-DO3SbooR.js";import{e as is}from"./Dataflow03-DDjLJJPt.js";import{b as rs}from"./List-CD8zd6Wa.js";import{a as os}from"./RefreshCcw01-Bk3rOtaE.js";import{t as Ie}from"./Settings01-BhEewSHV.js";import{u as ls,a as tt}from"./org-ai-providers-DtsI9IWI.js";import{u as st,a as nt}from"./use-project-DdgxiICX.js";import{S as ee}from"./skeleton-CxmuAljC.js";import{n as ge,f as as}from"./XCircle-BDF0JqjY.js";import{t as it}from"./ChevronDown-azX3X6AX.js";import{A as je}from"./avatar-BiJdl6Xf.js";import{c as q,i as Se,e as cs,d as ds,f as ms,b as rt,D as ot,a as lt}from"./dropdown-menu-BJLjCuY0.js";import{i as be}from"./Check-5J8pLufa.js";import{C as us}from"./create-organization-dialog-Cd0g9HkW.js";import{u as Ke}from"./tooltip-xl3GoSVP.js";import{c as fs}from"./Play-3YhDYx27.js";import{c as ps}from"./VideoRecorder-DWwuCAKx.js";import{b as xs,a as hs,P as gs}from"./popover-DWheVeA1.js";import{s as js}from"./XClose-C-lSsuAr.js";import{b as bs}from"./use-mcp-tools-iD-VGNhw.js";import{C as Ns,a as ys,b as vs}from"./collapsible-E7EbAleb.js";import{i as Ss}from"./ChevronRight-BU9wyepR.js";import{D as ks,a as Cs}from"./drawer-DsEaI2mC.js";import{a as _s,R as at,b as ws}from"./resizable-DixBhzs0.js";import"./spinner-Bvsf8yBr.js";import"./use-mcp-prompts-k7CgkVwI.js";import"./useQuery-C31bP6Ck.js";import"./form-BC654cr0.js";import"./label-h0Vcc2GK.js";import"./input-BOjviNKP.js";import"./index-Do980wUe.js";import"./usage-BW6ztpN6.js";import"./ArrowUp-CVgf-IuM.js";import"./AlertCircle-K-Pdcic9.js";import"./select-Duo4-kjU.js";import"./index-BdQq_4o_.js";import"./index-CKlHjZGl.js";import"./ChevronUp-ISSymo50.js";import"./ArrowLeft-DbjuKsKJ.js";import"./use-copy-CogCWJQ7.js";import"./marked.esm-BaswSlok.js";import"./tabs-BawFIUQp.js";import"./checkbox-GcV7rItk.js";import"./SearchMd-BvvZzTkV.js";import"./select-virtual-mcp-DmwglbWt.js";import"./use-virtual-mcp-DxTKYWLn.js";import"./use-collections-Bqp5H9bu.js";import"./useMutation-C_Uj7oOe.js";import"./use-create-virtual-mcp-CdSUPhk5.js";import"./use-mcp-resources-BfKeTtfq.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-CRS3A1HB.js";import"./types-DPAE4wXV.js";import"./Trash01-DEYpLJs9.js";import"./useSuspenseInfiniteQuery-D-WGLpBh.js";import"./infiniteQueryObserver-DozliAIg.js";import"./Download01-CSi5s7rT.js";import"./FolderClosed-DG1khNab.js";import"./Grid01-1OtRlqYA.js";import"./Upload01-CVsYMTIG.js";import"./User01-B6InEsCV.js";import"./Zap-Md9DJ6rv.js";import"./collection-search-CcVBsN85.js";import"./user-tg9kwvXU.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./empty-state-B7nlLEUe.js";import"./decopilot-events-Brt4gAR6.js";import"./index-DSiECZF0.js";import"./textarea-DdRl57bf.js";import"./card-D1l6f7HS.js";import"./toggle-group-B0IrEjNf.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./alert-dialog-CJVLkF8s.js";import"./index-DW3Gddt1.js";function $s(){const t=I.c(70),{org:e}=Ne(),[,n]=Xe(),r=Yt(),{selectedVirtualMcp:o,isChatEmpty:l,activeTaskId:i,createTask:a,switchToTask:c,tasks:m}=Xt();let d;if(t[0]!==i||t[1]!==m){let B;t[3]!==i?(B=ne=>ne.id===i,t[3]=i,t[4]=B):B=t[4],d=m.find(B),t[0]=i,t[1]=m,t[2]=d}else d=t[2];const u=d,[f,p]=M.useState("chat"),[h,N]=M.useTransition();let j;t[5]!==e.id?(j=Ht(e.id),t[5]=e.id,t[6]=j):j=t[6];const y=o??j;let x;t[7]!==a?(x=()=>{N(()=>{a()})},t[7]=a,t[8]=x):x=t[8];const k=x;if(r?.providers?.length===0){let B;t[9]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(me.Header.Left,{className:"gap-2"}),t[9]=B):B=t[9];let ne;t[10]!==n?(ne=()=>n(!1),t[10]=n,t[11]=ne):ne=t[11];let he;t[12]===Symbol.for("react.memo_cache_sentinel")?(he=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[12]=he):he=t[12];let ae;t[13]!==ne?(ae=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[B,s.jsx(me.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:ne,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:he})})]}),t[13]=ne,t[14]=ae):ae=t[14];let ye;t[15]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Z.Main,{className:"flex flex-col items-center",children:s.jsx(Z.EmptyState,{children:s.jsx(Z.NoLlmBindingEmptyState,{title:"No model provider connected",description:"Connect to a model provider to unlock AI-powered features."})})}),t[15]=ye):ye=t[15];let de;return t[16]!==ae?(de=s.jsxs(Z,{className:"animate-in fade-in-0 duration-200",children:[ae,ye]}),t[16]=ae,t[17]=de):de=t[17],de}const $=f!=="chat"||h?"opacity-0 pointer-events-none":"opacity-100";let S;t[18]!==$?(S=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",$),t[18]=$,t[19]=S):S=t[19];let _;t[20]!==u||t[21]!==l?(_=!l&&u?.title&&s.jsx(qt,{taskId:u.id,text:u.title,className:"text-sm font-medium text-foreground"}),t[20]=u,t[21]=l,t[22]=_):_=t[22];let C;t[23]!==_?(C=s.jsx(me.Header.Left,{className:"gap-2",children:_}),t[23]=_,t[24]=C):C=t[24];let U;t[25]===Symbol.for("react.memo_cache_sentinel")?(U=s.jsx(ve,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[25]=U):U=t[25];let w;t[26]!==k||t[27]!==h?(w=s.jsx("button",{type:"button",onClick:k,disabled:h,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent group cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",title:"New chat",children:U}),t[26]=k,t[27]=h,t[28]=w):w=t[28];let F;t[29]===Symbol.for("react.memo_cache_sentinel")?(F=()=>p("tasks"),t[29]=F):F=t[29];let T;t[30]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx("button",{type:"button",onClick:F,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent group cursor-pointer",title:"Tasks",children:s.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),t[30]=T):T=t[30];let K;t[31]!==n?(K=()=>n(!1),t[31]=n,t[32]=K):K=t[32];let R;t[33]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(qe,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"}),t[33]=R):R=t[33];let D;t[34]!==K?(D=s.jsx("button",{type:"button",onClick:K,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:R}),t[34]=K,t[35]=D):D=t[35];let A;t[36]!==D||t[37]!==w?(A=s.jsxs(me.Header.Right,{className:"gap-1",children:[w,T,D]}),t[36]=D,t[37]=w,t[38]=A):A=t[38];let O;t[39]!==A||t[40]!==C?(O=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[C,A]}),t[39]=A,t[40]=C,t[41]=O):O=t[41];let z;t[42]!==y||t[43]!==l?(z=s.jsx(Z.Main,{children:l?s.jsx(Z.EmptyState,{children:s.jsxs("div",{className:"flex flex-col items-center gap-3 md:gap-6 w-full px-4",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 md:gap-4 p-0 text-center",children:[s.jsx($t,{icon:y.icon,name:y.title,size:"lg",fallbackIcon:s.jsx(Fe,{size:32}),className:"size-10 min-w-10 md:size-[60px]! md:min-w-[60px] rounded-xl md:rounded-[18px]!"}),s.jsx("h3",{className:"text-base md:text-xl font-medium text-foreground",children:y.title}),s.jsx("div",{className:"text-muted-foreground text-center text-xs md:text-sm max-w-md line-clamp-2",children:y.description??"Ask anything about configuring model providers or using MCP Mesh."})]}),s.jsx(Z.IceBreakers,{})]})}):s.jsx(Z.Messages,{})}),t[42]=y,t[43]=l,t[44]=z):z=t[44];let P;t[45]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Z.Footer,{children:s.jsx(Z.Input,{onOpenContextPanel:()=>p("context")})}),t[45]=P):P=t[45];let E;t[46]!==O||t[47]!==z||t[48]!==S?(E=s.jsxs("div",{className:S,children:[O,z,P]}),t[46]=O,t[47]=z,t[48]=S,t[49]=E):E=t[49];const W=f==="tasks"?"opacity-100":"opacity-0 pointer-events-none";let te;t[50]!==W?(te=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",W),t[50]=W,t[51]=te):te=t[51];let re;t[52]===Symbol.for("react.memo_cache_sentinel")?(re=s.jsx(me.Header.Left,{className:"gap-2",children:s.jsx("span",{className:"text-sm font-normal text-foreground",children:"Tasks"})}),t[52]=re):re=t[52];let oe;t[53]===Symbol.for("react.memo_cache_sentinel")?(oe=()=>p("chat"),t[53]=oe):oe=t[53];let se;t[54]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsxs(me.Header,{className:"flex-none",hideSidebarTrigger:!0,children:[re,s.jsx(me.Header.Right,{className:"gap-1",children:s.jsx("button",{type:"button",onClick:oe,className:"flex size-10 md:size-6 items-center justify-center rounded-full p-1 outline-none focus-visible:ring-0 hover:bg-transparent transition-colors group cursor-pointer",title:"Back to chat",children:s.jsx(Gt,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),t[54]=se):se=t[54];let J;t[55]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(Bt,{size:16,className:"animate-spin text-muted-foreground"})}),t[55]=J):J=t[55];let H;t[56]!==c?(H=s.jsx(Re,{fallback:zs,children:s.jsx(M.Suspense,{fallback:J,children:s.jsx(Qt,{onTaskSelect:async B=>{await c(B),p("chat")}})})}),t[56]=c,t[57]=H):H=t[57];let G;t[58]!==te||t[59]!==H?(G=s.jsxs("div",{className:te,children:[se,H]}),t[58]=te,t[59]=H,t[60]=G):G=t[60];const ie=f==="context"?"opacity-100":"opacity-0 pointer-events-none";let V;t[61]!==ie?(V=L("absolute inset-0 flex flex-col transition-opacity duration-100 ease-out",ie),t[61]=ie,t[62]=V):V=t[62];let b;t[63]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Vt,{back:!0,onClose:()=>p("chat")}),t[63]=b):b=t[63];let Q;t[64]!==V?(Q=s.jsx("div",{className:V,children:b}),t[64]=V,t[65]=Q):Q=t[65];let le;return t[66]!==E||t[67]!==G||t[68]!==Q?(le=s.jsxs(Z,{className:"relative overflow-hidden animate-in fade-in-0 duration-200",children:[E,G,Q]}),t[66]=E,t[67]=G,t[68]=Q,t[69]=le):le=t[69],le}function zs(){return s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("p",{className:"text-xs text-muted-foreground",children:"Unable to load tasks"})})}function Ve(){const t=I.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(Z.Skeleton,{}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Re,{fallback:e,children:s.jsx(M.Suspense,{fallback:s.jsx(Z.Skeleton,{}),children:s.jsx($s,{})})}),t[1]=n):n=t[1],n}function Is(t){const e=I.c(5),{open:n,onOpenChange:r}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(es,{children:s.jsx(ts,{children:"Keyboard Shortcuts"})}),e[0]=o):o=e[0];let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(Zt,{className:"sm:max-w-md",children:[o,s.jsx("div",{className:"flex flex-col gap-4",children:_t.map(Ps)})]}),e[1]=l):l=e[1];let i;return e[2]!==r||e[3]!==n?(i=s.jsx(ss,{open:n,onOpenChange:r,children:l}),e[2]=r,e[3]=n,e[4]=i):i=e[4],i}function Ps(t){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:t.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:t.shortcuts.map(As)})]},t.label)}function As(t){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:t.description}),s.jsx("div",{className:"flex items-center gap-1",children:t.keys.map(Os)})]},t.description)}function Os(t){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:t},t)}function Ts(){const t=I.c(60),{locator:e,org:n}=Ne(),r=Le(),o=Ue(),[l]=ls(),{org:i,project:a}=Ae.parse(e),c=Ae.isOrgAdminProject(e),{data:m}=st(n.id,a);let d;t[0]!==m?.enabledPlugins?(d=m?.enabledPlugins??[],t[0]=m?.enabledPlugins,t[1]=d):d=t[1];const u=d,f=m?.ui?.pinnedViews??[];let p;t[2]!==u?(p=g=>u.includes(g.pluginId),t[2]=u,t[3]=p):p=t[3];const h=ft.filter(p),N=o.location.pathname,j=`/${i}/${a}`,v=N===j||N===`${j}/`;let y;t[4]!==j||t[5]!==N?(y=g=>N.startsWith(`${j}/${g}`),t[4]=j,t[5]=N,t[6]=y):y=t[6];const x=y;let k;t[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(rs,{}),t[7]=k):k=t[7];const $={key:"home",label:"Home",icon:k,isActive:v,onClick:()=>{v?window.dispatchEvent(new CustomEvent("reset-home-view")):r({to:"/$org/$project",params:{org:i,project:a}})}};let S;t[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Te,{}),t[8]=S):S=t[8];const _={key:"tasks",label:"Tasks",icon:S,isActive:x("tasks"),onClick:()=>r({to:"/$org/$project/tasks",params:{org:i,project:Y}})};let C;t[9]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ns,{}),t[9]=C):C=t[9];const U={key:"mcps",label:"Connections",icon:C,isActive:x("mcps"),onClick:()=>r({to:"/$org/$project/mcps",params:{org:i,project:Y}})};let w;t[10]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(xt,{}),t[10]=w):w=t[10];const F={key:"projects",label:"Projects",icon:w,isActive:x("projects"),onClick:()=>r({to:"/$org/$project/projects",params:{org:i,project:Y}})};let T;t[11]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(Fe,{}),t[11]=T):T=t[11];const K={key:"agents",label:"Agents",icon:T,isActive:x("agents"),onClick:()=>r({to:"/$org/$project/agents",params:{org:i,project:Y}})};let R;t[12]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(os,{}),t[12]=R):R=t[12];const D={key:"automations",label:"Automations",icon:R,isActive:x("automations"),onClick:()=>r({to:"/$org/$project/automations",params:{org:i,project:Y}})};let A;t[13]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx(zt,{}),t[13]=A):A=t[13];const O={key:"monitoring",label:"Monitor",icon:A,isActive:x("monitoring"),onClick:()=>r({to:"/$org/$project/monitoring",params:{org:i,project:Y}})},z=h.map(g=>({key:g.pluginId,label:g.label,icon:g.icon,isActive:x(g.pluginId),onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:g.pluginId}})}));let P;t[14]!==u?(P=g=>u.includes(g.pluginId),t[14]=u,t[15]=P):P=t[15];const W=pt.filter(P).map(g=>({type:"group",group:{id:`${g.pluginId}-${g.id}`,label:g.label,items:g.items.map((X,fe)=>({key:`${g.pluginId}-${g.id}-${fe}`,label:X.label,icon:X.icon,isActive:x(g.pluginId),onClick:()=>r({to:"/$org/$project/$pluginId",params:{org:i,project:a,pluginId:g.pluginId}})})),defaultExpanded:g.defaultExpanded??!0}})),te=f.map(g=>({key:`app-${g.connectionId}-${g.toolName}`,label:g.label||g.toolName,icon:g.icon?s.jsx("img",{src:g.icon,alt:"",className:"size-4 rounded"}):s.jsx(De,{}),isActive:x(`apps/${g.connectionId}/${encodeURIComponent(g.toolName)}`),onClick:()=>r({to:"/$org/$project/apps/$connectionId/$toolName",params:{org:i,project:a,connectionId:g.connectionId,toolName:g.toolName}})}));let re;t[16]!==te?(re=te.length>0?{type:"group",group:{id:"apps",label:"Apps",items:te,defaultExpanded:!0}}:null,t[16]=te,t[17]=re):re=t[17];const oe=re;if(c){let g;t[18]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Ie,{}),t[18]=g):g=t[18];let X;t[19]!==x?(X=x("settings"),t[19]=x,t[20]=X):X=t[20];let fe;t[21]!==r||t[22]!==i?(fe=()=>r({to:"/$org/$project/settings",params:{org:i,project:Y}}),t[21]=r,t[22]=i,t[23]=fe):fe=t[23];let we;t[24]!==X||t[25]!==fe?(we={key:"settings",label:"Settings",icon:g,isActive:X,onClick:fe},t[24]=X,t[25]=fe,t[26]=we):we=t[26];const ut=we,$e=[{type:"items",items:[$,_,F]},{type:"group",group:{id:"build",label:"Build",items:[...l.experimentalAutomations?[D]:[],K,U],defaultExpanded:!0}},{type:"group",group:{id:"manage",label:"Manage",items:[O,ut],defaultExpanded:!0}}];if(z.length>0){let ze;t[27]!==z?(ze={type:"items",items:z},t[27]=z,t[28]=ze):ze=t[28],$e.push(ze)}return W.length>0&&$e.push(...W),oe&&$e.push(oe),$e}let se;t[29]===Symbol.for("react.memo_cache_sentinel")?(se=s.jsx(Te,{}),t[29]=se):se=t[29];let J;t[30]!==x?(J=x("tasks"),t[30]=x,t[31]=J):J=t[31];let H;t[32]!==r||t[33]!==i||t[34]!==a?(H=()=>r({to:"/$org/$project/tasks",params:{org:i,project:a}}),t[32]=r,t[33]=i,t[34]=a,t[35]=H):H=t[35];let G;t[36]!==J||t[37]!==H?(G={key:"tasks",label:"Tasks",icon:se,isActive:J,onClick:H},t[36]=J,t[37]=H,t[38]=G):G=t[38];const ie=G;let V;t[39]!==u||t[40]!==x||t[41]!==r||t[42]!==i||t[43]!==a?(V=u.includes("MCP Workflows")?{key:"Workflows",label:"Workflows",icon:s.jsx(is,{}),isActive:x("workflows"),onClick:()=>r({to:"/$org/$project/workflows",params:{org:i,project:a}})}:null,t[39]=u,t[40]=x,t[41]=r,t[42]=i,t[43]=a,t[44]=V):V=t[44];const b=V;let Q;t[45]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(Ie,{}),t[45]=Q):Q=t[45];let le;t[46]!==x?(le=x("settings"),t[46]=x,t[47]=le):le=t[47];let B;t[48]!==r||t[49]!==i||t[50]!==a?(B=()=>r({to:"/$org/$project/settings/general",params:{org:i,project:a}}),t[48]=r,t[49]=i,t[50]=a,t[51]=B):B=t[51];let ne;t[52]!==le||t[53]!==B?(ne={key:"configure",label:"Settings",icon:Q,isActive:le,onClick:B},t[52]=le,t[53]=B,t[54]=ne):ne=t[54];const he=ne;let ae;t[55]!==b?(ae=b?[b]:[],t[55]=b,t[56]=ae):ae=t[56];const de=[{type:"items",items:[$,ie,...ae,he]}];if(z.length>0){let g;t[57]===Symbol.for("react.memo_cache_sentinel")?(g={type:"divider"},t[57]=g):g=t[57],de.push(g);let X;t[58]!==z?(X={type:"items",items:z},t[58]=z,t[59]=X):X=t[59],de.push(X)}return W.length>0&&de.push(...W),oe&&de.push(oe),de}function Ds(t){const e=I.c(11),{label:n,children:r,defaultExpanded:o}=t,l=o===void 0?!0:o,[i,a]=M.useState(l),{state:c}=He(),m=c==="collapsed";let d;e[0]!==i||e[1]!==m||e[2]!==n?(d=m?s.jsx("div",{className:"flex h-6 items-center",children:s.jsx("div",{className:"h-0.5 w-8 rounded-full bg-sidebar-foreground/15"})}):s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs(ke,{className:"h-6 cursor-pointer select-none gap-1 [&>svg]:size-3",onClick:()=>a(!i),children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n}),s.jsx(it,{size:12,className:L("text-muted-foreground transition-transform duration-200",!i&&"-rotate-90")})]})})}),e[0]=i,e[1]=m,e[2]=n,e[3]=d):d=e[3];let u;e[4]!==r||e[5]!==i||e[6]!==m?(u=(m||i)&&s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:r})}),e[4]=r,e[5]=i,e[6]=m,e[7]=u):u=e[7];let f;return e[8]!==d||e[9]!==u?(f=s.jsxs(_e,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[d,u]}),e[8]=d,e[9]=u,e[10]=f):f=e[10],f}function ct(t){const e=I.c(24),{item:n}=t,{isMobile:r,setOpenMobile:o}=He();let l;e[0]!==r||e[1]!==n||e[2]!==o?(l=()=>{n.onClick?.(),r&&o(!1)},e[0]=r,e[1]=n,e[2]=o,e[3]=l):l=e[3];const i=l,a=n.key,c=n.isActive,m=n.label,d=n.isExternal&&"group/external";let u;e[4]!==d?(u=L(d),e[4]=d,e[5]=u):u=e[5];let f;e[6]!==n.icon?(f=s.jsx("span",{className:"[&>svg]:size-4",children:n.icon}),e[6]=n.icon,e[7]=f):f=e[7];let p;e[8]===Symbol.for("react.memo_cache_sentinel")?(p=L("truncate group-data-[collapsible=icon]:hidden"),e[8]=p):p=e[8];let h;e[9]!==n.label?(h=s.jsx("span",{className:p,children:n.label}),e[9]=n.label,e[10]=h):h=e[10];let N;e[11]!==n.isExternal?(N=n.isExternal&&s.jsx(ge,{size:12,className:"ml-auto mr-1 shrink-0 opacity-0 group-hover/external:opacity-60 transition-opacity group-data-[collapsible=icon]:hidden"}),e[11]=n.isExternal,e[12]=N):N=e[12];let j;e[13]!==i||e[14]!==n.isActive||e[15]!==n.label||e[16]!==N||e[17]!==u||e[18]!==f||e[19]!==h?(j=s.jsxs(ke,{onClick:i,isActive:c,tooltip:m,className:u,children:[f,h,N]}),e[13]=i,e[14]=n.isActive,e[15]=n.label,e[16]=N,e[17]=u,e[18]=f,e[19]=h,e[20]=j):j=e[20];let v;return e[21]!==n.key||e[22]!==j?(v=s.jsx(ce,{children:j},a),e[21]=n.key,e[22]=j,e[23]=v):v=e[23],v}function Es(t){const e=I.c(12),{section:n}=t;switch(n.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Tt,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=n.group.label,o=n.group.defaultExpanded;let l;e[2]!==n.group.items?(l=n.group.items.map(Rs),e[2]=n.group.items,e[3]=l):l=e[3];let i;return e[4]!==n.group.defaultExpanded||e[5]!==n.group.label||e[6]!==l?(i=s.jsx(Ds,{label:r,defaultExpanded:o,children:l}),e[4]=n.group.defaultExpanded,e[5]=n.group.label,e[6]=l,e[7]=i):i=e[7],i}case"items":{let r;e[8]!==n.items?(r=n.items.map(Ms),e[8]=n.items,e[9]=r):r=e[9];let o;return e[10]!==r?(o=s.jsx(_e,{className:"pt-0 pr-0 pb-0 pl-0",children:s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:r})})}),e[10]=r,e[11]=o):o=e[11],o}}}function Ms(t){return s.jsx(ct,{item:t},t.key)}function Rs(t){return s.jsx(ct,{item:t},t.key)}function dt(t){const e=I.c(14),{sections:n,header:r,footer:o,additionalContent:l,variant:i,collapsible:a,contentClassName:c}=t,m=i===void 0?"sidebar":i,d=a===void 0?"icon":a;let u;e[0]!==c?(u=L("flex flex-col flex-1 overflow-x-hidden mt-1 px-3.5 pb-2 group-data-[collapsible=icon]:px-2",c),e[0]=c,e[1]=u):u=e[1];let f;e[2]!==n?(f=n.map(Ls),e[2]=n,e[3]=f):f=e[3];let p;e[4]!==l||e[5]!==u||e[6]!==f?(p=s.jsxs(Dt,{className:u,children:[f,l]}),e[4]=l,e[5]=u,e[6]=f,e[7]=p):p=e[7];let h;return e[8]!==d||e[9]!==o||e[10]!==r||e[11]!==p||e[12]!==m?(h=s.jsxs(Et,{variant:m,collapsible:d,children:[r,p,o]}),e[8]=d,e[9]=o,e[10]=r,e[11]=p,e[12]=m,e[13]=h):h=e[13],h}function Ls(t,e){return s.jsx(Es,{section:t},e)}dt.Skeleton=function(){return s.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>s.jsx("div",{className:"w-full h-8",children:s.jsx(ee,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function Us(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"space-y-0.5 px-1 py-1",children:[s.jsx(ee,{className:"h-8 w-full rounded-lg"}),s.jsx(ee,{className:"h-8 w-full rounded-lg"})]}),t[0]=e):e=t[0],e}function Fs(t){const e=I.c(12),{organizationId:n,currentProjectSlug:r,onSelect:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={suspense:!0},e[0]=l):l=e[0];const{data:i}=nt(n,l);let a,c;if(e[1]!==r||e[2]!==o||e[3]!==i){c=Symbol.for("react.early_return_sentinel");e:{const d=i?.filter(Hs)??[];if(d.length===0){let f;e[6]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"px-2 py-3 text-center text-xs text-muted-foreground",children:"No projects yet"}),e[6]=f):f=e[6],c=f;break e}let u;e[7]!==r||e[8]!==o?(u=f=>{const p=r===f.slug,h=f.ui?.themeColor??"#3B82F6";return s.jsxs(q,{className:L("gap-2.5",p&&"bg-accent"),onClick:()=>o(f.slug),children:[s.jsx("div",{className:"size-6 rounded-md shrink-0 flex items-center justify-center overflow-hidden border border-border/50",style:f.ui?.icon?void 0:{backgroundColor:h},children:f.ui?.icon?s.jsx("img",{src:f.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:"text-xs font-semibold text-white",children:f.name.charAt(0).toUpperCase()})}),s.jsx("span",{className:"flex-1 truncate",children:f.name}),p&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},f.id)},e[7]=r,e[8]=o,e[9]=u):u=e[9],a=d.map(u)}e[1]=r,e[2]=o,e[3]=i,e[4]=a,e[5]=c}else a=e[4],c=e[5];if(c!==Symbol.for("react.early_return_sentinel"))return c;let m;return e[10]!==a?(m=s.jsx(s.Fragment,{children:a}),e[10]=a,e[11]=m):m=e[11],m}function Hs(t){return t.slug!==Y}function Ws(t){let e=0;for(let r=0;r<t.length;r++)e=t.charCodeAt(r)+((e<<5)-e);const n=Math.abs(e)%360;return{backgroundColor:`hsl(${n} 55% 70%)`,color:`hsl(${n} 55% 20%)`}}function Ee(t){const e=I.c(45),{isCollapsed:n,onCreateProject:r}=t,o=n===void 0?!1:n;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={strict:!1},e[0]=l):l=e[0];const{org:i,project:a}=Qe(l),{data:c}=xe.useListOrganizations(),m=Le(),d=c?.find(b=>b.slug===i),[u,f]=M.useState(!1),[p,h]=M.useState(!1),N=Ke(),j=a===Y,{data:v}=st(d?.id??"",j?"":a??"");let y;e[1]!==i?(y=(b,Q)=>b.slug===i?-1:Q.slug===i?1:b.name.localeCompare(Q.name),e[1]=i,e[2]=y):y=e[2];const x=[...c??[]].sort(y);let k;e[3]!==m||e[4]!==i?(k=()=>{i&&m({to:"/$org/$project",params:{org:i,project:Y}})},e[3]=m,e[4]=i,e[5]=k):k=e[5];const $=k;let S;e[6]!==m||e[7]!==i?(S=b=>{i&&m({to:"/$org/$project",params:{org:i,project:b}})},e[6]=m,e[7]=i,e[8]=S):S=e[8];const _=S;let C;e[9]!==m?(C=b=>{m({to:"/$org/$project",params:{org:b,project:Y}})},e[9]=m,e[10]=C):C=e[10];const U=C;let w;e[11]!==r?(w=r?()=>r():void 0,e[11]=r,e[12]=w):w=e[12];const F=w;let T;e[13]!==m||e[14]!==i||e[15]!==a?(T=()=>{if(!i||!a)return;const b=a===Y;m({to:"/$org/$project",params:{org:i,project:a},search:Q=>({...Q,settings:b?"org.general":`project:${a}:general`})})},e[13]=m,e[14]=i,e[15]=a,e[16]=T):T=e[16];const K=T,R=ot;let D;e[17]===Symbol.for("react.memo_cache_sentinel")?(D=b=>{b||h(!1)},e[17]=D):D=e[17];const A=o?"w-auto pr-1.5":"w-full";let O;e[18]!==A?(O=L("flex items-center gap-3 rounded-md p-1.5 pr-2 text-left hover:bg-sidebar-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sidebar-ring min-h-[2.75rem]",A),e[18]=A,e[19]=O):O=e[19];const z=j?s.jsx("div",{className:L("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:d?.logo?void 0:Ws(d?.name??""),children:d?.logo?s.jsx("img",{src:d.logo,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:L("font-semibold leading-none",o?"text-[9px]":"text-xs"),children:(d?.name??"?").slice(0,2).toUpperCase()})}):s.jsx("div",{className:L("shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden transition-[width,height] duration-300 ease-[var(--ease-out-quart)]",o?"size-6":"size-8"),style:v?.ui?.icon?void 0:{backgroundColor:v?.ui?.themeColor??"#60a5fa"},children:v?.ui?.icon?s.jsx("img",{src:v.ui.icon,alt:"",className:"size-full object-cover"}):s.jsx("span",{className:L("font-semibold text-white",o?"text-xs":"text-lg"),children:(v?.name??a??"?").charAt(0).toUpperCase()})});let P;e[20]!==d?.name||e[21]!==v?.name||e[22]!==o||e[23]!==j||e[24]!==a?(P=!o&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[s.jsx("span",{className:"block text-[11px] text-sidebar-foreground/50 leading-tight truncate",children:d?.name??"Select org"}),s.jsx("span",{className:"block text-sm font-semibold text-sidebar-foreground truncate leading-tight",children:j?"Studio":v?.name??a??""})]}),s.jsx(It,{size:16,className:"shrink-0 text-sidebar-foreground/40"})]}),e[20]=d?.name,e[21]=v?.name,e[22]=o,e[23]=j,e[24]=a,e[25]=P):P=e[25];let E;e[26]!==O||e[27]!==z||e[28]!==P?(E=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{type:"button",className:O,children:[z,P]})}),e[26]=O,e[27]=z,e[28]=P,e[29]=E):E=e[29];const W=rt,te="start",re="bottom",oe="w-64 flex flex-col gap-0.5",se=Ks,J=N&&p?s.jsxs(s.Fragment,{children:[x.map(b=>s.jsxs(q,{className:L("gap-2.5",b.slug===i&&"bg-accent"),onClick:()=>U(b.slug),children:[s.jsx(je,{url:b.logo??"",fallback:b.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:b.name}),b.slug===i&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},b.id)),s.jsx(Se,{}),s.jsxs(q,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs(q,{className:L("gap-2.5",j&&"bg-accent"),onClick:$,children:[s.jsx(je,{url:d?.logo??"",fallback:d?.name??"",size:"sm",className:"size-6 rounded-md shrink-0",objectFit:"cover"}),s.jsxs("span",{className:"flex-1 truncate",children:["Studio · ",d?.name]}),j&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]}),s.jsx("p",{className:"px-2 pt-2 pb-0.5 text-[11px] font-medium text-muted-foreground/50 uppercase tracking-wider",children:"Projects"}),d&&s.jsx(M.Suspense,{fallback:s.jsx(Us,{}),children:s.jsx(Fs,{organizationId:d.id,currentProjectSlug:a,orgSlug:i??"",onSelect:_})}),F&&s.jsxs(q,{className:"gap-2.5",onClick:F,children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create project"})]}),s.jsx(Se,{}),N?s.jsxs(q,{className:"gap-2.5",onSelect:b=>{b.preventDefault(),h(!0)},children:[s.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}):s.jsxs(cs,{children:[s.jsxs(ds,{className:"gap-2.5",children:[s.jsx(Ge,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Switch organization"})]}),s.jsxs(ms,{className:"w-48 flex flex-col gap-0.5",children:[x.map(b=>s.jsxs(q,{className:L("gap-2.5",b.slug===i&&"bg-accent"),onClick:()=>U(b.slug),children:[s.jsx(je,{url:b.logo??"",fallback:b.name,size:"xs",className:"size-5 rounded-md shrink-0",objectFit:"cover"}),s.jsx("span",{className:"flex-1 truncate",children:b.name}),b.slug===i&&s.jsx(be,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},b.id)),s.jsx(Se,{}),s.jsxs(q,{className:"gap-2.5",onClick:()=>f(!0),children:[s.jsx(ve,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Create organization"})]})]})]}),s.jsxs(q,{className:"gap-2.5",onClick:K,children:[s.jsx(Ie,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Settings"})]})]});let H;e[30]!==W||e[31]!==se||e[32]!==J?(H=s.jsx(W,{align:te,side:re,className:oe,onCloseAutoFocus:se,children:J}),e[30]=W,e[31]=se,e[32]=J,e[33]=H):H=e[33];let G;e[34]!==R||e[35]!==E||e[36]!==H||e[37]!==D?(G=s.jsxs(R,{onOpenChange:D,children:[E,H]}),e[34]=R,e[35]=E,e[36]=H,e[37]=D,e[38]=G):G=e[38];let ie;e[39]!==u||e[40]!==f?(ie=s.jsx(us,{open:u,onOpenChange:f}),e[39]=u,e[40]=f,e[41]=ie):ie=e[41];let V;return e[42]!==G||e[43]!==ie?(V=s.jsxs(s.Fragment,{children:[G,ie]}),e[42]=G,e[43]=ie,e[44]=V):V=e[44],V}function Ks(t){return t.preventDefault()}Ee.Skeleton=function(){return s.jsxs("div",{className:"flex items-center gap-1.5 h-7 px-1.5 w-full",children:[s.jsx(ee,{className:"size-5 rounded-[5px] shrink-0 bg-sidebar-accent"}),s.jsx(ee,{className:"h-3.5 flex-1 bg-sidebar-accent"})]})};function Me(t){const e=I.c(4),{onCreateProject:n}=t,{state:r,toggleSidebar:o}=He(),l=r==="collapsed";let i;return e[0]!==l||e[1]!==n||e[2]!==o?(i=s.jsx(Ze,{className:"px-3 group-data-[collapsible=icon]:px-2 animate-in fade-in-0 duration-200",children:s.jsx(ue,{children:s.jsx(ce,{children:l?s.jsxs("div",{className:"flex flex-col w-full gap-0.5",children:[s.jsx(Ee,{isCollapsed:!0,onCreateProject:n}),s.jsx(ke,{onClick:o,tooltip:"Expand sidebar",children:s.jsx(De,{})})]}):s.jsxs("div",{className:"flex items-center justify-between w-full gap-1",children:[s.jsx("div",{className:"min-w-0 flex-1",children:s.jsx(Ee,{isCollapsed:!1,onCreateProject:n})}),s.jsx(ke,{onClick:o,tooltip:"Collapse sidebar",className:"size-7 shrink-0",children:s.jsx(De,{})})]})})})}),e[0]=l,e[1]=n,e[2]=o,e[3]=i):i=e[3],i}Me.Skeleton=function(){return s.jsx(Ze,{className:"px-3",children:s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center justify-between w-full",children:[s.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1 p-1.5",children:[s.jsx(ee,{className:"size-8 rounded-md shrink-0 bg-sidebar-accent"}),s.jsx(ee,{className:"h-3.5 w-16 bg-sidebar-accent"})]}),s.jsx("div",{className:"flex items-center gap-0.5",children:s.jsx(ee,{className:"size-7 rounded-lg bg-sidebar-accent"})})]})})})})};function Gs(t){const e=I.c(50),{user:n,userImage:r}=t,{open:o}=tt(),[l,i]=M.useState(!1);let a;e[0]!==n.email||e[1]!==n.id||e[2]!==n.name?(a=()=>{const W=`ID: ${n.id}
2
2
  Name: ${n.name||"N/A"}
3
- Email: ${n.email}`;navigator.clipboard.writeText(W),i(!0),pe.success("User info copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=a):a=e[3];const c=a,m=n.name||n.email||"U";let d;e[4]!==m||e[5]!==r?(d=s.jsx(je,{url:r,fallback:m,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=m,e[5]=r,e[6]=d):d=e[6];const u=n.name||"User";let f;e[7]!==u?(f=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:u})}),e[7]=u,e[8]=f):f=e[8];let p;e[9]!==d||e[10]!==f?(p=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[d,f]})}),e[9]=d,e[10]=f,e[11]=p):p=e[11];const h=n.name||n.email||"U";let N;e[12]!==h||e[13]!==r?(N=s.jsx(je,{url:r,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=h,e[13]=r,e[14]=N):N=e[14];const j=n.name||"User";let v;e[15]!==j?(v=s.jsx("div",{className:"text-sm font-medium truncate",children:j}),e[15]=j,e[16]=v):v=e[16];let y;e[17]!==n.email?(y=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[17]=n.email,e[18]=y):y=e[18];let x;e[19]!==v||e[20]!==y?(x=s.jsxs("div",{className:"flex-1 min-w-0",children:[v,y]}),e[19]=v,e[20]=y,e[21]=x):x=e[21];let k;e[22]!==l?(k=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:l?s.jsx(be,{size:14,className:"text-green-600"}):s.jsx(fs,{size:14,className:"text-muted-foreground"})}),e[22]=l,e[23]=k):k=e[23];let $;e[24]!==c||e[25]!==x||e[26]!==k||e[27]!==N?($=s.jsxs(q,{onClick:c,className:"gap-2.5 group",children:[N,x,k]}),e[24]=c,e[25]=x,e[26]=k,e[27]=N,e[28]=$):$=e[28];let S;e[29]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Se,{}),e[29]=S):S=e[29];let _;e[30]!==o?(_=()=>o("account.preferences"),e[30]=o,e[31]=_):_=e[31];let C,U;e[32]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ie,{size:14,className:"shrink-0 text-muted-foreground"}),U=s.jsx("span",{children:"Settings"}),e[32]=C,e[33]=U):(C=e[32],U=e[33]);let w;e[34]!==_?(w=s.jsxs(q,{className:"gap-2.5",onClick:_,children:[C,U]}),e[34]=_,e[35]=w):w=e[35];let F;e[36]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ps,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[36]=F):F=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Pt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[37]=T):T=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ht,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[38]=K):K=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Fe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[39]=R):R=e[39];let D,A;e[40]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(as,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),A=s.jsx(Se,{}),e[40]=D,e[41]=A):(D=e[40],A=e[41]);let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsxs(q,{className:"gap-2.5",onClick:Bs,children:[s.jsx(At,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[42]=O):O=e[42];let z;e[43]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("div",{className:"px-2 py-1.5",children:s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.185.0"]})}),e[43]=z):z=e[43];let P;e[44]!==$||e[45]!==w?(P=s.jsxs(rt,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:qs,children:[$,S,w,F,T,K,R,D,A,O,z]}),e[44]=$,e[45]=w,e[46]=P):P=e[46];let E;return e[47]!==P||e[48]!==p?(E=s.jsxs(ot,{children:[p,P]}),e[47]=P,e[48]=p,e[49]=E):E=e[49],E}function Bs(){return xe.signOut()}function qs(t){return t.preventDefault()}function mt(){const t=I.c(7),{data:e}=xe.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(je,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const n=e.user,r=n.name??void 0;let o;t[1]!==r||t[2]!==n?(o={...n,name:r},t[1]=r,t[2]=n,t[3]=o):o=t[3];const l=o,i=n.image;let a;return t[4]!==i||t[5]!==l?(a=s.jsx(Gs,{user:l,userImage:i}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function Vs({invitation:t}){const[e,n]=M.useState(!1),[r,o]=M.useState(!1),l=jt(),i=async()=>{n(!0);try{const c=await xe.organization.acceptInvitation({invitationId:t.id});if(c.error)pe.error(c.error.message),n(!1);else{const m=await xe.organization.setActive({organizationId:t.organizationId});pe.success("Invitation accepted!");const d=m?.data?.slug;window.location.href=d?`/${d}`:"/"}}catch{pe.error("Failed to accept invitation"),n(!1)}},a=async()=>{o(!0);try{const c=await xe.organization.rejectInvitation({invitationId:t.id});c.error?(pe.error(c.error.message),o(!1)):(pe.success("Invitation declined"),l.invalidateQueries())}catch{pe.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Oe,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:i,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(be,{size:14})}),s.jsx(Oe,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(js,{size:14})})]})]})}function Qs(){const t=M.useContext(gt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}class Ys extends M.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Js(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Xs(){const t=I.c(15),{open:e}=tt(),{org:n}=Ne();let r;t[0]!==n.id?(r={connectionId:Wt,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=Kt(r);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={providerId:"deco"},t[2]=l):l=t[2];let i;t[3]!==o?(i={client:o,toolName:"AI_PROVIDER_CREDITS",toolArguments:l,staleTime:6e4,select:Zs},t[3]=o,t[4]=i):i=t[4];const{data:a,isPending:c,isError:m}=bs(i),d=a?.balanceCents!=null?a.balanceCents/100:null;let u;t[5]!==e?(u=()=>e("org.ai-providers"),t[5]=e,t[6]=u):u=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ot,{size:13,className:"text-muted-foreground/60 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Credits"})]}),t[7]=f):f=t[7];let p;t[8]!==d||t[9]!==m||t[10]!==c?(p=c||m||d==null?s.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/40",children:"—"}):s.jsxs("span",{className:L("text-xs font-medium tabular-nums",Js(d)),children:["$",d.toFixed(2)]}),t[8]=d,t[9]=m,t[10]=c,t[11]=p):p=t[11];let h;return t[12]!==u||t[13]!==p?(h=s.jsxs("button",{type:"button",onClick:u,className:"group-data-[collapsible=icon]:hidden flex items-center justify-between w-full px-2 py-1.5 rounded-md hover:bg-sidebar-accent transition-colors",children:[f,p]}),t[12]=u,t[13]=p,t[14]=h):h=t[14],h}function Zs(t){return t.structuredContent}function en(){const t=I.c(1);if(!Jt().some(tn))return null;let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Xs,{}),t[0]=r):r=t[0],r}function tn(t){return t.providerId==="deco"}function sn(){const t=I.c(13),e=Qs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ys,{children:s.jsx(M.Suspense,{fallback:null,children:s.jsx(en,{})})}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(mt,{})}),t[1]=r):r=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(hs,{asChild:!0,children:s.jsx(Oe,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(Be,{size:16})})}),t[2]=o):o=t[2];let l;t[3]!==e.length?(l=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[3]=e.length,t[4]=l):l=t[4];let i;t[5]!==l?(i=s.jsxs("div",{className:"relative",children:[o,l]}),t[5]=l,t[6]=i):i=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[7]=a):a=t[7];let c;t[8]!==e?(c=s.jsxs(xs,{side:"right",align:"end",sideOffset:24,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:[a,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Be,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(nn)})]}),t[8]=e,t[9]=c):c=t[9];let m;return t[10]!==i||t[11]!==c?(m=s.jsxs(Mt,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:[n,s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[r,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs(gs,{children:[i,c]})})]})})})]}),t[10]=i,t[11]=c,t[12]=m):m=t[12],m}function nn(t){return s.jsx(Vs,{invitation:t},t.id)}function rn(t){const e=I.c(11),{project:n}=t,r=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let c;return e[0]!==n.ui.icon?(c=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.ui.icon,e[1]=c):c=e[1],c}let o;e[2]!==r?(o={backgroundColor:r},e[2]=r,e[3]=o):o=e[3];let l;e[4]!==n.name?(l=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=l):l=e[5];let i;e[6]!==l?(i=s.jsx("span",{className:"text-[10px] font-medium text-white",children:l}),e[6]=l,e[7]=i):i=e[7];let a;return e[8]!==o||e[9]!==i?(a=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:o,children:i}),e[8]=o,e[9]=i,e[10]=a):a=e[10],a}function on(t){const e=I.c(14),{project:n}=t,r=Le(),{org:o}=Ne();let l;e[0]!==r||e[1]!==o.slug||e[2]!==n.slug?(l=()=>{r({to:"/$org/$project",params:{org:o.slug,project:n.slug}})},e[0]=r,e[1]=o.slug,e[2]=n.slug,e[3]=l):l=e[3];let i;e[4]!==n?(i=s.jsx(rn,{project:n}),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==n.name?(a=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:n.name}),e[6]=n.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ss,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=c):c=e[8];let m;return e[9]!==n.name||e[10]!==l||e[11]!==i||e[12]!==a?(m=s.jsx(ce,{children:s.jsxs(ke,{onClick:l,tooltip:n.name,children:[i,a,c]})}),e[9]=n.name,e[10]=l,e[11]=i,e[12]=a,e[13]=m):m=e[13],m}function ln(){const t=I.c(55),{org:e}=Ne(),{data:n,isLoading:r}=nt(e.id),[o,l]=M.useState(!0),[i,a]=M.useState(!1);let c,m,d,u,f,p,h,N,j,v,y,x,k;if(t[0]!==r||t[1]!==o||t[2]!==n){k=Symbol.for("react.early_return_sentinel");e:{const K=n?.filter(cn)??[];if(r){let E;t[16]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=E):E=t[16];let W;t[17]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(_e,{className:"py-0 px-0",children:s.jsx(Ce,{children:s.jsxs(ue,{className:"gap-0.5",children:[E,s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=W):W=t[17],k=W;break e}x="group/projects-section mt-2",f=Ns,v=o,y=l,u=_e,j="py-0 px-0",d=Ce,m=ue,h="gap-0.5";let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=R):R=t[18];const D=!o&&"-rotate-90";let A;t[19]!==D?(A=L("text-muted-foreground shrink-0 transition-transform duration-200",D),t[19]=D,t[20]=A):A=t[20];let O;t[21]!==A?(O=s.jsx(ys,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[R,s.jsx(it,{size:12,className:A})]})}),t[21]=A,t[22]=O):O=t[22];let z;t[23]===Symbol.for("react.memo_cache_sentinel")?(z=()=>a(!0),t[23]=z):z=t[23];let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("button",{type:"button",onClick:z,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(ve,{size:16})}),t[24]=P):P=t[24],t[25]!==O?(N=s.jsx(ce,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[O,P]})}),t[25]=O,t[26]=N):N=t[26],c=vs,p=K.length===0?s.jsx(ce,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):K.map(an)}t[0]=r,t[1]=o,t[2]=n,t[3]=c,t[4]=m,t[5]=d,t[6]=u,t[7]=f,t[8]=p,t[9]=h,t[10]=N,t[11]=j,t[12]=v,t[13]=y,t[14]=x,t[15]=k}else c=t[3],m=t[4],d=t[5],u=t[6],f=t[7],p=t[8],h=t[9],N=t[10],j=t[11],v=t[12],y=t[13],x=t[14],k=t[15];if(k!==Symbol.for("react.early_return_sentinel"))return k;let $;t[27]!==c||t[28]!==p?($=s.jsx(c,{children:p}),t[27]=c,t[28]=p,t[29]=$):$=t[29];let S;t[30]!==m||t[31]!==h||t[32]!==N||t[33]!==$?(S=s.jsxs(m,{className:h,children:[N,$]}),t[30]=m,t[31]=h,t[32]=N,t[33]=$,t[34]=S):S=t[34];let _;t[35]!==d||t[36]!==S?(_=s.jsx(d,{children:S}),t[35]=d,t[36]=S,t[37]=_):_=t[37];let C;t[38]!==u||t[39]!==_||t[40]!==j?(C=s.jsx(u,{className:j,children:_}),t[38]=u,t[39]=_,t[40]=j,t[41]=C):C=t[41];let U;t[42]!==f||t[43]!==C||t[44]!==v||t[45]!==y?(U=s.jsx(f,{open:v,onOpenChange:y,children:C}),t[42]=f,t[43]=C,t[44]=v,t[45]=y,t[46]=U):U=t[46];let w;t[47]!==U||t[48]!==x?(w=s.jsx("div",{className:x,children:U}),t[47]=U,t[48]=x,t[49]=w):w=t[49];let F;t[50]!==i?(F=s.jsx(et,{open:i,onOpenChange:a}),t[50]=i,t[51]=F):F=t[51];let T;return t[52]!==w||t[53]!==F?(T=s.jsxs(s.Fragment,{children:[w,F]}),t[52]=w,t[53]=F,t[54]=T):T=t[54],T}function an(t){return s.jsx(on,{project:t},t.id)}function cn(t){return t.slug!==Y}function dn(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(M.Suspense,{fallback:s.jsx(_e,{className:"py-0 px-0",children:s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(ln,{})}),t[0]=e):e=t[0],e}function mn(t){const e=I.c(12),{onCreateProject:n}=t,r=Ts(),{locator:o}=Ne();let l;e[0]!==o?(l=Ae.isOrgAdminProject(o),e[0]=o,e[1]=l):l=e[1];const i=l;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Me.Skeleton,{}),e[2]=a):a=e[2];let c;e[3]!==n?(c=s.jsx(M.Suspense,{fallback:a,children:s.jsx(Me,{onCreateProject:n})}),e[3]=n,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(sn,{}),e[5]=m):m=e[5];let d;e[6]!==i?(d=i?s.jsx(Re,{children:s.jsx(M.Suspense,{fallback:null,children:s.jsx(dn,{})})}):null,e[6]=i,e[7]=d):d=e[7];let u;return e[8]!==r||e[9]!==c||e[10]!==d?(u=s.jsx(dt,{sections:r,header:c,footer:m,additionalContent:d}),e[8]=r,e[9]=c,e[10]=d,e[11]=u):u=e[11],u}function un(){const t=I.c(5),n=Ue().location.href;let r;t[0]!==n?(r=n==="/login"||n.startsWith("/login?"),t[0]=n,t[1]=r):r=t[1];const o=r;let l;if(t[2]!==n||t[3]!==o){const i=o?{}:{next:n};l=s.jsx(vt,{to:"/login",search:i,replace:!0}),t[2]=n,t[3]=o,t[4]=l}else l=t[4];return l}function fn(t){const e=I.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(bt,{children:s.jsx(Ye,{})}),e[0]=r):r=e[0];let o;e[1]!==n?(o=s.jsx(Nt,{children:n}),e[1]=n,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(yt,{children:s.jsx(un,{})}),e[3]=l):l=e[3];let i;return e[4]!==o?(i=s.jsxs(s.Fragment,{children:[r,o,l]}),e[4]=o,e[5]=i):i=e[5],i}function pn(t){const e=I.c(10),{children:n,className:r}=t,[,o]=M.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Pe.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,a]=We(l,30);let c;e[1]!==a?(c=f=>o(()=>a(f)),e[1]=a,e[2]=c):c=e[2];const m=c;let d;e[3]!==r?(d=L("min-w-0",r),e[3]=r,e[4]=d):d=e[4];let u;return e[5]!==i||e[6]!==n||e[7]!==m||e[8]!==d?(u=s.jsx(at,{defaultSize:i,minSize:20,className:d,onResize:m,children:n}),e[5]=i,e[6]=n,e[7]=m,e[8]=d,e[9]=u):u=e[9],u}function xn(t){const e=I.c(5),{children:n}=t,r=Ke();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Pe.sidebarOpen(),e[0]=o):o=e[0];const[l,i]=We(o,!0),a=r?!0:l;let c;return e[1]!==n||e[2]!==i||e[3]!==a?(c=s.jsx(Rt,{open:a,onOpenChange:i,children:n}),e[1]=n,e[2]=i,e[3]=a,e[4]=c):c=e[4],c}function hn(t){const e=I.c(6),{onClick:n,isOpen:r}=t,o=r&&"bg-accent text-foreground";let l;e[0]!==o?(l=L("fixed bottom-4 right-4 z-40 flex size-12 items-center justify-center rounded-full shadow-lg transition-colors","bg-primary text-primary-foreground hover:bg-primary/90",o),e[0]=o,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ft,{size:20}),e[2]=i):i=e[2];let a;return e[3]!==n||e[4]!==l?(a=s.jsx("button",{type:"button",onClick:n,className:l,"aria-label":"Toggle chat",children:i}),e[3]=n,e[4]=l,e[5]=a):a=e[5],a}function gn(t){const e=I.c(31),{isHomeRoute:n,onCreateProject:r}=t,[o,l]=Xe(),i=Ke();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Pe.decoChatPanelWidth(),e[0]=a):a=e[0];const[c]=We(a,30),m=`${c}cqi`;let d;e[1]!==m?(d={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":m},e[1]=m,e[2]=d):d=e[2];const u=d;let f;e[3]!==r?(f=s.jsx(mn,{onCreateProject:r}),e[3]=r,e[4]=f):f=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},e[5]=p):p=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h={overflow:"visible"},e[6]=h):h=e[6];let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N={overflow:"visible"},e[7]=N):N=e[7];const j=!i&&o&&"rounded-tr-[0.75rem] border-r",v=i&&"rounded-tr-[0.75rem] border-r";let y;e[8]!==v||e[9]!==j?(y=L("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",j,v),e[8]=v,e[9]=j,e[10]=y):y=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(Je,{})}),e[11]=x):x=e[11];let k;e[12]!==y?(k=s.jsx(at,{className:"min-w-0 flex flex-col",style:N,children:s.jsx("div",{className:y,children:x})}),e[12]=y,e[13]=k):k=e[13];let $;e[14]!==o||e[15]!==n||e[16]!==i?($=!n&&!i&&s.jsxs(s.Fragment,{children:[s.jsx(_s,{className:"bg-sidebar"}),s.jsx(pn,{className:L("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",o?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(Ve,{})})})})]}),e[14]=o,e[15]=n,e[16]=i,e[17]=$):$=e[17];let S;e[18]!==k||e[19]!==$?(S=s.jsx(Lt,{className:"pt-1.5",style:p,children:s.jsxs(ws,{direction:"horizontal",className:"h-full",style:h,children:[k,$]})}),e[18]=k,e[19]=$,e[20]=S):S=e[20];let _;e[21]!==o||e[22]!==n||e[23]!==i||e[24]!==l?(_=!n&&i&&s.jsxs(s.Fragment,{children:[s.jsx(hn,{onClick:()=>l(jn),isOpen:o}),s.jsx(ks,{open:o,onOpenChange:l,direction:"bottom",children:s.jsx(Cs,{className:"h-[95dvh] max-h-[95dvh]",children:s.jsx(Ve,{})})})]}),e[21]=o,e[22]=n,e[23]=i,e[24]=l,e[25]=_):_=e[25];let C;return e[26]!==S||e[27]!==_||e[28]!==u||e[29]!==f?(C=s.jsxs(Ut,{className:"flex-1 bg-sidebar",style:u,children:[f,S,_]}),e[26]=S,e[27]=_,e[28]=u,e[29]=f,e[30]=C):C=e[30],C}function jn(t){return!t}function bn(){const{org:t,project:e}=Qe({strict:!1}),n=Ue(),[r,o]=M.useState(!1),[l,i]=M.useState(!1);M.useEffect(()=>{const u=f=>{wt(f)&&f.code==="KeyK"&&(f.preventDefault(),i(!0))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const a=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,c=e??Y,{data:m}=St({queryKey:kt.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:u}=await xe.organization.setActive({organizationSlug:t});return u&&localStorage.setItem(Pe.lastOrgSlug(),t),{org:u,project:{slug:c,isOrgAdmin:c===Y}}},gcTime:1/0,refetchOnWindowFocus:!1});if(!m)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx("div",{className:"w-fit",children:s.jsx(mt,{})})}),s.jsx(Je,{})]});if(!m.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const d={...m,project:{...m.project,slug:c,isOrgAdmin:c===Y}};return s.jsxs(Ct,{...d,children:[s.jsx(xn,{children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsx(Z.Provider,{children:s.jsx(gn,{isHomeRoute:a,onCreateProject:()=>o(!0)})})})}),s.jsx(et,{open:r,onOpenChange:o}),s.jsx(Is,{open:l,onOpenChange:i})]})}function sr(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(fn,{children:s.jsx(M.Suspense,{fallback:s.jsx(Ye,{}),children:s.jsx(bn,{})})}),t[0]=e):e=t[0],e}export{sr as default};
3
+ Email: ${n.email}`;navigator.clipboard.writeText(W),i(!0),pe.success("User info copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=n.email,e[1]=n.id,e[2]=n.name,e[3]=a):a=e[3];const c=a,m=n.name||n.email||"U";let d;e[4]!==m||e[5]!==r?(d=s.jsx(je,{url:r,fallback:m,shape:"circle",size:"2xs",className:"shrink-0 size-5"}),e[4]=m,e[5]=r,e[6]=d):d=e[6];const u=n.name||"User";let f;e[7]!==u?(f=s.jsx("div",{className:"flex-1 min-w-0 group-data-[collapsible=icon]:hidden",children:s.jsx("div",{className:"text-sm font-medium truncate text-sidebar-foreground leading-none",children:u})}),e[7]=u,e[8]=f):f=e[8];let p;e[9]!==d||e[10]!==f?(p=s.jsx(lt,{asChild:!0,children:s.jsxs("button",{className:"flex w-full h-8 items-center gap-2 rounded-md px-1 hover:bg-sidebar-accent transition-colors text-left min-w-0",children:[d,f]})}),e[9]=d,e[10]=f,e[11]=p):p=e[11];const h=n.name||n.email||"U";let N;e[12]!==h||e[13]!==r?(N=s.jsx(je,{url:r,fallback:h,shape:"circle",size:"sm",className:"shrink-0"}),e[12]=h,e[13]=r,e[14]=N):N=e[14];const j=n.name||"User";let v;e[15]!==j?(v=s.jsx("div",{className:"text-sm font-medium truncate",children:j}),e[15]=j,e[16]=v):v=e[16];let y;e[17]!==n.email?(y=s.jsx("div",{className:"text-xs text-muted-foreground truncate",children:n.email}),e[17]=n.email,e[18]=y):y=e[18];let x;e[19]!==v||e[20]!==y?(x=s.jsxs("div",{className:"flex-1 min-w-0",children:[v,y]}),e[19]=v,e[20]=y,e[21]=x):x=e[21];let k;e[22]!==l?(k=s.jsx("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity shrink-0",children:l?s.jsx(be,{size:14,className:"text-green-600"}):s.jsx(fs,{size:14,className:"text-muted-foreground"})}),e[22]=l,e[23]=k):k=e[23];let $;e[24]!==c||e[25]!==x||e[26]!==k||e[27]!==N?($=s.jsxs(q,{onClick:c,className:"gap-2.5 group",children:[N,x,k]}),e[24]=c,e[25]=x,e[26]=k,e[27]=N,e[28]=$):$=e[28];let S;e[29]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Se,{}),e[29]=S):S=e[29];let _;e[30]!==o?(_=()=>o("account.preferences"),e[30]=o,e[31]=_):_=e[31];let C,U;e[32]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(Ie,{size:14,className:"shrink-0 text-muted-foreground"}),U=s.jsx("span",{children:"Settings"}),e[32]=C,e[33]=U):(C=e[32],U=e[33]);let w;e[34]!==_?(w=s.jsxs(q,{className:"gap-2.5",onClick:_,children:[C,U]}),e[34]=_,e[35]=w):w=e[35];let F;e[36]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/terms-of-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ps,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Terms of Use"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[36]=F):F=e[36];let T;e[37]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://www.decocms.com/privacy-policy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Pt,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Privacy Policy"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[37]=T):T=e[37];let K;e[38]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://github.com/decocms/mesh",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(ht,{className:"w-3.5 h-3.5 shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"decocms/mesh"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[38]=K):K=e[38];let R;e[39]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com/discord",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(Fe,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Community"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),e[39]=R):R=e[39];let D,A;e[40]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(q,{asChild:!0,children:s.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2.5 group",children:[s.jsx(as,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{className:"flex-1",children:"Homepage"}),s.jsx(ge,{size:14,className:"shrink-0 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})}),A=s.jsx(Se,{}),e[40]=D,e[41]=A):(D=e[40],A=e[41]);let O;e[42]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsxs(q,{className:"gap-2.5",onClick:Bs,children:[s.jsx(At,{size:14,className:"shrink-0 text-muted-foreground"}),s.jsx("span",{children:"Sign out"})]}),e[42]=O):O=e[42];let z;e[43]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("div",{className:"px-2 py-1.5",children:s.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.186.1"]})}),e[43]=z):z=e[43];let P;e[44]!==$||e[45]!==w?(P=s.jsxs(rt,{side:"top",align:"end",collisionPadding:8,className:"w-64 flex flex-col gap-0.5",onCloseAutoFocus:qs,children:[$,S,w,F,T,K,R,D,A,O,z]}),e[44]=$,e[45]=w,e[46]=P):P=e[46];let E;return e[47]!==P||e[48]!==p?(E=s.jsxs(ot,{children:[p,P]}),e[47]=P,e[48]=p,e[49]=E):E=e[49],E}function Bs(){return xe.signOut()}function qs(t){return t.preventDefault()}function mt(){const t=I.c(7),{data:e}=xe.useSession();if(!e?.user){let c;return t[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(je,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer h-7 w-7",muted:!0}),t[0]=c):c=t[0],c}const n=e.user,r=n.name??void 0;let o;t[1]!==r||t[2]!==n?(o={...n,name:r},t[1]=r,t[2]=n,t[3]=o):o=t[3];const l=o,i=n.image;let a;return t[4]!==i||t[5]!==l?(a=s.jsx(Gs,{user:l,userImage:i}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function Vs({invitation:t}){const[e,n]=M.useState(!1),[r,o]=M.useState(!1),l=jt(),i=async()=>{n(!0);try{const c=await xe.organization.acceptInvitation({invitationId:t.id});if(c.error)pe.error(c.error.message),n(!1);else{const m=await xe.organization.setActive({organizationId:t.organizationId});pe.success("Invitation accepted!");const d=m?.data?.slug;window.location.href=d?`/${d}`:"/"}}catch{pe.error("Failed to accept invitation"),n(!1)}},a=async()=>{o(!0);try{const c=await xe.organization.rejectInvitation({invitationId:t.id});c.error?(pe.error(c.error.message),o(!1)):(pe.success("Invitation declined"),l.invalidateQueries())}catch{pe.error("Failed to decline invitation"),o(!1)}};return s.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),s.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),s.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[s.jsx(Oe,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:i,disabled:e||r,"aria-label":"Accept invitation",children:s.jsx(be,{size:14})}),s.jsx(Oe,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||r,"aria-label":"Decline invitation",children:s.jsx(js,{size:14})})]})]})}function Qs(){const t=M.useContext(gt),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(r=>r.status==="pending"&&new Date(r.expiresAt)>new Date)}class Ys extends M.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,n){}render(){return this.state.hasError?null:this.props.children}}function Js(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Xs(){const t=I.c(15),{open:e}=tt(),{org:n}=Ne();let r;t[0]!==n.id?(r={connectionId:Wt,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=Kt(r);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={providerId:"deco"},t[2]=l):l=t[2];let i;t[3]!==o?(i={client:o,toolName:"AI_PROVIDER_CREDITS",toolArguments:l,staleTime:6e4,select:Zs},t[3]=o,t[4]=i):i=t[4];const{data:a,isPending:c,isError:m}=bs(i),d=a?.balanceCents!=null?a.balanceCents/100:null;let u;t[5]!==e?(u=()=>e("org.ai-providers"),t[5]=e,t[6]=u):u=t[6];let f;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"flex items-center gap-1.5",children:[s.jsx(Ot,{size:13,className:"text-muted-foreground/60 shrink-0"}),s.jsx("span",{className:"text-xs text-muted-foreground",children:"Credits"})]}),t[7]=f):f=t[7];let p;t[8]!==d||t[9]!==m||t[10]!==c?(p=c||m||d==null?s.jsx("span",{className:"text-xs font-medium tabular-nums text-muted-foreground/40",children:"—"}):s.jsxs("span",{className:L("text-xs font-medium tabular-nums",Js(d)),children:["$",d.toFixed(2)]}),t[8]=d,t[9]=m,t[10]=c,t[11]=p):p=t[11];let h;return t[12]!==u||t[13]!==p?(h=s.jsxs("button",{type:"button",onClick:u,className:"group-data-[collapsible=icon]:hidden flex items-center justify-between w-full px-2 py-1.5 rounded-md hover:bg-sidebar-accent transition-colors",children:[f,p]}),t[12]=u,t[13]=p,t[14]=h):h=t[14],h}function Zs(t){return t.structuredContent}function en(){const t=I.c(1);if(!Jt().some(tn))return null;let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Xs,{}),t[0]=r):r=t[0],r}function tn(t){return t.providerId==="deco"}function sn(){const t=I.c(13),e=Qs();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(Ys,{children:s.jsx(M.Suspense,{fallback:null,children:s.jsx(en,{})})}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(mt,{})}),t[1]=r):r=t[1];let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(hs,{asChild:!0,children:s.jsx(Oe,{variant:"ghost",size:"icon",className:"size-8 text-sidebar-foreground/50 hover:text-sidebar-foreground hover:bg-sidebar-accent","aria-label":"Open inbox",children:s.jsx(Be,{size:16})})}),t[2]=o):o=t[2];let l;t[3]!==e.length?(l=e.length>0&&s.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 ring-2 ring-sidebar pointer-events-none"}),t[3]=e.length,t[4]=l):l=t[4];let i;t[5]!==l?(i=s.jsxs("div",{className:"relative",children:[o,l]}),t[5]=l,t[6]=i):i=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:s.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[7]=a):a=t[7];let c;t[8]!==e?(c=s.jsxs(xs,{side:"right",align:"end",sideOffset:24,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:[a,e.length===0?s.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[s.jsx(Be,{size:24,className:"text-muted-foreground/50"}),s.jsx("p",{className:"text-sm font-medium text-foreground",children:"No messages or invites pending"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Messages, workspace and project invitations will appear here"})]}):s.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(nn)})]}),t[8]=e,t[9]=c):c=t[9];let m;return t[10]!==i||t[11]!==c?(m=s.jsxs(Mt,{className:"px-3.5 pb-3 group-data-[collapsible=icon]:px-2",children:[n,s.jsx(ue,{children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center w-full gap-1",children:[r,s.jsx("div",{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs(gs,{children:[i,c]})})]})})})]}),t[10]=i,t[11]=c,t[12]=m):m=t[12],m}function nn(t){return s.jsx(Vs,{invitation:t},t.id)}function rn(t){const e=I.c(11),{project:n}=t,r=n.ui?.themeColor??"#60a5fa";if(n.ui?.icon){let c;return e[0]!==n.ui.icon?(c=s.jsx("img",{src:n.ui.icon,alt:"",className:"size-4 rounded object-cover border border-border/50"}),e[0]=n.ui.icon,e[1]=c):c=e[1],c}let o;e[2]!==r?(o={backgroundColor:r},e[2]=r,e[3]=o):o=e[3];let l;e[4]!==n.name?(l=n.name.charAt(0).toUpperCase(),e[4]=n.name,e[5]=l):l=e[5];let i;e[6]!==l?(i=s.jsx("span",{className:"text-[10px] font-medium text-white",children:l}),e[6]=l,e[7]=i):i=e[7];let a;return e[8]!==o||e[9]!==i?(a=s.jsx("div",{className:"size-4 rounded flex items-center justify-center border border-border/50",style:o,children:i}),e[8]=o,e[9]=i,e[10]=a):a=e[10],a}function on(t){const e=I.c(14),{project:n}=t,r=Le(),{org:o}=Ne();let l;e[0]!==r||e[1]!==o.slug||e[2]!==n.slug?(l=()=>{r({to:"/$org/$project",params:{org:o.slug,project:n.slug}})},e[0]=r,e[1]=o.slug,e[2]=n.slug,e[3]=l):l=e[3];let i;e[4]!==n?(i=s.jsx(rn,{project:n}),e[4]=n,e[5]=i):i=e[5];let a;e[6]!==n.name?(a=s.jsx("span",{className:"truncate flex-1 group-data-[collapsible=icon]:hidden",children:n.name}),e[6]=n.name,e[7]=a):a=e[7];let c;e[8]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ss,{size:12,className:"text-muted-foreground opacity-0 group-hover/item:opacity-100 transition-opacity group-data-[collapsible=icon]:hidden"}),e[8]=c):c=e[8];let m;return e[9]!==n.name||e[10]!==l||e[11]!==i||e[12]!==a?(m=s.jsx(ce,{children:s.jsxs(ke,{onClick:l,tooltip:n.name,children:[i,a,c]})}),e[9]=n.name,e[10]=l,e[11]=i,e[12]=a,e[13]=m):m=e[13],m}function ln(){const t=I.c(55),{org:e}=Ne(),{data:n,isLoading:r}=nt(e.id),[o,l]=M.useState(!0),[i,a]=M.useState(!1);let c,m,d,u,f,p,h,N,j,v,y,x,k;if(t[0]!==r||t[1]!==o||t[2]!==n){k=Symbol.for("react.early_return_sentinel");e:{const K=n?.filter(cn)??[];if(r){let E;t[16]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})}),t[16]=E):E=t[16];let W;t[17]===Symbol.for("react.memo_cache_sentinel")?(W=s.jsx(_e,{className:"py-0 px-0",children:s.jsx(Ce,{children:s.jsxs(ue,{className:"gap-0.5",children:[E,s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})]})})}),t[17]=W):W=t[17],k=W;break e}x="group/projects-section mt-2",f=Ns,v=o,y=l,u=_e,j="py-0 px-0",d=Ce,m=ue,h="gap-0.5";let R;t[18]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Projects"}),t[18]=R):R=t[18];const D=!o&&"-rotate-90";let A;t[19]!==D?(A=L("text-muted-foreground shrink-0 transition-transform duration-200",D),t[19]=D,t[20]=A):A=t[20];let O;t[21]!==A?(O=s.jsx(ys,{asChild:!0,children:s.jsxs("button",{type:"button",className:"flex flex-1 items-center gap-1 cursor-pointer min-w-0",children:[R,s.jsx(it,{size:12,className:A})]})}),t[21]=A,t[22]=O):O=t[22];let z;t[23]===Symbol.for("react.memo_cache_sentinel")?(z=()=>a(!0),t[23]=z):z=t[23];let P;t[24]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx("button",{type:"button",onClick:z,title:"Create new project",className:"opacity-0 group-hover/projects-section:opacity-100 transition-opacity text-muted-foreground hover:text-foreground flex items-center justify-center h-4 rounded shrink-0",children:s.jsx(ve,{size:16})}),t[24]=P):P=t[24],t[25]!==O?(N=s.jsx(ce,{className:"group-data-[collapsible=icon]:hidden",children:s.jsxs("div",{className:"flex h-6 w-full items-center gap-1 rounded-md pl-1.5 pr-0.5 hover:bg-sidebar-accent transition-colors",children:[O,P]})}),t[25]=O,t[26]=N):N=t[26],c=vs,p=K.length===0?s.jsx(ce,{children:s.jsx("div",{className:"px-2 py-2 text-xs text-muted-foreground",children:"No projects yet"})}):K.map(an)}t[0]=r,t[1]=o,t[2]=n,t[3]=c,t[4]=m,t[5]=d,t[6]=u,t[7]=f,t[8]=p,t[9]=h,t[10]=N,t[11]=j,t[12]=v,t[13]=y,t[14]=x,t[15]=k}else c=t[3],m=t[4],d=t[5],u=t[6],f=t[7],p=t[8],h=t[9],N=t[10],j=t[11],v=t[12],y=t[13],x=t[14],k=t[15];if(k!==Symbol.for("react.early_return_sentinel"))return k;let $;t[27]!==c||t[28]!==p?($=s.jsx(c,{children:p}),t[27]=c,t[28]=p,t[29]=$):$=t[29];let S;t[30]!==m||t[31]!==h||t[32]!==N||t[33]!==$?(S=s.jsxs(m,{className:h,children:[N,$]}),t[30]=m,t[31]=h,t[32]=N,t[33]=$,t[34]=S):S=t[34];let _;t[35]!==d||t[36]!==S?(_=s.jsx(d,{children:S}),t[35]=d,t[36]=S,t[37]=_):_=t[37];let C;t[38]!==u||t[39]!==_||t[40]!==j?(C=s.jsx(u,{className:j,children:_}),t[38]=u,t[39]=_,t[40]=j,t[41]=C):C=t[41];let U;t[42]!==f||t[43]!==C||t[44]!==v||t[45]!==y?(U=s.jsx(f,{open:v,onOpenChange:y,children:C}),t[42]=f,t[43]=C,t[44]=v,t[45]=y,t[46]=U):U=t[46];let w;t[47]!==U||t[48]!==x?(w=s.jsx("div",{className:x,children:U}),t[47]=U,t[48]=x,t[49]=w):w=t[49];let F;t[50]!==i?(F=s.jsx(et,{open:i,onOpenChange:a}),t[50]=i,t[51]=F):F=t[51];let T;return t[52]!==w||t[53]!==F?(T=s.jsxs(s.Fragment,{children:[w,F]}),t[52]=w,t[53]=F,t[54]=T):T=t[54],T}function an(t){return s.jsx(on,{project:t},t.id)}function cn(t){return t.slug!==Y}function dn(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(M.Suspense,{fallback:s.jsx(_e,{className:"py-0 px-0",children:s.jsx(Ce,{children:s.jsx(ue,{className:"gap-0.5",children:s.jsx(ce,{children:s.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[s.jsx(ee,{className:"h-4 w-4 rounded"}),s.jsx(ee,{className:"h-4 flex-1"})]})})})})}),children:s.jsx(ln,{})}),t[0]=e):e=t[0],e}function mn(t){const e=I.c(12),{onCreateProject:n}=t,r=Ts(),{locator:o}=Ne();let l;e[0]!==o?(l=Ae.isOrgAdminProject(o),e[0]=o,e[1]=l):l=e[1];const i=l;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(Me.Skeleton,{}),e[2]=a):a=e[2];let c;e[3]!==n?(c=s.jsx(M.Suspense,{fallback:a,children:s.jsx(Me,{onCreateProject:n})}),e[3]=n,e[4]=c):c=e[4];let m;e[5]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(sn,{}),e[5]=m):m=e[5];let d;e[6]!==i?(d=i?s.jsx(Re,{children:s.jsx(M.Suspense,{fallback:null,children:s.jsx(dn,{})})}):null,e[6]=i,e[7]=d):d=e[7];let u;return e[8]!==r||e[9]!==c||e[10]!==d?(u=s.jsx(dt,{sections:r,header:c,footer:m,additionalContent:d}),e[8]=r,e[9]=c,e[10]=d,e[11]=u):u=e[11],u}function un(){const t=I.c(5),n=Ue().location.href;let r;t[0]!==n?(r=n==="/login"||n.startsWith("/login?"),t[0]=n,t[1]=r):r=t[1];const o=r;let l;if(t[2]!==n||t[3]!==o){const i=o?{}:{next:n};l=s.jsx(vt,{to:"/login",search:i,replace:!0}),t[2]=n,t[3]=o,t[4]=l}else l=t[4];return l}function fn(t){const e=I.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(bt,{children:s.jsx(Ye,{})}),e[0]=r):r=e[0];let o;e[1]!==n?(o=s.jsx(Nt,{children:n}),e[1]=n,e[2]=o):o=e[2];let l;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(yt,{children:s.jsx(un,{})}),e[3]=l):l=e[3];let i;return e[4]!==o?(i=s.jsxs(s.Fragment,{children:[r,o,l]}),e[4]=o,e[5]=i):i=e[5],i}function pn(t){const e=I.c(10),{children:n,className:r}=t,[,o]=M.useTransition();let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=Pe.decoChatPanelWidth(),e[0]=l):l=e[0];const[i,a]=We(l,30);let c;e[1]!==a?(c=f=>o(()=>a(f)),e[1]=a,e[2]=c):c=e[2];const m=c;let d;e[3]!==r?(d=L("min-w-0",r),e[3]=r,e[4]=d):d=e[4];let u;return e[5]!==i||e[6]!==n||e[7]!==m||e[8]!==d?(u=s.jsx(at,{defaultSize:i,minSize:20,className:d,onResize:m,children:n}),e[5]=i,e[6]=n,e[7]=m,e[8]=d,e[9]=u):u=e[9],u}function xn(t){const e=I.c(5),{children:n}=t,r=Ke();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=Pe.sidebarOpen(),e[0]=o):o=e[0];const[l,i]=We(o,!0),a=r?!0:l;let c;return e[1]!==n||e[2]!==i||e[3]!==a?(c=s.jsx(Rt,{open:a,onOpenChange:i,children:n}),e[1]=n,e[2]=i,e[3]=a,e[4]=c):c=e[4],c}function hn(t){const e=I.c(6),{onClick:n,isOpen:r}=t,o=r&&"bg-accent text-foreground";let l;e[0]!==o?(l=L("fixed bottom-4 right-4 z-40 flex size-12 items-center justify-center rounded-full shadow-lg transition-colors","bg-primary text-primary-foreground hover:bg-primary/90",o),e[0]=o,e[1]=l):l=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ft,{size:20}),e[2]=i):i=e[2];let a;return e[3]!==n||e[4]!==l?(a=s.jsx("button",{type:"button",onClick:n,className:l,"aria-label":"Toggle chat",children:i}),e[3]=n,e[4]=l,e[5]=a):a=e[5],a}function gn(t){const e=I.c(31),{isHomeRoute:n,onCreateProject:r}=t,[o,l]=Xe(),i=Ke();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=Pe.decoChatPanelWidth(),e[0]=a):a=e[0];const[c]=We(a,30),m=`${c}cqi`;let d;e[1]!==m?(d={"--sidebar-width":"13.5rem","--sidebar-width-mobile":"11rem","--chat-panel-w":m},e[1]=m,e[2]=d):d=e[2];const u=d;let f;e[3]!==r?(f=s.jsx(mn,{onCreateProject:r}),e[3]=r,e[4]=f):f=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},e[5]=p):p=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h={overflow:"visible"},e[6]=h):h=e[6];let N;e[7]===Symbol.for("react.memo_cache_sentinel")?(N={overflow:"visible"},e[7]=N):N=e[7];const j=!i&&o&&"rounded-tr-[0.75rem] border-r",v=i&&"rounded-tr-[0.75rem] border-r";let y;e[8]!==v||e[9]!==j?(y=L("flex flex-col flex-1 min-h-0 bg-card overflow-hidden","border-t border-l border-sidebar-border","rounded-tl-[0.75rem]","transition-[border-radius] duration-200 ease-[var(--ease-out-quart)]",j,v),e[8]=v,e[9]=j,e[10]=y):y=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(Je,{})}),e[11]=x):x=e[11];let k;e[12]!==y?(k=s.jsx(at,{className:"min-w-0 flex flex-col",style:N,children:s.jsx("div",{className:y,children:x})}),e[12]=y,e[13]=k):k=e[13];let $;e[14]!==o||e[15]!==n||e[16]!==i?($=!n&&!i&&s.jsxs(s.Fragment,{children:[s.jsx(_s,{className:"bg-sidebar"}),s.jsx(pn,{className:L("transition-[max-width] duration-200 ease-[var(--ease-out-quart)] overflow-hidden",o?"max-w-[var(--chat-panel-w)] bg-sidebar":"max-w-0"),children:s.jsx("div",{className:"h-full min-w-[var(--chat-panel-w)] pl-1.5 pr-1.5 pb-1.5",children:s.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden border border-sidebar-border shadow-sm",children:s.jsx(Ve,{})})})})]}),e[14]=o,e[15]=n,e[16]=i,e[17]=$):$=e[17];let S;e[18]!==k||e[19]!==$?(S=s.jsx(Lt,{className:"pt-1.5",style:p,children:s.jsxs(ws,{direction:"horizontal",className:"h-full",style:h,children:[k,$]})}),e[18]=k,e[19]=$,e[20]=S):S=e[20];let _;e[21]!==o||e[22]!==n||e[23]!==i||e[24]!==l?(_=!n&&i&&s.jsxs(s.Fragment,{children:[s.jsx(hn,{onClick:()=>l(jn),isOpen:o}),s.jsx(ks,{open:o,onOpenChange:l,direction:"bottom",children:s.jsx(Cs,{className:"h-[95dvh] max-h-[95dvh]",children:s.jsx(Ve,{})})})]}),e[21]=o,e[22]=n,e[23]=i,e[24]=l,e[25]=_):_=e[25];let C;return e[26]!==S||e[27]!==_||e[28]!==u||e[29]!==f?(C=s.jsxs(Ut,{className:"flex-1 bg-sidebar",style:u,children:[f,S,_]}),e[26]=S,e[27]=_,e[28]=u,e[29]=f,e[30]=C):C=e[30],C}function jn(t){return!t}function bn(){const{org:t,project:e}=Qe({strict:!1}),n=Ue(),[r,o]=M.useState(!1),[l,i]=M.useState(!1);M.useEffect(()=>{const u=f=>{wt(f)&&f.code==="KeyK"&&(f.preventDefault(),i(!0))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const a=n.location.pathname===`/${t}/${e}`||n.location.pathname===`/${t}/${e}/`,c=e??Y,{data:m}=St({queryKey:kt.activeOrganization(t),queryFn:async()=>{if(!t)return null;const{data:u}=await xe.organization.setActive({organizationSlug:t});return u&&localStorage.setItem(Pe.lastOrgSlug(),t),{org:u,project:{slug:c,isOrgAdmin:c===Y}}},gcTime:1/0,refetchOnWindowFocus:!1});if(!m)return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("header",{className:"h-12 flex items-center justify-end px-4 border-b border-border",children:s.jsx("div",{className:"w-fit",children:s.jsx(mt,{})})}),s.jsx(Je,{})]});if(!m.org)return window.location.pathname!=="/"&&(window.location.href="/"),null;const d={...m,project:{...m.project,slug:c,isOrgAdmin:c===Y}};return s.jsxs(Ct,{...d,children:[s.jsx(xn,{children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsx(Z.Provider,{children:s.jsx(gn,{isHomeRoute:a,onCreateProject:()=>o(!0)})})})}),s.jsx(et,{open:r,onOpenChange:o}),s.jsx(Is,{open:l,onOpenChange:i})]})}function sr(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(fn,{children:s.jsx(M.Suspense,{fallback:s.jsx(Ye,{}),children:s.jsx(bn,{})})}),t[0]=e):e=t[0],e}export{sr as default};
@@ -1 +1 @@
1
- import{c as E,u as q,j as n,w as F,K as v,r as k,v as _,B as O}from"./index-DLW7tZdu.js";import{u as L}from"./useQuery-YHvrmKkI.js";import{u as R}from"./useMutation-BatnVMWS.js";import{S as V}from"./switch-DqWbwfAd.js";import{I as A}from"./input-DgJ0xjPE.js";import{u as K,a as U}from"./constants-Dzy_AMuL.js";import{g as J}from"./types-vQT8OD6B.js";import{u as w}from"./unwrap-tool-result-BYXdCQMg.js";function M(s){const e=E.c(33),{connection:t,pinnedViews:o,isSaving:u,onTogglePin:h,onLabelChange:f}=s;if(t.uiTools.length===0)return null;let j;e[0]!==t.id||e[1]!==o?(j=x=>o.some(c=>c.connectionId===t.id&&c.toolName===x),e[0]=t.id,e[1]=o,e[2]=j):j=e[2];const N=j;let g;e[3]!==t.icon||e[4]!==t.title?(g=t.icon?n.jsx("img",{src:t.icon,alt:"",className:"size-4 shrink-0 rounded"}):n.jsx("div",{className:"size-4 shrink-0 rounded bg-muted flex items-center justify-center",children:n.jsx("span",{className:"text-[8px] font-medium text-muted-foreground",children:t.title.charAt(0).toUpperCase()})}),e[3]=t.icon,e[4]=t.title,e[5]=g):g=e[5];let p;e[6]!==t.title?(p=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.title}),e[6]=t.title,e[7]=p):p=e[7];let l;e[8]!==g||e[9]!==p?(l=n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[g,p]}),e[8]=g,e[9]=p,e[10]=l):l=e[10];let d;if(e[11]!==t.icon||e[12]!==t.id||e[13]!==t.uiTools||e[14]!==N||e[15]!==u||e[16]!==f||e[17]!==h||e[18]!==o){let x;e[20]!==t.icon||e[21]!==t.id||e[22]!==N||e[23]!==u||e[24]!==f||e[25]!==h||e[26]!==o?(x=c=>{const P=N(c.name),I=o.find(S=>S.connectionId===t.id&&S.toolName===c.name);return n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",children:[n.jsxs("div",{className:"flex items-center justify-between gap-6 py-3 cursor-pointer",onClick:()=>h(t.id,c.name,t.icon),children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:c.name}),c.description&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c.description})]}),n.jsx("div",{onClick:$,className:"shrink-0",children:n.jsx(V,{checked:P,onCheckedChange:()=>h(t.id,c.name,t.icon),disabled:u})})]}),P&&I&&n.jsxs("div",{className:"pb-3 pl-0 flex items-center gap-3",onClick:Q,children:[n.jsx("label",{className:"text-xs text-muted-foreground w-12 shrink-0",children:"Label"}),n.jsx(A,{value:I.label,onChange:S=>f(t.id,c.name,S.target.value),className:"h-8 text-sm w-56",disabled:u})]})]},c.name)},e[20]=t.icon,e[21]=t.id,e[22]=N,e[23]=u,e[24]=f,e[25]=h,e[26]=o,e[27]=x):x=e[27],d=t.uiTools.map(x),e[11]=t.icon,e[12]=t.id,e[13]=t.uiTools,e[14]=N,e[15]=u,e[16]=f,e[17]=h,e[18]=o,e[19]=d}else d=e[19];let m;e[28]!==d?(m=n.jsx("div",{className:"flex flex-col",children:d}),e[28]=d,e[29]=m):m=e[29];let C;return e[30]!==l||e[31]!==m?(C=n.jsxs("div",{children:[l,m]}),e[30]=l,e[31]=m,e[32]=C):C=e[32],C}function Q(s){return s.stopPropagation()}function $(s){return s.stopPropagation()}function z(){const{org:s,project:e}=q(),t=K({connectionId:U,orgId:s.id}),o=F(),u=e.id??"",{data:h}=L({queryKey:v.projectConnections(u),enabled:!!e.id,queryFn:async()=>{const i=await t.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:u}});return w(i)}}),f=h?.connections??[],j=f.map(i=>i.id).sort(),{data:N}=L({queryKey:v.projectConnectionDetails(u,j),enabled:j.length>0,queryFn:async()=>await Promise.all(f.map(async a=>{try{const y=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:a.id}}),{item:T}=w(y),r=(T?.tools??[]).filter(b=>!!J(b._meta)).map(b=>({name:b.name,description:b.description}));return{id:a.id,title:a.title,icon:a.icon,uiTools:r}}catch{return{id:a.id,title:a.title,icon:a.icon,uiTools:[]}}}))}),g=N??[],p=e.ui?.pinnedViews??[],[l,d]=k.useState(p),[m,C]=k.useState(!1),x=JSON.stringify(l)!==JSON.stringify(p),c=(i,a,y)=>{const T=l.some(r=>r.connectionId===i&&r.toolName===a);d(T?r=>r.filter(b=>!(b.connectionId===i&&b.toolName===a)):r=>[...r,{connectionId:i,toolName:a,label:a,icon:y}])},P=(i,a,y)=>{d(T=>T.map(r=>r.connectionId===i&&r.toolName===a?{...r,label:y}:r))},I=R({mutationFn:async()=>{const i=await t.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:e.id,pinnedViews:l}});w(i)},onSuccess:()=>{o.invalidateQueries({queryKey:v.project(s.id,e.slug)}),_.success("Sidebar updated")},onError:i=>{_.error("Failed to update sidebar: "+(i instanceof Error?i.message:"Unknown error"))},onSettled:()=>C(!1)}),S=()=>{C(!0),I.mutate()},D=()=>{d(p)};return f.length===0?n.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections associated with this project. Add connections in the Dependencies section first."}):n.jsxs("div",{className:"space-y-6",children:[g.map(i=>n.jsx(M,{connection:i,pinnedViews:l,isSaving:m,onTogglePin:c,onLabelChange:P},i.id)),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(O,{variant:"outline",onClick:D,disabled:!x||m,children:"Cancel"}),n.jsx(O,{onClick:S,disabled:!x||m,children:m?"Saving...":"Save Changes"})]})]})}function B(){const s=E.c(3),{project:e}=q();let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Sidebar"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Pin interactive tools from your dependencies to the project sidebar for quick access."})]}),s[0]=t):t=s[0];let o;return s[1]!==e.id?(o=n.jsxs("div",{className:"flex flex-col gap-6",children:[t,n.jsx(z,{},e.id)]}),s[1]=e.id,s[2]=o):o=s[2],o}function ne(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(B,{}),s[0]=e):e=s[0],e}export{ne as default};
1
+ import{c as E,u as q,j as n,w as F,K as v,r as k,v as _,B as O}from"./index-BRbdC8tb.js";import{u as L}from"./useQuery-C31bP6Ck.js";import{u as R}from"./useMutation-C_Uj7oOe.js";import{S as V}from"./switch-DgSoD5A_.js";import{I as A}from"./input-BOjviNKP.js";import{u as K,a as U}from"./constants-2OCwh60p.js";import{g as J}from"./types-DPAE4wXV.js";import{u as w}from"./unwrap-tool-result-BYXdCQMg.js";function M(s){const e=E.c(33),{connection:t,pinnedViews:o,isSaving:u,onTogglePin:h,onLabelChange:f}=s;if(t.uiTools.length===0)return null;let j;e[0]!==t.id||e[1]!==o?(j=x=>o.some(c=>c.connectionId===t.id&&c.toolName===x),e[0]=t.id,e[1]=o,e[2]=j):j=e[2];const N=j;let g;e[3]!==t.icon||e[4]!==t.title?(g=t.icon?n.jsx("img",{src:t.icon,alt:"",className:"size-4 shrink-0 rounded"}):n.jsx("div",{className:"size-4 shrink-0 rounded bg-muted flex items-center justify-center",children:n.jsx("span",{className:"text-[8px] font-medium text-muted-foreground",children:t.title.charAt(0).toUpperCase()})}),e[3]=t.icon,e[4]=t.title,e[5]=g):g=e[5];let p;e[6]!==t.title?(p=n.jsx("h3",{className:"text-sm font-medium text-foreground",children:t.title}),e[6]=t.title,e[7]=p):p=e[7];let l;e[8]!==g||e[9]!==p?(l=n.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[g,p]}),e[8]=g,e[9]=p,e[10]=l):l=e[10];let d;if(e[11]!==t.icon||e[12]!==t.id||e[13]!==t.uiTools||e[14]!==N||e[15]!==u||e[16]!==f||e[17]!==h||e[18]!==o){let x;e[20]!==t.icon||e[21]!==t.id||e[22]!==N||e[23]!==u||e[24]!==f||e[25]!==h||e[26]!==o?(x=c=>{const P=N(c.name),I=o.find(S=>S.connectionId===t.id&&S.toolName===c.name);return n.jsxs("div",{className:"flex flex-col border-b border-border last:border-0",children:[n.jsxs("div",{className:"flex items-center justify-between gap-6 py-3 cursor-pointer",onClick:()=>h(t.id,c.name,t.icon),children:[n.jsxs("div",{className:"min-w-0 flex-1",children:[n.jsx("p",{className:"text-sm font-medium text-foreground",children:c.name}),c.description&&n.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:c.description})]}),n.jsx("div",{onClick:$,className:"shrink-0",children:n.jsx(V,{checked:P,onCheckedChange:()=>h(t.id,c.name,t.icon),disabled:u})})]}),P&&I&&n.jsxs("div",{className:"pb-3 pl-0 flex items-center gap-3",onClick:Q,children:[n.jsx("label",{className:"text-xs text-muted-foreground w-12 shrink-0",children:"Label"}),n.jsx(A,{value:I.label,onChange:S=>f(t.id,c.name,S.target.value),className:"h-8 text-sm w-56",disabled:u})]})]},c.name)},e[20]=t.icon,e[21]=t.id,e[22]=N,e[23]=u,e[24]=f,e[25]=h,e[26]=o,e[27]=x):x=e[27],d=t.uiTools.map(x),e[11]=t.icon,e[12]=t.id,e[13]=t.uiTools,e[14]=N,e[15]=u,e[16]=f,e[17]=h,e[18]=o,e[19]=d}else d=e[19];let m;e[28]!==d?(m=n.jsx("div",{className:"flex flex-col",children:d}),e[28]=d,e[29]=m):m=e[29];let C;return e[30]!==l||e[31]!==m?(C=n.jsxs("div",{children:[l,m]}),e[30]=l,e[31]=m,e[32]=C):C=e[32],C}function Q(s){return s.stopPropagation()}function $(s){return s.stopPropagation()}function z(){const{org:s,project:e}=q(),t=K({connectionId:U,orgId:s.id}),o=F(),u=e.id??"",{data:h}=L({queryKey:v.projectConnections(u),enabled:!!e.id,queryFn:async()=>{const i=await t.callTool({name:"PROJECT_CONNECTION_LIST",arguments:{projectId:u}});return w(i)}}),f=h?.connections??[],j=f.map(i=>i.id).sort(),{data:N}=L({queryKey:v.projectConnectionDetails(u,j),enabled:j.length>0,queryFn:async()=>await Promise.all(f.map(async a=>{try{const y=await t.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:a.id}}),{item:T}=w(y),r=(T?.tools??[]).filter(b=>!!J(b._meta)).map(b=>({name:b.name,description:b.description}));return{id:a.id,title:a.title,icon:a.icon,uiTools:r}}catch{return{id:a.id,title:a.title,icon:a.icon,uiTools:[]}}}))}),g=N??[],p=e.ui?.pinnedViews??[],[l,d]=k.useState(p),[m,C]=k.useState(!1),x=JSON.stringify(l)!==JSON.stringify(p),c=(i,a,y)=>{const T=l.some(r=>r.connectionId===i&&r.toolName===a);d(T?r=>r.filter(b=>!(b.connectionId===i&&b.toolName===a)):r=>[...r,{connectionId:i,toolName:a,label:a,icon:y}])},P=(i,a,y)=>{d(T=>T.map(r=>r.connectionId===i&&r.toolName===a?{...r,label:y}:r))},I=R({mutationFn:async()=>{const i=await t.callTool({name:"PROJECT_PINNED_VIEWS_UPDATE",arguments:{projectId:e.id,pinnedViews:l}});w(i)},onSuccess:()=>{o.invalidateQueries({queryKey:v.project(s.id,e.slug)}),_.success("Sidebar updated")},onError:i=>{_.error("Failed to update sidebar: "+(i instanceof Error?i.message:"Unknown error"))},onSettled:()=>C(!1)}),S=()=>{C(!0),I.mutate()},D=()=>{d(p)};return f.length===0?n.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No connections associated with this project. Add connections in the Dependencies section first."}):n.jsxs("div",{className:"space-y-6",children:[g.map(i=>n.jsx(M,{connection:i,pinnedViews:l,isSaving:m,onTogglePin:c,onLabelChange:P},i.id)),n.jsxs("div",{className:"flex items-center gap-3 pt-4",children:[n.jsx(O,{variant:"outline",onClick:D,disabled:!x||m,children:"Cancel"}),n.jsx(O,{onClick:S,disabled:!x||m,children:m?"Saving...":"Save Changes"})]})]})}function B(){const s=E.c(3),{project:e}=q();let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsxs("div",{children:[n.jsx("h2",{className:"text-base font-semibold text-foreground",children:"Sidebar"}),n.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Pin interactive tools from your dependencies to the project sidebar for quick access."})]}),s[0]=t):t=s[0];let o;return s[1]!==e.id?(o=n.jsxs("div",{className:"flex flex-col gap-6",children:[t,n.jsx(z,{},e.id)]}),s[1]=e.id,s[2]=o):o=s[2],o}function ne(){const s=E.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(B,{}),s[0]=e):e=s[0],e}export{ne as default};
@@ -1 +1 @@
1
- import{c as n,D as c,j as i}from"./index-DLW7tZdu.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
1
+ import{c as n,D as c,j as i}from"./index-BRbdC8tb.js";function m(o){const e=n.c(8);let s,t;e[0]!==o?({className:s,...t}=o,e[0]=o,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let l;e[3]!==s?(l=c("bg-accent animate-pulse rounded-md",s),e[3]=s,e[4]=l):l=e[4];let a;return e[5]!==t||e[6]!==l?(a=i.jsx("div",{"data-slot":"skeleton",className:l,...t}),e[5]=t,e[6]=l,e[7]=a):a=e[7],a}export{m as S};
@@ -1 +1 @@
1
- import{c as C,D as d,W as m,j as a}from"./index-DLW7tZdu.js";const u=m("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{c as C,D as d,W as m,j as a}from"./index-BRbdC8tb.js";const u=m("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=d(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
@@ -1 +1 @@
1
- import{c as h,g as S,j as o,A as x,S as g,k as j,m as b,d,f as y,O as N,N as p}from"./index-DLW7tZdu.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=d(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=d(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
1
+ import{c as h,g as S,j as o,A as x,S as g,k as j,m as b,d,f as y,O as N,N as p}from"./index-BRbdC8tb.js";function R(e){const t=h.c(5),{appName:l}=e;let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},t[0]=s):s=t[0];const n=d(s);let a;if(t[1]!==n){const r=new URLSearchParams;for(const[_,u]of Object.entries(n))u!=null&&r.set(_,String(u));a=r.toString(),t[1]=n,t[2]=a}else a=t[2];const f=a,c=`/store/${encodeURIComponent(l)}${f?`?${f}`:""}`;let i;return t[3]!==c?(i=o.jsx(p,{to:"/login",search:{next:c},replace:!0}),t[3]=c,t[4]=i):i=t[4],i}function $(){const e=h.c(10);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s={strict:!1},e[1]=s):s=e[1];const n=d(s),{data:a,isPending:f}=y.useListOrganizations();if(f){let r;return e[2]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(g,{}),e[2]=r):r=e[2],r}const m=a?.[0];if(!m){let r;return e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx(p,{to:"/",replace:!0}),e[3]=r):r=e[3],r}let c;e[4]!==l||e[5]!==m.slug?(c={org:m.slug,project:N,appName:l},e[4]=l,e[5]=m.slug,e[6]=c):c=e[6];let i;return e[7]!==n||e[8]!==c?(i=o.jsx(p,{to:"/$org/$project/store/$appName",params:c,search:n,replace:!0}),e[7]=n,e[8]=c,e[9]=i):i=e[9],i}function v(){const e=h.c(5);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={strict:!1},e[0]=t):t=e[0];const{appName:l}=S(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx(x,{children:o.jsx(g,{})}),e[1]=s):s=e[1];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=o.jsx(j,{children:o.jsx($,{})}),e[2]=n):n=e[2];let a;return e[3]!==l?(a=o.jsxs(o.Fragment,{children:[s,n,o.jsx(b,{children:o.jsx(R,{appName:l})})]}),e[3]=l,e[4]=a):a=e[4],a}export{v as default};
@@ -1 +1 @@
1
- import{r as c,j as i,_ as C,$ as y,Y as T,a1 as I,a5 as M,a6 as H,a4 as z,c as A,D as g}from"./index-DLW7tZdu.js";var m="Switch",[U]=z(m),[$,q]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs($,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",_=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=q(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});_.displayName=P;var D="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=D;function j(r){return r?"checked":"unchecked"}var L=E,O=_;function W(r){const e=A.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(O,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx(L,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
1
+ import{r as c,j as i,_ as C,$ as y,Y as T,a1 as I,a5 as M,a6 as H,a4 as z,c as A,D as g}from"./index-BRbdC8tb.js";var m="Switch",[U]=z(m),[$,q]=U(m),E=c.forwardRef((r,e)=>{const{__scopeSwitch:t,name:s,checked:a,defaultChecked:n,required:o,disabled:d,value:u="on",onCheckedChange:k,form:l,...w}=r,[p,h]=c.useState(null),v=y(e,b=>h(b)),x=c.useRef(!1),S=p?l||!!p.closest("form"):!0,[f,N]=T({prop:a,defaultProp:n??!1,onChange:k,caller:m});return i.jsxs($,{scope:t,checked:f,disabled:d,children:[i.jsx(C.button,{type:"button",role:"switch","aria-checked":f,"aria-required":o,"data-state":j(f),"data-disabled":d?"":void 0,disabled:d,value:u,...w,ref:v,onClick:I(r.onClick,b=>{N(B=>!B),S&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),S&&i.jsx(R,{control:p,bubbles:!x.current,name:s,value:u,checked:f,required:o,disabled:d,form:l,style:{transform:"translateX(-100%)"}})]})});E.displayName=m;var P="SwitchThumb",_=c.forwardRef((r,e)=>{const{__scopeSwitch:t,...s}=r,a=q(P,t);return i.jsx(C.span,{"data-state":j(a.checked),"data-disabled":a.disabled?"":void 0,...s,ref:e})});_.displayName=P;var D="SwitchBubbleInput",R=c.forwardRef(({__scopeSwitch:r,control:e,checked:t,bubbles:s=!0,...a},n)=>{const o=c.useRef(null),d=y(o,n),u=M(t),k=H(e);return c.useEffect(()=>{const l=o.current;if(!l)return;const w=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==t&&h){const v=new Event("click",{bubbles:s});h.call(l,t),l.dispatchEvent(v)}},[u,t,s]),i.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:t,...a,tabIndex:-1,ref:d,style:{...a.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});R.displayName=D;function j(r){return r?"checked":"unchecked"}var L=E,O=_;function W(r){const e=A.c(9);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=g("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),e[3]=t,e[4]=a):a=e[4];let n;e[5]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(O,{"data-slot":"switch-thumb",className:g("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")}),e[5]=n):n=e[5];let o;return e[6]!==s||e[7]!==a?(o=i.jsx(L,{"data-slot":"switch",className:a,...s,children:n}),e[6]=s,e[7]=a,e[8]=o):o=e[8],o}export{W as S};
@@ -1 +1 @@
1
- import{c as r,D as i,j as c}from"./index-DLW7tZdu.js";function d(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{d as T,b as a,p as b,m as c,f as d,u as e};
1
+ import{c as r,D as i,j as c}from"./index-BRbdC8tb.js";function d(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("w-full caption-bottom text-sm min-w-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("div",{"data-slot":"table-container",className:"w-full min-w-0 bg-background",children:c.jsx("table",{"data-slot":"table",className:s,...l})}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function b(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr]:border-b sticky top-0 z-10 bg-background",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("thead",{"data-slot":"table-header",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function f(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("[&_tr:last-child]:border-0",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tbody",{"data-slot":"table-body",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function p(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("data-[state=selected]:bg-muted border-b transition-colors",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("tr",{"data-slot":"table-row",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function m(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("th",{"data-slot":"table-head",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}function u(o){const e=r.c(8);let t,l;e[0]!==o?({className:t,...l}=o,e[0]=o,e[1]=t,e[2]=l):(t=e[1],l=e[2]);let s;e[3]!==t?(s=i("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),e[3]=t,e[4]=s):s=e[4];let a;return e[5]!==l||e[6]!==s?(a=c.jsx("td",{"data-slot":"table-cell",className:s,...l}),e[5]=l,e[6]=s,e[7]=a):a=e[7],a}export{d as T,b as a,p as b,m as c,f as d,u as e};