decocms 4.311.0 → 4.311.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (243) hide show
  1. package/dist/client/assets/{AlertCircle-C0recpiM.js → AlertCircle-CBaX32T8.js} +1 -1
  2. package/dist/client/assets/{AreaChart-XSelV74e.js → AreaChart-cQSx2b8G.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-B2Z12k58.js → ArrowLeft-CkFARlRm.js} +1 -1
  4. package/dist/client/assets/{ArrowUp-B_j1WdZ5.js → ArrowUp-BKP7Of5k.js} +1 -1
  5. package/dist/client/assets/{Check-BejV2053.js → Check-C9Wfn4Zh.js} +1 -1
  6. package/dist/client/assets/{CheckCircle-CFTFD5Ed.js → CheckCircle-D2T6eT6_.js} +1 -1
  7. package/dist/client/assets/{ChevronDown-D5RFRhzf.js → ChevronDown-CzTRNfbz.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-DV9U9V1C.js → ChevronRight-svtnlhH0.js} +1 -1
  9. package/dist/client/assets/{ChevronSelectorVertical-CsU1yTcH.js → ChevronSelectorVertical-C-W6z-h0.js} +1 -1
  10. package/dist/client/assets/{ChevronUp-D4IrNOCC.js → ChevronUp-DUkNqhLA.js} +1 -1
  11. package/dist/client/assets/{Copy01-Cr3MDnu-.js → Copy01-sakYFLwd.js} +1 -1
  12. package/dist/client/assets/{CreditCard01-D_XNSGw3.js → CreditCard01-C-9jfjTF.js} +1 -1
  13. package/dist/client/assets/{DotsVertical-DqsE4vgP.js → DotsVertical-B5kF5ePB.js} +1 -1
  14. package/dist/client/assets/{Download01-Cu0GEQBo.js → Download01-7NcpEf0j.js} +1 -1
  15. package/dist/client/assets/{Eye-DhUWQAZM.js → Eye-zWOliaFc.js} +1 -1
  16. package/dist/client/assets/{FilterLines-DahI-t1v.js → FilterLines-KFdnOzHp.js} +1 -1
  17. package/dist/client/assets/{GitBranch01-B7UokEiw.js → GitBranch01-CrtIZSTl.js} +1 -1
  18. package/dist/client/assets/{Globe01-8plmq2TA.js → Globe01-DBYH9UAq.js} +1 -1
  19. package/dist/client/assets/{Globe04-DlFdM3LP.js → Globe04-C0w2m9H5.js} +1 -1
  20. package/dist/client/assets/{HardDrive-57Sc_B7u.js → HardDrive-BF8VOZU_.js} +1 -1
  21. package/dist/client/assets/{Image01-HOTAu7DE.js → Image01-DLo7ySl9.js} +1 -1
  22. package/dist/client/assets/{Key01-DLcgmMi7.js → Key01-Be4RuMHf.js} +1 -1
  23. package/dist/client/assets/{LinkExternal01-C5L2pr2x.js → LinkExternal01-CpispIo5.js} +1 -1
  24. package/dist/client/assets/{LockUnlocked01-BleHTt-O.js → LockUnlocked01-BGjxHOgf.js} +1 -1
  25. package/dist/client/assets/{LogOut01-CfPLGrdh.js → LogOut01-CcSBS9vf.js} +1 -1
  26. package/dist/client/assets/{Monitor01-CGzGmiSx.js → Monitor01-C31HK29K.js} +1 -1
  27. package/dist/client/assets/{Package-WyJYCcJV.js → Package-B8sew0cm.js} +1 -1
  28. package/dist/client/assets/{Palette-ivE2ilgf.js → Palette-D9Dc3WrO.js} +1 -1
  29. package/dist/client/assets/{Play-CsI3qh5P.js → Play-CWWZONrn.js} +1 -1
  30. package/dist/client/assets/{Plus-BNnPvfG8.js → Plus-GGi4pu8K.js} +1 -1
  31. package/dist/client/assets/{SearchLg-Ccchnc4p.js → SearchLg-C-GcLkxc.js} +1 -1
  32. package/dist/client/assets/{SearchMd-BJmbTOt_.js → SearchMd-C4aIQKDV.js} +1 -1
  33. package/dist/client/assets/{Settings02-By8pQbcj.js → Settings02-B1WzQBFr.js} +1 -1
  34. package/dist/client/assets/{Share07-dg97NqNd.js → Share07-BuEXfpWT.js} +1 -1
  35. package/dist/client/assets/{Shield01-CxgaYLbk.js → Shield01-BLZEBiIm.js} +1 -1
  36. package/dist/client/assets/{Stars01-C5bXx9wk.js → Stars01-DBhJ3FUw.js} +1 -1
  37. package/dist/client/assets/{Stars02-Dco9Mo0t.js → Stars02-DpWcAt39.js} +1 -1
  38. package/dist/client/assets/{Sun-CZ4AN-2E.js → Sun-Bh00fJBf.js} +1 -1
  39. package/dist/client/assets/{SwitchHorizontal01-BfZwTC3u.js → SwitchHorizontal01-C9T-4Yx3.js} +1 -1
  40. package/dist/client/assets/{Tool01-BPHywJEb.js → Tool01-COVQDSaO.js} +1 -1
  41. package/dist/client/assets/{Tool02-D4AQe9SD.js → Tool02-CFg1mEuF.js} +1 -1
  42. package/dist/client/assets/{Trash01-Bkd5f3e4.js → Trash01-OdRN4fEr.js} +1 -1
  43. package/dist/client/assets/{TrendUp01-C29DtCbZ.js → TrendUp01-CUvB96sa.js} +1 -1
  44. package/dist/client/assets/{Upload01-CPHyTAd0.js → Upload01-UZpAdZVY.js} +1 -1
  45. package/dist/client/assets/{User01-rDgL3Cs0.js → User01-gTW5bMu6.js} +1 -1
  46. package/dist/client/assets/{UserSquare-BO9lFHlw.js → UserSquare-CvpnDHTo.js} +1 -1
  47. package/dist/client/assets/{Users01-CGiHQkW6.js → Users01-BYcdYmiU.js} +1 -1
  48. package/dist/client/assets/{Users03-K46FZ0yi.js → Users03-x8CdwYth.js} +1 -1
  49. package/dist/client/assets/{XCircle-Dgz569F-.js → XCircle-BoPq98m_.js} +1 -1
  50. package/dist/client/assets/{XClose-DRl5snCd.js → XClose-Dytuf1me.js} +1 -1
  51. package/dist/client/assets/{YAxis-BunnDhD0.js → YAxis-KMWKXQUj.js} +1 -1
  52. package/dist/client/assets/{Zap-CqYQM_jt.js → Zap-Tb2cgR-Z.js} +1 -1
  53. package/dist/client/assets/{ZapSquare-C3xSe5yB.js → ZapSquare-duF0Bpf9.js} +1 -1
  54. package/dist/client/assets/{ZoomOut-B8EEsxrO.js → ZoomOut-_z5S0Eh3.js} +1 -1
  55. package/dist/client/assets/{access-gate-BL_s88yN.js → access-gate-GxjUCkfq.js} +1 -1
  56. package/dist/client/assets/{agent-icon-BGP9U6d6.js → agent-icon-C-n5olUZ.js} +1 -1
  57. package/dist/client/assets/{agents-list-C83xGM8F.js → agents-list-DH80x48u.js} +1 -1
  58. package/dist/client/assets/ai-providers-BNofepQV.js +1 -0
  59. package/dist/client/assets/{alert-ABstJkwk.js → alert-DjDPJhYv.js} +1 -1
  60. package/dist/client/assets/{alert-dialog-Csnli2CD.js → alert-dialog-BNd5_vQu.js} +1 -1
  61. package/dist/client/assets/{api-keys-BMxF1-9_.js → api-keys-BEdlk9CI.js} +1 -1
  62. package/dist/client/assets/{app-editor-6p_LrTu2.js → app-editor-eSxCHu5F.js} +1 -1
  63. package/dist/client/assets/{auth-CYohcmQZ.js → auth-Cbnsnt2t.js} +1 -1
  64. package/dist/client/assets/{auth-catchall-BDEFidGh.js → auth-catchall-C9Onedjn.js} +1 -1
  65. package/dist/client/assets/{auth-entry-CKyE-hFY.js → auth-entry-BbWybkAj.js} +1 -1
  66. package/dist/client/assets/{auth-split-layout-Duguccx1.js → auth-split-layout-CsQm6o76.js} +1 -1
  67. package/dist/client/assets/{authenticate-and-persist-oauth-Ds-Znneo.js → authenticate-and-persist-oauth-DRDRlEO8.js} +1 -1
  68. package/dist/client/assets/{automation-list-row-ByC4kR2D.js → automation-list-row-8ZUBuxGc.js} +1 -1
  69. package/dist/client/assets/{automation-runs-8GLe55cG.js → automation-runs-D1fifRvX.js} +1 -1
  70. package/dist/client/assets/{automations-OEcEm9qP.js → automations-DPb7MHS2.js} +1 -1
  71. package/dist/client/assets/{avatar-BuHFImQ0.js → avatar-CQ7CybJi.js} +1 -1
  72. package/dist/client/assets/{badge-CO8RwMr5.js → badge-DQVOkFgD.js} +1 -1
  73. package/dist/client/assets/{block-document-BqLhkJsx.js → block-document-DlQjlFho.js} +1 -1
  74. package/dist/client/assets/{breadcrumb-B40XpKTU.js → breadcrumb-DYk45Pno.js} +1 -1
  75. package/dist/client/assets/{buckets-CIG9EGU3.js → buckets-CF3vYad3.js} +1 -1
  76. package/dist/client/assets/{bulk-category-panel-DKVwuCXm.js → bulk-category-panel-BxccMkk1.js} +1 -1
  77. package/dist/client/assets/{capability-load-error-BqilZ1PU.js → capability-load-error-Bc5LMBBi.js} +1 -1
  78. package/dist/client/assets/{cards-vcKmBwGO.js → cards-BtmUbLls.js} +1 -1
  79. package/dist/client/assets/{category-editor-CYCrdpS-.js → category-editor-CNWYwVcC.js} +1 -1
  80. package/dist/client/assets/{chart-Z15NQIs8.js → chart-jQWmG3Ij.js} +1 -1
  81. package/dist/client/assets/{chat-context-CY2SGM0h.js → chat-context-BAwLJUuM.js} +4 -4
  82. package/dist/client/assets/{checkbox-oWGgw210.js → checkbox-JDRyOJQL.js} +1 -1
  83. package/dist/client/assets/{choose-editor-DPo8388D.js → choose-editor-DQGyvIjs.js} +1 -1
  84. package/dist/client/assets/{cli-auth-success-Bd0MHIpk.js → cli-auth-success--rfNK8_d.js} +1 -1
  85. package/dist/client/assets/{collection-detail-CjvpPo2_.js → collection-detail-BtptkddT.js} +1 -1
  86. package/dist/client/assets/{collection-display-button-rTFLLVxa.js → collection-display-button-CvmR92Rs.js} +1 -1
  87. package/dist/client/assets/{collection-search-BJAxACkb.js → collection-search-BpSgcVBX.js} +1 -1
  88. package/dist/client/assets/{collection-table-wrapper-DbZwnA9i.js → collection-table-wrapper-BcTyI8Vk.js} +1 -1
  89. package/dist/client/assets/{collection-tabs-Lzes2Hm5.js → collection-tabs-CXua3gRQ.js} +1 -1
  90. package/dist/client/assets/{command-Bp1UIw04.js → command-Cq-9kw_v.js} +1 -1
  91. package/dist/client/assets/{commerce-onboarding-rZiNksbG.js → commerce-onboarding-N3JtZ5AP.js} +1 -1
  92. package/dist/client/assets/{config-DRDl0YmS.js → config-BNXwa8bZ.js} +1 -1
  93. package/dist/client/assets/{connect-ClZgmNOs.js → connect-C1V4dTks.js} +1 -1
  94. package/dist/client/assets/{connection-49NkL3aX.js → connection-COEod_bO.js} +1 -1
  95. package/dist/client/assets/{connection-card-IfNei3OO.js → connection-card-CdF-GA1k.js} +1 -1
  96. package/dist/client/assets/{connection-detail-MTvaJYNp.js → connection-detail-DgsUxTsi.js} +1 -1
  97. package/dist/client/assets/{connection-form-helpers-C174Udb3.js → connection-form-helpers-Dp6ysVVk.js} +1 -1
  98. package/dist/client/assets/{connections-CHRgTc8W.js → connections-6J1SR2Kp.js} +1 -1
  99. package/dist/client/assets/decopilot-sse-pool-BUgTQWHo.js +1 -0
  100. package/dist/client/assets/{dialog-hItRl0PM.js → dialog-DDwbu0DV.js} +1 -1
  101. package/dist/client/assets/{domain-settings-DWE5A_EC.js → domain-settings-B_emuEpk.js} +1 -1
  102. package/dist/client/assets/{drawer-DuLBqwDu.js → drawer-BDhgwaOL.js} +1 -1
  103. package/dist/client/assets/{dropdown-menu-LWFsRDES.js → dropdown-menu-Bo5G1w_d.js} +1 -1
  104. package/dist/client/assets/{editor-C4Sw9hGx.js → editor-aT3HxWsv.js} +1 -1
  105. package/dist/client/assets/{empty-state-DhZFNn9P.js → empty-state-Dv-2IKnC.js} +1 -1
  106. package/dist/client/assets/{extract-connection-data-DPiIwaYg.js → extract-connection-data-CujxiHRg.js} +1 -1
  107. package/dist/client/assets/{file-explorer-BH-3KCjE.js → file-explorer-DzcqIDIL.js} +1 -1
  108. package/dist/client/assets/{file-type-icon-zHhC_odk.js → file-type-icon-UC-yNbVv.js} +1 -1
  109. package/dist/client/assets/{folder-icon-CnUII1sC.js → folder-icon-RQ5ljomh.js} +1 -1
  110. package/dist/client/assets/{form-BTWHqvdt.js → form-BYKqbhBT.js} +1 -1
  111. package/dist/client/assets/{general-DhZ7IsJ7.js → general-DW_pkEtj.js} +1 -1
  112. package/dist/client/assets/{github-repo-picker-olEJzk4H.js → github-repo-picker-D_2HNLCK.js} +1 -1
  113. package/dist/client/assets/{hooks-CkIombAK.js → hooks-D5o-KWh0.js} +1 -1
  114. package/dist/client/assets/{index-DhgCD36A.js → index-5ZZtWclm.js} +1 -1
  115. package/dist/client/assets/{index-DmOnt-rS.js → index-BdXGq2SQ.js} +54 -54
  116. package/dist/client/assets/{index-BRM630BW.js → index-C7a6icmV.js} +1 -1
  117. package/dist/client/assets/{index-BbLo6MAX.js → index-CUyA303z.js} +1 -1
  118. package/dist/client/assets/{index-qyhd0IMj.js → index-D-N106Pr.js} +1 -1
  119. package/dist/client/assets/{index-BuyUDL-f.js → index-D3VKpTxC.js} +12 -12
  120. package/dist/client/assets/{index-DuLRhFZC.js → index-DLjad9lv.js} +1 -1
  121. package/dist/client/assets/{index-C_7lMH7J.js → index-DlOE1YYT.js} +1 -1
  122. package/dist/client/assets/{index-PL6ljojl.js → index-YHoIgZII.js} +1 -1
  123. package/dist/client/assets/{index-redirect-Cy_NnU2a.js → index-redirect-CPIRxI4m.js} +1 -1
  124. package/dist/client/assets/{infra-billing-CmiuUO1m.js → infra-billing-BqdBDLoV.js} +1 -1
  125. package/dist/client/assets/{input-Cb9iSFEg.js → input-DLWrAudX.js} +1 -1
  126. package/dist/client/assets/{integration-icon-DDXwHQKF.js → integration-icon-BNoav8dr.js} +1 -1
  127. package/dist/client/assets/{invite-member-dialog-CWPn4669.js → invite-member-dialog-BHgChE64.js} +1 -1
  128. package/dist/client/assets/{label-BkQvhQIM.js → label-BHYEeY6F.js} +1 -1
  129. package/dist/client/assets/{layout-DEY36XRI.js → layout-CZITVCAZ.js} +1 -1
  130. package/dist/client/assets/{login-D6sPFCW8.js → login-DzerVBWv.js} +1 -1
  131. package/dist/client/assets/{markdown-0fiCCcV1.js → markdown--7njvvD4.js} +1 -1
  132. package/dist/client/assets/{mcp-oauth-DBjycbCF.js → mcp-oauth-BgRcniFt.js} +1 -1
  133. package/dist/client/assets/{members-h-rh3eGF.js → members-CJI6j9-Z.js} +1 -1
  134. package/dist/client/assets/{monaco-editor-C-Q5HTYn.js → monaco-editor-BpCeS5oa.js} +1 -1
  135. package/dist/client/assets/{monitoring-stats-row-B4FAuCa9.js → monitoring-stats-row-B-BimGeU.js} +1 -1
  136. package/dist/client/assets/{multi-select-Cs1r8Ubg.js → multi-select-CwMyWuLq.js} +1 -1
  137. package/dist/client/assets/{oauth-callback-CM5je5KD.js → oauth-callback-Ctx58JYV.js} +1 -1
  138. package/dist/client/assets/{oauth-callback-ai-provider-Bcr-4szJ.js → oauth-callback-ai-provider-BHmspg17.js} +1 -1
  139. package/dist/client/assets/{onboarding-Lb-gRBGv.js → onboarding-CkwE8Vj9.js} +1 -1
  140. package/dist/client/assets/{org-layout-CZ39vVwh.js → org-layout-BuZoEADQ.js} +1 -1
  141. package/dist/client/assets/{organization-choice-D1rU5_LS.js → organization-choice-Co_YbMuC.js} +1 -1
  142. package/dist/client/assets/{orgs-YHtQLebS.js → orgs-BWTh69UZ.js} +1 -1
  143. package/dist/client/assets/{page-seo-form-C3aLwSt0.js → page-seo-form-CfvHKSB_.js} +1 -1
  144. package/dist/client/assets/{popover-CzFHMi1-.js → popover-BA_Td_-Q.js} +1 -1
  145. package/dist/client/assets/{post-calendar-DX9-IYRC.js → post-calendar-CxuAS6fr.js} +1 -1
  146. package/dist/client/assets/{post-editor-C_J5WNPs.js → post-editor-BKR318Zt.js} +1 -1
  147. package/dist/client/assets/{primitives-B9LqLGWx.js → primitives-Cc3hVYnA.js} +1 -1
  148. package/dist/client/assets/{profile-D8e5tSeS.js → profile-Jb5it5Du.js} +1 -1
  149. package/dist/client/assets/{project-app-view-B27k8y98.js → project-app-view-BcGEld6C.js} +1 -1
  150. package/dist/client/assets/{prompts-DlKoJN67.js → prompts-3U0QpIC1.js} +1 -1
  151. package/dist/client/assets/record-editor-DY3dE_xi.js +1 -0
  152. package/dist/client/assets/redirect-editor-DZXUCQyC.js +1 -0
  153. package/dist/client/assets/registry-Pe5vcIlt.js +2 -0
  154. package/dist/client/assets/{registry-layout-Cpcl6TSK.js → registry-layout-DxFD-d59.js} +1 -1
  155. package/dist/client/assets/{reports-DTxubJgw.js → reports-D5IYVMoF.js} +1 -1
  156. package/dist/client/assets/{require-capability-DuFIGwof.js → require-capability-DzL94x1_.js} +1 -1
  157. package/dist/client/assets/{required-auth-layout-DGJe8Mlj.js → required-auth-layout-W8JF7REw.js} +1 -1
  158. package/dist/client/assets/{reset-password-DxbtkbOg.js → reset-password-BdMXgbSp.js} +1 -1
  159. package/dist/client/assets/{review-settings-DnhAqpkA.js → review-settings-DNZA-Ymf.js} +1 -1
  160. package/dist/client/assets/{roles-3q89My_0.js → roles-CMxoaaPd.js} +1 -1
  161. package/dist/client/assets/{scroll-area-Djm3-sbg.js → scroll-area-BdBwLwcR.js} +1 -1
  162. package/dist/client/assets/{search-input-qkdY6KsE.js → search-input-CPOQQ9kV.js} +1 -1
  163. package/dist/client/assets/{secrets-DEA-aVW1.js → secrets-exqR9yxU.js} +1 -1
  164. package/dist/client/assets/{sections-editor-B_M-97ti.js → sections-editor-CahC6u2q.js} +1 -1
  165. package/dist/client/assets/{select-BOHmdb8C.js → select-Bw5Ks0qA.js} +1 -1
  166. package/dist/client/assets/select-model-CA_yV6SK.js +4 -0
  167. package/dist/client/assets/{self-tool-result-xX9-YD6Y.js → self-tool-result-B9ETdbrU.js} +1 -1
  168. package/dist/client/assets/{seo-editor-DJVpxpW3.js → seo-editor-ByXVC-Qo.js} +1 -1
  169. package/dist/client/assets/{settings-layout-CeyvpLOE.js → settings-layout-DqF3s-Tu.js} +1 -1
  170. package/dist/client/assets/{shell-controls-CXOCgzwX.js → shell-controls-BWDX3SB0.js} +1 -1
  171. package/dist/client/assets/{shell-layout-TUjOtQhE.js → shell-layout-oFkFKjk6.js} +1 -1
  172. package/dist/client/assets/{skill-preview-B4NfqEEV.js → skill-preview-CqIa8DcD.js} +1 -1
  173. package/dist/client/assets/{skills-CzZ5YAGr.js → skills-SIr0pKSS.js} +1 -1
  174. package/dist/client/assets/{spinner-BQad3GmW.js → spinner-DpvCTC5Y.js} +1 -1
  175. package/dist/client/assets/{sso-bHeadfgf.js → sso-WiwcvyVZ.js} +1 -1
  176. package/dist/client/assets/{store-C4oH3kPo.js → store-B-y72iO-.js} +1 -1
  177. package/dist/client/assets/store-registry-Bp5FXCwi.js +2 -0
  178. package/dist/client/assets/{super-agent-icon-CPbKPIBh.js → super-agent-icon-DRB6TIg3.js} +1 -1
  179. package/dist/client/assets/{switch-dQhgVuCH.js → switch-CT7G8y44.js} +1 -1
  180. package/dist/client/assets/{synced-repos-Cbj-TInP.js → synced-repos-C8d65zyT.js} +1 -1
  181. package/dist/client/assets/{table-D_CXPJQu.js → table-COciPSmg.js} +1 -1
  182. package/dist/client/assets/{tabs-DZiIU_cf.js → tabs-DIyzAFb3.js} +1 -1
  183. package/dist/client/assets/{task-board-C5vC-P5k.js → task-board-BiHRLtfZ.js} +1 -1
  184. package/dist/client/assets/{tasks-C1pjzmKc.js → tasks-DykVw9ad.js} +1 -1
  185. package/dist/client/assets/{textarea-CliLWMBV.js → textarea-q0aFqDaR.js} +1 -1
  186. package/dist/client/assets/{thread-route-bh7ZH4NA.js → thread-route-CwQPuCXv.js} +1 -1
  187. package/dist/client/assets/{toggle-group-Dwtxjfc4.js → toggle-group-D0Y4PSKz.js} +1 -1
  188. package/dist/client/assets/{toolbar-3fMfxNen.js → toolbar-B27xGuLn.js} +1 -1
  189. package/dist/client/assets/{track-9YygJVzx.js → track-CX7ELXNp.js} +1 -1
  190. package/dist/client/assets/{types-nGmsoTZv.js → types-DBj_2byI.js} +1 -1
  191. package/dist/client/assets/{use-ai-providers-DwlhpRes.js → use-ai-providers-5UzYA_Ay.js} +1 -1
  192. package/dist/client/assets/{use-api-keys-B5cZ7wvR.js → use-api-keys-CGkSs9fx.js} +1 -1
  193. package/dist/client/assets/{use-automations-CmgiIky3.js → use-automations-2OwhW8mT.js} +1 -1
  194. package/dist/client/assets/{use-autosave-2HBwk4wx.js → use-autosave-CZJPWmVr.js} +1 -1
  195. package/dist/client/assets/{use-connection-bZgPnZOr.js → use-connection-C4tHGK_R.js} +1 -1
  196. package/dist/client/assets/{use-copy-Cq30lUsM.js → use-copy-D3bWmqKI.js} +1 -1
  197. package/dist/client/assets/{use-create-virtual-mcp-DMHxG54f.js → use-create-virtual-mcp-BQC63viy.js} +1 -1
  198. package/dist/client/assets/{use-debounced-autosave-DvptVode.js → use-debounced-autosave-CjisSIGN.js} +1 -1
  199. package/dist/client/assets/{use-debounced-value-DqFNyMpP.js → use-debounced-value-C-19Ks68.js} +1 -1
  200. package/dist/client/assets/{use-decopilot-events-Cv4HgIi3.js → use-decopilot-events-D9wlNJkn.js} +1 -1
  201. package/dist/client/assets/{use-delete-connection-CsW8T7ZH.js → use-delete-connection-CNMIYgL7.js} +1 -1
  202. package/dist/client/assets/{use-deployment-admin-aSXK_ggq.js → use-deployment-admin-Cp1eQvLN.js} +1 -1
  203. package/dist/client/assets/{use-destination-route-B_24Whcs.js → use-destination-route-DZ0W7RzN.js} +1 -1
  204. package/dist/client/assets/{use-file-configs-EoWVXyV1.js → use-file-configs-BqS7H5_m.js} +1 -1
  205. package/dist/client/assets/{use-infinite-scroll-CY3oO4vc.js → use-infinite-scroll-D2Aieyh1.js} +1 -1
  206. package/dist/client/assets/{use-join-requests-EgMaCxaX.js → use-join-requests-Dnjsn_41.js} +1 -1
  207. package/dist/client/assets/{use-mcp-auth-status-DObWVXL7.js → use-mcp-auth-status-CjQB5cu9.js} +1 -1
  208. package/dist/client/assets/{use-mcp-client-BISqHyTj.js → use-mcp-client-BQ9vs4Qy.js} +2 -2
  209. package/dist/client/assets/{use-mcp-tools-Dtv8_qE-.js → use-mcp-tools-D8KgzdHN.js} +1 -1
  210. package/dist/client/assets/{use-members-CGZd946r.js → use-members-DO4RCIZm.js} +1 -1
  211. package/dist/client/assets/{use-navigate-to-agent-DDo0Ri7O.js → use-navigate-to-agent-ClG-IN6I.js} +1 -1
  212. package/dist/client/assets/{use-org-auth-client-DK9IhaDS.js → use-org-auth-client-Dk6fd9pX.js} +1 -1
  213. package/dist/client/assets/{use-org-repo-syncs-DDOe1mEV.js → use-org-repo-syncs-C27C0y4g.js} +1 -1
  214. package/dist/client/assets/{use-org-sso-BlnuVfy8.js → use-org-sso-WwmtIUKh.js} +1 -1
  215. package/dist/client/assets/{use-organization-roles-vQX1qheI.js → use-organization-roles-qw2b55hs.js} +1 -1
  216. package/dist/client/assets/{use-organization-settings-9gyyAmDC.js → use-organization-settings-ZPgcmrdm.js} +1 -1
  217. package/dist/client/assets/{use-panel-navigate-Dl8TU9Fq.js → use-panel-navigate-DgLPPIdl.js} +1 -1
  218. package/dist/client/assets/{use-registry-connections-C6Vm545i.js → use-registry-connections-CBdv-odW.js} +1 -1
  219. package/dist/client/assets/{use-secrets-CebeVclF.js → use-secrets-CoOHyuD3.js} +1 -1
  220. package/dist/client/assets/{use-section-preview-base-C3CbXEpd.js → use-section-preview-base-zIQA6tMl.js} +1 -1
  221. package/dist/client/assets/{use-status-sounds-CZScO2ta.js → use-status-sounds-DqnoGVTJ.js} +1 -1
  222. package/dist/client/assets/{use-tags-Bo6st0jt.js → use-tags-BHyeTA9F.js} +1 -1
  223. package/dist/client/assets/{use-view-mode-CfFp3geX.js → use-view-mode-DbdgNRfk.js} +1 -1
  224. package/dist/client/assets/use-virtual-mcp-D3x5zzYo.js +1 -0
  225. package/dist/client/assets/useInfiniteQuery-DBlZAdTR.js +1 -0
  226. package/dist/client/assets/useSuspenseInfiniteQuery-BH7_DvDI.js +1 -0
  227. package/dist/client/assets/{users-KKKtts0z.js → users-DyjZVrDs.js} +1 -1
  228. package/dist/client/assets/{variant-calendar-DPptfq0B.js → variant-calendar-DHcu2Ku5.js} +1 -1
  229. package/dist/client/assets/{view-mode-toggle-CkVDMUHU.js → view-mode-toggle-BXkLmGA4.js} +1 -1
  230. package/dist/client/index.html +1 -1
  231. package/dist/server/cli.js +1 -1
  232. package/dist/server/server.js +1 -1
  233. package/package.json +1 -1
  234. package/dist/client/assets/ai-providers-B0dgXRVJ.js +0 -6
  235. package/dist/client/assets/decopilot-sse-pool-MEiWGftu.js +0 -1
  236. package/dist/client/assets/record-editor-CAQX4Dhe.js +0 -1
  237. package/dist/client/assets/redirect-editor-DJxCUYg3.js +0 -1
  238. package/dist/client/assets/registry-CgaDNZ4i.js +0 -2
  239. package/dist/client/assets/select-model-CPmeNaNO.js +0 -4
  240. package/dist/client/assets/store-registry-OTCH0UWM.js +0 -2
  241. package/dist/client/assets/use-virtual-mcp-B6D2i_ny.js +0 -1
  242. package/dist/client/assets/useInfiniteQuery-D5GGzERO.js +0 -1
  243. package/dist/client/assets/useSuspenseInfiniteQuery-Dq_znrqe.js +0 -1
