decocms 4.499.4 → 4.500.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-CdFbjrR7.js → ActiveShapeUtils-CHPU_j8T.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-D64F5QZT.js → AlertCircle-CgfWDsMW.js} +1 -1
  3. package/dist/client/assets/{AreaChart-CYq0YnIM.js → AreaChart-CZuIkHuk.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-EtQNZvkL.js → ArrowLeft-BkyozCr0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BmL0BCqN.js → ArrowUp-C0O7U47F.js} +1 -1
  6. package/dist/client/assets/{BarChart-BUo0UZBI.js → BarChart-D_Vp8_nk.js} +1 -1
  7. package/dist/client/assets/{Building02-BYNzIC0_.js → Building02-C5UvSZSt.js} +1 -1
  8. package/dist/client/assets/{CategoricalChart-gICvYmdu.js → CategoricalChart-CYT1jRTo.js} +1 -1
  9. package/dist/client/assets/{CheckCircle-CH2lIoTv.js → CheckCircle-B1cLRmIj.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-CKkMIQxq.js → ChevronSelectorVertical-bEeSv3mr.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-DAOjkMPN.js → ChevronUp-D_qU7VrJ.js} +1 -1
  12. package/dist/client/assets/{Copy01-m_uwkeCD.js → Copy01-CT_cEqll.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-KdIaDPg-.js → CreditCard01-DFGzM4td.js} +1 -1
  14. package/dist/client/assets/{DotsVertical-KRHoqp1L.js → DotsVertical-CGu7Zbqo.js} +1 -1
  15. package/dist/client/assets/{ErrorBarContext-DIkwMkDv.js → ErrorBarContext-BOQmu79L.js} +1 -1
  16. package/dist/client/assets/{Globe04-CHfMY--P.js → Globe04-DtoCZsmb.js} +1 -1
  17. package/dist/client/assets/{Image01-B9K7stDA.js → Image01-CyU1b2Nz.js} +1 -1
  18. package/dist/client/assets/{Key01-c7pIbph9.js → Key01-CV4MPPMx.js} +1 -1
  19. package/dist/client/assets/{Link01-DTA9h0Tu.js → Link01-BL0KHGWk.js} +1 -1
  20. package/dist/client/assets/{LinkBroken01-mDg_NFsQ.js → LinkBroken01-CImL6HGl.js} +1 -1
  21. package/dist/client/assets/{Monitor01-tGDWsmdz.js → Monitor01-jDiltU3l.js} +1 -1
  22. package/dist/client/assets/{Play-BLgdJi2k.js → Play-HeD-LWQ6.js} +1 -1
  23. package/dist/client/assets/{Plus-pPXfDuHo.js → Plus-BzLmRH_e.js} +1 -1
  24. package/dist/client/assets/{SearchMd-DeQ9Yg2y.js → SearchMd-X-m-ot0f.js} +1 -1
  25. package/dist/client/assets/{Sector-BRuBdQGv.js → Sector-Dk1WFIe-.js} +1 -1
  26. package/dist/client/assets/{ShoppingBag01-B29gM6zx.js → ShoppingBag01-C30WMfg1.js} +1 -1
  27. package/dist/client/assets/{Sun-D1zmKedp.js → Sun-D5cuTnns.js} +1 -1
  28. package/dist/client/assets/{SwitchHorizontal01-DqVKqG_v.js → SwitchHorizontal01-iT36Ixqz.js} +1 -1
  29. package/dist/client/assets/{Tool01-lGWsEi__.js → Tool01-BLdqmAM-.js} +1 -1
  30. package/dist/client/assets/{Trash01-DiDmAdCb.js → Trash01-DkcAHDGj.js} +1 -1
  31. package/dist/client/assets/{Upload01-DMts0djm.js → Upload01-CJxfk4_B.js} +1 -1
  32. package/dist/client/assets/{User01-_d4aL8so.js → User01-CuJbE_Yd.js} +1 -1
  33. package/dist/client/assets/{UserSquare-DEMY8dZu.js → UserSquare-BlSFjBrQ.js} +1 -1
  34. package/dist/client/assets/{Users01-BXstoO15.js → Users01-CgCEjxiR.js} +1 -1
  35. package/dist/client/assets/{XAxis-D8Y5Kl9D.js → XAxis-B6hTknR7.js} +1 -1
  36. package/dist/client/assets/{XClose-2vYA1mGz.js → XClose-BcQlXPoY.js} +1 -1
  37. package/dist/client/assets/{ZoomOut-Dncux2m4.js → ZoomOut-C_NtAfgt.js} +1 -1
  38. package/dist/client/assets/{access-gate-D8G3JOM8.js → access-gate-0Qu33vtT.js} +1 -1
  39. package/dist/client/assets/{add-connection-dialog-B5koNYc3.js → add-connection-dialog-CmVGiYmi.js} +1 -1
  40. package/dist/client/assets/{agent-analytics-DLUHcg3e.js → agent-analytics-DbQCZ1PQ.js} +1 -1
  41. package/dist/client/assets/agent-app-BExNHlBs.js +1 -0
  42. package/dist/client/assets/{agent-assets-B1bgJ5fo.js → agent-assets-B-t0qw5_.js} +1 -1
  43. package/dist/client/assets/{agent-automation-Bv-uIzMa.js → agent-automation-AdWBGK9-.js} +1 -1
  44. package/dist/client/assets/{agent-automations-DF7i-4sf.js → agent-automations-x2lM3jDX.js} +1 -1
  45. package/dist/client/assets/{agent-connect-sources-lkHg-cNh.js → agent-connect-sources-DygiFIri.js} +1 -1
  46. package/dist/client/assets/agent-deck-GAA8uH06.js +1 -0
  47. package/dist/client/assets/{agent-e2e-B14Xfx41.js → agent-e2e-CDURPj47.js} +1 -1
  48. package/dist/client/assets/{agent-experiments-DZm0rMa9.js → agent-experiments-BIa2lB5Q.js} +1 -1
  49. package/dist/client/assets/{agent-file-DqhHVftY.js → agent-file-BKXQWZUy.js} +1 -1
  50. package/dist/client/assets/{agent-hosting-DW8hkmOy.js → agent-hosting-BYQZVYMZ.js} +1 -1
  51. package/dist/client/assets/{agent-icon-DsEoh1uc.js → agent-icon-CsQzAnP1.js} +1 -1
  52. package/dist/client/assets/agent-library-CJXihsv5.js +1 -0
  53. package/dist/client/assets/agent-library-file-Cnv04MVV.js +1 -0
  54. package/dist/client/assets/{agent-monitor-AJmZ909K.js → agent-monitor-CCT32NKJ.js} +1 -1
  55. package/dist/client/assets/{agent-overview-C_GU16D4.js → agent-overview-dfgPX_7d.js} +1 -1
  56. package/dist/client/assets/agent-settings-BTMD0j_l.js +1 -0
  57. package/dist/client/assets/{agent-site-editor-DEB1cxAk.js → agent-site-editor-CG3fYjTa.js} +1 -1
  58. package/dist/client/assets/agent-site-editor-code-Crxw0pRq.js +2 -0
  59. package/dist/client/assets/{agent-site-editor-content-Dz7QiUBS.js → agent-site-editor-content-5eCWHoNS.js} +3 -3
  60. package/dist/client/assets/{agent-site-editor-preview-Bmq9D0yU.js → agent-site-editor-preview-uwuaRHqi.js} +3 -3
  61. package/dist/client/assets/agent-view-DVbx7Not.js +1 -0
  62. package/dist/client/assets/{agent-view-guard-CXRvnSDZ.js → agent-view-guard-e44iAytb.js} +1 -1
  63. package/dist/client/assets/{agents-list-CsftxeY4.js → agents-list-C2x26zj4.js} +1 -1
  64. package/dist/client/assets/ai-providers-DwXqL2iz.js +6 -0
  65. package/dist/client/assets/{alert-Dy4dU1R7.js → alert-DYD14Lxr.js} +1 -1
  66. package/dist/client/assets/{alert-dialog-BURK0-VV.js → alert-dialog-D2yDyccd.js} +1 -1
  67. package/dist/client/assets/{analytics-sections-DEh2Id4y.js → analytics-sections-CYXgA9AC.js} +1 -1
  68. package/dist/client/assets/api-keys-B_VU2t2_.js +1 -0
  69. package/dist/client/assets/{api-keys-CjTAbVY8.js → api-keys-BtQl5Awe.js} +1 -1
  70. package/dist/client/assets/app-editor-fWZMbht-.js +1 -0
  71. package/dist/client/assets/{asset-utils-CAN25Z2R.js → asset-utils-cuI-wo7N.js} +1 -1
  72. package/dist/client/assets/{auth-4ol_FgC8.js → auth-CsAAW7Ar.js} +1 -1
  73. package/dist/client/assets/{auth-catchall-DxIzjexT.js → auth-catchall-CDMks_Rc.js} +1 -1
  74. package/dist/client/assets/{auth-entry-Duu0pw9M.js → auth-entry-Cwn8f6E3.js} +1 -1
  75. package/dist/client/assets/{auth-split-layout-DTCIfCq3.js → auth-split-layout-DFsDNY_O.js} +1 -1
  76. package/dist/client/assets/{authenticate-and-persist-oauth-DhKApzWO.js → authenticate-and-persist-oauth-HfpfV8ZS.js} +1 -1
  77. package/dist/client/assets/{automation-list-row-Cdl0VdqB.js → automation-list-row-Bgtl2dei.js} +1 -1
  78. package/dist/client/assets/{automation-runs-DYfkPQkf.js → automation-runs-CBT3E_fm.js} +1 -1
  79. package/dist/client/assets/{automations-C09hGDxa.js → automations-BSD8vInf.js} +1 -1
  80. package/dist/client/assets/{autosend-CZXcTLSS.js → autosend-8ZqTuUx9.js} +1 -1
  81. package/dist/client/assets/{avatar-NvpT5YGL.js → avatar-Da-P84-z.js} +1 -1
  82. package/dist/client/assets/{badge-BeAl2FZH.js → badge-CJ5q8uJu.js} +1 -1
  83. package/dist/client/assets/{block-document-DZ5eZnd4.js → block-document-Drzpg_bb.js} +1 -1
  84. package/dist/client/assets/{blocks-preview-workspace-context-DZFHbEt5.js → blocks-preview-workspace-context-CJnlWxc-.js} +1 -1
  85. package/dist/client/assets/{blog-schema-CW5b1zW6.js → blog-schema-WI1e8zgj.js} +1 -1
  86. package/dist/client/assets/{board-analytics-Dxe4o8ip.js → board-analytics-Cla3ZHOc.js} +1 -1
  87. package/dist/client/assets/{buckets-CHH4zUVE.js → buckets-BO0Sw74J.js} +1 -1
  88. package/dist/client/assets/{build-improve-prompt-doc-DtDq3oLF.js → build-improve-prompt-doc-BWoapP6S.js} +1 -1
  89. package/dist/client/assets/{calendar-BTm6tG9I.js → calendar-DKYy6uOJ.js} +1 -1
  90. package/dist/client/assets/{capability-load-error-_NmD-cOl.js → capability-load-error-DGJphxbe.js} +1 -1
  91. package/dist/client/assets/{category-editor-DYUGLxsQ.js → category-editor-C6uMv0OA.js} +1 -1
  92. package/dist/client/assets/{chart-Ca9eR_5Y.js → chart-CUhY88so.js} +1 -1
  93. package/dist/client/assets/chat-context-y8u3K9Tq.js +39 -0
  94. package/dist/client/assets/{chat-draft-CoTQGBD-.js → chat-draft-RqSOe2VX.js} +1 -1
  95. package/dist/client/assets/{checkbox-B5y_PGOi.js → checkbox-cuQOxwwj.js} +1 -1
  96. package/dist/client/assets/{choose-editor-DIX9TXPq.js → choose-editor-DVY0m-0N.js} +1 -1
  97. package/dist/client/assets/{claim-phase-copy-BFw44X02.js → claim-phase-copy-kSJ81npa.js} +1 -1
  98. package/dist/client/assets/{cli-auth-success-C6re7iuj.js → cli-auth-success-BNNiQ0ff.js} +1 -1
  99. package/dist/client/assets/{client-icons-CPh76puz.js → client-icons-k3K_Wm7m.js} +1 -1
  100. package/dist/client/assets/{collapsible-B1qwBokh.js → collapsible-DEfXG6Ht.js} +1 -1
  101. package/dist/client/assets/{collection-detail-wRbiZfyr.js → collection-detail-CUR7b1nw.js} +1 -1
  102. package/dist/client/assets/{collection-display-button-BUb3CJ9K.js → collection-display-button-Bii74DZw.js} +1 -1
  103. package/dist/client/assets/{collection-search-CxS-WOiV.js → collection-search-C-3HPALa.js} +1 -1
  104. package/dist/client/assets/{collection-table-wrapper-DieyB_hA.js → collection-table-wrapper-BI9XAUwm.js} +1 -1
  105. package/dist/client/assets/{collection-tabs-KA7T80MC.js → collection-tabs-BNpEfqyd.js} +1 -1
  106. package/dist/client/assets/{column-rules-CI9Lb7JH.js → column-rules-B7pcw_Gh.js} +1 -1
  107. package/dist/client/assets/{combobox-Dtc7uzBz.js → combobox-ylZ1_mxm.js} +1 -1
  108. package/dist/client/assets/{command-Bv9q3oXB.js → command-d2fvY4gQ.js} +1 -1
  109. package/dist/client/assets/{companion-mcps-section-yLUv_IVZ.js → companion-mcps-section--NCFPgCd.js} +1 -1
  110. package/dist/client/assets/{config-HoNqSkEt.js → config-BDYRd6Wk.js} +1 -1
  111. package/dist/client/assets/{connect-x3ItRenb.js → connect-CKDAuMYC.js} +1 -1
  112. package/dist/client/assets/{connect-layout-CaGlUaZ7.js → connect-layout-Ca1Vr3vz.js} +1 -1
  113. package/dist/client/assets/{connection-C1oBRXZ9.js → connection-DGqqVA7M.js} +1 -1
  114. package/dist/client/assets/{connection-card-ChCwtZgM.js → connection-card-gIhz0wdg.js} +1 -1
  115. package/dist/client/assets/{connection-detail-D2UPCyZx.js → connection-detail-B9omyXwb.js} +1 -1
  116. package/dist/client/assets/{connection-form-helpers-Co-FH2GL.js → connection-form-helpers-A2MriNrX.js} +1 -1
  117. package/dist/client/assets/{connections-dkoZ4UmD.js → connections-Dh4JuodF.js} +1 -1
  118. package/dist/client/assets/{context-L3sdAYq1.js → context-BnF04rBC.js} +1 -1
  119. package/dist/client/assets/{context-menu-ci_wm1iD.js → context-menu-BD-010iM.js} +1 -1
  120. package/dist/client/assets/{core.esm-DBwtvJuA.js → core.esm-BH3HyyF2.js} +1 -1
  121. package/dist/client/assets/{create-organization-dialog-5xMTV1HD.js → create-organization-dialog-DjZlmVnS.js} +1 -1
  122. package/dist/client/assets/{daily-pulse-Daf5yGVF.js → daily-pulse-BXDtpJQU.js} +1 -1
  123. package/dist/client/assets/{device-hint-BrWR2ybl.js → device-hint-CN2khPPs.js} +1 -1
  124. package/dist/client/assets/{discover-DQJMsLOC.js → discover-C-mYnXQB.js} +1 -1
  125. package/dist/client/assets/{domain-settings-BDkTtrtZ.js → domain-settings-BEwECWE8.js} +1 -1
  126. package/dist/client/assets/{drawer-DgE1Osed.js → drawer-DybzZn1x.js} +1 -1
  127. package/dist/client/assets/{editor-Cy4QovB4.js → editor-CBqQFFb9.js} +1 -1
  128. package/dist/client/assets/{empty-state-DYMOp3h6.js → empty-state-B4qRMioD.js} +1 -1
  129. package/dist/client/assets/{empty-state-CUrIt7uA.js → empty-state-b6tRqzU8.js} +1 -1
  130. package/dist/client/assets/{extract-connection-data-CILHH2Xu.js → extract-connection-data-CIO9f-TD.js} +1 -1
  131. package/dist/client/assets/{feature-gate-YfudQg0F.js → feature-gate-ChDRcm7b.js} +1 -1
  132. package/dist/client/assets/{feature-paywall-DRC24-WT.js → feature-paywall-BN5FphJ8.js} +1 -1
  133. package/dist/client/assets/{file-explorer-Dn5VXdTz.js → file-explorer-DCd1-8-d.js} +1 -1
  134. package/dist/client/assets/{file-preview-BOfVvGBK.js → file-preview-CNp5DdHM.js} +1 -1
  135. package/dist/client/assets/{file-share-button-Ds1jkcUw.js → file-share-button-DOQq6Wrq.js} +1 -1
  136. package/dist/client/assets/{file-type-icon-DGZn7b1q.js → file-type-icon-ClWl2ykw.js} +1 -1
  137. package/dist/client/assets/flat-project-DPnFbnmE.js +1 -0
  138. package/dist/client/assets/{folder-icon-NJlrSxZ7.js → folder-icon-BO5Hlc-b.js} +1 -1
  139. package/dist/client/assets/{form-5FKfuXwS.js → form-Dm1N7Fdz.js} +1 -1
  140. package/dist/client/assets/{general-BdG9aUE5.js → general-CszMiv7n.js} +1 -1
  141. package/dist/client/assets/{home-Rt2zQeR1.js → home-DT4jq_ad.js} +1 -1
  142. package/dist/client/assets/{icon-button-BIVgkjge.js → icon-button-UzqZkmgc.js} +1 -1
  143. package/dist/client/assets/{index-DQzSsgCm.js → index-B4rQ5Ej9.js} +1 -1
  144. package/dist/client/assets/{index-urrD3slz.js → index-BA22z-aT.js} +1 -1
  145. package/dist/client/assets/{index-807EZ9UE.js → index-BkaImz4P.js} +1 -1
  146. package/dist/client/assets/{index-BFhkoNSH.js → index-CeuDCj_w.js} +1 -1
  147. package/dist/client/assets/{index-CPTOUBV5.js → index-ChAMt2d-.js} +1 -1
  148. package/dist/client/assets/{index-CVUxtkJO.js → index-ClN0hPjk.js} +1 -1
  149. package/dist/client/assets/{index-Cgvxdf_Q.js → index-D984WV3U.js} +39 -39
  150. package/dist/client/assets/{index-DCV1G4Vi.js → index-DXSiv_GM.js} +3 -3
  151. package/dist/client/assets/{index-KYovqQVt.js → index-DiGKvbHH.js} +1 -1
  152. package/dist/client/assets/{index-DsrMcmtK.js → index-Dq9ehfIf.js} +1 -1
  153. package/dist/client/assets/{index-D2YD4wQb.js → index-QP5dyfS7.js} +1 -1
  154. package/dist/client/assets/{index-CnJlMbWp.js → index-ba_EB2Zw.js} +1 -1
  155. package/dist/client/assets/{index-redirect-Bn1MaA0x.js → index-redirect-8HspsPDC.js} +1 -1
  156. package/dist/client/assets/{index-DPnYGLNH.js → index-z9lysifj.js} +1 -1
  157. package/dist/client/assets/{infiniteQueryObserver-DwnyW_tg.js → infiniteQueryObserver-Bmwf-SCt.js} +1 -1
  158. package/dist/client/assets/{infra-billing-C7Gt7pP6.js → infra-billing-DlP3vLBN.js} +1 -1
  159. package/dist/client/assets/{input-D1FQHGyA.js → input-CG0PFhS0.js} +1 -1
  160. package/dist/client/assets/input-C_t2NUbp.js +17 -0
  161. package/dist/client/assets/{integration-icon-B9BPa6xZ.js → integration-icon-B4EO_1fi.js} +1 -1
  162. package/dist/client/assets/{jira-icon-BPd8rXDD.js → jira-icon-DAy3a9S9.js} +1 -1
  163. package/dist/client/assets/{label-8JLWVV6w.js → label-BszVxI8j.js} +1 -1
  164. package/dist/client/assets/{layout-CteePcNB.js → layout-BsHSUbxL.js} +1 -1
  165. package/dist/client/assets/{legacy-agents-deep-BU9G_qyx.js → legacy-agents-deep-DCBghYlF.js} +1 -1
  166. package/dist/client/assets/{legacy-main-redirect--KMXMJZX.js → legacy-main-redirect-C_9Fyd8e.js} +1 -1
  167. package/dist/client/assets/library-C2ZRDo2P.js +1 -0
  168. package/dist/client/assets/{library-tab-BFAr00ch.js → library-tab-CZxlOQVR.js} +1 -1
  169. package/dist/client/assets/{login-DI6I_2QT.js → login-CoP-xpgM.js} +1 -1
  170. package/dist/client/assets/{markdown-uBKSlcRL.js → markdown-C8b2SRJt.js} +1 -1
  171. package/dist/client/assets/{mcp-app-renderer-CErXUSq-.js → mcp-app-renderer-qrtR9Z1h.js} +1 -1
  172. package/dist/client/assets/{mcp-oauth-AlD-TzSE.js → mcp-oauth--_7bIOac.js} +1 -1
  173. package/dist/client/assets/{mcp-oauth-sRx18rfQ.js → mcp-oauth-BIr9y8Ow.js} +1 -1
  174. package/dist/client/assets/{members-CPBPwKZ1.js → members-DX1jVu8f.js} +1 -1
  175. package/dist/client/assets/{memory-CJihkZvO.js → memory-DGqh7MMN.js} +1 -1
  176. package/dist/client/assets/{mini-report-page-DFzjTxjy.js → mini-report-page-DeT726Qz.js} +1 -1
  177. package/dist/client/assets/{mock-board-biK2PfSA.js → mock-board-DiXeO9l9.js} +1 -1
  178. package/dist/client/assets/{monaco-editor-BsWCzYXO.js → monaco-editor-BmtkWb9u.js} +1 -1
  179. package/dist/client/assets/{monitoring-stats-row-IO7yauKf.js → monitoring-stats-row-CROD4XJo.js} +1 -1
  180. package/dist/client/assets/{multi-select-BNjoAfeC.js → multi-select-COcK2vp_.js} +1 -1
  181. package/dist/client/assets/{mustache-rvHVzPnO.js → mustache-B3B0mlPh.js} +1 -1
  182. package/dist/client/assets/{new-project-dialog-BNMMgasu.js → new-project-dialog-CQomS8HX.js} +1 -1
  183. package/dist/client/assets/{oauth-callback-BeTiKSrh.js → oauth-callback-BAjl2hrI.js} +1 -1
  184. package/dist/client/assets/{oauth-callback-ai-provider-DDLk0zHp.js → oauth-callback-ai-provider-Dfitdf7t.js} +1 -1
  185. package/dist/client/assets/{onboarding-BjDnSa2-.js → onboarding-DuW4ryZs.js} +1 -1
  186. package/dist/client/assets/{openai-conversation-B69u3s77.js → openai-conversation-klLH_0HC.js} +1 -1
  187. package/dist/client/assets/{optimistic-project-sidebar-views-bgF9KdQy.js → optimistic-project-sidebar-views-CaTvAXwY.js} +1 -1
  188. package/dist/client/assets/{organization-choice-udNpLdVM.js → organization-choice-DtdFVbBZ.js} +1 -1
  189. package/dist/client/assets/{orgs-BXO2vhOY.js → orgs-BBq2qsW_.js} +1 -1
  190. package/dist/client/assets/{page-seo-form-zD7DmA6N.js → page-seo-form-BJN0O5_N.js} +1 -1
  191. package/dist/client/assets/{pair-DIssvTMn.js → pair-D3dg1naQ.js} +1 -1
  192. package/dist/client/assets/{plan-ladder-CAWIPKc5.js → plan-ladder-DUQWM1mB.js} +1 -1
  193. package/dist/client/assets/{popover-13pjOuZU.js → popover-9tPVAoH5.js} +1 -1
  194. package/dist/client/assets/{post-calendar-rAhG8kBe.js → post-calendar-D9oVrQhS.js} +1 -1
  195. package/dist/client/assets/{post-editor-B6gbS3Ci.js → post-editor-C2tsxtV4.js} +1 -1
  196. package/dist/client/assets/{preview-content-DLC7444f.js → preview-content-BIpDQXJu.js} +1 -1
  197. package/dist/client/assets/{preview-dialog-CjNOBFAp.js → preview-dialog-CH8GibCu.js} +1 -1
  198. package/dist/client/assets/{preview-panel-ClNcZ7Jq.js → preview-panel-CCFjojUE.js} +1 -1
  199. package/dist/client/assets/{product-picker-dialog-9jWzS0xD.js → product-picker-dialog-BoGvkEwe.js} +1 -1
  200. package/dist/client/assets/{profile-szk-J5OE.js → profile-BKpvrH_P.js} +1 -1
  201. package/dist/client/assets/{project-app-view-BScfdH5R.js → project-app-view-0HH2t56F.js} +1 -1
  202. package/dist/client/assets/{project-feed-D8bVgmrv.js → project-feed-d2kKPzOq.js} +1 -1
  203. package/dist/client/assets/{project-icon-BEB7bo0T.js → project-icon-DeUPWsC_.js} +1 -1
  204. package/dist/client/assets/project-reports-7r3buXCO.js +1 -0
  205. package/dist/client/assets/project-tasks-Dp-gjCz7.js +1 -0
  206. package/dist/client/assets/{projects-zc5zuYNt.js → projects-dI6btB5J.js} +1 -1
  207. package/dist/client/assets/{projects-empty-state-GodmIrGy.js → projects-empty-state-DAa4wzAP.js} +1 -1
  208. package/dist/client/assets/{prompts-C1AIYXZy.js → prompts-D3LKfm14.js} +1 -1
  209. package/dist/client/assets/record-editor-BDN9ztWf.js +1 -0
  210. package/dist/client/assets/redirect-editor-DBLjC8Z9.js +1 -0
  211. package/dist/client/assets/{reports-Cd8g8CNj.js → reports-B5aLNQGc.js} +1 -1
  212. package/dist/client/assets/reports-CvKnRIKX.js +1 -0
  213. package/dist/client/assets/{reports-onboarding-8b6ysmBv.js → reports-onboarding-D7Nsv0TX.js} +1 -1
  214. package/dist/client/assets/{reports-tab-BI41LuK6.js → reports-tab-bgB5WodW.js} +2 -2
  215. package/dist/client/assets/{repositories-SY3BCP97.js → repositories-Du_yi0rf.js} +1 -1
  216. package/dist/client/assets/{repository-binding-OIkiiBn_.js → repository-binding-CrIQbyJh.js} +1 -1
  217. package/dist/client/assets/{repository-import-picker-BD05Qbz9.js → repository-import-picker-n3EYoF9U.js} +1 -1
  218. package/dist/client/assets/{repository-picker-DHYERC22.js → repository-picker-CjDs0ici.js} +1 -1
  219. package/dist/client/assets/{require-capability-HLF-G2Gn.js → require-capability-BDLtPaM5.js} +1 -1
  220. package/dist/client/assets/{required-auth-layout-COVLs567.js → required-auth-layout-CTKRCLps.js} +1 -1
  221. package/dist/client/assets/{reset-password-D3tROrku.js → reset-password-XiFYESJ5.js} +1 -1
  222. package/dist/client/assets/{resizable-CYK8YYKx.js → resizable-C3INc4c7.js} +1 -1
  223. package/dist/client/assets/{resolve-tab-icon-DRYlqyoT.js → resolve-tab-icon-DuWtsFCw.js} +1 -1
  224. package/dist/client/assets/{review-settings-DpOwh6kJ.js → review-settings-BCvIwiTZ.js} +1 -1
  225. package/dist/client/assets/{rich-text-link-control-yKpCLxk-.js → rich-text-link-control-B2KML_yp.js} +1 -1
  226. package/dist/client/assets/roles-B5KIhtIL.js +1 -0
  227. package/dist/client/assets/{route-Dr_7m0Tv.js → route-BwivpFZQ.js} +1 -1
  228. package/dist/client/assets/route-Fylk_TVt.js +1 -0
  229. package/dist/client/assets/route-nHlGvnBX.js +1 -0
  230. package/dist/client/assets/{runnable-block-editor-B77rsBAp.js → runnable-block-editor-v2diysES.js} +1 -1
  231. package/dist/client/assets/{sandbox-lifecycle-context-cevNxEEE.js → sandbox-lifecycle-context-CtphXAh2.js} +1 -1
  232. package/dist/client/assets/schema-BMqZTcjW.js +1 -0
  233. package/dist/client/assets/{scroll-area-BerbxwSa.js → scroll-area-B9YHNZjL.js} +1 -1
  234. package/dist/client/assets/{search-input-Eqbgvt1Z.js → search-input-BJ-xb_6w.js} +1 -1
  235. package/dist/client/assets/{search-toggle-DjnCmeKu.js → search-toggle-DviE2KK7.js} +1 -1
  236. package/dist/client/assets/{secret-picker-D_IInK4O.js → secret-picker-MDfAhcKZ.js} +1 -1
  237. package/dist/client/assets/{secrets-ChTLi-FR.js → secrets-BWXZ9ADR.js} +1 -1
  238. package/dist/client/assets/{sections-editor-BcCRV-fD.js → sections-editor-DRPdyBr7.js} +1 -1
  239. package/dist/client/assets/{select-CTpu637-.js → select-Cmhyur65.js} +1 -1
  240. package/dist/client/assets/{select-model-BwS3mp6E.js → select-model-DlhjRyXh.js} +1 -1
  241. package/dist/client/assets/{seo-editor-CL5enOUs.js → seo-editor-Cslo5GyR.js} +1 -1
  242. package/dist/client/assets/{separator-BHuQN-Ab.js → separator-XBrskDk1.js} +1 -1
  243. package/dist/client/assets/{settings-tab-CHZtgFBe.js → settings-tab-Bhjq-v1u.js} +1 -1
  244. package/dist/client/assets/{sheet-C6FCafA6.js → sheet-bMLuzpcl.js} +1 -1
  245. package/dist/client/assets/{shell-layout-CGyXmROi.js → shell-layout-CX2kb4As.js} +1 -1
  246. package/dist/client/assets/{skills-F5Uw4Pv1.js → skills-smEsZOyf.js} +1 -1
  247. package/dist/client/assets/{slider-d3xYNxIE.js → slider-xDThp8gG.js} +1 -1
  248. package/dist/client/assets/{sortable.esm-C6z3vfiq.js → sortable.esm-C4yl7HRk.js} +1 -1
  249. package/dist/client/assets/{sso-CmIeF-7l.js → sso-D5XcZRGg.js} +1 -1
  250. package/dist/client/assets/{suggestion-TsE32nPi.js → suggestion-B9eDgKDC.js} +1 -1
  251. package/dist/client/assets/{switch-TCI26U0b.js → switch-D6SJRikA.js} +1 -1
  252. package/dist/client/assets/{symbol-Bmeb5mrx.js → symbol-8pL_EbyE.js} +1 -1
  253. package/dist/client/assets/{synced-repos-CFRe6JC2.js → synced-repos-CvOi5sDr.js} +1 -1
  254. package/dist/client/assets/{tab-icon-glyph-gi6BIarB.js → tab-icon-glyph-B5Fq5S50.js} +1 -1
  255. package/dist/client/assets/{table-pVUW2rwH.js → table-BVuWDAYC.js} +1 -1
  256. package/dist/client/assets/{tabs-BE3vAj8m.js → tabs-CJiVz1UY.js} +1 -1
  257. package/dist/client/assets/{task-board-90M9g_fi.js → task-board-BypYXBtD.js} +1 -1
  258. package/dist/client/assets/{task-route-CS8UQngR.js → task-route-CxLDxVTy.js} +1 -1
  259. package/dist/client/assets/{task-status-C9ibacuz.js → task-status-DR_ZGtmT.js} +1 -1
  260. package/dist/client/assets/taskboard-analytics-B5tiovFi.js +1 -0
  261. package/dist/client/assets/tasks-C5eWHl6J.js +1 -0
  262. package/dist/client/assets/{tasks-BqDBNIqA.js → tasks-pRlF9aKa.js} +1 -1
  263. package/dist/client/assets/{textarea-BpAK_nVQ.js → textarea-C3QvYVs6.js} +1 -1
  264. package/dist/client/assets/{thread-analytics-DIkW4P-1.js → thread-analytics-CVYD56Lv.js} +1 -1
  265. package/dist/client/assets/{thread-button-EBdfzXFx.js → thread-button-Dnwv5gXz.js} +1 -1
  266. package/dist/client/assets/{thread-intent-CRpeRnx2.js → thread-intent-BouO_OhM.js} +1 -1
  267. package/dist/client/assets/{thread-route-zMAwqLeS.js → thread-route-CzzxiajL.js} +1 -1
  268. package/dist/client/assets/{thread-route-Ck1dYsiI.js → thread-route-Dp3ppEkH.js} +1 -1
  269. package/dist/client/assets/{thread-sheet-body-CT23RfVg.js → thread-sheet-body-Z8jKG5ht.js} +1 -1
  270. package/dist/client/assets/{time-range-picker-dZaUQ5ot.js → time-range-picker-DE7fkhif.js} +1 -1
  271. package/dist/client/assets/{toggle-group-Cmucm9d_.js → toggle-group-BxPPN08u.js} +1 -1
  272. package/dist/client/assets/{tool-namespace-W6oSGBwY.js → tool-namespace-C5Z8tVC2.js} +1 -1
  273. package/dist/client/assets/{toolbar-icon-button-D_zSUxYE.js → toolbar-icon-button-539CZpjb.js} +1 -1
  274. package/dist/client/assets/{tooltip-CiYSgLFK.js → tooltip-CfH7_UR9.js} +1 -1
  275. package/dist/client/assets/{tooltipContext-Daig5_qo.js → tooltipContext-Dt4926A5.js} +1 -1
  276. package/dist/client/assets/{track-BNVgjI-e.js → track-D8kXLyAV.js} +1 -1
  277. package/dist/client/assets/{types-DzWYDlOK.js → types-PjheW3sm.js} +1 -1
  278. package/dist/client/assets/{url-slug-BtTWMETT.js → url-slug-D7hdnLPq.js} +1 -1
  279. package/dist/client/assets/{usage-stats-BZiqC0Eq.js → usage-stats-BcmMK-YO.js} +1 -1
  280. package/dist/client/assets/{use-ai-providers-D_-p2XHZ.js → use-ai-providers-CeHzBmwD.js} +1 -1
  281. package/dist/client/assets/{use-automations-AknZaEXT.js → use-automations-DLk4Zq7Y.js} +1 -1
  282. package/dist/client/assets/{use-autosave-DOY-TitN.js → use-autosave-5IDmaWA6.js} +1 -1
  283. package/dist/client/assets/{use-chat-layout-state-BGJ7hecp.js → use-chat-layout-state-C4y1ngrz.js} +1 -1
  284. package/dist/client/assets/{use-chat-navigation-Dn06-EpQ.js → use-chat-navigation-pwxRnoh5.js} +1 -1
  285. package/dist/client/assets/{use-clock-tick-vjL0x3S6.js → use-clock-tick-DcGl_y28.js} +1 -1
  286. package/dist/client/assets/{use-connect-companion-Cfgp9MjD.js → use-connect-companion-DmQTaaXP.js} +1 -1
  287. package/dist/client/assets/{use-connection-BReUf0ym.js → use-connection-B96BwbcD.js} +1 -1
  288. package/dist/client/assets/{use-copy-BA_1zlIX.js → use-copy-COXbZ1Gm.js} +1 -1
  289. package/dist/client/assets/{use-create-virtual-mcp-mFuwkPSo.js → use-create-virtual-mcp-BuymUE2O.js} +1 -1
  290. package/dist/client/assets/{use-date-fns-locale-BtKmaD89.js → use-date-fns-locale-D2o3Y11s.js} +1 -1
  291. package/dist/client/assets/{use-debounced-autosave-BgCQLSRj.js → use-debounced-autosave-Yq56G4iL.js} +1 -1
  292. package/dist/client/assets/{use-debounced-value-DppivyxK.js → use-debounced-value-BZK5uiHm.js} +1 -1
  293. package/dist/client/assets/{use-deco-credits-C6g5nuGf.js → use-deco-credits-COvQvXnV.js} +1 -1
  294. package/dist/client/assets/{use-decopilot-events-BAyb-mQF.js → use-decopilot-events-BDPMNEXz.js} +1 -1
  295. package/dist/client/assets/{use-delete-connection-xCFE_9as.js → use-delete-connection-DT6vWhGX.js} +1 -1
  296. package/dist/client/assets/{use-deployment-admin-k8c5st8B.js → use-deployment-admin-CoVHfZYT.js} +1 -1
  297. package/dist/client/assets/{use-ensure-project-folder-C-CBLCjO.js → use-ensure-project-folder-peTgVhMP.js} +1 -1
  298. package/dist/client/assets/{use-fast-preview-draft-url-DpZxJT8R.js → use-fast-preview-draft-url-BDHxUOYh.js} +1 -1
  299. package/dist/client/assets/{use-file-configs-D-lKeneW.js → use-file-configs-DoW1VYTz.js} +1 -1
  300. package/dist/client/assets/{use-infinite-scroll-BKpwTLbY.js → use-infinite-scroll-1WuTfkvL.js} +1 -1
  301. package/dist/client/assets/{use-join-requests-BFtAo-Nh.js → use-join-requests-uEHIq-wW.js} +1 -1
  302. package/dist/client/assets/{use-main-panel-tabs-DeC1fHi6.js → use-main-panel-tabs-eZgXms3O.js} +1 -1
  303. package/dist/client/assets/{use-mcp-auth-status-I_Qut9IE.js → use-mcp-auth-status-GSONXJ6Y.js} +1 -1
  304. package/dist/client/assets/{use-mcp-client-BnJ4CmVv.js → use-mcp-client-D8-rDWEf.js} +1 -1
  305. package/dist/client/assets/{use-mcp-prompts-pprT3y3c.js → use-mcp-prompts-9xOCFCVM.js} +1 -1
  306. package/dist/client/assets/{use-mcp-tools-nBYl_9Cj.js → use-mcp-tools-BYNW1IvH.js} +1 -1
  307. package/dist/client/assets/{use-members-CjMEwjKK.js → use-members-DuiAoVt0.js} +1 -1
  308. package/dist/client/assets/{use-mobile-CaE2VxXh.js → use-mobile-Cz-N6vVG.js} +1 -1
  309. package/dist/client/assets/{use-navigate-to-agent-C9CNI3wT.js → use-navigate-to-agent-CWPsHr0w.js} +1 -1
  310. package/dist/client/assets/use-new-blocks-editor-B5DYqQrS.js +1 -0
  311. package/dist/client/assets/{use-open-billing-url-C77XyoLh.js → use-open-billing-url-CHALVI7F.js} +1 -1
  312. package/dist/client/assets/{use-org-auth-client-CA-MyDFx.js → use-org-auth-client-DQ6vSNUo.js} +1 -1
  313. package/dist/client/assets/{use-org-fs-BvswiWhM.js → use-org-fs-UdNnQzcG.js} +1 -1
  314. package/dist/client/assets/{use-org-repo-syncs-BZsUkIPj.js → use-org-repo-syncs-CE9Yx0AE.js} +1 -1
  315. package/dist/client/assets/{use-org-sso-uVC0Aeyi.js → use-org-sso-BRZ2xqKg.js} +1 -1
  316. package/dist/client/assets/{use-organization-roles-DHpuUweO.js → use-organization-roles-5fHLGM-_.js} +1 -1
  317. package/dist/client/assets/{use-organization-settings-CcdWKIZG.js → use-organization-settings-BEUCQxuY.js} +1 -1
  318. package/dist/client/assets/{use-panel-navigate-BwaxzeCI.js → use-panel-navigate-B348HV-V.js} +1 -1
  319. package/dist/client/assets/{use-project-scope-DIXfNogh.js → use-project-scope-CJSvss5q.js} +1 -1
  320. package/dist/client/assets/{use-releases-By4PMCal.js → use-releases-DRDEblSZ.js} +1 -1
  321. package/dist/client/assets/{use-reports-diagnostic-Bh5K_gdR.js → use-reports-diagnostic-BQoNp5Lt.js} +1 -1
  322. package/dist/client/assets/{use-sandbox-events-BuzKGb6t.js → use-sandbox-events-afI4fSp9.js} +1 -1
  323. package/dist/client/assets/{use-secrets-Be9wdGLq.js → use-secrets-6NdpjMzr.js} +1 -1
  324. package/dist/client/assets/{use-section-preview-base-Dah5aW9A.js → use-section-preview-base-Du6Z-MWu.js} +1 -1
  325. package/dist/client/assets/{use-tags-CPiAfrfw.js → use-tags-Dkeb0fZQ.js} +1 -1
  326. package/dist/client/assets/{use-task-board-analytics-BzVxQLaZ.js → use-task-board-analytics-BsZ5fOsz.js} +1 -1
  327. package/dist/client/assets/{use-task-board-events-AoW8CB16.js → use-task-board-events-BZPWVwkQ.js} +1 -1
  328. package/dist/client/assets/{use-task-board-item-prs-Cm1nLJbF.js → use-task-board-item-prs-6pzJEXZH.js} +1 -1
  329. package/dist/client/assets/{use-task-board-items-YxLDtbf_.js → use-task-board-items-DDExwWH5.js} +1 -1
  330. package/dist/client/assets/{use-task-metadata-B9JzZCwZ.js → use-task-metadata-QX8Xm3F2.js} +1 -1
  331. package/dist/client/assets/{use-thread-analytics-DKolGKrG.js → use-thread-analytics-4YJ0wSzW.js} +1 -1
  332. package/dist/client/assets/{use-thread-outputs-BeW_ZEj9.js → use-thread-outputs-BaagK6yF.js} +1 -1
  333. package/dist/client/assets/useInfiniteQuery-BgN51nwo.js +1 -0
  334. package/dist/client/assets/{useQueries-C5yFykqS.js → useQueries-BeM3koNG.js} +1 -1
  335. package/dist/client/assets/useSuspenseInfiniteQuery-DnCmqaG2.js +1 -0
  336. package/dist/client/assets/{users-BPaHw_X_.js → users-DA2VVqSS.js} +1 -1
  337. package/dist/client/assets/{utils-D8EfxtqS.js → utils-DGIwcQET.js} +1 -1
  338. package/dist/client/assets/{variant-calendar-Bo3CCQPM.js → variant-calendar-B2z-zkHQ.js} +1 -1
  339. package/dist/client/assets/{variant-matcher-override-B8Xy0hwV.js → variant-matcher-override-WuIO8MOW.js} +1 -1
  340. package/dist/client/assets/{view-mode-toggle-CHGut8Gu.js → view-mode-toggle-DA847UFd.js} +1 -1
  341. package/dist/client/assets/{virtual-mcp-DgndW5tn.js → virtual-mcp-ySkvJvwZ.js} +1 -1
  342. package/dist/client/assets/{watch-sse-pool-DNUoCrky.js → watch-sse-pool-jwr9yBFo.js} +1 -1
  343. package/dist/client/index.html +1 -1
  344. package/dist/server/migrate.js +240 -240
  345. package/dist/server/server.js +623 -622
  346. package/package.json +1 -1
  347. package/dist/client/assets/agent-app-DzLJcblb.js +0 -1
  348. package/dist/client/assets/agent-deck-BZEp8fRL.js +0 -1
  349. package/dist/client/assets/agent-library-Pk0IAtu0.js +0 -1
  350. package/dist/client/assets/agent-library-file-Dv8aM-7k.js +0 -1
  351. package/dist/client/assets/agent-settings-OLjHIWXV.js +0 -1
  352. package/dist/client/assets/agent-site-editor-code-CsFcTfpY.js +0 -2
  353. package/dist/client/assets/agent-view-zjcLXSYx.js +0 -1
  354. package/dist/client/assets/ai-providers-BBzQl4jb.js +0 -6
  355. package/dist/client/assets/api-keys-B2p99l9x.js +0 -1
  356. package/dist/client/assets/app-editor-CmySzZMn.js +0 -1
  357. package/dist/client/assets/chat-context-DPuof8Lx.js +0 -39
  358. package/dist/client/assets/flat-project-DohBB_k-.js +0 -1
  359. package/dist/client/assets/input-BvEtvuLy.js +0 -17
  360. package/dist/client/assets/library-Bk-wI1G3.js +0 -1
  361. package/dist/client/assets/project-reports-CYk0gIHi.js +0 -1
  362. package/dist/client/assets/project-tasks-T7wij8vs.js +0 -1
  363. package/dist/client/assets/record-editor-D8HTL-dd.js +0 -1
  364. package/dist/client/assets/redirect-editor-C5Fcvp6l.js +0 -1
  365. package/dist/client/assets/reports-BZvTaNDE.js +0 -1
  366. package/dist/client/assets/roles-H-ySJM8T.js +0 -1
  367. package/dist/client/assets/route-0IOE_iwR.js +0 -1
  368. package/dist/client/assets/route-DYvSeMz7.js +0 -1
  369. package/dist/client/assets/schema-CLUxJ2Aq.js +0 -1
  370. package/dist/client/assets/taskboard-analytics-D8c5pILu.js +0 -1
  371. package/dist/client/assets/tasks-B9K3xklH.js +0 -1
  372. package/dist/client/assets/use-new-blocks-editor-Dhap32-H.js +0 -1
  373. package/dist/client/assets/useInfiniteQuery-CXvSW1zP.js +0 -1
  374. package/dist/client/assets/useSuspenseInfiniteQuery-CFJbE4jf.js +0 -1
