@ank1015/llm 0.0.1 → 0.0.3

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 (1333) hide show
  1. package/README.md +5 -3
  2. package/dist/cli.js +128 -19
  3. package/dist/cli.js.map +1 -1
  4. package/package.json +1 -1
  5. package/vendor/web/manifest.json +1 -1
  6. package/vendor/web/standalone/node_modules/@img/colour/color.cjs +1596 -0
  7. package/vendor/web/standalone/node_modules/@img/colour/index.cjs +1 -0
  8. package/vendor/web/standalone/node_modules/@img/colour/package.json +21 -8
  9. package/vendor/web/standalone/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  10. package/vendor/web/standalone/node_modules/@img/sharp-libvips-darwin-arm64/README.md +46 -0
  11. package/vendor/web/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/glib-2.0/include/glibconfig.h +220 -0
  12. package/vendor/web/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +1 -0
  13. package/vendor/web/standalone/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  14. package/vendor/web/standalone/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +30 -0
  15. package/vendor/web/standalone/node_modules/@next/env/dist/index.js +1 -0
  16. package/vendor/web/standalone/node_modules/@next/env/package.json +1 -1
  17. package/vendor/web/standalone/node_modules/@shikijs/core/dist/index.mjs +2446 -0
  18. package/vendor/web/standalone/node_modules/@shikijs/core/package.json +2 -2
  19. package/vendor/web/standalone/node_modules/@shikijs/engine-javascript/dist/engine-compile.mjs +52 -0
  20. package/vendor/web/standalone/node_modules/@shikijs/engine-javascript/dist/engine-raw.mjs +22 -0
  21. package/vendor/web/standalone/node_modules/@shikijs/engine-javascript/dist/index.mjs +4 -0
  22. package/vendor/web/standalone/node_modules/@shikijs/engine-javascript/dist/shared/engine-javascript.hzpS1_41.mjs +93 -0
  23. package/vendor/web/standalone/node_modules/@shikijs/engine-javascript/package.json +2 -2
  24. package/vendor/web/standalone/node_modules/@shikijs/engine-oniguruma/dist/index.mjs +448 -0
  25. package/vendor/web/standalone/node_modules/@shikijs/engine-oniguruma/dist/wasm-inlined.mjs +8 -0
  26. package/vendor/web/standalone/node_modules/@shikijs/engine-oniguruma/package.json +2 -2
  27. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/abap.mjs +5 -0
  28. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/actionscript-3.mjs +5 -0
  29. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ada.mjs +5 -0
  30. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-expression.mjs +5 -0
  31. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-html.mjs +16 -0
  32. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-inline-style.mjs +8 -0
  33. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-inline-template.mjs +10 -0
  34. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-let-declaration.mjs +8 -0
  35. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-template-blocks.mjs +10 -0
  36. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-template.mjs +8 -0
  37. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/angular-ts.mjs +18 -0
  38. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/apache.mjs +5 -0
  39. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/apex.mjs +5 -0
  40. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/apl.mjs +16 -0
  41. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/applescript.mjs +5 -0
  42. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ara.mjs +5 -0
  43. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/asciidoc.mjs +5 -0
  44. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/asm.mjs +5 -0
  45. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/astro.mjs +18 -0
  46. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/awk.mjs +5 -0
  47. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ballerina.mjs +5 -0
  48. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/bat.mjs +5 -0
  49. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/beancount.mjs +5 -0
  50. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/berry.mjs +5 -0
  51. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/bibtex.mjs +5 -0
  52. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/bicep.mjs +5 -0
  53. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/bird2.mjs +5 -0
  54. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/blade.mjs +20 -0
  55. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/bsl.mjs +8 -0
  56. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/c.mjs +5 -0
  57. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/c3.mjs +5 -0
  58. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cadence.mjs +5 -0
  59. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cairo.mjs +8 -0
  60. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/clarity.mjs +5 -0
  61. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/clojure.mjs +5 -0
  62. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cmake.mjs +5 -0
  63. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cobol.mjs +10 -0
  64. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/codeowners.mjs +5 -0
  65. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/codeql.mjs +5 -0
  66. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/coffee.mjs +8 -0
  67. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/common-lisp.mjs +5 -0
  68. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/coq.mjs +5 -0
  69. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cpp-macro.mjs +12 -0
  70. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cpp.mjs +14 -0
  71. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/crystal.mjs +18 -0
  72. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/csharp.mjs +5 -0
  73. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/css.mjs +5 -0
  74. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/csv.mjs +5 -0
  75. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cue.mjs +5 -0
  76. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/cypher.mjs +5 -0
  77. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/d.mjs +5 -0
  78. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/dart.mjs +5 -0
  79. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/dax.mjs +5 -0
  80. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/desktop.mjs +5 -0
  81. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/diff.mjs +5 -0
  82. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/docker.mjs +5 -0
  83. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/dotenv.mjs +5 -0
  84. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/dream-maker.mjs +5 -0
  85. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/edge.mjs +12 -0
  86. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/elixir.mjs +8 -0
  87. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/elm.mjs +8 -0
  88. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/emacs-lisp.mjs +5 -0
  89. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/erb.mjs +10 -0
  90. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/erlang.mjs +8 -0
  91. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/es-tag-css.mjs +12 -0
  92. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/es-tag-glsl.mjs +12 -0
  93. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/es-tag-html.mjs +12 -0
  94. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/es-tag-sql.mjs +10 -0
  95. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/es-tag-xml.mjs +8 -0
  96. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fennel.mjs +5 -0
  97. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fish.mjs +5 -0
  98. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fluent.mjs +5 -0
  99. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fortran-fixed-form.mjs +8 -0
  100. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fortran-free-form.mjs +5 -0
  101. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/fsharp.mjs +8 -0
  102. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gdresource.mjs +10 -0
  103. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gdscript.mjs +5 -0
  104. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gdshader.mjs +5 -0
  105. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/genie.mjs +5 -0
  106. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gherkin.mjs +5 -0
  107. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/git-commit.mjs +8 -0
  108. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/git-rebase.mjs +8 -0
  109. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gleam.mjs +5 -0
  110. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/glimmer-js.mjs +14 -0
  111. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/glimmer-ts.mjs +14 -0
  112. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/glsl.mjs +8 -0
  113. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gn.mjs +5 -0
  114. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/gnuplot.mjs +5 -0
  115. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/go.mjs +5 -0
  116. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/graphql.mjs +14 -0
  117. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/groovy.mjs +5 -0
  118. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hack.mjs +10 -0
  119. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/haml.mjs +10 -0
  120. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/handlebars.mjs +14 -0
  121. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/haskell.mjs +5 -0
  122. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/haxe.mjs +5 -0
  123. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hcl.mjs +5 -0
  124. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hjson.mjs +5 -0
  125. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hlsl.mjs +5 -0
  126. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/html-derivative.mjs +8 -0
  127. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/html.mjs +10 -0
  128. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/http.mjs +14 -0
  129. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hurl.mjs +12 -0
  130. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hxml.mjs +8 -0
  131. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/hy.mjs +5 -0
  132. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/imba.mjs +5 -0
  133. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ini.mjs +5 -0
  134. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/java.mjs +5 -0
  135. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/javascript.mjs +5 -0
  136. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jinja-html.mjs +8 -0
  137. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jinja.mjs +8 -0
  138. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jison.mjs +8 -0
  139. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/json.mjs +5 -0
  140. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/json5.mjs +5 -0
  141. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jsonc.mjs +5 -0
  142. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jsonl.mjs +5 -0
  143. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jsonnet.mjs +5 -0
  144. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jssm.mjs +5 -0
  145. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/jsx.mjs +5 -0
  146. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/julia.mjs +16 -0
  147. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/just.mjs +18 -0
  148. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/kdl.mjs +5 -0
  149. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/kotlin.mjs +5 -0
  150. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/kusto.mjs +5 -0
  151. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/latex.mjs +8 -0
  152. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/lean.mjs +5 -0
  153. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/less.mjs +5 -0
  154. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/liquid.mjs +14 -0
  155. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/llvm.mjs +5 -0
  156. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/log.mjs +5 -0
  157. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/logo.mjs +5 -0
  158. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/lua.mjs +8 -0
  159. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/luau.mjs +5 -0
  160. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/make.mjs +5 -0
  161. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/markdown-nix.mjs +5 -0
  162. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/markdown-vue.mjs +5 -0
  163. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/markdown.mjs +5 -0
  164. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/marko.mjs +14 -0
  165. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/matlab.mjs +5 -0
  166. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/mdc.mjs +12 -0
  167. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/mdx.mjs +5 -0
  168. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/mermaid.mjs +5 -0
  169. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/mipsasm.mjs +5 -0
  170. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/mojo.mjs +5 -0
  171. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/moonbit.mjs +5 -0
  172. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/move.mjs +5 -0
  173. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/narrat.mjs +5 -0
  174. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nextflow-groovy.mjs +5 -0
  175. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nextflow.mjs +8 -0
  176. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nginx.mjs +8 -0
  177. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nim.mjs +20 -0
  178. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nix.mjs +8 -0
  179. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/nushell.mjs +5 -0
  180. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/objective-c.mjs +5 -0
  181. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/objective-cpp.mjs +5 -0
  182. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ocaml.mjs +5 -0
  183. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/odin.mjs +5 -0
  184. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/openscad.mjs +5 -0
  185. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/pascal.mjs +5 -0
  186. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/perl.mjs +16 -0
  187. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/php.mjs +18 -0
  188. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/pkl.mjs +5 -0
  189. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/plsql.mjs +5 -0
  190. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/po.mjs +5 -0
  191. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/polar.mjs +5 -0
  192. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/postcss.mjs +5 -0
  193. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/powerquery.mjs +5 -0
  194. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/powershell.mjs +5 -0
  195. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/prisma.mjs +5 -0
  196. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/prolog.mjs +5 -0
  197. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/proto.mjs +5 -0
  198. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/pug.mjs +12 -0
  199. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/puppet.mjs +5 -0
  200. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/purescript.mjs +5 -0
  201. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/python.mjs +5 -0
  202. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/qml.mjs +8 -0
  203. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/qmldir.mjs +5 -0
  204. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/qss.mjs +5 -0
  205. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/r.mjs +5 -0
  206. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/racket.mjs +5 -0
  207. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/raku.mjs +5 -0
  208. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/razor.mjs +10 -0
  209. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/reg.mjs +5 -0
  210. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/regexp.mjs +5 -0
  211. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/rel.mjs +5 -0
  212. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/riscv.mjs +5 -0
  213. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ron.mjs +5 -0
  214. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/rosmsg.mjs +5 -0
  215. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/rst.mjs +22 -0
  216. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ruby.mjs +30 -0
  217. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/rust.mjs +5 -0
  218. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/sas.mjs +8 -0
  219. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/sass.mjs +5 -0
  220. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/scala.mjs +5 -0
  221. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/scheme.mjs +5 -0
  222. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/scss.mjs +8 -0
  223. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/sdbl.mjs +5 -0
  224. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/shaderlab.mjs +8 -0
  225. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/shellscript.mjs +5 -0
  226. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/shellsession.mjs +8 -0
  227. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/smalltalk.mjs +5 -0
  228. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/solidity.mjs +5 -0
  229. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/soy.mjs +8 -0
  230. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/sparql.mjs +8 -0
  231. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/splunk.mjs +5 -0
  232. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/sql.mjs +5 -0
  233. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ssh-config.mjs +5 -0
  234. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/stata.mjs +8 -0
  235. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/stylus.mjs +5 -0
  236. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/surrealql.mjs +8 -0
  237. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/svelte.mjs +14 -0
  238. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/swift.mjs +5 -0
  239. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/system-verilog.mjs +5 -0
  240. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/systemd.mjs +5 -0
  241. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/talonscript.mjs +5 -0
  242. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/tasl.mjs +5 -0
  243. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/tcl.mjs +5 -0
  244. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/templ.mjs +12 -0
  245. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/terraform.mjs +5 -0
  246. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/tex.mjs +8 -0
  247. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/toml.mjs +5 -0
  248. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/ts-tags.mjs +18 -0
  249. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/tsv.mjs +5 -0
  250. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/tsx.mjs +5 -0
  251. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/turtle.mjs +5 -0
  252. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/twig.mjs +18 -0
  253. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/typescript.mjs +5 -0
  254. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/typespec.mjs +5 -0
  255. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/typst.mjs +5 -0
  256. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/v.mjs +5 -0
  257. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vala.mjs +5 -0
  258. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vb.mjs +5 -0
  259. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/verilog.mjs +5 -0
  260. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vhdl.mjs +5 -0
  261. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/viml.mjs +5 -0
  262. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue-directives.mjs +5 -0
  263. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue-html.mjs +8 -0
  264. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue-interpolations.mjs +5 -0
  265. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue-sfc-style-variable-injection.mjs +8 -0
  266. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue-vine.mjs +18 -0
  267. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vue.mjs +26 -0
  268. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/vyper.mjs +5 -0
  269. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wasm.mjs +5 -0
  270. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wenyan.mjs +5 -0
  271. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wgsl.mjs +5 -0
  272. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wikitext.mjs +5 -0
  273. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wit.mjs +5 -0
  274. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/wolfram.mjs +5 -0
  275. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/xml.mjs +8 -0
  276. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/xsl.mjs +8 -0
  277. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/yaml.mjs +5 -0
  278. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/zenscript.mjs +5 -0
  279. package/vendor/web/standalone/node_modules/@shikijs/langs/dist/zig.mjs +5 -0
  280. package/vendor/web/standalone/node_modules/@shikijs/langs/package.json +7 -3
  281. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/andromeeda.mjs +2 -0
  282. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/aurora-x.mjs +2 -0
  283. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/ayu-dark.mjs +2 -0
  284. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/ayu-light.mjs +2 -0
  285. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/ayu-mirage.mjs +2 -0
  286. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/catppuccin-frappe.mjs +2 -0
  287. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/catppuccin-latte.mjs +2 -0
  288. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/catppuccin-macchiato.mjs +2 -0
  289. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/catppuccin-mocha.mjs +2 -0
  290. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/dark-plus.mjs +2 -0
  291. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/dracula-soft.mjs +2 -0
  292. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/dracula.mjs +2 -0
  293. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/everforest-dark.mjs +2 -0
  294. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/everforest-light.mjs +2 -0
  295. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-dark-default.mjs +2 -0
  296. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-dark-dimmed.mjs +2 -0
  297. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-dark-high-contrast.mjs +2 -0
  298. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-dark.mjs +2 -0
  299. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-light-default.mjs +2 -0
  300. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-light-high-contrast.mjs +2 -0
  301. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/github-light.mjs +2 -0
  302. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-hard.mjs +2 -0
  303. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-medium.mjs +2 -0
  304. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-dark-soft.mjs +2 -0
  305. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-hard.mjs +2 -0
  306. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-medium.mjs +2 -0
  307. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/gruvbox-light-soft.mjs +2 -0
  308. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/horizon-bright.mjs +2 -0
  309. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/horizon.mjs +2 -0
  310. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/houston.mjs +2 -0
  311. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/kanagawa-dragon.mjs +2 -0
  312. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/kanagawa-lotus.mjs +2 -0
  313. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/kanagawa-wave.mjs +2 -0
  314. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/laserwave.mjs +2 -0
  315. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/light-plus.mjs +2 -0
  316. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/material-theme-darker.mjs +2 -0
  317. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/material-theme-lighter.mjs +2 -0
  318. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/material-theme-ocean.mjs +2 -0
  319. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/material-theme-palenight.mjs +2 -0
  320. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/material-theme.mjs +2 -0
  321. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/min-dark.mjs +2 -0
  322. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/min-light.mjs +2 -0
  323. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/monokai.mjs +2 -0
  324. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/night-owl-light.mjs +2 -0
  325. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/night-owl.mjs +2 -0
  326. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/nord.mjs +2 -0
  327. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/one-dark-pro.mjs +2 -0
  328. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/one-light.mjs +2 -0
  329. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/plastic.mjs +2 -0
  330. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/poimandres.mjs +2 -0
  331. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/red.mjs +2 -0
  332. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/rose-pine-dawn.mjs +2 -0
  333. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/rose-pine-moon.mjs +2 -0
  334. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/rose-pine.mjs +2 -0
  335. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/slack-dark.mjs +2 -0
  336. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/slack-ochin.mjs +2 -0
  337. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/snazzy-light.mjs +2 -0
  338. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/solarized-dark.mjs +2 -0
  339. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/solarized-light.mjs +2 -0
  340. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/synthwave-84.mjs +2 -0
  341. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/tokyo-night.mjs +2 -0
  342. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/vesper.mjs +2 -0
  343. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/vitesse-black.mjs +2 -0
  344. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/vitesse-dark.mjs +2 -0
  345. package/vendor/web/standalone/node_modules/@shikijs/themes/dist/vitesse-light.mjs +2 -0
  346. package/vendor/web/standalone/node_modules/@shikijs/themes/package.json +4 -3
  347. package/vendor/web/standalone/node_modules/@shikijs/types/dist/index.mjs +8 -0
  348. package/vendor/web/standalone/node_modules/@shikijs/types/package.json +1 -1
  349. package/vendor/web/standalone/node_modules/@shikijs/vscode-textmate/dist/index.js +3216 -0
  350. package/vendor/web/standalone/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
  351. package/vendor/web/standalone/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
  352. package/vendor/web/standalone/node_modules/ccount/index.js +27 -0
  353. package/vendor/web/standalone/node_modules/character-entities-html4/index.js +259 -0
  354. package/vendor/web/standalone/node_modules/character-entities-legacy/index.js +113 -0
  355. package/vendor/web/standalone/node_modules/client-only/index.js +0 -0
  356. package/vendor/web/standalone/node_modules/comma-separated-tokens/index.js +74 -0
  357. package/vendor/web/standalone/node_modules/detect-libc/lib/detect-libc.js +313 -0
  358. package/vendor/web/standalone/node_modules/detect-libc/lib/elf.js +39 -0
  359. package/vendor/web/standalone/node_modules/detect-libc/lib/filesystem.js +51 -0
  360. package/vendor/web/standalone/node_modules/detect-libc/lib/process.js +24 -0
  361. package/vendor/web/standalone/node_modules/hast-util-to-html/index.js +8 -0
  362. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/comment.js +52 -0
  363. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/doctype.js +27 -0
  364. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/element.js +265 -0
  365. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/index.js +47 -0
  366. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/raw.js +27 -0
  367. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/root.js +22 -0
  368. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/handle/text.js +38 -0
  369. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/index.js +257 -0
  370. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/omission/closing.js +358 -0
  371. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/omission/omission.js +44 -0
  372. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/omission/opening.js +148 -0
  373. package/vendor/web/standalone/node_modules/hast-util-to-html/lib/omission/util/siblings.js +50 -0
  374. package/vendor/web/standalone/node_modules/hast-util-whitespace/index.js +1 -0
  375. package/vendor/web/standalone/node_modules/hast-util-whitespace/lib/index.js +34 -0
  376. package/vendor/web/standalone/node_modules/html-void-elements/index.js +27 -0
  377. package/vendor/web/standalone/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
  378. package/vendor/web/standalone/node_modules/next/dist/build/define-env.js +255 -0
  379. package/vendor/web/standalone/node_modules/next/dist/build/duration-to-string.js +99 -0
  380. package/vendor/web/standalone/node_modules/next/dist/build/get-supported-browsers.js +38 -0
  381. package/vendor/web/standalone/node_modules/next/dist/build/next-config-ts/require-hook.js +85 -0
  382. package/vendor/web/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +251 -0
  383. package/vendor/web/standalone/node_modules/next/dist/build/output/format.js +84 -0
  384. package/vendor/web/standalone/node_modules/next/dist/build/output/log.js +135 -0
  385. package/vendor/web/standalone/node_modules/next/dist/build/segment-config/app/app-segment-config.js +162 -0
  386. package/vendor/web/standalone/node_modules/next/dist/build/segment-config/app/app-segments.js +137 -0
  387. package/vendor/web/standalone/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +52 -0
  388. package/vendor/web/standalone/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
  389. package/vendor/web/standalone/node_modules/next/dist/build/static-paths/app.js +735 -0
  390. package/vendor/web/standalone/node_modules/next/dist/build/static-paths/pages.js +169 -0
  391. package/vendor/web/standalone/node_modules/next/dist/build/static-paths/utils.js +119 -0
  392. package/vendor/web/standalone/node_modules/next/dist/build/swc/helpers.js +15 -0
  393. package/vendor/web/standalone/node_modules/next/dist/build/swc/index.js +1348 -0
  394. package/vendor/web/standalone/node_modules/next/dist/build/swc/install-bindings.js +30 -0
  395. package/vendor/web/standalone/node_modules/next/dist/build/swc/jest-transformer.js +76 -0
  396. package/vendor/web/standalone/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
  397. package/vendor/web/standalone/node_modules/next/dist/build/swc/options.js +403 -0
  398. package/vendor/web/standalone/node_modules/next/dist/build/swc/types.js +6 -0
  399. package/vendor/web/standalone/node_modules/next/dist/build/utils.js +1215 -0
  400. package/vendor/web/standalone/node_modules/next/dist/cli/next-test.js +170 -0
  401. package/vendor/web/standalone/node_modules/next/dist/client/add-base-path.js +24 -0
  402. package/vendor/web/standalone/node_modules/next/dist/client/app-call-server.js +34 -0
  403. package/vendor/web/standalone/node_modules/next/dist/client/app-find-source-map-url.js +39 -0
  404. package/vendor/web/standalone/node_modules/next/dist/client/assign-location.js +29 -0
  405. package/vendor/web/standalone/node_modules/next/dist/client/components/app-router-announcer.js +78 -0
  406. package/vendor/web/standalone/node_modules/next/dist/client/components/app-router-headers.js +138 -0
  407. package/vendor/web/standalone/node_modules/next/dist/client/components/app-router-instance.js +397 -0
  408. package/vendor/web/standalone/node_modules/next/dist/client/components/app-router-utils.js +62 -0
  409. package/vendor/web/standalone/node_modules/next/dist/client/components/app-router.js +514 -0
  410. package/vendor/web/standalone/node_modules/next/dist/client/components/builtin/default.js +35 -0
  411. package/vendor/web/standalone/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
  412. package/vendor/web/standalone/node_modules/next/dist/client/components/builtin/global-error.js +100 -0
  413. package/vendor/web/standalone/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +52 -0
  414. package/vendor/web/standalone/node_modules/next/dist/client/components/error-boundary.js +144 -0
  415. package/vendor/web/standalone/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
  416. package/vendor/web/standalone/node_modules/next/dist/client/components/errors/root-error-boundary.js +41 -0
  417. package/vendor/web/standalone/node_modules/next/dist/client/components/forbidden.js +48 -0
  418. package/vendor/web/standalone/node_modules/next/dist/client/components/handle-isr-error.js +30 -0
  419. package/vendor/web/standalone/node_modules/next/dist/client/components/hooks-server-context.js +42 -0
  420. package/vendor/web/standalone/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
  421. package/vendor/web/standalone/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
  422. package/vendor/web/standalone/node_modules/next/dist/client/components/is-next-router-error.js +23 -0
  423. package/vendor/web/standalone/node_modules/next/dist/client/components/links.js +299 -0
  424. package/vendor/web/standalone/node_modules/next/dist/client/components/match-segments.js +32 -0
  425. package/vendor/web/standalone/node_modules/next/dist/client/components/nav-failure-handler.js +61 -0
  426. package/vendor/web/standalone/node_modules/next/dist/client/components/navigation-devtools.js +126 -0
  427. package/vendor/web/standalone/node_modules/next/dist/client/components/navigation-untracked.js +67 -0
  428. package/vendor/web/standalone/node_modules/next/dist/client/components/navigation.js +225 -0
  429. package/vendor/web/standalone/node_modules/next/dist/client/components/navigation.react-server.js +75 -0
  430. package/vendor/web/standalone/node_modules/next/dist/client/components/not-found.js +42 -0
  431. package/vendor/web/standalone/node_modules/next/dist/client/components/readonly-url-search-params.js +41 -0
  432. package/vendor/web/standalone/node_modules/next/dist/client/components/redirect-boundary.js +107 -0
  433. package/vendor/web/standalone/node_modules/next/dist/client/components/redirect-error.js +43 -0
  434. package/vendor/web/standalone/node_modules/next/dist/client/components/redirect-status-code.js +24 -0
  435. package/vendor/web/standalone/node_modules/next/dist/client/components/redirect.js +91 -0
  436. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +201 -0
  437. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
  438. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +153 -0
  439. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +32 -0
  440. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +457 -0
  441. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +59 -0
  442. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +1341 -0
  443. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
  444. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +63 -0
  445. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
  446. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +23 -0
  447. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
  448. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +83 -0
  449. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +62 -0
  450. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +320 -0
  451. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +58 -0
  452. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
  453. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +66 -0
  454. package/vendor/web/standalone/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +60 -0
  455. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/bfcache.js +128 -0
  456. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/cache-key.js +28 -0
  457. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/cache-map.js +305 -0
  458. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +1933 -0
  459. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/lru.js +152 -0
  460. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +194 -0
  461. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/navigation.js +597 -0
  462. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +543 -0
  463. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/prefetch.js +31 -0
  464. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +1249 -0
  465. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/types.js +69 -0
  466. package/vendor/web/standalone/node_modules/next/dist/client/components/segment-cache/vary-path.js +278 -0
  467. package/vendor/web/standalone/node_modules/next/dist/client/components/static-generation-bailout.js +42 -0
  468. package/vendor/web/standalone/node_modules/next/dist/client/components/unauthorized.js +49 -0
  469. package/vendor/web/standalone/node_modules/next/dist/client/components/unrecognized-action-error.js +39 -0
  470. package/vendor/web/standalone/node_modules/next/dist/client/components/unresolved-thenable.js +23 -0
  471. package/vendor/web/standalone/node_modules/next/dist/client/components/unstable-rethrow.browser.js +28 -0
  472. package/vendor/web/standalone/node_modules/next/dist/client/components/unstable-rethrow.js +25 -0
  473. package/vendor/web/standalone/node_modules/next/dist/client/components/unstable-rethrow.server.js +32 -0
  474. package/vendor/web/standalone/node_modules/next/dist/client/components/use-action-queue.js +148 -0
  475. package/vendor/web/standalone/node_modules/next/dist/client/dev/debug-channel.js +72 -0
  476. package/vendor/web/standalone/node_modules/next/dist/client/flight-data-helpers.js +232 -0
  477. package/vendor/web/standalone/node_modules/next/dist/client/has-base-path.js +23 -0
  478. package/vendor/web/standalone/node_modules/next/dist/client/lib/console.js +177 -0
  479. package/vendor/web/standalone/node_modules/next/dist/client/lib/javascript-url.js +32 -0
  480. package/vendor/web/standalone/node_modules/next/dist/client/navigation-build-id.js +53 -0
  481. package/vendor/web/standalone/node_modules/next/dist/client/normalize-trailing-slash.js +36 -0
  482. package/vendor/web/standalone/node_modules/next/dist/client/remove-base-path.js +32 -0
  483. package/vendor/web/standalone/node_modules/next/dist/client/route-params.js +230 -0
  484. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
  485. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
  486. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
  487. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
  488. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
  489. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
  490. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
  491. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
  492. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
  493. package/vendor/web/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
  494. package/vendor/web/standalone/node_modules/next/dist/compiled/@hapi/accept/index.js +1 -0
  495. package/vendor/web/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
  496. package/vendor/web/standalone/node_modules/next/dist/compiled/@napi-rs/triples/index.js +1 -0
  497. package/vendor/web/standalone/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1 -0
  498. package/vendor/web/standalone/node_modules/next/dist/compiled/async-retry/index.js +1 -0
  499. package/vendor/web/standalone/node_modules/next/dist/compiled/async-sema/index.js +1 -0
  500. package/vendor/web/standalone/node_modules/next/dist/compiled/busboy/index.js +1 -0
  501. package/vendor/web/standalone/node_modules/next/dist/compiled/bytes/index.js +8 -0
  502. package/vendor/web/standalone/node_modules/next/dist/compiled/ci-info/index.js +1 -0
  503. package/vendor/web/standalone/node_modules/next/dist/compiled/commander/index.js +1 -0
  504. package/vendor/web/standalone/node_modules/next/dist/compiled/comment-json/index.js +7 -0
  505. package/vendor/web/standalone/node_modules/next/dist/compiled/compression/index.js +58 -0
  506. package/vendor/web/standalone/node_modules/next/dist/compiled/conf/index.js +15 -0
  507. package/vendor/web/standalone/node_modules/next/dist/compiled/content-disposition/index.js +6 -0
  508. package/vendor/web/standalone/node_modules/next/dist/compiled/cookie/index.js +7 -0
  509. package/vendor/web/standalone/node_modules/next/dist/compiled/cross-spawn/index.js +1 -0
  510. package/vendor/web/standalone/node_modules/next/dist/compiled/debug/index.js +1 -0
  511. package/vendor/web/standalone/node_modules/next/dist/compiled/edge-runtime/index.js +1 -0
  512. package/vendor/web/standalone/node_modules/next/dist/compiled/find-up/index.js +1 -0
  513. package/vendor/web/standalone/node_modules/next/dist/compiled/fresh/index.js +8 -0
  514. package/vendor/web/standalone/node_modules/next/dist/compiled/http-proxy/index.js +34 -0
  515. package/vendor/web/standalone/node_modules/next/dist/compiled/image-detector/detector.js +1 -0
  516. package/vendor/web/standalone/node_modules/next/dist/compiled/image-size/index.js +1 -0
  517. package/vendor/web/standalone/node_modules/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
  518. package/vendor/web/standalone/node_modules/next/dist/compiled/is-animated/index.js +1 -0
  519. package/vendor/web/standalone/node_modules/next/dist/compiled/is-docker/index.js +1 -0
  520. package/vendor/web/standalone/node_modules/next/dist/compiled/is-wsl/index.js +1 -0
  521. package/vendor/web/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +11 -0
  522. package/vendor/web/standalone/node_modules/next/dist/compiled/nanoid/index.cjs +1 -0
  523. package/vendor/web/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +54 -0
  524. package/vendor/web/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +54 -0
  525. package/vendor/web/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +6 -0
  526. package/vendor/web/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
  527. package/vendor/web/standalone/node_modules/next/dist/compiled/p-limit/index.js +1 -0
  528. package/vendor/web/standalone/node_modules/next/dist/compiled/p-queue/index.js +1 -0
  529. package/vendor/web/standalone/node_modules/next/dist/compiled/path-browserify/index.js +1 -0
  530. package/vendor/web/standalone/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -0
  531. package/vendor/web/standalone/node_modules/next/dist/compiled/picomatch/index.js +1 -0
  532. package/vendor/web/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
  533. package/vendor/web/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
  534. package/vendor/web/standalone/node_modules/next/dist/compiled/react-is/index.js +7 -0
  535. package/vendor/web/standalone/node_modules/next/dist/compiled/react-is/package.json +1 -1
  536. package/vendor/web/standalone/node_modules/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
  537. package/vendor/web/standalone/node_modules/next/dist/compiled/semver/index.js +1 -0
  538. package/vendor/web/standalone/node_modules/next/dist/compiled/send/index.js +70 -0
  539. package/vendor/web/standalone/node_modules/next/dist/compiled/source-map/source-map.js +1 -0
  540. package/vendor/web/standalone/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
  541. package/vendor/web/standalone/node_modules/next/dist/compiled/string-hash/index.js +1 -0
  542. package/vendor/web/standalone/node_modules/next/dist/compiled/strip-ansi/index.js +1 -0
  543. package/vendor/web/standalone/node_modules/next/dist/compiled/superstruct/index.cjs +1 -0
  544. package/vendor/web/standalone/node_modules/next/dist/compiled/tar/index.min.js +1 -0
  545. package/vendor/web/standalone/node_modules/next/dist/compiled/tar/package.json +1 -1
  546. package/vendor/web/standalone/node_modules/next/dist/compiled/text-table/index.js +1 -0
  547. package/vendor/web/standalone/node_modules/next/dist/compiled/watchpack/watchpack.js +1 -0
  548. package/vendor/web/standalone/node_modules/next/dist/compiled/ws/index.js +1 -0
  549. package/vendor/web/standalone/node_modules/next/dist/compiled/zod/index.cjs +1 -0
  550. package/vendor/web/standalone/node_modules/next/dist/compiled/zod-validation-error/index.js +1 -0
  551. package/vendor/web/standalone/node_modules/next/dist/experimental/testmode/context.js +57 -0
  552. package/vendor/web/standalone/node_modules/next/dist/experimental/testmode/fetch.js +142 -0
  553. package/vendor/web/standalone/node_modules/next/dist/experimental/testmode/httpget.js +26 -0
  554. package/vendor/web/standalone/node_modules/next/dist/experimental/testmode/server-edge.js +32 -0
  555. package/vendor/web/standalone/node_modules/next/dist/experimental/testmode/server.js +62 -0
  556. package/vendor/web/standalone/node_modules/next/dist/export/helpers/create-incremental-cache.js +61 -0
  557. package/vendor/web/standalone/node_modules/next/dist/lib/batcher.js +65 -0
  558. package/vendor/web/standalone/node_modules/next/dist/lib/build-custom-route.js +46 -0
  559. package/vendor/web/standalone/node_modules/next/dist/lib/bundler.js +97 -0
  560. package/vendor/web/standalone/node_modules/next/dist/lib/client-and-server-references.js +54 -0
  561. package/vendor/web/standalone/node_modules/next/dist/lib/coalesced-function.js +39 -0
  562. package/vendor/web/standalone/node_modules/next/dist/lib/compile-error.js +14 -0
  563. package/vendor/web/standalone/node_modules/next/dist/lib/constants.js +420 -0
  564. package/vendor/web/standalone/node_modules/next/dist/lib/create-client-router-filter.js +67 -0
  565. package/vendor/web/standalone/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  566. package/vendor/web/standalone/node_modules/next/dist/lib/detached-promise.js +32 -0
  567. package/vendor/web/standalone/node_modules/next/dist/lib/detect-typo.js +51 -0
  568. package/vendor/web/standalone/node_modules/next/dist/lib/download-swc.js +183 -0
  569. package/vendor/web/standalone/node_modules/next/dist/lib/error-telemetry-utils.js +42 -0
  570. package/vendor/web/standalone/node_modules/next/dist/lib/fallback.js +100 -0
  571. package/vendor/web/standalone/node_modules/next/dist/lib/fatal-error.js +14 -0
  572. package/vendor/web/standalone/node_modules/next/dist/lib/file-exists.js +53 -0
  573. package/vendor/web/standalone/node_modules/next/dist/lib/find-config.js +102 -0
  574. package/vendor/web/standalone/node_modules/next/dist/lib/find-pages-dir.js +65 -0
  575. package/vendor/web/standalone/node_modules/next/dist/lib/find-root.js +126 -0
  576. package/vendor/web/standalone/node_modules/next/dist/lib/format-cli-help-output.js +84 -0
  577. package/vendor/web/standalone/node_modules/next/dist/lib/format-dynamic-import-path.js +24 -0
  578. package/vendor/web/standalone/node_modules/next/dist/lib/format-server-error.js +75 -0
  579. package/vendor/web/standalone/node_modules/next/dist/lib/framework/boundary-components.js +62 -0
  580. package/vendor/web/standalone/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
  581. package/vendor/web/standalone/node_modules/next/dist/lib/fs/rename.js +87 -0
  582. package/vendor/web/standalone/node_modules/next/dist/lib/fs/write-atomic.js +28 -0
  583. package/vendor/web/standalone/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
  584. package/vendor/web/standalone/node_modules/next/dist/lib/get-files-in-dir.js +33 -0
  585. package/vendor/web/standalone/node_modules/next/dist/lib/get-network-host.js +44 -0
  586. package/vendor/web/standalone/node_modules/next/dist/lib/get-package-version.js +118 -0
  587. package/vendor/web/standalone/node_modules/next/dist/lib/get-project-dir.js +51 -0
  588. package/vendor/web/standalone/node_modules/next/dist/lib/has-necessary-dependencies.js +49 -0
  589. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-cache-directory.js +66 -0
  590. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-npx-command.js +29 -0
  591. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-online.js +50 -0
  592. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-pkg-manager.js +63 -0
  593. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-registry.js +45 -0
  594. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/get-reserved-port.js +116 -0
  595. package/vendor/web/standalone/node_modules/next/dist/lib/helpers/install.js +83 -0
  596. package/vendor/web/standalone/node_modules/next/dist/lib/import-next-warning.js +50 -0
  597. package/vendor/web/standalone/node_modules/next/dist/lib/inline-static-env.js +112 -0
  598. package/vendor/web/standalone/node_modules/next/dist/lib/install-dependencies.js +40 -0
  599. package/vendor/web/standalone/node_modules/next/dist/lib/interop-default.js +16 -0
  600. package/vendor/web/standalone/node_modules/next/dist/lib/is-api-route.js +15 -0
  601. package/vendor/web/standalone/node_modules/next/dist/lib/is-app-page-route.js +15 -0
  602. package/vendor/web/standalone/node_modules/next/dist/lib/is-app-route-route.js +15 -0
  603. package/vendor/web/standalone/node_modules/next/dist/lib/is-edge-runtime.js +16 -0
  604. package/vendor/web/standalone/node_modules/next/dist/lib/is-error.js +78 -0
  605. package/vendor/web/standalone/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
  606. package/vendor/web/standalone/node_modules/next/dist/lib/is-internal-component.js +36 -0
  607. package/vendor/web/standalone/node_modules/next/dist/lib/is-serializable-props.js +106 -0
  608. package/vendor/web/standalone/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  609. package/vendor/web/standalone/node_modules/next/dist/lib/load-custom-routes.js +594 -0
  610. package/vendor/web/standalone/node_modules/next/dist/lib/memory/gc-observer.js +53 -0
  611. package/vendor/web/standalone/node_modules/next/dist/lib/memory/shutdown.js +29 -0
  612. package/vendor/web/standalone/node_modules/next/dist/lib/memory/startup.js +47 -0
  613. package/vendor/web/standalone/node_modules/next/dist/lib/memory/trace.js +109 -0
  614. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/constants.js +40 -0
  615. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/default-metadata.js +82 -0
  616. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/generate/icon-mark.js +22 -0
  617. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/generate/utils.js +52 -0
  618. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/get-metadata-route.js +123 -0
  619. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/is-metadata-route.js +221 -0
  620. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/metadata-context.js +18 -0
  621. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/metadata.js +1686 -0
  622. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolve-metadata.js +884 -0
  623. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
  624. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
  625. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
  626. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
  627. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
  628. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
  629. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/extra-types.js +9 -0
  630. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/icons.js +6 -0
  631. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/manifest-types.js +6 -0
  632. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/metadata-interface.js +18 -0
  633. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/metadata-types.js +10 -0
  634. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/opengraph-types.js +6 -0
  635. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/resolvers.js +6 -0
  636. package/vendor/web/standalone/node_modules/next/dist/lib/metadata/types/twitter-types.js +7 -0
  637. package/vendor/web/standalone/node_modules/next/dist/lib/mime-type.js +20 -0
  638. package/vendor/web/standalone/node_modules/next/dist/lib/mkcert.js +204 -0
  639. package/vendor/web/standalone/node_modules/next/dist/lib/multi-file-writer.js +75 -0
  640. package/vendor/web/standalone/node_modules/next/dist/lib/needs-experimental-react.js +16 -0
  641. package/vendor/web/standalone/node_modules/next/dist/lib/non-nullable.js +15 -0
  642. package/vendor/web/standalone/node_modules/next/dist/lib/normalize-path.js +21 -0
  643. package/vendor/web/standalone/node_modules/next/dist/lib/oxford-comma-list.js +15 -0
  644. package/vendor/web/standalone/node_modules/next/dist/lib/page-types.js +18 -0
  645. package/vendor/web/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +185 -0
  646. package/vendor/web/standalone/node_modules/next/dist/lib/pick.js +19 -0
  647. package/vendor/web/standalone/node_modules/next/dist/lib/picocolors.js +177 -0
  648. package/vendor/web/standalone/node_modules/next/dist/lib/pretty-bytes.js +74 -0
  649. package/vendor/web/standalone/node_modules/next/dist/lib/realpath.js +20 -0
  650. package/vendor/web/standalone/node_modules/next/dist/lib/recursive-copy.js +76 -0
  651. package/vendor/web/standalone/node_modules/next/dist/lib/recursive-delete.js +137 -0
  652. package/vendor/web/standalone/node_modules/next/dist/lib/recursive-readdir.js +124 -0
  653. package/vendor/web/standalone/node_modules/next/dist/lib/redirect-status.js +46 -0
  654. package/vendor/web/standalone/node_modules/next/dist/lib/require-instrumentation-client.js +26 -0
  655. package/vendor/web/standalone/node_modules/next/dist/lib/resolve-build-paths.js +154 -0
  656. package/vendor/web/standalone/node_modules/next/dist/lib/resolve-from.js +65 -0
  657. package/vendor/web/standalone/node_modules/next/dist/lib/route-pattern-normalizer.js +107 -0
  658. package/vendor/web/standalone/node_modules/next/dist/lib/scheduler.js +64 -0
  659. package/vendor/web/standalone/node_modules/next/dist/lib/semver-noop.js +18 -0
  660. package/vendor/web/standalone/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  661. package/vendor/web/standalone/node_modules/next/dist/lib/setup-exception-listeners.js +11 -0
  662. package/vendor/web/standalone/node_modules/next/dist/lib/static-env.js +92 -0
  663. package/vendor/web/standalone/node_modules/next/dist/lib/try-to-parse-path.js +67 -0
  664. package/vendor/web/standalone/node_modules/next/dist/lib/turbopack-warning.js +185 -0
  665. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
  666. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +73 -0
  667. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
  668. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +27 -0
  669. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +149 -0
  670. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/type-paths.js +51 -0
  671. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +75 -0
  672. package/vendor/web/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +391 -0
  673. package/vendor/web/standalone/node_modules/next/dist/lib/url.js +75 -0
  674. package/vendor/web/standalone/node_modules/next/dist/lib/verify-partytown-setup.js +115 -0
  675. package/vendor/web/standalone/node_modules/next/dist/lib/verify-root-layout.js +165 -0
  676. package/vendor/web/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +228 -0
  677. package/vendor/web/standalone/node_modules/next/dist/lib/wait.js +19 -0
  678. package/vendor/web/standalone/node_modules/next/dist/lib/with-promise-cache.js +24 -0
  679. package/vendor/web/standalone/node_modules/next/dist/lib/worker.js +234 -0
  680. package/vendor/web/standalone/node_modules/next/dist/server/ReactDOMServerPages.js +16 -0
  681. package/vendor/web/standalone/node_modules/next/dist/server/accept-header.js +132 -0
  682. package/vendor/web/standalone/node_modules/next/dist/server/after/after-context.js +140 -0
  683. package/vendor/web/standalone/node_modules/next/dist/server/after/after.js +26 -0
  684. package/vendor/web/standalone/node_modules/next/dist/server/after/awaiter.js +74 -0
  685. package/vendor/web/standalone/node_modules/next/dist/server/after/builtin-request-context.js +38 -0
  686. package/vendor/web/standalone/node_modules/next/dist/server/after/index.js +21 -0
  687. package/vendor/web/standalone/node_modules/next/dist/server/after/run-with-after.js +35 -0
  688. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/get-cookie-parser.js +22 -0
  689. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/index.js +201 -0
  690. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +395 -0
  691. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/node/parse-body.js +79 -0
  692. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +86 -0
  693. package/vendor/web/standalone/node_modules/next/dist/server/api-utils/web.js +17 -0
  694. package/vendor/web/standalone/node_modules/next/dist/server/app-render/action-async-storage-instance.js +14 -0
  695. package/vendor/web/standalone/node_modules/next/dist/server/app-render/action-async-storage.external.js +13 -0
  696. package/vendor/web/standalone/node_modules/next/dist/server/app-render/action-handler.js +1020 -0
  697. package/vendor/web/standalone/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
  698. package/vendor/web/standalone/node_modules/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
  699. package/vendor/web/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +167 -0
  700. package/vendor/web/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +76 -0
  701. package/vendor/web/standalone/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
  702. package/vendor/web/standalone/node_modules/next/dist/server/app-render/app-render.js +4469 -0
  703. package/vendor/web/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +76 -0
  704. package/vendor/web/standalone/node_modules/next/dist/server/app-render/cache-signal.js +181 -0
  705. package/vendor/web/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +600 -0
  706. package/vendor/web/standalone/node_modules/next/dist/server/app-render/console-async-storage-instance.js +14 -0
  707. package/vendor/web/standalone/node_modules/next/dist/server/app-render/console-async-storage.external.js +13 -0
  708. package/vendor/web/standalone/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +33 -0
  709. package/vendor/web/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +840 -0
  710. package/vendor/web/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +189 -0
  711. package/vendor/web/standalone/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +102 -0
  712. package/vendor/web/standalone/node_modules/next/dist/server/app-render/csrf-protection.js +86 -0
  713. package/vendor/web/standalone/node_modules/next/dist/server/app-render/debug-channel-server.js +30 -0
  714. package/vendor/web/standalone/node_modules/next/dist/server/app-render/debug-channel-server.web.js +71 -0
  715. package/vendor/web/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
  716. package/vendor/web/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +13 -0
  717. package/vendor/web/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +1144 -0
  718. package/vendor/web/standalone/node_modules/next/dist/server/app-render/encryption-utils-server.js +114 -0
  719. package/vendor/web/standalone/node_modules/next/dist/server/app-render/encryption-utils.js +93 -0
  720. package/vendor/web/standalone/node_modules/next/dist/server/app-render/encryption.js +259 -0
  721. package/vendor/web/standalone/node_modules/next/dist/server/app-render/entry-base.js +256 -0
  722. package/vendor/web/standalone/node_modules/next/dist/server/app-render/flight-render-result.js +28 -0
  723. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-asset-query-string.js +29 -0
  724. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +49 -0
  725. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-layer-assets.js +65 -0
  726. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
  727. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +44 -0
  728. package/vendor/web/standalone/node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
  729. package/vendor/web/standalone/node_modules/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
  730. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +13 -0
  731. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +103 -0
  732. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +18 -0
  733. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +181 -0
  734. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples-client.js +128 -0
  735. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +432 -0
  736. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
  737. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +713 -0
  738. package/vendor/web/standalone/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +96 -0
  739. package/vendor/web/standalone/node_modules/next/dist/server/app-render/interop-default.js +17 -0
  740. package/vendor/web/standalone/node_modules/next/dist/server/app-render/make-get-server-inserted-html.js +92 -0
  741. package/vendor/web/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +264 -0
  742. package/vendor/web/standalone/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +28 -0
  743. package/vendor/web/standalone/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +57 -0
  744. package/vendor/web/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
  745. package/vendor/web/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +66 -0
  746. package/vendor/web/standalone/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +49 -0
  747. package/vendor/web/standalone/node_modules/next/dist/server/app-render/postponed-state.js +157 -0
  748. package/vendor/web/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +74 -0
  749. package/vendor/web/standalone/node_modules/next/dist/server/app-render/react-large-shell-error.js +17 -0
  750. package/vendor/web/standalone/node_modules/next/dist/server/app-render/react-server.node.js +39 -0
  751. package/vendor/web/standalone/node_modules/next/dist/server/app-render/render-css-resource.js +52 -0
  752. package/vendor/web/standalone/node_modules/next/dist/server/app-render/required-scripts.js +76 -0
  753. package/vendor/web/standalone/node_modules/next/dist/server/app-render/rsc/postpone.js +18 -0
  754. package/vendor/web/standalone/node_modules/next/dist/server/app-render/rsc/preloads.js +74 -0
  755. package/vendor/web/standalone/node_modules/next/dist/server/app-render/rsc/taint.js +79 -0
  756. package/vendor/web/standalone/node_modules/next/dist/server/app-render/segment-explorer-path.js +128 -0
  757. package/vendor/web/standalone/node_modules/next/dist/server/app-render/server-inserted-html.js +77 -0
  758. package/vendor/web/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +343 -0
  759. package/vendor/web/standalone/node_modules/next/dist/server/app-render/stale-time.js +111 -0
  760. package/vendor/web/standalone/node_modules/next/dist/server/app-render/stream-ops.js +106 -0
  761. package/vendor/web/standalone/node_modules/next/dist/server/app-render/stream-ops.web.js +163 -0
  762. package/vendor/web/standalone/node_modules/next/dist/server/app-render/strip-flight-headers.js +18 -0
  763. package/vendor/web/standalone/node_modules/next/dist/server/app-render/types.js +65 -0
  764. package/vendor/web/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +214 -0
  765. package/vendor/web/standalone/node_modules/next/dist/server/app-render/vary-params.js +336 -0
  766. package/vendor/web/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +232 -0
  767. package/vendor/web/standalone/node_modules/next/dist/server/app-render/work-async-storage-instance.js +14 -0
  768. package/vendor/web/standalone/node_modules/next/dist/server/app-render/work-async-storage.external.js +13 -0
  769. package/vendor/web/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
  770. package/vendor/web/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +280 -0
  771. package/vendor/web/standalone/node_modules/next/dist/server/async-storage/draft-mode-provider.js +62 -0
  772. package/vendor/web/standalone/node_modules/next/dist/server/async-storage/request-store.js +144 -0
  773. package/vendor/web/standalone/node_modules/next/dist/server/async-storage/with-store.js +6 -0
  774. package/vendor/web/standalone/node_modules/next/dist/server/async-storage/work-store.js +91 -0
  775. package/vendor/web/standalone/node_modules/next/dist/server/base-http/helpers.js +36 -0
  776. package/vendor/web/standalone/node_modules/next/dist/server/base-http/index.js +54 -0
  777. package/vendor/web/standalone/node_modules/next/dist/server/base-http/node.js +147 -0
  778. package/vendor/web/standalone/node_modules/next/dist/server/base-http/web.js +124 -0
  779. package/vendor/web/standalone/node_modules/next/dist/server/base-server.js +1874 -0
  780. package/vendor/web/standalone/node_modules/next/dist/server/body-streams.js +114 -0
  781. package/vendor/web/standalone/node_modules/next/dist/server/cache-dir.js +26 -0
  782. package/vendor/web/standalone/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  783. package/vendor/web/standalone/node_modules/next/dist/server/ci-info.js +41 -0
  784. package/vendor/web/standalone/node_modules/next/dist/server/client-component-renderer-logger.js +70 -0
  785. package/vendor/web/standalone/node_modules/next/dist/server/config-schema.js +717 -0
  786. package/vendor/web/standalone/node_modules/next/dist/server/config-shared.js +369 -0
  787. package/vendor/web/standalone/node_modules/next/dist/server/config-utils.js +185 -0
  788. package/vendor/web/standalone/node_modules/next/dist/server/config.js +1545 -0
  789. package/vendor/web/standalone/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
  790. package/vendor/web/standalone/node_modules/next/dist/server/crypto-utils.js +70 -0
  791. package/vendor/web/standalone/node_modules/next/dist/server/dev/browser-logs/file-logger.js +186 -0
  792. package/vendor/web/standalone/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +558 -0
  793. package/vendor/web/standalone/node_modules/next/dist/server/dev/browser-logs/source-map.js +222 -0
  794. package/vendor/web/standalone/node_modules/next/dist/server/dev/debug-channel.js +87 -0
  795. package/vendor/web/standalone/node_modules/next/dist/server/dev/dev-indicator-server-state.js +15 -0
  796. package/vendor/web/standalone/node_modules/next/dist/server/dev/get-source-map-from-file.js +100 -0
  797. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-middleware.js +274 -0
  798. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  799. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
  800. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1478 -0
  801. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-reloader-types.js +58 -0
  802. package/vendor/web/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1386 -0
  803. package/vendor/web/standalone/node_modules/next/dist/server/dev/log-requests.js +149 -0
  804. package/vendor/web/standalone/node_modules/next/dist/server/dev/messages.js +74 -0
  805. package/vendor/web/standalone/node_modules/next/dist/server/dev/middleware-turbopack.js +403 -0
  806. package/vendor/web/standalone/node_modules/next/dist/server/dev/middleware-webpack.js +483 -0
  807. package/vendor/web/standalone/node_modules/next/dist/server/dev/node-stack-frames.js +72 -0
  808. package/vendor/web/standalone/node_modules/next/dist/server/dev/on-demand-entry-handler.js +773 -0
  809. package/vendor/web/standalone/node_modules/next/dist/server/dev/parse-version-info.js +108 -0
  810. package/vendor/web/standalone/node_modules/next/dist/server/dev/require-cache.js +79 -0
  811. package/vendor/web/standalone/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
  812. package/vendor/web/standalone/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
  813. package/vendor/web/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +104 -0
  814. package/vendor/web/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +687 -0
  815. package/vendor/web/standalone/node_modules/next/dist/server/dynamic-rendering-utils.js +108 -0
  816. package/vendor/web/standalone/node_modules/next/dist/server/font-utils.js +43 -0
  817. package/vendor/web/standalone/node_modules/next/dist/server/get-app-route-from-entrypoint.js +30 -0
  818. package/vendor/web/standalone/node_modules/next/dist/server/get-page-files.js +23 -0
  819. package/vendor/web/standalone/node_modules/next/dist/server/get-route-from-entrypoint.js +35 -0
  820. package/vendor/web/standalone/node_modules/next/dist/server/htmlescape.js +37 -0
  821. package/vendor/web/standalone/node_modules/next/dist/server/image-optimizer.js +1220 -0
  822. package/vendor/web/standalone/node_modules/next/dist/server/instrumentation/types.js +6 -0
  823. package/vendor/web/standalone/node_modules/next/dist/server/instrumentation/utils.js +21 -0
  824. package/vendor/web/standalone/node_modules/next/dist/server/internal-utils.js +39 -0
  825. package/vendor/web/standalone/node_modules/next/dist/server/is-private-ip.js +36 -0
  826. package/vendor/web/standalone/node_modules/next/dist/server/lib/app-dir-module.js +59 -0
  827. package/vendor/web/standalone/node_modules/next/dist/server/lib/app-info-log.js +132 -0
  828. package/vendor/web/standalone/node_modules/next/dist/server/lib/async-callback-set.js +29 -0
  829. package/vendor/web/standalone/node_modules/next/dist/server/lib/cache-control.js +22 -0
  830. package/vendor/web/standalone/node_modules/next/dist/server/lib/cache-handlers/default.external.js +18 -0
  831. package/vendor/web/standalone/node_modules/next/dist/server/lib/cache-handlers/default.js +160 -0
  832. package/vendor/web/standalone/node_modules/next/dist/server/lib/cache-handlers/types.js +8 -0
  833. package/vendor/web/standalone/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +116 -0
  834. package/vendor/web/standalone/node_modules/next/dist/server/lib/clone-response.js +77 -0
  835. package/vendor/web/standalone/node_modules/next/dist/server/lib/cpu-profile.js +59 -0
  836. package/vendor/web/standalone/node_modules/next/dist/server/lib/decode-query-path-parameter.js +26 -0
  837. package/vendor/web/standalone/node_modules/next/dist/server/lib/dedupe-fetch.js +163 -0
  838. package/vendor/web/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +95 -0
  839. package/vendor/web/standalone/node_modules/next/dist/server/lib/disk-lru-cache.external.js +57 -0
  840. package/vendor/web/standalone/node_modules/next/dist/server/lib/etag.js +56 -0
  841. package/vendor/web/standalone/node_modules/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
  842. package/vendor/web/standalone/node_modules/next/dist/server/lib/experimental/ppr.js +47 -0
  843. package/vendor/web/standalone/node_modules/next/dist/server/lib/find-page-file.js +147 -0
  844. package/vendor/web/standalone/node_modules/next/dist/server/lib/fix-mojibake.js +25 -0
  845. package/vendor/web/standalone/node_modules/next/dist/server/lib/format-hostname.js +16 -0
  846. package/vendor/web/standalone/node_modules/next/dist/server/lib/i18n-provider.js +129 -0
  847. package/vendor/web/standalone/node_modules/next/dist/server/lib/implicit-tags.js +77 -0
  848. package/vendor/web/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +335 -0
  849. package/vendor/web/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +501 -0
  850. package/vendor/web/standalone/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +57 -0
  851. package/vendor/web/standalone/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +73 -0
  852. package/vendor/web/standalone/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
  853. package/vendor/web/standalone/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
  854. package/vendor/web/standalone/node_modules/next/dist/server/lib/is-ipv6.js +41 -0
  855. package/vendor/web/standalone/node_modules/next/dist/server/lib/lazy-result.js +46 -0
  856. package/vendor/web/standalone/node_modules/next/dist/server/lib/lru-cache.js +191 -0
  857. package/vendor/web/standalone/node_modules/next/dist/server/lib/match-next-data-pathname.js +18 -0
  858. package/vendor/web/standalone/node_modules/next/dist/server/lib/mock-request.js +416 -0
  859. package/vendor/web/standalone/node_modules/next/dist/server/lib/module-loader/module-loader.js +8 -0
  860. package/vendor/web/standalone/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +25 -0
  861. package/vendor/web/standalone/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +26 -0
  862. package/vendor/web/standalone/node_modules/next/dist/server/lib/node-fs-methods.js +28 -0
  863. package/vendor/web/standalone/node_modules/next/dist/server/lib/parse-stack.js +46 -0
  864. package/vendor/web/standalone/node_modules/next/dist/server/lib/patch-fetch.js +978 -0
  865. package/vendor/web/standalone/node_modules/next/dist/server/lib/patch-set-header.js +38 -0
  866. package/vendor/web/standalone/node_modules/next/dist/server/lib/postponed-request-body.js +64 -0
  867. package/vendor/web/standalone/node_modules/next/dist/server/lib/render-server.js +155 -0
  868. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-server.js +683 -0
  869. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +110 -0
  870. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/build-data-route.js +48 -0
  871. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
  872. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +211 -0
  873. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +42 -0
  874. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +591 -0
  875. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +89 -0
  876. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +96 -0
  877. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/is-postpone.js +16 -0
  878. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/proxy-request.js +118 -0
  879. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +629 -0
  880. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +286 -0
  881. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/router-server-context.js +26 -0
  882. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/typegen.js +858 -0
  883. package/vendor/web/standalone/node_modules/next/dist/server/lib/router-utils/types.js +6 -0
  884. package/vendor/web/standalone/node_modules/next/dist/server/lib/server-action-request-meta.js +53 -0
  885. package/vendor/web/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +81 -0
  886. package/vendor/web/standalone/node_modules/next/dist/server/lib/source-maps.js +196 -0
  887. package/vendor/web/standalone/node_modules/next/dist/server/lib/start-server.js +494 -0
  888. package/vendor/web/standalone/node_modules/next/dist/server/lib/streaming-metadata.js +38 -0
  889. package/vendor/web/standalone/node_modules/next/dist/server/lib/to-route.js +37 -0
  890. package/vendor/web/standalone/node_modules/next/dist/server/lib/trace/constants.js +203 -0
  891. package/vendor/web/standalone/node_modules/next/dist/server/lib/trace/tracer.js +280 -0
  892. package/vendor/web/standalone/node_modules/next/dist/server/lib/trace/utils.js +16 -0
  893. package/vendor/web/standalone/node_modules/next/dist/server/lib/types.js +6 -0
  894. package/vendor/web/standalone/node_modules/next/dist/server/lib/utils.js +278 -0
  895. package/vendor/web/standalone/node_modules/next/dist/server/lib/worker-utils.js +36 -0
  896. package/vendor/web/standalone/node_modules/next/dist/server/load-components.js +179 -0
  897. package/vendor/web/standalone/node_modules/next/dist/server/load-default-error-components.js +41 -0
  898. package/vendor/web/standalone/node_modules/next/dist/server/load-manifest.external.js +117 -0
  899. package/vendor/web/standalone/node_modules/next/dist/server/match-bundle.js +25 -0
  900. package/vendor/web/standalone/node_modules/next/dist/server/mcp/get-mcp-middleware.js +49 -0
  901. package/vendor/web/standalone/node_modules/next/dist/server/mcp/get-or-create-mcp-server.js +41 -0
  902. package/vendor/web/standalone/node_modules/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
  903. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-errors.js +114 -0
  904. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-logs.js +67 -0
  905. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
  906. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
  907. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-routes.js +136 -0
  908. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
  909. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
  910. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +90 -0
  911. package/vendor/web/standalone/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
  912. package/vendor/web/standalone/node_modules/next/dist/server/next-server.js +1429 -0
  913. package/vendor/web/standalone/node_modules/next/dist/server/next-typescript.js +13 -0
  914. package/vendor/web/standalone/node_modules/next/dist/server/next.js +455 -0
  915. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-baseline.js +25 -0
  916. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +301 -0
  917. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/console-exit.js +49 -0
  918. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/console-file.js +56 -0
  919. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/date.js +52 -0
  920. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
  921. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +577 -0
  922. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +33 -0
  923. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/io-utils.js +195 -0
  924. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
  925. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +91 -0
  926. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/random.js +28 -0
  927. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +508 -0
  928. package/vendor/web/standalone/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
  929. package/vendor/web/standalone/node_modules/next/dist/server/node-environment.js +19 -0
  930. package/vendor/web/standalone/node_modules/next/dist/server/node-polyfill-crypto.js +21 -0
  931. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
  932. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
  933. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
  934. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
  935. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
  936. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/app/index.js +42 -0
  937. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/pages/index.js +44 -0
  938. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
  939. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
  940. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
  941. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
  942. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
  943. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/normalizer.js +6 -0
  944. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/normalizers.js +23 -0
  945. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
  946. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/base-path.js +25 -0
  947. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/next-data.js +38 -0
  948. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
  949. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/prefix.js +39 -0
  950. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/rsc.js +19 -0
  951. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
  952. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/request/suffix.js +27 -0
  953. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/underscore-normalizer.js +17 -0
  954. package/vendor/web/standalone/node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
  955. package/vendor/web/standalone/node_modules/next/dist/server/og/image-response.js +53 -0
  956. package/vendor/web/standalone/node_modules/next/dist/server/patch-error-inspect.js +453 -0
  957. package/vendor/web/standalone/node_modules/next/dist/server/pipe-readable.js +140 -0
  958. package/vendor/web/standalone/node_modules/next/dist/server/post-process.js +39 -0
  959. package/vendor/web/standalone/node_modules/next/dist/server/render-result.js +204 -0
  960. package/vendor/web/standalone/node_modules/next/dist/server/render.js +1140 -0
  961. package/vendor/web/standalone/node_modules/next/dist/server/request/connection.js +133 -0
  962. package/vendor/web/standalone/node_modules/next/dist/server/request/cookies.js +235 -0
  963. package/vendor/web/standalone/node_modules/next/dist/server/request/draft-mode.js +230 -0
  964. package/vendor/web/standalone/node_modules/next/dist/server/request/fallback-params.js +69 -0
  965. package/vendor/web/standalone/node_modules/next/dist/server/request/headers.js +229 -0
  966. package/vendor/web/standalone/node_modules/next/dist/server/request/params.js +527 -0
  967. package/vendor/web/standalone/node_modules/next/dist/server/request/pathname.js +119 -0
  968. package/vendor/web/standalone/node_modules/next/dist/server/request/root-params.js +194 -0
  969. package/vendor/web/standalone/node_modules/next/dist/server/request/search-params.js +526 -0
  970. package/vendor/web/standalone/node_modules/next/dist/server/request/utils.js +51 -0
  971. package/vendor/web/standalone/node_modules/next/dist/server/request-meta.js +55 -0
  972. package/vendor/web/standalone/node_modules/next/dist/server/require-hook.js +82 -0
  973. package/vendor/web/standalone/node_modules/next/dist/server/require.js +109 -0
  974. package/vendor/web/standalone/node_modules/next/dist/server/response-cache/index.js +311 -0
  975. package/vendor/web/standalone/node_modules/next/dist/server/response-cache/types.js +41 -0
  976. package/vendor/web/standalone/node_modules/next/dist/server/response-cache/utils.js +104 -0
  977. package/vendor/web/standalone/node_modules/next/dist/server/response-cache/web.js +101 -0
  978. package/vendor/web/standalone/node_modules/next/dist/server/resume-data-cache/cache-store.js +96 -0
  979. package/vendor/web/standalone/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +124 -0
  980. package/vendor/web/standalone/node_modules/next/dist/server/revalidation-utils.js +157 -0
  981. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
  982. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
  983. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/locale-route-definition.js +6 -0
  984. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
  985. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/pages-route-definition.js +6 -0
  986. package/vendor/web/standalone/node_modules/next/dist/server/route-definitions/route-definition.js +6 -0
  987. package/vendor/web/standalone/node_modules/next/dist/server/route-kind.js +32 -0
  988. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +239 -0
  989. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +120 -0
  990. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-managers/route-matcher-manager.js +6 -0
  991. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +55 -0
  992. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +43 -0
  993. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +91 -0
  994. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +112 -0
  995. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +77 -0
  996. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +77 -0
  997. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +28 -0
  998. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +106 -0
  999. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +42 -0
  1000. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/file-reader.js +6 -0
  1001. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +30 -0
  1002. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/manifest-loader.js +6 -0
  1003. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +34 -0
  1004. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +20 -0
  1005. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +21 -0
  1006. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +55 -0
  1007. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +64 -0
  1008. package/vendor/web/standalone/node_modules/next/dist/server/route-matcher-providers/route-matcher-provider.js +6 -0
  1009. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/app-page-route-matcher.js +18 -0
  1010. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/app-route-route-matcher.js +15 -0
  1011. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/locale-route-matcher.js +68 -0
  1012. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js +30 -0
  1013. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/pages-route-matcher.js +30 -0
  1014. package/vendor/web/standalone/node_modules/next/dist/server/route-matchers/route-matcher.js +54 -0
  1015. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/app-page-route-match.js +6 -0
  1016. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/app-route-route-match.js +6 -0
  1017. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/locale-route-match.js +6 -0
  1018. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/pages-api-route-match.js +16 -0
  1019. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/pages-route-match.js +6 -0
  1020. package/vendor/web/standalone/node_modules/next/dist/server/route-matches/route-match.js +6 -0
  1021. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +51 -0
  1022. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
  1023. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/module.js +162 -0
  1024. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/module.render.js +24 -0
  1025. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +25 -0
  1026. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
  1027. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
  1028. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
  1029. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
  1030. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
  1031. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
  1032. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
  1033. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +140 -0
  1034. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
  1035. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
  1036. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
  1037. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
  1038. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
  1039. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
  1040. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
  1041. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
  1042. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
  1043. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +125 -0
  1044. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
  1045. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
  1046. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
  1047. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
  1048. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
  1049. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
  1050. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
  1051. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
  1052. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +85 -0
  1053. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
  1054. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
  1055. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
  1056. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
  1057. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
  1058. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +899 -0
  1059. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
  1060. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/checks.js +45 -0
  1061. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
  1062. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/module.compiled.js +20 -0
  1063. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/module.js +92 -0
  1064. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/module.render.js +24 -0
  1065. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +545 -0
  1066. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
  1067. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
  1068. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
  1069. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
  1070. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
  1071. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
  1072. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
  1073. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
  1074. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
  1075. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
  1076. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
  1077. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/pages-api/module.js +58 -0
  1078. package/vendor/web/standalone/node_modules/next/dist/server/route-modules/route-module.js +650 -0
  1079. package/vendor/web/standalone/node_modules/next/dist/server/runtime-reacts.external.js +46 -0
  1080. package/vendor/web/standalone/node_modules/next/dist/server/send-payload.js +88 -0
  1081. package/vendor/web/standalone/node_modules/next/dist/server/send-response.js +70 -0
  1082. package/vendor/web/standalone/node_modules/next/dist/server/serve-static.js +66 -0
  1083. package/vendor/web/standalone/node_modules/next/dist/server/server-route-utils.js +30 -0
  1084. package/vendor/web/standalone/node_modules/next/dist/server/server-utils.js +323 -0
  1085. package/vendor/web/standalone/node_modules/next/dist/server/setup-http-agent-env.js +31 -0
  1086. package/vendor/web/standalone/node_modules/next/dist/server/stream-utils/encoded-tags.js +122 -0
  1087. package/vendor/web/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +918 -0
  1088. package/vendor/web/standalone/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
  1089. package/vendor/web/standalone/node_modules/next/dist/server/typescript/constant.js +98 -0
  1090. package/vendor/web/standalone/node_modules/next/dist/server/typescript/index.js +199 -0
  1091. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/client-boundary.js +97 -0
  1092. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/config.js +512 -0
  1093. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/entry.js +149 -0
  1094. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/error.js +38 -0
  1095. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/metadata.js +234 -0
  1096. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/server-boundary.js +115 -0
  1097. package/vendor/web/standalone/node_modules/next/dist/server/typescript/rules/server.js +79 -0
  1098. package/vendor/web/standalone/node_modules/next/dist/server/typescript/utils.js +212 -0
  1099. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/cache-life.js +163 -0
  1100. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/cache-tag.js +52 -0
  1101. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/constants.js +28 -0
  1102. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/handlers.js +121 -0
  1103. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/use-cache-errors.js +36 -0
  1104. package/vendor/web/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +1588 -0
  1105. package/vendor/web/standalone/node_modules/next/dist/server/utils.js +73 -0
  1106. package/vendor/web/standalone/node_modules/next/dist/server/web/adapter.js +392 -0
  1107. package/vendor/web/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +123 -0
  1108. package/vendor/web/standalone/node_modules/next/dist/server/web/error.js +54 -0
  1109. package/vendor/web/standalone/node_modules/next/dist/server/web/exports/index.js +56 -0
  1110. package/vendor/web/standalone/node_modules/next/dist/server/web/get-edge-preview-props.js +23 -0
  1111. package/vendor/web/standalone/node_modules/next/dist/server/web/globals.js +128 -0
  1112. package/vendor/web/standalone/node_modules/next/dist/server/web/http.js +39 -0
  1113. package/vendor/web/standalone/node_modules/next/dist/server/web/internal-edge-wait-until.js +64 -0
  1114. package/vendor/web/standalone/node_modules/next/dist/server/web/next-url.js +199 -0
  1115. package/vendor/web/standalone/node_modules/next/dist/server/web/sandbox/context.js +462 -0
  1116. package/vendor/web/standalone/node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
  1117. package/vendor/web/standalone/node_modules/next/dist/server/web/sandbox/index.js +28 -0
  1118. package/vendor/web/standalone/node_modules/next/dist/server/web/sandbox/resource-managers.js +88 -0
  1119. package/vendor/web/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js +137 -0
  1120. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +192 -0
  1121. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +142 -0
  1122. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
  1123. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +211 -0
  1124. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/cookies.js +29 -0
  1125. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/fetch-event.js +98 -0
  1126. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/image-response.js +22 -0
  1127. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/request.js +99 -0
  1128. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/response.js +136 -0
  1129. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +214 -0
  1130. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +289 -0
  1131. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +51 -0
  1132. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/url-pattern.js +14 -0
  1133. package/vendor/web/standalone/node_modules/next/dist/server/web/spec-extension/user-agent.js +46 -0
  1134. package/vendor/web/standalone/node_modules/next/dist/server/web/types.js +6 -0
  1135. package/vendor/web/standalone/node_modules/next/dist/server/web/utils.js +151 -0
  1136. package/vendor/web/standalone/node_modules/next/dist/server/web/web-on-close.js +87 -0
  1137. package/vendor/web/standalone/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  1138. package/vendor/web/standalone/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
  1139. package/vendor/web/standalone/node_modules/next/dist/shared/lib/app-router-types.js +46 -0
  1140. package/vendor/web/standalone/node_modules/next/dist/shared/lib/constants.js +448 -0
  1141. package/vendor/web/standalone/node_modules/next/dist/shared/lib/deep-freeze.js +30 -0
  1142. package/vendor/web/standalone/node_modules/next/dist/shared/lib/deployment-id.js +63 -0
  1143. package/vendor/web/standalone/node_modules/next/dist/shared/lib/dset.js +34 -0
  1144. package/vendor/web/standalone/node_modules/next/dist/shared/lib/encode-uri-path.js +15 -0
  1145. package/vendor/web/standalone/node_modules/next/dist/shared/lib/entry-constants.js +36 -0
  1146. package/vendor/web/standalone/node_modules/next/dist/shared/lib/error-source.js +36 -0
  1147. package/vendor/web/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +39 -0
  1148. package/vendor/web/standalone/node_modules/next/dist/shared/lib/errors/code-frame.js +20 -0
  1149. package/vendor/web/standalone/node_modules/next/dist/shared/lib/errors/constants.js +19 -0
  1150. package/vendor/web/standalone/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +24 -0
  1151. package/vendor/web/standalone/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +20 -0
  1152. package/vendor/web/standalone/node_modules/next/dist/shared/lib/escape-regexp.js +22 -0
  1153. package/vendor/web/standalone/node_modules/next/dist/shared/lib/get-hostname.js +23 -0
  1154. package/vendor/web/standalone/node_modules/next/dist/shared/lib/hash.js +42 -0
  1155. package/vendor/web/standalone/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
  1156. package/vendor/web/standalone/node_modules/next/dist/shared/lib/head.js +163 -0
  1157. package/vendor/web/standalone/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
  1158. package/vendor/web/standalone/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +40 -0
  1159. package/vendor/web/standalone/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
  1160. package/vendor/web/standalone/node_modules/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
  1161. package/vendor/web/standalone/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
  1162. package/vendor/web/standalone/node_modules/next/dist/shared/lib/image-blur-svg.js +22 -0
  1163. package/vendor/web/standalone/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
  1164. package/vendor/web/standalone/node_modules/next/dist/shared/lib/image-config.js +77 -0
  1165. package/vendor/web/standalone/node_modules/next/dist/shared/lib/invariant-error.js +18 -0
  1166. package/vendor/web/standalone/node_modules/next/dist/shared/lib/is-plain-object.js +42 -0
  1167. package/vendor/web/standalone/node_modules/next/dist/shared/lib/is-thenable.js +20 -0
  1168. package/vendor/web/standalone/node_modules/next/dist/shared/lib/isomorphic/path.js +14 -0
  1169. package/vendor/web/standalone/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
  1170. package/vendor/web/standalone/node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
  1171. package/vendor/web/standalone/node_modules/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
  1172. package/vendor/web/standalone/node_modules/next/dist/shared/lib/match-local-pattern.js +46 -0
  1173. package/vendor/web/standalone/node_modules/next/dist/shared/lib/match-remote-pattern.js +63 -0
  1174. package/vendor/web/standalone/node_modules/next/dist/shared/lib/modern-browserslist-target.js +15 -0
  1175. package/vendor/web/standalone/node_modules/next/dist/shared/lib/no-fallback-error.external.js +18 -0
  1176. package/vendor/web/standalone/node_modules/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
  1177. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
  1178. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
  1179. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
  1180. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
  1181. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
  1182. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
  1183. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
  1184. package/vendor/web/standalone/node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
  1185. package/vendor/web/standalone/node_modules/next/dist/shared/lib/promise-with-resolvers.js +26 -0
  1186. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/adapters.js +136 -0
  1187. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +122 -0
  1188. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/add-locale.js +28 -0
  1189. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
  1190. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
  1191. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +62 -0
  1192. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
  1193. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +24 -0
  1194. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
  1195. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
  1196. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/format-url.js +111 -0
  1197. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +174 -0
  1198. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
  1199. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
  1200. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
  1201. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/html-bots.js +17 -0
  1202. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/index.js +30 -0
  1203. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  1204. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +108 -0
  1205. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/is-bot.js +57 -0
  1206. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  1207. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
  1208. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
  1209. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
  1210. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +43 -0
  1211. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/parse-url.js +38 -0
  1212. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
  1213. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/path-match.js +49 -0
  1214. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +292 -0
  1215. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/querystring.js +79 -0
  1216. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
  1217. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
  1218. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +21 -0
  1219. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
  1220. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
  1221. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +45 -0
  1222. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/route-regex.js +256 -0
  1223. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +244 -0
  1224. package/vendor/web/standalone/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
  1225. package/vendor/web/standalone/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +99 -0
  1226. package/vendor/web/standalone/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +32 -0
  1227. package/vendor/web/standalone/node_modules/next/dist/shared/lib/segment.js +102 -0
  1228. package/vendor/web/standalone/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
  1229. package/vendor/web/standalone/node_modules/next/dist/shared/lib/server-reference-info.js +56 -0
  1230. package/vendor/web/standalone/node_modules/next/dist/shared/lib/side-effect.js +63 -0
  1231. package/vendor/web/standalone/node_modules/next/dist/shared/lib/size-limit.js +40 -0
  1232. package/vendor/web/standalone/node_modules/next/dist/shared/lib/turbopack/internal-error.js +53 -0
  1233. package/vendor/web/standalone/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
  1234. package/vendor/web/standalone/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
  1235. package/vendor/web/standalone/node_modules/next/dist/shared/lib/utils.js +207 -0
  1236. package/vendor/web/standalone/node_modules/next/dist/shared/lib/zod.js +101 -0
  1237. package/vendor/web/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +89 -0
  1238. package/vendor/web/standalone/node_modules/next/dist/telemetry/detached-flush.js +56 -0
  1239. package/vendor/web/standalone/node_modules/next/dist/telemetry/events/build.js +174 -0
  1240. package/vendor/web/standalone/node_modules/next/dist/telemetry/events/index.js +41 -0
  1241. package/vendor/web/standalone/node_modules/next/dist/telemetry/events/plugins.js +51 -0
  1242. package/vendor/web/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
  1243. package/vendor/web/standalone/node_modules/next/dist/telemetry/events/version.js +66 -0
  1244. package/vendor/web/standalone/node_modules/next/dist/telemetry/flush-telemetry.js +19 -0
  1245. package/vendor/web/standalone/node_modules/next/dist/telemetry/post-telemetry-payload.js +48 -0
  1246. package/vendor/web/standalone/node_modules/next/dist/telemetry/project-id.js +48 -0
  1247. package/vendor/web/standalone/node_modules/next/dist/telemetry/storage.js +301 -0
  1248. package/vendor/web/standalone/node_modules/next/dist/trace/index.js +58 -0
  1249. package/vendor/web/standalone/node_modules/next/dist/trace/report/index.js +37 -0
  1250. package/vendor/web/standalone/node_modules/next/dist/trace/report/to-json-build.js +40 -0
  1251. package/vendor/web/standalone/node_modules/next/dist/trace/report/to-json.js +165 -0
  1252. package/vendor/web/standalone/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
  1253. package/vendor/web/standalone/node_modules/next/dist/trace/shared.js +39 -0
  1254. package/vendor/web/standalone/node_modules/next/dist/trace/trace.js +211 -0
  1255. package/vendor/web/standalone/node_modules/next/package.json +378 -0
  1256. package/vendor/web/standalone/node_modules/oniguruma-parser/dist/parser/node-utils.js +2 -0
  1257. package/vendor/web/standalone/node_modules/oniguruma-parser/dist/parser/parse.js +2 -0
  1258. package/vendor/web/standalone/node_modules/oniguruma-parser/dist/tokenizer/tokenize.js +34 -0
  1259. package/vendor/web/standalone/node_modules/oniguruma-parser/dist/traverser/traverse.js +2 -0
  1260. package/vendor/web/standalone/node_modules/oniguruma-parser/dist/utils.js +2 -0
  1261. package/vendor/web/standalone/node_modules/oniguruma-to-es/dist/esm/index.js +1876 -0
  1262. package/vendor/web/standalone/node_modules/oniguruma-to-es/dist/esm/package.json +1 -0
  1263. package/vendor/web/standalone/node_modules/oniguruma-to-es/package.json +4 -4
  1264. package/vendor/web/standalone/node_modules/property-information/index.js +17 -0
  1265. package/vendor/web/standalone/node_modules/property-information/lib/aria.js +61 -0
  1266. package/vendor/web/standalone/node_modules/property-information/lib/find.js +97 -0
  1267. package/vendor/web/standalone/node_modules/property-information/lib/hast-to-react.js +30 -0
  1268. package/vendor/web/standalone/node_modules/property-information/lib/html.js +322 -0
  1269. package/vendor/web/standalone/node_modules/property-information/lib/normalize.js +12 -0
  1270. package/vendor/web/standalone/node_modules/property-information/lib/svg.js +567 -0
  1271. package/vendor/web/standalone/node_modules/property-information/lib/util/case-insensitive-transform.js +13 -0
  1272. package/vendor/web/standalone/node_modules/property-information/lib/util/case-sensitive-transform.js +11 -0
  1273. package/vendor/web/standalone/node_modules/property-information/lib/util/create.js +69 -0
  1274. package/vendor/web/standalone/node_modules/property-information/lib/util/defined-info.js +60 -0
  1275. package/vendor/web/standalone/node_modules/property-information/lib/util/info.js +32 -0
  1276. package/vendor/web/standalone/node_modules/property-information/lib/util/merge.js +27 -0
  1277. package/vendor/web/standalone/node_modules/property-information/lib/util/schema.js +29 -0
  1278. package/vendor/web/standalone/node_modules/property-information/lib/util/types.js +13 -0
  1279. package/vendor/web/standalone/node_modules/property-information/lib/xlink.js +17 -0
  1280. package/vendor/web/standalone/node_modules/property-information/lib/xml.js +9 -0
  1281. package/vendor/web/standalone/node_modules/property-information/lib/xmlns.js +9 -0
  1282. package/vendor/web/standalone/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  1283. package/vendor/web/standalone/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  1284. package/vendor/web/standalone/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  1285. package/vendor/web/standalone/node_modules/react/cjs/react.development.js +1284 -0
  1286. package/vendor/web/standalone/node_modules/react/cjs/react.production.js +542 -0
  1287. package/vendor/web/standalone/node_modules/react/compiler-runtime.js +14 -0
  1288. package/vendor/web/standalone/node_modules/react/index.js +7 -0
  1289. package/vendor/web/standalone/node_modules/react/jsx-dev-runtime.js +7 -0
  1290. package/vendor/web/standalone/node_modules/react/jsx-runtime.js +7 -0
  1291. package/vendor/web/standalone/node_modules/react/package.json +1 -1
  1292. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
  1293. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
  1294. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7410 -0
  1295. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7512 -0
  1296. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +7707 -0
  1297. package/vendor/web/standalone/node_modules/react-dom/cjs/react-dom.production.js +210 -0
  1298. package/vendor/web/standalone/node_modules/react-dom/index.js +38 -0
  1299. package/vendor/web/standalone/node_modules/react-dom/package.json +2 -2
  1300. package/vendor/web/standalone/node_modules/react-dom/server.browser.js +16 -0
  1301. package/vendor/web/standalone/node_modules/react-dom/server.edge.js +17 -0
  1302. package/vendor/web/standalone/node_modules/react-dom/server.node.js +18 -0
  1303. package/vendor/web/standalone/node_modules/react-dom/static.node.js +14 -0
  1304. package/vendor/web/standalone/node_modules/regex/src/atomic.js +224 -0
  1305. package/vendor/web/standalone/node_modules/regex/src/internals.js +2 -0
  1306. package/vendor/web/standalone/node_modules/regex/src/subclass.js +98 -0
  1307. package/vendor/web/standalone/node_modules/regex/src/utils-internals.js +33 -0
  1308. package/vendor/web/standalone/node_modules/regex-recursion/src/index.js +365 -0
  1309. package/vendor/web/standalone/node_modules/regex-utilities/src/index.js +170 -0
  1310. package/vendor/web/standalone/node_modules/sharp/lib/channel.js +177 -0
  1311. package/vendor/web/standalone/node_modules/sharp/lib/colour.js +195 -0
  1312. package/vendor/web/standalone/node_modules/sharp/lib/composite.js +212 -0
  1313. package/vendor/web/standalone/node_modules/sharp/lib/constructor.js +499 -0
  1314. package/vendor/web/standalone/node_modules/sharp/lib/index.js +16 -0
  1315. package/vendor/web/standalone/node_modules/sharp/lib/input.js +809 -0
  1316. package/vendor/web/standalone/node_modules/sharp/lib/is.js +143 -0
  1317. package/vendor/web/standalone/node_modules/sharp/lib/libvips.js +207 -0
  1318. package/vendor/web/standalone/node_modules/sharp/lib/operation.js +1016 -0
  1319. package/vendor/web/standalone/node_modules/sharp/lib/output.js +1666 -0
  1320. package/vendor/web/standalone/node_modules/sharp/lib/resize.js +595 -0
  1321. package/vendor/web/standalone/node_modules/sharp/lib/sharp.js +121 -0
  1322. package/vendor/web/standalone/node_modules/sharp/lib/utility.js +291 -0
  1323. package/vendor/web/standalone/node_modules/space-separated-tokens/index.js +24 -0
  1324. package/vendor/web/standalone/node_modules/stringify-entities/index.js +6 -0
  1325. package/vendor/web/standalone/node_modules/stringify-entities/lib/constant/dangerous.js +16 -0
  1326. package/vendor/web/standalone/node_modules/stringify-entities/lib/core.js +117 -0
  1327. package/vendor/web/standalone/node_modules/stringify-entities/lib/index.js +36 -0
  1328. package/vendor/web/standalone/node_modules/stringify-entities/lib/util/format-basic.js +9 -0
  1329. package/vendor/web/standalone/node_modules/stringify-entities/lib/util/format-smart.js +69 -0
  1330. package/vendor/web/standalone/node_modules/stringify-entities/lib/util/to-decimal.js +16 -0
  1331. package/vendor/web/standalone/node_modules/stringify-entities/lib/util/to-hexadecimal.js +16 -0
  1332. package/vendor/web/standalone/node_modules/stringify-entities/lib/util/to-named.js +57 -0
  1333. package/vendor/web/standalone/node_modules/zwitch/index.js +118 -0
