decocms 4.615.0 → 4.616.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 (805) hide show
  1. package/dist/client/assets/AlertCircle-B79T3vQg.js +1 -0
  2. package/dist/client/assets/AreaChart-1DjcfWAa.js +1 -0
  3. package/dist/client/assets/ArrowLeft-CFDBmtQn.js +1 -0
  4. package/dist/client/assets/ArrowRight-_1mjBk8q.js +1 -0
  5. package/dist/client/assets/ArrowUp-CGwCu8lq.js +1 -0
  6. package/dist/client/assets/BookOpen01-Cja5K-Zg.js +1 -0
  7. package/dist/client/assets/CartesianChart-DbfxDEk8.js +1 -0
  8. package/dist/client/assets/CategoricalChart-aQS_hxQA.js +33 -0
  9. package/dist/client/assets/CheckCircle-BdP9IvPO.js +1 -0
  10. package/dist/client/assets/ChevronDown-NJEKYVpP.js +1 -0
  11. package/dist/client/assets/ChevronSelectorVertical-QA_eM8SF.js +1 -0
  12. package/dist/client/assets/ChevronUp-CdlwQKca.js +1 -0
  13. package/dist/client/assets/CreditCard01-u7S1Papb.js +1 -0
  14. package/dist/client/assets/Eye-_AXqkWO1.js +1 -0
  15. package/dist/client/assets/File02-C4vk1-0W.js +1 -0
  16. package/dist/client/assets/Fingerprint04-bmDV_Zt8.js +1 -0
  17. package/dist/client/assets/Globe04-BXEQpgH7.js +1 -0
  18. package/dist/client/assets/Image01-DLy5un7V.js +1 -0
  19. package/dist/client/assets/Key01-CX9koaUb.js +1 -0
  20. package/dist/client/assets/LayoutLeft-Cc8HE6Mh.js +1 -0
  21. package/dist/client/assets/LinkBroken01-Be5szqzO.js +1 -0
  22. package/dist/client/assets/MessageCircle01-CWoIju4P.js +1 -0
  23. package/dist/client/assets/Minus-DJIrYTlh.js +1 -0
  24. package/dist/client/assets/Monitor01-DO2zUSLy.js +1 -0
  25. package/dist/client/assets/Play-Upgk6Vwe.js +1 -0
  26. package/dist/client/assets/Plus-C6PPIhQG.js +1 -0
  27. package/dist/client/assets/ReferenceLine-DHROouFX.js +1 -0
  28. package/dist/client/assets/SearchMd-ByGW18TK.js +1 -0
  29. package/dist/client/assets/ShoppingBag01-CoDrN_Bf.js +1 -0
  30. package/dist/client/assets/Sun-CFnDb3Gg.js +1 -0
  31. package/dist/client/assets/SwitchHorizontal01-DdMiH6v0.js +1 -0
  32. package/dist/client/assets/Tool01-C5U5GfFn.js +1 -0
  33. package/dist/client/assets/Tooltip-DMrOgBeB.js +1 -0
  34. package/dist/client/assets/Trash01-D3BXHl0z.js +1 -0
  35. package/dist/client/assets/Upload01-CmSjLpWk.js +1 -0
  36. package/dist/client/assets/UserCheck01-DkrJoTgc.js +1 -0
  37. package/dist/client/assets/UserSquare-CzDpovKf.js +1 -0
  38. package/dist/client/assets/Users01-CsPiPLgE.js +1 -0
  39. package/dist/client/assets/XClose-VFawdZTC.js +1 -0
  40. package/dist/client/assets/Zap-Dg95CWCj.js +1 -0
  41. package/dist/client/assets/access-gate-DEhQZEHK.js +1 -0
  42. package/dist/client/assets/add-connection-dialog-CY-1hoag.js +1 -0
  43. package/dist/client/assets/agent-app-CS5E8TvR.js +1 -0
  44. package/dist/client/assets/agent-assets-BvO33f5b.js +1 -0
  45. package/dist/client/assets/agent-automation-CNHhtRSa.js +20 -0
  46. package/dist/client/assets/agent-automations-8X1ZfMQ4.js +1 -0
  47. package/dist/client/assets/agent-blog-B-qgjc0R.js +2 -0
  48. package/dist/client/assets/agent-blog-post-ihtWC77H.js +2 -0
  49. package/dist/client/assets/agent-business-case-BqRjG0NY.js +1 -0
  50. package/dist/client/assets/agent-calendar-Bggq_CeJ.js +1 -0
  51. package/dist/client/assets/agent-capabilities-CHyVSIfo.js +1 -0
  52. package/dist/client/assets/agent-connect-sources-6QJ7xuGT.js +1 -0
  53. package/dist/client/assets/agent-deck-DDkow9Jj.js +1 -0
  54. package/dist/client/assets/agent-e2e-BFv54RnX.js +1 -0
  55. package/dist/client/assets/agent-experiments-CquSa1RS.js +1 -0
  56. package/dist/client/assets/agent-file-BxJTMm5y.js +1 -0
  57. package/dist/client/assets/agent-hosting-DdRCvd0_.js +1 -0
  58. package/dist/client/assets/agent-icon-mHnKN98z.js +1 -0
  59. package/dist/client/assets/agent-library-file-BEu5nmWb.js +1 -0
  60. package/dist/client/assets/agent-library-t6Vm-IxI.js +1 -0
  61. package/dist/client/assets/agent-overview-GOOAoGpS.js +1 -0
  62. package/dist/client/assets/agent-releases-DUkasnwf.js +3 -0
  63. package/dist/client/assets/agent-settings-IVdSvBTa.js +1 -0
  64. package/dist/client/assets/agent-site-editor-BtLnQekr.js +16 -0
  65. package/dist/client/assets/agent-site-editor-code-SuEMtdpK.js +2 -0
  66. package/dist/client/assets/agent-site-editor-content-Dm31bcya.js +1 -0
  67. package/dist/client/assets/agent-site-editor-preview-Dxo8gMEH.js +1 -0
  68. package/dist/client/assets/agent-view-DhGmpIyd.js +1 -0
  69. package/dist/client/assets/agent-view-guard-ddWX7YUu.js +1 -0
  70. package/dist/client/assets/ai-providers-CftklSU0.js +1 -0
  71. package/dist/client/assets/alert-ZlCw8k67.js +1 -0
  72. package/dist/client/assets/analytics-sections-qmiNeFYX.js +1 -0
  73. package/dist/client/assets/api-keys-BXYphvnv.js +1 -0
  74. package/dist/client/assets/api-keys-BlILgoSx.js +1 -0
  75. package/dist/client/assets/app-editor-BmpLgmI9.js +1 -0
  76. package/dist/client/assets/asset-utils-CpZNl06_.js +1 -0
  77. package/dist/client/assets/auth-Dj5MlzXt.js +1 -0
  78. package/dist/client/assets/auth-catchall-D_wyvME9.js +1 -0
  79. package/dist/client/assets/auth-entry-CT9zrr5H.js +1 -0
  80. package/dist/client/assets/auth-split-layout-BYLGv9rB.js +1 -0
  81. package/dist/client/assets/authenticate-and-persist-oauth-CgoDUSs7.js +1 -0
  82. package/dist/client/assets/automation-list-row-BIiiA8x6.js +1 -0
  83. package/dist/client/assets/automation-runs-C1aNVdBb.js +1 -0
  84. package/dist/client/assets/automations-DiBZRi3C.js +1 -0
  85. package/dist/client/assets/badge-D43CW9ql.js +1 -0
  86. package/dist/client/assets/block-document-DLzckaqO.js +3 -0
  87. package/dist/client/assets/blocks-preview-workspace-context-C1Xh6Ud9.js +1 -0
  88. package/dist/client/assets/blocks-tab-states-Dt0sIut6.js +1 -0
  89. package/dist/client/assets/blog-preview-url-BmfGCEca.js +1 -0
  90. package/dist/client/assets/blog-schema-DTkkJRmS.js +1 -0
  91. package/dist/client/assets/blog-source-gate-obpk25AX.js +1 -0
  92. package/dist/client/assets/blog-view-gate-BeBRgyJz.js +1 -0
  93. package/dist/client/assets/buckets-DqLM3qT3.js +1 -0
  94. package/dist/client/assets/build-improve-prompt-doc-BMIlWXqc.js +2 -0
  95. package/dist/client/assets/calendar-BVJiHXRt.js +1 -0
  96. package/dist/client/assets/capability-load-error-D-3178zq.js +1 -0
  97. package/dist/client/assets/category-editor-CJYnKN4F.js +1 -0
  98. package/dist/client/assets/category-tree-By1yHef5.js +18 -0
  99. package/dist/client/assets/chart-B0-vTmRF.js +13 -0
  100. package/dist/client/assets/chat-context-DElPd_KV.js +43 -0
  101. package/dist/client/assets/chat-draft-DYeAZXwC.js +1 -0
  102. package/dist/client/assets/checkbox-EN58bnRW.js +1 -0
  103. package/dist/client/assets/choose-editor-B6TNwHW_.js +1 -0
  104. package/dist/client/assets/cli-auth-success-DOsGD2k0.js +1 -0
  105. package/dist/client/assets/cms-settings-editor-Dnr_wfon.js +1 -0
  106. package/dist/client/assets/cms-store-drafts-DqlEEelF.js +1 -0
  107. package/dist/client/assets/collapsible-SwapIfxI.js +1 -0
  108. package/dist/client/assets/collection-detail-DDKzScDr.js +1 -0
  109. package/dist/client/assets/collection-display-button-BrJc-eHB.js +1 -0
  110. package/dist/client/assets/collection-search-DrcBBUCd.js +1 -0
  111. package/dist/client/assets/collection-table-wrapper-Cr2x7lMQ.js +1 -0
  112. package/dist/client/assets/collection-tabs-DNPK2rVO.js +1 -0
  113. package/dist/client/assets/combobox-BwdUn3zV.js +1 -0
  114. package/dist/client/assets/command-SY2ZnRo9.js +1 -0
  115. package/dist/client/assets/companion-mcps-section-Z9bmavQ2.js +1 -0
  116. package/dist/client/assets/config-BSLjSLLm.js +1 -0
  117. package/dist/client/assets/connect-dNubHVjE.js +9 -0
  118. package/dist/client/assets/connect-key-DPTpHhHK.js +1 -0
  119. package/dist/client/assets/connect-layout-DhYyXJ_a.js +1 -0
  120. package/dist/client/assets/connect-source-dialog-aKk77DlM.js +1 -0
  121. package/dist/client/assets/connection-INGF_Tys.js +1 -0
  122. package/dist/client/assets/connection-card-Da6QMOrb.js +1 -0
  123. package/dist/client/assets/connection-detail-iamd96u6.js +1 -0
  124. package/dist/client/assets/connection-form-helpers-DP9s_gSg.js +1 -0
  125. package/dist/client/assets/connection-slug-BUzOiIKa.js +1 -0
  126. package/dist/client/assets/connections-CxDpre2g.js +1 -0
  127. package/dist/client/assets/content-changes-RUsWfEyU.js +1 -0
  128. package/dist/client/assets/content-tab-BHPLt3xh.js +19 -0
  129. package/dist/client/assets/context-8uRKn5a5.js +1 -0
  130. package/dist/client/assets/context-menu-D_l3ejD0.js +1 -0
  131. package/dist/client/assets/context-shell-BDr9r5_c.js +37 -0
  132. package/dist/client/assets/create-organization-dialog-SvXxbH0G.js +1 -0
  133. package/dist/client/assets/daily-pulse-OhSSo082.js +1 -0
  134. package/dist/client/assets/delete-copy-BI6H_-VN.js +4 -0
  135. package/dist/client/assets/device-hint-D0KKa1HI.js +1 -0
  136. package/dist/client/assets/discover-hFnfS6fz.js +1 -0
  137. package/dist/client/assets/domain-settings-DE07O2_X.js +1 -0
  138. package/dist/client/assets/drawer-Cc5GoGE_.js +1 -0
  139. package/dist/client/assets/editor-CuwMJTkv.js +11 -0
  140. package/dist/client/assets/editor-classes-nwzo85k0.js +1 -0
  141. package/dist/client/assets/empty-state-BOACqe8n.js +1 -0
  142. package/dist/client/assets/empty-state-OmCxeENw.js +1 -0
  143. package/dist/client/assets/experiments-tab-choice-Bqizq6-B.js +1 -0
  144. package/dist/client/assets/extract-connection-data-u4OYVXGw.js +1 -0
  145. package/dist/client/assets/feature-gate-DmGuW1HX.js +1 -0
  146. package/dist/client/assets/feature-paywall-C9J82eQO.js +1 -0
  147. package/dist/client/assets/file-explorer-B1FCcYRv.js +2 -0
  148. package/dist/client/assets/file-preview-CCN1XfzT.js +1 -0
  149. package/dist/client/assets/file-share-button-DRrjFIUZ.js +3 -0
  150. package/dist/client/assets/file-type-icon-Ch8YrFS_.js +1 -0
  151. package/dist/client/assets/folder-icon-DcGaEdrE.js +1 -0
  152. package/dist/client/assets/form-CJYtyj_a.js +1 -0
  153. package/dist/client/assets/frame-navigation-E7yKrUfa.js +1 -0
  154. package/dist/client/assets/gateway-client-BgktQVnM.js +1 -0
  155. package/dist/client/assets/general-Cz3Mlr1e.js +1 -0
  156. package/dist/client/assets/github-icon-r0MgwWDh.js +1 -0
  157. package/dist/client/assets/held-block-view-Di7yDwAi.js +3 -0
  158. package/dist/client/assets/home-BTdnZuGt.js +1 -0
  159. package/dist/client/assets/home-overview--FC1AzlV.js +1 -0
  160. package/dist/client/assets/hosted-reconcile-CSjK-swv.js +1 -0
  161. package/dist/client/assets/icon-button-DDIgoNaN.js +1 -0
  162. package/dist/client/assets/index-51kU6OFU.js +1 -0
  163. package/dist/client/assets/index-BN4Io9gE.js +4 -0
  164. package/dist/client/assets/index-BmiiXn5j.js +1 -0
  165. package/dist/client/assets/index-BxXZTFf-.js +26 -0
  166. package/dist/client/assets/index-C4lDOrVl.js +1 -0
  167. package/dist/client/assets/index-CC54wkAD.js +1 -0
  168. package/dist/client/assets/index-CLK91j5E.js +1 -0
  169. package/dist/client/assets/index-D1W7ut2I.js +269 -0
  170. package/dist/client/assets/index-DDMNdM21.js +1 -0
  171. package/dist/client/assets/index-DH9TD1uL.js +4 -0
  172. package/dist/client/assets/index-DXzlWhjJ.js +1 -0
  173. package/dist/client/assets/index-DgGQR13e.js +69 -0
  174. package/dist/client/assets/index-H8x29Tys.js +15 -0
  175. package/dist/client/assets/index-HG0Hn-tb.js +5 -0
  176. package/dist/client/assets/index-ICy5uJS1.js +1 -0
  177. package/dist/client/assets/index-KDBjhzA9.js +1 -0
  178. package/dist/client/assets/index-Yw-FAojM.js +1 -0
  179. package/dist/client/assets/index-redirect-CCAMfHj_.js +1 -0
  180. package/dist/client/assets/infiniteQueryObserver-DOpE6BBu.js +1 -0
  181. package/dist/client/assets/infra-billing-CXB12KfP.js +1 -0
  182. package/dist/client/assets/input-BpwrytAl.js +1 -0
  183. package/dist/client/assets/input-DoVas9av.js +17 -0
  184. package/dist/client/assets/integration-icon-DXN-XJCR.js +1 -0
  185. package/dist/client/assets/item-actions-CkyvC2L-.js +1 -0
  186. package/dist/client/assets/jira-icon-DYRW4UM7.js +1 -0
  187. package/dist/client/assets/label-CJFBh9Hz.js +1 -0
  188. package/dist/client/assets/layout-E6Mx6Nvv.js +1 -0
  189. package/dist/client/assets/legacy-admin-welcome-dialog-BdcU4w3n.js +1 -0
  190. package/dist/client/assets/legacy-agents-deep-RrLkFDTz.js +1 -0
  191. package/dist/client/assets/legacy-main-redirect-jo5L4iyk.js +1 -0
  192. package/dist/client/assets/library-Rf-tFgTl.js +1 -0
  193. package/dist/client/assets/library-tab-hHLKC6vr.js +162 -0
  194. package/dist/client/assets/login-DOIEj3kL.js +1 -0
  195. package/dist/client/assets/markdown-Cs_VFIOo.js +93 -0
  196. package/dist/client/assets/mcp-app-renderer-DXnjbkH-.js +11 -0
  197. package/dist/client/assets/mcp-oauth-DqtV9nxi.js +1 -0
  198. package/dist/client/assets/mcp-oauth-m9Nn_Cby.js +1 -0
  199. package/dist/client/assets/members-C1d4xgmU.js +1 -0
  200. package/dist/client/assets/memory-DZqrn_HB.js +7 -0
  201. package/dist/client/assets/mock-board-DlNminaI.js +10 -0
  202. package/dist/client/assets/monaco-editor-BUZ150q-.js +9 -0
  203. package/dist/client/assets/monitoring-sYMmBqE5.js +2 -0
  204. package/dist/client/assets/monitoring-stats-row-BhJSpOTB.js +1 -0
  205. package/dist/client/assets/multi-select-Bh8RuVPt.js +1 -0
  206. package/dist/client/assets/mustache-DDfkx3Qd.js +4 -0
  207. package/dist/client/assets/named-rule-step-DipCSV0p.js +1 -0
  208. package/dist/client/assets/named-rule-view-_NZ7qOsC.js +1 -0
  209. package/dist/client/assets/new-project-dialog-CRE_OifY.js +1 -0
  210. package/dist/client/assets/new-project-store-C_CW1RtD.js +1 -0
  211. package/dist/client/assets/oauth-callback-ai-provider-CXQ3H8DV.js +1 -0
  212. package/dist/client/assets/oauth-callback-bS0CM5qz.js +1 -0
  213. package/dist/client/assets/oauth-consent-DXEafLdq.js +1 -0
  214. package/dist/client/assets/onboarding-CagamfPF.js +1 -0
  215. package/dist/client/assets/openai-conversation-BiojiiW5.js +3 -0
  216. package/dist/client/assets/optimistic-project-sidebar-views-1-DUBv8z.js +1 -0
  217. package/dist/client/assets/order-monitor-day-BOwSvE0N.js +1 -0
  218. package/dist/client/assets/organization-choice-DtvjAEPE.js +1 -0
  219. package/dist/client/assets/orgs-DztNhQ1I.js +1 -0
  220. package/dist/client/assets/own-accounts-section-wjvAAFf5.js +1 -0
  221. package/dist/client/assets/pair-DxgOEXG6.js +48 -0
  222. package/dist/client/assets/parse-sections-5x1kD0Ku.js +4 -0
  223. package/dist/client/assets/plan-DnP7NDfJ.js +1 -0
  224. package/dist/client/assets/plan-ladder-CzWQv3Fw.js +1 -0
  225. package/dist/client/assets/plan-page-D5xGomuu.js +6 -0
  226. package/dist/client/assets/plan-page-VVoBqnO4.css +1 -0
  227. package/dist/client/assets/plan-usage-card-BHY2xgyw.js +6 -0
  228. package/dist/client/assets/popover-DbSdZVd4.js +1 -0
  229. package/dist/client/assets/post-calendar-Br_sRpTk.js +1 -0
  230. package/dist/client/assets/post-editor-hYFyaI7Z.js +2 -0
  231. package/dist/client/assets/preview-content-C_sHEYDI.js +1 -0
  232. package/dist/client/assets/preview-dialog-BueRO4-u.js +1 -0
  233. package/dist/client/assets/preview-panel-D70i4kYa.js +1 -0
  234. package/dist/client/assets/preview-tab-CR27meIw.js +557 -0
  235. package/dist/client/assets/primitives-C_DAyRMT.js +1 -0
  236. package/dist/client/assets/product-picker-dialog-Cwx6BuL6.js +1 -0
  237. package/dist/client/assets/profile-DkquqcCP.js +1 -0
  238. package/dist/client/assets/project-app-view-5rTPzvKu.js +1 -0
  239. package/dist/client/assets/project-apps-DevR_6vG.js +1 -0
  240. package/dist/client/assets/project-icon-BD1ByOdc.js +1 -0
  241. package/dist/client/assets/project-index-BnS4CpAf.js +1 -0
  242. package/dist/client/assets/project-reports-BurjoLQc.js +1 -0
  243. package/dist/client/assets/project-tasks-nlwCObOo.js +1 -0
  244. package/dist/client/assets/projects-empty-state-D08dJvBE.js +1 -0
  245. package/dist/client/assets/projects-vpomg-Z6.js +1 -0
  246. package/dist/client/assets/prompts-jqUHmJ_e.js +1 -0
  247. package/dist/client/assets/record-editor-DFvIgTaA.js +1 -0
  248. package/dist/client/assets/redirect-editor-Cieib2_p.js +1 -0
  249. package/dist/client/assets/reports-BQEZzmQr.js +3 -0
  250. package/dist/client/assets/reports-DrKbPCdl.js +1 -0
  251. package/dist/client/assets/reports-onboarding-DOs_4gka.js +1 -0
  252. package/dist/client/assets/reports-tab-Bajtbz_h.js +2 -0
  253. package/dist/client/assets/repositories-BWyOhQYL.js +1 -0
  254. package/dist/client/assets/repositories-CBIonCcP.js +1 -0
  255. package/dist/client/assets/repository-binding-CGFnGVxJ.js +1 -0
  256. package/dist/client/assets/repository-picker-BPjktPxl.js +1 -0
  257. package/dist/client/assets/require-capability-CQ3NJym_.js +1 -0
  258. package/dist/client/assets/required-auth-layout-DmEyED-o.js +1 -0
  259. package/dist/client/assets/reset-password-Cp_nLiLi.js +1 -0
  260. package/dist/client/assets/resizable-zRzPDJM0.js +1 -0
  261. package/dist/client/assets/resolve-tab-icon-XrYn5LuK.js +1 -0
  262. package/dist/client/assets/review-settings-DHSAoP1k.js +1 -0
  263. package/dist/client/assets/role-color-DVzABbHa.js +1 -0
  264. package/dist/client/assets/roles-B7pKl-QS.js +1 -0
  265. package/dist/client/assets/route-BChDSB4_.js +1 -0
  266. package/dist/client/assets/route-nMFReO1B.js +1 -0
  267. package/dist/client/assets/route-oRV_9YzF.js +1 -0
  268. package/dist/client/assets/route-page-header-DXblwPS1.js +1 -0
  269. package/dist/client/assets/sandbox-git-api-z3lgxnDh.js +1 -0
  270. package/dist/client/assets/sandbox-lifecycle-context-DXG6Bomw.js +1 -0
  271. package/dist/client/assets/save-status-zH9sfFJK.js +1 -0
  272. package/dist/client/assets/schema-B0fnhJuA.js +1 -0
  273. package/dist/client/assets/schema-C-iQKwVz.js +1 -0
  274. package/dist/client/assets/scroll-area-Dm0jhVU4.js +1 -0
  275. package/dist/client/assets/search-input-DPbHiMJC.js +1 -0
  276. package/dist/client/assets/search-toggle-BTwJc97H.js +1 -0
  277. package/dist/client/assets/secret-picker-B6OGx2mQ.js +1 -0
  278. package/dist/client/assets/secrets-Cf1UmVo2.js +1 -0
  279. package/dist/client/assets/section-array-field-Dfaksxcj.js +1 -0
  280. package/dist/client/assets/sections-UpitVoFq.js +1 -0
  281. package/dist/client/assets/sections-editor-DOTx2SrX.js +1 -0
  282. package/dist/client/assets/select-Us30SuzI.js +1 -0
  283. package/dist/client/assets/select-model-DvuOFAKE.js +1 -0
  284. package/dist/client/assets/seo-editor-D_wkdMi9.js +1 -0
  285. package/dist/client/assets/separator-Bdq1NG6k.js +1 -0
  286. package/dist/client/assets/session-runtime-BIDE-rQF.js +1 -0
  287. package/dist/client/assets/settings-tab-DHHNeg02.js +1 -0
  288. package/dist/client/assets/sheet-D8HVkLc6.js +1 -0
  289. package/dist/client/assets/shell-layout-CCvUDm4c.js +1 -0
  290. package/dist/client/assets/site-draft-actions-BLjlvxVb.js +7 -0
  291. package/dist/client/assets/site-draft-view-B6y_crr2.js +1 -0
  292. package/dist/client/assets/site-editor-BVtedbL2.js +1 -0
  293. package/dist/client/assets/site-editor-toast-B6psqL4S.js +1 -0
  294. package/dist/client/assets/skills-gf32nwAO.js +1 -0
  295. package/dist/client/assets/slider-oJh009BK.js +1 -0
  296. package/dist/client/assets/sortable.esm-DhKgeEID.js +1 -0
  297. package/dist/client/assets/sso-CRyh0I61.js +1 -0
  298. package/dist/client/assets/suggestion-HxkFbXWu.js +2 -0
  299. package/dist/client/assets/super-agent-icon-DhNy1L1t.js +1 -0
  300. package/dist/client/assets/switch-C8bVi-NX.js +1 -0
  301. package/dist/client/assets/synced-repos-M8yw1Jwe.js +1 -0
  302. package/dist/client/assets/tab-icon-glyph-BJdR1rTv.js +1 -0
  303. package/dist/client/assets/table-BOhYBEKO.js +1 -0
  304. package/dist/client/assets/tabs-Bfy1intI.js +1 -0
  305. package/dist/client/assets/task-board-CgO9M3z4.js +1 -0
  306. package/dist/client/assets/task-key-B2-Ue6HC.js +5 -0
  307. package/dist/client/assets/task-route-Ba3aez9x.js +1 -0
  308. package/dist/client/assets/task-status-CdYrOhRh.js +1 -0
  309. package/dist/client/assets/taskboard-analytics-loV9TaFT.js +1 -0
  310. package/dist/client/assets/tasks-Brq4Pp7A.js +4 -0
  311. package/dist/client/assets/tasks-Z7BLYet6.js +1 -0
  312. package/dist/client/assets/textarea-D93s_9gX.js +1 -0
  313. package/dist/client/assets/thread-analytics-BxXXEL8G.js +1 -0
  314. package/dist/client/assets/thread-button-DQmfTj65.js +1 -0
  315. package/dist/client/assets/thread-intent-CJjEXtuE.js +15 -0
  316. package/dist/client/assets/thread-route-Cpqj5B6r.js +1 -0
  317. package/dist/client/assets/thread-route-khw3rYS4.js +1 -0
  318. package/dist/client/assets/thread-sheet-body-DE8XX1TP.js +1 -0
  319. package/dist/client/assets/time-range-picker-w3lHNK8L.js +1 -0
  320. package/dist/client/assets/toggle-group-DpYPg3qc.js +1 -0
  321. package/dist/client/assets/tool-set-selector-CRZL7bC5.js +1 -0
  322. package/dist/client/assets/toolbar-icon-button-6BTsLHAb.js +1 -0
  323. package/dist/client/assets/tooltip-BZz0vywC.js +1 -0
  324. package/dist/client/assets/tooltipContext-CZ3OeUnD.js +1 -0
  325. package/dist/client/assets/track-CR6tDDcQ.js +1 -0
  326. package/dist/client/assets/types-C3qQbU3-.js +77 -0
  327. package/dist/client/assets/url-slug-DTf0xW9o.js +1 -0
  328. package/dist/client/assets/usage-stats-CLMr8vHI.js +141 -0
  329. package/dist/client/assets/use-ai-providers-COZOIITa.js +1 -0
  330. package/dist/client/assets/use-api-keys-B2DhKv5O.js +1 -0
  331. package/dist/client/assets/use-apply-named-rule-D22hDqIn.js +1 -0
  332. package/dist/client/assets/use-ask-in-chat-i9g8xTsQ.js +1 -0
  333. package/dist/client/assets/use-automations-y62q9wiV.js +1 -0
  334. package/dist/client/assets/use-autosave-D8b9idjo.js +1 -0
  335. package/dist/client/assets/use-blocks-v8-project-BzS0SD5J.js +1 -0
  336. package/dist/client/assets/use-blog-view-Bj96i8iq.js +1 -0
  337. package/dist/client/assets/use-chat-layout-state-CRsWJAkm.js +1 -0
  338. package/dist/client/assets/use-cms-publish-actions-Bws1dcKi.js +10 -0
  339. package/dist/client/assets/use-connect-companion-Cd1kyM3y.js +1 -0
  340. package/dist/client/assets/use-connection-vpR-lNEV.js +1 -0
  341. package/dist/client/assets/use-content-sync-SowupOFR.js +1 -0
  342. package/dist/client/assets/use-copy-9vSDNA2-.js +1 -0
  343. package/dist/client/assets/use-current-view-e2srGh0R.js +1 -0
  344. package/dist/client/assets/use-date-fns-locale-DVuctzWR.js +1 -0
  345. package/dist/client/assets/use-debounced-autosave-C31axPZ5.js +1 -0
  346. package/dist/client/assets/use-debounced-value-Cw8HgnQu.js +1 -0
  347. package/dist/client/assets/use-deco-credits-DPzf77AT.js +1 -0
  348. package/dist/client/assets/use-decopilot-events-Dp7emgSR.js +1 -0
  349. package/dist/client/assets/use-delete-block-Crpx8FjE.js +1 -0
  350. package/dist/client/assets/use-delete-connection-BQ9YqO-c.js +1 -0
  351. package/dist/client/assets/use-deployment-admin-By_xF0wv.js +1 -0
  352. package/dist/client/assets/use-entitlements-Bi51m-s-.js +1 -0
  353. package/dist/client/assets/use-fast-preview-draft-url-CRmeng0Q.js +1 -0
  354. package/dist/client/assets/use-file-configs-GoxRHe-r.js +1 -0
  355. package/dist/client/assets/use-id-selection-BQh1Bg7W.js +1 -0
  356. package/dist/client/assets/use-in-settings-CU_P2dfR.js +1 -0
  357. package/dist/client/assets/use-inbox-feed-bSGgas59.js +1 -0
  358. package/dist/client/assets/use-infinite-scroll-DfV_gkqU.js +1 -0
  359. package/dist/client/assets/use-join-requests-DI3-5eWl.js +1 -0
  360. package/dist/client/assets/use-main-panel-tabs-DTbCL9St.js +1 -0
  361. package/dist/client/assets/use-mcp-auth-status-C7HNLPrb.js +1 -0
  362. package/dist/client/assets/use-mcp-client-C_qG7wUZ.js +10 -0
  363. package/dist/client/assets/use-mcp-prompts-BVogmm65.js +1 -0
  364. package/dist/client/assets/use-mcp-tools-C6UyNv6N.js +1 -0
  365. package/dist/client/assets/use-mobile-BA8hUvQw.js +1 -0
  366. package/dist/client/assets/use-move-blocks-BuTBuPq7.js +1 -0
  367. package/dist/client/assets/use-navigate-to-agent-BlGlq6Si.js +1 -0
  368. package/dist/client/assets/use-never-published-iwVh38ki.js +1 -0
  369. package/dist/client/assets/use-org-fs-CvKheX_E.js +1 -0
  370. package/dist/client/assets/use-org-notice-5uXj9qdB.js +1 -0
  371. package/dist/client/assets/use-org-repo-syncs-De9jW4li.js +1 -0
  372. package/dist/client/assets/use-org-sso-aEsmoftk.js +1 -0
  373. package/dist/client/assets/use-organization-settings-DzL3Na4t.js +1 -0
  374. package/dist/client/assets/use-panel-navigate-RwlB8yz2.js +1 -0
  375. package/dist/client/assets/use-project-native-view-presence-LtOEv_bc.js +1 -0
  376. package/dist/client/assets/use-project-scope-CayH-uv6.js +1 -0
  377. package/dist/client/assets/use-recent-apps-DruGOBJK.js +1 -0
  378. package/dist/client/assets/use-reports-diagnostic-DmG6vfW3.js +1 -0
  379. package/dist/client/assets/use-sandbox-events-BC-9Qeez.js +2 -0
  380. package/dist/client/assets/use-secrets-Bx8YDUF-.js +1 -0
  381. package/dist/client/assets/use-section-preview-base-23Zb6ABj.js +1 -0
  382. package/dist/client/assets/use-sidebar-collapsed-BWfZDELa.js +1 -0
  383. package/dist/client/assets/use-tags-DQn-ihwP.js +1 -0
  384. package/dist/client/assets/use-task-board-analytics-4KchvJP_.js +1 -0
  385. package/dist/client/assets/use-task-board-item-prs-bjSiDC9b.js +1 -0
  386. package/dist/client/assets/use-task-board-items-BUgzBLKd.js +1 -0
  387. package/dist/client/assets/use-task-board-prompts-CScMHEY4.js +1 -0
  388. package/dist/client/assets/use-task-metadata-ml12mmZb.js +1 -0
  389. package/dist/client/assets/use-thread-outputs-DKNz-3Hm.js +1 -0
  390. package/dist/client/assets/use-view-draft-kind-6ZToH2lU.js +1 -0
  391. package/dist/client/assets/use-voice-input-FNIQ7Gtg.js +1 -0
  392. package/dist/client/assets/useInfiniteQuery-B7H5rw7X.js +1 -0
  393. package/dist/client/assets/useQueries-b1U_PciZ.js +1 -0
  394. package/dist/client/assets/useSuspenseInfiniteQuery-BAeDGxcg.js +1 -0
  395. package/dist/client/assets/users-CjER3r5S.js +1 -0
  396. package/dist/client/assets/utils-DxxrR_sy.js +4 -0
  397. package/dist/client/assets/variant-calendar-DYmrGYCj.js +1 -0
  398. package/dist/client/assets/variant-matcher-override-ksW5aMSA.js +1 -0
  399. package/dist/client/assets/view-header-COMgGMz-.js +1 -0
  400. package/dist/client/assets/virtual-mcp-DXFiFNeR.js +1 -0
  401. package/dist/client/assets/watch-sse-pool-DZnjbZdQ.js +1 -0
  402. package/dist/client/index.html +1 -1
  403. package/dist/server/server.js +1 -1
  404. package/package.json +1 -1
  405. package/dist/client/assets/AlertCircle-CPPDtf_G.js +0 -1
  406. package/dist/client/assets/AreaChart-Dkcr6Ftt.js +0 -1
  407. package/dist/client/assets/ArrowLeft-ZIb4BJCm.js +0 -1
  408. package/dist/client/assets/ArrowRight-BsAaKjFT.js +0 -1
  409. package/dist/client/assets/ArrowUp-BoxEPcLL.js +0 -1
  410. package/dist/client/assets/BookOpen01-78ULfEqE.js +0 -1
  411. package/dist/client/assets/CartesianChart-B-fd6Fk8.js +0 -1
  412. package/dist/client/assets/CategoricalChart-CnnGbvL7.js +0 -33
  413. package/dist/client/assets/CheckCircle-CVnvVW7Z.js +0 -1
  414. package/dist/client/assets/ChevronDown-RjEjI_Fw.js +0 -1
  415. package/dist/client/assets/ChevronSelectorVertical-7aPbD1o7.js +0 -1
  416. package/dist/client/assets/ChevronUp-CURkkqOF.js +0 -1
  417. package/dist/client/assets/CreditCard01-GATZFsTY.js +0 -1
  418. package/dist/client/assets/Eye-cFax1ViC.js +0 -1
  419. package/dist/client/assets/File02-DmkZoy1E.js +0 -1
  420. package/dist/client/assets/Fingerprint04-vSO6N8um.js +0 -1
  421. package/dist/client/assets/Globe04-vBUbsG60.js +0 -1
  422. package/dist/client/assets/Image01-DStfZJB_.js +0 -1
  423. package/dist/client/assets/Key01-y01giijo.js +0 -1
  424. package/dist/client/assets/LayoutLeft-CZKqhqEw.js +0 -1
  425. package/dist/client/assets/LinkBroken01-U9ZcT-zb.js +0 -1
  426. package/dist/client/assets/MessageCircle01--u6B2ia8.js +0 -1
  427. package/dist/client/assets/Minus-DHz7ac9c.js +0 -1
  428. package/dist/client/assets/Monitor01-C7pwRef-.js +0 -1
  429. package/dist/client/assets/Play-pLUsrMym.js +0 -1
  430. package/dist/client/assets/Plus-0DN1Gnym.js +0 -1
  431. package/dist/client/assets/ReferenceLine-BlTdVghK.js +0 -1
  432. package/dist/client/assets/SearchMd-C6VhNKOv.js +0 -1
  433. package/dist/client/assets/ShoppingBag01-CbchDZQi.js +0 -1
  434. package/dist/client/assets/Sun-DbofJzo4.js +0 -1
  435. package/dist/client/assets/SwitchHorizontal01-BAD2JhOt.js +0 -1
  436. package/dist/client/assets/Tool01-BdB8BwwT.js +0 -1
  437. package/dist/client/assets/Tooltip-Id4JAR3f.js +0 -1
  438. package/dist/client/assets/Trash01-NEyFqlJC.js +0 -1
  439. package/dist/client/assets/Upload01-C2rAxNVk.js +0 -1
  440. package/dist/client/assets/UserCheck01-BA8i8gC-.js +0 -1
  441. package/dist/client/assets/UserSquare-BaVg281r.js +0 -1
  442. package/dist/client/assets/Users01-BIkXah4l.js +0 -1
  443. package/dist/client/assets/XClose-iDf6pWg-.js +0 -1
  444. package/dist/client/assets/Zap-BpbRWoEH.js +0 -1
  445. package/dist/client/assets/access-gate-5veGiSzF.js +0 -1
  446. package/dist/client/assets/add-connection-dialog-DMeOprq_.js +0 -1
  447. package/dist/client/assets/agent-app-qzh1Hl85.js +0 -1
  448. package/dist/client/assets/agent-assets-CXVTtm4J.js +0 -1
  449. package/dist/client/assets/agent-automation-BEZim52z.js +0 -20
  450. package/dist/client/assets/agent-automations-CahCismn.js +0 -1
  451. package/dist/client/assets/agent-blog-CC_XIhKE.js +0 -2
  452. package/dist/client/assets/agent-blog-post-C8I-Hicz.js +0 -2
  453. package/dist/client/assets/agent-business-case-y-uV4Kyx.js +0 -1
  454. package/dist/client/assets/agent-calendar-Ctum7n_E.js +0 -1
  455. package/dist/client/assets/agent-capabilities-CpG4q0Pf.js +0 -1
  456. package/dist/client/assets/agent-connect-sources-Clthw5-G.js +0 -1
  457. package/dist/client/assets/agent-deck-6GPZI5QZ.js +0 -1
  458. package/dist/client/assets/agent-e2e-CQ_H6Fq7.js +0 -1
  459. package/dist/client/assets/agent-experiments-_2pzJ6cS.js +0 -1
  460. package/dist/client/assets/agent-file-BPFzlCJH.js +0 -1
  461. package/dist/client/assets/agent-hosting-Cy-sCPhu.js +0 -1
  462. package/dist/client/assets/agent-icon-D3UAaAZc.js +0 -1
  463. package/dist/client/assets/agent-library-file-j7oG5YDf.js +0 -1
  464. package/dist/client/assets/agent-library-wR2k8m7Q.js +0 -1
  465. package/dist/client/assets/agent-overview-CyaSWwtC.js +0 -1
  466. package/dist/client/assets/agent-releases-D84lxNgT.js +0 -3
  467. package/dist/client/assets/agent-settings-02Ni_v2K.js +0 -1
  468. package/dist/client/assets/agent-site-editor-CGqx_u24.js +0 -16
  469. package/dist/client/assets/agent-site-editor-code-DQ_Ggog5.js +0 -2
  470. package/dist/client/assets/agent-site-editor-content-BhStcDJ1.js +0 -1
  471. package/dist/client/assets/agent-site-editor-preview-yRFKSlrL.js +0 -1
  472. package/dist/client/assets/agent-view-CBERTgtH.js +0 -1
  473. package/dist/client/assets/agent-view-guard-9v17Il03.js +0 -1
  474. package/dist/client/assets/ai-providers-DtShZCgE.js +0 -1
  475. package/dist/client/assets/alert-CCDrTeTF.js +0 -1
  476. package/dist/client/assets/analytics-sections-D3yb1REC.js +0 -1
  477. package/dist/client/assets/api-keys-CXCuS8XD.js +0 -1
  478. package/dist/client/assets/api-keys-D-9REx73.js +0 -1
  479. package/dist/client/assets/app-editor-BfTUK0FY.js +0 -1
  480. package/dist/client/assets/asset-utils-DveTp3fk.js +0 -1
  481. package/dist/client/assets/auth-BHQvXV6z.js +0 -1
  482. package/dist/client/assets/auth-catchall-BwSyGIcr.js +0 -1
  483. package/dist/client/assets/auth-entry-CqfzQnQV.js +0 -1
  484. package/dist/client/assets/auth-split-layout-CcKVOfmi.js +0 -1
  485. package/dist/client/assets/authenticate-and-persist-oauth-B5FenfH3.js +0 -1
  486. package/dist/client/assets/automation-list-row-D9CdIAYT.js +0 -1
  487. package/dist/client/assets/automation-runs-tEb3bk5t.js +0 -1
  488. package/dist/client/assets/automations-DzwS76rk.js +0 -1
  489. package/dist/client/assets/badge-2VSZSqFz.js +0 -1
  490. package/dist/client/assets/block-document-CNqV7IHC.js +0 -3
  491. package/dist/client/assets/blocks-preview-workspace-context-CJx_G7R9.js +0 -1
  492. package/dist/client/assets/blocks-tab-states-CSRiinzU.js +0 -1
  493. package/dist/client/assets/blog-preview-url-C9bLd-j-.js +0 -1
  494. package/dist/client/assets/blog-schema-DZh6qRQ-.js +0 -1
  495. package/dist/client/assets/blog-source-gate-TpjbGpYy.js +0 -1
  496. package/dist/client/assets/blog-view-gate-Cbz_7CwN.js +0 -1
  497. package/dist/client/assets/buckets-D3mhEN26.js +0 -1
  498. package/dist/client/assets/build-improve-prompt-doc-p8F6Ljg-.js +0 -2
  499. package/dist/client/assets/calendar-CmntaSKL.js +0 -1
  500. package/dist/client/assets/capability-load-error-C1CKTtM9.js +0 -1
  501. package/dist/client/assets/category-editor--3tQxxmU.js +0 -1
  502. package/dist/client/assets/category-tree-C3wmJ2qi.js +0 -18
  503. package/dist/client/assets/chart-JZPDSuE-.js +0 -13
  504. package/dist/client/assets/chat-context-CHs_vLHR.js +0 -43
  505. package/dist/client/assets/chat-draft-CVYZc_WM.js +0 -1
  506. package/dist/client/assets/checkbox-FR9M7tqI.js +0 -1
  507. package/dist/client/assets/choose-editor-PidrqFf2.js +0 -1
  508. package/dist/client/assets/cli-auth-success-C5Fd8uL1.js +0 -1
  509. package/dist/client/assets/cms-settings-editor-dUUSsoLV.js +0 -1
  510. package/dist/client/assets/cms-store-drafts-DhSImFSN.js +0 -1
  511. package/dist/client/assets/collapsible-BWNTyNqn.js +0 -1
  512. package/dist/client/assets/collection-detail-CVt8KxGt.js +0 -1
  513. package/dist/client/assets/collection-display-button-DVWBaPxr.js +0 -1
  514. package/dist/client/assets/collection-search-rqLgUJtO.js +0 -1
  515. package/dist/client/assets/collection-table-wrapper-Dz3xXXvY.js +0 -1
  516. package/dist/client/assets/collection-tabs-zjjydZl4.js +0 -1
  517. package/dist/client/assets/combobox-CJjUjqtl.js +0 -1
  518. package/dist/client/assets/command-DNUfYvKL.js +0 -1
  519. package/dist/client/assets/companion-mcps-section-Cv3fzW7U.js +0 -1
  520. package/dist/client/assets/config-CpoGhHX7.js +0 -1
  521. package/dist/client/assets/connect-aAvAz94A.js +0 -9
  522. package/dist/client/assets/connect-key-CIISkKXe.js +0 -1
  523. package/dist/client/assets/connect-layout-DE8QcPfU.js +0 -1
  524. package/dist/client/assets/connect-source-dialog-DyamthSp.js +0 -1
  525. package/dist/client/assets/connection-CmX2_bPO.js +0 -1
  526. package/dist/client/assets/connection-card-BTuntdg9.js +0 -1
  527. package/dist/client/assets/connection-detail-TQpSsczL.js +0 -1
  528. package/dist/client/assets/connection-form-helpers-DwTMfIAN.js +0 -1
  529. package/dist/client/assets/connection-slug-Dk0F6MJS.js +0 -1
  530. package/dist/client/assets/connections-DxGZdGF8.js +0 -1
  531. package/dist/client/assets/content-changes-DjU_gqMf.js +0 -1
  532. package/dist/client/assets/content-tab-D17C3NE0.js +0 -19
  533. package/dist/client/assets/context-B-2i9HUP.js +0 -1
  534. package/dist/client/assets/context-menu-am6Pi9ET.js +0 -1
  535. package/dist/client/assets/context-shell-StF1Ttft.js +0 -37
  536. package/dist/client/assets/create-organization-dialog-CXfsogY0.js +0 -1
  537. package/dist/client/assets/daily-pulse-DhP5AtmS.js +0 -1
  538. package/dist/client/assets/delete-copy-DPPlO7TG.js +0 -4
  539. package/dist/client/assets/device-hint-BRjNU4WX.js +0 -1
  540. package/dist/client/assets/discover-BPEF2lTO.js +0 -1
  541. package/dist/client/assets/domain-settings-BoJisjEE.js +0 -1
  542. package/dist/client/assets/drawer-DKvYuOCB.js +0 -1
  543. package/dist/client/assets/editor-KFWPYHnE.js +0 -11
  544. package/dist/client/assets/editor-classes-CmuNPnLv.js +0 -1
  545. package/dist/client/assets/empty-state-Dqeh8Fig.js +0 -1
  546. package/dist/client/assets/empty-state-lP1YMoK-.js +0 -1
  547. package/dist/client/assets/experiments-tab-choice-D-bckHiq.js +0 -1
  548. package/dist/client/assets/extract-connection-data-6U2u3XQX.js +0 -1
  549. package/dist/client/assets/feature-gate-BxOP-iGL.js +0 -1
  550. package/dist/client/assets/feature-paywall-DoaLWtAl.js +0 -1
  551. package/dist/client/assets/file-explorer-DPT4YX5c.js +0 -2
  552. package/dist/client/assets/file-preview-DY8-uL6t.js +0 -1
  553. package/dist/client/assets/file-share-button-BkBqemYn.js +0 -3
  554. package/dist/client/assets/file-type-icon-Br0I75Vm.js +0 -1
  555. package/dist/client/assets/folder-icon-CAklUdWP.js +0 -1
  556. package/dist/client/assets/form-BqnMqVx7.js +0 -1
  557. package/dist/client/assets/frame-navigation-BtRIg3ta.js +0 -1
  558. package/dist/client/assets/gateway-client-Dc__4TPf.js +0 -1
  559. package/dist/client/assets/general-WvOTqKGY.js +0 -1
  560. package/dist/client/assets/github-icon-DjMsQkke.js +0 -1
  561. package/dist/client/assets/held-block-view-C7jOBb2O.js +0 -3
  562. package/dist/client/assets/home-DkTQE7-f.js +0 -1
  563. package/dist/client/assets/home-overview-D4-EOFcQ.js +0 -1
  564. package/dist/client/assets/hosted-reconcile-CYTtk38V.js +0 -1
  565. package/dist/client/assets/icon-button-CWYyJxah.js +0 -1
  566. package/dist/client/assets/index-B5U9W1Mu.js +0 -1
  567. package/dist/client/assets/index-BGvKfTSb.js +0 -1
  568. package/dist/client/assets/index-BPTAax7s.js +0 -5
  569. package/dist/client/assets/index-BXRM9GB3.js +0 -26
  570. package/dist/client/assets/index-BhB8G2bF.js +0 -1
  571. package/dist/client/assets/index-Bj6_6zVx.js +0 -269
  572. package/dist/client/assets/index-CHuyyJXT.js +0 -15
  573. package/dist/client/assets/index-CIDUrB92.js +0 -1
  574. package/dist/client/assets/index-COpxpzy0.js +0 -1
  575. package/dist/client/assets/index-CeyzHwPJ.js +0 -69
  576. package/dist/client/assets/index-DA9uRCnv.js +0 -1
  577. package/dist/client/assets/index-DCFOJPbU.js +0 -1
  578. package/dist/client/assets/index-DS9t0RdF.js +0 -1
  579. package/dist/client/assets/index-Di_XG7be.js +0 -1
  580. package/dist/client/assets/index-TsmXmWpk.js +0 -4
  581. package/dist/client/assets/index-c0NsxqWi.js +0 -1
  582. package/dist/client/assets/index-l472wRT9.js +0 -4
  583. package/dist/client/assets/index-redirect-CpucC--Q.js +0 -1
  584. package/dist/client/assets/infiniteQueryObserver-DbNv63Q9.js +0 -1
  585. package/dist/client/assets/infra-billing-CANoMXCT.js +0 -1
  586. package/dist/client/assets/input-B1_XpDYL.js +0 -1
  587. package/dist/client/assets/input-CZtKpdoV.js +0 -17
  588. package/dist/client/assets/integration-icon-DCeVsTJy.js +0 -1
  589. package/dist/client/assets/item-actions-fZ37mrS2.js +0 -1
  590. package/dist/client/assets/jira-icon-BjmROWUI.js +0 -1
  591. package/dist/client/assets/label-B6vdSyOh.js +0 -1
  592. package/dist/client/assets/layout-B5o1uNUS.js +0 -1
  593. package/dist/client/assets/legacy-admin-welcome-dialog-CFp34ecC.js +0 -1
  594. package/dist/client/assets/legacy-agents-deep-BeXi4ceb.js +0 -1
  595. package/dist/client/assets/legacy-main-redirect-DJVQL75t.js +0 -1
  596. package/dist/client/assets/library-DnIbZN9I.js +0 -1
  597. package/dist/client/assets/library-tab-D_CctIvq.js +0 -162
  598. package/dist/client/assets/login-BUUrEN3F.js +0 -1
  599. package/dist/client/assets/markdown-CLYGcw1L.js +0 -93
  600. package/dist/client/assets/mcp-app-renderer-DRblOmIF.js +0 -11
  601. package/dist/client/assets/mcp-oauth-3XamI2Iv.js +0 -1
  602. package/dist/client/assets/mcp-oauth-CT2I7p8i.js +0 -1
  603. package/dist/client/assets/members-CRJOq7br.js +0 -1
  604. package/dist/client/assets/memory-ruV3CO98.js +0 -7
  605. package/dist/client/assets/mock-board-CHqKbIb1.js +0 -10
  606. package/dist/client/assets/monaco-editor-BF9cV2jc.js +0 -9
  607. package/dist/client/assets/monitoring-DnrpiN-u.js +0 -2
  608. package/dist/client/assets/monitoring-stats-row-BKwXRbbp.js +0 -1
  609. package/dist/client/assets/multi-select-YyQ_-FKB.js +0 -1
  610. package/dist/client/assets/mustache-Bt_DjIa-.js +0 -4
  611. package/dist/client/assets/named-rule-step-DUHG0ZfV.js +0 -1
  612. package/dist/client/assets/named-rule-view-BdyNA7vl.js +0 -1
  613. package/dist/client/assets/new-project-dialog-BdtpVZ1_.js +0 -1
  614. package/dist/client/assets/new-project-store-CmeGQvQy.js +0 -1
  615. package/dist/client/assets/oauth-callback-B-K5wR59.js +0 -1
  616. package/dist/client/assets/oauth-callback-ai-provider-DhAPGt17.js +0 -1
  617. package/dist/client/assets/oauth-consent-C_4XofGz.js +0 -1
  618. package/dist/client/assets/onboarding-CjguHlx_.js +0 -1
  619. package/dist/client/assets/openai-conversation-Dh_ls-fd.js +0 -3
  620. package/dist/client/assets/optimistic-project-sidebar-views-D8FI_8iU.js +0 -1
  621. package/dist/client/assets/order-monitor-day-By3OGqd-.js +0 -1
  622. package/dist/client/assets/organization-choice-BGm0DlVg.js +0 -1
  623. package/dist/client/assets/orgs-87Ou7TBh.js +0 -1
  624. package/dist/client/assets/own-accounts-section-CzNNrUJO.js +0 -1
  625. package/dist/client/assets/pair-DzC4ex5U.js +0 -48
  626. package/dist/client/assets/parse-sections-DXtY2KBF.js +0 -4
  627. package/dist/client/assets/plan-Bv-VSnLu.js +0 -1
  628. package/dist/client/assets/plan-ladder-D-MY2YGp.js +0 -1
  629. package/dist/client/assets/plan-page-DHGA2gWY.js +0 -6
  630. package/dist/client/assets/plan-page-JAVKjas9.css +0 -1
  631. package/dist/client/assets/plan-usage-card-BJkC9kyQ.js +0 -6
  632. package/dist/client/assets/popover-C5kO4vgi.js +0 -1
  633. package/dist/client/assets/post-calendar-vEXCNIK7.js +0 -1
  634. package/dist/client/assets/post-editor-DuExUo8H.js +0 -2
  635. package/dist/client/assets/preview-content-BWOCB4m8.js +0 -1
  636. package/dist/client/assets/preview-dialog-Im9ed1DF.js +0 -1
  637. package/dist/client/assets/preview-panel-D0PH0NbB.js +0 -1
  638. package/dist/client/assets/preview-tab-BHFyJXLm.js +0 -557
  639. package/dist/client/assets/primitives-BO5iYonj.js +0 -1
  640. package/dist/client/assets/product-picker-dialog-D_Z_odmx.js +0 -1
  641. package/dist/client/assets/profile-CTTUkWNX.js +0 -1
  642. package/dist/client/assets/project-app-view-CdgawHfj.js +0 -1
  643. package/dist/client/assets/project-apps-CszBh4SS.js +0 -1
  644. package/dist/client/assets/project-icon-BZME6-P4.js +0 -1
  645. package/dist/client/assets/project-index-DNirbL6N.js +0 -1
  646. package/dist/client/assets/project-reports-IrL-v43A.js +0 -1
  647. package/dist/client/assets/project-tasks-N7n1ETRd.js +0 -1
  648. package/dist/client/assets/projects-BGfl1Fnz.js +0 -1
  649. package/dist/client/assets/projects-empty-state-DypmC1Ec.js +0 -1
  650. package/dist/client/assets/prompts-oakJFq-p.js +0 -1
  651. package/dist/client/assets/record-editor-CwaRdDZ5.js +0 -1
  652. package/dist/client/assets/redirect-editor-DskbkPZE.js +0 -1
  653. package/dist/client/assets/reports-BOGH4hNh.js +0 -1
  654. package/dist/client/assets/reports-NN9tGbAJ.js +0 -3
  655. package/dist/client/assets/reports-onboarding-BF9d33ws.js +0 -1
  656. package/dist/client/assets/reports-tab-CVNcWdEe.js +0 -2
  657. package/dist/client/assets/repositories-BjRBMu_Y.js +0 -1
  658. package/dist/client/assets/repositories-EVLbsTZW.js +0 -1
  659. package/dist/client/assets/repository-binding-le0nIidi.js +0 -1
  660. package/dist/client/assets/repository-picker-DNgFAGYD.js +0 -1
  661. package/dist/client/assets/require-capability-P_3GadcL.js +0 -1
  662. package/dist/client/assets/required-auth-layout-IVU45FYN.js +0 -1
  663. package/dist/client/assets/reset-password-CgI6LobP.js +0 -1
  664. package/dist/client/assets/resizable-DhCMu9jm.js +0 -1
  665. package/dist/client/assets/resolve-tab-icon-Bdqcb8kc.js +0 -1
  666. package/dist/client/assets/review-settings-CuO-YwU9.js +0 -1
  667. package/dist/client/assets/role-color-x_ek03QW.js +0 -1
  668. package/dist/client/assets/roles-CD_nbYa3.js +0 -1
  669. package/dist/client/assets/route-B0XXJVhZ.js +0 -1
  670. package/dist/client/assets/route-BUmOv6N9.js +0 -1
  671. package/dist/client/assets/route-DUKe6oa-.js +0 -1
  672. package/dist/client/assets/route-page-header-9OZPwvWl.js +0 -1
  673. package/dist/client/assets/sandbox-git-api-DJL4bAUz.js +0 -1
  674. package/dist/client/assets/sandbox-lifecycle-context-CysBGD5U.js +0 -1
  675. package/dist/client/assets/save-status-D_oRmIk-.js +0 -1
  676. package/dist/client/assets/schema-BZsFW0Lm.js +0 -1
  677. package/dist/client/assets/schema-D8CCdBQF.js +0 -1
  678. package/dist/client/assets/scroll-area-BIcQVMGl.js +0 -1
  679. package/dist/client/assets/search-input-aat0MNRR.js +0 -1
  680. package/dist/client/assets/search-toggle-DXtGCwYA.js +0 -1
  681. package/dist/client/assets/secret-picker-Coo_F9b2.js +0 -1
  682. package/dist/client/assets/secrets-EPOzgxHU.js +0 -1
  683. package/dist/client/assets/section-array-field-CeqUsN-m.js +0 -1
  684. package/dist/client/assets/sections-BgTZjDGM.js +0 -1
  685. package/dist/client/assets/sections-editor-DCM9M8a6.js +0 -1
  686. package/dist/client/assets/select-CiOYLgUG.js +0 -1
  687. package/dist/client/assets/select-model-CqZr8NuL.js +0 -1
  688. package/dist/client/assets/seo-editor-Cy4brsdL.js +0 -1
  689. package/dist/client/assets/separator-RsSI1g_t.js +0 -1
  690. package/dist/client/assets/session-runtime-4DzD9t26.js +0 -1
  691. package/dist/client/assets/settings-tab-C016euoq.js +0 -1
  692. package/dist/client/assets/sheet-BWD81VUI.js +0 -1
  693. package/dist/client/assets/shell-layout-dzWbEyhg.js +0 -1
  694. package/dist/client/assets/site-draft-actions-D0QjAA5A.js +0 -7
  695. package/dist/client/assets/site-draft-view-CDLwJ6S7.js +0 -1
  696. package/dist/client/assets/site-editor-C_UOunkW.js +0 -1
  697. package/dist/client/assets/site-editor-toast-YZR7M-Q_.js +0 -1
  698. package/dist/client/assets/skills-Bvnchoep.js +0 -1
  699. package/dist/client/assets/slider-FWDInh2S.js +0 -1
  700. package/dist/client/assets/sortable.esm-CK9iNqPG.js +0 -1
  701. package/dist/client/assets/sso-BSU9Pp4J.js +0 -1
  702. package/dist/client/assets/suggestion-DYgy8nXt.js +0 -2
  703. package/dist/client/assets/super-agent-icon-Pfppk_RI.js +0 -1
  704. package/dist/client/assets/switch-Y7aVfXjq.js +0 -1
  705. package/dist/client/assets/synced-repos-BpKGwyTo.js +0 -1
  706. package/dist/client/assets/tab-icon-glyph-2g8JCfEh.js +0 -1
  707. package/dist/client/assets/table-ptraHIy-.js +0 -1
  708. package/dist/client/assets/tabs-efVvGc7j.js +0 -1
  709. package/dist/client/assets/task-board-BgINXXjV.js +0 -1
  710. package/dist/client/assets/task-key-DYtWVOhd.js +0 -5
  711. package/dist/client/assets/task-route-mnSror7O.js +0 -1
  712. package/dist/client/assets/task-status-DWTaOuhM.js +0 -1
  713. package/dist/client/assets/taskboard-analytics-B1bCRnU6.js +0 -1
  714. package/dist/client/assets/tasks-BANca0_a.js +0 -1
  715. package/dist/client/assets/tasks-CooFuxa_.js +0 -4
  716. package/dist/client/assets/textarea-CShy6fKF.js +0 -1
  717. package/dist/client/assets/thread-analytics-RLiRMJNx.js +0 -1
  718. package/dist/client/assets/thread-button-BBJoVBQl.js +0 -1
  719. package/dist/client/assets/thread-intent-C2E_LwQl.js +0 -15
  720. package/dist/client/assets/thread-route-BNNhAHoL.js +0 -1
  721. package/dist/client/assets/thread-route-D4QqSXna.js +0 -1
  722. package/dist/client/assets/thread-sheet-body-1EuTSVhs.js +0 -1
  723. package/dist/client/assets/time-range-picker-BLR4bUKG.js +0 -1
  724. package/dist/client/assets/toggle-group-DJFDIGlt.js +0 -1
  725. package/dist/client/assets/tool-set-selector-Db3GVt5h.js +0 -1
  726. package/dist/client/assets/toolbar-icon-button-C222vHOe.js +0 -1
  727. package/dist/client/assets/tooltip-D7UkTGEH.js +0 -1
  728. package/dist/client/assets/tooltipContext-Bt-5l0GD.js +0 -1
  729. package/dist/client/assets/track-D4LGL2mH.js +0 -1
  730. package/dist/client/assets/types-iktHXW9L.js +0 -77
  731. package/dist/client/assets/url-slug-5D91y-TV.js +0 -1
  732. package/dist/client/assets/usage-stats--dyurVY0.js +0 -141
  733. package/dist/client/assets/use-ai-providers-BuEpxRW1.js +0 -1
  734. package/dist/client/assets/use-api-keys-GvKnnLxw.js +0 -1
  735. package/dist/client/assets/use-apply-named-rule-CqxV1tvo.js +0 -1
  736. package/dist/client/assets/use-ask-in-chat-DqQc4ECT.js +0 -1
  737. package/dist/client/assets/use-automations-dUGYDmCK.js +0 -1
  738. package/dist/client/assets/use-autosave-Wr8DUKbR.js +0 -1
  739. package/dist/client/assets/use-blocks-v8-project-dqQj5Ply.js +0 -1
  740. package/dist/client/assets/use-blog-view-DD_jmJBl.js +0 -1
  741. package/dist/client/assets/use-chat-layout-state-CCw2XVj_.js +0 -1
  742. package/dist/client/assets/use-cms-publish-actions-C44NFuCw.js +0 -10
  743. package/dist/client/assets/use-connect-companion-Bna2u5LI.js +0 -1
  744. package/dist/client/assets/use-connection-VK11K4TO.js +0 -1
  745. package/dist/client/assets/use-content-sync-BOiRjtXl.js +0 -1
  746. package/dist/client/assets/use-copy-DCULGAYD.js +0 -1
  747. package/dist/client/assets/use-current-view-LvBpDZKU.js +0 -1
  748. package/dist/client/assets/use-date-fns-locale-CDd4ip5c.js +0 -1
  749. package/dist/client/assets/use-debounced-autosave-L6lTqwPP.js +0 -1
  750. package/dist/client/assets/use-debounced-value-BlSQwJ-U.js +0 -1
  751. package/dist/client/assets/use-deco-credits-DpSSEua8.js +0 -1
  752. package/dist/client/assets/use-decopilot-events-CKMgcY53.js +0 -1
  753. package/dist/client/assets/use-delete-block-L58Ww9Y9.js +0 -1
  754. package/dist/client/assets/use-delete-connection-BFs7BttY.js +0 -1
  755. package/dist/client/assets/use-deployment-admin-DHz3B0a8.js +0 -1
  756. package/dist/client/assets/use-entitlements-BlKSJHSI.js +0 -1
  757. package/dist/client/assets/use-fast-preview-draft-url-L3qoVTTO.js +0 -1
  758. package/dist/client/assets/use-file-configs-C4Dk4hm8.js +0 -1
  759. package/dist/client/assets/use-id-selection-D4SX7fER.js +0 -1
  760. package/dist/client/assets/use-in-settings-CYqnux2M.js +0 -1
  761. package/dist/client/assets/use-inbox-feed-CCFFwUCc.js +0 -1
  762. package/dist/client/assets/use-infinite-scroll-DWo-mrOA.js +0 -1
  763. package/dist/client/assets/use-join-requests-NDAAVDgf.js +0 -1
  764. package/dist/client/assets/use-main-panel-tabs-wZ8h6Edv.js +0 -1
  765. package/dist/client/assets/use-mcp-auth-status-B_Et6vZ3.js +0 -1
  766. package/dist/client/assets/use-mcp-client-D5RDteAI.js +0 -10
  767. package/dist/client/assets/use-mcp-prompts-CCRkMvgY.js +0 -1
  768. package/dist/client/assets/use-mcp-tools-B96gliKn.js +0 -1
  769. package/dist/client/assets/use-mobile-DoMXTDgT.js +0 -1
  770. package/dist/client/assets/use-move-blocks-DA-bpY8C.js +0 -1
  771. package/dist/client/assets/use-navigate-to-agent-Cqha0CMq.js +0 -1
  772. package/dist/client/assets/use-never-published-CycSPpKn.js +0 -1
  773. package/dist/client/assets/use-org-fs-BJdBDT27.js +0 -1
  774. package/dist/client/assets/use-org-notice-BNy_nTNB.js +0 -1
  775. package/dist/client/assets/use-org-repo-syncs-Tm3JL8YM.js +0 -1
  776. package/dist/client/assets/use-org-sso-CClbTjm_.js +0 -1
  777. package/dist/client/assets/use-organization-settings-Dac1YozR.js +0 -1
  778. package/dist/client/assets/use-panel-navigate-CwVf-Jjy.js +0 -1
  779. package/dist/client/assets/use-project-native-view-presence-MvjOJKEW.js +0 -1
  780. package/dist/client/assets/use-project-scope-h-e-yu96.js +0 -1
  781. package/dist/client/assets/use-recent-apps-BX7LsNkB.js +0 -1
  782. package/dist/client/assets/use-reports-diagnostic-D5o6q25D.js +0 -1
  783. package/dist/client/assets/use-sandbox-events-vmaauW4s.js +0 -2
  784. package/dist/client/assets/use-secrets-DIzsE_oW.js +0 -1
  785. package/dist/client/assets/use-section-preview-base-BULKu3_g.js +0 -1
  786. package/dist/client/assets/use-sidebar-collapsed-cUrAd04a.js +0 -1
  787. package/dist/client/assets/use-tags-Cvkuh6ba.js +0 -1
  788. package/dist/client/assets/use-task-board-analytics-CZiGHIVd.js +0 -1
  789. package/dist/client/assets/use-task-board-item-prs-QJCbtLAj.js +0 -1
  790. package/dist/client/assets/use-task-board-items-DnD1pDUb.js +0 -1
  791. package/dist/client/assets/use-task-board-prompts-8YQzNj2R.js +0 -1
  792. package/dist/client/assets/use-task-metadata-BhU-ywA3.js +0 -1
  793. package/dist/client/assets/use-thread-outputs-TOoyjKo6.js +0 -1
  794. package/dist/client/assets/use-view-draft-kind-DICHr72j.js +0 -1
  795. package/dist/client/assets/use-voice-input-uu9NQJX-.js +0 -1
  796. package/dist/client/assets/useInfiniteQuery-SASRo812.js +0 -1
  797. package/dist/client/assets/useQueries-CaAjDvYS.js +0 -1
  798. package/dist/client/assets/useSuspenseInfiniteQuery-CUjGN1Y9.js +0 -1
  799. package/dist/client/assets/users-CT7G8uTC.js +0 -1
  800. package/dist/client/assets/utils-DFMvIUgl.js +0 -4
  801. package/dist/client/assets/variant-calendar-BXVKXMqd.js +0 -1
  802. package/dist/client/assets/variant-matcher-override-Plxnqp46.js +0 -1
  803. package/dist/client/assets/view-header-CdwTlPJe.js +0 -1
  804. package/dist/client/assets/virtual-mcp-B9uCwSKG.js +0 -1
  805. package/dist/client/assets/watch-sse-pool-BBObgt5_.js +0 -1
