decocms 2.292.2 → 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 (238) hide show
  1. package/dist/client/assets/{AlertCircle-De2C9wZC.js → AlertCircle-DnJbX_0w.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-bSu4Kz2F.js → ArrowNarrowLeft-M9-X6Sxy.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-DT3QLsvt.js → ArrowUpRight-BQK-oA7E.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-BIi7toDZ.js → CheckCircle-BTDGGZJo.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-DmIUGcFl.js → ChevronDown-D098IDk9.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-CIh2nJ4L.js → ChevronRight-DIr3-XeU.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BYOoc7wr.js → ChevronUp-qt4sL4uC.js} +1 -1
  8. package/dist/client/assets/{Container-BerLGLgK.js → Container-BvdKvtbe.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-CDho1dav.js → DotsVertical-DGFUAKYN.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-CcTNZj2P.js → LinkExternal01-CS_vTEL0.js} +1 -1
  11. package/dist/client/assets/{Lock01-B-vCOiSg.js → Lock01-DepQhBci.js} +1 -1
  12. package/dist/client/assets/{Palette-CqW3vcqn.js → Palette-SeD4BOqL.js} +1 -1
  13. package/dist/client/assets/{Play-CrdOw1Iv.js → Play-B2WhNMxb.js} +1 -1
  14. package/dist/client/assets/{Plus-Zv0hv0Vg.js → Plus-6a_0gFD5.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-COL3SGLi.js → RefreshCcw01-CmGHOB_j.js} +1 -1
  16. package/dist/client/assets/{SearchMd-BjteSZXQ.js → SearchMd-B4RJoOIR.js} +1 -1
  17. package/dist/client/assets/{Settings02-w5kxVqcK.js → Settings02-86F4b3dQ.js} +1 -1
  18. package/dist/client/assets/{Shield01-DodcxEya.js → Shield01-CzaXyqoU.js} +1 -1
  19. package/dist/client/assets/{Star01-BhFELsp4.js → Star01-BsL_E8DX.js} +1 -1
  20. package/dist/client/assets/{Sun-DY_ADcda.js → Sun-CoYtwe4c.js} +1 -1
  21. package/dist/client/assets/{Tool01-B5mm7tYF.js → Tool01-Cxeqfwwz.js} +1 -1
  22. package/dist/client/assets/{Trash01-DuRnWn1E.js → Trash01-Crqeojj8.js} +1 -1
  23. package/dist/client/assets/{User01-CQoJwY3u.js → User01-lfQ-qZIG.js} +1 -1
  24. package/dist/client/assets/{Users03-DfcHW1oz.js → Users03-BEcIfaLP.js} +1 -1
  25. package/dist/client/assets/{X-Bgfd1eh0.js → X-DSm8Y-S-.js} +1 -1
  26. package/dist/client/assets/{XCircle-DUufUsoh.js → XCircle-D0NNu2cU.js} +1 -1
  27. package/dist/client/assets/{XClose-BQJEwJET.js → XClose-8tp9nQPE.js} +1 -1
  28. package/dist/client/assets/{Zap-CDLB-lxK.js → Zap-GnwBp_Qp.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-BFGlmWLE.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-rItivTOb.js → alert-dialog-CscciHzk.js} +2 -2
  35. package/dist/client/assets/{auth-catchall-BGNYNNAk.js → auth-catchall-DZZidYw0.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-lCQuQb2Q.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-UVBUP_wG.js → avatar-BQ09Qk0Z.js} +1 -1
  39. package/dist/client/assets/{badge-nX1O9Qf1.js → badge-Clg4Tzdw.js} +1 -1
  40. package/dist/client/assets/brand-context-DZl3n4iE.js +1 -0
  41. package/dist/client/assets/{card-B6kxnNb0.js → card-DUOq7Rl6.js} +1 -1
  42. package/dist/client/assets/chat-context-CfrtTY3a.js +31 -0
  43. package/dist/client/assets/{checkbox-CTi7T5x-.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-BVB_BOr-.js → collection-search-CzSQR8Hb.js} +1 -1
  47. package/dist/client/assets/{collection-search-DHiaU-oT.js → collection-search-DW3g3zGc.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-Cqd6KCzo.js → collection-table-wrapper-B84Op-Zk.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-CczYJtOJ.js → collection-tabs-DVyOXsXh.js} +1 -1
  50. package/dist/client/assets/{collections-Czgjy6V_.js → collections-CzE8C7FB.js} +1 -1
  51. package/dist/client/assets/{command-C1riJax0.js → command-ChcvD0z3.js} +1 -1
  52. package/dist/client/assets/{connection-card-MQF8JSkw.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-CMKJaZow.js → constants-CrD_AMxD.js} +1 -1
  57. package/dist/client/assets/{constants-puxzW8Tt.js → constants-nJzh8CYx.js} +2 -2
  58. package/dist/client/assets/{dialog-CAwNCLeY.js → dialog-CVDAkUpR.js} +1 -1
  59. package/dist/client/assets/domain-settings-ClmaftJG.js +1 -0
  60. package/dist/client/assets/{drawer-Co7qhpAL.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-DIogXxVN.js → empty-state-C2PUUqhT.js} +1 -1
  64. package/dist/client/assets/{empty-state-Bio4MAFs.js → empty-state-CPpC79-7.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-BFIbyEiI.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-DFoLVe7P.js → index-BYM0cbyk.js} +3 -3
  71. package/dist/client/assets/{index-BiFex3ig.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-mWgQ602E.js → index-CfanpUI7.js} +3 -3
  76. package/dist/client/assets/{index-BhZeUpb1.js → index-CqrrK0SQ.js} +1 -1
  77. package/dist/client/assets/{index-DcnXzgrr.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-DdEYcoGw.js → index-Dlk19fTc.js} +1 -1
  83. package/dist/client/assets/index-b9vWbQjO.js +1 -0
  84. package/dist/client/assets/{index-C4KOdiuW.js → index-gKZjkMnf.js} +26 -26
  85. package/dist/client/assets/{infiniteQueryObserver-DS8PEXT3.js → infiniteQueryObserver-B9PWohpE.js} +1 -1
  86. package/dist/client/assets/{input-DrxCctpM.js → input-Cet4kRAV.js} +1 -1
  87. package/dist/client/assets/{integration-icon-B-ypwxt-.js → integration-icon-BYjt2zM8.js} +1 -1
  88. package/dist/client/assets/{label-qumw5kFa.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-zoPe2LeA.js → login-DDBhfkxa.js} +1 -1
  92. package/dist/client/assets/{members-BrCn_crL.js → members-CpZry3vM.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-C80vYwBa.js → monaco-editor-D2GSkzL1.js} +1 -1
  94. package/dist/client/assets/{monitoring-stats-row-DoiRCC4f.js → monitoring-stats-row-B9-AgFrN.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-CNmuoGWl.js → oauth-callback-ZTQDmTMI.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-CsQrJZmR.js → oauth-callback-ai-provider-Gd1uARX2.js} +1 -1
  97. package/dist/client/assets/{onboarding-C7clLSW8.js → onboarding-8fDDt_RN.js} +1 -1
  98. package/dist/client/assets/{org-layout-BmM2YD3_.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-DhB__zcV.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-BZBMQxU7.js → plugin-layout-cW34W41Y.js} +1 -1
  104. package/dist/client/assets/{popover-BdnMz9At.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-DF08kMn2.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-KFV68Ks-.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-CbSuDoZL.js → search-input-BTdLweUR.js} +1 -1
  114. package/dist/client/assets/select-B6R2tTSM.js +1 -0
  115. package/dist/client/assets/{select-model-BLp2y3cG.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-CKsKmGWh.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-BKGbLlxs.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-DNv5M4ZB.js → switch-D_DqyrYW.js} +1 -1
  124. package/dist/client/assets/{table-CaLu-Lo8.js → table-D1_6e_tY.js} +1 -1
  125. package/dist/client/assets/{tabs-Ds3m3VsK.js → tabs-Bu_QsdLq.js} +1 -1
  126. package/dist/client/assets/task-status-DKnoaN0K.js +1 -0
  127. package/dist/client/assets/{textarea-D8dnqUDV.js → textarea-BPX5qWaA.js} +1 -1
  128. package/dist/client/assets/{toggle-group-DiaVR0jE.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-Cj_XQKsH.js → types-CUVoLk-m.js} +6 -6
  132. package/dist/client/assets/{use-ai-providers-CiKg1J6I.js → use-ai-providers-CKSasQTP.js} +1 -1
  133. package/dist/client/assets/{use-collections-BgcKlAB6.js → use-collections-DKaygmj-.js} +1 -1
  134. package/dist/client/assets/{use-connection-D0OofLda.js → use-connection-DLwIHVYP.js} +1 -1
  135. package/dist/client/assets/{use-copy-DU9Tefqq.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-ClmBUkq4.js → use-decopilot-events-NXGOEGvZ.js} +1 -1
  138. package/dist/client/assets/{use-delete-connection-D8siAEqJ.js → use-delete-connection-DN8HxHVx.js} +1 -1
  139. package/dist/client/assets/{use-infinite-scroll-8BgvLQv0.js → use-infinite-scroll-B32XN73V.js} +1 -1
  140. package/dist/client/assets/{use-list-state-BEoAeszV.js → use-list-state-Cwr5OloB.js} +1 -1
  141. package/dist/client/assets/{use-mcp-tools-D1ScXFUK.js → use-mcp-tools-CyPVbfii.js} +1 -1
  142. package/dist/client/assets/{use-members-BzwLO50s.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-D0nq7yh3.js → use-org-sso-pbiXxD33.js} +1 -1
  145. package/dist/client/assets/{use-organization-roles-Dl9VoSUw.js → use-organization-roles-7NVaQG9M.js} +1 -1
  146. package/dist/client/assets/{use-organization-settings-C1HGFbFZ.js → use-organization-settings-DpXizr85.js} +1 -1
  147. package/dist/client/assets/{use-registry-connections-DzXuLNdG.js → use-registry-connections-BFqaVIUz.js} +1 -1
  148. package/dist/client/assets/{use-status-sounds-BC_OJyRi.js → use-status-sounds-DVyydX5_.js} +1 -1
  149. package/dist/client/assets/{use-tasks-BtGSWUvO.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-D1fXVRo5.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-DAufXs4h.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/package.json +1 -1
  161. package/dist/client/assets/accordion-zVtel299.js +0 -1
  162. package/dist/client/assets/agent-icon-DSfidSus.js +0 -1
  163. package/dist/client/assets/agents-list-vffTTABq.js +0 -1
  164. package/dist/client/assets/ai-providers-t0YXr9kj.js +0 -1
  165. package/dist/client/assets/automations-C7xJbJSO.js +0 -1
  166. package/dist/client/assets/brand-context-7PuYXROc.js +0 -1
  167. package/dist/client/assets/chat-context-KGI8H-cg.js +0 -30
  168. package/dist/client/assets/collection-detail-D_GfRl2U.js +0 -1
  169. package/dist/client/assets/collection-display-button-DtLA-_Qf.js +0 -1
  170. package/dist/client/assets/connection-detail-Kmft9f88.js +0 -1
  171. package/dist/client/assets/connection-form-helpers-DMZ5iUjm.js +0 -1
  172. package/dist/client/assets/connections-Qfmncrnr.js +0 -1
  173. package/dist/client/assets/domain-settings-ZwlKCgS9.js +0 -1
  174. package/dist/client/assets/dropdown-menu-CiJ99ly5.js +0 -1
  175. package/dist/client/assets/dynamic-plugin-layout-SGNBzqAT.js +0 -1
  176. package/dist/client/assets/features-QRbg1n3B.js +0 -1
  177. package/dist/client/assets/form-FdRX5pG1.js +0 -1
  178. package/dist/client/assets/general-Cc1ql58y.js +0 -1
  179. package/dist/client/assets/github-repo-picker-QAmOQiwy.js +0 -116
  180. package/dist/client/assets/index-L8A_STvx.js +0 -1
  181. package/dist/client/assets/index-SoZ9vkB3.js +0 -735
  182. package/dist/client/assets/index-mcaIOSGF.js +0 -1
  183. package/dist/client/assets/layout-BHQW603q.js +0 -1
  184. package/dist/client/assets/org-plugin-layout-Csh0KNUp.js +0 -1
  185. package/dist/client/assets/plugin-empty-state-DxSYI7WM.js +0 -1
  186. package/dist/client/assets/plugin-header-D0WCyAas.js +0 -1
  187. package/dist/client/assets/profile-BZlcE9Y0.js +0 -1
  188. package/dist/client/assets/project-app-view-B8g2l52t.js +0 -1
  189. package/dist/client/assets/registry-oDwGjrMT.js +0 -2
  190. package/dist/client/assets/required-auth-layout-DAzAQKek.js +0 -1
  191. package/dist/client/assets/roles-CMvkTrhY.js +0 -1
  192. package/dist/client/assets/scroll-area-BlUv7zcB.js +0 -142
  193. package/dist/client/assets/select-W23RccQR.js +0 -1
  194. package/dist/client/assets/settings-layout-b1Br3189.js +0 -1
  195. package/dist/client/assets/shell-layout-BUuy9S_L.js +0 -1
  196. package/dist/client/assets/sso-aoLg93_m.js +0 -1
  197. package/dist/client/assets/store-DGgyYg8C.js +0 -1
  198. package/dist/client/assets/store-registry-Dbm0_etm.js +0 -2
  199. package/dist/client/assets/tools-list-CVgYt-8F.js +0 -1
  200. package/dist/client/assets/use-create-virtual-mcp-DAB2T3vN.js +0 -1
  201. package/dist/client/assets/use-mobile-DvmdhkH5.js +0 -1
  202. package/dist/client/assets/use-navigate-to-agent-Dg24R1Fh.js +0 -1
  203. package/dist/client/assets/use-view-mode-BnyE0_EO.js +0 -1
  204. package/dist/client/assets/useInfiniteQuery-H3t_tPfZ.js +0 -1
  205. package/dist/client/assets/useSuspenseInfiniteQuery-BAnABuH7.js +0 -1
  206. package/dist/client/assets/view-mode-toggle-LshbVzEB.js +0 -1
  207. package/dist/client/assets/workflow-Dt2CIq6i.js +0 -1
  208. package/dist/client/assets/workflow-detail-BZ0JnpLY.js +0 -1
  209. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  210. package/dist/server/node_modules/pg-int8/README.md +0 -16
  211. package/dist/server/node_modules/pg-int8/index.js +0 -100
  212. package/dist/server/node_modules/pg-int8/package.json +0 -24
  213. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  214. package/dist/server/node_modules/postgres-array/index.js +0 -97
  215. package/dist/server/node_modules/postgres-array/license +0 -21
  216. package/dist/server/node_modules/postgres-array/package.json +0 -35
  217. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  218. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  219. package/dist/server/node_modules/postgres-bytea/license +0 -21
  220. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  221. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  222. package/dist/server/node_modules/postgres-date/index.js +0 -116
  223. package/dist/server/node_modules/postgres-date/license +0 -21
  224. package/dist/server/node_modules/postgres-date/package.json +0 -33
  225. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  226. package/dist/server/node_modules/split2/LICENSE +0 -13
  227. package/dist/server/node_modules/split2/README.md +0 -85
  228. package/dist/server/node_modules/split2/bench.js +0 -27
  229. package/dist/server/node_modules/split2/index.js +0 -141
  230. package/dist/server/node_modules/split2/package.json +0 -39
  231. package/dist/server/node_modules/split2/test.js +0 -409
  232. package/dist/server/node_modules/xtend/.jshintrc +0 -30
  233. package/dist/server/node_modules/xtend/LICENSE +0 -20
  234. package/dist/server/node_modules/xtend/README.md +0 -32
  235. package/dist/server/node_modules/xtend/immutable.js +0 -19
  236. package/dist/server/node_modules/xtend/mutable.js +0 -17
  237. package/dist/server/node_modules/xtend/package.json +0 -55
  238. package/dist/server/node_modules/xtend/test.js +0 -103
@@ -1 +0,0 @@
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,ah as j,ai as N,cG as $,c6 as lt,J as _e,c7 as Ee,b9 as at,b7 as ct,ae as it,c8 as dt,cb as ut,c9 as pt,cc as ft,cd as mt,ao as ht,ca as vt,ce as gt,cf as xt,e as ee,c as oe}from"./index-C4KOdiuW.js";import{V as St}from"./use-mobile-DvmdhkH5.js";import{t as Re,i as wt}from"./ChevronDown-DmIUGcFl.js";import{n as Ct}from"./ChevronUp-BYOoc7wr.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{fo as S,io as a,mo as b,po as c,uo as d,Ne as e};
@@ -1 +0,0 @@
1
- import{e as k,g as E,a4 as R,j as s,s as T,aG as H,c as $,ay as z,t as L,b as W,O as I,l as J,r as K}from"./index-C4KOdiuW.js";import{k as Q,l as U,m as V,u as X,S as w,a as C,b as O,d as P,c as M,f as Y,g as Z,q as A,n as ee,o as se,p as te}from"./index-mcaIOSGF.js";import{i as q}from"./ArrowNarrowLeft-bSu4Kz2F.js";import{n as le,d as ne,b as re,e as ie,f as oe,i as F,a as ae,c as ce}from"./ZapSquare-BFGlmWLE.js";import{t as me,a as G}from"./Users03-DfcHW1oz.js";import{i as de}from"./ChevronRight-CIh2nJ4L.js";import{i as fe}from"./Lock01-B-vCOiSg.js";import{i as xe}from"./Shield01-DodcxEya.js";import{s as be}from"./User01-CQoJwY3u.js";import{i as B}from"./Zap-CDLB-lxK.js";import{u as he}from"./use-mobile-DvmdhkH5.js";import{u as ue}from"./use-status-sounds-BC_OJyRi.js";import"./X-Bgfd1eh0.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-ClmBUkq4.js";import"./create-sse-subscription-CxkOgzKf.js";function D(){const e=k.c(29),t=T().project;let n;e[0]!==t.enabledPlugins?(n=t.enabledPlugins??[],e[0]=t.enabledPlugins,e[1]=n):n=e[1];const l=n;let r,i,c,m,o;if(e[2]!==l){const b=H.filter(N=>l.includes(N.pluginId)).map(pe);let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={key:"general",label:"General",icon:s.jsx(me,{size:14}),to:"/$org/settings/general"},e[8]=x):x=e[8];let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g={key:"brand-context",label:"Brand Context",icon:s.jsx(le,{size:14}),to:"/$org/settings/brand-context"},e[9]=g):g=e[9],e[10]===Symbol.for("react.memo_cache_sentinel")?(c={label:"Organization",items:[x,g,{key:"ai-providers",label:"AI Providers",icon:s.jsx(ne,{size:14}),to:"/$org/settings/ai-providers"}]},e[10]=c):c=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y={key:"connections",label:"Connections",icon:s.jsx(re,{size:14}),to:"/$org/settings/connections"},e[11]=y):y=e[11];let j;e[12]===Symbol.for("react.memo_cache_sentinel")?(j={key:"agents",label:"Agents",icon:s.jsx(G,{size:14}),to:"/$org/settings/agents"},e[12]=j):j=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_={key:"automations",label:"Automations",icon:s.jsx(B,{size:14}),to:"/$org/settings/automations"},e[13]=_):_=e[13],e[14]===Symbol.for("react.memo_cache_sentinel")?(m={label:"Build",items:[y,j,_,{key:"store",label:"Store",icon:s.jsx(ie,{size:14}),to:"/$org/settings/store"}]},e[14]=m):m=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p={key:"monitor",label:"Monitor",icon:s.jsx(oe,{size:14}),to:"/$org/settings/monitor"},e[15]=p):p=e[15];let S;e[16]===Symbol.for("react.memo_cache_sentinel")?(S={key:"members",label:"Members",icon:s.jsx(G,{size:14}),to:"/$org/settings/members"},e[16]=S):S=e[16];let u;e[17]===Symbol.for("react.memo_cache_sentinel")?(u={key:"roles",label:"Roles",icon:s.jsx(xe,{size:14}),to:"/$org/settings/roles"},e[17]=u):u=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(o={label:"Manage",items:[p,S,u,{key:"sso",label:"Security",icon:s.jsx(fe,{size:14}),to:"/$org/settings/sso"}]},e[18]=o):o=e[18],r="Extensions";let v;e[19]===Symbol.for("react.memo_cache_sentinel")?(v={key:"features",label:"Plugins",icon:s.jsx(B,{size:14}),to:"/$org/settings/features"},e[19]=v):v=e[19],i=[v,...b],e[2]=l,e[3]=r,e[4]=i,e[5]=c,e[6]=m,e[7]=o}else r=e[3],i=e[4],c=e[5],m=e[6],o=e[7];let a;e[20]!==r||e[21]!==i?(a={label:r,items:i},e[20]=r,e[21]=i,e[22]=a):a=e[22];let d;e[23]===Symbol.for("react.memo_cache_sentinel")?(d={label:"Account",items:[{key:"profile",label:"Profile & Preferences",icon:s.jsx(be,{size:14}),to:"/$org/settings/profile"}]},e[23]=d):d=e[23];let f;return e[24]!==c||e[25]!==m||e[26]!==o||e[27]!==a?(f=[c,m,o,a,d],e[24]=c,e[25]=m,e[26]=o,e[27]=a,e[28]=f):f=e[28],f}function pe(e){const{key:t,label:n,icon:l,to:r}=e;return{key:t,label:n,icon:l,to:r}}function ge(){const e=k.c(26),t=D();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/shell/$org"},e[0]=n):n=e[0];const{org:l}=E(n);let r;e[1]===Symbol.for("react.memo_cache_sentinel")?(r={select:_e},e[1]=r):r=e[1];const i=R(r);let c;e[2]!==l||e[3]!==i?(c=_=>{const p=_.replace("$org",l);return i.startsWith(p)},e[2]=l,e[3]=i,e[4]=c):c=e[4];const m=c;let o;e[5]!==l?(o={org:l},e[5]=l,e[6]=o):o=e[6];let a,d;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(q,{size:14}),d=s.jsx("span",{children:"Settings"}),e[7]=a,e[8]=d):(a=e[7],d=e[8]);let f;e[9]!==o?(f=s.jsx(w,{className:"pt-0 pr-0 pb-3 md:pb-3 pl-0",children:s.jsx(C,{children:s.jsx(O,{className:"gap-1.5",children:s.jsx(P,{children:s.jsx(M,{asChild:!0,children:s.jsxs(z,{to:"/$org",params:o,className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a,d]})})})})})}),e[9]=o,e[10]=f):f=e[10];let h;if(e[11]!==t||e[12]!==m||e[13]!==l){let _;e[15]!==m||e[16]!==l?(_=(p,S)=>s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[p.label&&s.jsx("p",{className:$("px-2 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",S>0&&"mt-3"),children:p.label}),s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:p.items.map(u=>s.jsx(P,{children:s.jsx(M,{asChild:!0,isActive:m(u.to),children:s.jsxs(z,{to:u.to,params:{org:l},onClick:()=>L("settings_nav_clicked",{section_key:u.key,section_label:u.label,group_label:p.label||"main"}),className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:u.icon}),s.jsx("span",{className:"truncate",children:u.label})]})})},u.key))})})]},`${p.label}-${S}`),e[15]=m,e[16]=l,e[17]=_):_=e[17],h=t.map(_),e[11]=t,e[12]=m,e[13]=l,e[14]=h}else h=e[14];let b;e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"mx-2 my-2 border-t border-border/50"}),e[18]=b):b=e[18];let x;e[19]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs(w,{className:"pt-0 pr-0 pb-0 pl-0",children:[b,s.jsx(C,{children:s.jsx(O,{className:"gap-0.5",children:s.jsx(P,{children:s.jsxs(M,{onClick:je,className:"flex items-center gap-2.5 text-sm",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})})})})]}),e[19]=x):x=e[19];let g;e[20]!==f||e[21]!==h?(g=s.jsxs(Y,{className:"flex flex-col flex-1 mt-2 px-2 pb-2 gap-0",children:[f,h,x]}),e[20]=f,e[21]=h,e[22]=g):g=e[22];let y;e[23]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("div",{className:"mt-auto px-4 pb-1",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.292.2"]})}),e[23]=y):y=e[23];let j;return e[24]!==g?(j=s.jsxs(Z,{variant:"sidebar",children:[g,y]}),e[24]=g,e[25]=j):j=e[25],j}function je(){L("signed_out",{source:"settings_sidebar"}),W.signOut()}function _e(e){return e.location.pathname}function ye(e){const t=k.c(29),{onClose:n}=e,l=D();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org"},t[0]=r):r=t[0];const{org:i}=E(r);let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c={select:ve},t[1]=c):c=t[1];const m=R(c);let o;t[2]!==i||t[3]!==m?(o=S=>{const u=S.replace("$org",i);return m.startsWith(u)},t[2]=i,t[3]=m,t[4]=o):o=t[4];const a=o;let d;t[5]!==i?(d={org:i},t[5]=i,t[6]=d):d=t[6];let f,h;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(q,{size:16,className:"shrink-0"}),h=s.jsx("span",{children:"Settings"}),t[7]=f,t[8]=h):(f=t[7],h=t[8]);let b;t[9]!==n||t[10]!==d?(b=s.jsx("div",{className:"flex items-center h-14 px-4 shrink-0 border-b border-border/50",children:s.jsxs(z,{to:"/$org",params:d,onClick:n,className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[f,h]})}),t[9]=n,t[10]=d,t[11]=b):b=t[11];let x;if(t[12]!==l||t[13]!==a||t[14]!==n||t[15]!==i){let S;t[17]!==a||t[18]!==n||t[19]!==i?(S=(u,v)=>s.jsxs("div",{className:"flex flex-col gap-0.5",children:[u.label&&s.jsx("p",{className:$("px-3 pt-1.5 pb-0.5 text-xs font-medium text-muted-foreground/60",v>0&&"mt-3"),children:u.label}),u.items.map(N=>s.jsxs(z,{to:N.to,params:{org:i},onClick:n,className:$("flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm",a(N.to)?"bg-sidebar-accent text-sidebar-accent-foreground font-medium":"text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground"),children:[s.jsx("span",{className:"shrink-0",children:N.icon}),s.jsx("span",{className:"truncate",children:N.label})]},N.key))]},`${u.label}-${v}`),t[17]=a,t[18]=n,t[19]=i,t[20]=S):S=t[20],x=l.map(S),t[12]=l,t[13]=a,t[14]=n,t[15]=i,t[16]=x}else x=t[16];let g;t[21]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-px bg-border/50 my-2"}),t[21]=g):g=t[21];let y;t[22]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsxs("div",{className:"flex flex-col gap-0.5",children:[g,s.jsxs("button",{type:"button",onClick:Se,className:"flex items-center gap-3 w-full px-3 py-2.5 rounded-lg transition-colors text-sm text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground",children:[s.jsx("span",{className:"shrink-0",children:s.jsx(F,{size:14})}),s.jsx("span",{className:"truncate",children:"Sign Out"})]})]}),t[22]=y):y=t[22];let j;t[23]!==x?(j=s.jsxs("div",{className:"flex flex-col flex-1 overflow-y-auto px-2 py-2 gap-0.5",children:[x,y]}),t[23]=x,t[24]=j):j=t[24];let _;t[25]===Symbol.for("react.memo_cache_sentinel")?(_=s.jsx("div",{className:"px-4 pb-3 pt-1 border-t border-border/50",children:s.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v","2.292.2"]})}),t[25]=_):_=t[25];let p;return t[26]!==j||t[27]!==b?(p=s.jsxs("div",{className:"flex flex-col h-full bg-sidebar",children:[b,j,_]}),t[26]=j,t[27]=b,t[28]=p):p=t[28],p}function Se(){return W.signOut()}function ve(e){return e.location.pathname}function Ne(){const e=k.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("button",{type:"button",onClick:$e,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go back",children:s.jsx(ae,{size:16})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"shrink-0 flex items-center justify-between pl-1 pr-2 h-10",children:s.jsxs("div",{className:"flex items-center gap-0.5 min-w-0",children:[t,s.jsx("button",{type:"button",onClick:ke,className:"flex size-7 shrink-0 items-center justify-center rounded-md text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Go forward",children:s.jsx(de,{size:16})})]})}),e[1]=n):n=e[1],n}function ke(){return window.history.forward()}function $e(){return window.history.back()}function ze(e){const t=k.c(3),{onOpenSidebar:n}=e;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(ce,{size:20}),t[0]=l):l=t[0];let r;return t[1]!==n?(r=s.jsx("div",{className:"shrink-0 flex items-center justify-between px-3 h-12 bg-background border-b border-border",children:s.jsx("button",{type:"button",onClick:n,className:"flex size-8 items-center justify-center rounded-md text-foreground/60 hover:bg-accent hover:text-foreground transition-colors","aria-label":"Open menu",children:l})}),t[1]=n,t[2]=r):r=t[2],r}function we(){const e=k.c(17),t=he(),{org:n}=T();ue(n.id);const{setOpenMobile:l,openMobile:r}=X();if(t){let a;e[0]!==l?(a=s.jsx(ze,{onOpenSidebar:()=>l(!0)}),e[0]=l,e[1]=a):a=e[1];let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("div",{className:"flex-1 overflow-hidden",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})}),e[2]=d):d=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(ee,{className:"sr-only",children:"Navigation"}),e[3]=f):f=e[3];let h;e[4]!==l?(h=s.jsxs(se,{side:"left",hideCloseButton:!0,className:"w-[calc(100vw-3rem)] sm:max-w-md! p-0",children:[f,s.jsx(ye,{onClose:()=>l(!1)})]}),e[4]=l,e[5]=h):h=e[5];let b;e[6]!==r||e[7]!==l||e[8]!==h?(b=s.jsx(te,{open:r,onOpenChange:l,children:h}),e[6]=r,e[7]=l,e[8]=h,e[9]=b):b=e[9];let x;return e[10]!==a||e[11]!==b?(x=s.jsxs("div",{className:"flex flex-col flex-1 bg-background min-h-0",children:[a,d,b]}),e[10]=a,e[11]=b,e[12]=x):x=e[12],x}let i;e[13]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(Ne,{}),e[13]=i):i=e[13];let c;e[14]===Symbol.for("react.memo_cache_sentinel")?(c=$("flex flex-col h-full min-h-0 bg-background overflow-hidden","card-shadow","rounded-[0.75rem]"),e[14]=c):c=e[14];let m;e[15]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"flex-1 flex items-center justify-center",children:s.jsx(J,{size:20,className:"animate-spin text-muted-foreground"})}),e[15]=m):m=e[15];let o;return e[16]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs(s.Fragment,{children:[i,s.jsx("div",{className:"flex-1 min-h-0 p-1",children:s.jsx("div",{className:c,children:s.jsx(K.Suspense,{fallback:m,children:s.jsx("div",{className:"flex flex-1 items-center overflow-hidden rounded-[inherit]",children:s.jsx(A,{value:"p-0",children:s.jsx("div",{className:"flex-1 min-w-0 overflow-hidden h-full",children:s.jsx(I,{})})})})})})})]}),e[16]=o):o=e[16],o}function He(){const e=k.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={"--sidebar-width-icon":"3.5rem"},e[0]=t):t=e[0];let n;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ge,{}),e[1]=n):n=e[1];let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(Q,{defaultOpen:!0,children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsxs(U,{className:"flex-1 bg-sidebar",style:t,children:[n,s.jsx(V,{className:"flex flex-col",style:{background:"transparent",containerType:"inline-size"},children:s.jsx(we,{})})]})})}),e[2]=l):l=e[2],l}export{ge as SettingsSidebar,ye as SettingsSidebarMobile,He as default};
@@ -1 +0,0 @@
1
- import{e as v,j as s,bj as D,K as T,B as w,f as P,o as I,s as K,g as E,d as M,ab as A,r as N,V as L,b as R,a3 as q,S as $,O as z,bk as F}from"./index-C4KOdiuW.js";import{c as U,a as G,D as B,d as H}from"./dialog-CAwNCLeY.js";import{R as Q}from"./required-auth-layout-DAzAQKek.js";import{u as Y}from"./use-tasks-BtGSWUvO.js";import{b as V}from"./use-organization-settings-C1HGFbFZ.js";import{u as W}from"./use-org-sso-D0nq7yh3.js";import{i as J}from"./Lock01-B-vCOiSg.js";const C=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),O=C?"⌘":"Ctrl",k={keyboardShortcuts:{keys:[O,"K"],description:"Keyboard shortcuts"},focusChatInput:{keys:[O,"L"],description:"Focus chat input"},saveAndFormat:{keys:[O,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[O,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[O,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",O,"S"],description:"New task"},toggleDaemon:{keys:[O,"D"],description:"Toggle daemon logs"}},X=[{label:"General",shortcuts:[k.keyboardShortcuts,k.newTask,k.toggleDaemon]},{label:"Editor",shortcuts:[k.saveAndFormat]},{label:"Chat",shortcuts:[k.focusChatInput,k.togglePlanMode,k.sendMessage,k.newLine]},{label:"Questions",shortcuts:[k.selectOption]},{label:"Monitoring",shortcuts:[k.applyFilter]}];function Z(e){return C?e.metaKey:e.ctrlKey}function ee(e){const t=v.c(5),{open:o,onOpenChange:a}=e;let m;t[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(G,{children:s.jsx(B,{children:"Keyboard Shortcuts"})}),t[0]=m):m=t[0];let c;t[1]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsxs(U,{className:"sm:max-w-md",children:[m,s.jsx("div",{className:"flex flex-col gap-4",children:X.map(te)})]}),t[1]=c):c=t[1];let r;return t[2]!==a||t[3]!==o?(r=s.jsx(H,{open:o,onOpenChange:a,children:c}),t[2]=a,t[3]=o,t[4]=r):r=t[4],r}function te(e){return s.jsxs("div",{children:[s.jsx("h3",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2",children:e.label}),s.jsx("div",{className:"flex flex-col gap-1.5",children:e.shortcuts.map(se)})]},e.label)}function se(e){return s.jsxs("div",{className:"flex items-center justify-between py-1",children:[s.jsx("span",{className:"text-sm",children:e.description}),s.jsx("div",{className:"flex items-center gap-1",children:e.keys.map(ne)})]},e.description)}function ne(e){return s.jsx("kbd",{className:"inline-flex items-center justify-center min-w-6 h-6 px-1.5 rounded-sm border border-border bg-muted text-muted-foreground text-xs font-mono",children:e},e)}function oe({activeOrg:e}){return e&&D(e.id,{name:e.name??void 0,slug:e.slug??void 0}),null}function ae(e,t,o){if(!o)return null;const a=e.getQueriesData({queryKey:T.tasksPrefix(t)});for(const[,m]of a){const c=m?.items?.find(r=>r.id===o);if(c?.branch)return c.branch}return null}function ie(e){const t=v.c(17),{orgId:o,orgName:a,domain:m}=e;let c;t[0]!==o?(c=()=>{window.location.href=`/api/org-sso/authorize?orgId=${encodeURIComponent(o)}`},t[0]=o,t[1]=c):c=t[1];const r=c,g=re;let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("div",{className:"bg-primary/10 p-3 rounded-full",children:s.jsx(J,{className:"h-6 w-6 text-primary"})}),t[2]=u):u=t[2];let f;t[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h3",{className:"text-lg font-medium",children:"SSO Authentication Required"}),t[3]=f):f=t[3];let p;t[4]!==m||t[5]!==a?(p=a?s.jsxs(s.Fragment,{children:[s.jsx("strong",{children:a})," requires SSO authentication",m?` via ${m}`:"","."]}):"This organization requires SSO authentication to access.",t[4]=m,t[5]=a,t[6]=p):p=t[6];let i;t[7]!==p?(i=s.jsxs("div",{className:"space-y-2",children:[f,s.jsx("p",{className:"text-sm text-muted-foreground",children:p})]}),t[7]=p,t[8]=i):i=t[8];let y;t[9]!==r?(y=s.jsx(w,{onClick:r,children:"Sign in with SSO"}),t[9]=r,t[10]=y):y=t[10];let S;t[11]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(w,{variant:"ghost",onClick:g,children:"Go back"}),t[11]=S):S=t[11];let b;t[12]!==y?(b=s.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[y,S]}),t[12]=y,t[13]=b):b=t[13];let x;return t[14]!==i||t[15]!==b?(x=s.jsx("div",{className:"flex items-center justify-center min-h-screen bg-background",children:s.jsxs("div",{className:"flex flex-col items-center text-center space-y-4 max-w-sm px-6",children:[u,i,b]})}),t[14]=i,t[15]=b,t[16]=x):x=t[16],x}function re(){window.location.href="/"}function ce(e){const t=v.c(8),{org:o,children:a}=e,c=V(o.id)?.enabled_plugins??null;let r;t[0]!==o.id||t[1]!==o.name||t[2]!==c?(r={id:o.id,organizationId:o.id,slug:"_org",name:o.name,enabledPlugins:c,ui:null},t[0]=o.id,t[1]=o.name,t[2]=c,t[3]=r):r=t[3];const g=r;let u;return t[4]!==a||t[5]!==o||t[6]!==g?(u=s.jsx(F,{org:o,project:g,children:a}),t[4]=a,t[5]=o,t[6]=g,t[7]=u):u=t[7],u}function le(){const e=P(),t=I(),o=Y(),{locator:a}=K(),m=E({strict:!1}),c=M({strict:!1}),r=m.org??"",g=m.taskId??"",u=(n,l,d=!0)=>e({to:"/$org/$taskId",params:{org:r,taskId:n},search:l,replace:d}),f=(n,l=!0)=>u(g,n,l),p=n=>f(l=>({...l,chat:n?1:0})),i=n=>f(l=>({...l,tasks:n?1:0})),y=(n,l)=>u(n,d=>{const j={chat:1};return l?j.virtualmcpid=l:d.virtualmcpid&&(j.virtualmcpid=d.virtualmcpid),d.tasks&&(j.tasks=d.tasks),d.main&&(j.main=d.main),j},!1);return{setChatOpen:p,setTasksOpen:i,setTaskId:y,createNewTask:async()=>{const n=crypto.randomUUID(),l=ae(t,a,g),d=c.virtualmcpid;try{await o.create.mutateAsync({id:n,...d?{virtual_mcp_id:d}:{},...l?{branch:l}:{}})}catch{}y(n)},openTab:n=>u(g||crypto.randomUUID(),l=>({...l,main:n})),toggleMain:()=>f(n=>{if(n.main!==void 0&&n.main!=="0")return{...n,main:"0"};const d={...n};return delete d.main,d})}}function de(){const e=v.c(27);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org",shouldThrow:!1},e[0]=t):t=e[0];const a=A(t)?.params.org,[m,c]=N.useState(!1);let r,g;e[1]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const h=_=>{Z(_)&&_.code==="KeyK"&&(_.preventDefault(),c(!0))};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},g=[],e[1]=r,e[2]=g):(r=e[1],g=e[2]),N.useEffect(r,g);let u;e[3]!==a?(u=T.activeOrganization(a),e[3]=a,e[4]=u):u=e[4];let f;e[5]!==a?(f=async()=>{if(!a)return null;const{data:h}=await R.organization.setActive({organizationSlug:a});return h&&localStorage.setItem(q.lastOrgSlug(),a),h},e[5]=a,e[6]=f):f=e[6];let p;e[7]!==u||e[8]!==f?(p={queryKey:u,queryFn:f,gcTime:1/0,refetchOnWindowFocus:!1},e[7]=u,e[8]=f,e[9]=p):p=e[9];const{data:i}=L(p),y=i?.id,{data:S}=W(y);if(!i){let h;return e[10]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx($,{}),e[10]=h):h=e[10],h}if(S?.ssoRequired&&!S.authenticated){let h;return e[11]!==i.id||e[12]!==i.name||e[13]!==S.domain?(h=s.jsx(ie,{orgId:i.id,orgName:i.name,domain:S.domain}),e[11]=i.id,e[12]=i.name,e[13]=S.domain,e[14]=h):h=e[14],h}const b=i.logo??null;let x;e[15]!==i||e[16]!==b?(x={...i,logo:b},e[15]=i,e[16]=b,e[17]=x):x=e[17];let n;e[18]!==i?(n=s.jsx(oe,{activeOrg:i}),e[18]=i,e[19]=n):n=e[19];let l;e[20]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx(z,{}),e[20]=l):l=e[20];let d;e[21]!==m?(d=s.jsx(ee,{open:m,onOpenChange:c}),e[21]=m,e[22]=d):d=e[22];let j;return e[23]!==d||e[24]!==x||e[25]!==n?(j=s.jsxs(ce,{org:x,children:[n,l,d]}),e[23]=d,e[24]=x,e[25]=n,e[26]=j):j=e[26],j}function ue(){const e=v.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Q,{children:s.jsx(de,{})}),e[0]=t):t=e[0],t}const Se=Object.freeze(Object.defineProperty({__proto__:null,default:ue,usePanelActions:le},Symbol.toStringTag,{value:"Module"}));export{Z as i,ae as r,Se as s,le as u};
@@ -1 +0,0 @@
1
- import{s as N,r as j,j as e,B as p,t as S,z as c,e as b}from"./index-C4KOdiuW.js";import{D as z}from"./domain-settings-ZwlKCgS9.js";import{P as f}from"./index-mcaIOSGF.js";import{I as l}from"./input-DrxCctpM.js";import{S as k}from"./switch-DNv5M4ZB.js";import{a as P,b as R,c as A,d as T}from"./use-org-sso-D0nq7yh3.js";import{d as F,S as y,a as C,b as a,c as O}from"./settings-section-CKsKmGWh.js";import{s as L}from"./Trash01-DuRnWn1E.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./constants-puxzW8Tt.js";import"./use-mobile-DvmdhkH5.js";import"./X-Bgfd1eh0.js";import"./card-B6kxnNb0.js";import"./ArrowUpRight-DT3QLsvt.js";function B(){const{org:t}=N(),{data:r,isLoading:E}=P(t.id),x=R(t.id),h=A(t.id),v=T(t.id),[s,d]=j.useState({issuer:"",clientId:"",clientSecret:"",discoveryEndpoint:"",domain:"",scopes:"openid email profile"}),[m,g]=j.useState(!1),u=r?.configured&&r.config,o=r?.config,I=()=>{o&&d({issuer:o.issuer,clientId:o.clientId,clientSecret:"",discoveryEndpoint:o.discoveryEndpoint??"",domain:o.domain,scopes:o.scopes.join(" ")}),g(!0)},w=async()=>{if(!s.issuer||!s.clientId||!s.domain){c.error("Issuer, Client ID, and Domain are required");return}if(!u&&!s.clientSecret){c.error("Client Secret is required for initial setup");return}try{await x.mutateAsync({issuer:s.issuer,clientId:s.clientId,clientSecret:s.clientSecret,discoveryEndpoint:s.discoveryEndpoint||void 0,scopes:s.scopes.split(/\s+/).filter(Boolean),domain:s.domain,enforced:o?.enforced??!1}),S(u?"sso_config_updated":"sso_configured",{organization_id:t.id,email_domain:s.domain}),c.success("SSO configuration saved"),g(!1)}catch(i){c.error(i instanceof Error?i.message:"Failed to save SSO config")}},_=async()=>{if(confirm("Are you sure you want to remove SSO configuration?"))try{await h.mutateAsync(),S("sso_config_removed",{organization_id:t.id}),c.success("SSO configuration removed"),g(!1)}catch{c.error("Failed to remove SSO config")}},D=async i=>{try{await v.mutateAsync(i),S("sso_enforcement_toggled",{organization_id:t.id,enforced:i}),c.success(i?"SSO enforcement enabled":"SSO enforcement disabled")}catch{c.error("Failed to toggle SSO enforcement")}};return e.jsx(f,{children:e.jsx(f.Content,{children:e.jsx(f.Body,{children:e.jsxs(F,{children:[e.jsx(f.Title,{children:"Security"}),e.jsx(z,{}),E?e.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):e.jsxs(e.Fragment,{children:[u&&!m&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Provider",action:e.jsx("span",{className:"font-medium",children:o.issuer})}),e.jsx(a,{title:"Client ID",action:e.jsx("span",{className:"font-mono text-xs",children:o.clientId})}),e.jsx(a,{title:"Domain",action:e.jsx("span",{className:"font-medium",children:o.domain})}),e.jsx(a,{title:"Scopes",action:e.jsx("span",{className:"font-mono text-xs",children:o.scopes.join(" ")})}),e.jsx("div",{className:"h-px bg-border mx-5"}),e.jsx(a,{title:"Enforce SSO",description:"Require all members to authenticate via SSO",action:e.jsx(k,{checked:o.enforced,onCheckedChange:D,disabled:v.isPending})}),e.jsxs(O,{children:[e.jsxs(p,{variant:"ghost",size:"sm",onClick:_,disabled:h.isPending,className:"text-destructive hover:text-destructive mr-auto",children:[e.jsx(L,{size:14}),"Remove"]}),e.jsx(p,{variant:"outline",size:"sm",onClick:()=>{window.open(`/api/org-sso/authorize?orgId=${t.id}`,"_blank")},children:"Test SSO"}),e.jsx(p,{variant:"outline",size:"sm",onClick:I,children:"Edit configuration"})]})]})}),(!u||m)&&e.jsx(y,{title:"Single Sign-On",children:e.jsxs(C,{children:[e.jsx(a,{title:"Issuer URL",description:"The OIDC issuer URL of your identity provider.",action:e.jsx(l,{id:"sso-issuer",placeholder:"https://login.microsoftonline.com/{tenant}/v2.0",value:s.issuer,onChange:i=>d(n=>({...n,issuer:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client ID",action:e.jsx(l,{id:"sso-client-id",placeholder:"your-client-id",value:s.clientId,onChange:i=>d(n=>({...n,clientId:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Client Secret",description:m&&u?"Leave empty to keep current":void 0,action:e.jsx(l,{id:"sso-client-secret",type:"password",placeholder:"your-client-secret",value:s.clientSecret,onChange:i=>d(n=>({...n,clientSecret:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Email Domain",description:"The email domain this SSO provider covers.",action:e.jsx(l,{id:"sso-domain",placeholder:"company.com",value:s.domain,onChange:i=>d(n=>({...n,domain:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Scopes",action:e.jsx(l,{id:"sso-scopes",placeholder:"openid email profile",value:s.scopes,onChange:i=>d(n=>({...n,scopes:i.target.value})),className:"w-[280px]"})}),e.jsx(a,{title:"Discovery Endpoint",description:"Optional — auto-detected from issuer if omitted.",action:e.jsx(l,{id:"sso-discovery",placeholder:"Auto-detected from issuer",value:s.discoveryEndpoint,onChange:i=>d(n=>({...n,discoveryEndpoint:i.target.value})),className:"w-[280px]"})}),e.jsxs(O,{children:[m&&e.jsx(p,{variant:"outline",size:"sm",onClick:()=>g(!1),children:"Cancel"}),e.jsx(p,{onClick:w,disabled:x.isPending,size:"sm",children:x.isPending?"Saving...":m?"Update":"Configure SSO"})]})]})})]})]})})})})}function ee(){const t=b.c(1);let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(B,{}),t[0]=r):r=t[0],r}export{ee as default};
@@ -1 +0,0 @@
1
- import{e as D,j as s,E as le,r as K,s as ae,o as ce,f as de,g as me,B as Y,t as te,K as fe,a as ge,z as ie}from"./index-C4KOdiuW.js";import{i as ue}from"./AlertCircle-De2C9wZC.js";import{i as pe}from"./ChevronRight-CIh2nJ4L.js";import{s as xe}from"./Plus-Zv0hv0Vg.js";import{s as he}from"./Trash01-DuRnWn1E.js";import{I as X}from"./input-DrxCctpM.js";import{S as ne}from"./switch-DNv5M4ZB.js";import{S as ye}from"./skeleton-BKGbLlxs.js";import{A as oe}from"./avatar-UVBUP_wG.js";import{b as je,P as Ce,a as Se}from"./popover-BdnMz9At.js";import{a as re}from"./use-connection-D0OofLda.js";import{d as Z}from"./constants-puxzW8Tt.js";import{P as G}from"./index-mcaIOSGF.js";import{u as ve}from"./use-registry-connections-DzXuLNdG.js";import{g as _e,h as be}from"./use-organization-settings-C1HGFbFZ.js";import{d as Pe,b as I,S as ee,a as Q}from"./settings-section-CKsKmGWh.js";import"./User01-CQoJwY3u.js";import"./use-collections-BgcKlAB6.js";import"./use-mobile-DvmdhkH5.js";import"./X-Bgfd1eh0.js";import"./card-B6kxnNb0.js";import"./ArrowUpRight-DT3QLsvt.js";function Re(t){const e=D.c(3),{error:n}=t;let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx(ue,{size:16}),e[0]=m):m=e[0];let o;return e[1]!==n.message?(o=s.jsxs("div",{className:"p-4 rounded-md bg-destructive/10 text-destructive flex items-center gap-2",children:[m,s.jsxs("span",{className:"text-sm font-medium",children:["Failed to load store settings: ",n.message]})]}),e[1]=n.message,e[2]=o):o=e[2],o}function ke(t){const e=D.c(36),{onCancel:n,onSuccess:m}=t,o=re(),[r,j]=K.useState(""),[a,S]=K.useState(""),[x,v]=K.useState("");let h;e[0]!==o||e[1]!==r||e[2]!==x||e[3]!==a?(h=async()=>(await o.create.mutateAsync({title:r||"Private Registry",description:"Private MCP registry",connection_type:"HTTP",connection_url:a,connection_token:x||null,connection_headers:null,oauth_config:null,configuration_state:null,configuration_scopes:null,metadata:{type:"registry"},app_name:null,app_id:null,icon:null})).id,e[0]=o,e[1]=r,e[2]=x,e[3]=a,e[4]=h):h=e[4];let f;e[5]!==m?(f=C=>{te("store_private_registry_added",{connection_id:C}),ie.success("Private registry added"),m(C)},e[5]=m,e[6]=f):f=e[6];let y;e[7]!==h||e[8]!==f?(y={mutationFn:h,onSuccess:f,onError:we},e[7]=h,e[8]=f,e[9]=y):y=e[9];const{mutate:c,isPending:d}=ge(y);let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=C=>j(C.target.value),e[10]=g):g=e[10];let u;e[11]!==r?(u=s.jsx(I,{title:"Name",action:s.jsx(X,{placeholder:"e.g. Acme Corp Registry",value:r,onChange:g,className:"w-[280px]"})}),e[11]=r,e[12]=u):u=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=C=>S(C.target.value),e[13]=p):p=e[13];let l;e[14]!==a?(l=s.jsx(I,{title:"Registry URL",action:s.jsx(X,{placeholder:"https://registry.example.com/mcp",value:a,onChange:p,className:"w-[280px]"})}),e[14]=a,e[15]=l):l=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=C=>v(C.target.value),e[16]=_):_=e[16];let b;e[17]!==x?(b=s.jsx(I,{title:"Auth Token",description:"Optional",action:s.jsx(X,{type:"password",placeholder:"Bearer token...",value:x,onChange:_,className:"w-[280px]"})}),e[17]=x,e[18]=b):b=e[18];let k;e[19]!==d||e[20]!==n?(k=s.jsx(Y,{variant:"ghost",size:"sm",onClick:n,disabled:d,children:"Cancel"}),e[19]=d,e[20]=n,e[21]=k):k=e[21];let N;e[22]!==c?(N=()=>c(),e[22]=c,e[23]=N):N=e[23];const O=!a||d,B=d?"Adding...":"Add Registry";let A;e[24]!==N||e[25]!==O||e[26]!==B?(A=s.jsx(Y,{size:"sm",onClick:N,disabled:O,children:B}),e[24]=N,e[25]=O,e[26]=B,e[27]=A):A=e[27];let R;e[28]!==k||e[29]!==A?(R=s.jsxs("div",{className:"px-5 py-4 flex justify-end gap-2",children:[k,A]}),e[28]=k,e[29]=A,e[30]=R):R=e[30];let P;return e[31]!==R||e[32]!==u||e[33]!==l||e[34]!==b?(P=s.jsxs(Q,{children:[u,l,b,R]}),e[31]=R,e[32]=u,e[33]=l,e[34]=b,e[35]=P):P=e[35],P}function we(t){ie.error(`Failed to add registry: ${t.message}`)}function L(t){const e=D.c(29),{name:n,description:m,icon:o,enabled:r,onToggle:j,onDelete:a,href:S}=t,x=de();let v;e[0]===Symbol.for("react.memo_cache_sentinel")?(v={from:"/shell/$org"},e[0]=v):v=e[0];const{org:h}=me(v);let f;e[1]!==r||e[2]!==S||e[3]!==x||e[4]!==j||e[5]!==h?(f=()=>{S?x({to:S,params:{org:h}}):j(!r)},e[1]=r,e[2]=S,e[3]=x,e[4]=j,e[5]=h,e[6]=f):f=e[6];const y=f;let c;e[7]!==o||e[8]!==n?(c=o?s.jsx("img",{src:o,alt:n,className:"size-8 rounded-md object-contain"}):s.jsx(oe,{fallback:n.charAt(0),className:"size-8 bg-primary/10 text-primary"}),e[7]=o,e[8]=n,e[9]=c):c=e[9];let d;e[10]!==a?(d=a&&s.jsxs(je,{children:[s.jsx(Ce,{asChild:!0,children:s.jsx(Y,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:Ae,children:s.jsx(he,{size:14})})}),s.jsx(Se,{className:"w-auto p-2",align:"end",children:s.jsxs("div",{className:"flex flex-col gap-2",children:[s.jsx("p",{className:"text-xs font-medium",children:"Remove this registry?"}),s.jsx(Y,{variant:"destructive",size:"xs",onClick:b=>{b.stopPropagation(),a()},children:"Remove"})]})})]}),e[10]=a,e[11]=d):d=e[11];let g;e[12]!==j?(g=b=>j(b),e[12]=j,e[13]=g):g=e[13];let u;e[14]!==r||e[15]!==g?(u=s.jsx(ne,{checked:r,onClick:Ne,onCheckedChange:g}),e[14]=r,e[15]=g,e[16]=u):u=e[16];let p;e[17]!==S?(p=S&&s.jsx(pe,{size:14,className:"text-muted-foreground"}),e[17]=S,e[18]=p):p=e[18];let l;e[19]!==d||e[20]!==u||e[21]!==p?(l=s.jsxs("div",{className:"flex items-center gap-2",children:[d,u,p]}),e[19]=d,e[20]=u,e[21]=p,e[22]=l):l=e[22];let _;return e[23]!==m||e[24]!==y||e[25]!==n||e[26]!==c||e[27]!==l?(_=s.jsx(I,{title:n,description:m,onClick:y,icon:c,action:l}),e[23]=m,e[24]=y,e[25]=n,e[26]=c,e[27]=l,e[28]=_):_=e[28],_}function Ne(t){return t.stopPropagation()}function Ae(t){return t.stopPropagation()}function Me(){const t=D.c(59),{org:e}=ae(),n=ve(),m=re(),o=_e(),{mutateAsync:r}=be(),j=ce(),[a,S]=K.useState(!1);let x,v,h,f,y,c;if(t[0]!==m||t[1]!==e.id||t[2]!==j||t[3]!==o||t[4]!==n||t[5]!==a||t[6]!==r){const p=Z.REGISTRY(e.id),l=i=>{if(!o)return i===p;const w=o.registries[i];return w?w.enabled:i===p},_=Z.COMMUNITY_REGISTRY(e.id),b=n.find(i=>i.id===p),k=n.find(i=>i.id===_||i.id==="community-registry"),N=k?.id??_,O=Z.SELF(e.id),B=new Set([p,_,"community-registry",O]),A=n.filter(i=>!B.has(i.id));let R;t[13]!==o||t[14]!==r?(R=async(i,w)=>{te("store_registry_toggled",{connection_id:i,enabled:w});const se=o??{registries:{},blockedMcps:[]};await r({...se,registries:{...se.registries,[i]:{enabled:w}}})},t[13]=o,t[14]=r,t[15]=R):R=t[15];const P=R;let C;t[16]!==m||t[17]!==e.id||t[18]!==j?(C=async i=>{te("store_private_registry_removed",{connection_id:i}),await m.delete.mutateAsync(i),j.invalidateQueries({queryKey:fe.organizationSettings(e.id)})},t[16]=m,t[17]=e.id,t[18]=j,t[19]=C):C=t[19];const H=C;let U;t[20]!==o||t[21]!==r?(U=async i=>{S(!1);const w=o??{registries:{},blockedMcps:[]};await r({...w,registries:{...w.registries,[i]:{enabled:!0}}})},t[20]=o,t[21]=r,t[22]=U):U=t[22];const W=U,J=b?s.jsx(L,{name:"Deco Store",description:"Official deco MCP registry with curated integrations",icon:b.icon,enabled:l(p),onToggle:i=>P(p,i)}):s.jsx(I,{title:"Deco Store",description:"Connection not found — will be created automatically."});t[23]!==J?(y=s.jsx(ee,{title:"Deco Store",children:s.jsx(Q,{children:J})}),t[23]=J,t[24]=y):y=t[24];let M;t[25]!==a?(M=a?void 0:s.jsxs(Y,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[s.jsx(xe,{size:14}),"Add registry"]}),t[25]=a,t[26]=M):M=t[26];let T;t[27]!==W||t[28]!==a?(T=a&&s.jsx(ke,{onCancel:()=>S(!1),onSuccess:W}),t[27]=W,t[28]=a,t[29]=T):T=t[29];let z;t[30]!==l?(z=l("self"),t[30]=l,t[31]=z):z=t[31];let E;t[32]!==P?(E=i=>P("self",i),t[32]=P,t[33]=E):E=t[33];let $;t[34]!==z||t[35]!==E?($=s.jsx(L,{name:"Private Registry",description:"Your organization's private MCP registry",enabled:z,onToggle:E,href:"/$org/settings/store/registry"}),t[34]=z,t[35]=E,t[36]=$):$=t[36];let q;t[37]!==H||t[38]!==P||t[39]!==l?(q=i=>s.jsx(L,{name:i.title,description:i.description??"Private MCP registry",icon:i.icon,enabled:l(i.id),onToggle:w=>P(i.id,w),onDelete:()=>H(i.id)},i.id),t[37]=H,t[38]=P,t[39]=l,t[40]=q):q=t[40];const V=A.map(q);let F;t[41]!==$||t[42]!==V?(F=s.jsxs(Q,{children:[$,V]}),t[41]=$,t[42]=V,t[43]=F):F=t[43],t[44]!==F||t[45]!==M||t[46]!==T?(c=s.jsxs(ee,{title:"Private Registries",actions:M,children:[T,F]}),t[44]=F,t[45]=M,t[46]=T,t[47]=c):c=t[47],v=ee,f="Community",x=Q,h=k?s.jsx(L,{name:"MCP Registry",description:"Community MCP registry with thousands of handy MCPs",icon:k.icon,enabled:l(N),onToggle:i=>P(N,i)}):s.jsx(I,{title:"MCP Registry",description:"Community MCP registry — not yet added",icon:s.jsx(oe,{fallback:"M",className:"size-8 bg-primary/10 text-primary"}),action:s.jsx(ne,{checked:!1,disabled:!0,onCheckedChange:Te})}),t[0]=m,t[1]=e.id,t[2]=j,t[3]=o,t[4]=n,t[5]=a,t[6]=r,t[7]=x,t[8]=v,t[9]=h,t[10]=f,t[11]=y,t[12]=c}else x=t[7],v=t[8],h=t[9],f=t[10],y=t[11],c=t[12];let d;t[48]!==x||t[49]!==h?(d=s.jsx(x,{children:h}),t[48]=x,t[49]=h,t[50]=d):d=t[50];let g;t[51]!==v||t[52]!==f||t[53]!==d?(g=s.jsx(v,{title:f,children:d}),t[51]=v,t[52]=f,t[53]=d,t[54]=g):g=t[54];let u;return t[55]!==y||t[56]!==c||t[57]!==g?(u=s.jsxs(s.Fragment,{children:[y,c,g]}),t[55]=y,t[56]=c,t[57]=g,t[58]=u):u=t[58],u}function Te(){}function ze(){const t=D.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ye,{className:"h-64 w-full"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(le,{fallback:Ee,children:s.jsx(K.Suspense,{fallback:e,children:s.jsx(G,{children:s.jsx(G.Content,{children:s.jsx(G.Body,{children:s.jsxs(Pe,{children:[s.jsx(G.Title,{children:"Store"}),s.jsx(Me,{})]})})})})})}),t[1]=n):n=t[1],n}function Ee(t){const{error:e}=t;return s.jsx(Re,{error:e??new Error("Failed to load store settings")})}function it(){const t=D.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(ze,{}),t[0]=e):e=t[0],e}export{it as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-DF08kMn2.js","assets/index-C4KOdiuW.js","assets/index-BZi9riJ2.css","assets/ArrowNarrowLeft-bSu4Kz2F.js","assets/CheckCircle-BIi7toDZ.js","assets/Container-BerLGLgK.js","assets/Settings02-w5kxVqcK.js","assets/XCircle-DUufUsoh.js","assets/constants-puxzW8Tt.js","assets/useInfiniteQuery-H3t_tPfZ.js","assets/infiniteQueryObserver-DS8PEXT3.js","assets/badge-nX1O9Qf1.js","assets/input-DrxCctpM.js","assets/dropdown-menu-CiJ99ly5.js","assets/ChevronDown-DmIUGcFl.js","assets/ChevronRight-CIh2nJ4L.js","assets/DotsVertical-CDho1dav.js","assets/table-CaLu-Lo8.js","assets/toggle-group-DiaVR0jE.js","assets/use-view-mode-BnyE0_EO.js","assets/use-mobile-DvmdhkH5.js","assets/SearchMd-BjteSZXQ.js","assets/dialog-CAwNCLeY.js","assets/X-Bgfd1eh0.js","assets/AlertCircle-De2C9wZC.js","assets/alert-dialog-rItivTOb.js","assets/card-B6kxnNb0.js","assets/Trash01-DuRnWn1E.js","assets/label-qumw5kFa.js","assets/select-W23RccQR.js","assets/ChevronUp-BYOoc7wr.js","assets/switch-DNv5M4ZB.js","assets/textarea-D8dnqUDV.js","assets/RefreshCcw01-COL3SGLi.js","assets/checkbox-CTi7T5x-.js","assets/LinkExternal01-CcTNZj2P.js","assets/use-copy-DU9Tefqq.js","assets/Plus-Zv0hv0Vg.js","assets/Play-CrdOw1Iv.js"])))=>i.map(i=>d[i]);
2
- import{e as n,f as c,g as m,j as r,l as f,r as l,aE as u}from"./index-C4KOdiuW.js";const g=l.lazy(()=>u(()=>import("./registry-layout-DF08kMn2.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 _(){const e=n.c(5),o=c();let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={from:"/shell/$org"},e[0]=t):t=e[0];const{org:i}=m(t);let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=r.jsx("div",{className:"h-full flex items-center justify-center",children:r.jsx(f,{size:20,className:"animate-spin text-muted-foreground"})}),e[1]=s):s=e[1];let a;return e[2]!==o||e[3]!==i?(a=r.jsx(l.Suspense,{fallback:s,children:r.jsx(g,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{_ as default};
@@ -1 +0,0 @@
1
- import{e as h,K as T,V as b,a0 as g,D as C,aD as k,j as s}from"./index-C4KOdiuW.js";import{B as x}from"./badge-nX1O9Qf1.js";import{c as y,a as j,b as v,T as N}from"./use-mobile-DvmdhkH5.js";import{g as S}from"./types-Cj_XQKsH.js";import{s as _}from"./RefreshCcw01-COL3SGLi.js";import{s as A}from"./Star01-BhFELsp4.js";import{W as $}from"./agent-icon-DSfidSus.js";function K(m){const e=h.c(9),{connectionId:a}=m;let t,r,i;e[0]!==a?(t=new URL(`/mcp/${a}`,window.location.origin),i=b,r=T.isMCPAuthenticated(t.href,null),e[0]=a,e[1]=t,e[2]=r,e[3]=i):(t=e[1],r=e[2],i=e[3]);let n;e[4]!==t?(n=()=>g({url:t.href,token:null}),e[4]=t,e[5]=n):n=e[5];let l;e[6]!==r||e[7]!==n?(l={queryKey:r,queryFn:n},e[6]=r,e[7]=n,e[8]=l):l=e[8];const{data:o}=i(l);return o}const w=[{key:"readOnlyHint",label:"Read-only",Icon:_,variant:"secondary"},{key:"destructiveHint",label:"Destructive",Icon:C,variant:"destructive"},{key:"idempotentHint",label:"Idempotent",Icon:k,variant:"secondary"},{key:"openWorldHint",label:"Open-world",Icon:A,variant:"outline"}];function q(m){const e=h.c(18),{annotations:a,_meta:t}=m;let r;e[0]!==t?(r=S(t),e[0]=t,e[1]=r):r=e[1];const i=!!r;let n,l,o,c,u;if(e[2]!==a||e[3]!==i){u=Symbol.for("react.early_return_sentinel");e:{const f=a?w.filter(I=>a[I.key]===!0):[];if(f.length===0&&!i){u=null;break e}n=N,l="flex gap-1 flex-nowrap",e[9]!==i?(o=i&&s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:"secondary",className:"size-6 p-1",children:s.jsx($,{})})}),s.jsx(v,{children:"Interactive"})]}),e[9]=i,e[10]=o):o=e[10],c=f.map(H)}e[2]=a,e[3]=i,e[4]=n,e[5]=l,e[6]=o,e[7]=c,e[8]=u}else n=e[4],l=e[5],o=e[6],c=e[7],u=e[8];if(u!==Symbol.for("react.early_return_sentinel"))return u;let d;e[11]!==l||e[12]!==o||e[13]!==c?(d=s.jsxs("div",{className:l,children:[o,c]}),e[11]=l,e[12]=o,e[13]=c,e[14]=d):d=e[14];let p;return e[15]!==n||e[16]!==d?(p=s.jsx(n,{children:d}),e[15]=n,e[16]=d,e[17]=p):p=e[17],p}function H(m){const{label:e,Icon:a,variant:t}=m;return s.jsxs(y,{children:[s.jsx(j,{asChild:!0,children:s.jsx(x,{asChild:!0,variant:t,className:"size-6 p-1",children:s.jsx(a,{})})}),s.jsx(v,{children:e})]},e)}export{q as T,K as u};
@@ -1 +0,0 @@
1
- import{e as g}from"./index-C4KOdiuW.js";import{b as p}from"./use-virtual-mcp-D1fXVRo5.js";import{u as f}from"./use-navigate-to-agent-Dg24R1Fh.js";function A(i){const e=g.c(9);let n;e[0]!==i?(n=i===void 0?{}:i,e[0]=i,e[1]=n):n=e[1];const l=n,{navigateOnCreate:d}=l,r=d===void 0?!1:d,t=p(),c=f();let s;e[2]!==t.create||e[3]!==r||e[4]!==c?(s=async()=>{const u=await t.create.mutateAsync({title:"New Agent",description:"AI-driven assistant designed to handle specific tasks",status:"active",connections:[],pinned:!0});return r&&c(u.id,{search:{main:"instructions"}}),{id:u.id,virtualMcp:u}},e[2]=t.create,e[3]=r,e[4]=c,e[5]=s):s=e[5];const o=s;let a;return e[6]!==t.create.isPending||e[7]!==o?(a={createVirtualMCP:o,isCreating:t.create.isPending},e[6]=t.create.isPending,e[7]=o,e[8]=a):a=e[8],a}export{A as u};
@@ -1 +0,0 @@
1
- import{r as a,j as c,ah as H,aU as Z,aT as ee,c4 as te,b6 as $,c5 as oe,ai as b,aW as G,c6 as re,c7 as V,cd as ne,ce as se,ao as ae,df as ie,cf as le,e as _,c as ce}from"./index-C4KOdiuW.js";var ue=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),de="VisuallyHidden",z=a.forwardRef((o,e)=>c.jsx(H.span,{...o,ref:e,style:{...ue,...o.style}}));z.displayName=de;var pe=z,[O]=ae("Tooltip",[V]),D=V(),B="TooltipProvider",fe=700,A="tooltip.open",[ve,k]=O(B),F=o=>{const{__scopeTooltip:e,delayDuration:t=fe,skipDelayDuration:r=300,disableHoverableContent:n=!1,children:s}=o,i=a.useRef(!0),d=a.useRef(!1),l=a.useRef(0);return a.useEffect(()=>{const p=l.current;return()=>window.clearTimeout(p)},[]),c.jsx(ve,{scope:e,isOpenDelayedRef:i,delayDuration:t,onOpen:a.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:a.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:a.useCallback(p=>{d.current=p},[]),disableHoverableContent:n,children:s})};F.displayName=B;var R="Tooltip",[he,j]=O(R),U=o=>{const{__scopeTooltip:e,children:t,open:r,defaultOpen:n,onOpenChange:s,disableHoverableContent:i,delayDuration:d}=o,l=k(R,o.__scopeTooltip),p=D(e),[u,v]=a.useState(null),h=Z(),f=a.useRef(0),x=i??l.disableHoverableContent,m=d??l.delayDuration,g=a.useRef(!1),[y,T]=ee({prop:r,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(A))):l.onClose(),s?.(S)},caller:R}),w=a.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),E=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,g.current=!1,T(!0)},[T]),P=a.useCallback(()=>{window.clearTimeout(f.current),f.current=0,T(!1)},[T]),N=a.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{g.current=!0,T(!0),f.current=0},m)},[m,T]);return a.useEffect(()=>()=>{f.current&&(window.clearTimeout(f.current),f.current=0)},[]),c.jsx(te,{...p,children:c.jsx(he,{scope:e,contentId:h,open:y,stateAttribute:w,trigger:u,onTriggerChange:v,onTriggerEnter:a.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:a.useCallback(()=>{x?P():(window.clearTimeout(f.current),f.current=0)},[P,x]),onOpen:E,onClose:P,disableHoverableContent:x,children:t})})};U.displayName=R;var M="TooltipTrigger",Y=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=j(M,t),s=k(M,t),i=D(t),d=a.useRef(null),l=$(e,d,n.onTriggerChange),p=a.useRef(!1),u=a.useRef(!1),v=a.useCallback(()=>p.current=!1,[]);return a.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),c.jsx(oe,{asChild:!0,...i,children:c.jsx(H.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...r,ref:l,onPointerMove:b(o.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:b(o.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:b(o.onPointerDown,()=>{n.open&&n.onClose(),p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:b(o.onFocus,()=>{p.current||n.onOpen()}),onBlur:b(o.onBlur,n.onClose),onClick:b(o.onClick,n.onClose)})})});Y.displayName=M;var I="TooltipPortal",[xe,ge]=O(I,{forceMount:void 0}),W=o=>{const{__scopeTooltip:e,forceMount:t,children:r,container:n}=o,s=j(I,e);return c.jsx(xe,{scope:e,forceMount:t,children:c.jsx(G,{present:t||s.open,children:c.jsx(re,{asChild:!0,container:n,children:r})})})};W.displayName=I;var C="TooltipContent",q=a.forwardRef((o,e)=>{const t=ge(C,o.__scopeTooltip),{forceMount:r=t.forceMount,side:n="top",...s}=o,i=j(C,o.__scopeTooltip);return c.jsx(G,{present:r||i.open,children:i.disableHoverableContent?c.jsx(K,{side:n,...s,ref:e}):c.jsx(me,{side:n,...s,ref:e})})}),me=a.forwardRef((o,e)=>{const t=j(C,o.__scopeTooltip),r=k(C,o.__scopeTooltip),n=a.useRef(null),s=$(e,n),[i,d]=a.useState(null),{trigger:l,onClose:p}=t,u=n.current,{onPointerInTransitChange:v}=r,h=a.useCallback(()=>{d(null),v(!1)},[v]),f=a.useCallback((x,m)=>{const g=x.currentTarget,y={x:x.clientX,y:x.clientY},T=Ce(y,g.getBoundingClientRect()),w=we(y,T),E=Ee(m.getBoundingClientRect()),P=Re([...w,...E]);d(P),v(!0)},[v]);return a.useEffect(()=>()=>h(),[h]),a.useEffect(()=>{if(l&&u){const x=g=>f(g,u),m=g=>f(g,l);return l.addEventListener("pointerleave",x),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",x),u.removeEventListener("pointerleave",m)}}},[l,u,f,h]),a.useEffect(()=>{if(i){const x=m=>{const g=m.target,y={x:m.clientX,y:m.clientY},T=l?.contains(g)||u?.contains(g),w=!Pe(y,i);T?h():w&&(h(),p())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[l,u,i,p,h]),c.jsx(K,{...o,ref:s})}),[Te,ye]=O(R,{isInside:!1}),be=ie("TooltipContent"),K=a.forwardRef((o,e)=>{const{__scopeTooltip:t,children:r,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...d}=o,l=j(C,t),p=D(t),{onClose:u}=l;return a.useEffect(()=>(document.addEventListener(A,u),()=>document.removeEventListener(A,u)),[u]),a.useEffect(()=>{if(l.trigger){const v=h=>{h.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",v,{capture:!0}),()=>window.removeEventListener("scroll",v,{capture:!0})}},[l.trigger,u]),c.jsx(ne,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:v=>v.preventDefault(),onDismiss:u,children:c.jsxs(se,{"data-state":l.stateAttribute,...p,...d,ref:e,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(be,{children:r}),c.jsx(Te,{scope:t,isInside:!0,children:c.jsx(pe,{id:l.contentId,role:"tooltip",children:n||r})})]})})});q.displayName=C;var X="TooltipArrow",J=a.forwardRef((o,e)=>{const{__scopeTooltip:t,...r}=o,n=D(t);return ye(X,t).isInside?null:c.jsx(le,{...n,...r,ref:e})});J.displayName=X;function Ce(o,e){const t=Math.abs(e.top-o.y),r=Math.abs(e.bottom-o.y),n=Math.abs(e.right-o.x),s=Math.abs(e.left-o.x);switch(Math.min(t,r,n,s)){case s:return"left";case n:return"right";case t:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function we(o,e,t=5){const r=[];switch(e){case"top":r.push({x:o.x-t,y:o.y+t},{x:o.x+t,y:o.y+t});break;case"bottom":r.push({x:o.x-t,y:o.y-t},{x:o.x+t,y:o.y-t});break;case"left":r.push({x:o.x+t,y:o.y-t},{x:o.x+t,y:o.y+t});break;case"right":r.push({x:o.x-t,y:o.y-t},{x:o.x-t,y:o.y+t});break}return r}function Ee(o){const{top:e,right:t,bottom:r,left:n}=o;return[{x:n,y:e},{x:t,y:e},{x:t,y:r},{x:n,y:r}]}function Pe(o,e){const{x:t,y:r}=o;let n=!1;for(let s=0,i=e.length-1;s<e.length;i=s++){const d=e[s],l=e[i],p=d.x,u=d.y,v=l.x,h=l.y;u>r!=h>r&&t<(v-p)*(r-u)/(h-u)+p&&(n=!n)}return n}function Re(o){const e=o.slice();return e.sort((t,r)=>t.x<r.x?-1:t.x>r.x?1:t.y<r.y?-1:t.y>r.y?1:0),_e(e)}function _e(o){if(o.length<=1)return o.slice();const e=[];for(let r=0;r<o.length;r++){const n=o[r];for(;e.length>=2;){const s=e[e.length-1],i=e[e.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))e.pop();else break}e.push(n)}e.pop();const t=[];for(let r=o.length-1;r>=0;r--){const n=o[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var je=F,Oe=U,De=Y,Le=W,Ae=q,Me=J;function ke(o){const e=_.c(6);let t,r;e[0]!==o?({delayDuration:r,...t}=o,e[0]=o,e[1]=t,e[2]=r):(t=e[1],r=e[2]);const n=r===void 0?0:r;let s;return e[3]!==n||e[4]!==t?(s=c.jsx(je,{"data-slot":"tooltip-provider",delayDuration:n,...t}),e[3]=n,e[4]=t,e[5]=s):s=e[5],s}function Ne(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(ke,{children:c.jsx(Oe,{"data-slot":"tooltip",...t})}),e[2]=t,e[3]=r):r=e[3],r}function Se(o){const e=_.c(4);let t;e[0]!==o?({...t}=o,e[0]=o,e[1]=t):t=e[1];let r;return e[2]!==t?(r=c.jsx(De,{"data-slot":"tooltip-trigger",...t}),e[2]=t,e[3]=r):r=e[3],r}function He(o){const e=_.c(13);let t,r,n,s;e[0]!==o?({className:r,sideOffset:s,children:t,...n}=o,e[0]=o,e[1]=t,e[2]=r,e[3]=n,e[4]=s):(t=e[1],r=e[2],n=e[3],s=e[4]);const i=s===void 0?0:s;let d;e[5]!==r?(d=ce("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",r),e[5]=r,e[6]=d):d=e[6];let l;e[7]===Symbol.for("react.memo_cache_sentinel")?(l=c.jsx(Me,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"}),e[7]=l):l=e[7];let p;return e[8]!==t||e[9]!==n||e[10]!==i||e[11]!==d?(p=c.jsx(Le,{children:c.jsxs(Ae,{"data-slot":"tooltip-content",sideOffset:i,className:d,...n,children:[t,l]})}),e[8]=t,e[9]=n,e[10]=i,e[11]=d,e[12]=p):p=e[12],p}const Q=768,L=()=>globalThis.innerWidth<Q;function $e(){const o=_.c(2),[e,t]=a.useState(L);let r,n;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const s=()=>t(L),i=globalThis.matchMedia(`(max-width: ${Q-1}px)`);return i.addEventListener("change",s),t(L),()=>i.removeEventListener("change",s)},n=[],o[0]=r,o[1]=n):(r=o[0],n=o[1]),a.useEffect(r,n),e}export{ke as T,ue as V,Se as a,He as b,Ne as c,$e as u};
@@ -1 +0,0 @@
1
- import{e as x,b as C,a2 as k,f as v,s as y}from"./index-C4KOdiuW.js";import{u as N}from"./use-virtual-mcp-D1fXVRo5.js";function S(s,i){const e=x.c(16),{data:u}=C.useSession(),a=u?.user?.id??"anon",$=`mesh:pinned-agents:${s}:${a}`;let r;e[0]!==i?(r=o=>o??i,e[0]=i,e[1]=r):r=e[1];const[n,t]=k($,r);let c;e[2]!==t?(c=o=>{t(f=>f.includes(o)?f:[...f,o])},e[2]=t,e[3]=c):c=e[3];const l=c;let d;e[4]!==t?(d=o=>{t(f=>f.filter(A=>A!==o))},e[4]=t,e[5]=d):d=e[5];const h=d;let g;e[6]!==t?(g=o=>{t(o)},e[6]=t,e[7]=g):g=e[7];const I=g;let p;e[8]!==n?(p=o=>n.includes(o),e[8]=n,e[9]=p):p=e[9];const P=p;let m;return e[10]!==P||e[11]!==l||e[12]!==n||e[13]!==I||e[14]!==h?(m={pinnedIds:n,pin:l,unpin:h,reorder:I,isPinned:P},e[10]=P,e[11]=l,e[12]=n,e[13]=I,e[14]=h,e[15]=m):m=e[15],m}function D(){const s=x.c(6),i=v(),{org:e}=y(),u=N();let a;s[0]!==u?(a=u.filter(_).map(U),s[0]=u,s[1]=a):a=s[1];const $=a,{pin:r}=S(e.id,$);let n;return s[2]!==i||s[3]!==e.slug||s[4]!==r?(n=(t,c)=>{r(t);const l=crypto.randomUUID();i({to:"/$org/$taskId",params:{org:e.slug,taskId:l},search:{...c?.search??{},virtualmcpid:t}})},s[2]=i,s[3]=e.slug,s[4]=r,s[5]=n):n=s[5],n}function U(s){return s.id}function _(s){return!!s.pinned}export{S as a,D as u};
@@ -1 +0,0 @@
1
- import{e as p,r as f}from"./index-C4KOdiuW.js";import{u as w}from"./use-mobile-DvmdhkH5.js";function S(m,M){const e=p.c(12),u=M===void 0?"cards":M,o=w(),b=f.useRef(o),s=m?`deco-view-mode-${m}`:"deco-view-mode";let i;e[0]!==u||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:u},e[0]=u,e[1]=s,e[2]=i):i=e[2];const[t,g]=f.useState(i);let l;e[3]!==s?(l=r=>{g(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const d=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!b.current&&o&&t==="table"&&g("cards"),b.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==d||e[10]!==t?(n=[t,d],e[9]=d,e[10]=t,e[11]=n):n=e[11],n}export{S as u};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-DS8PEXT3.js";import{c2 as i}from"./index-C4KOdiuW.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./infiniteQueryObserver-DS8PEXT3.js";import{c2 as u,c3 as n}from"./index-C4KOdiuW.js";function a(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{a as u};
@@ -1 +0,0 @@
1
- import{e as P,r as v,c as m,j as o}from"./index-C4KOdiuW.js";import{c as L,a as M,b as q}from"./use-mobile-DvmdhkH5.js";const A={sm:{button:"size-7",icon:"size-4"},md:{button:"size-9",icon:"size-5"},lg:{button:"size-12",icon:"size-6"}};function F(W){const e=P.c(29),{value:s,onValueChange:j,options:i,size:C,fullWidth:T,className:y}=W,$=C===void 0?"sm":C,u=T===void 0?!1:T,E=v.useRef(null),S=v.useRef(null);let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},e[0]=x):x=e[0];const[f,k]=v.useState(x);let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=t=>{if(!t.current)return;const{offsetLeft:R,offsetWidth:_}=t.current;k({left:R,width:_,opacity:1})},e[1]=g):g=e[1];const I=g;let b;e[2]!==i[0].value||e[3]!==s?(b=()=>{const t=s===i[0].value?E:S;I(t)},e[2]=i[0].value,e[3]=s,e[4]=b):b=e[4];let h;e[5]!==i||e[6]!==s?(h=[s,i],e[5]=i,e[6]=s,e[7]=h):h=e[7],v.useEffect(b,h);const d=A[$];let n;e[8]!==y?(n=m("relative flex gap-0 bg-muted rounded-lg",y),e[8]=y,e[9]=n):n=e[9];let l;e[10]!==d||e[11]!==u||e[12]!==j||e[13]!==i||e[14]!==s?(l=i.map((t,R)=>{const _=R===0?E:S,V=o.jsxs("button",{ref:_,type:"button",onClick:()=>j(t.value),className:m("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",u?"flex-1 h-12 px-4":d.button,!u&&t.label?"px-3":""),children:[o.jsx("span",{className:m("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",d.icon,s===t.value?"text-foreground":"text-muted-foreground"),children:t.icon}),t.label&&o.jsx("span",{className:m("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===t.value?"text-foreground":"text-muted-foreground"),children:t.label})]},t.value);return t.tooltip?o.jsxs(L,{children:[o.jsx(M,{asChild:!0,children:V}),o.jsx(q,{side:"bottom",children:t.tooltip})]},t.value):V}),e[10]=d,e[11]=u,e[12]=j,e[13]=i,e[14]=s,e[15]=l):l=e[15];const z=u?"h-12":d.button;let a;e[16]!==z?(a=m("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",z),e[16]=z,e[17]=a):a=e[17];const w=`${f.left}px`,N=`${f.width}px`;let r;e[18]!==f.opacity||e[19]!==w||e[20]!==N?(r={left:w,width:N,opacity:f.opacity},e[18]=f.opacity,e[19]=w,e[20]=N,e[21]=r):r=e[21];let c;e[22]!==a||e[23]!==r?(c=o.jsx("div",{className:a,style:r}),e[22]=a,e[23]=r,e[24]=c):c=e[24];let p;return e[25]!==c||e[26]!==n||e[27]!==l?(p=o.jsxs("div",{className:n,children:[l,c]}),e[25]=c,e[26]=n,e[27]=l,e[28]=p):p=e[28],p}export{F as V};
@@ -1 +0,0 @@
1
- import{e as oe,j as t,B as Ce,f as Be,b as ct,s as ze,r as dt,z as Le,o as ut,a as mt,K as Fe,a7 as Ke,a8 as pt}from"./index-C4KOdiuW.js";import{u as Ve,S as qe}from"./constants-puxzW8Tt.js";import{B as ft,g as Me}from"./constants-CMKJaZow.js";import{C as Qe}from"./collection-display-button-DtLA-_Qf.js";import{C as ht}from"./collection-search-BVB_BOr-.js";import{C as gt}from"./card-B6kxnNb0.js";import{I as Ge}from"./integration-icon-B-ypwxt-.js";import{c as He,d as Je,e as Ye,D as O}from"./dropdown-menu-CiJ99ly5.js";import{f as Xe}from"./XCircle-DUufUsoh.js";import{i as Ze}from"./DotsVertical-CDho1dav.js";import{O as et,v as Ue}from"./agent-icon-DSfidSus.js";import{s as tt}from"./RefreshCcw01-COL3SGLi.js";import{s as st}from"./Trash01-DuRnWn1E.js";import{C as xt}from"./collection-table-wrapper-Cqd6KCzo.js";import{E as We}from"./empty-state-DIogXxVN.js";import{U as jt}from"./user-DAufXs4h.js";import{E as it}from"./empty-state-Bio4MAFs.js";import{u as Ct}from"./use-list-state-BEoAeszV.js";import{g as bt}from"./connection-slug-eyAPH6o3.js";import{A as vt,g as yt,c as Nt,b as wt,d as St,e as Pt,a as _t,f as Dt}from"./alert-dialog-rItivTOb.js";import{a as It,c as At}from"./use-collections-BgcKlAB6.js";import{b as Tt}from"./use-connection-D0OofLda.js";import{s as Et}from"./Plus-Zv0hv0Vg.js";import{a as Ot}from"./layout-BHQW603q.js";import{P as je}from"./index-mcaIOSGF.js";import"./collections-Czgjy6V_.js";import"./XClose-BQJEwJET.js";import"./ChevronDown-DmIUGcFl.js";import"./use-mobile-DvmdhkH5.js";import"./view-mode-toggle-LshbVzEB.js";import"./badge-nX1O9Qf1.js";import"./SearchMd-BjteSZXQ.js";import"./Container-BerLGLgK.js";import"./ChevronRight-CIh2nJ4L.js";import"./AlertCircle-De2C9wZC.js";import"./Tool01-B5mm7tYF.js";import"./ArrowNarrowLeft-bSu4Kz2F.js";import"./ArrowUpRight-DT3QLsvt.js";import"./ZapSquare-BFGlmWLE.js";import"./Users03-DfcHW1oz.js";import"./CheckCircle-BIi7toDZ.js";import"./ChevronUp-BYOoc7wr.js";import"./Star01-BhFELsp4.js";import"./Palette-CqW3vcqn.js";import"./LinkExternal01-CcTNZj2P.js";import"./Lock01-B-vCOiSg.js";import"./Sun-DY_ADcda.js";import"./Play-CrdOw1Iv.js";import"./Settings02-w5kxVqcK.js";import"./Shield01-DodcxEya.js";import"./User01-CQoJwY3u.js";import"./X-Bgfd1eh0.js";import"./Zap-CDLB-lxK.js";import"./table-CaLu-Lo8.js";import"./avatar-UVBUP_wG.js";import"./use-view-mode-BnyE0_EO.js";function $t(i,e){const s=i.properties||{};for(const n in s){const c=s[n];if(c&&c.type==="string"&&(c.format==="url"||c.format==="uri")&&e&&typeof e=="object"&&n in e&&e[n])return e[n]}const l=["image","img","avatar","icon","logo","thumbnail","cover"];for(const n of l)if(e&&typeof e=="object"&&n in e&&typeof e[n]=="string")return e[n]}function kt(i){const e=oe.c(25),{item:s,schema:l,actions:n}=i;let c;e[0]!==s||e[1]!==l?(c=$t(l,s),e[0]=s,e[1]=l,e[2]=c):c=e[2];const r=c,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let d;e[3]!==n?(d=n&&Object.keys(n).length>0,e[3]=n,e[4]=d):d=e[4];const o=d;let m;e[5]!==r||e[6]!==s.title?(m=t.jsx(Ge,{icon:r,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=r,e[6]=s.title,e[7]=m):m=e[7];let u;e[8]!==s.title?(u=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=u):u=e[9];const f=p||"No description";let a;e[10]!==f?(a=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:f}),e[10]=f,e[11]=a):a=e[11];let b;e[12]!==u||e[13]!==a?(b=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[u,a]}),e[12]=u,e[13]=a,e[14]=b):b=e[14];let y;e[15]!==m||e[16]!==b?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,b]}),e[15]=m,e[16]=b,e[17]=y):y=e[17];let C;e[18]!==n||e[19]!==o||e[20]!==s?(C=o&&t.jsx("div",{className:"absolute top-6 right-6 sm:opacity-0 sm:group-hover:opacity-100 transition-opacity",onClick:Kt,onMouseDown:Ft,children:t.jsxs(He,{children:[t.jsx(Je,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Lt,children:t.jsx(Ze,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:zt,children:[n.open&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.open?.(s)},children:[t.jsx(tt,{size:16}),"Open"]}),n.edit&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.edit?.(s)},children:[t.jsx(et,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(O,{onClick:g=>{g.stopPropagation(),n.duplicate?.(s)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(O,{variant:"destructive",onClick:g=>{g.stopPropagation(),n.delete?.(s)},children:[t.jsx(st,{size:16}),"Delete"]})]})]})}),e[18]=n,e[19]=o,e[20]=s,e[21]=C):C=e[21];let v;return e[22]!==y||e[23]!==C?(v=t.jsxs(gt,{className:"cursor-pointer transition-colors hover:bg-accent/50 h-full flex flex-col group relative",children:[y,C]}),e[22]=y,e[23]=C,e[24]=v):v=e[24],v}function zt(i){return i.stopPropagation()}function Lt(i){return i.stopPropagation()}function Ft(i){return i.stopPropagation()}function Kt(i){return i.stopPropagation()}const Mt=["icon","avatar","logo"],Re=["created_at","created_by","id"];function Ut(i){return Object.keys(i).find(e=>Mt.includes(e.toLowerCase()))}function ot(i,e){return Object.keys(i.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Wt(i){const e=oe.c(30),{data:s,schema:l,viewMode:n,search:c,sortKey:r,sortDirection:p,onSort:d,actions:o,onItemClick:m,headerActions:u,emptyState:f,readOnly:a,columns:b,hideToolbar:y,sortableFields:C}=i,v=p===void 0?"asc":p,g=d===void 0?qt:d;let $;e[0]!==o?($=o===void 0?{}:o,e[0]=o,e[1]=$):$=e[1];const h=$,T=m===void 0?Vt:m,E=u===void 0?null:u,N=f===void 0?null:f,k=a===void 0?!1:a,x=b===void 0?void 0:b,z=y===void 0?!1:y,P=C===void 0?void 0:C;let D;e[2]!==x||e[3]!==l||e[4]!==P?(D=x?x.filter(Bt).filter(A=>!P||P.includes(A.id)).map(Rt):ot(l,P),e[2]=x,e[3]=l,e[4]=P,e[5]=D):D=e[5];const w=D;let S;e[6]!==E||e[7]!==z||e[8]!==g||e[9]!==v||e[10]!==r||e[11]!==w?(S=!z&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:E}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Qe,{sortKey:r,sortDirection:v,onSort:g,sortOptions:w})})]})}),e[6]=E,e[7]=z,e[8]=g,e[9]=v,e[10]=r,e[11]=w,e[12]=S):S=e[12];let _;e[13]!==h||e[14]!==x||e[15]!==s||e[16]!==N||e[17]!==T||e[18]!==g||e[19]!==k||e[20]!==l||e[21]!==c||e[22]!==v||e[23]!==r||e[24]!==P||e[25]!==n?(_=n==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:N||t.jsx(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(A=>t.jsx("div",{onClick:()=>T?.(A),className:"cursor-pointer h-full",children:t.jsx(kt,{item:A,schema:l,readOnly:k,actions:h})},A.id))})}):t.jsx(xt,{columns:Ht(x,l,P,h),data:s,sortKey:r,sortDirection:v,onSort:g,onRowClick:T,emptyState:N||t.jsx(We,{icon:t.jsx(Ue,{size:36,className:"text-muted-foreground"}),title:"No items found",description:c?"Try adjusting your search":"No items to display"})}),e[13]=h,e[14]=x,e[15]=s,e[16]=N,e[17]=T,e[18]=g,e[19]=k,e[20]=l,e[21]=c,e[22]=v,e[23]=r,e[24]=P,e[25]=n,e[26]=_):_=e[26];let I;return e[27]!==S||e[28]!==_?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[S,_]}),e[27]=S,e[28]=_,e[29]=I):I=e[29],I}function Rt(i){return{id:i.id,label:typeof i.header=="string"?i.header:i.id}}function Bt(i){return i.sortable!==!1}function Vt(){}function qt(){}function Qt(i){return{id:"actions",header:"",render:e=>t.jsxs(He,{children:[t.jsx(Je,{asChild:!0,children:t.jsx(Ce,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Ze,{size:20})})}),t.jsxs(Ye,{align:"end",onClick:s=>s.stopPropagation(),children:[i.open&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.open?.(e)},children:[t.jsx(tt,{size:16}),"Open"]}),i.edit&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.edit?.(e)},children:[t.jsx(et,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(O,{onClick:s=>{s.stopPropagation(),i.duplicate?.(e)},children:[t.jsx(Xe,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(O,{variant:"destructive",onClick:s=>{s.stopPropagation(),i.delete?.(e)},children:[t.jsx(st,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function nt(i){const e=i.type;return Array.isArray(e)?e.every(s=>nt({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function Gt(i,e){const s=i.properties||{},l=Object.keys(s).filter(o=>{const m=s[o];return m&&nt(m)}),n=Ut(s),c=[],r=new Set;n&&l.includes(n)&&(c.push(n),r.add(n));const p=["title","description","updated_at","updated_by"];for(const o of p)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));const d=l.filter(o=>!r.has(o)&&!Re.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of d)c.push(o),r.add(o);for(const o of Re)l.includes(o)&&!r.has(o)&&(c.push(o),r.add(o));return c.map(o=>{const m=s[o],u=e?e.includes(o):!["id"].includes(o);return o===n?{id:o,header:"",render:f=>{const a=f[o];return t.jsx(Ge,{icon:a,name:f.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(a)})},sortable:u,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx(jt,{id:String(a),size:"xs"}):"—"},sortable:u,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a?t.jsx("span",{className:"block truncate max-w-full",children:new Date(a).toLocaleDateString()}):"—"},sortable:u,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:f=>{const a=f[o];return a==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(a)})},sortable:u,cellClassName:"max-w-[200px]"}})}function Ht(i,e,s,l){const n=i||Gt(e,s);return n.some(p=>p.id==="actions")?n:Object.keys(l).length>0?[...n,Qt(l)]:n}function Jt(i){const e=oe.c(118),{connectionId:s,org:l,activeCollection:n,onItemClick:c}=i,r=n.name,p=n.schema??ft,d=n.hasCreateTool,o=n.hasUpdateTool,m=n.hasDeleteTool,u=Be(),{data:f}=ct.useSession(),a=f?.user?.id||"unknown",b=Tt(s);let y;e[0]!==b||e[1]!==s?(y=b?bt(b):s,e[0]=b,e[1]=s,e[2]=y):y=e[2];const C=y,{org:v}=ze();let g;e[3]!==s||e[4]!==v.id?(g={connectionId:s,orgId:v.id},e[3]=s,e[4]=v.id,e[5]=g):g=e[5];const $=Ve(g),h=It(s,r,$),T=`${s}-${r}`;let E;e[6]!==l||e[7]!==T?(E={namespace:l,resource:T,defaultSortKey:"updated_at"},e[6]=l,e[7]=T,e[8]=E):E=e[8];const{search:N,searchTerm:k,setSearch:x,viewMode:z,setViewMode:P,sortKey:D,sortDirection:w,handleSort:S}=Ct(E);let _;e[9]!==k||e[10]!==w||e[11]!==D?(_={searchTerm:k,sortKey:D,sortDirection:w},e[9]=k,e[10]=w,e[11]=D,e[12]=_):_=e[12];const I=At(s,r,$,_),A=!d&&!o&&!m;let ne;e[13]!==C||e[14]!==r||e[15]!==u||e[16]!==c||e[17]!==l?(ne=j=>{if(c){c(j);return}u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:C,collectionName:r,itemId:j.id}})},e[13]=C,e[14]=r,e[15]=u,e[16]=c,e[17]=l,e[18]=ne):ne=e[18];const L=ne;let re;e[19]!==h.create||e[20]!==a?(re=async j=>{const xe=new Date().toISOString();await h.create.mutateAsync({...j,id:Me("conn"),title:`${j.title} (Copy)`,created_at:xe,updated_at:xe,created_by:a,updated_by:a})},e[19]=h.create,e[20]=a,e[21]=re):re=e[21];const be=re,[F,ve]=dt.useState(null);let le;e[22]===Symbol.for("react.memo_cache_sentinel")?(le=j=>{ve(j)},e[22]=le):le=e[22];const rt=le;let K;e[23]!==L||e[24]!==o?(K=o&&{edit:L},e[23]=L,e[24]=o,e[25]=K):K=e[25];let M;e[26]!==be||e[27]!==d?(M=d&&{duplicate:be},e[26]=be,e[27]=d,e[28]=M):M=e[28];let U;e[29]!==m?(U=m&&{delete:rt},e[29]=m,e[30]=U):U=e[30];let ae;e[31]!==M||e[32]!==U||e[33]!==K?(ae={...K,...M,...U},e[31]=M,e[32]=U,e[33]=K,e[34]=ae):ae=e[34];const ye=ae;let ce;e[35]!==h.delete||e[36]!==F?(ce=async()=>{F&&(await h.delete.mutateAsync(F.id),ve(null))},e[35]=h.delete,e[36]=F,e[37]=ce):ce=e[37];const Ne=ce;let de;e[38]!==h.create||e[39]!==C||e[40]!==r||e[41]!==d||e[42]!==u||e[43]!==l||e[44]!==a?(de=async()=>{if(!d){Le.error("Create operation is not available for this collection");return}const j=new Date().toISOString(),xe={id:Me("conn"),title:"New Item",description:"A brief description of the item",created_at:j,updated_at:j,created_by:a,updated_by:a};try{const ke=await h.create.mutateAsync(xe);u({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:l,appSlug:C,collectionName:r,itemId:ke.id}})}catch(ke){console.error("Failed to create item:",ke)}},e[38]=h.create,e[39]=C,e[40]=r,e[41]=d,e[42]=u,e[43]=l,e[44]=a,e[45]=de):de=e[45];const we=de;let ue;e[46]!==p?(ue=ot(p),e[46]=p,e[47]=ue):ue=e[47];const Se=ue,lt=(I?.length??0)>0,at=d&&!lt&&!N;let me;e[48]!==h.create||e[49]!==we||e[50]!==d?(me=d?t.jsxs(Ce,{onClick:we,size:"sm",disabled:h.create.isPending,className:"h-7",children:[t.jsx(Et,{className:"mr-2 h-4 w-4"}),h.create.isPending?"Creating...":"Create"]}):null,e[48]=h.create,e[49]=we,e[50]=d,e[51]=me):me=e[51];const pe=me,Pe=D;let W;e[52]!==S||e[53]!==w||e[54]!==Se||e[55]!==Pe?(W=t.jsx(Ot,{children:t.jsx(Qe,{sortKey:Pe,sortDirection:w,onSort:S,sortOptions:Se})}),e[52]=S,e[53]=w,e[54]=Se,e[55]=Pe,e[56]=W):W=e[56];const _e=`Search ${r}...`;let R;e[57]!==x?(R=j=>{j.key==="Escape"&&(x(""),j.target.blur())},e[57]=x,e[58]=R):R=e[58];let B;e[59]!==N||e[60]!==x||e[61]!==_e||e[62]!==R?(B=t.jsx("div",{className:"flex-1",children:t.jsx(ht,{value:N,onChange:x,placeholder:_e,onKeyDown:R})}),e[59]=N,e[60]=x,e[61]=_e,e[62]=R,e[63]=B):B=e[63];let V;e[64]!==pe||e[65]!==d?(V=d&&t.jsx("div",{className:"pr-3",children:pe}),e[64]=pe,e[65]=d,e[66]=V):V=e[66];let q;e[67]!==B||e[68]!==V?(q=t.jsxs("div",{className:"flex items-center gap-2",children:[B,V]}),e[67]=B,e[68]=V,e[69]=q):q=e[69];let Q;e[70]!==I?(Q=I??[],e[70]=I,e[71]=Q):Q=e[71];const De=D;let G;e[72]!==L?(G=j=>L(j),e[72]=L,e[73]=G):G=e[73];const Ie="No items found",Ae=N?"Try adjusting your search terms":"This collection doesn't have any items yet.",Te=at?pe:void 0;let H;e[74]!==Ie||e[75]!==Ae||e[76]!==Te?(H=t.jsx(it,{image:null,title:Ie,description:Ae,actions:Te}),e[74]=Ie,e[75]=Ae,e[76]=Te,e[77]=H):H=e[77];let J;e[78]!==S||e[79]!==A||e[80]!==ye||e[81]!==p||e[82]!==N||e[83]!==x||e[84]!==P||e[85]!==w||e[86]!==Q||e[87]!==De||e[88]!==G||e[89]!==H||e[90]!==z?(J=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Wt,{hideToolbar:!0,data:Q,schema:p,viewMode:z,onViewModeChange:P,search:N,onSearchChange:x,sortKey:De,sortDirection:w,onSort:S,actions:ye,onItemClick:G,readOnly:A,emptyState:H})}),e[78]=S,e[79]=A,e[80]=ye,e[81]=p,e[82]=N,e[83]=x,e[84]=P,e[85]=w,e[86]=Q,e[87]=De,e[88]=G,e[89]=H,e[90]=z,e[91]=J):J=e[91];let Y;e[92]!==q||e[93]!==J?(Y=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[q,J]}),e[92]=q,e[93]=J,e[94]=Y):Y=e[94];const Ee=!!F;let fe;e[95]===Symbol.for("react.memo_cache_sentinel")?(fe=j=>{j||ve(null)},e[95]=fe):fe=e[95];let he;e[96]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsx(Nt,{children:"Delete item?"}),e[96]=he):he=e[96];const Oe=F?.title;let X;e[97]!==Oe?(X=t.jsxs(wt,{children:[he,t.jsxs(St,{children:['Are you sure you want to delete "',Oe,'"? This action cannot be undone.']})]}),e[97]=Oe,e[98]=X):X=e[98];let Z;e[99]!==h.delete.isPending?(Z=t.jsx(vt,{disabled:h.delete.isPending,children:"Cancel"}),e[99]=h.delete.isPending,e[100]=Z):Z=e[100];const $e=h.delete.isPending?"Deleting...":"Delete";let ee;e[101]!==h.delete.isPending||e[102]!==Ne||e[103]!==$e?(ee=t.jsx(yt,{onClick:Ne,disabled:h.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:$e}),e[101]=h.delete.isPending,e[102]=Ne,e[103]=$e,e[104]=ee):ee=e[104];let te;e[105]!==Z||e[106]!==ee?(te=t.jsxs(Pt,{children:[Z,ee]}),e[105]=Z,e[106]=ee,e[107]=te):te=e[107];let se;e[108]!==X||e[109]!==te?(se=t.jsxs(_t,{children:[X,te]}),e[108]=X,e[109]=te,e[110]=se):se=e[110];let ie;e[111]!==Ee||e[112]!==se?(ie=t.jsx(Dt,{open:Ee,onOpenChange:fe,children:se}),e[111]=Ee,e[112]=se,e[113]=ie):ie=e[113];let ge;return e[114]!==W||e[115]!==Y||e[116]!==ie?(ge=t.jsxs(t.Fragment,{children:[W,Y,ie]}),e[114]=W,e[115]=Y,e[116]=ie,e[117]=ge):ge=e[117],ge}function Yt(){const i=oe.c(12),{org:e,project:s}=ze(),l=ut();let n;i[0]!==e.id?(n={connectionId:qe,orgId:e.id},i[0]=e.id,i[1]=n):n=i[1];const c=Ve(n);let r;i[2]!==c||i[3]!==s?(r=async m=>{const u=s.enabledPlugins??[];if(u.includes(m))return;const f=[...u,m],a=await c.callTool({name:"COLLECTION_VIRTUAL_MCP_UPDATE",arguments:{id:s.id,data:{metadata:{enabled_plugins:f}}}});return a.structuredContent??a},i[2]=c,i[3]=s,i[4]=r):r=i[4];let p;i[5]!==e.id||i[6]!==s||i[7]!==l?(p=()=>{l.invalidateQueries({queryKey:Fe.project(e.id,s.slug)}),l.invalidateQueries({queryKey:Fe.projects(e.id)})},i[5]=e.id,i[6]=s,i[7]=l,i[8]=p):p=i[8];let d;return i[9]!==r||i[10]!==p?(d={mutationFn:r,onSuccess:p,onError:Xt},i[9]=r,i[10]=p,i[11]=d):d=i[11],mt(d)}function Xt(i){Le.error("Failed to enable plugin: "+(i instanceof Error?i.message:"Unknown error"))}function Zt(i){const e=oe.c(12),{pluginId:s,title:l,description:n,icon:c}=i,r=Yt();let p;e[0]!==r||e[1]!==s?(p=async()=>{try{await r.mutateAsync(s),Le.success("Plugin enabled!")}catch{}},e[0]=r,e[1]=s,e[2]=p):p=e[2];const d=p,o=c??null,m=r.isPending?"Enabling…":"Enable plugin";let u;e[3]!==r.isPending||e[4]!==d||e[5]!==m?(u=t.jsx(Ce,{onClick:d,disabled:r.isPending,children:m}),e[3]=r.isPending,e[4]=d,e[5]=m,e[6]=u):u=e[6];let f;return e[7]!==n||e[8]!==o||e[9]!==u||e[10]!==l?(f=t.jsx(it,{image:o,title:l,description:n,actions:u}),e[7]=n,e[8]=o,e[9]=u,e[10]=l,e[11]=f):f=e[11],f}const es={name:"WORKFLOW",displayName:"Workflow",hasCreateTool:!0,hasUpdateTool:!0,hasDeleteTool:!0};function oi(){const{project:i,org:e}=ze();if(!(i.enabledPlugins??[]).includes(Ke))return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:t.jsx(Zt,{pluginId:Ke,title:"Enable Workflows",description:"Automate multi-step processes by enabling the Workflows plugin. Once enabled you can create, run, and monitor workflows.",icon:t.jsx("div",{className:"bg-muted p-4 rounded-full",children:t.jsx(pt,{className:"size-8 text-muted-foreground"})})})})})});const n=Be();return t.jsx(je,{children:t.jsx(je.Content,{children:t.jsx(Jt,{connectionId:qe,org:e.slug,activeCollection:es,onItemClick:c=>n({to:"/$org/settings/workflows/$itemId",params:{org:e.slug,itemId:c.id}})})})})}export{oi as default};
@@ -1 +0,0 @@
1
- import{e as s,g as l,j as o,l as a,E as n,r as c}from"./index-C4KOdiuW.js";import{a as f}from"./index-DFoLVe7P.js";import"./index-DdEYcoGw.js";import"./constants-puxzW8Tt.js";import"./collections-Czgjy6V_.js";import"./index-BiFex3ig.js";import"./use-virtual-mcp-D1fXVRo5.js";import"./use-collections-BgcKlAB6.js";import"./monaco-editor-C80vYwBa.js";import"./scroll-area-BlUv7zcB.js";import"./select-W23RccQR.js";import"./use-mobile-DvmdhkH5.js";import"./ChevronDown-DmIUGcFl.js";import"./ChevronUp-BYOoc7wr.js";import"./accordion-zVtel299.js";import"./agent-icon-DSfidSus.js";import"./AlertCircle-De2C9wZC.js";import"./Tool01-B5mm7tYF.js";import"./XClose-BQJEwJET.js";import"./RefreshCcw01-COL3SGLi.js";import"./ArrowNarrowLeft-bSu4Kz2F.js";import"./XCircle-DUufUsoh.js";import"./ArrowUpRight-DT3QLsvt.js";import"./ZapSquare-BFGlmWLE.js";import"./Users03-DfcHW1oz.js";import"./CheckCircle-BIi7toDZ.js";import"./ChevronRight-CIh2nJ4L.js";import"./DotsVertical-CDho1dav.js";import"./Container-BerLGLgK.js";import"./Star01-BhFELsp4.js";import"./Palette-CqW3vcqn.js";import"./SearchMd-BjteSZXQ.js";import"./index-mcaIOSGF.js";import"./X-Bgfd1eh0.js";import"./LinkExternal01-CcTNZj2P.js";import"./Lock01-B-vCOiSg.js";import"./Sun-DY_ADcda.js";import"./Play-CrdOw1Iv.js";import"./Plus-Zv0hv0Vg.js";import"./Settings02-w5kxVqcK.js";import"./Shield01-DodcxEya.js";import"./Trash01-DuRnWn1E.js";import"./User01-CQoJwY3u.js";import"./Zap-CDLB-lxK.js";import"./badge-nX1O9Qf1.js";import"./view-mode-toggle-LshbVzEB.js";import"./layout-BHQW603q.js";import"./use-connection-D0OofLda.js";import"./use-mcp-tools-D1ScXFUK.js";import"./dialog-CAwNCLeY.js";import"./dropdown-menu-CiJ99ly5.js";import"./integration-icon-B-ypwxt-.js";import"./index-BhZeUpb1.js";import"./empty-state-DIogXxVN.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-DrxCctpM.js";function xt(){const t=s.c(4);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org/settings/workflows/$itemId"},t[0]=r):r=t[0];const{itemId:e}=l(r);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(a,{size:32,className:"animate-spin text-muted-foreground"})}),t[1]=i):i=t[1];const p=decodeURIComponent(e);let m;return t[2]!==p?(m=o.jsx(n,{children:o.jsx(c.Suspense,{fallback:i,children:o.jsx(f,{itemId:p})})}),t[2]=p,t[3]=m):m=t[3],m}export{xt as default};
@@ -1,13 +0,0 @@
1
- Copyright © 2017, Charmander <~@charmander.me>
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any
4
- purpose with or without fee is hereby granted, provided that the above
5
- copyright notice and this permission notice appear in all copies.
6
-
7
- THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
9
- FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
@@ -1,16 +0,0 @@
1
- [![Build status][ci image]][ci]
2
-
3
- 64-bit big-endian signed integer-to-string conversion designed for [pg][].
4
-
5
- ```js
6
- const readInt8 = require('pg-int8');
7
-
8
- readInt8(Buffer.from([0, 1, 2, 3, 4, 5, 6, 7]))
9
- // '283686952306183'
10
- ```
11
-
12
-
13
- [pg]: https://github.com/brianc/node-postgres
14
-
15
- [ci]: https://travis-ci.org/charmander/pg-int8
16
- [ci image]: https://api.travis-ci.org/charmander/pg-int8.svg
@@ -1,100 +0,0 @@
1
- 'use strict';
2
-
3
- // selected so (BASE - 1) * 0x100000000 + 0xffffffff is a safe integer
4
- var BASE = 1000000;
5
-
6
- function readInt8(buffer) {
7
- var high = buffer.readInt32BE(0);
8
- var low = buffer.readUInt32BE(4);
9
- var sign = '';
10
-
11
- if (high < 0) {
12
- high = ~high + (low === 0);
13
- low = (~low + 1) >>> 0;
14
- sign = '-';
15
- }
16
-
17
- var result = '';
18
- var carry;
19
- var t;
20
- var digits;
21
- var pad;
22
- var l;
23
- var i;
24
-
25
- {
26
- carry = high % BASE;
27
- high = high / BASE >>> 0;
28
-
29
- t = 0x100000000 * carry + low;
30
- low = t / BASE >>> 0;
31
- digits = '' + (t - BASE * low);
32
-
33
- if (low === 0 && high === 0) {
34
- return sign + digits + result;
35
- }
36
-
37
- pad = '';
38
- l = 6 - digits.length;
39
-
40
- for (i = 0; i < l; i++) {
41
- pad += '0';
42
- }
43
-
44
- result = pad + digits + result;
45
- }
46
-
47
- {
48
- carry = high % BASE;
49
- high = high / BASE >>> 0;
50
-
51
- t = 0x100000000 * carry + low;
52
- low = t / BASE >>> 0;
53
- digits = '' + (t - BASE * low);
54
-
55
- if (low === 0 && high === 0) {
56
- return sign + digits + result;
57
- }
58
-
59
- pad = '';
60
- l = 6 - digits.length;
61
-
62
- for (i = 0; i < l; i++) {
63
- pad += '0';
64
- }
65
-
66
- result = pad + digits + result;
67
- }
68
-
69
- {
70
- carry = high % BASE;
71
- high = high / BASE >>> 0;
72
-
73
- t = 0x100000000 * carry + low;
74
- low = t / BASE >>> 0;
75
- digits = '' + (t - BASE * low);
76
-
77
- if (low === 0 && high === 0) {
78
- return sign + digits + result;
79
- }
80
-
81
- pad = '';
82
- l = 6 - digits.length;
83
-
84
- for (i = 0; i < l; i++) {
85
- pad += '0';
86
- }
87
-
88
- result = pad + digits + result;
89
- }
90
-
91
- {
92
- carry = high % BASE;
93
- t = 0x100000000 * carry + low;
94
- digits = '' + t % BASE;
95
-
96
- return sign + digits + result;
97
- }
98
- }
99
-
100
- module.exports = readInt8;
@@ -1,24 +0,0 @@
1
- {
2
- "name": "pg-int8",
3
- "version": "1.0.1",
4
- "description": "64-bit big-endian signed integer-to-string conversion",
5
- "bugs": "https://github.com/charmander/pg-int8/issues",
6
- "license": "ISC",
7
- "files": [
8
- "index.js"
9
- ],
10
- "repository": {
11
- "type": "git",
12
- "url": "https://github.com/charmander/pg-int8"
13
- },
14
- "scripts": {
15
- "test": "tap test"
16
- },
17
- "devDependencies": {
18
- "@charmander/eslint-config-base": "1.0.2",
19
- "tap": "10.7.3"
20
- },
21
- "engines": {
22
- "node": ">=4.0.0"
23
- }
24
- }
@@ -1,4 +0,0 @@
1
-
2
- export function parse(source: string): string[];
3
- export function parse<T>(source: string, transform: (value: string) => T): T[];
4
-
@@ -1,97 +0,0 @@
1
- 'use strict'
2
-
3
- exports.parse = function (source, transform) {
4
- return new ArrayParser(source, transform).parse()
5
- }
6
-
7
- class ArrayParser {
8
- constructor (source, transform) {
9
- this.source = source
10
- this.transform = transform || identity
11
- this.position = 0
12
- this.entries = []
13
- this.recorded = []
14
- this.dimension = 0
15
- }
16
-
17
- isEof () {
18
- return this.position >= this.source.length
19
- }
20
-
21
- nextCharacter () {
22
- var character = this.source[this.position++]
23
- if (character === '\\') {
24
- return {
25
- value: this.source[this.position++],
26
- escaped: true
27
- }
28
- }
29
- return {
30
- value: character,
31
- escaped: false
32
- }
33
- }
34
-
35
- record (character) {
36
- this.recorded.push(character)
37
- }
38
-
39
- newEntry (includeEmpty) {
40
- var entry
41
- if (this.recorded.length > 0 || includeEmpty) {
42
- entry = this.recorded.join('')
43
- if (entry === 'NULL' && !includeEmpty) {
44
- entry = null
45
- }
46
- if (entry !== null) entry = this.transform(entry)
47
- this.entries.push(entry)
48
- this.recorded = []
49
- }
50
- }
51
-
52
- consumeDimensions () {
53
- if (this.source[0] === '[') {
54
- while (!this.isEof()) {
55
- var char = this.nextCharacter()
56
- if (char.value === '=') break
57
- }
58
- }
59
- }
60
-
61
- parse (nested) {
62
- var character, parser, quote
63
- this.consumeDimensions()
64
- while (!this.isEof()) {
65
- character = this.nextCharacter()
66
- if (character.value === '{' && !quote) {
67
- this.dimension++
68
- if (this.dimension > 1) {
69
- parser = new ArrayParser(this.source.substr(this.position - 1), this.transform)
70
- this.entries.push(parser.parse(true))
71
- this.position += parser.position - 2
72
- }
73
- } else if (character.value === '}' && !quote) {
74
- this.dimension--
75
- if (!this.dimension) {
76
- this.newEntry()
77
- if (nested) return this.entries
78
- }
79
- } else if (character.value === '"' && !character.escaped) {
80
- if (quote) this.newEntry(true)
81
- quote = !quote
82
- } else if (character.value === ',' && !quote) {
83
- this.newEntry()
84
- } else {
85
- this.record(character.value)
86
- }
87
- }
88
- if (this.dimension !== 0) {
89
- throw new Error('array dimension not balanced')
90
- }
91
- return this.entries
92
- }
93
- }
94
-
95
- function identity (value) {
96
- return value
97
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) Ben Drucker <bvdrucker@gmail.com> (bendrucker.me)
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
@@ -1,35 +0,0 @@
1
- {
2
- "name": "postgres-array",
3
- "main": "index.js",
4
- "version": "2.0.0",
5
- "description": "Parse postgres array columns",
6
- "license": "MIT",
7
- "repository": "bendrucker/postgres-array",
8
- "author": {
9
- "name": "Ben Drucker",
10
- "email": "bvdrucker@gmail.com",
11
- "url": "bendrucker.me"
12
- },
13
- "engines": {
14
- "node": ">=4"
15
- },
16
- "scripts": {
17
- "test": "standard && tape test.js"
18
- },
19
- "types": "index.d.ts",
20
- "keywords": [
21
- "postgres",
22
- "array",
23
- "parser"
24
- ],
25
- "dependencies": {},
26
- "devDependencies": {
27
- "standard": "^12.0.1",
28
- "tape": "^4.0.0"
29
- },
30
- "files": [
31
- "index.js",
32
- "index.d.ts",
33
- "readme.md"
34
- ]
35
- }