decocms 2.311.9 → 2.311.10

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 (232) hide show
  1. package/dist/client/assets/{AlertCircle-DenZ2tH1.js → AlertCircle-CBFejk6X.js} +1 -1
  2. package/dist/client/assets/{Archive-CUyKZVLi.js → Archive-iAwIFcLN.js} +1 -1
  3. package/dist/client/assets/{ArrowNarrowLeft-CdHYti4b.js → ArrowNarrowLeft-C0NWe8i5.js} +1 -1
  4. package/dist/client/assets/{ArrowUpRight-DQA2yLzS.js → ArrowUpRight-wDGVfxe4.js} +1 -1
  5. package/dist/client/assets/{Check-B1QjP0lW.js → Check-BzVO1AiZ.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-uoVBaQQY.js → CheckCircle-B7pbvHXn.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-CW5suF8w.js → ChevronDown-Deq9bkeU.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-C75N1vRO.js → ChevronRight-De9CjTSZ.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-D9vKVRMW.js → ChevronUp-B22gTkPS.js} +1 -1
  10. package/dist/client/assets/{Container-e4KoMY54.js → Container-10kbY0mV.js} +1 -1
  11. package/dist/client/assets/{DotsVertical-Bl74LMdL.js → DotsVertical-B0gKWs5D.js} +1 -1
  12. package/dist/client/assets/{LinkExternal01-JpLMSezj.js → LinkExternal01-DkQ5Dk0s.js} +1 -1
  13. package/dist/client/assets/{Lock01-ChyzS6Qk.js → Lock01-CHNFEFTO.js} +1 -1
  14. package/dist/client/assets/{Palette-DxkFGkUo.js → Palette-B7UA48pi.js} +1 -1
  15. package/dist/client/assets/{Play-DNddfPVv.js → Play-BunaO9my.js} +1 -1
  16. package/dist/client/assets/{Plus-BdkW25go.js → Plus-DlXyaJQM.js} +1 -1
  17. package/dist/client/assets/{RefreshCcw01-Bv9_h0OY.js → RefreshCcw01-BsycvfGb.js} +1 -1
  18. package/dist/client/assets/{SearchMd-DENJ3C2Y.js → SearchMd-15kzRVQe.js} +1 -1
  19. package/dist/client/assets/{Settings02-B4xVAQg7.js → Settings02-DVi1PM0X.js} +1 -1
  20. package/dist/client/assets/{Shield01-CISf8vls.js → Shield01-B70wMBqd.js} +1 -1
  21. package/dist/client/assets/{Star01-B90yQrQf.js → Star01-CJoi6RDa.js} +1 -1
  22. package/dist/client/assets/{Sun-jOb3MXPJ.js → Sun-CGoBYMaF.js} +1 -1
  23. package/dist/client/assets/{Tool01-CBOCDbIq.js → Tool01-D48iIlf1.js} +1 -1
  24. package/dist/client/assets/{Trash01-CqvPY4I1.js → Trash01-r5gnirq_.js} +1 -1
  25. package/dist/client/assets/{User01-DcOBCx9n.js → User01-DJ7t0J9b.js} +1 -1
  26. package/dist/client/assets/{Users03-l6fjto8R.js → Users03-DYLtKI27.js} +1 -1
  27. package/dist/client/assets/{X-CuBCe85s.js → X-BkKDRlJI.js} +1 -1
  28. package/dist/client/assets/{XCircle-CwRlSPkG.js → XCircle-sedM5Yzu.js} +1 -1
  29. package/dist/client/assets/{XClose-BYpD-FW2.js → XClose-Bx_xQQD_.js} +1 -1
  30. package/dist/client/assets/{Zap-BBT7v7w5.js → Zap-Cf_cpNNU.js} +1 -1
  31. package/dist/client/assets/{ZapSquare-q2bTQS4w.js → ZapSquare-DlRSLgAv.js} +1 -1
  32. package/dist/client/assets/{accordion-ChtmP3A-.js → accordion-DT47aOa3.js} +1 -1
  33. package/dist/client/assets/{agent-icon-aCG4rJO5.js → agent-icon-DUbGEO2S.js} +1 -1
  34. package/dist/client/assets/{agents-list-z6-U6t17.js → agents-list-rwKMRHld.js} +1 -1
  35. package/dist/client/assets/ai-providers-CRf0IUiu.js +1 -0
  36. package/dist/client/assets/{alert-dialog-DbOFkimV.js → alert-dialog-2Jj762BJ.js} +1 -1
  37. package/dist/client/assets/{auth-catchall-gGMZKA1c.js → auth-catchall-DTur9gCU.js} +1 -1
  38. package/dist/client/assets/{automation-list-row-CW7pxb1d.js → automation-list-row-Cuemsvmv.js} +1 -1
  39. package/dist/client/assets/{automations-BGGEy84S.js → automations-DN3LYNZV.js} +1 -1
  40. package/dist/client/assets/{avatar-aIgMbJGD.js → avatar-BoueLWcb.js} +1 -1
  41. package/dist/client/assets/{badge-DVYtPj3Q.js → badge-kdIe7Szq.js} +1 -1
  42. package/dist/client/assets/{brand-context-CWGrLOUV.js → brand-context-C39FhTOD.js} +1 -1
  43. package/dist/client/assets/{card-DF88hzU1.js → card-1EoqQ-Q7.js} +1 -1
  44. package/dist/client/assets/{chat-context-C_Gvp66M.js → chat-context-CqLR71Tu.js} +1 -1
  45. package/dist/client/assets/{checkbox-KaNd7DxH.js → checkbox-CL4jg0mR.js} +1 -1
  46. package/dist/client/assets/{collection-detail-CsOa-wP4.js → collection-detail-Be93090Z.js} +1 -1
  47. package/dist/client/assets/{collection-display-button-DX3qc6dM.js → collection-display-button-BWk8xHdj.js} +1 -1
  48. package/dist/client/assets/{collection-search-CW10ePNY.js → collection-search-B-8Jnp5p.js} +1 -1
  49. package/dist/client/assets/{collection-search-B_uLWogM.js → collection-search-BOMyE6Ld.js} +1 -1
  50. package/dist/client/assets/{collection-table-wrapper-jrC7a888.js → collection-table-wrapper-Cb-FxojL.js} +1 -1
  51. package/dist/client/assets/{collection-tabs-B4ahuefD.js → collection-tabs-Li95C-8Z.js} +1 -1
  52. package/dist/client/assets/{collections-BGO4ETj2.js → collections-BpcdhWS9.js} +1 -1
  53. package/dist/client/assets/{command-CI9ISywp.js → command-D-VqtTkt.js} +1 -1
  54. package/dist/client/assets/{connection-card-Bpyvc28P.js → connection-card-D4MG7ceA.js} +1 -1
  55. package/dist/client/assets/{connection-detail-CZhT71J5.js → connection-detail-C9HOgjUN.js} +1 -1
  56. package/dist/client/assets/{connection-form-helpers-BfvL5eFo.js → connection-form-helpers-C96WddUN.js} +1 -1
  57. package/dist/client/assets/{connections-BAYG38Zt.js → connections-Dudt-pG4.js} +1 -1
  58. package/dist/client/assets/{constants-D5Po9Lb5.js → constants--Z68frQS.js} +1 -1
  59. package/dist/client/assets/{constants-P7U02cV2.js → constants-BY3slQ5k.js} +1 -1
  60. package/dist/client/assets/{dialog-59APH-gQ.js → dialog-2qod6XLb.js} +1 -1
  61. package/dist/client/assets/{domain-settings-BGvTcpHg.js → domain-settings-BXrvw6Lv.js} +1 -1
  62. package/dist/client/assets/{drawer-IJtapzyu.js → drawer-DSH3rjuX.js} +1 -1
  63. package/dist/client/assets/{dropdown-menu-B2SzMipC.js → dropdown-menu-CYyf-ZrC.js} +1 -1
  64. package/dist/client/assets/{dynamic-plugin-layout-Drvp3rfz.js → dynamic-plugin-layout-RlhEpflE.js} +1 -1
  65. package/dist/client/assets/{empty-state-DkaEz1nV.js → empty-state-BdiBdNme.js} +1 -1
  66. package/dist/client/assets/{empty-state-i6xsv-YS.js → empty-state-DebOy9XU.js} +1 -1
  67. package/dist/client/assets/{extract-connection-data-B7tG5T45.js → extract-connection-data-BTMDGqDD.js} +1 -1
  68. package/dist/client/assets/{features-amfQ2FpE.js → features-Cxt-JPsD.js} +1 -1
  69. package/dist/client/assets/{form-DZNe3M-o.js → form-BxsxXSuZ.js} +1 -1
  70. package/dist/client/assets/{general-uTGUk0Bo.js → general-u1Y39J62.js} +1 -1
  71. package/dist/client/assets/{index-B_OOgiEa.js → index-0enbmaSe.js} +2 -2
  72. package/dist/client/assets/{index-CemFt8yz.js → index-BNtQbO2i.js} +1 -1
  73. package/dist/client/assets/{index-B2WBo1WB.js → index-BVirFM6V.js} +1 -1
  74. package/dist/client/assets/{index-B9Elrkih.js → index-Bna4Mzv7.js} +1 -1
  75. package/dist/client/assets/{index-BT3jRQuX.js → index-CJ3mMCam.js} +1 -1
  76. package/dist/client/assets/{index-_Kba4LMo.js → index-CbJD4O9M.js} +3 -3
  77. package/dist/client/assets/{index-BlLtpzeQ.js → index-Co04TeZ5.js} +1 -1
  78. package/dist/client/assets/{index-PTvg3Wun.js → index-CucV4lBd.js} +1 -1
  79. package/dist/client/assets/{index-9smU3vak.js → index-D1Os768e.js} +1 -1
  80. package/dist/client/assets/{index-0FuZBqpL.js → index-D9p0G3vk.js} +1 -1
  81. package/dist/client/assets/{index-CfMT-svD.js → index-DKffdYnU.js} +1 -1
  82. package/dist/client/assets/{index-CsMR0Ypg.js → index-Dk7VTW9z.js} +1 -1
  83. package/dist/client/assets/index-DmW2ChV3.js +1 -0
  84. package/dist/client/assets/{index-s4QTWOmY.js → index-DyLEkJ9h.js} +1 -1
  85. package/dist/client/assets/{index-DHTAzDdj.js → index-fQuO2Dc3.js} +1 -1
  86. package/dist/client/assets/{index-Cs0mksI2.js → index-sxBFqhbB.js} +1 -1
  87. package/dist/client/assets/{infiniteQueryObserver-Djo7_6Dx.js → infiniteQueryObserver-sxIykUWp.js} +1 -1
  88. package/dist/client/assets/{input-BQQp-6KZ.js → input-CZy7VBF-.js} +1 -1
  89. package/dist/client/assets/{integration-icon-Box-itol.js → integration-icon-Cgu3nEbl.js} +1 -1
  90. package/dist/client/assets/{label-DC5mP9Z5.js → label-BhPoqbH1.js} +1 -1
  91. package/dist/client/assets/{layout-DtZHLBeB.js → layout-jAXEQlv4.js} +1 -1
  92. package/dist/client/assets/{lean-canvas-recruit-modal-Drc7dSHp.js → lean-canvas-recruit-modal-Mo-uvZiE.js} +1 -1
  93. package/dist/client/assets/{login-pkkTGCaQ.js → login-BgB-8JX_.js} +1 -1
  94. package/dist/client/assets/{members-CCFl4lVb.js → members-D5i4jyvH.js} +1 -1
  95. package/dist/client/assets/{monaco-editor-Bx4gABcs.js → monaco-editor-D-E1NsT_.js} +1 -1
  96. package/dist/client/assets/{monitoring-stats-row-Bzr2EdBL.js → monitoring-stats-row-CaU12GnW.js} +1 -1
  97. package/dist/client/assets/{oauth-callback-D2WYRLXX.js → oauth-callback-BrTY445n.js} +1 -1
  98. package/dist/client/assets/{oauth-callback-ai-provider-DiQQcEIA.js → oauth-callback-ai-provider-BA8nRDph.js} +1 -1
  99. package/dist/client/assets/{onboarding-C-xes3uo.js → onboarding-CAft2_BY.js} +1 -1
  100. package/dist/client/assets/{org-layout-d5JWtma9.js → org-layout-C0XY3j3w.js} +1 -1
  101. package/dist/client/assets/{org-plugin-layout-_jGAIDyT.js → org-plugin-layout-CiPGTy9y.js} +1 -1
  102. package/dist/client/assets/{pair-C1uVZAxc.js → pair-DyP8v5ZE.js} +1 -1
  103. package/dist/client/assets/{plugin-empty-state-By7qsYCS.js → plugin-empty-state-CPC4iNPZ.js} +1 -1
  104. package/dist/client/assets/{plugin-header-DmxH-nDy.js → plugin-header-BaIUgM8O.js} +1 -1
  105. package/dist/client/assets/{plugin-layout-DHq8VP6I.js → plugin-layout-CP7WeU3S.js} +1 -1
  106. package/dist/client/assets/{popover-BE2Ag2Hj.js → popover-g5bCjakL.js} +1 -1
  107. package/dist/client/assets/{profile-BiAUdeqZ.js → profile-DE9V4UAe.js} +1 -1
  108. package/dist/client/assets/{project-app-view-BWIUYPZS.js → project-app-view-CsUA3eWI.js} +1 -1
  109. package/dist/client/assets/registry-Cth6leQk.js +2 -0
  110. package/dist/client/assets/{registry-layout-D6WP-9Mz.js → registry-layout-IV9o5tdh.js} +1 -1
  111. package/dist/client/assets/{required-auth-layout-78lMndsk.js → required-auth-layout-CbwdpaRZ.js} +1 -1
  112. package/dist/client/assets/{reset-password-LLOtqeM3.js → reset-password-HK92arRg.js} +1 -1
  113. package/dist/client/assets/{roles-CrIxGBCo.js → roles-BWPZWJaM.js} +1 -1
  114. package/dist/client/assets/{scroll-area-BDlizEf_.js → scroll-area-DPp3zriG.js} +1 -1
  115. package/dist/client/assets/{search-input-Ck2WpyGM.js → search-input-DFpePjxv.js} +1 -1
  116. package/dist/client/assets/{select-Bibny-1X.js → select-DNBVly7-.js} +1 -1
  117. package/dist/client/assets/{select-model-CUnmfM2z.js → select-model-DeUWMCqm.js} +1 -1
  118. package/dist/client/assets/settings-layout-D82thllZ.js +1 -0
  119. package/dist/client/assets/{settings-section-BNYaFgEU.js → settings-section-DLmrAiBm.js} +1 -1
  120. package/dist/client/assets/{shell-layout-BKENpmuK.js → shell-layout-R4iIIify.js} +1 -1
  121. package/dist/client/assets/{skeleton-D20a7YZ_.js → skeleton-D3XIs5gC.js} +1 -1
  122. package/dist/client/assets/{sso-BS0m4Gbq.js → sso-DM0bDf34.js} +1 -1
  123. package/dist/client/assets/{store-CxbfCzK1.js → store-DBYsfjv2.js} +1 -1
  124. package/dist/client/assets/store-registry-Be_BNgv2.js +2 -0
  125. package/dist/client/assets/{switch-B5LXqu_k.js → switch-ChHlr-0p.js} +1 -1
  126. package/dist/client/assets/{table-YZX5FqNR.js → table-D-EfNZTA.js} +1 -1
  127. package/dist/client/assets/{tabs-DrXz1mKv.js → tabs-C3Y9bmk3.js} +1 -1
  128. package/dist/client/assets/{task-status-50r4iWhu.js → task-status-Byb391SI.js} +1 -1
  129. package/dist/client/assets/{textarea-B34jNm12.js → textarea-TEFGem1K.js} +1 -1
  130. package/dist/client/assets/{toggle-group-CrVa8CeF.js → toggle-group-DYAaGRJB.js} +1 -1
  131. package/dist/client/assets/{tools-list-DoRhQ4bQ.js → tools-list-DHP55xBU.js} +1 -1
  132. package/dist/client/assets/{tooltip-7fE-WE8n.js → tooltip-DZ4hI4gi.js} +1 -1
  133. package/dist/client/assets/{types-KIGJkxYN.js → types-D599MtjY.js} +1 -1
  134. package/dist/client/assets/{use-ai-providers-BlHdNIJC.js → use-ai-providers-DSutNjVp.js} +1 -1
  135. package/dist/client/assets/{use-collections-BvXCKCPf.js → use-collections-BbQAdI3o.js} +1 -1
  136. package/dist/client/assets/{use-connection-BHzWUZTk.js → use-connection-CrEyI3P_.js} +1 -1
  137. package/dist/client/assets/{use-copy-BM6tbEKn.js → use-copy-Df3K3sfk.js} +1 -1
  138. package/dist/client/assets/{use-create-virtual-mcp-B9su0hdd.js → use-create-virtual-mcp-t8SMbFkV.js} +1 -1
  139. package/dist/client/assets/{use-debounced-autosave-BBrYSIAA.js → use-debounced-autosave-IAh8TU4o.js} +1 -1
  140. package/dist/client/assets/{use-decopilot-events-DUjp4NXe.js → use-decopilot-events-CxAD33F2.js} +1 -1
  141. package/dist/client/assets/{use-delete-connection-D8QH8qmD.js → use-delete-connection-zP-NAmKT.js} +1 -1
  142. package/dist/client/assets/{use-infinite-scroll-nwbx-KTg.js → use-infinite-scroll-hrqUZmbE.js} +1 -1
  143. package/dist/client/assets/{use-list-state-DRAznPzR.js → use-list-state-DsStSeaC.js} +1 -1
  144. package/dist/client/assets/{use-mcp-tools-DkrDenYe.js → use-mcp-tools-kqffQmIa.js} +1 -1
  145. package/dist/client/assets/{use-members-H_2fli-8.js → use-members-BqQiitMx.js} +1 -1
  146. package/dist/client/assets/{use-navigate-to-agent-DM6COLbJ.js → use-navigate-to-agent-DkjTuG5H.js} +1 -1
  147. package/dist/client/assets/{use-org-auth-client-DQZC7OFW.js → use-org-auth-client-DM9zvqH-.js} +1 -1
  148. package/dist/client/assets/{use-org-sso-LaD6hSpN.js → use-org-sso-DFTMWioi.js} +1 -1
  149. package/dist/client/assets/{use-organization-roles-Tf-ts5gx.js → use-organization-roles-CzgnOad2.js} +1 -1
  150. package/dist/client/assets/{use-organization-settings-CXJ-uDFo.js → use-organization-settings-CZnRZbph.js} +1 -1
  151. package/dist/client/assets/{use-registry-connections-BnSuTCtJ.js → use-registry-connections-CT-N1sCh.js} +1 -1
  152. package/dist/client/assets/{use-status-sounds-CW-esQf_.js → use-status-sounds-Bewyc919.js} +1 -1
  153. package/dist/client/assets/{use-tasks-_5SYg2Al.js → use-tasks-9cquzKq3.js} +1 -1
  154. package/dist/client/assets/{use-view-mode-C2T_AD4N.js → use-view-mode-B2bqG4ko.js} +1 -1
  155. package/dist/client/assets/{use-virtual-mcp-Bqk6k6NQ.js → use-virtual-mcp-Bl5HfgtI.js} +1 -1
  156. package/dist/client/assets/useInfiniteQuery-P_vpKUlW.js +1 -0
  157. package/dist/client/assets/useSuspenseInfiniteQuery-CdjREh1b.js +1 -0
  158. package/dist/client/assets/{user-8chVVoiM.js → user-BmqT7ATa.js} +1 -1
  159. package/dist/client/assets/{view-mode-toggle-Dg2K0IHy.js → view-mode-toggle-DdV_2G2i.js} +1 -1
  160. package/dist/client/assets/{workflow-DLu1DTyd.js → workflow-Oj5odTn3.js} +1 -1
  161. package/dist/client/assets/workflow-detail-BT6eq7UZ.js +1 -0
  162. package/dist/client/index.html +1 -1
  163. package/dist/server/cli.js +77 -73
  164. package/dist/server/node_modules/ansi-styles/index.d.ts +236 -0
  165. package/dist/server/node_modules/ansi-styles/index.js +223 -0
  166. package/dist/server/node_modules/ansi-styles/package.json +54 -0
  167. package/dist/server/node_modules/ansi-styles/readme.md +173 -0
  168. package/dist/server/node_modules/onetime/index.d.ts +64 -0
  169. package/dist/server/node_modules/onetime/index.js +44 -0
  170. package/dist/server/node_modules/{mimic-fn → onetime}/package.json +16 -15
  171. package/dist/server/node_modules/onetime/readme.md +94 -0
  172. package/dist/server/server.js +76 -72
  173. package/package.json +1 -1
  174. package/dist/client/assets/ai-providers-v-Xe3QBL.js +0 -1
  175. package/dist/client/assets/index-D9JwUOO_.js +0 -1
  176. package/dist/client/assets/registry-CBHaV5Tp.js +0 -2
  177. package/dist/client/assets/settings-layout-DHrmC_DN.js +0 -1
  178. package/dist/client/assets/store-registry-DaiC69PW.js +0 -2
  179. package/dist/client/assets/useInfiniteQuery-ZZ7aYlwI.js +0 -1
  180. package/dist/client/assets/useSuspenseInfiniteQuery-UOA0UYpI.js +0 -1
  181. package/dist/client/assets/workflow-detail-c0UiiwlM.js +0 -1
  182. package/dist/server/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  183. package/dist/server/node_modules/emoji-regex/README.md +0 -107
  184. package/dist/server/node_modules/emoji-regex/index.d.ts +0 -3
  185. package/dist/server/node_modules/emoji-regex/index.js +0 -4
  186. package/dist/server/node_modules/emoji-regex/index.mjs +0 -4
  187. package/dist/server/node_modules/emoji-regex/package.json +0 -45
  188. package/dist/server/node_modules/get-east-asian-width/index.d.ts +0 -60
  189. package/dist/server/node_modules/get-east-asian-width/index.js +0 -30
  190. package/dist/server/node_modules/get-east-asian-width/lookup-data.js +0 -18
  191. package/dist/server/node_modules/get-east-asian-width/lookup.js +0 -135
  192. package/dist/server/node_modules/get-east-asian-width/package.json +0 -71
  193. package/dist/server/node_modules/get-east-asian-width/readme.md +0 -65
  194. package/dist/server/node_modules/get-east-asian-width/utilities.js +0 -24
  195. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  196. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  197. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  198. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  199. package/dist/server/node_modules/mimic-fn/index.d.ts +0 -54
  200. package/dist/server/node_modules/mimic-fn/index.js +0 -13
  201. package/dist/server/node_modules/mimic-fn/license +0 -9
  202. package/dist/server/node_modules/mimic-fn/readme.md +0 -69
  203. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  204. package/dist/server/node_modules/pg-int8/README.md +0 -16
  205. package/dist/server/node_modules/pg-int8/index.js +0 -100
  206. package/dist/server/node_modules/pg-int8/package.json +0 -24
  207. package/dist/server/node_modules/postgres-array/index.d.ts +0 -4
  208. package/dist/server/node_modules/postgres-array/index.js +0 -97
  209. package/dist/server/node_modules/postgres-array/license +0 -21
  210. package/dist/server/node_modules/postgres-array/package.json +0 -35
  211. package/dist/server/node_modules/postgres-array/readme.md +0 -43
  212. package/dist/server/node_modules/postgres-bytea/index.js +0 -33
  213. package/dist/server/node_modules/postgres-bytea/license +0 -21
  214. package/dist/server/node_modules/postgres-bytea/package.json +0 -34
  215. package/dist/server/node_modules/postgres-bytea/readme.md +0 -34
  216. package/dist/server/node_modules/postgres-date/index.js +0 -116
  217. package/dist/server/node_modules/postgres-date/license +0 -21
  218. package/dist/server/node_modules/postgres-date/package.json +0 -33
  219. package/dist/server/node_modules/postgres-date/readme.md +0 -49
  220. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  221. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  222. package/dist/server/node_modules/postgres-interval/license +0 -21
  223. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  224. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
  225. package/dist/server/node_modules/split2/LICENSE +0 -13
  226. package/dist/server/node_modules/split2/README.md +0 -85
  227. package/dist/server/node_modules/split2/bench.js +0 -27
  228. package/dist/server/node_modules/split2/index.js +0 -141
  229. package/dist/server/node_modules/split2/package.json +0 -39
  230. package/dist/server/node_modules/split2/test.js +0 -409
  231. /package/dist/server/node_modules/{get-east-asian-width → ansi-styles}/license +0 -0
  232. /package/dist/server/node_modules/{is-fullwidth-code-point → onetime}/license +0 -0