@@ -0,0 +1,3216 @@
1
+ // src/utils.ts
2
+ function clone(something) {
3
+ return doClone(something);
4
+ }
5
+ function doClone(something) {
6
+ if (Array.isArray(something)) {
7
+ return cloneArray(something);
8
+ }
9
+ if (something instanceof RegExp) {
10
+ return something;
11
+ }
12
+ if (typeof something === "object") {
13
+ return cloneObj(something);
14
+ }
15
+ return something;
16
+ }
17
+ function cloneArray(arr) {
18
+ let r = [];
19
+ for (let i = 0, len = arr.length; i < len; i++) {
20
+ r[i] = doClone(arr[i]);
21
+ }
22
+ return r;
23
+ }
24
+ function cloneObj(obj) {
25
+ let r = {};
26
+ for (let key in obj) {
27
+ r[key] = doClone(obj[key]);
28
+ }
29
+ return r;
30
+ }
31
+ function mergeObjects(target, ...sources) {
32
+ sources.forEach((source) => {
33
+ for (let key in source) {
34
+ target[key] = source[key];
35
+ }
36
+ });
37
+ return target;
38
+ }
39
+ function basename(path) {
40
+ const idx = ~path.lastIndexOf("/") || ~path.lastIndexOf("\\");
41
+ if (idx === 0) {
42
+ return path;
43
+ } else if (~idx === path.length - 1) {
44
+ return basename(path.substring(0, path.length - 1));
45
+ } else {
46
+ return path.substr(~idx + 1);
47
+ }
48
+ }
49
+ var CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;
50
+ var RegexSource = class {
51
+ static hasCaptures(regexSource) {
52
+ if (regexSource === null) {
53
+ return false;
54
+ }
55
+ CAPTURING_REGEX_SOURCE.lastIndex = 0;
56
+ return CAPTURING_REGEX_SOURCE.test(regexSource);
57
+ }
58
+ static replaceCaptures(regexSource, captureSource, captureIndices) {
59
+ return regexSource.replace(CAPTURING_REGEX_SOURCE, (match, index, commandIndex, command) => {
60
+ let capture = captureIndices[parseInt(index || commandIndex, 10)];
61
+ if (capture) {
62
+ let result = captureSource.substring(capture.start, capture.end);
63
+ while (result[0] === ".") {
64
+ result = result.substring(1);
65
+ }
66
+ switch (command) {
67
+ case "downcase":
68
+ return result.toLowerCase();
69
+ case "upcase":
70
+ return result.toUpperCase();
71
+ default:
72
+ return result;
73
+ }
74
+ } else {
75
+ return match;
76
+ }
77
+ });
78
+ }
79
+ };
80
+ function strcmp(a, b) {
81
+ if (a < b) {
82
+ return -1;
83
+ }
84
+ if (a > b) {
85
+ return 1;
86
+ }
87
+ return 0;
88
+ }
89
+ function strArrCmp(a, b) {
90
+ if (a === null && b === null) {
91
+ return 0;
92
+ }
93
+ if (!a) {
94
+ return -1;
95
+ }
96
+ if (!b) {
97
+ return 1;
98
+ }
99
+ let len1 = a.length;
100
+ let len2 = b.length;
101
+ if (len1 === len2) {
102
+ for (let i = 0; i < len1; i++) {
103
+ let res = strcmp(a[i], b[i]);
104
+ if (res !== 0) {
105
+ return res;
106
+ }
107
+ }
108
+ return 0;
109
+ }
110
+ return len1 - len2;
111
+ }
112
+ function isValidHexColor(hex) {
113
+ if (/^#[0-9a-f]{6}$/i.test(hex)) {
114
+ return true;
115
+ }
116
+ if (/^#[0-9a-f]{8}$/i.test(hex)) {
117
+ return true;
118
+ }
119
+ if (/^#[0-9a-f]{3}$/i.test(hex)) {
120
+ return true;
121
+ }
122
+ if (/^#[0-9a-f]{4}$/i.test(hex)) {
123
+ return true;
124
+ }
125
+ return false;
126
+ }
127
+ function escapeRegExpCharacters(value) {
128
+ return value.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g, "\\$&");
129
+ }
130
+ var CachedFn = class {
131
+ constructor(fn) {
132
+ this.fn = fn;
133
+ }
134
+ cache = /* @__PURE__ */ new Map();
135
+ get(key) {
136
+ if (this.cache.has(key)) {
137
+ return this.cache.get(key);
138
+ }
139
+ const value = this.fn(key);
140
+ this.cache.set(key, value);
141
+ return value;
142
+ }
143
+ };
144
+
145
+ // src/theme.ts
146
+ var Theme = class {
147
+ constructor(_colorMap, _defaults, _root) {
148
+ this._colorMap = _colorMap;
149
+ this._defaults = _defaults;
150
+ this._root = _root;
151
+ }
152
+ static createFromRawTheme(source, colorMap) {
153
+ return this.createFromParsedTheme(parseTheme(source), colorMap);
154
+ }
155
+ static createFromParsedTheme(source, colorMap) {
156
+ return resolveParsedThemeRules(source, colorMap);
157
+ }
158
+ _cachedMatchRoot = new CachedFn(
159
+ (scopeName) => this._root.match(scopeName)
160
+ );
161
+ getColorMap() {
162
+ return this._colorMap.getColorMap();
163
+ }
164
+ getDefaults() {
165
+ return this._defaults;
166
+ }
167
+ match(scopePath) {
168
+ if (scopePath === null) {
169
+ return this._defaults;
170
+ }
171
+ const scopeName = scopePath.scopeName;
172
+ const matchingTrieElements = this._cachedMatchRoot.get(scopeName);
173
+ const effectiveRule = matchingTrieElements.find(
174
+ (v) => _scopePathMatchesParentScopes(scopePath.parent, v.parentScopes)
175
+ );
176
+ if (!effectiveRule) {
177
+ return null;
178
+ }
179
+ return new StyleAttributes(
180
+ effectiveRule.fontStyle,
181
+ effectiveRule.foreground,
182
+ effectiveRule.background
183
+ );
184
+ }
185
+ };
186
+ var ScopeStack = class _ScopeStack {
187
+ constructor(parent, scopeName) {
188
+ this.parent = parent;
189
+ this.scopeName = scopeName;
190
+ }
191
+ static push(path, scopeNames) {
192
+ for (const name of scopeNames) {
193
+ path = new _ScopeStack(path, name);
194
+ }
195
+ return path;
196
+ }
197
+ static from(...segments) {
198
+ let result = null;
199
+ for (let i = 0; i < segments.length; i++) {
200
+ result = new _ScopeStack(result, segments[i]);
201
+ }
202
+ return result;
203
+ }
204
+ push(scopeName) {
205
+ return new _ScopeStack(this, scopeName);
206
+ }
207
+ getSegments() {
208
+ let item = this;
209
+ const result = [];
210
+ while (item) {
211
+ result.push(item.scopeName);
212
+ item = item.parent;
213
+ }
214
+ result.reverse();
215
+ return result;
216
+ }
217
+ toString() {
218
+ return this.getSegments().join(" ");
219
+ }
220
+ extends(other) {
221
+ if (this === other) {
222
+ return true;
223
+ }
224
+ if (this.parent === null) {
225
+ return false;
226
+ }
227
+ return this.parent.extends(other);
228
+ }
229
+ getExtensionIfDefined(base) {
230
+ const result = [];
231
+ let item = this;
232
+ while (item && item !== base) {
233
+ result.push(item.scopeName);
234
+ item = item.parent;
235
+ }
236
+ return item === base ? result.reverse() : void 0;
237
+ }
238
+ };
239
+ function _scopePathMatchesParentScopes(scopePath, parentScopes) {
240
+ if (parentScopes.length === 0) {
241
+ return true;
242
+ }
243
+ for (let index = 0; index < parentScopes.length; index++) {
244
+ let scopePattern = parentScopes[index];
245
+ let scopeMustMatch = false;
246
+ if (scopePattern === ">") {
247
+ if (index === parentScopes.length - 1) {
248
+ return false;
249
+ }
250
+ scopePattern = parentScopes[++index];
251
+ scopeMustMatch = true;
252
+ }
253
+ while (scopePath) {
254
+ if (_matchesScope(scopePath.scopeName, scopePattern)) {
255
+ break;
256
+ }
257
+ if (scopeMustMatch) {
258
+ return false;
259
+ }
260
+ scopePath = scopePath.parent;
261
+ }
262
+ if (!scopePath) {
263
+ return false;
264
+ }
265
+ scopePath = scopePath.parent;
266
+ }
267
+ return true;
268
+ }
269
+ function _matchesScope(scopeName, scopePattern) {
270
+ return scopePattern === scopeName || scopeName.startsWith(scopePattern) && scopeName[scopePattern.length] === ".";
271
+ }
272
+ var StyleAttributes = class {
273
+ constructor(fontStyle, foregroundId, backgroundId) {
274
+ this.fontStyle = fontStyle;
275
+ this.foregroundId = foregroundId;
276
+ this.backgroundId = backgroundId;
277
+ }
278
+ };
279
+ function parseTheme(source) {
280
+ if (!source) {
281
+ return [];
282
+ }
283
+ if (!source.settings || !Array.isArray(source.settings)) {
284
+ return [];
285
+ }
286
+ let settings = source.settings;
287
+ let result = [], resultLen = 0;
288
+ for (let i = 0, len = settings.length; i < len; i++) {
289
+ let entry = settings[i];
290
+ if (!entry.settings) {
291
+ continue;
292
+ }
293
+ let scopes;
294
+ if (typeof entry.scope === "string") {
295
+ let _scope = entry.scope;
296
+ _scope = _scope.replace(/^[,]+/, "");
297
+ _scope = _scope.replace(/[,]+$/, "");
298
+ scopes = _scope.split(",");
299
+ } else if (Array.isArray(entry.scope)) {
300
+ scopes = entry.scope;
301
+ } else {
302
+ scopes = [""];
303
+ }
304
+ let fontStyle = -1 /* NotSet */;
305
+ if (typeof entry.settings.fontStyle === "string") {
306
+ fontStyle = 0 /* None */;
307
+ let segments = entry.settings.fontStyle.split(" ");
308
+ for (let j = 0, lenJ = segments.length; j < lenJ; j++) {
309
+ let segment = segments[j];
310
+ switch (segment) {
311
+ case "italic":
312
+ fontStyle = fontStyle | 1 /* Italic */;
313
+ break;
314
+ case "bold":
315
+ fontStyle = fontStyle | 2 /* Bold */;
316
+ break;
317
+ case "underline":
318
+ fontStyle = fontStyle | 4 /* Underline */;
319
+ break;
320
+ case "strikethrough":
321
+ fontStyle = fontStyle | 8 /* Strikethrough */;
322
+ break;
323
+ }
324
+ }
325
+ }
326
+ let foreground = null;
327
+ if (typeof entry.settings.foreground === "string" && isValidHexColor(entry.settings.foreground)) {
328
+ foreground = entry.settings.foreground;
329
+ }
330
+ let background = null;
331
+ if (typeof entry.settings.background === "string" && isValidHexColor(entry.settings.background)) {
332
+ background = entry.settings.background;
333
+ }
334
+ for (let j = 0, lenJ = scopes.length; j < lenJ; j++) {
335
+ let _scope = scopes[j].trim();
336
+ let segments = _scope.split(" ");
337
+ let scope = segments[segments.length - 1];
338
+ let parentScopes = null;
339
+ if (segments.length > 1) {
340
+ parentScopes = segments.slice(0, segments.length - 1);
341
+ parentScopes.reverse();
342
+ }
343
+ result[resultLen++] = new ParsedThemeRule(
344
+ scope,
345
+ parentScopes,
346
+ i,
347
+ fontStyle,
348
+ foreground,
349
+ background
350
+ );
351
+ }
352
+ }
353
+ return result;
354
+ }
355
+ var ParsedThemeRule = class {
356
+ constructor(scope, parentScopes, index, fontStyle, foreground, background) {
357
+ this.scope = scope;
358
+ this.parentScopes = parentScopes;
359
+ this.index = index;
360
+ this.fontStyle = fontStyle;
361
+ this.foreground = foreground;
362
+ this.background = background;
363
+ }
364
+ };
365
+ var FontStyle = /* @__PURE__ */ ((FontStyle2) => {
366
+ FontStyle2[FontStyle2["NotSet"] = -1] = "NotSet";
367
+ FontStyle2[FontStyle2["None"] = 0] = "None";
368
+ FontStyle2[FontStyle2["Italic"] = 1] = "Italic";
369
+ FontStyle2[FontStyle2["Bold"] = 2] = "Bold";
370
+ FontStyle2[FontStyle2["Underline"] = 4] = "Underline";
371
+ FontStyle2[FontStyle2["Strikethrough"] = 8] = "Strikethrough";
372
+ return FontStyle2;
373
+ })(FontStyle || {});
374
+ function resolveParsedThemeRules(parsedThemeRules, _colorMap) {
375
+ parsedThemeRules.sort((a, b) => {
376
+ let r = strcmp(a.scope, b.scope);
377
+ if (r !== 0) {
378
+ return r;
379
+ }
380
+ r = strArrCmp(a.parentScopes, b.parentScopes);
381
+ if (r !== 0) {
382
+ return r;
383
+ }
384
+ return a.index - b.index;
385
+ });
386
+ let defaultFontStyle = 0 /* None */;
387
+ let defaultForeground = "#000000";
388
+ let defaultBackground = "#ffffff";
389
+ while (parsedThemeRules.length >= 1 && parsedThemeRules[0].scope === "") {
390
+ let incomingDefaults = parsedThemeRules.shift();
391
+ if (incomingDefaults.fontStyle !== -1 /* NotSet */) {
392
+ defaultFontStyle = incomingDefaults.fontStyle;
393
+ }
394
+ if (incomingDefaults.foreground !== null) {
395
+ defaultForeground = incomingDefaults.foreground;
396
+ }
397
+ if (incomingDefaults.background !== null) {
398
+ defaultBackground = incomingDefaults.background;
399
+ }
400
+ }
401
+ let colorMap = new ColorMap(_colorMap);
402
+ let defaults = new StyleAttributes(defaultFontStyle, colorMap.getId(defaultForeground), colorMap.getId(defaultBackground));
403
+ let root = new ThemeTrieElement(new ThemeTrieElementRule(0, null, -1 /* NotSet */, 0, 0), []);
404
+ for (let i = 0, len = parsedThemeRules.length; i < len; i++) {
405
+ let rule = parsedThemeRules[i];
406
+ root.insert(0, rule.scope, rule.parentScopes, rule.fontStyle, colorMap.getId(rule.foreground), colorMap.getId(rule.background));
407
+ }
408
+ return new Theme(colorMap, defaults, root);
409
+ }
410
+ var ColorMap = class {
411
+ _isFrozen;
412
+ _lastColorId;
413
+ _id2color;
414
+ _color2id;
415
+ constructor(_colorMap) {
416
+ this._lastColorId = 0;
417
+ this._id2color = [];
418
+ this._color2id = /* @__PURE__ */ Object.create(null);
419
+ if (Array.isArray(_colorMap)) {
420
+ this._isFrozen = true;
421
+ for (let i = 0, len = _colorMap.length; i < len; i++) {
422
+ this._color2id[_colorMap[i]] = i;
423
+ this._id2color[i] = _colorMap[i];
424
+ }
425
+ } else {
426
+ this._isFrozen = false;
427
+ }
428
+ }
429
+ getId(color) {
430
+ if (color === null) {
431
+ return 0;
432
+ }
433
+ color = color.toUpperCase();
434
+ let value = this._color2id[color];
435
+ if (value) {
436
+ return value;
437
+ }
438
+ if (this._isFrozen) {
439
+ throw new Error(`Missing color in color map - ${color}`);
440
+ }
441
+ value = ++this._lastColorId;
442
+ this._color2id[color] = value;
443
+ this._id2color[value] = color;
444
+ return value;
445
+ }
446
+ getColorMap() {
447
+ return this._id2color.slice(0);
448
+ }
449
+ };
450
+ var emptyParentScopes = Object.freeze([]);
451
+ var ThemeTrieElementRule = class _ThemeTrieElementRule {
452
+ scopeDepth;
453
+ parentScopes;
454
+ fontStyle;
455
+ foreground;
456
+ background;
457
+ constructor(scopeDepth, parentScopes, fontStyle, foreground, background) {
458
+ this.scopeDepth = scopeDepth;
459
+ this.parentScopes = parentScopes || emptyParentScopes;
460
+ this.fontStyle = fontStyle;
461
+ this.foreground = foreground;
462
+ this.background = background;
463
+ }
464
+ clone() {
465
+ return new _ThemeTrieElementRule(this.scopeDepth, this.parentScopes, this.fontStyle, this.foreground, this.background);
466
+ }
467
+ static cloneArr(arr) {
468
+ let r = [];
469
+ for (let i = 0, len = arr.length; i < len; i++) {
470
+ r[i] = arr[i].clone();
471
+ }
472
+ return r;
473
+ }
474
+ acceptOverwrite(scopeDepth, fontStyle, foreground, background) {
475
+ if (this.scopeDepth > scopeDepth) {
476
+ console.log("how did this happen?");
477
+ } else {
478
+ this.scopeDepth = scopeDepth;
479
+ }
480
+ if (fontStyle !== -1 /* NotSet */) {
481
+ this.fontStyle = fontStyle;
482
+ }
483
+ if (foreground !== 0) {
484
+ this.foreground = foreground;
485
+ }
486
+ if (background !== 0) {
487
+ this.background = background;
488
+ }
489
+ }
490
+ };
491
+ var ThemeTrieElement = class _ThemeTrieElement {
492
+ constructor(_mainRule, rulesWithParentScopes = [], _children = {}) {
493
+ this._mainRule = _mainRule;
494
+ this._children = _children;
495
+ this._rulesWithParentScopes = rulesWithParentScopes;
496
+ }
497
+ _rulesWithParentScopes;
498
+ static _cmpBySpecificity(a, b) {
499
+ if (a.scopeDepth !== b.scopeDepth) {
500
+ return b.scopeDepth - a.scopeDepth;
501
+ }
502
+ let aParentIndex = 0;
503
+ let bParentIndex = 0;
504
+ while (true) {
505
+ if (a.parentScopes[aParentIndex] === ">") {
506
+ aParentIndex++;
507
+ }
508
+ if (b.parentScopes[bParentIndex] === ">") {
509
+ bParentIndex++;
510
+ }
511
+ if (aParentIndex >= a.parentScopes.length || bParentIndex >= b.parentScopes.length) {
512
+ break;
513
+ }
514
+ const parentScopeLengthDiff = b.parentScopes[bParentIndex].length - a.parentScopes[aParentIndex].length;
515
+ if (parentScopeLengthDiff !== 0) {
516
+ return parentScopeLengthDiff;
517
+ }
518
+ aParentIndex++;
519
+ bParentIndex++;
520
+ }
521
+ return b.parentScopes.length - a.parentScopes.length;
522
+ }
523
+ match(scope) {
524
+ if (scope !== "") {
525
+ let dotIndex = scope.indexOf(".");
526
+ let head;
527
+ let tail;
528
+ if (dotIndex === -1) {
529
+ head = scope;
530
+ tail = "";
531
+ } else {
532
+ head = scope.substring(0, dotIndex);
533
+ tail = scope.substring(dotIndex + 1);
534
+ }
535
+ if (this._children.hasOwnProperty(head)) {
536
+ return this._children[head].match(tail);
537
+ }
538
+ }
539
+ const rules = this._rulesWithParentScopes.concat(this._mainRule);
540
+ rules.sort(_ThemeTrieElement._cmpBySpecificity);
541
+ return rules;
542
+ }
543
+ insert(scopeDepth, scope, parentScopes, fontStyle, foreground, background) {
544
+ if (scope === "") {
545
+ this._doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background);
546
+ return;
547
+ }
548
+ let dotIndex = scope.indexOf(".");
549
+ let head;
550
+ let tail;
551
+ if (dotIndex === -1) {
552
+ head = scope;
553
+ tail = "";
554
+ } else {
555
+ head = scope.substring(0, dotIndex);
556
+ tail = scope.substring(dotIndex + 1);
557
+ }
558
+ let child;
559
+ if (this._children.hasOwnProperty(head)) {
560
+ child = this._children[head];
561
+ } else {
562
+ child = new _ThemeTrieElement(this._mainRule.clone(), ThemeTrieElementRule.cloneArr(this._rulesWithParentScopes));
563
+ this._children[head] = child;
564
+ }
565
+ child.insert(scopeDepth + 1, tail, parentScopes, fontStyle, foreground, background);
566
+ }
567
+ _doInsertHere(scopeDepth, parentScopes, fontStyle, foreground, background) {
568
+ if (parentScopes === null) {
569
+ this._mainRule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);
570
+ return;
571
+ }
572
+ for (let i = 0, len = this._rulesWithParentScopes.length; i < len; i++) {
573
+ let rule = this._rulesWithParentScopes[i];
574
+ if (strArrCmp(rule.parentScopes, parentScopes) === 0) {
575
+ rule.acceptOverwrite(scopeDepth, fontStyle, foreground, background);
576
+ return;
577
+ }
578
+ }
579
+ if (fontStyle === -1 /* NotSet */) {
580
+ fontStyle = this._mainRule.fontStyle;
581
+ }
582
+ if (foreground === 0) {
583
+ foreground = this._mainRule.foreground;
584
+ }
585
+ if (background === 0) {
586
+ background = this._mainRule.background;
587
+ }
588
+ this._rulesWithParentScopes.push(new ThemeTrieElementRule(scopeDepth, parentScopes, fontStyle, foreground, background));
589
+ }
590
+ };
591
+
592
+ // src/encodedTokenAttributes.ts
593
+ var EncodedTokenMetadata = class _EncodedTokenMetadata {
594
+ static toBinaryStr(encodedTokenAttributes) {
595
+ return encodedTokenAttributes.toString(2).padStart(32, "0");
596
+ }
597
+ static print(encodedTokenAttributes) {
598
+ const languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);
599
+ const tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);
600
+ const fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);
601
+ const foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);
602
+ const background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);
603
+ console.log({
604
+ languageId,
605
+ tokenType,
606
+ fontStyle,
607
+ foreground,
608
+ background
609
+ });
610
+ }
611
+ static getLanguageId(encodedTokenAttributes) {
612
+ return (encodedTokenAttributes & 255 /* LANGUAGEID_MASK */) >>> 0 /* LANGUAGEID_OFFSET */;
613
+ }
614
+ static getTokenType(encodedTokenAttributes) {
615
+ return (encodedTokenAttributes & 768 /* TOKEN_TYPE_MASK */) >>> 8 /* TOKEN_TYPE_OFFSET */;
616
+ }
617
+ static containsBalancedBrackets(encodedTokenAttributes) {
618
+ return (encodedTokenAttributes & 1024 /* BALANCED_BRACKETS_MASK */) !== 0;
619
+ }
620
+ static getFontStyle(encodedTokenAttributes) {
621
+ return (encodedTokenAttributes & 30720 /* FONT_STYLE_MASK */) >>> 11 /* FONT_STYLE_OFFSET */;
622
+ }
623
+ static getForeground(encodedTokenAttributes) {
624
+ return (encodedTokenAttributes & 16744448 /* FOREGROUND_MASK */) >>> 15 /* FOREGROUND_OFFSET */;
625
+ }
626
+ static getBackground(encodedTokenAttributes) {
627
+ return (encodedTokenAttributes & 4278190080 /* BACKGROUND_MASK */) >>> 24 /* BACKGROUND_OFFSET */;
628
+ }
629
+ /**
630
+ * Updates the fields in `metadata`.
631
+ * A value of `0`, `NotSet` or `null` indicates that the corresponding field should be left as is.
632
+ */
633
+ static set(encodedTokenAttributes, languageId, tokenType, containsBalancedBrackets, fontStyle, foreground, background) {
634
+ let _languageId = _EncodedTokenMetadata.getLanguageId(encodedTokenAttributes);
635
+ let _tokenType = _EncodedTokenMetadata.getTokenType(encodedTokenAttributes);
636
+ let _containsBalancedBracketsBit = _EncodedTokenMetadata.containsBalancedBrackets(encodedTokenAttributes) ? 1 : 0;
637
+ let _fontStyle = _EncodedTokenMetadata.getFontStyle(encodedTokenAttributes);
638
+ let _foreground = _EncodedTokenMetadata.getForeground(encodedTokenAttributes);
639
+ let _background = _EncodedTokenMetadata.getBackground(encodedTokenAttributes);
640
+ if (languageId !== 0) {
641
+ _languageId = languageId;
642
+ }
643
+ if (tokenType !== 8 /* NotSet */) {
644
+ _tokenType = fromOptionalTokenType(tokenType);
645
+ }
646
+ if (containsBalancedBrackets !== null) {
647
+ _containsBalancedBracketsBit = containsBalancedBrackets ? 1 : 0;
648
+ }
649
+ if (fontStyle !== -1 /* NotSet */) {
650
+ _fontStyle = fontStyle;
651
+ }
652
+ if (foreground !== 0) {
653
+ _foreground = foreground;
654
+ }
655
+ if (background !== 0) {
656
+ _background = background;
657
+ }
658
+ return (_languageId << 0 /* LANGUAGEID_OFFSET */ | _tokenType << 8 /* TOKEN_TYPE_OFFSET */ | _containsBalancedBracketsBit << 10 /* BALANCED_BRACKETS_OFFSET */ | _fontStyle << 11 /* FONT_STYLE_OFFSET */ | _foreground << 15 /* FOREGROUND_OFFSET */ | _background << 24 /* BACKGROUND_OFFSET */) >>> 0;
659
+ }
660
+ };
661
+ function toOptionalTokenType(standardType) {
662
+ return standardType;
663
+ }
664
+ function fromOptionalTokenType(standardType) {
665
+ return standardType;
666
+ }
667
+
668
+ // src/matcher.ts
669
+ function createMatchers(selector, matchesName) {
670
+ const results = [];
671
+ const tokenizer = newTokenizer(selector);
672
+ let token = tokenizer.next();
673
+ while (token !== null) {
674
+ let priority = 0;
675
+ if (token.length === 2 && token.charAt(1) === ":") {
676
+ switch (token.charAt(0)) {
677
+ case "R":
678
+ priority = 1;
679
+ break;
680
+ case "L":
681
+ priority = -1;
682
+ break;
683
+ default:
684
+ console.log(`Unknown priority ${token} in scope selector`);
685
+ }
686
+ token = tokenizer.next();
687
+ }
688
+ let matcher = parseConjunction();
689
+ results.push({ matcher, priority });
690
+ if (token !== ",") {
691
+ break;
692
+ }
693
+ token = tokenizer.next();
694
+ }
695
+ return results;
696
+ function parseOperand() {
697
+ if (token === "-") {
698
+ token = tokenizer.next();
699
+ const expressionToNegate = parseOperand();
700
+ return (matcherInput) => !!expressionToNegate && !expressionToNegate(matcherInput);
701
+ }
702
+ if (token === "(") {
703
+ token = tokenizer.next();
704
+ const expressionInParents = parseInnerExpression();
705
+ if (token === ")") {
706
+ token = tokenizer.next();
707
+ }
708
+ return expressionInParents;
709
+ }
710
+ if (isIdentifier(token)) {
711
+ const identifiers = [];
712
+ do {
713
+ identifiers.push(token);
714
+ token = tokenizer.next();
715
+ } while (isIdentifier(token));
716
+ return (matcherInput) => matchesName(identifiers, matcherInput);
717
+ }
718
+ return null;
719
+ }
720
+ function parseConjunction() {
721
+ const matchers = [];
722
+ let matcher = parseOperand();
723
+ while (matcher) {
724
+ matchers.push(matcher);
725
+ matcher = parseOperand();
726
+ }
727
+ return (matcherInput) => matchers.every((matcher2) => matcher2(matcherInput));
728
+ }
729
+ function parseInnerExpression() {
730
+ const matchers = [];
731
+ let matcher = parseConjunction();
732
+ while (matcher) {
733
+ matchers.push(matcher);
734
+ if (token === "|" || token === ",") {
735
+ do {
736
+ token = tokenizer.next();
737
+ } while (token === "|" || token === ",");
738
+ } else {
739
+ break;
740
+ }
741
+ matcher = parseConjunction();
742
+ }
743
+ return (matcherInput) => matchers.some((matcher2) => matcher2(matcherInput));
744
+ }
745
+ }
746
+ function isIdentifier(token) {
747
+ return !!token && !!token.match(/[\w\.:]+/);
748
+ }
749
+ function newTokenizer(input) {
750
+ let regex = /([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g;
751
+ let match = regex.exec(input);
752
+ return {
753
+ next: () => {
754
+ if (!match) {
755
+ return null;
756
+ }
757
+ const res = match[0];
758
+ match = regex.exec(input);
759
+ return res;
760
+ }
761
+ };
762
+ }
763
+
764
+ // src/onigLib.ts
765
+ var FindOption = /* @__PURE__ */ ((FindOption2) => {
766
+ FindOption2[FindOption2["None"] = 0] = "None";
767
+ FindOption2[FindOption2["NotBeginString"] = 1] = "NotBeginString";
768
+ FindOption2[FindOption2["NotEndString"] = 2] = "NotEndString";
769
+ FindOption2[FindOption2["NotBeginPosition"] = 4] = "NotBeginPosition";
770
+ FindOption2[FindOption2["DebugCall"] = 8] = "DebugCall";
771
+ return FindOption2;
772
+ })(FindOption || {});
773
+ function disposeOnigString(str) {
774
+ if (typeof str.dispose === "function") {
775
+ str.dispose();
776
+ }
777
+ }
778
+
779
+ // src/grammar/grammarDependencies.ts
780
+ var TopLevelRuleReference = class {
781
+ constructor(scopeName) {
782
+ this.scopeName = scopeName;
783
+ }
784
+ toKey() {
785
+ return this.scopeName;
786
+ }
787
+ };
788
+ var TopLevelRepositoryRuleReference = class {
789
+ constructor(scopeName, ruleName) {
790
+ this.scopeName = scopeName;
791
+ this.ruleName = ruleName;
792
+ }
793
+ toKey() {
794
+ return `${this.scopeName}#${this.ruleName}`;
795
+ }
796
+ };
797
+ var ExternalReferenceCollector = class {
798
+ _references = [];
799
+ _seenReferenceKeys = /* @__PURE__ */ new Set();
800
+ get references() {
801
+ return this._references;
802
+ }
803
+ visitedRule = /* @__PURE__ */ new Set();
804
+ add(reference) {
805
+ const key = reference.toKey();
806
+ if (this._seenReferenceKeys.has(key)) {
807
+ return;
808
+ }
809
+ this._seenReferenceKeys.add(key);
810
+ this._references.push(reference);
811
+ }
812
+ };
813
+ var ScopeDependencyProcessor = class {
814
+ constructor(repo, initialScopeName) {
815
+ this.repo = repo;
816
+ this.initialScopeName = initialScopeName;
817
+ this.seenFullScopeRequests.add(this.initialScopeName);
818
+ this.Q = [new TopLevelRuleReference(this.initialScopeName)];
819
+ }
820
+ seenFullScopeRequests = /* @__PURE__ */ new Set();
821
+ seenPartialScopeRequests = /* @__PURE__ */ new Set();
822
+ Q;
823
+ processQueue() {
824
+ const q = this.Q;
825
+ this.Q = [];
826
+ const deps = new ExternalReferenceCollector();
827
+ for (const dep of q) {
828
+ collectReferencesOfReference(dep, this.initialScopeName, this.repo, deps);
829
+ }
830
+ for (const dep of deps.references) {
831
+ if (dep instanceof TopLevelRuleReference) {
832
+ if (this.seenFullScopeRequests.has(dep.scopeName)) {
833
+ continue;
834
+ }
835
+ this.seenFullScopeRequests.add(dep.scopeName);
836
+ this.Q.push(dep);
837
+ } else {
838
+ if (this.seenFullScopeRequests.has(dep.scopeName)) {
839
+ continue;
840
+ }
841
+ if (this.seenPartialScopeRequests.has(dep.toKey())) {
842
+ continue;
843
+ }
844
+ this.seenPartialScopeRequests.add(dep.toKey());
845
+ this.Q.push(dep);
846
+ }
847
+ }
848
+ }
849
+ };
850
+ function collectReferencesOfReference(reference, baseGrammarScopeName, repo, result) {
851
+ const selfGrammar = repo.lookup(reference.scopeName);
852
+ if (!selfGrammar) {
853
+ if (reference.scopeName === baseGrammarScopeName) {
854
+ throw new Error(`No grammar provided for <${baseGrammarScopeName}>`);
855
+ }
856
+ return;
857
+ }
858
+ const baseGrammar = repo.lookup(baseGrammarScopeName);
859
+ if (reference instanceof TopLevelRuleReference) {
860
+ collectExternalReferencesInTopLevelRule({ baseGrammar, selfGrammar }, result);
861
+ } else {
862
+ collectExternalReferencesInTopLevelRepositoryRule(
863
+ reference.ruleName,
864
+ { baseGrammar, selfGrammar, repository: selfGrammar.repository },
865
+ result
866
+ );
867
+ }
868
+ const injections = repo.injections(reference.scopeName);
869
+ if (injections) {
870
+ for (const injection of injections) {
871
+ result.add(new TopLevelRuleReference(injection));
872
+ }
873
+ }
874
+ }
875
+ function collectExternalReferencesInTopLevelRepositoryRule(ruleName, context, result) {
876
+ if (context.repository && context.repository[ruleName]) {
877
+ const rule = context.repository[ruleName];
878
+ collectExternalReferencesInRules([rule], context, result);
879
+ }
880
+ }
881
+ function collectExternalReferencesInTopLevelRule(context, result) {
882
+ if (context.selfGrammar.patterns && Array.isArray(context.selfGrammar.patterns)) {
883
+ collectExternalReferencesInRules(
884
+ context.selfGrammar.patterns,
885
+ { ...context, repository: context.selfGrammar.repository },
886
+ result
887
+ );
888
+ }
889
+ if (context.selfGrammar.injections) {
890
+ collectExternalReferencesInRules(
891
+ Object.values(context.selfGrammar.injections),
892
+ { ...context, repository: context.selfGrammar.repository },
893
+ result
894
+ );
895
+ }
896
+ }
897
+ function collectExternalReferencesInRules(rules, context, result) {
898
+ for (const rule of rules) {
899
+ if (result.visitedRule.has(rule)) {
900
+ continue;
901
+ }
902
+ result.visitedRule.add(rule);
903
+ const patternRepository = rule.repository ? mergeObjects({}, context.repository, rule.repository) : context.repository;
904
+ if (Array.isArray(rule.patterns)) {
905
+ collectExternalReferencesInRules(rule.patterns, { ...context, repository: patternRepository }, result);
906
+ }
907
+ const include = rule.include;
908
+ if (!include) {
909
+ continue;
910
+ }
911
+ const reference = parseInclude(include);
912
+ switch (reference.kind) {
913
+ case 0 /* Base */:
914
+ collectExternalReferencesInTopLevelRule({ ...context, selfGrammar: context.baseGrammar }, result);
915
+ break;
916
+ case 1 /* Self */:
917
+ collectExternalReferencesInTopLevelRule(context, result);
918
+ break;
919
+ case 2 /* RelativeReference */:
920
+ collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, { ...context, repository: patternRepository }, result);
921
+ break;
922
+ case 3 /* TopLevelReference */:
923
+ case 4 /* TopLevelRepositoryReference */:
924
+ const selfGrammar = reference.scopeName === context.selfGrammar.scopeName ? context.selfGrammar : reference.scopeName === context.baseGrammar.scopeName ? context.baseGrammar : void 0;
925
+ if (selfGrammar) {
926
+ const newContext = { baseGrammar: context.baseGrammar, selfGrammar, repository: patternRepository };
927
+ if (reference.kind === 4 /* TopLevelRepositoryReference */) {
928
+ collectExternalReferencesInTopLevelRepositoryRule(reference.ruleName, newContext, result);
929
+ } else {
930
+ collectExternalReferencesInTopLevelRule(newContext, result);
931
+ }
932
+ } else {
933
+ if (reference.kind === 4 /* TopLevelRepositoryReference */) {
934
+ result.add(new TopLevelRepositoryRuleReference(reference.scopeName, reference.ruleName));
935
+ } else {
936
+ result.add(new TopLevelRuleReference(reference.scopeName));
937
+ }
938
+ }
939
+ break;
940
+ }
941
+ }
942
+ }
943
+ var BaseReference = class {
944
+ kind = 0 /* Base */;
945
+ };
946
+ var SelfReference = class {
947
+ kind = 1 /* Self */;
948
+ };
949
+ var RelativeReference = class {
950
+ constructor(ruleName) {
951
+ this.ruleName = ruleName;
952
+ }
953
+ kind = 2 /* RelativeReference */;
954
+ };
955
+ var TopLevelReference = class {
956
+ constructor(scopeName) {
957
+ this.scopeName = scopeName;
958
+ }
959
+ kind = 3 /* TopLevelReference */;
960
+ };
961
+ var TopLevelRepositoryReference = class {
962
+ constructor(scopeName, ruleName) {
963
+ this.scopeName = scopeName;
964
+ this.ruleName = ruleName;
965
+ }
966
+ kind = 4 /* TopLevelRepositoryReference */;
967
+ };
968
+ function parseInclude(include) {
969
+ if (include === "$base") {
970
+ return new BaseReference();
971
+ } else if (include === "$self") {
972
+ return new SelfReference();
973
+ }
974
+ const indexOfSharp = include.indexOf("#");
975
+ if (indexOfSharp === -1) {
976
+ return new TopLevelReference(include);
977
+ } else if (indexOfSharp === 0) {
978
+ return new RelativeReference(include.substring(1));
979
+ } else {
980
+ const scopeName = include.substring(0, indexOfSharp);
981
+ const ruleName = include.substring(indexOfSharp + 1);
982
+ return new TopLevelRepositoryReference(scopeName, ruleName);
983
+ }
984
+ }
985
+
986
+ // src/rule.ts
987
+ var HAS_BACK_REFERENCES = /\\(\d+)/;
988
+ var BACK_REFERENCING_END = /\\(\d+)/g;
989
+ var ruleIdSymbol = Symbol("RuleId");
990
+ var endRuleId = -1;
991
+ var whileRuleId = -2;
992
+ function ruleIdFromNumber(id) {
993
+ return id;
994
+ }
995
+ function ruleIdToNumber(id) {
996
+ return id;
997
+ }
998
+ var Rule = class {
999
+ $location;
1000
+ id;
1001
+ _nameIsCapturing;
1002
+ _name;
1003
+ _contentNameIsCapturing;
1004
+ _contentName;
1005
+ constructor($location, id, name, contentName) {
1006
+ this.$location = $location;
1007
+ this.id = id;
1008
+ this._name = name || null;
1009
+ this._nameIsCapturing = RegexSource.hasCaptures(this._name);
1010
+ this._contentName = contentName || null;
1011
+ this._contentNameIsCapturing = RegexSource.hasCaptures(this._contentName);
1012
+ }
1013
+ get debugName() {
1014
+ const location = this.$location ? `${basename(this.$location.filename)}:${this.$location.line}` : "unknown";
1015
+ return `${this.constructor.name}#${this.id} @ ${location}`;
1016
+ }
1017
+ getName(lineText, captureIndices) {
1018
+ if (!this._nameIsCapturing || this._name === null || lineText === null || captureIndices === null) {
1019
+ return this._name;
1020
+ }
1021
+ return RegexSource.replaceCaptures(this._name, lineText, captureIndices);
1022
+ }
1023
+ getContentName(lineText, captureIndices) {
1024
+ if (!this._contentNameIsCapturing || this._contentName === null) {
1025
+ return this._contentName;
1026
+ }
1027
+ return RegexSource.replaceCaptures(this._contentName, lineText, captureIndices);
1028
+ }
1029
+ };
1030
+ var CaptureRule = class extends Rule {
1031
+ retokenizeCapturedWithRuleId;
1032
+ constructor($location, id, name, contentName, retokenizeCapturedWithRuleId) {
1033
+ super($location, id, name, contentName);
1034
+ this.retokenizeCapturedWithRuleId = retokenizeCapturedWithRuleId;
1035
+ }
1036
+ dispose() {
1037
+ }
1038
+ collectPatterns(grammar, out) {
1039
+ throw new Error("Not supported!");
1040
+ }
1041
+ compile(grammar, endRegexSource) {
1042
+ throw new Error("Not supported!");
1043
+ }
1044
+ compileAG(grammar, endRegexSource, allowA, allowG) {
1045
+ throw new Error("Not supported!");
1046
+ }
1047
+ };
1048
+ var MatchRule = class extends Rule {
1049
+ _match;
1050
+ captures;
1051
+ _cachedCompiledPatterns;
1052
+ constructor($location, id, name, match, captures) {
1053
+ super($location, id, name, null);
1054
+ this._match = new RegExpSource(match, this.id);
1055
+ this.captures = captures;
1056
+ this._cachedCompiledPatterns = null;
1057
+ }
1058
+ dispose() {
1059
+ if (this._cachedCompiledPatterns) {
1060
+ this._cachedCompiledPatterns.dispose();
1061
+ this._cachedCompiledPatterns = null;
1062
+ }
1063
+ }
1064
+ get debugMatchRegExp() {
1065
+ return `${this._match.source}`;
1066
+ }
1067
+ collectPatterns(grammar, out) {
1068
+ out.push(this._match);
1069
+ }
1070
+ compile(grammar, endRegexSource) {
1071
+ return this._getCachedCompiledPatterns(grammar).compile(grammar);
1072
+ }
1073
+ compileAG(grammar, endRegexSource, allowA, allowG) {
1074
+ return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
1075
+ }
1076
+ _getCachedCompiledPatterns(grammar) {
1077
+ if (!this._cachedCompiledPatterns) {
1078
+ this._cachedCompiledPatterns = new RegExpSourceList();
1079
+ this.collectPatterns(grammar, this._cachedCompiledPatterns);
1080
+ }
1081
+ return this._cachedCompiledPatterns;
1082
+ }
1083
+ };
1084
+ var IncludeOnlyRule = class extends Rule {
1085
+ hasMissingPatterns;
1086
+ patterns;
1087
+ _cachedCompiledPatterns;
1088
+ constructor($location, id, name, contentName, patterns) {
1089
+ super($location, id, name, contentName);
1090
+ this.patterns = patterns.patterns;
1091
+ this.hasMissingPatterns = patterns.hasMissingPatterns;
1092
+ this._cachedCompiledPatterns = null;
1093
+ }
1094
+ dispose() {
1095
+ if (this._cachedCompiledPatterns) {
1096
+ this._cachedCompiledPatterns.dispose();
1097
+ this._cachedCompiledPatterns = null;
1098
+ }
1099
+ }
1100
+ collectPatterns(grammar, out) {
1101
+ for (const pattern of this.patterns) {
1102
+ const rule = grammar.getRule(pattern);
1103
+ rule.collectPatterns(grammar, out);
1104
+ }
1105
+ }
1106
+ compile(grammar, endRegexSource) {
1107
+ return this._getCachedCompiledPatterns(grammar).compile(grammar);
1108
+ }
1109
+ compileAG(grammar, endRegexSource, allowA, allowG) {
1110
+ return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
1111
+ }
1112
+ _getCachedCompiledPatterns(grammar) {
1113
+ if (!this._cachedCompiledPatterns) {
1114
+ this._cachedCompiledPatterns = new RegExpSourceList();
1115
+ this.collectPatterns(grammar, this._cachedCompiledPatterns);
1116
+ }
1117
+ return this._cachedCompiledPatterns;
1118
+ }
1119
+ };
1120
+ var BeginEndRule = class extends Rule {
1121
+ _begin;
1122
+ beginCaptures;
1123
+ _end;
1124
+ endHasBackReferences;
1125
+ endCaptures;
1126
+ applyEndPatternLast;
1127
+ hasMissingPatterns;
1128
+ patterns;
1129
+ _cachedCompiledPatterns;
1130
+ constructor($location, id, name, contentName, begin, beginCaptures, end, endCaptures, applyEndPatternLast, patterns) {
1131
+ super($location, id, name, contentName);
1132
+ this._begin = new RegExpSource(begin, this.id);
1133
+ this.beginCaptures = beginCaptures;
1134
+ this._end = new RegExpSource(end ? end : "\uFFFF", -1);
1135
+ this.endHasBackReferences = this._end.hasBackReferences;
1136
+ this.endCaptures = endCaptures;
1137
+ this.applyEndPatternLast = applyEndPatternLast || false;
1138
+ this.patterns = patterns.patterns;
1139
+ this.hasMissingPatterns = patterns.hasMissingPatterns;
1140
+ this._cachedCompiledPatterns = null;
1141
+ }
1142
+ dispose() {
1143
+ if (this._cachedCompiledPatterns) {
1144
+ this._cachedCompiledPatterns.dispose();
1145
+ this._cachedCompiledPatterns = null;
1146
+ }
1147
+ }
1148
+ get debugBeginRegExp() {
1149
+ return `${this._begin.source}`;
1150
+ }
1151
+ get debugEndRegExp() {
1152
+ return `${this._end.source}`;
1153
+ }
1154
+ getEndWithResolvedBackReferences(lineText, captureIndices) {
1155
+ return this._end.resolveBackReferences(lineText, captureIndices);
1156
+ }
1157
+ collectPatterns(grammar, out) {
1158
+ out.push(this._begin);
1159
+ }
1160
+ compile(grammar, endRegexSource) {
1161
+ return this._getCachedCompiledPatterns(grammar, endRegexSource).compile(grammar);
1162
+ }
1163
+ compileAG(grammar, endRegexSource, allowA, allowG) {
1164
+ return this._getCachedCompiledPatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);
1165
+ }
1166
+ _getCachedCompiledPatterns(grammar, endRegexSource) {
1167
+ if (!this._cachedCompiledPatterns) {
1168
+ this._cachedCompiledPatterns = new RegExpSourceList();
1169
+ for (const pattern of this.patterns) {
1170
+ const rule = grammar.getRule(pattern);
1171
+ rule.collectPatterns(grammar, this._cachedCompiledPatterns);
1172
+ }
1173
+ if (this.applyEndPatternLast) {
1174
+ this._cachedCompiledPatterns.push(this._end.hasBackReferences ? this._end.clone() : this._end);
1175
+ } else {
1176
+ this._cachedCompiledPatterns.unshift(this._end.hasBackReferences ? this._end.clone() : this._end);
1177
+ }
1178
+ }
1179
+ if (this._end.hasBackReferences) {
1180
+ if (this.applyEndPatternLast) {
1181
+ this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length() - 1, endRegexSource);
1182
+ } else {
1183
+ this._cachedCompiledPatterns.setSource(0, endRegexSource);
1184
+ }
1185
+ }
1186
+ return this._cachedCompiledPatterns;
1187
+ }
1188
+ };
1189
+ var BeginWhileRule = class extends Rule {
1190
+ _begin;
1191
+ beginCaptures;
1192
+ whileCaptures;
1193
+ _while;
1194
+ whileHasBackReferences;
1195
+ hasMissingPatterns;
1196
+ patterns;
1197
+ _cachedCompiledPatterns;
1198
+ _cachedCompiledWhilePatterns;
1199
+ constructor($location, id, name, contentName, begin, beginCaptures, _while, whileCaptures, patterns) {
1200
+ super($location, id, name, contentName);
1201
+ this._begin = new RegExpSource(begin, this.id);
1202
+ this.beginCaptures = beginCaptures;
1203
+ this.whileCaptures = whileCaptures;
1204
+ this._while = new RegExpSource(_while, whileRuleId);
1205
+ this.whileHasBackReferences = this._while.hasBackReferences;
1206
+ this.patterns = patterns.patterns;
1207
+ this.hasMissingPatterns = patterns.hasMissingPatterns;
1208
+ this._cachedCompiledPatterns = null;
1209
+ this._cachedCompiledWhilePatterns = null;
1210
+ }
1211
+ dispose() {
1212
+ if (this._cachedCompiledPatterns) {
1213
+ this._cachedCompiledPatterns.dispose();
1214
+ this._cachedCompiledPatterns = null;
1215
+ }
1216
+ if (this._cachedCompiledWhilePatterns) {
1217
+ this._cachedCompiledWhilePatterns.dispose();
1218
+ this._cachedCompiledWhilePatterns = null;
1219
+ }
1220
+ }
1221
+ get debugBeginRegExp() {
1222
+ return `${this._begin.source}`;
1223
+ }
1224
+ get debugWhileRegExp() {
1225
+ return `${this._while.source}`;
1226
+ }
1227
+ getWhileWithResolvedBackReferences(lineText, captureIndices) {
1228
+ return this._while.resolveBackReferences(lineText, captureIndices);
1229
+ }
1230
+ collectPatterns(grammar, out) {
1231
+ out.push(this._begin);
1232
+ }
1233
+ compile(grammar, endRegexSource) {
1234
+ return this._getCachedCompiledPatterns(grammar).compile(grammar);
1235
+ }
1236
+ compileAG(grammar, endRegexSource, allowA, allowG) {
1237
+ return this._getCachedCompiledPatterns(grammar).compileAG(grammar, allowA, allowG);
1238
+ }
1239
+ _getCachedCompiledPatterns(grammar) {
1240
+ if (!this._cachedCompiledPatterns) {
1241
+ this._cachedCompiledPatterns = new RegExpSourceList();
1242
+ for (const pattern of this.patterns) {
1243
+ const rule = grammar.getRule(pattern);
1244
+ rule.collectPatterns(grammar, this._cachedCompiledPatterns);
1245
+ }
1246
+ }
1247
+ return this._cachedCompiledPatterns;
1248
+ }
1249
+ compileWhile(grammar, endRegexSource) {
1250
+ return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compile(grammar);
1251
+ }
1252
+ compileWhileAG(grammar, endRegexSource, allowA, allowG) {
1253
+ return this._getCachedCompiledWhilePatterns(grammar, endRegexSource).compileAG(grammar, allowA, allowG);
1254
+ }
1255
+ _getCachedCompiledWhilePatterns(grammar, endRegexSource) {
1256
+ if (!this._cachedCompiledWhilePatterns) {
1257
+ this._cachedCompiledWhilePatterns = new RegExpSourceList();
1258
+ this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences ? this._while.clone() : this._while);
1259
+ }
1260
+ if (this._while.hasBackReferences) {
1261
+ this._cachedCompiledWhilePatterns.setSource(0, endRegexSource ? endRegexSource : "\uFFFF");
1262
+ }
1263
+ return this._cachedCompiledWhilePatterns;
1264
+ }
1265
+ };
1266
+ var RuleFactory = class _RuleFactory {
1267
+ static createCaptureRule(helper, $location, name, contentName, retokenizeCapturedWithRuleId) {
1268
+ return helper.registerRule((id) => {
1269
+ return new CaptureRule($location, id, name, contentName, retokenizeCapturedWithRuleId);
1270
+ });
1271
+ }
1272
+ static getCompiledRuleId(desc, helper, repository) {
1273
+ if (!desc.id) {
1274
+ helper.registerRule((id) => {
1275
+ desc.id = id;
1276
+ if (desc.match) {
1277
+ return new MatchRule(
1278
+ desc.$vscodeTextmateLocation,
1279
+ desc.id,
1280
+ desc.name,
1281
+ desc.match,
1282
+ _RuleFactory._compileCaptures(desc.captures, helper, repository)
1283
+ );
1284
+ }
1285
+ if (typeof desc.begin === "undefined") {
1286
+ if (desc.repository) {
1287
+ repository = mergeObjects({}, repository, desc.repository);
1288
+ }
1289
+ let patterns = desc.patterns;
1290
+ if (typeof patterns === "undefined" && desc.include) {
1291
+ patterns = [{ include: desc.include }];
1292
+ }
1293
+ return new IncludeOnlyRule(
1294
+ desc.$vscodeTextmateLocation,
1295
+ desc.id,
1296
+ desc.name,
1297
+ desc.contentName,
1298
+ _RuleFactory._compilePatterns(patterns, helper, repository)
1299
+ );
1300
+ }
1301
+ if (desc.while) {
1302
+ return new BeginWhileRule(
1303
+ desc.$vscodeTextmateLocation,
1304
+ desc.id,
1305
+ desc.name,
1306
+ desc.contentName,
1307
+ desc.begin,
1308
+ _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),
1309
+ desc.while,
1310
+ _RuleFactory._compileCaptures(desc.whileCaptures || desc.captures, helper, repository),
1311
+ _RuleFactory._compilePatterns(desc.patterns, helper, repository)
1312
+ );
1313
+ }
1314
+ return new BeginEndRule(
1315
+ desc.$vscodeTextmateLocation,
1316
+ desc.id,
1317
+ desc.name,
1318
+ desc.contentName,
1319
+ desc.begin,
1320
+ _RuleFactory._compileCaptures(desc.beginCaptures || desc.captures, helper, repository),
1321
+ desc.end,
1322
+ _RuleFactory._compileCaptures(desc.endCaptures || desc.captures, helper, repository),
1323
+ desc.applyEndPatternLast,
1324
+ _RuleFactory._compilePatterns(desc.patterns, helper, repository)
1325
+ );
1326
+ });
1327
+ }
1328
+ return desc.id;
1329
+ }
1330
+ static _compileCaptures(captures, helper, repository) {
1331
+ let r = [];
1332
+ if (captures) {
1333
+ let maximumCaptureId = 0;
1334
+ for (const captureId in captures) {
1335
+ if (captureId === "$vscodeTextmateLocation") {
1336
+ continue;
1337
+ }
1338
+ const numericCaptureId = parseInt(captureId, 10);
1339
+ if (numericCaptureId > maximumCaptureId) {
1340
+ maximumCaptureId = numericCaptureId;
1341
+ }
1342
+ }
1343
+ for (let i = 0; i <= maximumCaptureId; i++) {
1344
+ r[i] = null;
1345
+ }
1346
+ for (const captureId in captures) {
1347
+ if (captureId === "$vscodeTextmateLocation") {
1348
+ continue;
1349
+ }
1350
+ const numericCaptureId = parseInt(captureId, 10);
1351
+ let retokenizeCapturedWithRuleId = 0;
1352
+ if (captures[captureId].patterns) {
1353
+ retokenizeCapturedWithRuleId = _RuleFactory.getCompiledRuleId(captures[captureId], helper, repository);
1354
+ }
1355
+ r[numericCaptureId] = _RuleFactory.createCaptureRule(helper, captures[captureId].$vscodeTextmateLocation, captures[captureId].name, captures[captureId].contentName, retokenizeCapturedWithRuleId);
1356
+ }
1357
+ }
1358
+ return r;
1359
+ }
1360
+ static _compilePatterns(patterns, helper, repository) {
1361
+ let r = [];
1362
+ if (patterns) {
1363
+ for (let i = 0, len = patterns.length; i < len; i++) {
1364
+ const pattern = patterns[i];
1365
+ let ruleId = -1;
1366
+ if (pattern.include) {
1367
+ const reference = parseInclude(pattern.include);
1368
+ switch (reference.kind) {
1369
+ case 0 /* Base */:
1370
+ case 1 /* Self */:
1371
+ ruleId = _RuleFactory.getCompiledRuleId(repository[pattern.include], helper, repository);
1372
+ break;
1373
+ case 2 /* RelativeReference */:
1374
+ let localIncludedRule = repository[reference.ruleName];
1375
+ if (localIncludedRule) {
1376
+ ruleId = _RuleFactory.getCompiledRuleId(localIncludedRule, helper, repository);
1377
+ } else {
1378
+ }
1379
+ break;
1380
+ case 3 /* TopLevelReference */:
1381
+ case 4 /* TopLevelRepositoryReference */:
1382
+ const externalGrammarName = reference.scopeName;
1383
+ const externalGrammarInclude = reference.kind === 4 /* TopLevelRepositoryReference */ ? reference.ruleName : null;
1384
+ const externalGrammar = helper.getExternalGrammar(externalGrammarName, repository);
1385
+ if (externalGrammar) {
1386
+ if (externalGrammarInclude) {
1387
+ let externalIncludedRule = externalGrammar.repository[externalGrammarInclude];
1388
+ if (externalIncludedRule) {
1389
+ ruleId = _RuleFactory.getCompiledRuleId(externalIncludedRule, helper, externalGrammar.repository);
1390
+ } else {
1391
+ }
1392
+ } else {
1393
+ ruleId = _RuleFactory.getCompiledRuleId(externalGrammar.repository.$self, helper, externalGrammar.repository);
1394
+ }
1395
+ } else {
1396
+ }
1397
+ break;
1398
+ }
1399
+ } else {
1400
+ ruleId = _RuleFactory.getCompiledRuleId(pattern, helper, repository);
1401
+ }
1402
+ if (ruleId !== -1) {
1403
+ const rule = helper.getRule(ruleId);
1404
+ let skipRule = false;
1405
+ if (rule instanceof IncludeOnlyRule || rule instanceof BeginEndRule || rule instanceof BeginWhileRule) {
1406
+ if (rule.hasMissingPatterns && rule.patterns.length === 0) {
1407
+ skipRule = true;
1408
+ }
1409
+ }
1410
+ if (skipRule) {
1411
+ continue;
1412
+ }
1413
+ r.push(ruleId);
1414
+ }
1415
+ }
1416
+ }
1417
+ return {
1418
+ patterns: r,
1419
+ hasMissingPatterns: (patterns ? patterns.length : 0) !== r.length
1420
+ };
1421
+ }
1422
+ };
1423
+ var RegExpSource = class _RegExpSource {
1424
+ source;
1425
+ ruleId;
1426
+ hasAnchor;
1427
+ hasBackReferences;
1428
+ _anchorCache;
1429
+ constructor(regExpSource, ruleId) {
1430
+ if (regExpSource && typeof regExpSource === "string") {
1431
+ const len = regExpSource.length;
1432
+ let lastPushedPos = 0;
1433
+ let output = [];
1434
+ let hasAnchor = false;
1435
+ for (let pos = 0; pos < len; pos++) {
1436
+ const ch = regExpSource.charAt(pos);
1437
+ if (ch === "\\") {
1438
+ if (pos + 1 < len) {
1439
+ const nextCh = regExpSource.charAt(pos + 1);
1440
+ if (nextCh === "z") {
1441
+ output.push(regExpSource.substring(lastPushedPos, pos));
1442
+ output.push("$(?!\\n)(?<!\\n)");
1443
+ lastPushedPos = pos + 2;
1444
+ } else if (nextCh === "A" || nextCh === "G") {
1445
+ hasAnchor = true;
1446
+ }
1447
+ pos++;
1448
+ }
1449
+ }
1450
+ }
1451
+ this.hasAnchor = hasAnchor;
1452
+ if (lastPushedPos === 0) {
1453
+ this.source = regExpSource;
1454
+ } else {
1455
+ output.push(regExpSource.substring(lastPushedPos, len));
1456
+ this.source = output.join("");
1457
+ }
1458
+ } else {
1459
+ this.hasAnchor = false;
1460
+ this.source = regExpSource;
1461
+ }
1462
+ if (this.hasAnchor) {
1463
+ this._anchorCache = this._buildAnchorCache();
1464
+ } else {
1465
+ this._anchorCache = null;
1466
+ }
1467
+ this.ruleId = ruleId;
1468
+ if (typeof this.source === "string") {
1469
+ this.hasBackReferences = HAS_BACK_REFERENCES.test(this.source);
1470
+ } else {
1471
+ this.hasBackReferences = false;
1472
+ }
1473
+ }
1474
+ clone() {
1475
+ return new _RegExpSource(this.source, this.ruleId);
1476
+ }
1477
+ setSource(newSource) {
1478
+ if (this.source === newSource) {
1479
+ return;
1480
+ }
1481
+ this.source = newSource;
1482
+ if (this.hasAnchor) {
1483
+ this._anchorCache = this._buildAnchorCache();
1484
+ }
1485
+ }
1486
+ resolveBackReferences(lineText, captureIndices) {
1487
+ if (typeof this.source !== "string") {
1488
+ throw new Error("This method should only be called if the source is a string");
1489
+ }
1490
+ let capturedValues = captureIndices.map((capture) => {
1491
+ return lineText.substring(capture.start, capture.end);
1492
+ });
1493
+ BACK_REFERENCING_END.lastIndex = 0;
1494
+ return this.source.replace(BACK_REFERENCING_END, (match, g1) => {
1495
+ return escapeRegExpCharacters(capturedValues[parseInt(g1, 10)] || "");
1496
+ });
1497
+ }
1498
+ _buildAnchorCache() {
1499
+ if (typeof this.source !== "string") {
1500
+ throw new Error("This method should only be called if the source is a string");
1501
+ }
1502
+ let A0_G0_result = [];
1503
+ let A0_G1_result = [];
1504
+ let A1_G0_result = [];
1505
+ let A1_G1_result = [];
1506
+ let pos, len, ch, nextCh;
1507
+ for (pos = 0, len = this.source.length; pos < len; pos++) {
1508
+ ch = this.source.charAt(pos);
1509
+ A0_G0_result[pos] = ch;
1510
+ A0_G1_result[pos] = ch;
1511
+ A1_G0_result[pos] = ch;
1512
+ A1_G1_result[pos] = ch;
1513
+ if (ch === "\\") {
1514
+ if (pos + 1 < len) {
1515
+ nextCh = this.source.charAt(pos + 1);
1516
+ if (nextCh === "A") {
1517
+ A0_G0_result[pos + 1] = "\uFFFF";
1518
+ A0_G1_result[pos + 1] = "\uFFFF";
1519
+ A1_G0_result[pos + 1] = "A";
1520
+ A1_G1_result[pos + 1] = "A";
1521
+ } else if (nextCh === "G") {
1522
+ A0_G0_result[pos + 1] = "\uFFFF";
1523
+ A0_G1_result[pos + 1] = "G";
1524
+ A1_G0_result[pos + 1] = "\uFFFF";
1525
+ A1_G1_result[pos + 1] = "G";
1526
+ } else {
1527
+ A0_G0_result[pos + 1] = nextCh;
1528
+ A0_G1_result[pos + 1] = nextCh;
1529
+ A1_G0_result[pos + 1] = nextCh;
1530
+ A1_G1_result[pos + 1] = nextCh;
1531
+ }
1532
+ pos++;
1533
+ }
1534
+ }
1535
+ }
1536
+ return {
1537
+ A0_G0: A0_G0_result.join(""),
1538
+ A0_G1: A0_G1_result.join(""),
1539
+ A1_G0: A1_G0_result.join(""),
1540
+ A1_G1: A1_G1_result.join("")
1541
+ };
1542
+ }
1543
+ resolveAnchors(allowA, allowG) {
1544
+ if (!this.hasAnchor || !this._anchorCache || typeof this.source !== "string") {
1545
+ return this.source;
1546
+ }
1547
+ if (allowA) {
1548
+ if (allowG) {
1549
+ return this._anchorCache.A1_G1;
1550
+ } else {
1551
+ return this._anchorCache.A1_G0;
1552
+ }
1553
+ } else {
1554
+ if (allowG) {
1555
+ return this._anchorCache.A0_G1;
1556
+ } else {
1557
+ return this._anchorCache.A0_G0;
1558
+ }
1559
+ }
1560
+ }
1561
+ };
1562
+ var RegExpSourceList = class {
1563
+ _items;
1564
+ _hasAnchors;
1565
+ _cached;
1566
+ _anchorCache;
1567
+ constructor() {
1568
+ this._items = [];
1569
+ this._hasAnchors = false;
1570
+ this._cached = null;
1571
+ this._anchorCache = {
1572
+ A0_G0: null,
1573
+ A0_G1: null,
1574
+ A1_G0: null,
1575
+ A1_G1: null
1576
+ };
1577
+ }
1578
+ dispose() {
1579
+ this._disposeCaches();
1580
+ }
1581
+ _disposeCaches() {
1582
+ if (this._cached) {
1583
+ this._cached.dispose();
1584
+ this._cached = null;
1585
+ }
1586
+ if (this._anchorCache.A0_G0) {
1587
+ this._anchorCache.A0_G0.dispose();
1588
+ this._anchorCache.A0_G0 = null;
1589
+ }
1590
+ if (this._anchorCache.A0_G1) {
1591
+ this._anchorCache.A0_G1.dispose();
1592
+ this._anchorCache.A0_G1 = null;
1593
+ }
1594
+ if (this._anchorCache.A1_G0) {
1595
+ this._anchorCache.A1_G0.dispose();
1596
+ this._anchorCache.A1_G0 = null;
1597
+ }
1598
+ if (this._anchorCache.A1_G1) {
1599
+ this._anchorCache.A1_G1.dispose();
1600
+ this._anchorCache.A1_G1 = null;
1601
+ }
1602
+ }
1603
+ push(item) {
1604
+ this._items.push(item);
1605
+ this._hasAnchors = this._hasAnchors || item.hasAnchor;
1606
+ }
1607
+ unshift(item) {
1608
+ this._items.unshift(item);
1609
+ this._hasAnchors = this._hasAnchors || item.hasAnchor;
1610
+ }
1611
+ length() {
1612
+ return this._items.length;
1613
+ }
1614
+ setSource(index, newSource) {
1615
+ if (this._items[index].source !== newSource) {
1616
+ this._disposeCaches();
1617
+ this._items[index].setSource(newSource);
1618
+ }
1619
+ }
1620
+ compile(onigLib) {
1621
+ if (!this._cached) {
1622
+ let regExps = this._items.map((e) => e.source);
1623
+ this._cached = new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));
1624
+ }
1625
+ return this._cached;
1626
+ }
1627
+ compileAG(onigLib, allowA, allowG) {
1628
+ if (!this._hasAnchors) {
1629
+ return this.compile(onigLib);
1630
+ } else {
1631
+ if (allowA) {
1632
+ if (allowG) {
1633
+ if (!this._anchorCache.A1_G1) {
1634
+ this._anchorCache.A1_G1 = this._resolveAnchors(onigLib, allowA, allowG);
1635
+ }
1636
+ return this._anchorCache.A1_G1;
1637
+ } else {
1638
+ if (!this._anchorCache.A1_G0) {
1639
+ this._anchorCache.A1_G0 = this._resolveAnchors(onigLib, allowA, allowG);
1640
+ }
1641
+ return this._anchorCache.A1_G0;
1642
+ }
1643
+ } else {
1644
+ if (allowG) {
1645
+ if (!this._anchorCache.A0_G1) {
1646
+ this._anchorCache.A0_G1 = this._resolveAnchors(onigLib, allowA, allowG);
1647
+ }
1648
+ return this._anchorCache.A0_G1;
1649
+ } else {
1650
+ if (!this._anchorCache.A0_G0) {
1651
+ this._anchorCache.A0_G0 = this._resolveAnchors(onigLib, allowA, allowG);
1652
+ }
1653
+ return this._anchorCache.A0_G0;
1654
+ }
1655
+ }
1656
+ }
1657
+ }
1658
+ _resolveAnchors(onigLib, allowA, allowG) {
1659
+ let regExps = this._items.map((e) => e.resolveAnchors(allowA, allowG));
1660
+ return new CompiledRule(onigLib, regExps, this._items.map((e) => e.ruleId));
1661
+ }
1662
+ };
1663
+ var CompiledRule = class {
1664
+ constructor(onigLib, regExps, rules) {
1665
+ this.regExps = regExps;
1666
+ this.rules = rules;
1667
+ this.scanner = onigLib.createOnigScanner(regExps);
1668
+ }
1669
+ scanner;
1670
+ dispose() {
1671
+ if (typeof this.scanner.dispose === "function") {
1672
+ this.scanner.dispose();
1673
+ }
1674
+ }
1675
+ toString() {
1676
+ const r = [];
1677
+ for (let i = 0, len = this.rules.length; i < len; i++) {
1678
+ r.push(" - " + this.rules[i] + ": " + this.regExps[i]);
1679
+ }
1680
+ return r.join("\n");
1681
+ }
1682
+ findNextMatchSync(string, startPosition, options) {
1683
+ const result = this.scanner.findNextMatchSync(string, startPosition, options);
1684
+ if (!result) {
1685
+ return null;
1686
+ }
1687
+ return {
1688
+ ruleId: this.rules[result.index],
1689
+ captureIndices: result.captureIndices
1690
+ };
1691
+ }
1692
+ };
1693
+
1694
+ // src/grammar/basicScopesAttributeProvider.ts
1695
+ var BasicScopeAttributes = class {
1696
+ constructor(languageId, tokenType) {
1697
+ this.languageId = languageId;
1698
+ this.tokenType = tokenType;
1699
+ }
1700
+ };
1701
+ var BasicScopeAttributesProvider = class _BasicScopeAttributesProvider {
1702
+ _defaultAttributes;
1703
+ _embeddedLanguagesMatcher;
1704
+ constructor(initialLanguageId, embeddedLanguages) {
1705
+ this._defaultAttributes = new BasicScopeAttributes(initialLanguageId, 8 /* NotSet */);
1706
+ this._embeddedLanguagesMatcher = new ScopeMatcher(Object.entries(embeddedLanguages || {}));
1707
+ }
1708
+ getDefaultAttributes() {
1709
+ return this._defaultAttributes;
1710
+ }
1711
+ getBasicScopeAttributes(scopeName) {
1712
+ if (scopeName === null) {
1713
+ return _BasicScopeAttributesProvider._NULL_SCOPE_METADATA;
1714
+ }
1715
+ return this._getBasicScopeAttributes.get(scopeName);
1716
+ }
1717
+ static _NULL_SCOPE_METADATA = new BasicScopeAttributes(0, 0);
1718
+ _getBasicScopeAttributes = new CachedFn((scopeName) => {
1719
+ const languageId = this._scopeToLanguage(scopeName);
1720
+ const standardTokenType = this._toStandardTokenType(scopeName);
1721
+ return new BasicScopeAttributes(languageId, standardTokenType);
1722
+ });
1723
+ /**
1724
+ * Given a produced TM scope, return the language that token describes or null if unknown.
1725
+ * e.g. source.html => html, source.css.embedded.html => css, punctuation.definition.tag.html => null
1726
+ */
1727
+ _scopeToLanguage(scope) {
1728
+ return this._embeddedLanguagesMatcher.match(scope) || 0;
1729
+ }
1730
+ _toStandardTokenType(scopeName) {
1731
+ const m = scopeName.match(_BasicScopeAttributesProvider.STANDARD_TOKEN_TYPE_REGEXP);
1732
+ if (!m) {
1733
+ return 8 /* NotSet */;
1734
+ }
1735
+ switch (m[1]) {
1736
+ case "comment":
1737
+ return 1 /* Comment */;
1738
+ case "string":
1739
+ return 2 /* String */;
1740
+ case "regex":
1741
+ return 3 /* RegEx */;
1742
+ case "meta.embedded":
1743
+ return 0 /* Other */;
1744
+ }
1745
+ throw new Error("Unexpected match for standard token type!");
1746
+ }
1747
+ static STANDARD_TOKEN_TYPE_REGEXP = /\b(comment|string|regex|meta\.embedded)\b/;
1748
+ };
1749
+ var ScopeMatcher = class {
1750
+ values;
1751
+ scopesRegExp;
1752
+ constructor(values) {
1753
+ if (values.length === 0) {
1754
+ this.values = null;
1755
+ this.scopesRegExp = null;
1756
+ } else {
1757
+ this.values = new Map(values);
1758
+ const escapedScopes = values.map(
1759
+ ([scopeName, value]) => escapeRegExpCharacters(scopeName)
1760
+ );
1761
+ escapedScopes.sort();
1762
+ escapedScopes.reverse();
1763
+ this.scopesRegExp = new RegExp(
1764
+ `^((${escapedScopes.join(")|(")}))($|\\.)`,
1765
+ ""
1766
+ );
1767
+ }
1768
+ }
1769
+ match(scope) {
1770
+ if (!this.scopesRegExp) {
1771
+ return void 0;
1772
+ }
1773
+ const m = scope.match(this.scopesRegExp);
1774
+ if (!m) {
1775
+ return void 0;
1776
+ }
1777
+ return this.values.get(m[1]);
1778
+ }
1779
+ };
1780
+
1781
+ // src/debug.ts
1782
+ var DebugFlags = {
1783
+ InDebugMode: typeof process !== "undefined" && !!process.env["VSCODE_TEXTMATE_DEBUG"]
1784
+ };
1785
+ var UseOnigurumaFindOptions = false;
1786
+
1787
+ // src/grammar/tokenizeString.ts
1788
+ var TokenizeStringResult = class {
1789
+ constructor(stack, stoppedEarly) {
1790
+ this.stack = stack;
1791
+ this.stoppedEarly = stoppedEarly;
1792
+ }
1793
+ };
1794
+ function _tokenizeString(grammar, lineText, isFirstLine, linePos, stack, lineTokens, checkWhileConditions, timeLimit) {
1795
+ const lineLength = lineText.content.length;
1796
+ let STOP = false;
1797
+ let anchorPosition = -1;
1798
+ if (checkWhileConditions) {
1799
+ const whileCheckResult = _checkWhileConditions(
1800
+ grammar,
1801
+ lineText,
1802
+ isFirstLine,
1803
+ linePos,
1804
+ stack,
1805
+ lineTokens
1806
+ );
1807
+ stack = whileCheckResult.stack;
1808
+ linePos = whileCheckResult.linePos;
1809
+ isFirstLine = whileCheckResult.isFirstLine;
1810
+ anchorPosition = whileCheckResult.anchorPosition;
1811
+ }
1812
+ const startTime = Date.now();
1813
+ while (!STOP) {
1814
+ if (timeLimit !== 0) {
1815
+ const elapsedTime = Date.now() - startTime;
1816
+ if (elapsedTime > timeLimit) {
1817
+ return new TokenizeStringResult(stack, true);
1818
+ }
1819
+ }
1820
+ scanNext();
1821
+ }
1822
+ return new TokenizeStringResult(stack, false);
1823
+ function scanNext() {
1824
+ if (false) {
1825
+ console.log("");
1826
+ console.log(
1827
+ `@@scanNext ${linePos}: |${lineText.content.substr(linePos).replace(/\n$/, "\\n")}|`
1828
+ );
1829
+ }
1830
+ const r = matchRuleOrInjections(
1831
+ grammar,
1832
+ lineText,
1833
+ isFirstLine,
1834
+ linePos,
1835
+ stack,
1836
+ anchorPosition
1837
+ );
1838
+ if (!r) {
1839
+ lineTokens.produce(stack, lineLength);
1840
+ STOP = true;
1841
+ return;
1842
+ }
1843
+ const captureIndices = r.captureIndices;
1844
+ const matchedRuleId = r.matchedRuleId;
1845
+ const hasAdvanced = captureIndices && captureIndices.length > 0 ? captureIndices[0].end > linePos : false;
1846
+ if (matchedRuleId === endRuleId) {
1847
+ const poppedRule = stack.getRule(grammar);
1848
+ if (false) {
1849
+ console.log(
1850
+ " popping " + poppedRule.debugName + " - " + poppedRule.debugEndRegExp
1851
+ );
1852
+ }
1853
+ lineTokens.produce(stack, captureIndices[0].start);
1854
+ stack = stack.withContentNameScopesList(stack.nameScopesList);
1855
+ handleCaptures(
1856
+ grammar,
1857
+ lineText,
1858
+ isFirstLine,
1859
+ stack,
1860
+ lineTokens,
1861
+ poppedRule.endCaptures,
1862
+ captureIndices
1863
+ );
1864
+ lineTokens.produce(stack, captureIndices[0].end);
1865
+ const popped = stack;
1866
+ stack = stack.parent;
1867
+ anchorPosition = popped.getAnchorPos();
1868
+ if (!hasAdvanced && popped.getEnterPos() === linePos) {
1869
+ if (false) {
1870
+ console.error(
1871
+ "[1] - Grammar is in an endless loop - Grammar pushed & popped a rule without advancing"
1872
+ );
1873
+ }
1874
+ stack = popped;
1875
+ lineTokens.produce(stack, lineLength);
1876
+ STOP = true;
1877
+ return;
1878
+ }
1879
+ } else {
1880
+ const _rule = grammar.getRule(matchedRuleId);
1881
+ lineTokens.produce(stack, captureIndices[0].start);
1882
+ const beforePush = stack;
1883
+ const scopeName = _rule.getName(lineText.content, captureIndices);
1884
+ const nameScopesList = stack.contentNameScopesList.pushAttributed(
1885
+ scopeName,
1886
+ grammar
1887
+ );
1888
+ stack = stack.push(
1889
+ matchedRuleId,
1890
+ linePos,
1891
+ anchorPosition,
1892
+ captureIndices[0].end === lineLength,
1893
+ null,
1894
+ nameScopesList,
1895
+ nameScopesList
1896
+ );
1897
+ if (_rule instanceof BeginEndRule) {
1898
+ const pushedRule = _rule;
1899
+ if (false) {
1900
+ console.log(
1901
+ " pushing " + pushedRule.debugName + " - " + pushedRule.debugBeginRegExp
1902
+ );
1903
+ }
1904
+ handleCaptures(
1905
+ grammar,
1906
+ lineText,
1907
+ isFirstLine,
1908
+ stack,
1909
+ lineTokens,
1910
+ pushedRule.beginCaptures,
1911
+ captureIndices
1912
+ );
1913
+ lineTokens.produce(stack, captureIndices[0].end);
1914
+ anchorPosition = captureIndices[0].end;
1915
+ const contentName = pushedRule.getContentName(
1916
+ lineText.content,
1917
+ captureIndices
1918
+ );
1919
+ const contentNameScopesList = nameScopesList.pushAttributed(
1920
+ contentName,
1921
+ grammar
1922
+ );
1923
+ stack = stack.withContentNameScopesList(contentNameScopesList);
1924
+ if (pushedRule.endHasBackReferences) {
1925
+ stack = stack.withEndRule(
1926
+ pushedRule.getEndWithResolvedBackReferences(
1927
+ lineText.content,
1928
+ captureIndices
1929
+ )
1930
+ );
1931
+ }
1932
+ if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
1933
+ if (false) {
1934
+ console.error(
1935
+ "[2] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"
1936
+ );
1937
+ }
1938
+ stack = stack.pop();
1939
+ lineTokens.produce(stack, lineLength);
1940
+ STOP = true;
1941
+ return;
1942
+ }
1943
+ } else if (_rule instanceof BeginWhileRule) {
1944
+ const pushedRule = _rule;
1945
+ if (false) {
1946
+ console.log(" pushing " + pushedRule.debugName);
1947
+ }
1948
+ handleCaptures(
1949
+ grammar,
1950
+ lineText,
1951
+ isFirstLine,
1952
+ stack,
1953
+ lineTokens,
1954
+ pushedRule.beginCaptures,
1955
+ captureIndices
1956
+ );
1957
+ lineTokens.produce(stack, captureIndices[0].end);
1958
+ anchorPosition = captureIndices[0].end;
1959
+ const contentName = pushedRule.getContentName(
1960
+ lineText.content,
1961
+ captureIndices
1962
+ );
1963
+ const contentNameScopesList = nameScopesList.pushAttributed(
1964
+ contentName,
1965
+ grammar
1966
+ );
1967
+ stack = stack.withContentNameScopesList(contentNameScopesList);
1968
+ if (pushedRule.whileHasBackReferences) {
1969
+ stack = stack.withEndRule(
1970
+ pushedRule.getWhileWithResolvedBackReferences(
1971
+ lineText.content,
1972
+ captureIndices
1973
+ )
1974
+ );
1975
+ }
1976
+ if (!hasAdvanced && beforePush.hasSameRuleAs(stack)) {
1977
+ if (false) {
1978
+ console.error(
1979
+ "[3] - Grammar is in an endless loop - Grammar pushed the same rule without advancing"
1980
+ );
1981
+ }
1982
+ stack = stack.pop();
1983
+ lineTokens.produce(stack, lineLength);
1984
+ STOP = true;
1985
+ return;
1986
+ }
1987
+ } else {
1988
+ const matchingRule = _rule;
1989
+ if (false) {
1990
+ console.log(
1991
+ " matched " + matchingRule.debugName + " - " + matchingRule.debugMatchRegExp
1992
+ );
1993
+ }
1994
+ handleCaptures(
1995
+ grammar,
1996
+ lineText,
1997
+ isFirstLine,
1998
+ stack,
1999
+ lineTokens,
2000
+ matchingRule.captures,
2001
+ captureIndices
2002
+ );
2003
+ lineTokens.produce(stack, captureIndices[0].end);
2004
+ stack = stack.pop();
2005
+ if (!hasAdvanced) {
2006
+ if (false) {
2007
+ console.error(
2008
+ "[4] - Grammar is in an endless loop - Grammar is not advancing, nor is it pushing/popping"
2009
+ );
2010
+ }
2011
+ stack = stack.safePop();
2012
+ lineTokens.produce(stack, lineLength);
2013
+ STOP = true;
2014
+ return;
2015
+ }
2016
+ }
2017
+ }
2018
+ if (captureIndices[0].end > linePos) {
2019
+ linePos = captureIndices[0].end;
2020
+ isFirstLine = false;
2021
+ }
2022
+ }
2023
+ }
2024
+ function _checkWhileConditions(grammar, lineText, isFirstLine, linePos, stack, lineTokens) {
2025
+ let anchorPosition = stack.beginRuleCapturedEOL ? 0 : -1;
2026
+ const whileRules = [];
2027
+ for (let node = stack; node; node = node.pop()) {
2028
+ const nodeRule = node.getRule(grammar);
2029
+ if (nodeRule instanceof BeginWhileRule) {
2030
+ whileRules.push({
2031
+ rule: nodeRule,
2032
+ stack: node
2033
+ });
2034
+ }
2035
+ }
2036
+ for (let whileRule = whileRules.pop(); whileRule; whileRule = whileRules.pop()) {
2037
+ const { ruleScanner, findOptions } = prepareRuleWhileSearch(whileRule.rule, grammar, whileRule.stack.endRule, isFirstLine, linePos === anchorPosition);
2038
+ const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
2039
+ if (false) {
2040
+ console.log(" scanning for while rule");
2041
+ console.log(ruleScanner.toString());
2042
+ }
2043
+ if (r) {
2044
+ const matchedRuleId = r.ruleId;
2045
+ if (matchedRuleId !== whileRuleId) {
2046
+ stack = whileRule.stack.pop();
2047
+ break;
2048
+ }
2049
+ if (r.captureIndices && r.captureIndices.length) {
2050
+ lineTokens.produce(whileRule.stack, r.captureIndices[0].start);
2051
+ handleCaptures(grammar, lineText, isFirstLine, whileRule.stack, lineTokens, whileRule.rule.whileCaptures, r.captureIndices);
2052
+ lineTokens.produce(whileRule.stack, r.captureIndices[0].end);
2053
+ anchorPosition = r.captureIndices[0].end;
2054
+ if (r.captureIndices[0].end > linePos) {
2055
+ linePos = r.captureIndices[0].end;
2056
+ isFirstLine = false;
2057
+ }
2058
+ }
2059
+ } else {
2060
+ if (false) {
2061
+ console.log(" popping " + whileRule.rule.debugName + " - " + whileRule.rule.debugWhileRegExp);
2062
+ }
2063
+ stack = whileRule.stack.pop();
2064
+ break;
2065
+ }
2066
+ }
2067
+ return { stack, linePos, anchorPosition, isFirstLine };
2068
+ }
2069
+ function matchRuleOrInjections(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
2070
+ const matchResult = matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
2071
+ const injections = grammar.getInjections();
2072
+ if (injections.length === 0) {
2073
+ return matchResult;
2074
+ }
2075
+ const injectionResult = matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition);
2076
+ if (!injectionResult) {
2077
+ return matchResult;
2078
+ }
2079
+ if (!matchResult) {
2080
+ return injectionResult;
2081
+ }
2082
+ const matchResultScore = matchResult.captureIndices[0].start;
2083
+ const injectionResultScore = injectionResult.captureIndices[0].start;
2084
+ if (injectionResultScore < matchResultScore || injectionResult.priorityMatch && injectionResultScore === matchResultScore) {
2085
+ return injectionResult;
2086
+ }
2087
+ return matchResult;
2088
+ }
2089
+ function matchRule(grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
2090
+ const rule = stack.getRule(grammar);
2091
+ const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, stack.endRule, isFirstLine, linePos === anchorPosition);
2092
+ const r = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
2093
+ if (r) {
2094
+ return {
2095
+ captureIndices: r.captureIndices,
2096
+ matchedRuleId: r.ruleId
2097
+ };
2098
+ }
2099
+ return null;
2100
+ }
2101
+ function matchInjections(injections, grammar, lineText, isFirstLine, linePos, stack, anchorPosition) {
2102
+ let bestMatchRating = Number.MAX_VALUE;
2103
+ let bestMatchCaptureIndices = null;
2104
+ let bestMatchRuleId;
2105
+ let bestMatchResultPriority = 0;
2106
+ const scopes = stack.contentNameScopesList.getScopeNames();
2107
+ for (let i = 0, len = injections.length; i < len; i++) {
2108
+ const injection = injections[i];
2109
+ if (!injection.matcher(scopes)) {
2110
+ continue;
2111
+ }
2112
+ const rule = grammar.getRule(injection.ruleId);
2113
+ const { ruleScanner, findOptions } = prepareRuleSearch(rule, grammar, null, isFirstLine, linePos === anchorPosition);
2114
+ const matchResult = ruleScanner.findNextMatchSync(lineText, linePos, findOptions);
2115
+ if (!matchResult) {
2116
+ continue;
2117
+ }
2118
+ if (false) {
2119
+ console.log(` matched injection: ${injection.debugSelector}`);
2120
+ console.log(ruleScanner.toString());
2121
+ }
2122
+ const matchRating = matchResult.captureIndices[0].start;
2123
+ if (matchRating >= bestMatchRating) {
2124
+ continue;
2125
+ }
2126
+ bestMatchRating = matchRating;
2127
+ bestMatchCaptureIndices = matchResult.captureIndices;
2128
+ bestMatchRuleId = matchResult.ruleId;
2129
+ bestMatchResultPriority = injection.priority;
2130
+ if (bestMatchRating === linePos) {
2131
+ break;
2132
+ }
2133
+ }
2134
+ if (bestMatchCaptureIndices) {
2135
+ return {
2136
+ priorityMatch: bestMatchResultPriority === -1,
2137
+ captureIndices: bestMatchCaptureIndices,
2138
+ matchedRuleId: bestMatchRuleId
2139
+ };
2140
+ }
2141
+ return null;
2142
+ }
2143
+ function prepareRuleSearch(rule, grammar, endRegexSource, allowA, allowG) {
2144
+ if (UseOnigurumaFindOptions) {
2145
+ const ruleScanner2 = rule.compile(grammar, endRegexSource);
2146
+ const findOptions = getFindOptions(allowA, allowG);
2147
+ return { ruleScanner: ruleScanner2, findOptions };
2148
+ }
2149
+ const ruleScanner = rule.compileAG(grammar, endRegexSource, allowA, allowG);
2150
+ return { ruleScanner, findOptions: 0 /* None */ };
2151
+ }
2152
+ function prepareRuleWhileSearch(rule, grammar, endRegexSource, allowA, allowG) {
2153
+ if (UseOnigurumaFindOptions) {
2154
+ const ruleScanner2 = rule.compileWhile(grammar, endRegexSource);
2155
+ const findOptions = getFindOptions(allowA, allowG);
2156
+ return { ruleScanner: ruleScanner2, findOptions };
2157
+ }
2158
+ const ruleScanner = rule.compileWhileAG(grammar, endRegexSource, allowA, allowG);
2159
+ return { ruleScanner, findOptions: 0 /* None */ };
2160
+ }
2161
+ function getFindOptions(allowA, allowG) {
2162
+ let options = 0 /* None */;
2163
+ if (!allowA) {
2164
+ options |= 1 /* NotBeginString */;
2165
+ }
2166
+ if (!allowG) {
2167
+ options |= 4 /* NotBeginPosition */;
2168
+ }
2169
+ return options;
2170
+ }
2171
+ function handleCaptures(grammar, lineText, isFirstLine, stack, lineTokens, captures, captureIndices) {
2172
+ if (captures.length === 0) {
2173
+ return;
2174
+ }
2175
+ const lineTextContent = lineText.content;
2176
+ const len = Math.min(captures.length, captureIndices.length);
2177
+ const localStack = [];
2178
+ const maxEnd = captureIndices[0].end;
2179
+ for (let i = 0; i < len; i++) {
2180
+ const captureRule = captures[i];
2181
+ if (captureRule === null) {
2182
+ continue;
2183
+ }
2184
+ const captureIndex = captureIndices[i];
2185
+ if (captureIndex.length === 0) {
2186
+ continue;
2187
+ }
2188
+ if (captureIndex.start > maxEnd) {
2189
+ break;
2190
+ }
2191
+ while (localStack.length > 0 && localStack[localStack.length - 1].endPos <= captureIndex.start) {
2192
+ lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);
2193
+ localStack.pop();
2194
+ }
2195
+ if (localStack.length > 0) {
2196
+ lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, captureIndex.start);
2197
+ } else {
2198
+ lineTokens.produce(stack, captureIndex.start);
2199
+ }
2200
+ if (captureRule.retokenizeCapturedWithRuleId) {
2201
+ const scopeName = captureRule.getName(lineTextContent, captureIndices);
2202
+ const nameScopesList = stack.contentNameScopesList.pushAttributed(scopeName, grammar);
2203
+ const contentName = captureRule.getContentName(lineTextContent, captureIndices);
2204
+ const contentNameScopesList = nameScopesList.pushAttributed(contentName, grammar);
2205
+ const stackClone = stack.push(captureRule.retokenizeCapturedWithRuleId, captureIndex.start, -1, false, null, nameScopesList, contentNameScopesList);
2206
+ const onigSubStr = grammar.createOnigString(lineTextContent.substring(0, captureIndex.end));
2207
+ _tokenizeString(
2208
+ grammar,
2209
+ onigSubStr,
2210
+ isFirstLine && captureIndex.start === 0,
2211
+ captureIndex.start,
2212
+ stackClone,
2213
+ lineTokens,
2214
+ false,
2215
+ /* no time limit */
2216
+ 0
2217
+ );
2218
+ disposeOnigString(onigSubStr);
2219
+ continue;
2220
+ }
2221
+ const captureRuleScopeName = captureRule.getName(lineTextContent, captureIndices);
2222
+ if (captureRuleScopeName !== null) {
2223
+ const base = localStack.length > 0 ? localStack[localStack.length - 1].scopes : stack.contentNameScopesList;
2224
+ const captureRuleScopesList = base.pushAttributed(captureRuleScopeName, grammar);
2225
+ localStack.push(new LocalStackElement(captureRuleScopesList, captureIndex.end));
2226
+ }
2227
+ }
2228
+ while (localStack.length > 0) {
2229
+ lineTokens.produceFromScopes(localStack[localStack.length - 1].scopes, localStack[localStack.length - 1].endPos);
2230
+ localStack.pop();
2231
+ }
2232
+ }
2233
+ var LocalStackElement = class {
2234
+ scopes;
2235
+ endPos;
2236
+ constructor(scopes, endPos) {
2237
+ this.scopes = scopes;
2238
+ this.endPos = endPos;
2239
+ }
2240
+ };
2241
+
2242
+ // src/grammar/grammar.ts
2243
+ function createGrammar(scopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, onigLib) {
2244
+ return new Grammar(
2245
+ scopeName,
2246
+ grammar,
2247
+ initialLanguage,
2248
+ embeddedLanguages,
2249
+ tokenTypes,
2250
+ balancedBracketSelectors,
2251
+ grammarRepository,
2252
+ onigLib
2253
+ );
2254
+ }
2255
+ function collectInjections(result, selector, rule, ruleFactoryHelper, grammar) {
2256
+ const matchers = createMatchers(selector, nameMatcher);
2257
+ const ruleId = RuleFactory.getCompiledRuleId(rule, ruleFactoryHelper, grammar.repository);
2258
+ for (const matcher of matchers) {
2259
+ result.push({
2260
+ debugSelector: selector,
2261
+ matcher: matcher.matcher,
2262
+ ruleId,
2263
+ grammar,
2264
+ priority: matcher.priority
2265
+ });
2266
+ }
2267
+ }
2268
+ function nameMatcher(identifers, scopes) {
2269
+ if (scopes.length < identifers.length) {
2270
+ return false;
2271
+ }
2272
+ let lastIndex = 0;
2273
+ return identifers.every((identifier) => {
2274
+ for (let i = lastIndex; i < scopes.length; i++) {
2275
+ if (scopesAreMatching(scopes[i], identifier)) {
2276
+ lastIndex = i + 1;
2277
+ return true;
2278
+ }
2279
+ }
2280
+ return false;
2281
+ });
2282
+ }
2283
+ function scopesAreMatching(thisScopeName, scopeName) {
2284
+ if (!thisScopeName) {
2285
+ return false;
2286
+ }
2287
+ if (thisScopeName === scopeName) {
2288
+ return true;
2289
+ }
2290
+ const len = scopeName.length;
2291
+ return thisScopeName.length > len && thisScopeName.substr(0, len) === scopeName && thisScopeName[len] === ".";
2292
+ }
2293
+ var Grammar = class {
2294
+ constructor(_rootScopeName, grammar, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors, grammarRepository, _onigLib) {
2295
+ this._rootScopeName = _rootScopeName;
2296
+ this.balancedBracketSelectors = balancedBracketSelectors;
2297
+ this._onigLib = _onigLib;
2298
+ this._basicScopeAttributesProvider = new BasicScopeAttributesProvider(
2299
+ initialLanguage,
2300
+ embeddedLanguages
2301
+ );
2302
+ this._rootId = -1;
2303
+ this._lastRuleId = 0;
2304
+ this._ruleId2desc = [null];
2305
+ this._includedGrammars = {};
2306
+ this._grammarRepository = grammarRepository;
2307
+ this._grammar = initGrammar(grammar, null);
2308
+ this._injections = null;
2309
+ this._tokenTypeMatchers = [];
2310
+ if (tokenTypes) {
2311
+ for (const selector of Object.keys(tokenTypes)) {
2312
+ const matchers = createMatchers(selector, nameMatcher);
2313
+ for (const matcher of matchers) {
2314
+ this._tokenTypeMatchers.push({
2315
+ matcher: matcher.matcher,
2316
+ type: tokenTypes[selector]
2317
+ });
2318
+ }
2319
+ }
2320
+ }
2321
+ }
2322
+ _rootId;
2323
+ _lastRuleId;
2324
+ _ruleId2desc;
2325
+ _includedGrammars;
2326
+ _grammarRepository;
2327
+ _grammar;
2328
+ _injections;
2329
+ _basicScopeAttributesProvider;
2330
+ _tokenTypeMatchers;
2331
+ get themeProvider() {
2332
+ return this._grammarRepository;
2333
+ }
2334
+ dispose() {
2335
+ for (const rule of this._ruleId2desc) {
2336
+ if (rule) {
2337
+ rule.dispose();
2338
+ }
2339
+ }
2340
+ }
2341
+ createOnigScanner(sources) {
2342
+ return this._onigLib.createOnigScanner(sources);
2343
+ }
2344
+ createOnigString(sources) {
2345
+ return this._onigLib.createOnigString(sources);
2346
+ }
2347
+ getMetadataForScope(scope) {
2348
+ return this._basicScopeAttributesProvider.getBasicScopeAttributes(scope);
2349
+ }
2350
+ _collectInjections() {
2351
+ const grammarRepository = {
2352
+ lookup: (scopeName2) => {
2353
+ if (scopeName2 === this._rootScopeName) {
2354
+ return this._grammar;
2355
+ }
2356
+ return this.getExternalGrammar(scopeName2);
2357
+ },
2358
+ injections: (scopeName2) => {
2359
+ return this._grammarRepository.injections(scopeName2);
2360
+ }
2361
+ };
2362
+ const result = [];
2363
+ const scopeName = this._rootScopeName;
2364
+ const grammar = grammarRepository.lookup(scopeName);
2365
+ if (grammar) {
2366
+ const rawInjections = grammar.injections;
2367
+ if (rawInjections) {
2368
+ for (let expression in rawInjections) {
2369
+ collectInjections(
2370
+ result,
2371
+ expression,
2372
+ rawInjections[expression],
2373
+ this,
2374
+ grammar
2375
+ );
2376
+ }
2377
+ }
2378
+ const injectionScopeNames = this._grammarRepository.injections(scopeName);
2379
+ if (injectionScopeNames) {
2380
+ injectionScopeNames.forEach((injectionScopeName) => {
2381
+ const injectionGrammar = this.getExternalGrammar(injectionScopeName);
2382
+ if (injectionGrammar) {
2383
+ const selector = injectionGrammar.injectionSelector;
2384
+ if (selector) {
2385
+ collectInjections(
2386
+ result,
2387
+ selector,
2388
+ injectionGrammar,
2389
+ this,
2390
+ injectionGrammar
2391
+ );
2392
+ }
2393
+ }
2394
+ });
2395
+ }
2396
+ }
2397
+ result.sort((i1, i2) => i1.priority - i2.priority);
2398
+ return result;
2399
+ }
2400
+ getInjections() {
2401
+ if (this._injections === null) {
2402
+ this._injections = this._collectInjections();
2403
+ }
2404
+ return this._injections;
2405
+ }
2406
+ registerRule(factory) {
2407
+ const id = ++this._lastRuleId;
2408
+ const result = factory(ruleIdFromNumber(id));
2409
+ this._ruleId2desc[id] = result;
2410
+ return result;
2411
+ }
2412
+ getRule(ruleId) {
2413
+ return this._ruleId2desc[ruleIdToNumber(ruleId)];
2414
+ }
2415
+ getExternalGrammar(scopeName, repository) {
2416
+ if (this._includedGrammars[scopeName]) {
2417
+ return this._includedGrammars[scopeName];
2418
+ } else if (this._grammarRepository) {
2419
+ const rawIncludedGrammar = this._grammarRepository.lookup(scopeName);
2420
+ if (rawIncludedGrammar) {
2421
+ this._includedGrammars[scopeName] = initGrammar(
2422
+ rawIncludedGrammar,
2423
+ repository && repository.$base
2424
+ );
2425
+ return this._includedGrammars[scopeName];
2426
+ }
2427
+ }
2428
+ return void 0;
2429
+ }
2430
+ tokenizeLine(lineText, prevState, timeLimit = 0) {
2431
+ const r = this._tokenize(lineText, prevState, false, timeLimit);
2432
+ return {
2433
+ tokens: r.lineTokens.getResult(r.ruleStack, r.lineLength),
2434
+ ruleStack: r.ruleStack,
2435
+ stoppedEarly: r.stoppedEarly
2436
+ };
2437
+ }
2438
+ tokenizeLine2(lineText, prevState, timeLimit = 0) {
2439
+ const r = this._tokenize(lineText, prevState, true, timeLimit);
2440
+ return {
2441
+ tokens: r.lineTokens.getBinaryResult(r.ruleStack, r.lineLength),
2442
+ ruleStack: r.ruleStack,
2443
+ stoppedEarly: r.stoppedEarly
2444
+ };
2445
+ }
2446
+ _tokenize(lineText, prevState, emitBinaryTokens, timeLimit) {
2447
+ if (this._rootId === -1) {
2448
+ this._rootId = RuleFactory.getCompiledRuleId(
2449
+ this._grammar.repository.$self,
2450
+ this,
2451
+ this._grammar.repository
2452
+ );
2453
+ this.getInjections();
2454
+ }
2455
+ let isFirstLine;
2456
+ if (!prevState || prevState === StateStackImpl.NULL) {
2457
+ isFirstLine = true;
2458
+ const rawDefaultMetadata = this._basicScopeAttributesProvider.getDefaultAttributes();
2459
+ const defaultStyle = this.themeProvider.getDefaults();
2460
+ const defaultMetadata = EncodedTokenMetadata.set(
2461
+ 0,
2462
+ rawDefaultMetadata.languageId,
2463
+ rawDefaultMetadata.tokenType,
2464
+ null,
2465
+ defaultStyle.fontStyle,
2466
+ defaultStyle.foregroundId,
2467
+ defaultStyle.backgroundId
2468
+ );
2469
+ const rootScopeName = this.getRule(this._rootId).getName(
2470
+ null,
2471
+ null
2472
+ );
2473
+ let scopeList;
2474
+ if (rootScopeName) {
2475
+ scopeList = AttributedScopeStack.createRootAndLookUpScopeName(
2476
+ rootScopeName,
2477
+ defaultMetadata,
2478
+ this
2479
+ );
2480
+ } else {
2481
+ scopeList = AttributedScopeStack.createRoot(
2482
+ "unknown",
2483
+ defaultMetadata
2484
+ );
2485
+ }
2486
+ prevState = new StateStackImpl(
2487
+ null,
2488
+ this._rootId,
2489
+ -1,
2490
+ -1,
2491
+ false,
2492
+ null,
2493
+ scopeList,
2494
+ scopeList
2495
+ );
2496
+ } else {
2497
+ isFirstLine = false;
2498
+ prevState.reset();
2499
+ }
2500
+ lineText = lineText + "\n";
2501
+ const onigLineText = this.createOnigString(lineText);
2502
+ const lineLength = onigLineText.content.length;
2503
+ const lineTokens = new LineTokens(
2504
+ emitBinaryTokens,
2505
+ lineText,
2506
+ this._tokenTypeMatchers,
2507
+ this.balancedBracketSelectors
2508
+ );
2509
+ const r = _tokenizeString(
2510
+ this,
2511
+ onigLineText,
2512
+ isFirstLine,
2513
+ 0,
2514
+ prevState,
2515
+ lineTokens,
2516
+ true,
2517
+ timeLimit
2518
+ );
2519
+ disposeOnigString(onigLineText);
2520
+ return {
2521
+ lineLength,
2522
+ lineTokens,
2523
+ ruleStack: r.stack,
2524
+ stoppedEarly: r.stoppedEarly
2525
+ };
2526
+ }
2527
+ };
2528
+ function initGrammar(grammar, base) {
2529
+ grammar = clone(grammar);
2530
+ grammar.repository = grammar.repository || {};
2531
+ grammar.repository.$self = {
2532
+ $vscodeTextmateLocation: grammar.$vscodeTextmateLocation,
2533
+ patterns: grammar.patterns,
2534
+ name: grammar.scopeName
2535
+ };
2536
+ grammar.repository.$base = base || grammar.repository.$self;
2537
+ return grammar;
2538
+ }
2539
+ var AttributedScopeStack = class _AttributedScopeStack {
2540
+ /**
2541
+ * Invariant:
2542
+ * ```
2543
+ * if (parent && !scopePath.extends(parent.scopePath)) {
2544
+ * throw new Error();
2545
+ * }
2546
+ * ```
2547
+ */
2548
+ constructor(parent, scopePath, tokenAttributes) {
2549
+ this.parent = parent;
2550
+ this.scopePath = scopePath;
2551
+ this.tokenAttributes = tokenAttributes;
2552
+ }
2553
+ static fromExtension(namesScopeList, contentNameScopesList) {
2554
+ let current = namesScopeList;
2555
+ let scopeNames = namesScopeList?.scopePath ?? null;
2556
+ for (const frame of contentNameScopesList) {
2557
+ scopeNames = ScopeStack.push(scopeNames, frame.scopeNames);
2558
+ current = new _AttributedScopeStack(current, scopeNames, frame.encodedTokenAttributes);
2559
+ }
2560
+ return current;
2561
+ }
2562
+ static createRoot(scopeName, tokenAttributes) {
2563
+ return new _AttributedScopeStack(null, new ScopeStack(null, scopeName), tokenAttributes);
2564
+ }
2565
+ static createRootAndLookUpScopeName(scopeName, tokenAttributes, grammar) {
2566
+ const rawRootMetadata = grammar.getMetadataForScope(scopeName);
2567
+ const scopePath = new ScopeStack(null, scopeName);
2568
+ const rootStyle = grammar.themeProvider.themeMatch(scopePath);
2569
+ const resolvedTokenAttributes = _AttributedScopeStack.mergeAttributes(
2570
+ tokenAttributes,
2571
+ rawRootMetadata,
2572
+ rootStyle
2573
+ );
2574
+ return new _AttributedScopeStack(null, scopePath, resolvedTokenAttributes);
2575
+ }
2576
+ get scopeName() {
2577
+ return this.scopePath.scopeName;
2578
+ }
2579
+ toString() {
2580
+ return this.getScopeNames().join(" ");
2581
+ }
2582
+ equals(other) {
2583
+ return _AttributedScopeStack.equals(this, other);
2584
+ }
2585
+ static equals(a, b) {
2586
+ do {
2587
+ if (a === b) {
2588
+ return true;
2589
+ }
2590
+ if (!a && !b) {
2591
+ return true;
2592
+ }
2593
+ if (!a || !b) {
2594
+ return false;
2595
+ }
2596
+ if (a.scopeName !== b.scopeName || a.tokenAttributes !== b.tokenAttributes) {
2597
+ return false;
2598
+ }
2599
+ a = a.parent;
2600
+ b = b.parent;
2601
+ } while (true);
2602
+ }
2603
+ static mergeAttributes(existingTokenAttributes, basicScopeAttributes, styleAttributes) {
2604
+ let fontStyle = -1 /* NotSet */;
2605
+ let foreground = 0;
2606
+ let background = 0;
2607
+ if (styleAttributes !== null) {
2608
+ fontStyle = styleAttributes.fontStyle;
2609
+ foreground = styleAttributes.foregroundId;
2610
+ background = styleAttributes.backgroundId;
2611
+ }
2612
+ return EncodedTokenMetadata.set(
2613
+ existingTokenAttributes,
2614
+ basicScopeAttributes.languageId,
2615
+ basicScopeAttributes.tokenType,
2616
+ null,
2617
+ fontStyle,
2618
+ foreground,
2619
+ background
2620
+ );
2621
+ }
2622
+ pushAttributed(scopePath, grammar) {
2623
+ if (scopePath === null) {
2624
+ return this;
2625
+ }
2626
+ if (scopePath.indexOf(" ") === -1) {
2627
+ return _AttributedScopeStack._pushAttributed(this, scopePath, grammar);
2628
+ }
2629
+ const scopes = scopePath.split(/ /g);
2630
+ let result = this;
2631
+ for (const scope of scopes) {
2632
+ result = _AttributedScopeStack._pushAttributed(result, scope, grammar);
2633
+ }
2634
+ return result;
2635
+ }
2636
+ static _pushAttributed(target, scopeName, grammar) {
2637
+ const rawMetadata = grammar.getMetadataForScope(scopeName);
2638
+ const newPath = target.scopePath.push(scopeName);
2639
+ const scopeThemeMatchResult = grammar.themeProvider.themeMatch(newPath);
2640
+ const metadata = _AttributedScopeStack.mergeAttributes(
2641
+ target.tokenAttributes,
2642
+ rawMetadata,
2643
+ scopeThemeMatchResult
2644
+ );
2645
+ return new _AttributedScopeStack(target, newPath, metadata);
2646
+ }
2647
+ getScopeNames() {
2648
+ return this.scopePath.getSegments();
2649
+ }
2650
+ getExtensionIfDefined(base) {
2651
+ const result = [];
2652
+ let self = this;
2653
+ while (self && self !== base) {
2654
+ result.push({
2655
+ encodedTokenAttributes: self.tokenAttributes,
2656
+ scopeNames: self.scopePath.getExtensionIfDefined(self.parent?.scopePath ?? null)
2657
+ });
2658
+ self = self.parent;
2659
+ }
2660
+ return self === base ? result.reverse() : void 0;
2661
+ }
2662
+ };
2663
+ var StateStackImpl = class _StateStackImpl {
2664
+ /**
2665
+ * Invariant:
2666
+ * ```
2667
+ * if (contentNameScopesList !== nameScopesList && contentNameScopesList?.parent !== nameScopesList) {
2668
+ * throw new Error();
2669
+ * }
2670
+ * if (this.parent && !nameScopesList.extends(this.parent.contentNameScopesList)) {
2671
+ * throw new Error();
2672
+ * }
2673
+ * ```
2674
+ */
2675
+ constructor(parent, ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {
2676
+ this.parent = parent;
2677
+ this.ruleId = ruleId;
2678
+ this.beginRuleCapturedEOL = beginRuleCapturedEOL;
2679
+ this.endRule = endRule;
2680
+ this.nameScopesList = nameScopesList;
2681
+ this.contentNameScopesList = contentNameScopesList;
2682
+ this.depth = this.parent ? this.parent.depth + 1 : 1;
2683
+ this._enterPos = enterPos;
2684
+ this._anchorPos = anchorPos;
2685
+ }
2686
+ _stackElementBrand = void 0;
2687
+ // TODO remove me
2688
+ static NULL = new _StateStackImpl(
2689
+ null,
2690
+ 0,
2691
+ 0,
2692
+ 0,
2693
+ false,
2694
+ null,
2695
+ null,
2696
+ null
2697
+ );
2698
+ /**
2699
+ * The position on the current line where this state was pushed.
2700
+ * This is relevant only while tokenizing a line, to detect endless loops.
2701
+ * Its value is meaningless across lines.
2702
+ */
2703
+ _enterPos;
2704
+ /**
2705
+ * The captured anchor position when this stack element was pushed.
2706
+ * This is relevant only while tokenizing a line, to restore the anchor position when popping.
2707
+ * Its value is meaningless across lines.
2708
+ */
2709
+ _anchorPos;
2710
+ /**
2711
+ * The depth of the stack.
2712
+ */
2713
+ depth;
2714
+ equals(other) {
2715
+ if (other === null) {
2716
+ return false;
2717
+ }
2718
+ return _StateStackImpl._equals(this, other);
2719
+ }
2720
+ static _equals(a, b) {
2721
+ if (a === b) {
2722
+ return true;
2723
+ }
2724
+ if (!this._structuralEquals(a, b)) {
2725
+ return false;
2726
+ }
2727
+ return AttributedScopeStack.equals(a.contentNameScopesList, b.contentNameScopesList);
2728
+ }
2729
+ /**
2730
+ * A structural equals check. Does not take into account `scopes`.
2731
+ */
2732
+ static _structuralEquals(a, b) {
2733
+ do {
2734
+ if (a === b) {
2735
+ return true;
2736
+ }
2737
+ if (!a && !b) {
2738
+ return true;
2739
+ }
2740
+ if (!a || !b) {
2741
+ return false;
2742
+ }
2743
+ if (a.depth !== b.depth || a.ruleId !== b.ruleId || a.endRule !== b.endRule) {
2744
+ return false;
2745
+ }
2746
+ a = a.parent;
2747
+ b = b.parent;
2748
+ } while (true);
2749
+ }
2750
+ clone() {
2751
+ return this;
2752
+ }
2753
+ static _reset(el) {
2754
+ while (el) {
2755
+ el._enterPos = -1;
2756
+ el._anchorPos = -1;
2757
+ el = el.parent;
2758
+ }
2759
+ }
2760
+ reset() {
2761
+ _StateStackImpl._reset(this);
2762
+ }
2763
+ pop() {
2764
+ return this.parent;
2765
+ }
2766
+ safePop() {
2767
+ if (this.parent) {
2768
+ return this.parent;
2769
+ }
2770
+ return this;
2771
+ }
2772
+ push(ruleId, enterPos, anchorPos, beginRuleCapturedEOL, endRule, nameScopesList, contentNameScopesList) {
2773
+ return new _StateStackImpl(
2774
+ this,
2775
+ ruleId,
2776
+ enterPos,
2777
+ anchorPos,
2778
+ beginRuleCapturedEOL,
2779
+ endRule,
2780
+ nameScopesList,
2781
+ contentNameScopesList
2782
+ );
2783
+ }
2784
+ getEnterPos() {
2785
+ return this._enterPos;
2786
+ }
2787
+ getAnchorPos() {
2788
+ return this._anchorPos;
2789
+ }
2790
+ getRule(grammar) {
2791
+ return grammar.getRule(this.ruleId);
2792
+ }
2793
+ toString() {
2794
+ const r = [];
2795
+ this._writeString(r, 0);
2796
+ return "[" + r.join(",") + "]";
2797
+ }
2798
+ _writeString(res, outIndex) {
2799
+ if (this.parent) {
2800
+ outIndex = this.parent._writeString(res, outIndex);
2801
+ }
2802
+ res[outIndex++] = `(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`;
2803
+ return outIndex;
2804
+ }
2805
+ withContentNameScopesList(contentNameScopeStack) {
2806
+ if (this.contentNameScopesList === contentNameScopeStack) {
2807
+ return this;
2808
+ }
2809
+ return this.parent.push(
2810
+ this.ruleId,
2811
+ this._enterPos,
2812
+ this._anchorPos,
2813
+ this.beginRuleCapturedEOL,
2814
+ this.endRule,
2815
+ this.nameScopesList,
2816
+ contentNameScopeStack
2817
+ );
2818
+ }
2819
+ withEndRule(endRule) {
2820
+ if (this.endRule === endRule) {
2821
+ return this;
2822
+ }
2823
+ return new _StateStackImpl(
2824
+ this.parent,
2825
+ this.ruleId,
2826
+ this._enterPos,
2827
+ this._anchorPos,
2828
+ this.beginRuleCapturedEOL,
2829
+ endRule,
2830
+ this.nameScopesList,
2831
+ this.contentNameScopesList
2832
+ );
2833
+ }
2834
+ // Used to warn of endless loops
2835
+ hasSameRuleAs(other) {
2836
+ let el = this;
2837
+ while (el && el._enterPos === other._enterPos) {
2838
+ if (el.ruleId === other.ruleId) {
2839
+ return true;
2840
+ }
2841
+ el = el.parent;
2842
+ }
2843
+ return false;
2844
+ }
2845
+ toStateStackFrame() {
2846
+ return {
2847
+ ruleId: ruleIdToNumber(this.ruleId),
2848
+ beginRuleCapturedEOL: this.beginRuleCapturedEOL,
2849
+ endRule: this.endRule,
2850
+ nameScopesList: this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList ?? null) ?? [],
2851
+ contentNameScopesList: this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList) ?? []
2852
+ };
2853
+ }
2854
+ static pushFrame(self, frame) {
2855
+ const namesScopeList = AttributedScopeStack.fromExtension(self?.nameScopesList ?? null, frame.nameScopesList);
2856
+ return new _StateStackImpl(
2857
+ self,
2858
+ ruleIdFromNumber(frame.ruleId),
2859
+ frame.enterPos ?? -1,
2860
+ frame.anchorPos ?? -1,
2861
+ frame.beginRuleCapturedEOL,
2862
+ frame.endRule,
2863
+ namesScopeList,
2864
+ AttributedScopeStack.fromExtension(namesScopeList, frame.contentNameScopesList)
2865
+ );
2866
+ }
2867
+ };
2868
+ var BalancedBracketSelectors = class {
2869
+ balancedBracketScopes;
2870
+ unbalancedBracketScopes;
2871
+ allowAny = false;
2872
+ constructor(balancedBracketScopes, unbalancedBracketScopes) {
2873
+ this.balancedBracketScopes = balancedBracketScopes.flatMap(
2874
+ (selector) => {
2875
+ if (selector === "*") {
2876
+ this.allowAny = true;
2877
+ return [];
2878
+ }
2879
+ return createMatchers(selector, nameMatcher).map((m) => m.matcher);
2880
+ }
2881
+ );
2882
+ this.unbalancedBracketScopes = unbalancedBracketScopes.flatMap(
2883
+ (selector) => createMatchers(selector, nameMatcher).map((m) => m.matcher)
2884
+ );
2885
+ }
2886
+ get matchesAlways() {
2887
+ return this.allowAny && this.unbalancedBracketScopes.length === 0;
2888
+ }
2889
+ get matchesNever() {
2890
+ return this.balancedBracketScopes.length === 0 && !this.allowAny;
2891
+ }
2892
+ match(scopes) {
2893
+ for (const excluder of this.unbalancedBracketScopes) {
2894
+ if (excluder(scopes)) {
2895
+ return false;
2896
+ }
2897
+ }
2898
+ for (const includer of this.balancedBracketScopes) {
2899
+ if (includer(scopes)) {
2900
+ return true;
2901
+ }
2902
+ }
2903
+ return this.allowAny;
2904
+ }
2905
+ };
2906
+ var LineTokens = class {
2907
+ constructor(emitBinaryTokens, lineText, tokenTypeOverrides, balancedBracketSelectors) {
2908
+ this.balancedBracketSelectors = balancedBracketSelectors;
2909
+ this._emitBinaryTokens = emitBinaryTokens;
2910
+ this._tokenTypeOverrides = tokenTypeOverrides;
2911
+ if (false) {
2912
+ this._lineText = lineText;
2913
+ } else {
2914
+ this._lineText = null;
2915
+ }
2916
+ this._tokens = [];
2917
+ this._binaryTokens = [];
2918
+ this._lastTokenEndIndex = 0;
2919
+ }
2920
+ _emitBinaryTokens;
2921
+ /**
2922
+ * defined only if `false`.
2923
+ */
2924
+ _lineText;
2925
+ /**
2926
+ * used only if `_emitBinaryTokens` is false.
2927
+ */
2928
+ _tokens;
2929
+ /**
2930
+ * used only if `_emitBinaryTokens` is true.
2931
+ */
2932
+ _binaryTokens;
2933
+ _lastTokenEndIndex;
2934
+ _tokenTypeOverrides;
2935
+ produce(stack, endIndex) {
2936
+ this.produceFromScopes(stack.contentNameScopesList, endIndex);
2937
+ }
2938
+ produceFromScopes(scopesList, endIndex) {
2939
+ if (this._lastTokenEndIndex >= endIndex) {
2940
+ return;
2941
+ }
2942
+ if (this._emitBinaryTokens) {
2943
+ let metadata = scopesList?.tokenAttributes ?? 0;
2944
+ let containsBalancedBrackets = false;
2945
+ if (this.balancedBracketSelectors?.matchesAlways) {
2946
+ containsBalancedBrackets = true;
2947
+ }
2948
+ if (this._tokenTypeOverrides.length > 0 || this.balancedBracketSelectors && !this.balancedBracketSelectors.matchesAlways && !this.balancedBracketSelectors.matchesNever) {
2949
+ const scopes2 = scopesList?.getScopeNames() ?? [];
2950
+ for (const tokenType of this._tokenTypeOverrides) {
2951
+ if (tokenType.matcher(scopes2)) {
2952
+ metadata = EncodedTokenMetadata.set(
2953
+ metadata,
2954
+ 0,
2955
+ toOptionalTokenType(tokenType.type),
2956
+ null,
2957
+ -1 /* NotSet */,
2958
+ 0,
2959
+ 0
2960
+ );
2961
+ }
2962
+ }
2963
+ if (this.balancedBracketSelectors) {
2964
+ containsBalancedBrackets = this.balancedBracketSelectors.match(scopes2);
2965
+ }
2966
+ }
2967
+ if (containsBalancedBrackets) {
2968
+ metadata = EncodedTokenMetadata.set(
2969
+ metadata,
2970
+ 0,
2971
+ 8 /* NotSet */,
2972
+ containsBalancedBrackets,
2973
+ -1 /* NotSet */,
2974
+ 0,
2975
+ 0
2976
+ );
2977
+ }
2978
+ if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 1] === metadata) {
2979
+ this._lastTokenEndIndex = endIndex;
2980
+ return;
2981
+ }
2982
+ this._binaryTokens.push(this._lastTokenEndIndex);
2983
+ this._binaryTokens.push(metadata);
2984
+ this._lastTokenEndIndex = endIndex;
2985
+ return;
2986
+ }
2987
+ const scopes = scopesList?.getScopeNames() ?? [];
2988
+ this._tokens.push({
2989
+ startIndex: this._lastTokenEndIndex,
2990
+ endIndex,
2991
+ // value: lineText.substring(lastTokenEndIndex, endIndex),
2992
+ scopes
2993
+ });
2994
+ this._lastTokenEndIndex = endIndex;
2995
+ }
2996
+ getResult(stack, lineLength) {
2997
+ if (this._tokens.length > 0 && this._tokens[this._tokens.length - 1].startIndex === lineLength - 1) {
2998
+ this._tokens.pop();
2999
+ }
3000
+ if (this._tokens.length === 0) {
3001
+ this._lastTokenEndIndex = -1;
3002
+ this.produce(stack, lineLength);
3003
+ this._tokens[this._tokens.length - 1].startIndex = 0;
3004
+ }
3005
+ return this._tokens;
3006
+ }
3007
+ getBinaryResult(stack, lineLength) {
3008
+ if (this._binaryTokens.length > 0 && this._binaryTokens[this._binaryTokens.length - 2] === lineLength - 1) {
3009
+ this._binaryTokens.pop();
3010
+ this._binaryTokens.pop();
3011
+ }
3012
+ if (this._binaryTokens.length === 0) {
3013
+ this._lastTokenEndIndex = -1;
3014
+ this.produce(stack, lineLength);
3015
+ this._binaryTokens[this._binaryTokens.length - 2] = 0;
3016
+ }
3017
+ const result = new Uint32Array(this._binaryTokens.length);
3018
+ for (let i = 0, len = this._binaryTokens.length; i < len; i++) {
3019
+ result[i] = this._binaryTokens[i];
3020
+ }
3021
+ return result;
3022
+ }
3023
+ };
3024
+
3025
+ // src/registry.ts
3026
+ var SyncRegistry = class {
3027
+ constructor(theme, _onigLib) {
3028
+ this._onigLib = _onigLib;
3029
+ this._theme = theme;
3030
+ }
3031
+ _grammars = /* @__PURE__ */ new Map();
3032
+ _rawGrammars = /* @__PURE__ */ new Map();
3033
+ _injectionGrammars = /* @__PURE__ */ new Map();
3034
+ _theme;
3035
+ dispose() {
3036
+ for (const grammar of this._grammars.values()) {
3037
+ grammar.dispose();
3038
+ }
3039
+ }
3040
+ setTheme(theme) {
3041
+ this._theme = theme;
3042
+ }
3043
+ getColorMap() {
3044
+ return this._theme.getColorMap();
3045
+ }
3046
+ /**
3047
+ * Add `grammar` to registry and return a list of referenced scope names
3048
+ */
3049
+ addGrammar(grammar, injectionScopeNames) {
3050
+ this._rawGrammars.set(grammar.scopeName, grammar);
3051
+ if (injectionScopeNames) {
3052
+ this._injectionGrammars.set(grammar.scopeName, injectionScopeNames);
3053
+ }
3054
+ }
3055
+ /**
3056
+ * Lookup a raw grammar.
3057
+ */
3058
+ lookup(scopeName) {
3059
+ return this._rawGrammars.get(scopeName);
3060
+ }
3061
+ /**
3062
+ * Returns the injections for the given grammar
3063
+ */
3064
+ injections(targetScope) {
3065
+ return this._injectionGrammars.get(targetScope);
3066
+ }
3067
+ /**
3068
+ * Get the default theme settings
3069
+ */
3070
+ getDefaults() {
3071
+ return this._theme.getDefaults();
3072
+ }
3073
+ /**
3074
+ * Match a scope in the theme.
3075
+ */
3076
+ themeMatch(scopePath) {
3077
+ return this._theme.match(scopePath);
3078
+ }
3079
+ /**
3080
+ * Lookup a grammar.
3081
+ */
3082
+ grammarForScopeName(scopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {
3083
+ if (!this._grammars.has(scopeName)) {
3084
+ let rawGrammar = this._rawGrammars.get(scopeName);
3085
+ if (!rawGrammar) {
3086
+ return null;
3087
+ }
3088
+ this._grammars.set(scopeName, createGrammar(
3089
+ scopeName,
3090
+ rawGrammar,
3091
+ initialLanguage,
3092
+ embeddedLanguages,
3093
+ tokenTypes,
3094
+ balancedBracketSelectors,
3095
+ this,
3096
+ this._onigLib
3097
+ ));
3098
+ }
3099
+ return this._grammars.get(scopeName);
3100
+ }
3101
+ };
3102
+
3103
+ // src/index.ts
3104
+ var Registry = class {
3105
+ _options;
3106
+ _syncRegistry;
3107
+ _ensureGrammarCache;
3108
+ constructor(options) {
3109
+ this._options = options;
3110
+ this._syncRegistry = new SyncRegistry(
3111
+ Theme.createFromRawTheme(options.theme, options.colorMap),
3112
+ options.onigLib
3113
+ );
3114
+ this._ensureGrammarCache = /* @__PURE__ */ new Map();
3115
+ }
3116
+ dispose() {
3117
+ this._syncRegistry.dispose();
3118
+ }
3119
+ /**
3120
+ * Change the theme. Once called, no previous `ruleStack` should be used anymore.
3121
+ */
3122
+ setTheme(theme, colorMap) {
3123
+ this._syncRegistry.setTheme(Theme.createFromRawTheme(theme, colorMap));
3124
+ }
3125
+ /**
3126
+ * Returns a lookup array for color ids.
3127
+ */
3128
+ getColorMap() {
3129
+ return this._syncRegistry.getColorMap();
3130
+ }
3131
+ /**
3132
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3133
+ * Please do not use language id 0.
3134
+ */
3135
+ loadGrammarWithEmbeddedLanguages(initialScopeName, initialLanguage, embeddedLanguages) {
3136
+ return this.loadGrammarWithConfiguration(initialScopeName, initialLanguage, { embeddedLanguages });
3137
+ }
3138
+ /**
3139
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3140
+ * Please do not use language id 0.
3141
+ */
3142
+ loadGrammarWithConfiguration(initialScopeName, initialLanguage, configuration) {
3143
+ return this._loadGrammar(
3144
+ initialScopeName,
3145
+ initialLanguage,
3146
+ configuration.embeddedLanguages,
3147
+ configuration.tokenTypes,
3148
+ new BalancedBracketSelectors(
3149
+ configuration.balancedBracketSelectors || [],
3150
+ configuration.unbalancedBracketSelectors || []
3151
+ )
3152
+ );
3153
+ }
3154
+ /**
3155
+ * Load the grammar for `scopeName` and all referenced included grammars asynchronously.
3156
+ */
3157
+ loadGrammar(initialScopeName) {
3158
+ return this._loadGrammar(initialScopeName, 0, null, null, null);
3159
+ }
3160
+ _loadGrammar(initialScopeName, initialLanguage, embeddedLanguages, tokenTypes, balancedBracketSelectors) {
3161
+ const dependencyProcessor = new ScopeDependencyProcessor(this._syncRegistry, initialScopeName);
3162
+ while (dependencyProcessor.Q.length > 0) {
3163
+ dependencyProcessor.Q.map((request) => this._loadSingleGrammar(request.scopeName));
3164
+ dependencyProcessor.processQueue();
3165
+ }
3166
+ return this._grammarForScopeName(
3167
+ initialScopeName,
3168
+ initialLanguage,
3169
+ embeddedLanguages,
3170
+ tokenTypes,
3171
+ balancedBracketSelectors
3172
+ );
3173
+ }
3174
+ _loadSingleGrammar(scopeName) {
3175
+ if (!this._ensureGrammarCache.has(scopeName)) {
3176
+ this._doLoadSingleGrammar(scopeName);
3177
+ this._ensureGrammarCache.set(scopeName, true);
3178
+ }
3179
+ }
3180
+ _doLoadSingleGrammar(scopeName) {
3181
+ const grammar = this._options.loadGrammar(scopeName);
3182
+ if (grammar) {
3183
+ const injections = typeof this._options.getInjections === "function" ? this._options.getInjections(scopeName) : void 0;
3184
+ this._syncRegistry.addGrammar(grammar, injections);
3185
+ }
3186
+ }
3187
+ /**
3188
+ * Adds a rawGrammar.
3189
+ */
3190
+ addGrammar(rawGrammar, injections = [], initialLanguage = 0, embeddedLanguages = null) {
3191
+ this._syncRegistry.addGrammar(rawGrammar, injections);
3192
+ return this._grammarForScopeName(rawGrammar.scopeName, initialLanguage, embeddedLanguages);
3193
+ }
3194
+ /**
3195
+ * Get the grammar for `scopeName`. The grammar must first be created via `loadGrammar` or `addGrammar`.
3196
+ */
3197
+ _grammarForScopeName(scopeName, initialLanguage = 0, embeddedLanguages = null, tokenTypes = null, balancedBracketSelectors = null) {
3198
+ return this._syncRegistry.grammarForScopeName(
3199
+ scopeName,
3200
+ initialLanguage,
3201
+ embeddedLanguages,
3202
+ tokenTypes,
3203
+ balancedBracketSelectors
3204
+ );
3205
+ }
3206
+ };
3207
+ var INITIAL = StateStackImpl.NULL;
3208
+ export {
3209
+ EncodedTokenMetadata,
3210
+ FindOption,
3211
+ FontStyle,
3212
+ INITIAL,
3213
+ Registry,
3214
+ Theme,
3215
+ disposeOnigString
3216
+ };