@surething/cockpit 1.0.208 → 1.0.210

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 (575) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +12 -10
  3. package/.next-prod/build-manifest.json +4 -4
  4. package/.next-prod/diagnostics/framework.json +1 -1
  5. package/.next-prod/next-server.js.nft.json +1 -1
  6. package/.next-prod/prerender-manifest.json +3 -3
  7. package/.next-prod/react-loadable-manifest.json +25 -1
  8. package/.next-prod/routes-manifest.json +12 -0
  9. package/.next-prod/server/app/_global-error/page.js +3 -3
  10. package/.next-prod/server/app/_global-error/page.js.nft.json +1 -1
  11. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  12. package/.next-prod/server/app/_global-error.html +1 -1
  13. package/.next-prod/server/app/_global-error.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  15. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  16. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  17. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  18. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  19. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  20. package/.next-prod/server/app/_not-found/page.js +2 -2
  21. package/.next-prod/server/app/_not-found/page.js.nft.json +1 -1
  22. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  23. package/.next-prod/server/app/_not-found.html +1 -1
  24. package/.next-prod/server/app/_not-found.rsc +16 -17
  25. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +16 -17
  26. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  27. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +5 -6
  28. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  29. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  30. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  31. package/.next-prod/server/app/api/agent/test/route.js +1 -0
  32. package/.next-prod/server/app/api/agent/test/route.js.nft.json +1 -0
  33. package/.next-prod/server/app/api/agent/test/route_client-reference-manifest.js +1 -0
  34. package/.next-prod/server/app/api/bash/route.js +1 -1
  35. package/.next-prod/server/app/api/bash/route.js.nft.json +1 -1
  36. package/.next-prod/server/app/api/chat/codex/route.js +18 -18
  37. package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -1
  38. package/.next-prod/server/app/api/chat/deepseek/route.js +4 -4
  39. package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -1
  40. package/.next-prod/server/app/api/chat/kimi/route.js +18 -18
  41. package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -1
  42. package/.next-prod/server/app/api/chat/ollama/route.js +20 -109
  43. package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -1
  44. package/.next-prod/server/app/api/chat/route.js +4 -4
  45. package/.next-prod/server/app/api/chat/route.js.nft.json +1 -1
  46. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  47. package/.next-prod/server/app/api/claude-stats/route.js.nft.json +1 -1
  48. package/.next-prod/server/app/api/commands/route.js +1 -1
  49. package/.next-prod/server/app/api/commands/route.js.nft.json +1 -1
  50. package/.next-prod/server/app/api/comments/route.js +1 -1
  51. package/.next-prod/server/app/api/comments/route.js.nft.json +1 -1
  52. package/.next-prod/server/app/api/db/columns/route.js +15 -15
  53. package/.next-prod/server/app/api/db/columns/route.js.nft.json +1 -1
  54. package/.next-prod/server/app/api/db/connect/route.js +3 -1
  55. package/.next-prod/server/app/api/db/connect/route.js.nft.json +1 -1
  56. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  57. package/.next-prod/server/app/api/db/disconnect/route.js.nft.json +1 -1
  58. package/.next-prod/server/app/api/db/export/route.js +1 -1
  59. package/.next-prod/server/app/api/db/export/route.js.nft.json +1 -1
  60. package/.next-prod/server/app/api/db/query/route.js +1 -1
  61. package/.next-prod/server/app/api/db/query/route.js.nft.json +1 -1
  62. package/.next-prod/server/app/api/db/schemas/route.js +2 -2
  63. package/.next-prod/server/app/api/db/schemas/route.js.nft.json +1 -1
  64. package/.next-prod/server/app/api/dev/spans/route.js +1 -0
  65. package/.next-prod/server/app/api/dev/spans/route.js.nft.json +1 -0
  66. package/.next-prod/server/app/api/dev/spans/route_client-reference-manifest.js +1 -0
  67. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  68. package/.next-prod/server/app/api/extension/version/route.js.nft.json +1 -1
  69. package/.next-prod/server/app/api/file/route.js +1 -1
  70. package/.next-prod/server/app/api/file/route.js.nft.json +1 -1
  71. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  72. package/.next-prod/server/app/api/files/blame/route.js.nft.json +1 -1
  73. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  74. package/.next-prod/server/app/api/files/clipboard/route.js.nft.json +1 -1
  75. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  76. package/.next-prod/server/app/api/files/copy/route.js.nft.json +1 -1
  77. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  78. package/.next-prod/server/app/api/files/delete/route.js.nft.json +1 -1
  79. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  80. package/.next-prod/server/app/api/files/expanded/route.js.nft.json +1 -1
  81. package/.next-prod/server/app/api/files/index/route.js +1 -1
  82. package/.next-prod/server/app/api/files/index/route.js.nft.json +1 -1
  83. package/.next-prod/server/app/api/files/init/route.js +1 -1
  84. package/.next-prod/server/app/api/files/init/route.js.nft.json +1 -1
  85. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  86. package/.next-prod/server/app/api/files/paste/route.js.nft.json +1 -1
  87. package/.next-prod/server/app/api/files/read/route.js +1 -1
  88. package/.next-prod/server/app/api/files/read/route.js.nft.json +1 -1
  89. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  90. package/.next-prod/server/app/api/files/readdir/route.js.nft.json +1 -1
  91. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  92. package/.next-prod/server/app/api/files/recent/route.js.nft.json +1 -1
  93. package/.next-prod/server/app/api/files/save/route.js +1 -1
  94. package/.next-prod/server/app/api/files/save/route.js.nft.json +1 -1
  95. package/.next-prod/server/app/api/files/search/route.js +1 -1
  96. package/.next-prod/server/app/api/files/search/route.js.nft.json +1 -1
  97. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  98. package/.next-prod/server/app/api/files/stat/route.js.nft.json +1 -1
  99. package/.next-prod/server/app/api/files/text/route.js +1 -1
  100. package/.next-prod/server/app/api/files/text/route.js.nft.json +1 -1
  101. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  102. package/.next-prod/server/app/api/git/branch-diff/route.js.nft.json +1 -1
  103. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  104. package/.next-prod/server/app/api/git/branches/route.js.nft.json +1 -1
  105. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  106. package/.next-prod/server/app/api/git/commit-diff/route.js.nft.json +1 -1
  107. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  108. package/.next-prod/server/app/api/git/commits/route.js.nft.json +1 -1
  109. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  110. package/.next-prod/server/app/api/git/diff/route.js.nft.json +1 -1
  111. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  112. package/.next-prod/server/app/api/git/discard/route.js.nft.json +1 -1
  113. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  114. package/.next-prod/server/app/api/git/stage/route.js.nft.json +1 -1
  115. package/.next-prod/server/app/api/git/status/route.js +1 -1
  116. package/.next-prod/server/app/api/git/status/route.js.nft.json +1 -1
  117. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  118. package/.next-prod/server/app/api/git/unstage/route.js.nft.json +1 -1
  119. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  120. package/.next-prod/server/app/api/git/worktree/route.js.nft.json +1 -1
  121. package/.next-prod/server/app/api/global-state/route.js +1 -1
  122. package/.next-prod/server/app/api/global-state/route.js.nft.json +1 -1
  123. package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
  124. package/.next-prod/server/app/api/jupyter/load/route.js.nft.json +1 -1
  125. package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
  126. package/.next-prod/server/app/api/jupyter/save/route.js.nft.json +1 -1
  127. package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
  128. package/.next-prod/server/app/api/jupyter/shutdown/route.js.nft.json +1 -1
  129. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  130. package/.next-prod/server/app/api/lsp/definition/route.js.nft.json +1 -1
  131. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  132. package/.next-prod/server/app/api/lsp/hover/route.js.nft.json +1 -1
  133. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  134. package/.next-prod/server/app/api/lsp/references/route.js.nft.json +1 -1
  135. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  136. package/.next-prod/server/app/api/lsp/status/route.js.nft.json +1 -1
  137. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  138. package/.next-prod/server/app/api/lsp/warmup/route.js.nft.json +1 -1
  139. package/.next-prod/server/app/api/mysql/columns/route.js +9 -9
  140. package/.next-prod/server/app/api/mysql/columns/route.js.nft.json +1 -1
  141. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  142. package/.next-prod/server/app/api/mysql/connect/route.js.nft.json +1 -1
  143. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  144. package/.next-prod/server/app/api/mysql/disconnect/route.js.nft.json +1 -1
  145. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  146. package/.next-prod/server/app/api/mysql/export/route.js.nft.json +1 -1
  147. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  148. package/.next-prod/server/app/api/mysql/query/route.js.nft.json +1 -1
  149. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  150. package/.next-prod/server/app/api/mysql/schemas/route.js.nft.json +1 -1
  151. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  152. package/.next-prod/server/app/api/neo4j/connect/route.js.nft.json +1 -1
  153. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  154. package/.next-prod/server/app/api/neo4j/disconnect/route.js.nft.json +1 -1
  155. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  156. package/.next-prod/server/app/api/neo4j/query/route.js.nft.json +1 -1
  157. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  158. package/.next-prod/server/app/api/neo4j/schema/route.js.nft.json +1 -1
  159. package/.next-prod/server/app/api/note/route.js +1 -1
  160. package/.next-prod/server/app/api/note/route.js.nft.json +1 -1
  161. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  162. package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -1
  163. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  164. package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -1
  165. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  166. package/.next-prod/server/app/api/open-cursor/route.js.nft.json +1 -1
  167. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  168. package/.next-prod/server/app/api/open-vscode/route.js.nft.json +1 -1
  169. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  170. package/.next-prod/server/app/api/pick-folder/route.js.nft.json +1 -1
  171. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  172. package/.next-prod/server/app/api/pinned-sessions/route.js.nft.json +1 -1
  173. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  174. package/.next-prod/server/app/api/project-settings/route.js.nft.json +1 -1
  175. package/.next-prod/server/app/api/project-state/route.js +1 -1
  176. package/.next-prod/server/app/api/project-state/route.js.nft.json +1 -1
  177. package/.next-prod/server/app/api/projectGraph/file/route.js +1 -1
  178. package/.next-prod/server/app/api/projectGraph/file/route.js.nft.json +1 -1
  179. package/.next-prod/server/app/api/projectGraph/file-functions/route.js +1 -1
  180. package/.next-prod/server/app/api/projectGraph/file-functions/route.js.nft.json +1 -1
  181. package/.next-prod/server/app/api/projectGraph/search/route.js +1 -1
  182. package/.next-prod/server/app/api/projectGraph/search/route.js.nft.json +1 -1
  183. package/.next-prod/server/app/api/projects/route.js +1 -1
  184. package/.next-prod/server/app/api/projects/route.js.nft.json +1 -1
  185. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  186. package/.next-prod/server/app/api/redis/command/route.js.nft.json +1 -1
  187. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  188. package/.next-prod/server/app/api/redis/connect/route.js.nft.json +1 -1
  189. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  190. package/.next-prod/server/app/api/redis/delete/route.js.nft.json +1 -1
  191. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  192. package/.next-prod/server/app/api/redis/disconnect/route.js.nft.json +1 -1
  193. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  194. package/.next-prod/server/app/api/redis/get/route.js.nft.json +1 -1
  195. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  196. package/.next-prod/server/app/api/redis/keys/route.js.nft.json +1 -1
  197. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  198. package/.next-prod/server/app/api/redis/set/route.js.nft.json +1 -1
  199. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  200. package/.next-prod/server/app/api/review/[id]/comments/route.js.nft.json +1 -1
  201. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  202. package/.next-prod/server/app/api/review/[id]/replies/route.js.nft.json +1 -1
  203. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  204. package/.next-prod/server/app/api/review/[id]/route.js.nft.json +1 -1
  205. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  206. package/.next-prod/server/app/api/review/identify/route.js.nft.json +1 -1
  207. package/.next-prod/server/app/api/review/order/route.js +1 -1
  208. package/.next-prod/server/app/api/review/order/route.js.nft.json +1 -1
  209. package/.next-prod/server/app/api/review/route.js +1 -1
  210. package/.next-prod/server/app/api/review/route.js.nft.json +1 -1
  211. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  212. package/.next-prod/server/app/api/review/share-info/route.js.nft.json +1 -1
  213. package/.next-prod/server/app/api/review/users/route.js +1 -1
  214. package/.next-prod/server/app/api/review/users/route.js.nft.json +1 -1
  215. package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
  216. package/.next-prod/server/app/api/scheduled-tasks/route.js.nft.json +1 -1
  217. package/.next-prod/server/app/api/services/config/route.js +1 -1
  218. package/.next-prod/server/app/api/services/config/route.js.nft.json +1 -1
  219. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  220. package/.next-prod/server/app/api/services/scripts/route.js.nft.json +1 -1
  221. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  222. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js.nft.json +1 -1
  223. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  224. package/.next-prod/server/app/api/session/[sessionId]/history/route.js.nft.json +1 -1
  225. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  226. package/.next-prod/server/app/api/session-by-path/route.js.nft.json +1 -1
  227. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  228. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js.nft.json +1 -1
  229. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  230. package/.next-prod/server/app/api/sessions/projects/route.js.nft.json +1 -1
  231. package/.next-prod/server/app/api/sessions/route.js +1 -1
  232. package/.next-prod/server/app/api/sessions/route.js.nft.json +1 -1
  233. package/.next-prod/server/app/api/settings/route.js +1 -1
  234. package/.next-prod/server/app/api/settings/route.js.nft.json +1 -1
  235. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  236. package/.next-prod/server/app/api/skills/[id]/route.js.nft.json +1 -1
  237. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  238. package/.next-prod/server/app/api/skills/content/route.js.nft.json +1 -1
  239. package/.next-prod/server/app/api/skills/route.js +1 -1
  240. package/.next-prod/server/app/api/skills/route.js.nft.json +1 -1
  241. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  242. package/.next-prod/server/app/api/terminal/aliases/route.js.nft.json +1 -1
  243. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  244. package/.next-prod/server/app/api/terminal/autocomplete/route.js.nft.json +1 -1
  245. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  246. package/.next-prod/server/app/api/terminal/bubble-order/route.js.nft.json +1 -1
  247. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  248. package/.next-prod/server/app/api/terminal/env/route.js.nft.json +1 -1
  249. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  250. package/.next-prod/server/app/api/terminal/history/route.js.nft.json +1 -1
  251. package/.next-prod/server/app/api/version/route.js +1 -1
  252. package/.next-prod/server/app/api/version/route.js.nft.json +1 -1
  253. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  254. package/.next-prod/server/app/favicon.ico/route.js.nft.json +1 -1
  255. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  256. package/.next-prod/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  257. package/.next-prod/server/app/manifest.webmanifest.body +1 -1
  258. package/.next-prod/server/app/page.js +2 -2
  259. package/.next-prod/server/app/page.js.nft.json +1 -1
  260. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  261. package/.next-prod/server/app/project/page.js +2 -2
  262. package/.next-prod/server/app/project/page.js.nft.json +1 -1
  263. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  264. package/.next-prod/server/app/review/[id]/page.js +2 -2
  265. package/.next-prod/server/app/review/[id]/page.js.nft.json +1 -1
  266. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  267. package/.next-prod/server/app-paths-manifest.json +12 -10
  268. package/.next-prod/server/chunks/2728.js +1 -0
  269. package/.next-prod/server/chunks/304.js +1 -0
  270. package/.next-prod/server/chunks/3718.js +1 -0
  271. package/.next-prod/server/chunks/3863.js +1 -0
  272. package/.next-prod/server/chunks/4034.js +114 -0
  273. package/.next-prod/server/chunks/4741.js +2 -2
  274. package/.next-prod/server/chunks/5159.js +1 -0
  275. package/.next-prod/server/chunks/{6007.js → 5292.js} +2 -2
  276. package/.next-prod/server/chunks/5616.js +1 -0
  277. package/.next-prod/server/chunks/6955.js +1 -0
  278. package/.next-prod/server/chunks/7184.js +244 -0
  279. package/.next-prod/server/chunks/7973.js +15 -0
  280. package/.next-prod/server/chunks/8916.js +1 -0
  281. package/.next-prod/server/chunks/9658.js +42 -0
  282. package/.next-prod/server/functions-config-manifest.json +2 -0
  283. package/.next-prod/server/middleware-build-manifest.js +1 -1
  284. package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
  285. package/.next-prod/server/pages/404.html +1 -1
  286. package/.next-prod/server/pages/500.html +1 -1
  287. package/.next-prod/server/server-reference-manifest.json +1 -1
  288. package/.next-prod/static/LJRtmjYCuVrSA_dcelxlR/_buildManifest.js +1 -0
  289. package/.next-prod/static/chunks/2580.69af80de5bcfcefe.js +1 -0
  290. package/.next-prod/static/chunks/2708.7263182a029113c8.js +1 -0
  291. package/.next-prod/static/chunks/327-9ffab8f0b2b0b4cd.js +13 -0
  292. package/.next-prod/static/chunks/{3794-3fb4e6ee851037bb.js → 3794-ba2500baa4c52d55.js} +3 -3
  293. package/.next-prod/static/chunks/5188-6ad3d686c5e9fb28.js +29 -0
  294. package/.next-prod/static/chunks/{5204-c8293184aa55cdd5.js → 5204-babf0d0290febbec.js} +1 -1
  295. package/.next-prod/static/chunks/6345-3c06cdc8c89677b8.js +14 -0
  296. package/.next-prod/static/chunks/7562.8fdc3abdd45c77ab.js +1 -0
  297. package/.next-prod/static/chunks/9012.6ed079104670001d.js +1 -0
  298. package/.next-prod/static/chunks/9617.d038e8ea9fc93e24.js +1 -0
  299. package/.next-prod/static/chunks/96c8525a-f1e0653013503d49.js +2 -0
  300. package/.next-prod/static/chunks/app/_global-error/page-826847d169541fa9.js +1 -0
  301. package/.next-prod/static/chunks/app/api/agent/test/route-826847d169541fa9.js +1 -0
  302. package/.next-prod/static/chunks/app/api/bash/route-826847d169541fa9.js +1 -0
  303. package/.next-prod/static/chunks/app/api/chat/codex/route-826847d169541fa9.js +1 -0
  304. package/.next-prod/static/chunks/app/api/chat/deepseek/route-826847d169541fa9.js +1 -0
  305. package/.next-prod/static/chunks/app/api/chat/kimi/route-826847d169541fa9.js +1 -0
  306. package/.next-prod/static/chunks/app/api/chat/ollama/route-826847d169541fa9.js +1 -0
  307. package/.next-prod/static/chunks/app/api/chat/route-826847d169541fa9.js +1 -0
  308. package/.next-prod/static/chunks/app/api/claude-stats/route-826847d169541fa9.js +1 -0
  309. package/.next-prod/static/chunks/app/api/commands/route-826847d169541fa9.js +1 -0
  310. package/.next-prod/static/chunks/app/api/comments/route-826847d169541fa9.js +1 -0
  311. package/.next-prod/static/chunks/app/api/db/columns/route-826847d169541fa9.js +1 -0
  312. package/.next-prod/static/chunks/app/api/db/connect/route-826847d169541fa9.js +1 -0
  313. package/.next-prod/static/chunks/app/api/db/disconnect/route-826847d169541fa9.js +1 -0
  314. package/.next-prod/static/chunks/app/api/db/export/route-826847d169541fa9.js +1 -0
  315. package/.next-prod/static/chunks/app/api/db/query/route-826847d169541fa9.js +1 -0
  316. package/.next-prod/static/chunks/app/api/db/schemas/route-826847d169541fa9.js +1 -0
  317. package/.next-prod/static/chunks/app/api/dev/spans/route-826847d169541fa9.js +1 -0
  318. package/.next-prod/static/chunks/app/api/extension/version/route-826847d169541fa9.js +1 -0
  319. package/.next-prod/static/chunks/app/api/file/route-826847d169541fa9.js +1 -0
  320. package/.next-prod/static/chunks/app/api/files/blame/route-826847d169541fa9.js +1 -0
  321. package/.next-prod/static/chunks/app/api/files/clipboard/route-826847d169541fa9.js +1 -0
  322. package/.next-prod/static/chunks/app/api/files/copy/route-826847d169541fa9.js +1 -0
  323. package/.next-prod/static/chunks/app/api/files/delete/route-826847d169541fa9.js +1 -0
  324. package/.next-prod/static/chunks/app/api/files/expanded/route-826847d169541fa9.js +1 -0
  325. package/.next-prod/static/chunks/app/api/files/index/route-826847d169541fa9.js +1 -0
  326. package/.next-prod/static/chunks/app/api/files/init/route-826847d169541fa9.js +1 -0
  327. package/.next-prod/static/chunks/app/api/files/paste/route-826847d169541fa9.js +1 -0
  328. package/.next-prod/static/chunks/app/api/files/read/route-826847d169541fa9.js +1 -0
  329. package/.next-prod/static/chunks/app/api/files/readdir/route-826847d169541fa9.js +1 -0
  330. package/.next-prod/static/chunks/app/api/files/recent/route-826847d169541fa9.js +1 -0
  331. package/.next-prod/static/chunks/app/api/files/save/route-826847d169541fa9.js +1 -0
  332. package/.next-prod/static/chunks/app/api/files/search/route-826847d169541fa9.js +1 -0
  333. package/.next-prod/static/chunks/app/api/files/stat/route-826847d169541fa9.js +1 -0
  334. package/.next-prod/static/chunks/app/api/files/text/route-826847d169541fa9.js +1 -0
  335. package/.next-prod/static/chunks/app/api/git/branch-diff/route-826847d169541fa9.js +1 -0
  336. package/.next-prod/static/chunks/app/api/git/branches/route-826847d169541fa9.js +1 -0
  337. package/.next-prod/static/chunks/app/api/git/commit-diff/route-826847d169541fa9.js +1 -0
  338. package/.next-prod/static/chunks/app/api/git/commits/route-826847d169541fa9.js +1 -0
  339. package/.next-prod/static/chunks/app/api/git/diff/route-826847d169541fa9.js +1 -0
  340. package/.next-prod/static/chunks/app/api/git/discard/route-826847d169541fa9.js +1 -0
  341. package/.next-prod/static/chunks/app/api/git/stage/route-826847d169541fa9.js +1 -0
  342. package/.next-prod/static/chunks/app/api/git/status/route-826847d169541fa9.js +1 -0
  343. package/.next-prod/static/chunks/app/api/git/unstage/route-826847d169541fa9.js +1 -0
  344. package/.next-prod/static/chunks/app/api/git/worktree/route-826847d169541fa9.js +1 -0
  345. package/.next-prod/static/chunks/app/api/global-state/route-826847d169541fa9.js +1 -0
  346. package/.next-prod/static/chunks/app/api/jupyter/load/route-826847d169541fa9.js +1 -0
  347. package/.next-prod/static/chunks/app/api/jupyter/save/route-826847d169541fa9.js +1 -0
  348. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-826847d169541fa9.js +1 -0
  349. package/.next-prod/static/chunks/app/api/lsp/definition/route-826847d169541fa9.js +1 -0
  350. package/.next-prod/static/chunks/app/api/lsp/hover/route-826847d169541fa9.js +1 -0
  351. package/.next-prod/static/chunks/app/api/lsp/references/route-826847d169541fa9.js +1 -0
  352. package/.next-prod/static/chunks/app/api/lsp/status/route-826847d169541fa9.js +1 -0
  353. package/.next-prod/static/chunks/app/api/lsp/warmup/route-826847d169541fa9.js +1 -0
  354. package/.next-prod/static/chunks/app/api/mysql/columns/route-826847d169541fa9.js +1 -0
  355. package/.next-prod/static/chunks/app/api/mysql/connect/route-826847d169541fa9.js +1 -0
  356. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-826847d169541fa9.js +1 -0
  357. package/.next-prod/static/chunks/app/api/mysql/export/route-826847d169541fa9.js +1 -0
  358. package/.next-prod/static/chunks/app/api/mysql/query/route-826847d169541fa9.js +1 -0
  359. package/.next-prod/static/chunks/app/api/mysql/schemas/route-826847d169541fa9.js +1 -0
  360. package/.next-prod/static/chunks/app/api/neo4j/connect/route-826847d169541fa9.js +1 -0
  361. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-826847d169541fa9.js +1 -0
  362. package/.next-prod/static/chunks/app/api/neo4j/query/route-826847d169541fa9.js +1 -0
  363. package/.next-prod/static/chunks/app/api/neo4j/schema/route-826847d169541fa9.js +1 -0
  364. package/.next-prod/static/chunks/app/api/note/route-826847d169541fa9.js +1 -0
  365. package/.next-prod/static/chunks/app/api/ollama/models/route-826847d169541fa9.js +1 -0
  366. package/.next-prod/static/chunks/app/api/ollama/start/route-826847d169541fa9.js +1 -0
  367. package/.next-prod/static/chunks/app/api/open-cursor/route-826847d169541fa9.js +1 -0
  368. package/.next-prod/static/chunks/app/api/open-vscode/route-826847d169541fa9.js +1 -0
  369. package/.next-prod/static/chunks/app/api/pick-folder/route-826847d169541fa9.js +1 -0
  370. package/.next-prod/static/chunks/app/api/pinned-sessions/route-826847d169541fa9.js +1 -0
  371. package/.next-prod/static/chunks/app/api/project-settings/route-826847d169541fa9.js +1 -0
  372. package/.next-prod/static/chunks/app/api/project-state/route-826847d169541fa9.js +1 -0
  373. package/.next-prod/static/chunks/app/api/projectGraph/file/route-826847d169541fa9.js +1 -0
  374. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-826847d169541fa9.js +1 -0
  375. package/.next-prod/static/chunks/app/api/projectGraph/search/route-826847d169541fa9.js +1 -0
  376. package/.next-prod/static/chunks/app/api/projects/route-826847d169541fa9.js +1 -0
  377. package/.next-prod/static/chunks/app/api/redis/command/route-826847d169541fa9.js +1 -0
  378. package/.next-prod/static/chunks/app/api/redis/connect/route-826847d169541fa9.js +1 -0
  379. package/.next-prod/static/chunks/app/api/redis/delete/route-826847d169541fa9.js +1 -0
  380. package/.next-prod/static/chunks/app/api/redis/disconnect/route-826847d169541fa9.js +1 -0
  381. package/.next-prod/static/chunks/app/api/redis/get/route-826847d169541fa9.js +1 -0
  382. package/.next-prod/static/chunks/app/api/redis/keys/route-826847d169541fa9.js +1 -0
  383. package/.next-prod/static/chunks/app/api/redis/set/route-826847d169541fa9.js +1 -0
  384. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-826847d169541fa9.js +1 -0
  385. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-826847d169541fa9.js +1 -0
  386. package/.next-prod/static/chunks/app/api/review/[id]/route-826847d169541fa9.js +1 -0
  387. package/.next-prod/static/chunks/app/api/review/identify/route-826847d169541fa9.js +1 -0
  388. package/.next-prod/static/chunks/app/api/review/order/route-826847d169541fa9.js +1 -0
  389. package/.next-prod/static/chunks/app/api/review/route-826847d169541fa9.js +1 -0
  390. package/.next-prod/static/chunks/app/api/review/share-info/route-826847d169541fa9.js +1 -0
  391. package/.next-prod/static/chunks/app/api/review/users/route-826847d169541fa9.js +1 -0
  392. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-826847d169541fa9.js +1 -0
  393. package/.next-prod/static/chunks/app/api/services/config/route-826847d169541fa9.js +1 -0
  394. package/.next-prod/static/chunks/app/api/services/scripts/route-826847d169541fa9.js +1 -0
  395. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-826847d169541fa9.js +1 -0
  396. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-826847d169541fa9.js +1 -0
  397. package/.next-prod/static/chunks/app/api/session-by-path/route-826847d169541fa9.js +1 -0
  398. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-826847d169541fa9.js +1 -0
  399. package/.next-prod/static/chunks/app/api/sessions/projects/route-826847d169541fa9.js +1 -0
  400. package/.next-prod/static/chunks/app/api/sessions/route-826847d169541fa9.js +1 -0
  401. package/.next-prod/static/chunks/app/api/settings/route-826847d169541fa9.js +1 -0
  402. package/.next-prod/static/chunks/app/api/skills/[id]/route-826847d169541fa9.js +1 -0
  403. package/.next-prod/static/chunks/app/api/skills/content/route-826847d169541fa9.js +1 -0
  404. package/.next-prod/static/chunks/app/api/skills/route-826847d169541fa9.js +1 -0
  405. package/.next-prod/static/chunks/app/api/terminal/aliases/route-826847d169541fa9.js +1 -0
  406. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-826847d169541fa9.js +1 -0
  407. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-826847d169541fa9.js +1 -0
  408. package/.next-prod/static/chunks/app/api/terminal/env/route-826847d169541fa9.js +1 -0
  409. package/.next-prod/static/chunks/app/api/terminal/history/route-826847d169541fa9.js +1 -0
  410. package/.next-prod/static/chunks/app/api/version/route-826847d169541fa9.js +1 -0
  411. package/.next-prod/static/chunks/app/layout-a0362651ba6e6e6f.js +1 -0
  412. package/.next-prod/static/chunks/app/manifest.webmanifest/route-826847d169541fa9.js +1 -0
  413. package/.next-prod/static/chunks/app/{page-db32ebfdf1ac9174.js → page-1b14cabf47df9ff7.js} +1 -1
  414. package/.next-prod/static/chunks/app/project/{page-db32ebfdf1ac9174.js → page-1b14cabf47df9ff7.js} +1 -1
  415. package/.next-prod/static/chunks/app/review/[id]/page-7db3a48a13f1840c.js +1 -0
  416. package/.next-prod/static/chunks/bc21e3dd-a78364524623b9b0.js +1 -0
  417. package/.next-prod/static/chunks/{main-5a46314a5491113b.js → main-79827b1543335b12.js} +3 -3
  418. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-826847d169541fa9.js +1 -0
  419. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-826847d169541fa9.js +1 -0
  420. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-826847d169541fa9.js +1 -0
  421. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-826847d169541fa9.js +1 -0
  422. package/.next-prod/static/chunks/webpack-b618ac52d349e5ca.js +1 -0
  423. package/.next-prod/static/css/dcde719317bea028.css +1 -0
  424. package/.next-prod/trace +12 -12
  425. package/.next-prod/trace-build +1 -1
  426. package/.next-prod/types/app/api/agent/test/route.ts +351 -0
  427. package/.next-prod/types/app/api/dev/spans/route.ts +351 -0
  428. package/.next-prod/types/routes.d.ts +3 -1
  429. package/.next-prod/types/validator.ts +18 -0
  430. package/README.md +29 -8
  431. package/README.zh.md +30 -9
  432. package/dist/{chunk-VCZEGP64.mjs → chunk-FBR4KJI5.mjs} +24 -250
  433. package/dist/chunk-OWUW2O3D.mjs +28475 -0
  434. package/dist/{chunk-RSHKDWJM.mjs → chunk-TXBVUZVH.mjs} +94 -0
  435. package/dist/httpApi.mjs +239 -0
  436. package/dist/scheduledTasks.mjs +1239 -66
  437. package/dist/{server-K6XWP7DX.mjs → server-E7G55DY7.mjs} +9 -10
  438. package/dist/wsServer.mjs +867 -704
  439. package/package.json +17 -4
  440. package/server.mjs +3 -1
  441. package/.next-prod/server/chunks/240.js +0 -1
  442. package/.next-prod/server/chunks/3204.js +0 -42
  443. package/.next-prod/server/chunks/5466.js +0 -1
  444. package/.next-prod/server/chunks/7264.js +0 -5
  445. package/.next-prod/server/chunks/8465.js +0 -15
  446. package/.next-prod/server/chunks/8750.js +0 -1
  447. package/.next-prod/server/chunks/900.js +0 -1
  448. package/.next-prod/server/chunks/9255.js +0 -1
  449. package/.next-prod/server/chunks/9755.js +0 -101
  450. package/.next-prod/server/chunks/987.js +0 -139
  451. package/.next-prod/static/WsSesL2O_jRoZztt2Y5r6/_buildManifest.js +0 -1
  452. package/.next-prod/static/chunks/327.8ecab0b86d52b597.js +0 -1
  453. package/.next-prod/static/chunks/5660-3d87dfb12f95e96d.js +0 -29
  454. package/.next-prod/static/chunks/6028-1d6ced1439a3f01f.js +0 -1
  455. package/.next-prod/static/chunks/6345-6b34b0528ff833a1.js +0 -14
  456. package/.next-prod/static/chunks/app/_global-error/page-7975a2b8c7d0b214.js +0 -1
  457. package/.next-prod/static/chunks/app/api/bash/route-7975a2b8c7d0b214.js +0 -1
  458. package/.next-prod/static/chunks/app/api/chat/codex/route-7975a2b8c7d0b214.js +0 -1
  459. package/.next-prod/static/chunks/app/api/chat/deepseek/route-7975a2b8c7d0b214.js +0 -1
  460. package/.next-prod/static/chunks/app/api/chat/kimi/route-7975a2b8c7d0b214.js +0 -1
  461. package/.next-prod/static/chunks/app/api/chat/ollama/route-7975a2b8c7d0b214.js +0 -1
  462. package/.next-prod/static/chunks/app/api/chat/route-7975a2b8c7d0b214.js +0 -1
  463. package/.next-prod/static/chunks/app/api/claude-stats/route-7975a2b8c7d0b214.js +0 -1
  464. package/.next-prod/static/chunks/app/api/commands/route-7975a2b8c7d0b214.js +0 -1
  465. package/.next-prod/static/chunks/app/api/comments/route-7975a2b8c7d0b214.js +0 -1
  466. package/.next-prod/static/chunks/app/api/db/columns/route-7975a2b8c7d0b214.js +0 -1
  467. package/.next-prod/static/chunks/app/api/db/connect/route-7975a2b8c7d0b214.js +0 -1
  468. package/.next-prod/static/chunks/app/api/db/disconnect/route-7975a2b8c7d0b214.js +0 -1
  469. package/.next-prod/static/chunks/app/api/db/export/route-7975a2b8c7d0b214.js +0 -1
  470. package/.next-prod/static/chunks/app/api/db/query/route-7975a2b8c7d0b214.js +0 -1
  471. package/.next-prod/static/chunks/app/api/db/schemas/route-7975a2b8c7d0b214.js +0 -1
  472. package/.next-prod/static/chunks/app/api/extension/version/route-7975a2b8c7d0b214.js +0 -1
  473. package/.next-prod/static/chunks/app/api/file/route-7975a2b8c7d0b214.js +0 -1
  474. package/.next-prod/static/chunks/app/api/files/blame/route-7975a2b8c7d0b214.js +0 -1
  475. package/.next-prod/static/chunks/app/api/files/clipboard/route-7975a2b8c7d0b214.js +0 -1
  476. package/.next-prod/static/chunks/app/api/files/copy/route-7975a2b8c7d0b214.js +0 -1
  477. package/.next-prod/static/chunks/app/api/files/delete/route-7975a2b8c7d0b214.js +0 -1
  478. package/.next-prod/static/chunks/app/api/files/expanded/route-7975a2b8c7d0b214.js +0 -1
  479. package/.next-prod/static/chunks/app/api/files/index/route-7975a2b8c7d0b214.js +0 -1
  480. package/.next-prod/static/chunks/app/api/files/init/route-7975a2b8c7d0b214.js +0 -1
  481. package/.next-prod/static/chunks/app/api/files/paste/route-7975a2b8c7d0b214.js +0 -1
  482. package/.next-prod/static/chunks/app/api/files/read/route-7975a2b8c7d0b214.js +0 -1
  483. package/.next-prod/static/chunks/app/api/files/readdir/route-7975a2b8c7d0b214.js +0 -1
  484. package/.next-prod/static/chunks/app/api/files/recent/route-7975a2b8c7d0b214.js +0 -1
  485. package/.next-prod/static/chunks/app/api/files/save/route-7975a2b8c7d0b214.js +0 -1
  486. package/.next-prod/static/chunks/app/api/files/search/route-7975a2b8c7d0b214.js +0 -1
  487. package/.next-prod/static/chunks/app/api/files/stat/route-7975a2b8c7d0b214.js +0 -1
  488. package/.next-prod/static/chunks/app/api/files/text/route-7975a2b8c7d0b214.js +0 -1
  489. package/.next-prod/static/chunks/app/api/git/branch-diff/route-7975a2b8c7d0b214.js +0 -1
  490. package/.next-prod/static/chunks/app/api/git/branches/route-7975a2b8c7d0b214.js +0 -1
  491. package/.next-prod/static/chunks/app/api/git/commit-diff/route-7975a2b8c7d0b214.js +0 -1
  492. package/.next-prod/static/chunks/app/api/git/commits/route-7975a2b8c7d0b214.js +0 -1
  493. package/.next-prod/static/chunks/app/api/git/diff/route-7975a2b8c7d0b214.js +0 -1
  494. package/.next-prod/static/chunks/app/api/git/discard/route-7975a2b8c7d0b214.js +0 -1
  495. package/.next-prod/static/chunks/app/api/git/stage/route-7975a2b8c7d0b214.js +0 -1
  496. package/.next-prod/static/chunks/app/api/git/status/route-7975a2b8c7d0b214.js +0 -1
  497. package/.next-prod/static/chunks/app/api/git/unstage/route-7975a2b8c7d0b214.js +0 -1
  498. package/.next-prod/static/chunks/app/api/git/worktree/route-7975a2b8c7d0b214.js +0 -1
  499. package/.next-prod/static/chunks/app/api/global-state/route-7975a2b8c7d0b214.js +0 -1
  500. package/.next-prod/static/chunks/app/api/jupyter/load/route-7975a2b8c7d0b214.js +0 -1
  501. package/.next-prod/static/chunks/app/api/jupyter/save/route-7975a2b8c7d0b214.js +0 -1
  502. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-7975a2b8c7d0b214.js +0 -1
  503. package/.next-prod/static/chunks/app/api/lsp/definition/route-7975a2b8c7d0b214.js +0 -1
  504. package/.next-prod/static/chunks/app/api/lsp/hover/route-7975a2b8c7d0b214.js +0 -1
  505. package/.next-prod/static/chunks/app/api/lsp/references/route-7975a2b8c7d0b214.js +0 -1
  506. package/.next-prod/static/chunks/app/api/lsp/status/route-7975a2b8c7d0b214.js +0 -1
  507. package/.next-prod/static/chunks/app/api/lsp/warmup/route-7975a2b8c7d0b214.js +0 -1
  508. package/.next-prod/static/chunks/app/api/mysql/columns/route-7975a2b8c7d0b214.js +0 -1
  509. package/.next-prod/static/chunks/app/api/mysql/connect/route-7975a2b8c7d0b214.js +0 -1
  510. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-7975a2b8c7d0b214.js +0 -1
  511. package/.next-prod/static/chunks/app/api/mysql/export/route-7975a2b8c7d0b214.js +0 -1
  512. package/.next-prod/static/chunks/app/api/mysql/query/route-7975a2b8c7d0b214.js +0 -1
  513. package/.next-prod/static/chunks/app/api/mysql/schemas/route-7975a2b8c7d0b214.js +0 -1
  514. package/.next-prod/static/chunks/app/api/neo4j/connect/route-7975a2b8c7d0b214.js +0 -1
  515. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-7975a2b8c7d0b214.js +0 -1
  516. package/.next-prod/static/chunks/app/api/neo4j/query/route-7975a2b8c7d0b214.js +0 -1
  517. package/.next-prod/static/chunks/app/api/neo4j/schema/route-7975a2b8c7d0b214.js +0 -1
  518. package/.next-prod/static/chunks/app/api/note/route-7975a2b8c7d0b214.js +0 -1
  519. package/.next-prod/static/chunks/app/api/ollama/models/route-7975a2b8c7d0b214.js +0 -1
  520. package/.next-prod/static/chunks/app/api/ollama/start/route-7975a2b8c7d0b214.js +0 -1
  521. package/.next-prod/static/chunks/app/api/open-cursor/route-7975a2b8c7d0b214.js +0 -1
  522. package/.next-prod/static/chunks/app/api/open-vscode/route-7975a2b8c7d0b214.js +0 -1
  523. package/.next-prod/static/chunks/app/api/pick-folder/route-7975a2b8c7d0b214.js +0 -1
  524. package/.next-prod/static/chunks/app/api/pinned-sessions/route-7975a2b8c7d0b214.js +0 -1
  525. package/.next-prod/static/chunks/app/api/project-settings/route-7975a2b8c7d0b214.js +0 -1
  526. package/.next-prod/static/chunks/app/api/project-state/route-7975a2b8c7d0b214.js +0 -1
  527. package/.next-prod/static/chunks/app/api/projectGraph/file/route-7975a2b8c7d0b214.js +0 -1
  528. package/.next-prod/static/chunks/app/api/projectGraph/file-functions/route-7975a2b8c7d0b214.js +0 -1
  529. package/.next-prod/static/chunks/app/api/projectGraph/search/route-7975a2b8c7d0b214.js +0 -1
  530. package/.next-prod/static/chunks/app/api/projects/route-7975a2b8c7d0b214.js +0 -1
  531. package/.next-prod/static/chunks/app/api/redis/command/route-7975a2b8c7d0b214.js +0 -1
  532. package/.next-prod/static/chunks/app/api/redis/connect/route-7975a2b8c7d0b214.js +0 -1
  533. package/.next-prod/static/chunks/app/api/redis/delete/route-7975a2b8c7d0b214.js +0 -1
  534. package/.next-prod/static/chunks/app/api/redis/disconnect/route-7975a2b8c7d0b214.js +0 -1
  535. package/.next-prod/static/chunks/app/api/redis/get/route-7975a2b8c7d0b214.js +0 -1
  536. package/.next-prod/static/chunks/app/api/redis/keys/route-7975a2b8c7d0b214.js +0 -1
  537. package/.next-prod/static/chunks/app/api/redis/set/route-7975a2b8c7d0b214.js +0 -1
  538. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-7975a2b8c7d0b214.js +0 -1
  539. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-7975a2b8c7d0b214.js +0 -1
  540. package/.next-prod/static/chunks/app/api/review/[id]/route-7975a2b8c7d0b214.js +0 -1
  541. package/.next-prod/static/chunks/app/api/review/identify/route-7975a2b8c7d0b214.js +0 -1
  542. package/.next-prod/static/chunks/app/api/review/order/route-7975a2b8c7d0b214.js +0 -1
  543. package/.next-prod/static/chunks/app/api/review/route-7975a2b8c7d0b214.js +0 -1
  544. package/.next-prod/static/chunks/app/api/review/share-info/route-7975a2b8c7d0b214.js +0 -1
  545. package/.next-prod/static/chunks/app/api/review/users/route-7975a2b8c7d0b214.js +0 -1
  546. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-7975a2b8c7d0b214.js +0 -1
  547. package/.next-prod/static/chunks/app/api/services/config/route-7975a2b8c7d0b214.js +0 -1
  548. package/.next-prod/static/chunks/app/api/services/scripts/route-7975a2b8c7d0b214.js +0 -1
  549. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-7975a2b8c7d0b214.js +0 -1
  550. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-7975a2b8c7d0b214.js +0 -1
  551. package/.next-prod/static/chunks/app/api/session-by-path/route-7975a2b8c7d0b214.js +0 -1
  552. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-7975a2b8c7d0b214.js +0 -1
  553. package/.next-prod/static/chunks/app/api/sessions/projects/route-7975a2b8c7d0b214.js +0 -1
  554. package/.next-prod/static/chunks/app/api/sessions/route-7975a2b8c7d0b214.js +0 -1
  555. package/.next-prod/static/chunks/app/api/settings/route-7975a2b8c7d0b214.js +0 -1
  556. package/.next-prod/static/chunks/app/api/skills/[id]/route-7975a2b8c7d0b214.js +0 -1
  557. package/.next-prod/static/chunks/app/api/skills/content/route-7975a2b8c7d0b214.js +0 -1
  558. package/.next-prod/static/chunks/app/api/skills/route-7975a2b8c7d0b214.js +0 -1
  559. package/.next-prod/static/chunks/app/api/terminal/aliases/route-7975a2b8c7d0b214.js +0 -1
  560. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-7975a2b8c7d0b214.js +0 -1
  561. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-7975a2b8c7d0b214.js +0 -1
  562. package/.next-prod/static/chunks/app/api/terminal/env/route-7975a2b8c7d0b214.js +0 -1
  563. package/.next-prod/static/chunks/app/api/terminal/history/route-7975a2b8c7d0b214.js +0 -1
  564. package/.next-prod/static/chunks/app/api/version/route-7975a2b8c7d0b214.js +0 -1
  565. package/.next-prod/static/chunks/app/layout-92d5dcd25bad9196.js +0 -1
  566. package/.next-prod/static/chunks/app/manifest.webmanifest/route-7975a2b8c7d0b214.js +0 -1
  567. package/.next-prod/static/chunks/app/review/[id]/page-05cd4cb51babd64c.js +0 -1
  568. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-7975a2b8c7d0b214.js +0 -1
  569. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-7975a2b8c7d0b214.js +0 -1
  570. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-7975a2b8c7d0b214.js +0 -1
  571. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-7975a2b8c7d0b214.js +0 -1
  572. package/.next-prod/static/chunks/webpack-bb0c02e3a9602d78.js +0 -1
  573. package/.next-prod/static/css/a7974d62fe853925.css +0 -1
  574. package/dist/chunk-HIRLDMCH.mjs +0 -314
  575. /package/.next-prod/static/{WsSesL2O_jRoZztt2Y5r6 → LJRtmjYCuVrSA_dcelxlR}/_ssgManifest.js +0 -0