@@ -6476,11 +6476,84 @@ if (!store.read()) {
6476
6476
  console.log(\`[daemon] boot_id=\${process.env.DAEMON_BOOT_ID} ready, unclaimed \\u2014 waiting for workload config\`);
6477
6477
  }
6478
6478
  var firstWorkLogged = false;
6479
+ async function configH(req) {
6480
+ const { method } = req;
6481
+ if (method === "GET")
6482
+ return configReadH();
6483
+ if (method === "PUT" || method === "POST") {
6484
+ const res = await configUpdateH(req);
6485
+ if (res.status === 200)
6486
+ markClaimed();
6487
+ return res;
6488
+ }
6489
+ return jsonResponse({ error: "Not found: /_decopilot_vm/config" }, 404);
6490
+ }
6491
+ function tasksRouteH(req, method, vmPath) {
6492
+ if (method === "GET" && vmPath === "/tasks")
6493
+ return tasksListH(req);
6494
+ if (method === "POST" && vmPath === "/tasks/kill-all")
6495
+ return tasksKillAllH();
6496
+ if (method === "GET" && /^\\/tasks\\/[^/]+\\/stream$/.test(vmPath))
6497
+ return tasksStreamH(req);
6498
+ if (method === "POST" && /^\\/tasks\\/[^/]+\\/kill$/.test(vmPath))
6499
+ return tasksKillH(req);
6500
+ if (method === "DELETE" && /^\\/tasks\\/[^/]+$/.test(vmPath))
6501
+ return tasksDeleteH(req);
6502
+ if (method === "GET" && /^\\/tasks\\/[^/]+$/.test(vmPath))
6503
+ return tasksGetH(req);
6504
+ return jsonResponse({ error: \`Not found: /_decopilot_vm\${vmPath}\` }, 404);
6505
+ }
6506
+ function execRouteH(req, vmPath) {
6507
+ if (vmPath.endsWith("/kill")) {
6508
+ const rawName = vmPath.slice("/exec/".length, -"/kill".length);
6509
+ try {
6510
+ const name = decodeURIComponent(rawName);
6511
+ return jsonResponse({
6512
+ killed: taskManager.killByLogName(name, { intentional: true })
6513
+ });
6514
+ } catch {
6515
+ return jsonResponse({ error: "invalid script name" }, 400);
6516
+ }
6517
+ }
6518
+ return execH(req);
6519
+ }
6520
+ var fsH = {
6521
+ "/read": readH,
6522
+ "/write": writeH,
6523
+ "/edit": editH,
6524
+ "/grep": grepH,
6525
+ "/glob": globH,
6526
+ "/write_from_url": writeFromUrlH,
6527
+ "/upload_to_url": uploadToUrlH,
6528
+ "/bash": bashH
6529
+ };
6479
6530
  var CORS_HEADERS = {
6480
6531
  "Access-Control-Allow-Origin": "*",
6481
6532
  "Access-Control-Allow-Methods": "GET, POST, PUT, DELETE",
6482
6533
  "Access-Control-Allow-Headers": "Content-Type, Accept, Cache-Control, Authorization"
6483
6534
  };
6535
+ function vmRouteH(req, method, vmPath) {
6536
+ if (method === "GET" && vmPath === "/idle")
6537
+ return idleH();
6538
+ if (method === "GET" && vmPath === "/events")
6539
+ return eventsH();
6540
+ if (method === "GET" && vmPath === "/scripts")
6541
+ return scriptsHandler();
6542
+ if (method === "OPTIONS")
6543
+ return new Response(null, { status: 204, headers: CORS_HEADERS });
6544
+ const denied = requireToken(req, bootConfig.daemonToken);
6545
+ if (denied)
6546
+ return denied;
6547
+ if (vmPath === "/config")
6548
+ return configH(req);
6549
+ if (vmPath.startsWith("/tasks"))
6550
+ return tasksRouteH(req, method, vmPath);
6551
+ if (method === "POST" && vmPath in fsH)
6552
+ return fsH[vmPath](req);
6553
+ if (method === "POST" && vmPath.startsWith("/exec/"))
6554
+ return execRouteH(req, vmPath);
6555
+ return jsonResponse({ error: \`Not found: /_decopilot_vm\${vmPath}\` }, 404);
6556
+ }
6484
6557
  Bun.serve({
6485
6558
  port: bootConfig.proxyPort,
6486
6559
  hostname: "0.0.0.0",
@@ -6501,78 +6574,9 @@ Bun.serve({
6501
6574
  }
6502
6575
  if (method === "GET" && p === "/health")
6503
6576
  return healthH();
6504
- if (!p.startsWith("/_decopilot_vm/"))
6505
- return proxyH(req);
6506
- const vmPath = p.slice("/_decopilot_vm".length);
6507
- if (method === "GET" && vmPath === "/idle")
6508
- return idleH();
6509
- if (method === "GET" && vmPath === "/events")
6510
- return eventsH();
6511
- if (method === "GET" && vmPath === "/scripts")
6512
- return scriptsHandler();
6513
- if (method === "OPTIONS")
6514
- return new Response(null, { status: 204, headers: CORS_HEADERS });
6515
- const denied = requireToken(req, bootConfig.daemonToken);
6516
- if (denied)
6517
- return denied;
6518
- if (vmPath === "/config") {
6519
- if (method === "GET")
6520
- return configReadH();
6521
- if (method === "PUT" || method === "POST") {
6522
- const res = await configUpdateH(req);
6523
- if (res.status === 200)
6524
- markClaimed();
6525
- return res;
6526
- }
6527
- }
6528
- if (vmPath.startsWith("/tasks")) {
6529
- if (method === "GET" && vmPath === "/tasks")
6530
- return tasksListH(req);
6531
- if (method === "POST" && vmPath === "/tasks/kill-all")
6532
- return tasksKillAllH();
6533
- if (method === "GET" && /^\\/tasks\\/[^/]+\\/stream$/.test(vmPath))
6534
- return tasksStreamH(req);
6535
- if (method === "POST" && /^\\/tasks\\/[^/]+\\/kill$/.test(vmPath))
6536
- return tasksKillH(req);
6537
- if (method === "DELETE" && /^\\/tasks\\/[^/]+$/.test(vmPath))
6538
- return tasksDeleteH(req);
6539
- if (method === "GET" && /^\\/tasks\\/[^/]+$/.test(vmPath))
6540
- return tasksGetH(req);
6541
- }
6542
- if (method === "POST") {
6543
- if (vmPath === "/read")
6544
- return readH(req);
6545
- if (vmPath === "/write")
6546
- return writeH(req);
6547
- if (vmPath === "/edit")
6548
- return editH(req);
6549
- if (vmPath === "/grep")
6550
- return grepH(req);
6551
- if (vmPath === "/glob")
6552
- return globH(req);
6553
- if (vmPath === "/write_from_url")
6554
- return writeFromUrlH(req);
6555
- if (vmPath === "/upload_to_url")
6556
- return uploadToUrlH(req);
6557
- if (vmPath === "/bash")
6558
- return bashH(req);
6559
- if (vmPath.startsWith("/exec/")) {
6560
- if (vmPath.endsWith("/kill")) {
6561
- const rawName = vmPath.slice("/exec/".length, -"/kill".length);
6562
- let name;
6563
- try {
6564
- name = decodeURIComponent(rawName);
6565
- } catch {
6566
- return jsonResponse({ error: "invalid script name" }, 400);
6567
- }
6568
- return jsonResponse({
6569
- killed: taskManager.killByLogName(name, { intentional: true })
6570
- });
6571
- }
6572
- return execH(req);
6573
- }
6574
- }
6575
- return jsonResponse({ error: \`Not found: \${p}\` }, 404);
6577
+ if (p.startsWith("/_decopilot_vm/"))
6578
+ return vmRouteH(req, method, p.slice("/_decopilot_vm".length));
6579
+ return proxyH(req);
6576
6580
  },
6577
6581
  websocket: {
6578
6582
  open: wsProxy.open,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "decocms",
3
- "version": "2.311.9",
3
+ "version": "2.311.10",
4
4
  "description": "Deco CMS — Self-hostable MCP Gateway for managing AI connections and tools",
5
5
  "author": "Deco team",
6
6
  "repository": {
@@ -1 +0,0 @@
1
- import{e as t,j as i}from"./index-B_OOgiEa.js";import{O as m}from"./select-model-CUnmfM2z.js";import"./checkbox-KaNd7DxH.js";import"./Check-B1QjP0lW.js";import"./input-BQQp-6KZ.js";import"./dialog-59APH-gQ.js";import"./X-CuBCe85s.js";import"./drawer-IJtapzyu.js";import"./tooltip-7fE-WE8n.js";import"./select-Bibny-1X.js";import"./ChevronDown-CW5suF8w.js";import"./ChevronUp-D9vKVRMW.js";import"./skeleton-D20a7YZ_.js";import"./Tool01-CBOCDbIq.js";import"./RefreshCcw01-Bv9_h0OY.js";import"./SearchMd-DENJ3C2Y.js";import"./Settings02-B4xVAQg7.js";import"./use-ai-providers-BlHdNIJC.js";import"./constants-D5Po9Lb5.js";import"./chat-context-C_Gvp66M.js";import"./use-virtual-mcp-Bqk6k6NQ.js";import"./use-collections-BvXCKCPf.js";import"./use-decopilot-events-DUjp4NXe.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-_5SYg2Al.js";import"./use-organization-settings-CXJ-uDFo.js";import"./ai-providers-logos-DD3qZ33J.js";import"./Zap-BBT7v7w5.js";import"./use-debounced-autosave-BBrYSIAA.js";import"./AlertCircle-DenZ2tH1.js";import"./CheckCircle-uoVBaQQY.js";import"./Trash01-CqvPY4I1.js";import"./index-B9Elrkih.js";import"./settings-section-BNYaFgEU.js";import"./card-DF88hzU1.js";import"./ArrowUpRight-DQA2yLzS.js";import"./switch-B5LXqu_k.js";import"./toggle-group-CrVa8CeF.js";import"./avatar-aIgMbJGD.js";import"./User01-DcOBCx9n.js";import"./alert-dialog-DbOFkimV.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";function V(){const o=t.c(1);let r;return o[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx(m,{}),o[0]=r):r=o[0],r}export{V as default};
@@ -1 +0,0 @@
1
- import{e as C,s as pe,f as ve,U as It,g as We,d as qe,W as ys,X as _s,Y as Ss,j as n,Z as Cs,c as J,t as se,r as b,$ as Mt,a0 as $t,H as Ns,J as ks,C as ws,z as Is,a as Ms,B as et,b as Se,a1 as $s,P as Tt,x as je,a2 as Ts,a3 as As,o as Re,a4 as Ps,a5 as Os,a6 as zs,a7 as Rs,a8 as Oe,a9 as Es,aa as Ds,ab as Ls,ac as Fs,ad as At,ae as Us,af as Gs,ag as Bs,ah as Hs,ai as Vs,aj as Ks,ak as Ws,al as qs,am as Qs,an as Ys,ao as Ee,L as Xs,E as it,K as Pt}from"./index-B_OOgiEa.js";import{p as Js,g as Zs,C as en,D as mt,E as ft,F as tn,G as xt,H as sn,A as Pe,k as nn,I as on,J as rn}from"./agent-icon-aCG4rJO5.js";import{i as ln,f as De,g as Le,h as ge,u as Qe,j as he,k as ie,l as Ot,m as zt,n as an,o as Rt,p as Et}from"./index-B9Elrkih.js";import{u as Dt,r as Lt}from"./shell-layout-BKENpmuK.js";import{f as cn,g as dn,h as un}from"./pair-C1uVZAxc.js";import{S as Ve}from"./skeleton-D20a7YZ_.js";import{b as lt,P as at,a as ct}from"./popover-BE2Ag2Hj.js";import{b as Ft,a as Ut,D as Gt}from"./drawer-IJtapzyu.js";import{A as pt}from"./avatar-aIgMbJGD.js";import{u as Bt,a as tt,b as st,c as ht,T as nt}from"./tooltip-7fE-WE8n.js";import{i as Ht}from"./Check-B1QjP0lW.js";import{c as gt,a as mn,e as fn}from"./XCircle-CwRlSPkG.js";import{i as xn,b as pn,a as hn}from"./ZapSquare-q2bTQS4w.js";import{n as gn,a as bn,i as jn}from"./Sun-jOb3MXPJ.js";import{s as Ke}from"./Plus-BdkW25go.js";import{a as Ye}from"./Settings02-B4xVAQg7.js";import{i as vn}from"./Shield01-CISf8vls.js";import{a as Vt}from"./Users03-l6fjto8R.js";import{f as yn,a as _n,b as Sn,c as Cn,d as Nn,e as kn,A as wn}from"./alert-dialog-DbOFkimV.js";import{F as In,a as Mn,b as $n,c as Tn,d as An,e as Pn,f as On}from"./form-DZNe3M-o.js";import{I as zn}from"./input-BQQp-6KZ.js";import{S as Rn}from"./index-B2WBo1WB.js";import"./index-0FuZBqpL.js";import{s as En}from"./XClose-BYpD-FW2.js";import{S as Kt,u as Wt,W as ze,i as Dn,b as Ln}from"./constants-D5Po9Lb5.js";import{u as Fn}from"./use-mcp-tools-DkrDenYe.js";import{u as Un}from"./use-ai-providers-BlHdNIJC.js";import{A as Gn,b as Bn,c as Hn,d as Vn,e as Kn,C as Wn}from"./index-Cs0mksI2.js";import{u as qn,a as bt,K as Qn,P as Yn,S as Xn,v as Jn,D as Zn,c as eo,s as to,b as so,d as no,C as oo,e as ro}from"./collection-search-B_uLWogM.js";import{i as jt}from"./X-CuBCe85s.js";import{b as qt,u as Qt}from"./use-virtual-mcp-Bqk6k6NQ.js";import{u as Yt,a as io}from"./use-navigate-to-agent-DM6COLbJ.js";import{u as lo}from"./use-create-virtual-mcp-B9su0hdd.js";import{I as ao,a as co,S as uo,L as mo,b as fo,G as xo}from"./lean-canvas-recruit-modal-Drc7dSHp.js";import{u as Xt}from"./use-tasks-_5SYg2Al.js";import{e as ot,f as po}from"./chat-context-C_Gvp66M.js";import{i as ho}from"./ChevronRight-C75N1vRO.js";import{E as go}from"./empty-state-i6xsv-YS.js";import{u as bo}from"./use-decopilot-events-DUjp4NXe.js";import{g as Jt,a as vt,b as yt,h as _t,D as St}from"./dropdown-menu-B2SzMipC.js";import{i as jo}from"./Archive-CUyKZVLi.js";import{i as vo}from"./Zap-BBT7v7w5.js";import{g as yo}from"./task-status-50r4iWhu.js";function Zt(){const t=C.c(77),{org:e}=pe(),s=ve(),o=It(),{setTasksOpen:r,openTab:i}=Dt(),l=e.slug,a=pe().project;let c;t[0]===Symbol.for("react.memo_cache_sentinel")?(c={strict:!1},t[0]=c):c=t[0];const u=We(c);let d;t[1]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},t[1]=d):d=t[1];const m=qe(d),f=o.location.pathname;let x;t[2]!==a.enabledPlugins?(x=a.enabledPlugins??[],t[2]=a.enabledPlugins,t[3]=x):x=t[3];const p=x;let j;t[4]!==a.ui?(j=a.ui?.pinnedViews??[],t[4]=a.ui,t[5]=j):j=t[5];const I=j;let g,k,h,S;if(t[6]!==a.id||t[7]!==p||t[8]!==s||t[9]!==l||t[10]!==u.pluginId||t[11]!==u.taskId||t[12]!==m.virtualmcpid){let N;t[17]!==p?(N=X=>p.includes(X.pluginId),t[17]=p,t[18]=N):N=t[18];const K=ys.filter(N),W=m.virtualmcpid??a.id;k=!!m.virtualmcpid;const G=u.taskId??"",Y=u.pluginId;let ee;t[19]!==Y?(ee=X=>Y===X,t[19]=Y,t[20]=ee):ee=t[20],g=ee;let Z;t[21]!==G||t[22]!==s||t[23]!==l||t[24]!==W?(Z=X=>{const oe=G||crypto.randomUUID();s({to:"/$org/$taskId/$pluginId",params:{org:l,taskId:oe,pluginId:X},search:ae=>({...ae,virtualmcpid:W})})},t[21]=G,t[22]=s,t[23]=l,t[24]=W,t[25]=Z):Z=t[25],h=Z;let ne;t[26]!==g||t[27]!==h?(ne=X=>({key:X.pluginId,label:X.label,icon:X.icon,isActive:g(X.pluginId),onClick:()=>h(X.pluginId)}),t[26]=g,t[27]=h,t[28]=ne):ne=t[28],S=K.map(ne),t[6]=a.id,t[7]=p,t[8]=s,t[9]=l,t[10]=u.pluginId,t[11]=u.taskId,t[12]=m.virtualmcpid,t[13]=g,t[14]=k,t[15]=h,t[16]=S}else g=t[13],k=t[14],h=t[15],S=t[16];const y=S;let v;if(t[29]!==p||t[30]!==g||t[31]!==h){let N;t[33]!==p?(N=G=>p.includes(G.pluginId),t[33]=p,t[34]=N):N=t[34];const K=_s.filter(N);let W;t[35]!==g||t[36]!==h?(W=G=>({type:"group",group:{id:`${G.pluginId}-${G.id}`,label:G.label,items:G.items.map((Y,ee)=>({key:`${G.pluginId}-${G.id}-${ee}`,label:Y.label,icon:Y.icon,isActive:g(G.pluginId),onClick:()=>h(G.pluginId)})),defaultExpanded:G.defaultExpanded??!0}}),t[35]=g,t[36]=h,t[37]=W):W=t[37],v=K.map(W),t[29]=p,t[30]=g,t[31]=h,t[32]=v}else v=t[32];const _=v;let M;if(t[38]!==i||t[39]!==I){let N;t[41]!==i?(N=K=>{const W=Js(K.icon),G=W.type==="icon"?Zs(W.name):null;return{key:`app-${K.connectionId}-${K.toolName}`,label:K.label||K.toolName,icon:G?n.jsx(G,{size:16,className:"text-muted-foreground"}):W.type==="url"?n.jsx("img",{src:W.url,alt:"",className:"size-4 rounded"}):n.jsx(ln,{size:16,className:"text-muted-foreground"}),isActive:!1,onClick:()=>i(cn(K.connectionId,K.toolName))}},t[41]=i,t[42]=N):N=t[42],M=I.map(N),t[38]=i,t[39]=I,t[40]=M}else M=t[40];const D=M;let w;t[43]!==D?(w=D.length>0?{type:"group",group:{id:"apps",label:"Apps",items:D,defaultExpanded:!0}}:null,t[43]=D,t[44]=w):w=t[44];const $=w;let O;t[45]===Symbol.for("react.memo_cache_sentinel")?(O=n.jsx(en,{className:"size-4!"}),t[45]=O):O=t[45];const T=f===`/${l}`||f===`/${l}/`;let A;t[46]!==s||t[47]!==l||t[48]!==r?(A=()=>{r(!1),s({to:"/$org",params:{org:l}})},t[46]=s,t[47]=l,t[48]=r,t[49]=A):A=t[49];let P;t[50]!==A||t[51]!==T?(P={key:"home",label:"Home",icon:O,isActive:T,onClick:A},t[50]=A,t[51]=T,t[52]=P):P=t[52];const z=P;let L;t[53]!==p?(L=p.includes(Ss),t[53]=p,t[54]=L):L=t[54];const R=L;let B;t[55]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(Cs,{className:"size-4!"}),t[55]=B):B=t[55];let U;t[56]!==l||t[57]!==f?(U=f.startsWith(`/${l}/settings/workflows`),t[56]=l,t[57]=f,t[58]=U):U=t[58];let F;t[59]!==s||t[60]!==l?(F=()=>s({to:"/$org/settings/workflows",params:{org:l}}),t[59]=s,t[60]=l,t[61]=F):F=t[61];let H;t[62]!==U||t[63]!==F?(H={key:"workflows",label:"Workflows",icon:B,isActive:U,onClick:F},t[62]=U,t[63]=F,t[64]=H):H=t[64];const V=H;let q;if(t[65]!==z||t[66]!==k||t[67]!==R||t[68]!==V){const N=[z];k&&R&&N.push(V),q={type:"items",items:N},t[65]=z,t[66]=k,t[67]=R,t[68]=V,t[69]=q}else q=t[69];let Q;if(t[70]!==$||t[71]!==_||t[72]!==y||t[73]!==q){if(Q=[q],y.length>0){let N;t[75]!==y?(N={type:"items",items:y},t[75]=y,t[76]=N):N=t[76],Q.push(N)}_.length>0&&Q.push(..._),$&&Q.push($),t[70]=$,t[71]=_,t[72]=y,t[73]=q,t[74]=Q}else Q=t[74];return Q}function es(t){const e=C.c(3),{children:s}=t;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex h-6 items-center",children:n.jsx("div",{className:"h-0.5 w-16 rounded-full bg-sidebar-foreground/15"})}),e[0]=o):o=e[0];let r;return e[1]!==s?(r=n.jsxs(De,{className:"pt-0 pr-0 pb-2 pl-0 mt-2",children:[o,n.jsx(Le,{children:n.jsx(ge,{className:"gap-0.5",children:s})})]}),e[1]=s,e[2]=r):r=e[2],r}function _o(){const t=C.c(7),s=Mt().logo??$t,o=typeof s=="string"?s:s.light,r=typeof s=="string"?s:s.dark;let i;t[0]!==o?(i=n.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=i):i=t[1];let l;t[2]!==r?(l=n.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=r,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=n.jsx(Rt,{className:"flex items-center justify-center shrink-0 px-2 pb-0",children:n.jsxs("div",{className:"flex w-full aspect-square items-center justify-center",children:[i,l]})}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function ts(t){const e=C.c(15),{item:s}=t,{isMobile:o,setOpenMobile:r}=Qe();let i;e[0]!==o||e[1]!==s||e[2]!==r?(i=()=>{se("nav_item_clicked",{nav_key:s.key,nav_label:s.label,is_active:!!s.isActive,is_mobile:o}),s.onClick?.(),o&&r(!1)},e[0]=o,e[1]=s,e[2]=r,e[3]=i):i=e[3];const l=i,a=s.key,c=s.isActive&&"z-10";let u;e[4]!==c?(u=J(c),e[4]=c,e[5]=u):u=e[5];let d;e[6]!==l||e[7]!==s.icon||e[8]!==s.isActive||e[9]!==s.label?(d=n.jsx(he,{onClick:l,isActive:s.isActive,tooltip:s.label,className:"bg-muted/75",children:s.icon}),e[6]=l,e[7]=s.icon,e[8]=s.isActive,e[9]=s.label,e[10]=d):d=e[10];let m;return e[11]!==s.key||e[12]!==u||e[13]!==d?(m=n.jsx(ie,{className:u,children:d},a),e[11]=s.key,e[12]=u,e[13]=d,e[14]=m):m=e[14],m}function So(t){const e=C.c(12),{section:s}=t;switch(s.type){case"divider":{let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ot,{className:"my-2"}),e[0]=o):o=e[0],o}case"spacer":{let o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("div",{className:"flex-1"}),e[1]=o):o=e[1],o}case"group":{const o=s.group.label,r=s.group.defaultExpanded;let i;e[2]!==s.group.items?(i=s.group.items.map(No),e[2]=s.group.items,e[3]=i):i=e[3];let l;return e[4]!==s.group.defaultExpanded||e[5]!==s.group.label||e[6]!==i?(l=n.jsx(es,{label:o,defaultExpanded:r,children:i}),e[4]=s.group.defaultExpanded,e[5]=s.group.label,e[6]=i,e[7]=l):l=e[7],l}case"items":{let o;e[8]!==s.items?(o=s.items.map(Co),e[8]=s.items,e[9]=o):o=e[9];let r;return e[10]!==o?(r=n.jsx(De,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-1.5",children:o})})}),e[10]=o,e[11]=r):r=e[11],r}}}function Co(t){return n.jsx(ts,{item:t},t.key)}function No(t){return n.jsx(ts,{item:t},t.key)}function ko(t){const e=C.c(14),{sections:s,header:o,footer:r,additionalContent:i,variant:l,contentClassName:a}=t,c=l===void 0?"sidebar":l;let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"h-10 shrink-0"}),children:n.jsx(_o,{})}),e[0]=u):u=e[0];let d;e[1]!==a?(d=J("flex flex-col flex-1 px-2 py-2 gap-0",a),e[1]=a,e[2]=d):d=e[2];let m;e[3]!==s?(m=s.map(wo),e[3]=s,e[4]=m):m=e[4];let f;e[5]!==i||e[6]!==d||e[7]!==m?(f=n.jsxs(zt,{className:d,children:[m,i]}),e[5]=i,e[6]=d,e[7]=m,e[8]=f):f=e[8];let x;return e[9]!==r||e[10]!==o||e[11]!==f||e[12]!==c?(x=n.jsxs(an,{variant:c,children:[u,o,f,r]}),e[9]=r,e[10]=o,e[11]=f,e[12]=c,e[13]=x):x=e[13],x}function wo(t,e){return n.jsx(So,{section:t},e)}function ss(t){const e=C.c(2);let s;return e[0]!==t?(s=n.jsx(ko,{...t}),e[0]=t,e[1]=s):s=e[1],s}ss.Skeleton=function(){return n.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,s)=>n.jsx("div",{className:"w-full h-8",children:n.jsx(Ve,{className:"h-full bg-sidebar-accent rounded-md"})},s))})};function Io(){const t=C.c(7),s=Mt().logo??$t,o=typeof s=="string"?s:s.light,r=typeof s=="string"?s:s.dark;let i;t[0]!==o?(i=n.jsx("img",{src:o,alt:"Logo",className:"size-6 object-contain dark:hidden"}),t[0]=o,t[1]=i):i=t[1];let l;t[2]!==r?(l=n.jsx("img",{src:r,alt:"Logo",className:"size-6 object-contain hidden dark:block"}),t[2]=r,t[3]=l):l=t[3];let a;return t[4]!==i||t[5]!==l?(a=n.jsx(Rt,{className:"flex items-center justify-center shrink-0 px-2 pb-0",children:n.jsxs("div",{className:"flex w-full aspect-square items-center justify-center",children:[i,l]})}),t[4]=i,t[5]=l,t[6]=a):a=t[6],a}function Ct(t){const e=C.c(15),{item:s,onClose:o}=t,r=s.isActive&&"z-10";let i;e[0]!==r?(i=J(r),e[0]=r,e[1]=i):i=e[1];let l;e[2]!==s||e[3]!==o?(l=()=>{s.onClick?.(),o()},e[2]=s,e[3]=o,e[4]=l):l=e[4];let a;e[5]!==s.icon?(a=n.jsx("span",{className:"[&>svg]:size-8",children:s.icon}),e[5]=s.icon,e[6]=a):a=e[6];let c;e[7]!==s.isActive||e[8]!==s.label||e[9]!==l||e[10]!==a?(c=n.jsx(he,{onClick:l,isActive:s.isActive,tooltip:s.label,className:"bg-muted/75",children:a}),e[7]=s.isActive,e[8]=s.label,e[9]=l,e[10]=a,e[11]=c):c=e[11];let u;return e[12]!==i||e[13]!==c?(u=n.jsx(ie,{className:i,children:c}),e[12]=i,e[13]=c,e[14]=u):u=e[14],u}function Mo(t){const e=C.c(18),{section:s,onClose:o}=t;switch(s.type){case"divider":{let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ot,{className:"my-2"}),e[0]=r):r=e[0],r}case"spacer":{let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx("div",{className:"flex-1"}),e[1]=r):r=e[1],r}case"group":{const r=s.group.label,i=s.group.defaultExpanded;let l;if(e[2]!==o||e[3]!==s.group.items){let c;e[5]!==o?(c=u=>n.jsx(Ct,{item:u,onClose:o},u.key),e[5]=o,e[6]=c):c=e[6],l=s.group.items.map(c),e[2]=o,e[3]=s.group.items,e[4]=l}else l=e[4];let a;return e[7]!==s.group.defaultExpanded||e[8]!==s.group.label||e[9]!==l?(a=n.jsx(es,{label:r,defaultExpanded:i,children:l}),e[7]=s.group.defaultExpanded,e[8]=s.group.label,e[9]=l,e[10]=a):a=e[10],a}case"items":{let r;if(e[11]!==o||e[12]!==s.items){let l;e[14]!==o?(l=a=>n.jsx(Ct,{item:a,onClose:o},a.key),e[14]=o,e[15]=l):l=e[15],r=s.items.map(l),e[11]=o,e[12]=s.items,e[13]=r}else r=e[13];let i;return e[16]!==r?(i=n.jsx(De,{className:"pt-0 pr-0 pb-0 pl-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-1.5",children:r})})}),e[16]=r,e[17]=i):i=e[17],i}}}function $o(t){const e=C.c(12),{sections:s,onClose:o,footer:r,additionalContent:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"h-10 shrink-0"}),children:n.jsx(Io,{})}),e[0]=l):l=e[0];let a;if(e[1]!==o||e[2]!==s){let d;e[4]!==o?(d=(m,f)=>n.jsx(Mo,{section:m,onClose:o},f),e[4]=o,e[5]=d):d=e[5],a=s.map(d),e[1]=o,e[2]=s,e[3]=a}else a=e[3];let c;e[6]!==i||e[7]!==a?(c=n.jsxs(zt,{className:"flex flex-col flex-1 px-2 py-2 gap-0",children:[a,i]}),e[6]=i,e[7]=a,e[8]=c):c=e[8];let u;return e[9]!==r||e[10]!==c?(u=n.jsxs("div",{className:"bg-sidebar flex h-full w-full flex-col","data-sidebar":"sidebar",children:[l,c,r]}),e[9]=r,e[10]=c,e[11]=u):u=e[11],u}function ns(t){return t.toLowerCase().trim().replace(/[^a-z0-9\s_-]+/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const To=Ns({name:ks().min(2,"Organization name is required")});function Ao(t){const e=C.c(41),{open:s,onOpenChange:o}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={resolver:ws(To),defaultValues:{name:""}},e[0]=r):r=e[0];const i=Is(r);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={mutationFn:Oo,onSuccess:Po},e[1]=l):l=e[1];const a=Ms(l),c=a.error instanceof Error?a.error.message:a.error?"Failed to create organization.":null;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsxs(Sn,{children:[n.jsx(Cn,{children:"Create a new organization"}),n.jsx(Nn,{children:"Set up a new organization to collaborate with others."})]}),e[2]=u):u=e[2];let d;if(e[3]!==a||e[4]!==i){let _;e[6]!==a?(_=M=>a.mutateAsync(M),e[6]=a,e[7]=_):_=e[7],d=i.handleSubmit(_),e[3]=a,e[4]=i,e[5]=d}else d=e[5];let m;e[8]!==i.formState.isSubmitting?(m=_=>{const{field:M}=_;return n.jsxs($n,{children:[n.jsx(Tn,{children:"Organization Name"}),n.jsx(An,{children:n.jsx(zn,{...M,placeholder:"Acme Inc.",disabled:i.formState.isSubmitting})}),n.jsx(Pn,{children:"The name of your company or organization"}),M.value&&n.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["Organization URL:"," ",n.jsxs("span",{className:"font-mono",children:[typeof window<"u"?globalThis.location.origin:"","/",ns(M.value)]})]}),n.jsx(On,{})]})},e[8]=i.formState.isSubmitting,e[9]=m):m=e[9];let f;e[10]!==i.control||e[11]!==m?(f=n.jsx(In,{control:i.control,name:"name",render:m}),e[10]=i.control,e[11]=m,e[12]=f):f=e[12];let x;e[13]!==c?(x=c&&n.jsx("div",{className:"text-destructive text-sm mt-2",children:c}),e[13]=c,e[14]=x):x=e[14];let p;e[15]!==a||e[16]!==i?(p=()=>{a.reset(),i.reset()},e[15]=a,e[16]=i,e[17]=p):p=e[17];let j;e[18]!==i.formState.isSubmitting||e[19]!==p?(j=n.jsx(yn,{disabled:i.formState.isSubmitting,onClick:p,children:"Cancel"}),e[18]=i.formState.isSubmitting,e[19]=p,e[20]=j):j=e[20];const I=!i.formState.isValid||i.formState.isSubmitting;let g;e[21]!==i.formState.isSubmitting?(g=i.formState.isSubmitting?n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Rn,{size:"xs"})," Creating..."]}):"Create Organization",e[21]=i.formState.isSubmitting,e[22]=g):g=e[22];let k;e[23]!==I||e[24]!==g?(k=n.jsx(et,{type:"submit",variant:"default",disabled:I,children:g}),e[23]=I,e[24]=g,e[25]=k):k=e[25];let h;e[26]!==k||e[27]!==j?(h=n.jsxs(kn,{children:[j,k]}),e[26]=k,e[27]=j,e[28]=h):h=e[28];let S;e[29]!==h||e[30]!==d||e[31]!==f||e[32]!==x?(S=n.jsxs("form",{className:"space-y-6",onSubmit:d,autoComplete:"off",children:[f,x,h]}),e[29]=h,e[30]=d,e[31]=f,e[32]=x,e[33]=S):S=e[33];let y;e[34]!==i||e[35]!==S?(y=n.jsxs(_n,{children:[u,n.jsx(Mn,{...i,children:S})]}),e[34]=i,e[35]=S,e[36]=y):y=e[36];let v;return e[37]!==o||e[38]!==s||e[39]!==y?(v=n.jsx(wn,{open:s,onOpenChange:o,children:y}),e[37]=o,e[38]=s,e[39]=y,e[40]=v):v=e[40],v}function Po(t){const{orgSlug:e}=t;window.location.href=`/${e}`}async function Oo(t){const e=ns(t.name);if(!e)throw new Error("Organization slug is invalid");const s=await Se.organization.create({name:t.name,slug:e});if(s?.error)throw new Error(s.error.message||"Failed to create organization");const o=s?.data?.slug??e;if(!o)throw new Error("Failed to create organization");return{orgSlug:o}}function rt(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);const s=Math.abs(e)%360;return{backgroundColor:`hsl(${s} 55% 70%)`,color:`hsl(${s} 55% 20%)`}}function zo(t){const e=C.c(13),{org:s,size:o}=t,r=o===void 0?"sm":o,i=r==="xs"?"size-5":"size-6",l=r==="xs"?"text-[9px]":"text-xs";let a;e[0]!==i?(a=J(i,"shrink-0 rounded-md flex items-center justify-center border border-border/50 overflow-hidden"),e[0]=i,e[1]=a):a=e[1];let c;e[2]!==s.logo||e[3]!==s.name?(c=s.logo?void 0:rt(s.name),e[2]=s.logo,e[3]=s.name,e[4]=c):c=e[4];let u;e[5]!==s.logo||e[6]!==s.name||e[7]!==l?(u=s.logo?n.jsx("img",{src:s.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:J("font-semibold leading-none",l),children:s.name.slice(0,2).toUpperCase()}),e[5]=s.logo,e[6]=s.name,e[7]=l,e[8]=u):u=e[8];let d;return e[9]!==a||e[10]!==c||e[11]!==u?(d=n.jsx("div",{className:a,style:c,children:u}),e[9]=a,e[10]=c,e[11]=u,e[12]=d):d=e[12],d}function Be(t){const e=C.c(22),{item:s,onClose:o}=t;if(s.href){const c=s.external?"_blank":void 0,u=s.external?"noopener noreferrer":void 0;let d;e[0]!==s.icon?(d=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[0]=s.icon,e[1]=d):d=e[1];let m;e[2]!==s.label?(m=n.jsx("span",{className:"flex-1",children:s.label}),e[2]=s.label,e[3]=m):m=e[3];let f;return e[4]!==s.href||e[5]!==o||e[6]!==c||e[7]!==u||e[8]!==d||e[9]!==m?(f=n.jsxs("a",{href:s.href,target:c,rel:u,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",onClick:o,children:[d,m]}),e[4]=s.href,e[5]=o,e[6]=c,e[7]=u,e[8]=d,e[9]=m,e[10]=f):f=e[10],f}let r;e[11]!==s||e[12]!==o?(r=()=>{s.onClick?.(),o()},e[11]=s,e[12]=o,e[13]=r):r=e[13];let i;e[14]!==s.icon?(i=n.jsx("span",{className:"shrink-0 text-muted-foreground",children:s.icon}),e[14]=s.icon,e[15]=i):i=e[15];let l;e[16]!==s.label?(l=n.jsx("span",{className:"flex-1",children:s.label}),e[16]=s.label,e[17]=l):l=e[17];let a;return e[18]!==r||e[19]!==i||e[20]!==l?(a=n.jsxs("button",{type:"button",onClick:r,className:"flex items-center gap-2.5 px-3 py-2 rounded-md text-sm text-left w-full transition-colors text-foreground/80 hover:bg-sidebar-accent hover:text-foreground",children:[i,l]}),e[18]=r,e[19]=i,e[20]=l,e[21]=a):a=e[21],a}function Nt(t){const e=C.c(16),{sortedOrgs:s,orgParam:o,onSelectOrg:r,onCreateOrg:i}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=n.jsx("span",{className:"text-sm font-medium text-muted-foreground/60",children:"Your Organizations"}),e[0]=l):l=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(Ke,{size:16}),e[1]=a):a=e[1];let c;e[2]!==i?(c=n.jsxs("div",{className:"flex items-center justify-between px-4 py-3",children:[l,n.jsx("button",{type:"button",onClick:i,className:"flex items-center justify-center size-7 rounded-md text-muted-foreground hover:bg-accent/50 hover:text-foreground transition-colors",children:a})]}),e[2]=i,e[3]=c):c=e[3];let u;if(e[4]!==r||e[5]!==o||e[6]!==s){let f;e[8]!==r||e[9]!==o?(f=x=>n.jsxs("button",{type:"button",onClick:()=>r(x.slug),className:J("flex items-center gap-3 px-3 py-2.5 rounded-md text-sm text-left w-full transition-colors",x.slug===o?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/50"),children:[n.jsx(zo,{org:x,size:"sm"}),n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-sm font-medium truncate",children:x.name}),n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:x.slug})]}),x.slug===o&&n.jsx(Ht,{size:14,className:"ml-auto text-muted-foreground shrink-0"})]},x.id),e[8]=r,e[9]=o,e[10]=f):f=e[10],u=s.map(f),e[4]=r,e[5]=o,e[6]=s,e[7]=u}else u=e[7];let d;e[11]!==u?(d=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto p-1.5 flex flex-col gap-1",children:u}),e[11]=u,e[12]=d):d=e[12];let m;return e[13]!==c||e[14]!==d?(m=n.jsxs(n.Fragment,{children:[c,d]}),e[13]=c,e[14]=d,e[15]=m):m=e[15],m}function kt(t){const e=C.c(142),{user:s,userImage:o,menuItems:r,signOutItem:i,themeOptions:l,preferences:a,setPreferences:c,sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f,close:x,isMobile:p}=t;if(p){const G=s?.name??"U";let Y;e[0]!==G||e[1]!==o?(Y=n.jsx(pt,{url:o,fallback:G,shape:"circle",size:"sm",className:"shrink-0"}),e[0]=G,e[1]=o,e[2]=Y):Y=e[2];const ee=s?.name??"User";let Z;e[3]!==ee?(Z=n.jsx("p",{className:"text-sm font-medium truncate",children:ee}),e[3]=ee,e[4]=Z):Z=e[4];const ne=s?.email;let X;e[5]!==ne?(X=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:ne}),e[5]=ne,e[6]=X):X=e[6];let oe;e[7]!==Z||e[8]!==X?(oe=n.jsxs("div",{className:"flex-1 min-w-0",children:[Z,X]}),e[7]=Z,e[8]=X,e[9]=oe):oe=e[9];let ae;e[10]!==s?(ae=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(Lo)},e[10]=s,e[11]=ae):ae=e[11];let Ne;e[12]===Symbol.for("react.memo_cache_sentinel")?(Ne=n.jsx(gt,{size:14}),e[12]=Ne):Ne=e[12];let ce;e[13]!==ae?(ce=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:ae,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:Ne})}),e[13]=ae,e[14]=ce):ce=e[14];let ye;e[15]===Symbol.for("react.memo_cache_sentinel")?(ye=n.jsx(st,{side:"right",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[15]=ye):ye=e[15];let _e;e[16]!==ce?(_e=n.jsx(ht,{delayDuration:300,children:n.jsxs(nt,{children:[ce,ye]})}),e[16]=ce,e[17]=_e):_e=e[17];let re;e[18]!==_e||e[19]!==Y||e[20]!==oe?(re=n.jsxs("div",{className:"flex items-center gap-3 px-4 py-4 border-b border-border",children:[Y,oe,_e]}),e[18]=_e,e[19]=Y,e[20]=oe,e[21]=re):re=e[21];let de;e[22]!==f||e[23]!==m||e[24]!==d||e[25]!==u?(de=n.jsx("div",{className:"border-b border-border pb-2",children:n.jsx(Nt,{sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f})}),e[22]=f,e[23]=m,e[24]=d,e[25]=u,e[26]=de):de=e[26];let ue;if(e[27]!==x||e[28]!==r){let be;e[30]!==x?(be=Ge=>n.jsx(Be,{item:Ge,onClose:x},Ge.key),e[30]=x,e[31]=be):be=e[31],ue=r.map(be),e[27]=x,e[28]=r,e[29]=ue}else ue=e[29];let me;e[32]!==x||e[33]!==i?(me=n.jsx(Be,{item:i,onClose:x}),e[32]=x,e[33]=i,e[34]=me):me=e[34];let fe;e[35]!==ue||e[36]!==me?(fe=n.jsxs("nav",{className:"flex flex-col px-2 pt-2 pb-2 gap-0.5",children:[ue,me]}),e[35]=ue,e[36]=me,e[37]=fe):fe=e[37];let xe;e[38]!==de||e[39]!==fe?(xe=n.jsxs("div",{className:"flex-1 min-h-0 overflow-y-auto",children:[de,fe]}),e[38]=de,e[39]=fe,e[40]=xe):xe=e[40];let E;if(e[41]!==a.theme||e[42]!==c||e[43]!==l){let be;e[45]!==a.theme||e[46]!==c?(be=Ge=>{const{value:Ze,icon:bs,label:js}=Ge;return n.jsx("button",{type:"button","aria-label":js,onClick:()=>c(vs=>({...vs,theme:Ze})),className:J("size-8 rounded-md flex items-center justify-center transition-colors",a.theme===Ze?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:bs},Ze)},e[45]=a.theme,e[46]=c,e[47]=be):be=e[47],E=l.map(be),e[41]=a.theme,e[42]=c,e[43]=l,e[44]=E}else E=e[44];let ke;e[48]!==E?(ke=n.jsx("div",{className:"flex items-center gap-0.5",children:E}),e[48]=E,e[49]=ke):ke=e[49];const Xe=a.enableSounds?"Disable sounds":"Enable sounds";let we;e[50]!==c?(we=()=>c(Do),e[50]=c,e[51]=we):we=e[51];const Je=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let Ie;e[52]!==Je?(Ie=J("size-8 rounded-md flex items-center justify-center transition-colors",Je),e[52]=Je,e[53]=Ie):Ie=e[53];let Me;e[54]!==a.enableSounds?(Me=a.enableSounds?n.jsx(mt,{size:14}):n.jsx(ft,{size:14}),e[54]=a.enableSounds,e[55]=Me):Me=e[55];let $e;e[56]!==Xe||e[57]!==we||e[58]!==Ie||e[59]!==Me?($e=n.jsx("button",{type:"button","aria-label":Xe,onClick:we,className:Ie,children:Me}),e[56]=Xe,e[57]=we,e[58]=Ie,e[59]=Me,e[60]=$e):$e=e[60];let Fe;e[61]===Symbol.for("react.memo_cache_sentinel")?(Fe=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.311.9"]}),e[61]=Fe):Fe=e[61];let Te;e[62]!==$e?(Te=n.jsxs("div",{className:"flex items-center gap-2",children:[$e,Fe]}),e[62]=$e,e[63]=Te):Te=e[63];let Ae;e[64]!==ke||e[65]!==Te?(Ae=n.jsxs("div",{className:"flex items-center justify-between px-3 py-3 border-t border-border/50",children:[ke,Te]}),e[64]=ke,e[65]=Te,e[66]=Ae):Ae=e[66];let Ue;return e[67]!==re||e[68]!==xe||e[69]!==Ae?(Ue=n.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[re,xe,Ae]}),e[67]=re,e[68]=xe,e[69]=Ae,e[70]=Ue):Ue=e[70],Ue}const j=s?.name??"U";let I;e[71]!==j||e[72]!==o?(I=n.jsx(pt,{url:o,fallback:j,shape:"circle",size:"sm",className:"shrink-0"}),e[71]=j,e[72]=o,e[73]=I):I=e[73];const g=s?.name??"User";let k;e[74]!==g?(k=n.jsx("p",{className:"text-sm font-medium truncate",children:g}),e[74]=g,e[75]=k):k=e[75];const h=s?.email;let S;e[76]!==h?(S=n.jsx("p",{className:"text-xs text-muted-foreground truncate",children:h}),e[76]=h,e[77]=S):S=e[77];let y;e[78]!==k||e[79]!==S?(y=n.jsxs("div",{className:"flex-1 min-w-0",children:[k,S]}),e[78]=k,e[79]=S,e[80]=y):y=e[80];let v;e[81]!==s?(v=()=>{s?.id&&navigator.clipboard.writeText(s.id).then(Eo)},e[81]=s,e[82]=v):v=e[82];let _;e[83]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx(gt,{size:14}),e[83]=_):_=e[83];let M;e[84]!==v?(M=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button",tabIndex:-1,onClick:v,className:"shrink-0 text-muted-foreground hover:text-foreground transition-colors",children:_})}),e[84]=v,e[85]=M):M=e[85];let D;e[86]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(st,{side:"right",children:n.jsx("p",{className:"text-xs",children:"Copy user ID"})}),e[86]=D):D=e[86];let w;e[87]!==M?(w=n.jsx(ht,{delayDuration:300,children:n.jsxs(nt,{children:[M,D]})}),e[87]=M,e[88]=w):w=e[88];let $;e[89]!==w||e[90]!==I||e[91]!==y?($=n.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 mx-1 mt-1",children:[I,y,w]}),e[89]=w,e[90]=I,e[91]=y,e[92]=$):$=e[92];let O;if(e[93]!==x||e[94]!==r){let G;e[96]!==x?(G=Y=>n.jsx(Be,{item:Y,onClose:x},Y.key),e[96]=x,e[97]=G):G=e[97],O=r.map(G),e[93]=x,e[94]=r,e[95]=O}else O=e[95];let T;e[98]!==x||e[99]!==i?(T=n.jsx(Be,{item:i,onClose:x}),e[98]=x,e[99]=i,e[100]=T):T=e[100];let A;e[101]!==O||e[102]!==T?(A=n.jsxs("nav",{className:"flex-1 flex flex-col px-2 pt-1 overflow-y-auto",children:[O,T]}),e[101]=O,e[102]=T,e[103]=A):A=e[103];let P;if(e[104]!==a.theme||e[105]!==c||e[106]!==l){let G;e[108]!==a.theme||e[109]!==c?(G=Y=>{const{value:ee,icon:Z,label:ne}=Y;return n.jsx("button",{type:"button","aria-label":ne,onClick:()=>c(X=>({...X,theme:ee})),className:J("size-7 rounded-md flex items-center justify-center transition-colors",a.theme===ee?"bg-sidebar-accent text-foreground":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground"),children:Z},ee)},e[108]=a.theme,e[109]=c,e[110]=G):G=e[110],P=l.map(G),e[104]=a.theme,e[105]=c,e[106]=l,e[107]=P}else P=e[107];let z;e[111]!==P?(z=n.jsx("div",{className:"flex items-center gap-0.5",children:P}),e[111]=P,e[112]=z):z=e[112];const L=a.enableSounds?"Disable sounds":"Enable sounds";let R;e[113]!==c?(R=()=>c(Ro),e[113]=c,e[114]=R):R=e[114];const B=a.enableSounds?"text-foreground hover:bg-sidebar-accent/50":"text-muted-foreground hover:bg-sidebar-accent/50 hover:text-foreground";let U;e[115]!==B?(U=J("size-7 rounded-md flex items-center justify-center transition-colors",B),e[115]=B,e[116]=U):U=e[116];let F;e[117]!==a.enableSounds?(F=a.enableSounds?n.jsx(mt,{size:14}):n.jsx(ft,{size:14}),e[117]=a.enableSounds,e[118]=F):F=e[118];let H;e[119]!==L||e[120]!==R||e[121]!==U||e[122]!==F?(H=n.jsx("button",{type:"button","aria-label":L,onClick:R,className:U,children:F}),e[119]=L,e[120]=R,e[121]=U,e[122]=F,e[123]=H):H=e[123];let V;e[124]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsxs("span",{className:"text-xs text-muted-foreground/60",children:["v","2.311.9"]}),e[124]=V):V=e[124];let q;e[125]!==H?(q=n.jsxs("div",{className:"flex items-center gap-2",children:[H,V]}),e[125]=H,e[126]=q):q=e[126];let Q;e[127]!==z||e[128]!==q?(Q=n.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-t border-border/50",children:[z,q]}),e[127]=z,e[128]=q,e[129]=Q):Q=e[129];let N;e[130]!==$||e[131]!==A||e[132]!==Q?(N=n.jsxs("div",{className:"w-60 shrink-0 flex flex-col border-r border-border bg-sidebar/75",children:[$,A,Q]}),e[130]=$,e[131]=A,e[132]=Q,e[133]=N):N=e[133];let K;e[134]!==f||e[135]!==m||e[136]!==d||e[137]!==u?(K=n.jsx("div",{className:"flex-1 flex flex-col min-w-0 min-h-0 overflow-hidden",children:n.jsx(Nt,{sortedOrgs:u,orgParam:d,onSelectOrg:m,onCreateOrg:f})}),e[134]=f,e[135]=m,e[136]=d,e[137]=u,e[138]=K):K=e[138];let W;return e[139]!==N||e[140]!==K?(W=n.jsxs("div",{className:"flex min-h-[380px] w-full overflow-hidden",children:[N,K]}),e[139]=N,e[140]=K,e[141]=W):W=e[141],W}function Ro(t){return{...t,enableSounds:!t.enableSounds}}function Eo(){je.success("User ID copied")}function Do(t){return{...t,enableSounds:!t.enableSounds}}function Lo(){je.success("User ID copied")}function os(){const t=C.c(50),{data:e}=Se.useSession(),{data:s}=Se.useListOrganizations(),o=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={from:"/shell/$org",shouldThrow:!1},t[0]=r):r=t[0];const l=$s(r)?.params.org,[a,c]=Tt(),u=Bt(),[d,m]=b.useState(!1),[f,x]=b.useState(!1),p=e?.user,j=p?.image;let I;if(t[1]!==u||t[2]!==o||t[3]!==d||t[4]!==l||t[5]!==s||t[6]!==a||t[7]!==c||t[8]!==p||t[9]!==j){const h=s?.find(W=>W.slug===l);let S;if(t[11]!==l||t[12]!==s){let W;t[14]!==l?(W=(G,Y)=>G.slug===l?-1:Y.slug===l?1:G.name.localeCompare(Y.name),t[14]=l,t[15]=W):W=t[15],S=[...s??[]].sort(W),t[11]=l,t[12]=s,t[13]=S}else S=t[13];const y=S;let v;t[16]!==o?(v=W=>{m(!1),o({to:"/$org",params:{org:W}})},t[16]=o,t[17]=v):v=t[17];const _=v;let M;t[18]===Symbol.for("react.memo_cache_sentinel")?(M=()=>m(!1),t[18]=M):M=t[18];const D=M;let w;t[19]===Symbol.for("react.memo_cache_sentinel")?(w=n.jsx(Ye,{size:16}),t[19]=w):w=t[19];let $;t[20]!==o||t[21]!==l?($={key:"preferences",label:"Preferences",icon:w,onClick:()=>{o({to:"/$org/settings/profile",params:{org:l??""}})}},t[20]=o,t[21]=l,t[22]=$):$=t[22];let O;t[23]===Symbol.for("react.memo_cache_sentinel")?(O={key:"terms",label:"Terms of Use",icon:n.jsx(tn,{size:16}),href:"https://www.decocms.com/terms-of-use",external:!0},t[23]=O):O=t[23];let T;t[24]===Symbol.for("react.memo_cache_sentinel")?(T={key:"privacy",label:"Privacy Policy",icon:n.jsx(vn,{size:16}),href:"https://www.decocms.com/privacy-policy",external:!0},t[24]=T):T=t[24];let A;t[25]===Symbol.for("react.memo_cache_sentinel")?(A={key:"github",label:"decocms/studio",icon:n.jsx(Ts,{className:"w-4 h-4"}),href:"https://github.com/decocms/studio",external:!0},t[25]=A):A=t[25];let P;t[26]===Symbol.for("react.memo_cache_sentinel")?(P={key:"community",label:"Community",icon:n.jsx(Vt,{size:16}),href:"https://decocms.com/discord",external:!0},t[26]=P):P=t[26];let z;t[27]===Symbol.for("react.memo_cache_sentinel")?(z={key:"homepage",label:"Homepage",icon:n.jsx(mn,{size:16}),href:"https://decocms.com",external:!0},t[27]=z):z=t[27];let L;t[28]!==$?(L=[$,O,T,A,P,z],t[28]=$,t[29]=L):L=t[29];const R=L;let B;t[30]===Symbol.for("react.memo_cache_sentinel")?(B={key:"logout",label:"Sign out",icon:n.jsx(xn,{size:16}),onClick:Uo},t[30]=B):B=t[30];const U=B;let F;t[31]===Symbol.for("react.memo_cache_sentinel")?(F={value:"light",icon:n.jsx(gn,{size:14}),label:"Light theme"},t[31]=F):F=t[31];let H;t[32]===Symbol.for("react.memo_cache_sentinel")?(H={value:"dark",icon:n.jsx(bn,{size:14}),label:"Dark theme"},t[32]=H):H=t[32];let V;t[33]===Symbol.for("react.memo_cache_sentinel")?(V=[F,H,{value:"system",icon:n.jsx(jn,{size:14}),label:"System theme"}],t[33]=V):V=t[33];const q=V;let Q;t[34]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>{m(!1),x(!0)},t[34]=Q):Q=t[34];let N;t[35]!==_||t[36]!==u||t[37]!==R||t[38]!==l||t[39]!==a||t[40]!==c||t[41]!==y||t[42]!==p||t[43]!==j?(N={user:p,userImage:j,menuItems:R,signOutItem:U,themeOptions:q,preferences:a,setPreferences:c,sortedOrgs:y,orgParam:l,onSelectOrg:_,onCreateOrg:Q,close:D,isMobile:u},t[35]=_,t[36]=u,t[37]=R,t[38]=l,t[39]=a,t[40]=c,t[41]=y,t[42]=p,t[43]=j,t[44]=N):N=t[44];const K=N;I=u?n.jsxs(Ft,{open:d,onOpenChange:m,direction:"bottom",children:[n.jsxs("button",{type:"button",onClick:()=>m(!0),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:[n.jsx("div",{className:"shrink-0 size-5 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:h?.logo?void 0:rt(h?.name??""),children:h?.logo?n.jsx("img",{src:h.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:"font-semibold leading-none text-[8px]",children:(h?.name??"?").slice(0,2).toUpperCase()})}),n.jsx("span",{className:"truncate",children:h?.name??"Account"})]}),n.jsxs(Ut,{className:"h-[80dvh] p-0",children:[n.jsx(Gt,{className:"sr-only",children:"Account"}),n.jsx(kt,{...K})]})]}):n.jsxs(lt,{open:d,onOpenChange:m,children:[n.jsx(at,{asChild:!0,children:n.jsx(he,{tooltip:h?.name??"Account",className:"rounded-md",children:n.jsx("div",{className:"shrink-0 size-6 rounded-md flex items-center justify-center border border-border/50 overflow-hidden",style:h?.logo?void 0:rt(h?.name??""),children:h?.logo?n.jsx("img",{src:h.logo,alt:"",className:"size-full object-cover"}):n.jsx("span",{className:"font-semibold leading-none text-[9px]",children:(h?.name??"?").slice(0,2).toUpperCase()})})})}),n.jsx(ct,{side:"right",align:"end",sideOffset:18,collisionPadding:16,className:"w-[520px] p-0 flex max-h-[520px]",onCloseAutoFocus:Fo,children:n.jsx(kt,{...K})})]}),t[1]=u,t[2]=o,t[3]=d,t[4]=l,t[5]=s,t[6]=a,t[7]=c,t[8]=p,t[9]=j,t[10]=I}else I=t[10];let g;t[45]!==f?(g=n.jsx(Ao,{open:f,onOpenChange:x}),t[45]=f,t[46]=g):g=t[46];let k;return t[47]!==I||t[48]!==g?(k=n.jsxs(n.Fragment,{children:[I,g]}),t[47]=I,t[48]=g,t[49]=k):k=t[49],k}function Fo(t){return t.preventDefault()}function Uo(){se("signed_out",{source:"account_popover"}),Se.signOut()}function Go({invitation:t}){const[e,s]=b.useState(!1),[o,r]=b.useState(!1),i=Re(),l=async()=>{s(!0);try{const c=await Se.organization.acceptInvitation({invitationId:t.id});if(c.error)je.error(c.error.message),s(!1);else{const u=await Se.organization.getFullOrganization({query:{organizationId:t.organizationId}});je.success("Invitation accepted!");const d=u?.data?.slug;window.location.href=d?`/${d}`:"/"}}catch{je.error("Failed to accept invitation"),s(!1)}},a=async()=>{r(!0);try{const c=await Se.organization.rejectInvitation({invitationId:t.id});c.error?(je.error(c.error.message),r(!1)):(je.success("Invitation declined"),i.invalidateQueries())}catch{je.error("Failed to decline invitation"),r(!1)}};return n.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border last:border-0 hover:bg-muted/25 transition-colors",children:[n.jsxs("div",{className:"flex-1 min-w-0",children:[n.jsx("p",{className:"text-xs text-muted-foreground",children:"You've been invited to join"}),n.jsx("p",{className:"text-sm font-medium truncate",children:t.organizationName??"Unknown organization"})]}),n.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[n.jsx(et,{size:"icon",variant:"ghost",className:"size-7 text-green-600 hover:text-green-700 hover:bg-green-50 dark:hover:bg-green-950",onClick:l,disabled:e||o,"aria-label":"Accept invitation",children:n.jsx(Ht,{size:14})}),n.jsx(et,{size:"icon",variant:"ghost",className:"size-7 text-muted-foreground hover:text-destructive hover:bg-destructive/10",onClick:a,disabled:e||o,"aria-label":"Decline invitation",children:n.jsx(En,{size:14})})]})]})}function Bo(){const t=b.useContext(As),{data:e}=t.hooks.useListUserInvitations();return(e??[]).filter(o=>o.status==="pending"&&new Date(o.expiresAt)>new Date)}class Ho extends b.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,s){}render(){return this.state.hasError?null:this.props.children}}function Vo(t){return t<=1?"text-destructive":t<=5?"text-amber-500 dark:text-amber-400":"text-foreground/70"}function Ko(){const t=C.c(20),e=ve(),{org:s}=pe();let o;t[0]!==s.id||t[1]!==s.slug?(o={connectionId:Kt,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=o):o=t[2];const r=Wt(o);let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i={providerId:"deco"},t[3]=i):i=t[3];let l;t[4]!==r?(l={client:r,toolName:"AI_PROVIDER_CREDITS",toolArguments:i,staleTime:6e4,select:Wo},t[4]=r,t[5]=l):l=t[5];const{data:a,isPending:c,isError:u}=Fn(l),d=a?.balanceCents!=null?a.balanceCents/100:null;let m;t[6]!==d||t[7]!==u||t[8]!==c?(m=c||u||d==null?"Credits":`Credits: $${d.toFixed(2)}`,t[6]=d,t[7]=u,t[8]=c,t[9]=m):m=t[9];const f=m;let x;t[10]!==d?(x=J(d!=null&&Vo(d)),t[10]=d,t[11]=x):x=t[11];let p;t[12]!==e||t[13]!==s.slug?(p=()=>e({to:"/$org/settings/ai-providers",params:{org:s.slug}}),t[12]=e,t[13]=s.slug,t[14]=p):p=t[14];let j;t[15]===Symbol.for("react.memo_cache_sentinel")?(j=n.jsx(sn,{size:24}),t[15]=j):j=t[15];let I;return t[16]!==x||t[17]!==p||t[18]!==f?(I=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:f,className:x,onClick:p,children:j})})}),t[16]=x,t[17]=p,t[18]=f,t[19]=I):I=t[19],I}function Wo(t){return t.structuredContent}function qo(){const t=C.c(1);if(!Un().some(Qo))return null;let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(Ko,{}),t[0]=o):o=t[0],o}function Qo(t){return t.providerId==="deco"}function Yo(){const t=C.c(3),[e,s]=b.useState(!1);let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:"Connections",onClick:()=>{se("connections_dialog_opened",{source:"sidebar_footer",mode:"browse"}),s(!0)},children:n.jsx(pn,{size:24})})})}),t[0]=o):o=t[0];let r;return t[1]!==e?(r=n.jsxs(n.Fragment,{children:[o,n.jsx(Gn,{mode:"browse",open:e,onOpenChange:s,defaultTab:"all"})]}),t[1]=e,t[2]=r):r=t[2],r}function Xo(){const t=C.c(11),e=Bo();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(xt,{size:24}),t[0]=s):s=t[0];let o;t[1]!==e.length?(o=e.length>0&&n.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-red-500 pointer-events-none"}),t[1]=e.length,t[2]=o):o=t[2];let r;t[3]!==o?(r=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(at,{asChild:!0,children:n.jsxs(he,{tooltip:"Inbox",className:"relative",children:[s,o]})})})}),t[3]=o,t[4]=r):r=t[4];let i;t[5]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx("div",{className:"px-4 py-3 border-b border-border shrink-0",children:n.jsx("h3",{className:"text-sm font-medium",children:"Inbox"})}),t[5]=i):i=t[5];let l;t[6]!==e?(l=n.jsxs(ct,{side:"right",align:"start",sideOffset:16,collisionPadding:16,className:"w-[min(400px,calc(100vw-2rem))] p-0 h-[min(650px,calc(100dvh-4rem))] flex flex-col",children:[i,e.length===0?n.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-6 text-center",children:[n.jsx(xt,{size:24,className:"text-muted-foreground/50"}),n.jsx("p",{className:"text-sm font-medium text-foreground",children:"No invites pending"}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Organization invitations will appear here"})]}):n.jsx("div",{className:"overflow-y-auto flex-1",children:e.map(Jo)})]}),t[6]=e,t[7]=l):l=t[7];let a;return t[8]!==r||t[9]!==l?(a=n.jsxs(lt,{children:[r,l]}),t[8]=r,t[9]=l,t[10]=a):a=t[10],a}function Jo(t){return n.jsx(Go,{invitation:t},t.id)}function Zo(){const t=C.c(6),e=ve(),{org:s}=pe();let o;t[0]!==e||t[1]!==s.slug?(o=()=>e({to:"/$org/settings",params:{org:s.slug}}),t[0]=e,t[1]=s.slug,t[2]=o):o=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(Ye,{size:24}),t[3]=r):r=t[3];let i;return t[4]!==o?(i=n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(he,{tooltip:"Settings",onClick:o,children:r})})}),t[4]=o,t[5]=i):i=t[5],i}function er(){const t=C.c(5);let e,s,o,r;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Ho,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(qo,{})})}),s=n.jsx(Yo,{}),o=n.jsx(Xo,{}),r=n.jsx(Zo,{}),t[0]=e,t[1]=s,t[2]=o,t[3]=r):(e=t[0],s=t[1],o=t[2],r=t[3]);let i;return t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs(Et,{className:"px-2 pb-3 gap-1",children:[e,s,o,r,n.jsx(ge,{children:n.jsx(ie,{children:n.jsx(os,{})})})]}),t[4]=i):i=t[4],i}function tr(){const t=C.c(10),e=ve(),{org:s}=pe(),{setOpenMobile:o}=Qe();let r;t[0]!==e||t[1]!==s.slug||t[2]!==o?(r=()=>{e({to:"/$org/settings",params:{org:s.slug}}),o(!1)},t[0]=e,t[1]=s.slug,t[2]=o,t[3]=r):r=t[3];let i;t[4]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(Ye,{}),t[4]=i):i=t[4];let l;t[5]!==r?(l=n.jsx(ie,{children:n.jsx(he,{tooltip:"Settings",onClick:r,children:i})}),t[5]=r,t[6]=l):l=t[6];let a;t[7]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx(ie,{children:n.jsx(os,{})}),t[7]=a):a=t[7];let c;return t[8]!==l?(c=n.jsx(Et,{children:n.jsxs(ge,{children:[l,a]})}),t[8]=l,t[9]=c):c=t[9],c}var dt="ContextMenu",[sr]=Us(dt,[At]),te=At(),[nr,rs]=sr(dt),is=t=>{const{__scopeContextMenu:e,children:s,onOpenChange:o,dir:r,modal:i=!0}=t,[l,a]=b.useState(!1),c=te(e),u=Ps(o),d=b.useCallback(m=>{a(m),u(m)},[u]);return n.jsx(nr,{scope:e,open:l,onOpenChange:d,modal:i,children:n.jsx(Os,{...c,dir:r,open:l,onOpenChange:d,modal:i,children:s})})};is.displayName=dt;var ls="ContextMenuTrigger",as=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,disabled:o=!1,...r}=t,i=rs(ls,s),l=te(s),a=b.useRef({x:0,y:0}),c=b.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),u=b.useRef(0),d=b.useCallback(()=>window.clearTimeout(u.current),[]),m=f=>{a.current={x:f.clientX,y:f.clientY},i.onOpenChange(!0)};return b.useEffect(()=>d,[d]),b.useEffect(()=>{o&&d()},[o,d]),n.jsxs(n.Fragment,{children:[n.jsx(zs,{...l,virtualRef:c}),n.jsx(Rs.span,{"data-state":i.open?"open":"closed","data-disabled":o?"":void 0,...r,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:o?t.onContextMenu:Oe(t.onContextMenu,f=>{d(),m(f),f.preventDefault()}),onPointerDown:o?t.onPointerDown:Oe(t.onPointerDown,He(f=>{d(),u.current=window.setTimeout(()=>m(f),700)})),onPointerMove:o?t.onPointerMove:Oe(t.onPointerMove,He(d)),onPointerCancel:o?t.onPointerCancel:Oe(t.onPointerCancel,He(d)),onPointerUp:o?t.onPointerUp:Oe(t.onPointerUp,He(d))})]})});as.displayName=ls;var or="ContextMenuPortal",cs=t=>{const{__scopeContextMenu:e,...s}=t,o=te(e);return n.jsx(Es,{...o,...s})};cs.displayName=or;var ds="ContextMenuContent",us=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=rs(ds,s),i=te(s),l=b.useRef(!1);return n.jsx(Ds,{...i,...o,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:a=>{t.onCloseAutoFocus?.(a),!a.defaultPrevented&&l.current&&a.preventDefault(),l.current=!1},onInteractOutside:a=>{t.onInteractOutside?.(a),!a.defaultPrevented&&!r.modal&&(l.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});us.displayName=ds;var rr="ContextMenuGroup",ir=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Gs,{...r,...o,ref:e})});ir.displayName=rr;var lr="ContextMenuLabel",ar=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Bs,{...r,...o,ref:e})});ar.displayName=lr;var cr="ContextMenuItem",ms=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ls,{...r,...o,ref:e})});ms.displayName=cr;var dr="ContextMenuCheckboxItem",ur=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Hs,{...r,...o,ref:e})});ur.displayName=dr;var mr="ContextMenuRadioGroup",fr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Vs,{...r,...o,ref:e})});fr.displayName=mr;var xr="ContextMenuRadioItem",pr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ks,{...r,...o,ref:e})});pr.displayName=xr;var hr="ContextMenuItemIndicator",gr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ws,{...r,...o,ref:e})});gr.displayName=hr;var br="ContextMenuSeparator",fs=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Fs,{...r,...o,ref:e})});fs.displayName=br;var jr="ContextMenuArrow",vr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(qs,{...r,...o,ref:e})});vr.displayName=jr;var yr="ContextMenuSubTrigger",_r=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Qs,{...r,...o,ref:e})});_r.displayName=yr;var Sr="ContextMenuSubContent",Cr=b.forwardRef((t,e)=>{const{__scopeContextMenu:s,...o}=t,r=te(s);return n.jsx(Ys,{...r,...o,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Cr.displayName=Sr;function He(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var Nr=is,kr=as,wr=cs,Ir=us,Mr=ms,$r=fs;function Tr(t){const e=C.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(Nr,{"data-slot":"context-menu",...s}),e[2]=s,e[3]=o):o=e[3],o}function Ar(t){const e=C.c(4);let s;e[0]!==t?({...s}=t,e[0]=t,e[1]=s):s=e[1];let o;return e[2]!==s?(o=n.jsx(kr,{"data-slot":"context-menu-trigger",...s}),e[2]=s,e[3]=o):o=e[3],o}function Pr(t){const e=C.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let r;e[3]!==s?(r=J("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",s),e[3]=s,e[4]=r):r=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsx(wr,{children:n.jsx(Ir,{"data-slot":"context-menu-content",className:r,...o})}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function wt(t){const e=C.c(12);let s,o,r,i;e[0]!==t?({className:s,inset:o,variant:i,...r}=t,e[0]=t,e[1]=s,e[2]=o,e[3]=r,e[4]=i):(s=e[1],o=e[2],r=e[3],i=e[4]);const l=i===void 0?"default":i;let a;e[5]!==s?(a=J("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),e[5]=s,e[6]=a):a=e[6];let c;return e[7]!==o||e[8]!==r||e[9]!==a||e[10]!==l?(c=n.jsx(Mr,{"data-slot":"context-menu-item","data-inset":o,"data-variant":l,className:a,...r}),e[7]=o,e[8]=r,e[9]=a,e[10]=l,e[11]=c):c=e[11],c}function Or(t){const e=C.c(8);let s,o;e[0]!==t?({className:s,...o}=t,e[0]=t,e[1]=s,e[2]=o):(s=e[1],o=e[2]);let r;e[3]!==s?(r=J("bg-border -mx-1 my-1 h-px",s),e[3]=s,e[4]=r):r=e[4];let i;return e[5]!==o||e[6]!==r?(i=n.jsx($r,{"data-slot":"context-menu-separator",className:r,...o}),e[5]=o,e[6]=r,e[7]=i):i=e[7],i}function zr(t){const e=ve(),s=Re(),o=Xt(),{locator:r}=pe(),i=We({strict:!1}),l=qe({strict:!1});return async a=>{const c=crypto.randomUUID(),u=a===l.virtualmcpid?Lt(s,r,i.taskId??""):null;try{await o.create.mutateAsync({id:c,virtual_mcp_id:a,...u?{branch:u}:{}})}catch{}e({to:"/$org/$taskId",params:{org:t,taskId:c},search:{virtualmcpid:a}})}}function Rr({agent:t,org:e,onUnpin:s,isDragging:o}){const r=ve(),{isMobile:i,setOpenMobile:l}=Qe(),a=Bn(e),u=It({select:h=>h.location.pathname}).startsWith(`/${e}/${t.id}`),[d,m]=b.useState(null),f=b.useRef(null),x=b.useRef(null),p=b.useRef(!1);p.current=!!o,o&&(d||x.current)&&(x.current&&(clearTimeout(x.current),x.current=null),d&&m(null));const j=h=>{if(p.current)return;const S=h.currentTarget.getBoundingClientRect();x.current=setTimeout(()=>{p.current||m(S)},550)},I=h=>{x.current&&(clearTimeout(x.current),x.current=null),!(f.current&&h.relatedTarget instanceof Node&&f.current.contains(h.relatedTarget))&&m(null)},g=d?Math.round(d.height*.9):0,k=d?d.width+g:0;return n.jsx(Tr,{children:n.jsxs(ie,{className:J(d&&"z-[55]"),children:[n.jsx(Ar,{asChild:!0,children:n.jsx(he,{tooltip:d?void 0:t.title,isActive:u,onClick:async()=>{i&&l(!1);const{resumed:h}=await a(t.id);se("sidebar_agent_pin_clicked",{agent_id:t.id,agent_title:t.title,resumed:h})},onMouseEnter:j,onMouseLeave:I,children:n.jsx(Pe,{icon:t.icon,name:t.title,size:"xs",className:"w-full h-full [&_svg]:w-1/2 [&_svg]:h-1/2"})})}),n.jsxs(Pr,{children:[n.jsxs(wt,{onClick:()=>{const h=crypto.randomUUID();r({to:"/$org/$taskId",params:{org:e,taskId:h},search:{virtualmcpid:t.id}})},children:[n.jsx(Ye,{size:14}),"Settings"]}),n.jsx(Or,{}),n.jsxs(wt,{onClick:()=>{s(),u&&r({to:"/$org",params:{org:e}})},className:"",children:[n.jsx(jt,{size:14}),"Unpin"]})]}),d&&Ee.createPortal(n.jsx("button",{ref:f,type:"button",onMouseLeave:()=>m(null),onClick:h=>{h.stopPropagation(),m(null),s(),r({to:"/$org",params:{org:e}})},className:J("flex items-center justify-center","bg-sidebar-accent text-muted-foreground","rounded-xl cursor-pointer","animate-in fade-in-0 slide-in-from-right-2","duration-150 [animation-timing-function:cubic-bezier(0.165,0.84,0.44,1)]","hover:text-foreground transition-colors"),style:{position:"fixed",top:d.top,left:d.left,height:d.height,width:k,paddingLeft:d.width,zIndex:50,boxShadow:"inset 0 0 0.5px 1px hsla(0, 0%, 100%, 0.075), 0 0 0 0.5px hsla(0, 0%, 0%, 0.12)"},children:n.jsx(jt,{size:14})}),document.body)]})})}function Er(t){const e=C.c(18);let s;e[0]!==t.agent.id?(s={id:t.agent.id},e[0]=t.agent.id,e[1]=s):s=e[1];const{attributes:o,listeners:r,setNodeRef:i,transform:l,transition:a,isDragging:c}=no(s);let u;e[2]!==l?(u=oo.Transform.toString(l?{...l,x:0}:null),e[2]=l,e[3]=u):u=e[3];const d=c?.5:void 0,m=c?100:void 0;let f;e[4]!==u||e[5]!==d||e[6]!==m||e[7]!==a?(f={transform:u,transition:a,opacity:d,zIndex:m},e[4]=u,e[5]=d,e[6]=m,e[7]=a,e[8]=f):f=e[8];const x=f;let p;e[9]!==c||e[10]!==t?(p=n.jsx(Rr,{...t,isDragging:c}),e[9]=c,e[10]=t,e[11]=p):p=e[11];let j;return e[12]!==o||e[13]!==r||e[14]!==i||e[15]!==x||e[16]!==p?(j=n.jsx("div",{ref:i,style:x,...o,...r,tabIndex:-1,className:"w-full",children:p}),e[12]=o,e[13]=r,e[14]=i,e[15]=x,e[16]=p,e[17]=j):j=e[17],j}function Dr(t){const e=C.c(9),{agent:s,onClick:o}=t;let r;e[0]!==s.icon||e[1]!==s.title?(r=n.jsx(Pe,{icon:s.icon,name:s.title,size:"md",className:"transition-transform group-hover:scale-105"}),e[0]=s.icon,e[1]=s.title,e[2]=r):r=e[2];let i;e[3]!==s.title?(i=n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:s.title}),e[3]=s.title,e[4]=i):i=e[4];let l;return e[5]!==o||e[6]!==r||e[7]!==i?(l=n.jsxs("button",{type:"button",onClick:o,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[r,i]}),e[5]=o,e[6]=r,e[7]=i,e[8]=l):l=e[8],l}function Lr(t){const e=C.c(80),{onClose:s,onOpenImportDeco:o,onOpenGithubImport:r,onOpenSelfHealing:i,onOpenDiagnosticsModal:l,onOpenLeanCanvasModal:a,onOpenStudioPackModal:c,onOpenAiImageModal:u,onOpenAiResearchModal:d}=t,[m,f]=b.useState(""),x=qt(),{org:p}=pe();let j;e[0]!==x?(j=x.filter(Wr).map(Kr),e[0]=x,e[1]=j):j=e[1];const I=j,{pin:g,isPinned:k}=Yt(p.id,I);let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h={navigateOnCreate:!0},e[2]=h):h=e[2];const{createVirtualMCP:S,isCreating:y}=lo(h),[v]=Tt(),_=zr(p.slug),M=io();let D,w,$,O,T,A,P,z;if(e[3]!==x||e[4]!==S||e[5]!==y||e[6]!==k||e[7]!==M||e[8]!==_||e[9]!==s||e[10]!==u||e[11]!==d||e[12]!==l||e[13]!==r||e[14]!==o||e[15]!==a||e[16]!==i||e[17]!==c||e[18]!==g||e[19]!==v.experimental_vibecode||e[20]!==m){const V=m.toLowerCase();z=x.filter(Vr).filter(E=>!m||E.title.toLowerCase().includes(V));let q;e[29]!==x?(q=x.some(Hr),e[29]=x,e[30]=q):q=e[30];const Q=q;D=ze.filter(E=>(!m||E.title.toLowerCase().includes(V))&&!(E.id==="studio-pack"&&Q)&&!(E.id==="self-healing-storefront"&&!v.experimental_vibecode));let N;e[31]===Symbol.for("react.memo_cache_sentinel")?(N=ze.find(Br),e[31]=N):N=e[31];const K=N,W=K?x.find(E=>E.metadata?.type===K.id):void 0;let G;e[32]===Symbol.for("react.memo_cache_sentinel")?(G=ze.find(Gr),e[32]=G):G=e[32];const Y=G,ee=Y?x.find(E=>E.metadata?.type===Y.id):void 0;let Z;e[33]===Symbol.for("react.memo_cache_sentinel")?(Z=ze.find(Ur),e[33]=Z):Z=e[33];const ne=Z,X=ne?x.find(E=>E.metadata?.type===ne.id):void 0;let oe;e[34]===Symbol.for("react.memo_cache_sentinel")?(oe=ze.find(Fr),e[34]=oe):oe=e[34];const ae=oe,Ne=ae?x.find(E=>E.metadata?.type===ae.id):void 0;let ce;e[35]!==k||e[36]!==_||e[37]!==s||e[38]!==g?(ce=E=>{k(E.id)||g(E.id),s(),f(""),_(E.id)},e[35]=k,e[36]=_,e[37]=s,e[38]=g,e[39]=ce):ce=e[39];const ye=ce,_e=E=>{s(),f(""),E==="self-healing-storefront"?i():E==="site-editor"?o():E==="site-diagnostics"?W?M(W.id):l():E==="lean-canvas"?ee?M(ee.id):a():E==="ai-image"?X?M(X.id):u():E==="ai-research"?Ne?M(Ne.id):d():E==="studio-pack"?c():_(E)};A="flex flex-col max-h-[min(640px,80dvh)]",e[40]!==m?(P=n.jsx(ro,{value:m,onChange:f,placeholder:"Search agents..."}),e[40]=m,e[41]=P):P=e[41],w="overflow-y-auto flex-1 min-h-0 px-3 pb-3",e[42]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx("div",{className:"px-1 pt-3 pb-2",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agents"})}),e[42]=$):$=e[42];let re;e[43]!==S||e[44]!==s?(re=async()=>{se("agent_create_new_clicked",{source:"browse_popover"}),await S(),s()},e[43]=S,e[44]=s,e[45]=re):re=e[45];let de,ue;e[46]===Symbol.for("react.memo_cache_sentinel")?(de=n.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:n.jsx(Ke,{size:16,className:"text-muted-foreground"})}),ue=n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Create new"}),e[46]=de,e[47]=ue):(de=e[46],ue=e[47]);let me;e[48]!==y||e[49]!==re?(me=n.jsxs("button",{type:"button",disabled:y,onClick:re,className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[de,ue]}),e[48]=y,e[49]=re,e[50]=me):me=e[50];let fe;e[51]!==s||e[52]!==r||e[53]!==v.experimental_vibecode?(fe=v.experimental_vibecode&&n.jsxs("button",{type:"button",onClick:()=>{se("agent_import_clicked",{source:"github"}),r(),s()},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group",children:[n.jsx("div",{className:"w-12 h-12 rounded-xl border-2 border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-105",children:n.jsx(xo,{className:"size-5 text-muted-foreground"})}),n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground",children:"Import GitHub"})]}),e[51]=s,e[52]=r,e[53]=v.experimental_vibecode,e[54]=fe):fe=e[54];let xe;e[55]!==ye?(xe=E=>n.jsx(Dr,{agent:E,onClick:()=>ye(E)},E.id),e[55]=ye,e[56]=xe):xe=e[56],O=n.jsxs("div",{className:"grid grid-cols-3 gap-1",children:[me,fe,z.map(xe)]}),T=D.length>0&&n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"px-1 pt-4 pb-2",children:n.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Agent templates"})}),n.jsx("div",{className:"grid grid-cols-3 gap-1",children:D.map(E=>n.jsxs("button",{type:"button",onClick:()=>{se("agent_template_clicked",{template_id:E.id,template_title:E.title}),_e(E.id)},className:"flex flex-col items-center gap-2 p-3 rounded-xl transition-colors hover:bg-accent cursor-pointer group disabled:opacity-50 disabled:cursor-not-allowed",children:[n.jsx(Pe,{icon:E.icon,name:E.title,size:"md",className:"transition-transform group-hover:scale-105"}),n.jsx("span",{className:"text-xs leading-tight text-center text-muted-foreground group-hover:text-foreground line-clamp-2 w-full",children:E.title})]},E.id))})]}),e[3]=x,e[4]=S,e[5]=y,e[6]=k,e[7]=M,e[8]=_,e[9]=s,e[10]=u,e[11]=d,e[12]=l,e[13]=r,e[14]=o,e[15]=a,e[16]=i,e[17]=c,e[18]=g,e[19]=v.experimental_vibecode,e[20]=m,e[21]=D,e[22]=w,e[23]=$,e[24]=O,e[25]=T,e[26]=A,e[27]=P,e[28]=z}else D=e[21],w=e[22],$=e[23],O=e[24],T=e[25],A=e[26],P=e[27],z=e[28];let L;e[57]!==D||e[58]!==y||e[59]!==m||e[60]!==z.length?(L=z.length===0&&D.length===0&&!y&&n.jsx("div",{className:"flex items-center justify-center py-6 text-xs text-muted-foreground",children:m?"No agents found":"No agents yet"}),e[57]=D,e[58]=y,e[59]=m,e[60]=z.length,e[61]=L):L=e[61];let R;e[62]!==w||e[63]!==$||e[64]!==O||e[65]!==T||e[66]!==L?(R=n.jsxs("div",{className:w,children:[$,O,T,L]}),e[62]=w,e[63]=$,e[64]=O,e[65]=T,e[66]=L,e[67]=R):R=e[67];let B;e[68]!==p.slug?(B={org:p.slug},e[68]=p.slug,e[69]=B):B=e[69];let U;e[70]!==s?(U=()=>s(),e[70]=s,e[71]=U):U=e[71];let F;e[72]!==B||e[73]!==U?(F=n.jsx("div",{className:"border-t border-border px-3 py-2.5",children:n.jsx(Xs,{to:"/$org/settings/agents",params:B,onClick:U,className:"text-xs text-muted-foreground hover:text-foreground transition-colors flex items-center justify-center",children:"See all agents"})}),e[72]=B,e[73]=U,e[74]=F):F=e[74];let H;return e[75]!==R||e[76]!==F||e[77]!==A||e[78]!==P?(H=n.jsxs("div",{className:A,children:[P,R,F]}),e[75]=R,e[76]=F,e[77]=A,e[78]=P,e[79]=H):H=e[79],H}function Fr(t){return t.id==="ai-research"}function Ur(t){return t.id==="ai-image"}function Gr(t){return t.id==="lean-canvas"}function Br(t){return t.id==="site-diagnostics"}function Hr(t){return Ln(t.id)}function Vr(t){return!Dn(t.id)}function Kr(t){return t.id}function Wr(t){return t.pinned}function qr(){const t=C.c(36),[e,s]=b.useState(!1),[o,r]=b.useState(!1),[i,l]=b.useState(!1),[a,c]=b.useState(!1),[u,d]=b.useState(!1),[m,f]=b.useState(!1),[x,p]=b.useState(!1),[j,I]=b.useState(!1),[g,k]=b.useState(!1),h=Bt(),{setOpenMobile:S}=Qe();let y;t[0]!==h||t[1]!==S?(y=()=>{s(!1),h&&S(!1)},t[0]=h,t[1]=S,t[2]=y):y=t[2];const v=y;let _;t[3]!==v||t[4]!==e?(_=e&&n.jsx(b.Suspense,{fallback:n.jsx("div",{className:"flex items-center justify-center py-8",children:n.jsx(Ve,{className:"h-4 w-24"})}),children:n.jsx(Lr,{onClose:v,onOpenImportDeco:()=>r(!0),onOpenGithubImport:()=>{l(!0),v()},onOpenSelfHealing:()=>{c(!0),v()},onOpenDiagnosticsModal:()=>d(!0),onOpenLeanCanvasModal:()=>f(!0),onOpenStudioPackModal:()=>p(!0),onOpenAiImageModal:()=>I(!0),onOpenAiResearchModal:()=>k(!0)})}),t[3]=v,t[4]=e,t[5]=_):_=t[5];const M=_;let D;t[6]!==h||t[7]!==e||t[8]!==M?(D=h?n.jsxs(n.Fragment,{children:[n.jsx(ie,{children:n.jsx(he,{tooltip:"Browse agents",className:"bg-muted/75 hover:bg-sidebar-accent",onClick:()=>{se("agent_browser_opened",{surface:"mobile_drawer"}),s(!0)},children:n.jsx(Ke,{className:"!opacity-100"})})}),n.jsx(Ft,{open:e,onOpenChange:s,direction:"bottom",children:n.jsxs(Ut,{className:"max-h-[85dvh] p-0",children:[n.jsx(Gt,{className:"sr-only",children:"Browse agents"}),M]})})]}):n.jsxs(lt,{open:e,onOpenChange:B=>{B&&!e&&se("agent_browser_opened",{surface:"desktop_popover"}),s(B)},children:[n.jsx(ie,{children:n.jsx(at,{asChild:!0,children:n.jsx(he,{tooltip:"Browse agents",className:"bg-muted/75 hover:bg-sidebar-accent",children:n.jsx(Ke,{className:"!opacity-100"})})})}),n.jsx(ct,{className:"w-[380px] p-0 overflow-hidden",side:"right",align:"start",children:M})]}),t[6]=h,t[7]=e,t[8]=M,t[9]=D):D=t[9];let w;t[10]!==o?(w=n.jsx(ao,{open:o,onOpenChange:r}),t[10]=o,t[11]=w):w=t[11];let $;t[12]!==i?($=n.jsx(co,{open:i,onOpenChange:l}),t[12]=i,t[13]=$):$=t[13];let O;t[14]!==a?(O=n.jsx(Hn,{open:a,onOpenChange:c}),t[14]=a,t[15]=O):O=t[15];let T;t[16]!==u?(T=n.jsx(uo,{open:u,onOpenChange:d}),t[16]=u,t[17]=T):T=t[17];let A;t[18]!==m?(A=n.jsx(mo,{open:m,onOpenChange:f}),t[18]=m,t[19]=A):A=t[19];let P;t[20]!==x?(P=n.jsx(fo,{open:x,onOpenChange:p}),t[20]=x,t[21]=P):P=t[21];let z;t[22]!==j?(z=n.jsx(Vn,{open:j,onOpenChange:I}),t[22]=j,t[23]=z):z=t[23];let L;t[24]!==g?(L=n.jsx(Kn,{open:g,onOpenChange:k}),t[24]=g,t[25]=L):L=t[25];let R;return t[26]!==L||t[27]!==D||t[28]!==w||t[29]!==$||t[30]!==O||t[31]!==T||t[32]!==A||t[33]!==P||t[34]!==z?(R=n.jsxs(n.Fragment,{children:[D,w,$,O,T,A,P,z,L]}),t[26]=L,t[27]=D,t[28]=w,t[29]=$,t[30]=O,t[31]=T,t[32]=A,t[33]=P,t[34]=z,t[35]=R):R=t[35],R}function Qr(){const t=C.c(34),e=qt(),{org:s}=pe();let o;t[0]!==e?(o=e.filter(Zr).map(Jr),t[0]=e,t[1]=o):o=t[1];const r=o,{pinnedIds:i,unpin:l,reorder:a}=Yt(s.id,r),c=new Map(e.map(Xr)),u=i.map(R=>c.get(R)).filter(Yr);let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={activationConstraint:{distance:5}},t[2]=d):d=t[2];let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m={coordinateGetter:to},t[3]=m):m=t[3];const f=qn(bt(Yn,d),bt(Qn,m));let x;t[4]!==i||t[5]!==a?(x=R=>{const{active:B,over:U}=R;if(!U||B.id===U.id)return;const F=i.indexOf(B.id),H=i.indexOf(U.id);F===-1||H===-1||a(so([...i],F,H))},t[4]=i,t[5]=a,t[6]=x):x=t[6];const p=x,j=De,I="py-0 px-0 mt-2 flex-1 min-h-0";let g;t[7]===Symbol.for("react.memo_cache_sentinel")?(g=n.jsx("div",{className:"h-px bg-border mx-2 mb-2"}),t[7]=g):g=t[7];const k=Le,h="flex flex-1 min-h-0 flex-col overflow-y-auto [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",S=ge,y="gap-2";let v;t[8]===Symbol.for("react.memo_cache_sentinel")?(v=n.jsx(qr,{}),t[8]=v):v=t[8];const _=Zn,M=eo,D=Xn,w=Jn;let $;t[9]!==s.slug||t[10]!==l?($=R=>n.jsx(Er,{agent:R,org:s.slug,onUnpin:()=>l(R.id)},R.id),t[9]=s.slug,t[10]=l,t[11]=$):$=t[11];const O=u.map($);let T;t[12]!==D||t[13]!==i||t[14]!==w||t[15]!==O?(T=n.jsx(D,{items:i,strategy:w,children:O}),t[12]=D,t[13]=i,t[14]=w,t[15]=O,t[16]=T):T=t[16];let A;t[17]!==_||t[18]!==p||t[19]!==f||t[20]!==T||t[21]!==M?(A=n.jsx(_,{sensors:f,collisionDetection:M,onDragEnd:p,children:T}),t[17]=_,t[18]=p,t[19]=f,t[20]=T,t[21]=M,t[22]=A):A=t[22];let P;t[23]!==S||t[24]!==A||t[25]!==v?(P=n.jsxs(S,{className:y,children:[v,A]}),t[23]=S,t[24]=A,t[25]=v,t[26]=P):P=t[26];let z;t[27]!==k||t[28]!==P?(z=n.jsx(k,{className:h,children:P}),t[27]=k,t[28]=P,t[29]=z):z=t[29];let L;return t[30]!==j||t[31]!==z||t[32]!==g?(L=n.jsxs(j,{className:I,children:[g,z]}),t[30]=j,t[31]=z,t[32]=g,t[33]=L):L=t[33],L}function Yr(t){return!!t}function Xr(t){return[t.id,t]}function Jr(t){return t.id}function Zr(t){return t.pinned}function xs(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(b.Suspense,{fallback:n.jsx(De,{className:"py-0 px-0",children:n.jsx(Le,{children:n.jsx(ge,{className:"gap-2",children:n.jsx(ie,{children:n.jsxs("div",{className:"flex items-center gap-2 px-2 py-2",children:[n.jsx(Ve,{className:"h-4 w-4 rounded"}),n.jsx(Ve,{className:"h-4 flex-1"})]})})})})}),children:n.jsx(Qr,{})}),t[0]=e):e=t[0],e}function _l(){const t=C.c(4),e=Zt();let s;t[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(er,{}),t[0]=s):s=t[0];let o;t[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(it,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(xs,{})})}),t[1]=o):o=t[1];let r;return t[2]!==e?(r=n.jsx(ss,{sections:e,footer:s,additionalContent:o}),t[2]=e,t[3]=r):r=t[3],r}function Sl(t){const e=C.c(5),{onClose:s}=t,o=Zt();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsx(tr,{}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(it,{children:n.jsx(b.Suspense,{fallback:null,children:n.jsx(xs,{})})}),e[1]=i):i=e[1];let l;return e[2]!==s||e[3]!==o?(l=n.jsx($o,{sections:o,onClose:s,footer:r,additionalContent:i}),e[2]=s,e[3]=o,e[4]=l):l=e[4],l}function ei(t,e){return t===1?!0:t===0?!1:e}function ti(t){const e=t.entityMetadata?.defaultMainView??null,s=e==null||e.type==="chat",o=t.mainParamPresent?t.mainParamValue!=="0":!s,r=s?!0:t.entityMetadata?.chatDefaultOpen??!1;return{mainOpen:o,chatOpen:r}}function Cl(t,e){return t&&e?{chat:45,main:55}:t&&!e?{chat:100,main:0}:!t&&e?{chat:0,main:100}:{chat:0,main:0}}function si(t,e){return t===1?!0:t===0?!1:e}function Nl(t,e){const s=ve(),o=qe({strict:!1}),r=We({strict:!1}),i=Re(),l=Xt(),{locator:a}=pe(),{virtualMcpId:c,orgSlug:u,isAgentRoute:d}=e,m=ti({entityMetadata:t,mainParamPresent:o.main!==void 0,mainParamValue:o.main}),f=si(o.chat,m.chatOpen),x=m.mainOpen,p=b.useRef(crypto.randomUUID()),j=r.taskId??p.current,I="/$org/$taskId",g=w=>({org:u,taskId:w}),k=d?{virtualmcpid:c}:{},h=(w,$)=>{s({to:I,params:g(j),search:O=>({...O,...w}),replace:$?.replace??!1})},S=(w,$)=>{s({to:I,params:g(w),search:O=>{const T={};return $?T.virtualmcpid=$:d&&(T.virtualmcpid=c),O.tasks&&(T.tasks=O.tasks),T}})},y=()=>{x?h({main:"0"},{replace:!0}):h({main:dn(t)},{replace:!0})},v=()=>{h({chat:f?0:1},{replace:!0})},_=()=>{f||h({chat:1},{replace:!0})},M=async()=>{const w=crypto.randomUUID(),$=Lt(i,a,j);try{await l.create.mutateAsync({id:w,virtual_mcp_id:c,...$?{branch:$}:{}})}catch{}s({to:I,params:g(w),search:O=>{const T={...k,chat:1};return O.tasks&&(T.tasks=O.tasks),T}})},D=w=>{h({main:w},{replace:!0})};return{taskId:j,mainOpen:x,chatOpen:f,mainParam:o.main,setTaskId:S,toggleMain:y,toggleChat:v,openChat:_,createNewTask:M,openTab:D}}const ut=b.createContext(null);function kl(t){const e=C.c(15),{children:s}=t,o=ve();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={strict:!1},e[0]=r):r=e[0];const i=qe(r);let l;e[1]===Symbol.for("react.memo_cache_sentinel")?(l={owner:"all",status:"open"},e[1]=l):l=e[1];const{tasks:a}=ot(l);let c;e[2]!==i.tasks||e[3]!==a.length?(c=()=>ei(i.tasks,a.length>0),e[2]=i.tasks,e[3]=a.length,e[4]=c):c=e[4];const[u,d]=b.useState(c);let m,f;e[5]!==o||e[6]!==u?(m=()=>{o({search:(g=>({...g,tasks:u?1:0})),replace:!0})},f=[u,o],e[5]=o,e[6]=u,e[7]=m,e[8]=f):(m=e[7],f=e[8]),b.useEffect(m,f);let x;e[9]===Symbol.for("react.memo_cache_sentinel")?(x=()=>d(ni),e[9]=x):x=e[9];const p=x;let j;e[10]!==u?(j={tasksOpen:u,toggleTasks:p},e[10]=u,e[11]=j):j=e[11];let I;return e[12]!==s||e[13]!==j?(I=n.jsx(ut.Provider,{value:j,children:s}),e[12]=s,e[13]=j,e[14]=I):I=e[14],I}function ni(t){return!t}function wl(){const t=b.useContext(ut);if(!t)throw new Error("useTasksPanelState must be used inside <TasksPanelStateProvider>");return t}function Il(){return b.useContext(ut)}const ps=b.createContext(null);function Ce(){const t=b.use(ps);if(!t)throw new Error("Toolbar.* must be used inside <Toolbar>");return t}function le(t){const e=C.c(10),{children:s}=t,[o,r]=b.useState(null),[i,l]=b.useState(null),[a,c]=b.useState(null),[u,d]=b.useState(null);let m;e[0]!==a||e[1]!==u||e[2]!==i||e[3]!==o?(m={togglesEl:o,setTogglesEl:r,tabsEl:i,setTabsEl:l,centerEl:a,setCenterEl:c,rightEl:u,setRightEl:d},e[0]=a,e[1]=u,e[2]=i,e[3]=o,e[4]=m):m=e[4];let f;e[5]!==s?(f=n.jsx("div",{className:"flex flex-col h-full min-h-0",children:s}),e[5]=s,e[6]=f):f=e[6];let x;return e[7]!==m||e[8]!==f?(x=n.jsx(ps,{value:m,children:f}),e[7]=m,e[8]=f,e[9]=x):x=e[9],x}function oi(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"shrink-0 grid grid-cols-3 items-center pl-1 pr-2 pt-0.25 h-12",children:s}),e[0]=s,e[1]=o):o=e[1],o}function ri(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"flex items-center gap-0.5 min-w-0 justify-self-start",children:s}),e[0]=s,e[1]=o):o=e[1],o}function ii(t){const e=C.c(2),{children:s}=t;let o;return e[0]!==s?(o=n.jsx("div",{className:"flex items-center justify-end gap-0.5 min-w-0 justify-self-end",children:s}),e[0]=s,e[1]=o):o=e[1],o}function li(){const t=C.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("button",{type:"button",onClick:ci,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:n.jsx(hn,{size:16})}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsxs(n.Fragment,{children:[e,n.jsx("button",{type:"button",onClick:ai,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:n.jsx(ho,{size:16})})]}),t[1]=s):s=t[1],s}function ai(){return window.history.forward()}function ci(){return window.history.back()}function di(){const t=C.c(2),{setCenterEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"min-w-0 flex items-center justify-center gap-2"}),t[0]=e,t[1]=s):s=t[1],s}function ui(t){const e=C.c(3),{children:s}=t,{centerEl:o}=Ce();if(!o)return null;let r;return e[0]!==o||e[1]!==s?(r=Ee.createPortal(s,o),e[0]=o,e[1]=s,e[2]=r):r=e[2],r}function mi(){const t=C.c(2),{setTabsEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"shrink-0 flex items-center"}),t[0]=e,t[1]=s):s=t[1],s}function fi(t){const e=C.c(3),{children:s}=t,{tabsEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}function xi(){const t=C.c(2),{setTogglesEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"flex items-center gap-0.5 shrink-0 ml-0.5"}),t[0]=e,t[1]=s):s=t[1],s}function pi(t){const e=C.c(3),{children:s}=t,{togglesEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}function hi(){const t=C.c(2),{setRightEl:e}=Ce();let s;return t[0]!==e?(s=n.jsx("div",{ref:e,className:"flex items-center justify-end gap-0.5 shrink-0"}),t[0]=e,t[1]=s):s=t[1],s}function gi(t){const e=C.c(3),{children:s}=t,{rightEl:o}=Ce();if(!o)return null;let r;return e[0]!==s||e[1]!==o?(r=Ee.createPortal(s,o),e[0]=s,e[1]=o,e[2]=r):r=e[2],r}le.Header=oi;le.LeftColumn=ri;le.RightColumn=ii;le.Nav=li;le.CenterSlot=di;le.Center=ui;le.TabsSlot=mi;le.Tabs=fi;le.TogglesSlot=xi;le.Toggles=pi;le.RightSlot=hi;le.Right=gi;function bi(){const t=C.c(6),{org:e,locator:s}=pe(),o=Re();let r;t[0]!==s||t[1]!==o?(r=()=>{o.invalidateQueries({queryKey:Pt.tasksPrefix(s)})},t[0]=s,t[1]=o,t[2]=r):r=t[2];let i;t[3]!==e.slug||t[4]!==r?(i={orgSlug:e.slug,onTaskStatus:r},t[3]=e.slug,t[4]=r,t[5]=i):i=t[5],bo(i)}function ji(t){const e=C.c(8),{virtualMcpId:s,size:o,showAutomationBadge:r}=t,i=o===void 0?"sm":o;let l;e[0]!==i||e[1]!==s?(l=s?n.jsx(vi,{virtualMcpId:s,size:i}):n.jsx(Pe,{icon:null,name:"?",size:i}),e[0]=i,e[1]=s,e[2]=l):l=e[2];let a;e[3]!==r?(a=r&&n.jsx("span",{"aria-label":"Automation-triggered",className:"absolute -bottom-0.5 -right-0.5 flex size-4 items-center justify-center rounded-full bg-blue-500 border border-blue-600 text-white",children:n.jsx(vo,{size:10,className:"text-white"})}),e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==l||e[6]!==a?(c=n.jsxs("div",{className:"relative shrink-0",children:[l,a]}),e[5]=l,e[6]=a,e[7]=c):c=e[7],c}function vi(t){const e=C.c(6),{virtualMcpId:s,size:o}=t,r=Qt(s);if(!r){let a;return e[0]!==o?(a=n.jsx(Pe,{icon:null,name:"?",size:o}),e[0]=o,e[1]=a):a=e[1],a}const i=r.icon??null;let l;return e[2]!==r.title||e[3]!==o||e[4]!==i?(l=n.jsx(Pe,{icon:i,name:r.title,size:o}),e[2]=r.title,e[3]=o,e[4]=i,e[5]=l):l=e[5],l}function yi(t){const e=t?.metadata?.githubRepo;return e?.connectionId&&t?.connections?.some(o=>o.connection_id===e.connectionId)?e:null}function _i(t){const e=C.c(47),{task:s,isActive:o,onClick:r,onArchive:i,showAutomationBadge:l}=t,a=yo(s.status),c=a.icon,u=Qt(s.virtual_mcp_id);let d;e[0]!==u?(d=yi(u),e[0]=u,e[1]=d):d=e[1];const m=d,f=b.useRef(null);let x;e[2]!==o?(x=()=>{if(!o)return;const V=f.current;V&&(V.focus({preventScroll:!0}),V.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}))},e[2]=o,e[3]=x):x=e[3];let p;e[4]!==o||e[5]!==s.id?(p=[o,s.id],e[4]=o,e[5]=s.id,e[6]=p):p=e[6],b.useEffect(x,p);const j="button",I=0;let g;e[7]!==r?(g=V=>{V.target===V.currentTarget&&(V.key==="Enter"||V.key===" ")&&(V.preventDefault(),r())},e[7]=r,e[8]=g):g=e[8];const k=o?"bg-accent":"hover:bg-accent/60";let h;e[9]!==k?(h=J("group/row flex items-center gap-3 px-2 py-1.5 rounded-md cursor-pointer transition-colors","focus-visible:outline-none focus-visible:inset-ring-2 focus-visible:inset-ring-ring/50",k),e[9]=k,e[10]=h):h=e[10];let S;e[11]!==l||e[12]!==s.virtual_mcp_id?(S=n.jsx(ji,{virtualMcpId:s.virtual_mcp_id,size:"xs",showAutomationBadge:l}),e[11]=l,e[12]=s.virtual_mcp_id,e[13]=S):S=e[13];const y=s.title||"Untitled task";let v;e[14]!==y?(v=n.jsx("div",{className:"text-sm text-foreground truncate",children:y}),e[14]=y,e[15]=v):v=e[15];let _;e[16]!==m||e[17]!==s.branch||e[18]!==s.updated_at?(_=s.updated_at&&n.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground min-w-0",children:[s.branch?n.jsxs(n.Fragment,{children:[n.jsx("span",{className:"truncate font-mono",children:s.branch}),n.jsx("span",{className:"shrink-0",children:"·"})]}):m?n.jsxs(n.Fragment,{children:[n.jsxs("span",{className:"truncate",children:[m.owner,"/",m.name]}),n.jsx("span",{className:"shrink-0",children:"·"})]}):null,n.jsx("span",{className:"shrink-0",children:un(new Date(s.updated_at))})]}),e[16]=m,e[17]=s.branch,e[18]=s.updated_at,e[19]=_):_=e[19];let M;e[20]!==v||e[21]!==_?(M=n.jsxs("div",{className:"flex-1 min-w-0",children:[v,_]}),e[20]=v,e[21]=_,e[22]=M):M=e[22];const D="shrink-0 grid [grid-template-areas:'slot'] items-center justify-items-center",w="[grid-area:slot] flex size-7 items-center justify-center group-hover/row:invisible",$=a.label,O=14,T=J(a.iconClassName,s.status==="in_progress"&&"animate-spin");let A;e[23]!==c||e[24]!==T?(A=n.jsx(c,{size:O,className:T}),e[23]=c,e[24]=T,e[25]=A):A=e[25];let P;e[26]!==a||e[27]!==A?(P=n.jsx("span",{className:w,"aria-label":$,children:A}),e[26]=a,e[27]=A,e[28]=P):P=e[28];let z;e[29]!==i?(z=V=>{V.stopPropagation(),i()},e[29]=i,e[30]=z):z=e[30];let L;e[31]===Symbol.for("react.memo_cache_sentinel")?(L=n.jsx(jo,{size:14}),e[31]=L):L=e[31];let R;e[32]!==z?(R=n.jsx(tt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Archive task",onClick:z,className:"[grid-area:slot] invisible group-hover/row:visible flex size-7 items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-muted",children:L})}),e[32]=z,e[33]=R):R=e[33];let B;e[34]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(st,{side:"right",children:"Archive"}),e[34]=B):B=e[34];let U;e[35]!==R?(U=n.jsxs(nt,{children:[R,B]}),e[35]=R,e[36]=U):U=e[36];let F;e[37]!==P||e[38]!==U?(F=n.jsxs("div",{className:D,children:[P,U]}),e[37]=P,e[38]=U,e[39]=F):F=e[39];let H;return e[40]!==r||e[41]!==M||e[42]!==F||e[43]!==g||e[44]!==h||e[45]!==S?(H=n.jsxs("div",{ref:f,role:j,tabIndex:I,onClick:r,onKeyDown:g,className:h,children:[S,M,F]}),e[40]=r,e[41]=M,e[42]=F,e[43]=g,e[44]=h,e[45]=S,e[46]=H):H=e[46],H}const hs={all:"All tasks",manual:"Chats",automation:"Automation"},gs={all:"All members",mine:"Mine only"};function Si(t){const e=C.c(59),{title:s,tasks:o,activeTaskId:r,onSelect:i,onArchive:l,onNew:a,showNewButton:c,showAutomationBadge:u,emptyLabel:d,currentUserId:m}=t,[f,x]=b.useState("all"),[p,j]=b.useState("mine");let I;e[0]!==m||e[1]!==p||e[2]!==o?(I=p==="mine"&&m?o.filter(N=>N.created_by===m):o,e[0]=m,e[1]=p,e[2]=o,e[3]=I):I=e[3];const g=I;let k;e[4]!==f||e[5]!==g?(k=f==="automation"?g.filter(wi):f==="manual"?g.filter(ki):g,e[4]=f,e[5]=g,e[6]=k):k=e[6];const h=k;let S;e[7]!==s?(S=n.jsx("span",{children:s}),e[7]=s,e[8]=S):S=e[8];let y;e[9]!==p?(y=n.jsx(vt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Filter by member",className:"flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",children:p==="mine"?n.jsx(on,{size:16}):n.jsx(Vt,{size:16})})}),e[9]=p,e[10]=y):y=e[10];let v;e[11]!==p?(v=N=>{const K=N;K!==p&&se("tasks_panel_member_filter_changed",{to_value:K}),j(K)},e[11]=p,e[12]=v):v=e[12];let _;e[13]===Symbol.for("react.memo_cache_sentinel")?(_=Object.keys(gs),e[13]=_):_=e[13];let M;e[14]===Symbol.for("react.memo_cache_sentinel")?(M=_.map(Ni),e[14]=M):M=e[14];let D;e[15]!==p||e[16]!==v?(D=n.jsx(yt,{align:"end",children:n.jsx(_t,{value:p,onValueChange:v,children:M})}),e[15]=p,e[16]=v,e[17]=D):D=e[17];let w;e[18]!==y||e[19]!==D?(w=n.jsxs(St,{children:[y,D]}),e[18]=y,e[19]=D,e[20]=w):w=e[20];const $=f!=="all"&&"text-purple-500";let O;e[21]!==$?(O=J("flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",$),e[21]=$,e[22]=O):O=e[22];let T;e[23]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsx(fn,{size:16}),e[23]=T):T=e[23];let A;e[24]!==O?(A=n.jsx(vt,{asChild:!0,children:n.jsx("button",{type:"button","aria-label":"Filter tasks",className:O,children:T})}),e[24]=O,e[25]=A):A=e[25];let P;e[26]!==f?(P=N=>{const K=N;K!==f&&se("tasks_panel_filter_changed",{to_value:K}),x(K)},e[26]=f,e[27]=P):P=e[27];let z;e[28]===Symbol.for("react.memo_cache_sentinel")?(z=Object.keys(hs),e[28]=z):z=e[28];let L;e[29]===Symbol.for("react.memo_cache_sentinel")?(L=z.map(Ci),e[29]=L):L=e[29];let R;e[30]!==f||e[31]!==P?(R=n.jsx(yt,{align:"end",children:n.jsx(_t,{value:f,onValueChange:P,children:L})}),e[30]=f,e[31]=P,e[32]=R):R=e[32];let B;e[33]!==A||e[34]!==R?(B=n.jsxs(St,{children:[A,R]}),e[33]=A,e[34]=R,e[35]=B):B=e[35];let U;e[36]!==a||e[37]!==c||e[38]!==s?(U=c&&a&&n.jsx("button",{type:"button",onClick:()=>{se("tasks_panel_new_clicked"),a()},"aria-label":`New ${s.toLowerCase()}`,className:"flex size-8 items-center justify-center rounded-md hover:bg-muted hover:text-foreground",children:n.jsx(nn,{size:16})}),e[36]=a,e[37]=c,e[38]=s,e[39]=U):U=e[39];let F;e[40]!==B||e[41]!==U||e[42]!==w?(F=n.jsxs("div",{className:"flex items-center gap-0.5",children:[w,B,U]}),e[40]=B,e[41]=U,e[42]=w,e[43]=F):F=e[43];let H;e[44]!==F||e[45]!==S?(H=n.jsxs("div",{className:"shrink-0 pl-2 pr-1.5 h-7 flex items-center justify-between text-xs font-medium text-muted-foreground mb-1",children:[S,F]}),e[44]=F,e[45]=S,e[46]=H):H=e[46];let V;e[47]!==r||e[48]!==d||e[49]!==l||e[50]!==i||e[51]!==u||e[52]!==h?(V=h.length===0&&d?n.jsx("div",{className:"px-2 py-1.5 text-xs text-muted-foreground/70",children:d}):h.map(N=>n.jsx(_i,{task:N,isActive:r===N.id,onClick:()=>{r!==N.id&&se("tasks_panel_task_clicked",{thread_id:N.id,virtual_mcp_id:N.virtual_mcp_id??null,from_automation:!!N.fromAutomation}),i(N)},onArchive:()=>{se("tasks_panel_task_archived",{thread_id:N.id,virtual_mcp_id:N.virtual_mcp_id??null}),l(N)},showAutomationBadge:u||N.fromAutomation},N.id)),e[47]=r,e[48]=d,e[49]=l,e[50]=i,e[51]=u,e[52]=h,e[53]=V):V=e[53];let q;e[54]!==V?(q=n.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto flex flex-col gap-0.5",children:V}),e[54]=V,e[55]=q):q=e[55];let Q;return e[56]!==H||e[57]!==q?(Q=n.jsxs("div",{className:"flex flex-col h-full min-h-0 mt-1",children:[H,q]}),e[56]=H,e[57]=q,e[58]=Q):Q=e[58],Q}function Ci(t){return n.jsx(Jt,{value:t,children:hs[t]},t)}function Ni(t){return n.jsx(Jt,{value:t,children:gs[t]},t)}function ki(t){return!t.fromAutomation}function wi(t){return t.fromAutomation}function Ii(){const t=C.c(23);bi();const{data:e}=Se.useSession(),s=e?.user?.id;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={owner:"me",status:"open",hasTrigger:!1},t[0]=o):o=t[0];const{tasks:r}=ot(o);let i;t[1]===Symbol.for("react.memo_cache_sentinel")?(i={owner:"all",status:"open",hasTrigger:!0},t[1]=i):i=t[1];const{tasks:l}=ot(i),{setTaskId:a,createNewTask:c}=Dt();let u;t[2]===Symbol.for("react.memo_cache_sentinel")?(u={strict:!1},t[2]=u):u=t[2];const d=We(u),{locator:m,org:f}=pe(),x=Re();let p;t[3]!==f.id||t[4]!==f.slug?(p={connectionId:Kt,orgId:f.id,orgSlug:f.slug},t[3]=f.id,t[4]=f.slug,t[5]=p):p=t[5];const j=Wt(p),I=d.taskId??null;let g;t[6]!==l||t[7]!==r?(g=[...r,...l.map($i)].sort(Mi),t[6]=l,t[7]=r,t[8]=g):g=t[8];const k=g;let h;t[9]!==j||t[10]!==m||t[11]!==x?(h=async _=>{try{await po(j,_.id,{hidden:!0}),x.invalidateQueries({queryKey:Pt.tasksPrefix(m)})}catch(M){const w=M;je.error(`Failed to archive task: ${w.message}`)}},t[9]=j,t[10]=m,t[11]=x,t[12]=h):h=t[12];const S=h;if(k.length===0){let _;return t[13]===Symbol.for("react.memo_cache_sentinel")?(_=n.jsx("div",{className:"h-full flex items-center justify-center p-4",children:n.jsx(go,{image:n.jsx(rn,{size:48,className:"text-muted-foreground"}),title:"No tasks yet",description:"Start a conversation to create your first task."})}),t[13]=_):_=t[13],_}let y;t[14]!==a?(y=_=>a(_.id,_.virtual_mcp_id),t[14]=a,t[15]=y):y=t[15];let v;return t[16]!==I||t[17]!==k||t[18]!==c||t[19]!==s||t[20]!==S||t[21]!==y?(v=n.jsx("div",{className:"flex flex-col h-full min-h-0 p-2 gap-3",children:n.jsx(Si,{title:"Tasks",tasks:k,activeTaskId:I,onSelect:y,onArchive:S,onNew:c,showNewButton:!0,currentUserId:s})}),t[16]=I,t[17]=k,t[18]=c,t[19]=s,t[20]=S,t[21]=y,t[22]=v):v=t[22],v}function Mi(t,e){return(e.updated_at??"").localeCompare(t.updated_at??"")}function $i(t){return{...t,fromAutomation:!0}}function Ti(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx("div",{className:"flex flex-col h-full p-2 gap-1.5",children:Array.from({length:6}).map(Ai)}),t[0]=e):e=t[0],e}function Ai(t,e){return n.jsx("div",{className:"h-10 rounded-md bg-muted/60 animate-pulse"},e)}function Ml(){const t=C.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=n.jsx(Wn.Skeleton,{}),t[0]=e):e=t[0];let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx(it,{fallback:e,children:n.jsx(b.Suspense,{fallback:n.jsx(Ti,{}),children:n.jsx(Ii,{})})}),t[1]=s):s=t[1],s}export{_l as S,Ml as T,kl as a,le as b,Sl as c,Cl as d,Il as e,Nl as f,yi as g,wl as u};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-D6WP-9Mz.js","assets/index-B_OOgiEa.js","assets/index-CpHJcJk3.css","assets/ArrowNarrowLeft-CdHYti4b.js","assets/CheckCircle-uoVBaQQY.js","assets/Container-e4KoMY54.js","assets/Settings02-B4xVAQg7.js","assets/XCircle-CwRlSPkG.js","assets/constants-D5Po9Lb5.js","assets/useInfiniteQuery-ZZ7aYlwI.js","assets/infiniteQueryObserver-Djo7_6Dx.js","assets/badge-DVYtPj3Q.js","assets/input-BQQp-6KZ.js","assets/dropdown-menu-B2SzMipC.js","assets/Check-B1QjP0lW.js","assets/ChevronRight-C75N1vRO.js","assets/DotsVertical-Bl74LMdL.js","assets/table-YZX5FqNR.js","assets/toggle-group-CrVa8CeF.js","assets/use-view-mode-C2T_AD4N.js","assets/tooltip-7fE-WE8n.js","assets/SearchMd-DENJ3C2Y.js","assets/dialog-59APH-gQ.js","assets/X-CuBCe85s.js","assets/AlertCircle-DenZ2tH1.js","assets/alert-dialog-DbOFkimV.js","assets/card-DF88hzU1.js","assets/Trash01-CqvPY4I1.js","assets/label-DC5mP9Z5.js","assets/select-Bibny-1X.js","assets/ChevronDown-CW5suF8w.js","assets/ChevronUp-D9vKVRMW.js","assets/switch-B5LXqu_k.js","assets/textarea-B34jNm12.js","assets/RefreshCcw01-Bv9_h0OY.js","assets/checkbox-KaNd7DxH.js","assets/LinkExternal01-JpLMSezj.js","assets/use-copy-BM6tbEKn.js","assets/Plus-BdkW25go.js","assets/Play-DNddfPVv.js"])))=>i.map(i=>d[i]);
2
- import{e as a,j as t,r,l as i,_ as o}from"./index-B_OOgiEa.js";const n=r.lazy(()=>o(()=>import("./registry-layout-D6WP-9Mz.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,39])));function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(r.Suspense,{fallback:t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(i,{size:20,className:"animate-spin text-muted-foreground"})}),children:t.jsx(n,{})}),s[0]=e):e=s[0],e}export{c as default};
@@ -1 +0,0 @@
1
- import{e as k,g as E,U as L,j as s,s as R,aG as D,c as $,L as z,t as T,b as W,O as I,l as H,r as J}from"./index-B_OOgiEa.js";import{S as K,a as Q,b as V,u as X,f as w,g as C,h as O,k as P,j as M,m as Y,n as Z,q as A,c as ee,d as se,e as te}from"./index-B9Elrkih.js";import{i as q}from"./ArrowNarrowLeft-CdHYti4b.js";import{c as le,d as ne,b as re,e as ie,f as oe,i as F,a as ae,n as ce}from"./ZapSquare-q2bTQS4w.js";import{t as me,a as G}from"./Users03-l6fjto8R.js";import{i as de}from"./ChevronRight-C75N1vRO.js";import{i as fe}from"./Lock01-ChyzS6Qk.js";import{i as xe}from"./Shield01-CISf8vls.js";import{s as be}from"./User01-DcOBCx9n.js";import{i as B}from"./Zap-BBT7v7w5.js";import{u as he}from"./tooltip-7fE-WE8n.js";import{u as ue}from"./use-status-sounds-CW-esQf_.js";import"./X-CuBCe85s.js";import"./question-004-sINsf4GQ.js";import"./use-decopilot-events-DUjp4NXe.js";import"./create-sse-subscription-CxkOgzKf.js";function U(){const e=k.c(29),t=R().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=D.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=U();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=L(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:()=>T("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.311.9"]})}),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(){T("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=U();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=L(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.311.9"]})}),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}=R();ue(n.slug);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(H,{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(J.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 De(){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(K,{defaultOpen:!0,children:s.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:s.jsxs(Q,{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,De as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/registry-layout-D6WP-9Mz.js","assets/index-B_OOgiEa.js","assets/index-CpHJcJk3.css","assets/ArrowNarrowLeft-CdHYti4b.js","assets/CheckCircle-uoVBaQQY.js","assets/Container-e4KoMY54.js","assets/Settings02-B4xVAQg7.js","assets/XCircle-CwRlSPkG.js","assets/constants-D5Po9Lb5.js","assets/useInfiniteQuery-ZZ7aYlwI.js","assets/infiniteQueryObserver-Djo7_6Dx.js","assets/badge-DVYtPj3Q.js","assets/input-BQQp-6KZ.js","assets/dropdown-menu-B2SzMipC.js","assets/Check-B1QjP0lW.js","assets/ChevronRight-C75N1vRO.js","assets/DotsVertical-Bl74LMdL.js","assets/table-YZX5FqNR.js","assets/toggle-group-CrVa8CeF.js","assets/use-view-mode-C2T_AD4N.js","assets/tooltip-7fE-WE8n.js","assets/SearchMd-DENJ3C2Y.js","assets/dialog-59APH-gQ.js","assets/X-CuBCe85s.js","assets/AlertCircle-DenZ2tH1.js","assets/alert-dialog-DbOFkimV.js","assets/card-DF88hzU1.js","assets/Trash01-CqvPY4I1.js","assets/label-DC5mP9Z5.js","assets/select-Bibny-1X.js","assets/ChevronDown-CW5suF8w.js","assets/ChevronUp-D9vKVRMW.js","assets/switch-B5LXqu_k.js","assets/textarea-B34jNm12.js","assets/RefreshCcw01-Bv9_h0OY.js","assets/checkbox-KaNd7DxH.js","assets/LinkExternal01-JpLMSezj.js","assets/use-copy-BM6tbEKn.js","assets/Plus-BdkW25go.js","assets/Play-DNddfPVv.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,_ as u}from"./index-B_OOgiEa.js";const _=l.lazy(()=>u(()=>import("./registry-layout-D6WP-9Mz.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,39])));function x(){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(_,{onBack:()=>o({to:"/$org/settings/store",params:{org:i}})})}),e[2]=o,e[3]=i,e[4]=a):a=e[4],a}export{x as default};
@@ -1 +0,0 @@
1
- import{I as u}from"./infiniteQueryObserver-Djo7_6Dx.js";import{c2 as i}from"./index-B_OOgiEa.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +0,0 @@
1
- import{I as s}from"./infiniteQueryObserver-Djo7_6Dx.js";import{c2 as u,c3 as n}from"./index-B_OOgiEa.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 s,g as l,j as o,l as a,E as n,r as c}from"./index-B_OOgiEa.js";import{a as f}from"./index-9smU3vak.js";import"./index-DHTAzDdj.js";import"./constants-D5Po9Lb5.js";import"./collections-BGO4ETj2.js";import"./index-BT3jRQuX.js";import"./use-virtual-mcp-Bqk6k6NQ.js";import"./use-collections-BvXCKCPf.js";import"./monaco-editor-Bx4gABcs.js";import"./index-B2WBo1WB.js";import"./accordion-ChtmP3A-.js";import"./agent-icon-aCG4rJO5.js";import"./AlertCircle-DenZ2tH1.js";import"./Tool01-CBOCDbIq.js";import"./Archive-CUyKZVLi.js";import"./XClose-BYpD-FW2.js";import"./RefreshCcw01-Bv9_h0OY.js";import"./ArrowNarrowLeft-CdHYti4b.js";import"./XCircle-CwRlSPkG.js";import"./ArrowUpRight-DQA2yLzS.js";import"./ZapSquare-q2bTQS4w.js";import"./Users03-l6fjto8R.js";import"./CheckCircle-uoVBaQQY.js";import"./Check-B1QjP0lW.js";import"./ChevronDown-CW5suF8w.js";import"./ChevronRight-C75N1vRO.js";import"./ChevronUp-D9vKVRMW.js";import"./DotsVertical-Bl74LMdL.js";import"./Container-e4KoMY54.js";import"./Star01-B90yQrQf.js";import"./Palette-DxkFGkUo.js";import"./SearchMd-DENJ3C2Y.js";import"./index-B9Elrkih.js";import"./tooltip-7fE-WE8n.js";import"./X-CuBCe85s.js";import"./LinkExternal01-JpLMSezj.js";import"./Lock01-ChyzS6Qk.js";import"./Sun-jOb3MXPJ.js";import"./Play-DNddfPVv.js";import"./Plus-BdkW25go.js";import"./Settings02-B4xVAQg7.js";import"./Shield01-CISf8vls.js";import"./Trash01-CqvPY4I1.js";import"./User01-DcOBCx9n.js";import"./Zap-BBT7v7w5.js";import"./badge-DVYtPj3Q.js";import"./select-Bibny-1X.js";import"./view-mode-toggle-Dg2K0IHy.js";import"./layout-DtZHLBeB.js";import"./use-connection-BHzWUZTk.js";import"./use-mcp-tools-DkrDenYe.js";import"./dialog-59APH-gQ.js";import"./index-CsMR0Ypg.js";import"./dropdown-menu-B2SzMipC.js";import"./integration-icon-Box-itol.js";import"./scroll-area-BDlizEf_.js";import"./index-0FuZBqpL.js";import"./empty-state-DkaEz1nV.js";import"./create-sse-subscription-CxkOgzKf.js";import"./input-BQQp-6KZ.js";function Et(){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{Et as default};
@@ -1,20 +0,0 @@
1
- Copyright Mathias Bynens <https://mathiasbynens.be/>
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,107 +0,0 @@
1
- # emoji-regex [![Build status](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml/badge.svg)](https://github.com/mathiasbynens/emoji-regex/actions/workflows/main.yml) [![emoji-regex on npm](https://img.shields.io/npm/v/emoji-regex)](https://www.npmjs.com/package/emoji-regex)
2
-
3
- _emoji-regex_ offers a regular expression to match all emoji symbols and sequences (including textual representations of emoji) as per the Unicode Standard. It’s based on [_emoji-test-regex-pattern_](https://github.com/mathiasbynens/emoji-test-regex-pattern), which generates (at build time) the regular expression pattern based on the Unicode Standard. As a result, _emoji-regex_ can easily be updated whenever new emoji are added to Unicode.
4
-
5
- Since each version of _emoji-regex_ is tied to the latest Unicode version at the time of release, results are deterministic. This is important for use cases like image replacement, where you want to guarantee that an image asset is available for every possibly matched emoji. If you don’t need a deterministic regex, a lighter-weight, general emoji pattern is available via the [_emoji-regex-xs_](https://github.com/slevithan/emoji-regex-xs) package that follows the same API.
6
-
7
- ## Installation
8
-
9
- Via [npm](https://www.npmjs.com/):
10
-
11
- ```bash
12
- npm install emoji-regex
13
- ```
14
-
15
- In [Node.js](https://nodejs.org/):
16
-
17
- ```js
18
- const emojiRegex = require('emoji-regex');
19
- // Note: because the regular expression has the global flag set, this module
20
- // exports a function that returns the regex rather than exporting the regular
21
- // expression itself, to make it impossible to (accidentally) mutate the
22
- // original regular expression.
23
-
24
- const text = `
25
- \u{231A}: ⌚ default emoji presentation character (Emoji_Presentation)
26
- \u{2194}\u{FE0F}: ↔️ default text presentation character rendered as emoji
27
- \u{1F469}: 👩 emoji modifier base (Emoji_Modifier_Base)
28
- \u{1F469}\u{1F3FF}: 👩🏿 emoji modifier base followed by a modifier
29
- `;
30
-
31
- const regex = emojiRegex();
32
- for (const match of text.matchAll(regex)) {
33
- const emoji = match[0];
34
- console.log(`Matched sequence ${ emoji } — code points: ${ [...emoji].length }`);
35
- }
36
- ```
37
-
38
- Console output:
39
-
40
- ```
41
- Matched sequence ⌚ — code points: 1
42
- Matched sequence ⌚ — code points: 1
43
- Matched sequence ↔️ — code points: 2
44
- Matched sequence ↔️ — code points: 2
45
- Matched sequence 👩 — code points: 1
46
- Matched sequence 👩 — code points: 1
47
- Matched sequence 👩🏿 — code points: 2
48
- Matched sequence 👩🏿 — code points: 2
49
- ```
50
-
51
- ## For maintainers
52
-
53
- ### How to update emoji-regex after new Unicode Standard releases
54
-
55
- 1. [Update _emoji-test-regex-pattern_ as described in its repository](https://github.com/mathiasbynens/emoji-test-regex-pattern#how-to-update-emoji-test-regex-pattern-after-new-uts51-releases).
56
-
57
- 1. Bump the _emoji-test-regex-pattern_ dependency to the latest version.
58
-
59
- 1. Update the Unicode data dependency in `package.json` by running the following commands:
60
-
61
- ```sh
62
- # Example: updating from Unicode v13 to Unicode v14.
63
- npm uninstall @unicode/unicode-13.0.0
64
- npm install @unicode/unicode-14.0.0 --save-dev
65
- ````
66
-
67
- 1. Generate the new output:
68
-
69
- ```sh
70
- npm run build
71
- ```
72
-
73
- 1. Verify that tests still pass:
74
-
75
- ```sh
76
- npm test
77
- ```
78
-
79
- ### How to publish a new release
80
-
81
- 1. On the `main` branch, bump the emoji-regex version number in `package.json`:
82
-
83
- ```sh
84
- npm version patch -m 'Release v%s'
85
- ```
86
-
87
- Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).
88
-
89
- Note that this produces a Git commit + tag.
90
-
91
- 1. Push the release commit and tag:
92
-
93
- ```sh
94
- git push && git push --tags
95
- ```
96
-
97
- Our CI then automatically publishes the new release to npm.
98
-
99
- ## Author
100
-
101
- | [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
102
- |---|
103
- | [Mathias Bynens](https://mathiasbynens.be/) |
104
-
105
- ## License
106
-
107
- _emoji-regex_ is available under the [MIT](https://mths.be/mit) license.
@@ -1,3 +0,0 @@
1
- declare module 'emoji-regex' {
2
- export default function emojiRegex(): RegExp;
3
- }