decocms 2.292.1 → 2.293.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/client/assets/{AlertCircle-Cx8oex2u.js → AlertCircle-DnJbX_0w.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DtpIYMrr.js → ArrowNarrowLeft-M9-X6Sxy.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-BBjaHjTK.js → ArrowUpRight-BQK-oA7E.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-Mywkb82K.js → CheckCircle-BTDGGZJo.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BE0rQ4ho.js → ChevronDown-D098IDk9.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-BVJ2HUMt.js → ChevronRight-DIr3-XeU.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-B2y_5HwX.js → ChevronUp-qt4sL4uC.js} +1 -1
  8. package/dist/client/assets/{Container-CtsNRge8.js → Container-BvdKvtbe.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-BQnGY6Nc.js → DotsVertical-DGFUAKYN.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-SieYyhiZ.js → LinkExternal01-CS_vTEL0.js} +1 -1
  11. package/dist/client/assets/{Lock01-BrFrkt3t.js → Lock01-DepQhBci.js} +1 -1
  12. package/dist/client/assets/{Palette-2CChK5yr.js → Palette-SeD4BOqL.js} +1 -1
  13. package/dist/client/assets/{Play-BfzIvHVC.js → Play-B2WhNMxb.js} +1 -1
  14. package/dist/client/assets/{Plus-kLSd3TZy.js → Plus-6a_0gFD5.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-B-L6FvMp.js → RefreshCcw01-CmGHOB_j.js} +1 -1
  16. package/dist/client/assets/{SearchMd-BfBE-dHK.js → SearchMd-B4RJoOIR.js} +1 -1
  17. package/dist/client/assets/{Settings02-EP4I50bB.js → Settings02-86F4b3dQ.js} +1 -1
  18. package/dist/client/assets/{Shield01-D19-LRUf.js → Shield01-CzaXyqoU.js} +1 -1
  19. package/dist/client/assets/{Star01-MuiWZ8GS.js → Star01-BsL_E8DX.js} +1 -1
  20. package/dist/client/assets/{Sun-CTLobT4y.js → Sun-CoYtwe4c.js} +1 -1
  21. package/dist/client/assets/{Tool01-CeBylvMu.js → Tool01-Cxeqfwwz.js} +1 -1
  22. package/dist/client/assets/{Trash01-BLGcALKg.js → Trash01-Crqeojj8.js} +1 -1
  23. package/dist/client/assets/{User01-BLHrCCyy.js → User01-lfQ-qZIG.js} +1 -1
  24. package/dist/client/assets/{Users03-C3QqJn94.js → Users03-BEcIfaLP.js} +1 -1
  25. package/dist/client/assets/{X-BJbamPEP.js → X-DSm8Y-S-.js} +1 -1
  26. package/dist/client/assets/{XCircle-DP5EGLqX.js → XCircle-D0NNu2cU.js} +1 -1
  27. package/dist/client/assets/{XClose-BRn4UVuG.js → XClose-8tp9nQPE.js} +1 -1
  28. package/dist/client/assets/{Zap-kZUu0No-.js → Zap-GnwBp_Qp.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-B3o6QvJe.js → ZapSquare-DgxRVJjy.js} +1 -1
  30. package/dist/client/assets/accordion-CJq3HBrS.js +1 -0
  31. package/dist/client/assets/agent-icon-DxobcFDr.js +1 -0
  32. package/dist/client/assets/agents-list-eEeKypKu.js +1 -0
  33. package/dist/client/assets/ai-providers-D_bgIPsh.js +1 -0
  34. package/dist/client/assets/{alert-dialog-BFg1HHbW.js → alert-dialog-CscciHzk.js} +2 -2
  35. package/dist/client/assets/{auth-catchall-BPCBowrT.js → auth-catchall-DZZidYw0.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-0e1qSQoQ.js → automation-list-row-Br_pkbGs.js} +1 -1
  37. package/dist/client/assets/automations-Ch3eQvio.js +1 -0
  38. package/dist/client/assets/{avatar-BfSY5CVM.js → avatar-BQ09Qk0Z.js} +1 -1
  39. package/dist/client/assets/{badge-C_B8gNbw.js → badge-Clg4Tzdw.js} +1 -1
  40. package/dist/client/assets/brand-context-DZl3n4iE.js +1 -0
  41. package/dist/client/assets/{card-G6flwhwa.js → card-DUOq7Rl6.js} +1 -1
  42. package/dist/client/assets/chat-context-CfrtTY3a.js +31 -0
  43. package/dist/client/assets/{checkbox-LBmczTXJ.js → checkbox-D2GZcsVt.js} +1 -1
  44. package/dist/client/assets/collection-detail-ChjtG6Ga.js +1 -0
  45. package/dist/client/assets/collection-display-button-BZwsY1Wv.js +1 -0
  46. package/dist/client/assets/{collection-search-DoXoIAYq.js → collection-search-CzSQR8Hb.js} +1 -1
  47. package/dist/client/assets/{collection-search-CsSMb59s.js → collection-search-DW3g3zGc.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-B2fVBjE4.js → collection-table-wrapper-B84Op-Zk.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-CA1SpsaZ.js → collection-tabs-DVyOXsXh.js} +1 -1
  50. package/dist/client/assets/{collections-BAHpsq0P.js → collections-CzE8C7FB.js} +1 -1
  51. package/dist/client/assets/{command-CJYPyBOh.js → command-ChcvD0z3.js} +1 -1
  52. package/dist/client/assets/{connection-card-DZ1fYoPr.js → connection-card-C2vEoZIt.js} +1 -1
  53. package/dist/client/assets/connection-detail-BGY9VwYa.js +1 -0
  54. package/dist/client/assets/connection-form-helpers-CgA-QNzF.js +1 -0
  55. package/dist/client/assets/connections-DRgi7C4U.js +1 -0
  56. package/dist/client/assets/{constants-B-gCw63I.js → constants-CrD_AMxD.js} +1 -1
  57. package/dist/client/assets/{constants-Dw_UtizE.js → constants-nJzh8CYx.js} +2 -2
  58. package/dist/client/assets/{dialog-DjZXbytL.js → dialog-CVDAkUpR.js} +1 -1
  59. package/dist/client/assets/domain-settings-ClmaftJG.js +1 -0
  60. package/dist/client/assets/{drawer-BFBl_9mB.js → drawer-CFg3CiQr.js} +1 -1
  61. package/dist/client/assets/dropdown-menu-gP2-wJTw.js +1 -0
  62. package/dist/client/assets/dynamic-plugin-layout-DZA29J1C.js +1 -0
  63. package/dist/client/assets/{empty-state-CWYR2iH4.js → empty-state-C2PUUqhT.js} +1 -1
  64. package/dist/client/assets/{empty-state-DskpQs8Q.js → empty-state-CPpC79-7.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-DiYA0QYt.js → extract-connection-data-5g73Imwy.js} +1 -1
  66. package/dist/client/assets/features-CeA9UMCz.js +1 -0
  67. package/dist/client/assets/form-yPmbpUVF.js +1 -0
  68. package/dist/client/assets/general-CX6-dTKZ.js +1 -0
  69. package/dist/client/assets/index-B3vDeqTk.js +1 -0
  70. package/dist/client/assets/{index-Bm_-4bAj.js → index-BYM0cbyk.js} +3 -3
  71. package/dist/client/assets/{index-QvZR-ABK.js → index-BdUJIICa.js} +1 -1
  72. package/dist/client/assets/index-BzSFWy5-.js +189 -0
  73. package/dist/client/assets/index-C3hSkh4S.js +1 -0
  74. package/dist/client/assets/index-CXbGCxBV.js +547 -0
  75. package/dist/client/assets/{index-BnoHDdAn.js → index-CfanpUI7.js} +3 -3
  76. package/dist/client/assets/{index-x18ABRVV.js → index-CqrrK0SQ.js} +1 -1
  77. package/dist/client/assets/{index-DA_fcz0a.js → index-CsTWePfc.js} +1 -1
  78. package/dist/client/assets/index-DImBkhtD.js +1 -0
  79. package/dist/client/assets/index-Dbs2wH7N.js +1 -0
  80. package/dist/client/assets/index-DkZMRzTR.js +1 -0
  81. package/dist/client/assets/index-Dkaetwrr.js +142 -0
  82. package/dist/client/assets/{index-CllFnV9J.js → index-Dlk19fTc.js} +1 -1
  83. package/dist/client/assets/index-b9vWbQjO.js +1 -0
  84. package/dist/client/assets/{index-Bu0xhzLF.js → index-gKZjkMnf.js} +26 -26
  85. package/dist/client/assets/{infiniteQueryObserver-DEk-T30Y.js → infiniteQueryObserver-B9PWohpE.js} +1 -1
  86. package/dist/client/assets/{input-B5aMagwc.js → input-Cet4kRAV.js} +1 -1
  87. package/dist/client/assets/{integration-icon-B5mNngh-.js → integration-icon-BYjt2zM8.js} +1 -1
  88. package/dist/client/assets/{label-Bv4VMaQH.js → label-CaWfIbuT.js} +1 -1
  89. package/dist/client/assets/layout-BgwHTi9m.js +1 -0
  90. package/dist/client/assets/lean-canvas-recruit-modal-CNtMOKiS.js +116 -0
  91. package/dist/client/assets/{login-DFTX50_T.js → login-DDBhfkxa.js} +1 -1
  92. package/dist/client/assets/{members-BbGgTXF7.js → members-CpZry3vM.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-CV15HqlU.js → monaco-editor-D2GSkzL1.js} +1 -1
  94. package/dist/client/assets/{monitoring-stats-row-FCrYNYUL.js → monitoring-stats-row-B9-AgFrN.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-W1x4HvAt.js → oauth-callback-ZTQDmTMI.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-8jGGtkD-.js → oauth-callback-ai-provider-Gd1uARX2.js} +1 -1
  97. package/dist/client/assets/{onboarding-DiKHM7MB.js → onboarding-8fDDt_RN.js} +1 -1
  98. package/dist/client/assets/{org-layout-B-bINoer.js → org-layout-Bw77z4Sw.js} +1 -1
  99. package/dist/client/assets/org-plugin-layout-BIXLREf_.js +1 -0
  100. package/dist/client/assets/{task-status-D3v6N-jY.js → pair-CSF6pLZy.js} +40 -40
  101. package/dist/client/assets/plugin-empty-state-D452cObw.js +1 -0
  102. package/dist/client/assets/plugin-header-DesRdhcy.js +1 -0
  103. package/dist/client/assets/{plugin-layout-2a2a-fWN.js → plugin-layout-cW34W41Y.js} +1 -1
  104. package/dist/client/assets/{popover-CGtNHDEz.js → popover-dpRZqzOJ.js} +1 -1
  105. package/dist/client/assets/profile-AXVJhA8D.js +1 -0
  106. package/dist/client/assets/project-app-view-C0WWCGe_.js +1 -0
  107. package/dist/client/assets/registry-91e7KTfr.js +2 -0
  108. package/dist/client/assets/{registry-layout-YWa06n-y.js → registry-layout-DWruz43b.js} +1 -1
  109. package/dist/client/assets/required-auth-layout-DVgyyuV-.js +1 -0
  110. package/dist/client/assets/{reset-password-CfhsLJCK.js → reset-password-jjqpZRxZ.js} +1 -1
  111. package/dist/client/assets/roles-Bf8vBKyU.js +1 -0
  112. package/dist/client/assets/scroll-area-CH9Vosbx.js +1 -0
  113. package/dist/client/assets/{search-input-DRzVzeWW.js → search-input-BTdLweUR.js} +1 -1
  114. package/dist/client/assets/select-B6R2tTSM.js +1 -0
  115. package/dist/client/assets/{select-model-BdV3Nm5y.js → select-model-BMdrDFa3.js} +1 -1
  116. package/dist/client/assets/settings-layout-CnrVmFqe.js +1 -0
  117. package/dist/client/assets/{settings-section-nyO0fOgx.js → settings-section-Z9FmAPIg.js} +1 -1
  118. package/dist/client/assets/shell-layout-DaB5J-du.js +1 -0
  119. package/dist/client/assets/{skeleton-ClT50YXx.js → skeleton-BhVqr-eG.js} +1 -1
  120. package/dist/client/assets/sso-DZJw-CAn.js +1 -0
  121. package/dist/client/assets/store-D-L6Gt6i.js +1 -0
  122. package/dist/client/assets/store-registry-DdZCk03l.js +2 -0
  123. package/dist/client/assets/{switch-Bp1Tvx2h.js → switch-D_DqyrYW.js} +1 -1
  124. package/dist/client/assets/{table-BL7WuMkY.js → table-D1_6e_tY.js} +1 -1
  125. package/dist/client/assets/{tabs-CNz9F6wL.js → tabs-Bu_QsdLq.js} +1 -1
  126. package/dist/client/assets/task-status-DKnoaN0K.js +1 -0
  127. package/dist/client/assets/{textarea-BxmFQbso.js → textarea-BPX5qWaA.js} +1 -1
  128. package/dist/client/assets/{toggle-group-B4KaadHq.js → toggle-group-BJxlfhsN.js} +1 -1
  129. package/dist/client/assets/tools-list-CjPOU8GA.js +1 -0
  130. package/dist/client/assets/tooltip-DlUl6zVU.js +1 -0
  131. package/dist/client/assets/{types-BtVZ_7jK.js → types-CUVoLk-m.js} +6 -6
  132. package/dist/client/assets/{use-ai-providers-DqhLue8O.js → use-ai-providers-CKSasQTP.js} +1 -1
  133. package/dist/client/assets/{use-collections-CLt7BhQ3.js → use-collections-DKaygmj-.js} +1 -1
  134. package/dist/client/assets/{use-connection-BCV5VAjQ.js → use-connection-DLwIHVYP.js} +1 -1
  135. package/dist/client/assets/{use-copy-CYT1tdMJ.js → use-copy-CLL1wnsg.js} +1 -1
  136. package/dist/client/assets/use-create-virtual-mcp-B693GvUD.js +1 -0
  137. package/dist/client/assets/{use-decopilot-events-BNaQbe7E.js → use-decopilot-events-NXGOEGvZ.js} +1 -1
  138. package/dist/client/assets/{use-delete-connection-YzycomMd.js → use-delete-connection-DN8HxHVx.js} +1 -1
  139. package/dist/client/assets/{use-infinite-scroll-CoMWGssU.js → use-infinite-scroll-B32XN73V.js} +1 -1
  140. package/dist/client/assets/{use-list-state-jiGNrC7M.js → use-list-state-Cwr5OloB.js} +1 -1
  141. package/dist/client/assets/{use-mcp-tools-yi4edHzR.js → use-mcp-tools-CyPVbfii.js} +1 -1
  142. package/dist/client/assets/{use-members-BPb2gPfy.js → use-members-C8bjIWu8.js} +1 -1
  143. package/dist/client/assets/use-navigate-to-agent-DuF5pNCT.js +1 -0
  144. package/dist/client/assets/{use-org-sso-CEfAe1W3.js → use-org-sso-pbiXxD33.js} +1 -1
  145. package/dist/client/assets/{use-organization-roles-1TjtICKp.js → use-organization-roles-7NVaQG9M.js} +1 -1
  146. package/dist/client/assets/{use-organization-settings-B98QP_Ve.js → use-organization-settings-DpXizr85.js} +1 -1
  147. package/dist/client/assets/{use-registry-connections-D0FgXcrs.js → use-registry-connections-BFqaVIUz.js} +1 -1
  148. package/dist/client/assets/{use-status-sounds-B5WhjryL.js → use-status-sounds-DVyydX5_.js} +1 -1
  149. package/dist/client/assets/{use-tasks-COeMfIn8.js → use-tasks-tzb1zUeQ.js} +1 -1
  150. package/dist/client/assets/use-view-mode-D9sT86SW.js +1 -0
  151. package/dist/client/assets/{use-virtual-mcp-CZoeCuBL.js → use-virtual-mcp-SIWEo5E_.js} +1 -1
  152. package/dist/client/assets/useInfiniteQuery-B3rxurAJ.js +1 -0
  153. package/dist/client/assets/useSuspenseInfiniteQuery-KPnhOQU0.js +1 -0
  154. package/dist/client/assets/{user-CWcWoefF.js → user-DxM-AJLw.js} +1 -1
  155. package/dist/client/assets/view-mode-toggle-CussfoqD.js +1 -0
  156. package/dist/client/assets/workflow-a5DJAs_-.js +1 -0
  157. package/dist/client/assets/workflow-detail-DqMXf6Es.js +1 -0
  158. package/dist/client/index.html +1 -1
  159. package/dist/server/cli.js +1 -1
  160. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  161. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  162. package/dist/server/node_modules/ansi-styles/license +9 -0
  163. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  164. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  165. package/dist/server/node_modules/environment/index.d.ts +74 -0
  166. package/dist/server/node_modules/environment/index.js +47 -0
  167. package/dist/server/node_modules/environment/license +9 -0
  168. package/dist/server/node_modules/environment/package.json +74 -0
  169. package/dist/server/node_modules/environment/readme.md +94 -0
  170. package/dist/server/node_modules/escape-string-regexp/index.d.ts +18 -0
  171. package/dist/server/node_modules/escape-string-regexp/index.js +11 -0
  172. package/dist/server/node_modules/escape-string-regexp/license +9 -0
  173. package/dist/server/node_modules/escape-string-regexp/package.json +43 -0
  174. package/dist/server/node_modules/escape-string-regexp/readme.md +29 -0
  175. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
  176. package/dist/server/node_modules/is-fullwidth-code-point/index.js +12 -0
  177. package/dist/server/node_modules/is-fullwidth-code-point/license +9 -0
  178. package/dist/server/node_modules/is-fullwidth-code-point/package.json +53 -0
  179. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +31 -0
  180. package/dist/server/node_modules/is-unicode-supported/index.d.ts +12 -0
  181. package/dist/server/node_modules/is-unicode-supported/index.js +21 -0
  182. package/dist/server/node_modules/is-unicode-supported/license +9 -0
  183. package/dist/server/node_modules/is-unicode-supported/package.json +47 -0
  184. package/dist/server/node_modules/is-unicode-supported/readme.md +35 -0
  185. package/dist/server/node_modules/pg-pool/LICENSE +21 -0
  186. package/dist/server/node_modules/pg-pool/README.md +357 -0
  187. package/dist/server/node_modules/pg-pool/esm/index.mjs +5 -0
  188. package/dist/server/node_modules/pg-pool/index.js +517 -0
  189. package/dist/server/node_modules/pg-pool/package.json +51 -0
  190. package/dist/server/node_modules/string-width/index.d.ts +39 -0
  191. package/dist/server/node_modules/string-width/index.js +82 -0
  192. package/dist/server/node_modules/string-width/license +9 -0
  193. package/dist/server/node_modules/string-width/package.json +64 -0
  194. package/dist/server/node_modules/string-width/readme.md +66 -0
  195. package/package.json +1 -1
  196. package/dist/client/assets/accordion-BP1gqDGq.js +0 -1
  197. package/dist/client/assets/agent-icon-Db8xI2bq.js +0 -1
  198. package/dist/client/assets/agents-list-CKkZAwkG.js +0 -1
  199. package/dist/client/assets/ai-providers-Cnvjm1DV.js +0 -1
  200. package/dist/client/assets/automations-Cr0E7mF8.js +0 -1
  201. package/dist/client/assets/brand-context-DMrJlbv3.js +0 -1
  202. package/dist/client/assets/chat-context-BJBiG4eq.js +0 -30
  203. package/dist/client/assets/collection-detail-D_lV_A0m.js +0 -1
  204. package/dist/client/assets/collection-display-button-BXL1tYdg.js +0 -1
  205. package/dist/client/assets/connection-detail-DGI32gtH.js +0 -1
  206. package/dist/client/assets/connection-form-helpers-Dim-adMo.js +0 -1
  207. package/dist/client/assets/connections-Dl4MUHeU.js +0 -1
  208. package/dist/client/assets/domain-settings-NIhMIJvG.js +0 -1
  209. package/dist/client/assets/dropdown-menu--l1OQ6xu.js +0 -1
  210. package/dist/client/assets/dynamic-plugin-layout-D8kk92gE.js +0 -1
  211. package/dist/client/assets/features-j7f3i077.js +0 -1
  212. package/dist/client/assets/form-BVdbuwTF.js +0 -1
  213. package/dist/client/assets/general-BLunjYWc.js +0 -1
  214. package/dist/client/assets/github-repo-picker-ku0KWxb8.js +0 -116
  215. package/dist/client/assets/index-CHcfXh0a.js +0 -1
  216. package/dist/client/assets/index-ClmOj0lo.js +0 -735
  217. package/dist/client/assets/index-I_6bIMcX.js +0 -1
  218. package/dist/client/assets/layout-ChoVtsz2.js +0 -1
  219. package/dist/client/assets/org-plugin-layout-enuMys5H.js +0 -1
  220. package/dist/client/assets/plugin-empty-state-DCR5r8Zj.js +0 -1
  221. package/dist/client/assets/plugin-header-DX2ycNO6.js +0 -1
  222. package/dist/client/assets/profile-C0rN-ocq.js +0 -1
  223. package/dist/client/assets/project-app-view-CQsZ6NHk.js +0 -1
  224. package/dist/client/assets/registry-BO2q_Gke.js +0 -2
  225. package/dist/client/assets/required-auth-layout-emsOE3qR.js +0 -1
  226. package/dist/client/assets/roles-BDsBxvE0.js +0 -1
  227. package/dist/client/assets/scroll-area-CoWBmpAM.js +0 -142
  228. package/dist/client/assets/select-DerdayxE.js +0 -1
  229. package/dist/client/assets/settings-layout-B3TmxZwq.js +0 -1
  230. package/dist/client/assets/shell-layout-cKwbYqFy.js +0 -1
  231. package/dist/client/assets/sso-DXETt_Ed.js +0 -1
  232. package/dist/client/assets/store-BBgqe7Dc.js +0 -1
  233. package/dist/client/assets/store-registry-DKa8Ghfu.js +0 -2
  234. package/dist/client/assets/tools-list-BNtwzSa4.js +0 -1
  235. package/dist/client/assets/use-create-virtual-mcp-DPW_d2QJ.js +0 -1
  236. package/dist/client/assets/use-mobile-BACO9YYc.js +0 -1
  237. package/dist/client/assets/use-navigate-to-agent-DbPOuTIs.js +0 -1
  238. package/dist/client/assets/use-view-mode-BLlR5qfu.js +0 -1
  239. package/dist/client/assets/useInfiniteQuery-BiAZtptE.js +0 -1
  240. package/dist/client/assets/useSuspenseInfiniteQuery-CPbx6xDm.js +0 -1
  241. package/dist/client/assets/view-mode-toggle-C_B0ABFw.js +0 -1
  242. package/dist/client/assets/workflow-Cq9jV44q.js +0 -1
  243. package/dist/client/assets/workflow-detail-CaiPxMVe.js +0 -1