@@ -1,15 +0,0 @@
1
- import{N as P,r as De,c as k,R as Ie,t as Pe,v as se,w as E,x as Oe,T as H,y as je,z as M,A as L,B as ve,D as Q,G as Z,H as Fe,I as _e,J as Ve,K as Ke,L as q,f as Xe}from"./usage-stats--dyurVY0.js";const qe=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,Ue=P.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",k(this.options.HTMLAttributes,e)]},parseMarkdown:(e,t)=>t.createNode("image",{src:e.href,title:e.title,alt:e.text}),renderMarkdown:e=>{var t,n,o,l,r,s;const c=(t=(n=e.attrs)===null||n===void 0?void 0:n.src)!==null&&t!==void 0?t:"",i=(o=(l=e.attrs)===null||l===void 0?void 0:l.alt)!==null&&o!==void 0?o:"",a=(r=(s=e.attrs)===null||s===void 0?void 0:s.title)!==null&&r!==void 0?r:"";return a?`![${i}](${c} "${a}")`:`![${i}](${c})`},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:e,minWidth:t,minHeight:n,alwaysPreserveAspectRatio:o}=this.options.resize,l=new Set(["src","width","height"]);return({node:r,getPos:s,HTMLAttributes:c,editor:i})=>{const a=document.createElement("img");a.draggable=!1;const d=k(this.options.HTMLAttributes,c);Object.entries(d).forEach(([w,S])=>{if(S!=null)switch(w){case"src":case"width":case"height":break;default:a.setAttribute(w,S)}}),d.src!==null&&(a.src=d.src);let u={...c};const f=w=>{if(typeof w=="string"&&w!==""){a.getAttribute("src")!==w&&(a.src=w);return}a.hasAttribute("src")&&a.removeAttribute("src"),a.src!==""&&(a.src="")};f(c.src);const p=w=>{if(w.type!==r.type)return!1;const S=i.extensionManager.attributes.filter(A=>A.type===w.type.name),y=Pe(w,S);return Object.keys(u).forEach(A=>{!l.has(A)&&!(A in y)&&a.removeAttribute(A)}),Object.entries(y).forEach(([A,R])=>{l.has(A)||(R!=null?a.setAttribute(A,R):a.removeAttribute(A))}),f(y.src),u=y,!0},h=new Ie({element:a,editor:i,node:r,getPos:s,onResize:(w,S)=>{a.style.width=`${w}px`,a.style.height=`${S}px`},onCommit:(w,S)=>{const y=s();y!==void 0&&this.editor.chain().setNodeSelection(y).updateAttributes(this.name,{width:w,height:S}).run()},onUpdate:p,options:{directions:e,min:{width:t,height:n},preserveAspectRatio:o===!0}}),g=h.dom,m=()=>{g.style.visibility="",g.style.pointerEvents=""};return g.style.visibility="hidden",g.style.pointerEvents="none",a.complete&&a.naturalWidth>0?m():(a.onload=m,a.onerror=m),h}},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[De({find:qe,type:this.type,getAttributes:e=>{const[,,t,n,o]=e;return{src:n,alt:t,title:o}}})]}});var un=Ue;let ee,te;if(typeof WeakMap<"u"){let e=new WeakMap;ee=t=>e.get(t),te=(t,n)=>(e.set(t,n),n)}else{const e=[];let n=0;ee=o=>{for(let l=0;l<e.length;l+=2)if(e[l]==o)return e[l+1]},te=(o,l)=>(n==10&&(n=0),e[n++]=o,e[n++]=l)}var C=class{constructor(e,t,n,o){this.width=e,this.height=t,this.map=n,this.problems=o}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const o=t%this.width,l=t/this.width|0;let r=o+1,s=l+1;for(let c=1;r<this.width&&this.map[t+c]==n;c++)r++;for(let c=1;s<this.height&&this.map[t+this.width*c]==n;c++)s++;return{left:o,top:l,right:r,bottom:s}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:o,right:l,top:r,bottom:s}=this.findCell(e);return t=="horiz"?(n<0?o==0:l==this.width)?null:this.map[r*this.width+(n<0?o-1:l)]:(n<0?r==0:s==this.height)?null:this.map[o+this.width*(n<0?r-1:s)]}rectBetween(e,t){const{left:n,right:o,top:l,bottom:r}=this.findCell(e),{left:s,right:c,top:i,bottom:a}=this.findCell(t);return{left:Math.min(n,s),top:Math.min(l,i),right:Math.max(o,c),bottom:Math.max(r,a)}}cellsInRect(e){const t=[],n={};for(let o=e.top;o<e.bottom;o++)for(let l=e.left;l<e.right;l++){const r=o*this.width+l,s=this.map[r];n[s]||(n[s]=!0,!(l==e.left&&l&&this.map[r-1]==s||o==e.top&&o&&this.map[r-this.width]==s)&&t.push(s))}return t}positionAt(e,t,n){for(let o=0,l=0;;o++){const r=l+n.child(o).nodeSize;if(o==e){let s=t+e*this.width;const c=(e+1)*this.width;for(;s<c&&this.map[s]<l;)s++;return s==c?r-1:this.map[s]}l=r}}static get(e){return ee(e)||te(e,Je(e))}};function Je(e){if(e.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+e.type.name);const t=Ge(e),n=e.childCount,o=[];let l=0,r=null;const s=[];for(let a=0,d=t*n;a<d;a++)o[a]=0;for(let a=0,d=0;a<n;a++){const u=e.child(a);d++;for(let h=0;;h++){for(;l<o.length&&o[l]!=0;)l++;if(h==u.childCount)break;const g=u.child(h),{colspan:m,rowspan:w,colwidth:S}=g.attrs;for(let y=0;y<w;y++){if(y+a>=n){(r||(r=[])).push({type:"overlong_rowspan",pos:d,n:w-y});break}const A=l+y*t;for(let R=0;R<m;R++){o[A+R]==0?o[A+R]=d:(r||(r=[])).push({type:"collision",row:a,pos:d,n:m-R});const O=S&&S[R];if(O){const D=(A+R)%t*2,G=s[D];G==null||G!=O&&s[D+1]==1?(s[D]=O,s[D+1]=1):G==O&&s[D+1]++}}}l+=m,d+=g.nodeSize}const f=(a+1)*t;let p=0;for(;l<f;)o[l++]==0&&p++;p&&(r||(r=[])).push({type:"missing",row:a,n:p}),d++}(t===0||n===0)&&(r||(r=[])).push({type:"zero_sized"});const c=new C(t,n,o,r);let i=!1;for(let a=0;!i&&a<s.length;a+=2)s[a]!=null&&s[a+1]<n&&(i=!0);return i&&Ye(c,s,e),c}function Ge(e){let t=-1,n=!1;for(let o=0;o<e.childCount;o++){const l=e.child(o);let r=0;if(n)for(let s=0;s<o;s++){const c=e.child(s);for(let i=0;i<c.childCount;i++){const a=c.child(i);s+a.attrs.rowspan>o&&(r+=a.attrs.colspan)}}for(let s=0;s<l.childCount;s++){const c=l.child(s);r+=c.attrs.colspan,c.attrs.rowspan>1&&(n=!0)}t==-1?t=r:t!=r&&(t=Math.max(t,r))}return t}function Ye(e,t,n){e.problems||(e.problems=[]);const o={};for(let l=0;l<e.map.length;l++){const r=e.map[l];if(o[r])continue;o[r]=!0;const s=n.nodeAt(r);if(!s)throw new RangeError(`No cell with offset ${r} found`);let c=null;const i=s.attrs;for(let a=0;a<i.colspan;a++){const d=t[(l+a)%e.width*2];d!=null&&(!i.colwidth||i.colwidth[a]!=d)&&((c||(c=Qe(i)))[a]=d)}c&&e.problems.unshift({type:"colwidth mismatch",pos:r,colwidth:c})}}function Qe(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function v(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const o=e.nodes[n],l=o.spec.tableRole;l&&(t[l]=o)}}return t}const $=new se("selectingCells");function W(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return e.node(0).resolve(e.before(t+1));return null}function Ze(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if(n==="cell"||n==="header_cell")return e.node(t)}return null}function T(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if(t.node(n).type.spec.tableRole=="row")return!0;return!1}function J(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&t.node.type.spec.tableRole=="cell")return t.$anchor;const n=W(t.$head)||et(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function et(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const o=t.type.spec.tableRole;if(o=="cell"||o=="header_cell")return e.doc.resolve(n-t.nodeSize)}}function ne(e){return e.parent.type.spec.tableRole=="row"&&!!e.nodeAfter}function tt(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function ie(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function Re(e,t,n){const o=e.node(-1),l=C.get(o),r=e.start(-1),s=l.nextCell(e.pos-r,t,n);return s==null?null:e.node(0).resolve(r+s)}function B(e,t,n=1){const o={...e,colspan:e.colspan-n};return o.colwidth&&(o.colwidth=o.colwidth.slice(),o.colwidth.splice(t,n),o.colwidth.some(l=>l>0)||(o.colwidth=null)),o}function xe(e,t,n=1){const o={...e,colspan:e.colspan+n};if(o.colwidth){o.colwidth=o.colwidth.slice();for(let l=0;l<n;l++)o.colwidth.splice(t,0,0)}return o}function nt(e,t,n){const o=v(t.type.schema).header_cell;for(let l=0;l<e.height;l++)if(t.nodeAt(e.map[n+l*e.width]).type!=o)return!1;return!0}var b=class N extends E{constructor(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.rectBetween(t.pos-r,n.pos-r),c=t.node(0),i=l.cellsInRect(s).filter(d=>d!=n.pos-r);i.unshift(n.pos-r);const a=i.map(d=>{const u=o.nodeAt(d);if(!u)throw new RangeError(`No cell with offset ${d} found`);const f=r+d+1;return new je(c.resolve(f),c.resolve(f+u.content.size))});super(a[0].$from,a[0].$to,a),this.$anchorCell=t,this.$headCell=n}map(t,n){const o=t.resolve(n.map(this.$anchorCell.pos)),l=t.resolve(n.map(this.$headCell.pos));if(ne(o)&&ne(l)&&ie(o,l)){const r=this.$anchorCell.node(-1)!=o.node(-1);return r&&this.isRowSelection()?N.rowSelection(o,l):r&&this.isColSelection()?N.colSelection(o,l):new N(o,l)}return H.between(o,l)}content(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o),r={},s=[];for(let i=l.top;i<l.bottom;i++){const a=[];for(let d=i*n.width+l.left,u=l.left;u<l.right;u++,d++){const f=n.map[d];if(r[f])continue;r[f]=!0;const p=n.findCell(f);let h=t.nodeAt(f);if(!h)throw new RangeError(`No cell with offset ${f} found`);const g=l.left-p.left,m=p.right-l.right;if(g>0||m>0){let w=h.attrs;if(g>0&&(w=B(w,0,g)),m>0&&(w=B(w,w.colspan-m,m)),p.left<l.left){if(h=h.type.createAndFill(w),!h)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(w)}`)}else h=h.type.create(w,h.content)}if(p.top<l.top||p.bottom>l.bottom){const w={...h.attrs,rowspan:Math.min(p.bottom,l.bottom)-Math.max(p.top,l.top)};p.top<l.top?h=h.type.createAndFill(w):h=h.type.create(w,h.content)}a.push(h)}s.push(t.child(i).copy(M.from(a)))}const c=this.isColSelection()&&this.isRowSelection()?t:s;return new L(M.from(c),1,1)}replace(t,n=L.empty){const o=t.steps.length,l=this.ranges;for(let s=0;s<l.length;s++){const{$from:c,$to:i}=l[s],a=t.mapping.slice(o);t.replace(a.map(c.pos),a.map(i.pos),s?L.empty:n)}const r=E.findFrom(t.doc.resolve(t.mapping.slice(o).map(this.to)),-1);r&&t.setSelection(r)}replaceWith(t,n){this.replace(t,new L(M.from(n),0,0))}forEachCell(t){const n=this.$anchorCell.node(-1),o=C.get(n),l=this.$anchorCell.start(-1),r=o.cellsInRect(o.rectBetween(this.$anchorCell.pos-l,this.$headCell.pos-l));for(let s=0;s<r.length;s++)t(n.nodeAt(r[s]),l+r[s])}isColSelection(){const t=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(t,n)>0)return!1;const o=t+this.$anchorCell.nodeAfter.attrs.rowspan,l=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(o,l)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.top<=c.top?(s.top>0&&(t=i.resolve(r+l.map[s.left])),c.bottom<l.height&&(n=i.resolve(r+l.map[l.width*(l.height-1)+c.right-1]))):(c.top>0&&(n=i.resolve(r+l.map[c.left])),s.bottom<l.height&&(t=i.resolve(r+l.map[l.width*(l.height-1)+s.right-1]))),new N(t,n)}isRowSelection(){const t=this.$anchorCell.node(-1),n=C.get(t),o=this.$anchorCell.start(-1),l=n.colCount(this.$anchorCell.pos-o),r=n.colCount(this.$headCell.pos-o);if(Math.min(l,r)>0)return!1;const s=l+this.$anchorCell.nodeAfter.attrs.colspan,c=r+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,c)==n.width}eq(t){return t instanceof N&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const o=t.node(-1),l=C.get(o),r=t.start(-1),s=l.findCell(t.pos-r),c=l.findCell(n.pos-r),i=t.node(0);return s.left<=c.left?(s.left>0&&(t=i.resolve(r+l.map[s.top*l.width])),c.right<l.width&&(n=i.resolve(r+l.map[l.width*(c.top+1)-1]))):(c.left>0&&(n=i.resolve(r+l.map[c.top*l.width])),s.right<l.width&&(t=i.resolve(r+l.map[l.width*(s.top+1)-1]))),new N(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new N(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,o=n){return new N(t.resolve(n),t.resolve(o))}getBookmark(){return new ot(this.$anchorCell.pos,this.$headCell.pos)}};b.prototype.visible=!1;E.jsonID("cell",b);var ot=class Te{constructor(t,n){this.anchor=t,this.head=n}map(t){return new Te(t.map(this.anchor),t.map(this.head))}resolve(t){const n=t.resolve(this.anchor),o=t.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&o.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&o.index()<o.parent.childCount&&ie(n,o)?new b(n,o):E.near(o,1)}};function lt(e){if(!(e.selection instanceof b))return null;const t=[];return e.selection.forEachCell((n,o)=>{t.push(Z.node(o,o+n.nodeSize,{class:"selectedCell"}))}),Q.create(e.doc,t)}function rt({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,o=t.pos,l=e.depth;for(;l>=0&&!(e.after(l+1)<e.end(l));l--,n++);for(let r=t.depth;r>=0&&!(t.before(r+1)>t.start(r));r--,o--);return n==o&&/row|table/.test(e.node(l).type.spec.tableRole)}function st({$from:e,$to:t}){let n,o;for(let l=e.depth;l>0;l--){const r=e.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){n=r;break}}for(let l=t.depth;l>0;l--){const r=t.node(l);if(r.type.spec.tableRole==="cell"||r.type.spec.tableRole==="header_cell"){o=r;break}}return n!==o&&t.parentOffset===0}function it(e,t,n){const o=(t||e).selection,l=(t||e).doc;let r,s;if(o instanceof Fe&&(s=o.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")r=b.create(l,o.from);else if(s=="row"){const c=l.resolve(o.from+1);r=b.rowSelection(c,c)}else if(!n){const c=C.get(o.node),i=o.from+1,a=i+c.map[c.width*c.height-1];r=b.create(l,i+1,a)}}else o instanceof H&&rt(o)?r=H.create(l,o.from):o instanceof H&&st(o)&&(r=H.create(l,o.$from.start(),o.$from.end()));return r&&(t||(t=e.tr)).setSelection(r),t}const ct=new se("fix-tables");function Me(e,t,n,o){const l=e.childCount,r=t.childCount;e:for(let s=0,c=0;s<r;s++){const i=t.child(s);for(let a=c,d=Math.min(l,s+3);a<d;a++)if(e.child(a)==i){c=a+1,n+=i.nodeSize;continue e}o(i,n),c<l&&e.child(c).sameMarkup(i)?Me(e.child(c),i,n+1,o):i.nodesBetween(0,i.content.size,o,n+1),n+=i.nodeSize}}function ze(e,t){let n;const o=(l,r)=>{l.type.spec.tableRole=="table"&&(n=at(e,l,r,n))};return t?t.doc!=e.doc&&Me(t.doc,e.doc,0,o):e.doc.descendants(o),n}function at(e,t,n,o){const l=C.get(t);if(!l.problems)return o;o||(o=e.tr);const r=[];for(let i=0;i<l.height;i++)r.push(0);for(let i=0;i<l.problems.length;i++){const a=l.problems[i];if(a.type=="collision"){const d=t.nodeAt(a.pos);if(!d)continue;const u=d.attrs;for(let f=0;f<u.rowspan;f++)r[a.row+f]+=a.n;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,B(u,u.colspan-a.n,a.n))}else if(a.type=="missing")r[a.row]+=a.n;else if(a.type=="overlong_rowspan"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,rowspan:d.attrs.rowspan-a.n})}else if(a.type=="colwidth mismatch"){const d=t.nodeAt(a.pos);if(!d)continue;o.setNodeMarkup(o.mapping.map(n+1+a.pos),null,{...d.attrs,colwidth:a.colwidth})}else if(a.type=="zero_sized"){const d=o.mapping.map(n);o.delete(d,d+t.nodeSize)}}let s,c;for(let i=0;i<r.length;i++)r[i]&&(s==null&&(s=i),c=i);for(let i=0,a=n+1;i<l.height;i++){const d=t.child(i),u=a+d.nodeSize,f=r[i];if(f>0){let p="cell";d.firstChild&&(p=d.firstChild.type.spec.tableRole);const h=[];for(let m=0;m<f;m++){const w=v(e.schema)[p].createAndFill();w&&h.push(w)}const g=(i==0||s==i-1)&&c==i?a+1:u-1;o.insert(o.mapping.map(g),h)}a=u}return o.setMeta(ct,{fixTables:!0})}function z(e){const t=e.selection,n=J(e),o=n.node(-1),l=n.start(-1),r=C.get(o);return{...t instanceof b?r.rectBetween(t.$anchorCell.pos-l,t.$headCell.pos-l):r.findCell(n.pos-l),tableStart:l,map:r,table:o}}function Ne(e,{map:t,tableStart:n,table:o},l){let r=l>0?-1:0;nt(t,o,l+r)&&(r=l==0||l==t.width?null:0);for(let s=0;s<t.height;s++){const c=s*t.width+l;if(l>0&&l<t.width&&t.map[c-1]==t.map[c]){const i=t.map[c],a=o.nodeAt(i);e.setNodeMarkup(e.mapping.map(n+i),null,xe(a.attrs,l-t.colCount(i))),s+=a.attrs.rowspan-1}else{const i=r==null?v(o.type.schema).cell:o.nodeAt(t.map[c+r]).type,a=t.positionAt(s,l,o);e.insert(e.mapping.map(n+a),i.createAndFill())}}return e}function dt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.left))}return!0}function ut(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ne(e.tr,n,n.right))}return!0}function ft(e,{map:t,table:n,tableStart:o},l){const r=e.mapping.maps.length;for(let s=0;s<t.height;){const c=s*t.width+l,i=t.map[c],a=n.nodeAt(i),d=a.attrs;if(l>0&&t.map[c-1]==i||l<t.width-1&&t.map[c+1]==i)e.setNodeMarkup(e.mapping.slice(r).map(o+i),null,B(d,l-t.colCount(i)));else{const u=e.mapping.slice(r).map(o+i);e.delete(u,u+a.nodeSize)}s+=d.rowspan}}function ht(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let l=n.right-1;ft(o,n,l),l!=n.left;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(r)}t(o)}return!0}function pt(e,t,n){var o;const l=v(t.type.schema).header_cell;for(let r=0;r<e.width;r++)if(((o=t.nodeAt(e.map[r+n*e.width]))===null||o===void 0?void 0:o.type)!=l)return!1;return!0}function Ee(e,{map:t,tableStart:n,table:o},l){let r=n;for(let a=0;a<l;a++)r+=o.child(a).nodeSize;const s=[];let c=l>0?-1:0;pt(t,o,l+c)&&(c=l==0||l==t.height?null:0);for(let a=0,d=t.width*l;a<t.width;a++,d++)if(l>0&&l<t.height&&t.map[d]==t.map[d-t.width]){const u=t.map[d],f=o.nodeAt(u).attrs;e.setNodeMarkup(n+u,null,{...f,rowspan:f.rowspan+1}),a+=f.colspan-1}else{var i;const u=c==null?v(o.type.schema).cell:(i=o.nodeAt(t.map[d+c*t.width]))===null||i===void 0?void 0:i.type,f=u?.createAndFill();f&&s.push(f)}return e.insert(r,v(o.type.schema).row.create(null,s)),e}function mt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.top))}return!0}function gt(e,t){if(!T(e))return!1;if(t){const n=z(e);t(Ee(e.tr,n,n.bottom))}return!0}function wt(e,{map:t,table:n,tableStart:o},l){let r=0;for(let a=0;a<l;a++)r+=n.child(a).nodeSize;const s=r+n.child(l).nodeSize,c=e.mapping.maps.length;e.delete(r+o,s+o);const i=new Set;for(let a=0,d=l*t.width;a<t.width;a++,d++){const u=t.map[d];if(!i.has(u)){if(i.add(u),l>0&&u==t.map[d-t.width]){const f=n.nodeAt(u).attrs;e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f,rowspan:f.rowspan-1}),a+=f.colspan-1}else if(l<t.height&&u==t.map[d+t.width]){const f=n.nodeAt(u),p=f.attrs,h=f.type.create({...p,rowspan:f.attrs.rowspan-1},f.content),g=t.positionAt(l+1,a,n);e.insert(e.mapping.slice(c).map(o+g),h),a+=p.colspan-1}}}}function bt(e,t){if(!T(e))return!1;if(t){const n=z(e),o=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let l=n.bottom-1;wt(o,n,l),l!=n.top;l--){const r=n.tableStart?o.doc.nodeAt(n.tableStart-1):o.doc;if(!r)throw new RangeError("No table found");n.table=r,n.map=C.get(n.table)}t(o)}return!0}function ce(e){const t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function Ct({width:e,height:t,map:n},o){let l=o.top*e+o.left,r=l,s=(o.bottom-1)*e+o.left,c=l+(o.right-o.left-1);for(let i=o.top;i<o.bottom;i++){if(o.left>0&&n[r]==n[r-1]||o.right<e&&n[c]==n[c+1])return!0;r+=e,c+=e}for(let i=o.left;i<o.right;i++){if(o.top>0&&n[l]==n[l-e]||o.bottom<t&&n[s]==n[s+e])return!0;l++,s++}return!1}function ae(e,t){const n=e.selection;if(!(n instanceof b)||n.$anchorCell.pos==n.$headCell.pos)return!1;const o=z(e),{map:l}=o;if(Ct(l,o))return!1;if(t){const r=e.tr,s={};let c=M.empty,i,a;for(let d=o.top;d<o.bottom;d++)for(let u=o.left;u<o.right;u++){const f=l.map[d*l.width+u],p=o.table.nodeAt(f);if(!(s[f]||!p))if(s[f]=!0,i==null)i=f,a=p;else{ce(p)||(c=c.append(p.content));const h=r.mapping.map(f+o.tableStart);r.delete(h,h+p.nodeSize)}}if(i==null||a==null)return!0;if(r.setNodeMarkup(i+o.tableStart,null,{...xe(a.attrs,a.attrs.colspan,o.right-o.left-a.attrs.colspan),rowspan:o.bottom-o.top}),c.size>0){const d=i+1+a.content.size,u=ce(a)?i+1:d;r.replaceWith(u+o.tableStart,d+o.tableStart,c)}r.setSelection(new b(r.doc.resolve(i+o.tableStart))),t(r)}return!0}function de(e,t){const n=v(e.schema);return yt(({node:o})=>n[o.type.spec.tableRole])(e,t)}function yt(e){return(t,n)=>{const o=t.selection;let l,r;if(o instanceof b){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;l=o.$anchorCell.nodeAfter,r=o.$anchorCell.pos}else{var s;if(l=Ze(o.$from),!l)return!1;r=(s=W(o.$from))===null||s===void 0?void 0:s.pos}if(l==null||r==null||l.attrs.colspan==1&&l.attrs.rowspan==1)return!1;if(n){let c=l.attrs;const i=[],a=c.colwidth;c.rowspan>1&&(c={...c,rowspan:1}),c.colspan>1&&(c={...c,colspan:1});const d=z(t),u=t.tr;for(let p=0;p<d.right-d.left;p++)i.push(a?{...c,colwidth:a&&a[p]?[a[p]]:null}:c);let f;for(let p=d.top;p<d.bottom;p++){let h=d.map.positionAt(p,d.left,d.table);p==d.top&&(h+=l.nodeSize);for(let g=d.left,m=0;g<d.right;g++,m++)g==d.left&&p==d.top||u.insert(f=u.mapping.map(h+d.tableStart,1),e({node:l,row:p,col:g}).createAndFill(i[m]))}u.setNodeMarkup(r,e({node:l,row:d.top,col:d.left}),i[0]),o instanceof b&&u.setSelection(new b(u.doc.resolve(o.$anchorCell.pos),f?u.doc.resolve(f):void 0)),n(u)}return!0}}function At(e,t){return function(n,o){if(!T(n))return!1;const l=J(n);if(l.nodeAfter.attrs[e]===t)return!1;if(o){const r=n.tr;n.selection instanceof b?n.selection.forEachCell((s,c)=>{s.attrs[e]!==t&&r.setNodeMarkup(c,null,{...s.attrs,[e]:t})}):r.setNodeMarkup(l.pos,null,{...l.nodeAfter.attrs,[e]:t}),o(r)}return!0}}function St(e){return function(t,n){if(!T(t))return!1;if(n){const o=v(t.schema),l=z(t),r=t.tr,s=l.map.cellsInRect(e=="column"?{left:l.left,top:0,right:l.right,bottom:l.map.height}:e=="row"?{left:0,top:l.top,right:l.map.width,bottom:l.bottom}:l),c=s.map(i=>l.table.nodeAt(i));for(let i=0;i<s.length;i++)c[i].type==o.header_cell&&r.setNodeMarkup(l.tableStart+s[i],o.cell,c[i].attrs);if(r.steps.length===0)for(let i=0;i<s.length;i++)r.setNodeMarkup(l.tableStart+s[i],o.header_cell,c[i].attrs);n(r)}return!0}}function ue(e,t,n){const o=t.map.cellsInRect({left:0,top:0,right:e=="row"?t.map.width:1,bottom:e=="column"?t.map.height:1});for(let l=0;l<o.length;l++){const r=t.table.nodeAt(o[l]);if(r&&r.type!==n.header_cell)return!1}return!0}function I(e,t){return t=t||{useDeprecatedLogic:!1},t.useDeprecatedLogic?St(e):function(n,o){if(!T(n))return!1;if(o){const l=v(n.schema),r=z(n),s=n.tr,c=ue("row",r,l),i=ue("column",r,l),a=(e==="column"?c:e==="row"&&i)?1:0,d=e=="column"?{left:0,top:a,right:1,bottom:r.map.height}:e=="row"?{left:a,top:0,right:r.map.width,bottom:1}:r,u=e=="column"?i?l.cell:l.header_cell:e=="row"?c?l.cell:l.header_cell:l.cell;r.map.cellsInRect(d).forEach(f=>{const p=f+r.tableStart,h=s.doc.nodeAt(p);h&&s.setNodeMarkup(p,u,h.attrs)}),o(s)}return!0}}I("row",{useDeprecatedLogic:!0});I("column",{useDeprecatedLogic:!0});const vt=I("cell",{useDeprecatedLogic:!0});function Rt(e,t){if(t<0){const n=e.nodeBefore;if(n)return e.pos-n.nodeSize;for(let o=e.index(-1)-1,l=e.before();o>=0;o--){const r=e.node(-1).child(o),s=r.lastChild;if(s)return l-1-s.nodeSize;l-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const n=e.node(-1);for(let o=e.indexAfter(-1),l=e.after();o<n.childCount;o++){const r=n.child(o);if(r.childCount)return l+1;l+=r.nodeSize}}return null}function fe(e){return function(t,n){if(!T(t))return!1;const o=Rt(J(t),e);if(o==null)return!1;if(n){const l=t.doc.resolve(o);n(t.tr.setSelection(H.between(l,tt(l))).scrollIntoView())}return!0}}function xt(e,t){const n=e.selection.$anchor;for(let o=n.depth;o>0;o--)if(n.node(o).type.spec.tableRole=="table")return t&&t(e.tr.delete(n.before(o),n.after(o)).scrollIntoView()),!0;return!1}function j(e,t){const n=e.selection;if(!(n instanceof b))return!1;if(t){const o=e.tr,l=v(e.schema).cell.createAndFill().content;n.forEachCell((r,s)=>{r.content.eq(l)||o.replace(o.mapping.map(s+1),o.mapping.map(s+r.nodeSize-1),new L(l,0,0))}),o.docChanged&&t(o)}return!0}function Tt(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:o}=e;for(;t.childCount==1&&(n>0&&o>0||t.child(0).type.spec.tableRole=="table");)n--,o--,t=t.child(0).content;const l=t.child(0),r=l.type.spec.tableRole,s=l.type.schema,c=[];if(r=="row")for(let i=0;i<t.childCount;i++){let a=t.child(i).content;const d=i?0:Math.max(0,n-1),u=i<t.childCount-1?0:Math.max(0,o-1);(d||u)&&(a=oe(v(s).row,new L(a,d,u)).content),c.push(a)}else if(r=="cell"||r=="header_cell")c.push(n||o?oe(v(s).row,new L(t,n,o)).content:t);else return null;return Mt(s,c)}function Mt(e,t){const n=[];for(let l=0;l<t.length;l++){const r=t[l];for(let s=r.childCount-1;s>=0;s--){const{rowspan:c,colspan:i}=r.child(s).attrs;for(let a=l;a<l+c;a++)n[a]=(n[a]||0)+i}}let o=0;for(let l=0;l<n.length;l++)o=Math.max(o,n[l]);for(let l=0;l<n.length;l++)if(l>=t.length&&t.push(M.empty),n[l]<o){const r=v(e).cell.createAndFill(),s=[];for(let c=n[l];c<o;c++)s.push(r);t[l]=t[l].append(M.from(s))}return{height:t.length,width:o,rows:t}}function oe(e,t){const n=e.createAndFill();return new _e(n).replace(0,n.content.size,t).doc}function zt({width:e,height:t,rows:n},o,l){if(e!=o){const r=[],s=[];for(let c=0;c<n.length;c++){const i=n[c],a=[];for(let d=r[c]||0,u=0;d<o;u++){let f=i.child(u%i.childCount);d+f.attrs.colspan>o&&(f=f.type.createChecked(B(f.attrs,f.attrs.colspan,d+f.attrs.colspan-o),f.content)),a.push(f),d+=f.attrs.colspan;for(let p=1;p<f.attrs.rowspan;p++)r[c+p]=(r[c+p]||0)+f.attrs.colspan}s.push(M.from(a))}n=s,e=o}if(t!=l){const r=[];for(let s=0,c=0;s<l;s++,c++){const i=[],a=n[c%t];for(let d=0;d<a.childCount;d++){let u=a.child(d);s+u.attrs.rowspan>l&&(u=u.type.create({...u.attrs,rowspan:Math.max(1,l-u.attrs.rowspan)},u.content)),i.push(u)}r.push(M.from(i))}n=r,t=l}return{width:e,height:t,rows:n}}function Nt(e,t,n,o,l,r,s){const c=e.doc.type.schema,i=v(c);let a,d;if(l>t.width)for(let u=0,f=0;u<t.height;u++){const p=n.child(u);f+=p.nodeSize;const h=[];let g;p.lastChild==null||p.lastChild.type==i.cell?g=a||(a=i.cell.createAndFill()):g=d||(d=i.header_cell.createAndFill());for(let m=t.width;m<l;m++)h.push(g);e.insert(e.mapping.slice(s).map(f-1+o),h)}if(r>t.height){const u=[];for(let h=0,g=(t.height-1)*t.width;h<Math.max(t.width,l);h++){const m=h>=t.width?!1:n.nodeAt(t.map[g+h]).type==i.header_cell;u.push(m?d||(d=i.header_cell.createAndFill()):a||(a=i.cell.createAndFill()))}const f=i.row.create(null,M.from(u)),p=[];for(let h=t.height;h<r;h++)p.push(f);e.insert(e.mapping.slice(s).map(o+n.nodeSize-2),p)}return!!(a||d)}function he(e,t,n,o,l,r,s,c){if(s==0||s==t.height)return!1;let i=!1;for(let a=l;a<r;a++){const d=s*t.width+a,u=t.map[d];if(t.map[d-t.width]==u){i=!0;const f=n.nodeAt(u),{top:p,left:h}=t.findCell(u);e.setNodeMarkup(e.mapping.slice(c).map(u+o),null,{...f.attrs,rowspan:s-p}),e.insert(e.mapping.slice(c).map(t.positionAt(s,h,n)),f.type.createAndFill({...f.attrs,rowspan:p+f.attrs.rowspan-s})),a+=f.attrs.colspan-1}}return i}function pe(e,t,n,o,l,r,s,c){if(s==0||s==t.width)return!1;let i=!1;for(let a=l;a<r;a++){const d=a*t.width+s,u=t.map[d];if(t.map[d-1]==u){i=!0;const f=n.nodeAt(u),p=t.colCount(u),h=e.mapping.slice(c).map(u+o);e.setNodeMarkup(h,null,B(f.attrs,s-p,f.attrs.colspan-(s-p))),e.insert(h+f.nodeSize,f.type.createAndFill(B(f.attrs,0,s-p))),a+=f.attrs.rowspan-1}}return i}function me(e,t,n,o,l){let r=n?e.doc.nodeAt(n-1):e.doc;if(!r)throw new Error("No table found");let s=C.get(r);const{top:c,left:i}=o,a=i+l.width,d=c+l.height,u=e.tr;let f=0;function p(){if(r=n?u.doc.nodeAt(n-1):u.doc,!r)throw new Error("No table found");s=C.get(r),f=u.mapping.maps.length}Nt(u,s,r,n,a,d,f)&&p(),he(u,s,r,n,i,a,c,f)&&p(),he(u,s,r,n,i,a,d,f)&&p(),pe(u,s,r,n,c,d,i,f)&&p(),pe(u,s,r,n,c,d,a,f)&&p();for(let h=c;h<d;h++){const g=s.positionAt(h,i,r),m=s.positionAt(h,a,r);u.replace(u.mapping.slice(f).map(g+n),u.mapping.slice(f).map(m+n),new L(l.rows[h-c],0,0))}p(),u.setSelection(new b(u.doc.resolve(n+s.positionAt(c,i,r)),u.doc.resolve(n+s.positionAt(d-1,a-1,r)))),t(u)}const Et=Oe({ArrowLeft:F("horiz",-1),ArrowRight:F("horiz",1),ArrowUp:F("vert",-1),ArrowDown:F("vert",1),"Shift-ArrowLeft":_("horiz",-1),"Shift-ArrowRight":_("horiz",1),"Shift-ArrowUp":_("vert",-1),"Shift-ArrowDown":_("vert",1),Backspace:j,"Mod-Backspace":j,Delete:j,"Mod-Delete":j});function K(e,t,n){return n.eq(e.selection)?!1:(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function F(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;if(r instanceof b)return K(n,o,E.near(r.$headCell,t));if(e!="horiz"&&!r.empty)return!1;const s=He(l,e,t);if(s==null)return!1;if(e=="horiz")return K(n,o,E.near(n.doc.resolve(r.head+t),t));{const c=n.doc.resolve(s),i=Re(c,e,t);let a;return i?a=E.near(i,1):t<0?a=E.near(n.doc.resolve(c.before(-1)),-1):a=E.near(n.doc.resolve(c.after(-1)),1),K(n,o,a)}}}function _(e,t){return(n,o,l)=>{if(!l)return!1;const r=n.selection;let s;if(r instanceof b)s=r;else{const i=He(l,e,t);if(i==null)return!1;s=new b(n.doc.resolve(i))}const c=Re(s.$headCell,e,t);return c?K(n,o,new b(s.$anchorCell,c)):!1}}function Ht(e,t){const n=e.state.doc,o=W(n.resolve(t));return o?(e.dispatch(e.state.tr.setSelection(new b(o))),!0):!1}function $t(e,t,n){if(!T(e.state))return!1;let o=Tt(n);const l=e.state.selection;if(l instanceof b){o||(o={width:1,height:1,rows:[M.from(oe(v(e.state.schema).cell,n))]});const r=l.$anchorCell.node(-1),s=l.$anchorCell.start(-1),c=C.get(r).rectBetween(l.$anchorCell.pos-s,l.$headCell.pos-s);return o=zt(o,c.right-c.left,c.bottom-c.top),me(e.state,e.dispatch,s,c,o),!0}else if(o){const r=J(e.state),s=r.start(-1);return me(e.state,e.dispatch,s,C.get(r.node(-1)).findCell(r.pos-s),o),!0}else return!1}function Lt(e,t){var n;if(t.button!=0||t.ctrlKey||t.metaKey)return;const o=ge(e,t.target);let l;if(t.shiftKey&&e.state.selection instanceof b)r(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&o&&(l=W(e.state.selection.$anchor))!=null&&((n=Y(e,t))===null||n===void 0?void 0:n.pos)!=l.pos)r(l,t),t.preventDefault();else if(!o)return;function r(i,a){let d=Y(e,a);const u=$.getState(e.state)==null;if(!d||!ie(i,d))if(u)d=i;else return;const f=new b(i,d);if(u||!e.state.selection.eq(f)){const p=e.state.tr.setSelection(f);u&&p.setMeta($,i.pos),e.dispatch(p)}}function s(){e.root.removeEventListener("mouseup",s),e.root.removeEventListener("dragstart",s),e.root.removeEventListener("mousemove",c),$.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta($,-1))}function c(i){const a=i,d=$.getState(e.state);let u;if(d!=null)u=e.state.doc.resolve(d);else if(ge(e,a.target)!=o&&(u=Y(e,t),!u))return s();u&&r(u,a)}e.root.addEventListener("mouseup",s),e.root.addEventListener("dragstart",s),e.root.addEventListener("mousemove",c)}function He(e,t,n){if(!(e.state.selection instanceof H))return null;const{$head:o}=e.state.selection;for(let l=o.depth-1;l>=0;l--){const r=o.node(l);if((n<0?o.index(l):o.indexAfter(l))!=(n<0?0:r.childCount))return null;if(r.type.spec.tableRole=="cell"||r.type.spec.tableRole=="header_cell"){const s=o.before(l),c=t=="vert"?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(c)?s:null}}return null}function ge(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName=="TD"||t.nodeName=="TH")return t;return null}function Y(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:o,pos:l}=n;return o>=0&&W(e.state.doc.resolve(o))||W(e.state.doc.resolve(l))}var kt=class{constructor(t,n){this.node=t,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),le(t,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,le(t,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function le(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a){for(let u=0,f=0;u<a.childCount;u++){const{colspan:p,colwidth:h}=a.child(u).attrs;for(let g=0;g<p;g++,f++){const m=l==f?r:h&&h[g],w=m?m+"px":"";if(s+=m||o,m||(c=!1),i)i.style.width!=w&&(i.style.width=w),i=i.nextSibling;else{const S=document.createElement("col");S.style.width=w,t.appendChild(S)}}}for(;i;){var d;const u=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=u}c?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const x=new se("tableColumnResizing");function Wt({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:o=kt,lastColumnResizable:l=!0}={}){const r=new ve({key:x,state:{init(s,c){var i;const a=(i=r.spec)===null||i===void 0||(i=i.props)===null||i===void 0?void 0:i.nodeViews,d=v(c.schema).table.name;return o&&a&&(a[d]=(u,f)=>new o(u,n,f)),new Bt(-1,!1)},apply(s,c){return c.apply(s)}},props:{attributes:s=>{const c=x.getState(s);return c&&c.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,c)=>{Dt(s,c,e,l)},mouseleave:s=>{It(s)},mousedown:(s,c)=>{Pt(s,c,t,n)}},decorations:s=>{const c=x.getState(s);if(c&&c.activeHandle>-1)return Vt(s,c.activeHandle)},nodeViews:{}}});return r}var Bt=class X{constructor(t,n){this.activeHandle=t,this.dragging=n}apply(t){const n=this,o=t.getMeta(x);if(o&&o.setHandle!=null)return new X(o.setHandle,!1);if(o&&o.setDragging!==void 0)return new X(n.activeHandle,o.setDragging);if(n.activeHandle>-1&&t.docChanged){let l=t.mapping.map(n.activeHandle,-1);return ne(t.doc.resolve(l))||(l=-1),new X(l,n.dragging)}return n}};function Dt(e,t,n,o){if(!e.editable)return;const l=x.getState(e.state);if(l&&!l.dragging){const r=jt(t.target);let s=-1;if(r){const{left:c,right:i}=r.getBoundingClientRect();t.clientX-c<=n?s=we(e,t,"left",n):i-t.clientX<=n&&(s=we(e,t,"right",n))}if(s!=l.activeHandle){if(!o&&s!==-1){const c=e.state.doc.resolve(s),i=c.node(-1),a=C.get(i),d=c.start(-1);if(a.colCount(c.pos-d)+c.nodeAfter.attrs.colspan-1==a.width-1)return}$e(e,s)}}}function It(e){if(!e.editable)return;const t=x.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&$e(e,-1)}function Pt(e,t,n,o){var l;if(!e.editable)return!1;const r=(l=e.dom.ownerDocument.defaultView)!==null&&l!==void 0?l:window,s=x.getState(e.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const c=e.state.doc.nodeAt(s.activeHandle),i=Ot(e,s.activeHandle,c.attrs);e.dispatch(e.state.tr.setMeta(x,{setDragging:{startX:t.clientX,startWidth:i}}));function a(u){r.removeEventListener("mouseup",a),r.removeEventListener("mousemove",d);const f=x.getState(e.state);f?.dragging&&(Ft(e,f.activeHandle,be(f.dragging,u,n)),e.dispatch(e.state.tr.setMeta(x,{setDragging:null})))}function d(u){if(!u.which)return a(u);const f=x.getState(e.state);if(f&&f.dragging){const p=be(f.dragging,u,n);Ce(e,f.activeHandle,p,o)}}return Ce(e,s.activeHandle,i,o),r.addEventListener("mouseup",a),r.addEventListener("mousemove",d),t.preventDefault(),!0}function Ot(e,t,{colspan:n,colwidth:o}){const l=o&&o[o.length-1];if(l)return l;const r=e.domAtPos(t);let s=r.node.childNodes[r.offset].offsetWidth,c=n;if(o)for(let i=0;i<n;i++)o[i]&&(s-=o[i],c--);return s/c}function jt(e){for(;e&&e.nodeName!="TD"&&e.nodeName!="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function we(e,t,n,o){const l=n=="right"?-o:o,r=e.posAtCoords({left:t.clientX+l,top:t.clientY});if(!r)return-1;const{pos:s}=r,c=W(e.state.doc.resolve(s));if(!c)return-1;if(n=="right")return c.pos;const i=C.get(c.node(-1)),a=c.start(-1),d=i.map.indexOf(c.pos-a);return d%i.width==0?-1:a+i.map[d-1]}function be(e,t,n){const o=t.clientX-e.startX;return Math.max(n,e.startWidth+o)}function $e(e,t){e.dispatch(e.state.tr.setMeta(x,{setHandle:t}))}function Ft(e,t,n){const o=e.state.doc.resolve(t),l=o.node(-1),r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1,i=e.state.tr;for(let a=0;a<r.height;a++){const d=a*r.width+c;if(a&&r.map[d]==r.map[d-r.width])continue;const u=r.map[d],f=l.nodeAt(u).attrs,p=f.colspan==1?0:c-r.colCount(u);if(f.colwidth&&f.colwidth[p]==n)continue;const h=f.colwidth?f.colwidth.slice():_t(f.colspan);h[p]=n,i.setNodeMarkup(s+u,null,{...f,colwidth:h})}i.docChanged&&e.dispatch(i)}function Ce(e,t,n,o){const l=e.state.doc.resolve(t),r=l.node(-1),s=l.start(-1),c=C.get(r).colCount(l.pos-s)+l.nodeAfter.attrs.colspan-1;let i=e.domAtPos(l.start(-1)).node;for(;i&&i.nodeName!="TABLE";)i=i.parentNode;i&&le(r,i.firstChild,i,o,c,n)}function _t(e){return Array(e).fill(0)}function Vt(e,t){const n=[],o=e.doc.resolve(t),l=o.node(-1);if(!l)return Q.empty;const r=C.get(l),s=o.start(-1),c=r.colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;for(let a=0;a<r.height;a++){const d=c+a*r.width;if((c==r.width-1||r.map[d]!=r.map[d+1])&&(a==0||r.map[d]!=r.map[d-r.width])){var i;const u=r.map[d],f=s+u+l.nodeAt(u).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((i=x.getState(e))===null||i===void 0)&&i.dragging&&n.push(Z.node(s+u,s+u+l.nodeAt(u).nodeSize,{class:"column-resize-dragging"})),n.push(Z.widget(f,p))}}return Q.create(e.doc,n)}function Kt({allowTableNodeSelection:e=!1}={}){return new ve({key:$,state:{init(){return null},apply(t,n){const o=t.getMeta($);if(o!=null)return o==-1?null:o;if(n==null||!t.docChanged)return n;const{deleted:l,pos:r}=t.mapping.mapResult(n);return l?null:r}},props:{decorations:lt,handleDOMEvents:{mousedown:Lt},createSelectionBetween(t){return $.getState(t.state)!=null?t.state.selection:null},handleTripleClick:Ht,handleKeyDown:Et,handlePaste:$t},appendTransaction(t,n,o){return it(o,ze(o,n),e)}})}function U(e){return e==="left"||e==="right"||e==="center"?e:null}function Xt(e){const t=(e.style.textAlign||"").trim().toLowerCase(),n=(e.getAttribute("align")||"").trim().toLowerCase();return U(t||n)}function qt(e){return U(e?.align)}function Le(){return{default:null,parseHTML:e=>Xt(e),renderHTML:e=>e.align?{style:`text-align: ${e.align}`}:{}}}function Ut(e){var t;const n=e.parentElement,o=e.closest("table");if(!n||!o)return null;const l=Array.from(n.children).indexOf(e),r=(t=o.querySelectorAll("colgroup > col")[l])===null||t===void 0?void 0:t.getAttribute("width");return r?[parseInt(r,10)]:null}function ke(e){const t=e.getAttribute("colwidth");return t?t.split(",").map(n=>parseInt(n,10)):Ut(e)}const Jt=/[ \t\r\n\f]+/g;function We(e){var t;return e.children.length>0?!1:((t=e.textContent)!==null&&t!==void 0?t:"").replace(Jt,"")===""}function Be(e){const t=e.createAndFill();if(!t)throw new Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}const Gt=P.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"td"}]},renderHTML({HTMLAttributes:e}){return["td",k(this.options.HTMLAttributes,e),0]}}),Yt=P.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:ke},align:Le()}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th",getAttrs:e=>We(e)?{}:!1,getContent:(e,t)=>Be(t.nodes[this.name])},{tag:"th"}]},renderHTML({HTMLAttributes:e}){return["th",k(this.options.HTMLAttributes,e),0]}}),Qt=P.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:e}){return["tr",k(this.options.HTMLAttributes,e),0]}});function re(e,t){return t?["width",`${Math.max(t,e)}px`]:["min-width",`${e}px`]}function ye(e,t,n,o,l,r){let s=0,c=!0,i=t.firstChild;const a=e.firstChild;if(a!==null)for(let f=0,p=0;f<a.childCount;f+=1){const{colspan:h,colwidth:g}=a.child(f).attrs;for(let m=0;m<h;m+=1,p+=1){const w=l===p?r:g&&g[m],S=w?`${w}px`:"";if(s+=w||o,w||(c=!1),i){if(i.style.width!==S){const[y,A]=re(o,w);i.style.setProperty(y,A)}i=i.nextSibling}else{const y=document.createElement("col"),[A,R]=re(o,w);y.style.setProperty(A,R),t.appendChild(y)}}}for(;i;){var d;const f=i.nextSibling;(d=i.parentNode)===null||d===void 0||d.removeChild(i),i=f}const u=e.attrs.style&&typeof e.attrs.style=="string"&&/\bwidth\s*:/i.test(e.attrs.style);c&&!u?(n.style.width=`${s}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${s}px`)}var Zt=class{constructor(e,t,n,o={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table"));for(const[l,r]of Object.entries(o))r!=null&&(l==="style"?this.table.style.cssText=String(r):this.table.setAttribute(l,String(r)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),ye(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,ye(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){const t=e.target,n=this.dom.contains(t),o=this.contentDOM.contains(t);return!!(n&&!o&&(e.type==="attributes"||e.type==="childList"||e.type==="characterData"))}};function en(e,t,n,o){let l=0,r=!0;const s=[],c=e.firstChild;if(!c)return{};for(let d=0,u=0;d<c.childCount;d+=1){const{colspan:f,colwidth:p}=c.child(d).attrs;for(let h=0;h<f;h+=1,u+=1){const g=n===u?o:p&&p[h];l+=g||t,g||(r=!1);const[m,w]=re(t,g);s.push(["col",{style:`${m}: ${w}`}])}}const i=r?`${l}px`:"",a=r?"":`${l}px`;return{colgroup:["colgroup",{},...s],tableWidth:i,tableMinWidth:a}}function Ae(e,t){return e.createAndFill()}function tn(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach(n=>{const o=e.nodes[n];o.spec.tableRole&&(t[o.spec.tableRole]=o)}),e.cached.tableNodeTypes=t,t}function nn(e,t,n,o,l){const r=tn(e),s=[],c=[];for(let a=0;a<n;a+=1){const d=Ae(r.cell);if(d&&c.push(d),o){const u=Ae(r.header_cell);u&&s.push(u)}}const i=[];for(let a=0;a<t;a+=1)i.push(r.row.createChecked(null,o&&a===0?s:c));return r.table.createChecked(null,i)}function on(e){return e instanceof b}const V=({editor:e})=>{const{selection:t}=e.state;if(!on(t))return!1;let n=0;const o=q(t.ranges[0].$from,l=>l.type.name==="table");return o?.node.descendants(l=>{if(l.type.name==="table")return!1;["tableCell","tableHeader"].includes(l.type.name)&&(n+=1)}),n!==t.ranges.length?!1:(e.commands.deleteTable(),!0)};function Se(e,t){const n=e.mapping.map(t),o=q(e.selection.$from,s=>s.type.name==="table");if(o?.pos===n)return;const l=e.doc.nodeAt(n);if(!l)return;const r=n+l.nodeSize-1;e.setSelection(H.near(e.doc.resolve(r),-1))}function ln(e){let t="",n=0;for(;n<e.length;){if(e[n]==="\\"&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let o=0;for(;n+o<e.length&&e[n+o]==="`";)o+=1;let l=n+o,r=!1;for(;l<e.length;){if(e[l]!=="`"){l+=1;continue}let s=0;for(;l+s<e.length&&e[l+s]==="`";)s+=1;if(s===o){const c=e.slice(n+o,l);t+=e.slice(n,n+o)+c.replace(/\\\||\|/g,i=>i==="|"?"\\|":i)+e.slice(l,l+o),n=l+o,r=!0;break}l+=s}r||(t+=e.slice(n,n+o),n+=o)}return t}function rn(e){return e.split(`
2
- `).map(t=>!t.includes("|")||!t.includes("`")?t:ln(t)).join(`
3
- `)}function sn(e){return(e||"").replace(/\s+/g," ").trim()}function cn(e,t,n={}){var o;const l=(o=n.cellLineSeparator)!==null&&o!==void 0?o:"";if(!e||!e.content||e.content.length===0)return"";const r=[];e.content.forEach(h=>{const g=[];h.content&&h.content.forEach(m=>{let w="";m.content&&Array.isArray(m.content)&&m.content.length>1?w=m.content.map(R=>t.renderChildren(R)).join(l):w=m.content?t.renderChildren(m.content):"";const S=sn(w.split(l).join(`
4
- `).replace(/[ \t]*\r?\n[ \t]*/g,"<br>")),y=m.type==="tableHeader",A=qt(m.attrs);g.push({text:S,isHeader:y,align:A})}),r.push(g)});const s=r.reduce((h,g)=>Math.max(h,g.length),0);if(s===0)return"";const c=Array.from({length:s}).fill(0);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;const w=(((g=h[m])===null||g===void 0?void 0:g.text)||"").length;w>c[m]&&(c[m]=w),c[m]<3&&(c[m]=3)}});const i=(h,g)=>h+" ".repeat(Math.max(0,g-h.length)),a=r[0],d=a.some(h=>h.isHeader),u=Array.from({length:s}).fill(null);r.forEach(h=>{for(let m=0;m<s;m+=1){var g;!u[m]&&(!((g=h[m])===null||g===void 0)&&g.align)&&(u[m]=h[m].align)}});let f=`
5
- `;const p=Array.from({length:s}).map((h,g)=>d&&a[g]&&a[g].text||"");return f+=`| ${p.map((h,g)=>i(h,c[g])).join(" | ")} |
6
- `,f+=`| ${c.map((h,g)=>{const m=Math.max(3,h),w=u[g];return w==="left"?`:${"-".repeat(m)}`:w==="right"?`${"-".repeat(m)}:`:w==="center"?`:${"-".repeat(m)}:`:"-".repeat(m)}).join(" | ")} |
7
- `,(d?r.slice(1):r).forEach(h=>{f+=`| ${Array.from({length:s}).fill(0).map((g,m)=>i(h[m]&&h[m].text||"",c[m])).join(" | ")} |
8
- `}),f}const an=P.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Zt,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:o,tableMinWidth:l}=en(e,this.options.cellMinWidth),r=t.style;function s(){return r||(o?`width: ${o}`:`min-width: ${l}`)}const c=["table",k(this.options.HTMLAttributes,t,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},c]:c},parseMarkdown:(e,t)=>{const n=[],o=Array.isArray(e.align)?e.align:[];if(e.header){const l=[];e.header.forEach((r,s)=>{var c;const i=U((c=o[s])!==null&&c!==void 0?c:r.align),a=i?{align:i}:{};l.push(t.createNode("tableHeader",a,[{type:"paragraph",content:t.parseInline(r.tokens)}]))}),n.push(t.createNode("tableRow",{},l))}return e.rows&&e.rows.forEach(l=>{const r=[];l.forEach((s,c)=>{var i;const a=U((i=o[c])!==null&&i!==void 0?i:s.align),d=a?{align:a}:{};r.push(t.createNode("tableCell",d,[{type:"paragraph",content:t.parseInline(s.tokens)}]))}),n.push(t.createNode("tableRow",{},r))}),t.createNode("table",void 0,n)},renderMarkdown:(e,t)=>cn(e,t),markdownTokenizer:{name:"table",level:"block",start:e=>{const t=e.split(`
9
- `);if(t.length<2)return-1;const n=t[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes("|")?-1:t[0].includes("|")?0:-1},tokenize(e,t,n){const o=e.indexOf(`
10
-
11
- `),l=o>=0?e.slice(0,o):e,r=l.split(`
12
- `);if(r.length<2)return;const s=r[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(s)||!s.includes("|"))return;const c=rn(l);if(c===l)return;const i=n.blockTokens(c)[0];if(i?.type!=="table"||!i.raw)return;const a=i.raw.split(`
13
- `).length,d=e.split(`
14
- `).slice(0,a).join(`
15
- `);return{...i,raw:d}}},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:o,dispatch:l,editor:r})=>{const s=nn(r.schema,e,t,n);if(l){const c=o.selection.from+1;o.replaceSelectionWith(s).scrollIntoView().setSelection(H.near(o.doc.resolve(c)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>dt(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>ut(e,t),deleteColumn:()=>({state:e,dispatch:t})=>{const n=q(e.selection.$from,o=>o.type.name==="table");return ht(e,t&&(o=>{n&&Se(o,n.pos),t(o)}))},addRowBefore:()=>({state:e,dispatch:t})=>mt(e,t),addRowAfter:()=>({state:e,dispatch:t})=>gt(e,t),deleteRow:()=>({state:e,dispatch:t})=>{const n=q(e.selection.$from,o=>o.type.name==="table");return bt(e,t&&(o=>{n&&Se(o,n.pos),t(o)}))},deleteTable:()=>({state:e,dispatch:t})=>xt(e,t),mergeCells:()=>({state:e,dispatch:t})=>ae(e,t),splitCell:()=>({state:e,dispatch:t})=>de(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>I("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>I("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>vt(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>ae(e,t)?!0:de(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:o})=>At(e,t)(n,o),goToNextCell:()=>({state:e,dispatch:t})=>fe(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>fe(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&ze(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const o=b.create(t.doc,e.anchorCell,e.headCell);t.setSelection(o)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:V,"Mod-Backspace":V,Delete:V,"Mod-Delete":V}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Wt({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Kt({allowTableNodeSelection:this.options.allowTableNodeSelection})]},addNodeView(){const e=this.options.resizable&&this.editor.isEditable,t=this.options.View;return e||!t?null:({node:n,view:o,HTMLAttributes:l})=>{const r=k(this.options.HTMLAttributes,l);return new t(n,this.options.cellMinWidth,o,r)}},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:Ve(Ke(e,"tableRole",t))}}}),hn=Xe.create({name:"tableKit",addExtensions(){const e=[];return this.options.table!==!1&&e.push(an.configure(this.options.table)),this.options.tableCell!==!1&&e.push(Gt.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(Yt.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(Qt.configure(this.options.tableRow)),e}});export{b as C,hn as T,un as s};
@@ -1 +0,0 @@
1
- import{d8 as _}from"./index-Bj6_6zVx.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
@@ -1 +0,0 @@
1
- import{c as j,au as W,aw as q,b as E,r as w,d as G,j as o,aV as $,R as I,P as N,n as U,B as k,ba as V}from"./index-Bj6_6zVx.js";import{u as K}from"./use-mobile-DoMXTDgT.js";import{T as Y,a as Z,c as J}from"./tooltip-D7UkTGEH.js";import{t as Q,a as X}from"./MessageCircle01--u6B2ia8.js";import{s as ee}from"./XClose-iDf6pWg-.js";import{b as te}from"./thread-button-BBJoVBQl.js";import{T as ne}from"./toolbar-icon-button-C222vHOe.js";import{b as se,R as oe,a as D}from"./resizable-DhCMu9jm.js";import{c as re,r as ie,m as ae}from"./use-chat-layout-state-CCw2XVj_.js";import{R as le}from"./route-page-header-9OZPwvWl.js";import"./index-B5U9W1Mu.js";import"./use-sidebar-collapsed-cUrAd04a.js";import"./sheet-BWD81VUI.js";import"./use-in-settings-CYqnux2M.js";import"./use-panel-navigate-CwVf-Jjy.js";import"./thread-route-BNNhAHoL.js";import"./use-project-scope-h-e-yu96.js";import"./repository-binding-le0nIidi.js";import"./use-mcp-client-D5RDteAI.js";import"./auth-BHQvXV6z.js";import"./LayoutLeft-CZKqhqEw.js";import"./use-current-view-LvBpDZKU.js";function A(t,e){const n=typeof t=="number"?t:Number(t);return!Number.isFinite(n)||n<=0||n>=100?e:n}function ce(t,e){const n=j.c(8);let r;n[0]!==e?(r=c=>A(c,e),n[0]=e,n[1]=r):r=n[1];const[i,a]=W(t,r);let s;n[2]!==e||n[3]!==i?(s=A(i,e),n[2]=e,n[3]=i,n[4]=s):s=n[4];let l;return n[5]!==a||n[6]!==s?(l=[s,a],n[5]=a,n[6]=s,n[7]=l):l=n[7],l}const ue=33;function de(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=q.sidePanelWidth(),t[0]=e):e=t[0],ce(e,ue)}const P="chat-layout-thread",M="chat-layout-content",H="320px",O=w.createContext(null);function Fe(){return T()}function fe(){return w.use(O)}function T(){const t=w.use(O);if(!t)throw new Error("ChatLayout regions require a ChatLayout");return t}function he(t){const e=j.c(22),{children:n,...r}=t,i=K(),a=G(),s=w.useRef(null),[l,c]=de(),{threadOpen:u,contentOpen:d}=r,h=re(r),m=u&&d?l:h.side,p=100-m,y=b=>{const v=b.getLayout(),_=v[P],S=v[M];typeof _!="number"||typeof S!="number"||Math.abs(_-m)<.001&&Math.abs(S-p)<.001||b.setLayout({[P]:m,[M]:p})},C=ie(r);let x;e[0]!==i||e[1]!==r||e[2]!==C?(x={...r,isMobile:i,mobileSurface:C},e[0]=i,e[1]=r,e[2]=C,e[3]=x):x=e[3];const f=x;let g;e[4]!==i||e[5]!==r||e[6]!==a||e[7]!==f?(g=i&&!r.threadless&&o.jsx(te,{open:f.mobileSurface==="chat",onToggle:()=>{a({to:".",search:b=>({...b,...ae(f.mobileSurface==="chat"?"main":"chat")}),replace:!0})}}),e[4]=i,e[5]=r,e[6]=a,e[7]=f,e[8]=g):g=e[8];let L;e[9]!==n||e[10]!==d||e[11]!==p||e[12]!==i||e[13]!==c||e[14]!==y||e[15]!==u||e[16]!==m?(L=i?o.jsx("div",{"data-slot":"chat-layout",className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background",children:n}):o.jsx(oe,{ref:b=>{if(s.current=b,!b)return;let v=!0;return queueMicrotask(()=>{v&&y(b)}),()=>{v=!1,s.current===b&&(s.current=null)}},defaultLayout:{[P]:m,[M]:p},orientation:"horizontal","data-slot":"chat-layout",className:"flex-1 min-h-0 pt-1 pb-1 pr-1 pl-0",style:{overflow:"visible"},onLayoutChanged:(b,v)=>{const{isUserInteraction:_}=v;if(!_){const R=s.current;R&&y(R);return}const S=b[P];u&&d&&typeof S=="number"&&S>0&&S<100&&c(S)},children:n}),e[9]=n,e[10]=d,e[11]=p,e[12]=i,e[13]=c,e[14]=y,e[15]=u,e[16]=m,e[17]=L):L=e[17];let z;return e[18]!==g||e[19]!==L||e[20]!==f?(z=o.jsxs(O,{value:f,children:[g,L]}),e[18]=g,e[19]=L,e[20]=f,e[21]=z):z=e[21],z}function me(t){const e=j.c(14),{children:n,topbar:r}=t,i=T();if(i.isMobile){let u;return e[0]!==n||e[1]!==i.mobileSurface||e[2]!==r?(u=i.mobileSurface==="chat"?o.jsxs(N,{variant:"plain","data-slot":"chat-layout-thread",children:[r,o.jsx(N.Content,{"data-testid":"chat-panel",children:n})]}):null,e[0]=n,e[1]=i.mobileSurface,e[2]=r,e[3]=u):u=e[3],u}if(!i.threadOpen)return null;let a;e[4]!==i.contentOpen?(a=i.contentOpen&&o.jsx(se,{className:"bg-sidebar"}),e[4]=i.contentOpen,e[5]=a):a=e[5];let s;e[6]!==n?(s=o.jsx(N.Content,{"data-testid":"chat-panel",children:n}),e[6]=n,e[7]=s):s=e[7];let l;e[8]!==s||e[9]!==r?(l=o.jsx(D,{id:P,defaultSize:"33%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsx("div",{className:"h-full min-h-0 p-0.5",children:o.jsxs(N,{"data-testid":"side-panel",children:[r,s]})})}),e[8]=s,e[9]=r,e[10]=l):l=e[10];let c;return e[11]!==a||e[12]!==l?(c=o.jsxs(o.Fragment,{children:[a,l]}),e[11]=a,e[12]=l,e[13]=c):c=e[13],c}function F(t){const e=j.c(10),{label:n,pressed:r,onClick:i,children:a}=t;let s;e[0]!==a||e[1]!==n||e[2]!==i||e[3]!==r?(s=o.jsx(Y,{asChild:!0,children:o.jsx(ne,{"aria-label":n,"aria-pressed":r,onClick:i,children:a})}),e[0]=a,e[1]=n,e[2]=i,e[3]=r,e[4]=s):s=e[4];let l;e[5]!==n?(l=o.jsx(Z,{side:"bottom",children:n}),e[5]=n,e[6]=l):l=e[6];let c;return e[7]!==s||e[8]!==l?(c=o.jsxs(J,{children:[s,l]}),e[7]=s,e[8]=l,e[9]=c):c=e[9],c}function pe(){const t=j.c(12),e=E(),n=T();if(n.isMobile||n.threadless)return null;const r=!n.threadOpen;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx("span",{"aria-hidden":!0,className:"mr-1.5 h-4 w-px shrink-0 bg-border"}),t[0]=i):i=t[0];let a;t[1]!==r||t[2]!==n.toggleFullscreen||t[3]!==e?(a=r?o.jsxs(k,{variant:"ghost",size:"sm","aria-pressed":r,className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:n.toggleFullscreen,children:[o.jsx(Q,{size:16}),e("page.exitFullscreen")]}):o.jsx(F,{label:e("page.enterFullscreen"),pressed:r,onClick:n.toggleFullscreen,children:o.jsx(X,{size:16})}),t[1]=r,t[2]=n.toggleFullscreen,t[3]=e,t[4]=a):a=t[4];let s;t[5]!==r||t[6]!==n.toggleContent||t[7]!==e?(s=!r&&o.jsx(F,{label:e("page.closeMainPanel"),onClick:n.toggleContent,children:o.jsx(ee,{size:16})}),t[5]=r,t[6]=n.toggleContent,t[7]=e,t[8]=s):s=t[8];let l;return t[9]!==a||t[10]!==s?(l=o.jsxs("div",{className:"flex items-center gap-0.5",children:[i,a,s]}),t[9]=a,t[10]=s,t[11]=l):l=t[11],l}function Ke(){const t=j.c(9),e=E(),n=K(),r=fe();if(n||!r||r.threadless||r.contentOpen)return null;const i=r.toggleContent;let a;t[0]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx(xe,{}),t[0]=a):a=t[0];let s;t[1]!==e?(s=e("page.openMainPanel"),t[1]=e,t[2]=s):s=t[2];let l;t[3]!==r.toggleContent||t[4]!==s?(l=o.jsxs(k,{variant:"ghost",size:"sm",className:"h-7 gap-1.5 px-2 text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground",onClick:i,children:[a,s]}),t[3]=r.toggleContent,t[4]=s,t[5]=l):l=t[5];let c;t[6]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx("span",{"aria-hidden":!0,className:"mx-1 h-4 w-px shrink-0 bg-border"}),t[6]=c):c=t[6];let u;return t[7]!==l?(u=o.jsxs(o.Fragment,{children:[l,c]}),t[7]=l,t[8]=u):u=t[8],u}function xe(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,className:"shrink-0",children:o.jsx("path",{d:"M4 5v14M8 12h12m0 0-6-6m6 6-6 6"})}),t[0]=e):e=t[0],e}function ge({children:t,routeId:e}){return t}function B(t){const e=j.c(26),{children:n,actions:r,drawer:i,aside:a}=t,s=T();if(s.isMobile&&s.mobileSurface!=="main")return null;const l=s.isMobile?"plain":"card";let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=o.jsx(pe,{}),e[0]=c):c=e[0];let u;e[1]!==r||e[2]!==s.contentNavigation?(u=o.jsx(le,{navigation:s.contentNavigation,actions:r,trailingActions:c}),e[1]=r,e[2]=s.contentNavigation,e[3]=u):u=e[3];let d;e[4]!==n||e[5]!==s.contentKey?(d=o.jsx($,{children:o.jsx(ge,{routeId:s.contentKey,children:n})}),e[4]=n,e[5]=s.contentKey,e[6]=d):d=e[6];let h;e[7]!==s.contentKey||e[8]!==d?(h=o.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:o.jsx(I,{children:d},s.contentKey)}),e[7]=s.contentKey,e[8]=d,e[9]=h):h=e[9];let m;e[10]!==i||e[11]!==h?(m=o.jsxs(N.Content,{children:[h,i]}),e[10]=i,e[11]=h,e[12]=m):m=e[12];let p;e[13]!==u||e[14]!==m?(p=o.jsxs(U.Breadcrumbs.Provider,{children:[u,m]}),e[13]=u,e[14]=m,e[15]=p):p=e[15];let y;e[16]!==l||e[17]!==p?(y=o.jsx(N,{"data-testid":"main-panel",variant:l,children:p}),e[16]=l,e[17]=p,e[18]=y):y=e[18];const C=y;if(s.isMobile)return C;if(!s.contentOpen)return null;let x;e[19]!==C?(x=o.jsx("div",{className:"h-full min-h-0 min-w-0 flex-1 p-0.5",children:C}),e[19]=C,e[20]=x):x=e[20];let f;e[21]!==a?(f=a&&o.jsx("div",{className:"h-full min-h-0 w-[42%] min-w-80 shrink-0 p-0.5",children:o.jsx(N,{"data-testid":"aside-panel",children:o.jsx(I,{children:o.jsx($,{children:a})},w.isValidElement(a)?a.key??void 0:void 0)})}),e[21]=a,e[22]=f):f=e[22];let g;return e[23]!==f||e[24]!==x?(g=o.jsx(D,{id:M,defaultSize:"67%",minSize:H,className:"min-w-0 overflow-hidden bg-sidebar",children:o.jsxs("div",{className:"flex h-full min-h-0",children:[x,f]})}),e[23]=f,e[24]=x,e[25]=g):g=e[25],g}function De(){const t=j.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=o.jsx(B,{children:o.jsx(V,{})}),t[0]=e):e=t[0],e}function He(t){const e=j.c(18),{error:n,reset:r}=t,i=E();let a;e[0]!==i?(a=i("common.errorBoundary.somethingWentWrong"),e[0]=i,e[1]=a):a=e[1];let s;e[2]!==a?(s=o.jsx("h2",{className:"text-lg font-medium",children:a}),e[2]=a,e[3]=s):s=e[3];let l;e[4]!==n.message||e[5]!==i?(l=n.message||i("common.errorBoundary.unexpectedError"),e[4]=n.message,e[5]=i,e[6]=l):l=e[6];let c;e[7]!==l?(c=o.jsx("p",{className:"max-w-lg whitespace-pre-wrap text-sm text-muted-foreground",children:l}),e[7]=l,e[8]=c):c=e[8];let u;e[9]!==i?(u=i("common.errorBoundary.tryAgain"),e[9]=i,e[10]=u):u=e[10];let d;e[11]!==r||e[12]!==u?(d=o.jsx(k,{variant:"outline",onClick:r,children:u}),e[11]=r,e[12]=u,e[13]=d):d=e[13];let h;return e[14]!==s||e[15]!==c||e[16]!==d?(h=o.jsx(B,{children:o.jsxs("div",{role:"alert",className:"flex h-full flex-col items-center justify-center gap-4 p-6 text-center",children:[s,c,d]})}),e[14]=s,e[15]=c,e[16]=d,e[17]=h):h=e[17],h}const We=Object.assign(he,{Thread:me,Content:B});export{We as ChatLayout,He as ChatLayoutError,De as ChatLayoutPending,Ke as OpenMainPanelButton,Fe as useChatLayout,fe as useOptionalChatLayout};
@@ -1,69 +0,0 @@
1
- import{c as $,b as j,r as _,j as f,m as B,a_ as at,t as se,b8 as Oe,a6 as ot,ho as lt,i as ct,K as ut,cd as ht,h as De,o as pt}from"./index-Bj6_6zVx.js";import{u as dt,v as Be,f as ue,B as ft,w as gt,_ as P,$ as mt,a0 as kt,J as xt,K as D,a1 as ve,a2 as bt,e as wt,a3 as Se,a4 as yt,a5 as G,N as Fe,a6 as he,c as qe,a7 as pe,a8 as Tt,a9 as vt,s as St,aa as Mt,a as Et,E as At}from"./usage-stats--dyurVY0.js";import{T as C,n as Rt,i as _t,E as $t}from"./editor-classes-CmuNPnLv.js";import{a as Ct,e as Ue,s as Lt,S as It}from"./suggestion-DYgy8nXt.js";import{B as zt}from"./index-c0NsxqWi.js";import{aF as Pt,aj as jt,ak as Nt,am as Ht,L as Ot,aZ as Dt,aK as Bt}from"./agent-icon-D3UAaAZc.js";import{i as Ft}from"./SwitchHorizontal01-BAD2JhOt.js";import{s as qt}from"./Trash01-NEyFqlJC.js";import{k as Ut,a as Zt}from"./use-org-fs-BJdBDT27.js";import{E as Me,i as Ze,b as Gt,c as Kt,d as Ge,A as Wt,e as Qt,f as Xt,g as Vt,j as Jt}from"./markdown-CLYGcw1L.js";import{s as Yt,T as en}from"./index-CHuyyJXT.js";import{f as tn,a as nn,c as rn,C as sn,b as Ee}from"./command-DNUfYvKL.js";import{I as an}from"./icon-button-CWYyJxah.js";function on(t){const e=$.c(30),{editor:n}=t,s=j(),[r,a]=_.useState(!1),[i,l]=_.useState(""),[o,h]=_.useState(!1);let c;e[0]!==n?(c=n.isActive("link"),e[0]=n,e[1]=c):c=e[1];const u=c;let p;e[2]!==n||e[3]!==r?(p=()=>{if(r){a(!1);return}const T=n.getAttributes("link").href;l(typeof T=="string"?T:""),h(!1),a(!0)},e[2]=n,e[3]=r,e[4]=p):p=e[4];const d=p;let g;e[5]!==n?(g=()=>{n.chain().focus().extendMarkRange("link").unsetLink().run(),a(!1)},e[5]=n,e[6]=g):g=e[6];const x=g;let w;e[7]!==i||e[8]!==n||e[9]!==x?(w=()=>{const T=Rt(i);if(T===""){x();return}if(!_t(T)){h(!0);return}n.chain().focus().extendMarkRange("link").setLink({href:T}).run(),a(!1)},e[7]=i,e[8]=n,e[9]=x,e[10]=w):w=e[10];const b=w;let y;e[11]!==s?(y=s("markdownEditor.link"),e[11]=s,e[12]=y):y=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=f.jsx(Pt,{size:14}),e[13]=v):v=e[13];let M;e[14]!==u||e[15]!==y||e[16]!==d?(M=f.jsx(C,{active:u,label:y,onClick:d,children:v}),e[14]=u,e[15]=y,e[16]=d,e[17]=M):M=e[17];let m;e[18]!==u||e[19]!==b||e[20]!==i||e[21]!==n||e[22]!==o||e[23]!==r||e[24]!==x||e[25]!==s?(m=r&&f.jsxs("div",{className:"absolute left-0 top-full z-20 mt-1.5 flex w-64 items-center gap-0.5 rounded-md bg-popover p-1 shadow-soft",onBlur:T=>{T.currentTarget.contains(T.relatedTarget)||a(!1)},children:[f.jsx("input",{autoFocus:!0,type:"text","aria-label":s("markdownEditor.linkInputAriaLabel"),"aria-invalid":o,placeholder:s("markdownEditor.linkPlaceholder"),value:i,onChange:T=>{l(T.target.value),h(!1)},onKeyDown:T=>{T.key==="Enter"?(T.preventDefault(),b()):T.key==="Escape"&&(T.preventDefault(),a(!1),n.chain().focus().run())},className:B("h-7 min-w-0 flex-1 rounded bg-transparent px-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none",o&&"text-destructive")}),f.jsx(C,{active:!1,label:s("markdownEditor.linkApply"),onClick:b,children:f.jsx(at,{size:14})}),u&&f.jsx(C,{active:!1,label:s("markdownEditor.linkRemove"),onClick:x,children:f.jsx(qt,{size:14})})]}),e[18]=u,e[19]=b,e[20]=i,e[21]=n,e[22]=o,e[23]=r,e[24]=x,e[25]=s,e[26]=m):m=e[26];let k;return e[27]!==M||e[28]!==m?(k=f.jsxs("div",{className:"relative",children:[M,m]}),e[27]=M,e[28]=m,e[29]=k):k=e[29],k}const ne=()=>{const t=$.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=f.jsx("div",{className:"mx-0.5 h-4 w-px bg-border"}),t[0]=e):e=t[0],e},Ae=t=>{const e=$.c(2),{children:n}=t;let s;return e[0]!==n?(s=f.jsx("span",{className:"text-2xs font-semibold leading-none",children:n}),e[0]=n,e[1]=s):s=e[1],s},Ke=[1,2,3],ln=({editor:t,state:e})=>t.isEditable&&!e.selection.empty&&!t.isActive("image")&&!t.isActive("attachment")&&!t.isActive("codeBlock");function cn(t){const e=$.c(20),{editor:n}=t,s=j(),[r,a]=_.useState(null);let i;e[0]!==n?(i={editor:n,selector:un},e[0]=n,e[1]=i):i=e[1];const l=dt(i);let o;e[2]!==s?(o=s("markdownEditor.heading1"),e[2]=s,e[3]=o):o=e[3];let h;e[4]!==s?(h=s("markdownEditor.heading2"),e[4]=s,e[5]=h):h=e[5];let c;e[6]!==s?(c=s("markdownEditor.heading3"),e[6]=s,e[7]=c):c=e[7];let u;e[8]!==o||e[9]!==h||e[10]!==c?(u={1:o,2:h,3:c},e[8]=o,e[9]=h,e[10]=c,e[11]=u):u=e[11];const p=u;let d;e[12]!==n||e[13]!==p||e[14]!==r||e[15]!==l||e[16]!==s?(d=r&&f.jsxs(zt,{editor:n,shouldShow:ln,appendTo:r,className:"flex items-center gap-0.5 rounded-lg bg-popover p-1 shadow-soft","aria-label":s("markdownEditor.toolbarAriaLabel"),children:[f.jsx(C,{active:l.bold,label:s("markdownEditor.bold"),onClick:()=>n.chain().focus().toggleBold().run(),children:f.jsx(jt,{size:14})}),f.jsx(C,{active:l.italic,label:s("markdownEditor.italic"),onClick:()=>n.chain().focus().toggleItalic().run(),children:f.jsx(Nt,{size:14})}),f.jsx(C,{active:l.strike,label:s("markdownEditor.strikethrough"),onClick:()=>n.chain().focus().toggleStrike().run(),children:f.jsx(Ht,{size:14})}),f.jsx(C,{active:l.code,label:s("markdownEditor.code"),onClick:()=>n.chain().focus().toggleCode().run(),children:f.jsx(Ot,{size:14})}),f.jsx(ne,{}),Ke.map((x,w)=>f.jsx(C,{active:l.headings[w]??!1,label:p[x],onClick:()=>n.chain().focus().toggleHeading({level:x}).run(),children:f.jsx(Ae,{children:`H${x}`})},x)),f.jsx(ne,{}),f.jsx(C,{active:l.bulletList,label:s("markdownEditor.bulletList"),onClick:()=>n.chain().focus().toggleBulletList().run(),children:f.jsx(Ft,{size:14})}),f.jsx(C,{active:l.orderedList,label:s("markdownEditor.orderedList"),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:f.jsx(Ae,{children:"1."})}),f.jsx(C,{active:l.blockquote,label:s("markdownEditor.quote"),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:f.jsx(Dt,{size:14})}),f.jsx(ne,{}),f.jsx(on,{editor:n})]}),e[12]=n,e[13]=p,e[14]=r,e[15]=l,e[16]=s,e[17]=d):d=e[17];let g;return e[18]!==d?(g=f.jsx("div",{ref:a,className:"relative z-20",children:d}),e[18]=d,e[19]=g):g=e[19],g}function un(t){const{editor:e}=t;return{bold:e.isActive("bold"),italic:e.isActive("italic"),strike:e.isActive("strike"),code:e.isActive("code"),headings:Ke.map(n=>e.isActive("heading",{level:n})),bulletList:e.isActive("bulletList"),orderedList:e.isActive("orderedList"),blockquote:e.isActive("blockquote")}}const hn=10,pn=25,dn={"image/png":".png","image/jpeg":".jpg","image/gif":".gif","image/webp":".webp","image/avif":".avif","image/svg+xml":".svg"};function fn(t){return t.name.match(/\.[a-z0-9]{1,8}$/i)?.[0]??dn[t.type]??""}function gn(){const t=$.c(4),e=j(),{upload:n}=Ut(Me),s=Zt(Me);let r;return t[0]!==s||t[1]!==e||t[2]!==n?(r={uploadFile:async i=>{const l=Ze(i),o=l?hn:pn;if(i.size>o*1024*1024)return se.error(e("markdownEditor.fileTooLarge",{name:i.name,max:String(o)})),null;const h=l?Gt:Kt,c=`${crypto.randomUUID()}${fn(i)}`;try{return await n.mutateAsync({dir:h,files:[new File([i],c,{type:i.type})]}),s(`${h}/${c}`)}catch{return se.error(e("markdownEditor.uploadFailed",{name:i.name})),null}}},t[0]=s,t[1]=e,t[2]=n,t[3]=r):r=t[3],r}const X=new Be("uploadSlots"),mn=ue.create({name:"uploadSlots",addProseMirrorPlugins(){return[new ft({key:X,state:{init:()=>new Map,apply(t,e){const n=t.getMeta(X);if(!t.docChanged&&!n)return e;const s=new Map;for(const[r,a]of e)s.set(r,t.mapping.map(a));if(n){const[r,a]=n;a===null?s.delete(r):s.set(r,a)}return s}}})]}});function ie(t,e,n){return t.setMeta(X,[e,n])}function kn(t,e){return X.getState(t)?.get(e)}function xn(t,e,n,s,r){const{schema:a}=t.state,i=a.nodes[n];if(!i)return;const l=i.create(s),o=t.state.selection.to===e,h=t.state.doc.resolve(e),c=h.parent.textBetween(Math.max(0,h.parentOffset-1),h.parentOffset,void 0,""),u=()=>a.text(" "),p=l.isInline?[...c&&!/\s/.test(c)?[u()]:[],l,u()]:l,d=t.state.tr.replaceWith(e,e,p);let g=e,x=e;d.mapping.maps.at(-1)?.forEach((M,m,k,T)=>{g=k,x=T});let w;d.doc.nodesBetween(g,x,(M,m)=>{M===l&&(w=m+M.nodeSize)});let b=w??x;w!==void 0&&l.isInline&&(b+=1);const y=a.nodes.paragraph;w!==void 0&&l.isBlock&&y&&(d.doc.resolve(w).nodeAfter?.isTextblock||d.insert(w,y.create()),b=w+1);const v=gt.near(d.doc.resolve(b));o&&d.setSelection(v),r&&ie(d,r,v.to),t.dispatch(d)}function bn(t){return!t||t.files.length===0?[]:t.getData("text/html")!==""&&t.getData("text/plain").trim()!==""?[]:Array.from(t.files)}function wn(t=!0){const e=j(),{uploadFile:n}=gn(),s=_.useRef(n);s.current=n;const[r,a]=_.useState(0),i=_.useRef(0),l=u=>{i.current+=u,a(i.current)},o=(u,p,d)=>{if(!t||p.length===0)return!1;l(p.length);const g=Symbol("upload");return u.dispatch(ie(u.state.tr,g,d)),(async()=>{for(const x of p)try{const w=await s.current(x);if(!w||u.isDestroyed)continue;const b=Ze(x);xn(u,kn(u.state,g)??u.state.selection.to,b?"image":"attachment",b?{src:w,alt:x.name}:{href:w,name:x.name},g)}catch{se.error(e("markdownEditor.uploadFailed",{name:x.name}))}finally{l(-1)}u.isDestroyed||u.dispatch(ie(u.state.tr,g,null))})(),!0};return{pending:r,uploading:()=>i.current>0,uploadInto:o,handlePaste:(u,p)=>{const d=bn(p.clipboardData);return d.length===0?!1:(p.stopPropagation(),o(u,d,u.state.selection.to))},handleDrop:(u,p,d,g)=>{if(g)return!1;const x=Array.from(p.dataTransfer?.files??[]);if(x.length===0)return!1;const w=u.posAtCoords({left:p.clientX,top:p.clientY})?.pos;return w===void 0?!1:(p.stopPropagation(),o(u,x,w))}}}function de(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var O=de();function We(t){O=t}var N={exec:()=>null};function S(t,e=""){let n=typeof t=="string"?t:t.source,s={replace:(r,a)=>{let i=typeof a=="string"?a:a.source;return i=i.replace(R.caret,"$1"),n=n.replace(r,i),s},getRegex:()=>new RegExp(n,e)};return s}var yn=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),R={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}>`)},Tn=/^(?:[ \t]*(?:\n|$))+/,vn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Sn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,K=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,fe=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Qe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Xe=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),En=S(Qe).replace(/bull/g,fe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ge=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,An=/^[^\n]+/,me=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Rn=S(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",me).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_n=S(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,fe).getRegex(),ee="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ke=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,$n=S("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ke).replace("tag",ee).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Ve=S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Cn=S(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ve).getRegex(),xe={blockquote:Cn,code:vn,def:Rn,fences:Sn,heading:Mn,hr:K,html:$n,lheading:Xe,list:_n,newline:Tn,paragraph:Ve,table:N,text:An},Re=S("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex(),Ln={...xe,lheading:En,table:Re,paragraph:S(ge).replace("hr",K).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Re).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ee).getRegex()},In={...xe,html:S(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ke).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:N,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:S(ge).replace("hr",K).replace("heading",` *#{1,6} *[^
2
- ]`).replace("lheading",Xe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},zn=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Pn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Je=/^( {2,}|\\)\n(?!\s*$)/,jn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,F=/[\p{P}\p{S}]/u,te=/[\s\p{P}\p{S}]/u,be=/[^\s\p{P}\p{S}]/u,Nn=S(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,te).getRegex(),Ye=/(?!~)[\p{P}\p{S}]/u,Hn=/(?!~)[\s\p{P}\p{S}]/u,On=/(?:[^\s\p{P}\p{S}]|~)/u,Dn=S(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",yn?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),et=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Bn=S(et,"u").replace(/punct/g,F).getRegex(),Fn=S(et,"u").replace(/punct/g,Ye).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",qn=S(tt,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Un=S(tt,"gu").replace(/notPunctSpace/g,On).replace(/punctSpace/g,Hn).replace(/punct/g,Ye).getRegex(),Zn=S("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Gn=S(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,F).getRegex(),Kn="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Wn=S(Kn,"gu").replace(/notPunctSpace/g,be).replace(/punctSpace/g,te).replace(/punct/g,F).getRegex(),Qn=S(/\\(punct)/,"gu").replace(/punct/g,F).getRegex(),Xn=S(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Vn=S(ke).replace("(?:-->|$)","-->").getRegex(),Jn=S("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Vn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),V=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Yn=S(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",V).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),nt=S(/^!?\[(label)\]\[(ref)\]/).replace("label",V).replace("ref",me).getRegex(),rt=S(/^!?\[(ref)\](?:\[\])?/).replace("ref",me).getRegex(),er=S("reflink|nolink(?!\\()","g").replace("reflink",nt).replace("nolink",rt).getRegex(),_e=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,we={_backpedal:N,anyPunctuation:Qn,autolink:Xn,blockSkip:Dn,br:Je,code:Pn,del:N,delLDelim:N,delRDelim:N,emStrongLDelim:Bn,emStrongRDelimAst:qn,emStrongRDelimUnd:Zn,escape:zn,link:Yn,nolink:rt,punctuation:Nn,reflink:nt,reflinkSearch:er,tag:Jn,text:jn,url:N},tr={...we,link:S(/^!?\[(label)\]\((.*?)\)/).replace("label",V).getRegex(),reflink:S(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",V).getRegex()},ae={...we,emStrongRDelimAst:Un,emStrongLDelim:Fn,delLDelim:Gn,delRDelim:Wn,url:S(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",_e).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:S(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",_e).getRegex()},nr={...ae,br:S(Je).replace("{2,}","*").getRegex(),text:S(ae.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},W={normal:xe,gfm:Ln,pedantic:In},q={normal:we,gfm:ae,breaks:nr,pedantic:tr},rr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$e=t=>rr[t];function z(t,e){if(e){if(R.escapeTest.test(t))return t.replace(R.escapeReplace,$e)}else if(R.escapeTestNoEncode.test(t))return t.replace(R.escapeReplaceNoEncode,$e);return t}function Ce(t){try{t=encodeURI(t).replace(R.percentDecode,"%")}catch{return null}return t}function Le(t,e){let n=t.replace(R.findPipe,(a,i,l)=>{let o=!1,h=i;for(;--h>=0&&l[h]==="\\";)o=!o;return o?"|":" |"}),s=n.split(R.splitPipe),r=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;r<s.length;r++)s[r]=s[r].trim().replace(R.slashPipe,"|");return s}function U(t,e,n){let s=t.length;if(s===0)return"";let r=0;for(;r<s&&t.charAt(s-r-1)===e;)r++;return t.slice(0,s-r)}function sr(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<t.length;s++)if(t[s]==="\\")s++;else if(t[s]===e[0])n++;else if(t[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function ir(t,e=0){let n=e,s="";for(let r of t)if(r===" "){let a=4-n%4;s+=" ".repeat(a),n+=a}else s+=r,n++;return s}function Ie(t,e,n,s,r){let a=e.href,i=e.title||null,l=t[1].replace(r.other.outputLinkReplace,"$1");s.state.inLink=!0;let o={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:a,title:i,text:l,tokens:s.inlineTokens(l)};return s.state.inLink=!1,o}function ar(t,e,n){let s=t.match(n.other.indentCodeCompensation);if(s===null)return e;let r=s[1];return e.split(`
3
- `).map(a=>{let i=a.match(n.other.beginningSpace);if(i===null)return a;let[l]=i;return l.length>=r.length?a.slice(r.length):a}).join(`
4
- `)}var J=class{options;rules;lexer;constructor(t){this.options=t||O}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:U(n,`
5
- `)}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let n=e[0],s=ar(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){let s=U(n,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(n=s.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:U(e[0],`
6
- `)}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let n=U(e[0],`
7
- `).split(`
8
- `),s="",r="",a=[];for(;n.length>0;){let i=!1,l=[],o;for(o=0;o<n.length;o++)if(this.rules.other.blockquoteStart.test(n[o]))l.push(n[o]),i=!0;else if(!i)l.push(n[o]);else break;n=n.slice(o);let h=l.join(`
9
- `),c=h.replace(this.rules.other.blockquoteSetextReplace,`
10
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
11
- ${h}`:h,r=r?`${r}
12
- ${c}`:c;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,a,!0),this.lexer.state.top=u,n.length===0)break;let p=a.at(-1);if(p?.type==="code")break;if(p?.type==="blockquote"){let d=p,g=d.raw+`
13
- `+n.join(`
14
- `),x=this.blockquote(g);a[a.length-1]=x,s=s.substring(0,s.length-d.raw.length)+x.raw,r=r.substring(0,r.length-d.text.length)+x.text;break}else if(p?.type==="list"){let d=p,g=d.raw+`
15
- `+n.join(`
16
- `),x=this.list(g);a[a.length-1]=x,s=s.substring(0,s.length-p.raw.length)+x.raw,r=r.substring(0,r.length-d.raw.length)+x.raw,n=g.substring(a.at(-1).raw.length).split(`
17
- `);continue}}return{type:"blockquote",raw:s,tokens:a,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim(),s=n.length>1,r={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let a=this.rules.other.listItemRegex(n),i=!1;for(;t;){let o=!1,h="",c="";if(!(e=a.exec(t))||this.rules.block.hr.test(t))break;h=e[0],t=t.substring(h.length);let u=ir(e[2].split(`
18
- `,1)[0],e[1].length),p=t.split(`
19
- `,1)[0],d=!u.trim(),g=0;if(this.options.pedantic?(g=2,c=u.trimStart()):d?g=e[1].length+1:(g=u.search(this.rules.other.nonSpaceChar),g=g>4?1:g,c=u.slice(g),g+=e[1].length),d&&this.rules.other.blankLine.test(p)&&(h+=p+`
20
- `,t=t.substring(p.length+1),o=!0),!o){let x=this.rules.other.nextBulletRegex(g),w=this.rules.other.hrRegex(g),b=this.rules.other.fencesBeginRegex(g),y=this.rules.other.headingBeginRegex(g),v=this.rules.other.htmlBeginRegex(g),M=this.rules.other.blockquoteBeginRegex(g);for(;t;){let m=t.split(`
21
- `,1)[0],k;if(p=m,this.options.pedantic?(p=p.replace(this.rules.other.listReplaceNesting," "),k=p):k=p.replace(this.rules.other.tabCharGlobal," "),b.test(p)||y.test(p)||v.test(p)||M.test(p)||x.test(p)||w.test(p))break;if(k.search(this.rules.other.nonSpaceChar)>=g||!p.trim())c+=`
22
- `+k.slice(g);else{if(d||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||b.test(u)||y.test(u)||w.test(u))break;c+=`
23
- `+p}d=!p.trim(),h+=m+`
24
- `,t=t.substring(m.length+1),u=k.slice(g)}}r.loose||(i?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(i=!0)),r.items.push({type:"list_item",raw:h,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),r.raw+=h}let l=r.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let o of r.items){if(this.lexer.state.top=!1,o.tokens=this.lexer.blockTokens(o.text,[]),o.task){if(o.text=o.text.replace(this.rules.other.listReplaceTask,""),o.tokens[0]?.type==="text"||o.tokens[0]?.type==="paragraph"){o.tokens[0].raw=o.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),o.tokens[0].text=o.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let h=this.rules.other.listTaskCheckbox.exec(o.raw);if(h){let c={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};o.checked=c.checked,r.loose?o.tokens[0]&&["paragraph","text"].includes(o.tokens[0].type)&&"tokens"in o.tokens[0]&&o.tokens[0].tokens?(o.tokens[0].raw=c.raw+o.tokens[0].raw,o.tokens[0].text=c.raw+o.tokens[0].text,o.tokens[0].tokens.unshift(c)):o.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):o.tokens.unshift(c)}}if(!r.loose){let h=o.tokens.filter(u=>u.type==="space"),c=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));r.loose=c}}if(r.loose)for(let o of r.items){o.loose=!0;for(let h of o.tokens)h.type==="text"&&(h.type="paragraph")}return r}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:s,title:r}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let n=Le(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
25
- `):[],a={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===s.length){for(let i of s)this.rules.other.tableAlignRight.test(i)?a.align.push("right"):this.rules.other.tableAlignCenter.test(i)?a.align.push("center"):this.rules.other.tableAlignLeft.test(i)?a.align.push("left"):a.align.push(null);for(let i=0;i<n.length;i++)a.header.push({text:n[i],tokens:this.lexer.inline(n[i]),header:!0,align:a.align[i]});for(let i of r)a.rows.push(Le(i,a.header.length).map((l,o)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:a.align[o]})));return a}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e){let n=e[1].trim();return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let n=e[1].charAt(e[1].length-1)===`
26
- `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let a=U(n.slice(0,-1),"\\");if((n.length-a.length)%2===0)return}else{let a=sr(e[2],"()");if(a===-2)return;if(a>-1){let i=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,i).trim(),e[3]=""}}let s=e[2],r="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],r=a[3])}else r=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?s=s.slice(1):s=s.slice(1,-1)),Ie(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let s=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[s.toLowerCase()];if(!r){let a=n[0].charAt(0);return{type:"text",raw:a,text:a}}return Ie(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,a,i,l=r,o=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*t.length+r);(s=h.exec(e))!==null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(i=[...a].length,s[3]||s[4]){l+=i;continue}else if((s[5]||s[6])&&r%3&&!((r+i)%3)){o+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l+o);let c=[...s[0]][0].length,u=t.slice(0,r+s.index+c+i);if(Math.min(r,i)%2){let d=u.slice(1,-1);return{type:"em",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}let p=u.slice(2,-2);return{type:"strong",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return s&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t,e,n=""){let s=this.rules.inline.delLDelim.exec(t);if(s&&(!s[1]||!n||this.rules.inline.punctuation.exec(n))){let r=[...s[0]].length-1,a,i,l=r,o=this.rules.inline.delRDelim;for(o.lastIndex=0,e=e.slice(-1*t.length+r);(s=o.exec(e))!==null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a||(i=[...a].length,i!==r))continue;if(s[3]||s[4]){l+=i;continue}if(l-=i,l>0)continue;i=Math.min(i,i+l);let h=[...s[0]][0].length,c=t.slice(0,r+s.index+h+i),u=c.slice(r,-r);return{type:"del",raw:c,text:u,tokens:this.lexer.inlineTokens(u)}}}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let n,s;return e[2]==="@"?(n=e[1],s="mailto:"+n):(n=e[1],s=n),{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let n,s;if(e[2]==="@")n=e[0],s="mailto:"+n;else{let r;do r=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(r!==e[0]);n=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},L=class oe{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||O,this.options.tokenizer=this.options.tokenizer||new J,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:R,block:W.normal,inline:q.normal};this.options.pedantic?(n.block=W.pedantic,n.inline=q.pedantic):this.options.gfm&&(n.block=W.gfm,this.options.breaks?n.inline=q.breaks:n.inline=q.gfm),this.tokenizer.rules=n}static get rules(){return{block:W,inline:q}}static lex(e,n){return new oe(n).lex(e)}static lexInline(e,n){return new oe(n).inlineTokens(e)}lex(e){e=e.replace(R.carriageReturn,`
27
- `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let s=this.inlineQueue[n];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],s=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(R.tabCharGlobal," ").replace(R.spaceLine,""));e;){let r;if(this.options.extensions?.block?.some(i=>(r=i.call({lexer:this},e,n))?(e=e.substring(r.raw.length),n.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let i=n.at(-1);r.raw.length===1&&i!==void 0?i.raw+=`
28
- `:n.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
29
- `)?"":`
30
- `)+r.raw,i.text+=`
31
- `+r.text,this.inlineQueue.at(-1).src=i.text):n.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
32
- `)?"":`
33
- `)+r.raw,i.text+=`
34
- `+r.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},n.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),n.push(r);continue}let a=e;if(this.options.extensions?.startBlock){let i=1/0,l=e.slice(1),o;this.options.extensions.startBlock.forEach(h=>{o=h.call({lexer:this},l),typeof o=="number"&&o>=0&&(i=Math.min(i,o))}),i<1/0&&i>=0&&(a=e.substring(0,i+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a))){let i=n.at(-1);s&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
35
- `)?"":`
36
- `)+r.raw,i.text+=`
37
- `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(r),s=a.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let i=n.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
38
- `)?"":`
39
- `)+r.raw,i.text+=`
40
- `+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):n.push(r);continue}if(e){let i="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(i);break}else throw new Error(i)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){this.tokenizer.lexer=this;let s=e,r=null;if(this.tokens.links){let o=Object.keys(this.tokens.links);if(o.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(s))!==null;)o.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(s))!==null;)s=s.slice(0,r.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(s))!==null;)a=r[2]?r[2].length:0,s=s.slice(0,r.index+a)+"["+"a".repeat(r[0].length-a-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let i=!1,l="";for(;e;){i||(l=""),i=!1;let o;if(this.options.extensions?.inline?.some(c=>(o=c.call({lexer:this},e,n))?(e=e.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.escape(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.tag(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.link(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);let c=n.at(-1);o.type==="text"&&c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(o=this.tokenizer.emStrong(e,s,l)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.codespan(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.br(e)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.del(e,s,l)){e=e.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.autolink(e)){e=e.substring(o.raw.length),n.push(o);continue}if(!this.state.inLink&&(o=this.tokenizer.url(e))){e=e.substring(o.raw.length),n.push(o);continue}let h=e;if(this.options.extensions?.startInline){let c=1/0,u=e.slice(1),p;this.options.extensions.startInline.forEach(d=>{p=d.call({lexer:this},u),typeof p=="number"&&p>=0&&(c=Math.min(c,p))}),c<1/0&&c>=0&&(h=e.substring(0,c+1))}if(o=this.tokenizer.inlineText(h)){e=e.substring(o.raw.length),o.raw.slice(-1)!=="_"&&(l=o.raw.slice(-1)),i=!0;let c=n.at(-1);c?.type==="text"?(c.raw+=o.raw,c.text+=o.text):n.push(o);continue}if(e){let c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}},Y=class{options;parser;constructor(t){this.options=t||O}space(t){return""}code({text:t,lang:e,escaped:n}){let s=(e||"").match(R.notSpaceStart)?.[0],r=t.replace(R.endingNewline,"")+`
41
- `;return s?'<pre><code class="language-'+z(s)+'">'+(n?r:z(r,!0))+`</code></pre>
42
- `:"<pre><code>"+(n?r:z(r,!0))+`</code></pre>
43
- `}blockquote({tokens:t}){return`<blockquote>
44
- ${this.parser.parse(t)}</blockquote>
45
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
46
- `}hr(t){return`<hr>
47
- `}list(t){let e=t.ordered,n=t.start,s="";for(let i=0;i<t.items.length;i++){let l=t.items[i];s+=this.listitem(l)}let r=e?"ol":"ul",a=e&&n!==1?' start="'+n+'"':"";return"<"+r+a+`>
48
- `+s+"</"+r+`>
49
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
50
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
51
- `}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let s="";for(let r=0;r<t.rows.length;r++){let a=t.rows[r];n="";for(let i=0;i<a.length;i++)n+=this.tablecell(a[i]);s+=this.tablerow({text:n})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
52
- <thead>
53
- `+e+`</thead>
54
- `+s+`</table>
55
- `}tablerow({text:t}){return`<tr>
56
- ${t}</tr>
57
- `}tablecell(t){let e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
58
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${z(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){let s=this.parser.parseInline(n),r=Ce(t);if(r===null)return s;t=r;let a='<a href="'+t+'"';return e&&(a+=' title="'+z(e)+'"'),a+=">"+s+"</a>",a}image({href:t,title:e,text:n,tokens:s}){s&&(n=this.parser.parseInline(s,this.parser.textRenderer));let r=Ce(t);if(r===null)return z(n);t=r;let a=`<img src="${t}" alt="${z(n)}"`;return e&&(a+=` title="${z(e)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:z(t.text)}},ye=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},I=class le{options;renderer;textRenderer;constructor(e){this.options=e||O,this.options.renderer=this.options.renderer||new Y,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ye}static parse(e,n){return new le(n).parse(e)}static parseInline(e,n){return new le(n).parseInline(e)}parse(e){this.renderer.parser=this;let n="";for(let s=0;s<e.length;s++){let r=e[s];if(this.options.extensions?.renderers?.[r.type]){let i=r,l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(i.type)){n+=l||"";continue}}let a=r;switch(a.type){case"space":{n+=this.renderer.space(a);break}case"hr":{n+=this.renderer.hr(a);break}case"heading":{n+=this.renderer.heading(a);break}case"code":{n+=this.renderer.code(a);break}case"table":{n+=this.renderer.table(a);break}case"blockquote":{n+=this.renderer.blockquote(a);break}case"list":{n+=this.renderer.list(a);break}case"checkbox":{n+=this.renderer.checkbox(a);break}case"html":{n+=this.renderer.html(a);break}case"def":{n+=this.renderer.def(a);break}case"paragraph":{n+=this.renderer.paragraph(a);break}case"text":{n+=this.renderer.text(a);break}default:{let i='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return n}parseInline(e,n=this.renderer){this.renderer.parser=this;let s="";for(let r=0;r<e.length;r++){let a=e[r];if(this.options.extensions?.renderers?.[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(a.type)){s+=l||"";continue}}let i=a;switch(i.type){case"escape":{s+=n.text(i);break}case"html":{s+=n.html(i);break}case"link":{s+=n.link(i);break}case"image":{s+=n.image(i);break}case"checkbox":{s+=n.checkbox(i);break}case"strong":{s+=n.strong(i);break}case"em":{s+=n.em(i);break}case"codespan":{s+=n.codespan(i);break}case"br":{s+=n.br(i);break}case"del":{s+=n.del(i);break}case"text":{s+=n.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return s}},Z=class{options;block;constructor(t){this.options=t||O}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?L.lex:L.lexInline}provideParser(t=this.block){return t?I.parse:I.parseInline}},or=class{defaults=de();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=I;Renderer=Y;TextRenderer=ye;Lexer=L;Tokenizer=J;Hooks=Z;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{let r=s;for(let a of r.header)n=n.concat(this.walkTokens(a.tokens,e));for(let a of r.rows)for(let i of a)n=n.concat(this.walkTokens(i.tokens,e));break}case"list":{let r=s;n=n.concat(this.walkTokens(r.items,e));break}default:{let r=s;this.defaults.extensions?.childTokens?.[r.type]?this.defaults.extensions.childTokens[r.type].forEach(a=>{let i=r[a].flat(1/0);n=n.concat(this.walkTokens(i,e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let s={...n};if(s.async=this.defaults.async||s.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let a=e.renderers[r.name];a?e.renderers[r.name]=function(...i){let l=r.renderer.apply(this,i);return l===!1&&(l=a.apply(this,i)),l}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=e[r.level];a?a.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),s.extensions=e),n.renderer){let r=this.defaults.renderer||new Y(this.defaults);for(let a in n.renderer){if(!(a in r))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let i=a,l=n.renderer[i],o=r[i];r[i]=(...h)=>{let c=l.apply(r,h);return c===!1&&(c=o.apply(r,h)),c||""}}s.renderer=r}if(n.tokenizer){let r=this.defaults.tokenizer||new J(this.defaults);for(let a in n.tokenizer){if(!(a in r))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let i=a,l=n.tokenizer[i],o=r[i];r[i]=(...h)=>{let c=l.apply(r,h);return c===!1&&(c=o.apply(r,h)),c}}s.tokenizer=r}if(n.hooks){let r=this.defaults.hooks||new Z;for(let a in n.hooks){if(!(a in r))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let i=a,l=n.hooks[i],o=r[i];Z.passThroughHooks.has(a)?r[i]=h=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(a))return(async()=>{let u=await l.call(r,h);return o.call(r,u)})();let c=l.call(r,h);return o.call(r,c)}:r[i]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(r,h);return u===!1&&(u=await o.apply(r,h)),u})();let c=l.apply(r,h);return c===!1&&(c=o.apply(r,h)),c}}s.hooks=r}if(n.walkTokens){let r=this.defaults.walkTokens,a=n.walkTokens;s.walkTokens=function(i){let l=[];return l.push(a.call(this,i)),r&&(l=l.concat(r.call(this,i))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return L.lex(t,e??this.defaults)}parser(t,e){return I.parse(t,e??this.defaults)}parseMarkdown(t){return(e,n)=>{let s={...n},r={...this.defaults,...s},a=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&s.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=t),r.async)return(async()=>{let i=r.hooks?await r.hooks.preprocess(e):e,l=await(r.hooks?await r.hooks.provideLexer(t):t?L.lex:L.lexInline)(i,r),o=r.hooks?await r.hooks.processAllTokens(l):l;r.walkTokens&&await Promise.all(this.walkTokens(o,r.walkTokens));let h=await(r.hooks?await r.hooks.provideParser(t):t?I.parse:I.parseInline)(o,r);return r.hooks?await r.hooks.postprocess(h):h})().catch(a);try{r.hooks&&(e=r.hooks.preprocess(e));let i=(r.hooks?r.hooks.provideLexer(t):t?L.lex:L.lexInline)(e,r);r.hooks&&(i=r.hooks.processAllTokens(i)),r.walkTokens&&this.walkTokens(i,r.walkTokens);let l=(r.hooks?r.hooks.provideParser(t):t?I.parse:I.parseInline)(i,r);return r.hooks&&(l=r.hooks.postprocess(l)),l}catch(i){return a(i)}}}onError(t,e){return n=>{if(n.message+=`
59
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+z(n.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(n);throw n}}},H=new or;function E(t,e){return H.parse(t,e)}E.options=E.setOptions=function(t){return H.setOptions(t),E.defaults=H.defaults,We(E.defaults),E};E.getDefaults=de;E.defaults=O;E.use=function(...t){return H.use(...t),E.defaults=H.defaults,We(E.defaults),E};E.walkTokens=function(t,e){return H.walkTokens(t,e)};E.parseInline=H.parseInline;E.Parser=I;E.parser=I.parse;E.Renderer=Y;E.TextRenderer=ye;E.Lexer=L;E.lexer=L.lex;E.Tokenizer=J;E.Hooks=Z;E.parse=E;E.options;E.setOptions;E.use;E.walkTokens;E.parseInline;I.parse;L.lex;const lr=/\n[^\S\n]*(?:\n[^\S\n]*)+$/;function cr(t){return t.flatMap((e,n)=>{var s;if(e.type==="space"||((s=t[n+1])===null||s===void 0?void 0:s.type)==="space")return[e];const r=(e.raw||"").match(lr);return r?[{...e,raw:(e.raw||"").slice(0,-r[0].length)},{type:"space",raw:r[0]}]:[e]})}function ur(t,e){const n=e.split(`
60
- `).flatMap(s=>[s,""]).map(s=>`${t}${s}`).join(`
61
- `);return n.slice(0,n.length-1)}function hr(t,e){const n=[];return Array.from(t.entries()).forEach(([s,r])=>{if(!e){n.push(s);return}(e.marks||[]).find(a=>a.type===s&&G(a.attrs,r.attrs))||n.push(s)}),n}function pr(t,e){const n=[];return Array.from(e.entries()).forEach(([s,r])=>{const a=t.get(s);(!a||!G(a.attrs,r.attrs))&&n.push({type:s,mark:r})}),n}function dr(t,e,n,s){const r=!n,a=n&&(!n.marks||n.marks.length===0),i=n&&n.marks&&!s(e,new Map(n.marks.map(o=>[o.type,o]))),l=[];return(r||a||i)&&(n&&n.marks?Array.from(t.entries()).reverse().forEach(([o,h])=>{n.marks.find(c=>c.type===o&&G(c.attrs,h.attrs))||l.push(o)}):(r||a)&&l.push(...Array.from(t.keys()).reverse())),l}function fr(t,e){let n="";return Array.from(t.keys()).reverse().forEach(s=>{const r=e(s,t.get(s));r&&(n=r+n)}),t.clear(),n}function gr(t,e,n){let s="";return Array.from(t.entries()).forEach(([r,a])=>{const i=n(r,a);i&&(s+=i),e.set(r,a)}),s}function re(t){const e=(t.raw||t.text||"").match(/^(\s*)[-+*]\s+\[([ xX])\]\s+/);return e?{isTask:!0,checked:e[2].toLowerCase()==="x",indentLevel:e[1].length}:{isTask:!1,indentLevel:0}}function Q(t,e){return typeof t!="string"?"json":e}const mr=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","menu","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","circle","clippath","defs","ellipse","foreignobject","g","image","line","lineargradient","mask","path","polygon","polyline","radialgradient","rect","stop","switch","symbol","textpath","tspan","use","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"]),kr=/<\/?([a-zA-Z][\w-]*)/g;function xr(t){const e=[];let n;for(;(n=kr.exec(t))!==null;)e.push(n[1].toLowerCase());return e}function br(t){const e=t.toLowerCase();return e.includes("-")?!1:!mr.has(e)}function wr(t,e){return xr(t).some(n=>br(n)?!e.has(n):!1)}var ze=class{constructor(t){var e,n,s,r,a;this.activeParseLexer=null,this.extensionRanks=new Map,this.baseExtensions=[],this.extensions=[],this.codeTypes=new Set,this.schemaParseDomTagsCache=null,this.inlineNodeTypesCache=null,this.lastParseResult=null,this.markedInstance=(e=t?.marked)!==null&&e!==void 0?e:E,this.indentStyle=(n=t==null||(s=t.indentation)===null||s===void 0?void 0:s.style)!==null&&n!==void 0?n:"space",this.indentSize=(r=t==null||(a=t.indentation)===null||a===void 0?void 0:a.size)!==null&&r!==void 0?r:2,this.baseExtensions=t?.extensions||[],t?.markedOptions&&typeof this.markedInstance.setOptions=="function"&&this.markedInstance.setOptions(t.markedOptions),this.registry=new Map,this.nodeTypeRegistry=new Map,t?.extensions&&(this.baseExtensions=t.extensions,mt(kt(t.extensions)).forEach(i=>this.registerExtension(i)))}get instance(){return this.markedInstance}get indentCharacter(){return this.indentStyle==="space"?" ":" "}get indentString(){return this.indentCharacter.repeat(this.indentSize)}hasMarked(){return!!this.markedInstance}registerExtension(t){var e,n;this.extensions.push(t);const s=xt(D(t,"code")),r=t.name;s&&this.codeTypes.add(r),this.extensionRanks.has(r)||this.extensionRanks.set(r,this.extensionRanks.size);const a=D(t,"markdownTokenName")||r,i=D(t,"parseMarkdown"),l=D(t,"renderMarkdown"),o=D(t,"markdownTokenizer"),h=(e=D(t,"markdownOptions"))!==null&&e!==void 0?e:null,c={tokenName:a,nodeName:r,parseMarkdown:i,renderMarkdown:l,isIndenting:(n=h?.indentsContent)!==null&&n!==void 0?n:!1,htmlReopen:h?.htmlReopen,tokenizer:o};if(a&&i){const u=this.registry.get(a)||[];u.push(c),this.registry.set(a,u)}if(l){const u=this.nodeTypeRegistry.get(r)||[];u.push(c),this.nodeTypeRegistry.set(r,u)}o&&this.hasMarked()&&this.registerTokenizer(o)}createLexer(){return new this.markedInstance.Lexer(this.markedInstance.defaults)}createTokenizerHelpers(t){return{inlineTokens:e=>t.inlineTokens(e),blockTokens:e=>t.blockTokens(e)}}tokenizeInline(t){var e;return((e=this.activeParseLexer)!==null&&e!==void 0?e:this.createLexer()).inlineTokens(t)}registerTokenizer(t){if(!this.hasMarked())return;const{name:e,start:n,level:s="inline",tokenize:r}=t,a=this.createTokenizerHelpers.bind(this),i=this.createLexer.bind(this);let l;n?l=typeof n=="function"?n:h=>h.indexOf(n):l=h=>{const c=r(h,[],this.createTokenizerHelpers(this.createLexer()));return c&&c.raw?h.indexOf(c.raw):-1};const o={name:e,level:s,start:l,tokenizer(h,c){const u=this.lexer?a(this.lexer):a(i()),p=r(h,c,u);if(p&&p.type)return{...p,type:p.type||e,raw:p.raw||"",tokens:p.tokens||[]}},childTokens:[]};this.markedInstance.use({extensions:[o]})}getHandlersForToken(t){try{return this.registry.get(t)||[]}catch{return[]}}getHandlerForToken(t){const e=this.getHandlersForToken(t);if(e.length>0)return e[0];const n=this.getHandlersForNodeType(t);return n.length>0?n[0]:void 0}getHandlersForNodeType(t){try{return this.nodeTypeRegistry.get(t)||[]}catch{return[]}}serialize(t){if(!t)return"";const e=this.renderNodes(t,t);return this.isEmptyOutput(e)?"":e}isEmptyOutput(t){return!t||t.trim()===""?!0:t.replace(/&nbsp;/g,"").replace(/\u00A0/g,"").trim()===""}parse(t){if(!this.hasMarked())throw new Error("No marked instance available for parsing");const e=this.activeParseLexer,n=this.createLexer();this.activeParseLexer=n;try{const s=n.lex(t);return{type:"doc",content:this.parseTokens(s,!0)}}finally{this.activeParseLexer=e}}parseTokens(t,e=!1){const n=e?cr(t):t,s=n.reduce((i,l,o)=>(l.type!=="space"&&i.push(o),i),[]);let r=-1,a=0;return n.flatMap((i,l)=>{for(;a<s.length&&s[a]<l;)r=s[a],a+=1;if(e&&i.type==="space"){var o;const c=(o=s[a])!==null&&o!==void 0?o:-1;return this.createImplicitEmptyParagraphsFromSpace(i,r,c)}const h=this.parseToken(i,e);return h===null?[]:Array.isArray(h)?h:[h]})}createImplicitEmptyParagraphsFromSpace(t,e,n){const s=this.countParagraphSeparators(t.raw||"");if(s===0)return[];const r=Math.max(s-(e===-1||n===-1?0:1),0);return Array.from({length:r},()=>({type:"paragraph",content:[]}))}countParagraphSeparators(t){return(t.replace(/\r\n/g,`
62
- `).match(/\n\n/g)||[]).length}parseToken(t,e=!1){if(!t.type)return null;if(t.type==="list")return this.parseListToken(t);const n=this.getHandlersForToken(t.type),s=this.createParseHelpers();if(n.find(r=>{if(!r.parseMarkdown)return!1;const a=r.parseMarkdown(t,s),i=this.normalizeParseResult(a);return i&&(!Array.isArray(i)||i.length>0)?(this.lastParseResult=i,!0):!1})&&this.lastParseResult){const r=this.lastParseResult;return this.lastParseResult=null,r}return this.parseFallbackToken(t,e)}parseListToken(t){if(!t.items||t.items.length===0)return this.parseTokenWithHandlers(t);const e=t.items.some(l=>re(l).isTask),n=t.items.some(l=>!re(l).isTask);if(!e||!n||this.getHandlersForToken("taskList").length===0)return this.parseTokenWithHandlers(t);const s=[];let r=[],a=null;for(let l=0;l<t.items.length;l+=1){const o=t.items[l],{isTask:h,checked:c,indentLevel:u}=re(o);let p=o;if(h){const g=(o.raw||o.text||"").split(`
63
- `),x=g[0].match(/^\s*[-+*]\s+\[([ xX])\]\s+(.*)$/),w=x?x[2]:"";let b=[];if(g.length>1&&g.slice(1).join(`
64
- `).trim()){const y=g.slice(1),v=y.filter(M=>M.trim());if(v.length>0){const M=Math.min(...v.map(k=>k.length-k.trimStart().length)),m=y.map(k=>k.trim()?k.slice(M):"").join(`
65
- `).trim();m&&(b=this.markedInstance.lexer(`${m}
66
- `))}}p={type:"taskItem",raw:"",mainContent:w,indentLevel:u,checked:c??!1,text:w,tokens:this.tokenizeInline(w),nestedTokens:b}}const d=h?"taskList":"list";a!==d?(r.length>0&&s.push({type:a,items:r}),r=[p],a=d):r.push(p)}r.length>0&&s.push({type:a,items:r});const i=[];for(let l=0;l<s.length;l+=1){const o=s[l],h={...t,type:o.type,items:o.items},c=this.parseToken(h);c&&(Array.isArray(c)?i.push(...c):i.push(c))}return i.length>0?i:null}parseTokenWithHandlers(t){if(!t.type)return null;const e=this.getHandlersForToken(t.type),n=this.createParseHelpers();if(e.find(s=>{if(!s.parseMarkdown)return!1;const r=s.parseMarkdown(t,n),a=this.normalizeParseResult(r);return a&&(!Array.isArray(a)||a.length>0)?(this.lastParseResult=a,!0):!1})&&this.lastParseResult){const s=this.lastParseResult;return this.lastParseResult=null,s}return this.parseFallbackToken(t)}createParseHelpers(){return{parseInline:t=>this.parseInlineTokens(t),tokenizeInline:t=>this.tokenizeInline(t),parseChildren:t=>this.parseTokens(t),parseBlockChildren:t=>this.parseTokens(t,!0),createTextNode:(t,e)=>({type:"text",text:t,marks:e||void 0}),createNode:(t,e,n)=>{const s={type:t,attrs:e||void 0,content:n||void 0};return(!e||Object.keys(e).length===0)&&delete s.attrs,s},applyMark:(t,e,n)=>({mark:t,content:e,attrs:n&&Object.keys(n).length>0?n:void 0})}}escapeRegex(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}parseInlineTokens(t){const e=[];for(let i=0;i<t.length;i+=1){const l=t[i];if(l.type==="text")e.push({type:"text",text:ve(l.text||"")});else if(l.type==="escape")e.push({type:"text",text:l.text||""});else if(l.type==="html"){var n,s;const o=((n=(s=l.raw)!==null&&s!==void 0?s:l.text)!==null&&n!==void 0?n:"").toString(),h=/^<\/[\s]*[\w-]+/i.test(o),c=o.match(/^<[\s]*([\w-]+)(\s|>|\/|$)/i);if(!h&&c&&!/\/>$/.test(o)){const p=c[1],d=this.escapeRegex(p),g=new RegExp(`^<\\/\\s*${d}\\b`,"i");let x=-1;const w=[o];for(let b=i+1;b<t.length;b+=1){var r,a;const y=t[b],v=((r=(a=y.raw)!==null&&a!==void 0?a:y.text)!==null&&r!==void 0?r:"").toString();if(w.push(v),y.type==="html"&&g.test(v)){x=b;break}}if(x!==-1){const b=w.join(""),y={type:"html",raw:b,text:b,block:!1},v=this.parseHTMLToken(y);if(v){const M=this.normalizeParseResult(v);Array.isArray(M)?e.push(...M):M&&e.push(M)}i=x;continue}}const u=this.parseHTMLToken(l);if(u){const p=this.normalizeParseResult(u);Array.isArray(p)?e.push(...p):p&&e.push(p)}}else if(l.type){const o=this.getHandlerForToken(l.type);if(o&&o.parseMarkdown){const h=this.createParseHelpers(),c=o.parseMarkdown(l,h);if(this.isMarkResult(c)){const u=this.applyMarkToContent(c.mark,c.content,c.attrs);e.push(...u)}else{const u=this.normalizeParseResult(c);Array.isArray(u)?e.push(...u):u&&e.push(u)}}else l.tokens&&e.push(...this.parseInlineTokens(l.tokens))}}for(let i=e.length-1;i>0;i-=1){const l=e[i],o=e[i-1];if(l.type==="text"&&o.type==="text"){const h=l.marks||[],c=o.marks||[];bt(h,c)&&(o.text=(o.text||"")+(l.text||""),e.splice(i,1))}}return e}applyMarkToContent(t,e,n){return e.map(s=>{if(s.type==="text"){const r=s.marks||[],a=n?{type:t,attrs:n}:{type:t};return{...s,marks:[...r,a]}}return{...s,content:s.content?this.applyMarkToContent(t,s.content,n):void 0}})}isMarkResult(t){return t&&typeof t=="object"&&"mark"in t}normalizeParseResult(t){return t?this.isMarkResult(t)?t.content:t:null}parseFallbackToken(t,e=!1){switch(t.type){case"paragraph":return{type:"paragraph",content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"heading":return{type:"heading",attrs:{level:t.depth||1},content:t.tokens?this.parseInlineTokens(t.tokens):[]};case"text":return{type:"text",text:ve(t.text||"")};case"html":return this.parseHTMLToken(t);case"escape":return{type:"text",text:t.text||""};case"space":return null;default:return t.tokens?this.parseTokens(t.tokens,e):null}}parseHTMLToken(t){const e=t.text||t.raw||"";if(!e.trim())return null;if(this.isUnrecognizedHtml(e))return this.htmlAsLiteralText(e,!!t.block);if(typeof window>"u"||typeof window.DOMParser>"u")return this.htmlAsLiteralText(e,!!t.block);try{const n=wt(e,this.baseExtensions);if(n.type==="doc"&&n.content){if(t.block)return n.content;const s=this.toInlineContent(n.content);return s.length>0?s:null}return n}catch(n){throw new Error(`Failed to parse HTML in markdown: ${n}`)}}toInlineContent(t){const e=this.getInlineNodeTypes();return t.flatMap(n=>n.type&&e.has(n.type)?[n]:n.content?this.toInlineContent(n.content):[])}getInlineNodeTypes(){if(this.inlineNodeTypesCache)return this.inlineNodeTypesCache;const t=new Set(["text"]);try{const e=Se(this.baseExtensions);Object.values(e.nodes).forEach(n=>{n.isInline&&t.add(n.name)})}catch{}return this.inlineNodeTypesCache=t,t}isUnrecognizedHtml(t){return wr(t,this.getSchemaParseDomTags())}getSchemaParseDomTags(){if(this.schemaParseDomTagsCache)return this.schemaParseDomTagsCache;const t=new Set;try{const e=Se(this.baseExtensions),n=s=>{const r=s?.parseDOM;Array.isArray(r)&&r.forEach(a=>{if(typeof a?.tag=="string"){const i=a.tag.match(/^[a-zA-Z][\w-]*/);i&&t.add(i[0].toLowerCase())}})};Object.values(e.nodes).forEach(s=>n(s.spec)),Object.values(e.marks).forEach(s=>n(s.spec))}catch{}return this.schemaParseDomTagsCache=t,t}htmlAsLiteralText(t,e){const n=t.replace(/\s+$/,"");return n?e?{type:"paragraph",content:[{type:"text",text:n}]}:{type:"text",text:n}:null}encodeTextForMarkdown(t,e,n){return n?.type!=null&&this.codeTypes.has(n.type)||(e.marks||[]).some(s=>this.codeTypes.has(typeof s=="string"?s:s.type))?t:this.escapeMarkdownSyntax(yt(t))}escapeMarkdownSyntax(t){return t.replace(/([\\`*_[\]~])/g,"\\$1")}renderNodeToMarkdown(t,e,n=0,s=0,r={}){var a;if(t.type==="text")return this.encodeTextForMarkdown(t.text||"",t,e);if(!t.type)return"";const i=this.getHandlerForToken(t.type);if(!i)return"";const l=Array.isArray(e?.content)&&n>0?e.content[n-1]:void 0,o={renderChildren:(c,u)=>{const p=i.isIndenting?s+1:s;return!Array.isArray(c)&&c.content?this.renderNodes(c.content,t,u||"",n,p):this.renderNodes(c,t,u||"",n,p)},renderChild:(c,u)=>{const p=i.isIndenting?s+1:s;return this.renderNodeToMarkdown(c,t,u,p)},indent:c=>this.indentString+c,wrapInBlock:ur},h={index:n,level:s,parentType:e?.type,previousNode:l,meta:{parentAttrs:e?.attrs,...r}};return((a=i.renderMarkdown)===null||a===void 0?void 0:a.call(i,t,o,h))||""}renderNodes(t,e,n="",s=0,r=0){return Array.isArray(t)?this.renderNodesWithMarkBoundaries(t,e,n,r):t.type?this.renderNodeToMarkdown(t,e,s,r):""}renderNodesWithMarkBoundaries(t,e,n="",s=0){const r=[],a=new Map,i=new Set,l=new Map;return t.forEach((o,h)=>{const c=h<t.length-1?t[h+1]:null;if(o.type)if(o.type==="text"){let u=this.encodeTextForMarkdown(o.text||"",o,e);const p=new Map((o.marks||[]).map(m=>[m.type,m])),d=this.getMarksToOpenForSerialization(a,p,c),g=hr(p,c),x=g.filter(m=>a.has(m)),w=x.length>0&&d.length>0;let b="";if(g.length>0&&!w){const m=u.match(/(\s+)$/);m&&(b=m[1],u=u.slice(0,-b.length))}w||g.slice().reverse().forEach(m=>{if(!a.has(m))return;const k=p.get(m),T=this.getMarkClosing(m,k,l.get(m));T&&(u+=T),a.has(m)&&(a.delete(m),l.delete(m))});let y="";if(d.length>0){const m=u.match(/^(\s+)/);m&&(y=m[1],u=u.slice(y.length))}d.forEach(({type:m,mark:k})=>{const T=i.has(m)?"html":"markdown",A=this.getMarkOpening(m,k,T);A&&(u=A+u),l.set(m,T),i.delete(m)}),w||d.slice().reverse().forEach(({type:m,mark:k})=>{a.set(m,k)}),u=y+u;let v;if(w){const m=new Set((c?.marks||[]).map(A=>A.type));d.forEach(({type:A})=>{m.has(A)&&this.getHtmlReopenTags(A)&&i.add(A)});const k=Array.from(a.keys()),T=x.slice().sort((A,it)=>k.indexOf(it)-k.indexOf(A));v=[...d.map(A=>A.type),...T]}else v=dr(a,p,c,this.markSetsEqual.bind(this));let M="";if(v.length>0){const m=u.match(/(\s+)$/);m&&(M=m[1],u=u.slice(0,-M.length))}v.forEach(m=>{var k;const T=(k=a.get(m))!==null&&k!==void 0?k:p.get(m),A=this.getMarkClosing(m,T,l.get(m));A&&(u+=A),a.delete(m),l.delete(m)}),u+=M,u+=b,r.push(u)}else{const u=new Set((o.marks||[]).map(b=>b.type)),p=new Map,d=new Map;a.forEach((b,y)=>{if(u.has(y)){var v;p.set(y,b),d.set(y,(v=l.get(y))!==null&&v!==void 0?v:"markdown")}});const g=fr(a,(b,y)=>this.getMarkClosing(b,y,l.get(b)));l.clear();const x=this.renderNodeToMarkdown(o,e,h,s),w=o.type==="hardBreak"?"":gr(p,a,(b,y)=>{var v;const M=(v=d.get(b))!==null&&v!==void 0?v:"markdown";return l.set(b,M),this.getMarkOpening(b,y,M)});r.push(g+x+w)}}),r.join(n)}getMarkOpening(t,e,n="markdown"){if(n==="html"){var s;return((s=this.getHtmlReopenTags(t))===null||s===void 0?void 0:s.open)||""}const r=this.getHandlersForNodeType(t),a=r.length>0?r[0]:void 0;if(!a||!a.renderMarkdown)return"";const i="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:i}]};try{const o=a.renderMarkdown(l,{renderChildren:()=>i,renderChild:()=>i,indent:c=>c,wrapInBlock:(c,u)=>c+u},{index:0,level:0,parentType:"text",meta:{}}),h=o.indexOf(i);return h>=0?o.substring(0,h):""}catch(o){throw new Error(`Failed to get mark opening for ${t}: ${o}`)}}getMarkClosing(t,e,n="markdown"){if(n==="html"){var s;return((s=this.getHtmlReopenTags(t))===null||s===void 0?void 0:s.close)||""}const r=this.getHandlersForNodeType(t),a=r.length>0?r[0]:void 0;if(!a||!a.renderMarkdown)return"";const i="__TIPTAP_MARKDOWN_PLACEHOLDER__",l={type:t,attrs:e.attrs||{},content:[{type:"text",text:i}]};try{const o=a.renderMarkdown(l,{renderChildren:()=>i,renderChild:()=>i,indent:u=>u,wrapInBlock:(u,p)=>u+p},{index:0,level:0,parentType:"text",meta:{}}),h=o.indexOf(i),c=h+33;return h>=0?o.substring(c):""}catch(o){throw new Error(`Failed to get mark closing for ${t}: ${o}`)}}getHtmlReopenTags(t){const e=this.getHandlersForNodeType(t),n=e.length>0?e[0]:void 0;return n?.htmlReopen}markSetsEqual(t,e){return t.size!==e.size?!1:Array.from(t.entries()).every(([n,s])=>{const r=e.get(n);return r&&G(s.attrs,r.attrs)})}getMarksToOpenForSerialization(t,e,n){const s=pr(t,e);if(s.length<=1)return s;const r=n?.marks||[],a=(h,c)=>r.some(u=>u.type===h&&G(u.attrs,c)),i=(h,c)=>{var u,p;const d=(u=this.extensionRanks.get(h.type))!==null&&u!==void 0?u:Number.MAX_SAFE_INTEGER,g=(p=this.extensionRanks.get(c.type))!==null&&p!==void 0?p:Number.MAX_SAFE_INTEGER;return d!==g?g-d:h.type.localeCompare(c.type)},l=s.filter(h=>!a(h.type,h.mark.attrs)).sort(i),o=s.filter(h=>a(h.type,h.mark.attrs)).sort(i);return[...l,...o]}};const yr=ue.create({name:"markdown",addOptions(){return{indentation:{style:"space",size:2},marked:void 0,markedOptions:{}}},addCommands(){return{setContent:(t,e)=>{if(!e?.contentType)return P.setContent(t,e);if(Q(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.setContent(t,e);const n=this.editor.markdown.parse(t);return P.setContent(n,e)},insertContent:(t,e)=>{if(!e?.contentType)return P.insertContent(t,e);if(Q(t,e?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContent(t,e);const n=this.editor.markdown.parse(t);return P.insertContent(n,e)},insertContentAt:(t,e,n)=>{if(!n?.contentType)return P.insertContentAt(t,e,n);if(Q(e,n?.contentType)!=="markdown"||!this.editor.markdown)return P.insertContentAt(t,e,n);const s=this.editor.markdown.parse(e);return P.insertContentAt(t,s,n)}}},addStorage(){return{manager:new ze({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:[]})}},onBeforeCreate(){var t;if(this.editor.markdown){console.error("[tiptap][markdown]: There is already a `markdown` property on the editor instance. This might lead to unexpected behavior.");return}if(this.storage.manager=new ze({indentation:this.options.indentation,marked:this.options.marked,markedOptions:this.options.markedOptions,extensions:this.editor.extensionManager.baseExtensions}),this.editor.markdown=this.storage.manager,this.editor.getMarkdown=()=>this.storage.manager.serialize(this.editor.getJSON()),!this.editor.options.contentType||Q(this.editor.options.content,this.editor.options.contentType)!=="markdown")return;if(!this.editor.markdown)throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the Markdown extension is not added to the editor. Please add the Markdown extension to use this feature.');if(this.editor.options.content===void 0||typeof this.editor.options.content!="string")throw new Error('[tiptap][markdown]: The `contentType` option is set to "markdown", but the initial content is not a string. Please provide the initial content as a markdown string.');const e=this.editor.markdown.parse(this.editor.options.content);!((t=e.content)===null||t===void 0)&&t.length&&(this.editor.options.content=e)}});function Tr(t){const e=$.c(13),{node:n,selected:s,editor:r,deleteNode:a}=t,i=j(),l=typeof n.attrs.href=="string"?n.attrs.href:"",o=typeof n.attrs.name=="string"?n.attrs.name:"",h=s&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let c;e[0]!==h?(c=B(Wt,"select-none",h),e[0]=h,e[1]=c):c=e[1];let u;e[2]!==a||e[3]!==r.isEditable||e[4]!==i?(u=r.isEditable&&f.jsx("button",{type:"button","aria-label":i("markdownEditor.removeFile"),onMouseDown:vr,onClick:a,className:"shrink-0 rounded-lg p-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",children:f.jsx(Oe,{size:14})}),e[2]=a,e[3]=r.isEditable,e[4]=i,e[5]=u):u=e[5];let p;e[6]!==l||e[7]!==o||e[8]!==u?(p=f.jsx(Qt,{href:l,name:o,children:u}),e[6]=l,e[7]=o,e[8]=u,e[9]=p):p=e[9];let d;return e[10]!==c||e[11]!==p?(d=f.jsx(pe,{as:"span",className:c,children:p}),e[10]=c,e[11]=p,e[12]=d):d=e[12],d}function vr(t){return t.preventDefault()}function Sr(t){return t.replace(/([[\]])/g,"\\$1")}const Mr=Fe.create({name:"attachment",group:"inline",inline:!0,atom:!0,draggable:!0,addAttributes(){return{href:{default:null,parseHTML:t=>t.getAttribute("href"),renderHTML:t=>t.href?{href:t.href}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-name")||t.textContent,renderHTML:t=>t.name?{"data-name":t.name}:{}}}},parseHTML(){return[{tag:"a[data-attachment]",getAttrs:t=>Ge(t.getAttribute("href")??"")?null:!1}]},renderHTML({HTMLAttributes:t,node:e}){return["a",qe(t,{"data-attachment":""}),typeof e.attrs.name=="string"?e.attrs.name:""]},renderMarkdown:t=>{const e=typeof t.attrs?.href=="string"?t.attrs.href:"",n=typeof t.attrs?.name=="string"?t.attrs.name:"";return`[${Sr(n)}](${e})`},addNodeView(){return he(Tr)}});function Er(t){const e=$.c(6),{node:n,selected:s}=t,r=typeof n.attrs.name=="string"?n.attrs.name:"";let a;e[0]!==n.attrs.id||e[1]!==s?(a=B("select-none",Vt(typeof n.attrs.id=="string"?n.attrs.id:null),s&&"ring-2 ring-ring"),e[0]=n.attrs.id,e[1]=s,e[2]=a):a=e[2];let i;return e[3]!==r||e[4]!==a?(i=f.jsxs(pe,{as:"span","data-testid":"mention-chip",className:a,children:["@",r]}),e[3]=r,e[4]=a,e[5]=i):i=e[5],i}const Ar=Fe.create({name:"mention",group:"inline",inline:!0,atom:!0,selectable:!0,addAttributes(){return{id:{default:null,parseHTML:t=>t.getAttribute("data-mention-id"),renderHTML:t=>t.id?{"data-mention-id":t.id}:{}},name:{default:null,parseHTML:t=>t.getAttribute("data-mention-name"),renderHTML:t=>t.name?{"data-mention-name":t.name}:{}}}},parseHTML(){return[{tag:"span[data-mention-id]"}]},renderHTML({HTMLAttributes:t,node:e}){return["span",qe(t),`@${typeof e.attrs.name=="string"?e.attrs.name:""}`]},renderMarkdown:t=>{const e=typeof t.attrs?.id=="string"?t.attrs.id:"",n=typeof t.attrs?.name=="string"?t.attrs.name:"";return e?Xt(e,n):`@${n}`},addNodeView(){return he(Er)}}),Rr="studio.mention-members.",ce=new Map;function Pe(t){const e=ce.get(t);if(e)return e;try{const n=localStorage.getItem(t);if(!n)return;const s=JSON.parse(n);if(!Array.isArray(s))return;const r=s.filter(a=>!!a&&typeof a.id=="string"&&typeof a.name=="string");return ce.set(t,r),r}catch{return}}function _r(t,e){ce.set(t,e);try{localStorage.setItem(t,JSON.stringify(e))}catch{}}function $r(t,e){if(!t?.length)return e;const n=new Map(t.map(s=>[s.id,s]));return e.map(s=>{const r=n.get(s.id);return r&&r.name===s.name&&r.email===s.email&&r.image===s.image?r:s})}function Cr(t){return t.map(e=>({id:e.userId,name:e.user?.name?.trim()||e.user?.email?.trim()||"",email:e.user?.email??"",image:e.user?.image??null})).filter(e=>!!e.name).sort((e,n)=>e.name.localeCompare(n.name))}function Lr(t){const e=$.c(17),{locator:n}=ot(),s=lt(),r=`${Rr}${n}`;let a;e[0]!==n?(a=ut.mentionMembers(n),e[0]=n,e[1]=a):a=e[1];let i;e[2]!==r?(i=()=>Pe(r),e[2]=r,e[3]=i):i=e[3];let l;e[4]!==s||e[5]!==r?(l=async()=>{const d=await s.organization.listMembers(),g=$r(Pe(r),Cr(d?.data?.members??[]));return _r(r,g),g},e[4]=s,e[5]=r,e[6]=l):l=e[6];let o;e[7]!==t||e[8]!==a||e[9]!==i||e[10]!==l?(o={queryKey:a,enabled:t,staleTime:0,placeholderData:i,queryFn:l},e[7]=t,e[8]=a,e[9]=i,e[10]=l,e[11]=o):o=e[11];const h=ct(o);let c;e[12]!==h.data?(c=h.data??[],e[12]=h.data,e[13]=c):c=e[13];const u=h.isFetching&&!h.data;let p;return e[14]!==c||e[15]!==u?(p={members:c,loading:u},e[14]=c,e[15]=u,e[16]=p):p=e[16],p}const je={query:"",range:null,rect:null,editor:null};class Ir{state=je;listeners=new Set;dismissal=null;latched=!1;subscribe=e=>(this.listeners.add(e),()=>this.listeners.delete(e));getSnapshot=()=>this.state;set(e){this.state=e;for(const n of this.listeners)n()}close(){this.latched=!1,this.set(je)}}const Te=new Be("markdownEditorMention");function zr(t,e,n){t.chain().focus().insertContentAt(e,[{type:"mention",attrs:{id:n.id,name:n.name}},{type:"text",text:" "}]).run(),Ue(t.view,Te)}function Pr(t,e,n){const s=Math.min(e+n,t.content.size);return e>=s?"":t.textBetween(e,s,"","")}function st(t,e){const n=e.getSnapshot().range??void 0;n&&n.to>n.from&&(e.dismissal={from:n.from,text:t.state.doc.textBetween(n.from,n.to,"")}),Ue(t.view,Te)}function jr(t){return ue.create({name:"mentionSuggestion",addProseMirrorPlugins(){const e={editor:this.editor,char:"@",pluginKey:Te,allowedPrefixes:[" ",`
67
- `],allow:({state:n,range:s})=>{const r=t.dismissal;return r?s.from===r.from&&Pr(n.doc,r.from,r.text.length)===r.text?!1:(t.dismissal=null,!0):!0},items:()=>[],render:()=>({onStart:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onUpdate:n=>{t.set({query:n.query,range:n.range,rect:n.clientRect??null,editor:n.editor})},onKeyDown:({event:n})=>n.key==="Escape"?(st(this.editor,t),t.close(),!0):!1,onExit:()=>{t.latched||t.close()}})};return[Ct(e)]}})}const Ne=256,Nr=40,He=280,Hr=140,Or=[];function Dr(t){const e=$.c(5),{store:n,agents:s}=t,r=s===void 0?Or:s,a=_.useSyncExternalStore(n.subscribe,n.getSnapshot),i=a.range!==null;let l;return e[0]!==r||e[1]!==i||e[2]!==a||e[3]!==n?(l=i?f.jsx(Br,{store:n,state:a,agents:r}):null,e[0]=r,e[1]=i,e[2]=a,e[3]=n,e[4]=l):l=e[4],l}function Br({store:t,state:e,agents:n}){const s=j(),{members:r,loading:a}=Lr(!0),[i,l]=_.useState(e.query),[o,h]=_.useState(null),c=Fr(e.editor),u=c.getBoundingClientRect(),p=c===document.body?new DOMRect(0,0,window.innerWidth,window.innerHeight):u,d=e.rect?.()??new DOMRect(0,0,0,0),g=p.bottom-d.bottom,x=g<He&&d.top-p.top>g,w=(x?d.top-p.top:g)-8,b=Math.min(He,Math.max(w,Hr))-Nr,y={position:"absolute",width:Ne,left:Math.min(d.left,p.right-Ne-8)-u.left,...x?{bottom:u.bottom-d.top+6}:{top:d.bottom-u.top+6}},v=()=>{e.editor&&st(e.editor,t),t.close()},M=k=>{const T=k.relatedTarget;if((!T||e.editor?.view.dom.contains(T)===!0)&&t.latched){o?.focus();return}v()},m=k=>{!e.editor||!e.range||(zr(e.editor,e.range,k),t.close())};return ht.createPortal(f.jsx("div",{style:y,"data-testid":"mention-menu",className:"z-50 overflow-hidden rounded-lg bg-popover shadow-soft",children:f.jsxs(tn,{onKeyDown:k=>{k.key==="Escape"&&(k.preventDefault(),v(),e.editor?.commands.focus())},children:[f.jsx(nn,{ref:h,autoFocus:!0,onFocus:()=>{t.latched=!0},value:i,onValueChange:l,placeholder:s("markdownEditor.mentionSearch"),onBlur:M}),f.jsxs(rn,{style:{maxHeight:b},children:[a?f.jsx("div",{className:"flex items-center justify-center py-6",children:f.jsx(De,{size:"sm"})}):f.jsx(sn,{children:s("markdownEditor.mentionEmpty")}),n.map(k=>f.jsxs(Ee,{value:k.name,onSelect:()=>m(k),onMouseDown:T=>T.preventDefault(),className:"gap-2",children:[k.icon,f.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.name})]},k.id)),r.map(k=>f.jsxs(Ee,{value:`${k.name} ${k.email}`,onSelect:()=>m(k),onMouseDown:T=>T.preventDefault(),className:"gap-2",children:[f.jsx(pt,{url:k.image??void 0,fallback:k.name??"?",shape:"circle",size:"xs"}),f.jsx("span",{className:"min-w-0 flex-1 truncate",children:k.name})]},k.id))]})]})}),c)}function Fr(t){const e=t?.view.dom.closest('[role="dialog"]');return e instanceof HTMLElement?e:document.body}function qr(t){const e=$.c(16),{node:n,selected:s,editor:r,deleteNode:a}=t,i=j(),l=typeof n.attrs.src=="string"?n.attrs.src:"",o=typeof n.attrs.alt=="string"?n.attrs.alt:"";let h;e[0]!==o||e[1]!==i?(h=o||i("markdownEditor.imageAltFallback"),e[0]=o,e[1]=i,e[2]=h):h=e[2];const c=s&&"ring-2 ring-ring ring-offset-2 ring-offset-background";let u;e[3]!==c?(u=B("max-h-[420px] max-w-full rounded-lg border border-border object-contain",c),e[3]=c,e[4]=u):u=e[4];let p;e[5]!==l||e[6]!==h||e[7]!==u?(p=f.jsx("img",{src:l,alt:h,draggable:!1,className:u}),e[5]=l,e[6]=h,e[7]=u,e[8]=p):p=e[8];let d;e[9]!==a||e[10]!==r.isEditable||e[11]!==i?(d=r.isEditable&&f.jsx("button",{type:"button","aria-label":i("markdownEditor.removeImage"),onMouseDown:Ur,onClick:a,className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-lg bg-card text-muted-foreground opacity-0 shadow-edge transition-opacity hover:text-foreground focus-visible:opacity-100 group-hover/image:opacity-100",children:f.jsx(Oe,{size:14})}),e[9]=a,e[10]=r.isEditable,e[11]=i,e[12]=d):d=e[12];let g;return e[13]!==p||e[14]!==d?(g=f.jsxs(pe,{className:"group/image relative my-3 w-fit max-w-full",children:[p,d]}),e[13]=p,e[14]=d,e[15]=g):g=e[15],g}function Ur(t){return t.preventDefault()}const Zr=Yt.extend({addNodeView(){return he(qr)}}).configure({inline:!1,allowBase64:!1}),Gr={openOnClick:!1,autolink:!0,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}},Kr=Tt.extend({parseMarkdown:(t,e)=>{const n=typeof t.href=="string"?t.href:"";if(Ge(n))return e.createNode("attachment",{href:n,name:t.text??""});const s=Jt(n);return s?e.createNode("mention",{id:s,name:(t.text??"").replace(/^@/,"")}):e.applyMark("link",e.parseInline(t.tokens??[]),{href:n,title:t.title||null})}});function Wr(t="",e){return[St.configure({heading:{levels:[1,2,3]},underline:!1,link:!1}),Kr.configure(Gr),Lt.configure({placeholder:t}),en,vt,Mt.configure({nested:!0}),Zr,Mr,mn,Ar,...e?[jr(e)]:[],yr.configure({markedOptions:{breaks:!0}})]}const Qr=/^(\s*)([-*+]|\d+[.)])\s+\S/,Xr=/^\s*(```|~~~)/,Vr=/^\s+(?![-*+>#]|\d+[.)]\s)\S/;function Jr(t){const e=[];let n=!1,s=!1;for(const r of t.split(`
68
- `)){if(Xr.test(r)){n=!n,s=!1,e.push(r);continue}if(n){e.push(r);continue}if(Qr.test(r)){s=!0,e.push(r);continue}if(!r.trim()){s=!1,e.push(r);continue}if(s&&Vr.test(r)){e[e.length-1]=`${e[e.length-1]} ${r.trim()}`;continue}s=!1,e.push(r)}return e.join(`
69
- `)}function Yr(t){const e=$.c(12),{onFiles:n,disabled:s}=t,r=j(),a=_.useRef(null);let i;e[0]!==r?(i=r("markdownEditor.attachFile"),e[0]=r,e[1]=i):i=e[1];let l,o;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=()=>a.current?.click(),o=f.jsx(Bt,{size:16}),e[2]=l,e[3]=o):(l=e[2],o=e[3]);let h;e[4]!==s||e[5]!==i?(h=f.jsx(an,{type:"button",label:i,disabled:s,onClick:l,children:o}),e[4]=s,e[5]=i,e[6]=h):h=e[6];let c;e[7]!==n?(c=f.jsx("input",{ref:a,type:"file",multiple:!0,className:"hidden",onChange:p=>{const d=Array.from(p.target.files??[]);p.target.value="",d.length>0&&n(d)}}),e[7]=n,e[8]=c):c=e[8];let u;return e[9]!==h||e[10]!==c?(u=f.jsxs(f.Fragment,{children:[h,c]}),e[9]=h,e[10]=c,e[11]=u):u=e[11],u}function es(t){const e=$.c(6),{pending:n}=t,s=j();if(n===0)return null;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=f.jsx(De,{className:"size-3"}),e[0]=r):r=e[0];let a;e[1]!==n||e[2]!==s?(a=n===1?s("markdownEditor.uploading"):s("markdownEditor.uploadingCount",{count:String(n)}),e[1]=n,e[2]=s,e[3]=a):a=e[3];let i;return e[4]!==a?(i=f.jsxs("span",{className:"inline-flex items-center gap-1.5 text-xs text-muted-foreground","aria-live":"polite",role:"status",children:[r,a]}),e[4]=a,e[5]=i):i=e[5],i}const ts=["outline-none","[&>*:first-child]:mt-0 [&>*:last-child]:mb-0","[&_p]:my-3 [&_p]:leading-[1.5]","[&_h1]:my-3 [&_h1]:text-xl [&_h1]:font-semibold [&_h1]:leading-[1.5] [&_h1]:text-foreground","[&_h2]:my-3 [&_h2]:text-lg [&_h2]:font-semibold [&_h2]:leading-[1.5] [&_h2]:text-foreground","[&_h3]:my-3 [&_h3]:text-base [&_h3]:font-semibold [&_h3]:leading-[1.5] [&_h3]:text-foreground","[&_ul]:my-3 [&_ul]:list-disc [&_ul]:pl-5","[&_ol]:my-3 [&_ol]:list-decimal [&_ol]:pl-5","[&_li]:my-0.5 [&_li>p]:my-0","[&_blockquote]:my-2 [&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:text-muted-foreground","[&_code]:rounded [&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em]","[&_pre]:my-3 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:bg-muted [&_pre]:p-3 [&_pre]:font-mono [&_pre]:text-sm","[&_pre_code]:bg-transparent [&_pre_code]:p-0",$t,"[&_hr]:my-4 [&_hr]:border-border","[&_strong]:font-semibold [&_strong]:text-foreground","[&_table]:my-3 [&_table]:w-full [&_table]:table-fixed [&_table]:border-collapse","[&_th]:border [&_th]:border-border [&_th]:bg-muted [&_th]:p-2 [&_th]:text-left [&_th]:font-semibold","[&_td]:border [&_td]:border-border [&_td]:p-2 [&_td]:align-top","[&_th>p]:my-0 [&_td>p]:my-0","[&_ul[data-type=taskList]]:my-3 [&_ul[data-type=taskList]]:list-none [&_ul[data-type=taskList]]:pl-0","[&_li[data-type=taskItem]]:flex [&_li[data-type=taskItem]]:items-start [&_li[data-type=taskItem]]:gap-2","[&_li[data-type=taskItem]>label]:mt-1 [&_li[data-type=taskItem]>label]:shrink-0","[&_li[data-type=taskItem]>div]:min-w-0 [&_li[data-type=taskItem]>div>p]:my-0"].join(" "),ns=["[&_p.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_p.is-editor-empty:first-child::before]:text-muted-foreground/50","[&_p.is-editor-empty:first-child::before]:float-left","[&_p.is-editor-empty:first-child::before]:h-0","[&_p.is-editor-empty:first-child::before]:pointer-events-none"].join(" ");function rs(t){const e=$.c(10),{editor:n,mentions:s}=t,r=s.items;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=["markdown-editor-mentions"],e[0]=a):a=e[0];let i;e[1]!==r?(i=h=>{const{query:c}=h,u=c.trim().toLowerCase();return Promise.resolve(u?r.filter(p=>`${p.name} ${p.title??""}`.toLowerCase().includes(u)):r)},e[1]=r,e[2]=i):i=e[2];let l;e[3]!==n?(l=h=>{const{range:c,item:u}=h;n.chain().focus().insertContentAt(c,[{type:"text",text:`@${u.name}`,marks:u.href?[{type:"link",attrs:{href:u.href}}]:void 0},{type:"text",text:" "}]).run()},e[3]=n,e[4]=l):l=e[4];let o;return e[5]!==n||e[6]!==s.emptyLabel||e[7]!==i||e[8]!==l?(o=f.jsx(It,{editor:n,char:"@",pluginKey:"markdownMentionMenu",queryKey:a,queryFn:i,emptyLabel:s.emptyLabel,renderItem:ss,onSelect:l}),e[5]=n,e[6]=s.emptyLabel,e[7]=i,e[8]=l,e[9]=o):o=e[9],o}function ss(t){return f.jsxs("div",{className:"flex min-w-0 flex-col gap-0.5",children:[f.jsx("span",{className:"truncate font-medium",children:t.title??t.name}),t.description&&f.jsx("span",{className:"line-clamp-1 text-xs text-muted-foreground",children:t.description})]})}function xs({defaultValue:t,onChange:e,placeholder:n,editable:s=!0,attachments:r=!0,mentions:a,inline:i=!1}){const l=wn(r),[o]=_.useState(()=>new Ir),h=_.useRef(e);h.current=e;const c=Et({extensions:Wr(n,a?void 0:o),content:Jr(t),contentType:"markdown",editable:s,autofocus:i?"end":!1,editorProps:{attributes:{role:"textbox","aria-label":n??"","aria-multiline":"true",class:B(ts,!i&&"min-h-[200px] sm:min-h-[320px]",ns)},handlePaste:l.handlePaste,handleDrop:l.handleDrop},onUpdate:({editor:u,transaction:p})=>{p.docChanged&&h.current(u.getMarkdown())}});return c?f.jsxs("div",{className:"flex flex-col",children:[f.jsx(cn,{editor:c}),!a&&f.jsx(Dr,{store:o}),f.jsx(At,{editor:c,className:B(i?"text-sm text-foreground":"text-base text-muted-foreground")}),s&&a&&f.jsx(rs,{editor:c,mentions:a}),f.jsxs("div",{className:"mt-4 flex items-center gap-2 text-xs text-muted-foreground empty:mt-0",children:[s&&a?.hint&&f.jsx("span",{children:a.hint}),s&&r&&f.jsx(Yr,{onFiles:u=>l.uploadInto(c.view,u,c.state.selection.to)}),f.jsx(es,{pending:l.pending})]})]}):null}export{Yr as A,Ir as M,mn as U,Ar as a,yr as b,Zr as c,Mr as d,Te as e,Dr as f,es as g,xs as h,jr as m,wn as u};
@@ -1 +0,0 @@
1
- import{r as s,c3 as L,c4 as B,j as c,g4 as q,c9 as y,c7 as b,g3 as K,ca as E,g5 as g,e4 as T,cn as _,cg as U,cr as V}from"./index-Bj6_6zVx.js";var I="Radio",[z,w]=_(I),[H,W]=z(I),P=s.forwardRef((t,d)=>{const{__scopeRadio:o,name:n,checked:e=!1,required:r,disabled:a,value:l="on",onCheck:f,form:R,...v}=t,[p,m]=s.useState(null),i=b(d,x=>m(x)),u=s.useRef(!1),h=p?R||!!p.closest("form"):!0;return c.jsxs(H,{scope:o,checked:e,disabled:a,children:[c.jsx(y.button,{type:"button",role:"radio","aria-checked":e,"data-state":A(e),"data-disabled":a?"":void 0,disabled:a,value:l,...v,ref:i,onClick:E(t.onClick,x=>{e||f?.(),h&&(u.current=x.isPropagationStopped(),u.current||x.stopPropagation())})}),h&&c.jsx(S,{control:p,bubbles:!u.current,name:n,value:l,checked:e,required:r,disabled:a,form:R,style:{transform:"translateX(-100%)"}})]})});P.displayName=I;var k="RadioIndicator",G=s.forwardRef((t,d)=>{const{__scopeRadio:o,forceMount:n,...e}=t,r=W(k,o);return c.jsx(T,{present:n||r.checked,children:c.jsx(y.span,{"data-state":A(r.checked),"data-disabled":r.disabled?"":void 0,...e,ref:d})})});G.displayName=k;var X="RadioBubbleInput",S=s.forwardRef(({__scopeRadio:t,control:d,checked:o,bubbles:n=!0,...e},r)=>{const a=s.useRef(null),l=b(a,r),f=U(o),R=V(d);return s.useEffect(()=>{const v=a.current;if(!v)return;const p=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(p,"checked").set;if(f!==o&&i){const u=new Event("click",{bubbles:n});i.call(v,o),v.dispatchEvent(u)}},[f,o,n]),c.jsx(y.input,{type:"radio","aria-hidden":!0,defaultChecked:o,...e,tabIndex:-1,ref:l,style:{...e.style,...R,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});S.displayName=X;function A(t){return t?"checked":"unchecked"}var Y=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[J]=_(C,[g,w]),j=g(),N=w(),[Q,Z]=J(C),D=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,name:n,defaultValue:e,value:r,required:a=!1,disabled:l=!1,orientation:f,dir:R,loop:v=!0,onValueChange:p,...m}=t,i=j(o),u=L(R),[h,x]=B({prop:r,defaultProp:e??null,onChange:p,caller:C});return c.jsx(Q,{scope:o,name:n,required:a,disabled:l,value:h,onValueChange:x,children:c.jsx(q,{asChild:!0,...i,orientation:f,dir:u,loop:v,children:c.jsx(y.div,{role:"radiogroup","aria-required":a,"aria-orientation":f,"data-disabled":l?"":void 0,dir:u,...m,ref:d})})})});D.displayName=C;var M="RadioGroupItem",O=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,disabled:n,...e}=t,r=Z(M,o),a=r.disabled||n,l=j(o),f=N(o),R=s.useRef(null),v=b(d,R),p=r.value===e.value,m=s.useRef(!1);return s.useEffect(()=>{const i=h=>{Y.includes(h.key)&&(m.current=!0)},u=()=>m.current=!1;return document.addEventListener("keydown",i),document.addEventListener("keyup",u),()=>{document.removeEventListener("keydown",i),document.removeEventListener("keyup",u)}},[]),c.jsx(K,{asChild:!0,...l,focusable:!a,active:p,children:c.jsx(P,{disabled:a,required:r.required,checked:p,...f,...e,name:r.name,ref:v,onCheck:()=>r.onValueChange(e.value),onKeyDown:E(i=>{i.key==="Enter"&&i.preventDefault()}),onFocus:E(e.onFocus,()=>{m.current&&R.current?.click()})})})});O.displayName=M;var $="RadioGroupIndicator",F=s.forwardRef((t,d)=>{const{__scopeRadioGroup:o,...n}=t,e=N(o);return c.jsx(G,{...e,...n,ref:d})});F.displayName=$;var oe=D,re=O,te=F;export{re as I,oe as R,te as a};
@@ -1 +0,0 @@
1
- import{c as I,b as X,r as M,m as B,j as s,a6 as Re,e as nt,t as je,D as lt,v as ot,w as at,x as ct,y as dt,B as Fe,ax as ut,Y as ke,a7 as ft,E as H,X as mt,Z as ht,_ as pt,d as gt,aE as bt,l as Ye,H as xt,au as $e,L as Ge,$ as jt,aw as Ve,aF as vt,aG as yt,P as St}from"./index-Bj6_6zVx.js";import{u as Ie,c as Ze,g as wt,h as Ct,i as _t}from"./use-sidebar-collapsed-cUrAd04a.js";import{S as kt,a as Ot,b as Rt}from"./sheet-BWD81VUI.js";import{u as Et}from"./use-mobile-DoMXTDgT.js";import{u as zt,a as Dt,D as Nt,c as Tt,C as Lt,P as Pt}from"./task-key-DYtWVOhd.js";import{S as At,v as Mt,u as $t}from"./sortable.esm-CK9iNqPG.js";import{i as It}from"./Tool01-BdB8BwwT.js";import{t as Kt,u as Ft,v as Ut,w as Wt,A as Bt,x as Ue}from"./agent-icon-D3UAaAZc.js";import{s as Ht}from"./Plus-0DN1Gnym.js";import{a as Xt}from"./UserSquare-BaVg281r.js";import{a as Yt}from"./UserCheck01-BA8i8gC-.js";import{s as qe}from"./XClose-iDf6pWg-.js";import{T as ge,a as be,c as xe}from"./tooltip-D7UkTGEH.js";import{C as Pe,f as Gt,g as Vt,e as Zt}from"./context-menu-am6Pi9ET.js";import{a as qt,O as Je,w as Jt,b as Qt,c as es,E as ts,r as Oe,d as ss,e as rs,h as is,t as ns,f as Qe,m as ls,o as os}from"./use-org-notice-BNy_nTNB.js";import{C as as}from"./create-organization-dialog-CXfsogY0.js";import{P as cs}from"./project-apps-CszBh4SS.js";import{u as ds,a as us}from"./use-recent-apps-BX7LsNkB.js";import{a as fs}from"./use-navigate-to-agent-Cqha0CMq.js";import{a as ms,u as hs}from"./use-project-scope-h-e-yu96.js";import{C as We,a as ps,b as gs,c as bs,d as xs}from"./command-DNUfYvKL.js";import{u as js}from"./use-debounced-value-BlSQwJ-U.js";import{n as vs}from"./BookOpen01-78ULfEqE.js";import{F as ys,a as Ae,b as Ss,c as et}from"./feedback-BqoIMOg7.js";import{T as ws}from"./textarea-CShy6fKF.js";import{a as Cs}from"./thread-button-BBJoVBQl.js";function _s(t){const e=I.c(48),{open:i,onOpenChange:r,orgs:n,currentSlug:d,onSelect:l}=t,a=X(),[o,u]=M.useState("");let b;e[0]!==o?(b=o.trim(),e[0]=o,e[1]=b):b=e[1];const p=b,m=js(p,150),h=p.length>0,f=m===p,{hits:v,isSearching:j,isStale:C,isError:w}=qt(h?m:""),c=h?v:n;let x;e[2]!==r?(x=L=>{r(L),L||u("")},e[2]=r,e[3]=x):x=e[3];const g=x;let y;e[4]!==a?(y=a("sidebar.rail.searchOrganizations"),e[4]=a,e[5]=y):y=e[5];let S;e[6]!==a?(S=a("sidebar.rail.searchPlaceholder"),e[6]=a,e[7]=S):S=e[7];let k;e[8]!==a?(k=a("sidebar.rail.searchPlaceholder"),e[8]=a,e[9]=k):k=e[9];let _;e[10]!==o||e[11]!==k?(_=s.jsx(ps,{value:o,onValueChange:u,placeholder:k}),e[10]=o,e[11]=k,e[12]=_):_=e[12];const T=h&&(C||!f)&&"opacity-50";let E;e[13]!==T?(E=B(T),e[13]=T,e[14]=E):E=e[14];let O;e[15]!==w||e[16]!==h||e[17]!==a?(O=h&&w&&s.jsx(We,{children:a("sidebar.rail.searchFailed")}),e[15]=w,e[16]=h,e[17]=a,e[18]=O):O=e[18];let z;e[19]!==w||e[20]!==j||e[21]!==c.length||e[22]!==f||e[23]!==a?(z=!w&&f&&!j&&c.length===0&&s.jsx(We,{children:a("sidebar.rail.searchEmpty")}),e[19]=w,e[20]=j,e[21]=c.length,e[22]=f,e[23]=a,e[24]=z):z=e[24];let D;if(e[25]!==d||e[26]!==l||e[27]!==g||e[28]!==c||e[29]!==a){let L;e[31]!==d||e[32]!==l||e[33]!==g||e[34]!==a?(L=P=>s.jsxs(gs,{value:P.slug,onSelect:()=>{g(!1),P.slug!==d&&l(P.slug)},className:"gap-2.5",children:[s.jsx(Je,{org:P,size:"sm"}),s.jsx("span",{className:"min-w-0 flex-1 truncate",children:P.name}),P.slug===d&&s.jsx("span",{className:"text-meta shrink-0",children:a("sidebar.rail.currentOrganization")})]},P.id),e[31]=d,e[32]=l,e[33]=g,e[34]=a,e[35]=L):L=e[35],D=c.map(L),e[25]=d,e[26]=l,e[27]=g,e[28]=c,e[29]=a,e[30]=D}else D=e[30];let R;e[36]!==z||e[37]!==D||e[38]!==E||e[39]!==O?(R=s.jsxs(bs,{className:E,children:[O,z,D]}),e[36]=z,e[37]=D,e[38]=E,e[39]=O,e[40]=R):R=e[40];let A;return e[41]!==i||e[42]!==g||e[43]!==R||e[44]!==y||e[45]!==S||e[46]!==_?(A=s.jsxs(xs,{open:i,onOpenChange:g,title:y,description:S,shouldFilter:!1,children:[_,R]}),e[41]=i,e[42]=g,e[43]=R,e[44]=y,e[45]=S,e[46]=_,e[47]=A):A=e[47],A}function ks(t){const e=I.c(4),{size:i,className:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("path",{d:"M20.317 4.37a19.79 19.79 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.74 19.74 0 0 0 3.677 4.37a.07.07 0 0 0-.032.028C.533 9.046-.32 13.58.099 18.058a.082.082 0 0 0 .031.056 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.042-.106 13.1 13.1 0 0 1-1.872-.892.077.077 0 0 1-.008-.128c.126-.094.252-.192.372-.291a.074.074 0 0 1 .078-.01c3.927 1.793 8.18 1.793 12.061 0a.074.074 0 0 1 .079.009c.12.099.246.198.373.292a.077.077 0 0 1-.007.128 12.3 12.3 0 0 1-1.873.891.077.077 0 0 0-.041.107c.36.698.772 1.363 1.225 1.993a.076.076 0 0 0 .084.029 19.84 19.84 0 0 0 6.002-3.03.077.077 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.029ZM8.02 15.331c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.086-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.332-.946 2.418-2.157 2.418Z"}),e[0]=n):n=e[0];let d;return e[1]!==r||e[2]!==i?(d=s.jsx("svg",{width:i,height:i,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:r,children:n}),e[1]=r,e[2]=i,e[3]=d):d=e[3],d}const Os=250;function Rs(){return typeof navigator<"u"&&!!navigator.mediaDevices?.getDisplayMedia}function Be(t,e,i){return new Promise(r=>t.toBlob(r,e,i))}async function Es(){const t=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser"},audio:!1,preferCurrentTab:!0,selfBrowserSurface:"include"});try{const e=document.createElement("video");e.muted=!0,e.srcObject=t,await e.play(),await new Promise(d=>setTimeout(d,Os));const i=document.createElement("canvas");i.width=e.videoWidth,i.height=e.videoHeight,i.getContext("2d")?.drawImage(e,0,0),e.srcObject=null;let r=await Be(i,"image/png");if((!r||r.size>et)&&(r=await Be(i,"image/jpeg",.85)),!r)throw new Error("Could not encode the screenshot");const n=r.type==="image/png"?"png":"jpg";return new File([r],`screenshot.${n}`,{type:r.type})}finally{for(const e of t.getTracks())e.stop()}}function He({kind:t,open:e,onOpenChange:i}){const r=X(),n=t==="problem"?{title:r("sidebar.problem.title"),placeholder:r("sidebar.problem.placeholder"),sent:r("sidebar.problem.sent"),failed:r("sidebar.problem.failed")}:{title:r("sidebar.feedback.title"),placeholder:r("sidebar.feedback.placeholder"),sent:r("sidebar.feedback.sent"),failed:r("sidebar.feedback.failed")},{org:d}=Re(),[l,a]=M.useState(""),[o,u]=M.useState([]),[b,p]=M.useState(!1),m=()=>{for(const c of o)URL.revokeObjectURL(c.previewUrl);u([]),a("")},h=c=>{const x=c.filter(S=>Ss.includes(S.type)?S.size>et?(je.error(r("sidebar.feedback.screenshotTooLarge")),!1):!0:!1),g=Ae-o.length;x.length>g&&je.error(r("sidebar.feedback.tooManyScreenshots",{max:String(Ae)}));const y=x.slice(0,Math.max(g,0)).map(S=>({file:S,previewUrl:URL.createObjectURL(S)}));y.length>0&&u(S=>[...S,...y])},f=c=>{URL.revokeObjectURL(c.previewUrl),u(x=>x.filter(g=>g!==c))},v=async()=>{p(!0);try{h([await Es()])}catch(c){c instanceof DOMException&&c.name==="NotAllowedError"||(console.error("[feedback] screenshot failed",c),je.error(r("sidebar.feedback.screenshotFailed")))}finally{p(!1)}},j=c=>{const x=Array.from(c.clipboardData.files).filter(g=>g.type.startsWith("image/"));x.length!==0&&(c.preventDefault(),h(x))},C=nt({mutationFn:async()=>{const c=new FormData;c.set("kind",t),c.set("message",l.trim()),c.set("pageUrl",window.location.href);for(const g of o)c.append("screenshot",g.file);const x=await fetch(`/api/${encodeURIComponent(d.slug)}/feedback`,{method:"POST",body:c});if(!x.ok)throw new Error(`Feedback failed: ${x.status}`)},onSuccess:()=>{je.success(n.sent),m(),i(!1)},onError:()=>je.error(n.failed)}),w=l.trim().length>0&&!C.isPending;return s.jsx(lt,{open:e&&!b,onOpenChange:i,children:s.jsxs(ot,{className:"sm:max-w-lg","aria-describedby":void 0,children:[s.jsx(at,{children:s.jsx(ct,{children:n.title})}),s.jsx(ws,{autoFocus:!0,value:l,onChange:c=>a(c.target.value),onPaste:j,onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&(c.preventDefault(),w&&C.mutate())},placeholder:n.placeholder,className:"min-h-32 max-h-80",maxLength:ys}),o.length>0&&s.jsx("div",{className:"flex flex-wrap gap-2",children:o.map((c,x)=>s.jsxs("div",{className:"group relative size-20 overflow-hidden rounded-lg shadow-edge",children:[s.jsx("a",{href:c.previewUrl,target:"_blank",rel:"noreferrer",children:s.jsx("img",{src:c.previewUrl,alt:r("sidebar.feedback.screenshotAlt",{n:String(x+1)}),className:"size-full object-cover"})}),s.jsx("button",{type:"button",onClick:()=>f(c),"aria-label":r("sidebar.feedback.removeScreenshot"),className:"absolute top-1 right-1 flex size-5 items-center justify-center rounded-full bg-background/90 text-foreground opacity-0 shadow-edge transition-opacity group-hover:opacity-100 focus-visible:opacity-100",children:s.jsx(qe,{size:12})})]},c.previewUrl))}),s.jsxs(dt,{className:"sm:justify-between",children:[Rs()?s.jsxs(Fe,{type:"button",variant:"outline",onClick:v,disabled:o.length>=Ae,children:[s.jsx(Kt,{size:14}),r("sidebar.feedback.takeScreenshot")]}):s.jsx("span",{}),s.jsx(Fe,{type:"button",onClick:()=>C.mutate(),disabled:!w,children:C.isPending?r("sidebar.feedback.sending"):r("sidebar.feedback.send")})]})]})})}function ve(t){const e=I.c(11),{active:i,label:r,children:n}=t,d=i?"h-7 opacity-100":"h-2 opacity-0 group-hover/rail:opacity-60";let l;e[0]!==d?(l=B("w-1 rounded-r-full bg-foreground","transition-[height,opacity] duration-200 ease-[var(--ease-out-cubic)]","motion-reduce:transition-none",d),e[0]=d,e[1]=l):l=e[1];let a;e[2]!==l?(a=s.jsx("span",{"aria-hidden":!0,className:"absolute top-0 -left-2.5 flex h-9 items-center",children:s.jsx("span",{className:l})}),e[2]=l,e[3]=a):a=e[3];let o;e[4]!==i||e[5]!==r?(o=r&&s.jsx("span",{"aria-hidden":!0,className:B("line-clamp-2 w-full px-0.5 text-center text-2xs text-ellipsis transition-colors",i?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground"),children:r}),e[4]=i,e[5]=r,e[6]=o):o=e[6];let u;return e[7]!==n||e[8]!==a||e[9]!==o?(u=s.jsxs("div",{className:"group/rail relative flex w-full shrink-0 flex-col items-center gap-1",children:[a,n,o]}),e[7]=n,e[8]=a,e[9]=o,e[10]=u):u=e[10],u}const zs="https://docs.decocms.com/",Ds="https://discord.gg/EQkX7CymV";function Ns(){const t=I.c(39),e=X(),{org:i}=Re(),[r,n]=M.useState(null),d=!!i.id;let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=_=>{H("help_menu_dialog_opened",{kind:_}),n(_)},t[0]=l):l=t[0];const a=l;let o;t[1]!==e?(o=e("sidebar.help.button"),t[1]=e,t[2]=o):o=t[2];let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ut,{size:18}),t[3]=u):u=t[3];let b;t[4]!==o?(b=s.jsx(ge,{asChild:!0,children:s.jsx(mt,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":o,onClick:Ps,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring data-[state=open]:bg-sidebar-accent data-[state=open]:text-foreground",children:u})})}),t[4]=o,t[5]=b):b=t[5];let p;t[6]!==e?(p=e("sidebar.help.button"),t[6]=e,t[7]=p):p=t[7];let m;t[8]!==p?(m=s.jsx(be,{side:"right",children:p}),t[8]=p,t[9]=m):m=t[9];let h;t[10]!==b||t[11]!==m?(h=s.jsxs(xe,{children:[b,m]}),t[10]=b,t[11]=m,t[12]=h):h=t[12];let f;t[13]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(vs,{}),t[13]=f):f=t[13];let v;t[14]!==e?(v=e("sidebar.help.guides"),t[14]=e,t[15]=v):v=t[15];let j;t[16]!==v?(j=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:zs,target:"_blank",rel:"noopener noreferrer",onClick:Ls,children:[f,v]})}),t[16]=v,t[17]=j):j=t[17];let C;t[18]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(ks,{}),t[18]=C):C=t[18];let w;t[19]!==e?(w=e("sidebar.help.discord"),t[19]=e,t[20]=w):w=t[20];let c;t[21]!==w?(c=s.jsx(ke,{asChild:!0,children:s.jsxs("a",{href:Ds,target:"_blank",rel:"noopener noreferrer",onClick:Ts,children:[C,w]})}),t[21]=w,t[22]=c):c=t[22];let x;t[23]!==d||t[24]!==e?(x=d&&s.jsxs(s.Fragment,{children:[s.jsx(ut,{}),s.jsxs(ke,{onSelect:()=>a("problem"),children:[s.jsx(ft,{}),e("sidebar.help.reportProblem")]}),s.jsxs(ke,{onSelect:()=>a("feedback"),children:[s.jsx(Ft,{}),e("sidebar.feedback.button")]})]}),t[23]=d,t[24]=e,t[25]=x):x=t[25];let g;t[26]!==c||t[27]!==x||t[28]!==j?(g=s.jsxs(ht,{side:"right",align:"end",className:"w-56",children:[j,c,x]}),t[26]=c,t[27]=x,t[28]=j,t[29]=g):g=t[29];let y;t[30]!==g||t[31]!==h?(y=s.jsx(ve,{active:!1,children:s.jsxs(pt,{children:[h,g]})}),t[30]=g,t[31]=h,t[32]=y):y=t[32];let S;t[33]!==d||t[34]!==r?(S=d&&s.jsxs(s.Fragment,{children:[s.jsx(He,{kind:"problem",open:r==="problem",onOpenChange:_=>n(_?"problem":null)}),s.jsx(He,{kind:"feedback",open:r==="feedback",onOpenChange:_=>n(_?"feedback":null)})]}),t[33]=d,t[34]=r,t[35]=S):S=t[35];let k;return t[36]!==y||t[37]!==S?(k=s.jsxs(s.Fragment,{children:[y,S]}),t[36]=y,t[37]=S,t[38]=k):k=t[38],k}function Ts(){return H("help_menu_discord_opened")}function Ls(){return H("help_menu_guides_opened")}function Ps(){return H("help_menu_opened")}function As(t){return globalThis.addEventListener("resize",t),()=>globalThis.removeEventListener("resize",t)}const Ms=()=>Qe(globalThis.innerHeight),$s=()=>Qe(0);function Is(t){const e=I.c(59),{org:i,active:r,onSelect:n,pinned:d,onOpenSettings:l,onTogglePin:a,onHide:o}=t,u=X();let b;e[0]!==i.slug?(b={id:i.slug},e[0]=i.slug,e[1]=b):b=e[1];const{setNodeRef:p,listeners:m,transform:h,transition:f,isDragging:v}=$t(b);let j;e[2]!==h?(j=Lt.Transform.toString(h?{...h,x:0}:null),e[2]=h,e[3]=j):j=e[3];const C=v?1:void 0,w=`rail-org-${i.slug}`;let c;e[4]!==j||e[5]!==C||e[6]!==w||e[7]!==f?(c={transform:j,transition:f,zIndex:C,viewTransitionName:w},e[4]=j,e[5]=C,e[6]=w,e[7]=f,e[8]=c):c=e[8];const x=i.name,g=r||void 0,y=r?"opacity-100":"opacity-60 hover:scale-105 hover:opacity-100",S=n&&"cursor-pointer";let k;e[9]!==y||e[10]!==S?(k=B("relative flex shrink-0 items-center justify-center rounded-xl focus-ring","transition-[opacity,transform] duration-150 ease-out",y,S),e[9]=y,e[10]=S,e[11]=k):k=e[11];let _;e[12]!==i?(_=s.jsx(Je,{org:i,size:"lg"}),e[12]=i,e[13]=_):_=e[13];let T;e[14]!==d?(T=d&&s.jsx("span",{"aria-hidden":!0,className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar",children:s.jsx(Ue,{size:9})}),e[14]=d,e[15]=T):T=e[15];let E;e[16]!==n||e[17]!==i.name||e[18]!==k||e[19]!==_||e[20]!==T||e[21]!==g?(E=s.jsx(ge,{asChild:!0,children:s.jsx(Gt,{asChild:!0,children:s.jsxs("button",{type:"button","aria-label":x,"aria-current":g,onClick:n,className:k,children:[_,T]})})}),e[16]=n,e[17]=i.name,e[18]=k,e[19]=_,e[20]=T,e[21]=g,e[22]=E):E=e[22];let O;e[23]!==i.name?(O=s.jsx(be,{side:"right",children:i.name}),e[23]=i.name,e[24]=O):O=e[24];let z;e[25]!==E||e[26]!==O?(z=s.jsxs(xe,{children:[E,O]}),e[25]=E,e[26]=O,e[27]=z):z=e[27];let D;e[28]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Yt,{}),e[28]=D):D=e[28];let R;e[29]!==u?(R=u("sidebar.rail.organizationSettings"),e[29]=u,e[30]=R):R=e[30];let A;e[31]!==l||e[32]!==R?(A=s.jsxs(Pe,{onSelect:l,children:[D,R]}),e[31]=l,e[32]=R,e[33]=A):A=e[33];let L;e[34]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ue,{}),e[34]=L):L=e[34];let P;e[35]!==d||e[36]!==u?(P=u(d?"sidebar.rail.unpinOrganization":"sidebar.rail.pinOrganization"),e[35]=d,e[36]=u,e[37]=P):P=e[37];let F;e[38]!==a||e[39]!==P?(F=s.jsxs(Pe,{onSelect:a,children:[L,P]}),e[38]=a,e[39]=P,e[40]=F):F=e[40];let U;e[41]!==o||e[42]!==u?(U=o&&s.jsxs(Pe,{onSelect:o,children:[s.jsx(It,{}),u("sidebar.rail.hideOrganization")]}),e[41]=o,e[42]=u,e[43]=U):U=e[43];let Y;e[44]!==A||e[45]!==F||e[46]!==U?(Y=s.jsxs(Vt,{children:[A,F,U]}),e[44]=A,e[45]=F,e[46]=U,e[47]=Y):Y=e[47];let K;e[48]!==z||e[49]!==Y?(K=s.jsxs(Zt,{children:[z,Y]}),e[48]=z,e[49]=Y,e[50]=K):K=e[50];let W;e[51]!==r||e[52]!==K?(W=s.jsx(ve,{active:r,children:K}),e[51]=r,e[52]=K,e[53]=W):W=e[53];let G;return e[54]!==m||e[55]!==p||e[56]!==W||e[57]!==c?(G=s.jsx("div",{ref:p,...m,style:c,className:"w-full shrink-0 touch-none",children:W}),e[54]=m,e[55]=p,e[56]=W,e[57]=c,e[58]=G):G=e[58],G}function Ks(t){const e=I.c(64),{project:i,orgSlug:r,active:n,onClose:d,onNavigate:l}=t,a=X();let o,u,b,p,m,h,f,v,j,C,w;if(e[0]!==n||e[1]!==l||e[2]!==r||e[3]!==i.icon||e[4]!==i.id||e[5]!==i.title){const L=Wt(i.icon,i.title);w="group/rail relative flex w-full flex-col items-center gap-1",b=xe,u=ge,C=!0,o=Ge,p=jt.root,e[17]!==r||e[18]!==i.id?(m={org:r,agentId:i.id},e[17]=r,e[18]=i.id,e[19]=m):m=e[19],h=i.title,f=n||void 0,e[20]!==l?(v=()=>{H("org_rail_recent_project_opened"),l?.()},e[20]=l,e[21]=v):v=e[21],j=B("flex shrink-0 rounded-lg focus-ring",L.text,n&&"ring-[1.5px] ring-current"),e[0]=n,e[1]=l,e[2]=r,e[3]=i.icon,e[4]=i.id,e[5]=i.title,e[6]=o,e[7]=u,e[8]=b,e[9]=p,e[10]=m,e[11]=h,e[12]=f,e[13]=v,e[14]=j,e[15]=C,e[16]=w}else o=e[6],u=e[7],b=e[8],p=e[9],m=e[10],h=e[11],f=e[12],v=e[13],j=e[14],C=e[15],w=e[16];let c;e[22]!==i.icon||e[23]!==i.title?(c=s.jsx(Bt,{icon:i.icon,name:i.title,size:"sm",className:"size-8 rounded-lg"}),e[22]=i.icon,e[23]=i.title,e[24]=c):c=e[24];let x;e[25]!==o||e[26]!==p||e[27]!==m||e[28]!==h||e[29]!==f||e[30]!==v||e[31]!==j||e[32]!==c?(x=s.jsx(o,{to:p,params:m,"aria-label":h,"aria-current":f,onClick:v,className:j,children:c}),e[25]=o,e[26]=p,e[27]=m,e[28]=h,e[29]=f,e[30]=v,e[31]=j,e[32]=c,e[33]=x):x=e[33];let g;e[34]!==u||e[35]!==x||e[36]!==C?(g=s.jsx(u,{asChild:C,children:x}),e[34]=u,e[35]=x,e[36]=C,e[37]=g):g=e[37];let y;e[38]!==i.title?(y=s.jsx(be,{side:"right",children:i.title}),e[38]=i.title,e[39]=y):y=e[39];let S;e[40]!==b||e[41]!==g||e[42]!==y?(S=s.jsxs(b,{children:[g,y]}),e[40]=b,e[41]=g,e[42]=y,e[43]=S):S=e[43];const k=n?"font-medium text-sidebar-foreground":"text-muted-foreground group-hover/rail:text-sidebar-foreground";let _;e[44]!==k?(_=B("line-clamp-2 w-full text-center text-2xs break-words transition-colors",k),e[44]=k,e[45]=_):_=e[45];let T;e[46]!==i.title||e[47]!==_?(T=s.jsx("span",{"aria-hidden":!0,className:_,children:i.title}),e[46]=i.title,e[47]=_,e[48]=T):T=e[48];let E;e[49]!==i.title||e[50]!==a?(E=a("sidebar.rail.closeApp",{name:i.title}),e[49]=i.title,e[50]=a,e[51]=E):E=e[51];let O;e[52]!==d?(O=()=>{H("org_rail_recent_project_closed"),d()},e[52]=d,e[53]=O):O=e[53];let z,D;e[54]===Symbol.for("react.memo_cache_sentinel")?(z=B("absolute -top-1.5 right-[calc(50%-1.25rem)] flex size-4 cursor-pointer items-center justify-center rounded-full","bg-sidebar-accent text-muted-foreground ring-2 ring-sidebar hover:text-foreground","opacity-0 transition-opacity duration-150 group-hover/rail:opacity-100 focus-visible:opacity-100 focus-visible:outline-none"),D=s.jsx(qe,{size:10}),e[54]=z,e[55]=D):(z=e[54],D=e[55]);let R;e[56]!==E||e[57]!==O?(R=s.jsx("button",{type:"button","aria-label":E,onClick:O,className:z,children:D}),e[56]=E,e[57]=O,e[58]=R):R=e[58];let A;return e[59]!==S||e[60]!==T||e[61]!==R||e[62]!==w?(A=s.jsxs("div",{className:w,children:[S,T,R]}),e[59]=S,e[60]=T,e[61]=R,e[62]=w,e[63]=A):A=e[63],A}const Fs={"site-editor":"/site-editor"};function Us(t){const e=I.c(26),{app:i}=t,r=X(),n=cs[i],d=Fs[i];if(!n||!d)return null;let l;e[0]!==n.labelKey||e[1]!==r?(l=r(n.labelKey),e[0]=n.labelKey,e[1]=r,e[2]=l):l=e[2];let a;e[3]!==n.labelKey||e[4]!==r?(a=r(n.labelKey),e[3]=n.labelKey,e[4]=r,e[5]=a):a=e[5];let o;e[6]!==n.tone?(o=B("flex size-9 shrink-0 items-center justify-center rounded-xl focus-ring opacity-100",n.tone),e[6]=n.tone,e[7]=o):o=e[7];let u;e[8]!==n.Icon?(u=s.jsx(n.Icon,{size:18}),e[8]=n.Icon,e[9]=u):u=e[9];let b;e[10]!==a||e[11]!==o||e[12]!==u||e[13]!==d?(b=s.jsx(ge,{asChild:!0,children:s.jsx(Ge,{to:d,"aria-label":a,"aria-current":"page","data-testid":"org-rail-local-app",className:o,children:u})}),e[10]=a,e[11]=o,e[12]=u,e[13]=d,e[14]=b):b=e[14];let p;e[15]!==n.labelKey||e[16]!==r?(p=r(n.labelKey),e[15]=n.labelKey,e[16]=r,e[17]=p):p=e[17];let m;e[18]!==p?(m=s.jsx(be,{side:"right",children:p}),e[18]=p,e[19]=m):m=e[19];let h;e[20]!==b||e[21]!==m?(h=s.jsxs(xe,{children:[b,m]}),e[20]=b,e[21]=m,e[22]=h):h=e[22];let f;return e[23]!==l||e[24]!==h?(f=s.jsx(ve,{active:!0,label:l,children:h}),e[23]=l,e[24]=h,e[25]=f):f=e[25],f}function Ws(){const{org:t}=Re();return ds(t.slug),null}function tt(t){const e=I.c(77),{onNavigate:i}=t===void 0?{}:t,r=X(),n=gt(),{org:d}=Re(),l=bt();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={select:Ys},e[0]=a):a=e[0];const o=Ye(a);let u;e[1]!==o||e[2]!==l?(u=o?l({to:"/$org",fuzzy:!0,pending:!0}):!1,e[1]=o,e[2]=l,e[3]=u):u=e[3];const b=u,p=b?b.org:d.slug,{data:m}=xt(),[h,f]=M.useState(!1),[v,j]=M.useState(!1),C=Ie(),{recent:w,forget:c}=fs(d.slug),{projects:x}=ms(),g=hs(),y=us(),S=y&&y.projectId===null?y.app:null,k=S?[]:w.flatMap(N=>x.filter($=>$.id===N)),_=Jt(m??[],d),{recent:T}=Qt(),E=es();let O;e[4]===Symbol.for("react.memo_cache_sentinel")?(O=Ve.railOrgPrefs(),e[4]=O):O=e[4];const[z,D]=$e(O,ts),R=Oe(z),A=M.useSyncExternalStore(As,Ms,$s),{shown:L}=ss(rs(_,R,d.slug),T,d.slug,A,R.pinned);let P;e[5]===Symbol.for("react.memo_cache_sentinel")?(P={activationConstraint:{distance:8}},e[5]=P):P=e[5];const F=zt(Dt(Pt,P)),U=N=>{const{active:$,over:Ke}=N;Ke&&(H("org_rail_reordered"),D(it=>ls(Oe(it),L.map(Xs),String($.id),String(Ke.id))))},Y=N=>{i?.(),n({to:"/$org/home",params:{org:N},viewTransition:!0})},K=N=>{H("org_rail_travel"),i?.(),E(N,L.map(Hs))},W=()=>{if(H("org_rail_search_opened"),!d.id){j(!0);return}i?.(),os()},G=!C&&"border-r border-sidebar-border";let V;e[6]!==G?(V=B("flex w-[68px] shrink-0 flex-col bg-sidebar",G),e[6]=G,e[7]=V):V=e[7];const rt="flex min-h-0 flex-1 flex-col items-center gap-2.5 overflow-y-auto px-2.5 pt-3 pb-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";let Z;e[8]!==r?(Z=r("sidebar.rail.ariaLabel"),e[8]=r,e[9]=Z):Z=e[9];const Ee=Nt,ze=Tt,De=At,Ne=L.map(Bs),Te=Mt,Le=L.map(N=>s.jsxs(M.Fragment,{children:[s.jsx(Is,{org:N,active:N.slug===p,pinned:R.pinned.includes(N.slug),onSelect:N.slug!==d.slug?()=>K(N.slug):g?()=>Y(N.slug):void 0,onOpenSettings:()=>{i?.(),n({to:"/$org/settings",params:{org:N.slug},search:{thread:void 0}})},onTogglePin:()=>D($=>ns(Oe($),N.slug)),onHide:N.slug===d.slug?void 0:()=>D($=>is(Oe($),N.slug))}),N.slug===d.slug&&k.length>0&&s.jsx("div",{style:{viewTransitionName:"rail-projects"},className:"-mx-1.5 flex w-[calc(100%+0.75rem)] flex-col items-center gap-3 rounded-[12px] bg-foreground/4 px-1 py-3",children:k.map($=>s.jsx(Ks,{project:$,orgSlug:d.slug,active:g===$.id,onClose:()=>c($.id),onNavigate:i},$.id))})]},N.id));let q;e[10]!==De||e[11]!==Ne||e[12]!==Te||e[13]!==Le?(q=s.jsx(De,{items:Ne,strategy:Te,children:Le}),e[10]=De,e[11]=Ne,e[12]=Te,e[13]=Le,e[14]=q):q=e[14];let J;e[15]!==Ee||e[16]!==U||e[17]!==F||e[18]!==ze||e[19]!==q?(J=s.jsx(Ee,{sensors:F,collisionDetection:ze,onDragEnd:U,children:q}),e[15]=Ee,e[16]=U,e[17]=F,e[18]=ze,e[19]=q,e[20]=J):J=e[20];let Q;e[21]!==S?(Q=S&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"my-2 h-px w-6 shrink-0 bg-sidebar-border","aria-hidden":!0}),s.jsx(Us,{app:S})]}),e[21]=S,e[22]=Q):Q=e[22];let ee;e[23]!==J||e[24]!==Q||e[25]!==Z?(ee=s.jsxs("div",{className:rt,"aria-label":Z,children:[J,Q]}),e[23]=J,e[24]=Q,e[25]=Z,e[26]=ee):ee=e[26];let te;e[27]!==r?(te=r("sidebar.rail.search"),e[27]=r,e[28]=te):te=e[28];let ye;e[29]===Symbol.for("react.memo_cache_sentinel")?(ye=s.jsx(Xt,{size:18}),e[29]=ye):ye=e[29];let se;e[30]!==W||e[31]!==te?(se=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":te,"aria-keyshortcuts":"Meta+K Control+K",onClick:W,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:ye})}),e[30]=W,e[31]=te,e[32]=se):se=e[32];let re;e[33]!==r?(re=r("sidebar.rail.search"),e[33]=r,e[34]=re):re=e[34];let Se;e[35]===Symbol.for("react.memo_cache_sentinel")?(Se=s.jsx("span",{className:"ml-2 text-muted-foreground",children:vt.commandPalette.keys.join("")}),e[35]=Se):Se=e[35];let ie;e[36]!==re?(ie=s.jsxs(be,{side:"right",children:[re,Se]}),e[36]=re,e[37]=ie):ie=e[37];let ne;e[38]!==se||e[39]!==ie?(ne=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[se,ie]})}),e[38]=se,e[39]=ie,e[40]=ne):ne=e[40];let le;e[41]!==r?(le=r("sidebar.picker.newOrganization"),e[41]=r,e[42]=le):le=e[42];let oe;e[43]!==f?(oe=()=>f(!0),e[43]=f,e[44]=oe):oe=e[44];let we;e[45]===Symbol.for("react.memo_cache_sentinel")?(we=s.jsx(Ht,{size:18}),e[45]=we):we=e[45];let ae;e[46]!==le||e[47]!==oe?(ae=s.jsx(ge,{asChild:!0,children:s.jsx("button",{type:"button","aria-label":le,onClick:oe,className:"flex size-9 shrink-0 cursor-pointer items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-sidebar-accent hover:text-foreground focus-ring",children:we})}),e[46]=le,e[47]=oe,e[48]=ae):ae=e[48];let ce;e[49]!==r?(ce=r("sidebar.picker.newOrganization"),e[49]=r,e[50]=ce):ce=e[50];let de;e[51]!==ce?(de=s.jsx(be,{side:"right",children:ce}),e[51]=ce,e[52]=de):de=e[52];let ue;e[53]!==ae||e[54]!==de?(ue=s.jsx(ve,{active:!1,children:s.jsxs(xe,{children:[ae,de]})}),e[53]=ae,e[54]=de,e[55]=ue):ue=e[55];let Ce;e[56]===Symbol.for("react.memo_cache_sentinel")?(Ce=s.jsx(Ns,{}),e[56]=Ce):Ce=e[56];let fe;e[57]!==ne||e[58]!==ue?(fe=s.jsxs("div",{className:"flex shrink-0 flex-col items-center gap-1 px-2.5 pt-2 pb-3",children:[ne,ue,Ce]}),e[57]=ne,e[58]=ue,e[59]=fe):fe=e[59];let me;e[60]!==ee||e[61]!==fe||e[62]!==V?(me=s.jsxs("div",{className:V,children:[ee,fe]}),e[60]=ee,e[61]=fe,e[62]=V,e[63]=me):me=e[63];let he;e[64]!==d.slug||e[65]!==_||e[66]!==v||e[67]!==j||e[68]!==K?(he=s.jsx(_s,{open:v,onOpenChange:j,orgs:_,currentSlug:d.slug,onSelect:K}),e[64]=d.slug,e[65]=_,e[66]=v,e[67]=j,e[68]=K,e[69]=he):he=e[69];let pe;e[70]!==h||e[71]!==f?(pe=s.jsx(as,{open:h,onOpenChange:f}),e[70]=h,e[71]=f,e[72]=pe):pe=e[72];let _e;return e[73]!==me||e[74]!==he||e[75]!==pe?(_e=s.jsxs(s.Fragment,{children:[me,he,pe]}),e[73]=me,e[74]=he,e[75]=pe,e[76]=_e):_e=e[76],_e}function Bs(t){return t.slug}function Hs(t){return t.slug}function Xs(t){return t.slug}function Ys(t){return t.isLoading}function Gs(t){const e=I.c(15),{width:i,minWidth:r,maxWidth:n,onPointerDown:d,onKeyDown:l,onDoubleClick:a}=t,o=X(),{isMobile:u}=Ze(),b=Ie();if(u||b)return null;let p;e[0]!==o?(p=o("sidebar.sidebarResizeHandle.ariaLabel"),e[0]=o,e[1]=p):p=e[1];let m;e[2]!==o?(m=o("sidebar.sidebarResizeHandle.title"),e[2]=o,e[3]=m):m=e[3];let h,f;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={left:"var(--sidebar-width)"},f=s.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border group-focus-visible/resize:bg-ring"}),e[4]=h,e[5]=f):(h=e[4],f=e[5]);let v;return e[6]!==n||e[7]!==r||e[8]!==a||e[9]!==l||e[10]!==d||e[11]!==p||e[12]!==m||e[13]!==i?(v=s.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":p,"aria-valuenow":i,"aria-valuemin":r,"aria-valuemax":n,title:m,tabIndex:0,onPointerDown:d,onKeyDown:l,onDoubleClick:a,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize focus-visible:outline-none",style:h,children:f}),e[6]=n,e[7]=r,e[8]=a,e[9]=l,e[10]=d,e[11]=p,e[12]=m,e[13]=i,e[14]=v):v=e[14],v}const Me=400,Xe=16,Vs="sidebar.width.v2";function Zs(){const t=I.c(14),e=qs;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i=f=>typeof f=="number"?e(f):192,t[0]=i):i=t[0];const[r,n]=$e(Vs,i),d=M.useRef(null);let l;t[1]!==n||t[2]!==r?(l=f=>{f.preventDefault();const v=f.clientX,j=e(r),C=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),w=C?Array.from(C.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const g of w)g.style.transition="none";const c=g=>{const y=e(j+(g.clientX-v));C?.style.setProperty("--sidebar-width",`${y}px`)},x=g=>{const y=e(j+(g.clientX-v));n(y);for(const S of w)S.style.transition="";window.removeEventListener("pointermove",c),window.removeEventListener("pointerup",x),window.removeEventListener("pointercancel",x),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",c),window.addEventListener("pointerup",x),window.addEventListener("pointercancel",x)},t[1]=n,t[2]=r,t[3]=l):l=t[3];const a=l;let o;t[4]!==n?(o=()=>{n(192)},t[4]=n,t[5]=o):o=t[5];const u=o;let b;t[6]!==n||t[7]!==r?(b=f=>{if(f.key==="ArrowLeft")n(e(r-Xe));else if(f.key==="ArrowRight")n(e(r+Xe));else if(f.key==="Home")n(192);else if(f.key==="End")n(Me);else return;f.preventDefault()},t[6]=n,t[7]=r,t[8]=b):b=t[8];const p=b,m=e(r);let h;return t[9]!==p||t[10]!==a||t[11]!==u||t[12]!==m?(h={width:m,minWidth:192,maxWidth:Me,wrapperRef:d,onStartResize:a,onKeyDownResize:p,resetWidth:u},t[9]=p,t[10]=a,t[11]=u,t[12]=m,t[13]=h):h=t[13],h}function qs(t){return Math.max(192,Math.min(Me,t))}const st=M.createContext(null);function Js(){const t=M.use(st);if(!t)throw new Error("Layout regions require a Layout");return t}function Qs({children:t,notice:e,outsideOrg:i}){const r=Et(),[n,d]=$e(Ve.sidebarOpen(),!0),l=Zs(),a=Ye({select:m=>yt(m.location.state)}),[o,u]=M.useState(!1);!a&&o&&u(!1);const b=a&&!o?!1:n,p=m=>{if(!a){d(m);return}u(m),m&&!n&&d(!0)};return s.jsx(st,{value:{isMobile:r,resize:l},children:s.jsx(wt,{open:b,onOpenChange:p,children:s.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[e,s.jsxs("div",{className:"flex flex-1 flex-row min-h-0",children:[!i&&s.jsx(Ws,{}),!r&&(i?.rail??!0)&&s.jsx(tt,{}),s.jsx(Ct,{ref:l.wrapperRef,className:"flex-1 bg-sidebar relative min-h-0",style:{"--sidebar-width":`${l.width}px`,"--sidebar-width-icon":"0px"},children:s.jsx(Cs,{children:t})})]})]})})})}function er(t){const e=I.c(36),{children:i,renderMobile:r}=t,n=X(),{isMobile:d,resize:l}=Js(),{openMobile:a,setOpenMobile:o}=Ze(),u=Ie();let b;e[0]!==o?(b=()=>o(!1),e[0]=o,e[1]=b):b=e[1];const p=b;if(!d){let x;e[2]!==i||e[3]!==u?(x=s.jsx("div",{className:"contents",inert:u,children:i}),e[2]=i,e[3]=u,e[4]=x):x=e[4];let g;e[5]!==l.maxWidth||e[6]!==l.minWidth||e[7]!==l.onKeyDownResize||e[8]!==l.onStartResize||e[9]!==l.resetWidth||e[10]!==l.width?(g=s.jsx(Gs,{width:l.width,minWidth:l.minWidth,maxWidth:l.maxWidth,onPointerDown:l.onStartResize,onKeyDown:l.onKeyDownResize,onDoubleClick:l.resetWidth}),e[5]=l.maxWidth,e[6]=l.minWidth,e[7]=l.onKeyDownResize,e[8]=l.onStartResize,e[9]=l.resetWidth,e[10]=l.width,e[11]=g):g=e[11];let y;return e[12]!==x||e[13]!==g?(y=s.jsxs(s.Fragment,{children:[x,g]}),e[12]=x,e[13]=g,e[14]=y):y=e[14],y}let m;e[15]!==n?(m=n("layouts.shellControls.navigationTitle"),e[15]=n,e[16]=m):m=e[16];let h;e[17]!==m?(h=s.jsx(kt,{className:"sr-only",children:m}),e[17]=m,e[18]=h):h=e[18];let f;e[19]!==p?(f=s.jsx(tt,{onNavigate:p}),e[19]=p,e[20]=f):f=e[20];let v;e[21]!==p||e[22]!==r?(v=r({onClose:p}),e[21]=p,e[22]=r,e[23]=v):v=e[23];let j;e[24]!==v?(j=s.jsx("div",{className:"min-w-0 flex-1",children:v}),e[24]=v,e[25]=j):j=e[25];let C;e[26]!==f||e[27]!==j?(C=s.jsxs("div",{className:"flex h-full min-h-0",children:[f,j]}),e[26]=f,e[27]=j,e[28]=C):C=e[28];let w;e[29]!==h||e[30]!==C?(w=s.jsxs(Ot,{side:"left",hideCloseButton:!0,className:"w-screen max-w-none! p-0",onOpenAutoFocus:tr,children:[h,C]}),e[29]=h,e[30]=C,e[31]=w):w=e[31];let c;return e[32]!==a||e[33]!==o||e[34]!==w?(c=s.jsx(Rt,{open:a,onOpenChange:o,children:w}),e[32]=a,e[33]=o,e[34]=w,e[35]=c):c=e[35],c}function tr(t){return t.preventDefault()}function sr(t){const e=I.c(3),{children:i}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={background:"transparent",containerType:"inline-size"},e[0]=r):r=e[0];let n;return e[1]!==i?(n=s.jsx(_t,{className:"flex flex-col min-h-0",style:r,children:s.jsx(St,{variant:"plain",className:"bg-sidebar",children:s.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:i})})}),e[1]=i,e[2]=n):n=e[2],n}const Er=Object.assign(Qs,{Sidebar:er,Content:sr});export{Er as L};
@@ -1 +0,0 @@
1
- import{c as f,a6 as h,h6 as d,j as g,N as m,ag as p,a2 as j}from"./index-Bj6_6zVx.js";import{L as v}from"./legacy-main-redirect-DJVQL75t.js";import"./thread-route-BNNhAHoL.js";const x=j("/shell/$org/org-shell/");function L(){const t=f.c(19),{org:a}=h(),l=x.useSearch(),{main:i,virtualmcpid:o}=l;if(i!==void 0){let e;t[0]!==i||t[1]!==a.slug||t[2]!==l||t[3]!==o?(e=d({org:a.slug,agentId:o,main:i,search:l}),t[0]=i,t[1]=a.slug,t[2]=l,t[3]=o,t[4]=e):e=t[4];const s=e;if(s?.kind==="canonical"){let r;return t[5]!==s?(r=g.jsx(v,{target:s}),t[5]=s,t[6]=r):r=t[6],r}}let n;t[7]!==o?(n=o?.trim()||null,t[7]=o,t[8]=n):n=t[8];const u=n;if(u){let e;t[9]!==a.slug||t[10]!==u?(e={org:a.slug,agentId:u},t[9]=a.slug,t[10]=u,t[11]=e):e=t[11];let s;t[12]!==l?(s={...l,virtualmcpid:void 0},t[12]=l,t[13]=s):s=t[13];let r;return t[14]!==e||t[15]!==s?(r=g.jsx(m,{to:p.projects,params:e,search:s,hash:!0,replace:!0}),t[14]=e,t[15]=s,t[16]=r):r=t[16],r}let c;return t[17]!==a.slug?(c=g.jsx(m,{to:p.home,params:{org:a.slug},search:N,hash:!0,replace:!0}),t[17]=a.slug,t[18]=c):c=t[18],c}function N(t){return{...t,virtualmcpid:void 0}}export{L as default};
@@ -1 +0,0 @@
1
- import{r as l,c4 as ce,j as p,ca as _,c9 as T,c7 as C,cf as le,c3 as de,cr as ue,cn as fe,cg as me}from"./index-Bj6_6zVx.js";import{c as Y}from"./index-BdQq_4o_.js";var $=["PageUp","PageDown"],X=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},M="Slider",[H,Se,pe]=le(M),[W]=fe(M,[pe]),[he,V]=W(M),q=l.forwardRef((e,t)=>{const{name:o,min:n=0,max:s=100,step:c=1,orientation:r="horizontal",disabled:a=!1,minStepsBetweenThumbs:u=0,defaultValue:w=[n],value:h,onValueChange:i=()=>{},onValueCommit:d=()=>{},inverted:v=!1,form:R,...g}=e,m=l.useRef(new Set),f=l.useRef(0),x=r==="horizontal"?ge:ve,[S=[],K]=ce({prop:h,defaultProp:w,onChange:b=>{[...m.current][f.current]?.focus(),i(b)}}),j=l.useRef(S);function B(b){const y=ye(S,b);I(b,y)}function se(b){I(b,f.current)}function ae(){const b=j.current[f.current];S[f.current]!==b&&d(S)}function I(b,y,{commit:k}={commit:!1}){const U=_e(c),z=Ce(Math.round((b-n)/c)*c+n,U),A=Y(z,[n,s]);K((E=[])=>{const P=be(E,A,y);if(Ee(P,u*c)){f.current=P.indexOf(A);const F=String(P)!==String(E);return F&&k&&d(P),F?P:E}else return E})}return p.jsx(he,{scope:e.__scopeSlider,name:o,disabled:a,min:n,max:s,valueIndexToChangeRef:f,thumbs:m.current,values:S,orientation:r,form:R,children:p.jsx(H.Provider,{scope:e.__scopeSlider,children:p.jsx(H.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:_(g.onPointerDown,()=>{a||(j.current=S)}),min:n,max:s,inverted:v,onSlideStart:a?void 0:B,onSlideMove:a?void 0:se,onSlideEnd:a?void 0:ae,onHomeKeyDown:()=>!a&&I(n,0,{commit:!0}),onEndKeyDown:()=>!a&&I(s,S.length-1,{commit:!0}),onStepKeyDown:({event:b,direction:y})=>{if(!a){const z=$.includes(b.key)||b.shiftKey&&X.includes(b.key)?10:1,A=f.current,E=S[A],P=c*z*y;I(E+P,A,{commit:!0})}}})})})})});q.displayName=M;var[J,Q]=W(M,{startEdge:"left",endEdge:"right",size:"width",direction:1}),ge=l.forwardRef((e,t)=>{const{min:o,max:n,dir:s,inverted:c,onSlideStart:r,onSlideMove:a,onSlideEnd:u,onStepKeyDown:w,...h}=e,[i,d]=l.useState(null),v=C(t,x=>d(x)),R=l.useRef(void 0),g=de(s),m=g==="ltr",f=m&&!c||!m&&c;function D(x){const S=R.current||i.getBoundingClientRect(),K=[0,S.width],B=O(K,f?[o,n]:[n,o]);return R.current=S,B(x-S.left)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:f?"left":"right",endEdge:f?"right":"left",direction:f?1:-1,size:"width",children:p.jsx(Z,{dir:g,"data-orientation":"horizontal",...h,ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=D(x.clientX);r?.(S)},onSlideMove:x=>{const S=D(x.clientX);a?.(S)},onSlideEnd:()=>{R.current=void 0,u?.()},onStepKeyDown:x=>{const K=G[f?"from-left":"from-right"].includes(x.key);w?.({event:x,direction:K?-1:1})}})})}),ve=l.forwardRef((e,t)=>{const{min:o,max:n,inverted:s,onSlideStart:c,onSlideMove:r,onSlideEnd:a,onStepKeyDown:u,...w}=e,h=l.useRef(null),i=C(t,h),d=l.useRef(void 0),v=!s;function R(g){const m=d.current||h.current.getBoundingClientRect(),f=[0,m.height],x=O(f,v?[n,o]:[o,n]);return d.current=m,x(g-m.top)}return p.jsx(J,{scope:e.__scopeSlider,startEdge:v?"bottom":"top",endEdge:v?"top":"bottom",size:"height",direction:v?1:-1,children:p.jsx(Z,{"data-orientation":"vertical",...w,ref:i,style:{...w.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const m=R(g.clientY);c?.(m)},onSlideMove:g=>{const m=R(g.clientY);r?.(m)},onSlideEnd:()=>{d.current=void 0,a?.()},onStepKeyDown:g=>{const f=G[v?"from-bottom":"from-top"].includes(g.key);u?.({event:g,direction:f?-1:1})}})})}),Z=l.forwardRef((e,t)=>{const{__scopeSlider:o,onSlideStart:n,onSlideMove:s,onSlideEnd:c,onHomeKeyDown:r,onEndKeyDown:a,onStepKeyDown:u,...w}=e,h=V(M,o);return p.jsx(T.span,{...w,ref:t,onKeyDown:_(e.onKeyDown,i=>{i.key==="Home"?(r(i),i.preventDefault()):i.key==="End"?(a(i),i.preventDefault()):$.concat(X).includes(i.key)&&(u(i),i.preventDefault())}),onPointerDown:_(e.onPointerDown,i=>{const d=i.target;d.setPointerCapture(i.pointerId),i.preventDefault(),h.thumbs.has(d)?d.focus():n(i)}),onPointerMove:_(e.onPointerMove,i=>{i.target.hasPointerCapture(i.pointerId)&&s(i)}),onPointerUp:_(e.onPointerUp,i=>{const d=i.target;d.hasPointerCapture(i.pointerId)&&(d.releasePointerCapture(i.pointerId),c(i))})})}),ee="SliderTrack",te=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(ee,o);return p.jsx(T.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...n,ref:t})});te.displayName=ee;var N="SliderRange",ne=l.forwardRef((e,t)=>{const{__scopeSlider:o,...n}=e,s=V(N,o),c=Q(N,o),r=l.useRef(null),a=C(t,r),u=s.values.length,w=s.values.map(d=>ie(d,s.min,s.max)),h=u>1?Math.min(...w):0,i=100-Math.max(...w);return p.jsx(T.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...n,ref:a,style:{...e.style,[c.startEdge]:h+"%",[c.endEdge]:i+"%"}})});ne.displayName=N;var L="SliderThumb",oe=l.forwardRef((e,t)=>{const o=Se(e.__scopeSlider),[n,s]=l.useState(null),c=C(t,a=>s(a)),r=l.useMemo(()=>n?o().findIndex(a=>a.ref.current===n):-1,[o,n]);return p.jsx(we,{...e,ref:c,index:r})}),we=l.forwardRef((e,t)=>{const{__scopeSlider:o,index:n,name:s,...c}=e,r=V(L,o),a=Q(L,o),[u,w]=l.useState(null),h=C(t,D=>w(D)),i=u?r.form||!!u.closest("form"):!0,d=ue(u),v=r.values[n],R=v===void 0?0:ie(v,r.min,r.max),g=Re(n,r.values.length),m=d?.[a.size],f=m?Pe(m,R,a.direction):0;return l.useEffect(()=>{if(u)return r.thumbs.add(u),()=>{r.thumbs.delete(u)}},[u,r.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${R}% + ${f}px)`},children:[p.jsx(H.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(T.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":r.min,"aria-valuenow":v,"aria-valuemax":r.max,"aria-orientation":r.orientation,"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,tabIndex:r.disabled?void 0:0,...c,ref:h,style:v===void 0?{display:"none"}:e.style,onFocus:_(e.onFocus,()=>{r.valueIndexToChangeRef.current=n})})}),i&&p.jsx(re,{name:s??(r.name?r.name+(r.values.length>1?"[]":""):void 0),form:r.form,value:v},n)]})});oe.displayName=L;var xe="RadioBubbleInput",re=l.forwardRef(({__scopeSlider:e,value:t,...o},n)=>{const s=l.useRef(null),c=C(s,n),r=me(t);return l.useEffect(()=>{const a=s.current;if(!a)return;const u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"value").set;if(r!==t&&h){const i=new Event("input",{bubbles:!0});h.call(a,t),a.dispatchEvent(i)}},[r,t]),p.jsx(T.input,{style:{display:"none"},...o,ref:c,defaultValue:t})});re.displayName=xe;function be(e=[],t,o){const n=[...e];return n[o]=t,n.sort((s,c)=>s-c)}function ie(e,t,o){const c=100/(o-t)*(e-t);return Y(c,[0,100])}function Re(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function ye(e,t){if(e.length===1)return 0;const o=e.map(s=>Math.abs(s-t)),n=Math.min(...o);return o.indexOf(n)}function Pe(e,t,o){const n=e/2,c=O([0,50],[0,n]);return(n-c(t)*o)*o}function De(e){return e.slice(0,-1).map((t,o)=>e[o+1]-t)}function Ee(e,t){if(t>0){const o=De(e);return Math.min(...o)>=t}return!0}function O(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(o-e[0])}}function _e(e){return(String(e).split(".")[1]||"").length}function Ce(e,t){const o=Math.pow(10,t);return Math.round(e*o)/o}var Ie=q,Ae=te,Te=ne,Ve=oe;export{Te as R,Ae as T,Ie as a,Ve as b};