decocms 4.329.9 → 4.330.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (274) hide show
  1. package/dist/client/assets/{AlertCircle-C3LoifMU.js → AlertCircle-jy0frqbf.js} +1 -1
  2. package/dist/client/assets/{AreaChart-CDm5bL_P.js → AreaChart-B1x8DVFG.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B1xlMMf7.js → ArrowLeft-BUQYrPiB.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-ClAJQium.js → ArrowUp-Avwdkd90.js} +1 -1
  5. package/dist/client/assets/{Check-CRib0DYD.js → Check-CxhsqO-U.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CqjXQQar.js → CheckCircle-FHm0D3iO.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-D1ZP1lTE.js → ChevronRight-BiHn5vM-.js} +1 -1
  8. package/dist/client/assets/{ChevronSelectorVertical-CtALiTfe.js → ChevronSelectorVertical-BbRv2olL.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DMr_Wd-m.js → ChevronUp-DKezAGzO.js} +1 -1
  10. package/dist/client/assets/{Copy01-CqZdC3Iz.js → Copy01-Bmz39xbH.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-B_93t25t.js → CreditCard01-C5e5Hx42.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-Cm1eM3WR.js → DotsVertical-8AlMAR5c.js} +1 -1
  13. package/dist/client/assets/{Download01-DWG0sleJ.js → Download01-CPeLy8ol.js} +1 -1
  14. package/dist/client/assets/{ErrorBarContext-C6tA_A4b.js → ErrorBarContext-3LhkDp4X.js} +1 -1
  15. package/dist/client/assets/{Eye-DTZwtLhN.js → Eye-DusgBAO3.js} +1 -1
  16. package/dist/client/assets/{GitBranch01-CaAHRAAs.js → GitBranch01-CfVfwURq.js} +1 -1
  17. package/dist/client/assets/{Globe01-DLIxci_G.js → Globe01-wWGdeE3H.js} +1 -1
  18. package/dist/client/assets/{HardDrive-Uu4_IDmh.js → HardDrive-CA1tnjg8.js} +1 -1
  19. package/dist/client/assets/{Image01-uIGiropd.js → Image01-DYzKv2ko.js} +1 -1
  20. package/dist/client/assets/{Key01-rPnY8MXp.js → Key01-CGEDvfUF.js} +1 -1
  21. package/dist/client/assets/{Link01-BR5WsLAe.js → Link01-DXelhbvI.js} +1 -1
  22. package/dist/client/assets/{LinkExternal01-DmLtBDzc.js → LinkExternal01-DNSJJFeL.js} +1 -1
  23. package/dist/client/assets/{Monitor01-BdeUVVjA.js → Monitor01-CH4zCn1-.js} +1 -1
  24. package/dist/client/assets/{Package-dd8Ej5fp.js → Package-Z0p4dNPa.js} +1 -1
  25. package/dist/client/assets/{Palette-DeAY5oYq.js → Palette-3dQlQIWI.js} +1 -1
  26. package/dist/client/assets/{Play-Btz8ch8N.js → Play-DsDbYPnC.js} +1 -1
  27. package/dist/client/assets/{Plus-DuAHW1Gi.js → Plus-sgFP0HSc.js} +1 -1
  28. package/dist/client/assets/{SearchMd-DwtkgExc.js → SearchMd-DUxlDNtX.js} +1 -1
  29. package/dist/client/assets/{Sector-CQ1UQxx5.js → Sector-B74hc5Ef.js} +1 -1
  30. package/dist/client/assets/{Settings02-BBjxFEhG.js → Settings02-BiZT44gx.js} +1 -1
  31. package/dist/client/assets/{Share07-BqnpVx68.js → Share07-BUsrOXMs.js} +1 -1
  32. package/dist/client/assets/{Shield01-D5teTWzy.js → Shield01-BkWJSg7j.js} +1 -1
  33. package/dist/client/assets/{Stars01-_V6kPVkS.js → Stars01-D42AB0fG.js} +1 -1
  34. package/dist/client/assets/{Sun-CN8rCL7E.js → Sun-CCthEe37.js} +1 -1
  35. package/dist/client/assets/{Tool01-Cfifxqbk.js → Tool01-Bww8mLXx.js} +1 -1
  36. package/dist/client/assets/{Tool02-DbxYQXJB.js → Tool02-CMTwSQ00.js} +1 -1
  37. package/dist/client/assets/{Trash01-CeiHA_Cf.js → Trash01-Cy8JukTX.js} +1 -1
  38. package/dist/client/assets/{TrendUp01-wKu74L0k.js → TrendUp01-C1Wh3jCv.js} +1 -1
  39. package/dist/client/assets/{Upload01-CHJWPT7q.js → Upload01-Vx_sWXby.js} +1 -1
  40. package/dist/client/assets/{User01-BDiBNFRN.js → User01-wgouKLSs.js} +1 -1
  41. package/dist/client/assets/{UserSquare-BKKMbWcC.js → UserSquare-1xv6DUe1.js} +1 -1
  42. package/dist/client/assets/{Users01-DTNX_nQZ.js → Users01-C6KwtT99.js} +1 -1
  43. package/dist/client/assets/{Users03-Et2Iq-LT.js → Users03-EPnVo0bB.js} +1 -1
  44. package/dist/client/assets/{XCircle-C8jIOZwA.js → XCircle-DiB9hL7i.js} +1 -1
  45. package/dist/client/assets/{XClose-Xm8e9o2O.js → XClose-C1xUyQZv.js} +1 -1
  46. package/dist/client/assets/{Zap-CydiGRzM.js → Zap-DSXl6Hp2.js} +1 -1
  47. package/dist/client/assets/{ZoomOut-wA1AxiJ4.js → ZoomOut-C-2R5l8I.js} +1 -1
  48. package/dist/client/assets/{access-gate-Cq4IMSa2.js → access-gate-BdiZftQz.js} +1 -1
  49. package/dist/client/assets/{agent-icon-CPE8YyuT.js → agent-icon-CyHpCstK.js} +1 -1
  50. package/dist/client/assets/agents-list-KDoq76g0.js +1 -0
  51. package/dist/client/assets/ai-providers-BrVf1e6J.js +1 -0
  52. package/dist/client/assets/{alert-1d_si55t.js → alert-CFsymptD.js} +1 -1
  53. package/dist/client/assets/{alert-dialog-DD8gmLEV.js → alert-dialog-DW1zmq7a.js} +1 -1
  54. package/dist/client/assets/{analytics-tab-DL1OjuDO.js → analytics-tab-BlBfbh2a.js} +1 -1
  55. package/dist/client/assets/api-keys-D3sWWgsA.js +1 -0
  56. package/dist/client/assets/{api-keys-CpAxzi4a.js → api-keys-S2LvxycO.js} +1 -1
  57. package/dist/client/assets/app-editor-DFmDheE3.js +1 -0
  58. package/dist/client/assets/{auth-CKSU3JsT.js → auth-DgZXO_E8.js} +1 -1
  59. package/dist/client/assets/{auth-catchall-BsTYpTDz.js → auth-catchall-BpojlvjI.js} +1 -1
  60. package/dist/client/assets/{auth-entry-OOarbR_P.js → auth-entry-DB4_abZA.js} +1 -1
  61. package/dist/client/assets/{auth-split-layout-BTGfNyXQ.js → auth-split-layout-DsZoXTVd.js} +1 -1
  62. package/dist/client/assets/{authenticate-and-persist-oauth-05_Aj2HR.js → authenticate-and-persist-oauth-BXQocgtU.js} +1 -1
  63. package/dist/client/assets/{automation-list-row-DZHqRqWd.js → automation-list-row-C5K4rGy8.js} +1 -1
  64. package/dist/client/assets/{automation-runs-3ggKqNs7.js → automation-runs-CbmnlhbC.js} +1 -1
  65. package/dist/client/assets/automations-DlejsTXn.js +1 -0
  66. package/dist/client/assets/{avatar-BS0IyPAV.js → avatar-BHNnQU49.js} +1 -1
  67. package/dist/client/assets/{badge-CtAQawYl.js → badge-Df0POpHX.js} +1 -1
  68. package/dist/client/assets/{block-document-CjZVKj0w.js → block-document-C9jm1koE.js} +1 -1
  69. package/dist/client/assets/{breadcrumb-BCL2Kwa4.js → breadcrumb-EUBB2GC0.js} +1 -1
  70. package/dist/client/assets/{buckets-CtppbAIz.js → buckets-B_HtmkX0.js} +1 -1
  71. package/dist/client/assets/{bulk-category-panel-DKLu3ji6.js → bulk-category-panel-WadLNqYR.js} +1 -1
  72. package/dist/client/assets/{capability-load-error-DIIALIs2.js → capability-load-error-D_PjnnSN.js} +1 -1
  73. package/dist/client/assets/{cards-CBsYAM47.js → cards-gW-s4zlH.js} +1 -1
  74. package/dist/client/assets/category-editor-Dsjpm8Rs.js +1 -0
  75. package/dist/client/assets/{cdn-tab-BMufGN6k.js → cdn-tab-OVIvDZML.js} +1 -1
  76. package/dist/client/assets/{chart-DpOfrAMr.js → chart-CQ4Em7wn.js} +1 -1
  77. package/dist/client/assets/chat-context-DPbGstfa.js +35 -0
  78. package/dist/client/assets/{checkbox-BXjIirqE.js → checkbox-CUAxY5xy.js} +1 -1
  79. package/dist/client/assets/{choose-editor-4sfwDsGQ.js → choose-editor-CqIcKKAC.js} +1 -1
  80. package/dist/client/assets/{cli-auth-success-CwHUCiHn.js → cli-auth-success-osB4eK21.js} +1 -1
  81. package/dist/client/assets/{client-icons-D4B8Mz13.js → client-icons-ErQpUWbT.js} +1 -1
  82. package/dist/client/assets/collection-detail-D3FBmEm5.js +1 -0
  83. package/dist/client/assets/{collection-display-button-BioCX_AB.js → collection-display-button-AMsRk-So.js} +1 -1
  84. package/dist/client/assets/{collection-search-DO_p4EqG.js → collection-search-C22mEeLw.js} +1 -1
  85. package/dist/client/assets/{collection-table-wrapper-C7uBo59c.js → collection-table-wrapper-BJ3Neq9J.js} +1 -1
  86. package/dist/client/assets/{collection-tabs-FQDiUPHt.js → collection-tabs-DTwxsscI.js} +1 -1
  87. package/dist/client/assets/{command-DeVA58FJ.js → command-CRqAgH1a.js} +1 -1
  88. package/dist/client/assets/{commerce-onboarding-BKX7YdsD.js → commerce-onboarding-B6_VUkvw.js} +1 -1
  89. package/dist/client/assets/{connect-BRY5NS1A.js → connect-CxVuoW2Z.js} +1 -1
  90. package/dist/client/assets/{connect-layout-CZzvRMqx.js → connect-layout-sj45J0Mr.js} +1 -1
  91. package/dist/client/assets/{connection-CtWb4rTZ.js → connection-BWzxBGaR.js} +1 -1
  92. package/dist/client/assets/{connection-card-sSkeOh9M.js → connection-card-FOWu6o2x.js} +1 -1
  93. package/dist/client/assets/connection-detail-CiSJLPae.js +1 -0
  94. package/dist/client/assets/{connection-form-helpers-CjCc6frD.js → connection-form-helpers-tCou3o46.js} +1 -1
  95. package/dist/client/assets/{connections-Ce1XTF4A.js → connections-DBSoZzyn.js} +1 -1
  96. package/dist/client/assets/{create-organization-dialog-C_kWgH_k.js → create-organization-dialog-Crs_YDp8.js} +1 -1
  97. package/dist/client/assets/{decopilot-sse-pool-Dc_oXr8h.js → decopilot-sse-pool-BrId94vM.js} +1 -1
  98. package/dist/client/assets/{dialog-BIFznZm3.js → dialog-BdUmjS4-.js} +1 -1
  99. package/dist/client/assets/{domain-settings-2op7kQxI.js → domain-settings-CTbN1J2P.js} +1 -1
  100. package/dist/client/assets/{drawer-CtAdPy7J.js → drawer-D36n-WIv.js} +1 -1
  101. package/dist/client/assets/{dropdown-menu-C37VfJ59.js → dropdown-menu-Dn-LBZem.js} +1 -1
  102. package/dist/client/assets/e2e-tab--nH1lXQP.js +1 -0
  103. package/dist/client/assets/{editor-DyArv3FJ.js → editor-CyAR_I_A.js} +1 -1
  104. package/dist/client/assets/{empty-state-DSmLsgCN.js → empty-state-DLmWbVUB.js} +1 -1
  105. package/dist/client/assets/{empty-state--OBkbBal.js → empty-state-DxSmwhAQ.js} +1 -1
  106. package/dist/client/assets/{extract-connection-data-wF3Br-pC.js → extract-connection-data-B1I5FGQh.js} +1 -1
  107. package/dist/client/assets/file-explorer-Cbb3XtE4.js +2 -0
  108. package/dist/client/assets/{file-type-icon-CX9ORitn.js → file-type-icon-CVdgx22A.js} +1 -1
  109. package/dist/client/assets/{folder-icon-BUAMuIJo.js → folder-icon-D_WY3arE.js} +1 -1
  110. package/dist/client/assets/{form-CK_lIk7s.js → form-BvhSFZHb.js} +1 -1
  111. package/dist/client/assets/{general-uOO6AYK8.js → general-WcU5fWyG.js} +1 -1
  112. package/dist/client/assets/{github-repo-picker-TX2CWT3P.js → github-repo-picker-Cz94q9dS.js} +1 -1
  113. package/dist/client/assets/hooks-SuxNrCzM.js +15 -0
  114. package/dist/client/assets/{hosting-tab-DTF_9cjU.js → hosting-tab-Vlb9Z9ng.js} +1 -1
  115. package/dist/client/assets/index-5qx3FSW_.js +1 -0
  116. package/dist/client/assets/{index-BaLS9mjA.js → index-B18-trnw.js} +1 -1
  117. package/dist/client/assets/{index-C1ThefqC.js → index-BKZihWQd.js} +1 -1
  118. package/dist/client/assets/index-Ba4EfV0C.js +1 -0
  119. package/dist/client/assets/{index-zmYpYC9e.js → index-BjTjNr_G.js} +1 -1
  120. package/dist/client/assets/index-BqRfxAzW.css +1 -0
  121. package/dist/client/assets/{index-ClRahW5l.js → index-BxLEr4iz.js} +1 -1
  122. package/dist/client/assets/{index-9xpznWaq.js → index-CWs8c_71.js} +1 -1
  123. package/dist/client/assets/index-Cd2r3_aA.js +823 -0
  124. package/dist/client/assets/{index-CMu2jKL9.js → index-D87zQKXw.js} +2 -2
  125. package/dist/client/assets/{index-DIoG5Nzm.js → index-lSAvH_rL.js} +7 -7
  126. package/dist/client/assets/{index-redirect-DSiIg2Aa.js → index-redirect-BL62_A_W.js} +1 -1
  127. package/dist/client/assets/{infra-billing-69mIk1VP.js → infra-billing-jIqLmoI5.js} +1 -1
  128. package/dist/client/assets/{input-B3ER89GU.js → input-BdcqHmsD.js} +1 -1
  129. package/dist/client/assets/{integration-icon-Dhw6uO2L.js → integration-icon-DTTuvbMM.js} +1 -1
  130. package/dist/client/assets/{invite-member-dialog-8SU0VJal.js → invite-member-dialog-BW87V_xF.js} +1 -1
  131. package/dist/client/assets/{label-BCOu20U5.js → label-DFynpq17.js} +1 -1
  132. package/dist/client/assets/{layout-Cvs_I42t.js → layout-CF6grxfQ.js} +1 -1
  133. package/dist/client/assets/{login-P7bQsRN6.js → login-DtED1ahd.js} +1 -1
  134. package/dist/client/assets/{markdown-B1UHHM2w.js → markdown-t8p7flD6.js} +1 -1
  135. package/dist/client/assets/{mcp-oauth-3DlwOsvC.js → mcp-oauth-DomiX3XJ.js} +1 -1
  136. package/dist/client/assets/{members-PuWi75Iq.js → members-Ctc7ayH9.js} +1 -1
  137. package/dist/client/assets/{monaco-editor-C35vQ6TU.js → monaco-editor-mHVc8yep.js} +1 -1
  138. package/dist/client/assets/{monitoring-stats-row-Cyyvr64v.js → monitoring-stats-row-CL1X09To.js} +1 -1
  139. package/dist/client/assets/{multi-select-CSpGSNnV.js → multi-select-Tgem-Hhf.js} +1 -1
  140. package/dist/client/assets/{oauth-callback-H6KXAZUX.js → oauth-callback-GxJ6DISd.js} +1 -1
  141. package/dist/client/assets/{oauth-callback-ai-provider-Bnd7NmMV.js → oauth-callback-ai-provider-Dgp581R5.js} +1 -1
  142. package/dist/client/assets/{onboarding-Ci8NOzEM.js → onboarding-CItp4Z7f.js} +1 -1
  143. package/dist/client/assets/org-layout-D6ojmqyV.js +1 -0
  144. package/dist/client/assets/{organization-choice-CCvKP5-m.js → organization-choice-CKJgJUKz.js} +1 -1
  145. package/dist/client/assets/{orgs-Fs1TSSXd.js → orgs-B2ojCkix.js} +1 -1
  146. package/dist/client/assets/page-seo-form-w8HjBh5r.js +1 -0
  147. package/dist/client/assets/{popover-CMt7ScML.js → popover-DqoSLPyP.js} +1 -1
  148. package/dist/client/assets/post-calendar-09DAXKhm.js +1 -0
  149. package/dist/client/assets/post-editor-D5yb1Jd9.js +1 -0
  150. package/dist/client/assets/{primitives-CGvINqkE.js → primitives-DTr9rusv.js} +1 -1
  151. package/dist/client/assets/{profile-CHhLzHqm.js → profile-DQHF82sh.js} +1 -1
  152. package/dist/client/assets/project-app-view-BON2Qo3G.js +1 -0
  153. package/dist/client/assets/{project-icon-zQ71aK6_.js → project-icon-BIuwk_d_.js} +1 -1
  154. package/dist/client/assets/{prompts-Dxu8B2jv.js → prompts-DBh87Nh-.js} +1 -1
  155. package/dist/client/assets/record-editor-Dfnjy26m.js +1 -0
  156. package/dist/client/assets/redirect-editor-Dx846JCn.js +1 -0
  157. package/dist/client/assets/registry-DtIvqOVY.js +2 -0
  158. package/dist/client/assets/{registry-layout-C968nUGe.js → registry-layout-DSBGNtl3.js} +1 -1
  159. package/dist/client/assets/{reports-DGXzAhUl.js → reports-DXwcd3N8.js} +1 -1
  160. package/dist/client/assets/{require-capability-D-jq44dD.js → require-capability-BRvSlC3v.js} +1 -1
  161. package/dist/client/assets/{required-auth-layout-Cb1jXi5Q.js → required-auth-layout-DFpZjgWz.js} +1 -1
  162. package/dist/client/assets/{reset-password-ClAymL8k.js → reset-password-CSt7aD-W.js} +1 -1
  163. package/dist/client/assets/{review-settings-hu-gYYYY.js → review-settings-ll1dG96m.js} +1 -1
  164. package/dist/client/assets/{roles-C2D1oNwm.js → roles-BkIPtp-o.js} +1 -1
  165. package/dist/client/assets/{schema-Dk7DmR5a.js → schema-CnLqwTPD.js} +1 -1
  166. package/dist/client/assets/{scroll-area-DBm8Zg_x.js → scroll-area-PP_r4msI.js} +1 -1
  167. package/dist/client/assets/{search-input-C33OeTuG.js → search-input-DfOXuzww.js} +1 -1
  168. package/dist/client/assets/{secrets-BcRhexXX.js → secrets-5A0vK4C0.js} +1 -1
  169. package/dist/client/assets/sections-editor-Dm7uM18_.js +2 -0
  170. package/dist/client/assets/{select-O-Se58mM.js → select-DX41f4VA.js} +1 -1
  171. package/dist/client/assets/{select-model-Cd6ICjyE.js → select-model-DtEtPkIv.js} +1 -1
  172. package/dist/client/assets/{self-tool-result-BhjRI4OY.js → self-tool-result-CdKMJCXt.js} +1 -1
  173. package/dist/client/assets/seo-editor-aQO3Fni3.js +1 -0
  174. package/dist/client/assets/settings-layout-CeJtjB19.js +1 -0
  175. package/dist/client/assets/{settings-sidebar-CQ1aAA-S.js → settings-sidebar-q0M_1AHR.js} +1 -1
  176. package/dist/client/assets/{shell-controls-BlbYUBa1.js → shell-controls-C6dFl2EC.js} +1 -1
  177. package/dist/client/assets/shell-layout-gA5hZo5F.js +1 -0
  178. package/dist/client/assets/{skill-preview-DTwyXcxp.js → skill-preview-DXO3ykC1.js} +1 -1
  179. package/dist/client/assets/{skills-CQg-jY0q.js → skills-BYoh3bJo.js} +1 -1
  180. package/dist/client/assets/{sso-BTGZw929.js → sso-BI0wGWNb.js} +1 -1
  181. package/dist/client/assets/store-registry-UiEHPHdI.js +2 -0
  182. package/dist/client/assets/{store-Duwv96-m.js → store-w5DiLQdh.js} +1 -1
  183. package/dist/client/assets/{switch-DN6L7pZ8.js → switch-DW4RRppR.js} +1 -1
  184. package/dist/client/assets/synced-repos-DGuZHHJX.js +1 -0
  185. package/dist/client/assets/{table-DGED2-oV.js → table-Cc0JpHRt.js} +1 -1
  186. package/dist/client/assets/{tabs-qHv1d8oo.js → tabs-C_0yZwsZ.js} +1 -1
  187. package/dist/client/assets/{task-board-k97eyP2H.js → task-board-DkI8yDIf.js} +1 -1
  188. package/dist/client/assets/task-route-jBzYs7u0.js +1 -0
  189. package/dist/client/assets/{tasks-O1E9rRmi.js → tasks-_uhom2KC.js} +1 -1
  190. package/dist/client/assets/{textarea-BbMVdhTn.js → textarea-Dyj892-C.js} +1 -1
  191. package/dist/client/assets/thread-intent-Bbkl_NvG.js +1 -0
  192. package/dist/client/assets/thread-route-C9hr7yjZ.js +1 -0
  193. package/dist/client/assets/{toggle-group-qR7WwCzn.js → toggle-group-DuOU3Yna.js} +1 -1
  194. package/dist/client/assets/{toolbar-BPBaAXqU.js → toolbar-DIlFGJBQ.js} +1 -1
  195. package/dist/client/assets/{toolbar-icon-button-BJozCrFv.js → toolbar-icon-button-CGvKs4Hb.js} +1 -1
  196. package/dist/client/assets/{track-CG4JE7lp.js → track-BQLynX7D.js} +1 -1
  197. package/dist/client/assets/{types-CFUtvqwZ.js → types-yL1rZwC2.js} +1 -1
  198. package/dist/client/assets/{use-ai-providers-DL0YRrHe.js → use-ai-providers-C4A-yG8S.js} +1 -1
  199. package/dist/client/assets/{use-automations-Ds4HjjM1.js → use-automations-D1LLY7GK.js} +1 -1
  200. package/dist/client/assets/{use-autosave-BUi_34XG.js → use-autosave-S3BS9dJB.js} +1 -1
  201. package/dist/client/assets/{use-connection-1ZElPQlS.js → use-connection-DIMvnEsW.js} +1 -1
  202. package/dist/client/assets/{use-copy-DwaiWxiT.js → use-copy-CDL_kFPB.js} +1 -1
  203. package/dist/client/assets/{use-create-virtual-mcp-DBiPMj7Z.js → use-create-virtual-mcp-BZjj2wtD.js} +1 -1
  204. package/dist/client/assets/{use-debounced-autosave-CrlGGbA0.js → use-debounced-autosave-ClxVXQPW.js} +1 -1
  205. package/dist/client/assets/{use-debounced-value-BkHp8ZQC.js → use-debounced-value-BTGahjD6.js} +1 -1
  206. package/dist/client/assets/{use-decopilot-events-D2a6ajEJ.js → use-decopilot-events-qYtca9N_.js} +1 -1
  207. package/dist/client/assets/{use-delete-connection-B379gXvX.js → use-delete-connection-DArfbR_g.js} +1 -1
  208. package/dist/client/assets/{use-deployment-admin-CfDE9qIF.js → use-deployment-admin-DZgxyu-a.js} +1 -1
  209. package/dist/client/assets/{use-destination-route-BlILx1Gc.js → use-destination-route-CTNH3xDX.js} +1 -1
  210. package/dist/client/assets/{use-file-configs-BfdHEl9C.js → use-file-configs-C93nUH97.js} +1 -1
  211. package/dist/client/assets/{use-infinite-scroll-DwV9LPlS.js → use-infinite-scroll-DeU5Rpn4.js} +1 -1
  212. package/dist/client/assets/{use-join-requests-CETprio3.js → use-join-requests-DSWsS1rN.js} +1 -1
  213. package/dist/client/assets/{use-mcp-auth-status-DeDl63Lc.js → use-mcp-auth-status-upTMow-Z.js} +1 -1
  214. package/dist/client/assets/{use-mcp-client-Da8e-_d8.js → use-mcp-client-llSiXbX8.js} +1 -1
  215. package/dist/client/assets/{use-mcp-prompts-CLFow0WP.js → use-mcp-prompts-BOxAK29u.js} +1 -1
  216. package/dist/client/assets/{use-members-DlyrPYOE.js → use-members-D_V3G9Gd.js} +1 -1
  217. package/dist/client/assets/use-navigate-to-agent-BooqwyPz.js +5 -0
  218. package/dist/client/assets/{use-org-auth-client-BfsZ-M6z.js → use-org-auth-client-BWThb-V9.js} +1 -1
  219. package/dist/client/assets/{use-org-sso-J995Ng6-.js → use-org-sso-DJzTKHrH.js} +1 -1
  220. package/dist/client/assets/{use-organization-roles-EQ3qWfHU.js → use-organization-roles-CrdtsKsA.js} +1 -1
  221. package/dist/client/assets/{use-organization-settings-DenVKwFP.js → use-organization-settings-BfIVlNk5.js} +1 -1
  222. package/dist/client/assets/{use-panel-navigate-xY92PiXA.js → use-panel-navigate-yCX_W63n.js} +1 -1
  223. package/dist/client/assets/{use-registry-connections-BTqpii1e.js → use-registry-connections-8jKgVSu8.js} +1 -1
  224. package/dist/client/assets/{use-secrets-Dn6GUcMj.js → use-secrets-CHDcCDFt.js} +1 -1
  225. package/dist/client/assets/{use-section-preview-base-OA2RwVZn.js → use-section-preview-base-Bnck9XZi.js} +1 -1
  226. package/dist/client/assets/{use-status-sounds-C0H9gTlC.js → use-status-sounds-D3Nv9moR.js} +1 -1
  227. package/dist/client/assets/{use-tags-Dj5fhd_Z.js → use-tags-Bjvv3Ict.js} +1 -1
  228. package/dist/client/assets/{use-view-mode-8gUnp8xY.js → use-view-mode-Bj7dvmOc.js} +1 -1
  229. package/dist/client/assets/{use-virtual-mcp-BdzzM_-Q.js → use-virtual-mcp-C5WBYfhP.js} +1 -1
  230. package/dist/client/assets/useInfiniteQuery-DO69sta5.js +1 -0
  231. package/dist/client/assets/useSuspenseInfiniteQuery-BqTEtPhA.js +1 -0
  232. package/dist/client/assets/{users-Ct5OViZj.js → users-8qyHeXl2.js} +1 -1
  233. package/dist/client/assets/variant-calendar-CoASsVeg.js +1 -0
  234. package/dist/client/assets/{view-mode-toggle-Bnltru_2.js → view-mode-toggle-BOnt9KuJ.js} +1 -1
  235. package/dist/client/index.html +2 -2
  236. package/dist/server/cli.js +1 -1
  237. package/dist/server/server.js +1 -1
  238. package/package.json +1 -1
  239. package/dist/client/assets/agents-list-Dtmme4F_.js +0 -1
  240. package/dist/client/assets/ai-providers-BZazhfxl.js +0 -1
  241. package/dist/client/assets/api-keys-DJrTLD2M.js +0 -1
  242. package/dist/client/assets/app-editor-DRQY_wGe.js +0 -1
  243. package/dist/client/assets/automations-BlLAqIe8.js +0 -1
  244. package/dist/client/assets/category-editor-Bm8XKvhm.js +0 -1
  245. package/dist/client/assets/chat-context-DylitU6A.js +0 -35
  246. package/dist/client/assets/collection-detail-DHhSzlUe.js +0 -1
  247. package/dist/client/assets/connection-detail-DFoIn0E6.js +0 -1
  248. package/dist/client/assets/download-app-dialog-BA4Zg8f-.js +0 -1
  249. package/dist/client/assets/e2e-tab-WXvENx_8.js +0 -1
  250. package/dist/client/assets/file-explorer-Tz4oZVnj.js +0 -2
  251. package/dist/client/assets/hooks-Dv3PpADk.js +0 -15
  252. package/dist/client/assets/index-DN9-7YC2.css +0 -1
  253. package/dist/client/assets/index-DrWCPBsu.js +0 -1
  254. package/dist/client/assets/index-EEBcPxzK.js +0 -823
  255. package/dist/client/assets/index-d_2S8ony.js +0 -1
  256. package/dist/client/assets/org-layout-DElTO9q0.js +0 -1
  257. package/dist/client/assets/page-seo-form-DIStXbQF.js +0 -1
  258. package/dist/client/assets/post-calendar-BXASG_XF.js +0 -1
  259. package/dist/client/assets/post-editor-usPnnznb.js +0 -1
  260. package/dist/client/assets/project-app-view-DKsoF9KE.js +0 -1
  261. package/dist/client/assets/record-editor-fS_XUrDG.js +0 -1
  262. package/dist/client/assets/redirect-editor-B0GL2-VI.js +0 -1
  263. package/dist/client/assets/registry-BaeKs9f0.js +0 -2
  264. package/dist/client/assets/sections-editor-Dz0cOD7v.js +0 -2
  265. package/dist/client/assets/seo-editor-BUIpJLVV.js +0 -1
  266. package/dist/client/assets/settings-layout-CSkBbDyt.js +0 -1
  267. package/dist/client/assets/shell-layout-C_TEKmkm.js +0 -1
  268. package/dist/client/assets/store-registry-CjeaHFsT.js +0 -2
  269. package/dist/client/assets/synced-repos-C_ygkA-Z.js +0 -1
  270. package/dist/client/assets/task-route-BERNM1EV.js +0 -1
  271. package/dist/client/assets/use-navigate-to-agent-EQeauX1Q.js +0 -5
  272. package/dist/client/assets/useInfiniteQuery-C_Sj0Ine.js +0 -1
  273. package/dist/client/assets/useSuspenseInfiniteQuery-DjGFzQWy.js +0 -1
  274. package/dist/client/assets/variant-calendar-D0qqLCLI.js +0 -1