@@ -20,4 +20,4 @@ ${n}
20
20
  3. "-" cannot repeat`);e5.customSchemes.push([e,t])}function e8(){e5.scanner=ez(e5.customSchemes);for(let e=0;e<e5.tokenQueue.length;e++)e5.tokenQueue[e][1]({scanner:e5.scanner});e5.parser=eY(e5.scanner.tokens);for(let e=0;e<e5.pluginQueue.length;e++)e5.pluginQueue[e][1]({scanner:e5.scanner,parser:e5.parser});return e5.initialized=!0,e5}function e9(e){return e5.initialized||e8(),e0(e5.parser.start,e,eB(e5.scanner.start,e))}function e7(e,t=null,n=null){if(t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new eU(n),i=e9(e),s=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&s.push(n.toFormattedObject(r))}return s}e9.scan=eB;var te=n(76865),tt="[\0- \xa0 ᠎ -\u2029  ]",tn=new RegExp(tt),tr=RegExp(`${tt}$`),ti=RegExp(tt,"g");function ts(e){return 1===e.length?e[0].isLink:3===e.length&&!!e[1].isLink&&["()","[]"].includes(e[0].value+e[2].value)}function to(e){return new te.k_({key:new te.hs("autolink"),appendTransaction:(t,n,i)=>{let s=t.some(e=>e.docChanged)&&!n.doc.eq(i.doc),o=t.some(e=>e.getMeta("preventAutolink"));if(!s||o)return;let{tr:a}=i,l=(0,r.T7)(n.doc,[...t]);if((0,r.FF)(l).forEach(({newRange:t})=>{let n,s,o=(0,r.Nx)(i.doc,t,e=>e.isTextblock);if(o.length>1)n=o[0],s=i.doc.textBetween(n.pos,n.pos+n.node.nodeSize,void 0," ");else if(o.length){let e=i.doc.textBetween(t.from,t.to," "," ");if(!tr.test(e))return;n=o[0],s=i.doc.textBetween(n.pos,t.to,void 0," ")}if(n&&s){let t=s.split(tn).filter(Boolean);if(t.length<=0)return!1;let o=t[t.length-1],l=n.pos+s.lastIndexOf(o);if(!o)return!1;let h=e9(o).map(t=>t.toObject(e.defaultProtocol));if(!ts(h))return!1;h.filter(e=>e.isLink).map(e=>({...e,from:l+e.start+1,to:l+e.end+1})).filter(e=>!i.schema.marks.code||!i.doc.rangeHasMark(e.from,e.to,i.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{(0,r.hO)(t.from,t.to,i.doc).some(t=>t.mark.type===e.type)||a.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),a.steps.length)return a}})}function ta(e){return new te.k_({key:new te.hs("handleClickLink"),props:{handleClick:(t,n,i)=>{var s,o;if(0!==i.button||!t.editable)return!1;let a=null;if(i.target instanceof HTMLAnchorElement)a=i.target;else{let t=i.target;if(!t)return!1;let n=e.editor.view.dom;(a=t.closest("a"))&&!n.contains(a)&&(a=null)}if(!a)return!1;let l=!1;if(e.enableClickSelection&&(l=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=(0,r.gu)(t.state,e.type.name),i=null!=(s=a.href)?s:n.href,h=null!=(o=a.target)?o:n.target;i&&(window.open(i,h),l=!0)}return l}}})}function tl(e){return new te.k_({key:new te.hs("handlePasteLink"),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:s}=t,{selection:o}=s,{empty:a}=o;if(a)return!1;let l="";r.content.forEach(e=>{l+=e.textContent});let h=e7(l,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===l);return!!l&&!!h&&(void 0===i||!!i(h.value))&&e.editor.commands.setMark(e.type,{href:h.href})}}})}function th(e,t){let n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return t&&t.forEach(e=>{let t="string"==typeof e?e:e.scheme;t&&n.push(t)}),!e||e.replace(ti,"").match(RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var tc=r.CU.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{"string"==typeof e?e6(e):e6(e.scheme,e.optionalSlashes)})},onDestroy(){e4()},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(e,t)=>!!th(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes("@"))return!0;let r=(e.includes("@")?e.split("@").pop():e).split(/[/?#:]/)[0];return!/^\d{1,3}(\.\d{1,3}){3}$/.test(r)&&!!/\./.test(r)}}),addAttributes(){return{href:{default:null,parseHTML:e=>e.getAttribute("href")},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:e=>{let t=e.getAttribute("href");return!!t&&!!this.options.isAllowedUri(t,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",(0,r.KV)(this.options.HTMLAttributes,e),0]:["a",(0,r.KV)(this.options.HTMLAttributes,{...e,href:""}),0]},markdownTokenName:"link",parseMarkdown:(e,t)=>t.applyMark("link",t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{var n,r,i,s;let o=null!=(r=null==(n=e.attrs)?void 0:n.href)?r:"",a=null!=(s=null==(i=e.attrs)?void 0:i.title)?s:"",l=t.renderChildren(e);return a?`[${l}](${o} "${a}")`:`[${l}](${o})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})&&t().setMark(this.name,e).setMeta("preventAutolink",!0).run()},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return(!n||!!this.options.isAllowedUri(n,{defaultValidate:e=>!!th(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}))&&t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[(0,r.Zc)({find:e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options,i=e7(e).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!th(e,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t},type:this.type,getAttributes:e=>{var t;return{href:null==(t=e.data)?void 0:t.href}}})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(to({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!th(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(ta({type:this.type,editor:this.editor,openOnClick:"whenNotEditable"===this.options.openOnClick||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(tl({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),tu=tc},61878:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s=(0,r.A)("search",i)},62678:(e,t,n)=>{"use strict";n.d(t,{QO:()=>G,vR:()=>J,Or:()=>X,JU:()=>ee,lb:()=>et});var r=n(82159),i=n(76865),s=n(8242);function o(e={}){return new i.k_({view:t=>new a(t,e)})}class a{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),a=o.width/s.offsetWidth,l=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*l;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/a+"px",this.element.style.top=(i.top-t)/l+"px",this.element.style.width=(i.right-i.left)/a+"px",this.element.style.height=(i.bottom-i.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,s.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var l=n(63197),h=n(12894),c=n(27050);class u extends i.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return u.valid(n)?new u(n):i.LN.near(n)}content(){return c.Ji.empty}eq(e){return e instanceof u&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new u(e.resolve(t.pos))}getBookmark(){return new d(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!f(e)||!m(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){i:for(;;){if(!n&&u.valid(e))return e;let r=e.pos,s=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){s=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(u.valid(o))return o}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue i}break}s=o,r+=t;let a=e.doc.resolve(r);if(u.valid(a))return a}return null}}}u.prototype.visible=!1,u.findFrom=u.findGapCursorFrom,i.LN.jsonID("gapcursor",u);class d{constructor(e){this.pos=e}map(e){return new d(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return u.valid(t)?new u(t):i.LN.near(t)}}function p(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function f(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function m(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||p(e.type))return!0;if(e.inlineContent)return!1}}return!0}function g(){return new i.k_({props:{decorations:w,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&u.valid(n)?new u(n):null,handleClick:b,handleKeyDown:_,handleDOMEvents:{beforeinput:k}}})}let _=(0,h.K)({ArrowLeft:y("horiz",-1),ArrowRight:y("horiz",1),ArrowUp:y("vert",-1),ArrowDown:y("vert",1)});function y(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,s){let o=e.selection,a=t>0?o.$to:o.$from,l=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==a.depth)return!1;l=!1,a=e.doc.resolve(t>0?a.after():a.before())}let h=u.findGapCursorFrom(a,t,l);return!!h&&(r&&r(e.tr.setSelection(new u(h))),!0)}}function b(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!u.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(e.state.doc.nodeAt(s.inside)))&&(e.dispatch(e.state.tr.setSelection(new u(r))),!0)}function k(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof u))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=c.FK.empty;for(let e=r.length-1;e>=0;e--)s=c.FK.from(r[e].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new c.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function w(e){if(!(e.selection instanceof u))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.zF.create(e.doc,[l.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var v=200,C=function(){};C.prototype.append=function(e){return e.length?(e=C.from(e),!this.length&&e||e.length<v&&this.leafAppend(e)||this.length<v&&e.leafPrepend(this)||this.appendInner(e)):this},C.prototype.prepend=function(e){return e.length?C.from(e).append(this):this},C.prototype.appendInner=function(e){return new S(this,e)},C.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?C.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},C.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},C.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},C.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},C.from=function(e){return e instanceof C?e:e&&e.length?new x(e):C.empty};var x=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=v)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=v)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(C);C.empty=new x([]);var S=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(C);let A=C,E=500;class M{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let a=e.tr,l=[],h=[];return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new N(e.map));let t=e.step.map(n.slice(r)),i;t&&a.maybeStep(t).doc&&(i=a.mapping.maps[a.mapping.maps.length-1],l.push(new N(i,void 0,void 0,l.length+h.length))),r--,i&&n.appendMap(i,r)}else a.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new M(this.items.slice(0,o).append(h.reverse().concat(l)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let i=[],s=this.eventCount,o=this.items,a=!r&&o.length?o.get(o.length-1):null;for(let n=0;n<e.steps.length;n++){let l=e.steps[n].invert(e.docs[n]),h=new N(e.mapping.maps[n],l,t),c;(c=a&&a.merge(h))&&(h=c,n?i.pop():o=o.slice(0,o.length-1)),i.push(h),t&&(s++,t=void 0),r||(a=h)}let l=s-n.depth;return l>D&&(o=T(o,l),s-=l),new M(o.append(i),s)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new M(this.items.append(e.map(e=>new N(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let a=t;this.items.forEach(t=>{let r=i.getMirror(--a);if(null==r)return;s=Math.min(s,r);let l=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(a+1,r));h&&o++,n.push(new N(l,s,h))}else n.push(new N(l))},r);let l=[];for(let e=t;e<s;e++)l.push(new N(i.maps[e]));let h=new M(this.items.slice(0,r).append(l).append(n),o);return h.emptyItemCount()>E&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let a=s.selection&&s.selection.map(t.slice(n));a&&i++;let l=new N(o.invert(),e,a),h,c=r.length-1;(h=r.length&&r[c].merge(l))?r[c]=h:r.push(l)}}else s.map&&n--},this.items.length,0),new M(A.from(r.reverse()),i)}}function T(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&0==t--)return n=r,!1}),e.slice(n)}M.empty=new M(A.empty,0);class N{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new N(t.getMap().invert(),t,this.selection)}}}class I{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let D=20;function L(e,t,n,r){let i=n.getMeta(j),s;if(i)return i.historyState;n.getMeta(q)&&(e=new I(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(j))if(o.getMeta(j).redo)return new I(e.done.addTransform(n,void 0,r,$(t)),e.undone,F(n.mapping.maps),e.prevTime,e.prevComposition);else return new I(e.done,e.undone.addTransform(n,void 0,r,$(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new I(e.done.rebased(n,s),e.undone.rebased(n,s),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new I(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),P(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!R(n,e.prevRanges)),a=o?P(e.prevRanges,n.mapping):F(n.mapping.maps);return new I(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,$(t)),M.empty,a,n.time,null==i?e.prevComposition:i)}}function R(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function F(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function P(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}function O(e,t,n){let r=$(t),i=j.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),a=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),l=new I(n?a:s.remaining,n?s.remaining:a,null,0,-1);return s.transform.setSelection(o).setMeta(j,{redo:n,historyState:l})}let z=!1,B=null;function $(e){let t=e.plugins;if(B!=t){z=!1,B=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){z=!0;break}}return z}let j=new i.hs("history"),q=new i.hs("closeHistory");function H(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new i.k_({key:j,state:{init:()=>new I(M.empty,M.empty,null,0,-1),apply:(t,n,r)=>L(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?W:"historyRedo"==n?V:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function U(e,t){return(n,r)=>{let i=j.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=O(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let W=U(!1,!0),V=U(!0,!0);U(!1,!1),U(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit;if(null==i||0===i){e=!0;return}let s=this.storage.characters({node:r.doc});if(s>i){let t=0,n=s-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let o=r.tr.deleteRange(t,n);return e=!0,o}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos,o=s-(i-n),a=s;return e.deleteRange(o,a),!(this.storage.characters({node:e.doc})>n)}})]}});var G=r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[o(this.options)]}});r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return l.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&o-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(l.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),l.zF.create(e,s)}}})]}});var J=r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[g()],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}}),K="placeholder";function Z(e){return e.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}var X=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:K,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){let e=this.options.dataAttribute?`data-${Z(this.options.dataAttribute)}`:`data-${K}`;return[new i.k_({key:new i.hs("placeholder"),props:{decorations:({doc:t,selection:n})=>{let i=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:s}=n,o=[];if(!i)return null;let a=this.editor.isEmpty;return t.descendants((t,n)=>{let i=s>=n&&s<=n+t.nodeSize,h=!t.isLeaf&&(0,r.Op)(t);if(!t.type.isTextblock)return this.options.includeChildren;if((i||!this.options.showOnlyCurrent)&&h){let r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);let s=l.NZ.node(n,n+t.nodeSize,{class:r.join(" "),[e]:"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:t,pos:n,hasAnchor:i}):this.options.placeholder});o.push(s)}return this.options.includeChildren}),l.zF.create(t,o)}}})]}});r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>n.selection.empty||e.isFocused||!e.isEditable||(0,r.BQ)(n.selection)||e.view.dragging?null:l.zF.create(n.doc,[l.NZ.inline(n.selection.from,n.selection.to,{class:t.className})])}})]}});var Q="skipTrailingNode";function Y({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}var ee=r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new i.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new i.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:a}=i,l=t.getState(i),h=s.content.size,c=a.nodes[n];if(!e.some(e=>e.getMeta(Q))&&l)return o.insert(h,c.create())},state:{init:(e,t)=>!Y({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!Y({node:e.doc.lastChild,types:r})}})]}}),et=r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>W(e,t),redo:()=>({state:e,dispatch:t})=>V(e,t)}),addProseMirrorPlugins(){return[H(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}})},64702:(e,t,n)=>{"use strict";n.d(t,{Te:()=>C});var r=n(12115),i=n(47650);function s(e,t,n){let r,i=n.initialDeps??[],s=!0;function o(){var o,a,l;let h,c;n.key&&(null==(o=n.debug)?void 0:o.call(n))&&(h=Date.now());let u=e();if(!(u.length!==i.length||u.some((e,t)=>i[t]!==e)))return r;if(i=u,n.key&&(null==(a=n.debug)?void 0:a.call(n))&&(c=Date.now()),r=t(...u),n.key&&(null==(l=n.debug)?void 0:l.call(n))){let e=Math.round((Date.now()-h)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=" "+e;return e};console.info(`%c⏱ ${i(t,5)} /${i(e,5)} ms`,`
21
21
  font-size: .6rem;
22
22
  font-weight: bold;
23
- color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(s&&n.skipInitialOnChange)&&n.onChange(r),s=!1,r}return o.updateDeps=e=>{i=e},o}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let a=(e,t)=>1.01>Math.abs(e-t),l=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},h=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},c=e=>e,u=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},d=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(h(n)),!r.ResizeObserver)return()=>{};let s=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(h(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},p={passive:!0},f="u"<typeof window||"onscrollend"in window,m=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,s=e.options.useScrollendEvent&&f?()=>void 0:l(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:a}=e.options;i=o?n.scrollLeft*(a&&-1||1):n.scrollTop,s(),t(i,r)},a=o(!0),h=o(!1);n.addEventListener("scroll",a,p);let c=e.options.useScrollendEvent&&f;return c&&n.addEventListener("scrollend",h,p),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",h)}},g=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},_=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;let o=e+t;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class y{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:c,rangeExtractor:u,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let s=r.get(t.lane);if(null==s||t.end>s.end?r.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,s,o)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=s(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let h=this.measurementsCache.slice(0,l),c=Array(s).fill(void 0);for(let e=0;e<l;e++){let t=h[e];t&&(c[t.lane]=e)}for(let i=l;i<e;i++){let e,s,l=r(i),u=this.laneAssignments.get(i),d="estimate"===o||a.has(l);if(void 0!==u&&this.options.lanes>1){let r=c[e=u],i=void 0!==r?h[r]:void 0;s=i?i.end+this.options.gap:t+n}else{let r=1===this.options.lanes?h[i-1]:this.getFurthestMeasurement(h,i);s=r?r.end+this.options.gap:t+n,e=r?r.lane:i%this.options.lanes,this.options.lanes>1&&d&&this.laneAssignments.set(i,e)}let p=a.get(l),f="number"==typeof p?p:this.options.estimateSize(i),m=s+f;h[i]={index:i,start:s,size:f,end:m,key:l,lane:e},c[e]=i}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=s(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-t),i=Math.min(this.options.count-1,n+t);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;let r=this.measurementsCache[e];if(!r)return;let i=t-(this.itemSizeCache.get(r.key)??r.size);0!==i&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.getVirtualItems=s(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return o(t[b(0,t.length-1,e=>o(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if("auto"===t)if(i.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let s="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,i.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,s]=r,o=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),r=n.length-1;for(;r>=0&&e.some(e=>null===e);){let t=n[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let e=5e3;if(this.now()-this.scrollState.startedAt>e){this.scrollState=null;return}let t=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=t?t[0]:this.scrollState.lastTargetOffset,r=1,i=n!==this.scrollState.lastTargetOffset;if(!i&&a(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let b=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0};function k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,s=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=b(0,i,s,n),a=o;if(1===r)for(;a<i&&e[a].end<n+t;)a++;else if(r>1){let s=Array(r).fill(0);for(;a<i&&s.some(e=>e<n+t);){let t=e[a];s[t.lane]=t.end,a++}let l=Array(r).fill(n+t);for(;o>=0&&l.some(e=>e>=n);){let t=e[o];l[t.lane]=t.start,o--}o=Math.max(0,o-o%r),a=Math.min(i,a+(r-1-a%r))}return{startIndex:o,endIndex:a}}let w="u">typeof document?r.useLayoutEffect:r.useEffect;function v({useFlushSync:e=!0,...t}){let n=r.useReducer(()=>({}),{})[1],s={...t,onChange:(r,s)=>{var o;e&&s?(0,i.flushSync)(n):n(),null==(o=t.onChange)||o.call(t,r,s)}},[o]=r.useState(()=>new y(s));return o.setOptions(s),w(()=>o._didMount(),[]),w(()=>o._willUpdate()),o}function C(e){return v({observeElementRect:d,observeElementOffset:m,scrollToFn:_,...e})}},65915:e=>{var t=!0,n=!1,r=!1;function i(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):e.attrs[r]=i}function s(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return -1}function o(e,t){return d(e[t])&&p(e[t-1])&&f(e[t-2])&&m(e[t])}function a(e,t){if(e.children.unshift(l(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n)if(r){e.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+i+'">',e.children.push(u(e.content,i,t))}else e.children.unshift(h(t)),e.children.push(c(t))}function l(e,n){var r=new n("html_inline","",0),i=t?' disabled="" ':"";return 0===e.content.indexOf("[ ] ")?r.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] "))&&(r.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),r}function h(e){var t=new e("html_inline","",0);return t.content="<label>",t}function c(e){var t=new e("html_inline","",0);return t.content="</label>",t}function u(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}function d(e){return"inline"===e.type}function p(e){return"paragraph_open"===e.type}function f(e){return"list_item_open"===e.type}function m(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}e.exports=function(e,l){l&&(t=!l.enabled,n=!!l.label,r=!!l.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var n=e.tokens,r=2;r<n.length;r++)o(n,r)&&(a(n[r],e.Token),i(n[r-2],"class","task-list-item"+(t?"":" enabled")),i(n[s(n,r-2)],"class","contains-task-list"))})}},66088:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],s=(0,r.A)("chevron-down",i)},67014:(e,t,n)=>{"use strict";let r,i,s,o;n.d(t,{O_:()=>rU});class a extends Error{constructor(e){super(e),this.name="ShikiError"}}var l=n(41463);function h(e){return c(e)}function c(e){return Array.isArray(e)?u(e):e instanceof RegExp?e:"object"==typeof e?d(e):e}function u(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=c(e[n]);return t}function d(e){let t={};for(let n in e)t[n]=c(e[n]);return t}function p(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function f(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?f(e.substring(0,e.length-1)):e.substr(~t+1)}var m=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,g=class{static hasCaptures(e){return null!==e&&(m.lastIndex=0,m.test(e))}static replaceCaptures(e,t,n){return e.replace(m,(e,r,i,s)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(s){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function _(e,t){return e<t?-1:+(e>t)}function y(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=_(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function b(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function k(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var w=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},v=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(E(e),t)}static createFromParsedTheme(e,t){return N(e,t)}_cachedMatchRoot=new w(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>x(e.parent,t.parentScopes));return n?new A(n.fontStyle,n.foreground,n.background):null}},C=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function x(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!S(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function S(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var A=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function E(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let a=null;"string"==typeof s.settings.foreground&&b(s.settings.foreground)&&(a=s.settings.foreground);let l=null;"string"==typeof s.settings.background&&b(s.settings.background)&&(l=s.settings.background);for(let t=0,s=i.length;t<s;t++){let s=i[t].trim().split(" "),h=s[s.length-1],c=null;s.length>1&&(c=s.slice(0,s.length-1)).reverse(),n[r++]=new M(h,c,e,o,a,l)}}return n}var M=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},T=((s=T||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s);function N(e,t){e.sort((e,t)=>{let n=_(e.scope,t.scope);return 0!==n||0!==(n=y(e.parentScopes,t.parentScopes))?n:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let s=new I(t),o=new A(n,s.getId(r),s.getId(i)),a=new R(new L(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];a.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new v(s,o,a)}var I=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},D=Object.freeze([]),L=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||D,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},R=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,s,o){let a,l,h;if(""===n)return void this._doInsertHere(t,r,i,s,o);let c=n.indexOf(".");-1===c?(a=n,l=""):(a=n.substring(0,c),l=n.substring(c+1)),this._children.hasOwnProperty(a)?h=this._children[a]:(h=new e(this._mainRule.clone(),L.cloneArr(this._rulesWithParentScopes)),this._children[a]=h),h.insert(t+1,l,r,i,s,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===y(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new L(e,t,n,r,i))}},F=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,s,o,a){let l=e.getLanguageId(t),h=e.getTokenType(t),c=+!!e.containsBalancedBrackets(t),u=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(h=O(r)),null!==i&&(c=+!!i),-1!==s&&(u=s),0!==o&&(d=o),0!==a&&(p=a),(l|h<<8|c<<10|u<<11|d<<15|p<<24)>>>0}};function P(e){return e}function O(e){return e}function z(e,t){let n=[],r=$(e),i=r.next();for(;null!==i;){let e=0;if(2===i.length&&":"===i.charAt(1)){switch(i.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),","!==i)break;i=r.next()}return n;function s(){if("-"===i){i=r.next();let e=s();return t=>!!e&&!e(t)}if("("===i){i=r.next();let e=a();return")"===i&&(i=r.next()),e}if(B(i)){let e=[];do e.push(i),i=r.next();while(B(i));return n=>t(e,n)}return null}function o(){let e=[],t=s();for(;t;)e.push(t),t=s();return t=>e.every(e=>e(t))}function a(){let e=[],t=o();for(;t&&(e.push(t),"|"===i||","===i);){do i=r.next();while("|"===i||","===i);t=o()}return t=>e.some(e=>e(t))}}function B(e){return!!e&&!!e.match(/[\w\.:]+/)}function $(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}var j=((o=j||{})[o.None=0]="None",o[o.NotBeginString=1]="NotBeginString",o[o.NotEndString=2]="NotEndString",o[o.NotBeginPosition=4]="NotBeginPosition",o[o.DebugCall=8]="DebugCall",o);function q(e){"function"==typeof e.dispose&&e.dispose()}var H=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},U=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},W=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},V=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new H(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new W;for(let n of e)G(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof H){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function G(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof H?K({baseGrammar:s,selfGrammar:i},r):J(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new H(e))}function J(e,t,n){t.repository&&t.repository[e]&&Z([t.repository[e]],t,n)}function K(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Z(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Z(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Z(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?p({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Z(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let s=en(i);switch(s.kind){case 0:K({...t,selfGrammar:t.baseGrammar},n);break;case 1:K(t,n);break;case 2:J(s.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===s.kind?J(s.ruleName,r,n):K(r,n)}else 4===s.kind?n.add(new U(s.scopeName,s.ruleName)):n.add(new H(s.scopeName))}}}var X=class{kind=0},Q=class{kind=1},Y=class{constructor(e){this.ruleName=e}kind=2},ee=class{constructor(e){this.scopeName=e}kind=3},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function en(e){if("$base"===e)return new X;if("$self"===e)return new Q;let t=e.indexOf("#");return -1===t?new ee(e):0===t?new Y(e.substring(1)):new et(e.substring(0,t),e.substring(t+1))}var er=/\\(\d+)/,ei=/\\(\d+)/g;Symbol("RuleId");var es=-1,eo=-2;function ea(e){return e}function el(e){return e}var eh=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=g.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=g.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${f(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?g.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?g.replaceCaptures(this._contentName,e,t):this._contentName}},ec=class extends eh{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},eu=class extends eh{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ed=class extends eh{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ep=class extends eh{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,a,l,h){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this._end=new eg(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ef=class extends eh{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,a,l){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new eg(o,eo),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new e_,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},em=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ec(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eu(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=p({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new ed(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ef(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ep(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>s&&(s=t)}for(let e=0;e<=s;e++)i[e]=null;for(let s in t){if("$vscodeTextmateLocation"===s)continue;let o=parseInt(s,10),a=0;t[s].patterns&&(a=e.getCompiledRuleId(t[s],n,r)),i[o]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,a)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;s<o;s++){let o=t[s],a=-1;if(o.include){let t=en(o.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(a=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let s=t.scopeName,l=4===t.kind?t.ruleName:null,h=n.getExternalGrammar(s,r);if(h)if(l){let t=h.repository[l];t&&(a=e.getCompiledRuleId(t,n,h.repository))}else a=e.getCompiledRuleId(h.repository.$self,n,h.repository)}}else a=e.getCompiledRuleId(o,n,r);if(-1!==a){let e=n.getRule(a),t=!1;if((e instanceof ed||e instanceof ep||e instanceof ef)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let s=0;s<t;s++)if("\\"===e.charAt(s)&&s+1<t){const t=e.charAt(s+1);"z"===t?(r.push(e.substring(n,s)),r.push("$(?!\\n)(?<!\\n)"),n=s+2):("A"===t||"G"===t)&&(i=!0),s++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=er.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return ei.lastIndex=0,this.source.replace(ei,(e,t)=>k(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],s=[],o=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,s[e]=n,o[e]=n,a[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="￿",s[e+1]="￿",o[e+1]="A",a[e+1]="A"):"G"===r?(i[e+1]="￿",s[e+1]="G",o[e+1]="￿",a[e+1]="G"):(i[e+1]=r,s[e+1]=r,o[e+1]=r,a[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},e_=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new ey(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new ey(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ey=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},eb=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ek=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new eb(e,8),this._embeddedLanguagesMatcher=new ew(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new eb(0,0);_getBasicScopeAttributes=new w(e=>new eb(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ew=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>k(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==l&&l.env.VSCODE_TEXTMATE_DEBUG;var ev=!1,eC=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ex(e,t,n,r,i,s,o,a){let l=t.content.length,h=!1,c=-1;if(o){let o=eS(e,t,n,r,i,s);i=o.stack,r=o.linePos,n=o.isFirstLine,c=o.anchorPosition}let u=Date.now();for(;!h;){if(0!==a&&Date.now()-u>a)return new eC(i,!0);d()}return new eC(i,!1);function d(){let o=eA(e,t,n,r,i,c);if(!o){s.produce(i,l),h=!0;return}let a=o.captureIndices,u=o.matchedRuleId,d=!!a&&a.length>0&&a[0].end>r;if(u===es){let o=i.getRule(e);s.produce(i,a[0].start),i=i.withContentNameScopesList(i.nameScopesList),eD(e,t,n,i,s,o.endCaptures,a),s.produce(i,a[0].end);let u=i;if(i=i.parent,c=u.getAnchorPos(),!d&&u.getEnterPos()===r){i=u,s.produce(i,l),h=!0;return}}else{let o=e.getRule(u);s.produce(i,a[0].start);let p=i,f=o.getName(t.content,a),m=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(u,r,c,a[0].end===l,null,m,m),o instanceof ep){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(o instanceof ef){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(eD(e,t,n,i,s,o.captures,a),s.produce(i,a[0].end),i=i.pop(),!d){i=i.safePop(),s.produce(i,l),h=!0;return}}a[0].end>r&&(r=a[0].end,n=!1)}}function eS(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1,a=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ef&&a.push({rule:n,stack:t})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:a,findOptions:h}=eN(l.rule,e,l.stack.endRule,n,r===o),c=a.findNextMatchSync(t,r,h);if(c){if(c.ruleId!==eo){i=l.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(l.stack,c.captureIndices[0].start),eD(e,t,n,l.stack,s,l.rule.whileCaptures,c.captureIndices),s.produce(l.stack,c.captureIndices[0].end),o=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function eA(e,t,n,r,i,s){let o=eE(e,t,n,r,i,s),a=e.getInjections();if(0===a.length)return o;let l=eM(a,e,t,n,r,i,s);if(!l)return o;if(!o)return l;let h=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<h||l.priorityMatch&&c===h?l:o}function eE(e,t,n,r,i,s){let{ruleScanner:o,findOptions:a}=eT(i.getRule(e),e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function eM(e,t,n,r,i,s,o){let a,l=Number.MAX_VALUE,h=null,c=0,u=s.contentNameScopesList.getScopeNames();for(let s=0,d=e.length;s<d;s++){let d=e[s];if(!d.matcher(u))continue;let{ruleScanner:p,findOptions:f}=eT(t.getRule(d.ruleId),t,null,r,i===o),m=p.findNextMatchSync(n,i,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,h=m.captureIndices,a=m.ruleId,c=d.priority,l===i))break}return h?{priorityMatch:-1===c,captureIndices:h,matchedRuleId:a}:null}function eT(e,t,n,r,i){return ev?{ruleScanner:e.compile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eN(e,t,n,r,i){return ev?{ruleScanner:e.compileWhile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function eI(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function eD(e,t,n,r,i,s,o){if(0===s.length)return;let a=t.content,l=Math.min(s.length,o.length),h=[],c=o[0].end;for(let t=0;t<l;t++){let l=s[t];if(null===l)continue;let u=o[t];if(0===u.length)continue;if(u.start>c)break;for(;h.length>0&&h[h.length-1].endPos<=u.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,u.start):i.produce(r,u.start),l.retokenizeCapturedWithRuleId){let t=l.getName(a,o),s=r.contentNameScopesList.pushAttributed(t,e),h=l.getContentName(a,o),c=s.pushAttributed(h,e),d=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,s,c),p=e.createOnigString(a.substring(0,u.end));ex(e,p,n&&0===u.start,u.start,d,i,!1,0),q(p);continue}let d=l.getName(a,o);if(null!==d){let t=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);h.push(new eL(t,u.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var eL=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eR(e,t,n,r,i,s,o,a){return new ez(e,t,n,r,i,s,o,a)}function eF(e,t,n,r,i){let s=z(t,eP),o=em.getCompiledRuleId(n,r,i.repository);for(let n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function eP(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(eO(t[r],e))return n=r+1,!0;return!1})}function eO(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var ez=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ek(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eB(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of z(e,eP))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){let e=r.injections;if(e)for(let n in e)eF(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&eF(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ea(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[el(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eB(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=em.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ej.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),s=F.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?e$.createRootAndLookUpScopeName(o,s,this):e$.createRoot("unknown",s),t=new ej(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let s=this.createOnigString(e),o=s.content.length,a=new eH(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ex(this,s,i,0,t,a,!0,r);return q(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eB(e,t){return(e=h(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var e$=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=C.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new C(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),s=new C(null,t),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(n,i,o);return new e(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,s=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,s=n.backgroundId),F.set(e,t.languageId,t.tokenType,null,r,i,s)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ej=class e{constructor(e,t,n,r,i,s,o,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e$.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new e(this,t,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:el(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=e$.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ea(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,e$.fromExtension(r,n.contentNameScopesList))}},eq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):z(e,eP).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>z(e,eP).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eH=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=F.set(n,0,P(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=F.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eU=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,eR(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},eW=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eU(v.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(v.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eq(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let s=new V(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(e=>this._loadSingleGrammar(e.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eV=ej.NULL,eG=n(51640),eJ=n(4918),eK=n(27629);let eZ=/["&'<>`]/g,eX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eQ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eY=/[|\\{}()[\]^$+*?.]/g,e0=new WeakMap;function e1(e,t){if(e=e.replace(t.subset?e2(t.subset):eZ,r),t.subset||t.escapeOnly)return e;return e.replace(eX,n).replace(eQ,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function e2(e){let t=e0.get(e);return t||(t=e3(e),e0.set(e,t)),t}function e3(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(eY,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}let e5=/[\dA-Fa-f]/;function e4(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!e5.test(String.fromCharCode(t))?r:r+";"}let e6=/\d/;function e8(e,t,n){let r="&#"+String(e);return n&&t&&!e6.test(String.fromCharCode(t))?r:r+";"}var e9=n(6801);let e7={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},te=["cent","copy","divide","gt","lt","not","para","times"],tt={}.hasOwnProperty,tn={};for(r in e7)tt.call(e7,r)&&(tn[e7[r]]=r);let tr=/[^\dA-Za-z]/;function ti(e,t,n,r){let i=String.fromCharCode(e);if(tt.call(tn,i)){let e=tn[i],s="&"+e;return n&&e9.K.includes(e)&&!te.includes(e)&&(!r||t&&61!==t&&tr.test(String.fromCharCode(t)))?s:s+";"}return""}function ts(e,t,n){let r,i=e4(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=ti(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=e8(e,t,n.omitOptionalSemicolons);r.length<i.length&&(i=r)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function to(e,t){return e1(e,Object.assign({format:ts},t))}let ta=/^>|^->|<!--|-->|--!>|<!-$/g,tl=[">"],th=["<",">"];function tc(e,t,n,r){return r.settings.bogusComments?"<?"+to(e.value,Object.assign({},r.settings.characterReferences,{subset:tl}))+">":"\x3c!--"+e.value.replace(ta,i)+"--\x3e";function i(e){return to(e,Object.assign({},r.settings.characterReferences,{subset:th}))}}function tu(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var td=n(49884),tp=n(86994),tf=n(38609),tm=n(51705),tg=n(36887);let t_=tk(1),ty=tk(-1),tb=[];function tk(e){return t;function t(t,n,r){let i=t?t.children:tb,s=(n||0)+e,o=i[s];if(!r)for(;o&&(0,tg.m)(o);)s+=e,o=i[s];return o}}let tw={}.hasOwnProperty;function tv(e){return t;function t(t,n,r){return tw.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tC=tv({body:tA,caption:tx,colgroup:tx,dd:tN,dt:tT,head:tx,html:tS,li:tM,optgroup:tD,option:tL,p:tE,rp:tI,rt:tI,tbody:tF,td:tz,tfoot:tP,th:tz,thead:tR,tr:tO});function tx(e,t,n){let r=t_(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tg.m)(r.value.charAt(0)))}function tS(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tA(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tE(e,t,n){let r=t_(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName}function tM(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"li"===r.tagName}function tT(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))}function tN(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)}function tI(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tD(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName}function tL(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)}function tR(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))}function tF(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)}function tP(e,t,n){return!t_(n,t)}function tO(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"tr"===r.tagName}function tz(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tB=tv({body:tq,colgroup:tH,head:tj,html:t$,tbody:tU});function t$(e){let t=t_(e,-1);return!t||"comment"!==t.type}function tj(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type}function tq(e){let t=t_(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tg.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)}function tH(e,t,n){let r=ty(n,t),i=t_(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)}function tU(e,t,n){let r=ty(n,t),i=t_(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}let tW={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function tV(e,t,n,r){let i,s=r.schema,o="svg"!==s.space&&r.settings.omitOptionalTags,a="svg"===s.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===s.space&&"svg"===e.tagName&&(r.schema=eJ.JW);let h=tG(r,e.properties),c=r.all("html"===s.space&&"template"===e.tagName?e.content:e);return r.schema=s,c&&(a=!1),!h&&o&&tB(e,t,n)||(l.push("<",e.tagName,h?" "+h:""),a&&("svg"===s.space||r.settings.closeSelfClosing)&&(i=h.charAt(h.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),a||o&&tC(e,t,n)||l.push("</"+e.tagName+">"),l.join("")}function tG(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=tJ(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}function tJ(e,t,n){let r,i=(0,tf.I)(e.schema,t),s=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=to(i.attribute,Object.assign({},e.settings.characterReferences,{subset:tW.name[s][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tp.A:tm.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=to(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tW.unquoted[s][o]}))),r!==n&&(e.settings.quoteSmart&&(0,td.D)(n,a)>(0,td.D)(n,e.alternative)&&(a=e.alternative),r=a+to(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?tW.single:tW.double)[s][o],attribute:!0}))+a),l+(r?"="+r:r))}let tK=["<","&"];function tZ(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:to(e.value,Object.assign({},r.settings.characterReferences,{subset:tK}))}function tX(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tZ(e,t,n,r)}function tQ(e,t,n,r){return r.all(e)}let tY=(0,eK.A)("type",{invalid:t0,unknown:t1,handlers:{comment:tc,doctype:tu,element:tV,raw:tX,root:tQ,text:tZ}});function t0(e){throw Error("Expected node, not `"+e+"`")}function t1(e){throw Error("Cannot compile unknown node `"+e.type+"`")}let t2={},t3={},t5=[];function t4(e,t){let n=t||t2,r=n.quote||'"',i='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:t6,all:t8,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eG.b,characterReferences:n.characterReferences||t3,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?eJ.JW:eJ.qy,quote:r,alternative:i}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function t6(e,t,n){return tY(e,t,n,this)}function t8(e){let t=[],n=e&&e.children||t5,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function t9(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function t7(e,t){return e&&t?.[e?.toLowerCase()]||e}function ne(e){return Array.isArray(e)?e:[e]}async function nt(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function nn(e){return!e||["plaintext","txt","text","plain"].includes(e)}function nr(e){return"ansi"===e||nn(e)}function ni(e){return"none"===e}function ns(e){return ni(e)}function no(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function na(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let s=t?n[e]+(n[e+1]||""):n[e];i.push([s,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function nl(e){let t=na(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}return{lines:t,indexToPos:n,posToIndex:r}}let nh="light-dark()",nc=["color","background-color"];function nu(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nd(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?nu(e,t):e})):e}function np(e,t,n,r,i="css-vars"){let s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>nf(e.variants[t])),l=new Set(o.flatMap(e=>Object.keys(e))),h={},c=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let s of l){let l=e[s]||"inherit";if(0===n&&r&&nc.includes(s))if(r===nh&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][s]||"inherit",d=o[r][s]||"inherit";h[s]=`light-dark(${u}, ${d})`,"css-vars"===i&&(h[c(n,s)]=l)}else h[s]=l;else"css-vars"===i&&(h[c(n,s)]=l)}}),s.htmlStyle=h,s}function nf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&T.Italic&&(t["font-style"]="italic"),e.fontStyle&T.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&T.Underline&&n.push("underline"),e.fontStyle&T.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function nm(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let ng=new WeakMap;function n_(e,t){ng.set(e,t)}function ny(e){return ng.get(e)}class nb{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new nb(Object.fromEntries(ne(t).map(e=>[e,eV])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return nk(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function nk(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function nw(e,t){if(!(e instanceof nb))throw new a("Invalid grammar state");return e.getInternalStack(t)}function nv(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new a(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,s=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,l=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||s||o||l){if(i&&s||o&&l||o&&n.start.offset===n.end.offset||s&&t.start.offset===t.end.offset)continue;throw new a(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function nC(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(nC).join(""):""}let nx=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new a(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=nl(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));nv(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return nd(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new a(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let s=r[e],l="",h=-1,c=-1;if(0===t&&(h=0),0===n&&(c=0),n===1/0&&(c=s.children.length),-1===h||-1===c)for(let e=0;e<s.children.length;e++)l+=nC(s.children[e]),-1===h&&l.length===t&&(h=e+1),-1===c&&l.length===n&&(c=e+1);if(-1===h)throw new a(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new a(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=s.children.slice(h,c);if(i.alwaysWrap||u.length!==s.children.length)if(i.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};o(e,i,"wrapper"),s.children.splice(h,u.length,e)}else o(u[0],i,"token");else o(s,i,"line")}function s(e,t){r[e]=o(r[e],t,"line")}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&no(e,t.properties.class),e=i(e,n)||e}let l=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)l.unshift(()=>s(r,e));i(n.line,0,n.character,e)}}l.forEach(e=>e())}}}()];function nS(e){let t=nA(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nx]}function nA(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var nE=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nM={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nT(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function nN(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}function nI(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nM[r]&&t.push({type:"setDecoration",value:nM[r]});else if(r<=29){let e=nM[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-30]}});else if(38===r){let n=nN(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-40]}});else if(48===r){let n=nN(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-100+8]}})}return t}function nD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],s=0;do{let o=nT(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=nI(o.sequence);for(let i of r)"resetAll"===i.type?(e=null,t=null,n.clear()):"resetForegroundColor"===i.type?e=null:"resetBackgroundColor"===i.type?t=null:"resetDecoration"===i.type&&n.delete(i.value);for(let i of r)"setForegroundColor"===i.type?e=i.value:"setBackgroundColor"===i.type?t=i.value:"setDecoration"===i.type&&n.add(i.value)}s=o.position}while(s<r.length);return i}}}var nL={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function nR(e=nL){let t;function n(t){return e[t]}function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}function i(){if(t)return t;t=[];for(let e=0;e<nE.length;e++)t.push(n(nE[e]));let e=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let i=0;i<6;i++)for(let s=0;s<6;s++)t.push(r([e[n],e[i],e[s]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(r([i,i,i]));return t}function s(e){return i()[e]}return{value:function(e){switch(e.type){case"named":return n(e.name);case"rgb":return r(e.rgb);case"table":return s(e.index)}}}}let nF={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nP(e,t,n){let r=t9(e,n),i=na(t),s=nR(Object.fromEntries(nE.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||nF[t]]}))),o=nD();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has("reverse")?(i=n.background?s.value(n.background):e.bg,o=n.foreground?s.value(n.foreground):e.fg):(i=n.foreground?s.value(n.foreground):e.fg,o=n.background?s.value(n.background):void 0),i=t7(i,r),o=t7(o,r),n.decorations.has("dim")&&(i=nO(i));let a=T.None;return n.decorations.has("bold")&&(a|=T.Bold),n.decorations.has("italic")&&(a|=T.Italic),n.decorations.has("underline")&&(a|=T.Underline),n.decorations.has("strikethrough")&&(a|=T.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:a}}))}function nO(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3],s=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${r}${r}${s}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function nz(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(nn(i)||ni(r))return na(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:s,colorMap:o}=e.setTheme(r);if("ansi"===i)return nP(s,t,n);let l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new a(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new a(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return n$(t,l,s,o,n)}function nB(...e){if(2===e.length)return ny(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(nn(i)||ni(s))throw new a("Plain language does not have grammar state");if("ansi"===i)throw new a("ANSI language does not have grammar state");let{theme:o,colorMap:l}=t.setTheme(s),h=t.getLanguage(i);return new nb(nj(n,h,o,l,r).stateStack,h.name,o.name)}function n$(e,t,n,r,i){let s=nj(e,t,n,r,i),o=new nb(s.stateStack,t.name,n.name);return n_(s.tokens,o),s.tokens}function nj(e,t,n,r,i){let s=t9(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=na(e),h=i.grammarState?nw(i.grammarState,n.name)??eV:null!=i.grammarContextCode?nj(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eV,c=[],u=[];for(let e=0,d=l.length;e<d;e++){let d,p,[f,m]=l[e];if(""===f){c=[],u.push([]);continue}if(o>0&&f.length>=o){c=[],u.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(d=t.tokenizeLine(f,h,a).tokens,p=0);let g=t.tokenizeLine2(f,h,a),_=g.tokens.length/2;for(let e=0;e<_;e++){let t=g.tokens[2*e],o=e+1<_?g.tokens[2*e+2]:f.length;if(t===o)continue;let a=g.tokens[2*e+1],l=t7(r[F.getForeground(a)],s),h=F.getFontStyle(a),u={content:f.substring(t,o),offset:m+t,color:l,fontStyle:h};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}u.explanation=[];let r=0;for(;t+r<o;){let t=d[p],n=f.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?nq(t.scopes):nH(e,t.scopes)}),p+=1}}c.push(u)}u.push(c),c=[],h=g.ruleStack}return{tokens:u,stateStack:h}}function nq(e){return e.map(e=>({scopeName:e}))}function nH(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:nV(e,i,t.slice(0,r))}}return n}function nU(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function nW(e,t,n){if(!nU(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nU(e[r],n[i])&&(r-=1),i-=1;return -1===r}function nV(e,t,n){let r=[];for(let{selectors:i,settings:s}of e)for(let e of i)if(nW(e,t,n)){r.push(s);break}return r}function nG(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=nz(e,t,{...n,theme:r.theme}),s=ny(i);return{tokens:i,state:s,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),s=nJ(...i.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:a,offset:l,...h}=e[t][i];o.variants[r[n].color]=h}),o})),a=i[0].state?new nb(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return a&&n_(o,a),o}function nJ(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),s=t.map(()=>[]);t.forEach((e,t)=>e.push(s[t]));let o=i.map(()=>0),a=i.map(e=>e[0]);for(;a.every(e=>e);){let e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){let n=a[t];n.content.length===e?(s[t].push(n),o[t]+=1,a[t]=i[t][o[t]]):(s[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function nK(e,t,n){let r,i,s,o,l,h;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===p.length)throw new a("`themes` option must not be empty");let f=nG(e,t,n);if(h=ny(f),c&&nh!==c&&!p.find(e=>e.color===c))throw new a(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=p.map(t=>e.getTheme(t.theme)),g=p.map(e=>e.color);s=f.map(e=>e.map(e=>np(e,g,u,c,d))),h&&n_(s,h);let _=p.map(e=>t9(e.theme,n));i=nZ(p,m,_,u,c,"fg",d),r=nZ(p,m,_,u,c,"bg",d),o=`shiki-themes ${m.map(e=>e.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){let a=t9(n.theme,n);s=nz(e,t,n);let l=e.getTheme(n.theme);r=t7(l.bg,a),i=t7(l.fg,a),o=l.name,h=ny(s)}else throw new a("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:l,grammarState:h}}function nZ(e,t,n,r,i,s,o){return e.map((l,h)=>{let c=t7(t[h][s],n[h])||"inherit",u=`${r+l.color}${"bg"===s?"-bg":""}:${c}`;if(0===h&&i){if(i===nh&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=t7(t[r][s],n[r])||"inherit",l=t7(t[i][s],n[i])||"inherit";return`light-dark(${o}, ${l});${u}`}return c}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function nX(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)}){let i=t;for(let e of nS(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:h,grammarState:c}=nK(e,i,n),{mergeWhitespaces:u=!0,mergeSameStyleTokens:d=!1}=n;!0===u?s=nY(s):"never"===u&&(s=n0(s)),d&&(s=n1(s));let p={...r,get source(){return i}};for(let e of nS(n))s=e.tokens?.call(p,s)||s;return nQ(s,{...n,fg:o,bg:a,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??h)},p,c)}function nQ(e,t,n,r=ny(e)){let i=nS(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,h={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(h.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(h[e]=n);let c={type:"element",tagName:"pre",properties:h,children:[],data:t.data},u={type:"element",tagName:"code",properties:{},children:s},d=[],p={...n,structure:a,addClassToHast:no,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===a?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let s of e){let e={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]},l=nm(s.htmlStyle||nf(s));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(p,e,t+1,r,n,s)||e;"inline"===a?o.children.push(e):"classic"===a&&n.children.push(e),r+=s.content.length}if("classic"===a){for(let e of i)n=e?.line?.call(p,n,t+1)||n;d.push(n),s.push(n)}else"inline"===a&&d.push(n)}),"classic"===a){for(let e of i)u=e?.code?.call(p,u)||u;for(let e of(c.children.push(u),i))c=e?.pre?.call(p,c)||c;o.children.push(c)}else if("inline"===a){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let f=o;for(let e of i)f=e?.root?.call(p,f)||f;return r&&n_(f,r),f}function nY(e){return e.map(e=>{let t,n=[],r="";return e.forEach((i,s)=>{let o=!(i.fontStyle&&(i.fontStyle&T.Underline||i.fontStyle&T.Strikethrough));o&&i.content.match(/^\s+$/)&&e[s+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(o?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n})}function n0(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let s=[{...e,offset:e.offset+n.length,content:r}];return n&&s.unshift({content:n,offset:e.offset}),i&&s.push({content:i,offset:e.offset+n.length+r.length}),s}))}function n1(e){return e.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=nm(e.htmlStyle||nf(e)),i=nm(n.htmlStyle||nf(n)),s=e.fontStyle&&(e.fontStyle&T.Underline||e.fontStyle&T.Strikethrough),o=n.fontStyle&&(n.fontStyle&T.Underline||n.fontStyle&T.Strikethrough);s||o||r!==i?t.push({...n}):e.content+=n.content}return t})}let n2=t4;function n3(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)},i=n2(nX(e,t,n,r));for(let e of nS(n))i=e.postprocess?.call(r,i,n)||i;return i}let n5="#333333",n4="#bbbbbb",n6="#fffffe",n8="#1e1e1e",n9="__shiki_resolved";function n7(e){if(e?.[n9])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?n5:n4),n||(n="light"===t.type?n6:n8),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,s=new Map;function o(e){if(s.has(e))return s.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(s.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,n9,{enumerable:!1,writable:!1,value:!0}),t}async function re(e){return Array.from(new Set((await Promise.all(e.filter(e=>!nr(e)).map(async e=>await nt(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rt(e){return(await Promise.all(e.map(async e=>ns(e)?null:n7(await nt(e))))).filter(e=>!!e)}let rn=3,rr=!1;function ri(e,t=3){if(rn&&("number"!=typeof rn||!(t>rn)))if(rr)throw Error(`[SHIKI DEPRECATE]: ${e}`);else console.trace(`[SHIKI DEPRECATE]: ${e}`)}class rs extends Error{constructor(e){super(e),this.name="ShikiError"}}function ro(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new rs(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class ra extends eW{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=n7(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=v.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ro(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let r=t.embeddedLanguages||t.embeddedLangs;return r?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new rs(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class rl{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let rh=0;function rc(e){let t;rh+=1,!1!==e.warnings&&rh>=10&&rh%10==0&&console.warn(`[Shiki] ${rh} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new rs("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(n7),s=new ra(new rl(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};h();let t=s.getTheme(e);if(!t)throw new rs(`Theme \`${e}\` not found, you may need to load it first`);return t}function a(...e){h(),s.loadLanguages(e.flat(1))}function l(...e){for(let t of(h(),e.flat(1)))s.loadTheme(t)}function h(){if(n)throw new rs("Shiki instance has been disposed")}function c(){n||(n=!0,s.dispose(),rh-=1)}return{setTheme:function(e){h();let n=o(e);return t!==e&&(s.setTheme(n),t=e),{theme:n,colorMap:s.getColorMap()}},getTheme:o,getLanguage:function(e){h();let t=s.getGrammar("string"==typeof e?e:e.name);if(!t)throw new rs(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return h(),s.getLoadedThemes()},getLoadedLanguages:function(){return h(),s.getLoadedLanguages()},resolveLangAlias:function(t){return ro(t,e.langAlias)},loadLanguage:async function(...e){return a(await re(e))},loadLanguageSync:a,loadTheme:async function(...e){return h(),l(await rt(e))},loadThemeSync:l,dispose:c,[Symbol.dispose]:c}}async function ru(e){e.engine||ri("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rt(e.themes||[]),re(e.langs||[]),e.engine]);return rc({...e,themes:t,langs:n,engine:r})}async function rd(e){let t=await ru(e);return{getLastGrammarState:(...e)=>nB(t,...e),codeToTokensBase:(e,n)=>nz(t,e,n),codeToTokensWithThemes:(e,n)=>nG(t,e,n),codeToTokens:(e,n)=>nK(t,e,n),codeToHast:(e,n)=>nX(t,e,n),codeToHtml:(e,n)=>n3(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function rp(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(nr(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new a(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function s(e){if(ns(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new a(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>s(e)),l=(e.langs??[]).map(e=>i(e)),h=await rd({engine:e.engine??r(),...e,themes:o,langs:l});return{...h,loadLanguage:(...e)=>h.loadLanguage(...e.map(i)),loadTheme:(...e)=>h.loadTheme(...e.map(s)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}let rf=[{id:"abap",name:"ABAP",import:()=>n.e(8773).then(n.bind(n,48773))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(36).then(n.bind(n,10036))},{id:"ada",name:"Ada",import:()=>n.e(5575).then(n.bind(n,55575))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3175)]).then(n.bind(n,23175))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(3782),n.e(3476),n.e(3111),n.e(3186)]).then(n.bind(n,76359))},{id:"apache",name:"Apache Conf",import:()=>n.e(2765).then(n.bind(n,52765))},{id:"apex",name:"Apex",import:()=>n.e(7455).then(n.bind(n,27455))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(4174)]).then(n.bind(n,54174))},{id:"applescript",name:"AppleScript",import:()=>n.e(9178).then(n.bind(n,19178))},{id:"ara",name:"Ara",import:()=>n.e(3313).then(n.bind(n,93313))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(8318).then(n.bind(n,98318))},{id:"asm",name:"Assembly",import:()=>n.e(7846).then(n.bind(n,87846))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(3782),n.e(6686)]).then(n.bind(n,36686))},{id:"awk",name:"AWK",import:()=>n.e(4900).then(n.bind(n,54900))},{id:"ballerina",name:"Ballerina",import:()=>n.e(2747).then(n.bind(n,92747))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(3290).then(n.bind(n,73290))},{id:"beancount",name:"Beancount",import:()=>n.e(8496).then(n.bind(n,98496))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(5331).then(n.bind(n,95331))},{id:"bibtex",name:"BibTeX",import:()=>n.e(5937).then(n.bind(n,25937))},{id:"bicep",name:"Bicep",import:()=>n.e(8406).then(n.bind(n,68406))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(1410).then(n.bind(n,71410))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(5005)]).then(n.bind(n,25005))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(4608).then(n.bind(n,4608))},{id:"c",name:"C",import:()=>n.e(8192).then(n.bind(n,88192))},{id:"c3",name:"C3",import:()=>n.e(7113).then(n.bind(n,7113))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(4242).then(n.bind(n,64242))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(893),n.e(4367)]).then(n.bind(n,84367))},{id:"clarity",name:"Clarity",import:()=>n.e(5183).then(n.bind(n,15183))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(6959).then(n.bind(n,66959))},{id:"cmake",name:"CMake",import:()=>n.e(5482).then(n.bind(n,55482))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(5498)]).then(n.bind(n,15498))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(1188).then(n.bind(n,21188))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(2403).then(n.bind(n,22403))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(6647)]).then(n.bind(n,76647))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3787).then(n.bind(n,93787))},{id:"coq",name:"Coq",import:()=>n.e(5920).then(n.bind(n,55920))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(6110)]).then(n.bind(n,27816))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(8192),n.e(7152),n.e(1413)]).then(n.bind(n,21413))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(9261).then(n.bind(n,71642))},{id:"css",name:"CSS",import:()=>n.e(3782).then(n.bind(n,63782))},{id:"csv",name:"CSV",import:()=>n.e(6331).then(n.bind(n,66331))},{id:"cue",name:"CUE",import:()=>n.e(5338).then(n.bind(n,45338))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(4350).then(n.bind(n,14350))},{id:"d",name:"D",import:()=>n.e(9015).then(n.bind(n,59015))},{id:"dart",name:"Dart",import:()=>n.e(3288).then(n.bind(n,3288))},{id:"dax",name:"DAX",import:()=>n.e(1932).then(n.bind(n,21932))},{id:"desktop",name:"Desktop",import:()=>n.e(7819).then(n.bind(n,7819))},{id:"diff",name:"Diff",import:()=>n.e(2614).then(n.bind(n,62614))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2783).then(n.bind(n,52783))},{id:"dotenv",name:"dotEnv",import:()=>n.e(4829).then(n.bind(n,44829))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(425).then(n.bind(n,32806))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(7844)]).then(n.bind(n,67844))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(698)]).then(n.bind(n,20698))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(8192),n.e(4583)]).then(n.bind(n,84583))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,62965))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848),n.e(1198)]).then(n.bind(n,91198))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(3304),n.e(4678)]).then(n.bind(n,64678))},{id:"fennel",name:"Fennel",import:()=>n.e(2964).then(n.bind(n,60583))},{id:"fish",name:"Fish",import:()=>n.e(2349).then(n.bind(n,52349))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(6293).then(n.bind(n,26293))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(4823),n.e(5061)]).then(n.bind(n,85061))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(4823).then(n.bind(n,94823))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(3304),n.e(2501)]).then(n.bind(n,52501))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(8670).then(n.bind(n,98670))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(4223).then(n.bind(n,34223))},{id:"gdshader",name:"GDShader",import:()=>n.e(7977).then(n.bind(n,67977))},{id:"genie",name:"Genie",import:()=>n.e(2031).then(n.bind(n,42031))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8457).then(n.bind(n,88457))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2041).then(n.bind(n,92041))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(7152),n.e(3194)]).then(n.bind(n,33194))},{id:"gleam",name:"Gleam",import:()=>n.e(2895).then(n.bind(n,62895))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(640)]).then(n.bind(n,30640))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(9186)]).then(n.bind(n,59186))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(8192),n.e(6887)]).then(n.bind(n,6887))},{id:"gn",name:"GN",import:()=>n.e(9448).then(n.bind(n,99448))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(9690).then(n.bind(n,79690))},{id:"go",name:"Go",import:()=>n.e(4553).then(n.bind(n,64553))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1248)]).then(n.bind(n,41248))},{id:"groovy",name:"Groovy",import:()=>n.e(9189).then(n.bind(n,39189))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(400)]).then(n.bind(n,70400))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3437)]).then(n.bind(n,63437))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2735)]).then(n.bind(n,12735))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(1335).then(n.bind(n,21335))},{id:"haxe",name:"Haxe",import:()=>n.e(1215).then(n.bind(n,11215))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(2374).then(n.bind(n,82374))},{id:"hjson",name:"Hjson",import:()=>n.e(9421).then(n.bind(n,79421))},{id:"hlsl",name:"HLSL",import:()=>n.e(10).then(n.bind(n,80010))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476)]).then(n.bind(n,43476))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1656)]).then(n.bind(n,51656))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(7152),n.e(1248),n.e(8243)]).then(n.bind(n,98243))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(1248),n.e(816)]).then(n.bind(n,20816))},{id:"hxml",name:"HXML",import:()=>n.e(376).then(n.bind(n,50376))},{id:"hy",name:"Hy",import:()=>n.e(6938).then(n.bind(n,26938))},{id:"imba",name:"Imba",import:()=>n.e(794).then(n.bind(n,30794))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(4309).then(n.bind(n,34309))},{id:"java",name:"Java",import:()=>n.e(6931).then(n.bind(n,76931))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,52970))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3392)]).then(n.bind(n,43392))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(6402)]).then(n.bind(n,36402))},{id:"json",name:"JSON",import:()=>n.e(4053).then(n.bind(n,4053))},{id:"json5",name:"JSON5",import:()=>n.e(3860).then(n.bind(n,63860))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(4650).then(n.bind(n,4650))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1453).then(n.bind(n,91453))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8132).then(n.bind(n,8132))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(4634).then(n.bind(n,24634))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,29228))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(893),n.e(6339)]).then(n.bind(n,85816))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(968),n.e(8977)]).then(n.bind(n,18977))},{id:"kdl",name:"KDL",import:()=>n.e(5968).then(n.bind(n,95968))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(6572).then(n.bind(n,26572))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(583).then(n.bind(n,50583))},{id:"latex",name:"LaTeX",import:()=>n.e(2839).then(n.bind(n,72839))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(7227).then(n.bind(n,77227))},{id:"less",name:"Less",import:()=>n.e(1280).then(n.bind(n,11280))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5347)]).then(n.bind(n,25347))},{id:"llvm",name:"LLVM IR",import:()=>n.e(9220).then(n.bind(n,19220))},{id:"log",name:"Log file",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"logo",name:"Logo",import:()=>n.e(5670).then(n.bind(n,25670))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(8192),n.e(3873)]).then(n.bind(n,33873))},{id:"luau",name:"Luau",import:()=>n.e(3072).then(n.bind(n,33072))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(541).then(n.bind(n,30541))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(3304).then(n.bind(n,13304))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(3782),n.e(3111),n.e(1280),n.e(5645)]).then(n.bind(n,65645))},{id:"matlab",name:"MATLAB",import:()=>n.e(1184).then(n.bind(n,31184))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3304),n.e(6729)]).then(n.bind(n,86729))},{id:"mdx",name:"MDX",import:()=>n.e(5690).then(n.bind(n,55690))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(9842).then(n.bind(n,29842))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(1501).then(n.bind(n,11501))},{id:"mojo",name:"Mojo",import:()=>n.e(194).then(n.bind(n,50194))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(4567).then(n.bind(n,24567))},{id:"move",name:"Move",import:()=>n.e(4540).then(n.bind(n,24540))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(6455).then(n.bind(n,36455))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(5320).then(n.bind(n,35320))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>n.e(3633).then(n.bind(n,53633))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(8192),n.e(2215)]).then(n.bind(n,2215))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(8192),n.e(3304),n.e(7799)]).then(n.bind(n,7799))},{id:"nix",name:"Nix",import:()=>n.e(6099).then(n.bind(n,86099))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(8288).then(n.bind(n,38288))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(6290).then(n.bind(n,36290))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,21946))},{id:"ocaml",name:"OCaml",import:()=>n.e(3419).then(n.bind(n,3419))},{id:"odin",name:"Odin",import:()=>n.e(9547).then(n.bind(n,69547))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(4474).then(n.bind(n,4474))},{id:"pascal",name:"Pascal",import:()=>n.e(6948).then(n.bind(n,46948))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(968),n.e(7040)]).then(n.bind(n,30968))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(6155),n.e(4659)]).then(n.bind(n,86155))},{id:"pkl",name:"Pkl",import:()=>n.e(6166).then(n.bind(n,96166))},{id:"plsql",name:"PL/SQL",import:()=>n.e(8947).then(n.bind(n,48947))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(3324).then(n.bind(n,43324))},{id:"polar",name:"Polar",import:()=>n.e(3095).then(n.bind(n,93095))},{id:"postcss",name:"PostCSS",import:()=>n.e(9240).then(n.bind(n,19240))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(9294).then(n.bind(n,19294))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(7636).then(n.bind(n,7636))},{id:"prisma",name:"Prisma",import:()=>n.e(327).then(n.bind(n,40327))},{id:"prolog",name:"Prolog",import:()=>n.e(34).then(n.bind(n,80034))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(8545).then(n.bind(n,58545))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5755)]).then(n.bind(n,55755))},{id:"puppet",name:"Puppet",import:()=>n.e(9569).then(n.bind(n,19569))},{id:"purescript",name:"PureScript",import:()=>n.e(6580).then(n.bind(n,36580))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(893).then(n.bind(n,40893))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(3077)]).then(n.bind(n,73077))},{id:"qmldir",name:"QML Directory",import:()=>n.e(6144).then(n.bind(n,46144))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(5712).then(n.bind(n,55712))},{id:"r",name:"R",import:()=>n.e(5025).then(n.bind(n,25025))},{id:"racket",name:"Racket",import:()=>n.e(3229).then(n.bind(n,3229))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(252).then(n.bind(n,30252))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(9261),n.e(4903)]).then(n.bind(n,84903))},{id:"reg",name:"Windows Registry Script",import:()=>n.e(5997).then(n.bind(n,85997))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6412).then(n.bind(n,86412))},{id:"rel",name:"Rel",import:()=>n.e(2062).then(n.bind(n,62062))},{id:"riscv",name:"RISC-V",import:()=>n.e(2710).then(n.bind(n,52710))},{id:"ron",name:"RON",import:()=>n.e(862).then(n.bind(n,80862))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(5728).then(n.bind(n,95728))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(123)]).then(n.bind(n,52504))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848)]).then(n.bind(n,72331))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(1161).then(n.bind(n,61161))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(2503),n.e(6360)]).then(n.bind(n,66360))},{id:"sass",name:"Sass",import:()=>n.e(8113).then(n.bind(n,88113))},{id:"scala",name:"Scala",import:()=>n.e(9377).then(n.bind(n,89377))},{id:"scheme",name:"Scheme",import:()=>n.e(7142).then(n.bind(n,97142))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(3782),n.e(3111)]).then(n.bind(n,43111))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(9648).then(n.bind(n,59648))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(1379).then(n.bind(n,1379))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(7152).then(n.bind(n,57152))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(7152),n.e(8257)]).then(n.bind(n,8257))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(1556).then(n.bind(n,61556))},{id:"solidity",name:"Solidity",import:()=>n.e(8704).then(n.bind(n,38704))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2728)]).then(n.bind(n,72728))},{id:"sparql",name:"SPARQL",import:()=>n.e(8432).then(n.bind(n,68432))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(7610).then(n.bind(n,47610))},{id:"sql",name:"SQL",import:()=>n.e(2503).then(n.bind(n,2503))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(6046).then(n.bind(n,16046))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(2503),n.e(4080)]).then(n.bind(n,64080))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7557).then(n.bind(n,97557))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(830)]).then(n.bind(n,30830))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(1142)]).then(n.bind(n,81142))},{id:"swift",name:"Swift",import:()=>n.e(5922).then(n.bind(n,35922))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(3274).then(n.bind(n,90893))},{id:"systemd",name:"Systemd Units",import:()=>n.e(9006).then(n.bind(n,9006))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(1078).then(n.bind(n,21078))},{id:"tasl",name:"Tasl",import:()=>n.e(4963).then(n.bind(n,94963))},{id:"tcl",name:"Tcl",import:()=>n.e(1274).then(n.bind(n,41274))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(4553),n.e(1977)]).then(n.bind(n,81977))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(3483).then(n.bind(n,43483))},{id:"tex",name:"TeX",import:()=>n.e(1456).then(n.bind(n,11456))},{id:"toml",name:"TOML",import:()=>n.e(4163).then(n.bind(n,84163))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(4357)]).then(n.bind(n,74357))},{id:"tsv",name:"TSV",import:()=>n.e(840).then(n.bind(n,30840))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,33710))},{id:"turtle",name:"Turtle",import:()=>n.e(1365).then(n.bind(n,41365))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(3111),n.e(6155),n.e(6588)]).then(n.bind(n,96588))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,5346))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(9466).then(n.bind(n,19466))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(2013).then(n.bind(n,62013))},{id:"v",name:"V",import:()=>n.e(7525).then(n.bind(n,7525))},{id:"vala",name:"Vala",import:()=>n.e(9565).then(n.bind(n,59565))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(2179).then(n.bind(n,62179))},{id:"verilog",name:"Verilog",import:()=>n.e(7182).then(n.bind(n,34801))},{id:"vhdl",name:"VHDL",import:()=>n.e(7425).then(n.bind(n,37425))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(4539).then(n.bind(n,14539))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(5553)]).then(n.bind(n,45553))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(7021)]).then(n.bind(n,17021))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(3782),n.e(3111),n.e(1280),n.e(2160)]).then(n.bind(n,98110))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(1219).then(n.bind(n,21219))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4275).then(n.bind(n,84275))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(5269).then(n.bind(n,65269))},{id:"wgsl",name:"WGSL",import:()=>n.e(4976).then(n.bind(n,44976))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(4370).then(n.bind(n,44370))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(624).then(n.bind(n,58243))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,6987))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(6931),n.e(2278)]).then(n.bind(n,77040))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(6931),n.e(3942)]).then(n.bind(n,3942))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(5518).then(n.bind(n,95518))},{id:"zenscript",name:"ZenScript",import:()=>n.e(2485).then(n.bind(n,92485))},{id:"zig",name:"Zig",import:()=>n.e(7041).then(n.bind(n,57041))}],rm=Object.fromEntries(rf.map(e=>[e.id,e.import])),rg=Object.fromEntries(rf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),r_={...rm,...rg},ry=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2812).then(n.bind(n,62812))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7635).then(n.bind(n,27635))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(7884).then(n.bind(n,77884))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(4358).then(n.bind(n,94358))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(9005).then(n.bind(n,19005))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(1595).then(n.bind(n,51595))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(3979).then(n.bind(n,83979))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9680).then(n.bind(n,59680))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(2107).then(n.bind(n,2107))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5375).then(n.bind(n,75375))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5136).then(n.bind(n,55136))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(4295).then(n.bind(n,4295))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(7258).then(n.bind(n,87258))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(9996).then(n.bind(n,49996))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(9224).then(n.bind(n,39224))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(6704).then(n.bind(n,86704))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(6927).then(n.bind(n,96927))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(5424).then(n.bind(n,15424))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(3082).then(n.bind(n,23082))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9382).then(n.bind(n,69382))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(2130).then(n.bind(n,32130))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(9666).then(n.bind(n,49666))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(392).then(n.bind(n,80392))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(9841).then(n.bind(n,49841))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(3492).then(n.bind(n,53492))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(214).then(n.bind(n,214))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(579).then(n.bind(n,60579))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(6311).then(n.bind(n,96311))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>n.e(3526).then(n.bind(n,23526))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7524).then(n.bind(n,7524))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(6563).then(n.bind(n,56563))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(6701).then(n.bind(n,26701))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7785).then(n.bind(n,97785))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(9136).then(n.bind(n,19136))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(2489).then(n.bind(n,82489))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(1247).then(n.bind(n,21247))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(6859).then(n.bind(n,76859))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(7921).then(n.bind(n,67921))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(6846).then(n.bind(n,96846))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(3074).then(n.bind(n,83074))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(9521).then(n.bind(n,89521))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6089).then(n.bind(n,6089))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(5520).then(n.bind(n,15520))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(4969).then(n.bind(n,44969))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(2954).then(n.bind(n,92954))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(5491).then(n.bind(n,5491))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9615).then(n.bind(n,9615))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(7625).then(n.bind(n,67625))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(1534).then(n.bind(n,21534))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(8430).then(n.bind(n,28430))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(8555).then(n.bind(n,48555))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(7082).then(n.bind(n,87082))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1583).then(n.bind(n,1583))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(5750).then(n.bind(n,35750))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(7465).then(n.bind(n,17465))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1898).then(n.bind(n,21898))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(7130).then(n.bind(n,67130))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(966).then(n.bind(n,966))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(1664).then(n.bind(n,31664))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(3286).then(n.bind(n,83286))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(4593).then(n.bind(n,94593))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9267).then(n.bind(n,39267))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(7889).then(n.bind(n,47889))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5318).then(n.bind(n,55318))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(8656).then(n.bind(n,78656))}].map(e=>[e.id,e.import]));var rb=n(49304).Buffer;class rk extends Error{constructor(e){super(e),this.name="ShikiError"}}function rw(){return 0x80000000}function rv(){return"u">typeof performance?performance.now():Date.now()}let rC=(e,t)=>e+(t-e%t)%t;async function rx(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function s(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(e){let t=r.HEAPU8.length;e>>>=0;let n=rw();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+0x6000000),o(Math.min(n,rC(Math.max(e,i),65536))))return!0}return!1}let l="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&l)return l.decode(e.subarray(t,i));let s="";for(;t<i;){let n=e[t++];if(!(128&n)){s+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){s+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(n);else{let e=n-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}function c(e,t){return e?h(r.HEAPU8,e,t):""}let u={emscripten_get_now:rv,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){let n={env:u,wasi_snapshot_preview1:u},s=await e(n);i((t=s.memory).buffer),Object.assign(r,s),r.UTF8ToString=c}return await d(),r}var rS=Object.defineProperty,rA=(e,t,n)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rE=(e,t,n)=>rA(e,"symbol"!=typeof t?t+"":t,n);let rM=null;function rT(e){throw new rk(e.UTF8ToString(e.getLastOnigError()))}class rN{constructor(e){rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16Value"),rE(this,"utf8Value"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16");const t=e.length,n=rN._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const s=r?new Uint32Array(n+1):null;r&&(s[n]=t);const o=new Uint8Array(n);let a=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let h=l,c=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(h=(l-55296<<10)+65536|t-56320,c=!0)}r&&(i[n]=a,c&&(i[n+1]=a),h<=127?s[a+0]=n:h<=2047?(s[a+0]=n,s[a+1]=n):h<=65535?(s[a+0]=n,s[a+1]=n,s[a+2]=n):(s[a+0]=n,s[a+1]=n,s[a+2]=n,s[a+3]=n)),h<=127?o[a++]=h:(h<=2047?o[a++]=192|(1984&h)>>>6:(h<=65535?o[a++]=224|(61440&h)>>>12:(o[a++]=240|(1835008&h)>>>18,o[a++]=128|(258048&h)>>>12),o[a++]=128|(4032&h)>>>6),o[a++]=128|(63&h)>>>0),c&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),s=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(s=(i-55296<<10)+65536|t-56320,o=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let rI=class e{constructor(t){if(rE(this,"id",++e.LAST_ID),rE(this,"_onigBinding"),rE(this,"content"),rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16"),rE(this,"ptr"),!rM)throw new rk("Must invoke loadWasm first.");this._onigBinding=rM,this.content=t;const n=new rN(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=rM.omalloc(1e4)),e._sharedPtrInUse=!0,rM.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(rM)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};rE(rI,"LAST_ID",0),rE(rI,"_sharedPtr",0),rE(rI,"_sharedPtrInUse",!1);let rD=rI;class rL{constructor(e){if(rE(this,"_onigBinding"),rE(this,"_ptr"),!rM)throw new rk("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new rN(e[r]);t[r]=i.createString(rM),n[r]=i.utf8Length}const r=rM.omalloc(4*e.length);rM.HEAPU32.set(t,r/4);const i=rM.omalloc(4*e.length);rM.HEAPU32.set(n,i/4);const s=rM.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)rM.ofree(t[n]);rM.ofree(i),rM.ofree(r),0===s&&rT(rM),this._onigBinding=rM,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new rD(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===s)return null;let o=i.HEAPU32,a=s/4,l=o[a++],h=o[a++],c=[];for(let t=0;t<h;t++){let n=e.convertUtf8OffsetToUtf16(o[a++]),r=e.convertUtf8OffsetToUtf16(o[a++]);c[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:c}}}function rR(e){return"function"==typeof e.instantiator}function rF(e){return"function"==typeof e.default}function rP(e){return void 0!==e.data}function rO(e){return"u">typeof Response&&e instanceof Response}function rz(e){return"u">typeof ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||void 0!==rb&&rb.isBuffer?.(e)||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"u">typeof Uint32Array&&e instanceof Uint32Array}function rB(e){return i||(i=async function(){rM=await rx(async t=>{let n=e;return"function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),rR(n)?n=await n.instantiator(t):rF(n)?n=await n.default(t):(rP(n)&&(n=n.data),rO(n)?n="function"==typeof WebAssembly.instantiateStreaming?await rj(n)(t):await rq(n)(t):rz(n)||n instanceof WebAssembly.Module?n=await r$(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await r$(n.default)(t))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function r$(e){return t=>WebAssembly.instantiate(e,t)}function rj(e){return t=>WebAssembly.instantiateStreaming(e,t)}function rq(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function rH(e){return e&&await rB(e),{createScanner:e=>new rL(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new rD(e)}}let rU=rp({langs:r_,themes:ry,engine:()=>rH(Promise.all([n.e(4814),n.e(9302)]).then(n.bind(n,49302)))})},67635:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],s=(0,r.A)("copy",i)},68459:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=(0,r.A)("trash-2",i)},68806:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],s=(0,r.A)("plug",i)},69048:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],s=(0,r.A)("square-function",i)},73300:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],s=(0,r.A)("clipboard",i)},76022:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/web-tree-sitter.f7f7244f.wasm"},76065:(e,t,n)=>{"use strict";n.d(t,{H:()=>r.Hj});var r=n(5989)},76865:(e,t,n)=>{"use strict";n.d(t,{$t:()=>A,LN:()=>o,U3:()=>c,hs:()=>I,i5:()=>f,k_:()=>M,nh:()=>d,yn:()=>a});var r=n(27050),i=n(8242);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(h.pos),a?r.Ji.empty:t),0==a&&_(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=e.mapping.slice(n),l=a.map(s.pos),h=a.map(o.pos);i?e.deleteRange(l,h):(e.replaceRangeWith(l,h,t),_(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function h(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new u(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new c(e,t)}}o.jsonID("text",c);class u{constructor(e,t){this.anchor=e,this.head=t}map(e){return new u(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class d extends o{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new d(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,o.jsonID("node",d);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new u(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return c.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function _(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let a=e.steps[s];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}let y=1,b=2,k=4;class w extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|y)&~b,this.storedMarks=null,this}get selectionSet(){return(this.updated&y)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=b,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&b)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~b,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=k,this}get scrolledIntoView(){return(this.updated&k)>0}}function v(e,t){return t&&e?e.bind(t):e}class C{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let x=[new C("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new C("selection",{init:(e,t)=>e.selection||o.atStart(t.doc),apply:e=>e.selection}),new C("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new C("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class S{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new C(e.key,e.spec.state,e))})}}class A{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let a=r?r[s].n:0,l=r?r[s].state:this,h=a<t.length&&o.spec.appendTransaction.call(o,a?t.slice(a):t,l,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new A(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new w(this)}static create(e){let t=new S(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new S(this.schema,e.plugins),n=t.fields,r=new A(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new S(e.schema,e.plugins),s=new A(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],a=o.spec.state;if(o.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=a.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}function E(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=E(i,t,{})),n[r]=i}return n}class M{constructor(e){this.spec=e,this.props={},e.props&&E(e.props,this,this.props),this.key=e.key?e.key.key:N("plugin")}getState(e){return e[this.key]}}let T=Object.create(null);function N(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}class I{constructor(e="key"){this.key=N(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},81165:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],s=(0,r.A)("loader",i)},82150:(e,t,n)=>{"use strict";n.d(t,{L2:()=>R,Rg:()=>h,_0:()=>F,_J:()=>D,ck:()=>c,it:()=>w});var r=n(82159),i=Object.defineProperty,s=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o="listItem",a="textStyle",l=/^\s*([-+*])\s$/,h=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o,this.editor.getAttributes(a)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.tG)({find:l,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:l,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a),editor:this.editor})),[e]}}),c=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if("list_item"!==e.type)return[];let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>"paragraph"===e.type))i=r(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=r(e.tokens.slice(1));i.push(...t)}}else i=r(e.tokens)}return 0===i.length&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>(0,r.kj)(e,t,e=>{var t,n;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let r=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return`${r+e.index}. `}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});s({},{findListItemPos:()=>u,getNextListDepth:()=>d,handleBackspace:()=>g,handleDelete:()=>b,hasListBefore:()=>p,hasListItemAfter:()=>k,hasListItemBefore:()=>f,listItemHasSubList:()=>m,nextListIsDeeper:()=>_,nextListIsHigher:()=>y});var u=(e,t)=>{let{$from:n}=t.selection,i=(0,r.Pg)(e,t.schema),s=null,o=n.depth,a=n.pos,l=null;for(;o>0&&null===l;)(s=n.node(o)).type===i?l=o:(o-=1,a-=1);return null===l?null:{$pos:t.doc.resolve(a),depth:l}},d=(e,t)=>{let n=u(e,t);if(!n)return!1;let[,i]=(0,r.fl)(t,e,n.$pos.pos+4);return i},p=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!!s&&!!n.includes(s.type.name)},f=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},m=(e,t,n)=>{if(!n)return!1;let i=(0,r.Pg)(e,t.schema),s=!1;return n.descendants(e=>{e.type===i&&(s=!0)}),s},g=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,r.rU)(e.state,t)&&p(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let s=i.at(-1);if(!s)return!1;let o=e.state.doc.resolve(r.start()+s.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!(0,r.rU)(e.state,t)||!(0,r.J_)(e.state))return!1;let i=u(t,e.state);if(!i)return!1;let s=e.state.doc.resolve(i.$pos.pos-2).node(i.depth),o=m(t,e.state,s);return f(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},_=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n>r.depth},y=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n<r.depth},b=(e,t)=>{if(!(0,r.rU)(e.state,t)||!(0,r.QN)(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:s}=n;return!(!n.empty&&i.sameParent(s))&&(_(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():y(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},k=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},w=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t}}}}),v=/^(\s*)(\d+)\.\s+(.*)$/,C=/^\s/;function x(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function S(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r)return void n.push(e);if(""===e.trim()||t.length>0&&x(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function A(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],s=i.match(v);if(!s)break;let[,o,a,l]=s,h=o.length,c=[l],u=n+1,d=[i],p=!1;for(;u<e.length;){let t=e[u];if(t.match(v))break;if(""===t.trim())d.push(t),c.push(""),p=!0,u+=1;else if(t.match(C))d.push(t),c.push(t.slice(h+2)),u+=1;else{if(p)break;d.push(t),c.push(t),u+=1}}t.push({indent:h,number:parseInt(a,10),content:c.join("\n").trim(),contentLines:c,raw:d.join("\n")}),r=u,n=u}return[t,r]}function E(e,t,n){let r=[],i=0;for(;i<e.length;){let s=e[i];if(s.indent===t){let{paragraphLines:o,blockLines:a}=S(s.contentLines),l=o.join("\n").trim(),h=[];l&&h.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.join("\n").trim();if(c){let e=n.blockTokens(c);h.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=Math.min(...d.map(e=>e.indent)),t=E(d,e,n);h.push({type:"list",ordered:!0,start:d[0].number,items:t,raw:d.map(e=>e.raw).join("\n")})}r.push({type:"list_item",raw:s.raw,tokens:h}),i=u}else i+=1}return r}function M(e,t){return e.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}var T="listItem",N="textStyle",I=/^(\d+)\.\s$/,D=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if("list"!==e.type||!e.ordered)return[];let n=e.start||1,r=e.items?M(e.items,t):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=null==t?void 0:t.index;return void 0!==n?n:-1},tokenize:(e,t,n)=>{var r;let i=e.split("\n"),[s,o]=A(i);if(0===s.length)return;let a=E(s,0,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null==(r=s[0])?void 0:r.number)||1,items:a,raw:i.slice(0,o).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(T,this.editor.getAttributes(N)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.tG)({find:I,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),L=/^\s*(\[([( |x])?\])\s$/,R=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=(null==(n=e.attrs)?void 0:n.checked)?"x":" ",s=`- [${i}] `;return(0,r.kj)(e,t,s)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),h=document.createElement("div"),c=e=>{var t,n;l.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,l.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};c(e),o.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",e=>e.preventDefault()),l.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:r}=t.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let i=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,r)||(l.checked=!l.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{s.setAttribute(e,t)}),s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,o.append(l,a),s.append(o,h),Object.entries(t).forEach(([e,t])=>{s.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:s,contentDOM:h,update:e=>{if(e.type!==this.type)return!1;s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,c(e);let t=i.extensionManager.attributes,n=(0,r.zU)(e,t),o=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return u.forEach(e=>{o.has(e)||(e in a?s.setAttribute(e,a[e]):s.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in a?s.setAttribute(e,a[e]):s.removeAttribute(e):s.setAttribute(e,t)}),u=o,!0}}}},addInputRules(){return[(0,r.tG)({find:L,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),F=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let i=e=>{let t=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},s=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(h.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(c.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(w.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(D.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(R.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(F.configure(this.options.taskList)),e}})},90425:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(12115);let i=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),a=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let h=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},c=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:a,iconNode:c,...u},d)=>(0,r.createElement)("svg",{ref:d,...l,width:t,height:t,stroke:e,strokeWidth:s?24*Number(n)/Number(t):n,className:i("lucide",o),...!a&&!h(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(a)?a:[a]])),u=(e,t)=>{let n=(0,r.forwardRef)(({className:n,...o},l)=>(0,r.createElement)(c,{ref:l,iconNode:t,className:i(`lucide-${s(a(e))}`,`lucide-${e}`,n),...o}));return n.displayName=a(e),n}},91958:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],s=(0,r.A)("refresh-cw",i)},94577:(e,t,n)=>{"use strict";e.exports=n(99617)},96035:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],s=(0,r.A)("message-square",i)},97144:(e,t,n)=>{"use strict";n.d(t,{$f:()=>L,G2:()=>b,I$:()=>x,Im:()=>F,Qv:()=>l,Sd:()=>_,Z1:()=>S,_G:()=>c,_e:()=>p,bh:()=>k,eB:()=>h,eT:()=>g,ec:()=>R,hy:()=>M,ic:()=>o,iz:()=>A,pC:()=>v,yY:()=>w,y_:()=>P});var r=n(8242),i=n(27050),s=n(76865);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let l=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=f(o);if(!l){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=l.nodeBefore;if(I(e,l,t,-1))return!0;if(0==o.parent.content.size&&(d(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let a=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let n=e.tr.step(a);n.setSelection(d(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=a(e,n);if(!r)return!1;let i=f(r);return!!i&&u(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=y(r);return!!i&&u(e,i,t)};function u(e,t,n){let o=t.nodeBefore,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=t.nodeAfter,h=t.pos+1;for(;!l.isTextblock;h++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let c=(0,r.$L)(e.doc,a,h,i.Ji.empty);if(!c||c.from!=a||c instanceof r.Ln&&c.slice.size>=h-a)return!1;if(n){let t=e.tr.step(c);t.setSelection(s.U3.create(t.doc,a)),n(t.scrollIntoView())}return!0}function d(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let a=o&&o.nodeBefore;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let a=y(o);if(!a)return!1;let l=a.nodeAfter;if(I(e,a,t,1))return!0;if(0==o.parent.content.size&&(d(l,"start")||s.nh.isSelectable(l))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(d(l,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):s.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},_=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=y(r)}let a=o&&o.nodeAfter;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function y(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let b=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},k=(e,t)=>{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},w=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},v=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let x=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=C(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,a.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},S=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=C(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(n,o.createAndFill());a.setSelection(s.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},A=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},E=function(){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],a,l,h=!1,c=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){h=n.end(e)==n.pos+(n.depth-e),c=n.start(e)==n.pos-(n.depth-e),l=C(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));let t=void 0;o.unshift(t||(h&&l?{type:l}:null)),a=e;break}if(1==e)return!1;o.unshift(null)}let u=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&u.deleteSelection();let d=u.mapping.map(n.pos),p=(0,r.zy)(u.doc,d,o.length,o);if(p||(o[0]=l?{type:l}:null,p=(0,r.zy)(u.doc,d,o.length,o)),!p)return!1;if(u.split(d,o.length,o),!h&&c&&n.node(a).type!=l){let e=u.mapping.map(n.before(a)),t=u.doc.resolve(e);l&&n.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&u.setNodeMarkup(u.mapping.map(n.before(a)),l)}return t&&t(u.scrollIntoView()),!0}}(),M=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)},T=(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0);function N(e,t,n){let i=t.nodeBefore,s=t.nodeAfter,o=t.index();return!!i&&!!s&&!!i.type.compatibleContent(s.type)&&(!i.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(o,o+1)&&!!(s.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))}function I(e,t,n,o){let a=t.nodeBefore,l=t.nodeAfter,h,c,u=a.type.spec.isolating||l.type.spec.isolating;if(!u&&N(e,t,n))return!0;let p=!u&&t.parent.canReplace(t.index(),t.index()+1);if(p&&(h=(c=a.contentMatchAt(a.childCount)).findWrapping(l.type))&&c.matchType(h[0]||l.type).validEnd){if(n){let s=t.pos+l.nodeSize,o=i.FK.empty;for(let e=h.length-1;e>=0;e--)o=i.FK.from(h[e].create(null,o));o=i.FK.from(a.copy(o));let c=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),h.length,!0)),u=c.doc.resolve(s+2*h.length);u.nodeAfter&&u.nodeAfter.type==a.type&&(0,r.n9)(c.doc,u.pos)&&c.join(u.pos),n(c.scrollIntoView())}return!0}let f=l.type.spec.isolating||o>0&&u?null:s.LN.findFrom(t,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,r.jP)(m);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(m,g).scrollIntoView()),!0;if(p&&d(l,"start",!0)&&d(a,"end")){let s=a,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let h=l,c=1;for(;!h.isTextblock;h=h.firstChild)c++;if(s.canReplace(s.childCount,s.childCount,h.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+l.nodeSize,t.pos+c,t.pos+l.nodeSize-c,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function D(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let L=D(-1),R=D(1);function F(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,a=s.blockRange(o),l=a&&(0,r.oM)(a,e,t);return!!l&&(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0)}}function P(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function O(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let z=O(o,l,p),B=O(o,g,_),$={Enter:O(v,S,A,E),"Mod-Enter":x,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:B,"Mod-Delete":B,"Mod-a":T},j={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":L,"Ctrl-e":R};for(let e in $)j[e]=$[e];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},97567:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],s=(0,r.A)("box",i)},99617:(e,t,n)=>{"use strict";var r=n(12115),i=n(8039);function s(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var o="function"==typeof Object.is?Object.is:s,a=i.useSyncExternalStore,l=r.useRef,h=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=l(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;var p=a(e,(s=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,l=!1,h=void 0===n?null:n;return[function(){return e(t())},null===h?void 0:function(){return e(h())}]},[t,n,r,i]))[0],s[1]);return h(function(){d.hasValue=!0,d.value=p},[p]),u(p),p}}}]);
23
+ color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,null==n?void 0:n.key)}return(null==n?void 0:n.onChange)&&!(s&&n.skipInitialOnChange)&&n.onChange(r),s=!1,r}return o.updateDeps=e=>{i=e},o}function o(e,t){if(void 0!==e)return e;throw Error(`Unexpected undefined${t?`: ${t}`:""}`)}let a=(e,t)=>1.01>Math.abs(e-t),l=(e,t,n)=>{let r;return function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)}},h=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},c=e=>e,u=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let e=t;e<=n;e++)r.push(e);return r},d=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(h(n)),!r.ResizeObserver)return()=>{};let s=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(null==e?void 0:e.borderBoxSize){let t=e.borderBoxSize[0];if(t)return void i({width:t.inlineSize,height:t.blockSize})}i(h(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return s.observe(n,{box:"border-box"}),()=>{s.unobserve(n)}},p={passive:!0},f="u"<typeof window||"onscrollend"in window,m=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=0,s=e.options.useScrollendEvent&&f?()=>void 0:l(r,()=>{t(i,!1)},e.options.isScrollingResetDelay),o=r=>()=>{let{horizontal:o,isRtl:a}=e.options;i=o?n.scrollLeft*(a&&-1||1):n.scrollTop,s(),t(i,r)},a=o(!0),h=o(!1);n.addEventListener("scroll",a,p);let c=e.options.useScrollendEvent&&f;return c&&n.addEventListener("scrollend",h,p),()=>{n.removeEventListener("scroll",a),c&&n.removeEventListener("scrollend",h)}},g=(e,t,n)=>{if(null==t?void 0:t.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},_=(e,{adjustments:t=0,behavior:n},r)=>{var i,s;let o=e+t;null==(s=null==(i=r.scrollElement)?void 0:i.scrollTo)||s.call(i,{[r.options.horizontal?"left":"top"]:o,behavior:n})};class y{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var e,t,n;return(null==(n=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:n.call(t))??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);t.isConnected?this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this)):this.observer.unobserve(t)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}):null);return{disconnect:()=>{var n;null==(n=t())||n.disconnect(),e=null},observe:e=>{var n;return null==(n=t())?void 0:n.observe(e,{box:"border-box"})},unobserve:e=>{var n;return null==(n=t())?void 0:n.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,n])=>{void 0===n&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:c,rangeExtractor:u,onChange:()=>{},measureElement:g,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",...e}},this.notify=e=>{var t,n;null==(n=(t=this.options).onChange)||n.call(t,this,e)},this.maybeNotify=s(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;let t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{let n=new Map,r=new Map;for(let i=t-1;i>=0;i--){let t=e[i];if(n.has(t.lane))continue;let s=r.get(t.lane);if(null==s||t.end>s.end?r.set(t.lane,t):t.end<s.end&&n.set(t.lane,!0),n.size===this.options.lanes)break}return r.size===this.options.lanes?Array.from(r.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=s(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,n,r,i,s,o)=>(void 0!==this.prevLanes&&this.prevLanes!==s&&(this.lanesChangedFlag=!0),this.prevLanes=s,this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=s(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:s,laneAssignmentMode:o},a)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let l=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1);let h=this.measurementsCache.slice(0,l),c=Array(s).fill(void 0);for(let e=0;e<l;e++){let t=h[e];t&&(c[t.lane]=e)}for(let i=l;i<e;i++){let e,s,l=r(i),u=this.laneAssignments.get(i),d="estimate"===o||a.has(l);if(void 0!==u&&this.options.lanes>1){let r=c[e=u],i=void 0!==r?h[r]:void 0;s=i?i.end+this.options.gap:t+n}else{let r=1===this.options.lanes?h[i-1]:this.getFurthestMeasurement(h,i);s=r?r.end+this.options.gap:t+n,e=r?r.lane:i%this.options.lanes,this.options.lanes>1&&d&&this.laneAssignments.set(i,e)}let p=a.get(l),f="number"==typeof p?p:this.options.estimateSize(i),m=s+f;h[i]={index:i,start:s,size:f,end:m,key:l,lane:e},c[e]=i}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=s(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>this.range=e.length>0&&t>0?k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=s(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>null===r||null===i?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;let n=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==n&&this.range){let t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,n-t),i=Math.min(this.options.count-1,n+t);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});let t=this.indexFromElement(e),n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var n;let r=this.measurementsCache[e];if(!r)return;let i=t-(this.itemSizeCache.get(r.key)??r.size);0!==i&&((null==(n=this.scrollState)?void 0:n.behavior)!=="smooth"&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(r,i,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,t)),this.notify(!1))},this.getVirtualItems=s(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(0!==t.length)return o(t[b(0,t.length-1,e=>o(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();return"auto"===t&&(t=e>=i+r?"end":"start"),"center"===t?e+=(n-r)/2:"end"===t&&(e-=r),Math.max(Math.min(this.getMaxScrollOffset(),e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if("auto"===t)if(i.end>=r+n-this.options.scrollPaddingEnd)t="end";else{if(!(i.start<=r+this.options.scrollPaddingStart))return[r,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let s="end"===t?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(s,t,i.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:n="auto"}={})=>{let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:n="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,s]=r,o=this.now();this.scrollState={index:e,align:s,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var e;let t,n=this.getMeasurements();if(0===n.length)t=this.options.paddingStart;else if(1===this.options.lanes)t=(null==(e=n[n.length-1])?void 0:e.end)??0;else{let e=Array(this.options.lanes).fill(null),r=n.length-1;for(;r>=0&&e.some(e=>null===e);){let t=n[r];null===e[t.lane]&&(e[t.lane]=t.end),r--}t=Math.max(...e.filter(e=>null!==e))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(e)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;let e=5e3;if(this.now()-this.scrollState.startedAt>e){this.scrollState=null;return}let t=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,n=t?t[0]:this.scrollState.lastTargetOffset,r=1,i=n!==this.scrollState.lastTargetOffset;if(!i&&a(n,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=r){this.scrollState=null;return}}else this.scrollState.stableFrames=0,i&&(this.scrollState.lastTargetOffset=n,this.scrollState.behavior="auto",this._scrollToOffset(n,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}let b=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,s=n(i);if(s<r)e=i+1;else{if(!(s>r))return i;t=i-1}}return e>0?e-1:0};function k({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){let i=e.length-1,s=t=>e[t].start;if(e.length<=r)return{startIndex:0,endIndex:i};let o=b(0,i,s,n),a=o;if(1===r)for(;a<i&&e[a].end<n+t;)a++;else if(r>1){let s=Array(r).fill(0);for(;a<i&&s.some(e=>e<n+t);){let t=e[a];s[t.lane]=t.end,a++}let l=Array(r).fill(n+t);for(;o>=0&&l.some(e=>e>=n);){let t=e[o];l[t.lane]=t.start,o--}o=Math.max(0,o-o%r),a=Math.min(i,a+(r-1-a%r))}return{startIndex:o,endIndex:a}}let w="u">typeof document?r.useLayoutEffect:r.useEffect;function v({useFlushSync:e=!0,...t}){let n=r.useReducer(()=>({}),{})[1],s={...t,onChange:(r,s)=>{var o;e&&s?(0,i.flushSync)(n):n(),null==(o=t.onChange)||o.call(t,r,s)}},[o]=r.useState(()=>new y(s));return o.setOptions(s),w(()=>o._didMount(),[]),w(()=>o._willUpdate()),o}function C(e){return v({observeElementRect:d,observeElementOffset:m,scrollToFn:_,...e})}},65915:e=>{var t=!0,n=!1,r=!1;function i(e,t,n){var r=e.attrIndex(t),i=[t,n];r<0?e.attrPush(i):e.attrs[r]=i}function s(e,t){for(var n=e[t].level-1,r=t-1;r>=0;r--)if(e[r].level===n)return r;return -1}function o(e,t){return d(e[t])&&p(e[t-1])&&f(e[t-2])&&m(e[t])}function a(e,t){if(e.children.unshift(l(e,t)),e.children[1].content=e.children[1].content.slice(3),e.content=e.content.slice(3),n)if(r){e.children.pop();var i="task-item-"+Math.ceil(1e7*Math.random()-1e3);e.children[0].content=e.children[0].content.slice(0,-1)+' id="'+i+'">',e.children.push(u(e.content,i,t))}else e.children.unshift(h(t)),e.children.push(c(t))}function l(e,n){var r=new n("html_inline","",0),i=t?' disabled="" ':"";return 0===e.content.indexOf("[ ] ")?r.content='<input class="task-list-item-checkbox"'+i+'type="checkbox">':(0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] "))&&(r.content='<input class="task-list-item-checkbox" checked=""'+i+'type="checkbox">'),r}function h(e){var t=new e("html_inline","",0);return t.content="<label>",t}function c(e){var t=new e("html_inline","",0);return t.content="</label>",t}function u(e,t,n){var r=new n("html_inline","",0);return r.content='<label class="task-list-item-label" for="'+t+'">'+e+"</label>",r.attrs=[{for:t}],r}function d(e){return"inline"===e.type}function p(e){return"paragraph_open"===e.type}function f(e){return"list_item_open"===e.type}function m(e){return 0===e.content.indexOf("[ ] ")||0===e.content.indexOf("[x] ")||0===e.content.indexOf("[X] ")}e.exports=function(e,l){l&&(t=!l.enabled,n=!!l.label,r=!!l.labelAfter),e.core.ruler.after("inline","github-task-lists",function(e){for(var n=e.tokens,r=2;r<n.length;r++)o(n,r)&&(a(n[r],e.Token),i(n[r-2],"class","task-list-item"+(t?"":" enabled")),i(n[s(n,r-2)],"class","contains-task-list"))})}},66088:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],s=(0,r.A)("chevron-down",i)},67014:(e,t,n)=>{"use strict";let r,i,s,o;n.d(t,{O_:()=>rU});class a extends Error{constructor(e){super(e),this.name="ShikiError"}}var l=n(41463);function h(e){return c(e)}function c(e){return Array.isArray(e)?u(e):e instanceof RegExp?e:"object"==typeof e?d(e):e}function u(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=c(e[n]);return t}function d(e){let t={};for(let n in e)t[n]=c(e[n]);return t}function p(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function f(e){let t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return 0===t?e:~t==e.length-1?f(e.substring(0,e.length-1)):e.substr(~t+1)}var m=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,g=class{static hasCaptures(e){return null!==e&&(m.lastIndex=0,m.test(e))}static replaceCaptures(e,t,n){return e.replace(m,(e,r,i,s)=>{let o=n[parseInt(r||i,10)];if(!o)return e;{let e=t.substring(o.start,o.end);for(;"."===e[0];)e=e.substring(1);switch(s){case"downcase":return e.toLowerCase();case"upcase":return e.toUpperCase();default:return e}}})}};function _(e,t){return e<t?-1:+(e>t)}function y(e,t){if(null===e&&null===t)return 0;if(!e)return -1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=_(e[r],t[r]);if(0!==n)return n}return 0}return n-r}function b(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function k(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var w=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},v=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(E(e),t)}static createFromParsedTheme(e,t){return N(e,t)}_cachedMatchRoot=new w(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(null===e)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>x(e.parent,t.parentScopes));return n?new A(n.fontStyle,n.foreground,n.background):null}},C=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(" ")}extends(e){return this===e||null!==this.parent&&this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function x(e,t){if(0===t.length)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(">"===r){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!S(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function S(e,t){return t===e||e.startsWith(t)&&"."===e[t.length]}var A=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function E(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i,s=t[e];if(!s.settings)continue;if("string"==typeof s.scope){let e=s.scope;i=(e=(e=e.replace(/^[,]+/,"")).replace(/[,]+$/,"")).split(",")}else i=Array.isArray(s.scope)?s.scope:[""];let o=-1;if("string"==typeof s.settings.fontStyle){o=0;let e=s.settings.fontStyle.split(" ");for(let t=0,n=e.length;t<n;t++)switch(e[t]){case"italic":o|=1;break;case"bold":o|=2;break;case"underline":o|=4;break;case"strikethrough":o|=8}}let a=null;"string"==typeof s.settings.foreground&&b(s.settings.foreground)&&(a=s.settings.foreground);let l=null;"string"==typeof s.settings.background&&b(s.settings.background)&&(l=s.settings.background);for(let t=0,s=i.length;t<s;t++){let s=i[t].trim().split(" "),h=s[s.length-1],c=null;s.length>1&&(c=s.slice(0,s.length-1)).reverse(),n[r++]=new M(h,c,e,o,a,l)}}return n}var M=class{constructor(e,t,n,r,i,s){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=s}},T=((s=T||{})[s.NotSet=-1]="NotSet",s[s.None=0]="None",s[s.Italic=1]="Italic",s[s.Bold=2]="Bold",s[s.Underline=4]="Underline",s[s.Strikethrough=8]="Strikethrough",s);function N(e,t){e.sort((e,t)=>{let n=_(e.scope,t.scope);return 0!==n||0!==(n=y(e.parentScopes,t.parentScopes))?n:e.index-t.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&""===e[0].scope;){let t=e.shift();-1!==t.fontStyle&&(n=t.fontStyle),null!==t.foreground&&(r=t.foreground),null!==t.background&&(i=t.background)}let s=new I(t),o=new A(n,s.getId(r),s.getId(i)),a=new R(new L(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];a.insert(0,n.scope,n.parentScopes,n.fontStyle,s.getId(n.foreground),s.getId(n.background))}return new v(s,o,a)}var I=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(null===e)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},D=Object.freeze([]),L=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||D,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,-1!==t&&(this.fontStyle=t),0!==n&&(this.foreground=n),0!==r&&(this.background=r)}},R=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;">"===e.parentScopes[n]&&n++,">"===t.parentScopes[r]&&r++,!(n>=e.parentScopes.length)&&!(r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(0!==i)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(""!==t){let e,n,r=t.indexOf(".");if(-1===r?(e=t,n=""):(e=t.substring(0,r),n=t.substring(r+1)),this._children.hasOwnProperty(e))return this._children[e].match(n)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,s,o){let a,l,h;if(""===n)return void this._doInsertHere(t,r,i,s,o);let c=n.indexOf(".");-1===c?(a=n,l=""):(a=n.substring(0,c),l=n.substring(c+1)),this._children.hasOwnProperty(a)?h=this._children[a]:(h=new e(this._mainRule.clone(),L.cloneArr(this._rulesWithParentScopes)),this._children[a]=h),h.insert(t+1,l,r,i,s,o)}_doInsertHere(e,t,n,r,i){if(null===t)return void this._mainRule.acceptOverwrite(e,n,r,i);for(let s=0,o=this._rulesWithParentScopes.length;s<o;s++){let o=this._rulesWithParentScopes[s];if(0===y(o.parentScopes,t))return void o.acceptOverwrite(e,n,r,i)}-1===n&&(n=this._mainRule.fontStyle),0===r&&(r=this._mainRule.foreground),0===i&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new L(e,t,n,r,i))}},F=class e{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:e.getForeground(t),background:e.getBackground(t)})}static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static containsBalancedBrackets(e){return(1024&e)!=0}static getFontStyle(e){return(30720&e)>>>11}static getForeground(e){return(0xff8000&e)>>>15}static getBackground(e){return(0xff000000&e)>>>24}static set(t,n,r,i,s,o,a){let l=e.getLanguageId(t),h=e.getTokenType(t),c=+!!e.containsBalancedBrackets(t),u=e.getFontStyle(t),d=e.getForeground(t),p=e.getBackground(t);return 0!==n&&(l=n),8!==r&&(h=O(r)),null!==i&&(c=+!!i),-1!==s&&(u=s),0!==o&&(d=o),0!==a&&(p=a),(l|h<<8|c<<10|u<<11|d<<15|p<<24)>>>0}};function P(e){return e}function O(e){return e}function z(e,t){let n=[],r=$(e),i=r.next();for(;null!==i;){let e=0;if(2===i.length&&":"===i.charAt(1)){switch(i.charAt(0)){case"R":e=1;break;case"L":e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),","!==i)break;i=r.next()}return n;function s(){if("-"===i){i=r.next();let e=s();return t=>!!e&&!e(t)}if("("===i){i=r.next();let e=a();return")"===i&&(i=r.next()),e}if(B(i)){let e=[];do e.push(i),i=r.next();while(B(i));return n=>t(e,n)}return null}function o(){let e=[],t=s();for(;t;)e.push(t),t=s();return t=>e.every(e=>e(t))}function a(){let e=[],t=o();for(;t&&(e.push(t),"|"===i||","===i);){do i=r.next();while("|"===i||","===i);t=o()}return t=>e.some(e=>e(t))}}function B(e){return!!e&&!!e.match(/[\w\.:]+/)}function $(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}var j=((o=j||{})[o.None=0]="None",o[o.NotBeginString=1]="NotBeginString",o[o.NotEndString=2]="NotEndString",o[o.NotBeginPosition=4]="NotBeginPosition",o[o.DebugCall=8]="DebugCall",o);function q(e){"function"==typeof e.dispose&&e.dispose()}var H=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},U=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},W=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},V=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new H(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new W;for(let n of e)G(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof H){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function G(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let s=n.lookup(t);e instanceof H?K({baseGrammar:s,selfGrammar:i},r):J(e.ruleName,{baseGrammar:s,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new H(e))}function J(e,t,n){t.repository&&t.repository[e]&&Z([t.repository[e]],t,n)}function K(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Z(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Z(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Z(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?p({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Z(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let s=en(i);switch(s.kind){case 0:K({...t,selfGrammar:t.baseGrammar},n);break;case 1:K(t,n);break;case 2:J(s.ruleName,{...t,repository:e},n);break;case 3:case 4:let o=s.scopeName===t.selfGrammar.scopeName?t.selfGrammar:s.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){let r={baseGrammar:t.baseGrammar,selfGrammar:o,repository:e};4===s.kind?J(s.ruleName,r,n):K(r,n)}else 4===s.kind?n.add(new U(s.scopeName,s.ruleName)):n.add(new H(s.scopeName))}}}var X=class{kind=0},Q=class{kind=1},Y=class{constructor(e){this.ruleName=e}kind=2},ee=class{constructor(e){this.scopeName=e}kind=3},et=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function en(e){if("$base"===e)return new X;if("$self"===e)return new Q;let t=e.indexOf("#");return -1===t?new ee(e):0===t?new Y(e.substring(1)):new et(e.substring(0,t),e.substring(t+1))}var er=/\\(\d+)/,ei=/\\(\d+)/g;Symbol("RuleId");var es=-1,eo=-2;function ea(e){return e}function el(e){return e}var eh=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=g.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=g.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${f(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return this._nameIsCapturing&&null!==this._name&&null!==e&&null!==t?g.replaceCaptures(this._name,e,t):this._name}getContentName(e,t){return this._contentNameIsCapturing&&null!==this._contentName?g.replaceCaptures(this._contentName,e,t):this._contentName}},ec=class extends eh{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error("Not supported!")}compile(e,t){throw Error("Not supported!")}compileAG(e,t,n,r){throw Error("Not supported!")}},eu=class extends eh{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new eg(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ed=class extends eh{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new e_,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},ep=class extends eh{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,s,o,a,l,h){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this._end=new eg(o||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=a,this.applyEndPatternLast=l||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},ef=class extends eh{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,s,o,a,l){super(e,t,n,r),this._begin=new eg(i,this.id),this.beginCaptures=s,this.whileCaptures=a,this._while=new eg(o,eo),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns)for(let t of(this._cachedCompiledPatterns=new e_,this.patterns))e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new e_,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},em=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new ec(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new eu(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(void 0===t.begin){t.repository&&(r=p({},r,t.repository));let i=t.patterns;return void 0===i&&t.include&&(i=[{include:t.include}]),new ed(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new ef(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new ep(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let s=0;for(let e in t){if("$vscodeTextmateLocation"===e)continue;let t=parseInt(e,10);t>s&&(s=t)}for(let e=0;e<=s;e++)i[e]=null;for(let s in t){if("$vscodeTextmateLocation"===s)continue;let o=parseInt(s,10),a=0;t[s].patterns&&(a=e.getCompiledRuleId(t[s],n,r)),i[o]=e.createCaptureRule(n,t[s].$vscodeTextmateLocation,t[s].name,t[s].contentName,a)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let s=0,o=t.length;s<o;s++){let o=t[s],a=-1;if(o.include){let t=en(o.include);switch(t.kind){case 0:case 1:a=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(a=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let s=t.scopeName,l=4===t.kind?t.ruleName:null,h=n.getExternalGrammar(s,r);if(h)if(l){let t=h.repository[l];t&&(a=e.getCompiledRuleId(t,n,h.repository))}else a=e.getCompiledRuleId(h.repository.$self,n,h.repository)}}else a=e.getCompiledRuleId(o,n,r);if(-1!==a){let e=n.getRule(a),t=!1;if((e instanceof ed||e instanceof ep||e instanceof ef)&&e.hasMissingPatterns&&0===e.patterns.length&&(t=!0),t)continue;i.push(a)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},eg=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&"string"==typeof e){const t=e.length;let n=0,r=[],i=!1;for(let s=0;s<t;s++)if("\\"===e.charAt(s)&&s+1<t){const t=e.charAt(s+1);"z"===t?(r.push(e.substring(n,s)),r.push("$(?!\\n)(?<!\\n)"),n=s+2):("A"===t||"G"===t)&&(i=!0),s++}this.hasAnchor=i,0===n?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,"string"==typeof this.source?this.hasBackReferences=er.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let n=t.map(t=>e.substring(t.start,t.end));return ei.lastIndex=0,this.source.replace(ei,(e,t)=>k(n[parseInt(t,10)]||""))}_buildAnchorCache(){let e,t,n,r;if("string"!=typeof this.source)throw Error("This method should only be called if the source is a string");let i=[],s=[],o=[],a=[];for(e=0,t=this.source.length;e<t;e++)n=this.source.charAt(e),i[e]=n,s[e]=n,o[e]=n,a[e]=n,"\\"===n&&e+1<t&&("A"===(r=this.source.charAt(e+1))?(i[e+1]="￿",s[e+1]="￿",o[e+1]="A",a[e+1]="A"):"G"===r?(i[e+1]="￿",s[e+1]="G",o[e+1]="￿",a[e+1]="G"):(i[e+1]=r,s[e+1]=r,o[e+1]=r,a[e+1]=r),e++);return{A0_G0:i.join(""),A0_G1:s.join(""),A1_G0:o.join(""),A1_G1:a.join("")}}resolveAnchors(e,t){if(!this.hasAnchor||!this._anchorCache||"string"!=typeof this.source)return this.source;if(e)if(t)return this._anchorCache.A1_G1;else return this._anchorCache.A1_G0;return t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},e_=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new ey(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){if(!this._hasAnchors)return this.compile(e);if(t)if(n)return this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1;else return this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0;return n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0)}_resolveAnchors(e,t,n){return new ey(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},ey=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){"function"==typeof this.scanner.dispose&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join("\n")}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},eb=class{constructor(e,t){this.languageId=e,this.tokenType=t}},ek=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new eb(e,8),this._embeddedLanguagesMatcher=new ew(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return null===t?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new eb(0,0);_getBasicScopeAttributes=new w(e=>new eb(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},ew=class{values;scopesRegExp;constructor(e){if(0===e.length)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([e,t])=>k(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};void 0!==l&&l.env.VSCODE_TEXTMATE_DEBUG;var ev=!1,eC=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function ex(e,t,n,r,i,s,o,a){let l=t.content.length,h=!1,c=-1;if(o){let o=eS(e,t,n,r,i,s);i=o.stack,r=o.linePos,n=o.isFirstLine,c=o.anchorPosition}let u=Date.now();for(;!h;){if(0!==a&&Date.now()-u>a)return new eC(i,!0);d()}return new eC(i,!1);function d(){let o=eA(e,t,n,r,i,c);if(!o){s.produce(i,l),h=!0;return}let a=o.captureIndices,u=o.matchedRuleId,d=!!a&&a.length>0&&a[0].end>r;if(u===es){let o=i.getRule(e);s.produce(i,a[0].start),i=i.withContentNameScopesList(i.nameScopesList),eD(e,t,n,i,s,o.endCaptures,a),s.produce(i,a[0].end);let u=i;if(i=i.parent,c=u.getAnchorPos(),!d&&u.getEnterPos()===r){i=u,s.produce(i,l),h=!0;return}}else{let o=e.getRule(u);s.produce(i,a[0].start);let p=i,f=o.getName(t.content,a),m=i.contentNameScopesList.pushAttributed(f,e);if(i=i.push(u,r,c,a[0].end===l,null,m,m),o instanceof ep){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(o instanceof ef){let r=o;eD(e,t,n,i,s,r.beginCaptures,a),s.produce(i,a[0].end),c=a[0].end;let u=r.getContentName(t.content,a),f=m.pushAttributed(u,e);if(i=i.withContentNameScopesList(f),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,a))),!d&&p.hasSameRuleAs(i)){i=i.pop(),s.produce(i,l),h=!0;return}}else if(eD(e,t,n,i,s,o.captures,a),s.produce(i,a[0].end),i=i.pop(),!d){i=i.safePop(),s.produce(i,l),h=!0;return}}a[0].end>r&&(r=a[0].end,n=!1)}}function eS(e,t,n,r,i,s){let o=i.beginRuleCapturedEOL?0:-1,a=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof ef&&a.push({rule:n,stack:t})}for(let l=a.pop();l;l=a.pop()){let{ruleScanner:a,findOptions:h}=eN(l.rule,e,l.stack.endRule,n,r===o),c=a.findNextMatchSync(t,r,h);if(c){if(c.ruleId!==eo){i=l.stack.pop();break}c.captureIndices&&c.captureIndices.length&&(s.produce(l.stack,c.captureIndices[0].start),eD(e,t,n,l.stack,s,l.rule.whileCaptures,c.captureIndices),s.produce(l.stack,c.captureIndices[0].end),o=c.captureIndices[0].end,c.captureIndices[0].end>r&&(r=c.captureIndices[0].end,n=!1))}else{i=l.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function eA(e,t,n,r,i,s){let o=eE(e,t,n,r,i,s),a=e.getInjections();if(0===a.length)return o;let l=eM(a,e,t,n,r,i,s);if(!l)return o;if(!o)return l;let h=o.captureIndices[0].start,c=l.captureIndices[0].start;return c<h||l.priorityMatch&&c===h?l:o}function eE(e,t,n,r,i,s){let{ruleScanner:o,findOptions:a}=eT(i.getRule(e),e,i.endRule,n,r===s),l=o.findNextMatchSync(t,r,a);return l?{captureIndices:l.captureIndices,matchedRuleId:l.ruleId}:null}function eM(e,t,n,r,i,s,o){let a,l=Number.MAX_VALUE,h=null,c=0,u=s.contentNameScopesList.getScopeNames();for(let s=0,d=e.length;s<d;s++){let d=e[s];if(!d.matcher(u))continue;let{ruleScanner:p,findOptions:f}=eT(t.getRule(d.ruleId),t,null,r,i===o),m=p.findNextMatchSync(n,i,f);if(!m)continue;let g=m.captureIndices[0].start;if(!(g>=l)&&(l=g,h=m.captureIndices,a=m.ruleId,c=d.priority,l===i))break}return h?{priorityMatch:-1===c,captureIndices:h,matchedRuleId:a}:null}function eT(e,t,n,r,i){return ev?{ruleScanner:e.compile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function eN(e,t,n,r,i){return ev?{ruleScanner:e.compileWhile(t,n),findOptions:eI(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function eI(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function eD(e,t,n,r,i,s,o){if(0===s.length)return;let a=t.content,l=Math.min(s.length,o.length),h=[],c=o[0].end;for(let t=0;t<l;t++){let l=s[t];if(null===l)continue;let u=o[t];if(0===u.length)continue;if(u.start>c)break;for(;h.length>0&&h[h.length-1].endPos<=u.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,u.start):i.produce(r,u.start),l.retokenizeCapturedWithRuleId){let t=l.getName(a,o),s=r.contentNameScopesList.pushAttributed(t,e),h=l.getContentName(a,o),c=s.pushAttributed(h,e),d=r.push(l.retokenizeCapturedWithRuleId,u.start,-1,!1,null,s,c),p=e.createOnigString(a.substring(0,u.end));ex(e,p,n&&0===u.start,u.start,d,i,!1,0),q(p);continue}let d=l.getName(a,o);if(null!==d){let t=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(d,e);h.push(new eL(t,u.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var eL=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function eR(e,t,n,r,i,s,o,a){return new ez(e,t,n,r,i,s,o,a)}function eF(e,t,n,r,i){let s=z(t,eP),o=em.getCompiledRuleId(n,r,i.repository);for(let n of s)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function eP(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(eO(t[r],e))return n=r+1,!0;return!1})}function eO(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&"."===e[n]}var ez=class{constructor(e,t,n,r,i,s,o,a){if(this._rootScopeName=e,this.balancedBracketSelectors=s,this._onigLib=a,this._basicScopeAttributesProvider=new ek(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=eB(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const e of Object.keys(i))for(const t of z(e,eP))this._tokenTypeMatchers.push({matcher:t.matcher,type:i[e]})}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e=e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),t=[],n=this._rootScopeName,r=e(n);if(r){let e=r.injections;if(e)for(let n in e)eF(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&eF(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return null===this._injections&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ea(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[el(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=eB(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){let i;if(-1===this._rootId&&(this._rootId=em.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections()),t&&t!==ej.NULL)i=!1,t.reset();else{let e;i=!0;let n=this._basicScopeAttributesProvider.getDefaultAttributes(),r=this.themeProvider.getDefaults(),s=F.set(0,n.languageId,n.tokenType,null,r.fontStyle,r.foregroundId,r.backgroundId),o=this.getRule(this._rootId).getName(null,null);e=o?e$.createRootAndLookUpScopeName(o,s,this):e$.createRoot("unknown",s),t=new ej(null,this._rootId,-1,-1,!1,null,e,e)}e+="\n";let s=this.createOnigString(e),o=s.content.length,a=new eH(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),l=ex(this,s,i,0,t,a,!0,r);return q(s),{lineLength:o,lineTokens:a,ruleStack:l.stack,stoppedEarly:l.stoppedEarly}}};function eB(e,t){return(e=h(e)).repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var e$=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)r=new e(r,i=C.push(i,t.scopeNames),t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new C(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),s=new C(null,t),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(n,i,o);return new e(null,s,a)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return e.equals(this,t)}static equals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}}static mergeAttributes(e,t,n){let r=-1,i=0,s=0;return null!==n&&(r=n.fontStyle,i=n.foregroundId,s=n.backgroundId),F.set(e,t.languageId,t.tokenType,null,r,i,s)}pushAttributed(t,n){if(null===t)return this;if(-1===t.indexOf(" "))return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),s=t.scopePath.push(n),o=r.themeProvider.themeMatch(s),a=e.mergeAttributes(t.tokenAttributes,i,o);return new e(t,s,a)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},ej=class e{constructor(e,t,n,r,i,s,o,a){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=s,this.nameScopesList=o,this.contentNameScopesList=a,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return null!==t&&e._equals(this,t)}static _equals(e,t){return e===t||!!this._structuralEquals(e,t)&&e$.equals(e.contentNameScopesList,t.contentNameScopesList)}static _structuralEquals(e,t){for(;;){if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,s,o,a){return new e(this,t,n,r,i,s,o,a)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:el(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=e$.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ea(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,e$.fromExtension(r,n.contentNameScopesList))}},eq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>"*"===e?(this.allowAny=!0,[]):z(e,eP).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>z(e,eP).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&0===this.unbalancedBracketScopes.length}get matchesNever(){return 0===this.balancedBracketScopes.length&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},eH=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=F.set(n,0,P(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=F.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),0===this._tokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),0===this._binaryTokens.length&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},eU=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let s=this._rawGrammars.get(e);if(!s)return null;this._grammars.set(e,eR(e,s,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},eW=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new eU(v.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(v.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new eq(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let s=new V(this._syncRegistry,e);for(;s.Q.length>0;)s.Q.map(e=>this._loadSingleGrammar(e.scopeName)),s.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n="function"==typeof this._options.getInjections?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},eV=ej.NULL,eG=n(51640),eJ=n(4918),eK=n(27629);let eZ=/["&'<>`]/g,eX=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,eQ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,eY=/[|\\{}()[\]^$+*?.]/g,e0=new WeakMap;function e1(e,t){if(e=e.replace(t.subset?e2(t.subset):eZ,r),t.subset||t.escapeOnly)return e;return e.replace(eX,n).replace(eQ,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function e2(e){let t=e0.get(e);return t||(t=e3(e),e0.set(e,t)),t}function e3(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(eY,"\\$&"));return RegExp("(?:"+t.join("|")+")","g")}let e5=/[\dA-Fa-f]/;function e4(e,t,n){let r="&#x"+e.toString(16).toUpperCase();return n&&t&&!e5.test(String.fromCharCode(t))?r:r+";"}let e6=/\d/;function e8(e,t,n){let r="&#"+String(e);return n&&t&&!e6.test(String.fromCharCode(t))?r:r+";"}var e9=n(6801);let e7={nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},te=["cent","copy","divide","gt","lt","not","para","times"],tt={}.hasOwnProperty,tn={};for(r in e7)tt.call(e7,r)&&(tn[e7[r]]=r);let tr=/[^\dA-Za-z]/;function ti(e,t,n,r){let i=String.fromCharCode(e);if(tt.call(tn,i)){let e=tn[i],s="&"+e;return n&&e9.K.includes(e)&&!te.includes(e)&&(!r||t&&61!==t&&tr.test(String.fromCharCode(t)))?s:s+";"}return""}function ts(e,t,n){let r,i=e4(e,t,n.omitOptionalSemicolons);if((n.useNamedReferences||n.useShortestReferences)&&(r=ti(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){let r=e8(e,t,n.omitOptionalSemicolons);r.length<i.length&&(i=r)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function to(e,t){return e1(e,Object.assign({format:ts},t))}let ta=/^>|^->|<!--|-->|--!>|<!-$/g,tl=[">"],th=["<",">"];function tc(e,t,n,r){return r.settings.bogusComments?"<?"+to(e.value,Object.assign({},r.settings.characterReferences,{subset:tl}))+">":"\x3c!--"+e.value.replace(ta,i)+"--\x3e";function i(e){return to(e,Object.assign({},r.settings.characterReferences,{subset:th}))}}function tu(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}var td=n(49884),tp=n(86994),tf=n(38609),tm=n(51705),tg=n(36887);let t_=tk(1),ty=tk(-1),tb=[];function tk(e){return t;function t(t,n,r){let i=t?t.children:tb,s=(n||0)+e,o=i[s];if(!r)for(;o&&(0,tg.m)(o);)s+=e,o=i[s];return o}}let tw={}.hasOwnProperty;function tv(e){return t;function t(t,n,r){return tw.call(e,t.tagName)&&e[t.tagName](t,n,r)}}let tC=tv({body:tA,caption:tx,colgroup:tx,dd:tN,dt:tT,head:tx,html:tS,li:tM,optgroup:tD,option:tL,p:tE,rp:tI,rt:tI,tbody:tF,td:tz,tfoot:tP,th:tz,thead:tR,tr:tO});function tx(e,t,n){let r=t_(n,t,!0);return!r||"comment"!==r.type&&!("text"===r.type&&(0,tg.m)(r.value.charAt(0)))}function tS(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tA(e,t,n){let r=t_(n,t);return!r||"comment"!==r.type}function tE(e,t,n){let r=t_(n,t);return r?"element"===r.type&&("address"===r.tagName||"article"===r.tagName||"aside"===r.tagName||"blockquote"===r.tagName||"details"===r.tagName||"div"===r.tagName||"dl"===r.tagName||"fieldset"===r.tagName||"figcaption"===r.tagName||"figure"===r.tagName||"footer"===r.tagName||"form"===r.tagName||"h1"===r.tagName||"h2"===r.tagName||"h3"===r.tagName||"h4"===r.tagName||"h5"===r.tagName||"h6"===r.tagName||"header"===r.tagName||"hgroup"===r.tagName||"hr"===r.tagName||"main"===r.tagName||"menu"===r.tagName||"nav"===r.tagName||"ol"===r.tagName||"p"===r.tagName||"pre"===r.tagName||"section"===r.tagName||"table"===r.tagName||"ul"===r.tagName):!n||"element"!==n.type||"a"!==n.tagName&&"audio"!==n.tagName&&"del"!==n.tagName&&"ins"!==n.tagName&&"map"!==n.tagName&&"noscript"!==n.tagName&&"video"!==n.tagName}function tM(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"li"===r.tagName}function tT(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName))}function tN(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("dt"===r.tagName||"dd"===r.tagName)}function tI(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("rp"===r.tagName||"rt"===r.tagName)}function tD(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"optgroup"===r.tagName}function tL(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("option"===r.tagName||"optgroup"===r.tagName)}function tR(e,t,n){let r=t_(n,t);return!!(r&&"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName))}function tF(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("tbody"===r.tagName||"tfoot"===r.tagName)}function tP(e,t,n){return!t_(n,t)}function tO(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&"tr"===r.tagName}function tz(e,t,n){let r=t_(n,t);return!r||"element"===r.type&&("td"===r.tagName||"th"===r.tagName)}let tB=tv({body:tq,colgroup:tH,head:tj,html:t$,tbody:tU});function t$(e){let t=t_(e,-1);return!t||"comment"!==t.type}function tj(e){let t=new Set;for(let n of e.children)if("element"===n.type&&("base"===n.tagName||"title"===n.tagName)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||"element"===n.type}function tq(e){let t=t_(e,-1,!0);return!t||"comment"!==t.type&&!("text"===t.type&&(0,tg.m)(t.value.charAt(0)))&&("element"!==t.type||"meta"!==t.tagName&&"link"!==t.tagName&&"script"!==t.tagName&&"style"!==t.tagName&&"template"!==t.tagName)}function tH(e,t,n){let r=ty(n,t),i=t_(e,-1,!0);return!(n&&r&&"element"===r.type&&"colgroup"===r.tagName&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"col"===i.tagName)}function tU(e,t,n){let r=ty(n,t),i=t_(e,-1);return!(n&&r&&"element"===r.type&&("thead"===r.tagName||"tbody"===r.tagName)&&tC(r,n.children.indexOf(r),n))&&!!(i&&"element"===i.type&&"tr"===i.tagName)}let tW={name:[[" \n\f\r &/=>".split("")," \n\f\r \"&'/=>`".split("")],["\0 \n\f\r \"&'/<=>".split(""),"\0 \n\f\r \"&'/<=>`".split("")]],unquoted:[[" \n\f\r &>".split(""),"\0 \n\f\r \"&'<=>`".split("")],["\0 \n\f\r \"&'<=>`".split(""),"\0 \n\f\r \"&'<=>`".split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function tV(e,t,n,r){let i,s=r.schema,o="svg"!==s.space&&r.settings.omitOptionalTags,a="svg"===s.space?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase()),l=[];"html"===s.space&&"svg"===e.tagName&&(r.schema=eJ.JW);let h=tG(r,e.properties),c=r.all("html"===s.space&&"template"===e.tagName?e.content:e);return r.schema=s,c&&(a=!1),!h&&o&&tB(e,t,n)||(l.push("<",e.tagName,h?" "+h:""),a&&("svg"===s.space||r.settings.closeSelfClosing)&&(i=h.charAt(h.length-1),(!r.settings.tightSelfClosing||"/"===i||i&&'"'!==i&&"'"!==i)&&l.push(" "),l.push("/")),l.push(">")),l.push(c),a||o&&tC(e,t,n)||l.push("</"+e.tagName+">"),l.join("")}function tG(e,t){let n,r=[],i=-1;if(t){for(n in t)if(null!==t[n]&&void 0!==t[n]){let i=tJ(e,n,t[n]);i&&r.push(i)}}for(;++i<r.length;){let t=e.settings.tightAttributes?r[i].charAt(r[i].length-1):void 0;i!==r.length-1&&'"'!==t&&"'"!==t&&(r[i]+=" ")}return r.join("")}function tJ(e,t,n){let r,i=(0,tf.I)(e.schema,t),s=e.settings.allowParseErrors&&"html"===e.schema.space?0:1,o=+!e.settings.allowDangerousCharacters,a=e.quote;if(i.overloadedBoolean&&(n===i.attribute||""===n)?n=!0:(i.boolean||i.overloadedBoolean)&&("string"!=typeof n||n===i.attribute||""===n)&&(n=!!n),null==n||!1===n||"number"==typeof n&&Number.isNaN(n))return"";let l=to(i.attribute,Object.assign({},e.settings.characterReferences,{subset:tW.name[s][o]}));return!0===n||(n=Array.isArray(n)?(i.commaSeparated?tp.A:tm.A)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?l:(e.settings.preferUnquoted&&(r=to(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tW.unquoted[s][o]}))),r!==n&&(e.settings.quoteSmart&&(0,td.D)(n,a)>(0,td.D)(n,e.alternative)&&(a=e.alternative),r=a+to(n,Object.assign({},e.settings.characterReferences,{subset:("'"===a?tW.single:tW.double)[s][o],attribute:!0}))+a),l+(r?"="+r:r))}let tK=["<","&"];function tZ(e,t,n,r){return n&&"element"===n.type&&("script"===n.tagName||"style"===n.tagName)?e.value:to(e.value,Object.assign({},r.settings.characterReferences,{subset:tK}))}function tX(e,t,n,r){return r.settings.allowDangerousHtml?e.value:tZ(e,t,n,r)}function tQ(e,t,n,r){return r.all(e)}let tY=(0,eK.A)("type",{invalid:t0,unknown:t1,handlers:{comment:tc,doctype:tu,element:tV,raw:tX,root:tQ,text:tZ}});function t0(e){throw Error("Expected node, not `"+e+"`")}function t1(e){throw Error("Cannot compile unknown node `"+e.type+"`")}let t2={},t3={},t5=[];function t4(e,t){let n=t||t2,r=n.quote||'"',i='"'===r?"'":'"';if('"'!==r&&"'"!==r)throw Error("Invalid quote `"+r+"`, expected `'` or `\"`");return({one:t6,all:t8,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||eG.b,characterReferences:n.characterReferences||t3,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:"svg"===n.space?eJ.JW:eJ.qy,quote:r,alternative:i}).one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function t6(e,t,n){return tY(e,t,n,this)}function t8(e){let t=[],n=e&&e.children||t5,r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function t9(e,t){let n="string"==typeof e?{}:{...e.colorReplacements},r="string"==typeof e?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))"string"==typeof i?n[e]=i:e===r&&Object.assign(n,i);return n}function t7(e,t){return e&&t?.[e?.toLowerCase()]||e}function ne(e){return Array.isArray(e)?e:[e]}async function nt(e){return Promise.resolve("function"==typeof e?e():e).then(e=>e.default||e)}function nn(e){return!e||["plaintext","txt","text","plain"].includes(e)}function nr(e){return"ansi"===e||nn(e)}function ni(e){return"none"===e}function ns(e){return ni(e)}function no(e,t){if(!t)return e;for(let n of(e.properties||={},e.properties.class||=[],"string"==typeof e.properties.class&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]),Array.isArray(t)?t:t.split(/\s+/g)))n&&!e.properties.class.includes(n)&&e.properties.class.push(n);return e}function na(e,t=!1){if(0===e.length)return[["",0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let s=t?n[e]+(n[e+1]||""):n[e];i.push([s,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}function nl(e){let t=na(e,!0).map(([e])=>e);function n(n){if(n===e.length)return{line:t.length-1,character:t[t.length-1].length};let r=n,i=0;for(let e of t){if(r<e.length)break;r-=e.length,i++}return{line:i,character:r}}function r(e,n){let r=0;for(let n=0;n<e;n++)r+=t[n].length;return r+n}return{lines:t,indexToPos:n,posToIndex:r}}let nh="light-dark()",nc=["color","background-color"];function nu(e,t){let n=0,r=[];for(let i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function nd(e,t){let n=Array.from(t instanceof Set?t:new Set(t)).sort((e,t)=>e-t);return n.length?e.map(e=>e.flatMap(e=>{let t=n.filter(t=>e.offset<t&&t<e.offset+e.content.length).map(t=>t-e.offset).sort((e,t)=>e-t);return t.length?nu(e,t):e})):e}function np(e,t,n,r,i="css-vars"){let s={content:e.content,explanation:e.explanation,offset:e.offset},o=t.map(t=>nf(e.variants[t])),l=new Set(o.flatMap(e=>Object.keys(e))),h={},c=(e,r)=>{let i="color"===r?"":"background-color"===r?"-bg":`-${r}`;return n+t[e]+("color"===r?"":i)};return o.forEach((e,n)=>{for(let s of l){let l=e[s]||"inherit";if(0===n&&r&&nc.includes(s))if(r===nh&&o.length>1){let e=t.findIndex(e=>"light"===e),r=t.findIndex(e=>"dark"===e);if(-1===e||-1===r)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let u=o[e][s]||"inherit",d=o[r][s]||"inherit";h[s]=`light-dark(${u}, ${d})`,"css-vars"===i&&(h[c(n,s)]=l)}else h[s]=l;else"css-vars"===i&&(h[c(n,s)]=l)}}),s.htmlStyle=h,s}function nf(e){let t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&T.Italic&&(t["font-style"]="italic"),e.fontStyle&T.Bold&&(t["font-weight"]="bold");let n=[];e.fontStyle&T.Underline&&n.push("underline"),e.fontStyle&T.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function nm(e){return"string"==typeof e?e:Object.entries(e).map(([e,t])=>`${e}:${t}`).join(";")}let ng=new WeakMap;function n_(e,t){ng.set(e,t)}function ny(e){return ng.get(e)}class nb{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,t){return new nb(Object.fromEntries(ne(t).map(e=>[e,eV])),e)}constructor(...e){if(2===e.length){const[t,n]=e;this.lang=n,this._stacks=t}else{const[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return nk(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function nk(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function nw(e,t){if(!(e instanceof nb))throw new a("Invalid grammar state");return e.getInternalStack(t)}function nv(e){for(let t=0;t<e.length;t++){let n=e[t];if(n.start.offset>n.end.offset)throw new a(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){let t=e[r],i=n.start.offset<=t.start.offset&&t.start.offset<n.end.offset,s=n.start.offset<t.end.offset&&t.end.offset<=n.end.offset,o=t.start.offset<=n.start.offset&&n.start.offset<t.end.offset,l=t.start.offset<n.end.offset&&n.end.offset<=t.end.offset;if(i||s||o||l){if(i&&s||o&&l||o&&n.start.offset===n.end.offset||s&&t.start.offset===t.end.offset)continue;throw new a(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(t.start)} intersect.`)}}}}function nC(e){return"text"===e.type?e.value:"element"===e.type?e.children.map(nC).join(""):""}let nx=[function(){let e=new WeakMap;function t(t){if(!e.has(t.meta)){let n=function(e){if("number"==typeof e){if(e<0||e>t.source.length)throw new a(`Invalid decoration offset: ${e}. Code length: ${t.source.length}`);return{...r.indexToPos(e),offset:e}}{let t=r.lines[e.line];if(void 0===t)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Lines length: ${r.lines.length}`);let n=e.character;if(n<0&&(n=t.length+n),n<0||n>t.length)throw new a(`Invalid decoration position ${JSON.stringify(e)}. Line ${e.line} length: ${t.length}`);return{...e,character:n,offset:r.posToIndex(e.line,n)}}},r=nl(t.source),i=(t.options.decorations||[]).map(e=>({...e,start:n(e.start),end:n(e.end)}));nv(i),e.set(t.meta,{decorations:i,converter:r,source:t.source})}return e.get(t.meta)}return{name:"shiki:decorations",tokens(e){if(this.options.decorations?.length)return nd(e,t(this).decorations.flatMap(e=>[e.start.offset,e.end.offset]))},code(e){if(!this.options.decorations?.length)return;let n=t(this),r=Array.from(e.children).filter(e=>"element"===e.type&&"span"===e.tagName);if(r.length!==n.converter.lines.length)throw new a(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${n.converter.lines.length}). Failed to apply decorations.`);function i(e,t,n,i){let s=r[e],l="",h=-1,c=-1;if(0===t&&(h=0),0===n&&(c=0),n===1/0&&(c=s.children.length),-1===h||-1===c)for(let e=0;e<s.children.length;e++)l+=nC(s.children[e]),-1===h&&l.length===t&&(h=e+1),-1===c&&l.length===n&&(c=e+1);if(-1===h)throw new a(`Failed to find start index for decoration ${JSON.stringify(i.start)}`);if(-1===c)throw new a(`Failed to find end index for decoration ${JSON.stringify(i.end)}`);let u=s.children.slice(h,c);if(i.alwaysWrap||u.length!==s.children.length)if(i.alwaysWrap||1!==u.length||"element"!==u[0].type){let e={type:"element",tagName:"span",properties:{},children:u};o(e,i,"wrapper"),s.children.splice(h,u.length,e)}else o(u[0],i,"token");else o(s,i,"line")}function s(e,t){r[e]=o(r[e],t,"line")}function o(e,t,n){let r=t.properties||{},i=t.transform||(e=>e);return e.tagName=t.tagName||"span",e.properties={...e.properties,...r,class:e.properties.class},t.properties?.class&&no(e,t.properties.class),e=i(e,n)||e}let l=[];for(let e of n.decorations.sort((e,t)=>t.start.offset-e.start.offset||e.end.offset-t.end.offset)){let{start:t,end:n}=e;if(t.line===n.line)i(t.line,t.character,n.character,e);else if(t.line<n.line){i(t.line,t.character,1/0,e);for(let r=t.line+1;r<n.line;r++)l.unshift(()=>s(r,e));i(n.line,0,n.character,e)}}l.forEach(e=>e())}}}()];function nS(e){let t=nA(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...nx]}function nA(e){let t=[],n=[],r=[];for(let i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var nE=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],nM={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function nT(e,t){let n=e.indexOf("\x1b",t);if(-1!==n&&"["===e[n+1]){let t=e.indexOf("m",n);if(-1!==t)return{sequence:e.substring(n+2,t).split(";"),startPosition:n,position:t+1}}return{position:e.length}}function nN(e){let t=e.shift();if("2"===t){let t=e.splice(0,3).map(e=>Number.parseInt(e));if(3!==t.length||t.some(e=>Number.isNaN(e)))return;return{type:"rgb",rgb:t}}if("5"===t){let t=e.shift();if(t)return{type:"table",index:Number(t)}}}function nI(e){let t=[];for(;e.length>0;){let n=e.shift();if(!n)continue;let r=Number.parseInt(n);if(!Number.isNaN(r))if(0===r)t.push({type:"resetAll"});else if(r<=9)nM[r]&&t.push({type:"setDecoration",value:nM[r]});else if(r<=29){let e=nM[r-20];e&&(t.push({type:"resetDecoration",value:e}),"dim"===e&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-30]}});else if(38===r){let n=nN(e);n&&t.push({type:"setForegroundColor",value:n})}else if(39===r)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-40]}});else if(48===r){let n=nN(e);n&&t.push({type:"setBackgroundColor",value:n})}else 49===r?t.push({type:"resetBackgroundColor"}):53===r?t.push({type:"setDecoration",value:"overline"}):55===r?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:nE[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:nE[r-100+8]}})}return t}function nD(){let e=null,t=null,n=new Set;return{parse(r){let i=[],s=0;do{let o=nT(r,s),a=o.sequence?r.substring(s,o.startPosition):r.substring(s);if(a.length>0&&i.push({value:a,foreground:e,background:t,decorations:new Set(n)}),o.sequence){let r=nI(o.sequence);for(let i of r)"resetAll"===i.type?(e=null,t=null,n.clear()):"resetForegroundColor"===i.type?e=null:"resetBackgroundColor"===i.type?t=null:"resetDecoration"===i.type&&n.delete(i.value);for(let i of r)"setForegroundColor"===i.type?e=i.value:"setBackgroundColor"===i.type?t=i.value:"setDecoration"===i.type&&n.add(i.value)}s=o.position}while(s<r.length);return i}}}var nL={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function nR(e=nL){let t;function n(t){return e[t]}function r(e){return`#${e.map(e=>Math.max(0,Math.min(e,255)).toString(16).padStart(2,"0")).join("")}`}function i(){if(t)return t;t=[];for(let e=0;e<nE.length;e++)t.push(n(nE[e]));let e=[0,95,135,175,215,255];for(let n=0;n<6;n++)for(let i=0;i<6;i++)for(let s=0;s<6;s++)t.push(r([e[n],e[i],e[s]]));let i=8;for(let e=0;e<24;e++,i+=10)t.push(r([i,i,i]));return t}function s(e){return i()[e]}return{value:function(e){switch(e.type){case"named":return n(e.name);case"rgb":return r(e.rgb);case"table":return s(e.index)}}}}let nF={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function nP(e,t,n){let r=t9(e,n),i=na(t),s=nR(Object.fromEntries(nE.map(t=>{let n=`terminal.ansi${t[0].toUpperCase()}${t.substring(1)}`;return[t,e.colors?.[n]||nF[t]]}))),o=nD();return i.map(t=>o.parse(t[0]).map(n=>{let i,o;n.decorations.has("reverse")?(i=n.background?s.value(n.background):e.bg,o=n.foreground?s.value(n.foreground):e.fg):(i=n.foreground?s.value(n.foreground):e.fg,o=n.background?s.value(n.background):void 0),i=t7(i,r),o=t7(o,r),n.decorations.has("dim")&&(i=nO(i));let a=T.None;return n.decorations.has("bold")&&(a|=T.Bold),n.decorations.has("italic")&&(a|=T.Italic),n.decorations.has("underline")&&(a|=T.Underline),n.decorations.has("strikethrough")&&(a|=T.Strikethrough),{content:n.value,offset:t[1],color:i,bgColor:o,fontStyle:a}}))}function nO(e){let t=e.match(/#([0-9a-f]{3,8})/i);if(t){let e=t[1];if(8===e.length){let t=Math.round(Number.parseInt(e.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${e.slice(0,6)}${t}`}if(6===e.length)return`#${e}80`;if(4===e.length){let t=e[0],n=e[1],r=e[2],i=e[3],s=Math.round(Number.parseInt(`${i}${i}`,16)/2).toString(16).padStart(2,"0");return`#${t}${t}${n}${n}${r}${r}${s}`}else if(3===e.length){let t=e[0],n=e[1],r=e[2];return`#${t}${t}${n}${n}${r}${r}80`}}let n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function nz(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(nn(i)||ni(r))return na(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:s,colorMap:o}=e.setTheme(r);if("ansi"===i)return nP(s,t,n);let l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new a(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new a(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return n$(t,l,s,o,n)}function nB(...e){if(2===e.length)return ny(e[1]);let[t,n,r={}]=e,{lang:i="text",theme:s=t.getLoadedThemes()[0]}=r;if(nn(i)||ni(s))throw new a("Plain language does not have grammar state");if("ansi"===i)throw new a("ANSI language does not have grammar state");let{theme:o,colorMap:l}=t.setTheme(s),h=t.getLanguage(i);return new nb(nj(n,h,o,l,r).stateStack,h.name,o.name)}function n$(e,t,n,r,i){let s=nj(e,t,n,r,i),o=new nb(s.stateStack,t.name,n.name);return n_(s.tokens,o),s.tokens}function nj(e,t,n,r,i){let s=t9(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:a=500}=i,l=na(e),h=i.grammarState?nw(i.grammarState,n.name)??eV:null!=i.grammarContextCode?nj(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:eV,c=[],u=[];for(let e=0,d=l.length;e<d;e++){let d,p,[f,m]=l[e];if(""===f){c=[],u.push([]);continue}if(o>0&&f.length>=o){c=[],u.push([{content:f,offset:m,color:"",fontStyle:0}]);continue}i.includeExplanation&&(d=t.tokenizeLine(f,h,a).tokens,p=0);let g=t.tokenizeLine2(f,h,a),_=g.tokens.length/2;for(let e=0;e<_;e++){let t=g.tokens[2*e],o=e+1<_?g.tokens[2*e+2]:f.length;if(t===o)continue;let a=g.tokens[2*e+1],l=t7(r[F.getForeground(a)],s),h=F.getFontStyle(a),u={content:f.substring(t,o),offset:m+t,color:l,fontStyle:h};if(i.includeExplanation){let e=[];if("scopeName"!==i.includeExplanation)for(let t of n.settings){let n;switch(typeof t.scope){case"string":n=t.scope.split(/,/).map(e=>e.trim());break;case"object":n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}u.explanation=[];let r=0;for(;t+r<o;){let t=d[p],n=f.substring(t.startIndex,t.endIndex);r+=n.length,u.explanation.push({content:n,scopes:"scopeName"===i.includeExplanation?nq(t.scopes):nH(e,t.scopes)}),p+=1}}c.push(u)}u.push(c),c=[],h=g.ruleStack}return{tokens:u,stateStack:h}}function nq(e){return e.map(e=>({scopeName:e}))}function nH(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:nV(e,i,t.slice(0,r))}}return n}function nU(e,t){return e===t||t.substring(0,e.length)===e&&"."===t[e.length]}function nW(e,t,n){if(!nU(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)nU(e[r],n[i])&&(r-=1),i-=1;return -1===r}function nV(e,t,n){let r=[];for(let{selectors:i,settings:s}of e)for(let e of i)if(nW(e,t,n)){r.push(s);break}return r}function nG(e,t,n){let r=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),i=r.map(r=>{let i=nz(e,t,{...n,theme:r.theme}),s=ny(i);return{tokens:i,state:s,theme:"string"==typeof r.theme?r.theme:r.theme.name}}),s=nJ(...i.map(e=>e.tokens)),o=s[0].map((e,t)=>e.map((e,i)=>{let o={content:e.content,variants:{},offset:e.offset};return"includeExplanation"in n&&n.includeExplanation&&(o.explanation=e.explanation),s.forEach((e,n)=>{let{content:s,explanation:a,offset:l,...h}=e[t][i];o.variants[r[n].color]=h}),o})),a=i[0].state?new nb(Object.fromEntries(i.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),i[0].state.lang):void 0;return a&&n_(o,a),o}function nJ(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),s=t.map(()=>[]);t.forEach((e,t)=>e.push(s[t]));let o=i.map(()=>0),a=i.map(e=>e[0]);for(;a.every(e=>e);){let e=Math.min(...a.map(e=>e.content.length));for(let t=0;t<n;t++){let n=a[t];n.content.length===e?(s[t].push(n),o[t]+=1,a[t]=i[t][o[t]]):(s[t].push({...n,content:n.content.slice(0,e)}),a[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}function nK(e,t,n){let r,i,s,o,l,h;if("themes"in n){let{defaultColor:c="light",cssVariablePrefix:u="--shiki-",colorsRendering:d="css-vars"}=n,p=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})).sort((e,t)=>e.color===c?-1:+(t.color===c));if(0===p.length)throw new a("`themes` option must not be empty");let f=nG(e,t,n);if(h=ny(f),c&&nh!==c&&!p.find(e=>e.color===c))throw new a(`\`themes\` option must contain the defaultColor key \`${c}\``);let m=p.map(t=>e.getTheme(t.theme)),g=p.map(e=>e.color);s=f.map(e=>e.map(e=>np(e,g,u,c,d))),h&&n_(s,h);let _=p.map(e=>t9(e.theme,n));i=nZ(p,m,_,u,c,"fg",d),r=nZ(p,m,_,u,c,"bg",d),o=`shiki-themes ${m.map(e=>e.name).join(" ")}`,l=c?void 0:[i,r].join(";")}else if("theme"in n){let a=t9(n.theme,n);s=nz(e,t,n);let l=e.getTheme(n.theme);r=t7(l.bg,a),i=t7(l.fg,a),o=l.name,h=ny(s)}else throw new a("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:i,bg:r,themeName:o,rootStyle:l,grammarState:h}}function nZ(e,t,n,r,i,s,o){return e.map((l,h)=>{let c=t7(t[h][s],n[h])||"inherit",u=`${r+l.color}${"bg"===s?"-bg":""}:${c}`;if(0===h&&i){if(i===nh&&e.length>1){let r=e.findIndex(e=>"light"===e.color),i=e.findIndex(e=>"dark"===e.color);if(-1===r||-1===i)throw new a('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');let o=t7(t[r][s],n[r])||"inherit",l=t7(t[i][s],n[i])||"inherit";return`light-dark(${o}, ${l});${u}`}return c}return"css-vars"===o?u:null}).filter(e=>!!e).join(";")}function nX(e,t,n,r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)}){let i=t;for(let e of nS(n))i=e.preprocess?.call(r,i,n)||i;let{tokens:s,fg:o,bg:a,themeName:l,rootStyle:h,grammarState:c}=nK(e,i,n),{mergeWhitespaces:u=!0,mergeSameStyleTokens:d=!1}=n;!0===u?s=nY(s):"never"===u&&(s=n0(s)),d&&(s=n1(s));let p={...r,get source(){return i}};for(let e of nS(n))s=e.tokens?.call(p,s)||s;return nQ(s,{...n,fg:o,bg:a,themeName:l,rootStyle:!1!==n.rootStyle&&(n.rootStyle??h)},p,c)}function nQ(e,t,n,r=ny(e)){let i=nS(t),s=[],o={type:"root",children:[]},{structure:a="classic",tabindex:l="0"}=t,h={class:`shiki ${t.themeName||""}`};for(let[e,n]of(!1!==t.rootStyle&&(null!=t.rootStyle?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),!1!==l&&null!=l&&(h.tabindex=l.toString()),Object.entries(t.meta||{})))e.startsWith("_")||(h[e]=n);let c={type:"element",tagName:"pre",properties:h,children:[],data:t.data},u={type:"element",tagName:"code",properties:{},children:s},d=[],p={...n,structure:a,addClassToHast:no,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return o},get pre(){return c},get code(){return u},get lines(){return d}};if(e.forEach((e,t)=>{t&&("inline"===a?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):"classic"===a&&s.push({type:"text",value:"\n"}));let n={type:"element",tagName:"span",properties:{class:"line"},children:[]},r=0;for(let s of e){let e={type:"element",tagName:"span",properties:{...s.htmlAttrs},children:[{type:"text",value:s.content}]},l=nm(s.htmlStyle||nf(s));for(let o of(l&&(e.properties.style=l),i))e=o?.span?.call(p,e,t+1,r,n,s)||e;"inline"===a?o.children.push(e):"classic"===a&&n.children.push(e),r+=s.content.length}if("classic"===a){for(let e of i)n=e?.line?.call(p,n,t+1)||n;d.push(n),s.push(n)}else"inline"===a&&d.push(n)}),"classic"===a){for(let e of i)u=e?.code?.call(p,u)||u;for(let e of(c.children.push(u),i))c=e?.pre?.call(p,c)||c;o.children.push(c)}else if("inline"===a){let e=[],t={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(let n of o.children)"element"===n.type&&"br"===n.tagName?(e.push(t),t={type:"element",tagName:"span",properties:{class:"line"},children:[]}):("element"===n.type||"text"===n.type)&&t.children.push(n);e.push(t);let n={type:"element",tagName:"code",properties:{},children:e};for(let e of i)n=e?.code?.call(p,n)||n;o.children=[];for(let e=0;e<n.children.length;e++){e>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});let t=n.children[e];"element"===t.type&&o.children.push(...t.children)}}let f=o;for(let e of i)f=e?.root?.call(p,f)||f;return r&&n_(f,r),f}function nY(e){return e.map(e=>{let t,n=[],r="";return e.forEach((i,s)=>{let o=!(i.fontStyle&&(i.fontStyle&T.Underline||i.fontStyle&T.Strikethrough));o&&i.content.match(/^\s+$/)&&e[s+1]?(void 0===t&&(t=i.offset),r+=i.content):r?(o?n.push({...i,offset:t,content:r+i.content}):n.push({content:r,offset:t},i),t=void 0,r=""):n.push(i)}),n})}function n0(e){return e.map(e=>e.flatMap(e=>{if(e.content.match(/^\s+$/))return e;let t=e.content.match(/^(\s*)(.*?)(\s*)$/);if(!t)return e;let[,n,r,i]=t;if(!n&&!i)return e;let s=[{...e,offset:e.offset+n.length,content:r}];return n&&s.unshift({content:n,offset:e.offset}),i&&s.push({content:i,offset:e.offset+n.length+r.length}),s}))}function n1(e){return e.map(e=>{let t=[];for(let n of e){if(0===t.length){t.push({...n});continue}let e=t[t.length-1],r=nm(e.htmlStyle||nf(e)),i=nm(n.htmlStyle||nf(n)),s=e.fontStyle&&(e.fontStyle&T.Underline||e.fontStyle&T.Strikethrough),o=n.fontStyle&&(n.fontStyle&T.Underline||n.fontStyle&T.Strikethrough);s||o||r!==i?t.push({...n}):e.content+=n.content}return t})}let n2=t4;function n3(e,t,n){let r={meta:{},options:n,codeToHast:(t,n)=>nX(e,t,n),codeToTokens:(t,n)=>nK(e,t,n)},i=n2(nX(e,t,n,r));for(let e of nS(n))i=e.postprocess?.call(r,i,n)||i;return i}let n5="#333333",n4="#bbbbbb",n6="#fffffe",n8="#1e1e1e",n9="__shiki_resolved";function n7(e){if(e?.[n9])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r="light"===t.type?n5:n4),n||(n="light"===t.type?n6:n8),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,s=new Map;function o(e){if(s.has(e))return s.get(e);i+=1;let n=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(s.set(e,n),n)}for(let e of(t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith("#"),r=e.settings?.background&&!e.settings.background.startsWith("#");if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i}),Object.keys(t.colors||{})))if(("editor.foreground"===e||"editor.background"===e||e.startsWith("terminal.ansi"))&&!t.colors[e]?.startsWith("#")){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,n9,{enumerable:!1,writable:!1,value:!0}),t}async function re(e){return Array.from(new Set((await Promise.all(e.filter(e=>!nr(e)).map(async e=>await nt(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rt(e){return(await Promise.all(e.map(async e=>ns(e)?null:n7(await nt(e))))).filter(e=>!!e)}let rn=3,rr=!1;function ri(e,t=3){if(rn&&("number"!=typeof rn||!(t>rn)))if(rr)throw Error(`[SHIKI DEPRECATE]: ${e}`);else console.trace(`[SHIKI DEPRECATE]: ${e}`)}class rs extends Error{constructor(e){super(e),this.name="ShikiError"}}function ro(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new rs(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class ra extends eW{constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(e){return"string"==typeof e?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=n7(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=v.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=ro(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>{if(!t)return!1;let r=t.embeddedLanguages||t.embeddedLangs;return r?.some(e=>n.map(([e])=>e).includes(e))}).filter(e=>!n.includes(e));throw new rs(`Missing languages ${n.map(([e])=>`\`${e}\``).join(", ")}, required by ${e.map(([e])=>`\`${e}\``).join(", ")}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}}class rl{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split("."),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(".");n=[...n,...this._injections.get(r)||[]]}return n}}let rh=0;function rc(e){let t;rh+=1,!1!==e.warnings&&rh>=10&&rh%10==0&&console.warn(`[Shiki] ${rh} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let n=!1;if(!e.engine)throw new rs("`engine` option is required for synchronous mode");let r=(e.langs||[]).flat(1),i=(e.themes||[]).flat(1).map(n7),s=new ra(new rl(e.engine,r),i,r,e.langAlias);function o(e){if("none"===e)return{bg:"",fg:"",name:"none",settings:[],type:"dark"};h();let t=s.getTheme(e);if(!t)throw new rs(`Theme \`${e}\` not found, you may need to load it first`);return t}function a(...e){h(),s.loadLanguages(e.flat(1))}function l(...e){for(let t of(h(),e.flat(1)))s.loadTheme(t)}function h(){if(n)throw new rs("Shiki instance has been disposed")}function c(){n||(n=!0,s.dispose(),rh-=1)}return{setTheme:function(e){h();let n=o(e);return t!==e&&(s.setTheme(n),t=e),{theme:n,colorMap:s.getColorMap()}},getTheme:o,getLanguage:function(e){h();let t=s.getGrammar("string"==typeof e?e:e.name);if(!t)throw new rs(`Language \`${e}\` not found, you may need to load it first`);return t},getLoadedThemes:function(){return h(),s.getLoadedThemes()},getLoadedLanguages:function(){return h(),s.getLoadedLanguages()},resolveLangAlias:function(t){return ro(t,e.langAlias)},loadLanguage:async function(...e){return a(await re(e))},loadLanguageSync:a,loadTheme:async function(...e){return h(),l(await rt(e))},loadThemeSync:l,dispose:c,[Symbol.dispose]:c}}async function ru(e){e.engine||ri("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rt(e.themes||[]),re(e.langs||[]),e.engine]);return rc({...e,themes:t,langs:n,engine:r})}async function rd(e){let t=await ru(e);return{getLastGrammarState:(...e)=>nB(t,...e),codeToTokensBase:(e,n)=>nz(t,e,n),codeToTokensWithThemes:(e,n)=>nG(t,e,n),codeToTokens:(e,n)=>nK(t,e,n),codeToHast:(e,n)=>nX(t,e,n),codeToHtml:(e,n)=>n3(t,e,n),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function rp(e){let t=e.langs,n=e.themes,r=e.engine;return async function(e){function i(n){if("string"==typeof n){if(nr(n=e.langAlias?.[n]||n))return[];let r=t[n];if(!r)throw new a(`Language \`${n}\` is not included in this bundle. You may want to load it from external source.`);return r}return n}function s(e){if(ns(e))return"none";if("string"==typeof e){let t=n[e];if(!t)throw new a(`Theme \`${e}\` is not included in this bundle. You may want to load it from external source.`);return t}return e}let o=(e.themes??[]).map(e=>s(e)),l=(e.langs??[]).map(e=>i(e)),h=await rd({engine:e.engine??r(),...e,themes:o,langs:l});return{...h,loadLanguage:(...e)=>h.loadLanguage(...e.map(i)),loadTheme:(...e)=>h.loadTheme(...e.map(s)),getBundledLanguages:()=>t,getBundledThemes:()=>n}}}let rf=[{id:"abap",name:"ABAP",import:()=>n.e(8773).then(n.bind(n,48773))},{id:"actionscript-3",name:"ActionScript",import:()=>n.e(36).then(n.bind(n,10036))},{id:"ada",name:"Ada",import:()=>n.e(5575).then(n.bind(n,55575))},{id:"angular-html",name:"Angular HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3175)]).then(n.bind(n,23175))},{id:"angular-ts",name:"Angular TypeScript",import:()=>Promise.all([n.e(2577),n.e(1630),n.e(3782),n.e(3476),n.e(3111),n.e(3186)]).then(n.bind(n,76359))},{id:"apache",name:"Apache Conf",import:()=>n.e(2765).then(n.bind(n,52765))},{id:"apex",name:"Apex",import:()=>n.e(7455).then(n.bind(n,27455))},{id:"apl",name:"APL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(4174)]).then(n.bind(n,54174))},{id:"applescript",name:"AppleScript",import:()=>n.e(9178).then(n.bind(n,19178))},{id:"ara",name:"Ara",import:()=>n.e(3313).then(n.bind(n,93313))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:()=>n.e(8318).then(n.bind(n,98318))},{id:"asm",name:"Assembly",import:()=>n.e(7846).then(n.bind(n,87846))},{id:"astro",name:"Astro",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(3782),n.e(6686)]).then(n.bind(n,36686))},{id:"awk",name:"AWK",import:()=>n.e(4900).then(n.bind(n,54900))},{id:"ballerina",name:"Ballerina",import:()=>n.e(2747).then(n.bind(n,92747))},{id:"bat",name:"Batch File",aliases:["batch"],import:()=>n.e(3290).then(n.bind(n,73290))},{id:"beancount",name:"Beancount",import:()=>n.e(8496).then(n.bind(n,98496))},{id:"berry",name:"Berry",aliases:["be"],import:()=>n.e(5331).then(n.bind(n,95331))},{id:"bibtex",name:"BibTeX",import:()=>n.e(5937).then(n.bind(n,25937))},{id:"bicep",name:"Bicep",import:()=>n.e(8406).then(n.bind(n,68406))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:()=>n.e(1410).then(n.bind(n,71410))},{id:"blade",name:"Blade",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(5005)]).then(n.bind(n,25005))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:()=>n.e(4608).then(n.bind(n,4608))},{id:"c",name:"C",import:()=>n.e(8192).then(n.bind(n,88192))},{id:"c3",name:"C3",import:()=>n.e(7113).then(n.bind(n,7113))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:()=>n.e(4242).then(n.bind(n,64242))},{id:"cairo",name:"Cairo",import:()=>Promise.all([n.e(893),n.e(4367)]).then(n.bind(n,84367))},{id:"clarity",name:"Clarity",import:()=>n.e(5183).then(n.bind(n,15183))},{id:"clojure",name:"Clojure",aliases:["clj"],import:()=>n.e(6959).then(n.bind(n,66959))},{id:"cmake",name:"CMake",import:()=>n.e(5482).then(n.bind(n,55482))},{id:"cobol",name:"COBOL",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(5498)]).then(n.bind(n,15498))},{id:"codeowners",name:"CODEOWNERS",import:()=>n.e(1188).then(n.bind(n,21188))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:()=>n.e(2403).then(n.bind(n,22403))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:()=>Promise.all([n.e(2577),n.e(6647)]).then(n.bind(n,76647))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:()=>n.e(3787).then(n.bind(n,93787))},{id:"coq",name:"Coq",import:()=>n.e(5920).then(n.bind(n,55920))},{id:"cpp",name:"C++",aliases:["c++"],import:()=>Promise.all([n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(6110)]).then(n.bind(n,27816))},{id:"crystal",name:"Crystal",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(8192),n.e(7152),n.e(1413)]).then(n.bind(n,21413))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:()=>n.e(9261).then(n.bind(n,71642))},{id:"css",name:"CSS",import:()=>n.e(3782).then(n.bind(n,63782))},{id:"csv",name:"CSV",import:()=>n.e(6331).then(n.bind(n,66331))},{id:"cue",name:"CUE",import:()=>n.e(5338).then(n.bind(n,45338))},{id:"cypher",name:"Cypher",aliases:["cql"],import:()=>n.e(4350).then(n.bind(n,14350))},{id:"d",name:"D",import:()=>n.e(9015).then(n.bind(n,59015))},{id:"dart",name:"Dart",import:()=>n.e(3288).then(n.bind(n,3288))},{id:"dax",name:"DAX",import:()=>n.e(1932).then(n.bind(n,21932))},{id:"desktop",name:"Desktop",import:()=>n.e(7819).then(n.bind(n,7819))},{id:"diff",name:"Diff",import:()=>n.e(2614).then(n.bind(n,62614))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:()=>n.e(2783).then(n.bind(n,52783))},{id:"dotenv",name:"dotEnv",import:()=>n.e(4829).then(n.bind(n,44829))},{id:"dream-maker",name:"Dream Maker",import:()=>n.e(425).then(n.bind(n,32806))},{id:"edge",name:"Edge",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(7844)]).then(n.bind(n,67844))},{id:"elixir",name:"Elixir",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(698)]).then(n.bind(n,20698))},{id:"elm",name:"Elm",import:()=>Promise.all([n.e(8192),n.e(4583)]).then(n.bind(n,84583))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:()=>n.e(3879).then(n.bind(n,62965))},{id:"erb",name:"ERB",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848),n.e(1198)]).then(n.bind(n,91198))},{id:"erlang",name:"Erlang",aliases:["erl"],import:()=>Promise.all([n.e(3304),n.e(4678)]).then(n.bind(n,64678))},{id:"fennel",name:"Fennel",import:()=>n.e(2964).then(n.bind(n,60583))},{id:"fish",name:"Fish",import:()=>n.e(2349).then(n.bind(n,52349))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:()=>n.e(6293).then(n.bind(n,26293))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:()=>Promise.all([n.e(4823),n.e(5061)]).then(n.bind(n,85061))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:()=>n.e(4823).then(n.bind(n,94823))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:()=>Promise.all([n.e(3304),n.e(2501)]).then(n.bind(n,52501))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:()=>n.e(8670).then(n.bind(n,98670))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:()=>n.e(4223).then(n.bind(n,34223))},{id:"gdshader",name:"GDShader",import:()=>n.e(7977).then(n.bind(n,67977))},{id:"genie",name:"Genie",import:()=>n.e(2031).then(n.bind(n,42031))},{id:"gherkin",name:"Gherkin",import:()=>n.e(8457).then(n.bind(n,88457))},{id:"git-commit",name:"Git Commit Message",import:()=>n.e(2041).then(n.bind(n,92041))},{id:"git-rebase",name:"Git Rebase Message",import:()=>Promise.all([n.e(7152),n.e(3194)]).then(n.bind(n,33194))},{id:"gleam",name:"Gleam",import:()=>n.e(2895).then(n.bind(n,62895))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(640)]).then(n.bind(n,30640))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(9186)]).then(n.bind(n,59186))},{id:"glsl",name:"GLSL",import:()=>Promise.all([n.e(8192),n.e(6887)]).then(n.bind(n,6887))},{id:"gn",name:"GN",import:()=>n.e(9448).then(n.bind(n,99448))},{id:"gnuplot",name:"Gnuplot",import:()=>n.e(9690).then(n.bind(n,79690))},{id:"go",name:"Go",import:()=>n.e(4553).then(n.bind(n,64553))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(1248)]).then(n.bind(n,41248))},{id:"groovy",name:"Groovy",import:()=>n.e(9189).then(n.bind(n,39189))},{id:"hack",name:"Hack",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2503),n.e(400)]).then(n.bind(n,70400))},{id:"haml",name:"Ruby Haml",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3437)]).then(n.bind(n,63437))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2735)]).then(n.bind(n,12735))},{id:"haskell",name:"Haskell",aliases:["hs"],import:()=>n.e(1335).then(n.bind(n,21335))},{id:"haxe",name:"Haxe",import:()=>n.e(1215).then(n.bind(n,11215))},{id:"hcl",name:"HashiCorp HCL",import:()=>n.e(2374).then(n.bind(n,82374))},{id:"hjson",name:"Hjson",import:()=>n.e(9421).then(n.bind(n,79421))},{id:"hlsl",name:"HLSL",import:()=>n.e(10).then(n.bind(n,80010))},{id:"html",name:"HTML",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476)]).then(n.bind(n,43476))},{id:"html-derivative",name:"HTML (Derivative)",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(1656)]).then(n.bind(n,51656))},{id:"http",name:"HTTP",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(7152),n.e(1248),n.e(8243)]).then(n.bind(n,98243))},{id:"hurl",name:"Hurl",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6931),n.e(1248),n.e(816)]).then(n.bind(n,20816))},{id:"hxml",name:"HXML",import:()=>n.e(376).then(n.bind(n,50376))},{id:"hy",name:"Hy",import:()=>n.e(6938).then(n.bind(n,26938))},{id:"imba",name:"Imba",import:()=>n.e(794).then(n.bind(n,30794))},{id:"ini",name:"INI",aliases:["properties"],import:()=>n.e(4309).then(n.bind(n,34309))},{id:"java",name:"Java",import:()=>n.e(6931).then(n.bind(n,76931))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:()=>n.e(2577).then(n.bind(n,52970))},{id:"jinja",name:"Jinja",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3392)]).then(n.bind(n,43392))},{id:"jison",name:"Jison",import:()=>Promise.all([n.e(2577),n.e(6402)]).then(n.bind(n,36402))},{id:"json",name:"JSON",import:()=>n.e(4053).then(n.bind(n,4053))},{id:"json5",name:"JSON5",import:()=>n.e(3860).then(n.bind(n,63860))},{id:"jsonc",name:"JSON with Comments",import:()=>n.e(4650).then(n.bind(n,4650))},{id:"jsonl",name:"JSON Lines",import:()=>n.e(1453).then(n.bind(n,91453))},{id:"jsonnet",name:"Jsonnet",import:()=>n.e(8132).then(n.bind(n,8132))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:()=>n.e(4634).then(n.bind(n,24634))},{id:"jsx",name:"JSX",import:()=>n.e(9312).then(n.bind(n,29228))},{id:"julia",name:"Julia",aliases:["jl"],import:()=>Promise.all([n.e(2577),n.e(6666),n.e(8835),n.e(2503),n.e(8192),n.e(893),n.e(6339)]).then(n.bind(n,85816))},{id:"just",name:"Just",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(968),n.e(8977)]).then(n.bind(n,18977))},{id:"kdl",name:"KDL",import:()=>n.e(5968).then(n.bind(n,95968))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:()=>n.e(6572).then(n.bind(n,26572))},{id:"kusto",name:"Kusto",aliases:["kql"],import:()=>n.e(583).then(n.bind(n,50583))},{id:"latex",name:"LaTeX",import:()=>n.e(2839).then(n.bind(n,72839))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:()=>n.e(7227).then(n.bind(n,77227))},{id:"less",name:"Less",import:()=>n.e(1280).then(n.bind(n,11280))},{id:"liquid",name:"Liquid",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5347)]).then(n.bind(n,25347))},{id:"llvm",name:"LLVM IR",import:()=>n.e(9220).then(n.bind(n,19220))},{id:"log",name:"Log file",import:()=>n.e(6741).then(n.bind(n,16741))},{id:"logo",name:"Logo",import:()=>n.e(5670).then(n.bind(n,25670))},{id:"lua",name:"Lua",import:()=>Promise.all([n.e(8192),n.e(3873)]).then(n.bind(n,33873))},{id:"luau",name:"Luau",import:()=>n.e(3072).then(n.bind(n,33072))},{id:"make",name:"Makefile",aliases:["makefile"],import:()=>n.e(541).then(n.bind(n,30541))},{id:"markdown",name:"Markdown",aliases:["md"],import:()=>n.e(3304).then(n.bind(n,13304))},{id:"marko",name:"Marko",import:()=>Promise.all([n.e(535),n.e(3782),n.e(3111),n.e(1280),n.e(5645)]).then(n.bind(n,65645))},{id:"matlab",name:"MATLAB",import:()=>n.e(1184).then(n.bind(n,31184))},{id:"mdc",name:"MDC",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(3304),n.e(6729)]).then(n.bind(n,86729))},{id:"mdx",name:"MDX",import:()=>n.e(5690).then(n.bind(n,55690))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:()=>n.e(9842).then(n.bind(n,29842))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:()=>n.e(1501).then(n.bind(n,11501))},{id:"mojo",name:"Mojo",import:()=>n.e(194).then(n.bind(n,50194))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:()=>n.e(4567).then(n.bind(n,24567))},{id:"move",name:"Move",import:()=>n.e(4540).then(n.bind(n,24540))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:()=>n.e(6455).then(n.bind(n,36455))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:()=>n.e(5320).then(n.bind(n,35320))},{id:"nextflow-groovy",name:"nextflow-groovy",import:()=>n.e(3633).then(n.bind(n,53633))},{id:"nginx",name:"Nginx",import:()=>Promise.all([n.e(8192),n.e(2215)]).then(n.bind(n,2215))},{id:"nim",name:"Nim",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(8192),n.e(3304),n.e(7799)]).then(n.bind(n,7799))},{id:"nix",name:"Nix",import:()=>n.e(6099).then(n.bind(n,86099))},{id:"nushell",name:"nushell",aliases:["nu"],import:()=>n.e(8288).then(n.bind(n,38288))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:()=>n.e(6290).then(n.bind(n,36290))},{id:"objective-cpp",name:"Objective-C++",import:()=>n.e(4763).then(n.bind(n,21946))},{id:"ocaml",name:"OCaml",import:()=>n.e(3419).then(n.bind(n,3419))},{id:"odin",name:"Odin",import:()=>n.e(9547).then(n.bind(n,69547))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:()=>n.e(4474).then(n.bind(n,4474))},{id:"pascal",name:"Pascal",import:()=>n.e(6948).then(n.bind(n,46948))},{id:"perl",name:"Perl",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(968),n.e(7040)]).then(n.bind(n,30968))},{id:"php",name:"PHP",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(6155),n.e(4659)]).then(n.bind(n,86155))},{id:"pkl",name:"Pkl",import:()=>n.e(6166).then(n.bind(n,96166))},{id:"plsql",name:"PL/SQL",import:()=>n.e(8947).then(n.bind(n,48947))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:()=>n.e(3324).then(n.bind(n,43324))},{id:"polar",name:"Polar",import:()=>n.e(3095).then(n.bind(n,93095))},{id:"postcss",name:"PostCSS",import:()=>n.e(9240).then(n.bind(n,19240))},{id:"powerquery",name:"PowerQuery",import:()=>n.e(9294).then(n.bind(n,19294))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:()=>n.e(7636).then(n.bind(n,7636))},{id:"prisma",name:"Prisma",import:()=>n.e(2708).then(n.bind(n,40327))},{id:"prolog",name:"Prolog",import:()=>n.e(34).then(n.bind(n,80034))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:()=>n.e(8545).then(n.bind(n,58545))},{id:"pug",name:"Pug",aliases:["jade"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(5755)]).then(n.bind(n,55755))},{id:"puppet",name:"Puppet",import:()=>n.e(9569).then(n.bind(n,19569))},{id:"purescript",name:"PureScript",import:()=>n.e(6580).then(n.bind(n,36580))},{id:"python",name:"Python",aliases:["py"],import:()=>n.e(893).then(n.bind(n,40893))},{id:"qml",name:"QML",import:()=>Promise.all([n.e(2577),n.e(3077)]).then(n.bind(n,73077))},{id:"qmldir",name:"QML Directory",import:()=>n.e(6144).then(n.bind(n,46144))},{id:"qss",name:"Qt Style Sheets",import:()=>n.e(5712).then(n.bind(n,55712))},{id:"r",name:"R",import:()=>n.e(5025).then(n.bind(n,25025))},{id:"racket",name:"Racket",import:()=>n.e(3229).then(n.bind(n,3229))},{id:"raku",name:"Raku",aliases:["perl6"],import:()=>n.e(252).then(n.bind(n,30252))},{id:"razor",name:"ASP.NET Razor",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(9261),n.e(4903)]).then(n.bind(n,84903))},{id:"reg",name:"Windows Registry Script",import:()=>n.e(5997).then(n.bind(n,85997))},{id:"regexp",name:"RegExp",aliases:["regex"],import:()=>n.e(6412).then(n.bind(n,86412))},{id:"rel",name:"Rel",import:()=>n.e(2062).then(n.bind(n,62062))},{id:"riscv",name:"RISC-V",import:()=>n.e(2710).then(n.bind(n,52710))},{id:"ron",name:"RON",import:()=>n.e(862).then(n.bind(n,80862))},{id:"rosmsg",name:"ROS Interface",import:()=>n.e(5728).then(n.bind(n,95728))},{id:"rst",name:"reStructuredText",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(123)]).then(n.bind(n,52504))},{id:"ruby",name:"Ruby",aliases:["rb"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(8848)]).then(n.bind(n,72331))},{id:"rust",name:"Rust",aliases:["rs"],import:()=>n.e(1161).then(n.bind(n,61161))},{id:"sas",name:"SAS",import:()=>Promise.all([n.e(2503),n.e(6360)]).then(n.bind(n,66360))},{id:"sass",name:"Sass",import:()=>n.e(8113).then(n.bind(n,88113))},{id:"scala",name:"Scala",import:()=>n.e(9377).then(n.bind(n,89377))},{id:"scheme",name:"Scheme",import:()=>n.e(7142).then(n.bind(n,97142))},{id:"scss",name:"SCSS",import:()=>Promise.all([n.e(3782),n.e(3111)]).then(n.bind(n,43111))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:()=>n.e(9648).then(n.bind(n,59648))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:()=>n.e(1379).then(n.bind(n,1379))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:()=>n.e(7152).then(n.bind(n,57152))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:()=>Promise.all([n.e(7152),n.e(8257)]).then(n.bind(n,8257))},{id:"smalltalk",name:"Smalltalk",import:()=>n.e(1556).then(n.bind(n,61556))},{id:"solidity",name:"Solidity",import:()=>n.e(8704).then(n.bind(n,38704))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:()=>Promise.all([n.e(2577),n.e(3782),n.e(3476),n.e(2728)]).then(n.bind(n,72728))},{id:"sparql",name:"SPARQL",import:()=>n.e(8432).then(n.bind(n,68432))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:()=>n.e(7610).then(n.bind(n,47610))},{id:"sql",name:"SQL",import:()=>n.e(2503).then(n.bind(n,2503))},{id:"ssh-config",name:"SSH Config",import:()=>n.e(6046).then(n.bind(n,16046))},{id:"stata",name:"Stata",import:()=>Promise.all([n.e(2503),n.e(4080)]).then(n.bind(n,64080))},{id:"stylus",name:"Stylus",aliases:["styl"],import:()=>n.e(7557).then(n.bind(n,97557))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:()=>Promise.all([n.e(2577),n.e(830)]).then(n.bind(n,30830))},{id:"svelte",name:"Svelte",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(1142)]).then(n.bind(n,81142))},{id:"swift",name:"Swift",import:()=>n.e(5922).then(n.bind(n,35922))},{id:"system-verilog",name:"SystemVerilog",import:()=>n.e(3274).then(n.bind(n,90893))},{id:"systemd",name:"Systemd Units",import:()=>n.e(9006).then(n.bind(n,9006))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:()=>n.e(1078).then(n.bind(n,21078))},{id:"tasl",name:"Tasl",import:()=>n.e(4963).then(n.bind(n,94963))},{id:"tcl",name:"Tcl",import:()=>n.e(1274).then(n.bind(n,41274))},{id:"templ",name:"Templ",import:()=>Promise.all([n.e(2577),n.e(3782),n.e(4553),n.e(1977)]).then(n.bind(n,81977))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:()=>n.e(3483).then(n.bind(n,43483))},{id:"tex",name:"TeX",import:()=>n.e(1456).then(n.bind(n,11456))},{id:"toml",name:"TOML",import:()=>n.e(4163).then(n.bind(n,84163))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(4357)]).then(n.bind(n,74357))},{id:"tsv",name:"TSV",import:()=>n.e(840).then(n.bind(n,30840))},{id:"tsx",name:"TSX",import:()=>n.e(6814).then(n.bind(n,33710))},{id:"turtle",name:"Turtle",import:()=>n.e(1365).then(n.bind(n,41365))},{id:"twig",name:"Twig",import:()=>Promise.all([n.e(2577),n.e(535),n.e(6814),n.e(9312),n.e(6666),n.e(8835),n.e(3782),n.e(3476),n.e(6931),n.e(2503),n.e(8192),n.e(7152),n.e(1248),n.e(893),n.e(8848),n.e(3111),n.e(6155),n.e(6588)]).then(n.bind(n,96588))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:()=>n.e(535).then(n.bind(n,5346))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:()=>n.e(9466).then(n.bind(n,19466))},{id:"typst",name:"Typst",aliases:["typ"],import:()=>n.e(2013).then(n.bind(n,62013))},{id:"v",name:"V",import:()=>n.e(7525).then(n.bind(n,7525))},{id:"vala",name:"Vala",import:()=>n.e(9565).then(n.bind(n,59565))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:()=>n.e(2179).then(n.bind(n,62179))},{id:"verilog",name:"Verilog",import:()=>n.e(7182).then(n.bind(n,34801))},{id:"vhdl",name:"VHDL",import:()=>n.e(7425).then(n.bind(n,37425))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:()=>n.e(4539).then(n.bind(n,14539))},{id:"vue",name:"Vue",import:()=>Promise.all([n.e(2577),n.e(535),n.e(3782),n.e(3476),n.e(5553)]).then(n.bind(n,45553))},{id:"vue-html",name:"Vue HTML",import:()=>Promise.all([n.e(2577),n.e(7021)]).then(n.bind(n,17021))},{id:"vue-vine",name:"Vue Vine",import:()=>Promise.all([n.e(2577),n.e(1290),n.e(3782),n.e(3111),n.e(1280),n.e(2160)]).then(n.bind(n,98110))},{id:"vyper",name:"Vyper",aliases:["vy"],import:()=>n.e(1219).then(n.bind(n,21219))},{id:"wasm",name:"WebAssembly",import:()=>n.e(4275).then(n.bind(n,84275))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:()=>n.e(5269).then(n.bind(n,65269))},{id:"wgsl",name:"WGSL",import:()=>n.e(4976).then(n.bind(n,44976))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:()=>n.e(4370).then(n.bind(n,44370))},{id:"wit",name:"WebAssembly Interface Types",import:()=>n.e(624).then(n.bind(n,58243))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:()=>n.e(7442).then(n.bind(n,6987))},{id:"xml",name:"XML",import:()=>Promise.all([n.e(6931),n.e(2278)]).then(n.bind(n,77040))},{id:"xsl",name:"XSL",import:()=>Promise.all([n.e(6931),n.e(3942)]).then(n.bind(n,3942))},{id:"yaml",name:"YAML",aliases:["yml"],import:()=>n.e(5518).then(n.bind(n,95518))},{id:"zenscript",name:"ZenScript",import:()=>n.e(2485).then(n.bind(n,92485))},{id:"zig",name:"Zig",import:()=>n.e(7041).then(n.bind(n,57041))}],rm=Object.fromEntries(rf.map(e=>[e.id,e.import])),rg=Object.fromEntries(rf.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),r_={...rm,...rg},ry=Object.fromEntries([{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:()=>n.e(2812).then(n.bind(n,62812))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:()=>n.e(7635).then(n.bind(n,27635))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:()=>n.e(7884).then(n.bind(n,77884))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:()=>n.e(4358).then(n.bind(n,94358))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:()=>n.e(9005).then(n.bind(n,19005))},{id:"catppuccin-frappe",displayName:"Catppuccin Frapp\xe9",type:"dark",import:()=>n.e(1595).then(n.bind(n,51595))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:()=>n.e(3979).then(n.bind(n,83979))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:()=>n.e(9680).then(n.bind(n,59680))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:()=>n.e(2107).then(n.bind(n,2107))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:()=>n.e(5375).then(n.bind(n,75375))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:()=>n.e(5136).then(n.bind(n,55136))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:()=>n.e(4295).then(n.bind(n,4295))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:()=>n.e(7258).then(n.bind(n,87258))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:()=>n.e(9996).then(n.bind(n,49996))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:()=>n.e(9224).then(n.bind(n,39224))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:()=>n.e(6704).then(n.bind(n,86704))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:()=>n.e(6927).then(n.bind(n,96927))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:()=>n.e(5424).then(n.bind(n,15424))},{id:"github-light",displayName:"GitHub Light",type:"light",import:()=>n.e(3082).then(n.bind(n,23082))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:()=>n.e(9382).then(n.bind(n,69382))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:()=>n.e(2130).then(n.bind(n,32130))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:()=>n.e(9666).then(n.bind(n,49666))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:()=>n.e(392).then(n.bind(n,80392))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:()=>n.e(9841).then(n.bind(n,49841))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:()=>n.e(3492).then(n.bind(n,53492))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:()=>n.e(214).then(n.bind(n,214))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:()=>n.e(579).then(n.bind(n,60579))},{id:"horizon",displayName:"Horizon",type:"dark",import:()=>n.e(6311).then(n.bind(n,96311))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:()=>n.e(3526).then(n.bind(n,23526))},{id:"houston",displayName:"Houston",type:"dark",import:()=>n.e(7524).then(n.bind(n,7524))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:()=>n.e(6563).then(n.bind(n,56563))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:()=>n.e(6701).then(n.bind(n,26701))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:()=>n.e(7785).then(n.bind(n,97785))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:()=>n.e(9136).then(n.bind(n,19136))},{id:"light-plus",displayName:"Light Plus",type:"light",import:()=>n.e(2489).then(n.bind(n,82489))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:()=>n.e(1247).then(n.bind(n,21247))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:()=>n.e(6859).then(n.bind(n,76859))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:()=>n.e(7921).then(n.bind(n,67921))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:()=>n.e(6846).then(n.bind(n,96846))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:()=>n.e(3074).then(n.bind(n,83074))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:()=>n.e(9521).then(n.bind(n,89521))},{id:"min-light",displayName:"Min Light",type:"light",import:()=>n.e(6089).then(n.bind(n,6089))},{id:"monokai",displayName:"Monokai",type:"dark",import:()=>n.e(5520).then(n.bind(n,15520))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:()=>n.e(4969).then(n.bind(n,44969))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:()=>n.e(2954).then(n.bind(n,92954))},{id:"nord",displayName:"Nord",type:"dark",import:()=>n.e(5491).then(n.bind(n,5491))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:()=>n.e(9615).then(n.bind(n,9615))},{id:"one-light",displayName:"One Light",type:"light",import:()=>n.e(7625).then(n.bind(n,67625))},{id:"plastic",displayName:"Plastic",type:"dark",import:()=>n.e(1534).then(n.bind(n,21534))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:()=>n.e(8430).then(n.bind(n,28430))},{id:"red",displayName:"Red",type:"dark",import:()=>n.e(8555).then(n.bind(n,48555))},{id:"rose-pine",displayName:"Ros\xe9 Pine",type:"dark",import:()=>n.e(7082).then(n.bind(n,87082))},{id:"rose-pine-dawn",displayName:"Ros\xe9 Pine Dawn",type:"light",import:()=>n.e(1583).then(n.bind(n,1583))},{id:"rose-pine-moon",displayName:"Ros\xe9 Pine Moon",type:"dark",import:()=>n.e(5750).then(n.bind(n,35750))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:()=>n.e(7465).then(n.bind(n,17465))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:()=>n.e(1898).then(n.bind(n,21898))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:()=>n.e(7130).then(n.bind(n,67130))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:()=>n.e(966).then(n.bind(n,966))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:()=>n.e(1664).then(n.bind(n,31664))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:()=>n.e(3286).then(n.bind(n,83286))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:()=>n.e(4593).then(n.bind(n,94593))},{id:"vesper",displayName:"Vesper",type:"dark",import:()=>n.e(9267).then(n.bind(n,39267))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:()=>n.e(7889).then(n.bind(n,47889))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:()=>n.e(5318).then(n.bind(n,55318))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:()=>n.e(8656).then(n.bind(n,78656))}].map(e=>[e.id,e.import]));var rb=n(49304).Buffer;class rk extends Error{constructor(e){super(e),this.name="ShikiError"}}function rw(){return 0x80000000}function rv(){return"u">typeof performance?performance.now():Date.now()}let rC=(e,t)=>e+(t-e%t)%t;async function rx(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function s(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function a(e){let t=r.HEAPU8.length;e>>>=0;let n=rw();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+0x6000000),o(Math.min(n,rC(Math.max(e,i),65536))))return!0}return!1}let l="u">typeof TextDecoder?new TextDecoder("utf8"):void 0;function h(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&l)return l.decode(e.subarray(t,i));let s="";for(;t<i;){let n=e[t++];if(!(128&n)){s+=String.fromCharCode(n);continue}let r=63&e[t++];if((224&n)==192){s+=String.fromCharCode((31&n)<<6|r);continue}let i=63&e[t++];if((n=(240&n)==224?(15&n)<<12|r<<6|i:(7&n)<<18|r<<12|i<<6|63&e[t++])<65536)s+=String.fromCharCode(n);else{let e=n-65536;s+=String.fromCharCode(55296|e>>10,56320|1023&e)}}return s}function c(e,t){return e?h(r.HEAPU8,e,t):""}let u={emscripten_get_now:rv,emscripten_memcpy_big:s,emscripten_resize_heap:a,fd_write:()=>0};async function d(){let n={env:u,wasi_snapshot_preview1:u},s=await e(n);i((t=s.memory).buffer),Object.assign(r,s),r.UTF8ToString=c}return await d(),r}var rS=Object.defineProperty,rA=(e,t,n)=>t in e?rS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rE=(e,t,n)=>rA(e,"symbol"!=typeof t?t+"":t,n);let rM=null;function rT(e){throw new rk(e.UTF8ToString(e.getLastOnigError()))}class rN{constructor(e){rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16Value"),rE(this,"utf8Value"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16");const t=e.length,n=rN._utf8ByteLength(e),r=n!==t,i=r?new Uint32Array(t+1):null;r&&(i[t]=n);const s=r?new Uint32Array(n+1):null;r&&(s[n]=t);const o=new Uint8Array(n);let a=0;for(let n=0;n<t;n++){const l=e.charCodeAt(n);let h=l,c=!1;if(l>=55296&&l<=56319&&n+1<t){const t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(h=(l-55296<<10)+65536|t-56320,c=!0)}r&&(i[n]=a,c&&(i[n+1]=a),h<=127?s[a+0]=n:h<=2047?(s[a+0]=n,s[a+1]=n):h<=65535?(s[a+0]=n,s[a+1]=n,s[a+2]=n):(s[a+0]=n,s[a+1]=n,s[a+2]=n,s[a+3]=n)),h<=127?o[a++]=h:(h<=2047?o[a++]=192|(1984&h)>>>6:(h<=65535?o[a++]=224|(61440&h)>>>12:(o[a++]=240|(1835008&h)>>>18,o[a++]=128|(258048&h)>>>12),o[a++]=128|(4032&h)>>>6),o[a++]=128|(63&h)>>>0),c&&n++}this.utf16Length=t,this.utf8Length=n,this.utf16Value=e,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=s}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),s=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(s=(i-55296<<10)+65536|t-56320,o=!0)}s<=127?t+=1:s<=2047?t+=2:s<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}}let rI=class e{constructor(t){if(rE(this,"id",++e.LAST_ID),rE(this,"_onigBinding"),rE(this,"content"),rE(this,"utf16Length"),rE(this,"utf8Length"),rE(this,"utf16OffsetToUtf8"),rE(this,"utf8OffsetToUtf16"),rE(this,"ptr"),!rM)throw new rk("Must invoke loadWasm first.");this._onigBinding=rM,this.content=t;const n=new rN(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||(e._sharedPtr=rM.omalloc(1e4)),e._sharedPtrInUse=!0,rM.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(rM)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};rE(rI,"LAST_ID",0),rE(rI,"_sharedPtr",0),rE(rI,"_sharedPtrInUse",!1);let rD=rI;class rL{constructor(e){if(rE(this,"_onigBinding"),rE(this,"_ptr"),!rM)throw new rk("Must invoke loadWasm first.");const t=[],n=[];for(let r=0,i=e.length;r<i;r++){const i=new rN(e[r]);t[r]=i.createString(rM),n[r]=i.utf8Length}const r=rM.omalloc(4*e.length);rM.HEAPU32.set(t,r/4);const i=rM.omalloc(4*e.length);rM.HEAPU32.set(n,i/4);const s=rM.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)rM.ofree(t[n]);rM.ofree(i),rM.ofree(r),0===s&&rT(rM),this._onigBinding=rM,this._ptr=s}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if("number"==typeof n&&(r=n),"string"==typeof e){e=new rD(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,s=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(0===s)return null;let o=i.HEAPU32,a=s/4,l=o[a++],h=o[a++],c=[];for(let t=0;t<h;t++){let n=e.convertUtf8OffsetToUtf16(o[a++]),r=e.convertUtf8OffsetToUtf16(o[a++]);c[t]={start:n,end:r,length:r-n}}return{index:l,captureIndices:c}}}function rR(e){return"function"==typeof e.instantiator}function rF(e){return"function"==typeof e.default}function rP(e){return void 0!==e.data}function rO(e){return"u">typeof Response&&e instanceof Response}function rz(e){return"u">typeof ArrayBuffer&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||void 0!==rb&&rb.isBuffer?.(e)||"u">typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer||"u">typeof Uint32Array&&e instanceof Uint32Array}function rB(e){return i||(i=async function(){rM=await rx(async t=>{let n=e;return"function"==typeof(n=await n)&&(n=await n(t)),"function"==typeof n&&(n=await n(t)),rR(n)?n=await n.instantiator(t):rF(n)?n=await n.default(t):(rP(n)&&(n=n.data),rO(n)?n="function"==typeof WebAssembly.instantiateStreaming?await rj(n)(t):await rq(n)(t):rz(n)||n instanceof WebAssembly.Module?n=await r$(n)(t):"default"in n&&n.default instanceof WebAssembly.Module&&(n=await r$(n.default)(t))),"instance"in n&&(n=n.instance),"exports"in n&&(n=n.exports),n})}())}function r$(e){return t=>WebAssembly.instantiate(e,t)}function rj(e){return t=>WebAssembly.instantiateStreaming(e,t)}function rq(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function rH(e){return e&&await rB(e),{createScanner:e=>new rL(e.map(e=>"string"==typeof e?e:e.source)),createString:e=>new rD(e)}}let rU=rp({langs:r_,themes:ry,engine:()=>rH(Promise.all([n.e(4814),n.e(9302)]).then(n.bind(n,49302)))})},67635:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],s=(0,r.A)("copy",i)},68459:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],s=(0,r.A)("trash-2",i)},68806:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],s=(0,r.A)("plug",i)},69048:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],s=(0,r.A)("square-function",i)},73300:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]],s=(0,r.A)("clipboard",i)},76022:(e,t,n)=>{"use strict";e.exports=n.p+"static/media/web-tree-sitter.f7f7244f.wasm"},76065:(e,t,n)=>{"use strict";n.d(t,{H:()=>r.Hj});var r=n(5989)},76865:(e,t,n)=>{"use strict";n.d(t,{$t:()=>A,LN:()=>o,U3:()=>c,hs:()=>I,i5:()=>f,k_:()=>M,nh:()=>d,yn:()=>a});var r=n(27050),i=n(8242);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new a(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let a=0;a<o.length;a++){let{$from:l,$to:h}=o[a],c=e.mapping.slice(s);e.replaceRange(c.map(l.pos),c.map(h.pos),a?r.Ji.empty:t),0==a&&_(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],a=e.mapping.slice(n),l=a.map(s.pos),h=a.map(o.pos);i?e.deleteRange(l,h):(e.replaceRangeWith(l,h,t),_(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new c(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return c.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class a{constructor(e,t){this.$from=e,this.$to=t}}let l=!1;function h(e){l||e.parent.inlineContent||(l=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class c extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new c(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof c&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new u(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new c(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new c(e,t)}}o.jsonID("text",c);class u{constructor(e,t){this.anchor=e,this.head=t}map(e){return new u(e.map(this.anchor),e.map(this.head))}resolve(e){return c.between(e.resolve(this.anchor),e.resolve(this.head))}}class d extends o{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new d(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,o.jsonID("node",d);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new u(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return c.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function _(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let a=e.steps[s];(a instanceof i.Ln||a instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}let y=1,b=2,k=4;class w extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|y)&~b,this.storedMarks=null,this}get selectionSet(){return(this.updated&y)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=b,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&b)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~b,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=k,this}get scrolledIntoView(){return(this.updated&k)>0}}function v(e,t){return t&&e?e.bind(t):e}class C{constructor(e,t,n){this.name=e,this.init=v(t.init,n),this.apply=v(t.apply,n)}}let x=[new C("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new C("selection",{init:(e,t)=>e.selection||o.atStart(t.doc),apply:e=>e.selection}),new C("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new C("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class S{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new C(e.key,e.spec.state,e))})}}class A{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let a=r?r[s].n:0,l=r?r[s].state:this,h=a<t.length&&o.spec.appendTransaction.call(o,a?t.slice(a):t,l,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new A(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new w(this)}static create(e){let t=new S(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new A(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new S(this.schema,e.plugins),n=t.fields,r=new A(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new S(e.schema,e.plugins),s=new A(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],a=o.spec.state;if(o.key==i.name&&a&&a.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=a.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}function E(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):"handleDOMEvents"==r&&(i=E(i,t,{})),n[r]=i}return n}class M{constructor(e){this.spec=e,this.props={},e.props&&E(e.props,this,this.props),this.key=e.key?e.key.key:N("plugin")}getState(e){return e[this.key]}}let T=Object.create(null);function N(e){return e in T?e+"$"+ ++T[e]:(T[e]=0,e+"$")}class I{constructor(e="key"){this.key=N(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},81165:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],s=(0,r.A)("loader",i)},82150:(e,t,n)=>{"use strict";n.d(t,{L2:()=>R,Rg:()=>h,_0:()=>F,_J:()=>D,ck:()=>c,it:()=>w});var r=n(82159),i=Object.defineProperty,s=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},o="listItem",a="textStyle",l=/^\s*([-+*])\s$/,h=r.bP.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>"list"!==e.type||e.ordered?[]:{type:"bulletList",content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(o,this.editor.getAttributes(a)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=(0,r.tG)({find:l,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:l,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a),editor:this.editor})),[e]}}),c=r.bP.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list_item",parseMarkdown:(e,t)=>{var n;if("list_item"!==e.type)return[];let r=null!=(n=t.parseBlockChildren)?n:t.parseChildren,i=[];if(e.tokens&&e.tokens.length>0)if(e.tokens.some(e=>"paragraph"===e.type))i=r(e.tokens);else{let n=e.tokens[0];if(n&&"text"===n.type&&n.tokens&&n.tokens.length>0){if(i=[{type:"paragraph",content:t.parseInline(n.tokens)}],e.tokens.length>1){let t=r(e.tokens.slice(1));i.push(...t)}}else i=r(e.tokens)}return 0===i.length&&(i=[{type:"paragraph",content:[]}]),{type:"listItem",content:i}},renderMarkdown:(e,t,n)=>(0,r.kj)(e,t,e=>{var t,n;if("bulletList"===e.parentType)return"- ";if("orderedList"===e.parentType){let r=(null==(n=null==(t=e.meta)?void 0:t.parentAttrs)?void 0:n.start)||1;return`${r+e.index}. `}return"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}});s({},{findListItemPos:()=>u,getNextListDepth:()=>d,handleBackspace:()=>g,handleDelete:()=>b,hasListBefore:()=>p,hasListItemAfter:()=>k,hasListItemBefore:()=>f,listItemHasSubList:()=>m,nextListIsDeeper:()=>_,nextListIsHigher:()=>y});var u=(e,t)=>{let{$from:n}=t.selection,i=(0,r.Pg)(e,t.schema),s=null,o=n.depth,a=n.pos,l=null;for(;o>0&&null===l;)(s=n.node(o)).type===i?l=o:(o-=1,a-=1);return null===l?null:{$pos:t.doc.resolve(a),depth:l}},d=(e,t)=>{let n=u(e,t);if(!n)return!1;let[,i]=(0,r.fl)(t,e,n.$pos.pos+4);return i},p=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),s=e.doc.resolve(i).node();return!!s&&!!n.includes(s.type.name)},f=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-2);return 0!==i.index()&&(null==(n=i.nodeBefore)?void 0:n.type.name)===e},m=(e,t,n)=>{if(!n)return!1;let i=(0,r.Pg)(e,t.schema),s=!1;return n.descendants(e=>{e.type===i&&(s=!0)}),s},g=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!(0,r.rU)(e.state,t)&&p(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let s=i.at(-1);if(!s)return!1;let o=e.state.doc.resolve(r.start()+s.pos+1);return e.chain().cut({from:n.start()-1,to:n.end()+1},o.end()).joinForward().run()}if(!(0,r.rU)(e.state,t)||!(0,r.J_)(e.state))return!1;let i=u(t,e.state);if(!i)return!1;let s=e.state.doc.resolve(i.$pos.pos-2).node(i.depth),o=m(t,e.state,s);return f(t,e.state)&&!o?e.commands.joinItemBackward():e.chain().liftListItem(t).run()},_=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n>r.depth},y=(e,t)=>{let n=d(e,t),r=u(e,t);return!!r&&!!n&&n<r.depth},b=(e,t)=>{if(!(0,r.rU)(e.state,t)||!(0,r.QN)(e.state,t))return!1;let{selection:n}=e.state,{$from:i,$to:s}=n;return!(!n.empty&&i.sameParent(s))&&(_(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():y(t,e.state)?e.chain().joinForward().joinBackward().run():e.commands.joinItemForward())},k=(e,t)=>{var n;let{$anchor:r}=t.selection,i=t.doc.resolve(r.pos-r.parentOffset-2);return i.index()!==i.parent.childCount-1&&(null==(n=i.nodeAfter)?void 0:n.type.name)===e},w=r.YY.create({name:"listKeymap",addOptions:()=>({listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}),addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{void 0!==e.state.schema.nodes[n]&&b(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{void 0!==e.state.schema.nodes[n]&&g(e,n,r)&&(t=!0)}),t}}}}),v=/^(\s*)(\d+)\.\s+(.*)$/,C=/^\s/;function x(e){let t=e.trimStart();return/^[-+*]\s+/.test(t)||/^\d+\.\s+/.test(t)||/^>\s?/.test(t)||/^```/.test(t)||/^~~~/.test(t)}function S(e){let t=[],n=[],r=!1;return e.forEach(e=>{if(r)return void n.push(e);if(""===e.trim()||t.length>0&&x(e)){r=!0,n.push(e);return}t.push(e)}),{paragraphLines:t,blockLines:n}}function A(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],s=i.match(v);if(!s)break;let[,o,a,l]=s,h=o.length,c=[l],u=n+1,d=[i],p=!1;for(;u<e.length;){let t=e[u];if(t.match(v))break;if(""===t.trim())d.push(t),c.push(""),p=!0,u+=1;else if(t.match(C))d.push(t),c.push(t.slice(h+2)),u+=1;else{if(p)break;d.push(t),c.push(t),u+=1}}t.push({indent:h,number:parseInt(a,10),content:c.join("\n").trim(),contentLines:c,raw:d.join("\n")}),r=u,n=u}return[t,r]}function E(e,t,n){let r=[],i=0;for(;i<e.length;){let s=e[i];if(s.indent===t){let{paragraphLines:o,blockLines:a}=S(s.contentLines),l=o.join("\n").trim(),h=[];l&&h.push({type:"paragraph",raw:l,tokens:n.inlineTokens(l)});let c=a.join("\n").trim();if(c){let e=n.blockTokens(c);h.push(...e)}let u=i+1,d=[];for(;u<e.length&&e[u].indent>t;)d.push(e[u]),u+=1;if(d.length>0){let e=Math.min(...d.map(e=>e.indent)),t=E(d,e,n);h.push({type:"list",ordered:!0,start:d[0].number,items:t,raw:d.map(e=>e.raw).join("\n")})}r.push({type:"list_item",raw:s.raw,tokens:h}),i=u}else i+=1}return r}function M(e,t){return e.map(e=>{if("list_item"!==e.type)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if("paragraph"===e.type||"list"===e.type||"blockquote"===e.type||"code"===e.type)n.push(...t.parseChildren([e]));else if("text"===e.type&&e.tokens){let r=t.parseChildren([e]);n.push({type:"paragraph",content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:"listItem",content:n}})}var T="listItem",N="textStyle",I=/^(\d+)\.\s$/,D=r.bP.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1},type:{default:null,parseHTML:e=>e.getAttribute("type")}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){let{start:t,...n}=e;return 1===t?["ol",(0,r.KV)(this.options.HTMLAttributes,n),0]:["ol",(0,r.KV)(this.options.HTMLAttributes,e),0]},markdownTokenName:"list",parseMarkdown:(e,t)=>{if("list"!==e.type||!e.ordered)return[];let n=e.start||1,r=e.items?M(e.items,t):[];return 1!==n?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"orderedList",level:"block",start:e=>{let t=e.match(/^(\s*)(\d+)\.\s+/),n=null==t?void 0:t.index;return void 0!==n?n:-1},tokenize:(e,t,n)=>{var r;let i=e.split("\n"),[s,o]=A(i);if(0===s.length)return;let a=E(s,0,n);if(0!==a.length)return{type:"list",ordered:!0,start:(null==(r=s[0])?void 0:r.number)||1,items:a,raw:i.slice(0,o).join("\n")}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(T,this.editor.getAttributes(N)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=(0,r.tG)({find:I,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=(0,r.tG)({find:I,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(N)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),L=/^\s*(\[([( |x])?\])\s$/,R=r.bP.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute("data-checked");return""===t||"true"===t},renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",(0,r.KV)(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode("paragraph",{},t.parseInline(e.tokens))):e.text?n.push(t.createNode("paragraph",{},[t.createNode("text",{text:e.text})])):n.push(t.createNode("paragraph",{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode("taskItem",{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>{var n;let i=(null==(n=e.attrs)?void 0:n.checked)?"x":" ",s=`- [${i}] `;return(0,r.kj)(e,t,s)},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:i})=>{let s=document.createElement("li"),o=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),h=document.createElement("div"),c=e=>{var t,n;l.ariaLabel=(null==(n=null==(t=this.options.a11y)?void 0:t.checkboxLabel)?void 0:n.call(t,e,l.checked))||`Task item checkbox for ${e.textContent||"empty task item"}`};c(e),o.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",e=>e.preventDefault()),l.addEventListener("change",t=>{if(!i.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}let{checked:r}=t.target;i.isEditable&&"function"==typeof n&&i.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if("number"!=typeof t)return!1;let i=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==i?void 0:i.attrs,checked:r}),!0}).run(),i.isEditable||!this.options.onReadOnlyChecked||this.options.onReadOnlyChecked(e,r)||(l.checked=!l.checked)}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{s.setAttribute(e,t)}),s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,o.append(l,a),s.append(o,h),Object.entries(t).forEach(([e,t])=>{s.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:s,contentDOM:h,update:e=>{if(e.type!==this.type)return!1;s.dataset.checked=e.attrs.checked,l.checked=e.attrs.checked,c(e);let t=i.extensionManager.attributes,n=(0,r.zU)(e,t),o=new Set(Object.keys(n)),a=this.options.HTMLAttributes;return u.forEach(e=>{o.has(e)||(e in a?s.setAttribute(e,a[e]):s.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{null==t?e in a?s.setAttribute(e,a[e]):s.removeAttribute(e):s.setAttribute(e,t)}),u=o,!0}}}},addInputRules(){return[(0,r.tG)({find:L,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),F=r.bP.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",(0,r.KV)(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode("taskList",{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n"):"",markdownTokenizer:{name:"taskList",level:"block",start(e){var t;let n=null==(t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))?void 0:t.index;return void 0!==n?n:-1},tokenize(e,t,n){let i=e=>{let t=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);return t?[{type:"taskList",raw:t.raw,items:t.items}]:n.blockTokens(e)},s=(0,r.Dd)(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:"x"===e[3].toLowerCase()}),createToken:(e,t)=>({type:"taskItem",raw:"",mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:i},n);if(s)return{type:"taskList",raw:s.raw,items:s.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});r.YY.create({name:"listKit",addExtensions(){let e=[];return!1!==this.options.bulletList&&e.push(h.configure(this.options.bulletList)),!1!==this.options.listItem&&e.push(c.configure(this.options.listItem)),!1!==this.options.listKeymap&&e.push(w.configure(this.options.listKeymap)),!1!==this.options.orderedList&&e.push(D.configure(this.options.orderedList)),!1!==this.options.taskItem&&e.push(R.configure(this.options.taskItem)),!1!==this.options.taskList&&e.push(F.configure(this.options.taskList)),e}})},90425:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(12115);let i=(...e)=>e.filter((e,t,n)=>!!e&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim(),s=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),a=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let h=e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1},c=(0,r.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:a,iconNode:c,...u},d)=>(0,r.createElement)("svg",{ref:d,...l,width:t,height:t,stroke:e,strokeWidth:s?24*Number(n)/Number(t):n,className:i("lucide",o),...!a&&!h(u)&&{"aria-hidden":"true"},...u},[...c.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(a)?a:[a]])),u=(e,t)=>{let n=(0,r.forwardRef)(({className:n,...o},l)=>(0,r.createElement)(c,{ref:l,iconNode:t,className:i(`lucide-${s(a(e))}`,`lucide-${e}`,n),...o}));return n.displayName=a(e),n}},91958:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],s=(0,r.A)("refresh-cw",i)},94577:(e,t,n)=>{"use strict";e.exports=n(99617)},96035:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],s=(0,r.A)("message-square",i)},97144:(e,t,n)=>{"use strict";n.d(t,{$f:()=>L,G2:()=>b,I$:()=>x,Im:()=>F,Qv:()=>l,Sd:()=>_,Z1:()=>S,_G:()=>c,_e:()=>p,bh:()=>k,eB:()=>h,eT:()=>g,ec:()=>R,hy:()=>M,ic:()=>o,iz:()=>A,pC:()=>v,yY:()=>w,y_:()=>P});var r=n(8242),i=n(27050),s=n(76865);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function a(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let l=(e,t,n)=>{let o=a(e,n);if(!o)return!1;let l=f(o);if(!l){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=l.nodeBefore;if(I(e,l,t,-1))return!0;if(0==o.parent.content.size&&(d(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let a=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(a&&a.slice.size<a.to-a.from){if(t){let n=e.tr.step(a);n.setSelection(d(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(l.pos,-1)),-1):s.nh.create(n.doc,l.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos-h.nodeSize,l.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=a(e,n);if(!r)return!1;let i=f(r);return!!i&&u(e,i,t)},c=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=y(r);return!!i&&u(e,i,t)};function u(e,t,n){let o=t.nodeBefore,a=t.pos-1;for(;!o.isTextblock;a--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let l=t.nodeAfter,h=t.pos+1;for(;!l.isTextblock;h++){if(l.type.spec.isolating)return!1;let e=l.firstChild;if(!e)return!1;l=e}let c=(0,r.$L)(e.doc,a,h,i.Ji.empty);if(!c||c.from!=a||c instanceof r.Ln&&c.slice.size>=h-a)return!1;if(n){let t=e.tr.step(c);t.setSelection(s.U3.create(t.doc,a)),n(t.scrollIntoView())}return!0}function d(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let a=o&&o.nodeBefore;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-a.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let a=y(o);if(!a)return!1;let l=a.nodeAfter;if(I(e,a,t,1))return!0;if(0==o.parent.content.size&&(d(l,"start")||s.nh.isSelectable(l))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(d(l,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(a.pos)),1):s.nh.create(r.doc,r.mapping.map(a.pos))),t(r.scrollIntoView())}return!0}}return!!l.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos,a.pos+l.nodeSize).scrollIntoView()),!0)},_=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=y(r)}let a=o&&o.nodeAfter;return!!a&&!!s.nh.isSelectable(a)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function y(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let b=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},k=(e,t)=>{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},w=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},v=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function C(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let x=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),a=C(i.contentMatchAt(o));if(!a||!i.canReplaceWith(o,o,a))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,a.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},S=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=C(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,a=e.tr.insert(n,o.createAndFill());a.setSelection(s.U3.create(a.doc,n+1)),t(a.scrollIntoView())}return!0},A=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},E=function(){return(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],a,l,h=!1,c=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){h=n.end(e)==n.pos+(n.depth-e),c=n.start(e)==n.pos-(n.depth-e),l=C(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));let t=void 0;o.unshift(t||(h&&l?{type:l}:null)),a=e;break}if(1==e)return!1;o.unshift(null)}let u=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&u.deleteSelection();let d=u.mapping.map(n.pos),p=(0,r.zy)(u.doc,d,o.length,o);if(p||(o[0]=l?{type:l}:null,p=(0,r.zy)(u.doc,d,o.length,o)),!p)return!1;if(u.split(d,o.length,o),!h&&c&&n.node(a).type!=l){let e=u.mapping.map(n.before(a)),t=u.doc.resolve(e);l&&n.node(a-1).canReplaceWith(t.index(),t.index()+1,l)&&u.setNodeMarkup(u.mapping.map(n.before(a)),l)}return t&&t(u.scrollIntoView()),!0}}(),M=(e,t)=>{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)},T=(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0);function N(e,t,n){let i=t.nodeBefore,s=t.nodeAfter,o=t.index();return!!i&&!!s&&!!i.type.compatibleContent(s.type)&&(!i.content.size&&t.parent.canReplace(o-1,o)?(n&&n(e.tr.delete(t.pos-i.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(o,o+1)&&!!(s.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))}function I(e,t,n,o){let a=t.nodeBefore,l=t.nodeAfter,h,c,u=a.type.spec.isolating||l.type.spec.isolating;if(!u&&N(e,t,n))return!0;let p=!u&&t.parent.canReplace(t.index(),t.index()+1);if(p&&(h=(c=a.contentMatchAt(a.childCount)).findWrapping(l.type))&&c.matchType(h[0]||l.type).validEnd){if(n){let s=t.pos+l.nodeSize,o=i.FK.empty;for(let e=h.length-1;e>=0;e--)o=i.FK.from(h[e].create(null,o));o=i.FK.from(a.copy(o));let c=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),h.length,!0)),u=c.doc.resolve(s+2*h.length);u.nodeAfter&&u.nodeAfter.type==a.type&&(0,r.n9)(c.doc,u.pos)&&c.join(u.pos),n(c.scrollIntoView())}return!0}let f=l.type.spec.isolating||o>0&&u?null:s.LN.findFrom(t,1),m=f&&f.$from.blockRange(f.$to),g=m&&(0,r.jP)(m);if(null!=g&&g>=t.depth)return n&&n(e.tr.lift(m,g).scrollIntoView()),!0;if(p&&d(l,"start",!0)&&d(a,"end")){let s=a,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let h=l,c=1;for(;!h.isTextblock;h=h.firstChild)c++;if(s.canReplace(s.childCount,s.childCount,h.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+l.nodeSize,t.pos+c,t.pos+l.nodeSize-c,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function D(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let L=D(-1),R=D(1);function F(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,a=s.blockRange(o),l=a&&(0,r.oM)(a,e,t);return!!l&&(i&&i(n.tr.wrap(a,l).scrollIntoView()),!0)}}function P(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function O(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let z=O(o,l,p),B=O(o,g,_),$={Enter:O(v,S,A,E),"Mod-Enter":x,Backspace:z,"Mod-Backspace":z,"Shift-Backspace":z,Delete:B,"Mod-Delete":B,"Mod-a":T},j={"Ctrl-h":$.Backspace,"Alt-Backspace":$["Mod-Backspace"],"Ctrl-d":$.Delete,"Ctrl-Alt-Backspace":$["Mod-Delete"],"Alt-Delete":$["Mod-Delete"],"Alt-d":$["Mod-Delete"],"Ctrl-a":L,"Ctrl-e":R};for(let e in $)j[e]=$[e];"u">typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"u">typeof os&&os.platform&&os.platform()},97567:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(90425);let i=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],s=(0,r.A)("box",i)},99617:(e,t,n)=>{"use strict";var r=n(12115),i=n(8039);function s(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}var o="function"==typeof Object.is?Object.is:s,a=i.useSyncExternalStore,l=r.useRef,h=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=l(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;var p=a(e,(s=c(function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?(s=e,t):(s=e,a=n)}var s,a,l=!1,h=void 0===n?null:n;return[function(){return e(t())},null===h?void 0:function(){return e(h())}]},[t,n,r,i]))[0],s[1]);return h(function(){d.hasValue=!0,d.value=p},[p]),u(p),p}}}]);