@@ -1,4 +1,4 @@
1
- import{cW as l,c$ as e,cX as h,aE as r,eN as b,aD as t,bS as p,bU as d,aW as c,cV as m,cZ as v,eO as E,eP as I,eQ as w,cw as x,dP as T,eR as z,eS as C,eT as A,cb as O,eU as B,cN as V,eV as W,eW as $,eX as F,eY as K,cJ as J,cx as Z,cG as j,cH as Q,cI as Y,cz as G,cF as X,cy as ee,cR as te}from"./index-Cgvxdf_Q.js";import{P as oe}from"./use-mcp-client-BnJ4CmVv.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let D of[...u.listeners])D(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
1
+ import{cW as l,c$ as e,cX as h,aE as r,eN as b,aD as t,bS as p,bU as d,aW as c,cV as m,cZ as v,eO as E,eP as I,eQ as w,cw as x,dP as T,eR as z,eS as C,eT as A,cb as O,eU as B,cN as V,eV as W,eW as $,eX as F,eY as K,cJ as J,cx as Z,cG as j,cH as Q,cI as Y,cz as G,cF as X,cy as ee,cR as te}from"./index-D984WV3U.js";import{P as oe}from"./use-mcp-client-D8-rDWEf.js";(n=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(o,s)=>(typeof require<"u"?require:o)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});class se extends oe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(o,s){}_ensureEventSlot(o){let s=this._eventSlots.get(o);if(!s){let i=this.eventSchemas[o];if(!i)throw Error(`Unknown event: ${String(o)}`);s={listeners:[]},this._eventSlots.set(o,s);let a=i.shape.method.value;this._registeredMethods.add(a);let u=s;super.setNotificationHandler(i,g=>{let R=g.params;this.onEventDispatch(o,R),u.onHandler?.(R);for(let D of[...u.listeners])D(R)})}return s}setEventHandler(o,s){let i=this._ensureEventSlot(o);i.onHandler&&s&&console.warn(`[MCP Apps] on${String(o)} handler replaced. Use addEventListener("${String(o)}", …) to add multiple listeners without replacing.`),i.onHandler=s}getEventHandler(o){return this._eventSlots.get(o)?.onHandler}addEventListener(o,s){this._ensureEventSlot(o).listeners.push(s)}removeEventListener(o,s){let i=this._eventSlots.get(o);if(!i)return;let a=i.listeners.indexOf(s);a!==-1&&i.listeners.splice(a,1)}setRequestHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setRequestHandler"),super.setRequestHandler(o,s)};setNotificationHandler=(o,s)=>{this._assertMethodNotRegistered(o,"setNotificationHandler"),super.setNotificationHandler(o,s)};warnIfRequestHandlerReplaced(o,s,i){s&&i&&console.warn(`[MCP Apps] ${o} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(o,s)=>{let i=o.shape.method.value;this._registeredMethods.add(i),super.setRequestHandler(o,s)};_assertMethodNotRegistered(o,s){let i=o.shape.method.value;if(this._registeredMethods.has(i))throw Error(`Handler for "${i}" already registered (via ${s}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(i)}}var L="2026-01-26",ie="ui/notifications/tool-input-partial",re=l([e("light"),e("dark")]).describe("Color theme preference for the host environment."),f=l([e("inline"),e("fullscreen"),e("pip")]).describe("Display mode for UI presentation."),ae=l([e("--color-background-primary"),e("--color-background-secondary"),e("--color-background-tertiary"),e("--color-background-inverse"),e("--color-background-ghost"),e("--color-background-info"),e("--color-background-danger"),e("--color-background-success"),e("--color-background-warning"),e("--color-background-disabled"),e("--color-text-primary"),e("--color-text-secondary"),e("--color-text-tertiary"),e("--color-text-inverse"),e("--color-text-ghost"),e("--color-text-info"),e("--color-text-danger"),e("--color-text-success"),e("--color-text-warning"),e("--color-text-disabled"),e("--color-border-primary"),e("--color-border-secondary"),e("--color-border-tertiary"),e("--color-border-inverse"),e("--color-border-ghost"),e("--color-border-info"),e("--color-border-danger"),e("--color-border-success"),e("--color-border-warning"),e("--color-border-disabled"),e("--color-ring-primary"),e("--color-ring-secondary"),e("--color-ring-inverse"),e("--color-ring-info"),e("--color-ring-danger"),e("--color-ring-success"),e("--color-ring-warning"),e("--font-sans"),e("--font-mono"),e("--font-weight-normal"),e("--font-weight-medium"),e("--font-weight-semibold"),e("--font-weight-bold"),e("--font-text-xs-size"),e("--font-text-sm-size"),e("--font-text-md-size"),e("--font-text-lg-size"),e("--font-heading-xs-size"),e("--font-heading-sm-size"),e("--font-heading-md-size"),e("--font-heading-lg-size"),e("--font-heading-xl-size"),e("--font-heading-2xl-size"),e("--font-heading-3xl-size"),e("--font-text-xs-line-height"),e("--font-text-sm-line-height"),e("--font-text-md-line-height"),e("--font-text-lg-line-height"),e("--font-heading-xs-line-height"),e("--font-heading-sm-line-height"),e("--font-heading-md-line-height"),e("--font-heading-lg-line-height"),e("--font-heading-xl-line-height"),e("--font-heading-2xl-line-height"),e("--font-heading-3xl-line-height"),e("--border-radius-xs"),e("--border-radius-sm"),e("--border-radius-md"),e("--border-radius-lg"),e("--border-radius-xl"),e("--border-radius-full"),e("--border-width-regular"),e("--shadow-hairline"),e("--shadow-sm"),e("--shadow-md"),e("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),ne=h(ae.describe(`Style variables for theming MCP apps.
2
2
 
3
3
  Individual style keys are optional - hosts may provide any subset of these values.
4
4
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -1 +1 @@
1
- import{aE as s}from"./index-Cgvxdf_Q.js";const n=2,t=64,i=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,r=new Set(["new","edit","settings","apps","projects","connections"]),o=s().min(n).max(t).regex(i,"Use lowercase letters, digits, and single hyphens between them").refine(e=>!e.includes("--"),"Use single hyphens").refine(e=>!r.has(e),"This slug is reserved");export{o as U};
1
+ import{aE as s}from"./index-D984WV3U.js";const n=2,t=64,i=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,r=new Set(["new","edit","settings","apps","projects","connections"]),o=s().min(n).max(t).regex(i,"Use lowercase letters, digits, and single hyphens between them").refine(e=>!e.includes("--"),"Use single hyphens").refine(e=>!r.has(e),"This slug is reserved");export{o as U};
@@ -1,4 +1,4 @@
1
- import{c as Yt,r as V,b as So,aB as Yf,j as k,h as Xf,B as xl,aE as Sl,aD as Qf,aC as Zf,v as eh,s as th,I as nh,w as rh,q as sh,D as ih,eE as Sc,eF as oh,b1 as lh,dS as _t,eG as ah,l as er,ah as ch,y as uh}from"./index-Cgvxdf_Q.js";import{d as dh,g as fh}from"./tool-namespace-W6oSGBwY.js";import{a as hh,F as ph,b as mh,c as gh,d as yh,f as bh}from"./form-5FKfuXwS.js";import{t as Cl}from"./utils-CVEq3hMx.js";import{a as kh,M as xh}from"./markdown-uBKSlcRL.js";import{u as Sh}from"./use-copy-BA_1zlIX.js";import{a as Ch}from"./Copy01-m_uwkeCD.js";import{T as tr,a as nr,b as rr}from"./tooltip-CiYSgLFK.js";import{F as Mh}from"./agent-icon-DsEoh1uc.js";import{b as Ml}from"./format-time-CjIPQhCN.js";import{c as Co}from"./use-decopilot-events-BAyb-mQF.js";import{I as Mo}from"./chat-context-DPuof8Lx.js";function Th(n,e){const t={};for(const r of n?.arguments??[])t[r.name]=r.required?Sl().min(1,e):Sl();return Qf(t)}function Eh(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function PS(n){const e=Yt.c(74),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:i}=n,o=V.useId(),l=So();let a,c;if(e[0]!==t||e[1]!==l){const le=Th(t,l("chat.dialogPromptArguments.required"));c=Zf,a=Yf(le),e[0]=t,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==i||e[5]!==t?(u=t?Eh(t,i):{},e[4]=i,e[5]=t,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==t?.arguments?(h=t?.arguments??[],e[10]=t?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==s||e[14]!==r?(g=async le=>{await s(le),r(null),f.reset()},e[12]=f,e[13]=s,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=le=>{le||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!t)return null;let x;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(x=t.title||dh(t.name,fh(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=x):x=e[22];let C;e[23]!==x?(C=k.jsx(eh,{children:k.jsx("span",{className:"capitalize",children:x})}),e[23]=x,e[24]=C):C=e[24];let T;e[25]!==t.description?(T=t.description&&k.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let A;e[27]!==T||e[28]!==C?(A=k.jsxs(th,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=A):A=e[29];let v;e[30]!==f||e[31]!==m?(v=le=>{le.stopPropagation(),f.handleSubmit(m)(le)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let D;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let le;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(le=$e=>k.jsx(ph,{control:f.control,name:$e.name,render:wn=>{const{field:Ke}=wn;return k.jsxs(mh,{children:[k.jsxs(gh,{className:"text-xs",children:[$e.name,$e.required?null:k.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),k.jsx(yh,{children:k.jsx(nh,{...Ke,value:Ke.value??"",required:$e.required,placeholder:$e.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),k.jsx(bh,{})]})}},$e.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=le):le=e[41],D=p.map(le),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=D}else D=e[37];let R;e[42]!==b?(R=()=>b(!1),e[42]=b,e[43]=R):R=e[43];const j=f.formState.isSubmitting;let K;e[44]!==l?(K=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=K):K=e[45];let U;e[46]!==f.formState.isSubmitting||e[47]!==R||e[48]!==K?(U=k.jsx(xl,{type:"button",variant:"ghost",onClick:R,disabled:j,children:K}),e[46]=f.formState.isSubmitting,e[47]=R,e[48]=K,e[49]=U):U=e[49];let L;e[50]!==f.formState.isSubmitting||e[51]!==l?(L=f.formState.isSubmitting?k.jsxs("span",{className:"flex items-center gap-2",children:[k.jsx(Xf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=L):L=e[52];let B;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==L?(B=k.jsx(xl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:L}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=L,e[56]=B):B=e[56];let z;e[57]!==U||e[58]!==B?(z=k.jsxs(rh,{children:[U,B]}),e[57]=U,e[58]=B,e[59]=z):z=e[59];let _;e[60]!==o||e[61]!==v||e[62]!==D||e[63]!==z?(_=k.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[D,z]}),e[60]=o,e[61]=v,e[62]=D,e[63]=z,e[64]=_):_=e[64];let Q;e[65]!==f||e[66]!==_?(Q=k.jsx(hh,{...f,children:_}),e[65]=f,e[66]=_,e[67]=Q):Q=e[67];let oe;e[68]!==A||e[69]!==Q?(oe=k.jsxs(sh,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[A,Q]}),e[68]=A,e[69]=Q,e[70]=oe):oe=e[70];let Ce;return e[71]!==b||e[72]!==oe?(Ce=k.jsx(ih,{open:!0,onOpenChange:b,children:oe}),e[71]=b,e[72]=oe,e[73]=Ce):Ce=e[73],Ce}var Tl=Object.defineProperty,wh=(n,e)=>{let t={};for(var r in n)Tl(t,r,{get:n[r],enumerable:!0});return Tl(t,Symbol.toStringTag,{value:"Module"}),t};function ae(n){this.content=n}ae.prototype={constructor:ae,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ae(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ae(t)},addToStart:function(n,e){return new ae([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ae(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ae(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ae.from(n),n.size?new ae(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ae.from(n),n.size?new ae(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ae.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ae.from=function(n){if(n instanceof ae)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ae(e)};function Cc(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){let o=s.text,l=i.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a<o.length&&a<l.length&&Ec(o.charCodeAt(a-1))&&Tc(o.charCodeAt(a))&&t--,t}if(s.content.size||i.content.size){let o=Cc(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Mc(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d<c.length&&Ec(c.charCodeAt(d-1))&&Tc(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||l.content.size){let c=Mc(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}function Tc(n){return n>=56320&&n<57344}function Ec(n){return n>=55296&&n<56320}class S{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new S(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new S(r,s)}cutByIndex(e,t){return e==t?S.empty:e==0&&t==this.content.length?this:new S(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new S(s,i)}addToStart(e){return new S([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new S(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Cc(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Mc(this,e,t,r)}findIndex(e){if(e==0)return vr(0,e);if(e==this.size)return vr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vr(t+1,i):vr(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return S.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return S.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return S.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new S(t||e,r)}static from(e){if(!e)return S.empty;if(e instanceof S)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new S([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}S.empty=new S([],0);const ti={index:0,offset:0};function vr(n,e){return ti.index=n,ti.offset=e,ti}function Ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let F=class Di{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Di.none;if(e instanceof Di)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};F.none=[];class sr extends Error{}class E{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vc(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new E(r,this.openStart,this.openEnd)}removeBetween(e,t){return new E(wc(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return E.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new E(S.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new E(e,r,s)}}E.empty=new E(S.empty,0,0);function wc(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(wc(i.content,e-s-1,t-s-1)))}function vc(n,e,t,r,s,i){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=vc(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?s-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function vh(n,e,t){if(t.openStart>n.depth)throw new sr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new sr("Inconsistent open depths");return Nc(n,e,t,0)}function Nc(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Nc(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Bt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Nh(t,n);return Bt(i,Oc(n,o,l,e,r))}else return Bt(i,qr(n,e,r))}function Ac(n,e){if(!e.type.compatibleContent(n.type))throw new sr("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Ac(r,e.node(t)),r}function zt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Fn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)zt(s.child(l),r);e&&e.depth==t&&e.textOffset&&zt(e.nodeBefore,r)}function Bt(n,e){if(!n.type.validContent(e))throw new sr("Invalid content for node "+n.type.name);return n.copy(e)}function Oc(n,e,t,r,s){let i=n.depth>s&&Ri(n,e,s+1),o=r.depth>s&&Ri(t,r,s+1),l=[];return Fn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Ac(i,o),zt(Bt(i,Oc(n,e,t,r,s+1)),l)):(i&&zt(Bt(i,qr(n,e,s+1)),l),Fn(e,t,s,l),o&&zt(Bt(o,qr(t,r,s+1)),l)),Fn(r,null,s,l),new S(l)}function qr(n,e,t){let r=[];if(Fn(null,n,t,r),n.depth>t){let s=Ri(n,e,t+1);zt(Bt(s,qr(n,e,t+1)),r)}return Fn(e,null,t,r),new S(r)}function Nh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(S.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class ir{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return F.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new ir(t,r,i)}static resolveCached(e,t){let r=El.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else El.set(e,r=new Ah);let s=r.elts[r.i]=ir.resolve(e,t);return r.i=(r.i+1)%Oh,s}}class Ah{constructor(){this.elts=[],this.i=0}}const Oh=12,El=new WeakMap;class Jr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Dh=Object.create(null);let Ft=class Ii{constructor(e,t,r,s=F.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||S.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Ur(this.attrs,t||e.defaultAttrs||Dh)&&F.sameSet(this.marks,r||F.none)}copy(e=null){return e==this.content?this:new Ii(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ii(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return E.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new E(c,s.depth-o,i.depth-o)}replace(e,t,r){return vh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=S.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=F.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!F.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=S.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ft.prototype.text=void 0;class Gr extends Ft{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Rh(e,t);if(r.next==null)return Ut.empty;let s=Rc(r);r.next&&r.err("Unexpected trailing text");let i=Fh(Bh(s));return jh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return S.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
1
+ import{c as Yt,r as V,b as So,aB as Yf,j as k,h as Xf,B as xl,aE as Sl,aD as Qf,aC as Zf,v as eh,s as th,I as nh,w as rh,q as sh,D as ih,eE as Sc,eF as oh,b1 as lh,dS as _t,eG as ah,l as er,ah as ch,y as uh}from"./index-D984WV3U.js";import{d as dh,g as fh}from"./tool-namespace-C5Z8tVC2.js";import{a as hh,F as ph,b as mh,c as gh,d as yh,f as bh}from"./form-Dm1N7Fdz.js";import{t as Cl}from"./utils-CVEq3hMx.js";import{a as kh,M as xh}from"./markdown-C8b2SRJt.js";import{u as Sh}from"./use-copy-COXbZ1Gm.js";import{a as Ch}from"./Copy01-CT_cEqll.js";import{T as tr,a as nr,b as rr}from"./tooltip-CfH7_UR9.js";import{F as Mh}from"./agent-icon-CsQzAnP1.js";import{b as Ml}from"./format-time-CjIPQhCN.js";import{c as Co}from"./use-decopilot-events-BDPMNEXz.js";import{I as Mo}from"./chat-context-y8u3K9Tq.js";function Th(n,e){const t={};for(const r of n?.arguments??[])t[r.name]=r.required?Sl().min(1,e):Sl();return Qf(t)}function Eh(n,e){const t={};for(const r of n.arguments??[])t[r.name]=e?.[r.name]??"";return t}function PS(n){const e=Yt.c(74),{prompt:t,setPrompt:r,onSubmit:s,defaultValues:i}=n,o=V.useId(),l=So();let a,c;if(e[0]!==t||e[1]!==l){const le=Th(t,l("chat.dialogPromptArguments.required"));c=Zf,a=Yf(le),e[0]=t,e[1]=l,e[2]=a,e[3]=c}else a=e[2],c=e[3];let u;e[4]!==i||e[5]!==t?(u=t?Eh(t,i):{},e[4]=i,e[5]=t,e[6]=u):u=e[6];let d;e[7]!==a||e[8]!==u?(d={resolver:a,defaultValues:u,mode:"onChange"},e[7]=a,e[8]=u,e[9]=d):d=e[9];const f=c(d);let h;e[10]!==t?.arguments?(h=t?.arguments??[],e[10]=t?.arguments,e[11]=h):h=e[11];const p=h;let g;e[12]!==f||e[13]!==s||e[14]!==r?(g=async le=>{await s(le),r(null),f.reset()},e[12]=f,e[13]=s,e[14]=r,e[15]=g):g=e[15];const m=g;let y;e[16]!==f||e[17]!==r?(y=le=>{le||(f.reset(),r(null))},e[16]=f,e[17]=r,e[18]=y):y=e[18];const b=y;if(!t)return null;let x;e[19]!==t._meta||e[20]!==t.name||e[21]!==t.title?(x=t.title||dh(t.name,fh(t._meta)),e[19]=t._meta,e[20]=t.name,e[21]=t.title,e[22]=x):x=e[22];let C;e[23]!==x?(C=k.jsx(eh,{children:k.jsx("span",{className:"capitalize",children:x})}),e[23]=x,e[24]=C):C=e[24];let T;e[25]!==t.description?(T=t.description&&k.jsx("p",{className:"text-sm text-muted-foreground",children:t.description}),e[25]=t.description,e[26]=T):T=e[26];let A;e[27]!==T||e[28]!==C?(A=k.jsxs(th,{children:[C,T]}),e[27]=T,e[28]=C,e[29]=A):A=e[29];let v;e[30]!==f||e[31]!==m?(v=le=>{le.stopPropagation(),f.handleSubmit(m)(le)},e[30]=f,e[31]=m,e[32]=v):v=e[32];let D;if(e[33]!==p||e[34]!==f.control||e[35]!==f.formState.isSubmitting||e[36]!==l){let le;e[38]!==f.control||e[39]!==f.formState.isSubmitting||e[40]!==l?(le=$e=>k.jsx(ph,{control:f.control,name:$e.name,render:wn=>{const{field:Ke}=wn;return k.jsxs(mh,{children:[k.jsxs(gh,{className:"text-xs",children:[$e.name,$e.required?null:k.jsxs("span",{className:"text-muted-foreground font-normal",children:[" ",l("chat.dialogPromptArguments.optional")]})]}),k.jsx(yh,{children:k.jsx(nh,{...Ke,value:Ke.value??"",required:$e.required,placeholder:$e.description??"",className:"h-9",disabled:f.formState.isSubmitting})}),k.jsx(bh,{})]})}},$e.name),e[38]=f.control,e[39]=f.formState.isSubmitting,e[40]=l,e[41]=le):le=e[41],D=p.map(le),e[33]=p,e[34]=f.control,e[35]=f.formState.isSubmitting,e[36]=l,e[37]=D}else D=e[37];let R;e[42]!==b?(R=()=>b(!1),e[42]=b,e[43]=R):R=e[43];const j=f.formState.isSubmitting;let K;e[44]!==l?(K=l("chat.dialogPromptArguments.cancel"),e[44]=l,e[45]=K):K=e[45];let U;e[46]!==f.formState.isSubmitting||e[47]!==R||e[48]!==K?(U=k.jsx(xl,{type:"button",variant:"ghost",onClick:R,disabled:j,children:K}),e[46]=f.formState.isSubmitting,e[47]=R,e[48]=K,e[49]=U):U=e[49];let L;e[50]!==f.formState.isSubmitting||e[51]!==l?(L=f.formState.isSubmitting?k.jsxs("span",{className:"flex items-center gap-2",children:[k.jsx(Xf,{size:"xs"}),l("chat.dialogPromptArguments.loading")]}):l("chat.dialogPromptArguments.usePrompt"),e[50]=f.formState.isSubmitting,e[51]=l,e[52]=L):L=e[52];let B;e[53]!==f.formState.isSubmitting||e[54]!==o||e[55]!==L?(B=k.jsx(xl,{type:"submit",form:o,disabled:f.formState.isSubmitting,children:L}),e[53]=f.formState.isSubmitting,e[54]=o,e[55]=L,e[56]=B):B=e[56];let z;e[57]!==U||e[58]!==B?(z=k.jsxs(rh,{children:[U,B]}),e[57]=U,e[58]=B,e[59]=z):z=e[59];let _;e[60]!==o||e[61]!==v||e[62]!==D||e[63]!==z?(_=k.jsxs("form",{id:o,className:"space-y-4 py-4",autoComplete:"off",onSubmit:v,children:[D,z]}),e[60]=o,e[61]=v,e[62]=D,e[63]=z,e[64]=_):_=e[64];let Q;e[65]!==f||e[66]!==_?(Q=k.jsx(hh,{...f,children:_}),e[65]=f,e[66]=_,e[67]=Q):Q=e[67];let oe;e[68]!==A||e[69]!==Q?(oe=k.jsxs(sh,{className:"sm:max-w-lg max-h-[80vh] overflow-y-auto",children:[A,Q]}),e[68]=A,e[69]=Q,e[70]=oe):oe=e[70];let Ce;return e[71]!==b||e[72]!==oe?(Ce=k.jsx(ih,{open:!0,onOpenChange:b,children:oe}),e[71]=b,e[72]=oe,e[73]=Ce):Ce=e[73],Ce}var Tl=Object.defineProperty,wh=(n,e)=>{let t={};for(var r in n)Tl(t,r,{get:n[r],enumerable:!0});return Tl(t,Symbol.toStringTag,{value:"Module"}),t};function ae(n){this.content=n}ae.prototype={constructor:ae,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,s=r.find(n),i=r.content.slice();return s==-1?i.push(t||n,e):(i[s+1]=e,t&&(i[s]=t)),new ae(i)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new ae(t)},addToStart:function(n,e){return new ae([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new ae(t)},addBefore:function(n,e,t){var r=this.remove(e),s=r.content.slice(),i=r.find(n);return s.splice(i==-1?s.length:i,0,e,t),new ae(s)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=ae.from(n),n.size?new ae(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=ae.from(n),n.size?new ae(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=ae.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};ae.from=function(n){if(n instanceof ae)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new ae(e)};function Cc(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let s=n.child(r),i=e.child(r);if(s==i){t+=s.nodeSize;continue}if(!s.sameMarkup(i))return t;if(s.isText&&s.text!=i.text){let o=s.text,l=i.text,a=0;for(;o[a]==l[a];a++)t++;return a&&a<o.length&&a<l.length&&Ec(o.charCodeAt(a-1))&&Tc(o.charCodeAt(a))&&t--,t}if(s.content.size||i.content.size){let o=Cc(s.content,i.content,t+1);if(o!=null)return o}t+=s.nodeSize}}function Mc(n,e,t,r){for(let s=n.childCount,i=e.childCount;;){if(s==0||i==0)return s==i?null:{a:t,b:r};let o=n.child(--s),l=e.child(--i),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=o.text,u=l.text,d=c.length,f=u.length;for(;d>0&&f>0&&c[d-1]==u[f-1];)d--,f--,t--,r--;return d&&f&&d<c.length&&Ec(c.charCodeAt(d-1))&&Tc(c.charCodeAt(d))&&(t++,r++),{a:t,b:r}}if(o.content.size||l.content.size){let c=Mc(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}function Tc(n){return n>=56320&&n<57344}function Ec(n){return n>=55296&&n<56320}class S{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,s=0,i){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,s+l,i||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,s+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,s){let i="",o=!0;return this.nodesBetween(e,t,(l,a)=>{let c=l.isText?l.text.slice(Math.max(e,a)-a,t-a):l.isLeaf?s?typeof s=="function"?s(l):s:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&c||l.isTextblock)&&r&&(o?o=!1:i+=r),i+=c},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,s=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(r)&&(s[s.length-1]=t.withText(t.text+r.text),i=1);i<e.content.length;i++)s.push(e.content[i]);return new S(s,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],s=0;if(t>e)for(let i=0,o=0;o<t;i++){let l=this.content[i],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),s+=l.nodeSize),o=a}return new S(r,s)}cutByIndex(e,t){return e==t?S.empty:e==0&&t==this.content.length?this:new S(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let s=this.content.slice(),i=this.size+t.nodeSize-r.nodeSize;return s[e]=t,new S(s,i)}addToStart(e){return new S([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new S(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let s=this.content[t];e(s,r,t),r+=s.nodeSize}}findDiffStart(e,t=0){return Cc(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Mc(this,e,t,r)}findIndex(e){if(e==0)return vr(0,e);if(e==this.size)return vr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,r=0;;t++){let s=this.child(t),i=r+s.nodeSize;if(i>=e)return i==e?vr(t+1,i):vr(t,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return S.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return S.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return S.empty;let t,r=0;for(let s=0;s<e.length;s++){let i=e[s];r+=i.nodeSize,s&&i.isText&&e[s-1].sameMarkup(i)?(t||(t=e.slice(0,s)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new S(t||e,r)}static from(e){if(!e)return S.empty;if(e instanceof S)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new S([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}S.empty=new S([],0);const ti={index:0,offset:0};function vr(n,e){return ti.index=n,ti.offset=e,ti}function Ur(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Ur(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Ur(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let F=class Di{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let s=0;s<e.length;s++){let i=e[s];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,s));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,s)),t.push(this),r=!0),t&&t.push(i)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ur(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);let s=r.create(t.attrs);return r.checkAttrs(s.attrs),s}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Di.none;if(e instanceof Di)return[e];let t=e.slice();return t.sort((r,s)=>r.type.rank-s.type.rank),t}};F.none=[];class sr extends Error{}class E{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=vc(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return r&&new E(r,this.openStart,this.openEnd)}removeBetween(e,t){return new E(wc(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return E.empty;let r=t.openStart||0,s=t.openEnd||0;if(typeof r!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new E(S.fromJSON(e,t.content),r,s)}static maxOpen(e,t=!0){let r=0,s=0;for(let i=e.firstChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)s++;return new E(e,r,s)}}E.empty=new E(S.empty,0,0);function wc(n,e,t){let{index:r,offset:s}=n.findIndex(e),i=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(s==e||i.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,i.copy(wc(i.content,e-s-1,t-s-1)))}function vc(n,e,t,r,s,i){let{index:o,offset:l}=n.findIndex(e),a=n.maybeChild(o);if(l==e||a.isText)return i&&r<=0&&s<=0&&!i.canReplace(o,o,t)?null:n.cut(0,e).append(t).append(n.cut(e));let c=vc(a.content,e-l-1,t,o==0?r-1:0,o==n.childCount-1?s-1:0,a);return c&&n.replaceChild(o,a.copy(c))}function vh(n,e,t){if(t.openStart>n.depth)throw new sr("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new sr("Inconsistent open depths");return Nc(n,e,t,0)}function Nc(n,e,t,r){let s=n.index(r),i=n.node(r);if(s==e.index(r)&&r<n.depth-t.openStart){let o=Nc(n,e,t,r+1);return i.copy(i.content.replaceChild(s,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Bt(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Nh(t,n);return Bt(i,Oc(n,o,l,e,r))}else return Bt(i,qr(n,e,r))}function Ac(n,e){if(!e.type.compatibleContent(n.type))throw new sr("Cannot join "+e.type.name+" onto "+n.type.name)}function Ri(n,e,t){let r=n.node(t);return Ac(r,e.node(t)),r}function zt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function Fn(n,e,t,r){let s=(e||n).node(t),i=0,o=e?e.index(t):s.childCount;n&&(i=n.index(t),n.depth>t?i++:n.textOffset&&(zt(n.nodeAfter,r),i++));for(let l=i;l<o;l++)zt(s.child(l),r);e&&e.depth==t&&e.textOffset&&zt(e.nodeBefore,r)}function Bt(n,e){if(!n.type.validContent(e))throw new sr("Invalid content for node "+n.type.name);return n.copy(e)}function Oc(n,e,t,r,s){let i=n.depth>s&&Ri(n,e,s+1),o=r.depth>s&&Ri(t,r,s+1),l=[];return Fn(null,n,s,l),i&&o&&e.index(s)==t.index(s)?(Ac(i,o),zt(Bt(i,Oc(n,e,t,r,s+1)),l)):(i&&zt(Bt(i,qr(n,e,s+1)),l),Fn(e,t,s,l),o&&zt(Bt(o,qr(t,r,s+1)),l)),Fn(r,null,s,l),new S(l)}function qr(n,e,t){let r=[];if(Fn(null,n,t,r),n.depth>t){let s=Ri(n,e,t+1);zt(Bt(s,qr(n,e,t+1)),r)}return Fn(e,null,t,r),new S(r)}function Nh(n,e){let t=e.depth-n.openStart,s=e.node(t).copy(n.content);for(let i=t-1;i>=0;i--)s=e.node(i).copy(S.from(s));return{start:s.resolveNoCache(n.openStart+t),end:s.resolveNoCache(s.content.size-n.openEnd-t)}}class ir{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],s=e.child(t);return r?e.child(t).cut(r):s}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],s=t==0?0:this.path[t*3-1]+1;for(let i=0;i<e;i++)s+=r.child(i).nodeSize;return s}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return F.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),s=e.maybeChild(t);if(!r){let l=r;r=s,s=l}let i=r.marks;for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,s=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!s||!r[i].isInSet(s.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Jr(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],s=0,i=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(i),c=i-a;if(r.push(o,l,s+a),!c||(o=o.child(l),o.isText))break;i=c-1,s+=a+1}return new ir(t,r,i)}static resolveCached(e,t){let r=El.get(e);if(r)for(let i=0;i<r.elts.length;i++){let o=r.elts[i];if(o.pos==t)return o}else El.set(e,r=new Ah);let s=r.elts[r.i]=ir.resolve(e,t);return r.i=(r.i+1)%Oh,s}}class Ah{constructor(){this.elts=[],this.i=0}}const Oh=12,El=new WeakMap;class Jr{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Dh=Object.create(null);let Ft=class Ii{constructor(e,t,r,s=F.none){this.type=e,this.attrs=t,this.marks=s,this.content=r||S.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,s=0){this.content.nodesBetween(e,t,r,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,s){return this.content.textBetween(e,t,r,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Ur(this.attrs,t||e.defaultAttrs||Dh)&&F.sameSet(this.marks,r||F.none)}copy(e=null){return e==this.content?this:new Ii(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Ii(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return E.empty;let s=this.resolve(e),i=this.resolve(t),o=r?0:s.sharedDepth(t),l=s.start(o),c=s.node(o).content.cut(s.pos-l,i.pos-l);return new E(c,s.depth-o,i.depth-o)}replace(e,t,r){return vh(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:s}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(s==e||t.isText)return t;e-=s+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let s=this.content.child(t-1);return{node:s,index:t-1,offset:r-s.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,t,r){let s=!1;return t>e&&this.nodesBetween(e,t,i=>(r.isInSet(i.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dc(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=S.empty,s=0,i=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,s,i),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=s;a<i;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,s){if(s&&!this.type.allowsMarks(s))return!1;let i=this.contentMatchAt(e).matchType(r),o=i&&i.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=F.none;for(let t=0;t<this.marks.length;t++){let r=this.marks[t];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!F.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let s=S.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,s,r);return i.type.checkAttrs(i.attrs),i}};Ft.prototype.text=void 0;class Gr extends Ft{constructor(e,t,r,s){if(super(e,t,null,s),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dc(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Gr(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Gr(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dc(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class Ut{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Rh(e,t);if(r.next==null)return Ut.empty;let s=Rc(r);r.next&&r.err("Unexpected trailing text");let i=Fh(Bh(s));return jh(i,r),i}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let s=this;for(let i=t;s&&i<r;i++)s=s.matchType(e.child(i).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let s=[this];function i(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return S.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let f=i(d,l.concat(u));if(f)return f}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let s=r.shift(),i=s.match;if(i.matchType(e)){let o=[];for(let l=s;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<i.next.length;o++){let{type:l,next:a}=i.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!s.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:s}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let s=0;s<r.next.length;s++)e.indexOf(r.next[s].next)==-1&&t(r.next[s].next)}return t(this),e.map((r,s)=>{let i=s+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)i+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return i}).join(`
2
2
  `)}}Ut.empty=new Ut(!0);class Rh{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Rc(n){let e=[];do e.push(Ih(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Ih(n){let e=[];do e.push(Ph(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Ph(n){let e=zh(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=Lh(n,e);else break;return e}function wl(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function Lh(n,e){let t=wl(n),r=t;return n.eat(",")&&(n.next!="}"?r=wl(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function $h(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let s=[];for(let i in t){let o=t[i];o.isInGroup(e)&&s.push(o)}return s.length==0&&n.err("No node type or group '"+e+"' found"),s}function zh(n){if(n.eat("(")){let e=Rc(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=$h(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Bh(n){let e=[[]];return s(i(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function s(o,l){o.forEach(a=>a.to=l)}function i(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(i(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=i(o.exprs[a],l);if(a==o.exprs.length-1)return c;s(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),s(i(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return s(i(o.expr,l),a),s(i(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(i(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();s(i(o.expr,a),u),a=u}if(o.max==-1)s(i(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),s(i(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function Ic(n,e){return e-n}function vl(n,e){let t=[];return r(e),t.sort(Ic);function r(s){let i=n[s];if(i.length==1&&!i[0].term)return r(i[0].to);t.push(s);for(let o=0;o<i.length;o++){let{term:l,to:a}=i[o];!l&&t.indexOf(a)==-1&&r(a)}}}function Fh(n){let e=Object.create(null);return t(vl(n,0));function t(r){let s=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<s.length;u++)s[u][0]==l&&(c=s[u][1]);vl(n,a).forEach(u=>{c||s.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let i=e[r.join(",")]=new Ut(r.indexOf(n.length-1)>-1);for(let o=0;o<s.length;o++){let l=s[o][1].sort(Ic);i.next.push({type:s[o][0],next:e[l.join(",")]||t(l)})}return i}}function jh(n,e){for(let t=0,r=[n];t<r.length;t++){let s=r[t],i=!s.validEnd,o=[];for(let l=0;l<s.next.length;l++){let{type:a,next:c}=s.next[l];o.push(a.name),i&&!(a.isText||a.hasRequiredAttrs())&&(i=!1),r.indexOf(c)==-1&&r.push(c)}i&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pc(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Lc(n,e){let t=Object.create(null);for(let r in n){let s=e&&e[r];if(s===void 0){let i=n[r];if(i.hasDefault)s=i.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=s}return t}function $c(n,e,t,r){for(let s in e)if(!(s in n))throw new RangeError(`Unsupported attribute ${s} for ${t} of type ${r}`);for(let s in n)n[s].validate&&n[s].validate(e[s])}function zc(n,e){let t=Object.create(null);if(e)for(let r in e)t[r]=new Vh(n,r,e[r]);return t}let Nl=class Bc{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=zc(e,r.attrs),this.defaultAttrs=Pc(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Ut.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Lc(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Ft(this,this.computeAttrs(e),S.from(t),F.setFrom(r))}createChecked(e=null,t,r){return t=S.from(t),this.checkContent(t),new Ft(this,this.computeAttrs(e),t,F.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=S.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let s=this.contentMatch.matchFragment(t),i=s&&s.fillBefore(S.empty,!0);return i?new Ft(this,e,t.append(i),F.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){$c(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:F.none:e}static compile(e,t){let r=Object.create(null);e.forEach((i,o)=>r[i]=new Bc(i,t,o));let s=t.spec.topNode||"doc";if(!r[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Hh(n,e,t){let r=t.split("|");return s=>{let i=s===null?"null":typeof s;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${n}, got ${i}`)}}class Vh{constructor(e,t,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Hh(e,t,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Fs{constructor(e,t,r,s){this.name=e,this.rank=t,this.schema=r,this.spec=s,this.attrs=zc(e,s.attrs),this.excluded=null;let i=Pc(this.attrs);this.instance=i?new F(this,i):null}create(e=null){return!e&&this.instance?this.instance:new F(this,Lc(this.attrs,e))}static compile(e,t){let r=Object.create(null),s=0;return e.forEach((i,o)=>r[i]=new Fs(i,s++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){$c(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Fc{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let s in e)t[s]=e[s];t.nodes=ae.from(e.nodes),t.marks=ae.from(e.marks||{}),this.nodes=Nl.compile(this.spec.nodes,this),this.marks=Fs.compile(this.spec.marks,this);let r=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let i=this.nodes[s],o=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[o]||(r[o]=Ut.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?Al(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let s in this.marks){let i=this.marks[s],o=i.spec.excludes;i.excluded=o==null?[i]:o==""?[]:Al(this,o.split(" "))}this.nodeFromJSON=s=>Ft.fromJSON(this,s),this.markFromJSON=s=>F.fromJSON(this,s),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Nl){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,s)}text(e,t){let r=this.nodes.text;return new Gr(r,r.defaultAttrs,e,F.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Al(n,e){let t=[];for(let r=0;r<e.length;r++){let s=e[r],i=n.marks[s],o=i;if(i)t.push(i);else for(let l in n.marks){let a=n.marks[l];(s=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(s)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}function Wh(n){return n.tag!=null}function Kh(n){return n.style!=null}class He{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let r=this.matchedStyles=[];t.forEach(s=>{if(Wh(s))this.tags.push(s);else if(Kh(s)){let i=/[^=]*/.exec(s.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let i=e.nodes[s.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Dl(this,t,!1);return r.addAll(e,F.none,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Dl(this,t,!0);return r.addAll(e,F.none,t.from,t.to),E.maxOpen(r.finish())}matchTag(e,t,r){for(let s=r?this.tags.indexOf(r)+1:0;s<this.tags.length;s++){let i=this.tags[s];if(qh(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||t.matchesContext(i.context))){if(i.getAttrs){let o=i.getAttrs(e);if(o===!1)continue;i.attrs=o||void 0}return i}}}matchStyle(e,t,r,s){for(let i=s?this.styles.indexOf(s)+1:0;i<this.styles.length;i++){let o=this.styles[i],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(s){let i=s.priority==null?50:s.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<i)break}t.splice(o,0,s)}for(let s in e.marks){let i=e.marks[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Rl(o)),o.mark||o.ignore||o.clearMark||(o.mark=s)})}for(let s in e.nodes){let i=e.nodes[s].spec.parseDOM;i&&i.forEach(o=>{r(o=Rl(o)),o.node||o.ignore||o.mark||(o.node=s)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new He(e,He.schemaRules(e)))}}const jc={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},_h={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hc={ol:!0,ul:!0},or=1,Pi=2,jn=4;function Ol(n,e,t){return e!=null?(e?or:0)|(e==="full"?Pi:0):n&&n.whitespace=="pre"?or|Pi:t&~jn}class Nr{constructor(e,t,r,s,i,o){this.type=e,this.attrs=t,this.marks=r,this.solid=s,this.options=o,this.content=[],this.activeMarks=F.none,this.match=i||(o&jn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(S.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,s;return(s=r.findWrapping(e.type))?(this.match=r,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&or)){let r=this.content[this.content.length-1],s;if(r&&r.isText&&(s=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-s[0].length))}}let t=S.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(S.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!jc.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Dl{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let s=t.topNode,i,o=Ol(null,t.preserveWhitespace,0)|(r?jn:0);s?i=new Nr(s.type,s.attrs,F.none,!0,t.topMatch||s.type.contentMatch,o):r?i=new Nr(null,null,F.none,!0,null,o):i=new Nr(e.schema.topNodeType,null,F.none,!0,null,o),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let r=e.nodeValue,s=this.top,i=s.options&Pi?"full":this.localPreserveWS||(s.options&or)>0,{schema:o}=this.parser;if(i==="full"||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
3
3
  `);else if(o.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(o.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let a=0;a<l.length;a++)a&&this.insertNode(o.linebreakReplacement.create(),t,!0),l[a]&&this.insertNode(o.text(l[a]),t,!/\S/.test(l[a]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=s.content[s.content.length-1],a=e.previousSibling;(!l||a&&a.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(o.text(r),t,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,t,r){let s=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let o=e.nodeName.toLowerCase(),l;Hc.hasOwnProperty(o)&&this.parser.normalizeLists&&Uh(e);let a=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(a?a.ignore:_h.hasOwnProperty(o))this.findInside(e),this.ignoreFallback(e,t);else if(!a||a.skip||a.closeParent){a&&a.closeParent?this.open=Math.max(0,this.open-1):a&&a.skip.nodeType&&(e=a.skip);let c,u=this.needsBlock;if(jc.hasOwnProperty(o))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),c=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let d=a&&a.skip?t:this.readStyles(e,t);d&&this.addAll(e,d),c&&this.sync(i),this.needsBlock=u}else{let c=this.readStyles(e,t);c&&this.addElementByRule(e,a,c,a.consuming===!1?l:void 0)}this.localPreserveWS=s}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
4
4
  `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let r=e.style;if(r&&r.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let i=this.parser.matchedStyles[s],o=r.getPropertyValue(i);if(o)for(let l=void 0;;){let a=this.parser.matchStyle(i,o,this,l);if(!a)break;if(a.ignore)return null;if(a.clearMark?t=t.filter(c=>!a.clearMark(c)):t=t.concat(this.parser.schema.marks[a.mark].create(a.attrs)),a.consuming===!1)l=a;else break}}return t}addElementByRule(e,t,r,s){let i,o;if(t.node)if(o=this.parser.schema.nodes[t.node],o.isLeaf)this.insertNode(o.create(t.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let a=this.enter(o,t.attrs||null,r,t.preserveWhitespace);a&&(i=!0,r=a)}else{let a=this.parser.schema.marks[t.mark];r=r.concat(a.create(t.attrs))}let l=this.top;if(o&&o.isLeaf)this.findInside(e);else if(s)this.addElement(e,r,s);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a,r,!1));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a,r),this.findAround(e,a,!1)}i&&this.sync(l)&&this.open--}addAll(e,t,r,s){let i=r||0;for(let o=r?e.childNodes[r]:e.firstChild,l=s==null?null:e.childNodes[s];o!=l;o=o.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(o,t);this.findAtPoint(e,i)}findPlace(e,t,r){let s,i;for(let o=this.open,l=0;o>=0;o--){let a=this.nodes[o],c=a.findWrapping(e);if(c&&(!s||s.length>c.length+l)&&(s=c,i=a,!c.length))break;if(a.solid){if(r)break;l+=2}}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)t=this.enterInner(s[o],null,t,!1);return t}insertNode(e,t,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(t=this.enterInner(i,null,t))}let s=this.findPlace(e,t,r);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=F.none;for(let l of s.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):Il(l.type,e.type))&&(o=l.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,t,r,s){let i=this.findPlace(e.create(t),r,!1);return i&&(i=this.enterInner(e,t,r,!0,s)),i}enterInner(e,t,r,s=!1,i){this.closeExtra();let o=this.top;o.match=o.match&&o.match.matchType(e);let l=Ol(e,i,o.options);o.options&jn&&o.content.length==0&&(l|=jn);let a=F.none;return r=r.filter(c=>(o.type?o.type.allowsMarkType(c.type):Il(c.type,e))?(a=c.addToSet(a),!1):!0),this.nodes.push(new Nr(e,t,a,s,null,l)),this.open++,r}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=or)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let s=r.length-1;s>=0;s--)e+=r[s].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&t.compareDocumentPosition(this.find[s].node)&(r?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,s=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(s?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=i;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&s?this.nodes[a].type:r&&a>=i?r.node(a-i).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}}function Uh(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hc.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function qh(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function Rl(n){let e={};for(let t in n)e[t]=n[t];return e}function Il(n,e){let t=e.schema.nodes;for(let r in t){let s=t[r];if(!s.allowsMarkType(n))continue;let i=[],o=l=>{i.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||i.indexOf(u)<0&&o(u))return!0}};if(o(s.contentMatch))return!0}}class rt{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=Ar(t).createDocumentFragment());let s=r,i=[];return e.forEach(o=>{if(i.length||o.marks.length){let l=0,a=0;for(;l<i.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(i[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<i.length;)s=i.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(i.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){if(e.isText)return Ar(t).createTextNode(e.text);let{dom:r,contentDOM:s}=Hr(Ar(t),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,s)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let s=e.marks.length-1;s>=0;s--){let i=this.serializeMark(e.marks[s],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,t,r={}){let s=this.marks[e.type.name];return s&&Hr(Ar(r),s(e,t),null,e.attrs)}static renderSpec(e,t,r=null,s){return typeof t=="string"?{dom:e.createTextNode(t)}:Hr(e,t,r,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rt(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Pl(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return Pl(e.marks)}}function Pl(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function Ar(n){return n.document||window.document}const Ll=new WeakMap;function Jh(n){let e=Ll.get(n);return e===void 0&&Ll.set(n,e=Gh(n)),e}function Gh(n){let e=null;function t(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let s=0;s<r.length;s++)t(r[s]);else for(let s in r)t(r[s])}return t(n),e}function Hr(n,e,t,r){if(e.nodeType==1)return{dom:e};if(e.dom&&e.dom.nodeType==1)return e;let s=e[0],i;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Jh(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let o=s.indexOf(" ");o>0&&(t=s.slice(0,o),s=s.slice(o+1));let l,a=t?n.createElementNS(t,s):n.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let f=d.indexOf(" ");f>0?a.setAttributeNS(d.slice(0,f),d.slice(f+1),c[d]):d=="style"&&a.style?a.style.cssText=c[d]:a.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let f=e[d];if(f===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}else if(typeof f=="string")a.appendChild(n.createTextNode(f));else{let{dom:h,contentDOM:p}=Hr(n,f,t,r);if(a.appendChild(h),p){if(l)throw new RangeError("Multiple content holes");l=p}}}return{dom:a,contentDOM:l}}const Vc=65535,Wc=Math.pow(2,16);function Yh(n,e){return n+e*Wc}function $l(n){return n&Vc}function Xh(n){return(n-(n&Vc))/Wc}const Kc=1,_c=2,Vr=4,Uc=8;class Li{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Uc)>0}get deletedBefore(){return(this.delInfo&(Kc|Vr))>0}get deletedAfter(){return(this.delInfo&(_c|Vr))>0}get deletedAcross(){return(this.delInfo&Vr)>0}}class Me{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Me.empty)return Me.empty}recover(e){let t=0,r=$l(e);if(!this.inverted)for(let s=0;s<r;s++)t+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[r*3]+t+Xh(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let s=0,i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?s:0);if(a>e)break;let c=this.ranges[l+i],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+s+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Yh(l/3,e-a),g=e==a?_c:e==d?Kc:Vr;return(t<0?e!=a:e!=d)&&(g|=Uc),new Li(h,g,p)}s+=u-c}return r?e+s:new Li(e+s,0,null)}touches(e,t){let r=0,s=$l(t),i=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+i],u=a+c;if(e<=u&&l==s*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let s=0,i=0;s<this.ranges.length;s+=3){let o=this.ranges[s],l=o-(this.inverted?i:0),a=o+(this.inverted?0:i),c=this.ranges[s+t],u=this.ranges[s+r];e(l,l+c,a,a+u),i+=u-c}}invert(){return new Me(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Me.empty:new Me(e<0?[0,-e,0]:[0,0,e])}}Me.empty=new Me([]);class lr{constructor(e,t,r=0,s=e?e.length:0){this.mirror=t,this.from=r,this.to=s,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new lr(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,r=this._maps.length;t<e._maps.length;t++){let s=e.getMirror(t);this.appendMap(e._maps[t],s!=null&&s<t?r+s:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this._maps.length+e._maps.length;t>=0;t--){let s=e.getMirror(t);this.appendMap(e._maps[t].invert(),s!=null&&s>t?r-s-1:void 0)}}invert(){let e=new lr;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let s=0;for(let i=this.from;i<this.to;i++){let o=this._maps[i],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(i);if(a!=null&&a>i&&a<this.to){i=a,e=this._maps[a].recover(l.recover);continue}}s|=l.delInfo,e=l.pos}return r?e:new Li(e,s,null)}}const ni=Object.create(null);class pe{getMap(){return Me.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=ni[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ni)throw new RangeError("Duplicate use of step JSON ID "+e);return ni[e]=t,t.prototype.jsonID=e,t}}class Z{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Z(e,null)}static fail(e){return new Z(null,e)}static fromReplace(e,t,r,s){try{return Z.ok(e.replace(t,r,s))}catch(i){if(i instanceof sr)return Z.fail(i.message);throw i}}}function To(n,e,t){let r=[];for(let s=0;s<n.childCount;s++){let i=n.child(s);i.content.size&&(i=i.copy(To(i.content,e,i))),i.isInline&&(i=e(i,t,s)),r.push(i)}return S.fromArray(r)}class mt extends pe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),s=r.node(r.sharedDepth(this.to)),i=new E(To(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),s),t.openStart,t.openEnd);return Z.fromReplace(e,this.from,this.to,i)}invert(){return new Ie(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new mt(t.pos,r.pos,this.mark)}merge(e){return e instanceof mt&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new mt(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new mt(t.from,t.to,e.markFromJSON(t.mark))}}pe.jsonID("addMark",mt);class Ie extends pe{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new E(To(t.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),t.openStart,t.openEnd);return Z.fromReplace(e,this.from,this.to,r)}invert(){return new mt(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ie(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ie&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ie(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ie(t.from,t.to,e.markFromJSON(t.mark))}}pe.jsonID("removeMark",Ie);class gt extends pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Z.fromReplace(e,this.pos,this.pos+1,new E(S.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let s=0;s<t.marks.length;s++)if(!t.marks[s].isInSet(r))return new gt(this.pos,t.marks[s]);return new gt(this.pos,this.mark)}}return new qt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new gt(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new gt(t.pos,e.markFromJSON(t.mark))}}pe.jsonID("addNodeMark",gt);class qt extends pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Z.fromReplace(e,this.pos,this.pos+1,new E(S.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new gt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new qt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new qt(t.pos,e.markFromJSON(t.mark))}}pe.jsonID("removeNodeMark",qt);class X extends pe{constructor(e,t,r,s=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=s}apply(e){return this.structure&&$i(e,this.from,this.to)?Z.fail("Structure replace would overwrite content"):Z.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Me([this.from,this.to-this.from,this.slice.size])}invert(e){return new X(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),r=this.from==this.to&&X.MAP_BIAS<0?t:e.mapResult(this.from,1);return r.deletedAcross&&t.deletedAcross?null:new X(r.pos,Math.max(r.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof X)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?E.empty:new E(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new X(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?E.empty:new E(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new X(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new X(t.from,t.to,E.fromJSON(e,t.slice),!!t.structure)}}X.MAP_BIAS=1;pe.jsonID("replace",X);class se extends pe{constructor(e,t,r,s,i,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=s,this.slice=i,this.insert=o,this.structure=l}apply(e){if(this.structure&&($i(e,this.from,this.gapFrom)||$i(e,this.gapTo,this.to)))return Z.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Z.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?Z.fromReplace(e,this.from,this.to,r):Z.fail("Content does not fit in gap")}getMap(){return new Me([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new se(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),s=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||s<t.pos||i>r.pos?null:new se(t.pos,r.pos,s,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new se(t.from,t.to,t.gapFrom,t.gapTo,E.fromJSON(e,t.slice),t.insert,!!t.structure)}}pe.jsonID("replaceAround",se);function $i(n,e,t){let r=n.resolve(e),s=t-e,i=r.depth;for(;s>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,s--;if(s>0){let o=r.node(i).maybeChild(r.indexAfter(i));for(;s>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,s--}}return!1}function Qh(n,e,t,r){let s=[],i=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let g=0;g<d.length;g++)d[g].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[g])?o.to=h:s.push(o=new Ie(f,h,d[g])));l&&l.to==f?l.to=h:i.push(l=new mt(f,h,r))}}),s.forEach(a=>n.step(a)),i.forEach(a=>n.step(a))}function Zh(n,e,t,r){let s=[],i=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;i++;let a=null;if(r instanceof Fs){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<s.length;h++){let p=s[h];p.step==i-1&&d.eq(s[h].style)&&(f=p)}f?(f.to=c,f.step=i):s.push({style:d,from:Math.max(l,e),to:c,step:i})}}}),s.forEach(o=>n.step(new Ie(o.from,o.to,o.style)))}function Eo(n,e,t,r=t.contentMatch,s=!0){let i=n.doc.nodeAt(e),o=[],l=e+1;for(let a=0;a<i.childCount;a++){let c=i.child(a),u=l+c.nodeSize,d=r.matchType(c.type);if(!d)o.push(new X(l,u,E.empty));else{r=d;for(let f=0;f<c.marks.length;f++)t.allowsMarkType(c.marks[f].type)||n.step(new Ie(l,u,c.marks[f]));if(s&&c.isText&&t.whitespace!="pre"){let f,h=/\r?\n|\r/g,p;for(;f=h.exec(c.text);)p||(p=new E(S.from(t.schema.text(" ",t.allowedMarks(c.marks))),0,0)),o.push(new X(l+f.index,l+f.index+f[0].length,p))}}l=u}if(!r.validEnd){let a=r.fillBefore(S.empty,!0);n.replace(l,l,new E(a,0,0))}for(let a=o.length-1;a>=0;a--)n.step(o[a])}function ep(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function En(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth,s=0,i=0;;--r){let o=n.$from.node(r),l=n.$from.index(r)+s,a=n.$to.indexAfter(r)-i;if(r<n.depth&&o.canReplace(l,a,t))return r;if(r==0||o.type.spec.isolating||!ep(o,l,a))break;l&&(s=1),a<o.childCount&&(i=1)}return null}function tp(n,e,t){let{$from:r,$to:s,depth:i}=e,o=r.before(i+1),l=s.after(i+1),a=o,c=l,u=S.empty,d=0;for(let p=i,g=!1;p>t;p--)g||r.index(p)>0?(g=!0,u=S.from(r.node(p).copy(u)),d++):a--;let f=S.empty,h=0;for(let p=i,g=!1;p>t;p--)g||s.after(p+1)<s.end(p)?(g=!0,f=S.from(s.node(p).copy(f)),h++):c++;n.step(new se(a,c,o,l,new E(u.append(f),d,h),u.size-d,!0))}function wo(n,e,t=null,r=n){let s=np(n,e),i=s&&rp(r,e);return i?s.map(zl).concat({type:e,attrs:t}).concat(i.map(zl)):null}function zl(n){return{type:n,attrs:null}}function np(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.contentMatchAt(r).findWrapping(e);if(!i)return null;let o=i.length?i[0]:e;return t.canReplaceWith(r,s,o)?i:null}function rp(n,e){let{parent:t,startIndex:r,endIndex:s}=n,i=t.child(r),o=e.contentMatch.findWrapping(i.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<s;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function sp(n,e,t){let r=S.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=S.from(t[o].type.create(t[o].attrs,r))}let s=e.start,i=e.end;n.step(new se(s,i,s,i,new E(r,0,0),t.length,!0))}function ip(n,e,t,r,s){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{let a=typeof s=="function"?s(o):s;if(o.isTextblock&&!o.hasMarkup(r,a)&&op(n.doc,n.mapping.slice(i).map(l),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",p=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!p?c=!1:!h&&p&&(c=!0)}c===!1&&Jc(n,o,l,i),Eo(n,n.mapping.slice(i).map(l,1),r,void 0,c===null);let u=n.mapping.slice(i),d=u.map(l,1),f=u.map(l+o.nodeSize,1);return n.step(new se(d,f,d+1,f-1,new E(S.from(r.create(a,null,o.marks)),0,0),1,!0)),c===!0&&qc(n,o,l,i),!1}})}function qc(n,e,t,r){e.forEach((s,i)=>{if(s.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(s.text);){let a=n.mapping.slice(r).map(t+1+i+o.index);n.replaceWith(a,a+1,e.type.schema.linebreakReplacement.create())}}})}function Jc(n,e,t,r){e.forEach((s,i)=>{if(s.type==s.type.schema.linebreakReplacement){let o=n.mapping.slice(r).map(t+1+i);n.replaceWith(o,o+1,e.type.schema.text(`
@@ -1 +1 @@
1
- import{c as p,a2 as h,aa as R,K as m,m as y,R as S,ao as P}from"./index-Cgvxdf_Q.js";const M=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],O=new Set(M);function A(o){return O.has(o)}const C=new Set(["anthropic","openrouter","deco"]);function B(o){return C.has(o)}function _(o){return o.capabilities?.includes("decisions")===!0}function G(o){return!_(o)&&o.asyncResearch!==!0}const L={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},T={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},w={openrouter:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],deco:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},x={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function I(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function q(o){return I(o).includes("deepresearch")}const F=["sonar","searchpreview","online"];function D(o){const e=I(o);return e.includes("deepresearch")?!1:F.some(t=>e.includes(t))}function b(o){return o.asyncResearch!==!0&&D(o.modelId)}function H(o){return o.asyncResearch===!0||q(o.modelId)||D(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function N(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=(e[n.id]??[]).filter(a=>!_(a)),s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,L[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,T[s]??[])),t.image||(t.image=u(i,n.id,w[s]??[],a=>a.capabilities?.includes("image")===!0&&!a.modelId.startsWith("openrouter/auto"))),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],b)),t.deepResearch||(t.deepResearch=u(i,n.id,x[s]??[],H))}return t}function V(o,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await P(o,"AI_PROVIDER_KEY_LIST",{})}}function U(){const o=p.c(7),{org:e}=h(),t=R();let n;o[0]!==e.id?(n=m.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function Q(){const o=p.c(5),{org:e}=h();let t;o[0]!==e.id||o[1]!==e.slug?(t=V(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function W(){const o=p.c(2),e=Q();let t;return o[0]!==e?(t=e.filter($),o[0]=e,o[1]=t):t=o[1],t}function $(o){return A(o.providerId)}function E(o){const e=p.c(15),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function Y(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=N(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function j(o){const e=p.c(11),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{E as a,H as b,G as c,Y as d,U as e,Q as f,A as g,j as h,b as i,N as p,B as s,W as u};
1
+ import{c as p,a2 as h,aa as R,K as m,m as y,R as S,ao as P}from"./index-D984WV3U.js";const M=["deco","anthropic","openrouter","llmapi","google","openai-compatible"],O=new Set(M);function A(o){return O.has(o)}const C=new Set(["anthropic","openrouter","deco"]);function B(o){return C.has(o)}function _(o){return o.capabilities?.includes("decisions")===!0}function G(o){return!_(o)&&o.asyncResearch!==!0}const L={anthropic:["claude-haiku-4-5","claude-haiku"],openrouter:["qwen/qwen3.5-flash","anthropic/claude-haiku-4.5","anthropic/claude-haiku","google/gemini-3-flash"],deco:["qwen/qwen3.5-flash","anthropic/claude-haiku"],llmapi:["claude-haiku-4-5","claude-haiku","gpt-4o-mini"],google:["gemini-2.5-flash","gemini-3-flash"]},v={anthropic:["claude-sonnet-5","claude-sonnet"],openrouter:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude-opus-4.8","google/gemini-3-pro"],deco:["anthropic/claude-sonnet-5","anthropic/claude-sonnet","anthropic/claude"],llmapi:["claude-sonnet-4-6","claude-sonnet"],google:["gemini-3-pro","gemini-3-flash"]},T={anthropic:["claude-opus-4-8","claude-sonnet-5","claude-sonnet","claude-fable-5"],openrouter:["anthropic/claude-opus-4.8:extended","anthropic/claude-opus-4.8","anthropic/claude-sonnet-5:extended","anthropic/claude-sonnet-5","google/gemini-3-pro","anthropic/claude-fable-5"],deco:["anthropic/claude-opus","anthropic/claude-sonnet-4.6","anthropic/claude-sonnet","anthropic/claude-fable"],llmapi:["claude-opus-4-8","claude-opus","claude-sonnet-4-6"],google:["gemini-3-pro"]},w={openrouter:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],deco:["google/gemini-3-pro-image","openai/gpt-5-image","google/gemini-2.5-flash-image"],llmapi:["gemini-2.5-flash-image","gpt-image-1"],google:["gemini-2.0-flash-image"]},K={openrouter:["perplexity/sonar","perplexity/sonar-pro"],deco:["perplexity/sonar","perplexity/sonar-pro"]},x={openrouter:["perplexity/deep-research","perplexity/sonar-pro"],deco:["perplexity/deep-research","perplexity/sonar-pro"]};function I(o){return o.toLowerCase().replace(/[^a-z0-9]/g,"")}function q(o){return I(o).includes("deepresearch")}const F=["sonar","searchpreview","online"];function D(o){const e=I(o);return e.includes("deepresearch")?!1:F.some(t=>e.includes(t))}function b(o){return o.asyncResearch!==!0&&D(o.modelId)}function H(o){return o.asyncResearch===!0||q(o.modelId)||D(o.modelId)}function u(o,e,t,n){for(const i of t){const s=o.find(a=>a.modelId===i);if(s)return{keyId:e,modelId:s.modelId,title:s.title}}for(const i of t){const s=o.find(a=>a.modelId.includes(i));if(s)return{keyId:e,modelId:s.modelId,title:s.title}}if(n){const i=o.find(n);if(i)return{keyId:e,modelId:i.modelId,title:i.title}}return null}function N(o,e){const t={chat:{fast:null,smart:null,thinking:null},image:null,webSearch:null,deepResearch:null};for(const n of o){const i=(e[n.id]??[]).filter(a=>!_(a)),s=n.providerId;t.chat.fast||(t.chat.fast=u(i,n.id,L[s]??[])),t.chat.smart||(t.chat.smart=u(i,n.id,v[s]??[])),t.chat.thinking||(t.chat.thinking=u(i,n.id,T[s]??[])),t.image||(t.image=u(i,n.id,w[s]??[],a=>a.capabilities?.includes("image")===!0&&!a.modelId.startsWith("openrouter/auto"))),t.webSearch||(t.webSearch=u(i,n.id,K[s]??[],b)),t.deepResearch||(t.deepResearch=u(i,n.id,x[s]??[],H))}return t}function V(o,e){return{queryKey:m.aiProviderKeys(e),staleTime:6e4,queryFn:async()=>await P(o,"AI_PROVIDER_KEY_LIST",{})}}function U(){const o=p.c(7),{org:e}=h(),t=R();let n;o[0]!==e.id?(n=m.aiProviders(e.id),o[0]=e.id,o[1]=n):n=o[1];let i;o[2]!==t?(i=async()=>await t.call("AI_PROVIDERS_LIST",{}),o[2]=t,o[3]=i):i=o[3];let s;o[4]!==n||o[5]!==i?(s={queryKey:n,staleTime:1/0,queryFn:i},o[4]=n,o[5]=i,o[6]=s):s=o[6];const{data:a}=S(s);return a}function Q(){const o=p.c(5),{org:e}=h();let t;o[0]!==e.id||o[1]!==e.slug?(t=V(e.slug,e.id),o[0]=e.id,o[1]=e.slug,o[2]=t):t=o[2];const{data:n}=S(t);let i;return o[3]!==n?.keys?(i=n?.keys??[],o[3]=n?.keys,o[4]=i):i=o[4],i}function W(){const o=p.c(2),e=Q();let t;return o[0]!==e?(t=e.filter($),o[0]=e,o[1]=t):t=o[1],t}function $(o){return A(o.providerId)}function E(o){const e=p.c(15),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o??""),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];const s=!!o;let a;e[3]!==o||e[4]!==n?(a=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o??""}),e[3]=o,e[4]=n,e[5]=a):a=e[5];let r;e[6]!==i||e[7]!==s||e[8]!==a?(r={queryKey:i,enabled:s,staleTime:6e4,queryFn:a},e[6]=i,e[7]=s,e[8]=a,e[9]=r):r=e[9];const{data:l,isLoading:c}=y(r);let d;e[10]!==l?.models?(d=l?.models??[],e[10]=l?.models,e[11]=d):d=e[11];const g=!!o&&c;let f;return e[12]!==d||e[13]!==g?(f={models:d,isLoading:g},e[12]=d,e[13]=g,e[14]=f):f=e[14],f}function Y(o){const e=p.c(8),t=o[0],n=o[1],i=o[2],{models:s}=E(t?.id),{models:a}=E(n?.id),{models:r}=E(i?.id);let l;if(e[0]!==t||e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==s||e[5]!==a||e[6]!==r){const c={};t?.id&&(c[t.id]=s),n?.id&&(c[n.id]=a),i?.id&&(c[i.id]=r),l=N(o,c),e[0]=t,e[1]=n,e[2]=i,e[3]=o,e[4]=s,e[5]=a,e[6]=r,e[7]=l}else l=e[7];return l}function j(o){const e=p.c(11),{org:t}=h(),n=R();let i;e[0]!==o||e[1]!==t.id?(i=m.aiProviderModels(t.id,o),e[0]=o,e[1]=t.id,e[2]=i):i=e[2];let s;e[3]!==o||e[4]!==n?(s=async()=>await n.call("AI_PROVIDERS_LIST_MODELS",{keyId:o}),e[3]=o,e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i||e[7]!==s?(a={queryKey:i,staleTime:6e4,queryFn:s},e[6]=i,e[7]=s,e[8]=a):a=e[8];const{data:r}=S(a);let l;return e[9]!==r?.models?(l=r?.models??[],e[9]=r?.models,e[10]=l):l=e[10],l}export{E as a,H as b,G as c,Y as d,U as e,Q as f,A as g,j as h,b as i,N as p,B as s,W as u};
@@ -1 +1 @@
1
- import{c as q,a2 as U,aa as Q,K as f,m as I,o as x,e as A,t as m,J as z}from"./index-Cgvxdf_Q.js";import{u as J}from"./use-mcp-client-BnJ4CmVv.js";function V(e){if(e.paramsSchema&&typeof e.paramsSchema=="object")return e;const t={};if(Array.isArray(e.params))for(const s of e.params)t[s.name]={type:s.type,description:s.description,enum:s.enum};else e.params&&typeof e.params=="object"&&Object.assign(t,e.params);return{type:e.type,description:e.description,paramsSchema:t}}function te(e){const t=q.c(12),{org:s}=U(),a=e??z;let n;t[0]!==s.id||t[1]!==s.slug||t[2]!==a?(n={connectionId:a,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=a,t[3]=n):n=t[3];const i=J(n);let l;t[4]!==e?(l=f.toolCall(e??"","TRIGGER_LIST",""),t[4]=e,t[5]=l):l=t[5];let o;t[6]!==i?(o=async()=>{const y=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(y.structuredContent??y).triggers.map(V)},t[6]=i,t[7]=o):o=t[7];const r=!!e;let c;return t[8]!==l||t[9]!==o||t[10]!==r?(c={queryKey:l,queryFn:o,enabled:r,staleTime:3e4},t[8]=l,t[9]=o,t[10]=r,t[11]=c):c=t[11],I(c)}function se(e){const t=q.c(9),{org:s}=U(),a=Q();let n;t[0]!==s.id||t[1]!==e?(n=f.automations(s.id,e),t[0]=s.id,t[1]=e,t[2]=n):n=t[2];let i;t[3]!==a||t[4]!==e?(i=async()=>(await a.call("AUTOMATION_LIST",e!=null?{virtual_mcp_id:e}:{})).automations,t[3]=a,t[4]=e,t[5]=i):i=t[5];let l;return t[6]!==n||t[7]!==i?(l={queryKey:n,queryFn:i,staleTime:1e4},t[6]=n,t[7]=i,t[8]=l):l=t[8],I(l)}function ie(e){const t=q.c(10),{org:s}=U(),a=Q();let n;t[0]!==e||t[1]!==s.id?(n=f.automation(s.id,e),t[0]=e,t[1]=s.id,t[2]=n):n=t[2];let i;t[3]!==e||t[4]!==a?(i=async()=>(await a.call("AUTOMATION_GET",{id:e})).automation,t[3]=e,t[4]=a,t[5]=i):i=t[5];const l=!!e;let o;return t[6]!==n||t[7]!==i||t[8]!==l?(o={queryKey:n,queryFn:i,enabled:l,staleTime:1e4},t[6]=n,t[7]=i,t[8]=l,t[9]=o):o=t[9],I(o)}function ae(e,t){const s=q.c(12),{org:a}=U(),n=Q();let i;s[0]!==e||s[1]!==a.id||s[2]!==t?(i=f.automationRunStats(a.id,e,JSON.stringify(t??{})),s[0]=e,s[1]=a.id,s[2]=t,s[3]=i):i=s[3];let l;s[4]!==e||s[5]!==t||s[6]!==n?(l=async()=>await n.call("AUTOMATION_RUN_STATS",{automation_id:e,...t?.startDate?{startDate:t.startDate}:{},...t?.endDate?{endDate:t.endDate}:{}}),s[4]=e,s[5]=t,s[6]=n,s[7]=l):l=s[7];const o=!!e;let r;return s[8]!==i||s[9]!==l||s[10]!==o?(r={queryKey:i,queryFn:l,enabled:o,staleTime:3e4},s[8]=i,s[9]=l,s[10]=o,s[11]=r):r=s[11],I(r)}function oe(e){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:e}}function ne(){const e=q.c(66),{org:t}=U(),s=Q(),a=x();let n;e[0]!==t||e[1]!==a?(n=()=>Promise.all([a.invalidateQueries({queryKey:f.automationsAll(t.id)}),a.invalidateQueries({queryKey:f.jiraAutomations(t.id)})]),e[0]=t,e[1]=a,e[2]=n):n=e[2];const i=n;let l;e[3]!==t||e[4]!==a?(l=u=>a.invalidateQueries({queryKey:f.automation(t.id,u)}),e[3]=t,e[4]=a,e[5]=l):l=e[5];const o=l;let r;e[6]!==s?(r=async u=>await s.call("AUTOMATION_CREATE",u),e[6]=s,e[7]=r):r=e[7];let c;e[8]!==i?(c=()=>{i(),m.success("Automation created successfully")},e[8]=i,e[9]=c):c=e[9];let y;e[10]!==r||e[11]!==c?(y={mutationFn:r,onSuccess:c,onError:X},e[10]=r,e[11]=c,e[12]=y):y=e[12];const D=A(y);let T;e[13]!==s?(T=async u=>await s.call("AUTOMATION_UPDATE",u),e[13]=s,e[14]=T):T=e[14];let g;e[15]!==i||e[16]!==o||e[17]!==t||e[18]!==a?(g=(u,d)=>{i(),typeof d.id=="string"&&o(d.id),a.invalidateQueries({queryKey:f.organizationSettings(t.id)}),m.success("Automation updated successfully")},e[15]=i,e[16]=o,e[17]=t,e[18]=a,e[19]=g):g=e[19];let K;e[20]!==T||e[21]!==g?(K={mutationFn:T,onSuccess:g,onError:W},e[20]=T,e[21]=g,e[22]=K):K=e[22];const j=A(K);let p;e[23]!==s?(p=async u=>await s.call("AUTOMATION_DELETE",{id:u}),e[23]=s,e[24]=p):p=e[24];let _;e[25]!==i||e[26]!==t||e[27]!==a?(_=(u,d)=>{a.removeQueries({queryKey:f.automation(t.id,d)}),i(),m.success("Automation deleted successfully")},e[25]=i,e[26]=t,e[27]=a,e[28]=_):_=e[28];let G;e[29]!==p||e[30]!==_?(G={mutationFn:p,onSuccess:_,onError:H},e[29]=p,e[30]=_,e[31]=G):G=e[31];const v=A(G);let S;e[32]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),e[32]=s,e[33]=S):S=e[33];let E;e[34]!==i||e[35]!==o?(E=u=>{i(),o(u.automation_id)},e[34]=i,e[35]=o,e[36]=E):E=e[36];let $;e[37]!==S||e[38]!==E?($={mutationFn:S,onSuccess:E},e[37]=S,e[38]=E,e[39]=$):$=e[39];const P=A($);let O;e[40]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),e[40]=s,e[41]=O):O=e[41];let R;e[42]!==i||e[43]!==o?(R=(u,d)=>{i(),o(d.automation_id)},e[42]=i,e[43]=o,e[44]=R):R=e[44];let C;e[45]!==O||e[46]!==R?(C={mutationFn:O,onSuccess:R},e[45]=O,e[46]=R,e[47]=C):C=e[47];const k=A(C);let F;e[48]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),e[48]=s,e[49]=F):F=e[49];let N;e[50]!==i||e[51]!==o?(N=(u,d)=>{i(),o(d.automation_id)},e[50]=i,e[51]=o,e[52]=N):N=e[52];let b;e[53]!==F||e[54]!==N?(b={mutationFn:F,onSuccess:N},e[53]=F,e[54]=N,e[55]=b):b=e[55];const h=A(b);let L;e[56]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},e[56]=s,e[57]=L):L=e[57];const w=A(L);let M;return e[58]!==D||e[59]!==v||e[60]!==w||e[61]!==P||e[62]!==h||e[63]!==k||e[64]!==j?(M={create:D,update:j,remove:v,triggerAdd:P,triggerRemove:h,triggerRotateToken:k,run:w},e[58]=D,e[59]=v,e[60]=w,e[61]=P,e[62]=h,e[63]=k,e[64]=j,e[65]=M):M=e[65],M}function Y(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to run automation: ${t}`)}function B(e){e.skipped?m.info(`Automation skipped: ${e.skipped}`):e.error?m.error(`Automation failed: ${e.error}`):m.success("Automation triggered")}function H(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to delete automation: ${t}`)}function W(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to update automation: ${t}`)}function X(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to create automation: ${t}`)}export{ne as a,oe as b,te as c,ie as d,ae as e,se as u};
1
+ import{c as q,a2 as U,aa as Q,K as f,m as I,o as x,e as A,t as m,J as z}from"./index-D984WV3U.js";import{u as J}from"./use-mcp-client-D8-rDWEf.js";function V(e){if(e.paramsSchema&&typeof e.paramsSchema=="object")return e;const t={};if(Array.isArray(e.params))for(const s of e.params)t[s.name]={type:s.type,description:s.description,enum:s.enum};else e.params&&typeof e.params=="object"&&Object.assign(t,e.params);return{type:e.type,description:e.description,paramsSchema:t}}function te(e){const t=q.c(12),{org:s}=U(),a=e??z;let n;t[0]!==s.id||t[1]!==s.slug||t[2]!==a?(n={connectionId:a,orgId:s.id,orgSlug:s.slug},t[0]=s.id,t[1]=s.slug,t[2]=a,t[3]=n):n=t[3];const i=J(n);let l;t[4]!==e?(l=f.toolCall(e??"","TRIGGER_LIST",""),t[4]=e,t[5]=l):l=t[5];let o;t[6]!==i?(o=async()=>{const y=await i.callTool({name:"TRIGGER_LIST",arguments:{}});return(y.structuredContent??y).triggers.map(V)},t[6]=i,t[7]=o):o=t[7];const r=!!e;let c;return t[8]!==l||t[9]!==o||t[10]!==r?(c={queryKey:l,queryFn:o,enabled:r,staleTime:3e4},t[8]=l,t[9]=o,t[10]=r,t[11]=c):c=t[11],I(c)}function se(e){const t=q.c(9),{org:s}=U(),a=Q();let n;t[0]!==s.id||t[1]!==e?(n=f.automations(s.id,e),t[0]=s.id,t[1]=e,t[2]=n):n=t[2];let i;t[3]!==a||t[4]!==e?(i=async()=>(await a.call("AUTOMATION_LIST",e!=null?{virtual_mcp_id:e}:{})).automations,t[3]=a,t[4]=e,t[5]=i):i=t[5];let l;return t[6]!==n||t[7]!==i?(l={queryKey:n,queryFn:i,staleTime:1e4},t[6]=n,t[7]=i,t[8]=l):l=t[8],I(l)}function ie(e){const t=q.c(10),{org:s}=U(),a=Q();let n;t[0]!==e||t[1]!==s.id?(n=f.automation(s.id,e),t[0]=e,t[1]=s.id,t[2]=n):n=t[2];let i;t[3]!==e||t[4]!==a?(i=async()=>(await a.call("AUTOMATION_GET",{id:e})).automation,t[3]=e,t[4]=a,t[5]=i):i=t[5];const l=!!e;let o;return t[6]!==n||t[7]!==i||t[8]!==l?(o={queryKey:n,queryFn:i,enabled:l,staleTime:1e4},t[6]=n,t[7]=i,t[8]=l,t[9]=o):o=t[9],I(o)}function ae(e,t){const s=q.c(12),{org:a}=U(),n=Q();let i;s[0]!==e||s[1]!==a.id||s[2]!==t?(i=f.automationRunStats(a.id,e,JSON.stringify(t??{})),s[0]=e,s[1]=a.id,s[2]=t,s[3]=i):i=s[3];let l;s[4]!==e||s[5]!==t||s[6]!==n?(l=async()=>await n.call("AUTOMATION_RUN_STATS",{automation_id:e,...t?.startDate?{startDate:t.startDate}:{},...t?.endDate?{endDate:t.endDate}:{}}),s[4]=e,s[5]=t,s[6]=n,s[7]=l):l=s[7];const o=!!e;let r;return s[8]!==i||s[9]!==l||s[10]!==o?(r={queryKey:i,queryFn:l,enabled:o,staleTime:3e4},s[8]=i,s[9]=l,s[10]=o,s[11]=r):r=s[11],I(r)}function oe(e){return{name:"New Automation",messages:[],models:{tier:"smart"},temperature:.5,active:!0,virtual_mcp_id:e}}function ne(){const e=q.c(66),{org:t}=U(),s=Q(),a=x();let n;e[0]!==t||e[1]!==a?(n=()=>Promise.all([a.invalidateQueries({queryKey:f.automationsAll(t.id)}),a.invalidateQueries({queryKey:f.jiraAutomations(t.id)})]),e[0]=t,e[1]=a,e[2]=n):n=e[2];const i=n;let l;e[3]!==t||e[4]!==a?(l=u=>a.invalidateQueries({queryKey:f.automation(t.id,u)}),e[3]=t,e[4]=a,e[5]=l):l=e[5];const o=l;let r;e[6]!==s?(r=async u=>await s.call("AUTOMATION_CREATE",u),e[6]=s,e[7]=r):r=e[7];let c;e[8]!==i?(c=()=>{i(),m.success("Automation created successfully")},e[8]=i,e[9]=c):c=e[9];let y;e[10]!==r||e[11]!==c?(y={mutationFn:r,onSuccess:c,onError:X},e[10]=r,e[11]=c,e[12]=y):y=e[12];const D=A(y);let T;e[13]!==s?(T=async u=>await s.call("AUTOMATION_UPDATE",u),e[13]=s,e[14]=T):T=e[14];let g;e[15]!==i||e[16]!==o||e[17]!==t||e[18]!==a?(g=(u,d)=>{i(),typeof d.id=="string"&&o(d.id),a.invalidateQueries({queryKey:f.organizationSettings(t.id)}),m.success("Automation updated successfully")},e[15]=i,e[16]=o,e[17]=t,e[18]=a,e[19]=g):g=e[19];let K;e[20]!==T||e[21]!==g?(K={mutationFn:T,onSuccess:g,onError:W},e[20]=T,e[21]=g,e[22]=K):K=e[22];const j=A(K);let p;e[23]!==s?(p=async u=>await s.call("AUTOMATION_DELETE",{id:u}),e[23]=s,e[24]=p):p=e[24];let _;e[25]!==i||e[26]!==t||e[27]!==a?(_=(u,d)=>{a.removeQueries({queryKey:f.automation(t.id,d)}),i(),m.success("Automation deleted successfully")},e[25]=i,e[26]=t,e[27]=a,e[28]=_):_=e[28];let G;e[29]!==p||e[30]!==_?(G={mutationFn:p,onSuccess:_,onError:H},e[29]=p,e[30]=_,e[31]=G):G=e[31];const v=A(G);let S;e[32]!==s?(S=async u=>await s.call("AUTOMATION_TRIGGER_ADD",u),e[32]=s,e[33]=S):S=e[33];let E;e[34]!==i||e[35]!==o?(E=u=>{i(),o(u.automation_id)},e[34]=i,e[35]=o,e[36]=E):E=e[36];let $;e[37]!==S||e[38]!==E?($={mutationFn:S,onSuccess:E},e[37]=S,e[38]=E,e[39]=$):$=e[39];const P=A($);let O;e[40]!==s?(O=async u=>await s.call("AUTOMATION_TRIGGER_ROTATE_TOKEN",{trigger_id:u.trigger_id}),e[40]=s,e[41]=O):O=e[41];let R;e[42]!==i||e[43]!==o?(R=(u,d)=>{i(),o(d.automation_id)},e[42]=i,e[43]=o,e[44]=R):R=e[44];let C;e[45]!==O||e[46]!==R?(C={mutationFn:O,onSuccess:R},e[45]=O,e[46]=R,e[47]=C):C=e[47];const k=A(C);let F;e[48]!==s?(F=async u=>await s.call("AUTOMATION_TRIGGER_REMOVE",{trigger_id:u.trigger_id}),e[48]=s,e[49]=F):F=e[49];let N;e[50]!==i||e[51]!==o?(N=(u,d)=>{i(),o(d.automation_id)},e[50]=i,e[51]=o,e[52]=N):N=e[52];let b;e[53]!==F||e[54]!==N?(b={mutationFn:F,onSuccess:N},e[53]=F,e[54]=N,e[55]=b):b=e[55];const h=A(b);let L;e[56]!==s?(L={mutationFn:async u=>await s.call("AUTOMATION_RUN",{id:u}),onSuccess:B,onError:Y},e[56]=s,e[57]=L):L=e[57];const w=A(L);let M;return e[58]!==D||e[59]!==v||e[60]!==w||e[61]!==P||e[62]!==h||e[63]!==k||e[64]!==j?(M={create:D,update:j,remove:v,triggerAdd:P,triggerRemove:h,triggerRotateToken:k,run:w},e[58]=D,e[59]=v,e[60]=w,e[61]=P,e[62]=h,e[63]=k,e[64]=j,e[65]=M):M=e[65],M}function Y(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to run automation: ${t}`)}function B(e){e.skipped?m.info(`Automation skipped: ${e.skipped}`):e.error?m.error(`Automation failed: ${e.error}`):m.success("Automation triggered")}function H(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to delete automation: ${t}`)}function W(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to update automation: ${t}`)}function X(e){const t=e instanceof Error?e.message:String(e);m.error(`Failed to create automation: ${t}`)}export{ne as a,oe as b,te as c,ie as d,ae as e,se as u};
@@ -1 +1 @@
1
- import{c as T,r as l}from"./index-Cgvxdf_Q.js";const _=700;function D(s,a,p){const e=T.c(8),f=p?.delay??_,g=p?.isSaving??!1,[m,d]=l.useState(s),[y,A]=l.useState(s),[r,i]=l.useState(!1),t=l.useRef(null);s!==y&&(A(s),!r&&!g&&d(s));let c;e[0]!==f||e[1]!==a?(c=o=>{d(o),i(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,i(!1),a(o)},f)},e[0]=f,e[1]=a,e[2]=c):c=e[2];const S=c;let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=o=>{d(o),t.current&&clearTimeout(t.current),t.current=null,i(!1)},e[3]=n):n=e[3];const E=n;let u;return e[4]!==m||e[5]!==r||e[6]!==S?(u=[m,S,E,r],e[4]=m,e[5]=r,e[6]=S,e[7]=u):u=e[7],u}export{D as u};
1
+ import{c as T,r as l}from"./index-D984WV3U.js";const _=700;function D(s,a,p){const e=T.c(8),f=p?.delay??_,g=p?.isSaving??!1,[m,d]=l.useState(s),[y,A]=l.useState(s),[r,i]=l.useState(!1),t=l.useRef(null);s!==y&&(A(s),!r&&!g&&d(s));let c;e[0]!==f||e[1]!==a?(c=o=>{d(o),i(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{t.current=null,i(!1),a(o)},f)},e[0]=f,e[1]=a,e[2]=c):c=e[2];const S=c;let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=o=>{d(o),t.current&&clearTimeout(t.current),t.current=null,i(!1)},e[3]=n):n=e[3];const E=n;let u;return e[4]!==m||e[5]!==r||e[6]!==S?(u=[m,S,E,r],e[4]=m,e[5]=r,e[6]=S,e[7]=u):u=e[7],u}export{D as u};
@@ -1 +1 @@
1
- import{c as C,a2 as x,b3 as L,m as N,K as $,k,d as H,u as W}from"./index-Cgvxdf_Q.js";import{u as B}from"./use-file-configs-D-lKeneW.js";import{c as F}from"./use-organization-settings-CcdWKIZG.js";import{r as J,a as U}from"./site-slug-DebpOoQq.js";import{e as j}from"./repository-binding-OIkiiBn_.js";import{a as q}from"./thread-route-Ck1dYsiI.js";import{u as K}from"./use-panel-navigate-BwaxzeCI.js";import{b as z}from"./thread-intent-CRpeRnx2.js";const I=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"],Q=["overview","reports","board","site-editor"],Y=1,G=["assets","hosting","e2e","analytics","cdn","experiments"];function ge(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const n=e?.id===t?e:s?.id===t?s:null;return{project:n,resolvedScopeId:n?t:null}}function Pe(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function M(t,e){const s=new Set(t??[]);if(e!==Y)for(const n of Q)s.add(n);return I.filter(n=>s.has(n))}function X(t){return I.some(e=>e===t)}function Z(t){return G.some(e=>e===t)}function ee(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,experiments:t&&e.experiments,automations:!0}}function Se(t,e,s){const n=ee(e,s);return t?n:{...n,overview:!0,reports:!0,board:!0}}function we(t,e,s){const n=new Set(M(t,s));return I.filter(a=>e[a]&&n.has(a))}function ye(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return I.filter(e=>t[e])}function te(t,e,s){return!X(t)||e[t]?!1:Z(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function Ve(t,e,s,n,a){return te(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!n.includes("content")||t==="code"&&a&&!n.includes("code")}function ve(t,e,s,n){const a=new Set(M(t,n));return s?a.add(e):a.delete(e),I.filter(r=>a.has(r))}function ne(t,e){if(!e)return null;const s=e.toLowerCase();return t.find(n=>{const a=n.bucket.toLowerCase();return n.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}function Ae(t){const e=C.c(20),{org:s}=x(),n=L(),a=F(),r=B();let c;e[0]!==t?(c=J(t),e[0]=t,e[1]=c):c=e[1];const o=c,d=n.hostingEnabled===!0,P=n.monitorEnabled===!0||n.auth.localMode===!0,f=(d||P)&&!!o,p=R(s.slug,o,f);let m;e[2]!==t?(m=U(t),e[2]=t,e[3]=m):m=e[3];const u=m,S=P&&!!u&&u!==o,h=R(s.slug,u,S),g=p.data?.owned===!0,A=S?h.data?.owned===!0:g;let l;e[4]!==r.data?.configs?(l=r.data?.configs??[],e[4]=r.data?.configs,e[5]=l):l=e[5];let w;e[6]!==o||e[7]!==l?(w=ne(l,o),e[6]=o,e[7]=l,e[8]=w):w=e[8];const b=!!w,y=d&&g&&a.hosting,i=d&&g&&a.e2e,V=d&&g&&a.analytics,E=P&&A&&a.monitor;let v;e[9]!==a.experiments||e[10]!==b||e[11]!==y||e[12]!==i||e[13]!==V||e[14]!==E?(v={assets:b,hosting:y,e2e:i,analytics:V,cdn:E,experiments:a.experiments},e[9]=a.experiments,e[10]=b,e[11]=y,e[12]=i,e[13]=V,e[14]=E,e[15]=v):v=e[15];const _=!!o&&r.isPending,D=f&&p.isPending||S&&h.isPending;let O;return e[16]!==_||e[17]!==D||e[18]!==v?(O={presence:v,assetsPending:_,siteAccessPending:D},e[16]=_,e[17]=D,e[18]=v,e[19]=O):O=e[19],O}function R(t,e,s){const n=C.c(10);let a;n[0]!==t||n[1]!==e?(a=$.hostingAccess(t,e??""),n[0]=t,n[1]=e,n[2]=a):a=n[2];let r;n[3]!==t||n[4]!==e?(r=async()=>{const o=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return o.ok?await o.json():{owned:!1,canWrite:!1}},n[3]=t,n[4]=e,n[5]=r):r=n[5];let c;return n[6]!==s||n[7]!==a||n[8]!==r?(c={queryKey:a,queryFn:r,enabled:s,staleTime:6e4},n[6]=s,n[7]=a,n[8]=r,n[9]=c):c=n[9],N(c)}function Ee(t){if(typeof t!="object"||t===null)return!1;const s=t.repository?.url;return typeof s=="string"&&s.length>0}function Ie(t){return j(t).status==="attached"}function Oe(t){const e=j(t).status;return e==="attached"||e==="detached"}function Ce(t){const e=new Set;for(const s of t??[]){const n=s.metadata?.liveAgentId;typeof n=="string"&&n&&e.add(s.id)}return e}function _e(t,e){if(!t)return null;const s=t.metadata?.liveAgentId;if(typeof s=="string"&&s)return(e??[]).find(r=>r.id===s)?{mode:"dev",targetId:s}:null;const n=(e??[]).find(a=>a.metadata?.liveAgentId===t.id);return n?{mode:"live",targetId:n.id}:null}function se(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ae},t[0]=e):e=t[0],k(e)}function ae(t){for(let e=t.matches.length-1;e>=0;e--){const s=t.matches[e]?.staticData.defaultMain;if(s)return s}return null}function re(t){return!!t.harness_id||!!t.title&&t.title!=="New chat"}function oe(t){return t.threadOpen||t.contentOpen?t:{...t,threadOpen:!0}}function ie(t){const e=t.entityMetadata?.defaultMainView??null,s=e==null||e.type==="chat",n=t.mainPanelParam??(t.panelNamed||!!t.routeDefaultMain||!s),a=t.routeDefaultMain?!1:s||t.entityMetadata?.chatDefaultOpen===!0||t.threadHasMessages===!0,r=t.threadVisibilityExplicit?t.sidePanelParamValue===!0:a;return oe({threadOpen:r,contentOpen:n})}function T(t,e){switch(t.type){case"toggleThread":return e.threadOpen?e.contentOpen?{sidepanel:!1}:null:{sidepanel:!0};case"toggleContent":return e.contentOpen?{mainpanel:!1,sidepanel:!0}:{mainpanel:!0};case"openThread":return e.threadOpen?null:{sidepanel:!0}}}function De(t){return t.threadOpen&&t.contentOpen?{side:33,main:67}:t.threadOpen?{side:100,main:0}:t.contentOpen?{side:0,main:100}:{side:0,main:0}}function Re(t){const{threadOpen:e,contentOpen:s}=t.visibility;return e&&(t.threadVisibilityExplicit||!s)?"chat":s?"main":"chat"}function Te(t){return t==="main"?{sidepanel:!1,mainpanel:!0}:{sidepanel:!0,mainpanel:!1}}function je(t){const e=C.c(26),s=H();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const a=W(n),{threads:r}=z(),c=se(),o=K(),d=q();let P;if(e[1]!==t||e[2]!==o||e[3]!==c||e[4]!==a.mainpanel||e[5]!==a.sidepanel||e[6]!==d||e[7]!==r){const i=d!=null?r.find(V=>V.id===d):void 0;P=ie({entityMetadata:t,mainPanelParam:a.mainpanel,panelNamed:o!==void 0,threadVisibilityExplicit:a.sidepanel!==void 0,sidePanelParamValue:a.sidepanel,routeDefaultMain:c,threadHasMessages:i?re(i):!1}),e[1]=t,e[2]=o,e[3]=c,e[4]=a.mainpanel,e[5]=a.sidepanel,e[6]=d,e[7]=r,e[8]=P}else P=e[8];const{threadOpen:f,contentOpen:p}=P;let m;e[9]!==p||e[10]!==f?(m={threadOpen:f,contentOpen:p},e[9]=p,e[10]=f,e[11]=m):m=e[11];const u=m;let S;e[12]!==s?(S=(i,V)=>{s({to:".",search:E=>({...E,...i}),replace:V?.replace??!1})},e[12]=s,e[13]=S):S=e[13];const h=S;let g;e[14]!==h||e[15]!==u?(g=()=>{const i=T({type:"toggleContent"},u);i&&h(i,{replace:!0})},e[14]=h,e[15]=u,e[16]=g):g=e[16];const A=g;let l;e[17]!==h||e[18]!==u?(l=()=>{const i=T({type:"toggleThread"},u);i&&h(i,{replace:!0})},e[17]=h,e[18]=u,e[19]=l):l=e[19];const w=l,b=a.sidepanel!==void 0;let y;return e[20]!==p||e[21]!==b||e[22]!==f||e[23]!==A||e[24]!==w?(y={threadOpen:f,contentOpen:p,threadVisibilityExplicit:b,toggleContent:A,toggleThread:w},e[20]=p,e[21]=b,e[22]=f,e[23]=A,e[24]=w,e[25]=y):y=e[25],y}export{G as P,Ee as a,je as b,Oe as c,ne as d,M as e,_e as f,Y as g,Re as h,Z as i,De as j,se as k,ge as l,Te as m,Se as n,Ve as o,ee as p,te as q,Pe as r,we as s,re as t,Ae as u,Ce as v,be as w,ve as x,ye as y,Ie as z};
1
+ import{c as C,a2 as x,b3 as L,m as N,K as $,k,d as H,u as W}from"./index-D984WV3U.js";import{u as B}from"./use-file-configs-DoW1VYTz.js";import{c as F}from"./use-organization-settings-BEUCQxuY.js";import{r as J,a as U}from"./site-slug-DebpOoQq.js";import{e as j}from"./repository-binding-CrIQbyJh.js";import{a as q}from"./thread-route-Dp3ppEkH.js";import{u as K}from"./use-panel-navigate-B348HV-V.js";import{b as z}from"./thread-intent-BouO_OhM.js";const I=["overview","reports","board","site-editor","assets","hosting","e2e","analytics","cdn","automations","experiments"],Q=["overview","reports","board","site-editor"],Y=1,G=["assets","hosting","e2e","analytics","cdn","experiments"];function ge(t,e,s){if(!t)return{project:s??null,resolvedScopeId:null};const n=e?.id===t?e:s?.id===t?s:null;return{project:n,resolvedScopeId:n?t:null}}function Pe(t){return t?.sidebarViews!==void 0?t.sidebarViews:t?.ui?.layout?.sidebarViews}function M(t,e){const s=new Set(t??[]);if(e!==Y)for(const n of Q)s.add(n);return I.filter(n=>s.has(n))}function X(t){return I.some(e=>e===t)}function Z(t){return G.some(e=>e===t)}function ee(t,e){return{overview:t,reports:t,board:t,"site-editor":t,assets:e.assets,hosting:e.hosting,e2e:e.e2e,analytics:e.analytics,cdn:e.cdn,experiments:t&&e.experiments,automations:!0}}function Se(t,e,s){const n=ee(e,s);return t?n:{...n,overview:!0,reports:!0,board:!0}}function we(t,e,s){const n=new Set(M(t,s));return I.filter(a=>e[a]&&n.has(a))}function ye(t,e,s){return s||!t?t:(t.type==="preview"||t.type==="content"||t.type==="code"?"site-editor":t.type)===e?{type:"settings"}:t}function be(t){return I.filter(e=>t[e])}function te(t,e,s){return!X(t)||e[t]?!1:Z(t)?!(t==="assets"?s.assets:s.siteAccess):!0}function Ve(t,e,s,n,a){return te(t==="preview"||t==="content"||t==="code"?"site-editor":t,e,s)||t==="content"&&!n.includes("content")||t==="code"&&a&&!n.includes("code")}function ve(t,e,s,n){const a=new Set(M(t,n));return s?a.add(e):a.delete(e),I.filter(r=>a.has(r))}function ne(t,e){if(!e)return null;const s=e.toLowerCase();return t.find(n=>{const a=n.bucket.toLowerCase();return n.siteSlug?.toLowerCase()===s||a===s||a===`deco-assets-${s}`})??null}function Ae(t){const e=C.c(20),{org:s}=x(),n=L(),a=F(),r=B();let c;e[0]!==t?(c=J(t),e[0]=t,e[1]=c):c=e[1];const o=c,d=n.hostingEnabled===!0,P=n.monitorEnabled===!0||n.auth.localMode===!0,f=(d||P)&&!!o,p=R(s.slug,o,f);let m;e[2]!==t?(m=U(t),e[2]=t,e[3]=m):m=e[3];const u=m,S=P&&!!u&&u!==o,h=R(s.slug,u,S),g=p.data?.owned===!0,A=S?h.data?.owned===!0:g;let l;e[4]!==r.data?.configs?(l=r.data?.configs??[],e[4]=r.data?.configs,e[5]=l):l=e[5];let w;e[6]!==o||e[7]!==l?(w=ne(l,o),e[6]=o,e[7]=l,e[8]=w):w=e[8];const b=!!w,y=d&&g&&a.hosting,i=d&&g&&a.e2e,V=d&&g&&a.analytics,E=P&&A&&a.monitor;let v;e[9]!==a.experiments||e[10]!==b||e[11]!==y||e[12]!==i||e[13]!==V||e[14]!==E?(v={assets:b,hosting:y,e2e:i,analytics:V,cdn:E,experiments:a.experiments},e[9]=a.experiments,e[10]=b,e[11]=y,e[12]=i,e[13]=V,e[14]=E,e[15]=v):v=e[15];const _=!!o&&r.isPending,D=f&&p.isPending||S&&h.isPending;let O;return e[16]!==_||e[17]!==D||e[18]!==v?(O={presence:v,assetsPending:_,siteAccessPending:D},e[16]=_,e[17]=D,e[18]=v,e[19]=O):O=e[19],O}function R(t,e,s){const n=C.c(10);let a;n[0]!==t||n[1]!==e?(a=$.hostingAccess(t,e??""),n[0]=t,n[1]=e,n[2]=a):a=n[2];let r;n[3]!==t||n[4]!==e?(r=async()=>{const o=await fetch(`/api/${t}/hosting/${encodeURIComponent(e??"")}/access`);return o.ok?await o.json():{owned:!1,canWrite:!1}},n[3]=t,n[4]=e,n[5]=r):r=n[5];let c;return n[6]!==s||n[7]!==a||n[8]!==r?(c={queryKey:a,queryFn:r,enabled:s,staleTime:6e4},n[6]=s,n[7]=a,n[8]=r,n[9]=c):c=n[9],N(c)}function Ee(t){if(typeof t!="object"||t===null)return!1;const s=t.repository?.url;return typeof s=="string"&&s.length>0}function Ie(t){return j(t).status==="attached"}function Oe(t){const e=j(t).status;return e==="attached"||e==="detached"}function Ce(t){const e=new Set;for(const s of t??[]){const n=s.metadata?.liveAgentId;typeof n=="string"&&n&&e.add(s.id)}return e}function _e(t,e){if(!t)return null;const s=t.metadata?.liveAgentId;if(typeof s=="string"&&s)return(e??[]).find(r=>r.id===s)?{mode:"dev",targetId:s}:null;const n=(e??[]).find(a=>a.metadata?.liveAgentId===t.id);return n?{mode:"live",targetId:n.id}:null}function se(){const t=C.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e={select:ae},t[0]=e):e=t[0],k(e)}function ae(t){for(let e=t.matches.length-1;e>=0;e--){const s=t.matches[e]?.staticData.defaultMain;if(s)return s}return null}function re(t){return!!t.harness_id||!!t.title&&t.title!=="New chat"}function oe(t){return t.threadOpen||t.contentOpen?t:{...t,threadOpen:!0}}function ie(t){const e=t.entityMetadata?.defaultMainView??null,s=e==null||e.type==="chat",n=t.mainPanelParam??(t.panelNamed||!!t.routeDefaultMain||!s),a=t.routeDefaultMain?!1:s||t.entityMetadata?.chatDefaultOpen===!0||t.threadHasMessages===!0,r=t.threadVisibilityExplicit?t.sidePanelParamValue===!0:a;return oe({threadOpen:r,contentOpen:n})}function T(t,e){switch(t.type){case"toggleThread":return e.threadOpen?e.contentOpen?{sidepanel:!1}:null:{sidepanel:!0};case"toggleContent":return e.contentOpen?{mainpanel:!1,sidepanel:!0}:{mainpanel:!0};case"openThread":return e.threadOpen?null:{sidepanel:!0}}}function De(t){return t.threadOpen&&t.contentOpen?{side:33,main:67}:t.threadOpen?{side:100,main:0}:t.contentOpen?{side:0,main:100}:{side:0,main:0}}function Re(t){const{threadOpen:e,contentOpen:s}=t.visibility;return e&&(t.threadVisibilityExplicit||!s)?"chat":s?"main":"chat"}function Te(t){return t==="main"?{sidepanel:!1,mainpanel:!0}:{sidepanel:!0,mainpanel:!1}}function je(t){const e=C.c(26),s=H();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},e[0]=n):n=e[0];const a=W(n),{threads:r}=z(),c=se(),o=K(),d=q();let P;if(e[1]!==t||e[2]!==o||e[3]!==c||e[4]!==a.mainpanel||e[5]!==a.sidepanel||e[6]!==d||e[7]!==r){const i=d!=null?r.find(V=>V.id===d):void 0;P=ie({entityMetadata:t,mainPanelParam:a.mainpanel,panelNamed:o!==void 0,threadVisibilityExplicit:a.sidepanel!==void 0,sidePanelParamValue:a.sidepanel,routeDefaultMain:c,threadHasMessages:i?re(i):!1}),e[1]=t,e[2]=o,e[3]=c,e[4]=a.mainpanel,e[5]=a.sidepanel,e[6]=d,e[7]=r,e[8]=P}else P=e[8];const{threadOpen:f,contentOpen:p}=P;let m;e[9]!==p||e[10]!==f?(m={threadOpen:f,contentOpen:p},e[9]=p,e[10]=f,e[11]=m):m=e[11];const u=m;let S;e[12]!==s?(S=(i,V)=>{s({to:".",search:E=>({...E,...i}),replace:V?.replace??!1})},e[12]=s,e[13]=S):S=e[13];const h=S;let g;e[14]!==h||e[15]!==u?(g=()=>{const i=T({type:"toggleContent"},u);i&&h(i,{replace:!0})},e[14]=h,e[15]=u,e[16]=g):g=e[16];const A=g;let l;e[17]!==h||e[18]!==u?(l=()=>{const i=T({type:"toggleThread"},u);i&&h(i,{replace:!0})},e[17]=h,e[18]=u,e[19]=l):l=e[19];const w=l,b=a.sidepanel!==void 0;let y;return e[20]!==p||e[21]!==b||e[22]!==f||e[23]!==A||e[24]!==w?(y={threadOpen:f,contentOpen:p,threadVisibilityExplicit:b,toggleContent:A,toggleThread:w},e[20]=p,e[21]=b,e[22]=f,e[23]=A,e[24]=w,e[25]=y):y=e[25],y}export{G as P,Ee as a,je as b,Oe as c,ne as d,M as e,_e as f,Y as g,Re as h,Z as i,De as j,se as k,ge as l,Te as m,Se as n,Ve as o,ee as p,te as q,Pe as r,we as s,re as t,Ae as u,Ce as v,be as w,ve as x,ye as y,Ie as z};
@@ -1 +1 @@
1
- import{u as A,a2 as R,r as w,ee as D,c as L,d as M,c1 as $,aJ as C,d4 as T,aP as F,bY as N}from"./index-Cgvxdf_Q.js";import{a as y,b as O,u as U}from"./thread-route-Ck1dYsiI.js";import{u as E}from"./use-panel-navigate-BwaxzeCI.js";import{A as h}from"./autosend-CZXcTLSS.js";let c=null;const b=new Set;function V(e){return b.add(e),()=>{b.delete(e)}}function S(e){if(c!==e){c=e;for(const s of b)s()}}function J(){S(null)}function Q(){const e=A({strict:!1}),s=E(),{org:o}=R(),r=y(),t=w.useSyncExternalStore(V,()=>c,()=>c),n=D(s)?.path??e.preview??e.skill??e.brand??null;if(!n)return c=null,null;const a=`${o.id}:${r??""}:${n}`;return a===t?null:{path:n,dismiss:()=>S(a)}}function W(){const e=L.c(12),s=M(),{org:o}=R(),r=y(),t=O(),n=U(),a=E();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const l=A(d);let u;e[1]!==a||e[2]!==s||e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==t?(u=(v,g)=>{const i=a&&!$(a)?a:void 0,m=g?.virtualMcpId??t,I=C(o.id).id;if(m===I&&n===void 0&&i&&T(i).kind==="org-destination"){s({to:".",search:P=>({...P,thread:v,mainpanel:void 0,autosend:g?.autosend?h:void 0})});return}const k=m===t&&i&&T(i).kind!=="org-destination"?i:"overview",x=F({org:o.slug,agentId:m,superAgentId:I,tabId:k});N(s,x,{search:()=>({thread:v,...typeof l.sidepanel=="boolean"?{sidepanel:l.sidepanel}:{},...g?.autosend?{autosend:h}:{}}),replace:!1})},e[1]=a,e[2]=s,e[3]=o,e[4]=n,e[5]=l,e[6]=t,e[7]=u):u=e[7];const p=u;let f;return e[8]!==p||e[9]!==r||e[10]!==t?(f={virtualMcpId:t,taskId:r,navigateToTask:p},e[8]=p,e[9]=r,e[10]=t,e[11]=f):f=e[11],f}export{Q as a,J as c,W as u};
1
+ import{u as A,a2 as R,r as w,ee as D,c as L,d as M,c1 as $,aJ as C,d4 as T,aP as F,bY as N}from"./index-D984WV3U.js";import{a as y,b as O,u as U}from"./thread-route-Dp3ppEkH.js";import{u as E}from"./use-panel-navigate-B348HV-V.js";import{A as h}from"./autosend-8ZqTuUx9.js";let c=null;const b=new Set;function V(e){return b.add(e),()=>{b.delete(e)}}function S(e){if(c!==e){c=e;for(const s of b)s()}}function J(){S(null)}function Q(){const e=A({strict:!1}),s=E(),{org:o}=R(),r=y(),t=w.useSyncExternalStore(V,()=>c,()=>c),n=D(s)?.path??e.preview??e.skill??e.brand??null;if(!n)return c=null,null;const a=`${o.id}:${r??""}:${n}`;return a===t?null:{path:n,dismiss:()=>S(a)}}function W(){const e=L.c(12),s=M(),{org:o}=R(),r=y(),t=O(),n=U(),a=E();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d={strict:!1},e[0]=d):d=e[0];const l=A(d);let u;e[1]!==a||e[2]!==s||e[3]!==o||e[4]!==n||e[5]!==l||e[6]!==t?(u=(v,g)=>{const i=a&&!$(a)?a:void 0,m=g?.virtualMcpId??t,I=C(o.id).id;if(m===I&&n===void 0&&i&&T(i).kind==="org-destination"){s({to:".",search:P=>({...P,thread:v,mainpanel:void 0,autosend:g?.autosend?h:void 0})});return}const k=m===t&&i&&T(i).kind!=="org-destination"?i:"overview",x=F({org:o.slug,agentId:m,superAgentId:I,tabId:k});N(s,x,{search:()=>({thread:v,...typeof l.sidepanel=="boolean"?{sidepanel:l.sidepanel}:{},...g?.autosend?{autosend:h}:{}}),replace:!1})},e[1]=a,e[2]=s,e[3]=o,e[4]=n,e[5]=l,e[6]=t,e[7]=u):u=e[7];const p=u;let f;return e[8]!==p||e[9]!==r||e[10]!==t?(f={virtualMcpId:t,taskId:r,navigateToTask:p},e[8]=p,e[9]=r,e[10]=t,e[11]=f):f=e[11],f}export{Q as a,J as c,W as u};
@@ -1 +1 @@
1
- import{c as u,r as a}from"./index-Cgvxdf_Q.js";const i=new Map;function l(r){let t=i.get(r);return t||(t={now:Date.now(),subscribers:new Set,intervalId:null},i.set(r,t)),t}function b(r,t){const e=l(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.now=Date.now();for(const s of e.subscribers)s()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function f(r){const t=u.c(4),e=r===void 0?6e4:r;let s;t[0]!==e?(s=()=>l(e).now,t[0]=e,t[1]=s):s=t[1];const o=s;let n;return t[2]!==e?(n=c=>b(e,c),t[2]=e,t[3]=n):n=t[3],a.useSyncExternalStore(n,o,o)}export{f as u};
1
+ import{c as u,r as a}from"./index-D984WV3U.js";const i=new Map;function l(r){let t=i.get(r);return t||(t={now:Date.now(),subscribers:new Set,intervalId:null},i.set(r,t)),t}function b(r,t){const e=l(r);return e.subscribers.add(t),e.intervalId===null&&(e.intervalId=setInterval(()=>{e.now=Date.now();for(const s of e.subscribers)s()},r)),()=>{e.subscribers.delete(t),e.subscribers.size===0&&e.intervalId!==null&&(clearInterval(e.intervalId),e.intervalId=null)}}function f(r){const t=u.c(4),e=r===void 0?6e4:r;let s;t[0]!==e?(s=()=>l(e).now,t[0]=e,t[1]=s):s=t[1];const o=s;let n;return t[2]!==e?(n=c=>b(e,c),t[2]=e,t[3]=n):n=t[3],a.useSyncExternalStore(n,o,o)}export{f as u};