decocms 4.429.12 → 4.429.13

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 (353) hide show
  1. package/dist/client/assets/{AlertCircle-BOwxL-T0.js → AlertCircle-BPm221PV.js} +1 -1
  2. package/dist/client/assets/{AreaChart-BlSy5q9v.js → AreaChart-6U4LsOQh.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft--Xk13dys.js → ArrowLeft-BUXkFW5o.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-QVOtCDeK.js → ArrowRight-D6deLn8q.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CBRbx5X7.js → ArrowUp-DIA2qOVk.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-DJ40wDsa.js → CartesianChart-Bn0VsFou.js} +1 -1
  7. package/dist/client/assets/{Check-DhBGPxm0.js → Check--DqkM7Xv.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-CiQ-dY25.js → CheckCircle-CAAcynpJ.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-DDAA9oEX.js → ChevronUp-tIvwcq5h.js} +1 -1
  10. package/dist/client/assets/{Copy01-DUfSR12p.js → Copy01-DcaC0f-6.js} +1 -1
  11. package/dist/client/assets/{CreditCard01-n7MEW30m.js → CreditCard01-CrJdTCiV.js} +1 -1
  12. package/dist/client/assets/{DotsVertical-DsRrrMyj.js → DotsVertical-BAk4bXO1.js} +1 -1
  13. package/dist/client/assets/{ErrorBarContext-n0lYGsHz.js → ErrorBarContext-DQzfjIH5.js} +1 -1
  14. package/dist/client/assets/{Image01-DS-Zo0Gm.js → Image01-2nm41sXd.js} +1 -1
  15. package/dist/client/assets/{Key01-vFFG-8rI.js → Key01-DvRyUxWt.js} +1 -1
  16. package/dist/client/assets/{Line-CL4zLLJX.js → Line-bjDiX2Xr.js} +1 -1
  17. package/dist/client/assets/{Link01-BP9lpuLn.js → Link01-BP6Ht4AL.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-CCFdzydS.js → LinkExternal01-CCNit4Pp.js} +1 -1
  19. package/dist/client/assets/{Monitor01-DA0blIAC.js → Monitor01-1dfyrJAM.js} +1 -1
  20. package/dist/client/assets/{Palette-C9gvXMWp.js → Palette-CVxN5EBk.js} +1 -1
  21. package/dist/client/assets/{Plus-BSWKCd5K.js → Plus-B3-HKvxk.js} +1 -1
  22. package/dist/client/assets/{SearchMd-C7F8eH-A.js → SearchMd-DG2nOAQH.js} +1 -1
  23. package/dist/client/assets/{Sector-B54NQH1a.js → Sector-CWKVxPvv.js} +1 -1
  24. package/dist/client/assets/{ShoppingBag01-BCLkpTfu.js → ShoppingBag01-BIKAzonD.js} +1 -1
  25. package/dist/client/assets/{Sun-CchZi423.js → Sun-BVR9W5IG.js} +1 -1
  26. package/dist/client/assets/{Tool01-DPX939IH.js → Tool01-C-iZDmeb.js} +1 -1
  27. package/dist/client/assets/{Trash01-CZ3nuubL.js → Trash01-sKbKWg-Z.js} +1 -1
  28. package/dist/client/assets/{Upload01-DYgjYqa8.js → Upload01-DaFFfXEN.js} +1 -1
  29. package/dist/client/assets/{User01-DWDiZkwz.js → User01-C0UZWUsa.js} +1 -1
  30. package/dist/client/assets/{UserSquare-C8IMKAXm.js → UserSquare-CgXzzOm5.js} +1 -1
  31. package/dist/client/assets/{Users01-BoKXzLNT.js → Users01-Dm34vj3x.js} +1 -1
  32. package/dist/client/assets/{X-CU1GZ1X5.js → X-DuNZLDnY.js} +1 -1
  33. package/dist/client/assets/{XAxis-78_nn-Nt.js → XAxis-DW--eWah.js} +1 -1
  34. package/dist/client/assets/{XClose-Xd0cbKp3.js → XClose-CI4Ex-VY.js} +1 -1
  35. package/dist/client/assets/{ZoomOut-vsOlFjcF.js → ZoomOut-CcTHMY1_.js} +1 -1
  36. package/dist/client/assets/{access-gate-CnrAV7W5.js → access-gate-CsayFbTF.js} +1 -1
  37. package/dist/client/assets/{add-connection-dialog-niTjx4zk.js → add-connection-dialog-D4QunSRg.js} +1 -1
  38. package/dist/client/assets/{agent-analytics-D7bBQ0dc.js → agent-analytics-D_Dl4U7m.js} +1 -1
  39. package/dist/client/assets/agent-app-BUVFuOFp.js +1 -0
  40. package/dist/client/assets/{agent-assets-DR0QDA__.js → agent-assets-Bnzv7HpQ.js} +1 -1
  41. package/dist/client/assets/{agent-automation-7uJec9pR.js → agent-automation-BdDMH1rD.js} +1 -1
  42. package/dist/client/assets/{agent-automations-DmEelNOL.js → agent-automations-CattStlk.js} +1 -1
  43. package/dist/client/assets/{agent-connect-sources-uklB0jAg.js → agent-connect-sources-CnkYj934.js} +1 -1
  44. package/dist/client/assets/agent-deck-UHRGuJMA.js +1 -0
  45. package/dist/client/assets/{agent-e2e-C9ksGwFi.js → agent-e2e-B-NWN9DL.js} +1 -1
  46. package/dist/client/assets/{agent-experiments-C5llZi0N.js → agent-experiments-Cc5ZLyOq.js} +1 -1
  47. package/dist/client/assets/{agent-file-BvgAbU_G.js → agent-file-BrWo-y3P.js} +1 -1
  48. package/dist/client/assets/{agent-git-Cvzmg8-E.js → agent-git-DQUkRIl0.js} +1 -1
  49. package/dist/client/assets/{agent-hosting-RuB96PbT.js → agent-hosting-jaFjcW5o.js} +1 -1
  50. package/dist/client/assets/{agent-icon-YnSCc57p.js → agent-icon-Dp6kp3md.js} +1 -1
  51. package/dist/client/assets/agent-library-D-B32ZXN.js +1 -0
  52. package/dist/client/assets/agent-library-file-CKEr81M2.js +1 -0
  53. package/dist/client/assets/{agent-monitor-B0PLDZC_.js → agent-monitor-BVuCmzOy.js} +1 -1
  54. package/dist/client/assets/{agent-overview-Kszn2ucY.js → agent-overview-D3UbZS7e.js} +1 -1
  55. package/dist/client/assets/agent-settings-Cb9OM6NG.js +1 -0
  56. package/dist/client/assets/{agent-site-editor-BAFJDnEv.js → agent-site-editor-BTw3BHsY.js} +1 -1
  57. package/dist/client/assets/agent-site-editor-code-D8L1_auV.js +2 -0
  58. package/dist/client/assets/{agent-site-editor-content-BM7dvQv4.js → agent-site-editor-content-Bcw_UC6S.js} +3 -3
  59. package/dist/client/assets/{agent-site-editor-preview-BbvEHHKI.js → agent-site-editor-preview-C674xlPv.js} +3 -3
  60. package/dist/client/assets/agent-view-BagW5UJX.js +1 -0
  61. package/dist/client/assets/{agent-view-guard-B6V7cfD1.js → agent-view-guard-Cd7sBbgk.js} +1 -1
  62. package/dist/client/assets/{agents-list-uTqVXCj5.js → agents-list-CKNLdsMW.js} +1 -1
  63. package/dist/client/assets/{ai-providers-7u3-xsAH.js → ai-providers-D5-yA0pZ.js} +1 -1
  64. package/dist/client/assets/{alert-f40qZkxz.js → alert-DfRDviVl.js} +1 -1
  65. package/dist/client/assets/{alert-dialog-Dg-UEYR0.js → alert-dialog-ChG64Yqh.js} +1 -1
  66. package/dist/client/assets/{analytics-sections-C28WnDEH.js → analytics-sections--_yGuBzX.js} +1 -1
  67. package/dist/client/assets/{api-keys-DetlsFeL.js → api-keys-CTtTuRS6.js} +1 -1
  68. package/dist/client/assets/api-keys-DQHCr8nL.js +1 -0
  69. package/dist/client/assets/{app-editor-CWpHZzQm.js → app-editor-B4GeFBrk.js} +1 -1
  70. package/dist/client/assets/{asset-utils-BRtd154Z.js → asset-utils-REZrStMp.js} +1 -1
  71. package/dist/client/assets/{auth-6_9F-vLF.js → auth-CbZxJDJO.js} +1 -1
  72. package/dist/client/assets/{auth-catchall-DMXlzhY6.js → auth-catchall-CKkjwXb6.js} +1 -1
  73. package/dist/client/assets/{auth-entry-DAIA1rAX.js → auth-entry-Bna4jPDW.js} +1 -1
  74. package/dist/client/assets/{auth-split-layout-DJ6TRZ9N.js → auth-split-layout-H0PsWAwK.js} +1 -1
  75. package/dist/client/assets/{authenticate-and-persist-oauth-D_fQjtQT.js → authenticate-and-persist-oauth-CuLZgDTx.js} +1 -1
  76. package/dist/client/assets/{automation-list-row-BHr-j90h.js → automation-list-row-D0qmAauL.js} +1 -1
  77. package/dist/client/assets/{automation-runs-CrhsPF9P.js → automation-runs-CZzx2hQi.js} +1 -1
  78. package/dist/client/assets/{automations-CI3Ti2IC.js → automations-1QHZEf7d.js} +1 -1
  79. package/dist/client/assets/{autosend-BftSstM1.js → autosend-DxZ14wgL.js} +1 -1
  80. package/dist/client/assets/{avatar-D-gkFe6T.js → avatar-CmaKR_B3.js} +1 -1
  81. package/dist/client/assets/{badge-BcHbmh2L.js → badge-DESzQP2_.js} +1 -1
  82. package/dist/client/assets/{block-document-DCJ30U1Z.js → block-document-CfJLq6pt.js} +1 -1
  83. package/dist/client/assets/{blocks-preview-workspace-context-Clwp6Bmi.js → blocks-preview-workspace-context-mL7GK3Qu.js} +1 -1
  84. package/dist/client/assets/{buckets-D4IFrBbS.js → buckets-CgMjsqAm.js} +1 -1
  85. package/dist/client/assets/{build-improve-prompt-doc-DcE2pifO.js → build-improve-prompt-doc-C1mHCzrf.js} +1 -1
  86. package/dist/client/assets/{calendar-BBq6y98H.js → calendar-DyPmYqc-.js} +1 -1
  87. package/dist/client/assets/{capability-load-error-D7MJFCZj.js → capability-load-error-BMzEUb1c.js} +1 -1
  88. package/dist/client/assets/{category-editor-BOB9Cbj-.js → category-editor-CTZ7VPkT.js} +1 -1
  89. package/dist/client/assets/{chart-BFZBRiWV.js → chart-Cp8xM8ph.js} +1 -1
  90. package/dist/client/assets/{chat-context-DOzhwdpr.js → chat-context-OYYFpgoc.js} +1 -1
  91. package/dist/client/assets/{chat-draft-BPbPwvlb.js → chat-draft-BQ2fCPy3.js} +1 -1
  92. package/dist/client/assets/{checkbox-DBzqmJaN.js → checkbox-lh-QmVI_.js} +1 -1
  93. package/dist/client/assets/{choose-editor-CDtJnHbS.js → choose-editor-cE5P1Lxn.js} +1 -1
  94. package/dist/client/assets/{claim-phase-copy-DNVgTO-i.js → claim-phase-copy-Kn2TgM59.js} +1 -1
  95. package/dist/client/assets/{cli-auth-success-DdeAm_jJ.js → cli-auth-success-BXihmpbI.js} +1 -1
  96. package/dist/client/assets/{client-icons-B_F6OVON.js → client-icons-CFjQBOiG.js} +1 -1
  97. package/dist/client/assets/{collapsible-DDrhvpFQ.js → collapsible-Bh-hwNfF.js} +1 -1
  98. package/dist/client/assets/{collection-detail-BxMqu9du.js → collection-detail-i1OTkTU4.js} +1 -1
  99. package/dist/client/assets/{collection-display-button-DZ17cDA0.js → collection-display-button-OqXEabvI.js} +1 -1
  100. package/dist/client/assets/{collection-search-Bl3ZyM8B.js → collection-search-DwNTbNf5.js} +1 -1
  101. package/dist/client/assets/{collection-table-wrapper-HyyiPb68.js → collection-table-wrapper-C-w75p9V.js} +1 -1
  102. package/dist/client/assets/{collection-tabs-D8dvpbZK.js → collection-tabs-34C6GHTS.js} +1 -1
  103. package/dist/client/assets/{combobox-CY9Ipk24.js → combobox-4Kgx4pIj.js} +1 -1
  104. package/dist/client/assets/{command-SjbDAl9s.js → command-BaZT-CIE.js} +1 -1
  105. package/dist/client/assets/{companion-mcps-section-CKNg82MB.js → companion-mcps-section-DjxEgj-T.js} +1 -1
  106. package/dist/client/assets/{config-CEGQmRUp.js → config-ChAY_SkW.js} +1 -1
  107. package/dist/client/assets/{connect-BOFzmlC2.js → connect-GABfUILN.js} +1 -1
  108. package/dist/client/assets/{connect-layout-DfH0Byoj.js → connect-layout-CayHU_4e.js} +1 -1
  109. package/dist/client/assets/{connection-DzWV1_h4.js → connection-CPJsYw3o.js} +1 -1
  110. package/dist/client/assets/{connection-card-aZdfvEmX.js → connection-card-qqeOsanU.js} +1 -1
  111. package/dist/client/assets/{connection-detail-gP4a6Ppj.js → connection-detail-BB9VyrN7.js} +1 -1
  112. package/dist/client/assets/{connection-form-helpers-CGHXbRJW.js → connection-form-helpers-BNTEoNKm.js} +1 -1
  113. package/dist/client/assets/{connections-C7ymkV4a.js → connections-BQBGk5yH.js} +1 -1
  114. package/dist/client/assets/{context-CO-AESlP.js → context-BKCEGSTj.js} +1 -1
  115. package/dist/client/assets/{context-menu-DnvTw41B.js → context-menu-BHgxt-Pc.js} +1 -1
  116. package/dist/client/assets/{create-organization-dialog-BCe34I2w.js → create-organization-dialog-3qXdu9Fm.js} +1 -1
  117. package/dist/client/assets/{daily-pulse-BENIKuhB.js → daily-pulse-B4tWhFZs.js} +1 -1
  118. package/dist/client/assets/{decopilot-FwcDapHu.js → decopilot-BmTptrBD.js} +1 -1
  119. package/dist/client/assets/{dialog-DgvI-2Zs.js → dialog-BY9qAzmD.js} +1 -1
  120. package/dist/client/assets/{discover-DTsv-99I.js → discover-D3Ycw0yl.js} +1 -1
  121. package/dist/client/assets/{domain-settings-CulTkPtg.js → domain-settings-BUkv5xYa.js} +1 -1
  122. package/dist/client/assets/{download-app-dialog-Do9mk_KB.js → download-app-dialog-DjfWpS10.js} +1 -1
  123. package/dist/client/assets/{drawer-L7JmR21l.js → drawer-BnsxSXEZ.js} +1 -1
  124. package/dist/client/assets/{editor-Be4HUfth.js → editor-C4w_m3yY.js} +1 -1
  125. package/dist/client/assets/{empty-state-Cl3s1v-7.js → empty-state-8X9eCFno.js} +1 -1
  126. package/dist/client/assets/{empty-state-CXZRRy8X.js → empty-state-BmKHxkRA.js} +1 -1
  127. package/dist/client/assets/{extract-connection-data-BEoPTe53.js → extract-connection-data-DqtfojXT.js} +1 -1
  128. package/dist/client/assets/{feature-gate-C_96j33I.js → feature-gate-Cgk_hzGP.js} +1 -1
  129. package/dist/client/assets/{feature-paywall-C2LoJKfX.js → feature-paywall-CBX7_xA9.js} +1 -1
  130. package/dist/client/assets/{file-explorer-DkVHdTFP.js → file-explorer-B1lABTaD.js} +1 -1
  131. package/dist/client/assets/{file-preview-Dqden2WW.js → file-preview-DTjt013j.js} +1 -1
  132. package/dist/client/assets/{file-share-button-Be6JaysV.js → file-share-button-_YPXNS2s.js} +1 -1
  133. package/dist/client/assets/{file-type-icon-Crn_LS8y.js → file-type-icon-BsA58gQ0.js} +1 -1
  134. package/dist/client/assets/flat-project-BDSklfjp.js +1 -0
  135. package/dist/client/assets/{folder-icon-C0Ke7mgQ.js → folder-icon-BZHi19-S.js} +1 -1
  136. package/dist/client/assets/{form-D1W3w80w.js → form-BgXfP3af.js} +1 -1
  137. package/dist/client/assets/{gateway-client-_adliKhE.js → gateway-client-B7k1aPtN.js} +1 -1
  138. package/dist/client/assets/{general-Cr9Padc3.js → general-SLgXxiWG.js} +1 -1
  139. package/dist/client/assets/{home-BwWvnWRs.js → home-BXjMNpJt.js} +1 -1
  140. package/dist/client/assets/{icon-button-BFX4I_jl.js → icon-button-BtGepiRv.js} +1 -1
  141. package/dist/client/assets/{index-bKokiIqp.js → index-28FRJMVm.js} +1 -1
  142. package/dist/client/assets/{index-79vkmu48.js → index-BAHgkIWO.js} +1 -1
  143. package/dist/client/assets/{index-CWKfJw5W.js → index-BAvTkmSJ.js} +1 -1
  144. package/dist/client/assets/{index-BvfbkU67.js → index-BPWDQ8uX.js} +3 -3
  145. package/dist/client/assets/{index-CGSyOEav.js → index-BYXxtuFB.js} +1 -1
  146. package/dist/client/assets/{index-CKq354Gz.js → index-BpzAOSAb.js} +1 -1
  147. package/dist/client/assets/{index-BnXZbm1V.js → index-C81ZL6R_.js} +1 -1
  148. package/dist/client/assets/{index-BxwPpzfc.js → index-CI6hIGIA.js} +4 -4
  149. package/dist/client/assets/{index-BawH6u0S.js → index-CQT10nBy.js} +1 -1
  150. package/dist/client/assets/{index-LZ2q4_jb.js → index-DEC2uvJx.js} +1 -1
  151. package/dist/client/assets/{index-BREpCEqw.js → index-Dt7LNk-3.js} +1 -1
  152. package/dist/client/assets/{index-BY5wxYf5.js → index-DuMe_2m0.js} +1 -1
  153. package/dist/client/assets/{index-C_0dOsSh.js → index-HSYT9siq.js} +1 -1
  154. package/dist/client/assets/{index-CWxpNcea.js → index-JwMeLKwB.js} +1 -1
  155. package/dist/client/assets/{index-C1Z09kwU.js → index-Wt9IchZK.js} +1 -1
  156. package/dist/client/assets/{index-redirect-BwQqe2rU.js → index-redirect-sYc19Nlx.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-BTaa8yCU.js → infiniteQueryObserver-FUg5fy_W.js} +1 -1
  158. package/dist/client/assets/{infra-billing-CNEfX-kf.js → infra-billing-DdjqyfyI.js} +1 -1
  159. package/dist/client/assets/{input-NQyNf1V0.js → input-BPUmEXNp.js} +1 -1
  160. package/dist/client/assets/{input-nBm7K2le.js → input-BY69mPBP.js} +1 -1
  161. package/dist/client/assets/{input-BBXpSU6d.js → input-CseBaqJf.js} +3 -3
  162. package/dist/client/assets/{integration-icon-Bp8juFay.js → integration-icon-V47RVePh.js} +1 -1
  163. package/dist/client/assets/{label-DMupX0MC.js → label-CLzkySlK.js} +1 -1
  164. package/dist/client/assets/{last-preview-page-CW4w9X44.js → last-preview-page-DqlEORIJ.js} +1 -1
  165. package/dist/client/assets/{layout-3HrKrvcZ.js → layout-6XB9IVwz.js} +1 -1
  166. package/dist/client/assets/{legacy-agents-deep-DXziKfMc.js → legacy-agents-deep-BGDuqop8.js} +1 -1
  167. package/dist/client/assets/{legacy-main-redirect-Dj-C6gBV.js → legacy-main-redirect-BUpl58HG.js} +1 -1
  168. package/dist/client/assets/library-CUIMtERQ.js +1 -0
  169. package/dist/client/assets/{library-tab-VyiT_ivs.js → library-tab-DkFZgxLh.js} +1 -1
  170. package/dist/client/assets/{login-BQj2QHBZ.js → login-G6tcTX3X.js} +1 -1
  171. package/dist/client/assets/{markdown-BfzNG-M7.js → markdown-Rj_xOQFL.js} +1 -1
  172. package/dist/client/assets/{mcp-app-renderer-BlvZoL7J.js → mcp-app-renderer-fVhyOVUI.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-DUBYed0Q.js → mcp-oauth-BWflJAPV.js} +1 -1
  174. package/dist/client/assets/{members-CQ5MUNDU.js → members-BPU0htoL.js} +1 -1
  175. package/dist/client/assets/{message-templates-DDGZ91yT.js → message-templates-BHBf3G_U.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-CITETdCk.js → mini-report-page-gNValB54.js} +1 -1
  177. package/dist/client/assets/{mock-board-Bvvn1Unj.js → mock-board-TaCAwrcs.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-RbYzn9g4.js → monaco-editor-D5eHexZx.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-cHn_kslF.js → monitoring-stats-row-X4kPXrGM.js} +1 -1
  180. package/dist/client/assets/{multi-select-6Y9s_75i.js → multi-select-BUSABjZ5.js} +1 -1
  181. package/dist/client/assets/{mustache-D909vgLx.js → mustache-DQqHKuWh.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-dnrpTCul.js → new-project-dialog-CQBRyWoN.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-TljmZb0H.js → oauth-callback-CVaMb3Mu.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-vM715HU3.js → oauth-callback-ai-provider-DP_69OOP.js} +1 -1
  185. package/dist/client/assets/{onboarding-suADGN1V.js → onboarding-DiMS8OUg.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-ChbweCK7.js → openai-conversation-DTKIflJ4.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-CGJt_ui_.js → optimistic-project-sidebar-views-sJodT885.js} +1 -1
  188. package/dist/client/assets/{org-file-open-context-yUuJsknK.js → org-file-open-context-BHx39gNs.js} +1 -1
  189. package/dist/client/assets/{organization-choice-CKK-FBaz.js → organization-choice-CL_1W1nU.js} +1 -1
  190. package/dist/client/assets/{orgs-CQA3dd0_.js → orgs-B512xIbh.js} +1 -1
  191. package/dist/client/assets/{page-seo-form-CteqMz9Y.js → page-seo-form-CM5gaHSA.js} +1 -1
  192. package/dist/client/assets/{pair-BJWYd3Ae.js → pair-I7ZdjJQJ.js} +1 -1
  193. package/dist/client/assets/{plan-ladder-DXQDkWeB.js → plan-ladder-Ch7KEEo3.js} +1 -1
  194. package/dist/client/assets/{popover-BALocaPm.js → popover-BNirAjZj.js} +1 -1
  195. package/dist/client/assets/{post-calendar-iaP-Undm.js → post-calendar-boCN66ng.js} +1 -1
  196. package/dist/client/assets/{post-editor-D94NY3gF.js → post-editor-breC0cUQ.js} +1 -1
  197. package/dist/client/assets/{preview-content-DE4AvV3Q.js → preview-content-D0teDbtp.js} +1 -1
  198. package/dist/client/assets/{preview-dialog-vo9ewLq0.js → preview-dialog-DRX1sn55.js} +1 -1
  199. package/dist/client/assets/{profile-CyF0DFf9.js → profile-Ctv0Atjs.js} +1 -1
  200. package/dist/client/assets/{project-app-view-Cn14MWtC.js → project-app-view-DhO5Z3hO.js} +1 -1
  201. package/dist/client/assets/{project-feed-Bziqygll.js → project-feed-CJ2uIzf3.js} +1 -1
  202. package/dist/client/assets/{project-icon-5V7fnedA.js → project-icon-BM80bvAf.js} +1 -1
  203. package/dist/client/assets/project-profile-Cc4MG3QN.js +1 -0
  204. package/dist/client/assets/project-reports-DhYBnXia.js +1 -0
  205. package/dist/client/assets/project-tasks-CJgKEsD7.js +1 -0
  206. package/dist/client/assets/{projects-DpobvjHj.js → projects-DSUWX4n-.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-DZQPXc3C.js → projects-empty-state-CZU4CzCm.js} +1 -1
  208. package/dist/client/assets/{prompts-C4qnzJoL.js → prompts-k3b-b1Nv.js} +1 -1
  209. package/dist/client/assets/record-editor-Cr4rpSiW.js +1 -0
  210. package/dist/client/assets/{redirect-editor-BZeBf9L5.js → redirect-editor-DjzZSjpe.js} +1 -1
  211. package/dist/client/assets/{reports-BFuqIlD9.js → reports-CYd0CCjs.js} +1 -1
  212. package/dist/client/assets/reports-D2DaofAJ.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-cyytqhjL.js → reports-onboarding-D2NqZwm1.js} +1 -1
  214. package/dist/client/assets/{reports-tab-U8P8Ufm3.js → reports-tab-DbUBvY2W.js} +2 -2
  215. package/dist/client/assets/{repositories-BIp8Q69k.js → repositories-D4naFVV6.js} +1 -1
  216. package/dist/client/assets/{repository-binding-BpUKRc_C.js → repository-binding-pgWT9JQt.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-HM6WgTNW.js → repository-import-picker-BXN3XYPf.js} +1 -1
  218. package/dist/client/assets/{repository-picker-B0I3Du2Y.js → repository-picker-BokIG_Wg.js} +1 -1
  219. package/dist/client/assets/{require-capability-qrb_Y3VU.js → require-capability-C1vJnLco.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-Vrx1VADX.js → required-auth-layout-DkWWMqKf.js} +1 -1
  221. package/dist/client/assets/{reset-password-B3kJ0l7d.js → reset-password-DEmIdSGB.js} +1 -1
  222. package/dist/client/assets/{resizable-C6oGLb2k.js → resizable-DyWugGZr.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-C65j0_Xh.js → resolve-tab-icon-DKiPc5yx.js} +1 -1
  224. package/dist/client/assets/{review-settings-cXd8a-kI.js → review-settings-CVDB8Ztf.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-B16tsLBG.js → rich-text-link-control-CvjpRX4h.js} +1 -1
  226. package/dist/client/assets/{roles-ImxyPKbP.js → roles-DLhbIod4.js} +1 -1
  227. package/dist/client/assets/route-CIG47snA.js +1 -0
  228. package/dist/client/assets/route-DbboURah.js +1 -0
  229. package/dist/client/assets/{route-5uAGSY9o.js → route-bx69BiHn.js} +1 -1
  230. package/dist/client/assets/{runnable-block-editor-BYrU5Yi-.js → runnable-block-editor-B746OKj4.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-CX1voOln.js → sandbox-lifecycle-context-B0cXggik.js} +1 -1
  232. package/dist/client/assets/{schema-DpbNyGSF.js → schema-B6zLCfxk.js} +1 -1
  233. package/dist/client/assets/{scroll-area-NvsVU-Kn.js → scroll-area-vhYWSZS_.js} +1 -1
  234. package/dist/client/assets/{search-input-DlZNe3FK.js → search-input-Cz70D4uP.js} +1 -1
  235. package/dist/client/assets/{search-toggle-DlqQyo1N.js → search-toggle-hz2RCAG4.js} +1 -1
  236. package/dist/client/assets/{secret-picker-rsuRzV5y.js → secret-picker-Qx1YBLYl.js} +1 -1
  237. package/dist/client/assets/{secrets-BaPHDsCi.js → secrets-CgGiawbq.js} +1 -1
  238. package/dist/client/assets/{sections-editor-DIwbi9HD.js → sections-editor-k5I4I6WW.js} +1 -1
  239. package/dist/client/assets/{select-H-CMPEfp.js → select-C5hBYFxr.js} +1 -1
  240. package/dist/client/assets/{select-model-D7T_1xkH.js → select-model-iyQsk6xN.js} +1 -1
  241. package/dist/client/assets/{seo-editor-C76zkhdR.js → seo-editor-Dlmy5rfq.js} +1 -1
  242. package/dist/client/assets/{separator-BhnG3Zam.js → separator-Bn8NP-Ti.js} +1 -1
  243. package/dist/client/assets/{settings-tab-DY1XWIgQ.js → settings-tab-De0wTNAA.js} +1 -1
  244. package/dist/client/assets/{sheet-0Y4Ip4h-.js → sheet-CsqjmRbr.js} +1 -1
  245. package/dist/client/assets/{shell-layout-EY5Uf4Cb.js → shell-layout-xaQEHEW8.js} +1 -1
  246. package/dist/client/assets/{skills-CkFU7kfv.js → skills-xivDOlkh.js} +1 -1
  247. package/dist/client/assets/{sso-BaXLM5kr.js → sso-D867QbJo.js} +1 -1
  248. package/dist/client/assets/{suggestion-3pWjGFX4.js → suggestion-DJecFSH7.js} +1 -1
  249. package/dist/client/assets/{switch-cah4KvTn.js → switch-Uc67n4kS.js} +1 -1
  250. package/dist/client/assets/{synced-repos-CsD0zRNl.js → synced-repos-DrXM7J-L.js} +1 -1
  251. package/dist/client/assets/{tab-icon-glyph-2AEFbZQS.js → tab-icon-glyph-lCxMfboK.js} +1 -1
  252. package/dist/client/assets/{table-zx0VDWe3.js → table-DZqVTmY1.js} +1 -1
  253. package/dist/client/assets/{tabs-Cov1OGsb.js → tabs-BAFx2n2t.js} +1 -1
  254. package/dist/client/assets/{task-board-DxDhloMI.js → task-board-C5AHberH.js} +1 -1
  255. package/dist/client/assets/{task-route-DhhrTB8S.js → task-route-igVwGaXB.js} +1 -1
  256. package/dist/client/assets/{task-status-Ci8XY2sr.js → task-status-C09--tem.js} +1 -1
  257. package/dist/client/assets/{taskboard-analytics-2Uax0_4t.js → taskboard-analytics-D-2zwH2U.js} +1 -1
  258. package/dist/client/assets/{tasks-3x9jGwMl.js → tasks-BEOa6jXG.js} +1 -1
  259. package/dist/client/assets/tasks-DAlSyzuz.js +1 -0
  260. package/dist/client/assets/{textarea-BoayKLnG.js → textarea-B0ZN3met.js} +1 -1
  261. package/dist/client/assets/{thread-analytics-D_Db_c5X.js → thread-analytics-D84978R-.js} +1 -1
  262. package/dist/client/assets/{thread-intent-xuarXzDX.js → thread-intent-QRABLhkd.js} +1 -1
  263. package/dist/client/assets/{thread-route-BRmoi6cr.js → thread-route-D78YOQER.js} +1 -1
  264. package/dist/client/assets/{thread-route-BKSG8n_B.js → thread-route-DOFX1IjX.js} +1 -1
  265. package/dist/client/assets/{thread-sheet-body-C04R8Nc9.js → thread-sheet-body-DdOxYBDm.js} +1 -1
  266. package/dist/client/assets/{toggle-group-BWSm-Aff.js → toggle-group-CvPMjNEK.js} +1 -1
  267. package/dist/client/assets/{toolbar-icon-button-3wN5okP4.js → toolbar-icon-button-78z1_ZIz.js} +1 -1
  268. package/dist/client/assets/{tooltip-CaxLgEiD.js → tooltip-BqEsx0cb.js} +1 -1
  269. package/dist/client/assets/{track-BOEwfPTQ.js → track-DTqgWbjN.js} +1 -1
  270. package/dist/client/assets/{types-DwqswVGG.js → types-DOMrK_LV.js} +1 -1
  271. package/dist/client/assets/{usage-stats-D2C_YJGd.js → usage-stats-CQ9L8CQl.js} +1 -1
  272. package/dist/client/assets/{use-ai-providers-DhvGPgkO.js → use-ai-providers-ClKTI8i8.js} +1 -1
  273. package/dist/client/assets/{use-automations-DNdjj0K7.js → use-automations-FcutSpTr.js} +1 -1
  274. package/dist/client/assets/{use-autosave-DRiTDo3a.js → use-autosave-EtYUyRj3.js} +1 -1
  275. package/dist/client/assets/{use-chat-layout-state-CWK-9l4_.js → use-chat-layout-state-Bs3lE30X.js} +1 -1
  276. package/dist/client/assets/{use-connect-companion-C7lHLg5T.js → use-connect-companion-D8ZIRp-0.js} +1 -1
  277. package/dist/client/assets/{use-connection-DzY6Wffn.js → use-connection-D0VnDJ5O.js} +1 -1
  278. package/dist/client/assets/{use-copy-CUDMsdQy.js → use-copy-CGQOIURi.js} +1 -1
  279. package/dist/client/assets/{use-create-virtual-mcp-Diy3bwh3.js → use-create-virtual-mcp-DCq6efeG.js} +1 -1
  280. package/dist/client/assets/{use-date-fns-locale-BoWRbrIL.js → use-date-fns-locale-VuE570L_.js} +1 -1
  281. package/dist/client/assets/{use-debounced-autosave-C2NnQuRI.js → use-debounced-autosave-_qK4yyfx.js} +1 -1
  282. package/dist/client/assets/{use-debounced-value-D5IO3_vn.js → use-debounced-value-EUGCLHCv.js} +1 -1
  283. package/dist/client/assets/{use-deco-credits-3gVTPFwf.js → use-deco-credits-BJF67lY9.js} +1 -1
  284. package/dist/client/assets/{use-decopilot-events-B5BcpNUU.js → use-decopilot-events-luMnwI0t.js} +1 -1
  285. package/dist/client/assets/{use-delete-connection-DIxRBe8c.js → use-delete-connection-D46O0Ff7.js} +1 -1
  286. package/dist/client/assets/{use-deployment-admin-B7yzmrHQ.js → use-deployment-admin-il5Awe_V.js} +1 -1
  287. package/dist/client/assets/{use-fast-preview-draft-url-Bx7iga5n.js → use-fast-preview-draft-url-IHunVu2N.js} +1 -1
  288. package/dist/client/assets/{use-file-configs-SfDJl4-5.js → use-file-configs-BL6_hFrQ.js} +1 -1
  289. package/dist/client/assets/{use-infinite-scroll-CmfDRbkB.js → use-infinite-scroll-BGe2OKwS.js} +1 -1
  290. package/dist/client/assets/{use-join-requests-BfcSGbKn.js → use-join-requests-C5jHbo24.js} +1 -1
  291. package/dist/client/assets/{use-main-panel-tabs-CH-ZgEHC.js → use-main-panel-tabs-JZ4nW0UR.js} +1 -1
  292. package/dist/client/assets/{use-mcp-auth-status-BwTk8ov8.js → use-mcp-auth-status-yJ6mDiO5.js} +1 -1
  293. package/dist/client/assets/{use-mcp-client-D2Vi6MSe.js → use-mcp-client-BD2qvyw9.js} +1 -1
  294. package/dist/client/assets/{use-mcp-prompts-Dsk8zc6x.js → use-mcp-prompts-DSTogSz2.js} +1 -1
  295. package/dist/client/assets/{use-mcp-tools-t8ImMobR.js → use-mcp-tools-DBjCHixa.js} +1 -1
  296. package/dist/client/assets/{use-members-HxuYvZQQ.js → use-members-D-YyWAF9.js} +1 -1
  297. package/dist/client/assets/{use-mobile-Z8zmt-sr.js → use-mobile-DhEHiUUd.js} +1 -1
  298. package/dist/client/assets/{use-navigate-to-agent-u-7ZqLSa.js → use-navigate-to-agent-BnON953z.js} +1 -1
  299. package/dist/client/assets/use-new-blocks-editor-BcFZ7Cv_.js +1 -0
  300. package/dist/client/assets/{use-open-billing-url-DYBLUZF6.js → use-open-billing-url-BcXcVI8P.js} +1 -1
  301. package/dist/client/assets/{use-org-auth-client-BcEY5fn7.js → use-org-auth-client-F94GyLp-.js} +1 -1
  302. package/dist/client/assets/{use-org-fs-CRET0y9_.js → use-org-fs-ylJPheRD.js} +1 -1
  303. package/dist/client/assets/{use-org-repo-syncs-DBweStUK.js → use-org-repo-syncs-EHCPOTHU.js} +1 -1
  304. package/dist/client/assets/{use-org-sso-B400YEW3.js → use-org-sso-CbWZzH-Z.js} +1 -1
  305. package/dist/client/assets/{use-organization-roles-CkbMvTBg.js → use-organization-roles-DWcWvsMX.js} +1 -1
  306. package/dist/client/assets/{use-organization-settings-CTmRGpkm.js → use-organization-settings-D7duaXpT.js} +1 -1
  307. package/dist/client/assets/{use-panel-navigate-Be-d6xJA.js → use-panel-navigate-BVLfzU2L.js} +1 -1
  308. package/dist/client/assets/{use-project-scope-4MlwSqdG.js → use-project-scope-H69d9lZ_.js} +1 -1
  309. package/dist/client/assets/{use-releases-Di9mNGFg.js → use-releases-BP61d5-3.js} +1 -1
  310. package/dist/client/assets/{use-reports-diagnostic-CAyYm5Yn.js → use-reports-diagnostic-BknztwaR.js} +1 -1
  311. package/dist/client/assets/{use-secrets-OHStlmE1.js → use-secrets-Bx-yeKu3.js} +1 -1
  312. package/dist/client/assets/{use-section-preview-base-BS-fSaiL.js → use-section-preview-base--vAB2y7o.js} +1 -1
  313. package/dist/client/assets/{use-session-runtime-CQM0Tgz5.js → use-session-runtime-3SWP3dGF.js} +1 -1
  314. package/dist/client/assets/{use-tags-k-j1MKu7.js → use-tags-dk8qN5W0.js} +1 -1
  315. package/dist/client/assets/{use-task-board-analytics-Ct8VWGGM.js → use-task-board-analytics-30DUURVi.js} +1 -1
  316. package/dist/client/assets/{use-task-board-events-BSyBXJLh.js → use-task-board-events-Bw7w2frY.js} +1 -1
  317. package/dist/client/assets/{use-task-metadata-uO8X_9rP.js → use-task-metadata-CbpUuwQE.js} +1 -1
  318. package/dist/client/assets/{use-thread-analytics-l3xCKBoV.js → use-thread-analytics-B-Qlohyp.js} +1 -1
  319. package/dist/client/assets/{use-thread-outputs-D_xjObSL.js → use-thread-outputs-gMKfRb18.js} +1 -1
  320. package/dist/client/assets/useInfiniteQuery-DEHsT2mb.js +1 -0
  321. package/dist/client/assets/{useQueries-CKfCqicH.js → useQueries-igOhy4mA.js} +1 -1
  322. package/dist/client/assets/useSuspenseInfiniteQuery-BLqh5_54.js +1 -0
  323. package/dist/client/assets/{users-D9QZPizB.js → users-B5sT40lB.js} +1 -1
  324. package/dist/client/assets/{utils-CUJUfA75.js → utils-Dk1XJLXX.js} +1 -1
  325. package/dist/client/assets/{variant-calendar-X84oV1kq.js → variant-calendar-Co3Nureq.js} +1 -1
  326. package/dist/client/assets/{variant-matcher-override-DK87sHdK.js → variant-matcher-override-D1HvQxCu.js} +1 -1
  327. package/dist/client/assets/{view-mode-toggle-vq_eeWBG.js → view-mode-toggle-D8_txm5Y.js} +1 -1
  328. package/dist/client/assets/{virtual-mcp-NnbBE1iC.js → virtual-mcp-C9Cv6Cjj.js} +1 -1
  329. package/dist/client/index.html +1 -1
  330. package/dist/server/cli.js +1 -1
  331. package/dist/server/server.js +1 -1
  332. package/package.json +1 -1
  333. package/dist/client/assets/agent-app-8h5XBfaC.js +0 -1
  334. package/dist/client/assets/agent-deck-dChqa9X6.js +0 -1
  335. package/dist/client/assets/agent-library-file-D9zr8DYd.js +0 -1
  336. package/dist/client/assets/agent-library-jPShAvbu.js +0 -1
  337. package/dist/client/assets/agent-settings-BBx7XbXO.js +0 -1
  338. package/dist/client/assets/agent-site-editor-code-DZYw8Wih.js +0 -2
  339. package/dist/client/assets/agent-view-Co7QqWAu.js +0 -1
  340. package/dist/client/assets/api-keys-fw19DZeC.js +0 -1
  341. package/dist/client/assets/flat-project-BuqKj-tF.js +0 -1
  342. package/dist/client/assets/library-Blfnwq13.js +0 -1
  343. package/dist/client/assets/project-profile-Df4wpr_R.js +0 -1
  344. package/dist/client/assets/project-reports-BoCTh-2L.js +0 -1
  345. package/dist/client/assets/project-tasks-ChcXdzdR.js +0 -1
  346. package/dist/client/assets/record-editor-BiogRhDE.js +0 -1
  347. package/dist/client/assets/reports-djwYXGfq.js +0 -1
  348. package/dist/client/assets/route-C7FL9yik.js +0 -1
  349. package/dist/client/assets/route-alZLJp72.js +0 -1
  350. package/dist/client/assets/tasks-CuWlgQNm.js +0 -1
  351. package/dist/client/assets/use-new-blocks-editor-DEKKTguS.js +0 -1
  352. package/dist/client/assets/useInfiniteQuery-DFC-JWIp.js +0 -1
  353. package/dist/client/assets/useSuspenseInfiniteQuery-CxAP_wIY.js +0 -1