@@ -1 +1 @@
1
- import{c as K,b as X,r as Z,j as n,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-BuyUDL-f.js";import{r as gt,T as at,aB as bt}from"./agent-icon-BGP9U6d6.js";import{i as vt}from"./ChevronRight-DV9U9V1C.js";import{L as yt}from"./label-BkQvhQIM.js";import{S as lt}from"./scroll-area-Djm3-sbg.js";import{S as jt}from"./switch-dQhgVuCH.js";import{V as Tt}from"./view-mode-toggle-CkVDMUHU.js";import{bt as ct,bu as mt,bv as Nt,bw as _t,bx as kt,by as U,bz as wt}from"./index-DmOnt-rS.js";import"./AlertCircle-C0recpiM.js";import"./UserSquare-BO9lFHlw.js";import"./Tool01-BPHywJEb.js";import"./ArrowUp-B_j1WdZ5.js";import"./ArrowLeft-B2Z12k58.js";import"./Tool02-D4AQe9SD.js";import"./XCircle-Dgz569F-.js";import"./TrendUp01-C29DtCbZ.js";import"./ZapSquare-C3xSe5yB.js";import"./ZoomOut-B8EEsxrO.js";import"./Users03-K46FZ0yi.js";import"./CheckCircle-CFTFD5Ed.js";import"./Check-BejV2053.js";import"./ChevronDown-D5RFRhzf.js";import"./ChevronSelectorVertical-CsU1yTcH.js";import"./ChevronUp-D4IrNOCC.js";import"./DotsVertical-DqsE4vgP.js";import"./Stars02-Dco9Mo0t.js";import"./Copy01-Cr3MDnu-.js";import"./CreditCard01-D_XNSGw3.js";import"./Download01-Cu0GEQBo.js";import"./Settings02-By8pQbcj.js";import"./Eye-DhUWQAZM.js";import"./FilterLines-DahI-t1v.js";import"./Share07-dg97NqNd.js";import"./GitBranch01-B7UokEiw.js";import"./Globe01-8plmq2TA.js";import"./Globe04-DlFdM3LP.js";import"./SwitchHorizontal01-BfZwTC3u.js";import"./HardDrive-57Sc_B7u.js";import"./Image01-HOTAu7DE.js";import"./Key01-DLcgmMi7.js";import"./LinkExternal01-C5L2pr2x.js";import"./LockUnlocked01-BleHTt-O.js";import"./LogOut01-CfPLGrdh.js";import"./Monitor01-CGzGmiSx.js";import"./Sun-CZ4AN-2E.js";import"./Package-WyJYCcJV.js";import"./Palette-ivE2ilgf.js";import"./Play-CsI3qh5P.js";import"./Plus-BNnPvfG8.js";import"./SearchLg-Ccchnc4p.js";import"./SearchMd-BJmbTOt_.js";import"./Shield01-CxgaYLbk.js";import"./Stars01-C5bXx9wk.js";import"./Trash01-Bkd5f3e4.js";import"./Upload01-CPHyTAd0.js";import"./User01-rDgL3Cs0.js";import"./Users01-CGiHQkW6.js";import"./XClose-DRl5snCd.js";import"./Zap-CqYQM_jt.js";import"./select-BOHmdb8C.js";import"./chat-context-CY2SGM0h.js";import"./use-panel-navigate-Dl8TU9Fq.js";import"./use-destination-route-B_24Whcs.js";import"./thread-route-bh7ZH4NA.js";import"./dialog-hItRl0PM.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-CkIombAK.js";import"./use-mcp-client-BISqHyTj.js";import"./auth-CYohcmQZ.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-MEiWGftu.js";import"./task-board-C5vC-P5k.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-B6D2i_ny.js";import"./use-ai-providers-DwlhpRes.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-Cv4HgIi3.js";import"./use-organization-settings-9gyyAmDC.js";import"./automation-runs-8GLe55cG.js";import"./useInfiniteQuery-D5GGzERO.js";import"./use-infinite-scroll-CY3oO4vc.js";import"./use-connection-bZgPnZOr.js";import"./table-D_CXPJQu.js";import"./empty-state-DhZFNn9P.js";import"./use-members-CGZd946r.js";import"./use-org-auth-client-DK9IhaDS.js";import"./use-automations-CmgiIky3.js";import"./useSuspenseInfiniteQuery-Dq_znrqe.js";import"./avatar-BuHFImQ0.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-Cq30lUsM.js";import"./markdown-0fiCCcV1.js";import"./monaco-editor-C-Q5HTYn.js";import"./spinner-BQad3GmW.js";import"./editor-C4Sw9hGx.js";import"./types-nGmsoTZv.js";import"./shell-layout-TUjOtQhE.js";import"./required-auth-layout-DGJe8Mlj.js";import"./use-org-sso-BlnuVfy8.js";import"./integration-icon-DDXwHQKF.js";import"./use-navigate-to-agent-DDo0Ri7O.js";import"./chart-Z15NQIs8.js";import"./index-BRM630BW.js";import"./form-BTWHqvdt.js";import"./input-Cb9iSFEg.js";import"./file-type-icon-zHhC_odk.js";import"./drawer-DuLBqwDu.js";import"./collection-search-BJAxACkb.js";import"./tabs-DZiIU_cf.js";import"./toggle-group-Dwtxjfc4.js";import"./super-agent-icon-CPbKPIBh.js";import"./self-tool-result-xX9-YD6Y.js";import"./alert-dialog-Csnli2CD.js";import"./extract-connection-data-DPiIwaYg.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-DqFNyMpP.js";import"./authenticate-and-persist-oauth-Ds-Znneo.js";import"./mcp-oauth-DBjycbCF.js";import"./track-9YygJVzx.js";import"./popover-CzFHMi1-.js";import"./toolbar-3fMfxNen.js";import"./github-repo-picker-olEJzk4H.js";import"./use-mcp-tools-Dtv8_qE-.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-IfNei3OO.js";import"./use-registry-connections-C6Vm545i.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CliLWMBV.js";import"./connection-form-helpers-C174Udb3.js";import"./collection-tabs-Lzes2Hm5.js";import"./badge-CO8RwMr5.js";import"./select-model-CPmeNaNO.js";import"./checkbox-oWGgw210.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-CnUII1sC.js";import"./dropdown-menu-LWFsRDES.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CZScO2ta.js";import"./skill-preview-B4NfqEEV.js";import"./use-file-configs-EoWVXyV1.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-DvptVode.js";import"./search-input-qkdY6KsE.js";import"./use-mcp-auth-status-DObWVXL7.js";import"./use-secrets-CebeVclF.js";import"./AreaChart-XSelV74e.js";import"./config-DRDl0YmS.js";import"./command-Bp1UIw04.js";import"./index-C_7lMH7J.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-B40XpKTU.js";import"./use-tags-Bo6st0jt.js";import"./automation-list-row-ByC4kR2D.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-DDOe1mEV.js";import"./cards-vcKmBwGO.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 Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(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=Ht(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 sn(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 H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=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:H,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 B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,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,H=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:H.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)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 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{sn as VariantCalendar};
1
+ import{c as K,b as X,r as Z,j as n,n as rt,a8 as ut,ab as ht,B as tt,a9 as xt}from"./index-D3VKpTxC.js";import{r as gt,T as at,aB as bt}from"./agent-icon-C-n5olUZ.js";import{i as vt}from"./ChevronRight-svtnlhH0.js";import{L as yt}from"./label-BHYEeY6F.js";import{S as lt}from"./scroll-area-BdBwLwcR.js";import{S as jt}from"./switch-CT7G8y44.js";import{V as Tt}from"./view-mode-toggle-BXkLmGA4.js";import{bt as ct,bu as mt,bv as Nt,bw as _t,bx as kt,by as U,bz as wt}from"./index-BdXGq2SQ.js";import"./AlertCircle-CBaX32T8.js";import"./UserSquare-CvpnDHTo.js";import"./Tool01-COVQDSaO.js";import"./ArrowUp-BKP7Of5k.js";import"./ArrowLeft-CkFARlRm.js";import"./Tool02-CFg1mEuF.js";import"./XCircle-BoPq98m_.js";import"./TrendUp01-CUvB96sa.js";import"./ZapSquare-duF0Bpf9.js";import"./ZoomOut-_z5S0Eh3.js";import"./Users03-x8CdwYth.js";import"./CheckCircle-D2T6eT6_.js";import"./Check-C9Wfn4Zh.js";import"./ChevronDown-CzTRNfbz.js";import"./ChevronSelectorVertical-C-W6z-h0.js";import"./ChevronUp-DUkNqhLA.js";import"./DotsVertical-B5kF5ePB.js";import"./Stars02-DpWcAt39.js";import"./Copy01-sakYFLwd.js";import"./CreditCard01-C-9jfjTF.js";import"./Download01-7NcpEf0j.js";import"./Settings02-B1WzQBFr.js";import"./Eye-zWOliaFc.js";import"./FilterLines-KFdnOzHp.js";import"./Share07-BuEXfpWT.js";import"./GitBranch01-CrtIZSTl.js";import"./Globe01-DBYH9UAq.js";import"./Globe04-C0w2m9H5.js";import"./SwitchHorizontal01-C9T-4Yx3.js";import"./HardDrive-BF8VOZU_.js";import"./Image01-DLo7ySl9.js";import"./Key01-Be4RuMHf.js";import"./LinkExternal01-CpispIo5.js";import"./LockUnlocked01-BGjxHOgf.js";import"./LogOut01-CcSBS9vf.js";import"./Monitor01-C31HK29K.js";import"./Sun-Bh00fJBf.js";import"./Package-B8sew0cm.js";import"./Palette-D9Dc3WrO.js";import"./Play-CWWZONrn.js";import"./Plus-GGi4pu8K.js";import"./SearchLg-C-GcLkxc.js";import"./SearchMd-C4aIQKDV.js";import"./Shield01-BLZEBiIm.js";import"./Stars01-DBhJ3FUw.js";import"./Trash01-OdRN4fEr.js";import"./Upload01-UZpAdZVY.js";import"./User01-gTW5bMu6.js";import"./Users01-BYcdYmiU.js";import"./XClose-Dytuf1me.js";import"./Zap-Tb2cgR-Z.js";import"./select-Bw5Ks0qA.js";import"./chat-context-BAwLJUuM.js";import"./use-panel-navigate-DgLPPIdl.js";import"./use-destination-route-DZ0W7RzN.js";import"./thread-route-CwQPuCXv.js";import"./dialog-DDwbu0DV.js";import"./constants-dLUUoWH7.js";import"./session-runtime-C-KTDVeQ.js";import"./slugify-CEUa2lfQ.js";import"./hooks-D5o-KWh0.js";import"./use-mcp-client-BQ9vs4Qy.js";import"./auth-Cbnsnt2t.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./decopilot-sse-pool-BUgTQWHo.js";import"./task-board-BiHRLtfZ.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-virtual-mcp-D3x5zzYo.js";import"./use-ai-providers-5UzYA_Ay.js";import"./location-oTTXFrSF.js";import"./use-decopilot-events-D9wlNJkn.js";import"./use-organization-settings-ZPgcmrdm.js";import"./automation-runs-D1fifRvX.js";import"./useInfiniteQuery-DBlZAdTR.js";import"./use-infinite-scroll-D2Aieyh1.js";import"./use-connection-C4tHGK_R.js";import"./table-COciPSmg.js";import"./empty-state-Dv-2IKnC.js";import"./use-members-DO4RCIZm.js";import"./use-org-auth-client-Dk6fd9pX.js";import"./use-automations-2OwhW8mT.js";import"./useSuspenseInfiniteQuery-BH7_DvDI.js";import"./avatar-CQ7CybJi.js";import"./format-time-BnbuEtat.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-D3bWmqKI.js";import"./markdown--7njvvD4.js";import"./monaco-editor-BpCeS5oa.js";import"./spinner-DpvCTC5Y.js";import"./editor-aT3HxWsv.js";import"./types-DBj_2byI.js";import"./shell-layout-oFkFKjk6.js";import"./required-auth-layout-W8JF7REw.js";import"./use-org-sso-WwmtIUKh.js";import"./integration-icon-BNoav8dr.js";import"./use-navigate-to-agent-ClG-IN6I.js";import"./chart-jQWmG3Ij.js";import"./index-C7a6icmV.js";import"./form-BYKqbhBT.js";import"./input-DLWrAudX.js";import"./file-type-icon-UC-yNbVv.js";import"./drawer-BDhgwaOL.js";import"./collection-search-BpSgcVBX.js";import"./tabs-DIyzAFb3.js";import"./toggle-group-D0Y4PSKz.js";import"./super-agent-icon-DRB6TIg3.js";import"./self-tool-result-B9ETdbrU.js";import"./alert-dialog-BNd5_vQu.js";import"./extract-connection-data-CujxiHRg.js";import"./metadata-dUsYcpuu.js";import"./provision-repo-scoped-github-connection-CMPWtdMv.js";import"./use-debounced-value-C-19Ks68.js";import"./authenticate-and-persist-oauth-DRDRlEO8.js";import"./mcp-oauth-BgRcniFt.js";import"./track-CX7ELXNp.js";import"./popover-BA_Td_-Q.js";import"./toolbar-B27xGuLn.js";import"./github-repo-picker-D_2HNLCK.js";import"./use-mcp-tools-D8KgzdHN.js";import"./agent-capabilities-B52k7xCe.js";import"./connection-card-CdF-GA1k.js";import"./use-registry-connections-CBdv-odW.js";import"./retry-CErkP7V6.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-q0aFqDaR.js";import"./connection-form-helpers-Dp6ysVVk.js";import"./collection-tabs-CXua3gRQ.js";import"./badge-DQVOkFgD.js";import"./select-model-CA_yV6SK.js";import"./checkbox-JDRyOJQL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./folder-icon-RQ5ljomh.js";import"./dropdown-menu-Bo5G1w_d.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-DqnoGVTJ.js";import"./skill-preview-CqIa8DcD.js";import"./use-file-configs-BqS7H5_m.js";import"./pt-BR-CLy76QW2.js";import"./use-debounced-autosave-CjisSIGN.js";import"./search-input-CPOQQ9kV.js";import"./use-mcp-auth-status-CjQB5cu9.js";import"./use-secrets-CoOHyuD3.js";import"./AreaChart-cQSx2b8G.js";import"./config-BNXwa8bZ.js";import"./command-Cq-9kw_v.js";import"./index-DlOE1YYT.js";import"./get-initials-D-f_fDFw.js";import"./breadcrumb-DYk45Pno.js";import"./use-tags-BHyeTA9F.js";import"./automation-list-row-8ZUBuxGc.js";import"./site-error--i37Vnuw.js";import"./use-org-repo-syncs-C27C0y4g.js";import"./cards-BtmUbLls.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 Bt={bg:"oklch(0.62 0.14 0)",text:"white",border:"oklch(0.50 0.14 0)"};function dt(e,t){return e.get(t)??Bt}const ot=new Intl.DateTimeFormat("en",{dateStyle:"medium",timeStyle:"short"});function Ht(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=Ht(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 sn(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 H;t[40]===Symbol.for("react.memo_cache_sentinel")?(H=n.jsx(at,{}),t[40]=H):H=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:H,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 B;t[53]!==P||t[54]!==s?(B=n.jsx(Tt,{value:s,onValueChange:i,options:P}),t[53]=P,t[54]=s,t[55]=B):B=t[55];let z;t[56]!==R||t[57]!==B?(z=n.jsxs("div",{className:"flex items-center gap-4",children:[R,B]}),t[56]=R,t[57]=B,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,H=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:H.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)),B=h(new Date(O))-P;return n.jsx(ft,{variant:S,color:H,fadeStart:S.openStart,fadeEnd:S.openEnd,style:{top:"50%",transform:"translateY(-50%)",left:`${P}%`,width:`calc(${B}% - 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{sn as VariantCalendar};
@@ -1 +1 @@
1
- import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-BuyUDL-f.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 n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||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(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.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]=n,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":n.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]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
1
+ import{c as $,r as C,n as f,j as i,ab as k,a8 as I,a9 as P}from"./index-D3VKpTxC.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 n=M[_];let l;t[6]!==z?(l=f("relative flex gap-0 bg-muted rounded-lg",z),t[6]=z,t[7]=l):l=t[7];let a;t[8]!==n||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(n.buttonWithLabel,"px-3"):n.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",n.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]=n,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":n.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]!==l||t[25]!==a?(v=i.jsxs("div",{className:l,children:[a,u]}),t[23]=u,t[24]=l,t[25]=a,t[26]=v):v=t[26],v}export{A as V};
@@ -50,7 +50,7 @@
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-BuyUDL-f.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-D3VKpTxC.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-DS-wHxfn.css">
55
55
  </head>
56
56
  <body>
@@ -1489,7 +1489,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var jn1=L(()=>{Yb()});f
1489
1489
  `.execute($);if(Number(W.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${J}/${K}, keeping in old table`);continue}}await ky`
1490
1490
  DELETE FROM kysely_migration WHERE name = ${Q}
1491
1491
  `.execute($)}}async function js1($){await Ce8($),await _e8($);let Z=new ws1({db:$,provider:{getMigrations:()=>Promise.resolve(Bn0)}}),{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 ve8($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await Xm0();let G=Q??F8(),J=async()=>{if(!Z&&!Q)await JO(G).catch((K)=>{console.warn("Warning: Error closing database:",K)})};try{let K=await js1(G.db);return await J(),{betterAuth:Y,kysely:K}}catch(K){throw await J(),K}}async function xe8(){let $=F8(),Z=new ws1({db:$.db,provider:{getMigrations:()=>Promise.resolve(Bn0)}}),{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 Ps1=L(()=>{Ds1();Ym0();KQ()});async function M70($){let Z={...process.env},Q=j80($,Z);console.log(PE1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?rt1(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (CZ0(),SZ0)),{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(() => (Ym0(),st1));await W(G.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (KQ(),Ot1)),{migrateToLatest:F}=await Promise.resolve().then(() => (Ps1(),zs1)),N=H(G.databaseUrl);await F({keepOpen:!0,database:N,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 zn1(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 On0=L(()=>{Yb();at1();R$()});var Is1={};$0(Is1,{updateService:()=>eE,subscribeCliState:()=>wn0,setTuiConsoleIntercepted:()=>V70,setServerUrl:()=>Rp,setMigrationsDone:()=>Tp,setDevMode:()=>be8,resetCliStateForTests:()=>fe8,isTuiConsoleIntercepted:()=>k70,getCliState:()=>Dn0,addLogEntry:()=>BO});function As1(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function Ts1(){return{services:As1(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function fe8(){dX=Ts1()}function Ap(){for(let $ of Ln0)$()}function Dn0(){return dX}function wn0($){return Ln0.add($),()=>Ln0.delete($)}function eE($){dX={...dX,services:dX.services.map((Z)=>Z.name===$.name?$:Z)},Ap()}function Tp(){dX={...dX,migrationsStatus:"done"},Ap()}function Rp($){dX={...dX,serverUrl:$},Ap()}function BO($){let Z=[...dX.logs,$];dX={...dX,logs:Z.length>500?Z.slice(-500):Z},Ap()}function be8(){dX={...dX,services:[...As1(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},Ap()}function V70($){Rs1=$}function k70(){return Rs1}var dX,Ln0,Rs1=!1;var $j=L(()=>{dX=Ts1();Ln0=new Set});import{createServer as qs1}from"net";function ye8($){return new Promise((Z)=>{let Q=qs1();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function Ip($){if(await ye8($))return $;let Z=await new Promise((Q,X)=>{let Y=qs1();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 En0=()=>{};var zn0={};$0(zn0,{startDevServer:()=>he8,pipeToLogStore:()=>jn0});import{join as ge8}from"path";function jn0($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let G=X.split(`
1492
- `);X=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;BO({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)BO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function he8($){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 Ip(Number(Y)+1):await Ip(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await M70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)eE({name:D.name,status:"ready",port:D.port});Tp();let F=ge8(import.meta.dir,"..","..","..","..",".."),N=Q===!0,U=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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)jn0(U.stdout),jn0(U.stderr);Rp(G),eE({name:"Vite",status:"ready",port:Number(Y)}),eE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (CZ0(),SZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var Pn0=L(()=>{On0();$j();En0()});var S70;var An0=L(()=>{S70={name:"decocms",version:"4.311.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 ce8,Text as Ms1}from"ink";import{jsx as le8,jsxs as Vs1}from"react/jsx-runtime";function ks1({version:$}){return Vs1(ce8,{flexDirection:"column",marginTop:1,children:[$70.map((Z,Q)=>le8(Ms1,{color:Z70[Q],children:Z},Q)),Vs1(Ms1,{dimColor:!0,children:[" v",$]})]})}var Ss1=L(()=>{Fp()});import{Box as Zj,Text as OO}from"ink";import{Spinner as me8}from"@inkjs/ui";import{jsx as KG,jsxs as Sy}from"react/jsx-runtime";function Cs1({status:$}){if($==="pending")return KG(me8,{label:""});return KG(OO,{color:"green",children:"\u2713"})}function de8($){return`${$.name}: ${$.port||"...."}`}function _s1({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Sy(Zj,{flexDirection:"column",paddingBottom:1,children:[KG(ks1,{version:S70.version}),KG(Zj,{marginBottom:1,children:KG(OO,{dimColor:!0,children:"\u2500".repeat(80)})}),KG(Zj,{children:Sy(OO,{dimColor:!0,children:["Home: ",Q]})}),Sy(Zj,{gap:2,children:[$.map((Y)=>Sy(Zj,{gap:1,children:[KG(OO,{children:de8(Y)}),KG(Cs1,{status:Y.status})]},Y.name)),Sy(Zj,{gap:1,children:[KG(OO,{children:"Migrations"}),KG(Cs1,{status:Z})]})]}),KG(Zj,{children:X?Sy(OO,{children:["Open in browser: ",KG(OO,{color:"cyan",children:X})]}):KG(OO,{dimColor:!0,children:"Starting..."})})]})}var vs1=L(()=>{An0();Ss1()});import{Box as ie8,Text as qp}from"ink";import{jsx as Tn0,jsxs as Rn0}from"react/jsx-runtime";function pe8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function xs1({logs:$}){return Tn0(ie8,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Tn0(qp,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Rn0(qp,{children:[Rn0(qp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Tn0(qp,{color:pe8(Z.status),children:Z.status}),Rn0(qp,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var fs1=()=>{};var In0={};$0(In0,{App:()=>oe8});import{Box as ne8}from"ink";import{useSyncExternalStore as te8}from"react";import{jsx as bs1,jsxs as re8}from"react/jsx-runtime";function oe8({home:$}){let Z=te8(wn0,Dn0);return re8(ne8,{flexDirection:"column",children:[bs1(_s1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),bs1(xs1,{logs:Z.logs})]})}var qn0=L(()=>{vs1();fs1();$j()});var n3="thread-gate",DN="decopilot-hosted-harness",wN="decopilot-hosted-harness-sandboxed",zJ="automations",LO="background-tools",Qj="task-board-github-reads",DO="jira-push";var ys1="10";function gs1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:ys1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var hs1=()=>{};import ae8 from"pg";async function cs1($,Z){let{databaseUrl:Q,lockTimeoutMs:X=se8}=$,Y=$.log??((W)=>console.log(W)),G=new ae8.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",[us1.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 H$(ee8)}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)",[us1.toString()])}catch{}await G.end().catch(()=>{})}}var us1=8314027461559302n,se8=600000,ee8=500;var ls1=L(()=>{J4()});function $04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Mn0($,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 ms1(){let $=$04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Mn0($,"--cpu-prof-dir")??process.cwd(),name:Mn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Mn0($,"--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 ds1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=oE();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(()=>{}),C70=setInterval(()=>void Z().catch(()=>{}),$),C70.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(C70)clearInterval(C70)}}var C70;var is1=()=>{};import*as Z04 from"bun:jsc";function ps1(){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{Q04()}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=X04()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,count:N}));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 Q04,X04;var ns1=L(()=>{({startSamplingProfiler:Q04,samplingProfilerStackTraces:X04}=Z04)});function ts1(){ms1();let $=[ds1(),Jt1(),ps1()];return()=>{for(let Z of $)Z()}}var os1=L(()=>{tl0();is1();ns1()});var Xj=v((rs1)=>{Object.defineProperty(rs1,"__esModule",{value:!0});rs1.RepublishHeaders=rs1.DirectMsgHeaders=rs1.JsHeaders=rs1.AdvisoryKind=void 0;rs1.isOrderedPushConsumerOptions=Y04;rs1.isPullConsumer=G04;rs1.isPushConsumer=J04;rs1.isBoundPushConsumerOptions=K04;function Y04($){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 G04($){return $.isPullConsumer()}function J04($){return $.isPushConsumer()}function K04($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}rs1.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"};rs1.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"};rs1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};rs1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var WG=v((ss1)=>{Object.defineProperty(ss1,"__esModule",{value:!0});ss1.TD=ss1.TE=ss1.Empty=void 0;ss1.encode=D04;ss1.decode=w04;ss1.Empty=new Uint8Array(0);ss1.TE=new TextEncoder;ss1.TD=new TextDecoder;function L04(...$){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 D04(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(ss1.TE.encode($[Q]));if(Z.length===0)return ss1.Empty;if(Z.length===1)return Z[0];return L04(...Z)}function w04($){if(!$||$.length===0)return"";return ss1.TD.decode($)}});var HG=v((Ze1)=>{Object.defineProperty(Ze1,"__esModule",{value:!0});Ze1.errors=Ze1.PermissionViolationError=Ze1.NoRespondersError=Ze1.TimeoutError=Ze1.RequestError=Ze1.ProtocolError=Ze1.ConnectionError=Ze1.DrainingConnectionError=Ze1.ClosedConnectionError=Ze1.AuthorizationError=Ze1.UserAuthenticationExpiredError=Ze1.InvalidOperationError=Ze1.InvalidArgumentError=Ze1.InvalidSubjectError=void 0;class kn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Ze1.InvalidSubjectError=kn0;class _70 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 _70(`${$} ${Z}`,Q)}}Ze1.InvalidArgumentError=_70;class Sn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Ze1.InvalidOperationError=Sn0;class v70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new v70($);return null}}Ze1.UserAuthenticationExpiredError=v70;class x70 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 x70($);return null}}Ze1.AuthorizationError=x70;class Cn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Ze1.ClosedConnectionError=Cn0;class _n0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Ze1.DrainingConnectionError=_n0;class vn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Ze1.ConnectionError=vn0;class xn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Ze1.ProtocolError=xn0;class fn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof f70}}Ze1.RequestError=fn0;class bn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Ze1.TimeoutError=bn0;class f70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Ze1.NoRespondersError=f70;class b70 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 b70($,Q,X,Y)}}Ze1.PermissionViolationError=b70;Ze1.errors={AuthorizationError:x70,ClosedConnectionError:Cn0,ConnectionError:vn0,DrainingConnectionError:_n0,InvalidArgumentError:_70,InvalidOperationError:Sn0,InvalidSubjectError:kn0,NoRespondersError:f70,PermissionViolationError:b70,ProtocolError:xn0,RequestError:fn0,TimeoutError:bn0,UserAuthenticationExpiredError:v70}});var t3=v((Je1)=>{Object.defineProperty(Je1,"__esModule",{value:!0});Je1.SimpleMutex=Je1.Perf=void 0;Je1.extend=x04;Je1.render=f04;Je1.timeout=b04;Je1.delay=y04;Je1.deadline=g04;Je1.deferred=gn0;Je1.debugDeferred=h04;Je1.shuffle=u04;Je1.collect=c04;Je1.jitter=Ge1;Je1.backoff=l04;Je1.nanos=m04;Je1.millis=d04;Je1.randomToken=n04;var v04=WG(),yn0=HG();function x04($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function f04($){return v04.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function b04($,Z=!0){let Q=Z?new yn0.TimeoutError:null,X,Y,G=new Promise((J,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new yn0.TimeoutError);else K(Q)},$)});return Object.assign(G,X)}function y04($=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 g04($,Z=1000){let Q=gn0(),X=setTimeout(()=>{Q.reject(new yn0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function gn0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function h04(){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 u04($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function c04($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class Xe1{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})}),$}}Je1.Perf=Xe1;class Ye1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=gn0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Je1.SimpleMutex=Ye1;function Ge1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function l04($=[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 Ge1(Q>Z?$[Z]:$[Q])}}}function m04($){return $*1e6}function d04($){return Math.floor($/1e6)}var i04="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",EN=new Uint8Array(62);for(let $=0;$<62;$++)EN[$]=i04.charCodeAt($);var p04=218340105584896;function n04(){let $=Math.floor(Math.random()*p04),Z=$%62,Q=EN[Z];$=($-Z)/62,Z=$%62;let X=EN[Z];$=($-Z)/62,Z=$%62;let Y=EN[Z];$=($-Z)/62,Z=$%62;let G=EN[Z];$=($-Z)/62,Z=$%62;let J=EN[Z];$=($-Z)/62,Z=$%62;let K=EN[Z];$=($-Z)/62,Z=$%62;let W=EN[Z];$=($-Z)/62;let H=EN[$];return String.fromCharCode(Q,X,Y,G,J,K,W,H)}});var Oe1=v((Ue1)=>{Object.defineProperty(Ue1,"__esModule",{value:!0});Ue1.nuid=Ue1.NuidImpl=void 0;var H14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wO=62,g70=12,Fe1=10,We1=33,F14=333,He1=g70+Fe1,un0=new Uint8Array(wO);for(let $=0;$<wO;$++)un0[$]=H14.charCodeAt($);var y70=4294967296,Ne1=BigInt(wO)**BigInt(Fe1),Mp=Number(Ne1/(1n<<32n)),hn0=Number(Ne1%(1n<<32n));function N14($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function U14($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else N14($)}class cn0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(He1),this.cbuf=new Uint8Array(g70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Mp+1)),this.seqLo=Math.floor(Math.random()*y70);while($++<8&&this.seqHi===Mp&&this.seqLo>=hn0);if(this.seqHi===Mp&&this.seqLo>=hn0)this.seqLo=0;this.inc=Math.random()*(F14-We1)+We1|0}setPre(){U14(this.cbuf);for(let $=0;$<g70;$++)this.buf[$]=un0[this.cbuf[$]%wO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=He1-1;Q>=g70;Q--){let X=Math.floor($/wO),G=($-X*wO)*y70+Z,J=Math.floor(G/wO),K=G-J*wO;this.buf[Q]=un0[K],$=X,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=y70)this.seqLo-=y70,this.seqHi+=1;if(this.seqHi>Mp||this.seqHi===Mp&&this.seqLo>=hn0)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()}}Ue1.NuidImpl=cn0;Ue1.nuid=new cn0});var Ee1=v((De1)=>{Object.defineProperty(De1,"__esModule",{value:!0});De1.nuid=De1.Nuid=void 0;var Le1=Oe1();De1.Nuid=Le1.NuidImpl;De1.nuid=Le1.nuid});var u70=v((h70)=>{Object.defineProperty(h70,"__esModule",{value:!0});h70.nuid=h70.Nuid=void 0;var je1=Ee1();Object.defineProperty(h70,"Nuid",{enumerable:!0,get:function(){return je1.Nuid}});Object.defineProperty(h70,"nuid",{enumerable:!0,get:function(){return je1.nuid}})});var EO=v((ze1)=>{Object.defineProperty(ze1,"__esModule",{value:!0});ze1.DEFAULT_HOST=ze1.DEFAULT_PORT=ze1.Match=void 0;ze1.syncIterator=E14;ze1.createInbox=j14;var D14=u70(),w14=HG();ze1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function E14($){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 j14($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw w14.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${D14.nuid.next()}`}ze1.DEFAULT_PORT=4222;ze1.DEFAULT_HOST="127.0.0.1"});var Vp=v((Re1)=>{Object.defineProperty(Re1,"__esModule",{value:!0});Re1.DataBuffer=void 0;var Ae1=WG();class Te1{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 Ae1.TE.encode($)}static toAscii($){return Ae1.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}}Re1.DataBuffer=Te1});var Yj=v((Me1)=>{Object.defineProperty(Me1,"__esModule",{value:!0});Me1.LF=Me1.CR=Me1.CRLF=Me1.CR_LF_LEN=Me1.CR_LF=void 0;Me1.setTransportFactory=M14;Me1.defaultPort=V14;Me1.getUrlParseFn=k14;Me1.newTransport=S14;Me1.getResolveFn=C14;Me1.protoLen=qe1;Me1.extractProtocolMessage=_14;var R14=WG(),I14=EO(),q14=Vp(),FG;function M14($){FG=$}function V14(){return FG!==void 0&&FG.defaultPort!==void 0?FG.defaultPort:I14.DEFAULT_PORT}function k14(){return FG!==void 0&&FG.urlParseFn?FG.urlParseFn:void 0}function S14(){if(!FG||typeof FG.factory!=="function")throw Error("transport fn is not set");return FG.factory()}function C14(){return FG!==void 0&&FG.dnsResolveFn?FG.dnsResolveFn:void 0}Me1.CR_LF=`\r
1492
+ `);X=G.pop()??"";for(let J of G){let K=Bun.stripANSI(J).replace(/^\[\d+\]\s*/,"").trim();if(!K)continue;BO({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)BO({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:G})}})()}async function he8($){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 Ip(Number(Y)+1):await Ip(Number($.port)),{settings:K,services:W,managedServiceNames:H}=await M70({port:String(J),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let D of W)eE({name:D.name,status:"ready",port:D.port});Tp();let F=ge8(import.meta.dir,"..","..","..","..",".."),N=Q===!0,U=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",N?"inherit":"pipe",N?"inherit":"pipe"]});if(!N)jn0(U.stdout),jn0(U.stderr);Rp(G),eE({name:"Vite",status:"ready",port:Number(Y)}),eE({name:"API",status:"ready",port:Number(K.port)});let O=async(D)=>{if(U.kill(D),await U.exited,H.length>0){let{stopServices:w}=await Promise.resolve().then(() => (CZ0(),SZ0));await w(K.dataDir)}};return process.on("SIGINT",()=>O("SIGINT")),process.on("SIGTERM",()=>O("SIGTERM")),{port:Number(Y),process:U}}var Pn0=L(()=>{On0();$j();En0()});var S70;var An0=L(()=>{S70={name:"decocms",version:"4.311.2",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 ce8,Text as Ms1}from"ink";import{jsx as le8,jsxs as Vs1}from"react/jsx-runtime";function ks1({version:$}){return Vs1(ce8,{flexDirection:"column",marginTop:1,children:[$70.map((Z,Q)=>le8(Ms1,{color:Z70[Q],children:Z},Q)),Vs1(Ms1,{dimColor:!0,children:[" v",$]})]})}var Ss1=L(()=>{Fp()});import{Box as Zj,Text as OO}from"ink";import{Spinner as me8}from"@inkjs/ui";import{jsx as KG,jsxs as Sy}from"react/jsx-runtime";function Cs1({status:$}){if($==="pending")return KG(me8,{label:""});return KG(OO,{color:"green",children:"\u2713"})}function de8($){return`${$.name}: ${$.port||"...."}`}function _s1({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Sy(Zj,{flexDirection:"column",paddingBottom:1,children:[KG(ks1,{version:S70.version}),KG(Zj,{marginBottom:1,children:KG(OO,{dimColor:!0,children:"\u2500".repeat(80)})}),KG(Zj,{children:Sy(OO,{dimColor:!0,children:["Home: ",Q]})}),Sy(Zj,{gap:2,children:[$.map((Y)=>Sy(Zj,{gap:1,children:[KG(OO,{children:de8(Y)}),KG(Cs1,{status:Y.status})]},Y.name)),Sy(Zj,{gap:1,children:[KG(OO,{children:"Migrations"}),KG(Cs1,{status:Z})]})]}),KG(Zj,{children:X?Sy(OO,{children:["Open in browser: ",KG(OO,{color:"cyan",children:X})]}):KG(OO,{dimColor:!0,children:"Starting..."})})]})}var vs1=L(()=>{An0();Ss1()});import{Box as ie8,Text as qp}from"ink";import{jsx as Tn0,jsxs as Rn0}from"react/jsx-runtime";function pe8($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function xs1({logs:$}){return Tn0(ie8,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Tn0(qp,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Rn0(qp,{children:[Rn0(qp,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Tn0(qp,{color:pe8(Z.status),children:Z.status}),Rn0(qp,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var fs1=()=>{};var In0={};$0(In0,{App:()=>oe8});import{Box as ne8}from"ink";import{useSyncExternalStore as te8}from"react";import{jsx as bs1,jsxs as re8}from"react/jsx-runtime";function oe8({home:$}){let Z=te8(wn0,Dn0);return re8(ne8,{flexDirection:"column",children:[bs1(_s1,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),bs1(xs1,{logs:Z.logs})]})}var qn0=L(()=>{vs1();fs1();$j()});var n3="thread-gate",DN="decopilot-hosted-harness",wN="decopilot-hosted-harness-sandboxed",zJ="automations",LO="background-tools",Qj="task-board-github-reads",DO="jira-push";var ys1="10";function gs1($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:ys1,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var hs1=()=>{};import ae8 from"pg";async function cs1($,Z){let{databaseUrl:Q,lockTimeoutMs:X=se8}=$,Y=$.log??((W)=>console.log(W)),G=new ae8.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",[us1.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 H$(ee8)}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)",[us1.toString()])}catch{}await G.end().catch(()=>{})}}var us1=8314027461559302n,se8=600000,ee8=500;var ls1=L(()=>{J4()});function $04(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function Mn0($,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 ms1(){let $=$04();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:Mn0($,"--cpu-prof-dir")??process.cwd(),name:Mn0($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(Mn0($,"--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 ds1(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=oE();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(()=>{}),C70=setInterval(()=>void Z().catch(()=>{}),$),C70.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(C70)clearInterval(C70)}}var C70;var is1=()=>{};import*as Z04 from"bun:jsc";function ps1(){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{Q04()}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=X04()?.traces??[]}catch{}if(J>$&&K.length>0){let W=new Map;for(let F of K){let N=F.frames.find((O)=>O.sourceURL&&!/Unknown Executable/.test(O.category??""))??F.frames[0];if(!N)continue;let U=(N.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${N.name??"?"} @ ${U}:${N.line??"?"}`;W.set(B,(W.get(B)??0)+1)}let H=[...W.entries()].sort((F,N)=>N[1]-F[1]).slice(0,8).map(([F,N])=>({frame:F,count:N}));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 Q04,X04;var ns1=L(()=>{({startSamplingProfiler:Q04,samplingProfilerStackTraces:X04}=Z04)});function ts1(){ms1();let $=[ds1(),Jt1(),ps1()];return()=>{for(let Z of $)Z()}}var os1=L(()=>{tl0();is1();ns1()});var Xj=v((rs1)=>{Object.defineProperty(rs1,"__esModule",{value:!0});rs1.RepublishHeaders=rs1.DirectMsgHeaders=rs1.JsHeaders=rs1.AdvisoryKind=void 0;rs1.isOrderedPushConsumerOptions=Y04;rs1.isPullConsumer=G04;rs1.isPushConsumer=J04;rs1.isBoundPushConsumerOptions=K04;function Y04($){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 G04($){return $.isPullConsumer()}function J04($){return $.isPushConsumer()}function K04($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}rs1.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"};rs1.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"};rs1.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};rs1.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var WG=v((ss1)=>{Object.defineProperty(ss1,"__esModule",{value:!0});ss1.TD=ss1.TE=ss1.Empty=void 0;ss1.encode=D04;ss1.decode=w04;ss1.Empty=new Uint8Array(0);ss1.TE=new TextEncoder;ss1.TD=new TextDecoder;function L04(...$){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 D04(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(ss1.TE.encode($[Q]));if(Z.length===0)return ss1.Empty;if(Z.length===1)return Z[0];return L04(...Z)}function w04($){if(!$||$.length===0)return"";return ss1.TD.decode($)}});var HG=v((Ze1)=>{Object.defineProperty(Ze1,"__esModule",{value:!0});Ze1.errors=Ze1.PermissionViolationError=Ze1.NoRespondersError=Ze1.TimeoutError=Ze1.RequestError=Ze1.ProtocolError=Ze1.ConnectionError=Ze1.DrainingConnectionError=Ze1.ClosedConnectionError=Ze1.AuthorizationError=Ze1.UserAuthenticationExpiredError=Ze1.InvalidOperationError=Ze1.InvalidArgumentError=Ze1.InvalidSubjectError=void 0;class kn0 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}Ze1.InvalidSubjectError=kn0;class _70 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 _70(`${$} ${Z}`,Q)}}Ze1.InvalidArgumentError=_70;class Sn0 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}Ze1.InvalidOperationError=Sn0;class v70 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new v70($);return null}}Ze1.UserAuthenticationExpiredError=v70;class x70 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 x70($);return null}}Ze1.AuthorizationError=x70;class Cn0 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}Ze1.ClosedConnectionError=Cn0;class _n0 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}Ze1.DrainingConnectionError=_n0;class vn0 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}Ze1.ConnectionError=vn0;class xn0 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}Ze1.ProtocolError=xn0;class fn0 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof f70}}Ze1.RequestError=fn0;class bn0 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}Ze1.TimeoutError=bn0;class f70 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}Ze1.NoRespondersError=f70;class b70 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 b70($,Q,X,Y)}}Ze1.PermissionViolationError=b70;Ze1.errors={AuthorizationError:x70,ClosedConnectionError:Cn0,ConnectionError:vn0,DrainingConnectionError:_n0,InvalidArgumentError:_70,InvalidOperationError:Sn0,InvalidSubjectError:kn0,NoRespondersError:f70,PermissionViolationError:b70,ProtocolError:xn0,RequestError:fn0,TimeoutError:bn0,UserAuthenticationExpiredError:v70}});var t3=v((Je1)=>{Object.defineProperty(Je1,"__esModule",{value:!0});Je1.SimpleMutex=Je1.Perf=void 0;Je1.extend=x04;Je1.render=f04;Je1.timeout=b04;Je1.delay=y04;Je1.deadline=g04;Je1.deferred=gn0;Je1.debugDeferred=h04;Je1.shuffle=u04;Je1.collect=c04;Je1.jitter=Ge1;Je1.backoff=l04;Je1.nanos=m04;Je1.millis=d04;Je1.randomToken=n04;var v04=WG(),yn0=HG();function x04($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function f04($){return v04.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function b04($,Z=!0){let Q=Z?new yn0.TimeoutError:null,X,Y,G=new Promise((J,K)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)K(new yn0.TimeoutError);else K(Q)},$)});return Object.assign(G,X)}function y04($=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 g04($,Z=1000){let Q=gn0(),X=setTimeout(()=>{Q.reject(new yn0.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function gn0(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function h04(){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 u04($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function c04($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class Xe1{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})}),$}}Je1.Perf=Xe1;class Ye1{max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=gn0();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}Je1.SimpleMutex=Ye1;function Ge1($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function l04($=[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 Ge1(Q>Z?$[Z]:$[Q])}}}function m04($){return $*1e6}function d04($){return Math.floor($/1e6)}var i04="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",EN=new Uint8Array(62);for(let $=0;$<62;$++)EN[$]=i04.charCodeAt($);var p04=218340105584896;function n04(){let $=Math.floor(Math.random()*p04),Z=$%62,Q=EN[Z];$=($-Z)/62,Z=$%62;let X=EN[Z];$=($-Z)/62,Z=$%62;let Y=EN[Z];$=($-Z)/62,Z=$%62;let G=EN[Z];$=($-Z)/62,Z=$%62;let J=EN[Z];$=($-Z)/62,Z=$%62;let K=EN[Z];$=($-Z)/62,Z=$%62;let W=EN[Z];$=($-Z)/62;let H=EN[$];return String.fromCharCode(Q,X,Y,G,J,K,W,H)}});var Oe1=v((Ue1)=>{Object.defineProperty(Ue1,"__esModule",{value:!0});Ue1.nuid=Ue1.NuidImpl=void 0;var H14="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",wO=62,g70=12,Fe1=10,We1=33,F14=333,He1=g70+Fe1,un0=new Uint8Array(wO);for(let $=0;$<wO;$++)un0[$]=H14.charCodeAt($);var y70=4294967296,Ne1=BigInt(wO)**BigInt(Fe1),Mp=Number(Ne1/(1n<<32n)),hn0=Number(Ne1%(1n<<32n));function N14($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function U14($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else N14($)}class cn0{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(He1),this.cbuf=new Uint8Array(g70),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Mp+1)),this.seqLo=Math.floor(Math.random()*y70);while($++<8&&this.seqHi===Mp&&this.seqLo>=hn0);if(this.seqHi===Mp&&this.seqLo>=hn0)this.seqLo=0;this.inc=Math.random()*(F14-We1)+We1|0}setPre(){U14(this.cbuf);for(let $=0;$<g70;$++)this.buf[$]=un0[this.cbuf[$]%wO]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=He1-1;Q>=g70;Q--){let X=Math.floor($/wO),G=($-X*wO)*y70+Z,J=Math.floor(G/wO),K=G-J*wO;this.buf[Q]=un0[K],$=X,Z=J}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=y70)this.seqLo-=y70,this.seqHi+=1;if(this.seqHi>Mp||this.seqHi===Mp&&this.seqLo>=hn0)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()}}Ue1.NuidImpl=cn0;Ue1.nuid=new cn0});var Ee1=v((De1)=>{Object.defineProperty(De1,"__esModule",{value:!0});De1.nuid=De1.Nuid=void 0;var Le1=Oe1();De1.Nuid=Le1.NuidImpl;De1.nuid=Le1.nuid});var u70=v((h70)=>{Object.defineProperty(h70,"__esModule",{value:!0});h70.nuid=h70.Nuid=void 0;var je1=Ee1();Object.defineProperty(h70,"Nuid",{enumerable:!0,get:function(){return je1.Nuid}});Object.defineProperty(h70,"nuid",{enumerable:!0,get:function(){return je1.nuid}})});var EO=v((ze1)=>{Object.defineProperty(ze1,"__esModule",{value:!0});ze1.DEFAULT_HOST=ze1.DEFAULT_PORT=ze1.Match=void 0;ze1.syncIterator=E14;ze1.createInbox=j14;var D14=u70(),w14=HG();ze1.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function E14($){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 j14($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw w14.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${D14.nuid.next()}`}ze1.DEFAULT_PORT=4222;ze1.DEFAULT_HOST="127.0.0.1"});var Vp=v((Re1)=>{Object.defineProperty(Re1,"__esModule",{value:!0});Re1.DataBuffer=void 0;var Ae1=WG();class Te1{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 Ae1.TE.encode($)}static toAscii($){return Ae1.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}}Re1.DataBuffer=Te1});var Yj=v((Me1)=>{Object.defineProperty(Me1,"__esModule",{value:!0});Me1.LF=Me1.CR=Me1.CRLF=Me1.CR_LF_LEN=Me1.CR_LF=void 0;Me1.setTransportFactory=M14;Me1.defaultPort=V14;Me1.getUrlParseFn=k14;Me1.newTransport=S14;Me1.getResolveFn=C14;Me1.protoLen=qe1;Me1.extractProtocolMessage=_14;var R14=WG(),I14=EO(),q14=Vp(),FG;function M14($){FG=$}function V14(){return FG!==void 0&&FG.defaultPort!==void 0?FG.defaultPort:I14.DEFAULT_PORT}function k14(){return FG!==void 0&&FG.urlParseFn?FG.urlParseFn:void 0}function S14(){if(!FG||typeof FG.factory!=="function")throw Error("transport fn is not set");return FG.factory()}function C14(){return FG!==void 0&&FG.dnsResolveFn?FG.dnsResolveFn:void 0}Me1.CR_LF=`\r
1493
1493
  `;Me1.CR_LF_LEN=Me1.CR_LF.length;Me1.CRLF=q14.DataBuffer.fromAscii(Me1.CR_LF);Me1.CR=new Uint8Array(Me1.CRLF)[0];Me1.LF=new Uint8Array(Me1.CRLF)[1];function qe1($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===Me1.CR&&$[Q]===Me1.LF)return Q+1}return 0}function _14($){let Z=qe1($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return R14.TD.decode(X)}return""}});var pn0=v((fe1)=>{Object.defineProperty(fe1,"__esModule",{value:!0});fe1.ipV4=_e1;fe1.isIP=m14;fe1.parseIP=ve1;var kp=4,Gj=16,c70=48,Ce1=57,ke1=65,c14=70,Se1=97,l14=102,in0=16777215;function _e1($,Z,Q,X){let Y=new Uint8Array(Gj);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 m14($){return ve1($)!==void 0}function ve1($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return xe1($);case":":return d14($)}return}function xe1($){let Z=new Uint8Array(kp);for(let Q=0;Q<kp;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:G}=i14($);if(!G||X>255)return;$=$.substring(Y),Z[Q]=X}return _e1(Z[0],Z[1],Z[2],Z[3])}function d14($){let Z=new Uint8Array(Gj),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<Gj){let{n:Y,c:G,ok:J}=p14($);if(!J||Y>65535)return;if(G<$.length&&$[G]==="."){if(Q<0&&X!=Gj-kp)return;if(X+kp>Gj)return;let K=xe1($);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+=kp;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<Gj){if(Q<0)return;let Y=Gj-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 i14($){let Z=0,Q=0;for(Z=0;Z<$.length&&c70<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=Ce1;Z++)if(Q=Q*10+($.charCodeAt(Z)-c70),Q>=in0)return{n:in0,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function p14($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(c70<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=Ce1)Z*=16,Z+=$.charCodeAt(Q)-c70;else if(Se1<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=l14)Z*=16,Z+=$.charCodeAt(Q)-Se1+10;else if(ke1<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=c14)Z*=16,Z+=$.charCodeAt(Q)-ke1+10;else break;if(Z>=in0)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 sn0=v((ye1)=>{Object.defineProperty(ye1,"__esModule",{value:!0});ye1.Servers=ye1.ServerImpl=void 0;ye1.isIPV4OrHostname=be1;ye1.hostPort=an0;var nn0=Yj(),tn0=t3(),on0=pn0(),r14=EO(),a14=HG();function be1($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function rn0($){return!be1($)}function s14($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function an0($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=s14($),rn0($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=rn0($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):r14.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 Cy{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=an0($);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,on0.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}://${rn0(X)?"["+X+"]":X}`);G.port=`${this.port}`;let J=new Cy(G.host,!1);J.tlsName=this.hostname,Z.push(J)}}if($.randomize)(0,tn0.shuffle)(Z);return this.resolves=Z,Z}}ye1.ServerImpl=Cy;class l70{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw a14.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,nn0.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}=an0(Y),J=Q.get(G);if(J)J.gossiped=!1,X.push(J);else X.push(new Cy(Y))}if(this.randomize)(0,tn0.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,on0.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,nn0.getUrlParseFn)();$=Q?Q($):$;let X=new Cy($,Z);if((0,on0.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 l70.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return l70.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,nn0.getUrlParseFn)(),G=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((K)=>{K=Y?Y(K,Z):K;let W=new Cy(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,tn0.shuffle)(W),this.servers=K?[K,...W]:W}return{added:Q,deleted:X}}}ye1.Servers=l70});var m70=v((ce1)=>{Object.defineProperty(ce1,"__esModule",{value:!0});ce1.QueuedIteratorImpl=void 0;var en0=t3(),he1=HG();class ue1{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,en0.deferred)(),this.yields=[],this.iterClosed=(0,en0.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 he1.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new he1.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,en0.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}}ce1.QueuedIteratorImpl=ue1});var $t0=v((ie1)=>{Object.defineProperty(ie1,"__esModule",{value:!0});ie1.MuxSubscription=void 0;var Q$4=EO(),me1=HG();class de1{baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,Q$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 me1.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new me1.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}ie1.MuxSubscription=de1});var Zt0=v((te1)=>{Object.defineProperty(te1,"__esModule",{value:!0});te1.Heartbeat=void 0;var X$4=t3();class ne1{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,X$4.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})}}te1.Heartbeat=ne1});var Yt0=v((ee1)=>{Object.defineProperty(ee1,"__esModule",{value:!0});ee1.DenoBuffer=ee1.MAX_SIZE=ee1.AssertionError=void 0;ee1.assert=ae1;ee1.concat=se1;ee1.append=G$4;ee1.readAll=J$4;ee1.writeAll=K$4;var Y$4=WG();class Qt0 extends Error{constructor($){super($);this.name="AssertionError"}}ee1.AssertionError=Qt0;function ae1($,Z="Assertion failed."){if(!$)throw new Qt0(Z)}var re1=32768;ee1.MAX_SIZE=4294967294;function d70($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function se1($,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 G$4($,Z){return se1($,Uint8Array.of(Z))}class Xt0{_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($){ae1($<=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=d70(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(Y$4.TE.encode($))}write($){let Z=this._grow($.byteLength);return d70($,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)d70(this._buf.subarray(this._off),this._buf);else if(X+$>ee1.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,ee1.MAX_SIZE));d70(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,ee1.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(re1);while(!0){let X=this.capacity-this.length<re1,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}}}ee1.DenoBuffer=Xt0;function J$4($){let Z=new Xt0;return Z.readFrom($),Z.bytes()}function K$4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var Kt0=v((Y0$)=>{Object.defineProperty(Y0$,"__esModule",{value:!0});Y0$.cc=Y0$.State=Y0$.Parser=Y0$.Kind=void 0;Y0$.describe=O$4;var Gt0=Yt0(),Jt0=WG();Y0$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function O$4($){let Z,Q="";switch($.kind){case Y0$.Kind.MSG:Z="MSG";break;case Y0$.Kind.OK:Z="OK";break;case Y0$.Kind.ERR:Z="ERR",Q=Jt0.TD.decode($.data);break;case Y0$.Kind.PING:Z="PING";break;case Y0$.Kind.PONG:Z="PONG";break;case Y0$.Kind.INFO:Z="INFO",Q=Jt0.TD.decode($.data)}return`${Z}: ${Q}`}function Z0$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var Q0$=48,L$4=57,_y=67108864;class X0${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=Y0$.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 Y0$.State.OP_START:switch(Q){case Y0$.cc.M:case Y0$.cc.m:this.state=Y0$.State.OP_M,this.hdr=-1,this.ma=Z0$();break;case Y0$.cc.H:case Y0$.cc.h:this.state=Y0$.State.OP_H,this.hdr=0,this.ma=Z0$();break;case Y0$.cc.P:case Y0$.cc.p:this.state=Y0$.State.OP_P;break;case Y0$.cc.PLUS:this.state=Y0$.State.OP_PLUS;break;case Y0$.cc.MINUS:this.state=Y0$.State.OP_MINUS;break;case Y0$.cc.I:case Y0$.cc.i:this.state=Y0$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_H:switch(Q){case Y0$.cc.M:case Y0$.cc.m:this.state=Y0$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_M:switch(Q){case Y0$.cc.S:case Y0$.cc.s:this.state=Y0$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MS:switch(Q){case Y0$.cc.G:case Y0$.cc.g:this.state=Y0$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MSG:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:this.state=Y0$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MSG_SPC:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:continue;default:this.state=Y0$.State.MSG_ARG,this.as=Z}break;case Y0$.State.MSG_ARG:switch(Q){case Y0$.cc.CR:this.drop=1;break;case Y0$.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=Y0$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case Y0$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:Y0$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Y0$.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:Y0$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Y0$.State.MSG_END;break;case Y0$.State.MSG_END:switch(Q){case Y0$.cc.NL:this.drop=0,this.as=Z+1,this.state=Y0$.State.OP_START;break;default:continue}break;case Y0$.State.OP_PLUS:switch(Q){case Y0$.cc.O:case Y0$.cc.o:this.state=Y0$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PLUS_O:switch(Q){case Y0$.cc.K:case Y0$.cc.k:this.state=Y0$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PLUS_OK:switch(Q){case Y0$.cc.NL:this.dispatcher.push({kind:Y0$.Kind.OK}),this.drop=0,this.state=Y0$.State.OP_START;break}break;case Y0$.State.OP_MINUS:switch(Q){case Y0$.cc.E:case Y0$.cc.e:this.state=Y0$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MINUS_E:switch(Q){case Y0$.cc.R:case Y0$.cc.r:this.state=Y0$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MINUS_ER:switch(Q){case Y0$.cc.R:case Y0$.cc.r:this.state=Y0$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MINUS_ERR:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:this.state=Y0$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_MINUS_ERR_SPC:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:continue;default:this.state=Y0$.State.MINUS_ERR_ARG,this.as=Z}break;case Y0$.State.MINUS_ERR_ARG:switch(Q){case Y0$.cc.CR:this.drop=1;break;case Y0$.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:Y0$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=Y0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case Y0$.State.OP_P:switch(Q){case Y0$.cc.I:case Y0$.cc.i:this.state=Y0$.State.OP_PI;break;case Y0$.cc.O:case Y0$.cc.o:this.state=Y0$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PO:switch(Q){case Y0$.cc.N:case Y0$.cc.n:this.state=Y0$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PON:switch(Q){case Y0$.cc.G:case Y0$.cc.g:this.state=Y0$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PONG:switch(Q){case Y0$.cc.NL:this.dispatcher.push({kind:Y0$.Kind.PONG}),this.drop=0,this.state=Y0$.State.OP_START;break}break;case Y0$.State.OP_PI:switch(Q){case Y0$.cc.N:case Y0$.cc.n:this.state=Y0$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PIN:switch(Q){case Y0$.cc.G:case Y0$.cc.g:this.state=Y0$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_PING:switch(Q){case Y0$.cc.NL:this.dispatcher.push({kind:Y0$.Kind.PING}),this.drop=0,this.state=Y0$.State.OP_START;break}break;case Y0$.State.OP_I:switch(Q){case Y0$.cc.N:case Y0$.cc.n:this.state=Y0$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_IN:switch(Q){case Y0$.cc.F:case Y0$.cc.f:this.state=Y0$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_INF:switch(Q){case Y0$.cc.O:case Y0$.cc.o:this.state=Y0$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_INFO:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:this.state=Y0$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case Y0$.State.OP_INFO_SPC:switch(Q){case Y0$.cc.SPACE:case Y0$.cc.TAB:continue;default:this.state=Y0$.State.INFO_ARG,this.as=Z}break;case Y0$.State.INFO_ARG:switch(Q){case Y0$.cc.CR:this.drop=1;break;case Y0$.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:Y0$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=Y0$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===Y0$.State.MSG_ARG||this.state===Y0$.State.MINUS_ERR_ARG||this.state===Y0$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new Gt0.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===Y0$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new Gt0.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 Gt0.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 Y0$.cc.SPACE:case Y0$.cc.TAB:case Y0$.cc.CR:case Y0$.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],_y);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],_y);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}: ${Jt0.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case Y0$.cc.SPACE:case Y0$.cc.TAB:case Y0$.cc.CR:case Y0$.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],_y),this.ma.size=this.protoParseInt(Z[3],_y);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],_y),this.ma.size=this.protoParseInt(Z[4],_y);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]<Q0$||$[X]>L$4)return-1;Q=Q*10+($[X]-Q0$)}return Z!==void 0&&Q>Z?-1:Q}}Y0$.Parser=X0$;Y0$.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};Y0$.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 n70=v((J0$)=>{Object.defineProperty(J0$,"__esModule",{value:!0});J0$.MsgHdrsImpl=void 0;J0$.canonicalMIMEHeaderKey=Ht0;J0$.headers=E$4;var G0$=WG(),o3=EO(),p70=HG();function Ht0($){let F=!0,N=Array($.length);for(let U=0;U<$.length;U++){let B=$.charCodeAt(U);if(B===58||B<33||B>126)throw p70.InvalidArgumentError.format("header",`'${$[U]}' 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;N[U]=B,F=B==45}return String.fromCharCode(...N)}function E$4($=0,Z=""){if($===0&&Z!=="")throw p70.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw p70.InvalidArgumentError.format("description","is required");return new vy($,Z)}var Wt0="NATS/1.0";class vy{_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 vy,X=G0$.TD.decode($).split(`\r
1494
1494
  `),Y=X[0];if(Y!==Wt0){let G=Y.replace(Wt0,"").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 $=Wt0;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
1495
1495
  ${Z}: ${Q[X]}`;return`${$}\r