@@ -1 +1 @@
1
- import{c as u,W as f,a7 as y,m,n as g,e as T,K as l,t as E}from"./index-DIoG5Nzm.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
1
+ import{c as u,W as f,a7 as y,m,n as g,e as T,K as l,t as E}from"./index-lSAvH_rL.js";function K(){const e=u.c(7),{locator:t}=f(),o=y();let n;e[0]!==t?(n=l.tags(t),e[0]=t,e[1]=n):n=e[1];let s;e[2]!==o?(s=async()=>{const{tags:r}=await o.call("TAGS_LIST",{});return r},e[2]=o,e[3]=s):s=e[3];let a;return e[4]!==n||e[5]!==s?(a={queryKey:n,queryFn:s,staleTime:3e4},e[4]=n,e[5]=s,e[6]=a):a=e[6],m(a)}function p(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{tag:i}=await n.call("TAGS_CREATE",typeof c=="string"?{name:c}:c);return i},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:S},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function S(e){E.error(e instanceof Error?e.message:"Failed to create tag")}function C(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{await n.call("TAGS_DELETE",{tagId:c})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=()=>{t.invalidateQueries({queryKey:l.tags(o)}),t.invalidateQueries({queryKey:l.taskBoardItems(o)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:q},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function q(e){E.error(e instanceof Error?e.message:"Failed to delete tag")}function M(e){const t=u.c(10),{locator:o}=f(),n=y();let s;t[0]!==o||t[1]!==e?(s=l.memberTags(o,e),t[0]=o,t[1]=e,t[2]=s):s=t[2];let a;t[3]!==e||t[4]!==n?(a=async()=>{const{tags:i}=await n.call("MEMBER_TAGS_GET",{memberId:e});return i},t[3]=e,t[4]=n,t[5]=a):a=t[5];const r=!!e;let c;return t[6]!==s||t[7]!==a||t[8]!==r?(c={queryKey:s,queryFn:a,staleTime:3e4,enabled:r},t[6]=s,t[7]=a,t[8]=r,t[9]=c):c=t[9],m(c)}function A(){const e=u.c(8),t=g(),{locator:o}=f(),n=y();let s;e[0]!==n?(s=async c=>{const{memberId:i,tagIds:d}=c;return await n.call("MEMBER_TAGS_SET",{memberId:i,tagIds:d})},e[0]=n,e[1]=s):s=e[1];let a;e[2]!==o||e[3]!==t?(a=(c,i)=>{t.invalidateQueries({queryKey:l.memberTags(o,i.memberId)})},e[2]=o,e[3]=t,e[4]=a):a=e[4];let r;return e[5]!==s||e[6]!==a?(r={mutationFn:s,onSuccess:a,onError:_},e[5]=s,e[6]=a,e[7]=r):r=e[7],T(r)}function _(e){E.error(e instanceof Error?e.message:"Failed to update member tags")}export{p as a,C as b,M as c,A as d,K as u};
@@ -1 +1 @@
1
- import{c as p,I as w,r as f}from"./index-DIoG5Nzm.js";function I(M,b){const e=p.c(12),d=b===void 0?"cards":b,o=w(),g=f.useRef(o),s=M?`deco-view-mode-${M}`:"deco-view-mode";let i;e[0]!==d||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:d},e[0]=d,e[1]=s,e[2]=i):i=e[2];const[t,m]=f.useState(i);let l;e[3]!==s?(l=r=>{m(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const u=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!g.current&&o&&t==="table"&&m("cards"),g.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==u||e[10]!==t?(n=[t,u],e[9]=u,e[10]=t,e[11]=n):n=e[11],n}export{I as u};
1
+ import{c as p,I as w,r as f}from"./index-lSAvH_rL.js";function I(M,b){const e=p.c(12),d=b===void 0?"cards":b,o=w(),g=f.useRef(o),s=M?`deco-view-mode-${M}`:"deco-view-mode";let i;e[0]!==d||e[1]!==s?(i=()=>{const r=globalThis.localStorage?.getItem(s);return r==="cards"||r==="table"?r:d},e[0]=d,e[1]=s,e[2]=i):i=e[2];const[t,m]=f.useState(i);let l;e[3]!==s?(l=r=>{m(r),globalThis.localStorage?.setItem(s,r)},e[3]=s,e[4]=l):l=e[4];const u=l;let c,a;e[5]!==o||e[6]!==t?(c=()=>{!g.current&&o&&t==="table"&&m("cards"),g.current=o},a=[o,t],e[5]=o,e[6]=t,e[7]=c,e[8]=a):(c=e[7],a=e[8]),f.useEffect(c,a);let n;return e[9]!==u||e[10]!==t?(n=[t,u],e[9]=u,e[10]=t,e[11]=n):n=e[11],n}export{I as u};
@@ -1 +1 @@
1
- import{c as C,W as I,eO as S,c8 as _,K as A,eP as y,m as M,eQ as L,c7 as T,eR as U}from"./index-DIoG5Nzm.js";import{u as p,e as V,m as R}from"./use-mcp-client-Da8e-_d8.js";import{S as g}from"./constants-DNuUCxmW.js";function h(o){const t=C.c(5);let e;t[0]!==o?(e=o===void 0?{}:o,t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=p(i);return S(s.id,"VIRTUAL_MCP",l,n)}function O(o){const t=C.c(14);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=L(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;return t[12]!==d?(a=d??[],t[12]=d,t[13]=a):a=t[13],a}function w(o){const t=C.c(10),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=V(n),i=o??void 0;let l;t[3]!==s||t[4]!==e.id||t[5]!==i?(l=y(e.id,"VIRTUAL_MCP",i,s),t[3]=s,t[4]=e.id,t[5]=i,t[6]=l):l=t[6];const c=!!s&&!!o;let r;t[7]!==l||t[8]!==c?(r={...l,enabled:c},t[7]=l,t[8]=c,t[9]=r):r=t[9];const{data:u}=M(r);return u?.item??null}async function E(o,t,e={}){const n=await o.fetchQuery(R({connectionId:g,orgId:t.id,orgSlug:t.slug})),s=L(t.id,"VIRTUAL_MCP",n,e);return s.select(await o.fetchQuery(s))}function k(o){const t=C.c(18);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=U(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;t[12]!==d?.items?(a=d?.items??[],t[12]=d?.items,t[13]=a):a=t[13];const P=d?.totalCount,m=d?.hasMore;let f;return t[14]!==a||t[15]!==P||t[16]!==m?(f={items:a,totalCount:P,hasMore:m},t[14]=a,t[15]=P,t[16]=m,t[17]=f):f=t[17],f}function v(o){const t=C.c(3),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);return T(e.id,"VIRTUAL_MCP",o??void 0,s)}function x(o){const t=C.c(15),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);let i,l,c;t[3]!==o||t[4]!==e.id?(i=[...o].sort(),c=M,l=A.virtualMcpLastUsed(e.id,i),t[3]=o,t[4]=e.id,t[5]=i,t[6]=l,t[7]=c):(i=t[5],l=t[6],c=t[7]);const r=i.length>0;let u;t[8]!==s||t[9]!==i?(u=async()=>{const P=(await s.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:i}})).structuredContent??{items:[]},m=new Map;for(const f of P.items)m.set(f.id,f);return m},t[8]=s,t[9]=i,t[10]=u):u=t[10];let d;return t[11]!==l||t[12]!==r||t[13]!==u?(d={queryKey:l,enabled:r,staleTime:3e4,queryFn:u},t[11]=l,t[12]=r,t[13]=u,t[14]=d):d=t[14],c(d)}function B(){const o=C.c(3),{org:t}=I();let e;o[0]!==t.id||o[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=e):e=o[2];const n=p(e);return _(t.id,"VIRTUAL_MCP",n)}export{h as a,B as b,x as c,O as d,k as e,w as f,E as g,v as u};
1
+ import{c as C,W as I,eO as S,c8 as _,K as A,eP as y,m as M,eQ as L,c7 as T,eR as U}from"./index-lSAvH_rL.js";import{u as p,e as V,m as R}from"./use-mcp-client-llSiXbX8.js";import{S as g}from"./constants-DNuUCxmW.js";function h(o){const t=C.c(5);let e;t[0]!==o?(e=o===void 0?{}:o,t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=p(i);return S(s.id,"VIRTUAL_MCP",l,n)}function O(o){const t=C.c(14);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=L(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;return t[12]!==d?(a=d??[],t[12]=d,t[13]=a):a=t[13],a}function w(o){const t=C.c(10),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=V(n),i=o??void 0;let l;t[3]!==s||t[4]!==e.id||t[5]!==i?(l=y(e.id,"VIRTUAL_MCP",i,s),t[3]=s,t[4]=e.id,t[5]=i,t[6]=l):l=t[6];const c=!!s&&!!o;let r;t[7]!==l||t[8]!==c?(r={...l,enabled:c},t[7]=l,t[8]=c,t[9]=r):r=t[9];const{data:u}=M(r);return u?.item??null}async function E(o,t,e={}){const n=await o.fetchQuery(R({connectionId:g,orgId:t.id,orgSlug:t.slug})),s=L(t.id,"VIRTUAL_MCP",n,e);return s.select(await o.fetchQuery(s))}function k(o){const t=C.c(18);let e;t[0]!==o?(e={},t[0]=o,t[1]=e):e=t[1];const n=e,{org:s}=I();let i;t[2]!==s.id||t[3]!==s.slug?(i={connectionId:g,orgId:s.id,orgSlug:s.slug},t[2]=s.id,t[3]=s.slug,t[4]=i):i=t[4];const l=V(i);let c;t[5]!==l||t[6]!==n||t[7]!==s.id?(c=U(s.id,"VIRTUAL_MCP",l,n),t[5]=l,t[6]=n,t[7]=s.id,t[8]=c):c=t[8];const r=!!l;let u;t[9]!==c||t[10]!==r?(u={...c,enabled:r},t[9]=c,t[10]=r,t[11]=u):u=t[11];const{data:d}=M(u);let a;t[12]!==d?.items?(a=d?.items??[],t[12]=d?.items,t[13]=a):a=t[13];const P=d?.totalCount,m=d?.hasMore;let f;return t[14]!==a||t[15]!==P||t[16]!==m?(f={items:a,totalCount:P,hasMore:m},t[14]=a,t[15]=P,t[16]=m,t[17]=f):f=t[17],f}function v(o){const t=C.c(3),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);return T(e.id,"VIRTUAL_MCP",o??void 0,s)}function x(o){const t=C.c(15),{org:e}=I();let n;t[0]!==e.id||t[1]!==e.slug?(n={connectionId:g,orgId:e.id,orgSlug:e.slug},t[0]=e.id,t[1]=e.slug,t[2]=n):n=t[2];const s=p(n);let i,l,c;t[3]!==o||t[4]!==e.id?(i=[...o].sort(),c=M,l=A.virtualMcpLastUsed(e.id,i),t[3]=o,t[4]=e.id,t[5]=i,t[6]=l,t[7]=c):(i=t[5],l=t[6],c=t[7]);const r=i.length>0;let u;t[8]!==s||t[9]!==i?(u=async()=>{const P=(await s.callTool({name:"VIRTUAL_MCP_LAST_USED_LIST",arguments:{ids:i}})).structuredContent??{items:[]},m=new Map;for(const f of P.items)m.set(f.id,f);return m},t[8]=s,t[9]=i,t[10]=u):u=t[10];let d;return t[11]!==l||t[12]!==r||t[13]!==u?(d={queryKey:l,enabled:r,staleTime:3e4,queryFn:u},t[11]=l,t[12]=r,t[13]=u,t[14]=d):d=t[14],c(d)}function B(){const o=C.c(3),{org:t}=I();let e;o[0]!==t.id||o[1]!==t.slug?(e={connectionId:g,orgId:t.id,orgSlug:t.slug},o[0]=t.id,o[1]=t.slug,o[2]=e):e=o[2];const n=p(e);return _(t.id,"VIRTUAL_MCP",n)}export{h as a,B as b,x as c,O as d,k as e,w as f,E as g,v as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./use-infinite-scroll-DeU5Rpn4.js";import{ff as f}from"./index-lSAvH_rL.js";function s(e,r){return f(e,u,r)}export{s as u};
@@ -0,0 +1 @@
1
+ import{I as s}from"./use-infinite-scroll-DeU5Rpn4.js";import{ff as u,bT as n}from"./index-lSAvH_rL.js";function f(r,e){return u({...r,enabled:!0,suspense:!0,throwOnError:n},s,e)}export{f as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-DIoG5Nzm.js";import{C as G}from"./collection-table-wrapper-C7uBo59c.js";import{E as L}from"./empty-state-DSmLsgCN.js";import{S as H}from"./search-input-C33OeTuG.js";import{A as X}from"./avatar-BS0IyPAV.js";import{B as D}from"./badge-CtAQawYl.js";import{u as Z}from"./use-debounced-value-BkHp8ZQC.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-DGED2-oV.js";import"./ArrowUp-ClAJQium.js";import"./SearchMd-DwtkgExc.js";import"./User01-BDiBNFRN.js";import"./differenceInSeconds-NQ4PDo0z.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:ae,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
1
+ import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,P as I,K as J,t as Q,B as W}from"./index-lSAvH_rL.js";import{C as G}from"./collection-table-wrapper-BJ3Neq9J.js";import{E as L}from"./empty-state-DLmWbVUB.js";import{S as H}from"./search-input-DfOXuzww.js";import{A as X}from"./avatar-BHNnQU49.js";import{B as D}from"./badge-Df0POpHX.js";import{u as Z}from"./use-debounced-value-BTGahjD6.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-BnbuEtat.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-Cc0JpHRt.js";import"./ArrowUp-Avwdkd90.js";import"./SearchMd-DUxlDNtX.js";import"./User01-wgouKLSs.js";import"./differenceInSeconds-NQ4PDo0z.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),P=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let y;e[6]!==n||e[7]!==l?(y={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=y):y=e[8];const{data:k,isLoading:_,isError:A}=Y(y);let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=ie,e[9]=C):C=e[9];let w;e[10]!==s?(w={mutationFn:ae,onSuccess:C,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=w):w=e[11];const E=$(w);let b;e[12]!==k?.users?(b=k?.users??[],e[12]=k?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==P||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===P||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=P,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Body,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
@@ -0,0 +1 @@
1
+ import{c as K,b as X,r as Z,j as n,l as rt,a1 as ut,a4 as ht,B as tt,a2 as xt}from"./index-lSAvH_rL.js";import{z as gt,a4 as at,aE as bt}from"./agent-icon-CyHpCstK.js";import{i as vt}from"./ChevronRight-BiHn5vM-.js";import{L as yt}from"./label-DFynpq17.js";import{S as lt}from"./scroll-area-PP_r4msI.js";import{S as jt}from"./switch-DW4RRppR.js";import{V as Tt}from"./view-mode-toggle-BOnt9KuJ.js";import{bs as ct,bt as mt,bu as Nt,bv as _t,bw as kt,bx as U,by as wt}from"./index-Cd2r3_aA.js";import"./AlertCircle-jy0frqbf.js";import"./Tool01-Bww8mLXx.js";import"./ArrowUp-Avwdkd90.js";import"./ArrowLeft-BUQYrPiB.js";import"./Tool02-CMTwSQ00.js";import"./XCircle-DiB9hL7i.js";import"./TrendUp01-C1Wh3jCv.js";import"./ZoomOut-C-2R5l8I.js";import"./Users03-EPnVo0bB.js";import"./CheckCircle-FHm0D3iO.js";import"./Check-CxhsqO-U.js";import"./ChevronUp-DKezAGzO.js";import"./ChevronSelectorVertical-BbRv2olL.js";import"./DotsVertical-8AlMAR5c.js";import"./UserSquare-1xv6DUe1.js";import"./Copy01-Bmz39xbH.js";import"./CreditCard01-C5e5Hx42.js";import"./Download01-CPeLy8ol.js";import"./Settings02-BiZT44gx.js";import"./Eye-DusgBAO3.js";import"./Share07-BUsrOXMs.js";import"./GitBranch01-CfVfwURq.js";import"./Globe01-wWGdeE3H.js";import"./XClose-C1xUyQZv.js";import"./HardDrive-CA1tnjg8.js";import"./Image01-DYzKv2ko.js";import"./Key01-CGEDvfUF.js";import"./Link01-DXelhbvI.js";import"./LinkExternal01-DNSJJFeL.js";import"./Monitor01-CH4zCn1-.js";import"./Sun-CCthEe37.js";import"./Package-Z0p4dNPa.js";import"./Palette-3dQlQIWI.js";import"./Play-DsDbYPnC.js";import"./Plus-sgFP0HSc.js";import"./SearchMd-DUxlDNtX.js";import"./Shield01-BkWJSg7j.js";import"./Stars01-D42AB0fG.js";import"./Trash01-Cy8JukTX.js";import"./Upload01-Vx_sWXby.js";import"./User01-wgouKLSs.js";import"./Users01-C6KwtT99.js";import"./Zap-DSXl6Hp2.js";import"./select-DX41f4VA.js";import"./chat-context-DPbGstfa.js";import"./use-panel-navigate-yCX_W63n.js";import"./use-destination-route-CTNH3xDX.js";import"./thread-route-C9hr7yjZ.js";import"./dialog-BdUmjS4-.js";import"./constants-DNuUCxmW.js";import"./thread-intent-Bbkl_NvG.js";import"./slugify-CEUa2lfQ.js";import"./hooks-SuxNrCzM.js";import"./use-mcp-client-llSiXbX8.js";import"./auth-DgZXO_E8.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BrId94vM.js";import"./task-board-DkI8yDIf.js";import"./schema-CnLqwTPD.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-C5WBYfhP.js";import"./use-ai-providers-C4A-yG8S.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-qYtca9N_.js";import"./use-organization-settings-BfIVlNk5.js";import"./automation-runs-CbmnlhbC.js";import"./useInfiniteQuery-DO69sta5.js";import"./use-infinite-scroll-DeU5Rpn4.js";import"./use-connection-DIMvnEsW.js";import"./table-Cc0JpHRt.js";import"./empty-state-DLmWbVUB.js";import"./use-members-D_V3G9Gd.js";import"./use-org-auth-client-BWThb-V9.js";import"./use-automations-D1LLY7GK.js";import"./useSuspenseInfiniteQuery-BqTEtPhA.js";import"./avatar-BHNnQU49.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-CDL_kFPB.js";import"./markdown-t8p7flD6.js";import"./monaco-editor-mHVc8yep.js";import"./editor-CyAR_I_A.js";import"./types-yL1rZwC2.js";import"./shell-layout-gA5hZo5F.js";import"./project-icon-BIuwk_d_.js";import"./github-repo-COLY3wWI.js";import"./command-CRqAgH1a.js";import"./index-CWs8c_71.js";import"./required-auth-layout-DFpZjgWz.js";import"./use-org-sso-DJzTKHrH.js";import"./integration-icon-DTTuvbMM.js";import"./use-navigate-to-agent-BooqwyPz.js";import"./use-mcp-prompts-BOxAK29u.js";import"./form-BvhSFZHb.js";import"./input-BdcqHmsD.js";import"./file-type-icon-CVdgx22A.js";import"./drawer-D36n-WIv.js";import"./collection-search-C22mEeLw.js";import"./tabs-C_0yZwsZ.js";import"./toggle-group-DuOU3Yna.js";import"./task-route-jBzYs7u0.js";import"./toolbar-icon-button-CGvKs4Hb.js";import"./popover-DqoSLPyP.js";import"./github-repo-picker-Cz94q9dS.js";import"./use-debounced-value-BTGahjD6.js";import"./authenticate-and-persist-oauth-BXQocgtU.js";import"./mcp-oauth-DomiX3XJ.js";import"./extract-connection-data-B1I5FGQh.js";import"./metadata-dUsYcpuu.js";import"./connection-BWzxBGaR.js";import"./provision-repo-scoped-github-connection-WQFARyHG.js";import"./connection-card-FOWu6o2x.js";import"./use-registry-connections-8jKgVSu8.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-Dyj892-C.js";import"./connection-form-helpers-tCou3o46.js";import"./collection-tabs-DTwxsscI.js";import"./badge-Df0POpHX.js";import"./use-file-configs-C93nUH97.js";import"./site-slug-uya6Wp4-.js";import"./dropdown-menu-Dn-LBZem.js";import"./get-initials-D-f_fDFw.js";import"./select-model-DtEtPkIv.js";import"./checkbox-CUAxY5xy.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-D_WY3arE.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-D3Nv9moR.js";import"./toolbar-DIlFGJBQ.js";import"./skill-preview-DXO3ykC1.js";import"./pt-BR-CLy76QW2.js";import"./alert-dialog-DW1zmq7a.js";import"./use-debounced-autosave-ClxVXQPW.js";import"./search-input-DfOXuzww.js";import"./use-mcp-auth-status-upTMow-Z.js";import"./use-secrets-CHDcCDFt.js";import"./client-icons-ErQpUWbT.js";import"./connect-layout-sj45J0Mr.js";import"./self-tool-result-CdKMJCXt.js";import"./track-BQLynX7D.js";import"./use-tags-Bjvv3Ict.js";import"./breadcrumb-EUBB2GC0.js";import"./safe-image-url-D5z803Ot.js";import"./automation-list-row-C5K4rGy8.js";import"./site-error--i37Vnuw.js";import"./cards-gW-s4zlH.js";const Et=new Set(["website/matchers/date.ts","$live/matchers/MatchDate.ts"]),St=new Set(["website/matchers/multi.ts","$live/matchers/MatchMulti.ts"]),Ct=new Date(-864e13),Mt=new Date(864e13),At=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,$t=/\/flags\/multivariate\.ts$/;function Lt(e){let t=e;t.startsWith("pages-")&&(t=t.slice(6).replace(/-\d+$/,""));try{t=decodeURIComponent(t)}catch{}return t}function Rt(e){if(!e||typeof e!="object")return null;const{start:t,end:r}=e,o=typeof t=="string",s=typeof r=="string";if(!o&&!s)return null;const i=o?new Date(t):Ct,a=s?new Date(r):Mt;return Number.isNaN(i.getTime())||Number.isNaN(a.getTime())||o&&s&&a.getTime()<=i.getTime()?null:{start:i,end:a,openStart:!o,openEnd:!s}}function pt(e,t){if(!e||typeof e!="object")return;const r=e.__resolveType;if(typeof r=="string"){if(Et.has(r)){const o=Rt(e);o&&t.push(o);return}if(St.has(r)){const o=e.matchers;if(Array.isArray(o))for(const s of o)pt(s,t)}}}function Dt(e){if(!e||typeof e!="object")return!1;const t=e.__resolveType;if(typeof t!="string"||!At.test(t))return!1;const r=e.variants;return Array.isArray(r)}function Ot(e){if(typeof e=="string"){const c=e.trim();if(c.length===0)return null;try{const m=new URL(c).pathname.split("/").filter(Boolean),p=m[m.length-1];if(p)return decodeURIComponent(p)}catch{}return c.length>80?`${c.slice(0,77)}…`:c}if(!e||typeof e!="object")return null;const t=e,r=t.config,s=t.desktop?.media,i=[t.title,t.name,t.label,t.alt,r?.title,r?.name,r?.typeAlert?.message,s?.alt,Array.isArray(t.matcher)?t.matcher[0]:void 0];for(const c of i)if(typeof c=="string"&&c.trim().length>0)return c.trim();const a=t.__resolveType;if(typeof a=="string"){const l=(a.split("/").pop()??a).replace(/\.(tsx?|jsx?)$/i,"");if(l.length>0)return l}return null}function Pt(e){const t=[];for(let r=0;r<e.length;r++){const o=e[r];typeof o=="number"?t.length>0?t[t.length-1]+=`[${o}]`:t.push(`[${o}]`):t.push(o)}return t.join(" · ")}function Q(e,t,r,o,s){if(Dt(e)){const i=e.variants,a=e.__resolveType,c=$t.test(a)?"":Pt(o);i.forEach((l,m)=>{if(!l||typeof l!="object")return;const p=l,h=[];if(pt(p.rule,h),h.length===0)return;const g=Ot(p.value)??(c||r);for(const u of h)s.push({blockKey:t,blockLabel:r,innerPath:c,variantIndex:m,start:u.start,end:u.end,openStart:u.openStart,openEnd:u.openEnd,label:g,flagResolveType:a})});for(let l=0;l<i.length;l++){const m=i[l];m&&typeof m=="object"&&Q(m.value,t,r,[...o,"variants",l,"value"],s)}return}if(Array.isArray(e)){for(let i=0;i<e.length;i++)Q(e[i],t,r,[...o,i],s);return}if(e&&typeof e=="object")for(const[i,a]of Object.entries(e))i!=="__resolveType"&&Q(a,t,r,[...o,i],s)}function It(e){if(!e)return[];const t=[];for(const[r,o]of Object.entries(e))Q(o,r,Lt(r),[],t);return t.sort((r,o)=>r.start.getTime()-o.start.getTime())}function Vt(e){const t=[...new Set(e)].sort(),r=new Map;return t.forEach((o,s)=>{const i=s*137.508%360;r.set(o,{bg:`oklch(0.62 0.14 ${i})`,text:"white",border:`oklch(0.50 0.14 ${i})`})}),r}const Ht={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Ht}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Bt(e,t){const r=e.openStart?t("sandbox.variantCalendar.always"):ot.format(e.start),o=e.openEnd?t("sandbox.variantCalendar.ongoing"):ot.format(e.end);return`${r} → ${o}`}function Ft(e){const t=K.c(18),{variant:r}=e,o=X();let s;t[0]!==r.blockLabel?(s=n.jsx("div",{className:"font-semibold",children:r.blockLabel}),t[0]=r.blockLabel,t[1]=s):s=t[1];let i;t[2]!==r.innerPath?(i=r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.innerPath}),t[2]=r.innerPath,t[3]=i):i=t[3];let a;t[4]!==r.blockLabel||t[5]!==r.innerPath||t[6]!==r.label?(a=r.label!==r.blockLabel&&r.label!==r.innerPath&&n.jsx("div",{className:"text-muted-foreground",children:r.label}),t[4]=r.blockLabel,t[5]=r.innerPath,t[6]=r.label,t[7]=a):a=t[7];let c;t[8]!==o||t[9]!==r?(c=Bt(r,o),t[8]=o,t[9]=r,t[10]=c):c=t[10];let l;t[11]!==c?(l=n.jsx("div",{className:"mt-1",children:c}),t[11]=c,t[12]=l):l=t[12];let m;return t[13]!==s||t[14]!==i||t[15]!==a||t[16]!==l?(m=n.jsx(xt,{children:n.jsxs("div",{className:"text-xs",children:[s,i,a,l]})}),t[13]=s,t[14]=i,t[15]=a,t[16]=l,t[17]=m):m=t[17],m}const nt=16;function zt(e,t){const r=e?"transparent":"#000 0",o=t?"transparent":"#000 100%";if(!(!e&&!t))return`linear-gradient(to right, ${r}, #000 ${nt}px, #000 calc(100% - ${nt}px), ${o})`}function ft(e){const t=K.c(26),{variant:r,color:o,style:s,children:i,fadeStart:a,fadeEnd:c}=e,l=a===void 0?!1:a,m=c===void 0?!1:c;let p;t[0]!==m||t[1]!==l?(p=zt(l,m),t[0]=m,t[1]=l,t[2]=p):p=t[2];const h=p;let f;t[3]!==l?(f=l&&{borderTopLeftRadius:0,borderBottomLeftRadius:0},t[3]=l,t[4]=f):f=t[4];let g;t[5]!==m?(g=m&&{borderTopRightRadius:0,borderBottomRightRadius:0},t[5]=m,t[6]=g):g=t[6];let u;t[7]!==h?(u=h&&{maskImage:h,WebkitMaskImage:h},t[7]=h,t[8]=u):u=t[8];let x;t[9]!==o.bg||t[10]!==o.text||t[11]!==s||t[12]!==f||t[13]!==g||t[14]!==u?(x={background:o.bg,color:o.text,borderRadius:4,...f,...g,...u,...s},t[9]=o.bg,t[10]=o.text,t[11]=s,t[12]=f,t[13]=g,t[14]=u,t[15]=x):x=t[15];let b;t[16]!==i?(b=n.jsx("span",{className:"truncate",children:i}),t[16]=i,t[17]=b):b=t[17];let E;t[18]!==x||t[19]!==b?(E=n.jsx(ut,{asChild:!0,children:n.jsx("div",{className:"absolute flex items-center px-2 text-[11px] font-medium truncate cursor-default",style:x,children:b})}),t[18]=x,t[19]=b,t[20]=E):E=t[20];let T;t[21]!==r?(T=n.jsx(Ft,{variant:r}),t[21]=r,t[22]=T):T=t[22];let d;return t[23]!==T||t[24]!==E?(d=n.jsxs(ht,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function Zo(e){const t=K.c(72),{decofile:r}=e,o=X(),[s,i]=Z.useState("calendar"),[a,c]=Z.useState(Kt),[l,m]=Z.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const I=It(r);p=I.filter(Ut).length,f=l?I:I.filter(Gt),h=Vt(f.map(Wt)),t[0]=r,t[1]=l,t[2]=p,t[3]=h,t[4]=f}else p=t[2],h=t[3],f=t[4];const g=h;let u;t[5]===Symbol.for("react.memo_cache_sentinel")?(u=()=>c(mt(new Date)),t[5]=u):u=t[5];const x=u;let b;t[6]!==s?(b=()=>c(I=>s==="calendar"?U(I,-1):U(I,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(I=>s==="calendar"?U(I,1):U(I,3)),t[8]=s,t[9]=T):T=t[9];const d=T;let v;t[10]!==o?(v=o("sandbox.variantCalendar.today"),t[10]=o,t[11]=v):v=t[11];let y;t[12]!==v?(y=n.jsx(tt,{variant:"outline",size:"sm",onClick:x,children:v}),t[12]=v,t[13]=y):y=t[13];let N;t[14]!==o?(N=o("sandbox.variantCalendar.previous"),t[14]=o,t[15]=N):N=t[15];let A;t[16]===Symbol.for("react.memo_cache_sentinel")?(A=n.jsx(gt,{size:16}),t[16]=A):A=t[16];let _;t[17]!==E||t[18]!==N?(_=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:E,"aria-label":N,children:A}),t[17]=E,t[18]=N,t[19]=_):_=t[19];let k;t[20]!==o?(k=o("sandbox.variantCalendar.next"),t[20]=o,t[21]=k):k=t[21];let C;t[22]===Symbol.for("react.memo_cache_sentinel")?(C=n.jsx(vt,{size:16}),t[22]=C):C=t[22];let $;t[23]!==d||t[24]!==k?($=n.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:d,"aria-label":k,children:C}),t[23]=d,t[24]=k,t[25]=$):$=t[25];const L=ct[a.getMonth()];let M;t[26]!==a?(M=a.getFullYear(),t[26]=a,t[27]=M):M=t[27];let w;t[28]!==L||t[29]!==M?(w=n.jsxs("h2",{className:"ml-2 text-base font-semibold",children:[L," ",M]}),t[28]=L,t[29]=M,t[30]=w):w=t[30];let j;t[31]!==$||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,$,w]}),t[31]=$,t[32]=w,t[33]=y,t[34]=_,t[35]=j):j=t[35];let R;t[36]!==p||t[37]!==l||t[38]!==o?(R=p>0&&n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(jt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(yt,{htmlFor:"show-ongoing",className:"text-xs text-muted-foreground cursor-pointer",children:o("sandbox.variantCalendar.showOngoing",{count:p})})]}),t[36]=p,t[37]=l,t[38]=o,t[39]=R):R=t[39];let B;t[40]===Symbol.for("react.memo_cache_sentinel")?(B=n.jsx(at,{}),t[40]=B):B=t[40];let V;t[41]!==o?(V=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=V):V=t[42];let S;t[43]!==V?(S={value:"calendar",icon:B,label:V},t[43]=V,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(bt,{}),t[45]=F):F=t[45];let D;t[46]!==o?(D=o("sandbox.variantCalendar.timelineMode"),t[46]=o,t[47]=D):D=t[47];let O;t[48]!==D?(O={value:"timeline",icon:F,label:D},t[48]=D,t[49]=O):O=t[49];let P;t[50]!==S||t[51]!==O?(P=[S,O],t[50]=S,t[51]=O,t[52]=P):P=t[52];let H;t[53]!==P||t[54]!==s?(H=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=H):H=t[55];let z;t[56]!==R||t[57]!==H?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,H]}),t[56]=R,t[57]=H,t[58]=z):z=t[58];let W;t[59]!==j||t[60]!==z?(W=n.jsxs("div",{className:"flex items-center justify-between px-4 h-12 border-b shrink-0",children:[j,z]}),t[59]=j,t[60]=z,t[61]=W):W=t[61];let G;t[62]!==g||t[63]!==a||t[64]!==p||t[65]!==l||t[66]!==f||t[67]!==s?(G=f.length===0?n.jsx(Yt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Jt,{monthStart:a,variants:f,colorMap:g}):n.jsx(te,{monthStart:a,variants:f,colorMap:g}),t[62]=g,t[63]=a,t[64]=p,t[65]=l,t[66]=f,t[67]=s,t[68]=G):G=t[68];let q;return t[69]!==W||t[70]!==G?(q=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=q):q=t[71],q}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Kt(){return mt(new Date)}function Yt(e){const t=K.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=X();let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsx(at,{size:24,className:"text-muted-foreground/60"}),t[0]=i):i=t[0];let a;return t[1]!==o||t[2]!==s?(a=n.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-2 text-center text-sm text-muted-foreground p-6",children:[i,o>0?n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noDatedVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.hiddenOngoingVariants",{count:o})})]}):n.jsxs(n.Fragment,{children:[n.jsx("div",{children:s("sandbox.variantCalendar.noScheduledVariants")}),n.jsx("div",{className:"text-xs text-muted-foreground/80",children:s("sandbox.variantCalendar.dateMatcherInfo")})]})]}),t[1]=o,t[2]=s,t[3]=a):a=t[3],a}const et=20,it=2,st=28,qt=6;function Jt(e){const t=K.c(17),{monthStart:r,variants:o,colorMap:s}=e;let i,a,c,l,m;if(t[0]!==s||t[1]!==r||t[2]!==o){const f=Nt(r),g=_t(new Date);i=lt,m="flex-1 min-h-0",a="min-w-[840px]",t[8]===Symbol.for("react.memo_cache_sentinel")?(c=n.jsx("div",{className:"grid grid-cols-7 border-b text-xs text-muted-foreground sticky top-0 bg-background z-10",children:wt.map(Xt)}),t[8]=c):c=t[8],l=f.map((u,x)=>{const b=kt(u,o),E=b.reduce(Qt,0),T=st+E*(et+it)+8;return n.jsxs("div",{className:"grid grid-cols-7 relative border-b",style:{height:T},children:[u.map((d,v)=>{const y=d.getMonth()===r.getMonth(),N=d.getTime()===g.getTime();return n.jsx("div",{className:rt("border-r last:border-r-0 px-2 pt-1.5 text-xs",y?"bg-background":"bg-muted/30 text-muted-foreground"),children:n.jsx("span",{className:rt("inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1",N&&"bg-primary text-primary-foreground font-semibold"),children:d.getDate()})},v)}),b.map((d,v)=>{const y=dt(s,d.variant.blockKey),N=st+d.lane*(et+it),A=d.leftUnits/7*100,_=d.widthUnits/7*100,k=d.variant.openStart&&x===0,C=d.variant.openEnd&&x===f.length-1;return n.jsxs(ft,{variant:d.variant,color:y,fadeStart:k,fadeEnd:C,style:{top:N,left:`calc(${A}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:qt,height:et},children:[d.variant.blockLabel,d.variant.label!==d.variant.blockLabel&&n.jsxs("span",{className:"opacity-70",children:[" · ",d.variant.label]})]},`${x}-${v}`)})]},x)}),t[0]=s,t[1]=r,t[2]=o,t[3]=i,t[4]=a,t[5]=c,t[6]=l,t[7]=m}else i=t[3],a=t[4],c=t[5],l=t[6],m=t[7];let p;t[9]!==a||t[10]!==c||t[11]!==l?(p=n.jsxs("div",{className:a,children:[c,l]}),t[9]=a,t[10]=c,t[11]=l,t[12]=p):p=t[12];let h;return t[13]!==i||t[14]!==m||t[15]!==p?(h=n.jsx(i,{className:m,children:p}),t[13]=i,t[14]=m,t[15]=p,t[16]=h):h=t[16],h}function Qt(e,t){return Math.max(e,t.lane+1)}function Xt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const J=4,Zt=32,Y=240;function te(e){const t=K.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,J),c=new Date,l=new Map;for(const w of o){const j=l.get(w.blockKey)??[];j.push(w),l.set(w.blockKey,j)}const m=Array.from(l.entries()).sort(oe),p=a.getTime()-i.getTime(),h=w=>(Math.max(i.getTime(),Math.min(a.getTime(),w.getTime()))-i.getTime())/p*100;let f;t[0]!==i?(f=(w,j)=>U(i,j),t[0]=i,t[1]=f):f=t[1];const g=Array.from({length:J},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=X(),b=lt,E="flex-1 min-h-0",T="min-w-[900px] relative";let d;t[2]===Symbol.for("react.memo_cache_sentinel")?(d={width:Y},t[2]=d):d=t[2];let v;t[3]!==x?(v=x("sandbox.variantCalendar.variantBlock"),t[3]=x,t[4]=v):v=t[4];let y;t[5]!==v?(y=n.jsx("div",{className:"shrink-0 px-3 py-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground border-r",style:d,children:v}),t[5]=v,t[6]=y):y=t[6];let N;t[7]===Symbol.for("react.memo_cache_sentinel")?(N={gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},t[7]=N):N=t[7];const A=g.map(re);let _;t[8]!==A?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:A}),t[8]=A,t[9]=_):_=t[9];let k;t[10]!==y||t[11]!==_?(k=n.jsxs("div",{className:"flex border-b sticky top-0 bg-background z-10",children:[y,_]}),t[10]=y,t[11]=_,t[12]=k):k=t[12];let C;t[13]!==x||t[14]!==u?(C=u!==null&&n.jsx("div",{className:"pointer-events-none absolute top-0 bottom-0 w-px bg-primary/70 z-[5]",style:{left:`calc(${Y}px + (100% - ${Y}px) * ${u} / 100)`},children:n.jsx("span",{className:"absolute -top-0.5 -translate-x-1/2 rounded-sm bg-primary px-1.5 py-px text-[10px] font-medium text-primary-foreground",children:x("sandbox.variantCalendar.todayLabel")})}),t[13]=x,t[14]=u,t[15]=C):C=t[15];const $=m.map(w=>{const[j,R]=w,B=dt(s,j),V=R[0]?.blockLabel??j;return n.jsxs("div",{children:[n.jsx("div",{className:"flex items-center bg-muted/40 border-b text-xs font-semibold uppercase tracking-wide text-muted-foreground",style:{height:28},children:n.jsx("div",{className:"px-3 truncate",style:{width:Y},children:V})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Zt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:Y},children:[n.jsx("span",{className:"inline-block h-2 w-2 rounded-full shrink-0",style:{background:B.bg}}),n.jsx("span",{className:"truncate text-foreground/80",children:S.label})]}),n.jsxs("div",{className:"relative flex-1 h-full",children:[n.jsx("div",{className:"absolute inset-0 grid",style:{gridTemplateColumns:`repeat(${J}, minmax(0, 1fr))`},children:g.map(ee)}),(()=>{const D=Math.max(S.start.getTime(),i.getTime()),O=Math.min(S.end.getTime(),a.getTime());if(O<=D)return null;const P=h(new Date(D)),H=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:B,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${H}% - 2px)`,height:22},children:S.label})})()]})]},F))]},j)});let L;t[16]!==k||t[17]!==C||t[18]!==$?(L=n.jsxs("div",{className:T,children:[k,C,$]}),t[16]=k,t[17]=C,t[18]=$,t[19]=L):L=t[19];let M;return t[20]!==b||t[21]!==L?(M=n.jsx(b,{className:E,children:L}),t[20]=b,t[21]=L,t[22]=M):M=t[22],M}function ee(e,t){return n.jsx("div",{className:"border-r last:border-r-0 border-border/40"},t)}function re(e,t){return n.jsxs("div",{className:"px-2 py-2 text-xs uppercase tracking-wide text-muted-foreground border-r last:border-r-0",children:[ct[e.getMonth()]?.slice(0,3)," ",e.getFullYear()]},t)}function oe(e,t){return e[0].localeCompare(t[0])}export{Zo as VariantCalendar};
@@ -1 +1 @@
1
- import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-DIoG5Nzm.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
1
+ import{c as $,r as C,l as f,j as i,a4 as k,a1 as I,a2 as P}from"./index-lSAvH_rL.js";const M={sm:{button:"size-7",buttonWithLabel:"h-7",icon:"size-4"},md:{button:"size-9",buttonWithLabel:"h-9",icon:"size-5"},lg:{button:"size-12",buttonWithLabel:"h-12",icon:"size-6"}};function A(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:L,fullWidth:R,className:z}=E,_=L===void 0?"sm":L,m=R===void 0?!1:R;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const T=C.useRef(h);let x;t[1]===Symbol.for("react.memo_cache_sentinel")?(x={left:0,width:0,opacity:0},t[1]=x):x=t[1];const[d,S]=C.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=T.current[e];b&&S({left:b.offsetLeft,width:b.offsetWidth,opacity:1})},p=[s,o],t[2]=o,t[3]=s,t[4]=g,t[5]=p):(g=t[4],p=t[5]),C.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{T.current[b]=V},type:"button",onClick:()=>y(e.value),"aria-label":e.label,className:f("relative z-10 flex items-center justify-center gap-2 rounded-lg transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-lg border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
@@ -50,8 +50,8 @@
50
50
  <meta name="twitter:description" content="Hire specialized agents, give them access to your tools, and let them deliver real projects — with planning, verification, and observability built in." />
51
51
  <meta name="twitter:image" content="/og-image.png" />
52
52
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
53
- <script type="module" crossorigin src="/assets/index-DIoG5Nzm.js"></script>
54
- <link rel="stylesheet" crossorigin href="/assets/index-DN9-7YC2.css">
53
+ <script type="module" crossorigin src="/assets/index-lSAvH_rL.js"></script>
54
+ <link rel="stylesheet" crossorigin href="/assets/index-BqRfxAzW.css">
55
55
  </head>
56
56
  <body>
57
57
  <div id="root"></div>
@@ -1545,7 +1545,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var pn1=L(()=>{Eb()});f
1545
1545
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await dy`
1546
1546
  DELETE FROM kysely_migration WHERE name = ${Q}
1547
1547
  `.execute($)}}async function as1($){await V04($),await k04($);let Z=new os1({db:$,provider:{getMigrations:()=>Promise.resolve(fn0)}}),{error:Q,results:X}=await Z.migrateToLatest(),Y=0;if(X?.forEach((G)=>{if(G.status==="Success")Y++;else if(G.status==="Error")console.error(`Failed to execute migration "${G.migrationName}"`)}),Q)throw console.error("Failed to migrate"),console.error(Q),Q;return Y}async function S04($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await Am0();let G=Q??c$(),J=async()=>{if(!Z&&!Q)await NO(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await as1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function C04(){let $=c$(),Z=new os1({db:$.db,provider:{getMigrations:()=>Promise.resolve(fn0)}}),{error:Q,results:X}=await Z.migrateDown();if(X?.forEach((Y)=>{if(Y.status==="Success")console.log(`\u2705 Migration "${Y.migrationName}" rolled back successfully`);else if(Y.status==="Error")console.error(`\u274C Failed to rollback migration "${Y.migrationName}"`)}),Q)throw console.error("Failed to rollback migration"),console.error(Q),Q}var es1=L(()=>{ts1();Tm0();WQ()});async function c70($){let Z={...process.env},Q=v80($,Z);console.log(tE1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?Ro1(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (iZ0(),dZ0)),{outputs:G,services:J}=await Y({home:Q.settings.dataDir,externalDatabaseUrl:Q.externalDatabaseUrl,externalNatsUrl:Q.externalNatsUrl});if(!Q.skipMigrations){let{migrateBetterAuth:W}=await Promise.resolve().then(() => (Tm0(),qo1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (WQ(),lt1)),{migrateToLatest:F}=await Promise.resolve().then(() => (es1(),ss1)),U=H(G.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let K={...Q.settings,betterAuthSecret:X,databaseUrl:G.databaseUrl,natsUrls:G.natsUrls,...G.s3?{s3Endpoint:G.s3.endpoint,s3Bucket:G.s3.bucket,s3AccessKeyId:G.s3.accessKeyId,s3SecretAccessKey:G.s3.secretAccessKey,s3ForcePathStyle:G.s3.forcePathStyle}:{}};return nn1(K),{settings:K,services:J.map((W)=>({name:W.name==="PostgreSQL"?"Postgres":W.name,port:W.port})),managedServiceNames:J.filter((W)=>W.owner==="managed").map((W)=>W.name)}}var bn0=L(()=>{Eb();Io1();j$()});var Xe1={};s(Xe1,{updateService:()=>Yj,subscribeCliState:()=>hn0,setTuiConsoleIntercepted:()=>l70,setServerUrl:()=>yp,setMigrationsDone:()=>bp,setDevMode:()=>v04,resetCliStateForTests:()=>_04,isTuiConsoleIntercepted:()=>m70,getCliState:()=>gn0,addLogEntry:()=>jO});function $e1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Ze1(){return{services:$e1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function _04(){oX=Ze1()}function fp(){for(let $ of yn0)$()}function gn0(){return oX}function hn0($){return yn0.add($),()=>yn0.delete($)}function Yj($){oX={...oX,services:oX.services.map((Z)=>Z.name===$.name?$:Z)},fp()}function bp(){oX={...oX,migrationsStatus:"done"},fp()}function yp($){oX={...oX,serverUrl:$},fp()}function jO($){let Z=[...oX.logs,$];oX={...oX,logs:Z.length>500?Z.slice(-500):Z},fp()}function v04(){oX={...oX,services:[...$e1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},fp()}function l70($){Qe1=$}function m70(){return Qe1}var oX,yn0,Qe1=!1;var Gj=L(()=>{oX=Ze1();yn0=new Set});import{createServer as Ye1}from"net";function x04($){return new Promise((Z)=>{let Q=Ye1();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function gp($){if(await x04($))return $;let Z=await new Promise((Q,X)=>{let Y=Ye1();Y.once("error",X),Y.listen(0,"0.0.0.0",()=>{let G=Y.address(),J=typeof G==="object"&&G?G.port:0;Y.close(()=>Q(J))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var un0=()=>{};var ln0={};s(ln0,{startDevServer:()=>b04,pipeToLogStore:()=>cn0});import{join as f04}from"path";function cn0($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let G=X.split(`
1548
- `);X=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;jO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;X+=Q.decode(J,{stream:!0}),Y()}}catch{}if(X.trim()){let G=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(G)jO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function b04($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=X?await gp(Number(Y)+1):await gp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await c70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)Yj({name:D.name,status:"ready",port:D.port});bp();let F=f04(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)cn0(N.stdout),cn0(N.stderr);yp(G),Yj({name:"Vite",status:"ready",port:Number(Y)}),Yj({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (iZ0(),dZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var mn0=L(()=>{bn0();Gj();un0()});var d70;var dn0=L(()=>{d70={name:"decocms",version:"4.329.9",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as g04,Text as Ge1}from"ink";import{jsx as h04,jsxs as Je1}from"react/jsx-runtime";function Ke1({version:$}){return Je1(g04,{flexDirection:"column",marginTop:1,children:[O70.map((Z,Q)=>h04(Ge1,{color:L70[Q],children:Z},Q)),Je1(Ge1,{dimColor:!0,children:[" v",$]})]})}var We1=L(()=>{Tp()});import{Box as Jj,Text as zO}from"ink";import{Spinner as u04}from"@inkjs/ui";import{jsx as UG,jsxs as iy}from"react/jsx-runtime";function He1({status:$}){if($==="pending")return UG(u04,{label:""});return UG(zO,{color:"green",children:"\u2713"})}function c04($){return`${$.name}: ${$.port||"...."}`}function Fe1({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return iy(Jj,{flexDirection:"column",paddingBottom:1,children:[UG(Ke1,{version:d70.version}),UG(Jj,{marginBottom:1,children:UG(zO,{dimColor:!0,children:"\u2500".repeat(80)})}),UG(Jj,{children:iy(zO,{dimColor:!0,children:["Home: ",Q]})}),iy(Jj,{gap:2,children:[$.map((Y)=>iy(Jj,{gap:1,children:[UG(zO,{children:c04(Y)}),UG(He1,{status:Y.status})]},Y.name)),iy(Jj,{gap:1,children:[UG(zO,{children:"Migrations"}),UG(He1,{status:Z})]})]}),UG(Jj,{children:X?iy(zO,{children:["Open in browser: ",UG(zO,{color:"cyan",children:X})]}):UG(zO,{dimColor:!0,children:"Starting..."})})]})}var Ue1=L(()=>{dn0();We1()});import{Box as l04,Text as hp}from"ink";import{jsx as in0,jsxs as pn0}from"react/jsx-runtime";function m04($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ne1({logs:$}){return in0(l04,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return in0(hp,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return pn0(hp,{children:[pn0(hp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),in0(hp,{color:m04(Z.status),children:Z.status}),pn0(hp,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var Be1=()=>{};var nn0={};s(nn0,{App:()=>p04});import{Box as d04}from"ink";import{useSyncExternalStore as i04}from"react";import{jsx as Oe1,jsxs as n04}from"react/jsx-runtime";function p04({home:$}){let Z=i04(hn0,gn0);return n04(d04,{flexDirection:"column",children:[Oe1(Fe1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Oe1(Ne1,{logs:Z.logs})]})}var tn0=L(()=>{Ue1();Be1();Gj()});var a3="thread-gate",RU="decopilot-hosted-harness",IU="decopilot-hosted-harness-sandboxed",MJ="automations",PO="background-tools",Kj="task-board-github-reads";var Le1="11";function De1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Le1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var we1=()=>{};import t04 from"pg";async function je1($,Z){let{databaseUrl:Q,lockTimeoutMs:X=o04}=$,Y=$.log??((W)=>console.log(W)),G=new t04.Client({connectionString:Q});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ee1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await F$(r04)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ee1.toString()])}catch{}await G.end().catch(()=>{})}}var Ee1=8314027461559302n,o04=600000,r04=500;var ze1=L(()=>{t8()});function a04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function on0($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function Pe1(){let $=a04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:on0($,"--cpu-prof-dir")??process.cwd(),name:on0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(on0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Ae1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=$j();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),i70=setInterval(()=>void Z().catch(()=>{}),$),i70.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(i70)clearInterval(i70)}}var i70;var Te1=()=>{};import*as s04 from"bun:jsc";function Re1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{e04()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-X;X=G+Z;let K=[];try{K=$14()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var e04,$14;var Ie1=L(()=>{({startSamplingProfiler:e04,samplingProfilerStackTraces:$14}=s04)});function qe1(){Pe1();let $=[Ae1(),xt1(),Re1()];return()=>{for(let Z of $)Z()}}var Me1=L(()=>{Bm0();Te1();Ie1()});var Wj=v((Ve1)=>{Object.defineProperty(Ve1,"__esModule",{value:!0});Ve1.RepublishHeaders=Ve1.DirectMsgHeaders=Ve1.JsHeaders=Ve1.AdvisoryKind=void 0;Ve1.isOrderedPushConsumerOptions=Z14;Ve1.isPullConsumer=Q14;Ve1.isPushConsumer=X14;Ve1.isBoundPushConsumerOptions=Y14;function Z14($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function Q14($){return $.isPullConsumer()}function X14($){return $.isPushConsumer()}function Y14($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ve1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Ve1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Ve1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ve1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var NG=v((Se1)=>{Object.defineProperty(Se1,"__esModule",{value:!0});Se1.TD=Se1.TE=Se1.Empty=void 0;Se1.encode=B14;Se1.decode=O14;Se1.Empty=new Uint8Array(0);Se1.TE=new TextEncoder;Se1.TD=new TextDecoder;function N14(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function B14(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(Se1.TE.encode($[Q]));if(Z.length===0)return Se1.Empty;if(Z.length===1)return Z[0];return N14(...Z)}function O14($){if(!$||$.length===0)return"";return Se1.TD.decode($)}});var BG=v((ve1)=>{Object.defineProperty(ve1,"__esModule",{value:!0});ve1.errors=ve1.PermissionViolationError=ve1.NoRespondersError=ve1.TimeoutError=ve1.RequestError=ve1.ProtocolError=ve1.ConnectionError=ve1.DrainingConnectionError=ve1.ClosedConnectionError=ve1.AuthorizationError=ve1.UserAuthenticationExpiredError=ve1.InvalidOperationError=ve1.InvalidArgumentError=ve1.InvalidSubjectError=void 0;class an0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ve1.InvalidSubjectError=an0;class p70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new p70(`${$} ${Z}`,Q)}}ve1.InvalidArgumentError=p70;class sn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ve1.InvalidOperationError=sn0;class n70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new n70($);return null}}ve1.UserAuthenticationExpiredError=n70;class t70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new t70($);return null}}ve1.AuthorizationError=t70;class en0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ve1.ClosedConnectionError=en0;class $t0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ve1.DrainingConnectionError=$t0;class Zt0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ve1.ConnectionError=Zt0;class Qt0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ve1.ProtocolError=Qt0;class Xt0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof o70}}ve1.RequestError=Xt0;class Yt0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ve1.TimeoutError=Yt0;class o70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ve1.NoRespondersError=o70;class r70 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(Q=G[1].toLowerCase(),X=G[2],Q==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new r70($,Q,X,Y)}}ve1.PermissionViolationError=r70;ve1.errors={AuthorizationError:t70,ClosedConnectionError:en0,ConnectionError:Zt0,DrainingConnectionError:$t0,InvalidArgumentError:p70,InvalidOperationError:sn0,InvalidSubjectError:an0,NoRespondersError:o70,PermissionViolationError:r70,ProtocolError:Qt0,RequestError:Xt0,TimeoutError:Yt0,UserAuthenticationExpiredError:n70}});var s3=v((ge1)=>{Object.defineProperty(ge1,"__esModule",{value:!0});ge1.SimpleMutex=ge1.Perf=void 0;ge1.extend=C14;ge1.render=_14;ge1.timeout=v14;ge1.delay=x14;ge1.deadline=f14;ge1.deferred=Jt0;ge1.debugDeferred=b14;ge1.shuffle=y14;ge1.collect=g14;ge1.jitter=ye1;ge1.backoff=h14;ge1.nanos=u14;ge1.millis=c14;ge1.randomToken=d14;var S14=NG(),Gt0=BG();function C14($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function _14($){return S14.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function v14($,Z=!0){let Q=Z?new Gt0.TimeoutError:null,X,Y,G=new Promise((J,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new Gt0.TimeoutError);else K(Q)},$)});return Object.assign(G,X)}function x14($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function f14($,Z=1000){let Q=Jt0(),X=setTimeout(()=>{Q.reject(new Gt0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function Jt0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function b14(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function y14($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function g14($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class fe1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}ge1.Perf=fe1;class be1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Jt0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ge1.SimpleMutex=be1;function ye1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function h14($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return ye1(Q>Z?$[Z]:$[Q])}}}function u14($){return $*1e6}function c14($){return Math.floor($/1e6)}var l14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qU=new Uint8Array(62);for(let $=0;$<62;$++)qU[$]=l14.charCodeAt($);var m14=218340105584896;function d14(){let $=Math.floor(Math.random()*m14),Z=$%62,Q=qU[Z];$=($-Z)/62,Z=$%62;let X=qU[Z];$=($-Z)/62,Z=$%62;let Y=qU[Z];$=($-Z)/62,Z=$%62;let G=qU[Z];$=($-Z)/62,Z=$%62;let J=qU[Z];$=($-Z)/62,Z=$%62;let K=qU[Z];$=($-Z)/62,Z=$%62;let W=qU[Z];$=($-Z)/62;let H=qU[$];return String.fromCharCode(Q,X,Y,G,J,K,W,H)}});var pe1=v((de1)=>{Object.defineProperty(de1,"__esModule",{value:!0});de1.nuid=de1.NuidImpl=void 0;var J$4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",AO=62,s70=12,le1=10,ue1=33,K$4=333,ce1=s70+le1,Wt0=new Uint8Array(AO);for(let $=0;$<AO;$++)Wt0[$]=J$4.charCodeAt($);var a70=4294967296,me1=BigInt(AO)**BigInt(le1),up=Number(me1/(1n<<32n)),Kt0=Number(me1%(1n<<32n));function W$4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function H$4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else W$4($)}class Ht0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(ce1),this.cbuf=new Uint8Array(s70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(up+1)),this.seqLo=Math.floor(Math.random()*a70);while($++<8&&this.seqHi===up&&this.seqLo>=Kt0);if(this.seqHi===up&&this.seqLo>=Kt0)this.seqLo=0;this.inc=Math.random()*(K$4-ue1)+ue1|0}setPre(){H$4(this.cbuf);for(let $=0;$<s70;$++)this.buf[$]=Wt0[this.cbuf[$]%AO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=ce1-1;Q>=s70;Q--){let X=Math.floor($/AO),G=($-X*AO)*a70+Z,J=Math.floor(G/AO),K=G-J*AO;this.buf[Q]=Wt0[K],$=X,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=a70)this.seqLo-=a70,this.seqHi+=1;if(this.seqHi>up||this.seqHi===up&&this.seqLo>=Kt0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}de1.NuidImpl=Ht0;de1.nuid=new Ht0});var re1=v((te1)=>{Object.defineProperty(te1,"__esModule",{value:!0});te1.nuid=te1.Nuid=void 0;var ne1=pe1();te1.Nuid=ne1.NuidImpl;te1.nuid=ne1.nuid});var $Q0=v((e70)=>{Object.defineProperty(e70,"__esModule",{value:!0});e70.nuid=e70.Nuid=void 0;var ae1=re1();Object.defineProperty(e70,"Nuid",{enumerable:!0,get:function(){return ae1.Nuid}});Object.defineProperty(e70,"nuid",{enumerable:!0,get:function(){return ae1.nuid}})});var TO=v((se1)=>{Object.defineProperty(se1,"__esModule",{value:!0});se1.DEFAULT_HOST=se1.DEFAULT_PORT=se1.Match=void 0;se1.syncIterator=L$4;se1.createInbox=D$4;var B$4=$Q0(),O$4=BG();se1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function L$4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function D$4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw O$4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${B$4.nuid.next()}`}se1.DEFAULT_PORT=4222;se1.DEFAULT_HOST="127.0.0.1"});var cp=v((Q0$)=>{Object.defineProperty(Q0$,"__esModule",{value:!0});Q0$.DataBuffer=void 0;var $0$=NG();class Z0${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return $0$.TE.encode($)}static toAscii($){return $0$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}Q0$.DataBuffer=Z0$});var Hj=v((G0$)=>{Object.defineProperty(G0$,"__esModule",{value:!0});G0$.LF=G0$.CR=G0$.CRLF=G0$.CR_LF_LEN=G0$.CR_LF=void 0;G0$.setTransportFactory=R$4;G0$.defaultPort=I$4;G0$.getUrlParseFn=q$4;G0$.newTransport=M$4;G0$.getResolveFn=V$4;G0$.protoLen=Y0$;G0$.extractProtocolMessage=k$4;var P$4=NG(),A$4=TO(),T$4=cp(),OG;function R$4($){OG=$}function I$4(){return OG!==void 0&&OG.defaultPort!==void 0?OG.defaultPort:A$4.DEFAULT_PORT}function q$4(){return OG!==void 0&&OG.urlParseFn?OG.urlParseFn:void 0}function M$4(){if(!OG||typeof OG.factory!=="function")throw Error("transport fn is not set");return OG.factory()}function V$4(){return OG!==void 0&&OG.dnsResolveFn?OG.dnsResolveFn:void 0}G0$.CR_LF=`\r
1548
+ `);X=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;jO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:K})}}(async()=>{try{for(;;){let{done:G,value:J}=await Z.read();if(G)break;X+=Q.decode(J,{stream:!0}),Y()}}catch{}if(X.trim()){let G=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(G)jO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function b04($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,G=Z||`http://localhost:${Y}`,J=X?await gp(Number(Y)+1):await gp(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await c70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)Yj({name:D.name,status:"ready",port:D.port});bp();let F=f04(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(K.port),VITE_PORT:String(Y),DATABASE_URL:K.databaseUrl,NATS_URL:K.natsUrls.join(","),NODE_ENV:K.nodeEnv,BASE_URL:G,DECOCMS_LOCAL_MODE:String(K.localMode),DECOCMS_HOME:K.dataDir,DATA_DIR:K.dataDir,DECO_CLI:"1",...K.betterAuthSecret?{BETTER_AUTH_SECRET:K.betterAuthSecret}:{},...K.s3Endpoint?{S3_ENDPOINT:K.s3Endpoint,S3_BUCKET:K.s3Bucket??"",S3_ACCESS_KEY_ID:K.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:K.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(K.s3ForcePathStyle)}:{},...K.natsCredsPath?{NATS_CREDS:K.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)cn0(N.stdout),cn0(N.stderr);yp(G),Yj({name:"Vite",status:"ready",port:Number(Y)}),Yj({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(N.kill(D),await N.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (iZ0(),dZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:N}}var mn0=L(()=>{bn0();Gj();un0()});var d70;var dn0=L(()=>{d70={name:"decocms",version:"4.330.0",description:"Deco CMS \u2014 Self-hostable MCP Gateway for managing AI connections and tools",author:"Deco team",repository:{type:"git",url:"git+https://github.com/decocms/studio.git",directory:"apps/api"},bugs:{url:"https://github.com/decocms/studio/issues"},type:"module",bin:{deco:"./dist/server/cli.js"},files:["dist/**/*"],scripts:{dev:"bun run migrate && bun run dev:server","dev:server":"bun run --cwd=../../packages/sandbox build && NODE_ENV=development bun --env-file=.env --hot run src/index.ts",build:"bun run build:server","build:server":"bun run scripts/bundle-server-script.ts --dist ./dist/server","generate:tool-contracts":"bun run scripts/generate-tool-contracts.ts","db:migrate":"bun run ./dist/server/migrate.js","db:migrate:dbos":"bun run ./dist/server/migrate-dbos.js",check:"tsc --noEmit",start:"bun run ./dist/server/server.js",migrate:"bun run src/database/migrate.ts","migrate:dbos":"bun run src/database/migrate-dbos.ts",test:"bun test src","better-auth:migrate":"bunx --bun @better-auth/cli migrate -y --config src/auth/index.ts",prepublishOnly:"bun run --cwd=../.. build:studio"},optionalDependencies:{"@duckdb/node-api":"^1.5.0-r.1"},dependencies:{"@ai-sdk/anthropic":"^3.0.85","@ai-sdk/google":"^3.0.83","@ai-sdk/openai":"^3.0.73","@anthropic-ai/sdk":"^0.105.0","@aws-sdk/client-s3":"^3.1013.0","@aws-sdk/client-sts":"^3.1013.0","@aws-sdk/lib-storage":"^3.1013.0","@aws-sdk/s3-request-presigner":"^3.1013.0","@clickhouse/client":"^1.8.1","@dbos-inc/dbos-sdk":"^4.21.6","@inkjs/ui":"^2.0.0","@nats-io/jetstream":"3.4.0","@nats-io/kv":"3.4.0","@nats-io/nats-core":"3.4.0","@nats-io/transport-node":"3.4.0","@openrouter/ai-sdk-provider":"^2.9.1","@opentelemetry/core":"^2.6.0","embedded-postgres":"^18.3.0-beta.16",ink:"^6.8.0",kysely:"^0.28.12","posthog-node":"^5.0.0",react:"^19.2.6","react-dom":"^19.2.6"},devDependencies:{"@ai-sdk/provider":"^3.0.10","@better-auth/sso":"1.4.1","@decocms/better-auth":"1.5.17","@decocms/bindings":"workspace:*","@decocms/mcp-utils":"workspace:*","@decocms/runtime":"workspace:*","@decocms/sandbox":"workspace:*","@decocms/shared":"workspace:*","@jitl/quickjs-wasmfile-release-sync":"0.31.0","@modelcontextprotocol/sdk":"1.29.0","@opentelemetry/api":"^1.9.0","@opentelemetry/api-logs":"^0.211.0","@opentelemetry/exporter-logs-otlp-proto":"^0.211.0","@opentelemetry/exporter-prometheus":"^0.208.0","@opentelemetry/exporter-trace-otlp-proto":"^0.207.0","@opentelemetry/instrumentation-runtime-node":"^0.24.0","@opentelemetry/resources":"^2.6.0","@opentelemetry/sdk-logs":"^0.211.0","@opentelemetry/sdk-metrics":"^2.2.0","@opentelemetry/sdk-node":"^0.207.0","@opentelemetry/sdk-trace-base":"^2.5.0","@types/bun":"^1.3.1","@types/google.maps":"^3.65.2","@types/pg":"^8.15.6","@types/react-syntax-highlighter":"^15.5.13","@vercel/nft":"^1.1.1",ai:"^6.0.208","better-auth":"1.4.22",croner:"^9.1.0",degit:"^2.8.4",hono:"^4.10.7",jose:"^6.0.11",nanoid:"^5.1.6",pg:"^8.16.3",typescript:"^7.0.2",typescript5:"npm:typescript@^5.9.3",zod:"4.3.6"},homepage:"https://github.com/decocms/studio",keywords:["mcp","model-context-protocol","ai","gateway","self-hosted","tools"],license:"MIT",publishConfig:{access:"public"}}});import{Box as g04,Text as Ge1}from"ink";import{jsx as h04,jsxs as Je1}from"react/jsx-runtime";function Ke1({version:$}){return Je1(g04,{flexDirection:"column",marginTop:1,children:[O70.map((Z,Q)=>h04(Ge1,{color:L70[Q],children:Z},Q)),Je1(Ge1,{dimColor:!0,children:[" v",$]})]})}var We1=L(()=>{Tp()});import{Box as Jj,Text as zO}from"ink";import{Spinner as u04}from"@inkjs/ui";import{jsx as UG,jsxs as iy}from"react/jsx-runtime";function He1({status:$}){if($==="pending")return UG(u04,{label:""});return UG(zO,{color:"green",children:"\u2713"})}function c04($){return`${$.name}: ${$.port||"...."}`}function Fe1({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return iy(Jj,{flexDirection:"column",paddingBottom:1,children:[UG(Ke1,{version:d70.version}),UG(Jj,{marginBottom:1,children:UG(zO,{dimColor:!0,children:"\u2500".repeat(80)})}),UG(Jj,{children:iy(zO,{dimColor:!0,children:["Home: ",Q]})}),iy(Jj,{gap:2,children:[$.map((Y)=>iy(Jj,{gap:1,children:[UG(zO,{children:c04(Y)}),UG(He1,{status:Y.status})]},Y.name)),iy(Jj,{gap:1,children:[UG(zO,{children:"Migrations"}),UG(He1,{status:Z})]})]}),UG(Jj,{children:X?iy(zO,{children:["Open in browser: ",UG(zO,{color:"cyan",children:X})]}):UG(zO,{dimColor:!0,children:"Starting..."})})]})}var Ue1=L(()=>{dn0();We1()});import{Box as l04,Text as hp}from"ink";import{jsx as in0,jsxs as pn0}from"react/jsx-runtime";function m04($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function Ne1({logs:$}){return in0(l04,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return in0(hp,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return pn0(hp,{children:[pn0(hp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),in0(hp,{color:m04(Z.status),children:Z.status}),pn0(hp,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var Be1=()=>{};var nn0={};s(nn0,{App:()=>p04});import{Box as d04}from"ink";import{useSyncExternalStore as i04}from"react";import{jsx as Oe1,jsxs as n04}from"react/jsx-runtime";function p04({home:$}){let Z=i04(hn0,gn0);return n04(d04,{flexDirection:"column",children:[Oe1(Fe1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),Oe1(Ne1,{logs:Z.logs})]})}var tn0=L(()=>{Ue1();Be1();Gj()});var a3="thread-gate",RU="decopilot-hosted-harness",IU="decopilot-hosted-harness-sandboxed",MJ="automations",PO="background-tools",Kj="task-board-github-reads";var Le1="11";function De1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:Le1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var we1=()=>{};import t04 from"pg";async function je1($,Z){let{databaseUrl:Q,lockTimeoutMs:X=o04}=$,Y=$.log??((W)=>console.log(W)),G=new t04.Client({connectionString:Q});await G.connect();let J=Date.now(),K=!1;try{while(!K){if(K=(await G.query("SELECT pg_try_advisory_lock($1) AS locked",[Ee1.toString()])).rows[0]?.locked===!0,K)break;if(Date.now()-J>=X)throw Error(`Timed out after ${X}ms waiting for the DBOS migration lock. Another process is still migrating the dbos schema; this pod will restart and retry.`);await F$(r04)}let W=Date.now()-J;if(W>1000)Y(`[dbos] waited ${W}ms for the migration lock; another process migrated first`);return await Z()}finally{if(K)try{await G.query("SELECT pg_advisory_unlock($1)",[Ee1.toString()])}catch{}await G.end().catch(()=>{})}}var Ee1=8314027461559302n,o04=600000,r04=500;var ze1=L(()=>{t8()});function a04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function on0($,Z){for(let Q=0;Q<$.length;Q++){let X=$[Q];if(X===void 0)continue;if(X===Z)return $[Q+1];if(X.startsWith(`${Z}=`))return X.slice(Z.length+1)}return}function Pe1(){let $=a04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:on0($,"--cpu-prof-dir")??process.cwd(),name:on0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(on0($,"--cpu-prof-interval")??1000),note:"profile is written on process exit"}));return}if(process.env.CPU_PROFILE)console.warn(JSON.stringify({msg:"cpu-profiling-requested-but-inactive",hint:'CPU profiling is a Bun launch flag. Set BUN_OPTIONS="--cpu-prof --cpu-prof-md --cpu-prof-dir=/tmp" before starting the process.'}))}function Ae1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=$j();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),G=Y(),J=Object.entries(G.objectTypeCounts).sort((K,W)=>W[1]-K[1]).slice(0,20);X={objectCount:G.objectCount,heapSize:G.heapSize,top:Object.fromEntries(J)}}catch{}console.log(JSON.stringify({msg:"heap-watch",ts:new Date().toISOString(),uptimeS:Math.round(process.uptime()),rss:Q.rss,heapUsed:Q.heapUsed,heapTotal:Q.heapTotal,external:Q.external,arrayBuffers:Q.arrayBuffers,...X}))};return Z().catch(()=>{}),i70=setInterval(()=>void Z().catch(()=>{}),$),i70.unref?.(),process.on("SIGUSR2",()=>{try{let Q=Bun.generateHeapSnapshot("v8"),X=typeof Q==="string"?Q:JSON.stringify(Q),Y=`/tmp/heap-${process.pid}-${Date.now()}.heapsnapshot`;Bun.write(Y,X),console.log(JSON.stringify({msg:"heap-snapshot-written",path:Y}))}catch(Q){console.error("[heap-watch] snapshot failed:",Q)}}),()=>{if(i70)clearInterval(i70)}}var i70;var Te1=()=>{};import*as s04 from"bun:jsc";function Re1(){if(process.env.STALL_WATCHDOG!=="1")return()=>{};let $=Number(process.env.STALL_WATCHDOG_MS??100),Z=Number(process.env.STALL_WATCHDOG_TICK_MS??50);try{e04()}catch(G){return console.error("[stall-watchdog] failed to start sampling profiler:",G),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let G=performance.now(),J=G-X;X=G+Z;let K=[];try{K=$14()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let U=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(J),samplesInWindow:K.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var e04,$14;var Ie1=L(()=>{({startSamplingProfiler:e04,samplingProfilerStackTraces:$14}=s04)});function qe1(){Pe1();let $=[Ae1(),xt1(),Re1()];return()=>{for(let Z of $)Z()}}var Me1=L(()=>{Bm0();Te1();Ie1()});var Wj=v((Ve1)=>{Object.defineProperty(Ve1,"__esModule",{value:!0});Ve1.RepublishHeaders=Ve1.DirectMsgHeaders=Ve1.JsHeaders=Ve1.AdvisoryKind=void 0;Ve1.isOrderedPushConsumerOptions=Z14;Ve1.isPullConsumer=Q14;Ve1.isPushConsumer=X14;Ve1.isBoundPushConsumerOptions=Y14;function Z14($){if($&&typeof $==="object")return"name_prefix"in $||"deliver_subject_prefix"in $||"filter_subjects"in $||"filter_subject"in $||"deliver_policy"in $||"opt_start_seq"in $||"opt_start_time"in $||"replay_policy"in $||"inactive_threshold"in $||"headers_only"in $||"deliver_prefix"in $;return!1}function Q14($){return $.isPullConsumer()}function X14($){return $.isPushConsumer()}function Y14($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}Ve1.AdvisoryKind={API:"api_audit",StreamAction:"stream_action",ConsumerAction:"consumer_action",SnapshotCreate:"snapshot_create",SnapshotComplete:"snapshot_complete",RestoreCreate:"restore_create",RestoreComplete:"restore_complete",MaxDeliver:"max_deliver",Terminated:"terminated",Ack:"consumer_ack",StreamLeaderElected:"stream_leader_elected",StreamQuorumLost:"stream_quorum_lost",ConsumerLeaderElected:"consumer_leader_elected",ConsumerQuorumLost:"consumer_quorum_lost"};Ve1.JsHeaders={StreamSourceHdr:"Nats-Stream-Source",LastConsumerSeqHdr:"Nats-Last-Consumer",LastStreamSeqHdr:"Nats-Last-Stream",ConsumerStalledHdr:"Nats-Consumer-Stalled",MessageSizeHdr:"Nats-Msg-Size",RollupHdr:"Nats-Rollup",RollupValueSubject:"sub",RollupValueAll:"all",PendingMessagesHdr:"Nats-Pending-Messages",PendingBytesHdr:"Nats-Pending-Bytes",RequiredApiLevel:"Nats-Required-Api-Level"};Ve1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};Ve1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var NG=v((Se1)=>{Object.defineProperty(Se1,"__esModule",{value:!0});Se1.TD=Se1.TE=Se1.Empty=void 0;Se1.encode=B14;Se1.decode=O14;Se1.Empty=new Uint8Array(0);Se1.TE=new TextEncoder;Se1.TD=new TextDecoder;function N14(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}function B14(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(Se1.TE.encode($[Q]));if(Z.length===0)return Se1.Empty;if(Z.length===1)return Z[0];return N14(...Z)}function O14($){if(!$||$.length===0)return"";return Se1.TD.decode($)}});var BG=v((ve1)=>{Object.defineProperty(ve1,"__esModule",{value:!0});ve1.errors=ve1.PermissionViolationError=ve1.NoRespondersError=ve1.TimeoutError=ve1.RequestError=ve1.ProtocolError=ve1.ConnectionError=ve1.DrainingConnectionError=ve1.ClosedConnectionError=ve1.AuthorizationError=ve1.UserAuthenticationExpiredError=ve1.InvalidOperationError=ve1.InvalidArgumentError=ve1.InvalidSubjectError=void 0;class an0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}ve1.InvalidSubjectError=an0;class p70 extends Error{constructor($,Z){super($,Z);this.name="InvalidArgumentError"}static format($,Z,Q){if(Array.isArray(Z)&&Z.length>1)Z=Z[0];if(Array.isArray($))$=$.map((X)=>`'${X}'`),$=$.join(",");else $=`'${$}'`;return new p70(`${$} ${Z}`,Q)}}ve1.InvalidArgumentError=p70;class sn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}ve1.InvalidOperationError=sn0;class n70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new n70($);return null}}ve1.UserAuthenticationExpiredError=n70;class t70 extends Error{constructor($,Z){super($,Z);this.name="AuthorizationError"}static parse($){let Z=["authorization violation","account authentication expired","authentication timeout"],Q=$.toLowerCase();for(let X=0;X<Z.length;X++)if(Q.indexOf(Z[X])!==-1)return new t70($);return null}}ve1.AuthorizationError=t70;class en0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}ve1.ClosedConnectionError=en0;class $t0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}ve1.DrainingConnectionError=$t0;class Zt0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}ve1.ConnectionError=Zt0;class Qt0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}ve1.ProtocolError=Qt0;class Xt0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof o70}}ve1.RequestError=Xt0;class Yt0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}ve1.TimeoutError=Yt0;class o70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}ve1.NoRespondersError=o70;class r70 extends Error{operation;subject;queue;constructor($,Z,Q,X,Y){super($,Y);this.name="PermissionViolationError",this.operation=Z,this.subject=Q,this.queue=X}static parse($){if(($?$.toLowerCase():"").indexOf("permissions violation")===-1)return null;let Q="publish",X="",Y=void 0,G=$.match(/(Publish|Subscription) to "(\S+)"/);if(G){if(Q=G[1].toLowerCase(),X=G[2],Q==="subscription"){let J=$.match(/using queue "(\S+)"/);if(J)Y=J[1]}}return new r70($,Q,X,Y)}}ve1.PermissionViolationError=r70;ve1.errors={AuthorizationError:t70,ClosedConnectionError:en0,ConnectionError:Zt0,DrainingConnectionError:$t0,InvalidArgumentError:p70,InvalidOperationError:sn0,InvalidSubjectError:an0,NoRespondersError:o70,PermissionViolationError:r70,ProtocolError:Qt0,RequestError:Xt0,TimeoutError:Yt0,UserAuthenticationExpiredError:n70}});var s3=v((ge1)=>{Object.defineProperty(ge1,"__esModule",{value:!0});ge1.SimpleMutex=ge1.Perf=void 0;ge1.extend=C14;ge1.render=_14;ge1.timeout=v14;ge1.delay=x14;ge1.deadline=f14;ge1.deferred=Jt0;ge1.debugDeferred=b14;ge1.shuffle=y14;ge1.collect=g14;ge1.jitter=ye1;ge1.backoff=h14;ge1.nanos=u14;ge1.millis=c14;ge1.randomToken=d14;var S14=NG(),Gt0=BG();function C14($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function _14($){return S14.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function v14($,Z=!0){let Q=Z?new Gt0.TimeoutError:null,X,Y,G=new Promise((J,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new Gt0.TimeoutError);else K(Q)},$)});return Object.assign(G,X)}function x14($=0){let Z,Q=new Promise((X)=>{let Y=setTimeout(()=>{X()},$);Z={cancel:()=>{if(Y)clearTimeout(Y),X()}}});return Object.assign(Q,Z)}async function f14($,Z=1000){let Q=Jt0(),X=setTimeout(()=>{Q.reject(new Gt0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function Jt0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function b14(){let $={},Z=new Promise((Q,X)=>{$={resolve:(Y)=>{console.trace("resolve",Y),Q(Y)},reject:(Y)=>{console.trace("reject"),X(Y)}}});return Object.assign(Z,$)}function y14($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function g14($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class fe1{timers;measures;constructor(){this.timers=new Map,this.measures=new Map}mark($){this.timers.set($,performance.now())}measure($,Z,Q){let X=this.timers.get(Z);if(X===void 0)throw Error(`${Z} is not defined`);let Y=this.timers.get(Q);if(Y===void 0)throw Error(`${Q} is not defined`);this.measures.set($,Y-X)}getEntries(){let $=[];return this.measures.forEach((Z,Q)=>{$.push({name:Q,duration:Z})}),$}}ge1.Perf=fe1;class be1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=Jt0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}ge1.SimpleMutex=be1;function ye1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function h14($=[0,250,250,500,500,3000,5000]){if(!Array.isArray($))$=[0,250,250,500,500,3000,5000];let Z=$.length-1;return{backoff(Q){return ye1(Q>Z?$[Z]:$[Q])}}}function u14($){return $*1e6}function c14($){return Math.floor($/1e6)}var l14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",qU=new Uint8Array(62);for(let $=0;$<62;$++)qU[$]=l14.charCodeAt($);var m14=218340105584896;function d14(){let $=Math.floor(Math.random()*m14),Z=$%62,Q=qU[Z];$=($-Z)/62,Z=$%62;let X=qU[Z];$=($-Z)/62,Z=$%62;let Y=qU[Z];$=($-Z)/62,Z=$%62;let G=qU[Z];$=($-Z)/62,Z=$%62;let J=qU[Z];$=($-Z)/62,Z=$%62;let K=qU[Z];$=($-Z)/62,Z=$%62;let W=qU[Z];$=($-Z)/62;let H=qU[$];return String.fromCharCode(Q,X,Y,G,J,K,W,H)}});var pe1=v((de1)=>{Object.defineProperty(de1,"__esModule",{value:!0});de1.nuid=de1.NuidImpl=void 0;var J$4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",AO=62,s70=12,le1=10,ue1=33,K$4=333,ce1=s70+le1,Wt0=new Uint8Array(AO);for(let $=0;$<AO;$++)Wt0[$]=J$4.charCodeAt($);var a70=4294967296,me1=BigInt(AO)**BigInt(le1),up=Number(me1/(1n<<32n)),Kt0=Number(me1%(1n<<32n));function W$4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function H$4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else W$4($)}class Ht0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(ce1),this.cbuf=new Uint8Array(s70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(up+1)),this.seqLo=Math.floor(Math.random()*a70);while($++<8&&this.seqHi===up&&this.seqLo>=Kt0);if(this.seqHi===up&&this.seqLo>=Kt0)this.seqLo=0;this.inc=Math.random()*(K$4-ue1)+ue1|0}setPre(){H$4(this.cbuf);for(let $=0;$<s70;$++)this.buf[$]=Wt0[this.cbuf[$]%AO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=ce1-1;Q>=s70;Q--){let X=Math.floor($/AO),G=($-X*AO)*a70+Z,J=Math.floor(G/AO),K=G-J*AO;this.buf[Q]=Wt0[K],$=X,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=a70)this.seqLo-=a70,this.seqHi+=1;if(this.seqHi>up||this.seqHi===up&&this.seqLo>=Kt0)this.setPre(),this.initSeqAndInc();this.fillSeq();let $=this.buf;return String.fromCharCode($[0],$[1],$[2],$[3],$[4],$[5],$[6],$[7],$[8],$[9],$[10],$[11],$[12],$[13],$[14],$[15],$[16],$[17],$[18],$[19],$[20],$[21])}reset(){this.init()}}de1.NuidImpl=Ht0;de1.nuid=new Ht0});var re1=v((te1)=>{Object.defineProperty(te1,"__esModule",{value:!0});te1.nuid=te1.Nuid=void 0;var ne1=pe1();te1.Nuid=ne1.NuidImpl;te1.nuid=ne1.nuid});var $Q0=v((e70)=>{Object.defineProperty(e70,"__esModule",{value:!0});e70.nuid=e70.Nuid=void 0;var ae1=re1();Object.defineProperty(e70,"Nuid",{enumerable:!0,get:function(){return ae1.Nuid}});Object.defineProperty(e70,"nuid",{enumerable:!0,get:function(){return ae1.nuid}})});var TO=v((se1)=>{Object.defineProperty(se1,"__esModule",{value:!0});se1.DEFAULT_HOST=se1.DEFAULT_PORT=se1.Match=void 0;se1.syncIterator=L$4;se1.createInbox=D$4;var B$4=$Q0(),O$4=BG();se1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function L$4($){let Z=$[Symbol.asyncIterator]();return{async next(){let Q=await Z.next();if(Q.done)return Promise.resolve(null);return Promise.resolve(Q.value)}}}function D$4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw O$4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${B$4.nuid.next()}`}se1.DEFAULT_PORT=4222;se1.DEFAULT_HOST="127.0.0.1"});var cp=v((Q0$)=>{Object.defineProperty(Q0$,"__esModule",{value:!0});Q0$.DataBuffer=void 0;var $0$=NG();class Z0${buffers;byteLength;constructor(){this.buffers=[],this.byteLength=0}static concat(...$){let Z=0;for(let Y=0;Y<$.length;Y++)Z+=$[Y].length;let Q=new Uint8Array(Z),X=0;for(let Y=0;Y<$.length;Y++)Q.set($[Y],X),X+=$[Y].length;return Q}static fromAscii($){if(!$)$="";return $0$.TE.encode($)}static toAscii($){return $0$.TD.decode($)}reset(){this.buffers.length=0,this.byteLength=0}pack(){if(this.buffers.length>1){let $=new Uint8Array(this.byteLength),Z=0;for(let Q=0;Q<this.buffers.length;Q++)$.set(this.buffers[Q],Z),Z+=this.buffers[Q].length;this.buffers.length=0,this.buffers.push($)}}shift(){if(this.buffers.length){let $=this.buffers.shift();if($)return this.byteLength-=$.length,$}return new Uint8Array(0)}drain($){if(this.buffers.length){this.pack();let Z=this.buffers.pop();if(Z){let Q=this.byteLength;if($===void 0||$>Q)$=Q;let X=Z.subarray(0,$);if(Q>$)this.buffers.push(Z.subarray($));return this.byteLength=Q-$,X}}return new Uint8Array(0)}fill($,...Z){if($)this.buffers.push($),this.byteLength+=$.length;for(let Q=0;Q<Z.length;Q++)if(Z[Q]&&Z[Q].length)this.buffers.push(Z[Q]),this.byteLength+=Z[Q].length}peek(){if(this.buffers.length)return this.pack(),this.buffers[0];return new Uint8Array(0)}size(){return this.byteLength}length(){return this.buffers.length}}Q0$.DataBuffer=Z0$});var Hj=v((G0$)=>{Object.defineProperty(G0$,"__esModule",{value:!0});G0$.LF=G0$.CR=G0$.CRLF=G0$.CR_LF_LEN=G0$.CR_LF=void 0;G0$.setTransportFactory=R$4;G0$.defaultPort=I$4;G0$.getUrlParseFn=q$4;G0$.newTransport=M$4;G0$.getResolveFn=V$4;G0$.protoLen=Y0$;G0$.extractProtocolMessage=k$4;var P$4=NG(),A$4=TO(),T$4=cp(),OG;function R$4($){OG=$}function I$4(){return OG!==void 0&&OG.defaultPort!==void 0?OG.defaultPort:A$4.DEFAULT_PORT}function q$4(){return OG!==void 0&&OG.urlParseFn?OG.urlParseFn:void 0}function M$4(){if(!OG||typeof OG.factory!=="function")throw Error("transport fn is not set");return OG.factory()}function V$4(){return OG!==void 0&&OG.dnsResolveFn?OG.dnsResolveFn:void 0}G0$.CR_LF=`\r
1549
1549
  `;G0$.CR_LF_LEN=G0$.CR_LF.length;G0$.CRLF=T$4.DataBuffer.fromAscii(G0$.CR_LF);G0$.CR=new Uint8Array(G0$.CRLF)[0];G0$.LF=new Uint8Array(G0$.CRLF)[1];function Y0$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===G0$.CR&&$[Q]===G0$.LF)return Q+1}return 0}function k$4($){let Z=Y0$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return P$4.TD.decode(X)}return""}});var Ot0=v((B0$)=>{Object.defineProperty(B0$,"__esModule",{value:!0});B0$.ipV4=F0$;B0$.isIP=u$4;B0$.parseIP=U0$;var lp=4,Fj=16,ZQ0=48,H0$=57,K0$=65,g$4=70,W0$=97,h$4=102,Bt0=16777215;function F0$($,Z,Q,X){let Y=new Uint8Array(Fj);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((J,K)=>{Y[K]=J}),Y[12]=$,Y[13]=Z,Y[14]=Q,Y[15]=X,Y}function u$4($){return U0$($)!==void 0}function U0$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return N0$($);case":":return c$4($)}return}function N0$($){let Z=new Uint8Array(lp);for(let Q=0;Q<lp;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:G}=l$4($);if(!G||X>255)return;$=$.substring(Y),Z[Q]=X}return F0$(Z[0],Z[1],Z[2],Z[3])}function c$4($){let Z=new Uint8Array(Fj),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<Fj){let{n:Y,c:G,ok:J}=m$4($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(Q<0&&X!=Fj-lp)return;if(X+lp>Fj)return;let K=N0$($);if(K===void 0)return;Z[X]=K[12],Z[X+1]=K[13],Z[X+2]=K[14],Z[X+3]=K[15],$="",X+=lp;break}if(Z[X]=Y>>8,Z[X+1]=Y,X+=2,$=$.substring(G),$.length===0)break;if($[0]!==":"||$.length==1)return;if($=$.substring(1),$[0]===":"){if(Q>=0)return;if(Q=X,$=$.substring(1),$.length===0)break}}if($.length!==0)return;if(X<Fj){if(Q<0)return;let Y=Fj-X;for(let G=X-1;G>=Q;G--)Z[G+Y]=Z[G];for(let G=Q+Y-1;G>=Q;G--)Z[G]=0}else if(Q>=0)return;return Z}function l$4($){let Z=0,Q=0;for(Z=0;Z<$.length&&ZQ0<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=H0$;Z++)if(Q=Q*10+($.charCodeAt(Z)-ZQ0),Q>=Bt0)return{n:Bt0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function m$4($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(ZQ0<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=H0$)Z*=16,Z+=$.charCodeAt(Q)-ZQ0;else if(W0$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=h$4)Z*=16,Z+=$.charCodeAt(Q)-W0$+10;else if(K0$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=g$4)Z*=16,Z+=$.charCodeAt(Q)-K0$+10;else break;if(Z>=Bt0)return{n:0,c:Q,ok:!1}}if(Q===0)return{n:0,c:Q,ok:!1};return{n:Z,c:Q,ok:!0}}});var zt0=v((L0$)=>{Object.defineProperty(L0$,"__esModule",{value:!0});L0$.Servers=L0$.ServerImpl=void 0;L0$.isIPV4OrHostname=O0$;L0$.hostPort=jt0;var Lt0=Hj(),Dt0=s3(),wt0=Ot0(),n$4=TO(),t$4=BG();function O0$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function Et0($){return!O0$($)}function o$4($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function jt0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=o$4($),Et0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=Et0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):n$4.DEFAULT_PORT,Y=new URL(`${Q===80?"https":"http"}://${$}`);Y.port=`${Q}`;let G=Y.hostname;if(G.charAt(0)==="[")G=G.substring(1,G.length-1);return{listen:Y.host,hostname:G,port:Q}}class py{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=jt0($);this.listen=Q.listen,this.hostname=Q.hostname,this.port=Q.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=Z}toString(){return this.listen}async resolve($){if(!$.fn||$.resolve===!1)return[this];let Z=[];if((0,wt0.isIP)(this.hostname))return[this];else{let Q=await $.fn(this.hostname);if($.debug)console.log(`resolve ${this.hostname} = ${Q.join(",")}`);for(let X of Q){let Y=this.port===80?"https":"http",G=new URL(`${Y}://${Et0(X)?"["+X+"]":X}`);G.port=`${this.port}`;let J=new py(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,Dt0.shuffle)(Z);return this.resolves=Z,Z}}L0$.ServerImpl=py;class QQ0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw t$4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,Lt0.getUrlParseFn)(),Q=new Map;for(let Y of this.servers)Q.set(Y.listen,Y);let X=[];for(let Y of $){Y=Z?Z(Y):Y;let{listen:G}=jt0(Y),J=Q.get(G);if(J)J.gossiped=!1,X.push(J);else X.push(new py(Y))}if(this.randomize)(0,Dt0.shuffle)(X);if(this.servers=X,this.currentServer===void 0||!X.includes(this.currentServer))this.currentServer=X[0],this.firstSelect=!0}clear(){this.servers.length=0}updateTLSName(){let $=this.getCurrentServer();if(!(0,wt0.isIP)($.hostname))this.tlsName=$.hostname,this.servers.forEach((Z)=>{if(Z.gossiped)Z.tlsName=this.tlsName})}getCurrentServer(){return this.currentServer}addServer($,Z=!1){let Q=(0,Lt0.getUrlParseFn)();$=Q?Q($):$;let X=new py($,Z);if((0,wt0.isIP)(X.hostname))X.tlsName=this.tlsName;this.servers.push(X)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;let $=this.servers.shift();if($)this.servers.push($),this.currentServer=$;return $}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer($){if($){let Z=this.servers.indexOf($);this.servers.splice(Z,1)}}snapshot(){return QQ0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return QQ0.freezeAll([$,...this.servers.slice(0,Z),...this.servers.slice(Z+1)])}static freezeAll($){return $.map((Z)=>Object.freeze({hostname:Z.hostname,port:Z.port,listen:Z.listen,src:Z.src,tlsName:Z.tlsName,reconnects:Z.reconnects,lastConnect:Z.lastConnect,gossiped:Z.gossiped,didConnect:Z.didConnect}))}find($){return this.servers.find((Z)=>Z.listen===$.listen)}setCurrent($){this.currentServer=$}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update($,Z){let Q=[],X=[],Y=(0,Lt0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new py(K,!0);G.set(K,W)});let J=[];if(this.servers.forEach((K,W)=>{let H=K.listen;if(K.gossiped&&this.currentServer.listen!==H&&G.get(H)===void 0)J.push(W);G.delete(H)}),J.reverse(),J.forEach((K)=>{let W=this.servers.splice(K,1);X=X.concat(W[0].listen)}),G.forEach((K,W)=>{this.servers.push(K),Q.push(W)}),this.randomize&&Q.length>0){let K=this.currentServer,W=this.servers.filter((H)=>H!==K);(0,Dt0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}L0$.Servers=QQ0});var XQ0=v((j0$)=>{Object.defineProperty(j0$,"__esModule",{value:!0});j0$.QueuedIteratorImpl=void 0;var Pt0=s3(),w0$=BG();class E0${inflight;processed;received;noIterator;iterClosed;done;signal;yields;filtered;pendingFiltered;ctx;_data;err;time;profile;yielding;didBreak;constructor(){this.inflight=0,this.filtered=0,this.pendingFiltered=0,this.processed=0,this.received=0,this.noIterator=!1,this.done=!1,this.signal=(0,Pt0.deferred)(),this.yields=[],this.iterClosed=(0,Pt0.deferred)(),this.time=0,this.yielding=!1,this.didBreak=!1,this.profile=!1}[Symbol.asyncIterator](){return this.iterate()}push($){if(this.done)return;if(this.didBreak){if(typeof $==="function"){let Z=$;try{Z()}catch(Q){}}return}if(typeof $==="function")this.pendingFiltered++;this.yields.push($),this.signal.resolve()}async*iterate(){if(this.noIterator)throw new w0$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new w0$.InvalidOperationError("iterator is already yielding");this.yielding=!0;try{while(!0){if(this.yields.length===0)await this.signal;if(this.err)throw this.err;let $=this.yields;this.inflight=$.length,this.yields=[];for(let Z=0;Z<$.length;Z++){if(typeof $[Z]==="function"){this.pendingFiltered--;let X=$[Z];try{X()}catch(Y){throw Y}if(this.err)throw this.err;continue}this.processed++,this.inflight--;let Q=this.profile?Date.now():0;yield $[Z],this.time=this.profile?Date.now()-Q:0}if(this.done)break;else if(this.yields.length===0)$.length=0,this.yields=$,this.signal=(0,Pt0.deferred)()}}finally{this.didBreak=!0,this.stop()}}stop($){if(this.done)return;this.err=$,this.done=!0,this.signal.resolve(),this.iterClosed.resolve($)}getProcessed(){return this.noIterator?this.received:this.processed}getPending(){return this.yields.length+this.inflight-this.pendingFiltered}getReceived(){return this.received-this.filtered}}j0$.QueuedIteratorImpl=E0$});var At0=v((T0$)=>{Object.defineProperty(T0$,"__esModule",{value:!0});T0$.MuxSubscription=void 0;var e$4=TO(),P0$=BG();class A0${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,e$4.createInbox)($)}.`,this.baseInbox}add($){if(!isNaN($.received))$.received=0;this.reqs.set($.token,$)}get($){return this.reqs.get($)}cancel($){this.reqs.delete($.token)}getToken($){let Z=$.subject||"";if(Z.indexOf(this.baseInbox)===0)return Z.substring(this.baseInbox.length);return null}all(){return Array.from(this.reqs.values())}handleError($,Z){if($)return this.all().forEach((Q)=>{Q.resolver(Z,{})}),!0;if(Z.operation==="publish"){let Q=this.all().find((X)=>{return X.requestSubject===Z.subject});if(Q)return Q.resolver(Z,{}),!0}return!1}dispatcher(){return($,Z)=>{let Q=this.getToken(Z);if(Q){let X=this.get(Q);if(X){if($===null)$=Z?.data?.length===0&&Z.headers?.code===503?new P0$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new P0$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}T0$.MuxSubscription=A0$});var Tt0=v((q0$)=>{Object.defineProperty(q0$,"__esModule",{value:!0});q0$.Heartbeat=void 0;var $84=s3();class I0${ph;interval;maxOut;timer;pendings;constructor($,Z,Q){this.ph=$,this.interval=Z,this.maxOut=Q,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel($){if(this.timer)clearTimeout(this.timer),this.timer=void 0;if(this._reset(),$)this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:"ping",pendingPings:this.pendings.length+1}),this.pendings.length===this.maxOut){this.cancel(!0);return}let $=(0,$84.deferred)();this.ph.flush($).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push($),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(($)=>{return $.resolve(),!1})}}q0$.Heartbeat=I0$});var qt0=v((C0$)=>{Object.defineProperty(C0$,"__esModule",{value:!0});C0$.DenoBuffer=C0$.MAX_SIZE=C0$.AssertionError=void 0;C0$.assert=k0$;C0$.concat=S0$;C0$.append=Q84;C0$.readAll=X84;C0$.writeAll=Y84;var Z84=NG();class Rt0 extends Error{constructor($){super($);this.name="AssertionError"}}C0$.AssertionError=Rt0;function k0$($,Z="Assertion failed."){if(!$)throw new Rt0(Z)}var V0$=32768;C0$.MAX_SIZE=4294967294;function YQ0($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function S0$($,Z){if($===void 0&&Z===void 0)return new Uint8Array(0);if($===void 0)return Z;if(Z===void 0)return $;let Q=new Uint8Array($.length+Z.length);return Q.set($,0),Q.set(Z,$.length),Q}function Q84($,Z){return S0$($,Uint8Array.of(Z))}class It0{_buf;_off;constructor($){if(this._off=0,$==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array($)}bytes($={copy:!0}){if($.copy===!1)return this._buf.subarray(this._off);return this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate($){if($===0){this.reset();return}if($<0||$>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+$)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice($){let Z=this._buf.byteLength;if($<=this.capacity-Z)return this._reslice(Z+$),Z;return-1}_reslice($){k0$($<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,$)}readByte(){let $=new Uint8Array(1);if(this.read($))return $[0];return null}read($){if(this.empty()){if(this.reset(),$.byteLength===0)return 0;return null}let Z=YQ0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(Z84.TE.encode($))}write($){let Z=this._grow($.byteLength);return YQ0($,this._buf,Z)}_grow($){let Z=this.length;if(Z===0&&this._off!==0)this.reset();let Q=this._tryGrowByReslice($);if(Q>=0)return Q;let X=this.capacity;if($<=Math.floor(X/2)-Z)YQ0(this._buf.subarray(this._off),this._buf);else if(X+$>C0$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,C0$.MAX_SIZE));YQ0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,C0$.MAX_SIZE)),Z}grow($){if($<0)throw Error("Buffer._grow: negative count");let Z=this._grow($);this._reslice(Z)}readFrom($){let Z=0,Q=new Uint8Array(V0$);while(!0){let X=this.capacity-this.length<V0$,Y=X?Q:new Uint8Array(this._buf.buffer,this.length),G=$.read(Y);if(G===null)return Z;if(X)this.write(Y.subarray(0,G));else this._reslice(this.length+G);Z+=G}}}C0$.DenoBuffer=It0;function X84($){let Z=new It0;return Z.readFrom($),Z.bytes()}function Y84($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var kt0=v((b0$)=>{Object.defineProperty(b0$,"__esModule",{value:!0});b0$.cc=b0$.State=b0$.Parser=b0$.Kind=void 0;b0$.describe=U84;var Mt0=qt0(),Vt0=NG();b0$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function U84($){let Z,Q="";switch($.kind){case b0$.Kind.MSG:Z="MSG";break;case b0$.Kind.OK:Z="OK";break;case b0$.Kind.ERR:Z="ERR",Q=Vt0.TD.decode($.data);break;case b0$.Kind.PING:Z="PING";break;case b0$.Kind.PONG:Z="PONG";break;case b0$.Kind.INFO:Z="INFO",Q=Vt0.TD.decode($.data)}return`${Z}: ${Q}`}function v0$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var x0$=48,N84=57,ny=67108864;class f0${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=b0$.State.OP_START,this.as=0,this.drop=0,this.hdr=0}parse($){let Z;for(Z=0;Z<$.length;Z++){let Q=$[Z];switch(this.state){case b0$.State.OP_START:switch(Q){case b0$.cc.M:case b0$.cc.m:this.state=b0$.State.OP_M,this.hdr=-1,this.ma=v0$();break;case b0$.cc.H:case b0$.cc.h:this.state=b0$.State.OP_H,this.hdr=0,this.ma=v0$();break;case b0$.cc.P:case b0$.cc.p:this.state=b0$.State.OP_P;break;case b0$.cc.PLUS:this.state=b0$.State.OP_PLUS;break;case b0$.cc.MINUS:this.state=b0$.State.OP_MINUS;break;case b0$.cc.I:case b0$.cc.i:this.state=b0$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_H:switch(Q){case b0$.cc.M:case b0$.cc.m:this.state=b0$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_M:switch(Q){case b0$.cc.S:case b0$.cc.s:this.state=b0$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MS:switch(Q){case b0$.cc.G:case b0$.cc.g:this.state=b0$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MSG:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:this.state=b0$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MSG_SPC:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:continue;default:this.state=b0$.State.MSG_ARG,this.as=Z}break;case b0$.State.MSG_ARG:switch(Q){case b0$.cc.CR:this.drop=1;break;case b0$.cc.NL:{let X=this.argBuf?this.argBuf.bytes():$.subarray(this.as,Z-this.drop);this.processMsgArgs(X),this.drop=0,this.as=Z+1,this.state=b0$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case b0$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:b0$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=b0$.State.MSG_END}else{let X=this.ma.size-this.msgBuf.length,Y=$.length-Z;if(Y<X)X=Y;if(X>0)this.msgBuf.write($.subarray(Z,Z+X)),Z=Z+X-1;else this.msgBuf.writeByte(Q)}else if(Z-this.as>=this.ma.size)this.dispatcher.push({kind:b0$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=b0$.State.MSG_END;break;case b0$.State.MSG_END:switch(Q){case b0$.cc.NL:this.drop=0,this.as=Z+1,this.state=b0$.State.OP_START;break;default:continue}break;case b0$.State.OP_PLUS:switch(Q){case b0$.cc.O:case b0$.cc.o:this.state=b0$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PLUS_O:switch(Q){case b0$.cc.K:case b0$.cc.k:this.state=b0$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PLUS_OK:switch(Q){case b0$.cc.NL:this.dispatcher.push({kind:b0$.Kind.OK}),this.drop=0,this.state=b0$.State.OP_START;break}break;case b0$.State.OP_MINUS:switch(Q){case b0$.cc.E:case b0$.cc.e:this.state=b0$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MINUS_E:switch(Q){case b0$.cc.R:case b0$.cc.r:this.state=b0$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MINUS_ER:switch(Q){case b0$.cc.R:case b0$.cc.r:this.state=b0$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MINUS_ERR:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:this.state=b0$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_MINUS_ERR_SPC:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:continue;default:this.state=b0$.State.MINUS_ERR_ARG,this.as=Z}break;case b0$.State.MINUS_ERR_ARG:switch(Q){case b0$.cc.CR:this.drop=1;break;case b0$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:b0$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=b0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case b0$.State.OP_P:switch(Q){case b0$.cc.I:case b0$.cc.i:this.state=b0$.State.OP_PI;break;case b0$.cc.O:case b0$.cc.o:this.state=b0$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PO:switch(Q){case b0$.cc.N:case b0$.cc.n:this.state=b0$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PON:switch(Q){case b0$.cc.G:case b0$.cc.g:this.state=b0$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PONG:switch(Q){case b0$.cc.NL:this.dispatcher.push({kind:b0$.Kind.PONG}),this.drop=0,this.state=b0$.State.OP_START;break}break;case b0$.State.OP_PI:switch(Q){case b0$.cc.N:case b0$.cc.n:this.state=b0$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PIN:switch(Q){case b0$.cc.G:case b0$.cc.g:this.state=b0$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_PING:switch(Q){case b0$.cc.NL:this.dispatcher.push({kind:b0$.Kind.PING}),this.drop=0,this.state=b0$.State.OP_START;break}break;case b0$.State.OP_I:switch(Q){case b0$.cc.N:case b0$.cc.n:this.state=b0$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_IN:switch(Q){case b0$.cc.F:case b0$.cc.f:this.state=b0$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_INF:switch(Q){case b0$.cc.O:case b0$.cc.o:this.state=b0$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_INFO:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:this.state=b0$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case b0$.State.OP_INFO_SPC:switch(Q){case b0$.cc.SPACE:case b0$.cc.TAB:continue;default:this.state=b0$.State.INFO_ARG,this.as=Z}break;case b0$.State.INFO_ARG:switch(Q){case b0$.cc.CR:this.drop=1;break;case b0$.cc.NL:{let X;if(this.argBuf)X=this.argBuf.bytes(),this.argBuf=void 0;else X=$.subarray(this.as,Z-this.drop);this.dispatcher.push({kind:b0$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=b0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===b0$.State.MSG_ARG||this.state===b0$.State.MINUS_ERR_ARG||this.state===b0$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Mt0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===b0$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Mt0.DenoBuffer($.subarray(this.as))}}cloneMsgArg(){let $=this.ma.subject.length,Z=this.ma.reply?this.ma.reply.length:0,Q=new Uint8Array($+Z);if(Q.set(this.ma.subject),this.ma.reply)Q.set(this.ma.reply,$);if(this.argBuf=new Mt0.DenoBuffer(Q),this.ma.subject=Q.subarray(0,$),this.ma.reply)this.ma.reply=Q.subarray($)}processMsgArgs($){if(this.hdr>=0)return this.processHeaderMsgArgs($);let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case b0$.cc.SPACE:case b0$.cc.TAB:case b0$.cc.CR:case b0$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 3:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(Z[2],ny);break;case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.size=this.protoParseInt(Z[3],ny);break;default:throw this.fail($,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail($,"processMsgArgs Bad or Missing Size Error")}fail($,Z=""){if(!Z)Z=`parse error [${this.state}]`;else Z=`${Z} [${this.state}]`;return Error(`${Z}: ${Vt0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case b0$.cc.SPACE:case b0$.cc.TAB:case b0$.cc.CR:case b0$.cc.NL:if(Q>=0)Z.push($.subarray(Q,X)),Q=-1;break;default:if(Q<0)Q=X}if(Q>=0)Z.push($.subarray(Q));switch(Z.length){case 4:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(Z[2],ny),this.ma.size=this.protoParseInt(Z[3],ny);break;case 5:this.ma.subject=Z[0],this.ma.sid=this.protoParseInt(Z[1]),this.ma.reply=Z[2],this.ma.hdr=this.protoParseInt(Z[3],ny),this.ma.size=this.protoParseInt(Z[4],ny);break;default:throw this.fail($,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail($,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail($,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt($,Z){if($.length===0||$.length>15)return-1;let Q=0;for(let X=0;X<$.length;X++){if($[X]<x0$||$[X]>N84)return-1;Q=Q*10+($[X]-x0$)}return Z!==void 0&&Q>Z?-1:Q}}b0$.Parser=f0$;b0$.State={OP_START:0,OP_PLUS:1,OP_PLUS_O:2,OP_PLUS_OK:3,OP_MINUS:4,OP_MINUS_E:5,OP_MINUS_ER:6,OP_MINUS_ERR:7,OP_MINUS_ERR_SPC:8,MINUS_ERR_ARG:9,OP_M:10,OP_MS:11,OP_MSG:12,OP_MSG_SPC:13,MSG_ARG:14,MSG_PAYLOAD:15,MSG_END:16,OP_H:17,OP_P:18,OP_PI:19,OP_PIN:20,OP_PING:21,OP_PO:22,OP_PON:23,OP_PONG:24,OP_I:25,OP_IN:26,OP_INF:27,OP_INFO:28,OP_INFO_SPC:29,INFO_ARG:30};b0$.cc={CR:13,E:69,e:101,F:70,f:102,G:71,g:103,H:72,h:104,I:73,i:105,K:75,k:107,M:77,m:109,MINUS:45,N:78,n:110,NL:10,O:79,o:111,P:80,p:112,PLUS:43,R:82,r:114,S:83,s:115,SPACE:32,TAB:9}});var KQ0=v((g0$)=>{Object.defineProperty(g0$,"__esModule",{value:!0});g0$.MsgHdrsImpl=void 0;g0$.canonicalMIMEHeaderKey=Ct0;g0$.headers=L84;var y0$=NG(),e3=TO(),JQ0=BG();function Ct0($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw JQ0.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function L84($=0,Z=""){if($===0&&Z!=="")throw JQ0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw JQ0.InvalidArgumentError.format("description","is required");return new ty($,Z)}var St0="NATS/1.0";class ty{_code;headers;_description;constructor($=0,Z=""){this._code=$,this._description=Z,this.headers=new Map}[Symbol.iterator](){return this.headers.entries()}size(){return this.headers.size}equals($){if($&&this.headers.size===$.headers.size&&this._code===$._code){for(let[Z,Q]of this.headers){let X=$.values(Z);if(Q.length!==X.length)return!1;let Y=[...Q].sort(),G=[...X].sort();for(let J=0;J<Y.length;J++)if(Y[J]!==G[J])return!1}return!0}return!1}static decode($){let Z=new ty,X=y0$.TD.decode($).split(`\r
1550
1550
  `),Y=X[0];if(Y!==St0){let G=Y.replace(St0,"").trim();if(G.length>0){if(Z._code=parseInt(G,10),isNaN(Z._code))Z._code=0;let J=Z._code.toString();G=G.replace(J,""),Z._description=G.trim()}}if(X.length>=1)X.slice(1).map((G)=>{if(G){let J=G.indexOf(":");if(J>-1){let K=G.slice(0,J),W=G.slice(J+1).trim();Z.append(K,W)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=St0;if(this._code>0&&this._description!=="")$+=` ${this._code} ${this._description}`;for(let[Z,Q]of this.headers)for(let X=0;X<Q.length;X++)$=`${$}\r
1551
1551
  ${Z}: ${Q[X]}`;return`${$}\r