@@ -1 +1 @@
1
- import{a as m}from"./task-board-DxDhloMI.js";import{r as e}from"./index-BxwPpzfc.js";import{t as g}from"./thread-intent-xuarXzDX.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
1
+ import{a as m}from"./task-board-C5AHberH.js";import{r as e}from"./index-CI6hIGIA.js";import{t as g}from"./thread-intent-QRABLhkd.js";const p=()=>0;function v(E){const{orgSlug:r,enabled:t=!0,onUpdate:u,onDelete:c,onResync:o}=E,a=e.useRef(u);a.current=u;const f=e.useRef(c);f.current=c;const d=e.useRef(o);d.current=o;const s=e.useRef(null),R=e.useRef(t),i=e.useRef(r);(!s.current||R.current!==t||i.current!==r)&&(R.current=t,i.current=r,s.current=b=>{if(!t||!r)return()=>{};const S=l=>{let n;try{n=JSON.parse(l.data)}catch{return}n.data&&(l.type===m?f.current?.(n.data.id):a.current(n.data)),b()};return g.subscribe(r,S,()=>d.current?.())}),e.useSyncExternalStore(s.current,p,p)}export{v as u};
@@ -1 +1 @@
1
- import{X as o,a2 as c,r as i,D as d,K as m}from"./index-BxwPpzfc.js";import{a as T}from"./thread-intent-xuarXzDX.js";function h(e){const{org:n}=o(),r=c(),a=T(),s=i.useSyncExternalStore(a.threads.subscribe,a.threads.get),u=e===null?null:s.find(t=>t.id===e)??null,{data:l}=d({queryKey:m.ensureTask(n.id,e),queryFn:async()=>{if(e===null)return null;try{const{item:t}=await r.call("COLLECTION_THREADS_GET",{id:e});return t??null}catch{return null}},select:t=>t?.metadata??null,staleTime:3e4});return u?.metadata??l??null}export{h as u};
1
+ import{X as o,a2 as c,r as i,D as d,K as m}from"./index-CI6hIGIA.js";import{a as T}from"./thread-intent-QRABLhkd.js";function h(e){const{org:n}=o(),r=c(),a=T(),s=i.useSyncExternalStore(a.threads.subscribe,a.threads.get),u=e===null?null:s.find(t=>t.id===e)??null,{data:l}=d({queryKey:m.ensureTask(n.id,e),queryFn:async()=>{if(e===null)return null;try{const{item:t}=await r.call("COLLECTION_THREADS_GET",{id:e});return t??null}catch{return null}},select:t=>t?.metadata??null,staleTime:3e4});return u?.metadata??l??null}export{h as u};
@@ -1 +1 @@
1
- import{c as u,m as o,f as d,r as A,K as T,af as y,a7 as E}from"./index-BxwPpzfc.js";import{k as O}from"./thread-intent-xuarXzDX.js";function b(){return d({strict:!1}).org??""}function k(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function F(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function K(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{F as a,K as b,k as u};
1
+ import{c as u,m as o,f as d,r as A,K as T,af as y,a7 as E}from"./index-CI6hIGIA.js";import{k as O}from"./thread-intent-QRABLhkd.js";function b(){return d({strict:!1}).org??""}function k(){const t=u.c(8),r=b();let e;t[0]!==r?(e=T.threadAnalyticsOrgs(r),t[0]=r,t[1]=e):e=t[1];const s=!!r;let n;t[2]!==r?(n=()=>y(r,"THREAD_ANALYTICS_ORG_LIST",{}),t[2]=r,t[3]=n):n=t[3];let c;return t[4]!==e||t[5]!==s||t[6]!==n?(c={queryKey:e,enabled:s,queryFn:n,staleTime:3e5},t[4]=e,t[5]=s,t[6]=n,t[7]=c):c=t[7],o(c)}const m=3e3,f=new Map,h=new Map;function _(t){let r=h.get(t);return r||(r=e=>{let s=null;const n=()=>{s||(s=setTimeout(()=>{s=null,f.set(t,(f.get(t)??0)+1),e()},m))},c=O.subscribe(t,n,n);return()=>{s&&clearTimeout(s),c()}},h.set(t,r)),r}function q(t,r){const e=u.c(5);let s;e[0]!==r||e[1]!==t?(s=_(t),e[0]=r,e[1]=t,e[2]=s):s=e[2];let n;return e[3]!==t?(n=()=>f.get(t)??0,e[3]=t,e[4]=n):n=e[4],A.useSyncExternalStore(s,n)}function F(t,r){const e=u.c(11),s=b(),n=q(s,r);let c;e[0]!==t||e[1]!==s||e[2]!==n?(c=T.threadAnalytics(s,"live",t,n),e[0]=t,e[1]=s,e[2]=n,e[3]=c):c=e[3];const i=!!s;let a;e[4]!==t||e[5]!==s?(a=()=>y(s,"THREAD_ANALYTICS_LIVE",t),e[4]=t,e[5]=s,e[6]=a):a=e[6];let l;return e[7]!==c||e[8]!==i||e[9]!==a?(l={queryKey:c,enabled:i,queryFn:a,placeholderData:E},e[7]=c,e[8]=i,e[9]=a,e[10]=l):l=e[10],o(l)}function K(t,r){const e=u.c(12),s=b();let n;e[0]!==r||e[1]!==s||e[2]!==t?(n=T.threadAnalytics(s,t,r,0),e[0]=r,e[1]=s,e[2]=t,e[3]=n):n=e[3];const c=!!s;let i;e[4]!==r||e[5]!==s||e[6]!==t?(i=()=>y(s,t,r),e[4]=r,e[5]=s,e[6]=t,e[7]=i):i=e[7];let a;return e[8]!==n||e[9]!==c||e[10]!==i?(a={queryKey:n,enabled:c,queryFn:i},e[8]=n,e[9]=c,e[10]=i,e[11]=a):a=e[11],o(a)}export{F as a,K as b,k as u};
@@ -1 +1 @@
1
- import{c,X as i,m as l,K as p}from"./index-BxwPpzfc.js";import{f}from"./chat-context-DOzhwdpr.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
1
+ import{c,X as i,m as l,K as p}from"./index-CI6hIGIA.js";import{f}from"./chat-context-OYYFpgoc.js";async function m(e,s){const t=await fetch(`/api/${s}/threads/${encodeURIComponent(e)}/outputs`,{credentials:"include"});if(!t.ok)throw new Error(`Failed to fetch thread outputs: ${t.status}`);return(await t.json()).objects??[]}function $(){const e=c.c(2),s=f()?.messages??[];let t;return e[0]!==s?(t=s.some(y),e[0]=s,e[1]=t):t=e[1],t}function y(e){return e.parts?.some(b)}function b(e){const s=e;return(s.type==="tool-bash"||s.type==="tool-write")&&s.state==="output-available"}function g(e,s){const t=c.c(9),{org:u}=i();let o;t[0]!==e?(o=p.threadOutputs(e??""),t[0]=e,t[1]=o):o=t[1];let n;t[2]!==u||t[3]!==e?(n=()=>m(e??"",u.slug),t[2]=u,t[3]=e,t[4]=n):n=t[4];const r=!!e&&(s?.enabled??!0);let a;return t[5]!==o||t[6]!==n||t[7]!==r?(a={queryKey:o,queryFn:n,enabled:r,staleTime:0},t[5]=o,t[6]=n,t[7]=r,t[8]=a):a=t[8],l(a)}export{g as a,$ as u};
@@ -0,0 +1 @@
1
+ import{I as u}from"./infiniteQueryObserver-FUg5fy_W.js";import{de as i}from"./index-CI6hIGIA.js";function t(e,r){return i(e,u,r)}export{t as u};
@@ -1 +1 @@
1
- import{dp as Q,dq as y,dr as w,ds as S,df as C,o as k,dt as x,du as q,r as p,dv as M,dw as H,dx as B,dy as L,dz as O,dA as P,dB as A}from"./index-BxwPpzfc.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function z(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!w(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=S(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new C(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=z(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function U({queries:r,...s},e){const t=k(e),i=x(),n=q(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),B(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):L,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return P(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
1
+ import{dp as Q,dq as y,dr as w,ds as S,df as C,o as k,dt as x,du as q,r as p,dv as M,dw as H,dx as B,dy as L,dz as O,dA as P,dB as A}from"./index-CI6hIGIA.js";function R(r,s){const e=new Set(s);return r.filter(t=>!e.has(t))}function z(r,s,e){const t=r.slice(0);return t[s]=e,t}var T=class extends Q{#i;#s;#n;#r;#e;#t;#o;#u;#h;#a=[];constructor(r,s,e){super(),this.#i=r,this.#r=e,this.#n=[],this.#e=[],this.#s=[],this.setQueries(s)}onSubscribe(){this.listeners.size===1&&this.#e.forEach(r=>{r.subscribe(s=>{this.#f(r,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#e.forEach(r=>{r.destroy()})}setQueries(r,s){this.#n=r,this.#r=s,y.batch(()=>{const e=this.#e,t=this.#d(this.#n);t.forEach(o=>o.observer.setOptions(o.defaultedQueryOptions));const i=t.map(o=>o.observer),n=i.map(o=>o.getCurrentResult()),u=e.length!==i.length,c=i.some((o,f)=>o!==e[f]),d=u||c,b=d?!0:n.some((o,f)=>{const g=this.#s[f];return!g||!w(o,g)});!d&&!b||(d&&(this.#a=t,this.#e=i),this.#s=n,this.hasListeners()&&(d&&(R(e,i).forEach(o=>{o.destroy()}),R(i,e).forEach(o=>{o.subscribe(f=>{this.#f(o,f)})})),this.#p()))})}getCurrentResult(){return this.#s}getQueries(){return this.#e.map(r=>r.getCurrentQuery())}getObservers(){return this.#e}getOptimisticResult(r,s){const e=this.#d(r),t=e.map(n=>n.observer.getOptimisticResult(n.defaultedQueryOptions)),i=e.map(n=>n.defaultedQueryOptions.queryHash);return[t,n=>this.#l(n??t,s,i),()=>this.#c(t,e)]}#c(r,s){return s.map((e,t)=>{const i=r[t];return e.defaultedQueryOptions.notifyOnChangeProps?i:e.observer.trackResult(i,n=>{s.forEach(u=>{u.observer.trackProp(n)})})})}#l(r,s,e){if(s){const t=this.#h,i=e!==void 0&&t!==void 0&&(t.length!==e.length||e.some((n,u)=>n!==t[u]));return(!this.#t||this.#s!==this.#u||i||s!==this.#o)&&(this.#o=s,this.#u=this.#s,e!==void 0&&(this.#h=e),this.#t=S(this.#t,s(r))),this.#t}return r}#b(){return this.#r?.combine!==void 0&&this.#e.some((r,s)=>r.options.suspense&&this.#s[s]?.data===void 0)}#d(r){const s=new Map;this.#e.forEach(t=>{const i=t.options.queryHash;if(!i)return;const n=s.get(i);n?n.push(t):s.set(i,[t])});const e=[];return r.forEach(t=>{const i=this.#i.defaultQueryOptions(t),u=s.get(i.queryHash)?.shift()??new C(this.#i,i);e.push({defaultedQueryOptions:i,observer:u})}),e}#f(r,s){const e=this.#e.indexOf(r);e!==-1&&(this.#s=z(this.#s,e,s),this.#p())}#p(){if(this.hasListeners()){const r=this.#c(this.#s,this.#a),s=this.#b(),e=this.#t,t=s?e:this.#l(r,this.#r?.combine);(s||e!==t)&&y.batch(()=>{this.listeners.forEach(i=>{i(this.#s)})})}}};function U({queries:r,...s},e){const t=k(e),i=x(),n=q(),u=p.useMemo(()=>r.map(h=>{const a=t.defaultQueryOptions(h);return a._optimisticResults=i?"isRestoring":"optimistic",a}),[r,t,i]);u.forEach(h=>{M(h);const a=t.getQueryCache().get(h.queryHash);H(h,n,a)}),B(n);const[c]=p.useState(()=>new T(t,u,s)),[d,b,o]=c.getOptimisticResult(u,s.combine),f=!i&&s.subscribed!==!1;p.useSyncExternalStore(p.useCallback(h=>f?c.subscribe(y.batchCalls(h)):L,[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setQueries(u,s)},[u,s,c]);const m=d.some((h,a)=>O(u[a],h))?d.flatMap((h,a)=>{const l=u[a];if(l&&O(l,h)){const E=new C(t,l);return P(l,E,n)}return[]}):[];if(m.length>0)throw Promise.all(m);const v=d.find((h,a)=>{const l=u[a];return l&&A({result:h,errorResetBoundary:n,throwOnError:l.throwOnError,query:t.getQueryCache().get(l.queryHash),suspense:l.suspense})});if(v?.error)throw v.error;return b(o())}export{U as u};
@@ -0,0 +1 @@
1
+ import{I as n}from"./infiniteQueryObserver-FUg5fy_W.js";import{de as s,dn as u}from"./index-CI6hIGIA.js";function a(e,r){return s({...e,enabled:!0,suspense:!0,throwOnError:u},n,r)}export{a as u};
@@ -1 +1 @@
1
- import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-BxwPpzfc.js";import{C as G}from"./collection-table-wrapper-HyyiPb68.js";import{E as L}from"./empty-state-Cl3s1v-7.js";import{S as H}from"./search-input-DlZNe3FK.js";import{A as X}from"./avatar-D-gkFe6T.js";import{B as D}from"./badge-BcHbmh2L.js";import{u as Z}from"./use-debounced-value-D5IO3_vn.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-zx0VDWe3.js";import"./ArrowUp-CBRbx5X7.js";import"./SearchMd-C7F8eH-A.js";import"./User01-DWDiZkwz.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
1
+ import{c as V,b as q,r as z,a as O,m as Y,e as $,j as t,n as I,K as J,t as Q,B as W}from"./index-CI6hIGIA.js";import{C as G}from"./collection-table-wrapper-C-w75p9V.js";import{E as L}from"./empty-state-8X9eCFno.js";import{S as H}from"./search-input-Cz70D4uP.js";import{A as X}from"./avatar-CmaKR_B3.js";import{B as D}from"./badge-DESzQP2_.js";import{u as Z}from"./use-debounced-value-EUGCLHCv.js";import{a as K}from"./admin-fetch-CCSvjTk1.js";import{f as ee}from"./format-time-CjIPQhCN.js";import{g as se}from"./get-initials-D-f_fDFw.js";import"./table-DZqVTmY1.js";import"./ArrowUp-DIA2qOVk.js";import"./SearchMd-DG2nOAQH.js";import"./User01-C0UZWUsa.js";import"./differenceInSeconds-C3x8sHUj.js";function ve(){const e=V.c(58),s=q(),[r,M]=z.useState("");let N;e[0]!==r?(N=r.trim(),e[0]=r,e[1]=N):N=e[1];const a=Z(N,300),{data:R}=O.useSession(),k=R?.user?.id;let n;e[2]!==a?(n=J.deploymentAdminUsers(a),e[2]=a,e[3]=n):n=e[3];let l;e[4]!==a?(l=()=>{const i=new URLSearchParams({limit:"100"});return a&&i.set("searchValue",a),K(`/api/_admin/users?${i}`)},e[4]=a,e[5]=l):l=e[5];let C;e[6]!==n||e[7]!==l?(C={queryKey:n,queryFn:l},e[6]=n,e[7]=l,e[8]=C):C=e[8];const{data:P,isLoading:_,isError:A}=Y(C);let w;e[9]===Symbol.for("react.memo_cache_sentinel")?(w=ie,e[9]=w):w=e[9];let y;e[10]!==s?(y={mutationFn:ae,onSuccess:w,onError:i=>{Q.error(i instanceof Error?i.message:s("admin.users.failedToImpersonate"))}},e[10]=s,e[11]=y):y=e[11];const E=$(y);let b;e[12]!==P?.users?(b=P?.users??[],e[12]=P?.users,e[13]=b):b=e[13];const B=b;let o;e[14]!==s?(o=s("admin.users.columnUser"),e[14]=s,e[15]=o):o=e[15];let m;e[16]!==s?(m=i=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(X,{url:i.image??void 0,fallback:se(i.name),shape:"circle",size:"sm"}),t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground truncate",children:i.name||s("admin.users.unknown")}),t.jsx("div",{className:"text-sm text-muted-foreground truncate",children:i.email})]})]}),e[16]=s,e[17]=m):m=e[17];let d;e[18]!==o||e[19]!==m?(d={id:"user",header:o,render:m,cellClassName:"flex-1 min-w-0"},e[18]=o,e[19]=m,e[20]=d):d=e[20];let c;e[21]!==s?(c=s("admin.users.columnEmail"),e[21]=s,e[22]=c):c=e[22];let u;e[23]!==s?(u=i=>i.emailVerified?t.jsx(D,{variant:"outline",className:"text-success border-success/20",children:s("admin.users.verified")}):t.jsx(D,{variant:"outline",className:"text-muted-foreground",children:s("admin.users.unverified")}),e[23]=s,e[24]=u):u=e[24];let f;e[25]!==c||e[26]!==u?(f={id:"verified",header:c,render:u,cellClassName:"w-28 shrink-0"},e[25]=c,e[26]=u,e[27]=f):f=e[27];let p;e[28]!==s?(p=s("admin.users.columnCreated"),e[28]=s,e[29]=p):p=e[29];let h;e[30]!==p?(h={id:"created",header:p,render:te,cellClassName:"w-48 shrink-0"},e[30]=p,e[31]=h):h=e[31];let x;e[32]!==k||e[33]!==E||e[34]!==s?(x={id:"actions",header:"",render:i=>t.jsx(W,{variant:"outline",size:"sm",disabled:i.id===k||E.isPending,onClick:()=>E.mutate(i.id),children:s("admin.users.impersonate")}),cellClassName:"w-32 shrink-0"},e[32]=k,e[33]=E,e[34]=s,e[35]=x):x=e[35];let T;e[36]!==f||e[37]!==h||e[38]!==x||e[39]!==d?(T=[d,f,h,x],e[36]=f,e[37]=h,e[38]=x,e[39]=d,e[40]=T):T=e[40];const F=T;let j;e[41]!==s?(j=s("admin.users.searchPlaceholder"),e[41]=s,e[42]=j):j=e[42];let g;e[43]!==r||e[44]!==j?(g=t.jsx(H,{value:r,onChange:M,placeholder:j,className:"w-full md:w-[375px]"}),e[43]=r,e[44]=j,e[45]=g):g=e[45];let S;e[46]!==a||e[47]!==A||e[48]!==s?(S=A?t.jsx(L,{title:s("admin.users.failedToLoadTitle"),description:s("admin.users.failedToLoadDescription")}):t.jsx(L,{title:s("admin.users.noUsersFoundTitle"),description:a?s("admin.users.noUsersMatchSearch",{search:a}):s("admin.users.noUsersYet")}),e[46]=a,e[47]=A,e[48]=s,e[49]=S):S=e[49];let v;e[50]!==F||e[51]!==_||e[52]!==S||e[53]!==B?(v=t.jsx(G,{columns:F,data:B,isLoading:_,emptyState:S}),e[50]=F,e[51]=_,e[52]=S,e[53]=B,e[54]=v):v=e[54];let U;return e[55]!==g||e[56]!==v?(U=t.jsx(I,{children:t.jsx(I.Content,{children:t.jsx(I.Container,{children:t.jsxs("div",{className:"flex flex-col gap-6",children:[g,v]})})})}),e[55]=g,e[56]=v,e[57]=U):U=e[57],U}function te(e){return t.jsx("span",{className:"text-sm text-foreground",children:ee(e.createdAt)})}function ie(){window.location.href="/"}function ae(e){return K("/api/_admin/impersonate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{c as W,s as E,b as k}from"./ZoomOut-vsOlFjcF.js";import{a as j}from"./Image01-DS-Zo0Gm.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
1
+ import{c as W,s as E,b as k}from"./ZoomOut-CcTHMY1_.js";import{a as j}from"./Image01-2nm41sXd.js";function I(e){if(!e||e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;try{const t=decodeURIComponent(e);return!!(t.includes("\\")||t.includes("..")||t.includes("\0"))}catch{return!0}}function L(e){if(I(e))throw new Error(`Invalid block key: ${e||"(empty)"}`)}function C(e){try{return decodeURIComponent(e)}catch{return e}}function P(e){return L(e),encodeURIComponent(e)}function G(e){return`.deco/blocks/${P(e)}.json`}const v=1e4,F=3;function y(e){return e.trim()?(e.startsWith("/")?e:`/${e}`).replace(/\/+/g,"/"):"/"}function x(e){return e.startsWith("/")?e.slice(1):e}function z(e){const t=x(e);return!t||t.includes("..")||t.includes("\\")?!1:t.startsWith(".deco/blocks/")||!t.startsWith("/")&&!t.includes("://")}function h(e){return e.trim()?e.startsWith("/")?e:`/${e}`:"/"}function $(e){const t=h(e);if(t==="/")return"/";const n=t.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function D(e,t){const n=t.replace(/^\/+|\/+$/g,"");return h(n?`${e==="/"?"":e}/${n}`:e)}function _(e,t){return t==="directory"?e:$(e)}function M(e){const t=e.trim();return t?t.includes("/")||t.includes("\\")||t.includes("..")||t.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function B(e){const t=x(e);return t?t.split("/").filter(Boolean).length:0}function S(e,t,n,r=!1){return{files:[...new Set([...e,...n.files])],directories:[...new Set([...t,...n.directories??[]])],truncated:r||!!n.truncated}}function H(e,t){return B(e)>=F&&!t.has(e)}function q(e,t,n=[]){const r=x(e);if(t.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return t.some(o=>o.startsWith(s))||n.some(o=>o.startsWith(s))}function U(e){const t=x(e),n=".deco/blocks/";if(!t.startsWith(n)||!t.endsWith(".json"))return null;const r=t.slice(n.length,-5);return C(r)}function A(e){if(!e)return"plaintext";const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?"typescript":t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?"javascript":t.endsWith(".json")?"json":t.endsWith(".md")||t.endsWith(".mdx")?"markdown":t.endsWith(".css")?"css":t.endsWith(".scss")?"scss":t.endsWith(".html")?"html":t.endsWith(".yaml")||t.endsWith(".yml")?"yaml":t.endsWith(".xml")||t.endsWith(".svg")?"xml":t.endsWith(".py")?"python":t.endsWith(".sql")?"sql":t.endsWith(".sh")?"shell":"plaintext"}const T="#94a3b8";function X(e){const t=e.toLowerCase();return t.endsWith(".tsx")||t.endsWith(".ts")?{Icon:W,color:"#3b82f6"}:t.endsWith(".jsx")||t.endsWith(".js")||t.endsWith(".mjs")||t.endsWith(".cjs")?{Icon:W,color:"#d9a441"}:t.endsWith(".json")?{Icon:E,color:"#cb9b3f"}:t.endsWith(".css")||t.endsWith(".scss")?{Icon:W,color:"#06b6d4"}:t.endsWith(".html")||t.endsWith(".xml")?{Icon:W,color:"#f97316"}:/\.(png|jpe?g|gif|webp|avif|ico|svg)$/.test(t)?{Icon:j,color:"#a855f7"}:t.endsWith(".md")||t.endsWith(".mdx")?{Icon:k,color:"#64748b"}:{Icon:k,color:T}}function K(e){const t=y(e).split("/").filter(Boolean),n=["/"];let r="";for(const s of t.slice(0,-1))r+=`/${s}`,n.push(r);return n}function V(e,t=[]){const n={path:"/",children:[]},r=new Map,s=a=>{let i=r.get(a.path);return i||(i=new Map,r.set(a.path,i)),i},o=a=>{const c=y(a).split("/").filter(Boolean);let l=n,m="";for(const f of c){m+=`/${f}`;const g=s(l);let d=g.get(f);d?d.kind==="file"&&(d.kind="directory"):(d={name:f,path:m,kind:"directory",children:[]},l.children.push(d),g.set(f,d)),l=d}};for(const a of e){const c=y(a).split("/").filter(Boolean);let l=n,m="";c.forEach((f,g)=>{m+=`/${f}`;const d=g===c.length-1,b=s(l);let p=b.get(f);p||(p={name:f,path:m,kind:d?"file":"directory",children:[]},l.children.push(p),b.set(f,p)),l=p})}for(const a of t)o(h(a));const u=a=>{a.sort((i,c)=>i.kind!==c.kind?i.kind==="directory"?-1:1:i.name.localeCompare(c.name));for(const i of a)i.children.length>0&&u(i.children)};return u(n.children),n.children}function N(e,t,n=0){const r=[];for(const s of e)if(s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&t.has(s.path)))for(const o of N(s.children,t,n+1))r.push(o);return r}function J(e){const t=[];for(const n of e.split(`
2
2
  `)){if(!n)continue;const r=n.indexOf(":");if(r<0)continue;const s=n.indexOf(":",r+1);if(s<0)continue;const o=Number.parseInt(n.slice(r+1,s),10);Number.isFinite(o)&&t.push({path:h(n.slice(0,r)),line:o,text:n.slice(s+1)})}return t}function Q(e,t,n){const r=t.trim().toLowerCase();if(!r)return[];const s=[];for(const o of e)if((o.split("/").pop()??o).toLowerCase().includes(r)&&(s.push(h(o)),s.length>=n))break;return s}const w=24;function Y(e,t){const n=e.replace(/^\s+/,""),r=t.trim().toLowerCase();if(!r)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const s=n.toLowerCase().indexOf(r);if(s<0)return{leadingEllipsis:!1,segments:[{text:n,match:!1}]};const o=s>w,u=o?n.slice(s-w):n,a=u.toLowerCase(),i=[];let c=0;for(;;){const l=a.indexOf(r,c);if(l<0){c<u.length&&i.push({text:u.slice(c),match:!1});break}l>c&&i.push({text:u.slice(c,l),match:!1}),i.push({text:u.slice(l,l+r.length),match:!0}),c=l+r.length}return{leadingEllipsis:o,segments:i}}function Z(e){const t=[],n=new Map;for(const r of e){let s=n.get(r.path);s||(s={path:r.path,matches:[]},n.set(r.path,s),t.push(s)),s.matches.push(r)}return t}function tt(e){return e.split(`
3
3
  `).map(t=>t.replace(/^\d+\t/,"")).join(`
4
4
  `)}export{F as E,G as a,L as b,v as c,C as d,V as e,N as f,A as g,Z as h,z as i,_ as j,h as k,X as l,$ as m,K as n,Y as o,H as p,D as q,q as r,tt as s,x as t,Q as u,M as v,J as w,U as x,S as y};
@@ -1 +1 @@
1
- import{c as Y,b as J,r as Q,j as n,l as rt,B as tt,ak as ut}from"./index-BxwPpzfc.js";import{x as ht,Z as at,B as xt}from"./agent-icon-YnSCc57p.js";import{L as gt}from"./label-DMupX0MC.js";import{S as lt}from"./scroll-area-NvsVU-Kn.js";import{S as bt}from"./switch-cah4KvTn.js";import{T as vt,b as yt,a as jt}from"./tooltip-CaxLgEiD.js";import{V as Tt}from"./view-mode-toggle-vq_eeWBG.js";import{V as ct,W as mt,X as Nt,Y as _t,Z as kt,_ as U,$ as wt}from"./agent-site-editor-content-BM7dvQv4.js";import"./AlertCircle-BOwxL-T0.js";import"./Tool01-DPX939IH.js";import"./ArrowUp-CBRbx5X7.js";import"./ArrowLeft--Xk13dys.js";import"./ArrowRight-QVOtCDeK.js";import"./ShoppingBag01-BCLkpTfu.js";import"./ZoomOut-vsOlFjcF.js";import"./Palette-C9gvXMWp.js";import"./CheckCircle-CiQ-dY25.js";import"./Check-DhBGPxm0.js";import"./ChevronUp-DDAA9oEX.js";import"./UserSquare-C8IMKAXm.js";import"./Copy01-DUfSR12p.js";import"./CreditCard01-n7MEW30m.js";import"./DotsVertical-DsRrrMyj.js";import"./Image01-DS-Zo0Gm.js";import"./XClose-Xd0cbKp3.js";import"./Key01-vFFG-8rI.js";import"./Link01-BP9lpuLn.js";import"./LinkExternal01-CCFdzydS.js";import"./Monitor01-DA0blIAC.js";import"./Sun-CchZi423.js";import"./Plus-BSWKCd5K.js";import"./SearchMd-C7F8eH-A.js";import"./Trash01-CZ3nuubL.js";import"./Upload01-DYgjYqa8.js";import"./User01-DWDiZkwz.js";import"./Users01-BoKXzLNT.js";import"./X-CU1GZ1X5.js";import"./select-H-CMPEfp.js";import"./index-C1Z09kwU.js";import"./agent-view-guard-B6V7cfD1.js";import"./use-main-panel-tabs-CH-ZgEHC.js";import"./use-chat-layout-state-CWK-9l4_.js";import"./use-file-configs-SfDJl4-5.js";import"./use-organization-settings-CTmRGpkm.js";import"./schema-DpbNyGSF.js";import"./task-board-DxDhloMI.js";import"./site-slug-DebpOoQq.js";import"./thread-route-BKSG8n_B.js";import"./use-panel-navigate-Be-d6xJA.js";import"./use-project-scope-4MlwSqdG.js";import"./repository-binding-BpUKRc_C.js";import"./use-mcp-client-D2Vi6MSe.js";import"./auth-6_9F-vLF.js";import"./thread-intent-xuarXzDX.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-DzY6Wffn.js";import"./use-mcp-tools-t8ImMobR.js";import"./types-DwqswVGG.js";import"./utils-CVEq3hMx.js";import"./index-BawH6u0S.js";import"./chat-context-DOzhwdpr.js";import"./autosend-BftSstM1.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-B5BcpNUU.js";import"./use-ai-providers-DhvGPgkO.js";import"./location-DBePU4bz.js";import"./gateway-client-_adliKhE.js";import"./dialog-DgvI-2Zs.js";import"./drawer-L7JmR21l.js";import"./collection-search-Bl3ZyM8B.js";import"./use-mobile-Z8zmt-sr.js";import"./use-mcp-prompts-Dsk8zc6x.js";import"./index-BREpCEqw.js";import"./form-D1W3w80w.js";import"./input-nBm7K2le.js";import"./org-file-open-context-yUuJsknK.js";import"./input-BBXpSU6d.js";import"./shell-layout-EY5Uf4Cb.js";import"./avatar-D-gkFe6T.js";import"./download-app-dialog-Do9mk_KB.js";import"./command-SjbDAl9s.js";import"./index-C_0dOsSh.js";import"./integration-icon-Bp8juFay.js";import"./project-icon-5V7fnedA.js";import"./new-project-dialog-dnrpTCul.js";import"./repository-import-picker-HM6WgTNW.js";import"./use-navigate-to-agent-u-7ZqLSa.js";import"./repository-picker-B0I3Du2Y.js";import"./useInfiniteQuery-DFC-JWIp.js";import"./infiniteQueryObserver-BTaa8yCU.js";import"./use-debounced-value-D5IO3_vn.js";import"./required-auth-layout-Vrx1VADX.js";import"./use-org-sso-B400YEW3.js";import"./chat-draft-BPbPwvlb.js";import"./use-session-runtime-CQM0Tgz5.js";import"./usage-stats-D2C_YJGd.js";import"./use-copy-CUDMsdQy.js";import"./markdown-BfzNG-M7.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-Cov1OGsb.js";import"./use-deco-credits-3gVTPFwf.js";import"./toggle-group-BWSm-Aff.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-DYBLUZF6.js";import"./decopilot-FwcDapHu.js";import"./checkbox-DBzqmJaN.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-BALocaPm.js";import"./index-CKq354Gz.js";import"./input-NQyNf1V0.js";import"./suggestion-3pWjGFX4.js";import"./use-org-fs-CRET0y9_.js";import"./question-004-sINsf4GQ.js";import"./use-members-HxuYvZQQ.js";import"./use-org-auth-client-BcEY5fn7.js";import"./feature-paywall-C2LoJKfX.js";import"./plan-ladder-DXQDkWeB.js";import"./add-connection-dialog-niTjx4zk.js";import"./extract-connection-data-BEoPTe53.js";import"./metadata-D72DunRR.js";import"./connection-DzWV1_h4.js";import"./connection-card-aZdfvEmX.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-BoayKLnG.js";import"./connection-form-helpers-CGHXbRJW.js";import"./authenticate-and-persist-oauth-D_fQjtQT.js";import"./mcp-oauth-DUBYed0Q.js";import"./collection-tabs-D8dvpbZK.js";import"./badge-BcHbmh2L.js";import"./use-infinite-scroll-CmfDRbkB.js";import"./useSuspenseInfiniteQuery-CxAP_wIY.js";import"./use-task-board-events-BSyBXJLh.js";import"./pair-BJWYd3Ae.js";import"./collapsible-DDrhvpFQ.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-BlvZoL7J.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-0Y4Ip4h-.js";import"./use-thread-outputs-D_xjObSL.js";import"./file-type-icon-Crn_LS8y.js";import"./sandbox-lifecycle-context-CX1voOln.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-C65j0_Xh.js";import"./use-task-metadata-uO8X_9rP.js";import"./virtual-mcp-NnbBE1iC.js";import"./feature-gate-C_96j33I.js";import"./alert-dialog-Dg-UEYR0.js";import"./runnable-block-editor-BYrU5Yi-.js";import"./claim-phase-copy-DNVgTO-i.js";import"./utils-CUJUfA75.js";import"./monaco-editor-RbYzn9g4.js";import"./editor-Be4HUfth.js";import"./calendar-BBq6y98H.js";import"./use-new-blocks-editor-DEKKTguS.js";import"./rich-text-link-control-B16tsLBG.js";import"./combobox-CY9Ipk24.js";import"./search-input-DlZNe3FK.js";import"./asset-utils-BRtd154Z.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-D909vgLx.js";import"./empty-state-CXZRRy8X.js";import"./empty-state-Cl3s1v-7.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),$t=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,At=/\/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"||!$t.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=At.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 Vt(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 It(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=Y.c(18),{variant:r}=e,o=J();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(jt,{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=Y.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(vt,{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(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function cn(e){const t=Y.c(72),{decofile:r}=e,o=J(),[s,i]=Q.useState("calendar"),[a,c]=Q.useState(Yt),[l,m]=Q.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(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(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,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 $;t[16]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ht,{size:16}),t[16]=$):$=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:$}),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(ut,{size:16}),t[22]=C):C=t[22];let A;t[23]!==d||t[24]!==k?(A=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]=A):A=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]!==A||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,A,w]}),t[31]=A,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(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{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 I;t[41]!==o?(I=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:H,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),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(Kt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Xt,{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 Z;return t[69]!==W||t[70]!==G?(Z=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Z):Z=t[71],Z}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Yt(){return mt(new Date)}function Kt(e){const t=Y.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=J();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,Zt=6;function Xt(e){const t=Y.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(Jt)}),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),$=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(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Zt,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 Jt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const X=4,Qt=32,K=240;function te(e){const t=Y.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,X),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:X},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=J(),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:K},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(${X}, minmax(0, 1fr))`},t[7]=N):N=t[7];const $=g.map(re);let _;t[8]!==$?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:$}),t[8]=$,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(${K}px + (100% - ${K}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 A=m.map(w=>{const[j,R]=w,H=dt(s,j),I=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:K},children:I})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Qt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:K},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(${X}, 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]!==A?(L=n.jsxs("div",{className:T,children:[k,C,A]}),t[16]=k,t[17]=C,t[18]=A,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{cn as VariantCalendar};
1
+ import{c as Y,b as J,r as Q,j as n,l as rt,B as tt,ak as ut}from"./index-CI6hIGIA.js";import{x as ht,Z as at,B as xt}from"./agent-icon-Dp6kp3md.js";import{L as gt}from"./label-CLzkySlK.js";import{S as lt}from"./scroll-area-vhYWSZS_.js";import{S as bt}from"./switch-Uc67n4kS.js";import{T as vt,b as yt,a as jt}from"./tooltip-BqEsx0cb.js";import{V as Tt}from"./view-mode-toggle-D8_txm5Y.js";import{V as ct,W as mt,X as Nt,Y as _t,Z as kt,_ as U,$ as wt}from"./agent-site-editor-content-Bcw_UC6S.js";import"./AlertCircle-BPm221PV.js";import"./Tool01-C-iZDmeb.js";import"./ArrowUp-DIA2qOVk.js";import"./ArrowLeft-BUXkFW5o.js";import"./ArrowRight-D6deLn8q.js";import"./ShoppingBag01-BIKAzonD.js";import"./ZoomOut-CcTHMY1_.js";import"./Palette-CVxN5EBk.js";import"./CheckCircle-CAAcynpJ.js";import"./Check--DqkM7Xv.js";import"./ChevronUp-tIvwcq5h.js";import"./UserSquare-CgXzzOm5.js";import"./Copy01-DcaC0f-6.js";import"./CreditCard01-CrJdTCiV.js";import"./DotsVertical-BAk4bXO1.js";import"./Image01-2nm41sXd.js";import"./XClose-CI4Ex-VY.js";import"./Key01-DvRyUxWt.js";import"./Link01-BP6Ht4AL.js";import"./LinkExternal01-CCNit4Pp.js";import"./Monitor01-1dfyrJAM.js";import"./Sun-BVR9W5IG.js";import"./Plus-B3-HKvxk.js";import"./SearchMd-DG2nOAQH.js";import"./Trash01-sKbKWg-Z.js";import"./Upload01-DaFFfXEN.js";import"./User01-C0UZWUsa.js";import"./Users01-Dm34vj3x.js";import"./X-DuNZLDnY.js";import"./select-C5hBYFxr.js";import"./index-Wt9IchZK.js";import"./agent-view-guard-Cd7sBbgk.js";import"./use-main-panel-tabs-JZ4nW0UR.js";import"./use-chat-layout-state-Bs3lE30X.js";import"./use-file-configs-BL6_hFrQ.js";import"./use-organization-settings-D7duaXpT.js";import"./schema-B6zLCfxk.js";import"./task-board-C5AHberH.js";import"./site-slug-DebpOoQq.js";import"./thread-route-DOFX1IjX.js";import"./use-panel-navigate-BVLfzU2L.js";import"./use-project-scope-H69d9lZ_.js";import"./repository-binding-pgWT9JQt.js";import"./use-mcp-client-BD2qvyw9.js";import"./auth-CbZxJDJO.js";import"./thread-intent-QRABLhkd.js";import"./backoff-8mStPHYB.js";import"./slugify-CEUa2lfQ.js";import"./use-connection-D0VnDJ5O.js";import"./use-mcp-tools-DBjCHixa.js";import"./types-DOMrK_LV.js";import"./utils-CVEq3hMx.js";import"./index-CQT10nBy.js";import"./chat-context-OYYFpgoc.js";import"./autosend-DxZ14wgL.js";import"./use-is-desktop-app-BNujXJc_.js";import"./use-decopilot-events-luMnwI0t.js";import"./use-ai-providers-ClKTI8i8.js";import"./location-DBePU4bz.js";import"./gateway-client-B7k1aPtN.js";import"./dialog-BY9qAzmD.js";import"./drawer-BnsxSXEZ.js";import"./collection-search-DwNTbNf5.js";import"./use-mobile-DhEHiUUd.js";import"./use-mcp-prompts-DSTogSz2.js";import"./index-Dt7LNk-3.js";import"./form-BgXfP3af.js";import"./input-BY69mPBP.js";import"./org-file-open-context-BHx39gNs.js";import"./input-CseBaqJf.js";import"./shell-layout-xaQEHEW8.js";import"./avatar-CmaKR_B3.js";import"./download-app-dialog-DjfWpS10.js";import"./command-BaZT-CIE.js";import"./index-HSYT9siq.js";import"./integration-icon-V47RVePh.js";import"./project-icon-BM80bvAf.js";import"./new-project-dialog-CQBRyWoN.js";import"./repository-import-picker-BXN3XYPf.js";import"./use-navigate-to-agent-BnON953z.js";import"./repository-picker-BokIG_Wg.js";import"./useInfiniteQuery-DEHsT2mb.js";import"./infiniteQueryObserver-FUg5fy_W.js";import"./use-debounced-value-EUGCLHCv.js";import"./required-auth-layout-DkWWMqKf.js";import"./use-org-sso-CbWZzH-Z.js";import"./chat-draft-BQ2fCPy3.js";import"./use-session-runtime-3SWP3dGF.js";import"./usage-stats-CQ9L8CQl.js";import"./use-copy-CGQOIURi.js";import"./markdown-Rj_xOQFL.js";import"./format-time-CjIPQhCN.js";import"./differenceInSeconds-C3x8sHUj.js";import"./tabs-BAFx2n2t.js";import"./use-deco-credits-BJF67lY9.js";import"./toggle-group-CvPMjNEK.js";import"./tool-namespace-DmnQIdtF.js";import"./use-open-billing-url-BcXcVI8P.js";import"./decopilot-BmTptrBD.js";import"./checkbox-lh-QmVI_.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-BNirAjZj.js";import"./index-BpzAOSAb.js";import"./input-BPUmEXNp.js";import"./suggestion-DJecFSH7.js";import"./use-org-fs-ylJPheRD.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-YyWAF9.js";import"./use-org-auth-client-F94GyLp-.js";import"./feature-paywall-CBX7_xA9.js";import"./plan-ladder-Ch7KEEo3.js";import"./add-connection-dialog-D4QunSRg.js";import"./extract-connection-data-DqtfojXT.js";import"./metadata-D72DunRR.js";import"./connection-CPJsYw3o.js";import"./connection-card-qqeOsanU.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-B0ZN3met.js";import"./connection-form-helpers-BNTEoNKm.js";import"./authenticate-and-persist-oauth-CuLZgDTx.js";import"./mcp-oauth-BWflJAPV.js";import"./collection-tabs-34C6GHTS.js";import"./badge-DESzQP2_.js";import"./use-infinite-scroll-BGe2OKwS.js";import"./useSuspenseInfiniteQuery-BLqh5_54.js";import"./use-task-board-events-Bw7w2frY.js";import"./pair-I7ZdjJQJ.js";import"./collapsible-Bh-hwNfF.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-fVhyOVUI.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CsqjmRbr.js";import"./use-thread-outputs-gMKfRb18.js";import"./file-type-icon-BsA58gQ0.js";import"./sandbox-lifecycle-context-B0cXggik.js";import"./sandbox-url-D3mC8qhT.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./resolve-tab-icon-DKiPc5yx.js";import"./use-task-metadata-CbpUuwQE.js";import"./virtual-mcp-C9Cv6Cjj.js";import"./feature-gate-Cgk_hzGP.js";import"./alert-dialog-ChG64Yqh.js";import"./runnable-block-editor-B746OKj4.js";import"./claim-phase-copy-Kn2TgM59.js";import"./utils-Dk1XJLXX.js";import"./monaco-editor-D5eHexZx.js";import"./editor-C4w_m3yY.js";import"./calendar-DyPmYqc-.js";import"./use-new-blocks-editor-BcFZ7Cv_.js";import"./rich-text-link-control-CvjpRX4h.js";import"./combobox-4Kgx4pIj.js";import"./search-input-Cz70D4uP.js";import"./asset-utils-REZrStMp.js";import"./sandbox-git-api-B1R0585s.js";import"./mustache-DQqHKuWh.js";import"./empty-state-BmKHxkRA.js";import"./empty-state-8X9eCFno.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),$t=/\/flags\/multivariate(?:\/[^/]+)?\.ts$/,At=/\/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"||!$t.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=At.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 Vt(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 It(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=Y.c(18),{variant:r}=e,o=J();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(jt,{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=Y.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(vt,{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(yt,{children:[E,T]}),t[23]=T,t[24]=E,t[25]=d):d=t[25],d}function cn(e){const t=Y.c(72),{decofile:r}=e,o=J(),[s,i]=Q.useState("calendar"),[a,c]=Q.useState(Yt),[l,m]=Q.useState(!1);let p,h,f;if(t[0]!==r||t[1]!==l){const V=Vt(r);p=V.filter(Ut).length,f=l?V:V.filter(Gt),h=It(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(V=>s==="calendar"?U(V,-1):U(V,-3)),t[6]=s,t[7]=b):b=t[7];const E=b;let T;t[8]!==s?(T=()=>c(V=>s==="calendar"?U(V,1):U(V,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 $;t[16]===Symbol.for("react.memo_cache_sentinel")?($=n.jsx(ht,{size:16}),t[16]=$):$=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:$}),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(ut,{size:16}),t[22]=C):C=t[22];let A;t[23]!==d||t[24]!==k?(A=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]=A):A=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]!==A||t[32]!==w||t[33]!==y||t[34]!==_?(j=n.jsxs("div",{className:"flex items-center gap-2",children:[y,_,A,w]}),t[31]=A,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(bt,{id:"show-ongoing",checked:l,onCheckedChange:m}),n.jsx(gt,{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 I;t[41]!==o?(I=o("sandbox.variantCalendar.calendarMode"),t[41]=o,t[42]=I):I=t[42];let S;t[43]!==I?(S={value:"calendar",icon:H,label:I},t[43]=I,t[44]=S):S=t[44];let F;t[45]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(xt,{}),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(Kt,{hiddenOngoing:l?0:p}):s==="calendar"?n.jsx(Xt,{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 Z;return t[69]!==W||t[70]!==G?(Z=n.jsxs("div",{className:"flex h-full w-full flex-col",children:[W,G]}),t[69]=W,t[70]=G,t[71]=Z):Z=t[71],Z}function Wt(e){return e.blockKey}function Gt(e){return!e.openEnd}function Ut(e){return e.openEnd}function Yt(){return mt(new Date)}function Kt(e){const t=Y.c(4),{hiddenOngoing:r}=e,o=r===void 0?0:r,s=J();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,Zt=6;function Xt(e){const t=Y.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(Jt)}),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),$=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(${$}% + 2px)`,width:`calc(${_}% - 4px)`,minWidth:Zt,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 Jt(e){return n.jsx("div",{className:"px-2 py-2 text-center uppercase tracking-wide",children:e},e)}const X=4,Qt=32,K=240;function te(e){const t=Y.c(23),{monthStart:r,variants:o,colorMap:s}=e,i=r,a=U(r,X),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:X},f),u=c.getTime()>=i.getTime()&&c.getTime()<=a.getTime()?h(c):null,x=J(),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:K},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(${X}, minmax(0, 1fr))`},t[7]=N):N=t[7];const $=g.map(re);let _;t[8]!==$?(_=n.jsx("div",{className:"flex-1 grid",style:N,children:$}),t[8]=$,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(${K}px + (100% - ${K}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 A=m.map(w=>{const[j,R]=w,H=dt(s,j),I=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:K},children:I})}),R.map((S,F)=>n.jsxs("div",{className:"flex border-b items-center",style:{height:Qt},children:[n.jsxs("div",{className:"flex items-center gap-2 px-3 text-sm border-r shrink-0",style:{width:K},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(${X}, 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]!==A?(L=n.jsxs("div",{className:T,children:[k,C,A]}),t[16]=k,t[17]=C,t[18]=A,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{cn as VariantCalendar};
@@ -1 +1 @@
1
- import{H as f,I as $}from"./runnable-block-editor-BYrU5Yi-.js";const l="x-deco-matchers-override";function h({pageKey:a,prefix:r,variants:t,selectedIndex:n,decofile:i,meta:s}){if(!a||n<0||n>=t.length)return[];const o=[];for(let e=0;e<=n;e++){const u=t[e];if(!u)continue;const c=u.rule,v=e===n?"1":"0",d=(f(c,i,s)?$(c,i,s):null)??`${a}@${r}.${e}.rule`;o.push(`${d}=${v}`)}return o}function B(a,r,t,n){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:a,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:n})}function P({pageKey:a,page:r,sectionIndex:t,sectionLazy:n,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${n?".section":""}.variants`,v=Array.isArray(i.variants)?i.variants:[];return h({pageKey:a,prefix:c,variants:v,selectedIndex:s,decofile:o,meta:e})}function x(a,r){if(r.length===0)return a;try{const t=new URL(a,"http://local");t.searchParams.delete(l);for(const n of r)t.searchParams.append(l,n);return a.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return a}}export{P as a,B as b,x as w};
1
+ import{H as f,I as $}from"./runnable-block-editor-B746OKj4.js";const l="x-deco-matchers-override";function h({pageKey:a,prefix:r,variants:t,selectedIndex:n,decofile:i,meta:s}){if(!a||n<0||n>=t.length)return[];const o=[];for(let e=0;e<=n;e++){const u=t[e];if(!u)continue;const c=u.rule,v=e===n?"1":"0",d=(f(c,i,s)?$(c,i,s):null)??`${a}@${r}.${e}.rule`;o.push(`${d}=${v}`)}return o}function B(a,r,t,n){return!r.multivariate||r.variants.length<=1?[]:h({pageKey:a,prefix:"sections.variants",variants:r.variants,selectedIndex:r.index,decofile:t,meta:n})}function P({pageKey:a,page:r,sectionIndex:t,sectionLazy:n,mvObj:i,selectedVariantIndex:s,decofile:o,meta:e}){if(t<0)return[];const c=`${r.multivariate?`sections.variants.${r.index}.value`:"sections"}.${t}${n?".section":""}.variants`,v=Array.isArray(i.variants)?i.variants:[];return h({pageKey:a,prefix:c,variants:v,selectedIndex:s,decofile:o,meta:e})}function x(a,r){if(r.length===0)return a;try{const t=new URL(a,"http://local");t.searchParams.delete(l);for(const n of r)t.searchParams.append(l,n);return a.startsWith("http")?t.toString():`${t.pathname}${t.search}${t.hash}`}catch{return a}}export{P as a,B as b,x as w};
@@ -1 +1 @@
1
- import{c as $,r as T,l as f,j as i}from"./index-BxwPpzfc.js";import{b as k,T as I,a as P}from"./tooltip-CaxLgEiD.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 B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.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]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=R.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]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.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-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
1
+ import{c as $,r as T,l as f,j as i}from"./index-CI6hIGIA.js";import{b as k,T as I,a as P}from"./tooltip-BqEsx0cb.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 B(E){const t=$.c(27),{value:s,onValueChange:y,options:o,size:C,fullWidth:L,className:z}=E,_=C===void 0?"sm":C,m=L===void 0?!1:L;let h;t[0]===Symbol.for("react.memo_cache_sentinel")?(h=[],t[0]=h):h=t[0];const R=T.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]=T.useState(x);let g,p;t[2]!==o||t[3]!==s?(g=()=>{const e=o.findIndex(j=>j.value===s),b=R.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]),T.useEffect(g,p);const l=M[_];let n;t[6]!==z?(n=f("relative flex gap-0 bg-muted rounded-full",z),t[6]=z,t[7]=n):n=t[7];let a;t[8]!==l||t[9]!==m||t[10]!==y||t[11]!==o||t[12]!==s?(a=o.map((e,b)=>{const j=i.jsxs("button",{ref:V=>{R.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-full transition-colors [transition-timing-function:var(--ease-out-cubic)] duration-200",m?"flex-1 h-12 px-4":e.label?f(l.buttonWithLabel,"px-3"):l.button),children:[i.jsx("span",{className:f("transition-colors ease-out duration-200 flex items-center justify-center [&>svg]:size-[1em]",l.icon,s===e.value?"text-foreground":"text-muted-foreground"),children:e.icon}),e.label&&i.jsx("span",{className:f("text-xs transition-colors ease-out duration-200 whitespace-nowrap",s===e.value?"text-foreground":"text-muted-foreground"),children:e.label})]},e.value);return e.tooltip?i.jsxs(k,{children:[i.jsx(I,{asChild:!0,children:j}),i.jsx(P,{side:"bottom",children:e.tooltip})]},e.value):j}),t[8]=l,t[9]=m,t[10]=y,t[11]=o,t[12]=s,t[13]=a):a=t[13];const w=m?"h-12":l.button;let r;t[14]!==w?(r=f("absolute z-0 bg-background rounded-full border-shadow transition-all [transition-timing-function:var(--ease-out-cubic)] duration-200",w),t[14]=w,t[15]=r):r=t[15];const W=`${d.left}px`,N=`${d.width}px`;let c;t[16]!==d.opacity||t[17]!==W||t[18]!==N?(c={left:W,width:N,opacity:d.opacity},t[16]=d.opacity,t[17]=W,t[18]=N,t[19]=c):c=t[19];let u;t[20]!==r||t[21]!==c?(u=i.jsx("div",{className:r,style:c}),t[20]=r,t[21]=c,t[22]=u):u=t[22];let v;return t[23]!==u||t[24]!==n||t[25]!==a?(v=i.jsxs("div",{className:n,children:[a,u]}),t[23]=u,t[24]=n,t[25]=a,t[26]=v):v=t[26],v}export{B as V};
@@ -1 +1 @@
1
- import{au as t,av as e,aK as l,bM as a,bK as s,bL as o,cU as c,bN as d,e9 as I,cW as A,bO as v}from"./index-BxwPpzfc.js";const g=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,k=20,_=50,U=100,E=20,P=100,C=50,T=100,N=8192,y=g.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),v()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),oe=o(["on","off"]),D=new Map([["manual","on"],["auto","on"]]),L=o(["on","off","manual","auto"]);function X(n){if(!n)return null;const i=D.get(n);return i||(n==="on"||n==="off"?n:null)}const F=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:L.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(E).optional()});function se(n){return X(n?.cms)??"on"}function le(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),v()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),B=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(U).nullable().optional(),layout:F.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(k).nullable().optional(),homePrompts:a(e()).max(_).nullable().optional()}),H=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(H,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),K=A("kind",[t({key:f,kind:c("literal"),value:e().max(N)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),j=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(K).max(T).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),z=t({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),q=o(["agent-sandbox","local-api"]),G={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},M=t(G);function re(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=M.parse(b)}catch{}return r}const W=d(e().describe("userId"),d(e().describe("branch"),I(q,M))),Y=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),Z=a(Y).max(P).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),$=o(["smart","code-review","open"]),J=$.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Q=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ee=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),te=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ae=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ne=a(ae).max(C).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:B.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),repository:z.nullable().optional().describe("Linked repository"),runtime:j.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Z,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:J,previewServerUrl:te,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Q,releases:ne,fastPreviewInPlace:ee},ce=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:W.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(g).describe("Connections with their selected tools, resources, and prompts")}),x=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(x).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(x).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{oe as C,H as E,C as R,ce as V,re as p,se as r,le as w};
1
+ import{au as t,av as e,aK as l,bM as a,bK as s,bL as o,cU as c,bN as d,e9 as I,cW as A,bO as v}from"./index-CI6hIGIA.js";const g=t({connection_id:e().describe("Connection ID"),selected_tools:a(e()).nullable().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).nullable().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).nullable().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),u=500,w=200,R=200,k=20,_=50,U=100,E=20,P=100,C=50,T=100,N=8192,y=g.extend({selected_tools:a(e()).max(u).nullable().optional().describe("Selected tool names. null = all tools included, array = only these tools included"),selected_resources:a(e()).max(u).nullable().optional().describe("Selected resource URIs or patterns. Supports * and ** wildcards for pattern matching. null = all resources included, array = only these resources included"),selected_prompts:a(e()).max(u).nullable().optional().describe("Selected prompt names. null = all prompts included, array = only these prompts included")}),V=t({connectionId:e(),toolName:e(),label:e(),icon:e().nullable().optional()}),O=t({id:e().describe("Stable id; used as React key and ?tab= value"),title:e().describe("Tab label"),icon:e().optional().describe("Optional lucide icon name"),view:t({type:c("ext-app"),appId:e(),args:d(e(),v()).optional()})}),S=o(["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"]),oe=o(["on","off"]),D=new Map([["manual","on"],["auto","on"]]),L=o(["on","off","manual","auto"]);function X(n){if(!n)return null;const i=D.get(n);return i||(n==="on"||n==="off"?n:null)}const F=t({defaultMainView:t({type:e(),id:e().optional(),toolName:e().optional()}).nullable().optional(),chatDefaultOpen:s().nullable().optional(),cmsDefaultOpen:s().nullable().optional(),cms:L.nullable().optional().describe("How this agent offers content editing. Absent means on; the retired `manual` / `auto` read as on too."),sidebarViews:a(S).max(10).nullable().optional().describe("Deprecated layout-scoped sidebar selections. Read only as a fallback when metadata.sidebarViews is absent."),tabs:a(O).max(E).optional()});function se(n){return X(n?.cms)??"on"}function le(n,i){const r=i==="off"&&n?.defaultMainView?.type==="content";return{...n,cms:i,cmsDefaultOpen:null,...r?{defaultMainView:{type:"site-editor"}}:{}}}const h=t({tileId:e().optional(),connectionId:e().optional().describe("Connection that owns the resource — the host opens a direct MCP client to this connection so the iframe can call tools by their bare names."),resourceUri:e().describe("ui:// resource URI exposed by `connectionId`. Read on the home page and rendered via MCPAppRenderer."),toolName:e().optional().describe("Tool name — identifies which tool's inputSchema to display when editing tile props."),toolInput:d(e(),v()).optional().describe("User-configured input props passed to MCPAppRenderer when rendering the tile."),minHeight:l().int().positive().optional(),maxHeight:l().int().positive().optional()}),B=t({banner:e().nullable().optional(),bannerColor:e().nullable().optional(),icon:e().nullable().optional(),themeColor:e().nullable().optional(),pinnedViews:a(V).max(U).nullable().optional(),layout:F.nullable().optional(),homeTile:h.nullable().optional(),homeTiles:a(h).max(k).nullable().optional(),homePrompts:a(e()).max(_).nullable().optional()}),H=/^[A-Za-z_][A-Za-z0-9_]*$/,f=e().min(1).regex(H,{message:"Env var key must start with a letter or underscore and contain only letters, digits, and underscores."}),K=A("kind",[t({key:f,kind:c("literal"),value:e().max(N)}),t({key:f,kind:c("secret"),secretId:e().min(1)})]),j=t({selected:e().nullable().optional().describe("User-selected package manager (npm | pnpm | yarn | bun | deno). Null/absent means autodetect on next SANDBOX_START."),port:e().nullable().optional().describe("User-selected dev server port as a string (allows '' / null for unset). Null/absent means autodetect."),path:e().nullable().optional().describe("Optional path (relative to repo root) to the directory containing package.json. Null/absent means repo root. Forwarded as `application.packageManager.path` to the daemon config."),env:a(K).max(T).nullable().optional().describe("Env vars injected on every SANDBOX_START. Literal entries inline their value; secret entries store a secretId that Studio resolves via the credential vault before posting /_sandbox/config.")}),z=t({url:e().describe("Repository URL, including its provider host"),owner:e().describe("Repository owner"),name:e().describe("Repository name"),installationId:l().optional().describe("GitHub App installation ID. Absent when the repo was linked without a GitHub connection (public-clone mode)."),connectionId:e().optional().describe("ID of the mcp-github connection used for authentication. Absent for public repos cloned without credentials."),repositoryId:e().optional().describe("First-class repository (REPOSITORY_LINK) backing this binding. When set, credentials come from the repository's git provider account rather than connectionId.")}),q=o(["agent-sandbox","local-api"]),G={sandboxHandle:e().describe("Provider-specific handle"),previewUrl:e().nullable().describe("URL where the sandbox's iframe-proxied UI is served, or null when the sandbox has no dev server (blank / tool sandboxes)."),sandboxApiUrl:e().nullable().optional().describe("Direct sandbox API URL for runtimes that expose one. Equal to previewUrl for local-api; null/absent for AgentSandbox, which routes control traffic through hosted Studio."),createdAt:l().optional().describe("Epoch ms the entry was first written by SANDBOX_START. Used by the booting overlay to show a stable elapsed timer that survives browser reloads. Optional for backward compatibility with entries written before this field existed."),startedWith:t({packageManager:e().nullable().optional().describe("metadata.runtime.selected at the time of SANDBOX_START"),port:e().nullable().optional().describe("metadata.runtime.port at the time of SANDBOX_START"),path:e().nullable().optional().describe("metadata.runtime.path at the time of SANDBOX_START")}).optional().describe("Snapshot of metadata.runtime fields (selected/port/path) used at SANDBOX_START. The Preview tab compares the live metadata.runtime against this to decide if a restart is required to apply changes.")},M=t(G);function re(n){if(!n||typeof n!="object"||Array.isArray(n))return{};const i=n,r={};for(const[p,b]of Object.entries(i))if(!(!b||typeof b!="object")&&!(p!=="agent-sandbox"&&p!=="local-api"))try{r[p]=M.parse(b)}catch{}return r}const W=d(e().describe("userId"),d(e().describe("branch"),I(q,M))),Y=t({id:e().describe("Stable identifier for this knowledge file"),name:e().describe("File name shown in the UI"),kind:o(["file","skill"]).optional().describe("'file' (a single document) or 'skill' (a Claude Code skill folder containing SKILL.md). Defaults to 'file'."),volume:e().describe("Org filesystem (Library) volume the file lives in"),path:e().describe("Path within the volume"),url:e().describe("Same-origin URL to read the file (display/download)"),contentType:e().nullable().optional().describe("MIME type, used to decide whether to inline the content"),size:l().nullable().optional().describe("File size in bytes"),addedAt:e().describe("ISO timestamp when the file was attached")}),Z=a(Y).max(P).nullable().optional().describe("Files attached to the agent as reference knowledge. Surfaced in the system prompt: small text documents are inlined, others are listed as retrievable references."),$=o(["smart","code-review","open"]),J=$.nullable().optional().describe("Controls when this code agent's changes may be published directly vs. requiring PR review. 'smart' (default) uses AI to judge per change; 'code-review' requires review for any code; 'open' allows direct publish always."),Q=s().nullable().optional().describe("Enable Fast Preview (sandbox-less): render the draft instantly on the preview server's own page via a ?__draft pointer, with reads/writes served by the decofile API against GitHub. Requires previewServerUrl (or legacy productionUrl) to be set to take effect."),ee=s().nullable().optional().describe("EXPERIMENTAL: with Fast Preview on, refresh content edits via an in-place /live/previews render (no commit, no reload) instead of a commit + re-navigation. Deco-runtime preview targets only. Requires fastPreview."),te=e().nullable().optional().describe("Preview server URL — the deployment the CMS preview renders against (often the live site, e.g. https://acme.com). Painted in the preview iframe, and the render target for Fast Preview drafts. Supersedes the legacy productionUrl key."),ae=t({branch:e().describe("Git branch backing this release"),name:e().describe('User-facing name, e.g. "Black Friday 2026"'),color:e().describe("Dot color token shown in the version switcher"),createdBy:e().optional().describe("User ID who created the release"),createdAt:e().optional().describe("ISO 8601 creation timestamp")}),ne=a(ae).max(C).nullable().optional().describe("Curated list of named, branch-backed releases shown in the version switcher. The base branch ('No ar') is derived, not stored here."),m={instructions:e().nullable().optional().describe("Instructions also used as system prompt"),subAgents:a(e()).max(R).nullable().optional().describe("Allowlist of Virtual MCP (agent) or concrete MCP connection IDs this agent may delegate to via subtask. Concrete connections create ephemeral subagents. null/absent = all active org targets; empty array = itself only."),liveAgentId:e().nullable().optional().describe("ID of the live agent this (dev) agent develops. Set only on dev agents; powers the Develop/Live toggle. A dev agent is hidden from the sidebar (reached via the toggle on its live counterpart)."),ui:B.nullable().optional().describe("UI customization settings"),sidebarViews:a(S).max(10).nullable().optional().describe("Project views selected for the sidebar. Interpret as an exact list when sidebarViewsVersion is 1; unversioned values use legacy native-only semantics. Runtime presence gates still apply."),sidebarViewsVersion:c(1).optional().describe("Version 1 marks metadata.sidebarViews as an exact list that can disable legacy default rows."),repository:z.nullable().optional().describe("Linked repository"),runtime:j.nullable().optional().describe("User-pinned runtime config (package manager, dev port). Empty fields = autodetect."),knowledge:Z,siteSlug:e().nullable().optional().describe("Linked asset site slug (managed storage tenancy)"),publishPolicy:J,previewServerUrl:te,productionUrl:e().nullable().optional().describe("Legacy key for previewServerUrl — still read as a fallback. New writes use previewServerUrl."),fieldDescriptionTooltips:s().nullable().optional().describe("Blocks form: opt in to showing a field's schema description as a hover tooltip on its title, instead of the default inline text below the title."),fastPreview:Q,releases:ne,fastPreviewInPlace:ee},ce=t({id:e().describe("Unique identifier"),title:e().describe("Human-readable name"),description:e().nullable().describe("Description"),icon:e().nullable().describe("Icon URL"),created_at:e().describe("Creation timestamp"),updated_at:e().describe("Last update timestamp"),created_by:e().describe("User ID who created this item"),updated_by:e().optional().describe("User ID who last updated this item"),organization_id:e().describe("Organization ID this item belongs to"),status:o(["active","inactive"]).describe("Current status"),pinned:s().describe("Whether this space is pinned to the sidebar"),metadata:t(m).extend({instructions:e().nullable().describe("Instructions also used as system prompt"),sandboxMap:W.optional().describe("Per-user, per-branch sandbox mapping: sandboxMap[userId][branch] -> { sandboxHandle, previewUrl }")}).loose().describe("Metadata"),connections:a(g).describe("Connections with their selected tools, resources, and prompts")}),x=t({title:e().min(1).max(120).describe("Short label shown on the chip"),description:e().max(280).optional().describe("One-line subtitle shown under the title"),text:e().min(1).max(4e3).describe("The message sent to the agent when the prompt is clicked")});t({title:e().min(1).max(255).describe("Name for the virtual MCP"),description:e().max(500).nullable().optional().describe("Optional description"),icon:e().nullish().describe("Optional icon URL"),status:o(["active","inactive"]).optional().default("active").describe("Initial status"),pinned:s().optional().default(!1).describe("Pin to sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).describe("Connections to include/exclude (can be empty for exclusion mode)"),prompts:a(x).max(20).optional().describe("Optional kickstart prompts to seed on the agent. Each becomes a clickable conversation starter (icebreaker) on the agent. Author them from the agent's role and the tools it will have so they're coherent and immediately useful.")});t({title:e().min(1).max(255).optional().describe("New name"),description:e().max(500).nullable().optional().describe("New description (null to clear)"),icon:e().nullish().describe("New icon URL"),status:o(["active","inactive"]).optional().describe("New status"),pinned:s().optional().describe("Pin/unpin from sidebar"),metadata:t(m).loose().superRefine((n,i)=>{"sandboxMap"in n&&i.addIssue({code:"custom",path:["sandboxMap"],message:"sandboxMap is managed by the sandbox lifecycle"})}).nullable().optional().describe("Additional metadata including MCP server instructions"),connections:a(y).max(w).optional().describe("New connections (replaces existing)"),prompts:a(x).max(20).optional().describe("Replace the agent's kickstart prompts with this full set. Omit to leave them unchanged; pass an empty array to remove all. Each becomes a clickable conversation starter (icebreaker).")});export{oe as C,H as E,C as R,ce as V,re as p,se as r,le as w};
@@ -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-BxwPpzfc.js"></script>
53
+ <script type="module" crossorigin src="/assets/index-CI6hIGIA.js"></script>
54
54
  <link rel="stylesheet" crossorigin href="/assets/index-3gIKLZj9.css">
55
55
  </head>
56
56
  <body>
@@ -2178,7 +2178,7 @@ Usage: deco services <up|down|status>`),process.exit(1)}}var PZ$=L(()=>{uu()});f
2178
2178
  `.execute($);if(Number(K.rows[0]?.cnt)===0){console.warn(`Failed to migrate ${G}/${W}, keeping in old table`);continue}}await Bc`
2179
2179
  DELETE FROM kysely_migration WHERE name = ${Q}
2180
2180
  `.execute($)}}async function HG$($){await FO4($),await UO4($);let Z=new WG$({db:$,provider:{getMigrations:()=>Promise.resolve(i81)}}),{error:Q,results:X}=await Z.migrateToLatest(),Y=0;if(X?.forEach((J)=>{if(J.status==="Success")Y++;else if(J.status==="Error")console.error(`Failed to execute migration "${J.migrationName}"`)}),Q)throw console.error("Failed to migrate"),console.error(Q),Q;return Y}async function NO4($){let{keepOpen:Z=!1,database:Q,skipBetterAuth:X=!1}=$??{},Y="skipped";if(!X&&!Q)Y=await ns0();let J=Q??Z8(),G=async()=>{if(!Z&&!Q)await xj(J).catch((W)=>{console.warn("Warning: Error closing database:",W)})};try{let W=await HG$(J.db);return await G(),{betterAuth:Y,kysely:W}}catch(W){throw await G(),W}}async function BO4(){let $=Z8(),Z=new WG$({db:$.db,provider:{getMigrations:()=>Promise.resolve(i81)}}),{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 UG$=L(()=>{GG$();ts0();bQ()});async function HK0($){let Z={...process.env},Q=rQ0($,Z);console.log(A_1(Q.settings.encryptionKey));let X=Q.settings.betterAuthSecret||(Q.settings.localMode?$Q$(Q.settings.dataDir):""),{ensureServices:Y}=await Promise.resolve().then(() => (HW0(),KW0)),{outputs:J,services:G}=await Y({home:Q.settings.dataDir,externalDatabaseUrl:Q.externalDatabaseUrl,externalNatsUrl:Q.externalNatsUrl});if(!Q.skipMigrations){let{migrateBetterAuth:K}=await Promise.resolve().then(() => (ts0(),QQ$));await K(J.databaseUrl);let{createDatabase:H}=await Promise.resolve().then(() => (bQ(),w7$)),{migrateToLatest:F}=await Promise.resolve().then(() => (UG$(),FG$)),U=H(J.databaseUrl);await F({keepOpen:!0,database:U,skipBetterAuth:!0})}let W={...Q.settings,betterAuthSecret:X,databaseUrl:J.databaseUrl,natsUrls:J.natsUrls,...J.s3?{s3Endpoint:J.s3.endpoint,s3Bucket:J.s3.bucket,s3AccessKeyId:J.s3.accessKeyId,s3SecretAccessKey:J.s3.secretAccessKey,s3ForcePathStyle:J.s3.forcePathStyle}:{}};return TZ$(W),{settings:W,services:G.map((K)=>({name:K.name==="PostgreSQL"?"Postgres":K.name,port:K.port})),managedServiceNames:G.filter((K)=>K.owner==="managed").map((K)=>K.name)}}var p81=L(()=>{uu();ZQ$();X$()});var DG$={};J0(DG$,{updateService:()=>YT,subscribeCliState:()=>o81,setTuiConsoleIntercepted:()=>FK0,setServerUrl:()=>qs,setMigrationsDone:()=>Rs,setDevMode:()=>DO4,resetCliStateForTests:()=>LO4,isTuiConsoleIntercepted:()=>UK0,getCliState:()=>t81,addLogEntry:()=>uj});function NG$(){return[{name:"Postgres",status:"pending",port:0},{name:"NATS",status:"pending",port:0}]}function BG$(){return{services:NG$(),migrationsStatus:"pending",serverUrl:null,logs:[]}}function LO4(){CJ=BG$()}function As(){for(let $ of n81)$()}function t81(){return CJ}function o81($){return n81.add($),()=>n81.delete($)}function YT($){CJ={...CJ,services:CJ.services.map((Z)=>Z.name===$.name?$:Z)},As()}function Rs(){CJ={...CJ,migrationsStatus:"done"},As()}function qs($){CJ={...CJ,serverUrl:$},As()}function uj($){let Z=[...CJ.logs,$];CJ={...CJ,logs:Z.length>500?Z.slice(-500):Z},As()}function DO4(){CJ={...CJ,services:[...NG$(),{name:"API",status:"pending",port:0},{name:"Vite",status:"pending",port:0}]},As()}function FK0($){LG$=$}function UK0(){return LG$}var CJ,n81,LG$=!1;var JT=L(()=>{CJ=BG$();n81=new Set});import{createServer as OG$}from"net";function OO4($){return new Promise((Z)=>{let Q=OG$();Q.once("error",()=>Z(!1)),Q.listen($,"0.0.0.0",()=>{Q.close(()=>Z(!0))})})}async function Ms($){if(await OO4($))return $;let Z=await new Promise((Q,X)=>{let Y=OG$();Y.once("error",X),Y.listen(0,"0.0.0.0",()=>{let J=Y.address(),G=typeof J==="object"&&J?J.port:0;Y.close(()=>Q(G))})});return console.warn(`Port ${$} is in use, using port ${Z} instead.`),Z}var a81=()=>{};var s81={};J0(s81,{startDevServer:()=>wO4,pipeToLogStore:()=>r81});import{join as jO4}from"path";function r81($){let Z=$.getReader(),Q=new TextDecoder,X="";function Y(){let J=X.split(`
2181
- `);X=J.pop()??"";for(let G of J){let W=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!W)continue;uj({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)uj({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function wO4($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await Ms(Number(Y)+1):await Ms(Number($.port)),{settings:W,services:K,managedServiceNames:H}=await HK0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let O of K)YT({name:O.name,status:"ready",port:O.port});Rs();let F=jO4(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.betterAuthSecret?{BETTER_AUTH_SECRET:W.betterAuthSecret}:{},...W.s3Endpoint?{S3_ENDPOINT:W.s3Endpoint,S3_BUCKET:W.s3Bucket??"",S3_ACCESS_KEY_ID:W.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:W.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(W.s3ForcePathStyle)}:{},...W.natsCredsPath?{NATS_CREDS:W.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)r81(N.stdout),r81(N.stderr);qs(J),YT({name:"Vite",status:"ready",port:Number(Y)}),YT({name:"API",status:"ready",port:Number(W.port)});let D=async(O)=>{if(N.kill(O),await N.exited,H.length>0){let{stopServices:j}=await Promise.resolve().then(() => (HW0(),KW0));await j(W.dataDir)}};return process.on("SIGINT",()=>D("SIGINT")),process.on("SIGTERM",()=>D("SIGTERM")),{port:Number(Y),process:N}}var e81=L(()=>{p81();JT();a81()});var NK0;var $41=L(()=>{NK0={name:"decocms",version:"4.429.12",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":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@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":"^3.1.0","@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":"^4.0.17","@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:"^7.0.107","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 zO4,Text as jG$}from"ink";import{jsx as PO4,jsxs as wG$}from"react/jsx-runtime";function EG$({version:$}){return wG$(zO4,{flexDirection:"column",marginTop:1,children:[_W0.map((Z,Q)=>PO4(jG$,{color:vW0[Q],children:Z},Q)),wG$(jG$,{dimColor:!0,children:[" v",$]})]})}var zG$=L(()=>{Ws()});import{Box as GT,Text as lj}from"ink";import{Spinner as TO4}from"@inkjs/ui";import{jsx as rG,jsxs as Lc}from"react/jsx-runtime";function PG$({status:$}){if($==="pending")return rG(TO4,{label:""});return rG(lj,{color:"green",children:"\u2713"})}function AO4($){return`${$.name}: ${$.port||"...."}`}function TG$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Lc(GT,{flexDirection:"column",paddingBottom:1,children:[rG(EG$,{version:NK0.version}),rG(GT,{marginBottom:1,children:rG(lj,{dimColor:!0,children:"\u2500".repeat(80)})}),rG(GT,{children:Lc(lj,{dimColor:!0,children:["Home: ",Q]})}),Lc(GT,{gap:2,children:[$.map((Y)=>Lc(GT,{gap:1,children:[rG(lj,{children:AO4(Y)}),rG(PG$,{status:Y.status})]},Y.name)),Lc(GT,{gap:1,children:[rG(lj,{children:"Migrations"}),rG(PG$,{status:Z})]})]}),rG(GT,{children:X?Lc(lj,{children:["Open in browser: ",rG(lj,{color:"cyan",children:X})]}):rG(lj,{dimColor:!0,children:"Starting..."})})]})}var AG$=L(()=>{$41();zG$()});import{Box as RO4,Text as Is}from"ink";import{jsx as Z41,jsxs as Q41}from"react/jsx-runtime";function qO4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function RG$({logs:$}){return Z41(RO4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Z41(Is,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Q41(Is,{children:[Q41(Is,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Z41(Is,{color:qO4(Z.status),children:Z.status}),Q41(Is,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var qG$=()=>{};var X41={};J0(X41,{App:()=>VO4});import{Box as MO4}from"ink";import{useSyncExternalStore as IO4}from"react";import{jsx as MG$,jsxs as kO4}from"react/jsx-runtime";function VO4({home:$}){let Z=IO4(o81,t81);return kO4(MO4,{flexDirection:"column",children:[MG$(TG$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),MG$(RG$,{logs:Z.logs})]})}var Y41=L(()=>{AG$();qG$();JT()});var CW="thread-gate",DL="decopilot-hosted-harness",OL="decopilot-hosted-harness-sandboxed",SW="automations",cj="background-tools",WT="task-board-github-reads";var IG$="13";function VG$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:IG$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var kG$=()=>{};import CO4 from"pg";async function SG$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=SO4}=$,Y=$.log??((K)=>console.log(K)),J=new CO4.Client({connectionString:Q});await J.connect();let G=Date.now(),W=!1;try{while(!W){if(W=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[CG$.toString()])).rows[0]?.locked===!0,W)break;if(Date.now()-G>=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 $$(_O4)}let K=Date.now()-G;if(K>1000)Y(`[dbos] waited ${K}ms for the migration lock; another process migrated first`);return await Z()}finally{if(W)try{await J.query("SELECT pg_advisory_unlock($1)",[CG$.toString()])}catch{}await J.end().catch(()=>{})}}var CG$=8314027461559302n,SO4=600000,_O4=500;var _G$=L(()=>{$8()});function vO4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function J41($,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 vG$(){let $=vO4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:J41($,"--cpu-prof-dir")??process.cwd(),name:J41($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(J41($,"--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 xG$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=$T();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((W,K)=>K[1]-W[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}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(()=>{}),BK0=setInterval(()=>void Z().catch(()=>{}),$),BK0.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(BK0)clearInterval(BK0)}}var BK0;var fG$=()=>{};import*as xO4 from"bun:jsc";function bG$(){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{fO4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let W=[];try{W=bO4()?.traces??[]}catch{}if(G>$&&W.length>0){let K=new Map;for(let F of W){let U=F.frames.find((D)=>D.sourceURL&&!/Unknown Executable/.test(D.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;K.set(B,(K.get(B)??0)+1)}let H=[...K.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:W.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var fO4,bO4;var yG$=L(()=>{({startSamplingProfiler:fO4,samplingProfilerStackTraces:bO4}=xO4)});function gG$(){vG$();let $=[xG$(),H7$(),bG$()];return()=>{for(let Z of $)Z()}}var hG$=L(()=>{hs0();fG$();yG$()});var KT=b((uG$)=>{Object.defineProperty(uG$,"__esModule",{value:!0});uG$.RepublishHeaders=uG$.DirectMsgHeaders=uG$.JsHeaders=uG$.AdvisoryKind=void 0;uG$.isOrderedPushConsumerOptions=yO4;uG$.isPullConsumer=gO4;uG$.isPushConsumer=hO4;uG$.isBoundPushConsumerOptions=uO4;function yO4($){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 gO4($){return $.isPullConsumer()}function hO4($){return $.isPushConsumer()}function uO4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}uG$.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"};uG$.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"};uG$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};uG$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var sG=b((cG$)=>{Object.defineProperty(cG$,"__esModule",{value:!0});cG$.TD=cG$.TE=cG$.Empty=void 0;cG$.encode=oO4;cG$.decode=aO4;cG$.Empty=new Uint8Array(0);cG$.TE=new TextEncoder;cG$.TD=new TextDecoder;function tO4(...$){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 oO4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(cG$.TE.encode($[Q]));if(Z.length===0)return cG$.Empty;if(Z.length===1)return Z[0];return tO4(...Z)}function aO4($){if(!$||$.length===0)return"";return cG$.TD.decode($)}});var eG=b((iG$)=>{Object.defineProperty(iG$,"__esModule",{value:!0});iG$.errors=iG$.PermissionViolationError=iG$.NoRespondersError=iG$.TimeoutError=iG$.RequestError=iG$.ProtocolError=iG$.ConnectionError=iG$.DrainingConnectionError=iG$.ClosedConnectionError=iG$.AuthorizationError=iG$.UserAuthenticationExpiredError=iG$.InvalidOperationError=iG$.InvalidArgumentError=iG$.InvalidSubjectError=void 0;class W41 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}iG$.InvalidSubjectError=W41;class LK0 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 LK0(`${$} ${Z}`,Q)}}iG$.InvalidArgumentError=LK0;class K41 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}iG$.InvalidOperationError=K41;class DK0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new DK0($);return null}}iG$.UserAuthenticationExpiredError=DK0;class OK0 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 OK0($);return null}}iG$.AuthorizationError=OK0;class H41 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}iG$.ClosedConnectionError=H41;class F41 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}iG$.DrainingConnectionError=F41;class U41 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}iG$.ConnectionError=U41;class N41 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}iG$.ProtocolError=N41;class B41 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof jK0}}iG$.RequestError=B41;class L41 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}iG$.TimeoutError=L41;class jK0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}iG$.NoRespondersError=jK0;class wK0 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,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new wK0($,Q,X,Y)}}iG$.PermissionViolationError=wK0;iG$.errors={AuthorizationError:OK0,ClosedConnectionError:H41,ConnectionError:U41,DrainingConnectionError:F41,InvalidArgumentError:LK0,InvalidOperationError:K41,InvalidSubjectError:W41,NoRespondersError:jK0,PermissionViolationError:wK0,ProtocolError:N41,RequestError:B41,TimeoutError:L41,UserAuthenticationExpiredError:DK0}});var DH=b((aG$)=>{Object.defineProperty(aG$,"__esModule",{value:!0});aG$.SimpleMutex=aG$.Perf=void 0;aG$.extend=Bj4;aG$.render=Lj4;aG$.timeout=Dj4;aG$.delay=Oj4;aG$.deadline=jj4;aG$.deferred=O41;aG$.debugDeferred=wj4;aG$.shuffle=Ej4;aG$.collect=zj4;aG$.jitter=oG$;aG$.backoff=Pj4;aG$.nanos=Tj4;aG$.millis=Aj4;aG$.randomToken=Mj4;var Nj4=sG(),D41=eG();function Bj4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function Lj4($){return Nj4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Dj4($,Z=!0){let Q=Z?new D41.TimeoutError:null,X,Y,J=new Promise((G,W)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)W(new D41.TimeoutError);else W(Q)},$)});return Object.assign(J,X)}function Oj4($=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 jj4($,Z=1000){let Q=O41(),X=setTimeout(()=>{Q.reject(new D41.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function O41(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function wj4(){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 Ej4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function zj4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class nG${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})}),$}}aG$.Perf=nG$;class tG${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=O41();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}aG$.SimpleMutex=tG$;function oG$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Pj4($=[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 oG$(Q>Z?$[Z]:$[Q])}}}function Tj4($){return $*1e6}function Aj4($){return Math.floor($/1e6)}var Rj4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",jL=new Uint8Array(62);for(let $=0;$<62;$++)jL[$]=Rj4.charCodeAt($);var qj4=218340105584896;function Mj4(){let $=Math.floor(Math.random()*qj4),Z=$%62,Q=jL[Z];$=($-Z)/62,Z=$%62;let X=jL[Z];$=($-Z)/62,Z=$%62;let Y=jL[Z];$=($-Z)/62,Z=$%62;let J=jL[Z];$=($-Z)/62,Z=$%62;let G=jL[Z];$=($-Z)/62,Z=$%62;let W=jL[Z];$=($-Z)/62,Z=$%62;let K=jL[Z];$=($-Z)/62;let H=jL[$];return String.fromCharCode(Q,X,Y,J,G,W,K,H)}});var Y3$=b((Q3$)=>{Object.defineProperty(Q3$,"__esModule",{value:!0});Q3$.nuid=Q3$.NuidImpl=void 0;var cj4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",mj=62,zK0=12,$3$=10,sG$=33,mj4=333,eG$=zK0+$3$,w41=new Uint8Array(mj);for(let $=0;$<mj;$++)w41[$]=cj4.charCodeAt($);var EK0=4294967296,Z3$=BigInt(mj)**BigInt($3$),Vs=Number(Z3$/(1n<<32n)),j41=Number(Z3$%(1n<<32n));function dj4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function ij4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else dj4($)}class E41{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(eG$),this.cbuf=new Uint8Array(zK0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Vs+1)),this.seqLo=Math.floor(Math.random()*EK0);while($++<8&&this.seqHi===Vs&&this.seqLo>=j41);if(this.seqHi===Vs&&this.seqLo>=j41)this.seqLo=0;this.inc=Math.random()*(mj4-sG$)+sG$|0}setPre(){ij4(this.cbuf);for(let $=0;$<zK0;$++)this.buf[$]=w41[this.cbuf[$]%mj]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=eG$-1;Q>=zK0;Q--){let X=Math.floor($/mj),J=($-X*mj)*EK0+Z,G=Math.floor(J/mj),W=J-G*mj;this.buf[Q]=w41[W],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=EK0)this.seqLo-=EK0,this.seqHi+=1;if(this.seqHi>Vs||this.seqHi===Vs&&this.seqLo>=j41)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()}}Q3$.NuidImpl=E41;Q3$.nuid=new E41});var K3$=b((G3$)=>{Object.defineProperty(G3$,"__esModule",{value:!0});G3$.nuid=G3$.Nuid=void 0;var J3$=Y3$();G3$.Nuid=J3$.NuidImpl;G3$.nuid=J3$.nuid});var TK0=b((PK0)=>{Object.defineProperty(PK0,"__esModule",{value:!0});PK0.nuid=PK0.Nuid=void 0;var H3$=K3$();Object.defineProperty(PK0,"Nuid",{enumerable:!0,get:function(){return H3$.Nuid}});Object.defineProperty(PK0,"nuid",{enumerable:!0,get:function(){return H3$.nuid}})});var dj=b((F3$)=>{Object.defineProperty(F3$,"__esModule",{value:!0});F3$.DEFAULT_HOST=F3$.DEFAULT_PORT=F3$.Match=void 0;F3$.syncIterator=rj4;F3$.createInbox=sj4;var oj4=TK0(),aj4=eG();F3$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function rj4($){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 sj4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw aj4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${oj4.nuid.next()}`}F3$.DEFAULT_PORT=4222;F3$.DEFAULT_HOST="127.0.0.1"});var ks=b((L3$)=>{Object.defineProperty(L3$,"__esModule",{value:!0});L3$.DataBuffer=void 0;var N3$=sG();class B3${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 N3$.TE.encode($)}static toAscii($){return N3$.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}}L3$.DataBuffer=B3$});var HT=b((j3$)=>{Object.defineProperty(j3$,"__esModule",{value:!0});j3$.LF=j3$.CR=j3$.CRLF=j3$.CR_LF_LEN=j3$.CR_LF=void 0;j3$.setTransportFactory=Gw4;j3$.defaultPort=Ww4;j3$.getUrlParseFn=Kw4;j3$.newTransport=Hw4;j3$.getResolveFn=Fw4;j3$.protoLen=O3$;j3$.extractProtocolMessage=Uw4;var Xw4=sG(),Yw4=dj(),Jw4=ks(),$3;function Gw4($){$3=$}function Ww4(){return $3!==void 0&&$3.defaultPort!==void 0?$3.defaultPort:Yw4.DEFAULT_PORT}function Kw4(){return $3!==void 0&&$3.urlParseFn?$3.urlParseFn:void 0}function Hw4(){if(!$3||typeof $3.factory!=="function")throw Error("transport fn is not set");return $3.factory()}function Fw4(){return $3!==void 0&&$3.dnsResolveFn?$3.dnsResolveFn:void 0}j3$.CR_LF=`\r
2181
+ `);X=J.pop()??"";for(let G of J){let W=Bun.stripANSI(G).replace(/^\[\d+\]\s*/,"").trim();if(!W)continue;uj({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:W})}}(async()=>{try{for(;;){let{done:J,value:G}=await Z.read();if(J)break;X+=Q.decode(G,{stream:!0}),Y()}}catch{}if(X.trim()){let J=Bun.stripANSI(X).replace(/^\[\d+\]\s*/,"").trim();if(J)uj({method:"",path:"",status:0,duration:0,timestamp:new Date,rawLine:J})}})()}async function wO4($){let{baseUrl:Z,noTui:Q}=$,X=process.env.HOST==="0.0.0.0"&&Boolean(process.env.PORT),Y=X?process.env.PORT:$.vitePort,J=Z||`http://localhost:${Y}`,G=X?await Ms(Number(Y)+1):await Ms(Number($.port)),{settings:W,services:K,managedServiceNames:H}=await HK0({port:String(G),home:$.home,baseUrl:$.baseUrl,localMode:$.localMode,skipMigrations:$.skipMigrations,noTui:$.noTui,vitePort:$.vitePort});for(let O of K)YT({name:O.name,status:"ready",port:O.port});Rs();let F=jO4(import.meta.dir,"..","..","..","..",".."),U=Q===!0,N=Bun.spawn(["bun","run","dev:servers"],{cwd:F,env:{...process.env,PORT:String(W.port),VITE_PORT:String(Y),DATABASE_URL:W.databaseUrl,NATS_URL:W.natsUrls.join(","),NODE_ENV:W.nodeEnv,BASE_URL:J,DECOCMS_LOCAL_MODE:String(W.localMode),DECOCMS_HOME:W.dataDir,DATA_DIR:W.dataDir,DECO_CLI:"1",...W.betterAuthSecret?{BETTER_AUTH_SECRET:W.betterAuthSecret}:{},...W.s3Endpoint?{S3_ENDPOINT:W.s3Endpoint,S3_BUCKET:W.s3Bucket??"",S3_ACCESS_KEY_ID:W.s3AccessKeyId??"",S3_SECRET_ACCESS_KEY:W.s3SecretAccessKey??"",S3_FORCE_PATH_STYLE:String(W.s3ForcePathStyle)}:{},...W.natsCredsPath?{NATS_CREDS:W.natsCredsPath}:{}},stdio:["inherit",U?"inherit":"pipe",U?"inherit":"pipe"]});if(!U)r81(N.stdout),r81(N.stderr);qs(J),YT({name:"Vite",status:"ready",port:Number(Y)}),YT({name:"API",status:"ready",port:Number(W.port)});let D=async(O)=>{if(N.kill(O),await N.exited,H.length>0){let{stopServices:j}=await Promise.resolve().then(() => (HW0(),KW0));await j(W.dataDir)}};return process.on("SIGINT",()=>D("SIGINT")),process.on("SIGTERM",()=>D("SIGTERM")),{port:Number(Y),process:N}}var e81=L(()=>{p81();JT();a81()});var NK0;var $41=L(()=>{NK0={name:"decocms",version:"4.429.13",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":"^4.0.58","@ai-sdk/google":"^4.0.76","@ai-sdk/openai":"^4.0.71","@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":"^3.1.0","@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":"^4.0.17","@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:"^7.0.107","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 zO4,Text as jG$}from"ink";import{jsx as PO4,jsxs as wG$}from"react/jsx-runtime";function EG$({version:$}){return wG$(zO4,{flexDirection:"column",marginTop:1,children:[_W0.map((Z,Q)=>PO4(jG$,{color:vW0[Q],children:Z},Q)),wG$(jG$,{dimColor:!0,children:[" v",$]})]})}var zG$=L(()=>{Ws()});import{Box as GT,Text as lj}from"ink";import{Spinner as TO4}from"@inkjs/ui";import{jsx as rG,jsxs as Lc}from"react/jsx-runtime";function PG$({status:$}){if($==="pending")return rG(TO4,{label:""});return rG(lj,{color:"green",children:"\u2713"})}function AO4($){return`${$.name}: ${$.port||"...."}`}function TG$({services:$,migrationsStatus:Z,home:Q,serverUrl:X}){return Lc(GT,{flexDirection:"column",paddingBottom:1,children:[rG(EG$,{version:NK0.version}),rG(GT,{marginBottom:1,children:rG(lj,{dimColor:!0,children:"\u2500".repeat(80)})}),rG(GT,{children:Lc(lj,{dimColor:!0,children:["Home: ",Q]})}),Lc(GT,{gap:2,children:[$.map((Y)=>Lc(GT,{gap:1,children:[rG(lj,{children:AO4(Y)}),rG(PG$,{status:Y.status})]},Y.name)),Lc(GT,{gap:1,children:[rG(lj,{children:"Migrations"}),rG(PG$,{status:Z})]})]}),rG(GT,{children:X?Lc(lj,{children:["Open in browser: ",rG(lj,{color:"cyan",children:X})]}):rG(lj,{dimColor:!0,children:"Starting..."})})]})}var AG$=L(()=>{$41();zG$()});import{Box as RO4,Text as Is}from"ink";import{jsx as Z41,jsxs as Q41}from"react/jsx-runtime";function qO4($){if($>=500)return"red";if($>=400)return"yellow";if($>=300)return"cyan";return"green"}function RG$({logs:$}){return Z41(RO4,{flexDirection:"column",children:$.map((Z,Q)=>{if(Z.rawLine)return Z41(Is,{dimColor:!0,children:Z.rawLine},Q);let X=Z.duration<1000?`${Z.duration}ms`:`${(Z.duration/1000).toFixed(1)}s`;return Q41(Is,{children:[Q41(Is,{dimColor:!0,children:[Z.method.padEnd(6)," ",Z.path.padEnd(30)," "]}),Z41(Is,{color:qO4(Z.status),children:Z.status}),Q41(Is,{dimColor:!0,children:[" ",X.padStart(8)]})]},Q)})})}var qG$=()=>{};var X41={};J0(X41,{App:()=>VO4});import{Box as MO4}from"ink";import{useSyncExternalStore as IO4}from"react";import{jsx as MG$,jsxs as kO4}from"react/jsx-runtime";function VO4({home:$}){let Z=IO4(o81,t81);return kO4(MO4,{flexDirection:"column",children:[MG$(TG$,{services:Z.services,migrationsStatus:Z.migrationsStatus,home:$,serverUrl:Z.serverUrl}),MG$(RG$,{logs:Z.logs})]})}var Y41=L(()=>{AG$();qG$();JT()});var CW="thread-gate",DL="decopilot-hosted-harness",OL="decopilot-hosted-harness-sandboxed",SW="automations",cj="background-tools",WT="task-board-github-reads";var IG$="13";function VG$($){return{name:"decocms",systemDatabaseUrl:$.systemDatabaseUrl,systemDatabaseSchemaName:"dbos",systemDatabasePoolSize:$.poolSize,runAdminServer:!1,executorID:$.executorID,applicationVersion:IG$,...$.listenQueues!==void 0?{listenQueues:$.listenQueues}:{}}}var kG$=()=>{};import CO4 from"pg";async function SG$($,Z){let{databaseUrl:Q,lockTimeoutMs:X=SO4}=$,Y=$.log??((K)=>console.log(K)),J=new CO4.Client({connectionString:Q});await J.connect();let G=Date.now(),W=!1;try{while(!W){if(W=(await J.query("SELECT pg_try_advisory_lock($1) AS locked",[CG$.toString()])).rows[0]?.locked===!0,W)break;if(Date.now()-G>=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 $$(_O4)}let K=Date.now()-G;if(K>1000)Y(`[dbos] waited ${K}ms for the migration lock; another process migrated first`);return await Z()}finally{if(W)try{await J.query("SELECT pg_advisory_unlock($1)",[CG$.toString()])}catch{}await J.end().catch(()=>{})}}var CG$=8314027461559302n,SO4=600000,_O4=500;var _G$=L(()=>{$8()});function vO4(){let $=(process.env.BUN_OPTIONS??"").split(/\s+/).filter(Boolean);return[...process.argv.slice(1),...$]}function J41($,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 vG$(){let $=vO4();if($.includes("--cpu-prof")){console.log(JSON.stringify({msg:"cpu-profiling-active",dir:J41($,"--cpu-prof-dir")??process.cwd(),name:J41($,"--cpu-prof-name"),markdown:$.includes("--cpu-prof-md"),intervalUs:Number(J41($,"--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 xG$(){if(process.env.HEAP_WATCH!=="1")return()=>{};let $=Number(process.env.HEAP_WATCH_INTERVAL_MS??60000),Z=async()=>{let Q=$T();if(!Q)return;let X={};try{let{heapStats:Y}=await import("bun:jsc"),J=Y(),G=Object.entries(J.objectTypeCounts).sort((W,K)=>K[1]-W[1]).slice(0,20);X={objectCount:J.objectCount,heapSize:J.heapSize,top:Object.fromEntries(G)}}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(()=>{}),BK0=setInterval(()=>void Z().catch(()=>{}),$),BK0.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(BK0)clearInterval(BK0)}}var BK0;var fG$=()=>{};import*as xO4 from"bun:jsc";function bG$(){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{fO4()}catch(J){return console.error("[stall-watchdog] failed to start sampling profiler:",J),()=>{}}let Q,X=performance.now()+Z,Y=()=>{let J=performance.now(),G=J-X;X=J+Z;let W=[];try{W=bO4()?.traces??[]}catch{}if(G>$&&W.length>0){let K=new Map;for(let F of W){let U=F.frames.find((D)=>D.sourceURL&&!/Unknown Executable/.test(D.category??""))??F.frames[0];if(!U)continue;let N=(U.sourceURL??"?").replace(/^.*\/node_modules\//,"node_modules/"),B=`${U.name??"?"} @ ${N}:${U.line??"?"}`;K.set(B,(K.get(B)??0)+1)}let H=[...K.entries()].sort((F,U)=>U[1]-F[1]).slice(0,8).map(([F,U])=>({frame:F,count:U}));console.warn(JSON.stringify({msg:"stall-stack",ts:new Date().toISOString(),lagMs:Math.round(G),samplesInWindow:W.length,top:H}))}Q=setTimeout(Y,Z),Q.unref?.()};return Q=setTimeout(Y,Z),Q.unref?.(),()=>{if(Q)clearTimeout(Q)}}var fO4,bO4;var yG$=L(()=>{({startSamplingProfiler:fO4,samplingProfilerStackTraces:bO4}=xO4)});function gG$(){vG$();let $=[xG$(),H7$(),bG$()];return()=>{for(let Z of $)Z()}}var hG$=L(()=>{hs0();fG$();yG$()});var KT=b((uG$)=>{Object.defineProperty(uG$,"__esModule",{value:!0});uG$.RepublishHeaders=uG$.DirectMsgHeaders=uG$.JsHeaders=uG$.AdvisoryKind=void 0;uG$.isOrderedPushConsumerOptions=yO4;uG$.isPullConsumer=gO4;uG$.isPushConsumer=hO4;uG$.isBoundPushConsumerOptions=uO4;function yO4($){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 gO4($){return $.isPullConsumer()}function hO4($){return $.isPushConsumer()}function uO4($){if($&&typeof $==="object")return"deliver_subject"in $||"deliver_group"in $||"idle_heartbeat"in $;return!1}uG$.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"};uG$.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"};uG$.DirectMsgHeaders={Stream:"Nats-Stream",Sequence:"Nats-Sequence",TimeStamp:"Nats-Time-Stamp",Subject:"Nats-Subject",LastSequence:"Nats-Last-Sequence",NumPending:"Nats-Num-Pending"};uG$.RepublishHeaders={Stream:"Nats-Stream",Subject:"Nats-Subject",Sequence:"Nats-Sequence",LastSequence:"Nats-Last-Sequence",Size:"Nats-Msg-Size"}});var sG=b((cG$)=>{Object.defineProperty(cG$,"__esModule",{value:!0});cG$.TD=cG$.TE=cG$.Empty=void 0;cG$.encode=oO4;cG$.decode=aO4;cG$.Empty=new Uint8Array(0);cG$.TE=new TextEncoder;cG$.TD=new TextDecoder;function tO4(...$){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 oO4(...$){let Z=[];for(let Q=0;Q<$.length;Q++)Z.push(cG$.TE.encode($[Q]));if(Z.length===0)return cG$.Empty;if(Z.length===1)return Z[0];return tO4(...Z)}function aO4($){if(!$||$.length===0)return"";return cG$.TD.decode($)}});var eG=b((iG$)=>{Object.defineProperty(iG$,"__esModule",{value:!0});iG$.errors=iG$.PermissionViolationError=iG$.NoRespondersError=iG$.TimeoutError=iG$.RequestError=iG$.ProtocolError=iG$.ConnectionError=iG$.DrainingConnectionError=iG$.ClosedConnectionError=iG$.AuthorizationError=iG$.UserAuthenticationExpiredError=iG$.InvalidOperationError=iG$.InvalidArgumentError=iG$.InvalidSubjectError=void 0;class W41 extends Error{constructor($,Z){super(`illegal subject: '${$}'`,Z);this.name="InvalidSubjectError"}}iG$.InvalidSubjectError=W41;class LK0 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 LK0(`${$} ${Z}`,Q)}}iG$.InvalidArgumentError=LK0;class K41 extends Error{constructor($,Z){super($,Z);this.name="InvalidOperationError"}}iG$.InvalidOperationError=K41;class DK0 extends Error{constructor($,Z){super($,Z);this.name="UserAuthenticationExpiredError"}static parse($){if($.toLowerCase().indexOf("user authentication expired")!==-1)return new DK0($);return null}}iG$.UserAuthenticationExpiredError=DK0;class OK0 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 OK0($);return null}}iG$.AuthorizationError=OK0;class H41 extends Error{constructor(){super("closed connection");this.name="ClosedConnectionError"}}iG$.ClosedConnectionError=H41;class F41 extends Error{constructor(){super("connection draining");this.name="DrainingConnectionError"}}iG$.DrainingConnectionError=F41;class U41 extends Error{constructor($,Z){super($,Z);this.name="ConnectionError"}}iG$.ConnectionError=U41;class N41 extends Error{constructor($,Z){super($,Z);this.name="ProtocolError"}}iG$.ProtocolError=N41;class B41 extends Error{constructor($="",Z){super($,Z);this.name="RequestError"}isNoResponders(){return this.cause instanceof jK0}}iG$.RequestError=B41;class L41 extends Error{constructor($){super("timeout",$);this.name="TimeoutError"}}iG$.TimeoutError=L41;class jK0 extends Error{subject;constructor($,Z){super(`no responders: '${$}'`,Z);this.subject=$,this.name="NoResponders"}}iG$.NoRespondersError=jK0;class wK0 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,J=$.match(/(Publish|Subscription) to "(\S+)"/);if(J){if(Q=J[1].toLowerCase(),X=J[2],Q==="subscription"){let G=$.match(/using queue "(\S+)"/);if(G)Y=G[1]}}return new wK0($,Q,X,Y)}}iG$.PermissionViolationError=wK0;iG$.errors={AuthorizationError:OK0,ClosedConnectionError:H41,ConnectionError:U41,DrainingConnectionError:F41,InvalidArgumentError:LK0,InvalidOperationError:K41,InvalidSubjectError:W41,NoRespondersError:jK0,PermissionViolationError:wK0,ProtocolError:N41,RequestError:B41,TimeoutError:L41,UserAuthenticationExpiredError:DK0}});var DH=b((aG$)=>{Object.defineProperty(aG$,"__esModule",{value:!0});aG$.SimpleMutex=aG$.Perf=void 0;aG$.extend=Bj4;aG$.render=Lj4;aG$.timeout=Dj4;aG$.delay=Oj4;aG$.deadline=jj4;aG$.deferred=O41;aG$.debugDeferred=wj4;aG$.shuffle=Ej4;aG$.collect=zj4;aG$.jitter=oG$;aG$.backoff=Pj4;aG$.nanos=Tj4;aG$.millis=Aj4;aG$.randomToken=Mj4;var Nj4=sG(),D41=eG();function Bj4($,...Z){for(let Q=0;Q<Z.length;Q++){let X=Z[Q];Object.keys(X).forEach(function(Y){$[Y]=X[Y]})}return $}function Lj4($){return Nj4.TD.decode($).replace(/\n/g,"\u240A").replace(/\r/g,"\u240D")}function Dj4($,Z=!0){let Q=Z?new D41.TimeoutError:null,X,Y,J=new Promise((G,W)=>{X={cancel:()=>{if(Y)clearTimeout(Y)}},Y=setTimeout(()=>{if(Q===null)W(new D41.TimeoutError);else W(Q)},$)});return Object.assign(J,X)}function Oj4($=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 jj4($,Z=1000){let Q=O41(),X=setTimeout(()=>{Q.reject(new D41.TimeoutError)},Z);try{return await Promise.race([$,Q])}finally{clearTimeout(X)}}function O41(){let $={},Z=new Promise((Q,X)=>{$={resolve:Q,reject:X}});return Object.assign(Z,$)}function wj4(){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 Ej4($){for(let Z=$.length-1;Z>0;Z--){let Q=Math.floor(Math.random()*(Z+1));[$[Z],$[Q]]=[$[Q],$[Z]]}return $}async function zj4($){let Z=[];for await(let Q of $)Z.push(Q);return Z}class nG${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})}),$}}aG$.Perf=nG$;class tG${max;current;waiting;constructor($=1){this.max=$,this.current=0,this.waiting=[]}lock(){if(this.current++,this.current<=this.max)return Promise.resolve();let $=O41();return this.waiting.push($),$}unlock(){this.current--,this.waiting.pop()?.resolve()}}aG$.SimpleMutex=tG$;function oG$($){if($===0)return 0;return Math.floor($/2+Math.random()*$)}function Pj4($=[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 oG$(Q>Z?$[Z]:$[Q])}}}function Tj4($){return $*1e6}function Aj4($){return Math.floor($/1e6)}var Rj4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",jL=new Uint8Array(62);for(let $=0;$<62;$++)jL[$]=Rj4.charCodeAt($);var qj4=218340105584896;function Mj4(){let $=Math.floor(Math.random()*qj4),Z=$%62,Q=jL[Z];$=($-Z)/62,Z=$%62;let X=jL[Z];$=($-Z)/62,Z=$%62;let Y=jL[Z];$=($-Z)/62,Z=$%62;let J=jL[Z];$=($-Z)/62,Z=$%62;let G=jL[Z];$=($-Z)/62,Z=$%62;let W=jL[Z];$=($-Z)/62,Z=$%62;let K=jL[Z];$=($-Z)/62;let H=jL[$];return String.fromCharCode(Q,X,Y,J,G,W,K,H)}});var Y3$=b((Q3$)=>{Object.defineProperty(Q3$,"__esModule",{value:!0});Q3$.nuid=Q3$.NuidImpl=void 0;var cj4="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",mj=62,zK0=12,$3$=10,sG$=33,mj4=333,eG$=zK0+$3$,w41=new Uint8Array(mj);for(let $=0;$<mj;$++)w41[$]=cj4.charCodeAt($);var EK0=4294967296,Z3$=BigInt(mj)**BigInt($3$),Vs=Number(Z3$/(1n<<32n)),j41=Number(Z3$%(1n<<32n));function dj4($){for(let Z=0;Z<$.length;Z++)$[Z]=Math.floor(Math.random()*256)}function ij4($){if(globalThis?.crypto?.getRandomValues)globalThis.crypto.getRandomValues($);else dj4($)}class E41{buf;cbuf;seqHi;seqLo;inc;inited;constructor(){this.buf=new Uint8Array(eG$),this.cbuf=new Uint8Array(zK0),this.inited=!1}init(){this.inited=!0,this.setPre(),this.initSeqAndInc(),this.fillSeq()}initSeqAndInc(){let $=0;do this.seqHi=Math.floor(Math.random()*(Vs+1)),this.seqLo=Math.floor(Math.random()*EK0);while($++<8&&this.seqHi===Vs&&this.seqLo>=j41);if(this.seqHi===Vs&&this.seqLo>=j41)this.seqLo=0;this.inc=Math.random()*(mj4-sG$)+sG$|0}setPre(){ij4(this.cbuf);for(let $=0;$<zK0;$++)this.buf[$]=w41[this.cbuf[$]%mj]}fillSeq(){let $=this.seqHi,Z=this.seqLo;for(let Q=eG$-1;Q>=zK0;Q--){let X=Math.floor($/mj),J=($-X*mj)*EK0+Z,G=Math.floor(J/mj),W=J-G*mj;this.buf[Q]=w41[W],$=X,Z=G}}next(){if(!this.inited)this.init();if(this.seqLo+=this.inc,this.seqLo>=EK0)this.seqLo-=EK0,this.seqHi+=1;if(this.seqHi>Vs||this.seqHi===Vs&&this.seqLo>=j41)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()}}Q3$.NuidImpl=E41;Q3$.nuid=new E41});var K3$=b((G3$)=>{Object.defineProperty(G3$,"__esModule",{value:!0});G3$.nuid=G3$.Nuid=void 0;var J3$=Y3$();G3$.Nuid=J3$.NuidImpl;G3$.nuid=J3$.nuid});var TK0=b((PK0)=>{Object.defineProperty(PK0,"__esModule",{value:!0});PK0.nuid=PK0.Nuid=void 0;var H3$=K3$();Object.defineProperty(PK0,"Nuid",{enumerable:!0,get:function(){return H3$.Nuid}});Object.defineProperty(PK0,"nuid",{enumerable:!0,get:function(){return H3$.nuid}})});var dj=b((F3$)=>{Object.defineProperty(F3$,"__esModule",{value:!0});F3$.DEFAULT_HOST=F3$.DEFAULT_PORT=F3$.Match=void 0;F3$.syncIterator=rj4;F3$.createInbox=sj4;var oj4=TK0(),aj4=eG();F3$.Match={Exact:"exact",CanonicalMIME:"canonical",IgnoreCase:"insensitive"};function rj4($){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 sj4($=""){if($=$||"_INBOX",typeof $!=="string")throw TypeError("prefix must be a string");return $.split(".").forEach((Z)=>{if(Z==="*"||Z===">")throw aj4.InvalidArgumentError.format("prefix",`cannot have wildcards ('${$}')`)}),`${$}.${oj4.nuid.next()}`}F3$.DEFAULT_PORT=4222;F3$.DEFAULT_HOST="127.0.0.1"});var ks=b((L3$)=>{Object.defineProperty(L3$,"__esModule",{value:!0});L3$.DataBuffer=void 0;var N3$=sG();class B3${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 N3$.TE.encode($)}static toAscii($){return N3$.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}}L3$.DataBuffer=B3$});var HT=b((j3$)=>{Object.defineProperty(j3$,"__esModule",{value:!0});j3$.LF=j3$.CR=j3$.CRLF=j3$.CR_LF_LEN=j3$.CR_LF=void 0;j3$.setTransportFactory=Gw4;j3$.defaultPort=Ww4;j3$.getUrlParseFn=Kw4;j3$.newTransport=Hw4;j3$.getResolveFn=Fw4;j3$.protoLen=O3$;j3$.extractProtocolMessage=Uw4;var Xw4=sG(),Yw4=dj(),Jw4=ks(),$3;function Gw4($){$3=$}function Ww4(){return $3!==void 0&&$3.defaultPort!==void 0?$3.defaultPort:Yw4.DEFAULT_PORT}function Kw4(){return $3!==void 0&&$3.urlParseFn?$3.urlParseFn:void 0}function Hw4(){if(!$3||typeof $3.factory!=="function")throw Error("transport fn is not set");return $3.factory()}function Fw4(){return $3!==void 0&&$3.dnsResolveFn?$3.dnsResolveFn:void 0}j3$.CR_LF=`\r
2182
2182
  `;j3$.CR_LF_LEN=j3$.CR_LF.length;j3$.CRLF=Jw4.DataBuffer.fromAscii(j3$.CR_LF);j3$.CR=new Uint8Array(j3$.CRLF)[0];j3$.LF=new Uint8Array(j3$.CRLF)[1];function O3$($){for(let Z=0;Z<$.length;Z++){let Q=Z+1;if($.byteLength>Q&&$[Z]===j3$.CR&&$[Q]===j3$.LF)return Q+1}return 0}function Uw4($){let Z=O3$($);if(Z>0){let X=new Uint8Array($).slice(0,Z);return Xw4.TD.decode(X)}return""}});var R41=b((q3$)=>{Object.defineProperty(q3$,"__esModule",{value:!0});q3$.ipV4=T3$;q3$.isIP=Tw4;q3$.parseIP=A3$;var Cs=4,FT=16,AK0=48,P3$=57,E3$=65,zw4=70,z3$=97,Pw4=102,A41=16777215;function T3$($,Z,Q,X){let Y=new Uint8Array(FT);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((G,W)=>{Y[W]=G}),Y[12]=$,Y[13]=Z,Y[14]=Q,Y[15]=X,Y}function Tw4($){return A3$($)!==void 0}function A3$($){for(let Z=0;Z<$.length;Z++)switch($[Z]){case".":return R3$($);case":":return Aw4($)}return}function R3$($){let Z=new Uint8Array(Cs);for(let Q=0;Q<Cs;Q++){if($.length===0)return;if(Q>0){if($[0]!==".")return;$=$.substring(1)}let{n:X,c:Y,ok:J}=Rw4($);if(!J||X>255)return;$=$.substring(Y),Z[Q]=X}return T3$(Z[0],Z[1],Z[2],Z[3])}function Aw4($){let Z=new Uint8Array(FT),Q=-1;if($.length>=2&&$[0]===":"&&$[1]===":"){if(Q=0,$=$.substring(2),$.length===0)return Z}let X=0;while(X<FT){let{n:Y,c:J,ok:G}=qw4($);if(!G||Y>65535)return;if(J<$.length&&$[J]==="."){if(Q<0&&X!=FT-Cs)return;if(X+Cs>FT)return;let W=R3$($);if(W===void 0)return;Z[X]=W[12],Z[X+1]=W[13],Z[X+2]=W[14],Z[X+3]=W[15],$="",X+=Cs;break}if(Z[X]=Y>>8,Z[X+1]=Y,X+=2,$=$.substring(J),$.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<FT){if(Q<0)return;let Y=FT-X;for(let J=X-1;J>=Q;J--)Z[J+Y]=Z[J];for(let J=Q+Y-1;J>=Q;J--)Z[J]=0}else if(Q>=0)return;return Z}function Rw4($){let Z=0,Q=0;for(Z=0;Z<$.length&&AK0<=$.charCodeAt(Z)&&$.charCodeAt(Z)<=P3$;Z++)if(Q=Q*10+($.charCodeAt(Z)-AK0),Q>=A41)return{n:A41,c:Z,ok:!1};if(Z===0)return{n:0,c:0,ok:!1};return{n:Q,c:Z,ok:!0}}function qw4($){let Z=0,Q=0;for(Q=0;Q<$.length;Q++){if(AK0<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=P3$)Z*=16,Z+=$.charCodeAt(Q)-AK0;else if(z3$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=Pw4)Z*=16,Z+=$.charCodeAt(Q)-z3$+10;else if(E3$<=$.charCodeAt(Q)&&$.charCodeAt(Q)<=zw4)Z*=16,Z+=$.charCodeAt(Q)-E3$+10;else break;if(Z>=A41)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 C41=b((I3$)=>{Object.defineProperty(I3$,"__esModule",{value:!0});I3$.Servers=I3$.ServerImpl=void 0;I3$.isIPV4OrHostname=M3$;I3$.hostPort=k41;var q41=HT(),M41=DH(),I41=R41(),kw4=dj(),Cw4=eG();function M3$($){if($.indexOf("[")!==-1||$.indexOf("::")!==-1)return!1;if($.indexOf(".")!==-1)return!0;if($.split(":").length<=2)return!0;return!1}function V41($){return!M3$($)}function Sw4($){let Q=$.toUpperCase().indexOf("::FFFF:");if(Q!==-1&&$.indexOf(".")!==-1){let X=$.substring(Q+7);return X=X.replace("[",""),X.replace("]","")}return $}function k41($){if($=$.trim(),$.match(/^(.*:\/\/)(.*)/m))$=$.replace(/^(.*:\/\/)(.*)/gm,"$2");if($=Sw4($),V41($)&&$.indexOf("[")===-1)$=`[${$}]`;let Z=V41($)?$.match(/(]:)(\d+)/):$.match(/(:)(\d+)/),Q=Z&&Z.length===3&&Z[1]&&Z[2]?parseInt(Z[2]):kw4.DEFAULT_PORT,Y=new URL(`${Q===80?"https":"http"}://${$}`);Y.port=`${Q}`;let J=Y.hostname;if(J.charAt(0)==="[")J=J.substring(1,J.length-1);return{listen:Y.host,hostname:J,port:Q}}class Dc{src;listen;hostname;port;didConnect;reconnects;lastConnect;gossiped;tlsName;resolves;constructor($,Z=!1){this.src=$,this.tlsName="";let Q=k41($);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,I41.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",J=new URL(`${Y}://${V41(X)?"["+X+"]":X}`);J.port=`${this.port}`;let G=new Dc(J.host,!1);G.tlsName=this.hostname,Z.push(G)}}if($.randomize)(0,M41.shuffle)(Z);return this.resolves=Z,Z}}I3$.ServerImpl=Dc;class RK0{firstSelect;servers;currentServer;tlsName;randomize;constructor($={}){this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=$.randomize||!1}setServers($){if(!Array.isArray($)||$.length===0)throw Cw4.InvalidArgumentError.format("servers","cannot be empty");let Z=(0,q41.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:J}=k41(Y),G=Q.get(J);if(G)G.gossiped=!1,X.push(G);else X.push(new Dc(Y))}if(this.randomize)(0,M41.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,I41.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,q41.getUrlParseFn)();$=Q?Q($):$;let X=new Dc($,Z);if((0,I41.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 RK0.freezeAll(this.servers)}snapshotForHandler(){let $=this.currentServer;if(!$)return this.snapshot();let Z=this.servers.indexOf($);if(Z<=0)return this.snapshot();return RK0.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,q41.getUrlParseFn)(),J=new Map;if($.connect_urls&&$.connect_urls.length>0)$.connect_urls.forEach((W)=>{W=Y?Y(W,Z):W;let K=new Dc(W,!0);J.set(W,K)});let G=[];if(this.servers.forEach((W,K)=>{let H=W.listen;if(W.gossiped&&this.currentServer.listen!==H&&J.get(H)===void 0)G.push(K);J.delete(H)}),G.reverse(),G.forEach((W)=>{let K=this.servers.splice(W,1);X=X.concat(K[0].listen)}),J.forEach((W,K)=>{this.servers.push(W),Q.push(K)}),this.randomize&&Q.length>0){let W=this.currentServer,K=this.servers.filter((H)=>H!==W);(0,M41.shuffle)(K),this.servers=W?[W,...K]:K}return{added:Q,deleted:X}}}I3$.Servers=RK0});var qK0=b((S3$)=>{Object.defineProperty(S3$,"__esModule",{value:!0});S3$.QueuedIteratorImpl=void 0;var S41=DH(),k3$=eG();class C3${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,S41.deferred)(),this.yields=[],this.iterClosed=(0,S41.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 k3$.InvalidOperationError("iterator cannot be used when a callback is registered");if(this.yielding)throw new k3$.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,S41.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}}S3$.QueuedIteratorImpl=C3$});var _41=b((f3$)=>{Object.defineProperty(f3$,"__esModule",{value:!0});f3$.MuxSubscription=void 0;var fw4=dj(),v3$=eG();class x3${baseInbox;reqs;constructor(){this.reqs=new Map}size(){return this.reqs.size}init($){return this.baseInbox=`${(0,fw4.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 v3$.NoRespondersError(X.requestSubject):null;X.resolver($,Z)}}}}close(){let $=new v3$.RequestError("connection closed");this.reqs.forEach((Z)=>{Z.resolver($,{})})}}f3$.MuxSubscription=x3$});var v41=b((g3$)=>{Object.defineProperty(g3$,"__esModule",{value:!0});g3$.Heartbeat=void 0;var bw4=DH();class y3${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,bw4.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})}}g3$.Heartbeat=y3$});var b41=b((m3$)=>{Object.defineProperty(m3$,"__esModule",{value:!0});m3$.DenoBuffer=m3$.MAX_SIZE=m3$.AssertionError=void 0;m3$.assert=l3$;m3$.concat=c3$;m3$.append=gw4;m3$.readAll=hw4;m3$.writeAll=uw4;var yw4=sG();class x41 extends Error{constructor($){super($);this.name="AssertionError"}}m3$.AssertionError=x41;function l3$($,Z="Assertion failed."){if(!$)throw new x41(Z)}var u3$=32768;m3$.MAX_SIZE=4294967294;function MK0($,Z,Q=0){let X=Z.byteLength-Q;if($.byteLength>X)$=$.subarray(0,X);return Z.set($,Q),$.byteLength}function c3$($,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 gw4($,Z){return c3$($,Uint8Array.of(Z))}class f41{_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($){l3$($<=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=MK0(this._buf.subarray(this._off),$);return this._off+=Z,Z}writeByte($){return this.write(Uint8Array.of($))}writeString($){return this.write(yw4.TE.encode($))}write($){let Z=this._grow($.byteLength);return MK0($,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)MK0(this._buf.subarray(this._off),this._buf);else if(X+$>m3$.MAX_SIZE)throw Error("The buffer cannot be grown beyond the maximum size.");else{let Y=new Uint8Array(Math.min(2*X+$,m3$.MAX_SIZE));MK0(this._buf.subarray(this._off),Y),this._buf=Y}return this._off=0,this._reslice(Math.min(Z+$,m3$.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(u3$);while(!0){let X=this.capacity-this.length<u3$,Y=X?Q:new Uint8Array(this._buf.buffer,this.length),J=$.read(Y);if(J===null)return Z;if(X)this.write(Y.subarray(0,J));else this._reslice(this.length+J);Z+=J}}}m3$.DenoBuffer=f41;function hw4($){let Z=new f41;return Z.readFrom($),Z.bytes()}function uw4($,Z){let Q=0;while(Q<Z.length)Q+=$.write(Z.subarray(Q))}});var h41=b((t3$)=>{Object.defineProperty(t3$,"__esModule",{value:!0});t3$.cc=t3$.State=t3$.Parser=t3$.Kind=void 0;t3$.describe=nw4;var y41=b41(),g41=sG();t3$.Kind={OK:0,ERR:1,MSG:2,INFO:3,PING:4,PONG:5};function nw4($){let Z,Q="";switch($.kind){case t3$.Kind.MSG:Z="MSG";break;case t3$.Kind.OK:Z="OK";break;case t3$.Kind.ERR:Z="ERR",Q=g41.TD.decode($.data);break;case t3$.Kind.PING:Z="PING";break;case t3$.Kind.PONG:Z="PONG";break;case t3$.Kind.INFO:Z="INFO",Q=g41.TD.decode($.data)}return`${Z}: ${Q}`}function i3$(){let $={};return $.sid=-1,$.hdr=-1,$.size=-1,$}var p3$=48,tw4=57,Oc=67108864;class n3${dispatcher;state;as;drop;hdr;ma;argBuf;msgBuf;constructor($){this.dispatcher=$,this.state=t3$.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 t3$.State.OP_START:switch(Q){case t3$.cc.M:case t3$.cc.m:this.state=t3$.State.OP_M,this.hdr=-1,this.ma=i3$();break;case t3$.cc.H:case t3$.cc.h:this.state=t3$.State.OP_H,this.hdr=0,this.ma=i3$();break;case t3$.cc.P:case t3$.cc.p:this.state=t3$.State.OP_P;break;case t3$.cc.PLUS:this.state=t3$.State.OP_PLUS;break;case t3$.cc.MINUS:this.state=t3$.State.OP_MINUS;break;case t3$.cc.I:case t3$.cc.i:this.state=t3$.State.OP_I;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_H:switch(Q){case t3$.cc.M:case t3$.cc.m:this.state=t3$.State.OP_M;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_M:switch(Q){case t3$.cc.S:case t3$.cc.s:this.state=t3$.State.OP_MS;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MS:switch(Q){case t3$.cc.G:case t3$.cc.g:this.state=t3$.State.OP_MSG;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MSG:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:this.state=t3$.State.OP_MSG_SPC;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MSG_SPC:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:continue;default:this.state=t3$.State.MSG_ARG,this.as=Z}break;case t3$.State.MSG_ARG:switch(Q){case t3$.cc.CR:this.drop=1;break;case t3$.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=t3$.State.MSG_PAYLOAD,Z=this.as+this.ma.size-1;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;case t3$.State.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){let X=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:t3$.Kind.MSG,msg:this.ma,data:X}),this.argBuf=void 0,this.msgBuf=void 0,this.state=t3$.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:t3$.Kind.MSG,msg:this.ma,data:$.subarray(this.as,Z)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=t3$.State.MSG_END;break;case t3$.State.MSG_END:switch(Q){case t3$.cc.NL:this.drop=0,this.as=Z+1,this.state=t3$.State.OP_START;break;default:continue}break;case t3$.State.OP_PLUS:switch(Q){case t3$.cc.O:case t3$.cc.o:this.state=t3$.State.OP_PLUS_O;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PLUS_O:switch(Q){case t3$.cc.K:case t3$.cc.k:this.state=t3$.State.OP_PLUS_OK;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PLUS_OK:switch(Q){case t3$.cc.NL:this.dispatcher.push({kind:t3$.Kind.OK}),this.drop=0,this.state=t3$.State.OP_START;break}break;case t3$.State.OP_MINUS:switch(Q){case t3$.cc.E:case t3$.cc.e:this.state=t3$.State.OP_MINUS_E;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MINUS_E:switch(Q){case t3$.cc.R:case t3$.cc.r:this.state=t3$.State.OP_MINUS_ER;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MINUS_ER:switch(Q){case t3$.cc.R:case t3$.cc.r:this.state=t3$.State.OP_MINUS_ERR;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MINUS_ERR:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:this.state=t3$.State.OP_MINUS_ERR_SPC;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_MINUS_ERR_SPC:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:continue;default:this.state=t3$.State.MINUS_ERR_ARG,this.as=Z}break;case t3$.State.MINUS_ERR_ARG:switch(Q){case t3$.cc.CR:this.drop=1;break;case t3$.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:t3$.Kind.ERR,data:X}),this.drop=0,this.as=Z+1,this.state=t3$.State.OP_START;break}default:if(this.argBuf)this.argBuf.write(Uint8Array.of(Q))}break;case t3$.State.OP_P:switch(Q){case t3$.cc.I:case t3$.cc.i:this.state=t3$.State.OP_PI;break;case t3$.cc.O:case t3$.cc.o:this.state=t3$.State.OP_PO;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PO:switch(Q){case t3$.cc.N:case t3$.cc.n:this.state=t3$.State.OP_PON;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PON:switch(Q){case t3$.cc.G:case t3$.cc.g:this.state=t3$.State.OP_PONG;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PONG:switch(Q){case t3$.cc.NL:this.dispatcher.push({kind:t3$.Kind.PONG}),this.drop=0,this.state=t3$.State.OP_START;break}break;case t3$.State.OP_PI:switch(Q){case t3$.cc.N:case t3$.cc.n:this.state=t3$.State.OP_PIN;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PIN:switch(Q){case t3$.cc.G:case t3$.cc.g:this.state=t3$.State.OP_PING;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_PING:switch(Q){case t3$.cc.NL:this.dispatcher.push({kind:t3$.Kind.PING}),this.drop=0,this.state=t3$.State.OP_START;break}break;case t3$.State.OP_I:switch(Q){case t3$.cc.N:case t3$.cc.n:this.state=t3$.State.OP_IN;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_IN:switch(Q){case t3$.cc.F:case t3$.cc.f:this.state=t3$.State.OP_INF;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_INF:switch(Q){case t3$.cc.O:case t3$.cc.o:this.state=t3$.State.OP_INFO;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_INFO:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:this.state=t3$.State.OP_INFO_SPC;break;default:throw this.fail($.subarray(Z))}break;case t3$.State.OP_INFO_SPC:switch(Q){case t3$.cc.SPACE:case t3$.cc.TAB:continue;default:this.state=t3$.State.INFO_ARG,this.as=Z}break;case t3$.State.INFO_ARG:switch(Q){case t3$.cc.CR:this.drop=1;break;case t3$.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:t3$.Kind.INFO,data:X}),this.drop=0,this.as=Z+1,this.state=t3$.State.OP_START;break}default:if(this.argBuf)this.argBuf.writeByte(Q)}break;default:throw this.fail($.subarray(Z))}}if((this.state===t3$.State.MSG_ARG||this.state===t3$.State.MINUS_ERR_ARG||this.state===t3$.State.INFO_ARG)&&!this.argBuf)this.argBuf=new y41.DenoBuffer($.subarray(this.as,Z-this.drop));if(this.state===t3$.State.MSG_PAYLOAD&&!this.msgBuf){if(!this.argBuf)this.cloneMsgArg();this.msgBuf=new y41.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 y41.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 t3$.cc.SPACE:case t3$.cc.TAB:case t3$.cc.CR:case t3$.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],Oc);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],Oc);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}: ${g41.TD.decode($)}`)}processHeaderMsgArgs($){let Z=[],Q=-1;for(let X=0;X<$.length;X++)switch($[X]){case t3$.cc.SPACE:case t3$.cc.TAB:case t3$.cc.CR:case t3$.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],Oc),this.ma.size=this.protoParseInt(Z[3],Oc);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],Oc),this.ma.size=this.protoParseInt(Z[4],Oc);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]<p3$||$[X]>tw4)return-1;Q=Q*10+($[X]-p3$)}return Z!==void 0&&Q>Z?-1:Q}}t3$.Parser=n3$;t3$.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};t3$.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 kK0=b((a3$)=>{Object.defineProperty(a3$,"__esModule",{value:!0});a3$.MsgHdrsImpl=void 0;a3$.canonicalMIMEHeaderKey=l41;a3$.headers=rw4;var o3$=sG(),OH=dj(),VK0=eG();function l41($){let F=!0,U=Array($.length);for(let N=0;N<$.length;N++){let B=$.charCodeAt(N);if(B===58||B<33||B>126)throw VK0.InvalidArgumentError.format("header",`'${$[N]}' is not a valid character in a header name`);if(F&&97<=B&&B<=122)B-=32;else if(!F&&65<=B&&B<=90)B+=32;U[N]=B,F=B==45}return String.fromCharCode(...U)}function rw4($=0,Z=""){if($===0&&Z!=="")throw VK0.InvalidArgumentError.format("code","is required");else if($>0&&Z==="")throw VK0.InvalidArgumentError.format("description","is required");return new jc($,Z)}var u41="NATS/1.0";class jc{_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(),J=[...X].sort();for(let G=0;G<Y.length;G++)if(Y[G]!==J[G])return!1}return!0}return!1}static decode($){let Z=new jc,X=o3$.TD.decode($).split(`\r
2183
2183
  `),Y=X[0];if(Y!==u41){let J=Y.replace(u41,"").trim();if(J.length>0){if(Z._code=parseInt(J,10),isNaN(Z._code))Z._code=0;let G=Z._code.toString();J=J.replace(G,""),Z._description=J.trim()}}if(X.length>=1)X.slice(1).map((J)=>{if(J){let G=J.indexOf(":");if(G>-1){let W=J.slice(0,G),K=J.slice(G+1).trim();Z.append(W,K)}}});return Z}toString(){if(this.headers.size===0&&this._code===0)return"";let $=u41;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
2184
2184
  ${Z}: ${Q[X]}`;return`${$}\r