@@ -0,0 +1 @@
1
+ import{e as o,j as t,Z as n}from"./index-gKZjkMnf.js";function a(){const s=o.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),s[0]=e):e=s[0],e}export{a as default};
@@ -0,0 +1 @@
1
+ import{e as S,j as s,r as w,Z as y}from"./index-gKZjkMnf.js";import{i as R,t as _}from"./ChevronDown-D098IDk9.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
@@ -1 +1 @@
1
- import{r as B,e as D,j as s,s as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-Bu0xhzLF.js";import{u as ae}from"./use-connection-BCV5VAjQ.js";import{S as ce,u as ue,k as de}from"./constants-Dw_UtizE.js";import{a as me}from"./Settings02-EP4I50bB.js";import{P as z}from"./index-CHcfXh0a.js";const fe=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,n=h;let l;return e[0]!==m||e[1]!==n?(l=s.jsx(fe.Provider,{value:n,children:m}),e[0]=m,e[1]=n,e[2]=l):l=e[2],l}B.createContext(null);function ge(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(59),{bindingName:h,renderEmptyState:m}=i,{org:n,project:l}=X(),k=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:T,taskId:w,pluginId:f}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:g}=ne.useSession();let _;e[4]!==n.id?(_={connectionId:ce,orgId:n.id},e[4]=n.id,e[5]=_):_=e[5];const O=ue(_);let x;e[6]!==f||e[7]!==l.id?(x=se.projectPluginConfig(l.id??"",f),e[6]=f,e[7]=l.id,e[8]=x):x=e[8];let p;e[9]!==f||e[10]!==l.id||e[11]!==O?(p=async()=>{const t=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:f}});return t.structuredContent??t},e[9]=f,e[10]=l.id,e[11]=O,e[12]=p):p=e[12];const U=!!l.id&&!!f;let v;e[13]!==x||e[14]!==p||e[15]!==U?(v={queryKey:x,queryFn:p,enabled:U},e[13]=x,e[14]=p,e[15]=U,e[16]=v):v=e[16];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(t=>t.id===R):null,y=de({connectionId:C?.id,orgId:n.id});let b;e[17]!==g?(b=g?.user?{user:{id:g.user.id,name:g.user.name,email:g.user.email,image:g.user.image}}:null,e[17]=g,e[18]=b):b=e[18];const a=b;let N;e[19]!==n.id||e[20]!==n.name||e[21]!==n.slug?(N={id:n.id,slug:n.slug,name:n.name},e[19]=n.id,e[20]=n.name,e[21]=n.slug,e[22]=N):N=e[22];const c=N;if(Q){let t;return e[23]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[23]=t):t=e[23],t}if(K.length===0){let t;e[24]!==c||e[25]!==a?(t={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[24]=c,e[25]=a,e[26]=t):t=e[26];const u=t;let r;e[27]!==m?(r=m(),e[27]=m,e[28]=r):r=e[28];let o;e[29]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[29]=r,e[30]=o):o=e[30];let d;return e[31]!==u||e[32]!==o?(d=s.jsx(F,{value:u,children:o}),e[31]=u,e[32]=o,e[33]=d):d=e[33],d}if(!C){let t;e[34]!==c||e[35]!==a?(t={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[34]=c,e[35]=a,e[36]=t):t=e[36];const u=t;let r;e[37]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[37]=r):r=e[37];let o;e[38]!==k||e[39]!==n.slug||e[40]!==T||e[41]!==l.id||e[42]!==w||e[43]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=T??n.slug,J=G??l.id??"",W=w??crypto.randomUUID();k({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[38]=k,e[39]=n.slug,e[40]=T,e[41]=l.id,e[42]=w,e[43]=G,e[44]=o):o=e[44];let d;return e[45]!==u||e[46]!==o?(d=s.jsx(F,{value:u,children:o}),e[45]=u,e[46]=o,e[47]=d):d=e[47],d}const Y=C.id,$=ge(C);let S;e[48]!==y?(S=(t,u)=>y?y.callTool({name:t,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[48]=y,e[49]=S):S=e[49];const q=S;let E;e[50]!==C||e[51]!==c||e[52]!==a||e[53]!==$||e[54]!==q?(E={connectionId:Y,connection:$,toolCaller:q,org:c,session:a},e[50]=C,e[51]=c,e[52]=a,e[53]=$,e[54]=q,e[55]=E):E=e[55];const A=E;let L;e[56]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[56]=L):L=e[56];let M;return e[57]!==A?(M=s.jsx(F,{value:A,children:L}),e[57]=A,e[58]=M):M=e[58],M}function xe(i){return i.structuredContent??i}export{_e as P};
1
+ import{r as B,e as D,j as s,s as X,f as Z,g as ee,d as te,b as ne,K as se,n as ie,O as le,l as oe,B as re}from"./index-gKZjkMnf.js";import{u as ae}from"./use-connection-DLwIHVYP.js";import{S as ce,u as ue,k as de}from"./constants-nJzh8CYx.js";import{a as me}from"./Settings02-86F4b3dQ.js";import{P as z}from"./index-C3hSkh4S.js";const fe=B.createContext(null);function F(i){const e=D.c(3),{value:h,children:m}=i,n=h;let l;return e[0]!==m||e[1]!==n?(l=s.jsx(fe.Provider,{value:n,children:m}),e[0]=m,e[1]=n,e[2]=l):l=e[2],l}B.createContext(null);function ge(i){return{id:i.id,title:i.title,icon:i.icon,description:i.description,app_name:i.app_name,app_id:i.app_id,tools:i.tools,metadata:i.metadata}}function _e(i){const e=D.c(59),{bindingName:h,renderEmptyState:m}=i,{org:n,project:l}=X(),k=Z();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={strict:!1},e[0]=j):j=e[0];const{org:T,taskId:w,pluginId:f}=ee(j);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I={strict:!1},e[1]=I):I=e[1];const G=te(I).virtualmcpid;let P;e[2]!==h?(P={binding:h},e[2]=h,e[3]=P):P=e[3];const K=ae(P),{data:g}=ne.useSession();let _;e[4]!==n.id?(_={connectionId:ce,orgId:n.id},e[4]=n.id,e[5]=_):_=e[5];const O=ue(_);let x;e[6]!==f||e[7]!==l.id?(x=se.projectPluginConfig(l.id??"",f),e[6]=f,e[7]=l.id,e[8]=x):x=e[8];let p;e[9]!==f||e[10]!==l.id||e[11]!==O?(p=async()=>{const t=await O.callTool({name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",arguments:{virtualMcpId:l.id,pluginId:f}});return t.structuredContent??t},e[9]=f,e[10]=l.id,e[11]=O,e[12]=p):p=e[12];const U=!!l.id&&!!f;let v;e[13]!==x||e[14]!==p||e[15]!==U?(v={queryKey:x,queryFn:p,enabled:U},e[13]=x,e[14]=p,e[15]=U,e[16]=v):v=e[16];const{data:V,isLoading:Q}=ie(v),R=V?.config?.connectionId,C=R?K.find(t=>t.id===R):null,y=de({connectionId:C?.id,orgId:n.id});let b;e[17]!==g?(b=g?.user?{user:{id:g.user.id,name:g.user.name,email:g.user.email,image:g.user.image}}:null,e[17]=g,e[18]=b):b=e[18];const a=b;let N;e[19]!==n.id||e[20]!==n.name||e[21]!==n.slug?(N={id:n.id,slug:n.slug,name:n.name},e[19]=n.id,e[20]=n.name,e[21]=n.slug,e[22]=N):N=e[22];const c=N;if(Q){let t;return e[23]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(oe,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),e[23]=t):t=e[23],t}if(K.length===0){let t;e[24]!==c||e[25]!==a?(t={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[24]=c,e[25]=a,e[26]=t):t=e[26];const u=t;let r;e[27]!==m?(r=m(),e[27]=m,e[28]=r):r=e[28];let o;e[29]!==r?(o=s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:r}),e[29]=r,e[30]=o):o=e[30];let d;return e[31]!==u||e[32]!==o?(d=s.jsx(F,{value:u,children:o}),e[31]=u,e[32]=o,e[33]=d):d=e[33],d}if(!C){let t;e[34]!==c||e[35]!==a?(t={connectionId:null,connection:null,toolCaller:null,org:c,session:a},e[34]=c,e[35]=a,e[36]=t):t=e[36];const u=t;let r;e[37]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(me,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]}),e[37]=r):r=e[37];let o;e[38]!==k||e[39]!==n.slug||e[40]!==T||e[41]!==l.id||e[42]!==w||e[43]!==G?(o=s.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:[r,s.jsx(re,{onClick:()=>{const H=T??n.slug,J=G??l.id??"",W=w??crypto.randomUUID();k({to:"/$org/$taskId",params:{org:H,taskId:W},search:{virtualmcpid:J,main:"settings"}})},children:"Go to Project Settings"})]}),e[38]=k,e[39]=n.slug,e[40]=T,e[41]=l.id,e[42]=w,e[43]=G,e[44]=o):o=e[44];let d;return e[45]!==u||e[46]!==o?(d=s.jsx(F,{value:u,children:o}),e[45]=u,e[46]=o,e[47]=d):d=e[47],d}const Y=C.id,$=ge(C);let S;e[48]!==y?(S=(t,u)=>y?y.callTool({name:t,arguments:u}).then(xe):Promise.reject(new Error("MCP client is not available")),e[48]=y,e[49]=S):S=e[49];const q=S;let E;e[50]!==C||e[51]!==c||e[52]!==a||e[53]!==$||e[54]!==q?(E={connectionId:Y,connection:$,toolCaller:q,org:c,session:a},e[50]=C,e[51]=c,e[52]=a,e[53]=$,e[54]=q,e[55]=E):E=e[55];const A=E;let L;e[56]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(z,{children:s.jsx(z.Content,{children:s.jsx(le,{})})}),e[56]=L):L=e[56];let M;return e[57]!==A?(M=s.jsx(F,{value:A,children:L}),e[57]=A,e[58]=M):M=e[58],M}function xe(i){return i.structuredContent??i}export{_e as P};
@@ -1 +1 @@
1
- import{r as i,aT as $,j as c,c4 as L,aU as z,b6 as A,ah as _,ai as g,c5 as b,aW as j,c6 as G,c7 as w,c8 as H,c9 as K,ao as U,ca as W,cb as V,cc as Z,cd as q,ce as B,cf as J,e as R,c as Q}from"./index-Bu0xhzLF.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=W("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
1
+ import{r as i,aT as $,j as c,c4 as L,aU as z,b6 as A,a7 as _,a8 as g,c5 as b,aW as j,c6 as G,c7 as w,c8 as H,c9 as K,ae as U,ca as W,cb as V,cc as Z,cd as q,ce as B,cf as J,e as R,c as Q}from"./index-gKZjkMnf.js";var C="Popover",[E]=U(C,[w]),P=w(),[X,u]=E(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(X,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(b,{...s,...r,ref:e})});Y.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=A(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(b,{asChild:!0,...s,children:p})});y.displayName=S;var O="PopoverPortal",[ee,oe]=E(O,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(O,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=O;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=W("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(T,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(T,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),T=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return V(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(q,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(B,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),k="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(k,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=k;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(J,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=Q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{ve as P,ge as a,fe as b};
@@ -0,0 +1 @@
1
+ import{e as z,j as t,b as G,r as R,B as V,P as B,t as f,x as I}from"./index-gKZjkMnf.js";import{P as E}from"./index-C3hSkh4S.js";import{A as U}from"./avatar-BQ09Qk0Z.js";import{S as T}from"./switch-D_DqyrYW.js";import{S as H,a as Y,d as q,c as F}from"./select-B6R2tTSM.js";import{T as K,a as L}from"./toggle-group-BJxlfhsN.js";import{I as J}from"./input-Cet4kRAV.js";import{n as M,a as O,i as Q}from"./Sun-CoYtwe4c.js";import{i as W}from"./Play-B2WhNMxb.js";import{p as X,q as Z}from"./question-004-sINsf4GQ.js";import"./index-CqrrK0SQ.js";import{d as ee,S as $,a as D,b as h,c as te}from"./settings-section-Z9FmAPIg.js";import"./tooltip-DlUl6zVU.js";import"./X-DSm8Y-S-.js";import"./User01-lfQ-qZIG.js";import"./ChevronDown-D098IDk9.js";import"./ChevronUp-qt4sL4uC.js";import"./card-DUOq7Rl6.js";import"./ArrowUpRight-BQK-oA7E.js";function ie(){const{data:e,isPending:i}=G.useSession(),n=e?.user,l=n?.image,[s,o]=R.useState(null),[a,c]=R.useState(!1),m=s??n?.name??"",p=s!==null&&s!==(n?.name??""),u=async()=>{if(p){c(!0);try{await G.updateUser({name:m}),f("profile_updated",{fields:["name"]}),o(null),I.success("Profile updated")}catch{I.error("Failed to update profile")}finally{c(!1)}}};return i?null:t.jsx($,{children:t.jsxs(D,{children:[t.jsx(h,{title:"Avatar",action:t.jsx(U,{url:l,fallback:n?.name??"U",shape:"circle",size:"base"})}),t.jsx(h,{title:"Display name",action:t.jsx(J,{id:"display-name",value:m,onChange:d=>o(d.target.value),onKeyDown:d=>{d.key==="Enter"&&u()},placeholder:"Your name",className:"w-[280px]"})}),t.jsx(h,{title:"Email",action:t.jsx("span",{className:"text-sm text-muted-foreground",children:n?.email})}),p&&t.jsxs(te,{children:[t.jsx(V,{variant:"outline",size:"sm",onClick:()=>o(null),disabled:a,children:"Cancel"}),t.jsx(V,{onClick:u,disabled:a,size:"sm",children:a?"Saving…":"Save"})]})]})})}function ne(){const e=z.c(48),[i,n]=B();let l;e[0]!==n?(l=async r=>{if(r&&await Notification.requestPermission()!=="granted"){f("preferences_notifications_permission_denied"),I.error("Notifications denied. Please enable them in your browser settings."),n(ae);return}f("preferences_notifications_toggled",{enabled:r}),n(x=>({...x,enableNotifications:r}))},e[0]=n,e[1]=l):l=e[1];const s=l;let o;e[2]!==n?(o=r=>{r&&(f("preferences_theme_changed",{to_value:r}),n(x=>({...x,theme:r})))},e[2]=n,e[3]=o):o=e[3];let a;e[4]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(L,{value:"light","aria-label":"Light theme",children:t.jsx(M,{size:14})}),e[4]=a):a=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(L,{value:"dark","aria-label":"Dark theme",children:t.jsx(O,{size:14})}),e[5]=c):c=e[5];let m;e[6]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(L,{value:"system","aria-label":"System theme",children:t.jsx(Q,{size:14})}),e[6]=m):m=e[6];let p;e[7]!==i.theme||e[8]!==o?(p=t.jsx(h,{title:"Theme",description:"Your preferred color scheme.",action:t.jsxs(K,{type:"single",size:"sm",variant:"outline",value:i.theme,onValueChange:o,children:[a,c,m]})}),e[7]=i.theme,e[8]=o,e[9]=p):p=e[9];let u;e[10]!==s||e[11]!==i.enableNotifications?(u=typeof Notification<"u"?()=>s(!i.enableNotifications):void 0,e[10]=s,e[11]=i.enableNotifications,e[12]=u):u=e[12];let d;e[13]!==s||e[14]!==i.enableNotifications?(d=t.jsx(T,{disabled:typeof Notification>"u",checked:i.enableNotifications,onCheckedChange:s}),e[13]=s,e[14]=i.enableNotifications,e[15]=d):d=e[15];let b;e[16]!==u||e[17]!==d?(b=t.jsx(h,{title:"Notifications",description:"Receive browser notifications for important events.",onClick:u,action:d}),e[16]=u,e[17]=d,e[18]=b):b=e[18];let v;e[19]!==i.enableSounds||e[20]!==n?(v=()=>{f("preferences_sounds_toggled",{enabled:!i.enableSounds}),n(le)},e[19]=i.enableSounds,e[20]=n,e[21]=v):v=e[21];let P;e[22]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx("button",{type:"button","aria-label":"Preview notification sound",onClick:se,className:"size-6 rounded flex items-center justify-center text-muted-foreground hover:text-foreground hover:bg-accent/50 transition-colors cursor-pointer",children:t.jsx(W,{size:11})}),e[22]=P):P=e[22];let g;e[23]!==n?(g=r=>{f("preferences_sounds_toggled",{enabled:r}),n(x=>({...x,enableSounds:r}))},e[23]=n,e[24]=g):g=e[24];let j;e[25]!==i.enableSounds||e[26]!==g?(j=t.jsxs("div",{className:"flex items-center gap-2",children:[P,t.jsx(T,{checked:i.enableSounds,onCheckedChange:g})]}),e[25]=i.enableSounds,e[26]=g,e[27]=j):j=e[27];let _;e[28]!==j||e[29]!==v?(_=t.jsx(h,{title:"Sounds",description:"Play sounds for agent actions and notifications.",onClick:v,action:j}),e[28]=j,e[29]=v,e[30]=_):_=e[30];let S;e[31]!==n?(S=r=>{f("preferences_tool_approval_changed",{to_value:r}),n(x=>({...x,toolApprovalLevel:r}))},e[31]=n,e[32]=S):S=e[32];let y;e[33]!==i.toolApprovalLevel?(y={readonly:"Ask before edit",auto:"Auto approve"}[i.toolApprovalLevel]??"Ask before edit",e[33]=i.toolApprovalLevel,e[34]=y):y=e[34];let N;e[35]!==y?(N=t.jsx(Y,{className:"w-36 h-7 text-xs",children:t.jsx("span",{children:y})}),e[35]=y,e[36]=N):N=e[36];let A;e[37]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(q,{value:"readonly",textValue:"Ask before edit",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Ask before edit"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-approve read-only tools"})]})}),e[37]=A):A=e[37];let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsxs(F,{children:[A,t.jsx(q,{value:"auto",textValue:"Auto approve",children:t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("span",{className:"font-medium",children:"Auto approve"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:"Execute all without approval"})]})})]}),e[38]=k):k=e[38];let C;e[39]!==i.toolApprovalLevel||e[40]!==S||e[41]!==N?(C=t.jsx(h,{title:"Tool Approval",description:"Control how tools are approved before execution.",action:t.jsxs(H,{value:i.toolApprovalLevel,onValueChange:S,children:[N,k]})}),e[39]=i.toolApprovalLevel,e[40]=S,e[41]=N,e[42]=C):C=e[42];let w;return e[43]!==_||e[44]!==C||e[45]!==p||e[46]!==b?(w=t.jsx($,{title:"Preferences",children:t.jsxs(D,{children:[p,b,_,C]})}),e[43]=_,e[44]=C,e[45]=p,e[46]=b,e[47]=w):w=e[47],w}function se(){f("preferences_sounds_previewed"),X(Z.dataUri).catch(oe)}function oe(){}function le(e){return{...e,enableSounds:!e.enableSounds}}function ae(e){return{...e,enableNotifications:!1}}function re(){const e=z.c(11),[i,n]=B();let l;e[0]!==i.experimental_vibecode||e[1]!==n?(l=()=>{f("preferences_experimental_vibecode_toggled",{enabled:!i.experimental_vibecode}),n(ce)},e[0]=i.experimental_vibecode,e[1]=n,e[2]=l):l=e[2];let s;e[3]!==n?(s=c=>{f("preferences_experimental_vibecode_toggled",{enabled:c}),n(m=>({...m,experimental_vibecode:c}))},e[3]=n,e[4]=s):s=e[4];let o;e[5]!==i.experimental_vibecode||e[6]!==s?(o=t.jsx(T,{checked:i.experimental_vibecode,onCheckedChange:s}),e[5]=i.experimental_vibecode,e[6]=s,e[7]=o):o=e[7];let a;return e[8]!==l||e[9]!==o?(a=t.jsx($,{title:"Experimental",children:t.jsx(D,{children:t.jsx(h,{title:"Import from GitHub",description:"Enable importing agents from GitHub repositories.",onClick:l,action:o})})}),e[8]=l,e[9]=o,e[10]=a):a=e[10],a}function ce(e){return{...e,experimental_vibecode:!e.experimental_vibecode}}function de(){const e=z.c(1);let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(E,{children:t.jsx(E.Content,{children:t.jsx(E.Body,{children:t.jsxs(ee,{children:[t.jsx(E.Title,{children:"Profile & Preferences"}),t.jsx(ie,{}),t.jsx(ne,{}),t.jsx(re,{})]})})})}),e[0]=i):i=e[0],i}function Ee(){const e=z.c(1);let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(de,{}),e[0]=i):i=e[0],i}export{Ee as default};
@@ -0,0 +1 @@
1
+ import{e as E,s as H,j as N}from"./index-gKZjkMnf.js";import{m as O,k as $,s as v}from"./pair-CSF6pLZy.js";import{u as L}from"./constants-nJzh8CYx.js";import{a as k,c as q}from"./use-mcp-tools-CyPVbfii.js";import{c as B}from"./content-blocks-o63cs2vh.js";import{g as Y,M as G,b as w}from"./types-CUVoLk-m.js";import{c as V,b as z}from"./chat-context-CfrtTY3a.js";import{u as F}from"./shell-layout-DaB5J-du.js";import"./agent-icon-DxobcFDr.js";import"./AlertCircle-DnJbX_0w.js";import"./Tool01-Cxeqfwwz.js";import"./XClose-8tp9nQPE.js";import"./RefreshCcw01-CmGHOB_j.js";import"./ArrowNarrowLeft-M9-X6Sxy.js";import"./XCircle-D0NNu2cU.js";import"./ArrowUpRight-BQK-oA7E.js";import"./ZapSquare-DgxRVJjy.js";import"./Users03-BEcIfaLP.js";import"./CheckCircle-BTDGGZJo.js";import"./ChevronDown-D098IDk9.js";import"./ChevronRight-DIr3-XeU.js";import"./ChevronUp-qt4sL4uC.js";import"./DotsVertical-DGFUAKYN.js";import"./Container-BvdKvtbe.js";import"./Star01-BsL_E8DX.js";import"./Palette-SeD4BOqL.js";import"./SearchMd-B4RJoOIR.js";import"./index-C3hSkh4S.js";import"./tooltip-DlUl6zVU.js";import"./X-DSm8Y-S-.js";import"./LinkExternal01-CS_vTEL0.js";import"./Lock01-DepQhBci.js";import"./Sun-CoYtwe4c.js";import"./Play-B2WhNMxb.js";import"./Plus-6a_0gFD5.js";import"./Settings02-86F4b3dQ.js";import"./Shield01-CzaXyqoU.js";import"./Trash01-Crqeojj8.js";import"./User01-lfQ-qZIG.js";import"./Zap-GnwBp_Qp.js";import"./index-Dkaetwrr.js";import"./use-copy-CLL1wnsg.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-CVDAkUpR.js";import"./integration-icon-BYjt2zM8.js";import"./use-virtual-mcp-SIWEo5E_.js";import"./use-collections-DKaygmj-.js";import"./use-ai-providers-CKSasQTP.js";import"./use-decopilot-events-NXGOEGvZ.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-tzb1zUeQ.js";import"./use-organization-settings-DpXizr85.js";import"./required-auth-layout-DVgyyuV-.js";import"./use-org-sso-pbiXxD33.js";const J={};function K(U){const t=E.c(37),{client:s,resourceURI:P,tool:e,connectionId:l,orgId:p,args:a}=U,{sendMessage:c}=V(),{setAppContext:u,clearAppContext:g}=z(),{setChatOpen:d,openTab:r}=F(),n=`${l}:${e.name}`;let o;t[0]!==r?(o=h=>h==="inline"?(r("0"),"inline"):"fullscreen",t[0]=r,t[1]=o):o=t[1];const f=o,m=a??J;let i;t[2]!==s||t[3]!==e.name||t[4]!==m?(i={client:s,toolName:e.name,toolArguments:m},t[2]=s,t[3]=e.name,t[4]=m,t[5]=i):i=t[5];const{data:T}=q(i);let R;if(t[6]!==e._meta||t[7]!==e.name){const h=$(e._meta);R=v(e.name,h),t[6]=e._meta,t[7]=e.name,t[8]=R}else R=t[8];const S=R;let x;t[9]!==e.inputSchema?(x=e.inputSchema??{type:"object"},t[9]=e.inputSchema,t[10]=x):x=t[10];let A;t[11]!==S||t[12]!==x||t[13]!==e?(A={...e,name:S,inputSchema:x},t[11]=S,t[12]=x,t[13]=e,t[14]=A):A=t[14];const y=A;let _;t[15]!==c||t[16]!==d?(_=h=>{const b=B(h.content);b.content.length>0&&(d(!0),c({tiptapDoc:b}))},t[15]=c,t[16]=d,t[17]=_):_=t[17];const D=_;let C;t[18]!==y?(C={tool:y},t[18]=y,t[19]=C):C=t[19];let I;t[20]!==u||t[21]!==n?(I=h=>u(n,h),t[20]=u,t[21]=n,t[22]=I):I=t[22];let M;t[23]!==g||t[24]!==n?(M=()=>g(n),t[23]=g,t[24]=n,t[25]=M):M=t[25];let j;return t[26]!==s||t[27]!==D||t[28]!==f||t[29]!==p||t[30]!==P||t[31]!==C||t[32]!==I||t[33]!==M||t[34]!==m||t[35]!==T?(j=N.jsx(G,{resourceURI:P,orgId:p,toolInfo:C,toolInput:m,toolResult:T,displayMode:"fullscreen",minHeight:w.fullscreen.minHeight,maxHeight:w.fullscreen.maxHeight,client:s,onMessage:D,onUpdateModelContext:I,onTeardown:M,onRequestDisplayMode:f,className:"h-full"}),t[26]=s,t[27]=D,t[28]=f,t[29]=p,t[30]=P,t[31]=C,t[32]=I,t[33]=M,t[34]=m,t[35]=T,t[36]=j):j=t[36],j}function Qt(U){const t=E.c(22),{connectionId:s,toolName:P,args:e}=U,{org:l}=H();let p;t[0]!==s||t[1]!==l.id?(p={connectionId:s,orgId:l.id},t[0]=s,t[1]=l.id,t[2]=p):p=t[2];const a=L(p);let c;t[3]!==a?(c={client:a},t[3]=a,t[4]=c):c=t[4];const{data:u}=k(c),g=decodeURIComponent(P);let d;t[5]!==g?(d=O(g),t[5]=g,t[6]=d):d=t[6];const r=d;let n,o;if(t[7]!==r||t[8]!==u.tools){let i;t[11]!==r?(i=T=>T.name===r,t[11]=r,t[12]=i):i=t[12],o=u.tools.find(i),n=o?._meta?Y(o._meta):void 0,t[7]=r,t[8]=u.tools,t[9]=n,t[10]=o}else n=t[9],o=t[10];const f=n;if(!o||!f){let i;return t[13]!==r?(i=N.jsx("div",{className:"flex items-center justify-center h-full w-full",children:N.jsxs("p",{className:"text-sm text-muted-foreground",children:['Tool "',r,'" not found or has no UI']})}),t[13]=r,t[14]=i):i=t[14],i}let m;return t[15]!==e||t[16]!==a||t[17]!==s||t[18]!==l.id||t[19]!==f||t[20]!==o?(m=N.jsx(K,{client:a,resourceURI:f,tool:o,connectionId:s,orgId:l.id,args:e}),t[15]=e,t[16]=a,t[17]=s,t[18]=l.id,t[19]=f,t[20]=o,t[21]=m):m=t[21],m}export{Qt as AppViewContent};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DWruz43b.js","assets/index-gKZjkMnf.js","assets/index-BZi9riJ2.css","assets/ArrowNarrowLeft-M9-X6Sxy.js","assets/CheckCircle-BTDGGZJo.js","assets/Container-BvdKvtbe.js","assets/Settings02-86F4b3dQ.js","assets/XCircle-D0NNu2cU.js","assets/constants-nJzh8CYx.js","assets/useInfiniteQuery-B3rxurAJ.js","assets/infiniteQueryObserver-B9PWohpE.js","assets/badge-Clg4Tzdw.js","assets/input-Cet4kRAV.js","assets/dropdown-menu-gP2-wJTw.js","assets/ChevronDown-D098IDk9.js","assets/ChevronRight-DIr3-XeU.js","assets/DotsVertical-DGFUAKYN.js","assets/table-D1_6e_tY.js","assets/toggle-group-BJxlfhsN.js","assets/use-view-mode-D9sT86SW.js","assets/tooltip-DlUl6zVU.js","assets/SearchMd-B4RJoOIR.js","assets/dialog-CVDAkUpR.js","assets/X-DSm8Y-S-.js","assets/AlertCircle-DnJbX_0w.js","assets/alert-dialog-CscciHzk.js","assets/card-DUOq7Rl6.js","assets/Trash01-Crqeojj8.js","assets/label-CaWfIbuT.js","assets/select-B6R2tTSM.js","assets/ChevronUp-qt4sL4uC.js","assets/switch-D_DqyrYW.js","assets/textarea-BPX5qWaA.js","assets/RefreshCcw01-CmGHOB_j.js","assets/checkbox-D2GZcsVt.js","assets/LinkExternal01-CS_vTEL0.js","assets/use-copy-CLL1wnsg.js","assets/Plus-6a_0gFD5.js","assets/Play-B2WhNMxb.js"])))=>i.map(i=>d[i]);
2
+ import{e as a,j as t,r,l as i,_ as o}from"./index-gKZjkMnf.js";const n=r.lazy(()=>o(()=>import("./registry-layout-DWruz43b.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
@@ -1,4 +1,4 @@
1
- import{e as Y,s as ie,n as Ie,o as ke,a as je,z as V,r as I,j as t,B as G,l as Le,c as Z,a0 as Fs,a1 as Bs}from"./index-Bu0xhzLF.js";import{i as Qs}from"./ArrowNarrowLeft-DtpIYMrr.js";import{i as qe}from"./CheckCircle-Mywkb82K.js";import{n as Vs}from"./Container-CtsNRge8.js";import{a as Gs}from"./Settings02-EP4I50bB.js";import{c as Jt,n as Ks,g as ds,b as Zt,a as Ys,h as us,i as Hs,e as Ws,d as Js,f as St,t as Zs,j as Xs}from"./XCircle-DP5EGLqX.js";import{S as ce,u as oe,d as er}from"./constants-Dw_UtizE.js";import{u as ms}from"./useInfiniteQuery-BiAZtptE.js";import{B as F}from"./badge-C_B8gNbw.js";import{I as ae}from"./input-B5aMagwc.js";import{d as dt,D as Ce,c as ut,e as mt,j as Xt,k as es,i as tr}from"./dropdown-menu--l1OQ6xu.js";import{c as Mt,d as Et,a as Fe,e as ue,b as Dt,T as me}from"./table-BL7WuMkY.js";import{T as sr,a as ts}from"./toggle-group-B4KaadHq.js";import{u as rr}from"./use-view-mode-BLlR5qfu.js";import{i as At}from"./DotsVertical-BQnGY6Nc.js";import{i as nr,a as ir}from"./SearchMd-BfBE-dHK.js";import{a as xt,D as ht,e as pt,b as ft,c as gt,d as jt}from"./dialog-DjZXbytL.js";import{i as Ke}from"./AlertCircle-Cx8oex2u.js";import{c as Ye,b as He,d as We,A as Je,g as Ze,e as Xe,a as et,f as tt}from"./alert-dialog-BFg1HHbW.js";import{C as ne}from"./card-G6flwhwa.js";import{s as st}from"./Trash01-BLGcALKg.js";import{L as X}from"./label-Bv4VMaQH.js";import{a as lr,c as ar,d as or,S as cr,b as Rt}from"./select-DerdayxE.js";import{S as Oe}from"./switch-Bp1Tvx2h.js";import{T as vt}from"./textarea-BxmFQbso.js";import{a as $t,c as dr,i as ur,s as xs,b as mr}from"./RefreshCcw01-B-L6FvMp.js";import{i as xr}from"./X-BJbamPEP.js";import{t as hr,i as Tt}from"./ChevronDown-BE0rQ4ho.js";import{n as pr}from"./ChevronUp-B2y_5HwX.js";import{C as ss}from"./checkbox-LBmczTXJ.js";import{n as fr}from"./LinkExternal01-SieYyhiZ.js";import{u as It}from"./use-copy-CYT1tdMJ.js";import{s as gr}from"./Plus-kLSd3TZy.js";import{a as jr,b as vr,c as br}from"./use-mobile-BACO9YYc.js";import{i as yr}from"./Play-BfzIvHVC.js";import"./infiniteQueryObserver-DEk-T30Y.js";import"./ChevronRight-BVJ2HUMt.js";const $e="private-registry",Nr=`
1
+ import{e as Y,s as ie,n as Ie,o as ke,a as je,x as V,r as I,j as t,B as G,l as Le,c as Z,G as Fs,F as Bs}from"./index-gKZjkMnf.js";import{i as Qs}from"./ArrowNarrowLeft-M9-X6Sxy.js";import{i as qe}from"./CheckCircle-BTDGGZJo.js";import{n as Vs}from"./Container-BvdKvtbe.js";import{a as Gs}from"./Settings02-86F4b3dQ.js";import{b as Jt,n as Ks,a as ds,f as Zt,g as Ys,h as us,d as Hs,e as Ws,i as Js,c as St,t as Zs,j as Xs}from"./XCircle-D0NNu2cU.js";import{S as ce,u as oe,d as er}from"./constants-nJzh8CYx.js";import{u as ms}from"./useInfiniteQuery-B3rxurAJ.js";import{B as F}from"./badge-Clg4Tzdw.js";import{I as ae}from"./input-Cet4kRAV.js";import{a as dt,c as Ce,D as ut,b as mt,j as Xt,k as es,i as tr}from"./dropdown-menu-gP2-wJTw.js";import{c as Mt,d as Et,a as Fe,e as ue,b as Dt,T as me}from"./table-D1_6e_tY.js";import{T as sr,a as ts}from"./toggle-group-BJxlfhsN.js";import{u as rr}from"./use-view-mode-D9sT86SW.js";import{i as At}from"./DotsVertical-DGFUAKYN.js";import{i as nr,a as ir}from"./SearchMd-B4RJoOIR.js";import{c as xt,d as ht,e as pt,D as ft,a as gt,b as jt}from"./dialog-CVDAkUpR.js";import{i as Ke}from"./AlertCircle-DnJbX_0w.js";import{c as Ye,b as He,d as We,f as Je,g as Ze,e as Xe,a as et,A as tt}from"./alert-dialog-CscciHzk.js";import{C as ne}from"./card-DUOq7Rl6.js";import{s as st}from"./Trash01-Crqeojj8.js";import{L as X}from"./label-CaWfIbuT.js";import{S as lr,a as ar,b as or,c as cr,d as Rt}from"./select-B6R2tTSM.js";import{S as Oe}from"./switch-D_DqyrYW.js";import{T as vt}from"./textarea-BPX5qWaA.js";import{a as $t,c as dr,i as ur,s as xs,b as mr}from"./RefreshCcw01-CmGHOB_j.js";import{i as xr}from"./X-DSm8Y-S-.js";import{t as hr,i as Tt}from"./ChevronDown-D098IDk9.js";import{n as pr}from"./ChevronUp-qt4sL4uC.js";import{C as ss}from"./checkbox-D2GZcsVt.js";import{n as fr}from"./LinkExternal01-CS_vTEL0.js";import{u as It}from"./use-copy-CLL1wnsg.js";import{s as gr}from"./Plus-6a_0gFD5.js";import{a as jr,b as vr,T as br}from"./tooltip-DlUl6zVU.js";import{i as yr}from"./Play-B2WhNMxb.js";import"./infiniteQueryObserver-B9PWohpE.js";import"./ChevronRight-DIr3-XeU.js";const $e="private-registry",Nr=`
2
2
  You are an MCP tool tester running automated integration checks.
3
3
 
4
4
  Goal:
@@ -0,0 +1 @@
1
+ import{e as c,j as i,A as a,S as u,h,k as f,U as m,N as x}from"./index-gKZjkMnf.js";function g(){const t=c.c(5),s=m().location.href;let r;t[0]!==s?(r=s==="/login"||s.startsWith("/login?"),t[0]=s,t[1]=r):r=t[1];const n=r;let o;if(t[2]!==s||t[3]!==n){const l=n?{}:{next:s};o=i.jsx(x,{to:"/login",search:l,replace:!0}),t[2]=s,t[3]=n,t[4]=o}else o=t[4];return o}function d(t){const e=c.c(6),{children:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(a,{children:i.jsx(u,{})}),e[0]=r):r=e[0];let n;e[1]!==s?(n=i.jsx(h,{children:s}),e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(f,{children:i.jsx(g,{})}),e[3]=o):o=e[3];let l;return e[4]!==n?(l=i.jsxs(i.Fragment,{children:[r,n,o]}),e[4]=n,e[5]=l):l=e[5],l}export{d as R};
@@ -1 +1 @@
1
- import{e as q,d as Y,f as A,r as B,a as G,j as s,B as z,b as K}from"./index-Bu0xhzLF.js";import{I as L}from"./input-B5aMagwc.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
1
+ import{e as q,d as Y,f as A,r as B,a as G,j as s,B as z,b as K}from"./index-gKZjkMnf.js";import{I as L}from"./input-Cet4kRAV.js";function H(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=G(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await K.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{H as default};
@@ -0,0 +1 @@
1
+ import{r as k,s as Re,K as ce,aM as it,j as s,c as $,l as _e,B as ne,e as q,n as Ge,o as De,z as rt,C as ot,a as we,x as pe,t as Ae,b as re,H as ye,aK as he,J as se,aI as Le,a_ as ve,E as lt,f as at,d as ct}from"./index-gKZjkMnf.js";import{u as dt}from"./use-organization-roles-7NVaQG9M.js";import{B as fe}from"./badge-Clg4Tzdw.js";import{A as Ue,a as ke,b as Ve,c as Be,d as ze,f as Ye,e as He,g as $e}from"./alert-dialog-CscciHzk.js";import{D as mt,a as ut,b as gt,c as Et}from"./dropdown-menu-gP2-wJTw.js";import{i as Tt}from"./DotsVertical-DGFUAKYN.js";import{i as Ke}from"./Lock01-DepQhBci.js";import{s as Ce}from"./Plus-6a_0gFD5.js";import{s as pt}from"./Trash01-Crqeojj8.js";import{C as ft}from"./collection-table-wrapper-B84Op-Zk.js";import{P as te}from"./index-C3hSkh4S.js";import{E as je}from"./empty-state-CPpC79-7.js";import{S as be}from"./search-input-BTdLweUR.js";import{P as Fe,D as Qe}from"./ai-providers-logos-D6a8kmGH.js";import{I as Se}from"./integration-icon-BYjt2zM8.js";import{u as _t}from"./use-infinite-scroll-B32XN73V.js";import{C as Oe}from"./checkbox-D2GZcsVt.js";import{i as It}from"./RefreshCcw01-CmGHOB_j.js";import{u as ht}from"./useSuspenseInfiniteQuery-KPnhOQU0.js";import{u as Rt,S as xt}from"./constants-nJzh8CYx.js";import{C as Nt}from"./collection-search-CzSQR8Hb.js";import{u as Ze}from"./use-members-C8bjIWu8.js";import{u as Ct}from"./use-connection-DLwIHVYP.js";import{u as At,c as bt}from"./use-ai-providers-CKSasQTP.js";import{A as qe}from"./avatar-BQ09Qk0Z.js";import{S as oe}from"./switch-D_DqyrYW.js";import{c as ue,T as ge,a as Ee,b as Te}from"./tooltip-DlUl6zVU.js";import{t as St}from"./ChevronDown-D098IDk9.js";import{i as Ot}from"./ChevronRight-DIr3-XeU.js";import{a as yt}from"./SearchMd-B4RJoOIR.js";import{i as Pe}from"./X-DSm8Y-S-.js";import"./table-D1_6e_tY.js";import"./XClose-8tp9nQPE.js";import"./Container-BvdKvtbe.js";import"./agent-icon-DxobcFDr.js";import"./AlertCircle-DnJbX_0w.js";import"./Tool01-Cxeqfwwz.js";import"./ArrowNarrowLeft-M9-X6Sxy.js";import"./XCircle-D0NNu2cU.js";import"./ArrowUpRight-BQK-oA7E.js";import"./ZapSquare-DgxRVJjy.js";import"./Users03-BEcIfaLP.js";import"./CheckCircle-BTDGGZJo.js";import"./ChevronUp-qt4sL4uC.js";import"./Star01-BsL_E8DX.js";import"./Palette-SeD4BOqL.js";import"./LinkExternal01-CS_vTEL0.js";import"./Sun-CoYtwe4c.js";import"./Play-B2WhNMxb.js";import"./Settings02-86F4b3dQ.js";import"./Shield01-CzaXyqoU.js";import"./User01-lfQ-qZIG.js";import"./Zap-GnwBp_Qp.js";import"./infiniteQueryObserver-B9PWohpE.js";import"./use-collections-DKaygmj-.js";const Xe=[{name:"ORGANIZATION_CREATE",description:"Create a new organization",category:"Organizations"},{name:"ORGANIZATION_LIST",description:"List organizations",category:"Organizations"},{name:"ORGANIZATION_GET",description:"View organization details",category:"Organizations"},{name:"ORGANIZATION_UPDATE",description:"Update organization",category:"Organizations"},{name:"ORGANIZATION_DELETE",description:"Delete organization",category:"Organizations",dangerous:!0},{name:"ORGANIZATION_SETTINGS_GET",description:"View organization settings",category:"Organizations"},{name:"ORGANIZATION_SETTINGS_UPDATE",description:"Update organization settings",category:"Organizations"},{name:"BRAND_CONTEXT_LIST",description:"List brand contexts",category:"Organizations"},{name:"BRAND_CONTEXT_GET",description:"View brand context",category:"Organizations"},{name:"BRAND_CONTEXT_CREATE",description:"Create brand context",category:"Organizations"},{name:"BRAND_CONTEXT_UPDATE",description:"Update brand context",category:"Organizations"},{name:"BRAND_CONTEXT_DELETE",description:"Delete brand context",category:"Organizations",dangerous:!0},{name:"BRAND_CONTEXT_EXTRACT",description:"Extract brand context from website",category:"Organizations"},{name:"BRAND_GET",description:"Get brand (binding)",category:"Organizations"},{name:"BRAND_LIST",description:"List brands (binding)",category:"Organizations"},{name:"ORGANIZATION_DOMAIN_GET",description:"Get organization domain claim",category:"Organizations"},{name:"ORGANIZATION_DOMAIN_SET",description:"Set organization domain claim",category:"Organizations"},{name:"ORGANIZATION_DOMAIN_UPDATE",description:"Update organization domain settings",category:"Organizations"},{name:"ORGANIZATION_DOMAIN_CLEAR",description:"Clear organization domain claim",category:"Organizations"},{name:"ORGANIZATION_MEMBER_ADD",description:"Add members",category:"Organizations"},{name:"ORGANIZATION_MEMBER_REMOVE",description:"Remove members",category:"Organizations",dangerous:!0},{name:"ORGANIZATION_MEMBER_LIST",description:"List members",category:"Organizations"},{name:"ORGANIZATION_MEMBER_UPDATE_ROLE",description:"Update member roles",category:"Organizations"},{name:"COLLECTION_CONNECTIONS_CREATE",description:"Create connections",category:"Connections"},{name:"COLLECTION_CONNECTIONS_LIST",description:"List connections",category:"Connections"},{name:"COLLECTION_CONNECTIONS_GET",description:"View connection details",category:"Connections"},{name:"COLLECTION_CONNECTIONS_UPDATE",description:"Update connections",category:"Connections"},{name:"COLLECTION_CONNECTIONS_DELETE",description:"Delete connections",category:"Connections",dangerous:!0},{name:"CONNECTION_TEST",description:"Test connections",category:"Connections"},{name:"DATABASES_RUN_SQL",description:"Run SQL queries",category:"Connections",dangerous:!0},{name:"COLLECTION_VIRTUAL_MCP_CREATE",description:"Create virtual MCPs",category:"Virtual MCPs"},{name:"COLLECTION_VIRTUAL_MCP_LIST",description:"List virtual MCPs",category:"Virtual MCPs"},{name:"COLLECTION_VIRTUAL_MCP_GET",description:"View virtual MCP details",category:"Virtual MCPs"},{name:"COLLECTION_VIRTUAL_MCP_UPDATE",description:"Update virtual MCPs",category:"Virtual MCPs"},{name:"COLLECTION_VIRTUAL_MCP_DELETE",description:"Delete virtual MCPs",category:"Virtual MCPs",dangerous:!0},{name:"MONITORING_LOG_GET",description:"View monitoring log details",category:"Monitoring"},{name:"MONITORING_LOGS_LIST",description:"List monitoring logs",category:"Monitoring"},{name:"MONITORING_STATS",description:"View monitoring statistics",category:"Monitoring"},{name:"API_KEY_CREATE",description:"Create API key",category:"API Keys"},{name:"API_KEY_LIST",description:"List API keys",category:"API Keys"},{name:"API_KEY_UPDATE",description:"Update API key",category:"API Keys"},{name:"API_KEY_DELETE",description:"Delete API key",category:"API Keys",dangerous:!0},{name:"EVENT_PUBLISH",description:"Publish events",category:"Event Bus"},{name:"EVENT_SUBSCRIBE",description:"Subscribe to events",category:"Event Bus"},{name:"EVENT_UNSUBSCRIBE",description:"Unsubscribe from events",category:"Event Bus"},{name:"EVENT_CANCEL",description:"Cancel recurring events",category:"Event Bus"},{name:"EVENT_ACK",description:"Acknowledge event delivery",category:"Event Bus"},{name:"EVENT_SUBSCRIPTION_LIST",description:"List event subscriptions",category:"Event Bus"},{name:"EVENT_SYNC_SUBSCRIPTIONS",description:"Sync subscriptions to desired state",category:"Event Bus"},{name:"USER_GET",description:"Get a user by id",category:"Users"},{name:"COLLECTION_THREADS_CREATE",description:"Create threads",category:"Threads"},{name:"COLLECTION_THREADS_LIST",description:"List threads",category:"Threads"},{name:"COLLECTION_THREADS_GET",description:"View thread details",category:"Threads"},{name:"COLLECTION_THREADS_UPDATE",description:"Update threads",category:"Threads"},{name:"COLLECTION_THREADS_DELETE",description:"Delete threads",category:"Threads",dangerous:!0},{name:"COLLECTION_THREAD_MESSAGES_LIST",description:"List thread messages",category:"Threads"},{name:"TAGS_LIST",description:"List organization tags",category:"Tags"},{name:"TAGS_CREATE",description:"Create organization tag",category:"Tags"},{name:"TAGS_DELETE",description:"Delete organization tag",category:"Tags",dangerous:!0},{name:"MEMBER_TAGS_GET",description:"Get member tags",category:"Tags"},{name:"MEMBER_TAGS_SET",description:"Set member tags",category:"Tags"},{name:"AUTOMATION_CREATE",description:"Create automation",category:"Automations"},{name:"AUTOMATION_GET",description:"View automation details",category:"Automations"},{name:"AUTOMATION_LIST",description:"List automations",category:"Automations"},{name:"AUTOMATION_UPDATE",description:"Update automation",category:"Automations"},{name:"AUTOMATION_DELETE",description:"Delete automation",category:"Automations",dangerous:!0},{name:"AUTOMATION_TRIGGER_ADD",description:"Add trigger to automation",category:"Automations"},{name:"AUTOMATION_TRIGGER_REMOVE",description:"Remove trigger from automation",category:"Automations"},{name:"AUTOMATION_RUN",description:"Manually trigger an automation run",category:"Automations"},{name:"VIRTUAL_MCP_PLUGIN_CONFIG_GET",description:"View virtual MCP plugin configuration",category:"Virtual MCPs"},{name:"VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE",description:"Update virtual MCP plugin configuration",category:"Virtual MCPs"},{name:"VIRTUAL_MCP_PINNED_VIEWS_UPDATE",description:"Update virtual MCP pinned sidebar views",category:"Virtual MCPs"},{name:"AI_PROVIDERS_LIST",description:"List available AI providers",category:"AI Providers"},{name:"AI_PROVIDERS_LIST_MODELS",description:"List AI provider models",category:"AI Providers"},{name:"AI_PROVIDERS_ACTIVE",description:"List active AI providers",category:"AI Providers"},{name:"AI_PROVIDER_KEY_CREATE",description:"Store AI provider API key",category:"AI Providers"},{name:"AI_PROVIDER_KEY_LIST",description:"List AI provider API keys",category:"AI Providers"},{name:"AI_PROVIDER_KEY_DELETE",description:"Delete AI provider API key",category:"AI Providers",dangerous:!0},{name:"AI_PROVIDER_OAUTH_URL",description:"Get OAuth URL for provider",category:"AI Providers"},{name:"AI_PROVIDER_OAUTH_EXCHANGE",description:"Exchange OAuth code for API key",category:"AI Providers"},{name:"AI_PROVIDER_PROVISION_KEY",description:"Auto-provision API key for a provider",category:"AI Providers"},{name:"AI_PROVIDER_TOPUP_URL",description:"Get checkout URL to top up provider credits",category:"AI Providers"},{name:"AI_PROVIDER_CREDITS",description:"Get current credit balance for a provider",category:"AI Providers"},{name:"AI_PROVIDER_CLI_ACTIVATE",description:"Activate Claude Code via local CLI",category:"AI Providers"},{name:"LIST_OBJECTS",description:"List objects in storage",category:"Object Storage"},{name:"GET_OBJECT_METADATA",description:"Get object metadata",category:"Object Storage"},{name:"GET_PRESIGNED_URL",description:"Generate download URL",category:"Object Storage"},{name:"PUT_PRESIGNED_URL",description:"Generate upload URL",category:"Object Storage"},{name:"DELETE_OBJECT",description:"Delete object",category:"Object Storage",dangerous:!0},{name:"DELETE_OBJECTS",description:"Delete multiple objects",category:"Object Storage",dangerous:!0},{name:"COLLECTION_REGISTRY_APP_LIST",description:"List registry apps",category:"Registry"},{name:"COLLECTION_REGISTRY_APP_GET",description:"Get registry app details",category:"Registry"},{name:"COLLECTION_REGISTRY_APP_VERSIONS",description:"List registry app versions",category:"Registry"},{name:"COLLECTION_REGISTRY_APP_FILTERS",description:"Get registry app filters",category:"Registry"},{name:"REGISTRY_ITEM_LIST",description:"List private registry items",category:"Registry"},{name:"REGISTRY_ITEM_SEARCH",description:"Search registry items",category:"Registry"},{name:"REGISTRY_ITEM_GET",description:"Get registry item details",category:"Registry"},{name:"REGISTRY_ITEM_VERSIONS",description:"List registry item versions",category:"Registry"},{name:"REGISTRY_ITEM_CREATE",description:"Create registry item",category:"Registry"},{name:"REGISTRY_ITEM_BULK_CREATE",description:"Bulk create registry items",category:"Registry"},{name:"REGISTRY_ITEM_UPDATE",description:"Update registry item",category:"Registry"},{name:"REGISTRY_ITEM_DELETE",description:"Delete registry item",category:"Registry",dangerous:!0},{name:"REGISTRY_ITEM_FILTERS",description:"Get registry item filters",category:"Registry"},{name:"REGISTRY_DISCOVER_TOOLS",description:"Discover tools from MCP server",category:"Registry"},{name:"REGISTRY_AI_GENERATE",description:"AI-generate registry content",category:"Registry"},{name:"REGISTRY_PUBLISH_REQUEST_LIST",description:"List publish requests",category:"Registry"},{name:"REGISTRY_PUBLISH_REQUEST_REVIEW",description:"Review publish request",category:"Registry"},{name:"REGISTRY_PUBLISH_REQUEST_COUNT",description:"Count pending publish requests",category:"Registry"},{name:"REGISTRY_PUBLISH_REQUEST_DELETE",description:"Delete publish request",category:"Registry",dangerous:!0},{name:"REGISTRY_PUBLISH_API_KEY_GENERATE",description:"Generate publish API key",category:"Registry"},{name:"REGISTRY_PUBLISH_API_KEY_LIST",description:"List publish API keys",category:"Registry"},{name:"REGISTRY_PUBLISH_API_KEY_REVOKE",description:"Revoke publish API key",category:"Registry",dangerous:!0},{name:"REGISTRY_MONITOR_RUN_START",description:"Start monitor run",category:"Registry"},{name:"REGISTRY_MONITOR_RUN_LIST",description:"List monitor runs",category:"Registry"},{name:"REGISTRY_MONITOR_RUN_GET",description:"Get monitor run details",category:"Registry"},{name:"REGISTRY_MONITOR_RUN_CANCEL",description:"Cancel monitor run",category:"Registry"},{name:"REGISTRY_MONITOR_RESULT_LIST",description:"List monitor results",category:"Registry"},{name:"REGISTRY_MONITOR_CONNECTION_LIST",description:"List monitor connections",category:"Registry"},{name:"REGISTRY_MONITOR_CONNECTION_SYNC",description:"Sync monitor connections",category:"Registry"},{name:"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",description:"Update monitor connection auth",category:"Registry"},{name:"REGISTRY_MONITOR_SCHEDULE_SET",description:"Set monitor schedule",category:"Registry"},{name:"REGISTRY_MONITOR_SCHEDULE_CANCEL",description:"Cancel monitor schedule",category:"Registry"},{name:"VM_START",description:"Start a Freestyle VM with dev server preview",category:"VM"},{name:"VM_DELETE",description:"Stop and delete a Freestyle VM",category:"VM"},{name:"GITHUB_LIST_USER_ORGS",description:"List GitHub user's personal account and organizations",category:"GitHub"}],Lt={ORGANIZATION_CREATE:"Create organization",ORGANIZATION_LIST:"List organizations",ORGANIZATION_GET:"View organization details",ORGANIZATION_UPDATE:"Update organization",ORGANIZATION_DELETE:"Delete organization",ORGANIZATION_SETTINGS_GET:"View organization settings",ORGANIZATION_SETTINGS_UPDATE:"Update organization settings",BRAND_CONTEXT_LIST:"List brand contexts",BRAND_CONTEXT_GET:"View brand context",BRAND_CONTEXT_CREATE:"Create brand context",BRAND_CONTEXT_UPDATE:"Update brand context",BRAND_CONTEXT_DELETE:"Delete brand context",BRAND_CONTEXT_EXTRACT:"Extract brand from website",BRAND_GET:"Get brand",BRAND_LIST:"List brands",ORGANIZATION_DOMAIN_GET:"Get domain claim",ORGANIZATION_DOMAIN_SET:"Set domain claim",ORGANIZATION_DOMAIN_UPDATE:"Update domain settings",ORGANIZATION_DOMAIN_CLEAR:"Clear domain claim",ORGANIZATION_MEMBER_LIST:"List members",ORGANIZATION_MEMBER_ADD:"Add members",ORGANIZATION_MEMBER_REMOVE:"Remove members",ORGANIZATION_MEMBER_UPDATE_ROLE:"Update member roles",COLLECTION_CONNECTIONS_LIST:"List connections",COLLECTION_CONNECTIONS_GET:"View connection details",COLLECTION_CONNECTIONS_CREATE:"Create connections",COLLECTION_CONNECTIONS_UPDATE:"Update connections",COLLECTION_CONNECTIONS_DELETE:"Delete connections",CONNECTION_TEST:"Test connections",DATABASES_RUN_SQL:"Run SQL queries",COLLECTION_VIRTUAL_MCP_CREATE:"Create virtual MCPs",COLLECTION_VIRTUAL_MCP_LIST:"List virtual MCPs",COLLECTION_VIRTUAL_MCP_GET:"View virtual MCP details",COLLECTION_VIRTUAL_MCP_UPDATE:"Update virtual MCPs",COLLECTION_VIRTUAL_MCP_DELETE:"Delete virtual MCPs",MONITORING_LOG_GET:"View monitoring log details",MONITORING_LOGS_LIST:"List monitoring logs",MONITORING_STATS:"View monitoring statistics",API_KEY_CREATE:"Create API key",API_KEY_LIST:"List API keys",API_KEY_UPDATE:"Update API key",API_KEY_DELETE:"Delete API key",EVENT_PUBLISH:"Publish events",EVENT_SUBSCRIBE:"Subscribe to events",EVENT_UNSUBSCRIBE:"Unsubscribe from events",EVENT_CANCEL:"Cancel recurring events",EVENT_ACK:"Acknowledge event delivery",EVENT_SUBSCRIPTION_LIST:"List event subscriptions",EVENT_SYNC_SUBSCRIPTIONS:"Sync subscriptions to desired state",USER_GET:"Get user by id",COLLECTION_THREADS_CREATE:"Create threads",COLLECTION_THREADS_LIST:"List threads",COLLECTION_THREADS_GET:"View thread details",COLLECTION_THREADS_UPDATE:"Update threads",COLLECTION_THREADS_DELETE:"Delete threads",COLLECTION_THREAD_MESSAGES_LIST:"List thread messages",TAGS_LIST:"List organization tags",TAGS_CREATE:"Create organization tag",TAGS_DELETE:"Delete organization tag",MEMBER_TAGS_GET:"Get member tags",MEMBER_TAGS_SET:"Set member tags",VIRTUAL_MCP_PLUGIN_CONFIG_GET:"View plugin config",VIRTUAL_MCP_PLUGIN_CONFIG_UPDATE:"Update plugin config",VIRTUAL_MCP_PINNED_VIEWS_UPDATE:"Update pinned views",AUTOMATION_CREATE:"Create automation",AUTOMATION_GET:"View automation details",AUTOMATION_LIST:"List automations",AUTOMATION_UPDATE:"Update automation",AUTOMATION_DELETE:"Delete automation",AUTOMATION_TRIGGER_ADD:"Add trigger",AUTOMATION_TRIGGER_REMOVE:"Remove trigger",AUTOMATION_RUN:"Run automation",AI_PROVIDERS_LIST:"List AI providers",AI_PROVIDERS_LIST_MODELS:"List AI models",AI_PROVIDERS_ACTIVE:"List active providers",AI_PROVIDER_KEY_CREATE:"Create provider key",AI_PROVIDER_KEY_LIST:"List provider keys",AI_PROVIDER_KEY_DELETE:"Delete provider key",AI_PROVIDER_OAUTH_URL:"Get OAuth URL",AI_PROVIDER_OAUTH_EXCHANGE:"Connect via OAuth",AI_PROVIDER_PROVISION_KEY:"Auto-provision key",AI_PROVIDER_TOPUP_URL:"Get top-up checkout URL",AI_PROVIDER_CREDITS:"Get credit balance",AI_PROVIDER_CLI_ACTIVATE:"Activate Claude Code CLI",LIST_OBJECTS:"List objects",GET_OBJECT_METADATA:"Get object metadata",GET_PRESIGNED_URL:"Generate download URL",PUT_PRESIGNED_URL:"Generate upload URL",DELETE_OBJECT:"Delete object",DELETE_OBJECTS:"Delete multiple objects",COLLECTION_REGISTRY_APP_LIST:"List registry apps",COLLECTION_REGISTRY_APP_GET:"Get registry app",COLLECTION_REGISTRY_APP_VERSIONS:"List registry app versions",COLLECTION_REGISTRY_APP_FILTERS:"Get registry filters",REGISTRY_ITEM_LIST:"List registry items",REGISTRY_ITEM_SEARCH:"Search registry",REGISTRY_ITEM_GET:"Get registry item",REGISTRY_ITEM_VERSIONS:"List item versions",REGISTRY_ITEM_CREATE:"Create registry item",REGISTRY_ITEM_BULK_CREATE:"Bulk create items",REGISTRY_ITEM_UPDATE:"Update registry item",REGISTRY_ITEM_DELETE:"Delete registry item",REGISTRY_ITEM_FILTERS:"Get item filters",REGISTRY_DISCOVER_TOOLS:"Discover tools",REGISTRY_AI_GENERATE:"AI generate content",REGISTRY_PUBLISH_REQUEST_LIST:"List publish requests",REGISTRY_PUBLISH_REQUEST_REVIEW:"Review publish request",REGISTRY_PUBLISH_REQUEST_COUNT:"Count publish requests",REGISTRY_PUBLISH_REQUEST_DELETE:"Delete publish request",REGISTRY_PUBLISH_API_KEY_GENERATE:"Generate API key",REGISTRY_PUBLISH_API_KEY_LIST:"List API keys",REGISTRY_PUBLISH_API_KEY_REVOKE:"Revoke API key",REGISTRY_MONITOR_RUN_START:"Start monitor run",REGISTRY_MONITOR_RUN_LIST:"List monitor runs",REGISTRY_MONITOR_RUN_GET:"Get monitor run",REGISTRY_MONITOR_RUN_CANCEL:"Cancel monitor run",REGISTRY_MONITOR_RESULT_LIST:"List monitor results",REGISTRY_MONITOR_CONNECTION_LIST:"List monitor connections",REGISTRY_MONITOR_CONNECTION_SYNC:"Sync monitor connections",REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH:"Update connection auth",REGISTRY_MONITOR_SCHEDULE_SET:"Set monitor schedule",REGISTRY_MONITOR_SCHEDULE_CANCEL:"Cancel monitor schedule",VM_START:"Start VM preview",VM_DELETE:"Delete VM preview",GITHUB_LIST_USER_ORGS:"List GitHub user orgs"};function vt(){const t={Organizations:[],Connections:[],"Virtual MCPs":[],Threads:[],Monitoring:[],Users:[],"API Keys":[],"Event Bus":[],Tags:[],"AI Providers":[],Automations:[],"Object Storage":[],Registry:[],GitHub:[],VM:[]};for(const e of Xe)t[e.category]?.push(e);return t}function jt(){return Xe.map(t=>({value:t.name,label:Lt[t.name],dangerous:t.dangerous}))}const Pt=k.memo(function(e){const n=q.c(21),{connection:i,isSelected:o,hasToolsEnabled:c,activeToolsCount:u,totalToolsCount:f,onSelect:d,onToggle:T}=e,g=o?"bg-accent/50":"hover:bg-muted/50";let r;n[0]!==g?(r=$("flex items-center gap-3 p-2 rounded-lg transition-colors will-change-auto",g),n[0]=g,n[1]=r):r=n[1];let E;n[2]!==i.icon||n[3]!==i.title?(E=s.jsx(Se,{icon:i.icon,name:i.title,size:"xs"}),n[2]=i.icon,n[3]=i.title,n[4]=E):E=n[4];let a;n[5]!==i.title?(a=s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:i.title})}),n[5]=i.title,n[6]=a):a=n[6];let m;n[7]!==d||n[8]!==E||n[9]!==a?(m=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0 cursor-pointer",onClick:d,children:[E,a]}),n[7]=d,n[8]=E,n[9]=a,n[10]=m):m=n[10];let _;n[11]!==u||n[12]!==i.tools||n[13]!==c||n[14]!==T||n[15]!==f?(_=i.tools&&i.tools.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"text-xs text-muted-foreground shrink-0",children:[u,"/",f]}),s.jsx(Oe,{checked:c,onCheckedChange:T,onClick:Dt})]}),n[11]=u,n[12]=i.tools,n[13]=c,n[14]=T,n[15]=f,n[16]=_):_=n[16];let x;return n[17]!==r||n[18]!==m||n[19]!==_?(x=s.jsxs("div",{className:r,children:[m,_]}),n[17]=r,n[18]=m,n[19]=_,n[20]=x):x=n[20],x}),Mt=k.memo(function(e){const n=q.c(18),{connectionId:i,tool:o,isSelected:c,onToggle:u}=e,f=`tool-${i}-${o.name}`,d=c?"text-foreground":"text-muted-foreground";let T;n[0]!==d?(T=$("text-sm font-medium",d),n[0]=d,n[1]=T):T=n[1];let g;n[2]!==T||n[3]!==o.name?(g=s.jsx("div",{className:"flex items-center gap-2 mb-1",children:s.jsx("span",{className:T,children:o.name})}),n[2]=T,n[3]=o.name,n[4]=g):g=n[4];let r;n[5]!==o.description?(r=o.description&&s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:o.description}),n[5]=o.description,n[6]=r):r=n[6];let E;n[7]!==g||n[8]!==r?(E=s.jsxs("div",{className:"flex-1 min-w-0",children:[g,r]}),n[7]=g,n[8]=r,n[9]=E):E=n[9];const a=`tool-${i}-${o.name}`;let m;n[10]!==c||n[11]!==u||n[12]!==a?(m=s.jsx("div",{className:"flex items-center shrink-0",children:s.jsx(Oe,{id:a,checked:c,onCheckedChange:u,onClick:wt})}),n[10]=c,n[11]=u,n[12]=a,n[13]=m):m=n[13];let _;return n[14]!==f||n[15]!==E||n[16]!==m?(_=s.jsxs("label",{className:"flex items-center gap-3 p-3 rounded-lg hover:bg-muted/50 cursor-pointer group will-change-auto",htmlFor:f,children:[E,m]}),n[14]=f,n[15]=E,n[16]=m,n[17]=_):_=n[17],_});function Gt({toolSet:t,onToolSetChange:e,excludeVirtualMcpId:n,searchQuery:i}){const[o,c]=k.useState(""),u=i!==void 0?i:o,f=k.useDeferredValue(u),[d,T]=k.useState("all"),[g,r]=k.useState(!1),E=k.useRef(new Set(Object.keys(t))),{org:a}=Re(),m=Rt({connectionId:xt,orgId:a.id}),_=100,x=f.trim(),C=x?{operator:"or",conditions:[{field:["title"],operator:"contains",value:x},{field:["description"],operator:"contains",value:x}]}:void 0,v=!!n,A={...C&&{where:C},orderBy:[{field:["updated_at"],direction:"asc"}],limit:_,offset:0,...v&&{include_virtual:!0}},y=JSON.stringify(A),{data:b,fetchNextPage:N,hasNextPage:p,isFetchingNextPage:S}=ht({queryKey:ce.collectionListInfinite(m,a.id,"","CONNECTIONS",y),queryFn:async({pageParam:I=0})=>(await m.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...C&&{where:C},orderBy:[{field:["updated_at"],direction:"asc"}],limit:_,offset:I,...v&&{include_virtual:!0}}})).structuredContent,initialPageParam:0,getNextPageParam:(I,U)=>{if(I?.hasMore)return U.reduce((K,ee)=>K+(ee?.items?.length??0),0)},staleTime:3e4}),l=b?.pages.flatMap(I=>I?.items??[])??[],h=_t(N,p??!1,S),P=n?l.filter(I=>I.connection_type!=="VIRTUAL"?!0:it(I.connection_url)!==n):l,j=E.current,R=[...j.values()].map(I=>P.find(U=>U.id===I)).filter(I=>I!==void 0),O=P.filter(I=>!j.has(I.id)),M=[...R,...O],Y=I=>{const U=t[I];return U!==void 0&&U.length>0},z=M.filter(I=>{if(d==="all")return!0;const U=Y(I.id);return d==="selected"?U:d==="unselected"?!U:!0}),[D,w]=k.useState(M[0]?.id??null),L=D?M.find(I=>I.id===D)??null:null,V=L?.tools??[],H=(I,U)=>t[I]?.includes(U)??!1,Q=(I,U)=>{const K=t[I]??[],ee=K.includes(U),Z={...t};if(ee){const J=K.filter(F=>F!==U);J.length===0?delete Z[I]:Z[I]=J}else Z[I]=[...K,U];e(Z)},X=I=>{const U=M.find(F=>F.id===I);if(!U?.tools)return;const K=t[I]??[],ee=U.tools.map(F=>F.name),Z=K.length>0&&ee.every(F=>K.includes(F)),J={...t};Z?delete J[I]:(J[I]=ee,w(I)),e(J)},W=I=>{w(I),r(!0)},ie=()=>{r(!1)};return s.jsxs("div",{className:"flex h-full",children:[s.jsxs("div",{className:$("w-full md:w-80 border-r border-border flex flex-col",g&&"hidden md:flex"),children:[i===void 0&&s.jsx(Nt,{value:o,onChange:c,placeholder:"Search MCP Servers..."}),s.jsxs("div",{className:"flex gap-1 p-2 border-b border-border",children:[s.jsx("button",{onClick:()=>T("all"),className:$("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="all"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"All"}),s.jsx("button",{onClick:()=>T("selected"),className:$("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="selected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Selected"}),s.jsx("button",{onClick:()=>T("unselected"),className:$("flex-1 px-3 py-1.5 text-xs font-medium rounded-md transition-colors border cursor-pointer",d==="unselected"?"bg-muted border-border":"border-border opacity-75 hover:opacity-100"),children:"Unselected"})]}),s.jsx("div",{className:"flex-1 overflow-auto",children:z.length===0?s.jsx("div",{className:"p-4 text-sm text-muted-foreground text-center",children:u?"No connections found":d==="selected"?"No servers selected":d==="unselected"?"No unselected servers":"No connections available"}):s.jsxs("div",{className:"p-2 space-y-1",children:[z.map(I=>{const U=I.tools?.length??0,K=t[I.id]?.length??0;return s.jsx(Pt,{connection:I,isSelected:D===I.id,hasToolsEnabled:Y(I.id),activeToolsCount:K,totalToolsCount:U,onSelect:()=>W(I.id),onToggle:()=>X(I.id)},I.id)}),s.jsx("div",{ref:h,className:"h-4"}),S&&s.jsx("div",{className:"flex justify-center py-3",children:s.jsx(_e,{size:18,className:"animate-spin text-muted-foreground"})})]})})]}),s.jsx("div",{className:$("flex-1 flex-col",g?"flex":"hidden md:flex"),children:L?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"md:hidden border-b border-border p-4 flex items-center gap-3",children:[s.jsx(ne,{variant:"ghost",size:"sm",onClick:ie,className:"h-8 w-8 p-0 shrink-0",children:s.jsx(It,{size:20})}),s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[s.jsx(Se,{icon:L.icon,name:L.title,size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:L.title}),L.description&&s.jsx("p",{className:"text-sm text-muted-foreground truncate",children:L.description})]})]})]}),s.jsx("div",{className:"flex-1 overflow-auto p-4",children:V.length===0?s.jsx("div",{className:"text-sm text-muted-foreground text-center py-8",children:"This connection has no tools available"}):s.jsx("div",{className:"space-y-2",children:V.map(I=>s.jsx(Mt,{connectionId:L.id,tool:I,isSelected:H(L.id,I.name),onToggle:()=>Q(L.id,I.name)},I.name))})})]}):s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx("div",{className:"text-sm text-muted-foreground text-center",children:"Select a connection to view its tools"})})})]})}function Dt(t){return t.stopPropagation()}function wt(t){return t.stopPropagation()}const xe=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],Ut={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function Je(t){if(!t)return"bg-neutral-400";let e=0;for(let i=0;i<t.length;i++){const o=t.charCodeAt(i);e=(e<<5)-e+o,e=e&e}const n=Math.abs(e)%xe.length;return xe[n]??xe[0]}function Me(t,e){return e?Ut[t]??"bg-neutral-400":Je(t)}const kt=ye({role:ye({id:se().optional(),slug:se().optional(),label:se()}),allowAllStaticPermissions:ve(),staticPermissions:he(se()),toolSet:Le(se(),he(se())),allowAllModels:ve(),modelSet:Le(se(),he(se())),memberIds:he(se())});function We(t){return t?t.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2):"?"}function Vt(t){const e=q.c(34),{allowAllStaticPermissions:n,staticPermissions:i,onAllowAllChange:o,onPermissionsChange:c,readOnly:u,searchQuery:f}=t,d=u===void 0?!1:u,T=k.useDeferredValue(f);let g,r,E,a;if(e[0]!==n||e[1]!==T||e[2]!==o||e[3]!==c||e[4]!==d||e[5]!==i){const x=vt(),C=jt(),v=C.filter(l=>l.label.toLowerCase().includes(T.toLowerCase())),A=l=>{if(i.includes(l))c(i.filter(h=>h!==l));else{const h=[...i,l];h.length===C.length?(o(!0),c([])):c(h)}};E="flex flex-col h-full";const y=!d&&"hover:bg-muted/50 cursor-pointer";let b;e[10]!==y?(b=$("flex items-center justify-between px-4 py-3",y),e[10]=y,e[11]=b):b=e[11];let N;e[12]!==n||e[13]!==o||e[14]!==c||e[15]!==d?(N=()=>{d||(o(!n),c([]))},e[12]=n,e[13]=o,e[14]=c,e[15]=d,e[16]=N):N=e[16];let p;e[17]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx("span",{className:"text-sm font-medium",children:"All organization permissions"}),e[17]=p):p=e[17];let S;e[18]!==n||e[19]!==o||e[20]!==c||e[21]!==d?(S=s.jsx("div",{onClick:Kt,children:d?s.jsx(ue,{children:s.jsxs(ge,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(oe,{checked:n,disabled:!0,onCheckedChange:$t})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(oe,{checked:n,onCheckedChange:l=>{o(l),c([])}})}),e[18]=n,e[19]=o,e[20]=c,e[21]=d,e[22]=S):S=e[22],e[23]!==S||e[24]!==b||e[25]!==N?(a=s.jsx("div",{className:"border-b border-border",children:s.jsxs("div",{className:b,onClick:N,children:[p,S]})}),e[23]=S,e[24]=b,e[25]=N,e[26]=a):a=e[26],g="flex-1 overflow-auto",r=Object.entries(x).map(l=>{const[h,P]=l,j=v.filter(R=>P.some(O=>O.name===R.value));return j.length===0?null:s.jsxs("div",{className:"mb-6 last:mb-0",children:[s.jsx("h4",{className:"text-sm font-medium p-3 pb-1.5 text-muted-foreground/75",children:h}),s.jsx("div",{className:"space-y-1",children:j.map(R=>s.jsxs("div",{className:$("flex items-center justify-between gap-3 px-4 py-3",!d&&"hover:bg-muted/50 cursor-pointer"),onClick:()=>{d||(n?(o(!1),c(C.map(Ht).filter(O=>O!==R.value))):A(R.value))},children:[s.jsx("span",{className:"text-sm flex-1 min-w-0",children:R.label}),s.jsx("div",{onClick:Yt,children:d?s.jsx(ue,{children:s.jsxs(ge,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(oe,{checked:n||i.includes(R.value),disabled:!0,onCheckedChange:zt})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(oe,{checked:n||i.includes(R.value),onCheckedChange:()=>{n?(o(!1),c(C.map(Bt).filter(O=>O!==R.value))):A(R.value)}})})]},R.value))})]},h)}),e[0]=n,e[1]=T,e[2]=o,e[3]=c,e[4]=d,e[5]=i,e[6]=g,e[7]=r,e[8]=E,e[9]=a}else g=e[6],r=e[7],E=e[8],a=e[9];let m;e[27]!==g||e[28]!==r?(m=s.jsx("div",{className:g,children:r}),e[27]=g,e[28]=r,e[29]=m):m=e[29];let _;return e[30]!==E||e[31]!==a||e[32]!==m?(_=s.jsxs("div",{className:E,children:[a,m]}),e[30]=E,e[31]=a,e[32]=m,e[33]=_):_=e[33],_}function Bt(t){return t.value}function zt(){}function Yt(t){return t.stopPropagation()}function Ht(t){return t.value}function $t(){}function Kt(t){return t.stopPropagation()}const et={anthropic:"Anthropic",openrouter:"OpenRouter"},Ft={openai:"OpenAI",anthropic:"Anthropic",google:"Google","meta-llama":"Meta",mistralai:"Mistral","x-ai":"xAI",deepseek:"DeepSeek",qwen:"Qwen",moonshotai:"MoonshotAI",nvidia:"NVIDIA",perplexity:"Perplexity",cohere:"Cohere",amazon:"Amazon",microsoft:"Microsoft","z-ai":"Z.ai","ibm-granite":"IBM Granite",alibaba:"Alibaba",baidu:"Baidu",bytedance:"ByteDance",tencent:"Tencent",minimax:"MiniMax",nousresearch:"Nous Research",allenai:"Allen AI",inception:"Inception"};function Qt(t,e){const n=t.indexOf("/"),i=n>0?t.slice(0,n):e;return i.startsWith("~")?i.slice(1):i}function Zt(t){return Ft[t]??et[t]??t}function qt(t){const e=t.indexOf(": ");return e>0&&e<32?t.slice(e+2):t}const tt=30;function Xt(t){const e=q.c(44),{connectionId:n,subProviderId:i,subProviderName:o,groupLogo:c,models:u,allConnectionModelIds:f,selectedModels:d,allowAllModels:T,allConnectionModelsSelected:g,onToggleModel:r,onExitAllowAll:E,readOnly:a,defaultExpanded:m}=t,[_,x]=k.useState(m),C=m||_,v=x,[A,y]=k.useState(tt);let b;e[0]!==g||e[1]!==T||e[2]!==d?(b=h=>T||g||d.includes("*")||d.includes(h),e[0]=g,e[1]=T,e[2]=d,e[3]=b):b=e[3];const N=b;let p;if(e[4]!==N||e[5]!==u){let h;e[7]!==N?(h=P=>N(P.id),e[7]=N,e[8]=h):h=e[8],p=u.filter(h),e[4]=N,e[5]=u,e[6]=p}else p=e[6];const S=p.length;let l;if(e[9]!==f||e[10]!==T||e[11]!==n||e[12]!==S||e[13]!==C||e[14]!==c||e[15]!==N||e[16]!==u||e[17]!==E||e[18]!==r||e[19]!==a||e[20]!==i||e[21]!==o||e[22]!==A){const h=u.slice(0,A),P=u.length>A;let j;e[24]===Symbol.for("react.memo_cache_sentinel")?(j=()=>v(ts),e[24]=j):j=e[24];const R=c??Fe[i]??Qe;let O;e[25]!==o||e[26]!==R?(O=s.jsx(Se,{icon:R,name:o,size:"sm"}),e[25]=o,e[26]=R,e[27]=O):O=e[27];let M;e[28]!==o?(M=s.jsx("span",{className:"text-sm font-medium truncate",children:o}),e[28]=o,e[29]=M):M=e[29];let Y;e[30]!==O||e[31]!==M?(Y=s.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[O,M]}),e[30]=O,e[31]=M,e[32]=Y):Y=e[32];let z;e[33]!==S||e[34]!==u.length?(z=s.jsxs(fe,{variant:"secondary",className:"text-xs text-muted-foreground",children:[S,"/",u.length," enabled"]}),e[33]=S,e[34]=u.length,e[35]=z):z=e[35];let D;e[36]!==C?(D=C?s.jsx(St,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(Ot,{size:16,className:"text-muted-foreground shrink-0"}),e[36]=C,e[37]=D):D=e[37];let w;e[38]!==D||e[39]!==z?(w=s.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[z,D]}),e[38]=D,e[39]=z,e[40]=w):w=e[40];let L;e[41]!==w||e[42]!==Y?(L=s.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-3 hover:bg-muted/50 cursor-pointer",onClick:j,children:[Y,w]}),e[41]=w,e[42]=Y,e[43]=L):L=e[43],l=s.jsxs("div",{className:"border border-border rounded-lg overflow-hidden bg-card",children:[L,C&&s.jsxs("div",{className:"border-t border-border bg-muted/20",children:[h.map(V=>{const H=N(V.id),Q=()=>{if(!a){if(T){E(n,f,V.id);return}r(n,V.id)}};return s.jsxs("div",{className:$("flex items-center justify-between gap-3 px-4 py-3 border-b border-border last:border-b-0",!a&&"hover:bg-muted/50 cursor-pointer"),onClick:Q,children:[s.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:s.jsx("span",{className:"text-sm truncate",children:V.title})}),s.jsx("div",{onClick:es,children:a?s.jsx(ue,{children:s.jsxs(ge,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(oe,{checked:H,disabled:!0,onCheckedChange:Wt})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(oe,{checked:H,onCheckedChange:Q})})]},V.id)}),P&&s.jsxs("button",{type:"button",className:"w-full px-4 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors",onClick:()=>y(Jt),children:["Show more (",u.length-A," remaining)"]})]})]}),e[9]=f,e[10]=T,e[11]=n,e[12]=S,e[13]=C,e[14]=c,e[15]=N,e[16]=u,e[17]=E,e[18]=r,e[19]=a,e[20]=i,e[21]=o,e[22]=A,e[23]=l}else l=e[23];return l}function Jt(t){return t+tt}function Wt(){}function es(t){return t.stopPropagation()}function ts(t){return!t}function ss(t){const e=q.c(33),{connection:n,selectedModels:i,allowAllModels:o,onToggleModel:c,onExitAllowAll:u,allConnectionModelsSelected:f,searchQuery:d,readOnly:T}=t,g=bt(n.id);let r,E,a,m,_;if(e[0]!==f||e[1]!==o||e[2]!==n.id||e[3]!==n.label||e[4]!==n.providerId||e[5]!==u||e[6]!==c||e[7]!==g||e[8]!==T||e[9]!==d||e[10]!==i){_=Symbol.for("react.early_return_sentinel");e:{let v;e[16]!==n.label?(v=R=>({...R,id:R.modelId,provider:n.label}),e[16]=n.label,e[17]=v):v=e[17];const A=g.filter(os).map(v),y=d.trim().toLowerCase(),b=y?A.filter(R=>R.title.toLowerCase().includes(y)||R.id.toLowerCase().includes(y)||R.provider?.toLowerCase().includes(y)):A;if(b.length===0){_=null;break e}const N=new Map;for(const R of b){const O=Qt(R.id,n.providerId),M=N.get(O)??{models:[],logo:null};M.models.push({id:R.id,title:qt(R.title),logo:R.logo}),!M.logo&&R.logo&&(M.logo=R.logo),N.set(O,M)}const p=Array.from(N.entries()).map(rs).sort(is),S=p.length===1||y.length>0;a="flex flex-col gap-3";const l=Fe[n.providerId]??Qe;let h;e[18]!==n.providerId||e[19]!==l?(h=s.jsx("img",{src:l,alt:n.providerId,className:"w-4 h-4 rounded-sm dark:bg-white dark:rounded-sm dark:p-px"}),e[18]=n.providerId,e[19]=l,e[20]=h):h=e[20];const P=et[n.providerId]??n.providerId;let j;e[21]!==P?(j=s.jsx("h4",{className:"text-sm font-medium",children:P}),e[21]=P,e[22]=j):j=e[22],e[23]!==j||e[24]!==h?(m=s.jsxs("div",{className:"flex items-center gap-2",children:[h,j]}),e[23]=j,e[24]=h,e[25]=m):m=e[25],r="flex flex-col gap-3",E=p.map(R=>s.jsx(Xt,{connectionId:n.id,subProviderId:R.id,subProviderName:R.name,groupLogo:R.logo,models:R.models,allConnectionModelIds:A.map(ns),selectedModels:i,allowAllModels:o,allConnectionModelsSelected:f,onToggleModel:c,onExitAllowAll:u,readOnly:T,defaultExpanded:S},R.id))}e[0]=f,e[1]=o,e[2]=n.id,e[3]=n.label,e[4]=n.providerId,e[5]=u,e[6]=c,e[7]=g,e[8]=T,e[9]=d,e[10]=i,e[11]=r,e[12]=E,e[13]=a,e[14]=m,e[15]=_}else r=e[11],E=e[12],a=e[13],m=e[14],_=e[15];if(_!==Symbol.for("react.early_return_sentinel"))return _;let x;e[26]!==r||e[27]!==E?(x=s.jsx("div",{className:r,children:E}),e[26]=r,e[27]=E,e[28]=x):x=e[28];let C;return e[29]!==a||e[30]!==m||e[31]!==x?(C=s.jsxs("div",{className:a,children:[m,x]}),e[29]=a,e[30]=m,e[31]=x,e[32]=C):C=e[32],C}function ns(t){return t.id}function is(t,e){return t.name.localeCompare(e.name)}function rs(t){const[e,n]=t;return{id:e,name:Zt(e),logo:n.logo,models:n.models}}function os(t,e,n){return n.findIndex(i=>i.modelId===t.modelId)===e}function ls(t){const e=q.c(35),{allowAllModels:n,modelSet:i,onAllowAllChange:o,onModelSetChange:c,readOnly:u,searchQuery:f}=t,d=u===void 0?!1:u,T=k.useDeferredValue(f),g=At();let r;e[0]!==i||e[1]!==c?(r=(p,S)=>{const l=i[p]??[],h={...i};if(l.includes(S)){const P=l.filter(j=>j!==S);P.length===0?delete h[p]:h[p]=P}else h[p]=[...l,S];c(h)},e[0]=i,e[1]=c,e[2]=r):r=e[2];const E=r;let a;e[3]!==i||e[4]!==o||e[5]!==c?(a=(p,S,l)=>{o(!1),c({...i,[p]:S.filter(h=>h!==l)})},e[3]=i,e[4]=o,e[5]=c,e[6]=a):a=e[6];const m=a,_=!d&&"hover:bg-muted/50 cursor-pointer";let x;e[7]!==_?(x=$("flex items-center justify-between px-4 py-3 rounded-lg border border-border bg-card",_),e[7]=_,e[8]=x):x=e[8];let C;e[9]!==n||e[10]!==o||e[11]!==c||e[12]!==d?(C=()=>{if(d)return;const p=!n;o(p),p&&c({})},e[9]=n,e[10]=o,e[11]=c,e[12]=d,e[13]=C):C=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx("span",{className:"text-sm font-medium",children:"All models"}),e[14]=v):v=e[14];let A;e[15]!==n||e[16]!==o||e[17]!==c||e[18]!==d?(A=s.jsx("div",{onClick:cs,children:d?s.jsx(ue,{children:s.jsxs(ge,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(oe,{checked:n,disabled:!0,onCheckedChange:as})})}),s.jsx(Te,{children:s.jsx("p",{children:"Built-in role permissions cannot be changed"})})]})}):s.jsx(oe,{checked:n,onCheckedChange:p=>{o(p),p&&c({})}})}),e[15]=n,e[16]=o,e[17]=c,e[18]=d,e[19]=A):A=e[19];let y;e[20]!==x||e[21]!==C||e[22]!==A?(y=s.jsxs("div",{className:x,onClick:C,children:[v,A]}),e[20]=x,e[21]=C,e[22]=A,e[23]=y):y=e[23];let b;e[24]!==g||e[25]!==n||e[26]!==T||e[27]!==m||e[28]!==i||e[29]!==d||e[30]!==E?(b=g.length===0?s.jsx("div",{className:"flex items-center justify-center py-8 text-sm text-muted-foreground",children:"No LLM connections configured"}):g.map(p=>s.jsx(k.Suspense,{fallback:s.jsxs("div",{className:"px-4 py-3 flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_e,{className:"size-4 animate-spin"}),"Loading models..."]}),children:s.jsx(ss,{connection:p,selectedModels:i[p.id]??[],allowAllModels:n,onToggleModel:E,onExitAllowAll:m,allConnectionModelsSelected:(i[p.id]??[]).includes("*"),searchQuery:T,readOnly:d})},p.id)),e[24]=g,e[25]=n,e[26]=T,e[27]=m,e[28]=i,e[29]=d,e[30]=E,e[31]=b):b=e[31];let N;return e[32]!==b||e[33]!==y?(N=s.jsxs("div",{className:"flex flex-col h-full overflow-auto gap-6 pb-6",children:[y,b]}),e[32]=b,e[33]=y,e[34]=N):N=e[34],N}function as(){}function cs(t){return t.stopPropagation()}function ds(t){const e=q.c(52),{open:n,onOpenChange:i,selectedMemberIds:o,onAddMembers:c}=t,[u,f]=k.useState(""),d=k.useDeferredValue(u);let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=[],e[0]=T):T=e[0];const[g,r]=k.useState(T),{data:E}=Ze();let a,m,_,x,C,v,A,y,b,N,p;if(e[1]!==E?.data?.members||e[2]!==d||e[3]!==c||e[4]!==i||e[5]!==n||e[6]!==g||e[7]!==u||e[8]!==o){const Y=E?.data?.members??[];let z;e[20]!==d?(z=L=>{const V=d.toLowerCase();return L.user?.name?.toLowerCase().includes(V)||L.user?.email?.toLowerCase().includes(V)},e[20]=d,e[21]=z):z=e[21];const D=Y.filter(z);let w;e[22]!==c||e[23]!==i||e[24]!==g?(w=()=>{c(g),r([]),i(!1)},e[22]=c,e[23]=i,e[24]=g,e[25]=w):w=e[25],_=w,m=Ue,N=n,p=i,a=ke,y="sm:max-w-md p-0 overflow-hidden",e[26]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsxs(Ve,{className:"px-6 pt-6",children:[s.jsx(Be,{children:"Add Members to Role"}),s.jsx(ze,{children:"Select members to add to this role."})]}),e[26]=b):b=e[26],v="flex flex-col h-80",e[27]!==u?(A=s.jsx("div",{className:"border-b border-border px-4 py-3",children:s.jsx(be,{value:u,onChange:f,placeholder:"Search members...",className:"w-full"})}),e[27]=u,e[28]=A):A=e[28],x="flex-1 overflow-auto",C=D.length===0?s.jsx("div",{className:"flex items-center justify-center h-full px-6",children:s.jsx("p",{className:"text-sm text-muted-foreground",children:u?"No members found":"No members available"})}):s.jsx("div",{className:"px-6 py-2 space-y-1",children:D.map(L=>{const V=L.role!=="owner",H=o.includes(L.id),Q=g.includes(L.id);return s.jsxs("label",{className:$("flex items-center gap-3 p-2 rounded-lg",!V||H?"opacity-50 cursor-not-allowed":"cursor-pointer hover:bg-muted/50"),children:[s.jsx(Oe,{checked:Q||H,onCheckedChange:()=>{!V||H||r(X=>X.includes(L.id)?X.filter(W=>W!==L.id):[...X,L.id])},disabled:!V||H}),s.jsx(qe,{url:L.user?.image??void 0,fallback:We(L.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:L.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:L.user?.email})]}),!V&&s.jsx(fe,{variant:"secondary",className:"shrink-0",children:"Owner"}),H&&V&&s.jsx(fe,{variant:"outline",className:"shrink-0",children:"Added"})]},L.id)})}),e[1]=E?.data?.members,e[2]=d,e[3]=c,e[4]=i,e[5]=n,e[6]=g,e[7]=u,e[8]=o,e[9]=a,e[10]=m,e[11]=_,e[12]=x,e[13]=C,e[14]=v,e[15]=A,e[16]=y,e[17]=b,e[18]=N,e[19]=p}else a=e[9],m=e[10],_=e[11],x=e[12],C=e[13],v=e[14],A=e[15],y=e[16],b=e[17],N=e[18],p=e[19];let S;e[29]!==x||e[30]!==C?(S=s.jsx("div",{className:x,children:C}),e[29]=x,e[30]=C,e[31]=S):S=e[31];let l;e[32]!==S||e[33]!==v||e[34]!==A?(l=s.jsxs("div",{className:v,children:[A,S]}),e[32]=S,e[33]=v,e[34]=A,e[35]=l):l=e[35];let h;e[36]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(Ye,{children:"Cancel"}),e[36]=h):h=e[36];const P=g.length===0,j=g.length>0&&`(${g.length})`;let R;e[37]!==_||e[38]!==P||e[39]!==j?(R=s.jsxs(He,{className:"px-6 pb-6",children:[h,s.jsxs($e,{onClick:_,disabled:P,children:["Add ",j]})]}),e[37]=_,e[38]=P,e[39]=j,e[40]=R):R=e[40];let O;e[41]!==a||e[42]!==l||e[43]!==R||e[44]!==y||e[45]!==b?(O=s.jsxs(a,{className:y,children:[b,l,R]}),e[41]=a,e[42]=l,e[43]=R,e[44]=y,e[45]=b,e[46]=O):O=e[46];let M;return e[47]!==m||e[48]!==O||e[49]!==N||e[50]!==p?(M=s.jsx(m,{open:N,onOpenChange:p,children:O}),e[47]=m,e[48]=O,e[49]=N,e[50]=p,e[51]=M):M=e[51],M}function ms(t){const e=q.c(28),{memberIds:n,onMemberIdsChange:i,readOnly:o,searchQuery:c,addMemberDialogOpen:u,onAddMemberDialogOpenChange:f}=t,d=o===void 0?!1:o,T=k.useDeferredValue(c),{data:g}=Ze();let r,E,a;if(e[0]!==g?.data?.members||e[1]!==T||e[2]!==n||e[3]!==i||e[4]!==d||e[5]!==c){const v=g?.data?.members??[];let A;e[9]!==n?(A=p=>n.includes(p.id),e[9]=n,e[10]=A):A=e[10];const y=v.filter(A);let b;e[11]!==T?(b=p=>{const S=T.toLowerCase();return p.user?.name?.toLowerCase().includes(S)||p.user?.email?.toLowerCase().includes(S)},e[11]=T,e[12]=b):b=e[12];const N=y.filter(b);a="flex flex-col h-full",r="flex-1 overflow-auto",E=y.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h3",{className:"text-base font-medium mb-1",children:"No members"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Add members to grant them the configured permissions."})]})}):N.length===0?s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No members match "',c,'"']})}):s.jsx("div",{className:"p-4 space-y-2",children:N.map(p=>s.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/30",children:[s.jsx(qe,{url:p.user?.image??void 0,fallback:We(p.user?.name),shape:"circle",size:"sm"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:p.user?.name||"Unknown"}),s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:p.user?.email})]}),d?s.jsx(ue,{children:s.jsxs(ge,{children:[s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsx(ne,{variant:"ghost",size:"sm",disabled:!0,children:s.jsx(Pe,{size:16})})})}),s.jsx(Te,{children:s.jsx("p",{children:"Owner membership cannot be changed"})})]})}):s.jsx(ne,{variant:"ghost",size:"sm",onClick:()=>i(n.filter(S=>S!==p.id)),children:s.jsx(Pe,{size:16})})]},p.id))}),e[0]=g?.data?.members,e[1]=T,e[2]=n,e[3]=i,e[4]=d,e[5]=c,e[6]=r,e[7]=E,e[8]=a}else r=e[6],E=e[7],a=e[8];let m;e[13]!==r||e[14]!==E?(m=s.jsx("div",{className:r,children:E}),e[13]=r,e[14]=E,e[15]=m):m=e[15];let _;e[16]!==n||e[17]!==i?(_=v=>i([...n,...v]),e[16]=n,e[17]=i,e[18]=_):_=e[18];let x;e[19]!==u||e[20]!==n||e[21]!==f||e[22]!==_?(x=s.jsx(ds,{open:u,onOpenChange:f,selectedMemberIds:n,onAddMembers:_}),e[19]=u,e[20]=n,e[21]=f,e[22]=_,e[23]=x):x=e[23];let C;return e[24]!==a||e[25]!==m||e[26]!==x?(C=s.jsxs("div",{className:a,children:[m,x]}),e[24]=a,e[25]=m,e[26]=x,e[27]=C):C=e[27],C}function us(t){const e=q.c(3);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(_e,{size:24,className:"animate-spin text-muted-foreground"})}),e[0]=n):n=e[0];let i;return e[1]!==t?(i=s.jsx(k.Suspense,{fallback:n,children:s.jsx(ms,{...t})}),e[1]=t,e[2]=i):i=e[2],i}const gs={owner:[],admin:[],user:[]};function Es(t,e){const n=t==="owner"||t==="admin";return{role:{slug:t,label:t.charAt(0).toUpperCase()+t.slice(1)},allowAllStaticPermissions:n,staticPermissions:gs[t],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:e.filter(i=>i.role===t).map(i=>i.id)}}function Ts(t,e,n){const i=t.permission||{},o=i.self||[],c=o.includes("*"),u=c?[]:o.filter(r=>r!=="*"),f={};for(const[r,E]of Object.entries(i))if(!(r==="self"||r==="models"))if(r==="*")for(const a of n)f[a.id]=E.includes("*")?a.tools?.map(m=>m.name)??[]:E;else{const a=n.find(m=>m.id===r);a&&(f[r]=E.includes("*")?a.tools?.map(m=>m.name)??[]:E)}const d=i.models||[],T=d.length===0||d.includes("*:*"),g={};if(!T)for(const r of d){const E=r.indexOf(":");if(E===-1)continue;const a=r.slice(0,E),m=r.slice(E+1);g[a]||(g[a]=[]),g[a].push(m)}return{role:{id:t.id,slug:t.role,label:t.label},allowAllStaticPermissions:c,staticPermissions:u,toolSet:f,allowAllModels:T,modelSet:g,memberIds:e.filter(r=>r.role===t.role).map(r=>r.id)}}function ps(t,e){const n={};t.allowAllStaticPermissions?n.self=["*"]:t.staticPermissions.length>0&&(n.self=t.staticPermissions);for(const[i,o]of Object.entries(t.toolSet))if(o.length>0){const u=e.find(f=>f.id===i)?.tools?.map(f=>f.name)??[];n[i]=u.length>0&&u.every(f=>o.includes(f))?["*"]:o}if(t.allowAllModels)n.models=["*:*"];else{const i=[];for(const[o,c]of Object.entries(t.modelSet))for(const u of c)i.push(`${o}:${u}`);i.length>0&&(n.models=i)}return n}function fs(t,e,n){return t.kind==="builtin"?Es(t.role,e):t.kind==="custom"?Ts(t.role,e,n):{role:{id:void 0,slug:void 0,label:""},allowAllStaticPermissions:!1,staticPermissions:[],toolSet:{},allowAllModels:!0,modelSet:{},memberIds:[]}}function _s(t){const e=q.c(5),{readOnly:n,onOpen:i}=t;if(n){let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ee,{asChild:!0,children:s.jsx("div",{children:s.jsxs(ne,{variant:"outline",size:"sm",disabled:!0,children:[s.jsx(Ce,{size:16}),"Add Member"]})})}),e[0]=u):u=e[0];let f;return e[1]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ue,{children:s.jsxs(ge,{children:[u,s.jsx(Te,{children:s.jsx("p",{children:"Owner membership cannot be changed"})})]})}),e[1]=f):f=e[1],f}let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Ce,{size:16}),e[2]=o):o=e[2];let c;return e[3]!==i?(c=s.jsxs(ne,{variant:"outline",size:"sm",onClick:i,children:[o,"Add Member"]}),e[3]=i,e[4]=c):c=e[4],c}function Is(t){const e=q.c(11),{locator:n}=Re(),i=Ct();let o;e[0]!==n?(o=ce.members(n),e[0]=n,e[1]=o):o=e[1];let c;e[2]!==o?(c={queryKey:o,queryFn:hs},e[2]=o,e[3]=c):c=e[3];const{data:u,isPending:f}=Ge(c);if(f||!i){let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(_e,{size:32,className:"animate-spin text-muted-foreground"})})}),e[4]=r):r=e[4],r}let d;e[5]!==u?.data?.members?(d=u?.data?.members??[],e[5]=u?.data?.members,e[6]=d):d=e[6];const T=d;let g;return e[7]!==i||e[8]!==T||e[9]!==t?(g=s.jsx(Rs,{...t,members:T,connections:i}),e[7]=i,e[8]=T,e[9]=t,e[10]=g):g=e[10],g}function hs(){return re.organization.listMembers()}function Rs({target:t,onBack:e,onSaved:n,members:i,connections:o}){const{locator:c}=Re(),u=De(),f=t.kind==="builtin",d=t.kind==="new",[T,g]=k.useState(f?"org":"mcp"),r=rt({resolver:ot(kt),defaultValues:fs(t,i,o)}),E=r.formState.isValid,a=r.formState.isDirty,m=we({mutationFn:async l=>{const h=ps(l,o),P=l.role.slug||l.role.label.toLowerCase().replace(/\s+/g,"-"),j=l.role.slug&&!l.role.id,R=async O=>{const M=i.filter(D=>D.role===O).map(D=>D.id),Y=l.memberIds.filter(D=>!M.includes(D)),z=M.filter(D=>!l.memberIds.includes(D));for(const D of Y){const w=await re.organization.updateMemberRole({memberId:D,role:[O]});if(w?.error)throw new Error(w.error.message??"Something went wrong")}for(const D of z){const w=await re.organization.updateMemberRole({memberId:D,role:["user"]});if(w?.error)throw new Error(w.error.message??"Something went wrong")}};if(j)return await R(l.role.slug),l;if(l.role.id){const O=await re.organization.updateRole({roleId:l.role.id,data:{permission:h}});if(O?.error)throw new Error(O.error.message??"Something went wrong");return await R(l.role.slug),l}else{const O=await re.organization.createRole({role:P,permission:h});if(O?.error)throw new Error(O.error.message??"Something went wrong");for(const M of l.memberIds){const Y=await re.organization.updateMemberRole({memberId:M,role:[P]});if(Y?.error)throw new Error(Y.error.message)}return{...l,role:{...l.role,id:O.data?.roleData?.id,slug:P}}}},onSuccess:(l,h)=>{u.invalidateQueries({queryKey:ce.members(c)}),u.invalidateQueries({queryKey:ce.organizationRoles(c)});const P=!h.role.id&&!h.role.slug,j=h.role.slug&&!h.role.id;Ae(j?"role_members_updated":P?"role_created":"role_updated",{role_slug:h.role.slug??null}),pe.success(j?"Members updated successfully!":P?"Role created successfully!":"Role updated successfully!"),r.reset(l),n(l.role.id)},onError:l=>{pe.error(l instanceof Error?l.message:"Failed to save role")}}),_=r.handleSubmit(l=>{if(!l.role.label.trim()){pe.error("Role name is required"),r.setFocus("role.label");return}m.mutate(l)}),x=!f||t.kind==="builtin"&&t.role!=="owner",C=t.kind==="builtin"?t.role.charAt(0).toUpperCase()+t.role.slice(1):t.kind==="custom"?t.role.label:"",v=[...f?[]:[{id:"mcp",label:"MCP Permissions"}],{id:"org",label:"Organization Permissions"},{id:"models",label:"Models"},{id:"members",label:"Members"}],[A,y]=k.useState(""),[b,N]=k.useState(!1),p=l=>{g(l),y("")},S={mcp:"Search MCP servers...",org:"Search permissions...",models:"Search models...",members:"Search members..."};return s.jsx(te,{children:s.jsxs(te.Content,{className:"flex flex-col overflow-hidden",children:[s.jsx("div",{className:"shrink-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pt-8 md:pt-12 pb-4",children:s.jsxs("div",{className:"flex flex-col gap-5",children:[s.jsx(te.Title,{actions:x&&s.jsxs(s.Fragment,{children:[s.jsx(ne,{variant:"outline",size:"sm",onClick:e,disabled:m.isPending,children:"Cancel"}),s.jsx(ne,{size:"sm",onClick:_,disabled:m.isPending||!E||!a,children:m.isPending?"Saving...":d?"Create Role":"Save Changes"})]}),children:s.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[s.jsx("div",{className:$("size-2.5 rounded-full shrink-0",t.kind==="builtin"?Me(t.role,!0):t.kind==="custom"?Me(t.role.role,!1):Je(r.watch("role.label")))}),f?s.jsx(Ke,{size:16,className:"text-muted-foreground shrink-0"}):s.jsx(yt,{size:16,className:"text-muted-foreground shrink-0"}),d?s.jsx("input",{...r.register("role.label"),placeholder:"Role name",className:"leading-tight text-foreground bg-transparent border-none outline-none px-1 -mx-1 rounded hover:bg-input/25 focus:bg-input/25 transition-colors w-64 placeholder:text-muted-foreground/50",autoFocus:!0}):s.jsx("span",{className:"truncate",children:C})]})}),s.jsx("div",{className:"flex items-center gap-2",children:v.map(l=>s.jsx("button",{type:"button",onClick:()=>p(l.id),className:$("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex items-center",T===l.id?"bg-accent border-border text-foreground":"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:l.label},l.id))}),s.jsxs("div",{className:"flex items-center justify-between gap-3",children:[s.jsx(be,{value:A,onChange:y,placeholder:S[T]??"Search...",className:"w-full md:w-[375px]"}),T==="members"&&s.jsx(_s,{readOnly:t.kind==="builtin"&&t.role==="owner",onOpen:()=>N(!0)})]})]})}),s.jsx("div",{className:"flex-1 min-h-0 mx-auto w-full max-w-[1200px] px-4 md:px-10 pb-6",children:s.jsxs("div",{className:$("h-full overflow-hidden",T!=="models"&&"border border-border rounded-xl bg-card"),children:[T==="mcp"&&!f&&s.jsx(Gt,{toolSet:r.watch("toolSet"),onToolSetChange:l=>r.setValue("toolSet",l,{shouldDirty:!0}),searchQuery:A}),T==="org"&&s.jsx(Vt,{allowAllStaticPermissions:r.watch("allowAllStaticPermissions"),staticPermissions:r.watch("staticPermissions"),onAllowAllChange:l=>r.setValue("allowAllStaticPermissions",l,{shouldDirty:!0}),onPermissionsChange:l=>r.setValue("staticPermissions",l,{shouldDirty:!0}),readOnly:f,searchQuery:A}),T==="models"&&s.jsx(ls,{allowAllModels:r.watch("allowAllModels"),modelSet:r.watch("modelSet"),onAllowAllChange:l=>r.setValue("allowAllModels",l,{shouldDirty:!0}),onModelSetChange:l=>r.setValue("modelSet",l,{shouldDirty:!0}),readOnly:f,searchQuery:A}),T==="members"&&s.jsx(us,{memberIds:r.watch("memberIds"),onMemberIdsChange:l=>r.setValue("memberIds",l,{shouldDirty:!0}),readOnly:t.kind==="builtin"&&t.role==="owner",searchQuery:A,addMemberDialogOpen:b,onAddMemberDialogOpenChange:N})]})})]})})}function xs(t){return t.kind==="builtin"?`builtin-${t.role}`:t.kind==="custom"?`custom-${t.role.id}`:"new"}const Ns=[{role:"owner",label:"Owner",color:"bg-red-500"},{role:"admin",label:"Admin",color:"bg-blue-500"},{role:"user",label:"User",color:"bg-green-500"}],Ne=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"];function Cs(t){if(!t)return"bg-neutral-400";let e=0;for(let i=0;i<t.length;i++){const o=t.charCodeAt(i);e=(e<<5)-e+o,e=e&e}const n=Math.abs(e)%Ne.length;return Ne[n]??Ne[0]}const As={owner:"bg-red-500",admin:"bg-blue-500",user:"bg-green-500"};function bs(t,e){return e?As[t]??"bg-neutral-400":Cs(t)}function Ss(){const t=q.c(72),[e,n]=k.useState(""),[i,o]=k.useState(null),c=at();let u;t[0]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},t[0]=u):u=t[0];const{role:f}=ct(u),{locator:d}=Re(),T=De(),{customRoles:g,refetch:r}=dt();let E;t[1]!==c?(E=G=>c({to:".",search:B=>({...B,role:G})}),t[1]=c,t[2]=E):E=t[2];const a=E;let m;e:{if(!f){m=null;break e}if(f==="new"){m={kind:"new"};break e}if(f.startsWith("builtin-")){m={kind:"builtin",role:f.slice(8)};break e}let G;t[3]!==f?(G=le=>le.id===f,t[3]=f,t[4]=G):G=t[4];const B=g.find(G);m=B?{kind:"custom",role:B}:null}const _=m;let x;t[5]!==d?(x=ce.members(d),t[5]=d,t[6]=x):x=t[6];let C;t[7]!==x?(C={queryKey:x,queryFn:Ds},t[7]=x,t[8]=C):C=t[8];const{data:v}=Ge(C);let A;t[9]!==v?.data?.members?(A=v?.data?.members??[],t[9]=v?.data?.members,t[10]=A):A=t[10];const y=A;let b;t[11]!==y?(b=G=>y.filter(B=>B.role===G).length,t[11]=y,t[12]=b):b=t[12];const N=b;let p;if(t[13]!==g||t[14]!==N||t[15]!==e){let G;t[17]!==N?(G=ae=>({kind:"builtin",role:{...ae,memberCount:N(ae.role)}}),t[17]=N,t[18]=G):G=t[18];const B=Ns.map(G);let le;t[19]!==N?(le=ae=>({kind:"custom",role:{...ae,memberCount:N(ae.role)}}),t[19]=N,t[20]=le):le=t[20];const st=g.map(le);if(p=[...B,...st],e){const ae=e.toLowerCase();p=p.filter(nt=>nt.role.label.toLowerCase().includes(ae))}t[13]=g,t[14]=N,t[15]=e,t[16]=p}else p=t[16];const S=we({mutationFn:Gs,onSuccess:(G,B)=>{Ae("role_deleted",{role_id:B}),T.invalidateQueries({queryKey:ce.members(d)}),T.invalidateQueries({queryKey:ce.organizationRoles(d)}),pe.success("Role deleted successfully!"),r(),_?.kind==="custom"&&_.role.id===B&&a(void 0)},onError:Ms});let l,h,P,j;t[21]===Symbol.for("react.memo_cache_sentinel")?(h={id:"role",header:"Role",render:Ps,cellClassName:"flex-1 min-w-0",sortable:!0},P={id:"type",header:"Type",render:js,cellClassName:"w-28 shrink-0"},j={id:"permissions",header:"Permissions",render:vs,cellClassName:"flex-1 min-w-0"},l={id:"members",header:"Members",render:Ls,cellClassName:"w-24 shrink-0"},t[21]=l,t[22]=h,t[23]=P,t[24]=j):(l=t[21],h=t[22],P=t[23],j=t[24]);let R;t[25]===Symbol.for("react.memo_cache_sentinel")?(R=[h,P,j,l,{id:"actions",header:"",render:G=>G.kind==="builtin"?null:s.jsxs(mt,{children:[s.jsx(ut,{asChild:!0,children:s.jsx(ne,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ys,children:s.jsx(Tt,{size:16})})}),s.jsx(gt,{align:"end",onClick:Os,children:s.jsxs(Et,{variant:"destructive",onClick:()=>{const B=G.role;B.id&&o({id:B.id,label:B.label})},children:[s.jsx(pt,{size:16}),"Delete"]})})]}),cellClassName:"w-12 shrink-0"}],t[25]=R):R=t[25];const O=R;let M;t[26]!==a?(M=G=>{if(G.kind==="builtin")a(`builtin-${G.role.role}`);else{const B=G.role;a(B.id)}},t[26]=a,t[27]=M):M=t[27];const Y=M;if(_){let G;t[28]!==a?(G=()=>a(void 0),t[28]=a,t[29]=G):G=t[29];let B;return t[30]!==r||t[31]!==a?(B=()=>{r(),a(void 0)},t[30]=r,t[31]=a,t[32]=B):B=t[32],s.jsx(Is,{target:_,onBack:G,onSaved:B},xs(_))}let z;t[33]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(te.Title,{children:"Roles"}),t[33]=z):z=t[33];let D;t[34]===Symbol.for("react.memo_cache_sentinel")?(D=G=>{G.key==="Escape"&&(n(""),G.target.blur())},t[34]=D):D=t[34];let w;t[35]!==e?(w=s.jsx(be,{value:e,onChange:n,placeholder:"Search roles...",className:"w-full md:w-[375px]",onKeyDown:D}),t[35]=e,t[36]=w):w=t[36];let L;t[37]!==a?(L=()=>a("new"),t[37]=a,t[38]=L):L=t[38];let V;t[39]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ce,{size:16}),t[39]=V):V=t[39];let H;t[40]!==L?(H=s.jsxs(ne,{onClick:L,children:[V,"Create Role"]}),t[40]=L,t[41]=H):H=t[41];let Q;t[42]!==w||t[43]!==H?(Q=s.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[w,H]}),t[42]=w,t[43]=H,t[44]=Q):Q=t[44];let X;t[45]!==e?(X=e?s.jsx(je,{title:"No roles found",description:`No roles match "${e}"`}):s.jsx(je,{title:"No roles",description:"Create a role to get started."}),t[45]=e,t[46]=X):X=t[46];let W;t[47]!==p||t[48]!==O||t[49]!==Y||t[50]!==X?(W=s.jsx(ft,{columns:O,data:p,isLoading:!1,onRowClick:Y,emptyState:X}),t[47]=p,t[48]=O,t[49]=Y,t[50]=X,t[51]=W):W=t[51];let ie;t[52]!==Q||t[53]!==W?(ie=s.jsx(te.Content,{children:s.jsx(te.Body,{children:s.jsxs("div",{className:"flex flex-col gap-6",children:[z,Q,W]})})}),t[52]=Q,t[53]=W,t[54]=ie):ie=t[54];const I=i!==null;let U;t[55]===Symbol.for("react.memo_cache_sentinel")?(U=G=>!G&&o(null),t[55]=U):U=t[55];let K;t[56]===Symbol.for("react.memo_cache_sentinel")?(K=s.jsx(Be,{children:"Delete Role"}),t[56]=K):K=t[56];const ee=i?.label;let Z;t[57]!==ee?(Z=s.jsxs(Ve,{children:[K,s.jsxs(ze,{children:['Are you sure you want to delete the "',ee,'" role? This action cannot be undone.']})]}),t[57]=ee,t[58]=Z):Z=t[58];let J;t[59]===Symbol.for("react.memo_cache_sentinel")?(J=s.jsx(Ye,{children:"Cancel"}),t[59]=J):J=t[59];let F;t[60]!==S||t[61]!==i?(F=s.jsxs(He,{children:[J,s.jsx($e,{onClick:()=>{i?.id&&S.mutate(i.id),o(null)},className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[60]=S,t[61]=i,t[62]=F):F=t[62];let de;t[63]!==Z||t[64]!==F?(de=s.jsxs(ke,{children:[Z,F]}),t[63]=Z,t[64]=F,t[65]=de):de=t[65];let me;t[66]!==I||t[67]!==de?(me=s.jsx(Ue,{open:I,onOpenChange:U,children:de}),t[66]=I,t[67]=de,t[68]=me):me=t[68];let Ie;return t[69]!==ie||t[70]!==me?(Ie=s.jsxs(te,{children:[ie,me]}),t[69]=ie,t[70]=me,t[71]=Ie):Ie=t[71],Ie}function Os(t){return t.stopPropagation()}function ys(t){return t.stopPropagation()}function Ls(t){return s.jsx("span",{className:"text-sm text-foreground",children:t.role.memberCount})}function vs(t){if(t.kind==="builtin")return t.role.role==="owner"||t.role.role==="admin"?s.jsx("span",{className:"text-sm text-muted-foreground",children:"Full access"}):s.jsx("span",{className:"text-sm text-muted-foreground",children:"Basic access"});const e=t.role,n=[];return e.allowsAllStaticPermissions?n.push("Full org access"):e.staticPermissionCount&&e.staticPermissionCount>0&&n.push(`${e.staticPermissionCount} org perm${e.staticPermissionCount!==1?"s":""}`),e.allowsAllConnections?n.push("All connections"):e.connectionCount&&e.connectionCount>0&&n.push(`${e.connectionCount} connection${e.connectionCount!==1?"s":""}`),s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:n.length>0?n.join(", "):"No permissions"})}function js(t){return t.kind==="builtin"?s.jsx(fe,{variant:"secondary",className:"text-xs",children:"Built-in"}):s.jsx(fe,{variant:"outline",className:"text-xs",children:"Custom"})}function Ps(t){return s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:$("size-2.5 rounded-full shrink-0",bs(t.role.role,t.kind==="builtin"))}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.role.label}),t.kind==="builtin"&&s.jsx(Ke,{size:12,className:"text-muted-foreground shrink-0"})]})}function Ms(t,e){Ae("role_delete_failed",{role_id:e,error:t instanceof Error?t.message:String(t)}),pe.error(t instanceof Error?t.message:"Failed to delete role")}async function Gs(t){const e=await re.organization.deleteRole({roleId:t});if(e?.error)throw new Error(e.error.message);return e?.data}function Ds(){return re.organization.listMembers()}function kn(){const t=q.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx("div",{className:"text-sm text-muted-foreground",children:"Failed to load roles"})})}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(lt,{fallback:e,children:s.jsx(k.Suspense,{fallback:s.jsx(te,{children:s.jsx("div",{className:"flex items-center justify-center h-full",children:s.jsx(_e,{size:32,className:"animate-spin text-muted-foreground"})})}),children:s.jsx(Ss,{})})}),t[1]=n):n=t[1],n}export{kn as default};
@@ -0,0 +1 @@
1
+ import{r as i,b6 as T,aS as ce,j as b,a7 as _,ae,aW as O,a8 as C,a4 as P,cE as ie,e as F,c as $}from"./index-gKZjkMnf.js";import{e as de}from"./select-B6R2tTSM.js";function ue(r,e){return i.useReducer((o,l)=>e[o][l]??o,r)}var U="ScrollArea",[q]=ae(U),[fe,m]=q(U),G=i.forwardRef((r,e)=>{const{__scopeScrollArea:o,type:l="hover",dir:t,scrollHideDelay:n=600,...s}=r,[c,a]=i.useState(null),[u,d]=i.useState(null),[h,f]=i.useState(null),[S,w]=i.useState(null),[A,Y]=i.useState(null),[x,L]=i.useState(0),[M,j]=i.useState(0),[D,y]=i.useState(!1),[N,W]=i.useState(!1),v=T(e,E=>a(E)),p=ce(t);return b.jsx(fe,{scope:o,type:l,dir:p,scrollHideDelay:n,scrollArea:c,viewport:u,onViewportChange:d,content:h,onContentChange:f,scrollbarX:S,onScrollbarXChange:w,scrollbarXEnabled:D,onScrollbarXEnabledChange:y,scrollbarY:A,onScrollbarYChange:Y,scrollbarYEnabled:N,onScrollbarYEnabledChange:W,onCornerWidthChange:L,onCornerHeightChange:j,children:b.jsx(_.div,{dir:p,...s,ref:v,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":M+"px",...r.style}})})});G.displayName=U;var J="ScrollAreaViewport",K=i.forwardRef((r,e)=>{const{__scopeScrollArea:o,children:l,nonce:t,...n}=r,s=m(J,o),c=i.useRef(null),a=T(e,c,s.onViewportChange);return b.jsxs(b.Fragment,{children:[b.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:t}),b.jsx(_.div,{"data-radix-scroll-area-viewport":"",...n,ref:a,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...r.style},children:b.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:l})})]})});K.displayName=J;var g="ScrollAreaScrollbar",Q=i.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=t,c=r.orientation==="horizontal";return i.useEffect(()=>(c?n(!0):s(!0),()=>{c?n(!1):s(!1)}),[c,n,s]),t.type==="hover"?b.jsx(he,{...l,ref:e,forceMount:o}):t.type==="scroll"?b.jsx(be,{...l,ref:e,forceMount:o}):t.type==="auto"?b.jsx(Z,{...l,ref:e,forceMount:o}):t.type==="always"?b.jsx(V,{...l,ref:e}):null});Q.displayName=g;var he=i.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),[n,s]=i.useState(!1);return i.useEffect(()=>{const c=t.scrollArea;let a=0;if(c){const u=()=>{window.clearTimeout(a),s(!0)},d=()=>{a=window.setTimeout(()=>s(!1),t.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(a),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[t.scrollArea,t.scrollHideDelay]),b.jsx(O,{present:o||n,children:b.jsx(Z,{"data-state":n?"visible":"hidden",...l,ref:e})})}),be=i.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=m(g,r.__scopeScrollArea),n=r.orientation==="horizontal",s=X(()=>a("SCROLL_END"),100),[c,a]=ue("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>a("HIDE"),t.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,t.scrollHideDelay,a]),i.useEffect(()=>{const u=t.viewport,d=n?"scrollLeft":"scrollTop";if(u){let h=u[d];const f=()=>{const S=u[d];h!==S&&(a("SCROLL"),s()),h=S};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[t.viewport,n,a,s]),b.jsx(O,{present:o||c!=="hidden",children:b.jsx(V,{"data-state":c==="hidden"?"hidden":"visible",...l,ref:e,onPointerEnter:C(r.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:C(r.onPointerLeave,()=>a("POINTER_LEAVE"))})})}),Z=i.forwardRef((r,e)=>{const o=m(g,r.__scopeScrollArea),{forceMount:l,...t}=r,[n,s]=i.useState(!1),c=r.orientation==="horizontal",a=X(()=>{if(o.viewport){const u=o.viewport.offsetWidth<o.viewport.scrollWidth,d=o.viewport.offsetHeight<o.viewport.scrollHeight;s(c?u:d)}},10);return R(o.viewport,a),R(o.content,a),b.jsx(O,{present:l||n,children:b.jsx(V,{"data-state":n?"visible":"hidden",...t,ref:e})})}),V=i.forwardRef((r,e)=>{const{orientation:o="vertical",...l}=r,t=m(g,r.__scopeScrollArea),n=i.useRef(null),s=i.useRef(0),[c,a]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=ne(c.viewport,c.content),d={...l,sizes:c,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function h(f,S){return ge(f,s.current,c,S)}return o==="horizontal"?b.jsx(Se,{...d,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollLeft,S=k(f,c,t.dir);n.current.style.transform=`translate3d(${S}px, 0, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollLeft=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollLeft=h(f,t.dir))}}):o==="vertical"?b.jsx(ve,{...d,ref:e,onThumbPositionChange:()=>{if(t.viewport&&n.current){const f=t.viewport.scrollTop,S=k(f,c);n.current.style.transform=`translate3d(0, ${S}px, 0)`}},onWheelScroll:f=>{t.viewport&&(t.viewport.scrollTop=f)},onDragScroll:f=>{t.viewport&&(t.viewport.scrollTop=h(f))}}):null}),Se=i.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,c]=i.useState(),a=i.useRef(null),u=T(e,a,n.onScrollbarXChange);return i.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),b.jsx(re,{"data-orientation":"horizontal",...t,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":I(o)+"px",...r.style},onThumbPointerDown:d=>r.onThumbPointerDown(d.x),onDragScroll:d=>r.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(n.viewport){const f=n.viewport.scrollLeft+d.deltaX;r.onWheelScroll(f),se(f,h)&&d.preventDefault()}},onResize:()=>{a.current&&n.viewport&&s&&l({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:z(s.paddingLeft),paddingEnd:z(s.paddingRight)}})}})}),ve=i.forwardRef((r,e)=>{const{sizes:o,onSizesChange:l,...t}=r,n=m(g,r.__scopeScrollArea),[s,c]=i.useState(),a=i.useRef(null),u=T(e,a,n.onScrollbarYChange);return i.useEffect(()=>{a.current&&c(getComputedStyle(a.current))},[a]),b.jsx(re,{"data-orientation":"vertical",...t,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":I(o)+"px",...r.style},onThumbPointerDown:d=>r.onThumbPointerDown(d.y),onDragScroll:d=>r.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(n.viewport){const f=n.viewport.scrollTop+d.deltaY;r.onWheelScroll(f),se(f,h)&&d.preventDefault()}},onResize:()=>{a.current&&n.viewport&&s&&l({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:z(s.paddingTop),paddingEnd:z(s.paddingBottom)}})}})}),[me,ee]=q(g),re=i.forwardRef((r,e)=>{const{__scopeScrollArea:o,sizes:l,hasThumb:t,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:c,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:d,onResize:h,...f}=r,S=m(g,o),[w,A]=i.useState(null),Y=T(e,v=>A(v)),x=i.useRef(null),L=i.useRef(""),M=S.viewport,j=l.content-l.viewport,D=P(d),y=P(a),N=X(h,10);function W(v){if(x.current){const p=v.clientX-x.current.left,E=v.clientY-x.current.top;u({x:p,y:E})}}return i.useEffect(()=>{const v=p=>{const E=p.target;w?.contains(E)&&D(p,j)};return document.addEventListener("wheel",v,{passive:!1}),()=>document.removeEventListener("wheel",v,{passive:!1})},[M,w,j,D]),i.useEffect(y,[l,y]),R(w,N),R(S.content,N),b.jsx(me,{scope:o,scrollbar:w,hasThumb:t,onThumbChange:P(n),onThumbPointerUp:P(s),onThumbPositionChange:y,onThumbPointerDown:P(c),children:b.jsx(_.div,{...f,ref:Y,style:{position:"absolute",...f.style},onPointerDown:C(r.onPointerDown,v=>{v.button===0&&(v.target.setPointerCapture(v.pointerId),x.current=w.getBoundingClientRect(),L.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",S.viewport&&(S.viewport.style.scrollBehavior="auto"),W(v))}),onPointerMove:C(r.onPointerMove,W),onPointerUp:C(r.onPointerUp,v=>{const p=v.target;p.hasPointerCapture(v.pointerId)&&p.releasePointerCapture(v.pointerId),document.body.style.webkitUserSelect=L.current,S.viewport&&(S.viewport.style.scrollBehavior=""),x.current=null})})})}),H="ScrollAreaThumb",oe=i.forwardRef((r,e)=>{const{forceMount:o,...l}=r,t=ee(H,r.__scopeScrollArea);return b.jsx(O,{present:o||t.hasThumb,children:b.jsx(pe,{ref:e,...l})})}),pe=i.forwardRef((r,e)=>{const{__scopeScrollArea:o,style:l,...t}=r,n=m(H,o),s=ee(H,o),{onThumbPositionChange:c}=s,a=T(e,h=>s.onThumbChange(h)),u=i.useRef(void 0),d=X(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const h=n.viewport;if(h){const f=()=>{if(d(),!u.current){const S=xe(h,c);u.current=S,c()}};return c(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,d,c]),b.jsx(_.div,{"data-state":s.hasThumb?"visible":"hidden",...t,ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...l},onPointerDownCapture:C(r.onPointerDownCapture,h=>{const S=h.target.getBoundingClientRect(),w=h.clientX-S.left,A=h.clientY-S.top;s.onThumbPointerDown({x:w,y:A})}),onPointerUp:C(r.onPointerUp,s.onThumbPointerUp)})});oe.displayName=H;var B="ScrollAreaCorner",te=i.forwardRef((r,e)=>{const o=m(B,r.__scopeScrollArea),l=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&l?b.jsx(we,{...r,ref:e}):null});te.displayName=B;var we=i.forwardRef((r,e)=>{const{__scopeScrollArea:o,...l}=r,t=m(B,o),[n,s]=i.useState(0),[c,a]=i.useState(0),u=!!(n&&c);return R(t.scrollbarX,()=>{const d=t.scrollbarX?.offsetHeight||0;t.onCornerHeightChange(d),a(d)}),R(t.scrollbarY,()=>{const d=t.scrollbarY?.offsetWidth||0;t.onCornerWidthChange(d),s(d)}),u?b.jsx(_.div,{...l,ref:e,style:{width:n,height:c,position:"absolute",right:t.dir==="ltr"?0:void 0,left:t.dir==="rtl"?0:void 0,bottom:0,...r.style}}):null});function z(r){return r?parseInt(r,10):0}function ne(r,e){const o=r/e;return isNaN(o)?0:o}function I(r){const e=ne(r.viewport,r.content),o=r.scrollbar.paddingStart+r.scrollbar.paddingEnd,l=(r.scrollbar.size-o)*e;return Math.max(l,18)}function ge(r,e,o,l="ltr"){const t=I(o),n=t/2,s=e||n,c=t-s,a=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-c,d=o.content-o.viewport,h=l==="ltr"?[0,d]:[d*-1,0];return le([a,u],h)(r)}function k(r,e,o="ltr"){const l=I(e),t=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=e.scrollbar.size-t,s=e.content-e.viewport,c=n-l,a=o==="ltr"?[0,s]:[s*-1,0],u=de(r,a);return le([0,s],[0,c])(u)}function le(r,e){return o=>{if(r[0]===r[1]||e[0]===e[1])return e[0];const l=(e[1]-e[0])/(r[1]-r[0]);return e[0]+l*(o-r[0])}}function se(r,e){return r>0&&r<e}var xe=(r,e=()=>{})=>{let o={left:r.scrollLeft,top:r.scrollTop},l=0;return(function t(){const n={left:r.scrollLeft,top:r.scrollTop},s=o.left!==n.left,c=o.top!==n.top;(s||c)&&e(),o=n,l=window.requestAnimationFrame(t)})(),()=>window.cancelAnimationFrame(l)};function X(r,e){const o=P(r),l=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(l.current),[]),i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(o,e)},[o,e])}function R(r,e){const o=P(e);ie(()=>{let l=0;if(r){const t=new ResizeObserver(()=>{cancelAnimationFrame(l),l=window.requestAnimationFrame(o)});return t.observe(r),()=>{window.cancelAnimationFrame(l),t.unobserve(r)}}},[r,o])}var Pe=G,Ce=K,Ee=te;function _e(r){const e=F.c(17);let o,l,t,n;e[0]!==r?({className:l,children:o,hideScrollbar:n,...t}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=n===void 0?!1:n;let c;e[5]!==l?(c=$("relative h-full w-full",l),e[5]=l,e[6]=c):c=e[6];let a;e[7]!==o?(a=b.jsx(Ce,{"data-slot":"scroll-area-viewport",className:"h-full w-full overflow-auto rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:ring-[2px] focus-visible:ring-ring/20",children:b.jsx("div",{className:"flex min-w-0 flex-col",children:o})}),e[7]=o,e[8]=a):a=e[8];let u;e[9]!==s?(u=b.jsx(Re,{hideScrollbar:s}),e[9]=s,e[10]=u):u=e[10];let d;e[11]===Symbol.for("react.memo_cache_sentinel")?(d=b.jsx(Ee,{}),e[11]=d):d=e[11];let h;return e[12]!==t||e[13]!==c||e[14]!==a||e[15]!==u?(h=b.jsxs(Pe,{"data-slot":"scroll-area",className:c,...t,children:[a,u,d]}),e[12]=t,e[13]=c,e[14]=a,e[15]=u,e[16]=h):h=e[16],h}function Re(r){const e=F.c(15);let o,l,t,n;e[0]!==r?({className:o,orientation:t,hideScrollbar:n,...l}=r,e[0]=r,e[1]=o,e[2]=l,e[3]=t,e[4]=n):(o=e[1],l=e[2],t=e[3],n=e[4]);const s=t===void 0?"vertical":t,c=n===void 0?!1:n,a=s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",u=s==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",d=c&&"hidden";let h;e[5]!==o||e[6]!==a||e[7]!==u||e[8]!==d?(h=$("select-none touch-none p-px transition-colors",a,u,d,o),e[5]=o,e[6]=a,e[7]=u,e[8]=d,e[9]=h):h=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=b.jsx(oe,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"}),e[10]=f):f=e[10];let S;return e[11]!==s||e[12]!==l||e[13]!==h?(S=b.jsx(Q,{"data-slot":"scroll-area-scrollbar",orientation:s,className:h,...l,children:f}),e[11]=s,e[12]=l,e[13]=h,e[14]=S):S=e[14],S}export{_e as S,Re as a};
@@ -1 +1 @@
1
- import{e as b,c as w,j as a,l as j}from"./index-Bu0xhzLF.js";import{i as N}from"./SearchMd-BfBE-dHK.js";function S(f){const e=b.c(17),{value:l,onChange:c,placeholder:g,onKeyDown:d,className:u,isSearching:p,disabled:i}=f,m=g===void 0?"Search...":g,x=i&&"pointer-events-none opacity-50";let t;e[0]!==u||e[1]!==x?(t=w("flex items-center gap-4 rounded-lg bg-background dark:bg-input/30 px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",x,u),e[0]=u,e[1]=x,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{size:16,className:"animate-spin text-muted-foreground/75 shrink-0"}):a.jsx(N,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=h=>c(h.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==i||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:d,placeholder:m,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=i,e[8]=d,e[9]=m,e[10]=s,e[11]=l,e[12]=o):o=e[12];let r;return e[13]!==t||e[14]!==n||e[15]!==o?(r=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=r):r=e[16],r}export{S};
1
+ import{e as b,c as w,j as a,l as j}from"./index-gKZjkMnf.js";import{i as N}from"./SearchMd-B4RJoOIR.js";function S(f){const e=b.c(17),{value:l,onChange:c,placeholder:g,onKeyDown:d,className:u,isSearching:p,disabled:i}=f,m=g===void 0?"Search...":g,x=i&&"pointer-events-none opacity-50";let t;e[0]!==u||e[1]!==x?(t=w("flex items-center gap-4 rounded-lg bg-background dark:bg-input/30 px-3 h-8 card-shadow","focus-within:border-ring focus-within:ring-ring/20 focus-within:ring-[2px]","transition-[color,box-shadow]",x,u),e[0]=u,e[1]=x,e[2]=t):t=e[2];let n;e[3]!==p?(n=p?a.jsx(j,{size:16,className:"animate-spin text-muted-foreground/75 shrink-0"}):a.jsx(N,{size:16,className:"text-muted-foreground/75 shrink-0"}),e[3]=p,e[4]=n):n=e[4];let s;e[5]!==c?(s=h=>c(h.target.value),e[5]=c,e[6]=s):s=e[6];let o;e[7]!==i||e[8]!==d||e[9]!==m||e[10]!==s||e[11]!==l?(o=a.jsx("input",{type:"text",value:l,onChange:s,onKeyDown:d,placeholder:m,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[7]=i,e[8]=d,e[9]=m,e[10]=s,e[11]=l,e[12]=o):o=e[12];let r;return e[13]!==t||e[14]!==n||e[15]!==o?(r=a.jsxs("label",{className:t,children:[n,o]}),e[13]=t,e[14]=n,e[15]=o,e[16]=r):r=e[16],r}export{S};
@@ -0,0 +1 @@
1
+ import{r as i,aS as nt,aT as Pe,j as d,c4 as rt,aU as be,b6 as k,c5 as st,a7 as j,a8 as N,cE as $,c6 as lt,ao as _e,c7 as Ee,b9 as at,b7 as ct,a4 as it,c8 as dt,cb as ut,c9 as pt,cc as ft,cd as mt,ae as ht,ca as vt,ce as gt,cf as xt,e as ee,c as oe}from"./index-gKZjkMnf.js";import{V as St}from"./tooltip-DlUl6zVU.js";import{t as Re,i as wt}from"./ChevronDown-D098IDk9.js";import{n as Ct}from"./ChevronUp-qt4sL4uC.js";function Ne(r,[e,t]){return Math.min(t,Math.max(e,r))}var yt=[" ","Enter","ArrowUp","ArrowDown"],It=[" ","Enter"],J="Select",[de,ue,bt]=at(J),[ne]=ht(J,[bt,Ee]),pe=Ee(),[Tt,G]=ne(J),[Pt,Nt]=ne(J),je=r=>{const{__scopeSelect:e,children:t,open:o,defaultOpen:n,onOpenChange:c,value:s,defaultValue:l,onValueChange:a,dir:u,name:h,autoComplete:g,disabled:b,required:w,form:S}=r,p=pe(e),[v,C]=i.useState(null),[m,x]=i.useState(null),[U,M]=i.useState(!1),re=nt(u),[_,O]=Pe({prop:o,defaultProp:n??!1,onChange:c,caller:J}),[F,q]=Pe({prop:s,defaultProp:l,onChange:a,caller:J}),L=i.useRef(null),B=v?S||!!v.closest("form"):!0,[W,V]=i.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:U,onValueNodeHasChildrenChange:M,contentId:be(),value:F,onValueChange:q,open:_,onOpenChange:O,dir:re,triggerPointerDownPosRef:L,disabled:b,children:[d.jsx(de.Provider,{scope:e,children:d.jsx(Pt,{scope:r.__scopeSelect,onNativeOptionAdd:i.useCallback(E=>{V(D=>new Set(D).add(E))},[]),onNativeOptionRemove:i.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:F,onChange:E=>q(E.target.value),disabled:b,form:S,children:[F===void 0?d.jsx("option",{value:""}):null,Array.from(W)]},H):null]})})};je.displayName=J;var Me="SelectTrigger",Ae=i.forwardRef((r,e)=>{const{__scopeSelect:t,disabled:o=!1,...n}=r,c=pe(t),s=G(Me,t),l=s.disabled||o,a=k(e,s.onTriggerChange),u=ue(t),h=i.useRef("touch"),[g,b,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,...c,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(n.onClick,p=>{p.currentTarget.focus(),h.current!=="mouse"&&S(p)}),onPointerDown:N(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(n.onKeyDown,p=>{const v=g.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&b(p.key),!(v&&p.key===" ")&&yt.includes(p.key)&&(S(),p.preventDefault())})})})});Ae.displayName=Me;var Oe="SelectValue",De=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,children:c,placeholder:s="",...l}=r,a=G(Oe,t),{onValueNodeHasChildrenChange:u}=a,h=c!==void 0,g=k(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}):c})});De.displayName=Oe;var _t="SelectIcon",ke=i.forwardRef((r,e)=>{const{__scopeSelect:t,children:o,...n}=r;return d.jsx(j.span,{"aria-hidden":!0,...n,ref:e,children:o||"▼"})});ke.displayName=_t;var Et="SelectPortal",Le=r=>d.jsx(lt,{asChild:!0,...r});Le.displayName=Et;var Q="SelectContent",Be=i.forwardRef((r,e)=>{const t=G(Q,r.__scopeSelect),[o,n]=i.useState();if($(()=>{n(new DocumentFragment)},[]),!t.open){const c=o;return c?_e.createPortal(d.jsx(Ve,{scope:r.__scopeSelect,children:d.jsx(de.Slot,{scope:r.__scopeSelect,children:d.jsx("div",{children:r.children})})}),c):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=i.forwardRef((r,e)=>{const{__scopeSelect:t,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:c,onPointerDownOutside:s,side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:p,avoidCollisions:v,...C}=r,m=G(Q,t),[x,U]=i.useState(null),[M,re]=i.useState(null),_=k(e,f=>U(f)),[O,F]=i.useState(null),[q,L]=i.useState(null),B=ue(t),[W,V]=i.useState(!1),H=i.useRef(!1);i.useEffect(()=>{if(x)return dt(x)},[x]),ut();const E=i.useCallback(f=>{const[T,...R]=B().map(P=>P.ref.current),[y]=R.slice(-1),I=document.activeElement;for(const P of f)if(P===I||(P?.scrollIntoView({block:"nearest"}),P===T&&M&&(M.scrollTop=0),P===y&&M&&(M.scrollTop=M.scrollHeight),P?.focus(),document.activeElement!==I))return},[B,M]),D=i.useCallback(()=>E([O,x]),[E,O,x]);i.useEffect(()=>{W&&D()},[W,D]);const{onOpenChange:z,triggerPointerDownPosRef:K}=m;i.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]),i.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(I=>!I.disabled),R=T.find(I=>I.ref.current===document.activeElement),y=ot(T,f,R);y&&setTimeout(()=>y.ref.current.focus())}),me=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&(F(f),y&&(H.current=!0))},[m.value]),he=i.useCallback(()=>x?.focus(),[x]),te=i.useCallback((f,T,R)=>{const y=!H.current&&!R;(m.value!==void 0&&m.value===T||y)&&L(f)},[m.value]),ce=o==="popper"?Se:ze,se=ce===Se?{side:l,sideOffset:a,align:u,alignOffset:h,arrowPadding:g,collisionBoundary:b,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(n,f=>{m.trigger?.focus({preventScroll:!0}),f.preventDefault()}),children:d.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:()=>m.onOpenChange(!1),children:d.jsx(ce,{role:"listbox",id:m.contentId,"data-state":m.open?"open":"closed",dir:m.dir,onContextMenu:f=>f.preventDefault(),...C,...se,onPlaced:()=>V(!0),ref:_,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:N(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(I=>!I.disabled).map(I=>I.ref.current);if(["ArrowUp","End"].includes(f.key)&&(y=y.slice().reverse()),["ArrowUp","ArrowDown"].includes(f.key)){const I=f.target,P=y.indexOf(I);y=y.slice(P+1)}setTimeout(()=>E(y)),f.preventDefault()}})})})})})})});He.displayName=Rt;var Mt="SelectItemAlignedPosition",ze=i.forwardRef((r,e)=>{const{__scopeSelect:t,onPlaced:o,...n}=r,c=G(Q,t),s=Y(Q,t),[l,a]=i.useState(null),[u,h]=i.useState(null),g=k(e,_=>h(_)),b=ue(t),w=i.useRef(!1),S=i.useRef(!0),{viewport:p,selectedItem:v,selectedItemText:C,focusSelectedItem:m}=s,x=i.useCallback(()=>{if(c.trigger&&c.valueNode&&l&&u&&p&&v&&C){const _=c.trigger.getBoundingClientRect(),O=u.getBoundingClientRect(),F=c.valueNode.getBoundingClientRect(),q=C.getBoundingClientRect();if(c.dir!=="rtl"){const I=q.left-O.left,P=F.left-I,X=_.left-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.left=xe+"px"}else{const I=O.right-q.right,P=window.innerWidth-F.right-I,X=window.innerWidth-_.right-P,Z=_.width+X,ve=Math.max(Z,O.width),ge=window.innerWidth-A,xe=Ne(P,[A,Math.max(A,ge-ve)]);l.style.minWidth=Z+"px",l.style.right=xe+"px"}const L=b(),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=_.top+_.height/2-A,ce=B-te,se=v.offsetHeight/2,f=v.offsetTop+se,T=H+E+f,R=K-T;if(T<=te){const I=L.length>0&&v===L[L.length-1].ref.current;l.style.bottom="0px";const P=u.clientHeight-p.offsetTop-p.offsetHeight,X=Math.max(ce,se+(I?he:0)+P+D),Z=T+X;l.style.height=Z+"px"}else{const I=L.length>0&&v===L[0].ref.current;l.style.top="0px";const X=Math.max(te,H+p.offsetTop+(I?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)}},[b,c.trigger,c.valueNode,l,u,p,v,C,c.dir,o]);$(()=>x(),[x]);const[U,M]=i.useState();$(()=>{u&&M(window.getComputedStyle(u).zIndex)},[u]);const re=i.useCallback(_=>{_&&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:U},children:d.jsx(j.div,{...n,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});ze.displayName=Mt;var At="SelectPopperPosition",Se=i.forwardRef((r,e)=>{const{__scopeSelect:t,align:o="start",collisionPadding:n=A,...c}=r,s=pe(t);return d.jsx(gt,{...s,...c,ref:e,align:o,collisionPadding:n,style:{boxSizing:"border-box",...c.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",Ue=i.forwardRef((r,e)=>{const{__scopeSelect:t,nonce:o,...n}=r,c=Y(we,t),s=Te(we,t),l=k(e,c.onViewportChange),a=i.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(n.onScroll,u=>{const h=u.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:b}=s;if(b?.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),U=m-x;g.style.height=x+"px",g.style.bottom==="0px"&&(h.scrollTop=U>0?U:0,g.style.justifyContent="flex-end")}}}a.current=h.scrollTop})})})]})});Ue.displayName=we;var Fe="SelectGroup",[Dt,kt]=ne(Fe),Lt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=be();return d.jsx(Dt,{scope:t,id:n,children:d.jsx(j.div,{role:"group","aria-labelledby":n,...o,ref:e})})});Lt.displayName=Fe;var We="SelectLabel",Bt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=kt(We,t);return d.jsx(j.div,{id:n.id,...o,ref:e})});Bt.displayName=We;var ie="SelectItem",[Vt,Ke]=ne(ie),$e=i.forwardRef((r,e)=>{const{__scopeSelect:t,value:o,disabled:n=!1,textValue:c,...s}=r,l=G(ie,t),a=Y(ie,t),u=l.value===o,[h,g]=i.useState(c??""),[b,w]=i.useState(!1),S=k(e,m=>a.itemRefCallback?.(m,o,n)),p=be(),v=i.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:i.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":b?"":void 0,"aria-selected":u&&b,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...s,ref:S,onFocus:N(s.onFocus,()=>w(!0)),onBlur:N(s.onBlur,()=>w(!1)),onClick:N(s.onClick,()=>{v.current!=="mouse"&&C()}),onPointerUp:N(s.onPointerUp,()=>{v.current==="mouse"&&C()}),onPointerDown:N(s.onPointerDown,m=>{v.current=m.pointerType}),onPointerMove:N(s.onPointerMove,m=>{v.current=m.pointerType,n?a.onItemLeave?.():v.current==="mouse"&&m.currentTarget.focus({preventScroll:!0})}),onPointerLeave:N(s.onPointerLeave,m=>{m.currentTarget===document.activeElement&&a.onItemLeave?.()}),onKeyDown:N(s.onKeyDown,m=>{a.searchRef?.current!==""&&m.key===" "||(It.includes(m.key)&&C(),m.key===" "&&m.preventDefault())})})})})});$e.displayName=ie;var le="SelectItemText",Ge=i.forwardRef((r,e)=>{const{__scopeSelect:t,className:o,style:n,...c}=r,s=G(le,t),l=Y(le,t),a=Ke(le,t),u=Nt(le,t),[h,g]=i.useState(null),b=k(e,C=>g(C),a.onItemTextChange,C=>l.itemTextRefCallback?.(C,a.value,a.disabled)),w=h?.textContent,S=i.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,...c,ref:b}),a.isSelected&&s.valueNode&&!s.valueNodeHasChildren?_e.createPortal(c.children,s.valueNode):null]})});Ge.displayName=le;var Ye="SelectItemIndicator",qe=i.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=i.forwardRef((r,e)=>{const t=Y(Ce,r.__scopeSelect),o=Te(Ce,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollTop>0;c(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=i.forwardRef((r,e)=>{const t=Y(ye,r.__scopeSelect),o=Te(ye,r.__scopeSelect),[n,c]=i.useState(!1),s=k(e,o.onScrollButtonChange);return $(()=>{if(t.viewport&&t.isPositioned){let l=function(){const u=a.scrollHeight-a.clientHeight,h=Math.ceil(a.scrollTop)<u;c(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=i.forwardRef((r,e)=>{const{__scopeSelect:t,onAutoScroll:o,...n}=r,c=Y("SelectScrollButton",t),s=i.useRef(null),l=ue(t),a=i.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return i.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(n.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(o,50))}),onPointerMove:N(n.onPointerMove,()=>{c.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(o,50))}),onPointerLeave:N(n.onPointerLeave,()=>{a()})})}),Ht="SelectSeparator",zt=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r;return d.jsx(j.div,{"aria-hidden":!0,...o,ref:e})});zt.displayName=Ht;var Ie="SelectArrow",Ut=i.forwardRef((r,e)=>{const{__scopeSelect:t,...o}=r,n=pe(t),c=G(Ie,t),s=Y(Ie,t);return c.open&&s.position==="popper"?d.jsx(xt,{...n,...o,ref:e}):null});Ut.displayName=Ie;var Ft="SelectBubbleInput",Qe=i.forwardRef(({__scopeSelect:r,value:e,...t},o)=>{const n=i.useRef(null),c=k(o,n),s=ct(e);return i.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:c,defaultValue:e})});Qe.displayName=Ft;function et(r){return r===""||r===void 0}function tt(r){const e=it(r),t=i.useRef(""),o=i.useRef(0),n=i.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]),c=i.useCallback(()=>{t.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[t,n,c]}function ot(r,e,t){const n=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,c=t?r.indexOf(t):-1;let s=Wt(r,Math.max(c,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=ke,qt=Le,Xt=Be,Zt=Ue,Jt=$e,Qt=Ge,eo=qe,to=Xe,oo=Ze;function io(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 uo(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 po(r){const e=ee.c(13);let t,o,n,c;e[0]!==r?({className:o,size:c,children:t,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?"default":c;let l;e[5]!==o?(l=oe("data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/20 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 bg-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[2px] card-shadow disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 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 fo(r){const e=ee.c(25);let t,o,n,c,s;e[0]!==r?({className:o,children:t,position:c,hideScrollButtons:s,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c,e[5]=s):(t=e[1],o=e[2],n=e[3],c=e[4],s=e[5]);const l=c===void 0?"popper":c,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 b=l==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1";let w;e[11]!==b?(w=oe("p-1",b),e[11]=b,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 mo(r){const e=ee.c(16);let t,o,n,c;e[0]!==r?({className:o,children:t,hideCheck:c,...n}=r,e[0]=r,e[1]=t,e[2]=o,e[3]=n,e[4]=c):(t=e[1],o=e[2],n=e[3],c=e[4]);const s=c===void 0?!1:c;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 c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Ct,{className:"size-4"}),e[5]=c):c=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:c}),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 c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=d.jsx(Re,{className:"size-4"}),e[5]=c):c=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:c}),e[6]=o,e[7]=n,e[8]=s):s=e[8],s}export{io as S,po as a,uo as b,fo as c,mo as d,Ne as e};