@node-core/utils 7.2.0 → 7.2.2

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 (1540) hide show
  1. package/lib/ci/build-types/normal_build.js +1 -1
  2. package/lib/ci/build-types/pr_build.js +11 -1
  3. package/lib/ci/build-types/test_build.js +3 -3
  4. package/lib/ci/build-types/test_run.js +1 -1
  5. package/lib/ci/failure_aggregator.js +2 -2
  6. package/lib/ci/run_ci.js +3 -2
  7. package/lib/cli.js +9 -12
  8. package/lib/figures.js +6 -6
  9. package/lib/links.js +27 -15
  10. package/lib/pr_checker.js +45 -34
  11. package/lib/queries/PR.gql +1 -0
  12. package/lib/update-v8/backport.js +3 -4
  13. package/lib/verbosity.js +2 -4
  14. package/node_modules/@listr2/prompt-adapter-inquirer/README.md +15 -0
  15. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.d.mts +21 -0
  16. package/node_modules/@listr2/prompt-adapter-inquirer/dist/index.mjs +46 -0
  17. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/LICENSE +22 -0
  18. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.d.ts +2 -0
  19. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/index.js +2 -0
  20. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.d.ts +35 -0
  21. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.d.ts +34 -0
  22. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/utils.js +2 -0
  23. package/node_modules/@listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/package.json +88 -0
  24. package/node_modules/@listr2/prompt-adapter-inquirer/package.json +85 -0
  25. package/node_modules/ansi-escapes/base.d.ts +307 -0
  26. package/node_modules/ansi-escapes/base.js +202 -0
  27. package/node_modules/ansi-escapes/package.json +70 -0
  28. package/node_modules/ansi-escapes/readme.md +296 -0
  29. package/node_modules/ansi-regex/index.js +9 -4
  30. package/node_modules/ansi-regex/package.json +1 -1
  31. package/node_modules/ansi-regex/readme.md +6 -0
  32. package/node_modules/ansi-styles/index.d.ts +12 -12
  33. package/node_modules/ansi-styles/index.js +3 -3
  34. package/node_modules/ansi-styles/package.json +4 -4
  35. package/node_modules/cli-truncate/index.d.ts +3 -3
  36. package/node_modules/cli-truncate/index.js +40 -14
  37. package/node_modules/cli-truncate/node_modules/string-width/index.js +133 -15
  38. package/node_modules/cli-truncate/node_modules/string-width/package.json +4 -4
  39. package/node_modules/cli-truncate/node_modules/string-width/readme.md +1 -1
  40. package/node_modules/cli-truncate/package.json +7 -7
  41. package/node_modules/cli-truncate/readme.md +2 -3
  42. package/node_modules/ghauth/.github/dependabot.yml +11 -3
  43. package/node_modules/ghauth/.github/workflows/depsound.yml +33 -0
  44. package/node_modules/ghauth/.github/workflows/test-and-release.yml +4 -4
  45. package/node_modules/ghauth/CHANGELOG.md +60 -0
  46. package/node_modules/ghauth/package.json +30 -6
  47. package/node_modules/htmlparser2/README.md +112 -26
  48. package/node_modules/htmlparser2/dist/Parser.d.ts +257 -0
  49. package/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
  50. package/node_modules/htmlparser2/dist/Parser.js +644 -0
  51. package/node_modules/htmlparser2/dist/Parser.js.map +1 -0
  52. package/node_modules/htmlparser2/dist/Tokenizer.d.ts +194 -0
  53. package/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
  54. package/node_modules/htmlparser2/dist/Tokenizer.js +1056 -0
  55. package/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
  56. package/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
  57. package/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
  58. package/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
  59. package/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
  60. package/node_modules/htmlparser2/dist/WritableStream.d.ts +14 -0
  61. package/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
  62. package/node_modules/htmlparser2/dist/WritableStream.js +32 -0
  63. package/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
  64. package/node_modules/htmlparser2/dist/index.d.ts +34 -0
  65. package/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
  66. package/node_modules/htmlparser2/dist/index.js +46 -0
  67. package/node_modules/htmlparser2/dist/index.js.map +1 -0
  68. package/node_modules/htmlparser2/node_modules/dom-serializer/LICENSE +7 -0
  69. package/node_modules/htmlparser2/node_modules/dom-serializer/README.md +115 -0
  70. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
  71. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
  72. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.js +15 -0
  73. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
  74. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.d.ts +72 -0
  75. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
  76. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.js +173 -0
  77. package/node_modules/htmlparser2/node_modules/dom-serializer/dist/index.js.map +1 -0
  78. package/node_modules/htmlparser2/node_modules/dom-serializer/package.json +69 -0
  79. package/node_modules/htmlparser2/node_modules/dom-serializer/src/foreign-names.ts +19 -0
  80. package/node_modules/htmlparser2/node_modules/dom-serializer/src/index.ts +315 -0
  81. package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.d.ts +48 -0
  82. package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.d.ts.map +1 -0
  83. package/node_modules/htmlparser2/node_modules/domelementtype/dist/index.js +60 -0
  84. package/node_modules/htmlparser2/node_modules/domelementtype/package.json +59 -0
  85. package/node_modules/htmlparser2/node_modules/domhandler/dist/index.d.ts +79 -0
  86. package/node_modules/htmlparser2/node_modules/domhandler/dist/index.d.ts.map +1 -0
  87. package/node_modules/htmlparser2/node_modules/domhandler/dist/index.js +155 -0
  88. package/node_modules/htmlparser2/node_modules/domhandler/dist/node.d.ts +264 -0
  89. package/node_modules/htmlparser2/node_modules/domhandler/dist/node.d.ts.map +1 -0
  90. package/node_modules/htmlparser2/node_modules/domhandler/dist/node.js +359 -0
  91. package/node_modules/htmlparser2/node_modules/domhandler/package.json +65 -0
  92. package/node_modules/htmlparser2/node_modules/domhandler/readme.md +86 -0
  93. package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.d.ts +71 -0
  94. package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.d.ts.map +1 -0
  95. package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.js +180 -0
  96. package/node_modules/htmlparser2/node_modules/domutils/dist/feeds.js.map +1 -0
  97. package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.d.ts +59 -0
  98. package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.d.ts.map +1 -0
  99. package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.js +136 -0
  100. package/node_modules/htmlparser2/node_modules/domutils/dist/helpers.js.map +1 -0
  101. package/node_modules/htmlparser2/node_modules/domutils/dist/index.d.ts +8 -0
  102. package/node_modules/htmlparser2/node_modules/domutils/dist/index.d.ts.map +1 -0
  103. package/node_modules/htmlparser2/node_modules/domutils/dist/index.js +8 -0
  104. package/node_modules/htmlparser2/node_modules/domutils/dist/index.js.map +1 -0
  105. package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.d.ts +79 -0
  106. package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.d.ts.map +1 -0
  107. package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.js +152 -0
  108. package/node_modules/htmlparser2/node_modules/domutils/dist/legacy.js.map +1 -0
  109. package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.d.ts +49 -0
  110. package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
  111. package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.js +138 -0
  112. package/node_modules/htmlparser2/node_modules/domutils/dist/manipulation.js.map +1 -0
  113. package/node_modules/htmlparser2/node_modules/domutils/dist/querying.d.ts +54 -0
  114. package/node_modules/htmlparser2/node_modules/domutils/dist/querying.d.ts.map +1 -0
  115. package/node_modules/htmlparser2/node_modules/domutils/dist/querying.js +129 -0
  116. package/node_modules/htmlparser2/node_modules/domutils/dist/querying.js.map +1 -0
  117. package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.d.ts +46 -0
  118. package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.d.ts.map +1 -0
  119. package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.js +81 -0
  120. package/node_modules/htmlparser2/node_modules/domutils/dist/stringify.js.map +1 -0
  121. package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.d.ts +74 -0
  122. package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.d.ts.map +1 -0
  123. package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.js +105 -0
  124. package/node_modules/htmlparser2/node_modules/domutils/dist/traversal.js.map +1 -0
  125. package/node_modules/htmlparser2/node_modules/domutils/package.json +69 -0
  126. package/node_modules/htmlparser2/node_modules/domutils/readme.md +25 -0
  127. package/node_modules/htmlparser2/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
  128. package/node_modules/htmlparser2/node_modules/domutils/src/feeds.ts +301 -0
  129. package/node_modules/htmlparser2/node_modules/domutils/src/helpers.ts +154 -0
  130. package/node_modules/htmlparser2/node_modules/domutils/src/index.ts +7 -0
  131. package/node_modules/htmlparser2/node_modules/domutils/src/legacy.ts +224 -0
  132. package/node_modules/htmlparser2/node_modules/domutils/src/manipulation.ts +156 -0
  133. package/node_modules/htmlparser2/node_modules/domutils/src/querying.ts +172 -0
  134. package/node_modules/htmlparser2/node_modules/domutils/src/stringify.ts +90 -0
  135. package/node_modules/htmlparser2/node_modules/domutils/src/traversal.ts +132 -0
  136. package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.d.ts +8 -0
  137. package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
  138. package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.js +46 -0
  139. package/node_modules/htmlparser2/node_modules/entities/dist/decode-codepoint.js.map +1 -0
  140. package/node_modules/htmlparser2/node_modules/entities/dist/decode.d.ts +194 -0
  141. package/node_modules/htmlparser2/node_modules/entities/dist/decode.d.ts.map +1 -0
  142. package/node_modules/htmlparser2/node_modules/entities/dist/decode.js +544 -0
  143. package/node_modules/htmlparser2/node_modules/entities/dist/decode.js.map +1 -0
  144. package/node_modules/htmlparser2/node_modules/entities/dist/encode.d.ts +24 -0
  145. package/node_modules/htmlparser2/node_modules/entities/dist/encode.d.ts.map +1 -0
  146. package/node_modules/htmlparser2/node_modules/entities/dist/encode.js +90 -0
  147. package/node_modules/htmlparser2/node_modules/entities/dist/encode.js.map +1 -0
  148. package/node_modules/htmlparser2/node_modules/entities/dist/escape.d.ts +48 -0
  149. package/node_modules/htmlparser2/node_modules/entities/dist/escape.d.ts.map +1 -0
  150. package/node_modules/htmlparser2/node_modules/entities/dist/escape.js +132 -0
  151. package/node_modules/htmlparser2/node_modules/entities/dist/escape.js.map +1 -0
  152. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
  153. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
  154. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.js +5 -0
  155. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
  156. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
  157. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
  158. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.js +5 -0
  159. package/node_modules/htmlparser2/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
  160. package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.d.ts +5 -0
  161. package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
  162. package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.js +12 -0
  163. package/node_modules/htmlparser2/node_modules/entities/dist/generated/encode-html.js.map +1 -0
  164. package/node_modules/htmlparser2/node_modules/entities/dist/index.d.ts +89 -0
  165. package/node_modules/htmlparser2/node_modules/entities/dist/index.d.ts.map +1 -0
  166. package/node_modules/htmlparser2/node_modules/entities/dist/index.js +91 -0
  167. package/node_modules/htmlparser2/node_modules/entities/dist/index.js.map +1 -0
  168. package/node_modules/htmlparser2/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
  169. package/node_modules/htmlparser2/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
  170. package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.d.ts +7 -0
  171. package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
  172. package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.js +17 -0
  173. package/node_modules/htmlparser2/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
  174. package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.d.ts +33 -0
  175. package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.d.ts.map +1 -0
  176. package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.js +93 -0
  177. package/node_modules/htmlparser2/node_modules/entities/dist/internal/encode-shared.js.map +1 -0
  178. package/node_modules/htmlparser2/node_modules/entities/package.json +25 -62
  179. package/node_modules/htmlparser2/node_modules/entities/readme.md +4 -16
  180. package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +1 -32
  181. package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +12 -26
  182. package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +2 -0
  183. package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +11 -12
  184. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +1 -0
  185. package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +1 -0
  186. package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +2 -1
  187. package/node_modules/htmlparser2/node_modules/entities/src/index.ts +8 -33
  188. package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +3 -15
  189. package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +4 -2
  190. package/node_modules/htmlparser2/package.json +34 -61
  191. package/node_modules/htmlparser2/src/Parser.ts +260 -100
  192. package/node_modules/htmlparser2/src/Tokenizer.ts +438 -165
  193. package/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
  194. package/node_modules/htmlparser2/src/WritableStream.ts +1 -2
  195. package/node_modules/htmlparser2/src/index.ts +14 -43
  196. package/node_modules/js-yaml/README.md +20 -187
  197. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +1008 -946
  198. package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
  199. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +29 -23
  200. package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
  201. package/node_modules/js-yaml/dist/js-yaml.cjs.js +1043 -583
  202. package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
  203. package/node_modules/js-yaml/dist/js-yaml.d.ts +877 -133
  204. package/node_modules/js-yaml/dist/js-yaml.mjs +995 -556
  205. package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
  206. package/node_modules/js-yaml/package.json +8 -7
  207. package/node_modules/listr2/dist/index.d.mts +1558 -0
  208. package/node_modules/listr2/dist/index.mjs +2230 -0
  209. package/node_modules/listr2/node_modules/string-width/index.js +207 -0
  210. package/node_modules/listr2/node_modules/string-width/package.json +65 -0
  211. package/node_modules/listr2/node_modules/string-width/readme.md +66 -0
  212. package/node_modules/listr2/node_modules/wrap-ansi/index.d.ts +1 -1
  213. package/node_modules/listr2/node_modules/wrap-ansi/index.js +544 -116
  214. package/node_modules/listr2/node_modules/wrap-ansi/package.json +10 -13
  215. package/node_modules/listr2/node_modules/wrap-ansi/readme.md +2 -0
  216. package/node_modules/listr2/package.json +16 -19
  217. package/node_modules/log-update/index.d.ts +64 -1
  218. package/node_modules/log-update/index.js +268 -18
  219. package/node_modules/log-update/node_modules/string-width/index.d.ts +39 -0
  220. package/node_modules/log-update/node_modules/string-width/index.js +207 -0
  221. package/node_modules/log-update/node_modules/string-width/package.json +65 -0
  222. package/node_modules/log-update/node_modules/string-width/readme.md +66 -0
  223. package/node_modules/log-update/node_modules/wrap-ansi/index.d.ts +1 -1
  224. package/node_modules/log-update/node_modules/wrap-ansi/index.js +544 -116
  225. package/node_modules/log-update/node_modules/wrap-ansi/package.json +10 -13
  226. package/node_modules/log-update/node_modules/wrap-ansi/readme.md +2 -0
  227. package/node_modules/log-update/package.json +14 -12
  228. package/node_modules/log-update/readme.md +61 -0
  229. package/node_modules/slice-ansi/index.d.ts +2 -2
  230. package/node_modules/slice-ansi/index.js +260 -112
  231. package/node_modules/slice-ansi/package.json +10 -9
  232. package/node_modules/slice-ansi/readme.md +3 -2
  233. package/node_modules/slice-ansi/tokenize-ansi.js +752 -0
  234. package/node_modules/smol-toml/README.md +205 -191
  235. package/node_modules/smol-toml/dist/date.d.ts +0 -1
  236. package/node_modules/smol-toml/dist/date.js +0 -1
  237. package/node_modules/smol-toml/dist/error.d.ts +0 -1
  238. package/node_modules/smol-toml/dist/error.js +0 -1
  239. package/node_modules/smol-toml/dist/extract.js +32 -65
  240. package/node_modules/smol-toml/dist/index.cjs +302 -288
  241. package/node_modules/smol-toml/dist/index.d.ts +0 -1
  242. package/node_modules/smol-toml/dist/index.js +0 -1
  243. package/node_modules/smol-toml/dist/parse.d.ts +1 -3
  244. package/node_modules/smol-toml/dist/parse.js +22 -21
  245. package/node_modules/smol-toml/dist/primitive.js +75 -76
  246. package/node_modules/smol-toml/dist/stringify.d.ts +0 -1
  247. package/node_modules/smol-toml/dist/stringify.js +43 -30
  248. package/node_modules/smol-toml/dist/struct.js +90 -93
  249. package/node_modules/smol-toml/dist/util.d.ts +1 -1
  250. package/node_modules/smol-toml/dist/util.js +36 -39
  251. package/node_modules/smol-toml/package.json +6 -6
  252. package/node_modules/strip-ansi/index.js +5 -0
  253. package/node_modules/strip-ansi/package.json +5 -5
  254. package/node_modules/yocto-spinner/index.d.ts +162 -0
  255. package/node_modules/yocto-spinner/index.js +432 -0
  256. package/node_modules/yocto-spinner/package.json +64 -0
  257. package/node_modules/yocto-spinner/readme.md +237 -0
  258. package/package.json +6 -8
  259. package/node_modules/@listr2/prompt-adapter-enquirer/README.md +0 -15
  260. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.cjs +0 -127
  261. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.cts +0 -152
  262. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.d.ts +0 -152
  263. package/node_modules/@listr2/prompt-adapter-enquirer/dist/index.js +0 -92
  264. package/node_modules/@listr2/prompt-adapter-enquirer/package.json +0 -80
  265. package/node_modules/boolbase/README.md +0 -10
  266. package/node_modules/boolbase/index.js +0 -8
  267. package/node_modules/boolbase/package.json +0 -23
  268. package/node_modules/chalk/package.json +0 -92
  269. package/node_modules/chalk/readme.md +0 -331
  270. package/node_modules/chalk/source/index.d.ts +0 -437
  271. package/node_modules/chalk/source/index.js +0 -261
  272. package/node_modules/chalk/source/utilities.js +0 -33
  273. package/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -299
  274. package/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -261
  275. package/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  276. package/node_modules/chalk/source/vendor/supports-color/browser.js +0 -32
  277. package/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  278. package/node_modules/chalk/source/vendor/supports-color/index.js +0 -206
  279. package/node_modules/cheerio/LICENSE +0 -21
  280. package/node_modules/cheerio/Readme.md +0 -229
  281. package/node_modules/cheerio/dist/browser/api/attributes.d.ts +0 -385
  282. package/node_modules/cheerio/dist/browser/api/attributes.d.ts.map +0 -1
  283. package/node_modules/cheerio/dist/browser/api/attributes.js +0 -636
  284. package/node_modules/cheerio/dist/browser/api/attributes.js.map +0 -1
  285. package/node_modules/cheerio/dist/browser/api/css.d.ts +0 -42
  286. package/node_modules/cheerio/dist/browser/api/css.d.ts.map +0 -1
  287. package/node_modules/cheerio/dist/browser/api/css.js +0 -116
  288. package/node_modules/cheerio/dist/browser/api/css.js.map +0 -1
  289. package/node_modules/cheerio/dist/browser/api/extract.d.ts +0 -27
  290. package/node_modules/cheerio/dist/browser/api/extract.d.ts.map +0 -1
  291. package/node_modules/cheerio/dist/browser/api/extract.js +0 -42
  292. package/node_modules/cheerio/dist/browser/api/extract.js.map +0 -1
  293. package/node_modules/cheerio/dist/browser/api/forms.d.ts +0 -36
  294. package/node_modules/cheerio/dist/browser/api/forms.d.ts.map +0 -1
  295. package/node_modules/cheerio/dist/browser/api/forms.js +0 -81
  296. package/node_modules/cheerio/dist/browser/api/forms.js.map +0 -1
  297. package/node_modules/cheerio/dist/browser/api/manipulation.d.ts +0 -528
  298. package/node_modules/cheerio/dist/browser/api/manipulation.d.ts.map +0 -1
  299. package/node_modules/cheerio/dist/browser/api/manipulation.js +0 -831
  300. package/node_modules/cheerio/dist/browser/api/manipulation.js.map +0 -1
  301. package/node_modules/cheerio/dist/browser/api/traversing.d.ts +0 -657
  302. package/node_modules/cheerio/dist/browser/api/traversing.d.ts.map +0 -1
  303. package/node_modules/cheerio/dist/browser/api/traversing.js +0 -857
  304. package/node_modules/cheerio/dist/browser/api/traversing.js.map +0 -1
  305. package/node_modules/cheerio/dist/browser/cheerio.d.ts +0 -85
  306. package/node_modules/cheerio/dist/browser/cheerio.d.ts.map +0 -1
  307. package/node_modules/cheerio/dist/browser/cheerio.js +0 -58
  308. package/node_modules/cheerio/dist/browser/cheerio.js.map +0 -1
  309. package/node_modules/cheerio/dist/browser/index-browser.d.mts.map +0 -1
  310. package/node_modules/cheerio/dist/browser/index-browser.mjs.map +0 -1
  311. package/node_modules/cheerio/dist/browser/index.d.ts +0 -5
  312. package/node_modules/cheerio/dist/browser/index.js +0 -3
  313. package/node_modules/cheerio/dist/browser/load-parse.d.ts +0 -20
  314. package/node_modules/cheerio/dist/browser/load-parse.d.ts.map +0 -1
  315. package/node_modules/cheerio/dist/browser/load-parse.js +0 -28
  316. package/node_modules/cheerio/dist/browser/load-parse.js.map +0 -1
  317. package/node_modules/cheerio/dist/browser/load.d.ts +0 -91
  318. package/node_modules/cheerio/dist/browser/load.d.ts.map +0 -1
  319. package/node_modules/cheerio/dist/browser/load.js +0 -129
  320. package/node_modules/cheerio/dist/browser/load.js.map +0 -1
  321. package/node_modules/cheerio/dist/browser/options.d.ts +0 -98
  322. package/node_modules/cheerio/dist/browser/options.d.ts.map +0 -1
  323. package/node_modules/cheerio/dist/browser/options.js +0 -34
  324. package/node_modules/cheerio/dist/browser/options.js.map +0 -1
  325. package/node_modules/cheerio/dist/browser/package.json +0 -3
  326. package/node_modules/cheerio/dist/browser/parse.d.ts +0 -18
  327. package/node_modules/cheerio/dist/browser/parse.d.ts.map +0 -1
  328. package/node_modules/cheerio/dist/browser/parse.js +0 -73
  329. package/node_modules/cheerio/dist/browser/parse.js.map +0 -1
  330. package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts +0 -20
  331. package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.d.ts.map +0 -1
  332. package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js +0 -50
  333. package/node_modules/cheerio/dist/browser/parsers/parse5-adapter.js.map +0 -1
  334. package/node_modules/cheerio/dist/browser/slim.d.ts +0 -25
  335. package/node_modules/cheerio/dist/browser/slim.d.ts.map +0 -1
  336. package/node_modules/cheerio/dist/browser/slim.js +0 -22
  337. package/node_modules/cheerio/dist/browser/slim.js.map +0 -1
  338. package/node_modules/cheerio/dist/browser/static.d.ts +0 -112
  339. package/node_modules/cheerio/dist/browser/static.d.ts.map +0 -1
  340. package/node_modules/cheerio/dist/browser/static.js +0 -204
  341. package/node_modules/cheerio/dist/browser/static.js.map +0 -1
  342. package/node_modules/cheerio/dist/browser/types.d.ts +0 -21
  343. package/node_modules/cheerio/dist/browser/types.d.ts.map +0 -1
  344. package/node_modules/cheerio/dist/browser/types.js +0 -3
  345. package/node_modules/cheerio/dist/browser/types.js.map +0 -1
  346. package/node_modules/cheerio/dist/browser/utils.d.ts +0 -55
  347. package/node_modules/cheerio/dist/browser/utils.d.ts.map +0 -1
  348. package/node_modules/cheerio/dist/browser/utils.js +0 -84
  349. package/node_modules/cheerio/dist/browser/utils.js.map +0 -1
  350. package/node_modules/cheerio/dist/commonjs/api/attributes.d.ts +0 -385
  351. package/node_modules/cheerio/dist/commonjs/api/attributes.d.ts.map +0 -1
  352. package/node_modules/cheerio/dist/commonjs/api/attributes.js +0 -647
  353. package/node_modules/cheerio/dist/commonjs/api/attributes.js.map +0 -1
  354. package/node_modules/cheerio/dist/commonjs/api/css.d.ts +0 -42
  355. package/node_modules/cheerio/dist/commonjs/api/css.d.ts.map +0 -1
  356. package/node_modules/cheerio/dist/commonjs/api/css.js +0 -119
  357. package/node_modules/cheerio/dist/commonjs/api/css.js.map +0 -1
  358. package/node_modules/cheerio/dist/commonjs/api/extract.d.ts +0 -27
  359. package/node_modules/cheerio/dist/commonjs/api/extract.d.ts.map +0 -1
  360. package/node_modules/cheerio/dist/commonjs/api/extract.js +0 -45
  361. package/node_modules/cheerio/dist/commonjs/api/extract.js.map +0 -1
  362. package/node_modules/cheerio/dist/commonjs/api/forms.d.ts +0 -36
  363. package/node_modules/cheerio/dist/commonjs/api/forms.d.ts.map +0 -1
  364. package/node_modules/cheerio/dist/commonjs/api/forms.js +0 -85
  365. package/node_modules/cheerio/dist/commonjs/api/forms.js.map +0 -1
  366. package/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts +0 -528
  367. package/node_modules/cheerio/dist/commonjs/api/manipulation.d.ts.map +0 -1
  368. package/node_modules/cheerio/dist/commonjs/api/manipulation.js +0 -850
  369. package/node_modules/cheerio/dist/commonjs/api/manipulation.js.map +0 -1
  370. package/node_modules/cheerio/dist/commonjs/api/traversing.d.ts +0 -657
  371. package/node_modules/cheerio/dist/commonjs/api/traversing.d.ts.map +0 -1
  372. package/node_modules/cheerio/dist/commonjs/api/traversing.js +0 -914
  373. package/node_modules/cheerio/dist/commonjs/api/traversing.js.map +0 -1
  374. package/node_modules/cheerio/dist/commonjs/cheerio.d.ts +0 -85
  375. package/node_modules/cheerio/dist/commonjs/cheerio.d.ts.map +0 -1
  376. package/node_modules/cheerio/dist/commonjs/cheerio.js +0 -95
  377. package/node_modules/cheerio/dist/commonjs/cheerio.js.map +0 -1
  378. package/node_modules/cheerio/dist/commonjs/index.d.ts +0 -104
  379. package/node_modules/cheerio/dist/commonjs/index.d.ts.map +0 -1
  380. package/node_modules/cheerio/dist/commonjs/index.js +0 -250
  381. package/node_modules/cheerio/dist/commonjs/index.js.map +0 -1
  382. package/node_modules/cheerio/dist/commonjs/load-parse.d.ts +0 -20
  383. package/node_modules/cheerio/dist/commonjs/load-parse.d.ts.map +0 -1
  384. package/node_modules/cheerio/dist/commonjs/load-parse.js +0 -34
  385. package/node_modules/cheerio/dist/commonjs/load-parse.js.map +0 -1
  386. package/node_modules/cheerio/dist/commonjs/load.d.ts +0 -91
  387. package/node_modules/cheerio/dist/commonjs/load.d.ts.map +0 -1
  388. package/node_modules/cheerio/dist/commonjs/load.js +0 -165
  389. package/node_modules/cheerio/dist/commonjs/load.js.map +0 -1
  390. package/node_modules/cheerio/dist/commonjs/options.d.ts +0 -98
  391. package/node_modules/cheerio/dist/commonjs/options.d.ts.map +0 -1
  392. package/node_modules/cheerio/dist/commonjs/options.js +0 -37
  393. package/node_modules/cheerio/dist/commonjs/options.js.map +0 -1
  394. package/node_modules/cheerio/dist/commonjs/package.json +0 -3
  395. package/node_modules/cheerio/dist/commonjs/parse.d.ts +0 -18
  396. package/node_modules/cheerio/dist/commonjs/parse.d.ts.map +0 -1
  397. package/node_modules/cheerio/dist/commonjs/parse.js +0 -77
  398. package/node_modules/cheerio/dist/commonjs/parse.js.map +0 -1
  399. package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts +0 -20
  400. package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.d.ts.map +0 -1
  401. package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js +0 -54
  402. package/node_modules/cheerio/dist/commonjs/parsers/parse5-adapter.js.map +0 -1
  403. package/node_modules/cheerio/dist/commonjs/slim.d.ts +0 -25
  404. package/node_modules/cheerio/dist/commonjs/slim.d.ts.map +0 -1
  405. package/node_modules/cheerio/dist/commonjs/slim.js +0 -30
  406. package/node_modules/cheerio/dist/commonjs/slim.js.map +0 -1
  407. package/node_modules/cheerio/dist/commonjs/static.d.ts +0 -112
  408. package/node_modules/cheerio/dist/commonjs/static.d.ts.map +0 -1
  409. package/node_modules/cheerio/dist/commonjs/static.js +0 -214
  410. package/node_modules/cheerio/dist/commonjs/static.js.map +0 -1
  411. package/node_modules/cheerio/dist/commonjs/types.d.ts +0 -21
  412. package/node_modules/cheerio/dist/commonjs/types.d.ts.map +0 -1
  413. package/node_modules/cheerio/dist/commonjs/types.js +0 -4
  414. package/node_modules/cheerio/dist/commonjs/types.js.map +0 -1
  415. package/node_modules/cheerio/dist/commonjs/utils.d.ts +0 -55
  416. package/node_modules/cheerio/dist/commonjs/utils.d.ts.map +0 -1
  417. package/node_modules/cheerio/dist/commonjs/utils.js +0 -91
  418. package/node_modules/cheerio/dist/commonjs/utils.js.map +0 -1
  419. package/node_modules/cheerio/dist/esm/api/attributes.d.ts +0 -385
  420. package/node_modules/cheerio/dist/esm/api/attributes.d.ts.map +0 -1
  421. package/node_modules/cheerio/dist/esm/api/attributes.js +0 -636
  422. package/node_modules/cheerio/dist/esm/api/attributes.js.map +0 -1
  423. package/node_modules/cheerio/dist/esm/api/css.d.ts +0 -42
  424. package/node_modules/cheerio/dist/esm/api/css.d.ts.map +0 -1
  425. package/node_modules/cheerio/dist/esm/api/css.js +0 -116
  426. package/node_modules/cheerio/dist/esm/api/css.js.map +0 -1
  427. package/node_modules/cheerio/dist/esm/api/extract.d.ts +0 -27
  428. package/node_modules/cheerio/dist/esm/api/extract.d.ts.map +0 -1
  429. package/node_modules/cheerio/dist/esm/api/extract.js +0 -42
  430. package/node_modules/cheerio/dist/esm/api/extract.js.map +0 -1
  431. package/node_modules/cheerio/dist/esm/api/forms.d.ts +0 -36
  432. package/node_modules/cheerio/dist/esm/api/forms.d.ts.map +0 -1
  433. package/node_modules/cheerio/dist/esm/api/forms.js +0 -81
  434. package/node_modules/cheerio/dist/esm/api/forms.js.map +0 -1
  435. package/node_modules/cheerio/dist/esm/api/manipulation.d.ts +0 -528
  436. package/node_modules/cheerio/dist/esm/api/manipulation.d.ts.map +0 -1
  437. package/node_modules/cheerio/dist/esm/api/manipulation.js +0 -831
  438. package/node_modules/cheerio/dist/esm/api/manipulation.js.map +0 -1
  439. package/node_modules/cheerio/dist/esm/api/traversing.d.ts +0 -657
  440. package/node_modules/cheerio/dist/esm/api/traversing.d.ts.map +0 -1
  441. package/node_modules/cheerio/dist/esm/api/traversing.js +0 -857
  442. package/node_modules/cheerio/dist/esm/api/traversing.js.map +0 -1
  443. package/node_modules/cheerio/dist/esm/cheerio.d.ts +0 -85
  444. package/node_modules/cheerio/dist/esm/cheerio.d.ts.map +0 -1
  445. package/node_modules/cheerio/dist/esm/cheerio.js +0 -58
  446. package/node_modules/cheerio/dist/esm/cheerio.js.map +0 -1
  447. package/node_modules/cheerio/dist/esm/index.d.ts +0 -104
  448. package/node_modules/cheerio/dist/esm/index.d.ts.map +0 -1
  449. package/node_modules/cheerio/dist/esm/index.js +0 -202
  450. package/node_modules/cheerio/dist/esm/index.js.map +0 -1
  451. package/node_modules/cheerio/dist/esm/load-parse.d.ts +0 -20
  452. package/node_modules/cheerio/dist/esm/load-parse.d.ts.map +0 -1
  453. package/node_modules/cheerio/dist/esm/load-parse.js +0 -28
  454. package/node_modules/cheerio/dist/esm/load-parse.js.map +0 -1
  455. package/node_modules/cheerio/dist/esm/load.d.ts +0 -91
  456. package/node_modules/cheerio/dist/esm/load.d.ts.map +0 -1
  457. package/node_modules/cheerio/dist/esm/load.js +0 -129
  458. package/node_modules/cheerio/dist/esm/load.js.map +0 -1
  459. package/node_modules/cheerio/dist/esm/options.d.ts +0 -98
  460. package/node_modules/cheerio/dist/esm/options.d.ts.map +0 -1
  461. package/node_modules/cheerio/dist/esm/options.js +0 -34
  462. package/node_modules/cheerio/dist/esm/options.js.map +0 -1
  463. package/node_modules/cheerio/dist/esm/package.json +0 -3
  464. package/node_modules/cheerio/dist/esm/parse.d.ts +0 -18
  465. package/node_modules/cheerio/dist/esm/parse.d.ts.map +0 -1
  466. package/node_modules/cheerio/dist/esm/parse.js +0 -73
  467. package/node_modules/cheerio/dist/esm/parse.js.map +0 -1
  468. package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts +0 -20
  469. package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.d.ts.map +0 -1
  470. package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js +0 -50
  471. package/node_modules/cheerio/dist/esm/parsers/parse5-adapter.js.map +0 -1
  472. package/node_modules/cheerio/dist/esm/slim.d.ts +0 -25
  473. package/node_modules/cheerio/dist/esm/slim.d.ts.map +0 -1
  474. package/node_modules/cheerio/dist/esm/slim.js +0 -22
  475. package/node_modules/cheerio/dist/esm/slim.js.map +0 -1
  476. package/node_modules/cheerio/dist/esm/static.d.ts +0 -112
  477. package/node_modules/cheerio/dist/esm/static.d.ts.map +0 -1
  478. package/node_modules/cheerio/dist/esm/static.js +0 -204
  479. package/node_modules/cheerio/dist/esm/static.js.map +0 -1
  480. package/node_modules/cheerio/dist/esm/types.d.ts +0 -21
  481. package/node_modules/cheerio/dist/esm/types.d.ts.map +0 -1
  482. package/node_modules/cheerio/dist/esm/types.js +0 -3
  483. package/node_modules/cheerio/dist/esm/types.js.map +0 -1
  484. package/node_modules/cheerio/dist/esm/utils.d.ts +0 -55
  485. package/node_modules/cheerio/dist/esm/utils.d.ts.map +0 -1
  486. package/node_modules/cheerio/dist/esm/utils.js +0 -84
  487. package/node_modules/cheerio/dist/esm/utils.js.map +0 -1
  488. package/node_modules/cheerio/node_modules/undici/LICENSE +0 -21
  489. package/node_modules/cheerio/node_modules/undici/README.md +0 -741
  490. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Agent.md +0 -84
  491. package/node_modules/cheerio/node_modules/undici/docs/docs/api/BalancedPool.md +0 -99
  492. package/node_modules/cheerio/node_modules/undici/docs/docs/api/CacheStorage.md +0 -30
  493. package/node_modules/cheerio/node_modules/undici/docs/docs/api/CacheStore.md +0 -164
  494. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Client.md +0 -285
  495. package/node_modules/cheerio/node_modules/undici/docs/docs/api/ClientStats.md +0 -27
  496. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Connector.md +0 -115
  497. package/node_modules/cheerio/node_modules/undici/docs/docs/api/ContentType.md +0 -57
  498. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Cookies.md +0 -101
  499. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Debug.md +0 -62
  500. package/node_modules/cheerio/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +0 -315
  501. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Dispatcher.md +0 -1392
  502. package/node_modules/cheerio/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +0 -159
  503. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Errors.md +0 -49
  504. package/node_modules/cheerio/node_modules/undici/docs/docs/api/EventSource.md +0 -45
  505. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Fetch.md +0 -60
  506. package/node_modules/cheerio/node_modules/undici/docs/docs/api/GlobalInstallation.md +0 -139
  507. package/node_modules/cheerio/node_modules/undici/docs/docs/api/H2CClient.md +0 -263
  508. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockAgent.md +0 -603
  509. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockCallHistory.md +0 -197
  510. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +0 -43
  511. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockClient.md +0 -81
  512. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockErrors.md +0 -12
  513. package/node_modules/cheerio/node_modules/undici/docs/docs/api/MockPool.md +0 -555
  514. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Pool.md +0 -84
  515. package/node_modules/cheerio/node_modules/undici/docs/docs/api/PoolStats.md +0 -35
  516. package/node_modules/cheerio/node_modules/undici/docs/docs/api/ProxyAgent.md +0 -229
  517. package/node_modules/cheerio/node_modules/undici/docs/docs/api/RedirectHandler.md +0 -93
  518. package/node_modules/cheerio/node_modules/undici/docs/docs/api/RetryAgent.md +0 -50
  519. package/node_modules/cheerio/node_modules/undici/docs/docs/api/RetryHandler.md +0 -118
  520. package/node_modules/cheerio/node_modules/undici/docs/docs/api/RoundRobinPool.md +0 -145
  521. package/node_modules/cheerio/node_modules/undici/docs/docs/api/SnapshotAgent.md +0 -616
  522. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +0 -274
  523. package/node_modules/cheerio/node_modules/undici/docs/docs/api/Util.md +0 -25
  524. package/node_modules/cheerio/node_modules/undici/docs/docs/api/WebSocket.md +0 -141
  525. package/node_modules/cheerio/node_modules/undici/docs/docs/api/api-lifecycle.md +0 -91
  526. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -64
  527. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/crawling.md +0 -58
  528. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/mocking-request.md +0 -190
  529. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/proxy.md +0 -127
  530. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +0 -224
  531. package/node_modules/cheerio/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -63
  532. package/node_modules/cheerio/node_modules/undici/index-fetch.js +0 -65
  533. package/node_modules/cheerio/node_modules/undici/index.d.ts +0 -3
  534. package/node_modules/cheerio/node_modules/undici/index.js +0 -234
  535. package/node_modules/cheerio/node_modules/undici/lib/api/abort-signal.js +0 -59
  536. package/node_modules/cheerio/node_modules/undici/lib/api/api-connect.js +0 -110
  537. package/node_modules/cheerio/node_modules/undici/lib/api/api-pipeline.js +0 -252
  538. package/node_modules/cheerio/node_modules/undici/lib/api/api-request.js +0 -214
  539. package/node_modules/cheerio/node_modules/undici/lib/api/api-stream.js +0 -209
  540. package/node_modules/cheerio/node_modules/undici/lib/api/api-upgrade.js +0 -111
  541. package/node_modules/cheerio/node_modules/undici/lib/api/index.js +0 -7
  542. package/node_modules/cheerio/node_modules/undici/lib/api/readable.js +0 -580
  543. package/node_modules/cheerio/node_modules/undici/lib/cache/memory-cache-store.js +0 -234
  544. package/node_modules/cheerio/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -461
  545. package/node_modules/cheerio/node_modules/undici/lib/core/connect.js +0 -153
  546. package/node_modules/cheerio/node_modules/undici/lib/core/constants.js +0 -143
  547. package/node_modules/cheerio/node_modules/undici/lib/core/diagnostics.js +0 -227
  548. package/node_modules/cheerio/node_modules/undici/lib/core/errors.js +0 -477
  549. package/node_modules/cheerio/node_modules/undici/lib/core/request.js +0 -453
  550. package/node_modules/cheerio/node_modules/undici/lib/core/socks5-client.js +0 -412
  551. package/node_modules/cheerio/node_modules/undici/lib/core/socks5-utils.js +0 -198
  552. package/node_modules/cheerio/node_modules/undici/lib/core/symbols.js +0 -75
  553. package/node_modules/cheerio/node_modules/undici/lib/core/tree.js +0 -160
  554. package/node_modules/cheerio/node_modules/undici/lib/core/util.js +0 -992
  555. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/agent.js +0 -158
  556. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
  557. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h1.js +0 -1654
  558. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
  559. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/client.js +0 -663
  560. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -165
  561. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
  562. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
  563. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
  564. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
  565. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
  566. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/pool.js +0 -118
  567. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -318
  568. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
  569. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
  570. package/node_modules/cheerio/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -249
  571. package/node_modules/cheerio/node_modules/undici/lib/encoding/index.js +0 -33
  572. package/node_modules/cheerio/node_modules/undici/lib/global.js +0 -50
  573. package/node_modules/cheerio/node_modules/undici/lib/handler/cache-handler.js +0 -578
  574. package/node_modules/cheerio/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
  575. package/node_modules/cheerio/node_modules/undici/lib/handler/decorator-handler.js +0 -67
  576. package/node_modules/cheerio/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
  577. package/node_modules/cheerio/node_modules/undici/lib/handler/redirect-handler.js +0 -238
  578. package/node_modules/cheerio/node_modules/undici/lib/handler/retry-handler.js +0 -394
  579. package/node_modules/cheerio/node_modules/undici/lib/handler/unwrap-handler.js +0 -100
  580. package/node_modules/cheerio/node_modules/undici/lib/handler/wrap-handler.js +0 -105
  581. package/node_modules/cheerio/node_modules/undici/lib/interceptor/cache.js +0 -495
  582. package/node_modules/cheerio/node_modules/undici/lib/interceptor/decompress.js +0 -259
  583. package/node_modules/cheerio/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
  584. package/node_modules/cheerio/node_modules/undici/lib/interceptor/dns.js +0 -571
  585. package/node_modules/cheerio/node_modules/undici/lib/interceptor/dump.js +0 -112
  586. package/node_modules/cheerio/node_modules/undici/lib/interceptor/redirect.js +0 -21
  587. package/node_modules/cheerio/node_modules/undici/lib/interceptor/response-error.js +0 -95
  588. package/node_modules/cheerio/node_modules/undici/lib/interceptor/retry.js +0 -19
  589. package/node_modules/cheerio/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  590. package/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.d.ts +0 -195
  591. package/node_modules/cheerio/node_modules/undici/lib/llhttp/constants.js +0 -531
  592. package/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
  593. package/node_modules/cheerio/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
  594. package/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.d.ts +0 -2
  595. package/node_modules/cheerio/node_modules/undici/lib/llhttp/utils.js +0 -12
  596. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-agent.js +0 -232
  597. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-call-history.js +0 -248
  598. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-client.js +0 -68
  599. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-errors.js +0 -29
  600. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
  601. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-pool.js +0 -68
  602. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-symbols.js +0 -32
  603. package/node_modules/cheerio/node_modules/undici/lib/mock/mock-utils.js +0 -486
  604. package/node_modules/cheerio/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
  605. package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
  606. package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
  607. package/node_modules/cheerio/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
  608. package/node_modules/cheerio/node_modules/undici/lib/util/cache.js +0 -408
  609. package/node_modules/cheerio/node_modules/undici/lib/util/date.js +0 -653
  610. package/node_modules/cheerio/node_modules/undici/lib/util/promise.js +0 -28
  611. package/node_modules/cheerio/node_modules/undici/lib/util/runtime-features.js +0 -124
  612. package/node_modules/cheerio/node_modules/undici/lib/util/stats.js +0 -32
  613. package/node_modules/cheerio/node_modules/undici/lib/util/timers.js +0 -425
  614. package/node_modules/cheerio/node_modules/undici/lib/web/cache/cache.js +0 -864
  615. package/node_modules/cheerio/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
  616. package/node_modules/cheerio/node_modules/undici/lib/web/cache/util.js +0 -45
  617. package/node_modules/cheerio/node_modules/undici/lib/web/cookies/constants.js +0 -12
  618. package/node_modules/cheerio/node_modules/undici/lib/web/cookies/index.js +0 -199
  619. package/node_modules/cheerio/node_modules/undici/lib/web/cookies/parse.js +0 -322
  620. package/node_modules/cheerio/node_modules/undici/lib/web/cookies/util.js +0 -282
  621. package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
  622. package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
  623. package/node_modules/cheerio/node_modules/undici/lib/web/eventsource/util.js +0 -29
  624. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/LICENSE +0 -21
  625. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/body.js +0 -509
  626. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/constants.js +0 -131
  627. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/data-url.js +0 -596
  628. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
  629. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/formdata.js +0 -259
  630. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/global.js +0 -40
  631. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/headers.js +0 -719
  632. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js +0 -2413
  633. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/request.js +0 -1115
  634. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js +0 -641
  635. package/node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js +0 -1522
  636. package/node_modules/cheerio/node_modules/undici/lib/web/infra/index.js +0 -229
  637. package/node_modules/cheerio/node_modules/undici/lib/web/subresource-integrity/Readme.md +0 -9
  638. package/node_modules/cheerio/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
  639. package/node_modules/cheerio/node_modules/undici/lib/web/webidl/index.js +0 -1006
  640. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/connection.js +0 -329
  641. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/constants.js +0 -126
  642. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/events.js +0 -331
  643. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/frame.js +0 -133
  644. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -118
  645. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/receiver.js +0 -450
  646. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/sender.js +0 -109
  647. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
  648. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -491
  649. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/util.js +0 -347
  650. package/node_modules/cheerio/node_modules/undici/lib/web/websocket/websocket.js +0 -751
  651. package/node_modules/cheerio/node_modules/undici/package.json +0 -152
  652. package/node_modules/cheerio/node_modules/undici/scripts/strip-comments.js +0 -10
  653. package/node_modules/cheerio/node_modules/undici/types/README.md +0 -6
  654. package/node_modules/cheerio/node_modules/undici/types/agent.d.ts +0 -32
  655. package/node_modules/cheerio/node_modules/undici/types/api.d.ts +0 -43
  656. package/node_modules/cheerio/node_modules/undici/types/balanced-pool.d.ts +0 -30
  657. package/node_modules/cheerio/node_modules/undici/types/cache-interceptor.d.ts +0 -179
  658. package/node_modules/cheerio/node_modules/undici/types/cache.d.ts +0 -36
  659. package/node_modules/cheerio/node_modules/undici/types/client-stats.d.ts +0 -15
  660. package/node_modules/cheerio/node_modules/undici/types/client.d.ts +0 -123
  661. package/node_modules/cheerio/node_modules/undici/types/connector.d.ts +0 -36
  662. package/node_modules/cheerio/node_modules/undici/types/content-type.d.ts +0 -21
  663. package/node_modules/cheerio/node_modules/undici/types/cookies.d.ts +0 -30
  664. package/node_modules/cheerio/node_modules/undici/types/diagnostics-channel.d.ts +0 -74
  665. package/node_modules/cheerio/node_modules/undici/types/dispatcher.d.ts +0 -273
  666. package/node_modules/cheerio/node_modules/undici/types/env-http-proxy-agent.d.ts +0 -22
  667. package/node_modules/cheerio/node_modules/undici/types/errors.d.ts +0 -177
  668. package/node_modules/cheerio/node_modules/undici/types/eventsource.d.ts +0 -66
  669. package/node_modules/cheerio/node_modules/undici/types/fetch.d.ts +0 -231
  670. package/node_modules/cheerio/node_modules/undici/types/formdata.d.ts +0 -114
  671. package/node_modules/cheerio/node_modules/undici/types/global-dispatcher.d.ts +0 -9
  672. package/node_modules/cheerio/node_modules/undici/types/global-origin.d.ts +0 -7
  673. package/node_modules/cheerio/node_modules/undici/types/h2c-client.d.ts +0 -73
  674. package/node_modules/cheerio/node_modules/undici/types/handlers.d.ts +0 -14
  675. package/node_modules/cheerio/node_modules/undici/types/header.d.ts +0 -160
  676. package/node_modules/cheerio/node_modules/undici/types/index.d.ts +0 -91
  677. package/node_modules/cheerio/node_modules/undici/types/interceptors.d.ts +0 -80
  678. package/node_modules/cheerio/node_modules/undici/types/mock-agent.d.ts +0 -68
  679. package/node_modules/cheerio/node_modules/undici/types/mock-call-history.d.ts +0 -111
  680. package/node_modules/cheerio/node_modules/undici/types/mock-client.d.ts +0 -27
  681. package/node_modules/cheerio/node_modules/undici/types/mock-errors.d.ts +0 -12
  682. package/node_modules/cheerio/node_modules/undici/types/mock-interceptor.d.ts +0 -94
  683. package/node_modules/cheerio/node_modules/undici/types/mock-pool.d.ts +0 -27
  684. package/node_modules/cheerio/node_modules/undici/types/patch.d.ts +0 -29
  685. package/node_modules/cheerio/node_modules/undici/types/pool-stats.d.ts +0 -19
  686. package/node_modules/cheerio/node_modules/undici/types/pool.d.ts +0 -41
  687. package/node_modules/cheerio/node_modules/undici/types/proxy-agent.d.ts +0 -29
  688. package/node_modules/cheerio/node_modules/undici/types/readable.d.ts +0 -68
  689. package/node_modules/cheerio/node_modules/undici/types/retry-agent.d.ts +0 -8
  690. package/node_modules/cheerio/node_modules/undici/types/retry-handler.d.ts +0 -125
  691. package/node_modules/cheerio/node_modules/undici/types/round-robin-pool.d.ts +0 -41
  692. package/node_modules/cheerio/node_modules/undici/types/snapshot-agent.d.ts +0 -109
  693. package/node_modules/cheerio/node_modules/undici/types/socks5-proxy-agent.d.ts +0 -25
  694. package/node_modules/cheerio/node_modules/undici/types/util.d.ts +0 -18
  695. package/node_modules/cheerio/node_modules/undici/types/utility.d.ts +0 -7
  696. package/node_modules/cheerio/node_modules/undici/types/webidl.d.ts +0 -347
  697. package/node_modules/cheerio/node_modules/undici/types/websocket.d.ts +0 -188
  698. package/node_modules/cheerio/package.json +0 -182
  699. package/node_modules/cheerio/src/api/attributes.ts +0 -1145
  700. package/node_modules/cheerio/src/api/css.ts +0 -224
  701. package/node_modules/cheerio/src/api/extract.ts +0 -92
  702. package/node_modules/cheerio/src/api/forms.ts +0 -103
  703. package/node_modules/cheerio/src/api/manipulation.ts +0 -1115
  704. package/node_modules/cheerio/src/api/traversing.ts +0 -1175
  705. package/node_modules/cheerio/src/cheerio.ts +0 -143
  706. package/node_modules/cheerio/src/index-browser.mts +0 -10
  707. package/node_modules/cheerio/src/index.ts +0 -294
  708. package/node_modules/cheerio/src/load-parse.ts +0 -39
  709. package/node_modules/cheerio/src/load.ts +0 -282
  710. package/node_modules/cheerio/src/options.ts +0 -136
  711. package/node_modules/cheerio/src/parse.ts +0 -105
  712. package/node_modules/cheerio/src/parsers/parse5-adapter.ts +0 -66
  713. package/node_modules/cheerio/src/slim.ts +0 -33
  714. package/node_modules/cheerio/src/static.ts +0 -312
  715. package/node_modules/cheerio/src/types.ts +0 -58
  716. package/node_modules/cheerio/src/utils.ts +0 -99
  717. package/node_modules/cheerio-select/README.md +0 -18
  718. package/node_modules/cheerio-select/lib/esm/helpers.d.ts +0 -5
  719. package/node_modules/cheerio-select/lib/esm/helpers.d.ts.map +0 -1
  720. package/node_modules/cheerio-select/lib/esm/helpers.js +0 -20
  721. package/node_modules/cheerio-select/lib/esm/helpers.js.map +0 -1
  722. package/node_modules/cheerio-select/lib/esm/index.d.ts +0 -12
  723. package/node_modules/cheerio-select/lib/esm/index.d.ts.map +0 -1
  724. package/node_modules/cheerio-select/lib/esm/index.js +0 -241
  725. package/node_modules/cheerio-select/lib/esm/index.js.map +0 -1
  726. package/node_modules/cheerio-select/lib/esm/package.json +0 -1
  727. package/node_modules/cheerio-select/lib/esm/positionals.d.ts +0 -10
  728. package/node_modules/cheerio-select/lib/esm/positionals.d.ts.map +0 -1
  729. package/node_modules/cheerio-select/lib/esm/positionals.js +0 -47
  730. package/node_modules/cheerio-select/lib/esm/positionals.js.map +0 -1
  731. package/node_modules/cheerio-select/lib/helpers.d.ts +0 -5
  732. package/node_modules/cheerio-select/lib/helpers.d.ts.map +0 -1
  733. package/node_modules/cheerio-select/lib/helpers.js +0 -26
  734. package/node_modules/cheerio-select/lib/helpers.js.map +0 -1
  735. package/node_modules/cheerio-select/lib/index.d.ts +0 -12
  736. package/node_modules/cheerio-select/lib/index.d.ts.map +0 -1
  737. package/node_modules/cheerio-select/lib/index.js +0 -302
  738. package/node_modules/cheerio-select/lib/index.js.map +0 -1
  739. package/node_modules/cheerio-select/lib/positionals.d.ts +0 -10
  740. package/node_modules/cheerio-select/lib/positionals.d.ts.map +0 -1
  741. package/node_modules/cheerio-select/lib/positionals.js +0 -52
  742. package/node_modules/cheerio-select/lib/positionals.js.map +0 -1
  743. package/node_modules/cheerio-select/package.json +0 -76
  744. package/node_modules/colorette/LICENSE.md +0 -7
  745. package/node_modules/colorette/README.md +0 -134
  746. package/node_modules/colorette/index.cjs +0 -218
  747. package/node_modules/colorette/index.d.ts +0 -93
  748. package/node_modules/colorette/index.js +0 -150
  749. package/node_modules/colorette/package.json +0 -40
  750. package/node_modules/css-select/README.md +0 -264
  751. package/node_modules/css-select/lib/attributes.d.ts +0 -7
  752. package/node_modules/css-select/lib/attributes.d.ts.map +0 -1
  753. package/node_modules/css-select/lib/attributes.js +0 -236
  754. package/node_modules/css-select/lib/attributes.js.map +0 -1
  755. package/node_modules/css-select/lib/compile.d.ts +0 -13
  756. package/node_modules/css-select/lib/compile.d.ts.map +0 -1
  757. package/node_modules/css-select/lib/compile.js +0 -151
  758. package/node_modules/css-select/lib/compile.js.map +0 -1
  759. package/node_modules/css-select/lib/esm/attributes.d.ts +0 -7
  760. package/node_modules/css-select/lib/esm/attributes.d.ts.map +0 -1
  761. package/node_modules/css-select/lib/esm/attributes.js +0 -222
  762. package/node_modules/css-select/lib/esm/attributes.js.map +0 -1
  763. package/node_modules/css-select/lib/esm/compile.d.ts +0 -13
  764. package/node_modules/css-select/lib/esm/compile.d.ts.map +0 -1
  765. package/node_modules/css-select/lib/esm/compile.js +0 -115
  766. package/node_modules/css-select/lib/esm/compile.js.map +0 -1
  767. package/node_modules/css-select/lib/esm/general.d.ts +0 -3
  768. package/node_modules/css-select/lib/esm/general.d.ts.map +0 -1
  769. package/node_modules/css-select/lib/esm/general.js +0 -144
  770. package/node_modules/css-select/lib/esm/general.js.map +0 -1
  771. package/node_modules/css-select/lib/esm/index.d.ts +0 -50
  772. package/node_modules/css-select/lib/esm/index.d.ts.map +0 -1
  773. package/node_modules/css-select/lib/esm/index.js +0 -115
  774. package/node_modules/css-select/lib/esm/index.js.map +0 -1
  775. package/node_modules/css-select/lib/esm/package.json +0 -1
  776. package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts +0 -5
  777. package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.d.ts.map +0 -1
  778. package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js +0 -35
  779. package/node_modules/css-select/lib/esm/pseudo-selectors/aliases.js.map +0 -1
  780. package/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts +0 -4
  781. package/node_modules/css-select/lib/esm/pseudo-selectors/filters.d.ts.map +0 -1
  782. package/node_modules/css-select/lib/esm/pseudo-selectors/filters.js +0 -143
  783. package/node_modules/css-select/lib/esm/pseudo-selectors/filters.js.map +0 -1
  784. package/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts +0 -8
  785. package/node_modules/css-select/lib/esm/pseudo-selectors/index.d.ts.map +0 -1
  786. package/node_modules/css-select/lib/esm/pseudo-selectors/index.js +0 -40
  787. package/node_modules/css-select/lib/esm/pseudo-selectors/index.js.map +0 -1
  788. package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts +0 -6
  789. package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.d.ts.map +0 -1
  790. package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js +0 -79
  791. package/node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js.map +0 -1
  792. package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts +0 -9
  793. package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.d.ts.map +0 -1
  794. package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js +0 -94
  795. package/node_modules/css-select/lib/esm/pseudo-selectors/subselects.js.map +0 -1
  796. package/node_modules/css-select/lib/esm/sort.d.ts +0 -12
  797. package/node_modules/css-select/lib/esm/sort.d.ts.map +0 -1
  798. package/node_modules/css-select/lib/esm/sort.js +0 -79
  799. package/node_modules/css-select/lib/esm/sort.js.map +0 -1
  800. package/node_modules/css-select/lib/esm/types.d.ts +0 -167
  801. package/node_modules/css-select/lib/esm/types.d.ts.map +0 -1
  802. package/node_modules/css-select/lib/esm/types.js +0 -2
  803. package/node_modules/css-select/lib/esm/types.js.map +0 -1
  804. package/node_modules/css-select/lib/general.d.ts +0 -3
  805. package/node_modules/css-select/lib/general.d.ts.map +0 -1
  806. package/node_modules/css-select/lib/general.js +0 -148
  807. package/node_modules/css-select/lib/general.js.map +0 -1
  808. package/node_modules/css-select/lib/index.d.ts +0 -50
  809. package/node_modules/css-select/lib/index.d.ts.map +0 -1
  810. package/node_modules/css-select/lib/index.js +0 -154
  811. package/node_modules/css-select/lib/index.js.map +0 -1
  812. package/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts +0 -5
  813. package/node_modules/css-select/lib/pseudo-selectors/aliases.d.ts.map +0 -1
  814. package/node_modules/css-select/lib/pseudo-selectors/aliases.js +0 -34
  815. package/node_modules/css-select/lib/pseudo-selectors/aliases.js.map +0 -1
  816. package/node_modules/css-select/lib/pseudo-selectors/filters.d.ts +0 -4
  817. package/node_modules/css-select/lib/pseudo-selectors/filters.d.ts.map +0 -1
  818. package/node_modules/css-select/lib/pseudo-selectors/filters.js +0 -157
  819. package/node_modules/css-select/lib/pseudo-selectors/filters.js.map +0 -1
  820. package/node_modules/css-select/lib/pseudo-selectors/index.d.ts +0 -8
  821. package/node_modules/css-select/lib/pseudo-selectors/index.d.ts.map +0 -1
  822. package/node_modules/css-select/lib/pseudo-selectors/index.js +0 -46
  823. package/node_modules/css-select/lib/pseudo-selectors/index.js.map +0 -1
  824. package/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts +0 -6
  825. package/node_modules/css-select/lib/pseudo-selectors/pseudos.d.ts.map +0 -1
  826. package/node_modules/css-select/lib/pseudo-selectors/pseudos.js +0 -93
  827. package/node_modules/css-select/lib/pseudo-selectors/pseudos.js.map +0 -1
  828. package/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts +0 -9
  829. package/node_modules/css-select/lib/pseudo-selectors/subselects.d.ts.map +0 -1
  830. package/node_modules/css-select/lib/pseudo-selectors/subselects.js +0 -112
  831. package/node_modules/css-select/lib/pseudo-selectors/subselects.js.map +0 -1
  832. package/node_modules/css-select/lib/sort.d.ts +0 -12
  833. package/node_modules/css-select/lib/sort.d.ts.map +0 -1
  834. package/node_modules/css-select/lib/sort.js +0 -84
  835. package/node_modules/css-select/lib/sort.js.map +0 -1
  836. package/node_modules/css-select/lib/types.d.ts +0 -167
  837. package/node_modules/css-select/lib/types.d.ts.map +0 -1
  838. package/node_modules/css-select/lib/types.js +0 -3
  839. package/node_modules/css-select/lib/types.js.map +0 -1
  840. package/node_modules/css-select/package.json +0 -81
  841. package/node_modules/css-what/lib/commonjs/index.d.ts +0 -4
  842. package/node_modules/css-what/lib/commonjs/index.d.ts.map +0 -1
  843. package/node_modules/css-what/lib/commonjs/index.js +0 -23
  844. package/node_modules/css-what/lib/commonjs/parse.d.ts +0 -20
  845. package/node_modules/css-what/lib/commonjs/parse.d.ts.map +0 -1
  846. package/node_modules/css-what/lib/commonjs/parse.js +0 -425
  847. package/node_modules/css-what/lib/commonjs/stringify.d.ts +0 -8
  848. package/node_modules/css-what/lib/commonjs/stringify.d.ts.map +0 -1
  849. package/node_modules/css-what/lib/commonjs/stringify.js +0 -138
  850. package/node_modules/css-what/lib/commonjs/types.d.ts +0 -70
  851. package/node_modules/css-what/lib/commonjs/types.d.ts.map +0 -1
  852. package/node_modules/css-what/lib/commonjs/types.js +0 -42
  853. package/node_modules/css-what/lib/es/index.d.ts +0 -4
  854. package/node_modules/css-what/lib/es/index.d.ts.map +0 -1
  855. package/node_modules/css-what/lib/es/index.js +0 -3
  856. package/node_modules/css-what/lib/es/parse.d.ts +0 -20
  857. package/node_modules/css-what/lib/es/parse.d.ts.map +0 -1
  858. package/node_modules/css-what/lib/es/parse.js +0 -420
  859. package/node_modules/css-what/lib/es/stringify.d.ts +0 -8
  860. package/node_modules/css-what/lib/es/stringify.d.ts.map +0 -1
  861. package/node_modules/css-what/lib/es/stringify.js +0 -126
  862. package/node_modules/css-what/lib/es/types.d.ts +0 -70
  863. package/node_modules/css-what/lib/es/types.d.ts.map +0 -1
  864. package/node_modules/css-what/lib/es/types.js +0 -39
  865. package/node_modules/css-what/package.json +0 -59
  866. package/node_modules/css-what/readme.md +0 -69
  867. package/node_modules/dom-serializer/LICENSE +0 -11
  868. package/node_modules/dom-serializer/README.md +0 -109
  869. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
  870. package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
  871. package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
  872. package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
  873. package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
  874. package/node_modules/dom-serializer/lib/esm/index.js +0 -190
  875. package/node_modules/dom-serializer/lib/esm/package.json +0 -1
  876. package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
  877. package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
  878. package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
  879. package/node_modules/dom-serializer/lib/index.d.ts +0 -52
  880. package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
  881. package/node_modules/dom-serializer/lib/index.js +0 -229
  882. package/node_modules/dom-serializer/package.json +0 -69
  883. package/node_modules/domelementtype/LICENSE +0 -11
  884. package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
  885. package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
  886. package/node_modules/domelementtype/lib/esm/index.js +0 -51
  887. package/node_modules/domelementtype/lib/esm/package.json +0 -1
  888. package/node_modules/domelementtype/lib/index.d.ts +0 -48
  889. package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
  890. package/node_modules/domelementtype/lib/index.js +0 -55
  891. package/node_modules/domelementtype/package.json +0 -54
  892. package/node_modules/domhandler/LICENSE +0 -11
  893. package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
  894. package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
  895. package/node_modules/domhandler/lib/esm/index.js +0 -146
  896. package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
  897. package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
  898. package/node_modules/domhandler/lib/esm/node.js +0 -338
  899. package/node_modules/domhandler/lib/esm/package.json +0 -1
  900. package/node_modules/domhandler/lib/index.d.ts +0 -76
  901. package/node_modules/domhandler/lib/index.d.ts.map +0 -1
  902. package/node_modules/domhandler/lib/index.js +0 -165
  903. package/node_modules/domhandler/lib/node.d.ts +0 -245
  904. package/node_modules/domhandler/lib/node.d.ts.map +0 -1
  905. package/node_modules/domhandler/lib/node.js +0 -474
  906. package/node_modules/domhandler/package.json +0 -73
  907. package/node_modules/domhandler/readme.md +0 -92
  908. package/node_modules/domutils/LICENSE +0 -11
  909. package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
  910. package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
  911. package/node_modules/domutils/lib/esm/feeds.js +0 -183
  912. package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
  913. package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
  914. package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
  915. package/node_modules/domutils/lib/esm/helpers.js +0 -136
  916. package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
  917. package/node_modules/domutils/lib/esm/index.d.ts +0 -10
  918. package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
  919. package/node_modules/domutils/lib/esm/index.js +0 -10
  920. package/node_modules/domutils/lib/esm/index.js.map +0 -1
  921. package/node_modules/domutils/lib/esm/legacy.d.ts +0 -79
  922. package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
  923. package/node_modules/domutils/lib/esm/legacy.js +0 -152
  924. package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
  925. package/node_modules/domutils/lib/esm/manipulation.d.ts +0 -49
  926. package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
  927. package/node_modules/domutils/lib/esm/manipulation.js +0 -134
  928. package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
  929. package/node_modules/domutils/lib/esm/package.json +0 -1
  930. package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
  931. package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
  932. package/node_modules/domutils/lib/esm/querying.js +0 -142
  933. package/node_modules/domutils/lib/esm/querying.js.map +0 -1
  934. package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
  935. package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
  936. package/node_modules/domutils/lib/esm/stringify.js +0 -81
  937. package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
  938. package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
  939. package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
  940. package/node_modules/domutils/lib/esm/traversal.js +0 -112
  941. package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
  942. package/node_modules/domutils/lib/feeds.d.ts +0 -71
  943. package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
  944. package/node_modules/domutils/lib/feeds.js +0 -190
  945. package/node_modules/domutils/lib/feeds.js.map +0 -1
  946. package/node_modules/domutils/lib/helpers.d.ts +0 -59
  947. package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
  948. package/node_modules/domutils/lib/helpers.js +0 -142
  949. package/node_modules/domutils/lib/helpers.js.map +0 -1
  950. package/node_modules/domutils/lib/index.d.ts +0 -10
  951. package/node_modules/domutils/lib/index.d.ts.map +0 -1
  952. package/node_modules/domutils/lib/index.js +0 -33
  953. package/node_modules/domutils/lib/index.js.map +0 -1
  954. package/node_modules/domutils/lib/legacy.d.ts +0 -79
  955. package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
  956. package/node_modules/domutils/lib/legacy.js +0 -168
  957. package/node_modules/domutils/lib/legacy.js.map +0 -1
  958. package/node_modules/domutils/lib/manipulation.d.ts +0 -49
  959. package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
  960. package/node_modules/domutils/lib/manipulation.js +0 -142
  961. package/node_modules/domutils/lib/manipulation.js.map +0 -1
  962. package/node_modules/domutils/lib/querying.d.ts +0 -64
  963. package/node_modules/domutils/lib/querying.d.ts.map +0 -1
  964. package/node_modules/domutils/lib/querying.js +0 -155
  965. package/node_modules/domutils/lib/querying.js.map +0 -1
  966. package/node_modules/domutils/lib/stringify.d.ts +0 -46
  967. package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
  968. package/node_modules/domutils/lib/stringify.js +0 -91
  969. package/node_modules/domutils/lib/stringify.js.map +0 -1
  970. package/node_modules/domutils/lib/traversal.d.ts +0 -67
  971. package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
  972. package/node_modules/domutils/lib/traversal.js +0 -125
  973. package/node_modules/domutils/lib/traversal.js.map +0 -1
  974. package/node_modules/domutils/package.json +0 -79
  975. package/node_modules/domutils/readme.md +0 -31
  976. package/node_modules/encoding-sniffer/LICENSE +0 -18
  977. package/node_modules/encoding-sniffer/README.md +0 -68
  978. package/node_modules/encoding-sniffer/dist/commonjs/index.d.ts +0 -31
  979. package/node_modules/encoding-sniffer/dist/commonjs/index.d.ts.map +0 -1
  980. package/node_modules/encoding-sniffer/dist/commonjs/index.js +0 -72
  981. package/node_modules/encoding-sniffer/dist/commonjs/index.js.map +0 -1
  982. package/node_modules/encoding-sniffer/dist/commonjs/package.json +0 -3
  983. package/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts +0 -148
  984. package/node_modules/encoding-sniffer/dist/commonjs/sniffer.d.ts.map +0 -1
  985. package/node_modules/encoding-sniffer/dist/commonjs/sniffer.js +0 -990
  986. package/node_modules/encoding-sniffer/dist/commonjs/sniffer.js.map +0 -1
  987. package/node_modules/encoding-sniffer/dist/esm/index.d.ts +0 -31
  988. package/node_modules/encoding-sniffer/dist/esm/index.d.ts.map +0 -1
  989. package/node_modules/encoding-sniffer/dist/esm/index.js +0 -63
  990. package/node_modules/encoding-sniffer/dist/esm/index.js.map +0 -1
  991. package/node_modules/encoding-sniffer/dist/esm/package.json +0 -3
  992. package/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts +0 -148
  993. package/node_modules/encoding-sniffer/dist/esm/sniffer.d.ts.map +0 -1
  994. package/node_modules/encoding-sniffer/dist/esm/sniffer.js +0 -985
  995. package/node_modules/encoding-sniffer/dist/esm/sniffer.js.map +0 -1
  996. package/node_modules/encoding-sniffer/package.json +0 -94
  997. package/node_modules/encoding-sniffer/sniffer.d.ts +0 -2
  998. package/node_modules/encoding-sniffer/sniffer.js +0 -3
  999. package/node_modules/entities/LICENSE +0 -11
  1000. package/node_modules/entities/lib/decode.d.ts +0 -211
  1001. package/node_modules/entities/lib/decode.d.ts.map +0 -1
  1002. package/node_modules/entities/lib/decode.js +0 -536
  1003. package/node_modules/entities/lib/decode.js.map +0 -1
  1004. package/node_modules/entities/lib/decode_codepoint.d.ts +0 -19
  1005. package/node_modules/entities/lib/decode_codepoint.d.ts.map +0 -1
  1006. package/node_modules/entities/lib/decode_codepoint.js +0 -76
  1007. package/node_modules/entities/lib/decode_codepoint.js.map +0 -1
  1008. package/node_modules/entities/lib/encode.d.ts +0 -22
  1009. package/node_modules/entities/lib/encode.d.ts.map +0 -1
  1010. package/node_modules/entities/lib/encode.js +0 -77
  1011. package/node_modules/entities/lib/encode.js.map +0 -1
  1012. package/node_modules/entities/lib/escape.d.ts +0 -43
  1013. package/node_modules/entities/lib/escape.d.ts.map +0 -1
  1014. package/node_modules/entities/lib/escape.js +0 -122
  1015. package/node_modules/entities/lib/escape.js.map +0 -1
  1016. package/node_modules/entities/lib/esm/decode.d.ts +0 -211
  1017. package/node_modules/entities/lib/esm/decode.d.ts.map +0 -1
  1018. package/node_modules/entities/lib/esm/decode.js +0 -496
  1019. package/node_modules/entities/lib/esm/decode.js.map +0 -1
  1020. package/node_modules/entities/lib/esm/decode_codepoint.d.ts +0 -19
  1021. package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +0 -1
  1022. package/node_modules/entities/lib/esm/decode_codepoint.js +0 -71
  1023. package/node_modules/entities/lib/esm/decode_codepoint.js.map +0 -1
  1024. package/node_modules/entities/lib/esm/encode.d.ts +0 -22
  1025. package/node_modules/entities/lib/esm/encode.d.ts.map +0 -1
  1026. package/node_modules/entities/lib/esm/encode.js +0 -69
  1027. package/node_modules/entities/lib/esm/encode.js.map +0 -1
  1028. package/node_modules/entities/lib/esm/escape.d.ts +0 -43
  1029. package/node_modules/entities/lib/esm/escape.d.ts.map +0 -1
  1030. package/node_modules/entities/lib/esm/escape.js +0 -116
  1031. package/node_modules/entities/lib/esm/escape.js.map +0 -1
  1032. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +0 -3
  1033. package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +0 -1
  1034. package/node_modules/entities/lib/esm/generated/decode-data-html.js +0 -7
  1035. package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +0 -1
  1036. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +0 -3
  1037. package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +0 -1
  1038. package/node_modules/entities/lib/esm/generated/decode-data-xml.js +0 -7
  1039. package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +0 -1
  1040. package/node_modules/entities/lib/esm/generated/encode-html.d.ts +0 -8
  1041. package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +0 -1
  1042. package/node_modules/entities/lib/esm/generated/encode-html.js +0 -10
  1043. package/node_modules/entities/lib/esm/generated/encode-html.js.map +0 -1
  1044. package/node_modules/entities/lib/esm/index.d.ts +0 -96
  1045. package/node_modules/entities/lib/esm/index.d.ts.map +0 -1
  1046. package/node_modules/entities/lib/esm/index.js +0 -99
  1047. package/node_modules/entities/lib/esm/index.js.map +0 -1
  1048. package/node_modules/entities/lib/esm/package.json +0 -1
  1049. package/node_modules/entities/lib/generated/decode-data-html.d.ts +0 -3
  1050. package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +0 -1
  1051. package/node_modules/entities/lib/generated/decode-data-html.js +0 -9
  1052. package/node_modules/entities/lib/generated/decode-data-html.js.map +0 -1
  1053. package/node_modules/entities/lib/generated/decode-data-xml.d.ts +0 -3
  1054. package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +0 -1
  1055. package/node_modules/entities/lib/generated/decode-data-xml.js +0 -9
  1056. package/node_modules/entities/lib/generated/decode-data-xml.js.map +0 -1
  1057. package/node_modules/entities/lib/generated/encode-html.d.ts +0 -8
  1058. package/node_modules/entities/lib/generated/encode-html.d.ts.map +0 -1
  1059. package/node_modules/entities/lib/generated/encode-html.js +0 -12
  1060. package/node_modules/entities/lib/generated/encode-html.js.map +0 -1
  1061. package/node_modules/entities/lib/index.d.ts +0 -96
  1062. package/node_modules/entities/lib/index.d.ts.map +0 -1
  1063. package/node_modules/entities/lib/index.js +0 -126
  1064. package/node_modules/entities/lib/index.js.map +0 -1
  1065. package/node_modules/entities/package.json +0 -90
  1066. package/node_modules/entities/readme.md +0 -122
  1067. package/node_modules/eventemitter3/LICENSE +0 -21
  1068. package/node_modules/eventemitter3/README.md +0 -94
  1069. package/node_modules/eventemitter3/dist/eventemitter3.esm.js +0 -347
  1070. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +0 -1
  1071. package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +0 -1
  1072. package/node_modules/eventemitter3/dist/eventemitter3.umd.js +0 -355
  1073. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +0 -1
  1074. package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +0 -1
  1075. package/node_modules/eventemitter3/index.d.ts +0 -135
  1076. package/node_modules/eventemitter3/index.js +0 -336
  1077. package/node_modules/eventemitter3/index.mjs +0 -4
  1078. package/node_modules/eventemitter3/package.json +0 -67
  1079. package/node_modules/figures/index.d.ts +0 -279
  1080. package/node_modules/figures/index.js +0 -292
  1081. package/node_modules/figures/package.json +0 -49
  1082. package/node_modules/figures/readme.md +0 -337
  1083. package/node_modules/htmlparser2/WritableStream.js +0 -3
  1084. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
  1085. package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
  1086. package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
  1087. package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
  1088. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts +0 -126
  1089. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
  1090. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
  1091. package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
  1092. package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts +0 -15
  1093. package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
  1094. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
  1095. package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
  1096. package/node_modules/htmlparser2/dist/commonjs/index.d.ts +0 -54
  1097. package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
  1098. package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
  1099. package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
  1100. package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
  1101. package/node_modules/htmlparser2/dist/esm/Parser.d.ts +0 -198
  1102. package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
  1103. package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
  1104. package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
  1105. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
  1106. package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
  1107. package/node_modules/htmlparser2/dist/esm/Tokenizer.js +0 -801
  1108. package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
  1109. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
  1110. package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
  1111. package/node_modules/htmlparser2/dist/esm/WritableStream.js +0 -32
  1112. package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
  1113. package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
  1114. package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
  1115. package/node_modules/htmlparser2/dist/esm/index.js +0 -74
  1116. package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
  1117. package/node_modules/htmlparser2/dist/esm/package.json +0 -3
  1118. package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
  1119. package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
  1120. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
  1121. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
  1122. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
  1123. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  1124. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts +0 -205
  1125. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
  1126. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
  1127. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  1128. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts +0 -22
  1129. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
  1130. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
  1131. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
  1132. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts +0 -46
  1133. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
  1134. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
  1135. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
  1136. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
  1137. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
  1138. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
  1139. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  1140. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
  1141. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
  1142. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
  1143. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  1144. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
  1145. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
  1146. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
  1147. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
  1148. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts +0 -96
  1149. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
  1150. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
  1151. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
  1152. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
  1153. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
  1154. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
  1155. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
  1156. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
  1157. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
  1158. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
  1159. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
  1160. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
  1161. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
  1162. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
  1163. package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
  1164. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
  1165. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
  1166. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
  1167. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
  1168. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
  1169. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
  1170. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
  1171. package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
  1172. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
  1173. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
  1174. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
  1175. package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
  1176. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
  1177. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
  1178. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
  1179. package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
  1180. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
  1181. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
  1182. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
  1183. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
  1184. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
  1185. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
  1186. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
  1187. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
  1188. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
  1189. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
  1190. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
  1191. package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
  1192. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
  1193. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
  1194. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js +0 -107
  1195. package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
  1196. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
  1197. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
  1198. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
  1199. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
  1200. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
  1201. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
  1202. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
  1203. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
  1204. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
  1205. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
  1206. package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
  1207. package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
  1208. package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
  1209. package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
  1210. package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
  1211. package/node_modules/iconv-lite/.github/dependabot.yml +0 -11
  1212. package/node_modules/iconv-lite/.idea/codeStyles/Project.xml +0 -47
  1213. package/node_modules/iconv-lite/.idea/codeStyles/codeStyleConfig.xml +0 -5
  1214. package/node_modules/iconv-lite/.idea/iconv-lite.iml +0 -12
  1215. package/node_modules/iconv-lite/.idea/inspectionProfiles/Project_Default.xml +0 -6
  1216. package/node_modules/iconv-lite/.idea/modules.xml +0 -8
  1217. package/node_modules/iconv-lite/.idea/vcs.xml +0 -6
  1218. package/node_modules/iconv-lite/Changelog.md +0 -212
  1219. package/node_modules/iconv-lite/LICENSE +0 -21
  1220. package/node_modules/iconv-lite/README.md +0 -130
  1221. package/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -597
  1222. package/node_modules/iconv-lite/encodings/dbcs-data.js +0 -188
  1223. package/node_modules/iconv-lite/encodings/index.js +0 -23
  1224. package/node_modules/iconv-lite/encodings/internal.js +0 -198
  1225. package/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  1226. package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  1227. package/node_modules/iconv-lite/encodings/sbcs-data.js +0 -179
  1228. package/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  1229. package/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  1230. package/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  1231. package/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  1232. package/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  1233. package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  1234. package/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  1235. package/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  1236. package/node_modules/iconv-lite/encodings/utf16.js +0 -197
  1237. package/node_modules/iconv-lite/encodings/utf32.js +0 -319
  1238. package/node_modules/iconv-lite/encodings/utf7.js +0 -290
  1239. package/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  1240. package/node_modules/iconv-lite/lib/index.d.ts +0 -41
  1241. package/node_modules/iconv-lite/lib/index.js +0 -180
  1242. package/node_modules/iconv-lite/lib/streams.js +0 -109
  1243. package/node_modules/iconv-lite/package.json +0 -44
  1244. package/node_modules/listr2/dist/index.cjs +0 -2189
  1245. package/node_modules/listr2/dist/index.d.cts +0 -1528
  1246. package/node_modules/listr2/dist/index.d.ts +0 -1528
  1247. package/node_modules/listr2/dist/index.js +0 -2107
  1248. package/node_modules/log-update/node_modules/ansi-escapes/base.d.ts +0 -262
  1249. package/node_modules/log-update/node_modules/ansi-escapes/base.js +0 -163
  1250. package/node_modules/log-update/node_modules/ansi-escapes/package.json +0 -70
  1251. package/node_modules/log-update/node_modules/ansi-escapes/readme.md +0 -261
  1252. package/node_modules/nth-check/LICENSE +0 -11
  1253. package/node_modules/nth-check/README.md +0 -136
  1254. package/node_modules/nth-check/lib/compile.d.ts +0 -55
  1255. package/node_modules/nth-check/lib/compile.d.ts.map +0 -1
  1256. package/node_modules/nth-check/lib/compile.js +0 -121
  1257. package/node_modules/nth-check/lib/compile.js.map +0 -1
  1258. package/node_modules/nth-check/lib/esm/compile.d.ts +0 -55
  1259. package/node_modules/nth-check/lib/esm/compile.d.ts.map +0 -1
  1260. package/node_modules/nth-check/lib/esm/compile.js +0 -113
  1261. package/node_modules/nth-check/lib/esm/compile.js.map +0 -1
  1262. package/node_modules/nth-check/lib/esm/index.d.ts +0 -59
  1263. package/node_modules/nth-check/lib/esm/index.d.ts.map +0 -1
  1264. package/node_modules/nth-check/lib/esm/index.js +0 -63
  1265. package/node_modules/nth-check/lib/esm/index.js.map +0 -1
  1266. package/node_modules/nth-check/lib/esm/package.json +0 -1
  1267. package/node_modules/nth-check/lib/esm/parse.d.ts +0 -9
  1268. package/node_modules/nth-check/lib/esm/parse.d.ts.map +0 -1
  1269. package/node_modules/nth-check/lib/esm/parse.js +0 -73
  1270. package/node_modules/nth-check/lib/esm/parse.js.map +0 -1
  1271. package/node_modules/nth-check/lib/index.d.ts +0 -59
  1272. package/node_modules/nth-check/lib/index.d.ts.map +0 -1
  1273. package/node_modules/nth-check/lib/index.js +0 -70
  1274. package/node_modules/nth-check/lib/index.js.map +0 -1
  1275. package/node_modules/nth-check/lib/parse.d.ts +0 -9
  1276. package/node_modules/nth-check/lib/parse.d.ts.map +0 -1
  1277. package/node_modules/nth-check/lib/parse.js +0 -77
  1278. package/node_modules/nth-check/lib/parse.js.map +0 -1
  1279. package/node_modules/nth-check/package.json +0 -78
  1280. package/node_modules/ora/index.d.ts +0 -332
  1281. package/node_modules/ora/index.js +0 -443
  1282. package/node_modules/ora/node_modules/chalk/license +0 -9
  1283. package/node_modules/ora/node_modules/chalk/package.json +0 -83
  1284. package/node_modules/ora/node_modules/chalk/readme.md +0 -297
  1285. package/node_modules/ora/node_modules/chalk/source/index.d.ts +0 -325
  1286. package/node_modules/ora/node_modules/chalk/source/index.js +0 -225
  1287. package/node_modules/ora/node_modules/chalk/source/utilities.js +0 -33
  1288. package/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
  1289. package/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
  1290. package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
  1291. package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
  1292. package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
  1293. package/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js +0 -190
  1294. package/node_modules/ora/node_modules/cli-spinners/index.d.ts +0 -139
  1295. package/node_modules/ora/node_modules/cli-spinners/index.js +0 -11
  1296. package/node_modules/ora/node_modules/cli-spinners/license +0 -9
  1297. package/node_modules/ora/node_modules/cli-spinners/package.json +0 -56
  1298. package/node_modules/ora/node_modules/cli-spinners/readme.md +0 -74
  1299. package/node_modules/ora/node_modules/cli-spinners/spinners.json +0 -1665
  1300. package/node_modules/ora/node_modules/string-width/index.js +0 -89
  1301. package/node_modules/ora/node_modules/string-width/license +0 -9
  1302. package/node_modules/ora/node_modules/string-width/package.json +0 -65
  1303. package/node_modules/ora/node_modules/string-width/readme.md +0 -66
  1304. package/node_modules/ora/package.json +0 -64
  1305. package/node_modules/ora/readme.md +0 -375
  1306. package/node_modules/parse5/LICENSE +0 -19
  1307. package/node_modules/parse5/README.md +0 -38
  1308. package/node_modules/parse5/dist/cjs/common/doctype.d.ts +0 -4
  1309. package/node_modules/parse5/dist/cjs/common/doctype.js +0 -118
  1310. package/node_modules/parse5/dist/cjs/common/error-codes.d.ts +0 -67
  1311. package/node_modules/parse5/dist/cjs/common/error-codes.js +0 -66
  1312. package/node_modules/parse5/dist/cjs/common/foreign-content.d.ts +0 -9
  1313. package/node_modules/parse5/dist/cjs/common/foreign-content.js +0 -237
  1314. package/node_modules/parse5/dist/cjs/common/html.d.ts +0 -289
  1315. package/node_modules/parse5/dist/cjs/common/html.js +0 -528
  1316. package/node_modules/parse5/dist/cjs/common/token.d.ts +0 -84
  1317. package/node_modules/parse5/dist/cjs/common/token.js +0 -24
  1318. package/node_modules/parse5/dist/cjs/common/unicode.d.ts +0 -42
  1319. package/node_modules/parse5/dist/cjs/common/unicode.js +0 -70
  1320. package/node_modules/parse5/dist/cjs/index.d.ts +0 -71
  1321. package/node_modules/parse5/dist/cjs/index.js +0 -54
  1322. package/node_modules/parse5/dist/cjs/package.json +0 -1
  1323. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.d.ts +0 -36
  1324. package/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +0 -114
  1325. package/node_modules/parse5/dist/cjs/parser/index.d.ts +0 -221
  1326. package/node_modules/parse5/dist/cjs/parser/index.js +0 -3240
  1327. package/node_modules/parse5/dist/cjs/parser/open-element-stack.d.ts +0 -53
  1328. package/node_modules/parse5/dist/cjs/parser/open-element-stack.js +0 -328
  1329. package/node_modules/parse5/dist/cjs/serializer/index.d.ts +0 -60
  1330. package/node_modules/parse5/dist/cjs/serializer/index.js +0 -172
  1331. package/node_modules/parse5/dist/cjs/tokenizer/index.d.ts +0 -247
  1332. package/node_modules/parse5/dist/cjs/tokenizer/index.js +0 -2714
  1333. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.d.ts +0 -36
  1334. package/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +0 -200
  1335. package/node_modules/parse5/dist/cjs/tree-adapters/default.d.ts +0 -84
  1336. package/node_modules/parse5/dist/cjs/tree-adapters/default.js +0 -176
  1337. package/node_modules/parse5/dist/cjs/tree-adapters/interface.d.ts +0 -255
  1338. package/node_modules/parse5/dist/cjs/tree-adapters/interface.js +0 -2
  1339. package/node_modules/parse5/dist/common/doctype.d.ts +0 -4
  1340. package/node_modules/parse5/dist/common/doctype.js +0 -114
  1341. package/node_modules/parse5/dist/common/error-codes.d.ts +0 -67
  1342. package/node_modules/parse5/dist/common/error-codes.js +0 -63
  1343. package/node_modules/parse5/dist/common/foreign-content.d.ts +0 -9
  1344. package/node_modules/parse5/dist/common/foreign-content.js +0 -228
  1345. package/node_modules/parse5/dist/common/html.d.ts +0 -289
  1346. package/node_modules/parse5/dist/common/html.js +0 -523
  1347. package/node_modules/parse5/dist/common/token.d.ts +0 -84
  1348. package/node_modules/parse5/dist/common/token.js +0 -20
  1349. package/node_modules/parse5/dist/common/unicode.d.ts +0 -42
  1350. package/node_modules/parse5/dist/common/unicode.js +0 -62
  1351. package/node_modules/parse5/dist/index.d.ts +0 -71
  1352. package/node_modules/parse5/dist/index.js +0 -42
  1353. package/node_modules/parse5/dist/parser/formatting-element-list.d.ts +0 -36
  1354. package/node_modules/parse5/dist/parser/formatting-element-list.js +0 -110
  1355. package/node_modules/parse5/dist/parser/index.d.ts +0 -221
  1356. package/node_modules/parse5/dist/parser/index.js +0 -3245
  1357. package/node_modules/parse5/dist/parser/open-element-stack.d.ts +0 -53
  1358. package/node_modules/parse5/dist/parser/open-element-stack.js +0 -324
  1359. package/node_modules/parse5/dist/serializer/index.d.ts +0 -60
  1360. package/node_modules/parse5/dist/serializer/index.js +0 -168
  1361. package/node_modules/parse5/dist/tokenizer/index.d.ts +0 -247
  1362. package/node_modules/parse5/dist/tokenizer/index.js +0 -2710
  1363. package/node_modules/parse5/dist/tokenizer/preprocessor.d.ts +0 -36
  1364. package/node_modules/parse5/dist/tokenizer/preprocessor.js +0 -196
  1365. package/node_modules/parse5/dist/tree-adapters/default.d.ts +0 -84
  1366. package/node_modules/parse5/dist/tree-adapters/default.js +0 -173
  1367. package/node_modules/parse5/dist/tree-adapters/interface.d.ts +0 -255
  1368. package/node_modules/parse5/node_modules/entities/LICENSE +0 -11
  1369. package/node_modules/parse5/node_modules/entities/decode.d.ts +0 -1
  1370. package/node_modules/parse5/node_modules/entities/decode.js +0 -3
  1371. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
  1372. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
  1373. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
  1374. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
  1375. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.d.ts +0 -209
  1376. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
  1377. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.js +0 -511
  1378. package/node_modules/parse5/node_modules/entities/dist/commonjs/decode.js.map +0 -1
  1379. package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.d.ts +0 -22
  1380. package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
  1381. package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.js +0 -73
  1382. package/node_modules/parse5/node_modules/entities/dist/commonjs/encode.js.map +0 -1
  1383. package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.d.ts +0 -43
  1384. package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
  1385. package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.js +0 -121
  1386. package/node_modules/parse5/node_modules/entities/dist/commonjs/escape.js.map +0 -1
  1387. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
  1388. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
  1389. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -10
  1390. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
  1391. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
  1392. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
  1393. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -10
  1394. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
  1395. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -8
  1396. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
  1397. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -13
  1398. package/node_modules/parse5/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
  1399. package/node_modules/parse5/node_modules/entities/dist/commonjs/index.d.ts +0 -96
  1400. package/node_modules/parse5/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
  1401. package/node_modules/parse5/node_modules/entities/dist/commonjs/index.js +0 -131
  1402. package/node_modules/parse5/node_modules/entities/dist/commonjs/index.js.map +0 -1
  1403. package/node_modules/parse5/node_modules/entities/dist/commonjs/package.json +0 -3
  1404. package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
  1405. package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
  1406. package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
  1407. package/node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
  1408. package/node_modules/parse5/node_modules/entities/dist/esm/decode.d.ts +0 -209
  1409. package/node_modules/parse5/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
  1410. package/node_modules/parse5/node_modules/entities/dist/esm/decode.js +0 -497
  1411. package/node_modules/parse5/node_modules/entities/dist/esm/decode.js.map +0 -1
  1412. package/node_modules/parse5/node_modules/entities/dist/esm/encode.d.ts +0 -22
  1413. package/node_modules/parse5/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
  1414. package/node_modules/parse5/node_modules/entities/dist/esm/encode.js +0 -69
  1415. package/node_modules/parse5/node_modules/entities/dist/esm/encode.js.map +0 -1
  1416. package/node_modules/parse5/node_modules/entities/dist/esm/escape.d.ts +0 -43
  1417. package/node_modules/parse5/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
  1418. package/node_modules/parse5/node_modules/entities/dist/esm/escape.js +0 -117
  1419. package/node_modules/parse5/node_modules/entities/dist/esm/escape.js.map +0 -1
  1420. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
  1421. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
  1422. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -7
  1423. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
  1424. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
  1425. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
  1426. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -7
  1427. package/node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
  1428. package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -8
  1429. package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
  1430. package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.js +0 -10
  1431. package/node_modules/parse5/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
  1432. package/node_modules/parse5/node_modules/entities/dist/esm/index.d.ts +0 -96
  1433. package/node_modules/parse5/node_modules/entities/dist/esm/index.d.ts.map +0 -1
  1434. package/node_modules/parse5/node_modules/entities/dist/esm/index.js +0 -107
  1435. package/node_modules/parse5/node_modules/entities/dist/esm/index.js.map +0 -1
  1436. package/node_modules/parse5/node_modules/entities/dist/esm/package.json +0 -3
  1437. package/node_modules/parse5/node_modules/entities/escape.d.ts +0 -1
  1438. package/node_modules/parse5/node_modules/entities/escape.js +0 -3
  1439. package/node_modules/parse5/node_modules/entities/package.json +0 -118
  1440. package/node_modules/parse5/node_modules/entities/readme.md +0 -122
  1441. package/node_modules/parse5/node_modules/entities/src/decode-codepoint.ts +0 -81
  1442. package/node_modules/parse5/node_modules/entities/src/decode.spec.ts +0 -320
  1443. package/node_modules/parse5/node_modules/entities/src/decode.ts +0 -620
  1444. package/node_modules/parse5/node_modules/entities/src/encode.spec.ts +0 -78
  1445. package/node_modules/parse5/node_modules/entities/src/encode.ts +0 -77
  1446. package/node_modules/parse5/node_modules/entities/src/escape.spec.ts +0 -14
  1447. package/node_modules/parse5/node_modules/entities/src/escape.ts +0 -148
  1448. package/node_modules/parse5/node_modules/entities/src/generated/.eslintrc.json +0 -10
  1449. package/node_modules/parse5/node_modules/entities/src/generated/decode-data-html.ts +0 -8
  1450. package/node_modules/parse5/node_modules/entities/src/generated/decode-data-xml.ts +0 -8
  1451. package/node_modules/parse5/node_modules/entities/src/generated/encode-html.ts +0 -17
  1452. package/node_modules/parse5/node_modules/entities/src/index.spec.ts +0 -125
  1453. package/node_modules/parse5/node_modules/entities/src/index.ts +0 -188
  1454. package/node_modules/parse5/package.json +0 -50
  1455. package/node_modules/parse5-htmlparser2-tree-adapter/LICENSE +0 -19
  1456. package/node_modules/parse5-htmlparser2-tree-adapter/README.md +0 -34
  1457. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.d.ts +0 -6
  1458. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/index.js +0 -214
  1459. package/node_modules/parse5-htmlparser2-tree-adapter/dist/cjs/package.json +0 -1
  1460. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.d.ts +0 -6
  1461. package/node_modules/parse5-htmlparser2-tree-adapter/dist/index.js +0 -213
  1462. package/node_modules/parse5-htmlparser2-tree-adapter/package.json +0 -40
  1463. package/node_modules/parse5-parser-stream/LICENSE +0 -19
  1464. package/node_modules/parse5-parser-stream/README.md +0 -34
  1465. package/node_modules/parse5-parser-stream/dist/cjs/index.d.ts +0 -85
  1466. package/node_modules/parse5-parser-stream/dist/cjs/index.js +0 -90
  1467. package/node_modules/parse5-parser-stream/dist/cjs/package.json +0 -1
  1468. package/node_modules/parse5-parser-stream/dist/index.d.ts +0 -85
  1469. package/node_modules/parse5-parser-stream/dist/index.js +0 -86
  1470. package/node_modules/parse5-parser-stream/package.json +0 -39
  1471. package/node_modules/rfdc/.github/workflows/ci.yml +0 -21
  1472. package/node_modules/rfdc/LICENSE +0 -15
  1473. package/node_modules/rfdc/default.js +0 -3
  1474. package/node_modules/rfdc/index.d.ts +0 -13
  1475. package/node_modules/rfdc/index.js +0 -198
  1476. package/node_modules/rfdc/index.test-d.ts +0 -13
  1477. package/node_modules/rfdc/package.json +0 -73
  1478. package/node_modules/rfdc/readme.md +0 -181
  1479. package/node_modules/rfdc/test/index.js +0 -306
  1480. package/node_modules/smol-toml/dist/date.d.ts.map +0 -1
  1481. package/node_modules/smol-toml/dist/date.js.map +0 -1
  1482. package/node_modules/smol-toml/dist/error.d.ts.map +0 -1
  1483. package/node_modules/smol-toml/dist/error.js.map +0 -1
  1484. package/node_modules/smol-toml/dist/extract.js.map +0 -1
  1485. package/node_modules/smol-toml/dist/index.cjs.map +0 -1
  1486. package/node_modules/smol-toml/dist/index.d.ts.map +0 -1
  1487. package/node_modules/smol-toml/dist/index.js.map +0 -1
  1488. package/node_modules/smol-toml/dist/parse.d.ts.map +0 -1
  1489. package/node_modules/smol-toml/dist/parse.js.map +0 -1
  1490. package/node_modules/smol-toml/dist/primitive.d.ts +0 -29
  1491. package/node_modules/smol-toml/dist/primitive.d.ts.map +0 -1
  1492. package/node_modules/smol-toml/dist/primitive.js.map +0 -1
  1493. package/node_modules/smol-toml/dist/stringify.d.ts.map +0 -1
  1494. package/node_modules/smol-toml/dist/stringify.js.map +0 -1
  1495. package/node_modules/smol-toml/dist/struct.js.map +0 -1
  1496. package/node_modules/smol-toml/dist/util.d.ts.map +0 -1
  1497. package/node_modules/smol-toml/dist/util.js.map +0 -1
  1498. package/node_modules/smol-toml/src/date.ts +0 -152
  1499. package/node_modules/smol-toml/src/error.ts +0 -77
  1500. package/node_modules/smol-toml/src/extract.ts +0 -113
  1501. package/node_modules/smol-toml/src/index.ts +0 -42
  1502. package/node_modules/smol-toml/src/parse.ts +0 -184
  1503. package/node_modules/smol-toml/src/primitive.ts +0 -249
  1504. package/node_modules/smol-toml/src/stringify.ts +0 -191
  1505. package/node_modules/smol-toml/src/struct.ts +0 -202
  1506. package/node_modules/smol-toml/src/util.ts +0 -106
  1507. package/node_modules/stdin-discarder/index.d.ts +0 -13
  1508. package/node_modules/stdin-discarder/index.js +0 -59
  1509. package/node_modules/stdin-discarder/license +0 -9
  1510. package/node_modules/stdin-discarder/package.json +0 -42
  1511. package/node_modules/stdin-discarder/readme.md +0 -37
  1512. package/node_modules/whatwg-encoding/LICENSE.txt +0 -7
  1513. package/node_modules/whatwg-encoding/README.md +0 -50
  1514. package/node_modules/whatwg-encoding/lib/labels-to-names.json +0 -217
  1515. package/node_modules/whatwg-encoding/lib/supported-names.json +0 -38
  1516. package/node_modules/whatwg-encoding/lib/whatwg-encoding.js +0 -60
  1517. package/node_modules/whatwg-encoding/package.json +0 -32
  1518. package/node_modules/whatwg-mimetype/LICENSE.txt +0 -7
  1519. package/node_modules/whatwg-mimetype/README.md +0 -101
  1520. package/node_modules/whatwg-mimetype/lib/mime-type-parameters.js +0 -70
  1521. package/node_modules/whatwg-mimetype/lib/mime-type.js +0 -127
  1522. package/node_modules/whatwg-mimetype/lib/parser.js +0 -105
  1523. package/node_modules/whatwg-mimetype/lib/serializer.js +0 -25
  1524. package/node_modules/whatwg-mimetype/lib/utils.js +0 -60
  1525. package/node_modules/whatwg-mimetype/package.json +0 -45
  1526. /package/node_modules/@listr2/{prompt-adapter-enquirer → prompt-adapter-inquirer}/LICENSE +0 -0
  1527. /package/node_modules/{parse5/dist/tree-adapters/interface.js → @listr2/prompt-adapter-inquirer/node_modules/@inquirer/type/dist/inquirer.js} +0 -0
  1528. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.d.ts +0 -0
  1529. /package/node_modules/{log-update/node_modules/ansi-escapes → ansi-escapes}/index.js +0 -0
  1530. /package/node_modules/{chalk → ansi-escapes}/license +0 -0
  1531. /package/node_modules/{cheerio-select → htmlparser2/node_modules/domelementtype}/LICENSE +0 -0
  1532. /package/node_modules/{domelementtype → htmlparser2/node_modules/domelementtype}/readme.md +0 -0
  1533. /package/node_modules/{css-select → htmlparser2/node_modules/domhandler}/LICENSE +0 -0
  1534. /package/node_modules/{css-what → htmlparser2/node_modules/domutils}/LICENSE +0 -0
  1535. /package/node_modules/htmlparser2/node_modules/entities/dist/{commonjs/internal → internal}/bin-trie-flags.d.ts +0 -0
  1536. /package/node_modules/htmlparser2/node_modules/entities/dist/{esm/internal → internal}/bin-trie-flags.js +0 -0
  1537. /package/node_modules/{ora → listr2}/node_modules/string-width/index.d.ts +0 -0
  1538. /package/node_modules/{figures → listr2/node_modules/string-width}/license +0 -0
  1539. /package/node_modules/log-update/node_modules/{ansi-escapes → string-width}/license +0 -0
  1540. /package/node_modules/{ora → yocto-spinner}/license +0 -0
@@ -1,3240 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Parser = void 0;
4
- const index_js_1 = require("../tokenizer/index.js");
5
- const open_element_stack_js_1 = require("./open-element-stack.js");
6
- const formatting_element_list_js_1 = require("./formatting-element-list.js");
7
- const default_js_1 = require("../tree-adapters/default.js");
8
- const doctype = require("../common/doctype.js");
9
- const foreignContent = require("../common/foreign-content.js");
10
- const error_codes_js_1 = require("../common/error-codes.js");
11
- const unicode = require("../common/unicode.js");
12
- const html_js_1 = require("../common/html.js");
13
- const token_js_1 = require("../common/token.js");
14
- //Misc constants
15
- const HIDDEN_INPUT_TYPE = 'hidden';
16
- //Adoption agency loops iteration count
17
- const AA_OUTER_LOOP_ITER = 8;
18
- const AA_INNER_LOOP_ITER = 3;
19
- //Insertion modes
20
- var InsertionMode;
21
- (function (InsertionMode) {
22
- InsertionMode[InsertionMode["INITIAL"] = 0] = "INITIAL";
23
- InsertionMode[InsertionMode["BEFORE_HTML"] = 1] = "BEFORE_HTML";
24
- InsertionMode[InsertionMode["BEFORE_HEAD"] = 2] = "BEFORE_HEAD";
25
- InsertionMode[InsertionMode["IN_HEAD"] = 3] = "IN_HEAD";
26
- InsertionMode[InsertionMode["IN_HEAD_NO_SCRIPT"] = 4] = "IN_HEAD_NO_SCRIPT";
27
- InsertionMode[InsertionMode["AFTER_HEAD"] = 5] = "AFTER_HEAD";
28
- InsertionMode[InsertionMode["IN_BODY"] = 6] = "IN_BODY";
29
- InsertionMode[InsertionMode["TEXT"] = 7] = "TEXT";
30
- InsertionMode[InsertionMode["IN_TABLE"] = 8] = "IN_TABLE";
31
- InsertionMode[InsertionMode["IN_TABLE_TEXT"] = 9] = "IN_TABLE_TEXT";
32
- InsertionMode[InsertionMode["IN_CAPTION"] = 10] = "IN_CAPTION";
33
- InsertionMode[InsertionMode["IN_COLUMN_GROUP"] = 11] = "IN_COLUMN_GROUP";
34
- InsertionMode[InsertionMode["IN_TABLE_BODY"] = 12] = "IN_TABLE_BODY";
35
- InsertionMode[InsertionMode["IN_ROW"] = 13] = "IN_ROW";
36
- InsertionMode[InsertionMode["IN_CELL"] = 14] = "IN_CELL";
37
- InsertionMode[InsertionMode["IN_SELECT"] = 15] = "IN_SELECT";
38
- InsertionMode[InsertionMode["IN_SELECT_IN_TABLE"] = 16] = "IN_SELECT_IN_TABLE";
39
- InsertionMode[InsertionMode["IN_TEMPLATE"] = 17] = "IN_TEMPLATE";
40
- InsertionMode[InsertionMode["AFTER_BODY"] = 18] = "AFTER_BODY";
41
- InsertionMode[InsertionMode["IN_FRAMESET"] = 19] = "IN_FRAMESET";
42
- InsertionMode[InsertionMode["AFTER_FRAMESET"] = 20] = "AFTER_FRAMESET";
43
- InsertionMode[InsertionMode["AFTER_AFTER_BODY"] = 21] = "AFTER_AFTER_BODY";
44
- InsertionMode[InsertionMode["AFTER_AFTER_FRAMESET"] = 22] = "AFTER_AFTER_FRAMESET";
45
- })(InsertionMode || (InsertionMode = {}));
46
- const BASE_LOC = {
47
- startLine: -1,
48
- startCol: -1,
49
- startOffset: -1,
50
- endLine: -1,
51
- endCol: -1,
52
- endOffset: -1,
53
- };
54
- const TABLE_STRUCTURE_TAGS = new Set([html_js_1.TAG_ID.TABLE, html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TR]);
55
- const defaultParserOptions = {
56
- scriptingEnabled: true,
57
- sourceCodeLocationInfo: false,
58
- treeAdapter: default_js_1.defaultTreeAdapter,
59
- onParseError: null,
60
- };
61
- //Parser
62
- class Parser {
63
- constructor(options, document,
64
- /** @internal */
65
- fragmentContext = null,
66
- /** @internal */
67
- scriptHandler = null) {
68
- this.fragmentContext = fragmentContext;
69
- this.scriptHandler = scriptHandler;
70
- this.currentToken = null;
71
- this.stopped = false;
72
- /** @internal */
73
- this.insertionMode = InsertionMode.INITIAL;
74
- /** @internal */
75
- this.originalInsertionMode = InsertionMode.INITIAL;
76
- /** @internal */
77
- this.headElement = null;
78
- /** @internal */
79
- this.formElement = null;
80
- /** Indicates that the current node is not an element in the HTML namespace */
81
- this.currentNotInHTML = false;
82
- /**
83
- * The template insertion mode stack is maintained from the left.
84
- * Ie. the topmost element will always have index 0.
85
- *
86
- * @internal
87
- */
88
- this.tmplInsertionModeStack = [];
89
- /** @internal */
90
- this.pendingCharacterTokens = [];
91
- /** @internal */
92
- this.hasNonWhitespacePendingCharacterToken = false;
93
- /** @internal */
94
- this.framesetOk = true;
95
- /** @internal */
96
- this.skipNextNewLine = false;
97
- /** @internal */
98
- this.fosterParentingEnabled = false;
99
- this.options = Object.assign(Object.assign({}, defaultParserOptions), options);
100
- this.treeAdapter = this.options.treeAdapter;
101
- this.onParseError = this.options.onParseError;
102
- // Always enable location info if we report parse errors.
103
- if (this.onParseError) {
104
- this.options.sourceCodeLocationInfo = true;
105
- }
106
- this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();
107
- this.tokenizer = new index_js_1.Tokenizer(this.options, this);
108
- this.activeFormattingElements = new formatting_element_list_js_1.FormattingElementList(this.treeAdapter);
109
- this.fragmentContextID = fragmentContext ? (0, html_js_1.getTagID)(this.treeAdapter.getTagName(fragmentContext)) : html_js_1.TAG_ID.UNKNOWN;
110
- this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);
111
- this.openElements = new open_element_stack_js_1.OpenElementStack(this.document, this.treeAdapter, this);
112
- }
113
- // API
114
- static parse(html, options) {
115
- const parser = new this(options);
116
- parser.tokenizer.write(html, true);
117
- return parser.document;
118
- }
119
- static getFragmentParser(fragmentContext, options) {
120
- const opts = Object.assign(Object.assign({}, defaultParserOptions), options);
121
- //NOTE: use a <template> element as the fragment context if no context element was provided,
122
- //so we will parse in a "forgiving" manner
123
- fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : (fragmentContext = opts.treeAdapter.createElement(html_js_1.TAG_NAMES.TEMPLATE, html_js_1.NS.HTML, []));
124
- //NOTE: create a fake element which will be used as the `document` for fragment parsing.
125
- //This is important for jsdom, where a new `document` cannot be created. This led to
126
- //fragment parsing messing with the main `document`.
127
- const documentMock = opts.treeAdapter.createElement('documentmock', html_js_1.NS.HTML, []);
128
- const parser = new this(opts, documentMock, fragmentContext);
129
- if (parser.fragmentContextID === html_js_1.TAG_ID.TEMPLATE) {
130
- parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
131
- }
132
- parser._initTokenizerForFragmentParsing();
133
- parser._insertFakeRootElement();
134
- parser._resetInsertionMode();
135
- parser._findFormInFragmentContext();
136
- return parser;
137
- }
138
- getFragment() {
139
- const rootElement = this.treeAdapter.getFirstChild(this.document);
140
- const fragment = this.treeAdapter.createDocumentFragment();
141
- this._adoptNodes(rootElement, fragment);
142
- return fragment;
143
- }
144
- //Errors
145
- /** @internal */
146
- _err(token, code, beforeToken) {
147
- var _a;
148
- if (!this.onParseError)
149
- return;
150
- const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC;
151
- const err = {
152
- code,
153
- startLine: loc.startLine,
154
- startCol: loc.startCol,
155
- startOffset: loc.startOffset,
156
- endLine: beforeToken ? loc.startLine : loc.endLine,
157
- endCol: beforeToken ? loc.startCol : loc.endCol,
158
- endOffset: beforeToken ? loc.startOffset : loc.endOffset,
159
- };
160
- this.onParseError(err);
161
- }
162
- //Stack events
163
- /** @internal */
164
- onItemPush(node, tid, isTop) {
165
- var _a, _b;
166
- (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node);
167
- if (isTop && this.openElements.stackTop > 0)
168
- this._setContextModes(node, tid);
169
- }
170
- /** @internal */
171
- onItemPop(node, isTop) {
172
- var _a, _b;
173
- if (this.options.sourceCodeLocationInfo) {
174
- this._setEndLocation(node, this.currentToken);
175
- }
176
- (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current);
177
- if (isTop) {
178
- let current;
179
- let currentTagId;
180
- if (this.openElements.stackTop === 0 && this.fragmentContext) {
181
- current = this.fragmentContext;
182
- currentTagId = this.fragmentContextID;
183
- }
184
- else {
185
- ({ current, currentTagId } = this.openElements);
186
- }
187
- this._setContextModes(current, currentTagId);
188
- }
189
- }
190
- _setContextModes(current, tid) {
191
- const isHTML = current === this.document || (current && this.treeAdapter.getNamespaceURI(current) === html_js_1.NS.HTML);
192
- this.currentNotInHTML = !isHTML;
193
- this.tokenizer.inForeignNode =
194
- !isHTML && current !== undefined && tid !== undefined && !this._isIntegrationPoint(tid, current);
195
- }
196
- /** @protected */
197
- _switchToTextParsing(currentToken, nextTokenizerState) {
198
- this._insertElement(currentToken, html_js_1.NS.HTML);
199
- this.tokenizer.state = nextTokenizerState;
200
- this.originalInsertionMode = this.insertionMode;
201
- this.insertionMode = InsertionMode.TEXT;
202
- }
203
- switchToPlaintextParsing() {
204
- this.insertionMode = InsertionMode.TEXT;
205
- this.originalInsertionMode = InsertionMode.IN_BODY;
206
- this.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT;
207
- }
208
- //Fragment parsing
209
- /** @protected */
210
- _getAdjustedCurrentElement() {
211
- return this.openElements.stackTop === 0 && this.fragmentContext
212
- ? this.fragmentContext
213
- : this.openElements.current;
214
- }
215
- /** @protected */
216
- _findFormInFragmentContext() {
217
- let node = this.fragmentContext;
218
- while (node) {
219
- if (this.treeAdapter.getTagName(node) === html_js_1.TAG_NAMES.FORM) {
220
- this.formElement = node;
221
- break;
222
- }
223
- node = this.treeAdapter.getParentNode(node);
224
- }
225
- }
226
- _initTokenizerForFragmentParsing() {
227
- if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== html_js_1.NS.HTML) {
228
- return;
229
- }
230
- switch (this.fragmentContextID) {
231
- case html_js_1.TAG_ID.TITLE:
232
- case html_js_1.TAG_ID.TEXTAREA: {
233
- this.tokenizer.state = index_js_1.TokenizerMode.RCDATA;
234
- break;
235
- }
236
- case html_js_1.TAG_ID.STYLE:
237
- case html_js_1.TAG_ID.XMP:
238
- case html_js_1.TAG_ID.IFRAME:
239
- case html_js_1.TAG_ID.NOEMBED:
240
- case html_js_1.TAG_ID.NOFRAMES:
241
- case html_js_1.TAG_ID.NOSCRIPT: {
242
- this.tokenizer.state = index_js_1.TokenizerMode.RAWTEXT;
243
- break;
244
- }
245
- case html_js_1.TAG_ID.SCRIPT: {
246
- this.tokenizer.state = index_js_1.TokenizerMode.SCRIPT_DATA;
247
- break;
248
- }
249
- case html_js_1.TAG_ID.PLAINTEXT: {
250
- this.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT;
251
- break;
252
- }
253
- default:
254
- // Do nothing
255
- }
256
- }
257
- //Tree mutation
258
- /** @protected */
259
- _setDocumentType(token) {
260
- const name = token.name || '';
261
- const publicId = token.publicId || '';
262
- const systemId = token.systemId || '';
263
- this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);
264
- if (token.location) {
265
- const documentChildren = this.treeAdapter.getChildNodes(this.document);
266
- const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node));
267
- if (docTypeNode) {
268
- this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);
269
- }
270
- }
271
- }
272
- /** @protected */
273
- _attachElementToTree(element, location) {
274
- if (this.options.sourceCodeLocationInfo) {
275
- const loc = location && Object.assign(Object.assign({}, location), { startTag: location });
276
- this.treeAdapter.setNodeSourceCodeLocation(element, loc);
277
- }
278
- if (this._shouldFosterParentOnInsertion()) {
279
- this._fosterParentElement(element);
280
- }
281
- else {
282
- const parent = this.openElements.currentTmplContentOrNode;
283
- this.treeAdapter.appendChild(parent !== null && parent !== void 0 ? parent : this.document, element);
284
- }
285
- }
286
- /**
287
- * For self-closing tags. Add an element to the tree, but skip adding it
288
- * to the stack.
289
- */
290
- /** @protected */
291
- _appendElement(token, namespaceURI) {
292
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
293
- this._attachElementToTree(element, token.location);
294
- }
295
- /** @protected */
296
- _insertElement(token, namespaceURI) {
297
- const element = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);
298
- this._attachElementToTree(element, token.location);
299
- this.openElements.push(element, token.tagID);
300
- }
301
- /** @protected */
302
- _insertFakeElement(tagName, tagID) {
303
- const element = this.treeAdapter.createElement(tagName, html_js_1.NS.HTML, []);
304
- this._attachElementToTree(element, null);
305
- this.openElements.push(element, tagID);
306
- }
307
- /** @protected */
308
- _insertTemplate(token) {
309
- const tmpl = this.treeAdapter.createElement(token.tagName, html_js_1.NS.HTML, token.attrs);
310
- const content = this.treeAdapter.createDocumentFragment();
311
- this.treeAdapter.setTemplateContent(tmpl, content);
312
- this._attachElementToTree(tmpl, token.location);
313
- this.openElements.push(tmpl, token.tagID);
314
- if (this.options.sourceCodeLocationInfo)
315
- this.treeAdapter.setNodeSourceCodeLocation(content, null);
316
- }
317
- /** @protected */
318
- _insertFakeRootElement() {
319
- const element = this.treeAdapter.createElement(html_js_1.TAG_NAMES.HTML, html_js_1.NS.HTML, []);
320
- if (this.options.sourceCodeLocationInfo)
321
- this.treeAdapter.setNodeSourceCodeLocation(element, null);
322
- this.treeAdapter.appendChild(this.openElements.current, element);
323
- this.openElements.push(element, html_js_1.TAG_ID.HTML);
324
- }
325
- /** @protected */
326
- _appendCommentNode(token, parent) {
327
- const commentNode = this.treeAdapter.createCommentNode(token.data);
328
- this.treeAdapter.appendChild(parent, commentNode);
329
- if (this.options.sourceCodeLocationInfo) {
330
- this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);
331
- }
332
- }
333
- /** @protected */
334
- _insertCharacters(token) {
335
- let parent;
336
- let beforeElement;
337
- if (this._shouldFosterParentOnInsertion()) {
338
- ({ parent, beforeElement } = this._findFosterParentingLocation());
339
- if (beforeElement) {
340
- this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);
341
- }
342
- else {
343
- this.treeAdapter.insertText(parent, token.chars);
344
- }
345
- }
346
- else {
347
- parent = this.openElements.currentTmplContentOrNode;
348
- this.treeAdapter.insertText(parent, token.chars);
349
- }
350
- if (!token.location)
351
- return;
352
- const siblings = this.treeAdapter.getChildNodes(parent);
353
- const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length;
354
- const textNode = siblings[textNodeIdx - 1];
355
- //NOTE: if we have a location assigned by another token, then just update the end position
356
- const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode);
357
- if (tnLoc) {
358
- const { endLine, endCol, endOffset } = token.location;
359
- this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset });
360
- }
361
- else if (this.options.sourceCodeLocationInfo) {
362
- this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);
363
- }
364
- }
365
- /** @protected */
366
- _adoptNodes(donor, recipient) {
367
- for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {
368
- this.treeAdapter.detachNode(child);
369
- this.treeAdapter.appendChild(recipient, child);
370
- }
371
- }
372
- /** @protected */
373
- _setEndLocation(element, closingToken) {
374
- if (this.treeAdapter.getNodeSourceCodeLocation(element) && closingToken.location) {
375
- const ctLoc = closingToken.location;
376
- const tn = this.treeAdapter.getTagName(element);
377
- const endLoc =
378
- // NOTE: For cases like <p> <p> </p> - First 'p' closes without a closing
379
- // tag and for cases like <td> <p> </td> - 'p' closes without a closing tag.
380
- closingToken.type === token_js_1.TokenType.END_TAG && tn === closingToken.tagName
381
- ? {
382
- endTag: Object.assign({}, ctLoc),
383
- endLine: ctLoc.endLine,
384
- endCol: ctLoc.endCol,
385
- endOffset: ctLoc.endOffset,
386
- }
387
- : {
388
- endLine: ctLoc.startLine,
389
- endCol: ctLoc.startCol,
390
- endOffset: ctLoc.startOffset,
391
- };
392
- this.treeAdapter.updateNodeSourceCodeLocation(element, endLoc);
393
- }
394
- }
395
- //Token processing
396
- shouldProcessStartTagTokenInForeignContent(token) {
397
- // Check that neither current === document, or ns === NS.HTML
398
- if (!this.currentNotInHTML)
399
- return false;
400
- let current;
401
- let currentTagId;
402
- if (this.openElements.stackTop === 0 && this.fragmentContext) {
403
- current = this.fragmentContext;
404
- currentTagId = this.fragmentContextID;
405
- }
406
- else {
407
- ({ current, currentTagId } = this.openElements);
408
- }
409
- if (token.tagID === html_js_1.TAG_ID.SVG &&
410
- this.treeAdapter.getTagName(current) === html_js_1.TAG_NAMES.ANNOTATION_XML &&
411
- this.treeAdapter.getNamespaceURI(current) === html_js_1.NS.MATHML) {
412
- return false;
413
- }
414
- return (
415
- // Check that `current` is not an integration point for HTML or MathML elements.
416
- this.tokenizer.inForeignNode ||
417
- // If it _is_ an integration point, then we might have to check that it is not an HTML
418
- // integration point.
419
- ((token.tagID === html_js_1.TAG_ID.MGLYPH || token.tagID === html_js_1.TAG_ID.MALIGNMARK) &&
420
- currentTagId !== undefined &&
421
- !this._isIntegrationPoint(currentTagId, current, html_js_1.NS.HTML)));
422
- }
423
- /** @protected */
424
- _processToken(token) {
425
- switch (token.type) {
426
- case token_js_1.TokenType.CHARACTER: {
427
- this.onCharacter(token);
428
- break;
429
- }
430
- case token_js_1.TokenType.NULL_CHARACTER: {
431
- this.onNullCharacter(token);
432
- break;
433
- }
434
- case token_js_1.TokenType.COMMENT: {
435
- this.onComment(token);
436
- break;
437
- }
438
- case token_js_1.TokenType.DOCTYPE: {
439
- this.onDoctype(token);
440
- break;
441
- }
442
- case token_js_1.TokenType.START_TAG: {
443
- this._processStartTag(token);
444
- break;
445
- }
446
- case token_js_1.TokenType.END_TAG: {
447
- this.onEndTag(token);
448
- break;
449
- }
450
- case token_js_1.TokenType.EOF: {
451
- this.onEof(token);
452
- break;
453
- }
454
- case token_js_1.TokenType.WHITESPACE_CHARACTER: {
455
- this.onWhitespaceCharacter(token);
456
- break;
457
- }
458
- }
459
- }
460
- //Integration points
461
- /** @protected */
462
- _isIntegrationPoint(tid, element, foreignNS) {
463
- const ns = this.treeAdapter.getNamespaceURI(element);
464
- const attrs = this.treeAdapter.getAttrList(element);
465
- return foreignContent.isIntegrationPoint(tid, ns, attrs, foreignNS);
466
- }
467
- //Active formatting elements reconstruction
468
- /** @protected */
469
- _reconstructActiveFormattingElements() {
470
- const listLength = this.activeFormattingElements.entries.length;
471
- if (listLength) {
472
- const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === formatting_element_list_js_1.EntryType.Marker || this.openElements.contains(entry.element));
473
- const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;
474
- for (let i = unopenIdx; i >= 0; i--) {
475
- const entry = this.activeFormattingElements.entries[i];
476
- this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));
477
- entry.element = this.openElements.current;
478
- }
479
- }
480
- }
481
- //Close elements
482
- /** @protected */
483
- _closeTableCell() {
484
- this.openElements.generateImpliedEndTags();
485
- this.openElements.popUntilTableCellPopped();
486
- this.activeFormattingElements.clearToLastMarker();
487
- this.insertionMode = InsertionMode.IN_ROW;
488
- }
489
- /** @protected */
490
- _closePElement() {
491
- this.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.P);
492
- this.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.P);
493
- }
494
- //Insertion modes
495
- /** @protected */
496
- _resetInsertionMode() {
497
- for (let i = this.openElements.stackTop; i >= 0; i--) {
498
- //Insertion mode reset map
499
- switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {
500
- case html_js_1.TAG_ID.TR: {
501
- this.insertionMode = InsertionMode.IN_ROW;
502
- return;
503
- }
504
- case html_js_1.TAG_ID.TBODY:
505
- case html_js_1.TAG_ID.THEAD:
506
- case html_js_1.TAG_ID.TFOOT: {
507
- this.insertionMode = InsertionMode.IN_TABLE_BODY;
508
- return;
509
- }
510
- case html_js_1.TAG_ID.CAPTION: {
511
- this.insertionMode = InsertionMode.IN_CAPTION;
512
- return;
513
- }
514
- case html_js_1.TAG_ID.COLGROUP: {
515
- this.insertionMode = InsertionMode.IN_COLUMN_GROUP;
516
- return;
517
- }
518
- case html_js_1.TAG_ID.TABLE: {
519
- this.insertionMode = InsertionMode.IN_TABLE;
520
- return;
521
- }
522
- case html_js_1.TAG_ID.BODY: {
523
- this.insertionMode = InsertionMode.IN_BODY;
524
- return;
525
- }
526
- case html_js_1.TAG_ID.FRAMESET: {
527
- this.insertionMode = InsertionMode.IN_FRAMESET;
528
- return;
529
- }
530
- case html_js_1.TAG_ID.SELECT: {
531
- this._resetInsertionModeForSelect(i);
532
- return;
533
- }
534
- case html_js_1.TAG_ID.TEMPLATE: {
535
- this.insertionMode = this.tmplInsertionModeStack[0];
536
- return;
537
- }
538
- case html_js_1.TAG_ID.HTML: {
539
- this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;
540
- return;
541
- }
542
- case html_js_1.TAG_ID.TD:
543
- case html_js_1.TAG_ID.TH: {
544
- if (i > 0) {
545
- this.insertionMode = InsertionMode.IN_CELL;
546
- return;
547
- }
548
- break;
549
- }
550
- case html_js_1.TAG_ID.HEAD: {
551
- if (i > 0) {
552
- this.insertionMode = InsertionMode.IN_HEAD;
553
- return;
554
- }
555
- break;
556
- }
557
- }
558
- }
559
- this.insertionMode = InsertionMode.IN_BODY;
560
- }
561
- /** @protected */
562
- _resetInsertionModeForSelect(selectIdx) {
563
- if (selectIdx > 0) {
564
- for (let i = selectIdx - 1; i > 0; i--) {
565
- const tn = this.openElements.tagIDs[i];
566
- if (tn === html_js_1.TAG_ID.TEMPLATE) {
567
- break;
568
- }
569
- else if (tn === html_js_1.TAG_ID.TABLE) {
570
- this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;
571
- return;
572
- }
573
- }
574
- }
575
- this.insertionMode = InsertionMode.IN_SELECT;
576
- }
577
- //Foster parenting
578
- /** @protected */
579
- _isElementCausesFosterParenting(tn) {
580
- return TABLE_STRUCTURE_TAGS.has(tn);
581
- }
582
- /** @protected */
583
- _shouldFosterParentOnInsertion() {
584
- return (this.fosterParentingEnabled &&
585
- this.openElements.currentTagId !== undefined &&
586
- this._isElementCausesFosterParenting(this.openElements.currentTagId));
587
- }
588
- /** @protected */
589
- _findFosterParentingLocation() {
590
- for (let i = this.openElements.stackTop; i >= 0; i--) {
591
- const openElement = this.openElements.items[i];
592
- switch (this.openElements.tagIDs[i]) {
593
- case html_js_1.TAG_ID.TEMPLATE: {
594
- if (this.treeAdapter.getNamespaceURI(openElement) === html_js_1.NS.HTML) {
595
- return { parent: this.treeAdapter.getTemplateContent(openElement), beforeElement: null };
596
- }
597
- break;
598
- }
599
- case html_js_1.TAG_ID.TABLE: {
600
- const parent = this.treeAdapter.getParentNode(openElement);
601
- if (parent) {
602
- return { parent, beforeElement: openElement };
603
- }
604
- return { parent: this.openElements.items[i - 1], beforeElement: null };
605
- }
606
- default:
607
- // Do nothing
608
- }
609
- }
610
- return { parent: this.openElements.items[0], beforeElement: null };
611
- }
612
- /** @protected */
613
- _fosterParentElement(element) {
614
- const location = this._findFosterParentingLocation();
615
- if (location.beforeElement) {
616
- this.treeAdapter.insertBefore(location.parent, element, location.beforeElement);
617
- }
618
- else {
619
- this.treeAdapter.appendChild(location.parent, element);
620
- }
621
- }
622
- //Special elements
623
- /** @protected */
624
- _isSpecialElement(element, id) {
625
- const ns = this.treeAdapter.getNamespaceURI(element);
626
- return html_js_1.SPECIAL_ELEMENTS[ns].has(id);
627
- }
628
- /** @internal */
629
- onCharacter(token) {
630
- this.skipNextNewLine = false;
631
- if (this.tokenizer.inForeignNode) {
632
- characterInForeignContent(this, token);
633
- return;
634
- }
635
- switch (this.insertionMode) {
636
- case InsertionMode.INITIAL: {
637
- tokenInInitialMode(this, token);
638
- break;
639
- }
640
- case InsertionMode.BEFORE_HTML: {
641
- tokenBeforeHtml(this, token);
642
- break;
643
- }
644
- case InsertionMode.BEFORE_HEAD: {
645
- tokenBeforeHead(this, token);
646
- break;
647
- }
648
- case InsertionMode.IN_HEAD: {
649
- tokenInHead(this, token);
650
- break;
651
- }
652
- case InsertionMode.IN_HEAD_NO_SCRIPT: {
653
- tokenInHeadNoScript(this, token);
654
- break;
655
- }
656
- case InsertionMode.AFTER_HEAD: {
657
- tokenAfterHead(this, token);
658
- break;
659
- }
660
- case InsertionMode.IN_BODY:
661
- case InsertionMode.IN_CAPTION:
662
- case InsertionMode.IN_CELL:
663
- case InsertionMode.IN_TEMPLATE: {
664
- characterInBody(this, token);
665
- break;
666
- }
667
- case InsertionMode.TEXT:
668
- case InsertionMode.IN_SELECT:
669
- case InsertionMode.IN_SELECT_IN_TABLE: {
670
- this._insertCharacters(token);
671
- break;
672
- }
673
- case InsertionMode.IN_TABLE:
674
- case InsertionMode.IN_TABLE_BODY:
675
- case InsertionMode.IN_ROW: {
676
- characterInTable(this, token);
677
- break;
678
- }
679
- case InsertionMode.IN_TABLE_TEXT: {
680
- characterInTableText(this, token);
681
- break;
682
- }
683
- case InsertionMode.IN_COLUMN_GROUP: {
684
- tokenInColumnGroup(this, token);
685
- break;
686
- }
687
- case InsertionMode.AFTER_BODY: {
688
- tokenAfterBody(this, token);
689
- break;
690
- }
691
- case InsertionMode.AFTER_AFTER_BODY: {
692
- tokenAfterAfterBody(this, token);
693
- break;
694
- }
695
- default:
696
- // Do nothing
697
- }
698
- }
699
- /** @internal */
700
- onNullCharacter(token) {
701
- this.skipNextNewLine = false;
702
- if (this.tokenizer.inForeignNode) {
703
- nullCharacterInForeignContent(this, token);
704
- return;
705
- }
706
- switch (this.insertionMode) {
707
- case InsertionMode.INITIAL: {
708
- tokenInInitialMode(this, token);
709
- break;
710
- }
711
- case InsertionMode.BEFORE_HTML: {
712
- tokenBeforeHtml(this, token);
713
- break;
714
- }
715
- case InsertionMode.BEFORE_HEAD: {
716
- tokenBeforeHead(this, token);
717
- break;
718
- }
719
- case InsertionMode.IN_HEAD: {
720
- tokenInHead(this, token);
721
- break;
722
- }
723
- case InsertionMode.IN_HEAD_NO_SCRIPT: {
724
- tokenInHeadNoScript(this, token);
725
- break;
726
- }
727
- case InsertionMode.AFTER_HEAD: {
728
- tokenAfterHead(this, token);
729
- break;
730
- }
731
- case InsertionMode.TEXT: {
732
- this._insertCharacters(token);
733
- break;
734
- }
735
- case InsertionMode.IN_TABLE:
736
- case InsertionMode.IN_TABLE_BODY:
737
- case InsertionMode.IN_ROW: {
738
- characterInTable(this, token);
739
- break;
740
- }
741
- case InsertionMode.IN_COLUMN_GROUP: {
742
- tokenInColumnGroup(this, token);
743
- break;
744
- }
745
- case InsertionMode.AFTER_BODY: {
746
- tokenAfterBody(this, token);
747
- break;
748
- }
749
- case InsertionMode.AFTER_AFTER_BODY: {
750
- tokenAfterAfterBody(this, token);
751
- break;
752
- }
753
- default:
754
- // Do nothing
755
- }
756
- }
757
- /** @internal */
758
- onComment(token) {
759
- this.skipNextNewLine = false;
760
- if (this.currentNotInHTML) {
761
- appendComment(this, token);
762
- return;
763
- }
764
- switch (this.insertionMode) {
765
- case InsertionMode.INITIAL:
766
- case InsertionMode.BEFORE_HTML:
767
- case InsertionMode.BEFORE_HEAD:
768
- case InsertionMode.IN_HEAD:
769
- case InsertionMode.IN_HEAD_NO_SCRIPT:
770
- case InsertionMode.AFTER_HEAD:
771
- case InsertionMode.IN_BODY:
772
- case InsertionMode.IN_TABLE:
773
- case InsertionMode.IN_CAPTION:
774
- case InsertionMode.IN_COLUMN_GROUP:
775
- case InsertionMode.IN_TABLE_BODY:
776
- case InsertionMode.IN_ROW:
777
- case InsertionMode.IN_CELL:
778
- case InsertionMode.IN_SELECT:
779
- case InsertionMode.IN_SELECT_IN_TABLE:
780
- case InsertionMode.IN_TEMPLATE:
781
- case InsertionMode.IN_FRAMESET:
782
- case InsertionMode.AFTER_FRAMESET: {
783
- appendComment(this, token);
784
- break;
785
- }
786
- case InsertionMode.IN_TABLE_TEXT: {
787
- tokenInTableText(this, token);
788
- break;
789
- }
790
- case InsertionMode.AFTER_BODY: {
791
- appendCommentToRootHtmlElement(this, token);
792
- break;
793
- }
794
- case InsertionMode.AFTER_AFTER_BODY:
795
- case InsertionMode.AFTER_AFTER_FRAMESET: {
796
- appendCommentToDocument(this, token);
797
- break;
798
- }
799
- default:
800
- // Do nothing
801
- }
802
- }
803
- /** @internal */
804
- onDoctype(token) {
805
- this.skipNextNewLine = false;
806
- switch (this.insertionMode) {
807
- case InsertionMode.INITIAL: {
808
- doctypeInInitialMode(this, token);
809
- break;
810
- }
811
- case InsertionMode.BEFORE_HEAD:
812
- case InsertionMode.IN_HEAD:
813
- case InsertionMode.IN_HEAD_NO_SCRIPT:
814
- case InsertionMode.AFTER_HEAD: {
815
- this._err(token, error_codes_js_1.ERR.misplacedDoctype);
816
- break;
817
- }
818
- case InsertionMode.IN_TABLE_TEXT: {
819
- tokenInTableText(this, token);
820
- break;
821
- }
822
- default:
823
- // Do nothing
824
- }
825
- }
826
- /** @internal */
827
- onStartTag(token) {
828
- this.skipNextNewLine = false;
829
- this.currentToken = token;
830
- this._processStartTag(token);
831
- if (token.selfClosing && !token.ackSelfClosing) {
832
- this._err(token, error_codes_js_1.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);
833
- }
834
- }
835
- /**
836
- * Processes a given start tag.
837
- *
838
- * `onStartTag` checks if a self-closing tag was recognized. When a token
839
- * is moved inbetween multiple insertion modes, this check for self-closing
840
- * could lead to false positives. To avoid this, `_processStartTag` is used
841
- * for nested calls.
842
- *
843
- * @param token The token to process.
844
- * @protected
845
- */
846
- _processStartTag(token) {
847
- if (this.shouldProcessStartTagTokenInForeignContent(token)) {
848
- startTagInForeignContent(this, token);
849
- }
850
- else {
851
- this._startTagOutsideForeignContent(token);
852
- }
853
- }
854
- /** @protected */
855
- _startTagOutsideForeignContent(token) {
856
- switch (this.insertionMode) {
857
- case InsertionMode.INITIAL: {
858
- tokenInInitialMode(this, token);
859
- break;
860
- }
861
- case InsertionMode.BEFORE_HTML: {
862
- startTagBeforeHtml(this, token);
863
- break;
864
- }
865
- case InsertionMode.BEFORE_HEAD: {
866
- startTagBeforeHead(this, token);
867
- break;
868
- }
869
- case InsertionMode.IN_HEAD: {
870
- startTagInHead(this, token);
871
- break;
872
- }
873
- case InsertionMode.IN_HEAD_NO_SCRIPT: {
874
- startTagInHeadNoScript(this, token);
875
- break;
876
- }
877
- case InsertionMode.AFTER_HEAD: {
878
- startTagAfterHead(this, token);
879
- break;
880
- }
881
- case InsertionMode.IN_BODY: {
882
- startTagInBody(this, token);
883
- break;
884
- }
885
- case InsertionMode.IN_TABLE: {
886
- startTagInTable(this, token);
887
- break;
888
- }
889
- case InsertionMode.IN_TABLE_TEXT: {
890
- tokenInTableText(this, token);
891
- break;
892
- }
893
- case InsertionMode.IN_CAPTION: {
894
- startTagInCaption(this, token);
895
- break;
896
- }
897
- case InsertionMode.IN_COLUMN_GROUP: {
898
- startTagInColumnGroup(this, token);
899
- break;
900
- }
901
- case InsertionMode.IN_TABLE_BODY: {
902
- startTagInTableBody(this, token);
903
- break;
904
- }
905
- case InsertionMode.IN_ROW: {
906
- startTagInRow(this, token);
907
- break;
908
- }
909
- case InsertionMode.IN_CELL: {
910
- startTagInCell(this, token);
911
- break;
912
- }
913
- case InsertionMode.IN_SELECT: {
914
- startTagInSelect(this, token);
915
- break;
916
- }
917
- case InsertionMode.IN_SELECT_IN_TABLE: {
918
- startTagInSelectInTable(this, token);
919
- break;
920
- }
921
- case InsertionMode.IN_TEMPLATE: {
922
- startTagInTemplate(this, token);
923
- break;
924
- }
925
- case InsertionMode.AFTER_BODY: {
926
- startTagAfterBody(this, token);
927
- break;
928
- }
929
- case InsertionMode.IN_FRAMESET: {
930
- startTagInFrameset(this, token);
931
- break;
932
- }
933
- case InsertionMode.AFTER_FRAMESET: {
934
- startTagAfterFrameset(this, token);
935
- break;
936
- }
937
- case InsertionMode.AFTER_AFTER_BODY: {
938
- startTagAfterAfterBody(this, token);
939
- break;
940
- }
941
- case InsertionMode.AFTER_AFTER_FRAMESET: {
942
- startTagAfterAfterFrameset(this, token);
943
- break;
944
- }
945
- default:
946
- // Do nothing
947
- }
948
- }
949
- /** @internal */
950
- onEndTag(token) {
951
- this.skipNextNewLine = false;
952
- this.currentToken = token;
953
- if (this.currentNotInHTML) {
954
- endTagInForeignContent(this, token);
955
- }
956
- else {
957
- this._endTagOutsideForeignContent(token);
958
- }
959
- }
960
- /** @protected */
961
- _endTagOutsideForeignContent(token) {
962
- switch (this.insertionMode) {
963
- case InsertionMode.INITIAL: {
964
- tokenInInitialMode(this, token);
965
- break;
966
- }
967
- case InsertionMode.BEFORE_HTML: {
968
- endTagBeforeHtml(this, token);
969
- break;
970
- }
971
- case InsertionMode.BEFORE_HEAD: {
972
- endTagBeforeHead(this, token);
973
- break;
974
- }
975
- case InsertionMode.IN_HEAD: {
976
- endTagInHead(this, token);
977
- break;
978
- }
979
- case InsertionMode.IN_HEAD_NO_SCRIPT: {
980
- endTagInHeadNoScript(this, token);
981
- break;
982
- }
983
- case InsertionMode.AFTER_HEAD: {
984
- endTagAfterHead(this, token);
985
- break;
986
- }
987
- case InsertionMode.IN_BODY: {
988
- endTagInBody(this, token);
989
- break;
990
- }
991
- case InsertionMode.TEXT: {
992
- endTagInText(this, token);
993
- break;
994
- }
995
- case InsertionMode.IN_TABLE: {
996
- endTagInTable(this, token);
997
- break;
998
- }
999
- case InsertionMode.IN_TABLE_TEXT: {
1000
- tokenInTableText(this, token);
1001
- break;
1002
- }
1003
- case InsertionMode.IN_CAPTION: {
1004
- endTagInCaption(this, token);
1005
- break;
1006
- }
1007
- case InsertionMode.IN_COLUMN_GROUP: {
1008
- endTagInColumnGroup(this, token);
1009
- break;
1010
- }
1011
- case InsertionMode.IN_TABLE_BODY: {
1012
- endTagInTableBody(this, token);
1013
- break;
1014
- }
1015
- case InsertionMode.IN_ROW: {
1016
- endTagInRow(this, token);
1017
- break;
1018
- }
1019
- case InsertionMode.IN_CELL: {
1020
- endTagInCell(this, token);
1021
- break;
1022
- }
1023
- case InsertionMode.IN_SELECT: {
1024
- endTagInSelect(this, token);
1025
- break;
1026
- }
1027
- case InsertionMode.IN_SELECT_IN_TABLE: {
1028
- endTagInSelectInTable(this, token);
1029
- break;
1030
- }
1031
- case InsertionMode.IN_TEMPLATE: {
1032
- endTagInTemplate(this, token);
1033
- break;
1034
- }
1035
- case InsertionMode.AFTER_BODY: {
1036
- endTagAfterBody(this, token);
1037
- break;
1038
- }
1039
- case InsertionMode.IN_FRAMESET: {
1040
- endTagInFrameset(this, token);
1041
- break;
1042
- }
1043
- case InsertionMode.AFTER_FRAMESET: {
1044
- endTagAfterFrameset(this, token);
1045
- break;
1046
- }
1047
- case InsertionMode.AFTER_AFTER_BODY: {
1048
- tokenAfterAfterBody(this, token);
1049
- break;
1050
- }
1051
- default:
1052
- // Do nothing
1053
- }
1054
- }
1055
- /** @internal */
1056
- onEof(token) {
1057
- switch (this.insertionMode) {
1058
- case InsertionMode.INITIAL: {
1059
- tokenInInitialMode(this, token);
1060
- break;
1061
- }
1062
- case InsertionMode.BEFORE_HTML: {
1063
- tokenBeforeHtml(this, token);
1064
- break;
1065
- }
1066
- case InsertionMode.BEFORE_HEAD: {
1067
- tokenBeforeHead(this, token);
1068
- break;
1069
- }
1070
- case InsertionMode.IN_HEAD: {
1071
- tokenInHead(this, token);
1072
- break;
1073
- }
1074
- case InsertionMode.IN_HEAD_NO_SCRIPT: {
1075
- tokenInHeadNoScript(this, token);
1076
- break;
1077
- }
1078
- case InsertionMode.AFTER_HEAD: {
1079
- tokenAfterHead(this, token);
1080
- break;
1081
- }
1082
- case InsertionMode.IN_BODY:
1083
- case InsertionMode.IN_TABLE:
1084
- case InsertionMode.IN_CAPTION:
1085
- case InsertionMode.IN_COLUMN_GROUP:
1086
- case InsertionMode.IN_TABLE_BODY:
1087
- case InsertionMode.IN_ROW:
1088
- case InsertionMode.IN_CELL:
1089
- case InsertionMode.IN_SELECT:
1090
- case InsertionMode.IN_SELECT_IN_TABLE: {
1091
- eofInBody(this, token);
1092
- break;
1093
- }
1094
- case InsertionMode.TEXT: {
1095
- eofInText(this, token);
1096
- break;
1097
- }
1098
- case InsertionMode.IN_TABLE_TEXT: {
1099
- tokenInTableText(this, token);
1100
- break;
1101
- }
1102
- case InsertionMode.IN_TEMPLATE: {
1103
- eofInTemplate(this, token);
1104
- break;
1105
- }
1106
- case InsertionMode.AFTER_BODY:
1107
- case InsertionMode.IN_FRAMESET:
1108
- case InsertionMode.AFTER_FRAMESET:
1109
- case InsertionMode.AFTER_AFTER_BODY:
1110
- case InsertionMode.AFTER_AFTER_FRAMESET: {
1111
- stopParsing(this, token);
1112
- break;
1113
- }
1114
- default:
1115
- // Do nothing
1116
- }
1117
- }
1118
- /** @internal */
1119
- onWhitespaceCharacter(token) {
1120
- if (this.skipNextNewLine) {
1121
- this.skipNextNewLine = false;
1122
- if (token.chars.charCodeAt(0) === unicode.CODE_POINTS.LINE_FEED) {
1123
- if (token.chars.length === 1) {
1124
- return;
1125
- }
1126
- token.chars = token.chars.substr(1);
1127
- }
1128
- }
1129
- if (this.tokenizer.inForeignNode) {
1130
- this._insertCharacters(token);
1131
- return;
1132
- }
1133
- switch (this.insertionMode) {
1134
- case InsertionMode.IN_HEAD:
1135
- case InsertionMode.IN_HEAD_NO_SCRIPT:
1136
- case InsertionMode.AFTER_HEAD:
1137
- case InsertionMode.TEXT:
1138
- case InsertionMode.IN_COLUMN_GROUP:
1139
- case InsertionMode.IN_SELECT:
1140
- case InsertionMode.IN_SELECT_IN_TABLE:
1141
- case InsertionMode.IN_FRAMESET:
1142
- case InsertionMode.AFTER_FRAMESET: {
1143
- this._insertCharacters(token);
1144
- break;
1145
- }
1146
- case InsertionMode.IN_BODY:
1147
- case InsertionMode.IN_CAPTION:
1148
- case InsertionMode.IN_CELL:
1149
- case InsertionMode.IN_TEMPLATE:
1150
- case InsertionMode.AFTER_BODY:
1151
- case InsertionMode.AFTER_AFTER_BODY:
1152
- case InsertionMode.AFTER_AFTER_FRAMESET: {
1153
- whitespaceCharacterInBody(this, token);
1154
- break;
1155
- }
1156
- case InsertionMode.IN_TABLE:
1157
- case InsertionMode.IN_TABLE_BODY:
1158
- case InsertionMode.IN_ROW: {
1159
- characterInTable(this, token);
1160
- break;
1161
- }
1162
- case InsertionMode.IN_TABLE_TEXT: {
1163
- whitespaceCharacterInTableText(this, token);
1164
- break;
1165
- }
1166
- default:
1167
- // Do nothing
1168
- }
1169
- }
1170
- }
1171
- exports.Parser = Parser;
1172
- //Adoption agency algorithm
1173
- //(see: http://www.whatwg.org/specs/web-apps/current-work/multipage/tree-construction.html#adoptionAgency)
1174
- //------------------------------------------------------------------
1175
- //Steps 5-8 of the algorithm
1176
- function aaObtainFormattingElementEntry(p, token) {
1177
- let formattingElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);
1178
- if (formattingElementEntry) {
1179
- if (!p.openElements.contains(formattingElementEntry.element)) {
1180
- p.activeFormattingElements.removeEntry(formattingElementEntry);
1181
- formattingElementEntry = null;
1182
- }
1183
- else if (!p.openElements.hasInScope(token.tagID)) {
1184
- formattingElementEntry = null;
1185
- }
1186
- }
1187
- else {
1188
- genericEndTagInBody(p, token);
1189
- }
1190
- return formattingElementEntry;
1191
- }
1192
- //Steps 9 and 10 of the algorithm
1193
- function aaObtainFurthestBlock(p, formattingElementEntry) {
1194
- let furthestBlock = null;
1195
- let idx = p.openElements.stackTop;
1196
- for (; idx >= 0; idx--) {
1197
- const element = p.openElements.items[idx];
1198
- if (element === formattingElementEntry.element) {
1199
- break;
1200
- }
1201
- if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) {
1202
- furthestBlock = element;
1203
- }
1204
- }
1205
- if (!furthestBlock) {
1206
- p.openElements.shortenToLength(Math.max(idx, 0));
1207
- p.activeFormattingElements.removeEntry(formattingElementEntry);
1208
- }
1209
- return furthestBlock;
1210
- }
1211
- //Step 13 of the algorithm
1212
- function aaInnerLoop(p, furthestBlock, formattingElement) {
1213
- let lastElement = furthestBlock;
1214
- let nextElement = p.openElements.getCommonAncestor(furthestBlock);
1215
- for (let i = 0, element = nextElement; element !== formattingElement; i++, element = nextElement) {
1216
- //NOTE: store the next element for the next loop iteration (it may be deleted from the stack by step 9.5)
1217
- nextElement = p.openElements.getCommonAncestor(element);
1218
- const elementEntry = p.activeFormattingElements.getElementEntry(element);
1219
- const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;
1220
- const shouldRemoveFromOpenElements = !elementEntry || counterOverflow;
1221
- if (shouldRemoveFromOpenElements) {
1222
- if (counterOverflow) {
1223
- p.activeFormattingElements.removeEntry(elementEntry);
1224
- }
1225
- p.openElements.remove(element);
1226
- }
1227
- else {
1228
- element = aaRecreateElementFromEntry(p, elementEntry);
1229
- if (lastElement === furthestBlock) {
1230
- p.activeFormattingElements.bookmark = elementEntry;
1231
- }
1232
- p.treeAdapter.detachNode(lastElement);
1233
- p.treeAdapter.appendChild(element, lastElement);
1234
- lastElement = element;
1235
- }
1236
- }
1237
- return lastElement;
1238
- }
1239
- //Step 13.7 of the algorithm
1240
- function aaRecreateElementFromEntry(p, elementEntry) {
1241
- const ns = p.treeAdapter.getNamespaceURI(elementEntry.element);
1242
- const newElement = p.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);
1243
- p.openElements.replace(elementEntry.element, newElement);
1244
- elementEntry.element = newElement;
1245
- return newElement;
1246
- }
1247
- //Step 14 of the algorithm
1248
- function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) {
1249
- const tn = p.treeAdapter.getTagName(commonAncestor);
1250
- const tid = (0, html_js_1.getTagID)(tn);
1251
- if (p._isElementCausesFosterParenting(tid)) {
1252
- p._fosterParentElement(lastElement);
1253
- }
1254
- else {
1255
- const ns = p.treeAdapter.getNamespaceURI(commonAncestor);
1256
- if (tid === html_js_1.TAG_ID.TEMPLATE && ns === html_js_1.NS.HTML) {
1257
- commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor);
1258
- }
1259
- p.treeAdapter.appendChild(commonAncestor, lastElement);
1260
- }
1261
- }
1262
- //Steps 15-19 of the algorithm
1263
- function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) {
1264
- const ns = p.treeAdapter.getNamespaceURI(formattingElementEntry.element);
1265
- const { token } = formattingElementEntry;
1266
- const newElement = p.treeAdapter.createElement(token.tagName, ns, token.attrs);
1267
- p._adoptNodes(furthestBlock, newElement);
1268
- p.treeAdapter.appendChild(furthestBlock, newElement);
1269
- p.activeFormattingElements.insertElementAfterBookmark(newElement, token);
1270
- p.activeFormattingElements.removeEntry(formattingElementEntry);
1271
- p.openElements.remove(formattingElementEntry.element);
1272
- p.openElements.insertAfter(furthestBlock, newElement, token.tagID);
1273
- }
1274
- //Algorithm entry point
1275
- function callAdoptionAgency(p, token) {
1276
- for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {
1277
- const formattingElementEntry = aaObtainFormattingElementEntry(p, token);
1278
- if (!formattingElementEntry) {
1279
- break;
1280
- }
1281
- const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry);
1282
- if (!furthestBlock) {
1283
- break;
1284
- }
1285
- p.activeFormattingElements.bookmark = formattingElementEntry;
1286
- const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element);
1287
- const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element);
1288
- p.treeAdapter.detachNode(lastElement);
1289
- if (commonAncestor)
1290
- aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement);
1291
- aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry);
1292
- }
1293
- }
1294
- //Generic token handlers
1295
- //------------------------------------------------------------------
1296
- function appendComment(p, token) {
1297
- p._appendCommentNode(token, p.openElements.currentTmplContentOrNode);
1298
- }
1299
- function appendCommentToRootHtmlElement(p, token) {
1300
- p._appendCommentNode(token, p.openElements.items[0]);
1301
- }
1302
- function appendCommentToDocument(p, token) {
1303
- p._appendCommentNode(token, p.document);
1304
- }
1305
- function stopParsing(p, token) {
1306
- p.stopped = true;
1307
- // NOTE: Set end locations for elements that remain on the open element stack.
1308
- if (token.location) {
1309
- // NOTE: If we are not in a fragment, `html` and `body` will stay on the stack.
1310
- // This is a problem, as we might overwrite their end position here.
1311
- const target = p.fragmentContext ? 0 : 2;
1312
- for (let i = p.openElements.stackTop; i >= target; i--) {
1313
- p._setEndLocation(p.openElements.items[i], token);
1314
- }
1315
- // Handle `html` and `body`
1316
- if (!p.fragmentContext && p.openElements.stackTop >= 0) {
1317
- const htmlElement = p.openElements.items[0];
1318
- const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement);
1319
- if (htmlLocation && !htmlLocation.endTag) {
1320
- p._setEndLocation(htmlElement, token);
1321
- if (p.openElements.stackTop >= 1) {
1322
- const bodyElement = p.openElements.items[1];
1323
- const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement);
1324
- if (bodyLocation && !bodyLocation.endTag) {
1325
- p._setEndLocation(bodyElement, token);
1326
- }
1327
- }
1328
- }
1329
- }
1330
- }
1331
- }
1332
- // The "initial" insertion mode
1333
- //------------------------------------------------------------------
1334
- function doctypeInInitialMode(p, token) {
1335
- p._setDocumentType(token);
1336
- const mode = token.forceQuirks ? html_js_1.DOCUMENT_MODE.QUIRKS : doctype.getDocumentMode(token);
1337
- if (!doctype.isConforming(token)) {
1338
- p._err(token, error_codes_js_1.ERR.nonConformingDoctype);
1339
- }
1340
- p.treeAdapter.setDocumentMode(p.document, mode);
1341
- p.insertionMode = InsertionMode.BEFORE_HTML;
1342
- }
1343
- function tokenInInitialMode(p, token) {
1344
- p._err(token, error_codes_js_1.ERR.missingDoctype, true);
1345
- p.treeAdapter.setDocumentMode(p.document, html_js_1.DOCUMENT_MODE.QUIRKS);
1346
- p.insertionMode = InsertionMode.BEFORE_HTML;
1347
- p._processToken(token);
1348
- }
1349
- // The "before html" insertion mode
1350
- //------------------------------------------------------------------
1351
- function startTagBeforeHtml(p, token) {
1352
- if (token.tagID === html_js_1.TAG_ID.HTML) {
1353
- p._insertElement(token, html_js_1.NS.HTML);
1354
- p.insertionMode = InsertionMode.BEFORE_HEAD;
1355
- }
1356
- else {
1357
- tokenBeforeHtml(p, token);
1358
- }
1359
- }
1360
- function endTagBeforeHtml(p, token) {
1361
- const tn = token.tagID;
1362
- if (tn === html_js_1.TAG_ID.HTML || tn === html_js_1.TAG_ID.HEAD || tn === html_js_1.TAG_ID.BODY || tn === html_js_1.TAG_ID.BR) {
1363
- tokenBeforeHtml(p, token);
1364
- }
1365
- }
1366
- function tokenBeforeHtml(p, token) {
1367
- p._insertFakeRootElement();
1368
- p.insertionMode = InsertionMode.BEFORE_HEAD;
1369
- p._processToken(token);
1370
- }
1371
- // The "before head" insertion mode
1372
- //------------------------------------------------------------------
1373
- function startTagBeforeHead(p, token) {
1374
- switch (token.tagID) {
1375
- case html_js_1.TAG_ID.HTML: {
1376
- startTagInBody(p, token);
1377
- break;
1378
- }
1379
- case html_js_1.TAG_ID.HEAD: {
1380
- p._insertElement(token, html_js_1.NS.HTML);
1381
- p.headElement = p.openElements.current;
1382
- p.insertionMode = InsertionMode.IN_HEAD;
1383
- break;
1384
- }
1385
- default: {
1386
- tokenBeforeHead(p, token);
1387
- }
1388
- }
1389
- }
1390
- function endTagBeforeHead(p, token) {
1391
- const tn = token.tagID;
1392
- if (tn === html_js_1.TAG_ID.HEAD || tn === html_js_1.TAG_ID.BODY || tn === html_js_1.TAG_ID.HTML || tn === html_js_1.TAG_ID.BR) {
1393
- tokenBeforeHead(p, token);
1394
- }
1395
- else {
1396
- p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement);
1397
- }
1398
- }
1399
- function tokenBeforeHead(p, token) {
1400
- p._insertFakeElement(html_js_1.TAG_NAMES.HEAD, html_js_1.TAG_ID.HEAD);
1401
- p.headElement = p.openElements.current;
1402
- p.insertionMode = InsertionMode.IN_HEAD;
1403
- p._processToken(token);
1404
- }
1405
- // The "in head" insertion mode
1406
- //------------------------------------------------------------------
1407
- function startTagInHead(p, token) {
1408
- switch (token.tagID) {
1409
- case html_js_1.TAG_ID.HTML: {
1410
- startTagInBody(p, token);
1411
- break;
1412
- }
1413
- case html_js_1.TAG_ID.BASE:
1414
- case html_js_1.TAG_ID.BASEFONT:
1415
- case html_js_1.TAG_ID.BGSOUND:
1416
- case html_js_1.TAG_ID.LINK:
1417
- case html_js_1.TAG_ID.META: {
1418
- p._appendElement(token, html_js_1.NS.HTML);
1419
- token.ackSelfClosing = true;
1420
- break;
1421
- }
1422
- case html_js_1.TAG_ID.TITLE: {
1423
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RCDATA);
1424
- break;
1425
- }
1426
- case html_js_1.TAG_ID.NOSCRIPT: {
1427
- if (p.options.scriptingEnabled) {
1428
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT);
1429
- }
1430
- else {
1431
- p._insertElement(token, html_js_1.NS.HTML);
1432
- p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;
1433
- }
1434
- break;
1435
- }
1436
- case html_js_1.TAG_ID.NOFRAMES:
1437
- case html_js_1.TAG_ID.STYLE: {
1438
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT);
1439
- break;
1440
- }
1441
- case html_js_1.TAG_ID.SCRIPT: {
1442
- p._switchToTextParsing(token, index_js_1.TokenizerMode.SCRIPT_DATA);
1443
- break;
1444
- }
1445
- case html_js_1.TAG_ID.TEMPLATE: {
1446
- p._insertTemplate(token);
1447
- p.activeFormattingElements.insertMarker();
1448
- p.framesetOk = false;
1449
- p.insertionMode = InsertionMode.IN_TEMPLATE;
1450
- p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);
1451
- break;
1452
- }
1453
- case html_js_1.TAG_ID.HEAD: {
1454
- p._err(token, error_codes_js_1.ERR.misplacedStartTagForHeadElement);
1455
- break;
1456
- }
1457
- default: {
1458
- tokenInHead(p, token);
1459
- }
1460
- }
1461
- }
1462
- function endTagInHead(p, token) {
1463
- switch (token.tagID) {
1464
- case html_js_1.TAG_ID.HEAD: {
1465
- p.openElements.pop();
1466
- p.insertionMode = InsertionMode.AFTER_HEAD;
1467
- break;
1468
- }
1469
- case html_js_1.TAG_ID.BODY:
1470
- case html_js_1.TAG_ID.BR:
1471
- case html_js_1.TAG_ID.HTML: {
1472
- tokenInHead(p, token);
1473
- break;
1474
- }
1475
- case html_js_1.TAG_ID.TEMPLATE: {
1476
- templateEndTagInHead(p, token);
1477
- break;
1478
- }
1479
- default: {
1480
- p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement);
1481
- }
1482
- }
1483
- }
1484
- function templateEndTagInHead(p, token) {
1485
- if (p.openElements.tmplCount > 0) {
1486
- p.openElements.generateImpliedEndTagsThoroughly();
1487
- if (p.openElements.currentTagId !== html_js_1.TAG_ID.TEMPLATE) {
1488
- p._err(token, error_codes_js_1.ERR.closingOfElementWithOpenChildElements);
1489
- }
1490
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TEMPLATE);
1491
- p.activeFormattingElements.clearToLastMarker();
1492
- p.tmplInsertionModeStack.shift();
1493
- p._resetInsertionMode();
1494
- }
1495
- else {
1496
- p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement);
1497
- }
1498
- }
1499
- function tokenInHead(p, token) {
1500
- p.openElements.pop();
1501
- p.insertionMode = InsertionMode.AFTER_HEAD;
1502
- p._processToken(token);
1503
- }
1504
- // The "in head no script" insertion mode
1505
- //------------------------------------------------------------------
1506
- function startTagInHeadNoScript(p, token) {
1507
- switch (token.tagID) {
1508
- case html_js_1.TAG_ID.HTML: {
1509
- startTagInBody(p, token);
1510
- break;
1511
- }
1512
- case html_js_1.TAG_ID.BASEFONT:
1513
- case html_js_1.TAG_ID.BGSOUND:
1514
- case html_js_1.TAG_ID.HEAD:
1515
- case html_js_1.TAG_ID.LINK:
1516
- case html_js_1.TAG_ID.META:
1517
- case html_js_1.TAG_ID.NOFRAMES:
1518
- case html_js_1.TAG_ID.STYLE: {
1519
- startTagInHead(p, token);
1520
- break;
1521
- }
1522
- case html_js_1.TAG_ID.NOSCRIPT: {
1523
- p._err(token, error_codes_js_1.ERR.nestedNoscriptInHead);
1524
- break;
1525
- }
1526
- default: {
1527
- tokenInHeadNoScript(p, token);
1528
- }
1529
- }
1530
- }
1531
- function endTagInHeadNoScript(p, token) {
1532
- switch (token.tagID) {
1533
- case html_js_1.TAG_ID.NOSCRIPT: {
1534
- p.openElements.pop();
1535
- p.insertionMode = InsertionMode.IN_HEAD;
1536
- break;
1537
- }
1538
- case html_js_1.TAG_ID.BR: {
1539
- tokenInHeadNoScript(p, token);
1540
- break;
1541
- }
1542
- default: {
1543
- p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement);
1544
- }
1545
- }
1546
- }
1547
- function tokenInHeadNoScript(p, token) {
1548
- const errCode = token.type === token_js_1.TokenType.EOF ? error_codes_js_1.ERR.openElementsLeftAfterEof : error_codes_js_1.ERR.disallowedContentInNoscriptInHead;
1549
- p._err(token, errCode);
1550
- p.openElements.pop();
1551
- p.insertionMode = InsertionMode.IN_HEAD;
1552
- p._processToken(token);
1553
- }
1554
- // The "after head" insertion mode
1555
- //------------------------------------------------------------------
1556
- function startTagAfterHead(p, token) {
1557
- switch (token.tagID) {
1558
- case html_js_1.TAG_ID.HTML: {
1559
- startTagInBody(p, token);
1560
- break;
1561
- }
1562
- case html_js_1.TAG_ID.BODY: {
1563
- p._insertElement(token, html_js_1.NS.HTML);
1564
- p.framesetOk = false;
1565
- p.insertionMode = InsertionMode.IN_BODY;
1566
- break;
1567
- }
1568
- case html_js_1.TAG_ID.FRAMESET: {
1569
- p._insertElement(token, html_js_1.NS.HTML);
1570
- p.insertionMode = InsertionMode.IN_FRAMESET;
1571
- break;
1572
- }
1573
- case html_js_1.TAG_ID.BASE:
1574
- case html_js_1.TAG_ID.BASEFONT:
1575
- case html_js_1.TAG_ID.BGSOUND:
1576
- case html_js_1.TAG_ID.LINK:
1577
- case html_js_1.TAG_ID.META:
1578
- case html_js_1.TAG_ID.NOFRAMES:
1579
- case html_js_1.TAG_ID.SCRIPT:
1580
- case html_js_1.TAG_ID.STYLE:
1581
- case html_js_1.TAG_ID.TEMPLATE:
1582
- case html_js_1.TAG_ID.TITLE: {
1583
- p._err(token, error_codes_js_1.ERR.abandonedHeadElementChild);
1584
- p.openElements.push(p.headElement, html_js_1.TAG_ID.HEAD);
1585
- startTagInHead(p, token);
1586
- p.openElements.remove(p.headElement);
1587
- break;
1588
- }
1589
- case html_js_1.TAG_ID.HEAD: {
1590
- p._err(token, error_codes_js_1.ERR.misplacedStartTagForHeadElement);
1591
- break;
1592
- }
1593
- default: {
1594
- tokenAfterHead(p, token);
1595
- }
1596
- }
1597
- }
1598
- function endTagAfterHead(p, token) {
1599
- switch (token.tagID) {
1600
- case html_js_1.TAG_ID.BODY:
1601
- case html_js_1.TAG_ID.HTML:
1602
- case html_js_1.TAG_ID.BR: {
1603
- tokenAfterHead(p, token);
1604
- break;
1605
- }
1606
- case html_js_1.TAG_ID.TEMPLATE: {
1607
- templateEndTagInHead(p, token);
1608
- break;
1609
- }
1610
- default: {
1611
- p._err(token, error_codes_js_1.ERR.endTagWithoutMatchingOpenElement);
1612
- }
1613
- }
1614
- }
1615
- function tokenAfterHead(p, token) {
1616
- p._insertFakeElement(html_js_1.TAG_NAMES.BODY, html_js_1.TAG_ID.BODY);
1617
- p.insertionMode = InsertionMode.IN_BODY;
1618
- modeInBody(p, token);
1619
- }
1620
- // The "in body" insertion mode
1621
- //------------------------------------------------------------------
1622
- function modeInBody(p, token) {
1623
- switch (token.type) {
1624
- case token_js_1.TokenType.CHARACTER: {
1625
- characterInBody(p, token);
1626
- break;
1627
- }
1628
- case token_js_1.TokenType.WHITESPACE_CHARACTER: {
1629
- whitespaceCharacterInBody(p, token);
1630
- break;
1631
- }
1632
- case token_js_1.TokenType.COMMENT: {
1633
- appendComment(p, token);
1634
- break;
1635
- }
1636
- case token_js_1.TokenType.START_TAG: {
1637
- startTagInBody(p, token);
1638
- break;
1639
- }
1640
- case token_js_1.TokenType.END_TAG: {
1641
- endTagInBody(p, token);
1642
- break;
1643
- }
1644
- case token_js_1.TokenType.EOF: {
1645
- eofInBody(p, token);
1646
- break;
1647
- }
1648
- default:
1649
- // Do nothing
1650
- }
1651
- }
1652
- function whitespaceCharacterInBody(p, token) {
1653
- p._reconstructActiveFormattingElements();
1654
- p._insertCharacters(token);
1655
- }
1656
- function characterInBody(p, token) {
1657
- p._reconstructActiveFormattingElements();
1658
- p._insertCharacters(token);
1659
- p.framesetOk = false;
1660
- }
1661
- function htmlStartTagInBody(p, token) {
1662
- if (p.openElements.tmplCount === 0) {
1663
- p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs);
1664
- }
1665
- }
1666
- function bodyStartTagInBody(p, token) {
1667
- const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
1668
- if (bodyElement && p.openElements.tmplCount === 0) {
1669
- p.framesetOk = false;
1670
- p.treeAdapter.adoptAttributes(bodyElement, token.attrs);
1671
- }
1672
- }
1673
- function framesetStartTagInBody(p, token) {
1674
- const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
1675
- if (p.framesetOk && bodyElement) {
1676
- p.treeAdapter.detachNode(bodyElement);
1677
- p.openElements.popAllUpToHtmlElement();
1678
- p._insertElement(token, html_js_1.NS.HTML);
1679
- p.insertionMode = InsertionMode.IN_FRAMESET;
1680
- }
1681
- }
1682
- function addressStartTagInBody(p, token) {
1683
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1684
- p._closePElement();
1685
- }
1686
- p._insertElement(token, html_js_1.NS.HTML);
1687
- }
1688
- function numberedHeaderStartTagInBody(p, token) {
1689
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1690
- p._closePElement();
1691
- }
1692
- if (p.openElements.currentTagId !== undefined && html_js_1.NUMBERED_HEADERS.has(p.openElements.currentTagId)) {
1693
- p.openElements.pop();
1694
- }
1695
- p._insertElement(token, html_js_1.NS.HTML);
1696
- }
1697
- function preStartTagInBody(p, token) {
1698
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1699
- p._closePElement();
1700
- }
1701
- p._insertElement(token, html_js_1.NS.HTML);
1702
- //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move
1703
- //on to the next one. (Newlines at the start of pre blocks are ignored as an authoring convenience.)
1704
- p.skipNextNewLine = true;
1705
- p.framesetOk = false;
1706
- }
1707
- function formStartTagInBody(p, token) {
1708
- const inTemplate = p.openElements.tmplCount > 0;
1709
- if (!p.formElement || inTemplate) {
1710
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1711
- p._closePElement();
1712
- }
1713
- p._insertElement(token, html_js_1.NS.HTML);
1714
- if (!inTemplate) {
1715
- p.formElement = p.openElements.current;
1716
- }
1717
- }
1718
- }
1719
- function listItemStartTagInBody(p, token) {
1720
- p.framesetOk = false;
1721
- const tn = token.tagID;
1722
- for (let i = p.openElements.stackTop; i >= 0; i--) {
1723
- const elementId = p.openElements.tagIDs[i];
1724
- if ((tn === html_js_1.TAG_ID.LI && elementId === html_js_1.TAG_ID.LI) ||
1725
- ((tn === html_js_1.TAG_ID.DD || tn === html_js_1.TAG_ID.DT) && (elementId === html_js_1.TAG_ID.DD || elementId === html_js_1.TAG_ID.DT))) {
1726
- p.openElements.generateImpliedEndTagsWithExclusion(elementId);
1727
- p.openElements.popUntilTagNamePopped(elementId);
1728
- break;
1729
- }
1730
- if (elementId !== html_js_1.TAG_ID.ADDRESS &&
1731
- elementId !== html_js_1.TAG_ID.DIV &&
1732
- elementId !== html_js_1.TAG_ID.P &&
1733
- p._isSpecialElement(p.openElements.items[i], elementId)) {
1734
- break;
1735
- }
1736
- }
1737
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1738
- p._closePElement();
1739
- }
1740
- p._insertElement(token, html_js_1.NS.HTML);
1741
- }
1742
- function plaintextStartTagInBody(p, token) {
1743
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1744
- p._closePElement();
1745
- }
1746
- p._insertElement(token, html_js_1.NS.HTML);
1747
- p.tokenizer.state = index_js_1.TokenizerMode.PLAINTEXT;
1748
- }
1749
- function buttonStartTagInBody(p, token) {
1750
- if (p.openElements.hasInScope(html_js_1.TAG_ID.BUTTON)) {
1751
- p.openElements.generateImpliedEndTags();
1752
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.BUTTON);
1753
- }
1754
- p._reconstructActiveFormattingElements();
1755
- p._insertElement(token, html_js_1.NS.HTML);
1756
- p.framesetOk = false;
1757
- }
1758
- function aStartTagInBody(p, token) {
1759
- const activeElementEntry = p.activeFormattingElements.getElementEntryInScopeWithTagName(html_js_1.TAG_NAMES.A);
1760
- if (activeElementEntry) {
1761
- callAdoptionAgency(p, token);
1762
- p.openElements.remove(activeElementEntry.element);
1763
- p.activeFormattingElements.removeEntry(activeElementEntry);
1764
- }
1765
- p._reconstructActiveFormattingElements();
1766
- p._insertElement(token, html_js_1.NS.HTML);
1767
- p.activeFormattingElements.pushElement(p.openElements.current, token);
1768
- }
1769
- function bStartTagInBody(p, token) {
1770
- p._reconstructActiveFormattingElements();
1771
- p._insertElement(token, html_js_1.NS.HTML);
1772
- p.activeFormattingElements.pushElement(p.openElements.current, token);
1773
- }
1774
- function nobrStartTagInBody(p, token) {
1775
- p._reconstructActiveFormattingElements();
1776
- if (p.openElements.hasInScope(html_js_1.TAG_ID.NOBR)) {
1777
- callAdoptionAgency(p, token);
1778
- p._reconstructActiveFormattingElements();
1779
- }
1780
- p._insertElement(token, html_js_1.NS.HTML);
1781
- p.activeFormattingElements.pushElement(p.openElements.current, token);
1782
- }
1783
- function appletStartTagInBody(p, token) {
1784
- p._reconstructActiveFormattingElements();
1785
- p._insertElement(token, html_js_1.NS.HTML);
1786
- p.activeFormattingElements.insertMarker();
1787
- p.framesetOk = false;
1788
- }
1789
- function tableStartTagInBody(p, token) {
1790
- if (p.treeAdapter.getDocumentMode(p.document) !== html_js_1.DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1791
- p._closePElement();
1792
- }
1793
- p._insertElement(token, html_js_1.NS.HTML);
1794
- p.framesetOk = false;
1795
- p.insertionMode = InsertionMode.IN_TABLE;
1796
- }
1797
- function areaStartTagInBody(p, token) {
1798
- p._reconstructActiveFormattingElements();
1799
- p._appendElement(token, html_js_1.NS.HTML);
1800
- p.framesetOk = false;
1801
- token.ackSelfClosing = true;
1802
- }
1803
- function isHiddenInput(token) {
1804
- const inputType = (0, token_js_1.getTokenAttr)(token, html_js_1.ATTRS.TYPE);
1805
- return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;
1806
- }
1807
- function inputStartTagInBody(p, token) {
1808
- p._reconstructActiveFormattingElements();
1809
- p._appendElement(token, html_js_1.NS.HTML);
1810
- if (!isHiddenInput(token)) {
1811
- p.framesetOk = false;
1812
- }
1813
- token.ackSelfClosing = true;
1814
- }
1815
- function paramStartTagInBody(p, token) {
1816
- p._appendElement(token, html_js_1.NS.HTML);
1817
- token.ackSelfClosing = true;
1818
- }
1819
- function hrStartTagInBody(p, token) {
1820
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1821
- p._closePElement();
1822
- }
1823
- p._appendElement(token, html_js_1.NS.HTML);
1824
- p.framesetOk = false;
1825
- token.ackSelfClosing = true;
1826
- }
1827
- function imageStartTagInBody(p, token) {
1828
- token.tagName = html_js_1.TAG_NAMES.IMG;
1829
- token.tagID = html_js_1.TAG_ID.IMG;
1830
- areaStartTagInBody(p, token);
1831
- }
1832
- function textareaStartTagInBody(p, token) {
1833
- p._insertElement(token, html_js_1.NS.HTML);
1834
- //NOTE: If the next token is a U+000A LINE FEED (LF) character token, then ignore that token and move
1835
- //on to the next one. (Newlines at the start of textarea elements are ignored as an authoring convenience.)
1836
- p.skipNextNewLine = true;
1837
- p.tokenizer.state = index_js_1.TokenizerMode.RCDATA;
1838
- p.originalInsertionMode = p.insertionMode;
1839
- p.framesetOk = false;
1840
- p.insertionMode = InsertionMode.TEXT;
1841
- }
1842
- function xmpStartTagInBody(p, token) {
1843
- if (p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
1844
- p._closePElement();
1845
- }
1846
- p._reconstructActiveFormattingElements();
1847
- p.framesetOk = false;
1848
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT);
1849
- }
1850
- function iframeStartTagInBody(p, token) {
1851
- p.framesetOk = false;
1852
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT);
1853
- }
1854
- //NOTE: here we assume that we always act as a user agent with enabled plugins/frames, so we parse
1855
- //<noembed>/<noframes> as rawtext.
1856
- function rawTextStartTagInBody(p, token) {
1857
- p._switchToTextParsing(token, index_js_1.TokenizerMode.RAWTEXT);
1858
- }
1859
- function selectStartTagInBody(p, token) {
1860
- p._reconstructActiveFormattingElements();
1861
- p._insertElement(token, html_js_1.NS.HTML);
1862
- p.framesetOk = false;
1863
- p.insertionMode =
1864
- p.insertionMode === InsertionMode.IN_TABLE ||
1865
- p.insertionMode === InsertionMode.IN_CAPTION ||
1866
- p.insertionMode === InsertionMode.IN_TABLE_BODY ||
1867
- p.insertionMode === InsertionMode.IN_ROW ||
1868
- p.insertionMode === InsertionMode.IN_CELL
1869
- ? InsertionMode.IN_SELECT_IN_TABLE
1870
- : InsertionMode.IN_SELECT;
1871
- }
1872
- function optgroupStartTagInBody(p, token) {
1873
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) {
1874
- p.openElements.pop();
1875
- }
1876
- p._reconstructActiveFormattingElements();
1877
- p._insertElement(token, html_js_1.NS.HTML);
1878
- }
1879
- function rbStartTagInBody(p, token) {
1880
- if (p.openElements.hasInScope(html_js_1.TAG_ID.RUBY)) {
1881
- p.openElements.generateImpliedEndTags();
1882
- }
1883
- p._insertElement(token, html_js_1.NS.HTML);
1884
- }
1885
- function rtStartTagInBody(p, token) {
1886
- if (p.openElements.hasInScope(html_js_1.TAG_ID.RUBY)) {
1887
- p.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.RTC);
1888
- }
1889
- p._insertElement(token, html_js_1.NS.HTML);
1890
- }
1891
- function mathStartTagInBody(p, token) {
1892
- p._reconstructActiveFormattingElements();
1893
- foreignContent.adjustTokenMathMLAttrs(token);
1894
- foreignContent.adjustTokenXMLAttrs(token);
1895
- if (token.selfClosing) {
1896
- p._appendElement(token, html_js_1.NS.MATHML);
1897
- }
1898
- else {
1899
- p._insertElement(token, html_js_1.NS.MATHML);
1900
- }
1901
- token.ackSelfClosing = true;
1902
- }
1903
- function svgStartTagInBody(p, token) {
1904
- p._reconstructActiveFormattingElements();
1905
- foreignContent.adjustTokenSVGAttrs(token);
1906
- foreignContent.adjustTokenXMLAttrs(token);
1907
- if (token.selfClosing) {
1908
- p._appendElement(token, html_js_1.NS.SVG);
1909
- }
1910
- else {
1911
- p._insertElement(token, html_js_1.NS.SVG);
1912
- }
1913
- token.ackSelfClosing = true;
1914
- }
1915
- function genericStartTagInBody(p, token) {
1916
- p._reconstructActiveFormattingElements();
1917
- p._insertElement(token, html_js_1.NS.HTML);
1918
- }
1919
- function startTagInBody(p, token) {
1920
- switch (token.tagID) {
1921
- case html_js_1.TAG_ID.I:
1922
- case html_js_1.TAG_ID.S:
1923
- case html_js_1.TAG_ID.B:
1924
- case html_js_1.TAG_ID.U:
1925
- case html_js_1.TAG_ID.EM:
1926
- case html_js_1.TAG_ID.TT:
1927
- case html_js_1.TAG_ID.BIG:
1928
- case html_js_1.TAG_ID.CODE:
1929
- case html_js_1.TAG_ID.FONT:
1930
- case html_js_1.TAG_ID.SMALL:
1931
- case html_js_1.TAG_ID.STRIKE:
1932
- case html_js_1.TAG_ID.STRONG: {
1933
- bStartTagInBody(p, token);
1934
- break;
1935
- }
1936
- case html_js_1.TAG_ID.A: {
1937
- aStartTagInBody(p, token);
1938
- break;
1939
- }
1940
- case html_js_1.TAG_ID.H1:
1941
- case html_js_1.TAG_ID.H2:
1942
- case html_js_1.TAG_ID.H3:
1943
- case html_js_1.TAG_ID.H4:
1944
- case html_js_1.TAG_ID.H5:
1945
- case html_js_1.TAG_ID.H6: {
1946
- numberedHeaderStartTagInBody(p, token);
1947
- break;
1948
- }
1949
- case html_js_1.TAG_ID.P:
1950
- case html_js_1.TAG_ID.DL:
1951
- case html_js_1.TAG_ID.OL:
1952
- case html_js_1.TAG_ID.UL:
1953
- case html_js_1.TAG_ID.DIV:
1954
- case html_js_1.TAG_ID.DIR:
1955
- case html_js_1.TAG_ID.NAV:
1956
- case html_js_1.TAG_ID.MAIN:
1957
- case html_js_1.TAG_ID.MENU:
1958
- case html_js_1.TAG_ID.ASIDE:
1959
- case html_js_1.TAG_ID.CENTER:
1960
- case html_js_1.TAG_ID.FIGURE:
1961
- case html_js_1.TAG_ID.FOOTER:
1962
- case html_js_1.TAG_ID.HEADER:
1963
- case html_js_1.TAG_ID.HGROUP:
1964
- case html_js_1.TAG_ID.DIALOG:
1965
- case html_js_1.TAG_ID.DETAILS:
1966
- case html_js_1.TAG_ID.ADDRESS:
1967
- case html_js_1.TAG_ID.ARTICLE:
1968
- case html_js_1.TAG_ID.SEARCH:
1969
- case html_js_1.TAG_ID.SECTION:
1970
- case html_js_1.TAG_ID.SUMMARY:
1971
- case html_js_1.TAG_ID.FIELDSET:
1972
- case html_js_1.TAG_ID.BLOCKQUOTE:
1973
- case html_js_1.TAG_ID.FIGCAPTION: {
1974
- addressStartTagInBody(p, token);
1975
- break;
1976
- }
1977
- case html_js_1.TAG_ID.LI:
1978
- case html_js_1.TAG_ID.DD:
1979
- case html_js_1.TAG_ID.DT: {
1980
- listItemStartTagInBody(p, token);
1981
- break;
1982
- }
1983
- case html_js_1.TAG_ID.BR:
1984
- case html_js_1.TAG_ID.IMG:
1985
- case html_js_1.TAG_ID.WBR:
1986
- case html_js_1.TAG_ID.AREA:
1987
- case html_js_1.TAG_ID.EMBED:
1988
- case html_js_1.TAG_ID.KEYGEN: {
1989
- areaStartTagInBody(p, token);
1990
- break;
1991
- }
1992
- case html_js_1.TAG_ID.HR: {
1993
- hrStartTagInBody(p, token);
1994
- break;
1995
- }
1996
- case html_js_1.TAG_ID.RB:
1997
- case html_js_1.TAG_ID.RTC: {
1998
- rbStartTagInBody(p, token);
1999
- break;
2000
- }
2001
- case html_js_1.TAG_ID.RT:
2002
- case html_js_1.TAG_ID.RP: {
2003
- rtStartTagInBody(p, token);
2004
- break;
2005
- }
2006
- case html_js_1.TAG_ID.PRE:
2007
- case html_js_1.TAG_ID.LISTING: {
2008
- preStartTagInBody(p, token);
2009
- break;
2010
- }
2011
- case html_js_1.TAG_ID.XMP: {
2012
- xmpStartTagInBody(p, token);
2013
- break;
2014
- }
2015
- case html_js_1.TAG_ID.SVG: {
2016
- svgStartTagInBody(p, token);
2017
- break;
2018
- }
2019
- case html_js_1.TAG_ID.HTML: {
2020
- htmlStartTagInBody(p, token);
2021
- break;
2022
- }
2023
- case html_js_1.TAG_ID.BASE:
2024
- case html_js_1.TAG_ID.LINK:
2025
- case html_js_1.TAG_ID.META:
2026
- case html_js_1.TAG_ID.STYLE:
2027
- case html_js_1.TAG_ID.TITLE:
2028
- case html_js_1.TAG_ID.SCRIPT:
2029
- case html_js_1.TAG_ID.BGSOUND:
2030
- case html_js_1.TAG_ID.BASEFONT:
2031
- case html_js_1.TAG_ID.TEMPLATE: {
2032
- startTagInHead(p, token);
2033
- break;
2034
- }
2035
- case html_js_1.TAG_ID.BODY: {
2036
- bodyStartTagInBody(p, token);
2037
- break;
2038
- }
2039
- case html_js_1.TAG_ID.FORM: {
2040
- formStartTagInBody(p, token);
2041
- break;
2042
- }
2043
- case html_js_1.TAG_ID.NOBR: {
2044
- nobrStartTagInBody(p, token);
2045
- break;
2046
- }
2047
- case html_js_1.TAG_ID.MATH: {
2048
- mathStartTagInBody(p, token);
2049
- break;
2050
- }
2051
- case html_js_1.TAG_ID.TABLE: {
2052
- tableStartTagInBody(p, token);
2053
- break;
2054
- }
2055
- case html_js_1.TAG_ID.INPUT: {
2056
- inputStartTagInBody(p, token);
2057
- break;
2058
- }
2059
- case html_js_1.TAG_ID.PARAM:
2060
- case html_js_1.TAG_ID.TRACK:
2061
- case html_js_1.TAG_ID.SOURCE: {
2062
- paramStartTagInBody(p, token);
2063
- break;
2064
- }
2065
- case html_js_1.TAG_ID.IMAGE: {
2066
- imageStartTagInBody(p, token);
2067
- break;
2068
- }
2069
- case html_js_1.TAG_ID.BUTTON: {
2070
- buttonStartTagInBody(p, token);
2071
- break;
2072
- }
2073
- case html_js_1.TAG_ID.APPLET:
2074
- case html_js_1.TAG_ID.OBJECT:
2075
- case html_js_1.TAG_ID.MARQUEE: {
2076
- appletStartTagInBody(p, token);
2077
- break;
2078
- }
2079
- case html_js_1.TAG_ID.IFRAME: {
2080
- iframeStartTagInBody(p, token);
2081
- break;
2082
- }
2083
- case html_js_1.TAG_ID.SELECT: {
2084
- selectStartTagInBody(p, token);
2085
- break;
2086
- }
2087
- case html_js_1.TAG_ID.OPTION:
2088
- case html_js_1.TAG_ID.OPTGROUP: {
2089
- optgroupStartTagInBody(p, token);
2090
- break;
2091
- }
2092
- case html_js_1.TAG_ID.NOEMBED:
2093
- case html_js_1.TAG_ID.NOFRAMES: {
2094
- rawTextStartTagInBody(p, token);
2095
- break;
2096
- }
2097
- case html_js_1.TAG_ID.FRAMESET: {
2098
- framesetStartTagInBody(p, token);
2099
- break;
2100
- }
2101
- case html_js_1.TAG_ID.TEXTAREA: {
2102
- textareaStartTagInBody(p, token);
2103
- break;
2104
- }
2105
- case html_js_1.TAG_ID.NOSCRIPT: {
2106
- if (p.options.scriptingEnabled) {
2107
- rawTextStartTagInBody(p, token);
2108
- }
2109
- else {
2110
- genericStartTagInBody(p, token);
2111
- }
2112
- break;
2113
- }
2114
- case html_js_1.TAG_ID.PLAINTEXT: {
2115
- plaintextStartTagInBody(p, token);
2116
- break;
2117
- }
2118
- case html_js_1.TAG_ID.COL:
2119
- case html_js_1.TAG_ID.TH:
2120
- case html_js_1.TAG_ID.TD:
2121
- case html_js_1.TAG_ID.TR:
2122
- case html_js_1.TAG_ID.HEAD:
2123
- case html_js_1.TAG_ID.FRAME:
2124
- case html_js_1.TAG_ID.TBODY:
2125
- case html_js_1.TAG_ID.TFOOT:
2126
- case html_js_1.TAG_ID.THEAD:
2127
- case html_js_1.TAG_ID.CAPTION:
2128
- case html_js_1.TAG_ID.COLGROUP: {
2129
- // Ignore token
2130
- break;
2131
- }
2132
- default: {
2133
- genericStartTagInBody(p, token);
2134
- }
2135
- }
2136
- }
2137
- function bodyEndTagInBody(p, token) {
2138
- if (p.openElements.hasInScope(html_js_1.TAG_ID.BODY)) {
2139
- p.insertionMode = InsertionMode.AFTER_BODY;
2140
- //NOTE: <body> is never popped from the stack, so we need to updated
2141
- //the end location explicitly.
2142
- if (p.options.sourceCodeLocationInfo) {
2143
- const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement();
2144
- if (bodyElement) {
2145
- p._setEndLocation(bodyElement, token);
2146
- }
2147
- }
2148
- }
2149
- }
2150
- function htmlEndTagInBody(p, token) {
2151
- if (p.openElements.hasInScope(html_js_1.TAG_ID.BODY)) {
2152
- p.insertionMode = InsertionMode.AFTER_BODY;
2153
- endTagAfterBody(p, token);
2154
- }
2155
- }
2156
- function addressEndTagInBody(p, token) {
2157
- const tn = token.tagID;
2158
- if (p.openElements.hasInScope(tn)) {
2159
- p.openElements.generateImpliedEndTags();
2160
- p.openElements.popUntilTagNamePopped(tn);
2161
- }
2162
- }
2163
- function formEndTagInBody(p) {
2164
- const inTemplate = p.openElements.tmplCount > 0;
2165
- const { formElement } = p;
2166
- if (!inTemplate) {
2167
- p.formElement = null;
2168
- }
2169
- if ((formElement || inTemplate) && p.openElements.hasInScope(html_js_1.TAG_ID.FORM)) {
2170
- p.openElements.generateImpliedEndTags();
2171
- if (inTemplate) {
2172
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.FORM);
2173
- }
2174
- else if (formElement) {
2175
- p.openElements.remove(formElement);
2176
- }
2177
- }
2178
- }
2179
- function pEndTagInBody(p) {
2180
- if (!p.openElements.hasInButtonScope(html_js_1.TAG_ID.P)) {
2181
- p._insertFakeElement(html_js_1.TAG_NAMES.P, html_js_1.TAG_ID.P);
2182
- }
2183
- p._closePElement();
2184
- }
2185
- function liEndTagInBody(p) {
2186
- if (p.openElements.hasInListItemScope(html_js_1.TAG_ID.LI)) {
2187
- p.openElements.generateImpliedEndTagsWithExclusion(html_js_1.TAG_ID.LI);
2188
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.LI);
2189
- }
2190
- }
2191
- function ddEndTagInBody(p, token) {
2192
- const tn = token.tagID;
2193
- if (p.openElements.hasInScope(tn)) {
2194
- p.openElements.generateImpliedEndTagsWithExclusion(tn);
2195
- p.openElements.popUntilTagNamePopped(tn);
2196
- }
2197
- }
2198
- function numberedHeaderEndTagInBody(p) {
2199
- if (p.openElements.hasNumberedHeaderInScope()) {
2200
- p.openElements.generateImpliedEndTags();
2201
- p.openElements.popUntilNumberedHeaderPopped();
2202
- }
2203
- }
2204
- function appletEndTagInBody(p, token) {
2205
- const tn = token.tagID;
2206
- if (p.openElements.hasInScope(tn)) {
2207
- p.openElements.generateImpliedEndTags();
2208
- p.openElements.popUntilTagNamePopped(tn);
2209
- p.activeFormattingElements.clearToLastMarker();
2210
- }
2211
- }
2212
- function brEndTagInBody(p) {
2213
- p._reconstructActiveFormattingElements();
2214
- p._insertFakeElement(html_js_1.TAG_NAMES.BR, html_js_1.TAG_ID.BR);
2215
- p.openElements.pop();
2216
- p.framesetOk = false;
2217
- }
2218
- function genericEndTagInBody(p, token) {
2219
- const tn = token.tagName;
2220
- const tid = token.tagID;
2221
- for (let i = p.openElements.stackTop; i > 0; i--) {
2222
- const element = p.openElements.items[i];
2223
- const elementId = p.openElements.tagIDs[i];
2224
- // Compare the tag name here, as the tag might not be a known tag with an ID.
2225
- if (tid === elementId && (tid !== html_js_1.TAG_ID.UNKNOWN || p.treeAdapter.getTagName(element) === tn)) {
2226
- p.openElements.generateImpliedEndTagsWithExclusion(tid);
2227
- if (p.openElements.stackTop >= i)
2228
- p.openElements.shortenToLength(i);
2229
- break;
2230
- }
2231
- if (p._isSpecialElement(element, elementId)) {
2232
- break;
2233
- }
2234
- }
2235
- }
2236
- function endTagInBody(p, token) {
2237
- switch (token.tagID) {
2238
- case html_js_1.TAG_ID.A:
2239
- case html_js_1.TAG_ID.B:
2240
- case html_js_1.TAG_ID.I:
2241
- case html_js_1.TAG_ID.S:
2242
- case html_js_1.TAG_ID.U:
2243
- case html_js_1.TAG_ID.EM:
2244
- case html_js_1.TAG_ID.TT:
2245
- case html_js_1.TAG_ID.BIG:
2246
- case html_js_1.TAG_ID.CODE:
2247
- case html_js_1.TAG_ID.FONT:
2248
- case html_js_1.TAG_ID.NOBR:
2249
- case html_js_1.TAG_ID.SMALL:
2250
- case html_js_1.TAG_ID.STRIKE:
2251
- case html_js_1.TAG_ID.STRONG: {
2252
- callAdoptionAgency(p, token);
2253
- break;
2254
- }
2255
- case html_js_1.TAG_ID.P: {
2256
- pEndTagInBody(p);
2257
- break;
2258
- }
2259
- case html_js_1.TAG_ID.DL:
2260
- case html_js_1.TAG_ID.UL:
2261
- case html_js_1.TAG_ID.OL:
2262
- case html_js_1.TAG_ID.DIR:
2263
- case html_js_1.TAG_ID.DIV:
2264
- case html_js_1.TAG_ID.NAV:
2265
- case html_js_1.TAG_ID.PRE:
2266
- case html_js_1.TAG_ID.MAIN:
2267
- case html_js_1.TAG_ID.MENU:
2268
- case html_js_1.TAG_ID.ASIDE:
2269
- case html_js_1.TAG_ID.BUTTON:
2270
- case html_js_1.TAG_ID.CENTER:
2271
- case html_js_1.TAG_ID.FIGURE:
2272
- case html_js_1.TAG_ID.FOOTER:
2273
- case html_js_1.TAG_ID.HEADER:
2274
- case html_js_1.TAG_ID.HGROUP:
2275
- case html_js_1.TAG_ID.DIALOG:
2276
- case html_js_1.TAG_ID.ADDRESS:
2277
- case html_js_1.TAG_ID.ARTICLE:
2278
- case html_js_1.TAG_ID.DETAILS:
2279
- case html_js_1.TAG_ID.SEARCH:
2280
- case html_js_1.TAG_ID.SECTION:
2281
- case html_js_1.TAG_ID.SUMMARY:
2282
- case html_js_1.TAG_ID.LISTING:
2283
- case html_js_1.TAG_ID.FIELDSET:
2284
- case html_js_1.TAG_ID.BLOCKQUOTE:
2285
- case html_js_1.TAG_ID.FIGCAPTION: {
2286
- addressEndTagInBody(p, token);
2287
- break;
2288
- }
2289
- case html_js_1.TAG_ID.LI: {
2290
- liEndTagInBody(p);
2291
- break;
2292
- }
2293
- case html_js_1.TAG_ID.DD:
2294
- case html_js_1.TAG_ID.DT: {
2295
- ddEndTagInBody(p, token);
2296
- break;
2297
- }
2298
- case html_js_1.TAG_ID.H1:
2299
- case html_js_1.TAG_ID.H2:
2300
- case html_js_1.TAG_ID.H3:
2301
- case html_js_1.TAG_ID.H4:
2302
- case html_js_1.TAG_ID.H5:
2303
- case html_js_1.TAG_ID.H6: {
2304
- numberedHeaderEndTagInBody(p);
2305
- break;
2306
- }
2307
- case html_js_1.TAG_ID.BR: {
2308
- brEndTagInBody(p);
2309
- break;
2310
- }
2311
- case html_js_1.TAG_ID.BODY: {
2312
- bodyEndTagInBody(p, token);
2313
- break;
2314
- }
2315
- case html_js_1.TAG_ID.HTML: {
2316
- htmlEndTagInBody(p, token);
2317
- break;
2318
- }
2319
- case html_js_1.TAG_ID.FORM: {
2320
- formEndTagInBody(p);
2321
- break;
2322
- }
2323
- case html_js_1.TAG_ID.APPLET:
2324
- case html_js_1.TAG_ID.OBJECT:
2325
- case html_js_1.TAG_ID.MARQUEE: {
2326
- appletEndTagInBody(p, token);
2327
- break;
2328
- }
2329
- case html_js_1.TAG_ID.TEMPLATE: {
2330
- templateEndTagInHead(p, token);
2331
- break;
2332
- }
2333
- default: {
2334
- genericEndTagInBody(p, token);
2335
- }
2336
- }
2337
- }
2338
- function eofInBody(p, token) {
2339
- if (p.tmplInsertionModeStack.length > 0) {
2340
- eofInTemplate(p, token);
2341
- }
2342
- else {
2343
- stopParsing(p, token);
2344
- }
2345
- }
2346
- // The "text" insertion mode
2347
- //------------------------------------------------------------------
2348
- function endTagInText(p, token) {
2349
- var _a;
2350
- if (token.tagID === html_js_1.TAG_ID.SCRIPT) {
2351
- (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current);
2352
- }
2353
- p.openElements.pop();
2354
- p.insertionMode = p.originalInsertionMode;
2355
- }
2356
- function eofInText(p, token) {
2357
- p._err(token, error_codes_js_1.ERR.eofInElementThatCanContainOnlyText);
2358
- p.openElements.pop();
2359
- p.insertionMode = p.originalInsertionMode;
2360
- p.onEof(token);
2361
- }
2362
- // The "in table" insertion mode
2363
- //------------------------------------------------------------------
2364
- function characterInTable(p, token) {
2365
- if (p.openElements.currentTagId !== undefined && TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) {
2366
- p.pendingCharacterTokens.length = 0;
2367
- p.hasNonWhitespacePendingCharacterToken = false;
2368
- p.originalInsertionMode = p.insertionMode;
2369
- p.insertionMode = InsertionMode.IN_TABLE_TEXT;
2370
- switch (token.type) {
2371
- case token_js_1.TokenType.CHARACTER: {
2372
- characterInTableText(p, token);
2373
- break;
2374
- }
2375
- case token_js_1.TokenType.WHITESPACE_CHARACTER: {
2376
- whitespaceCharacterInTableText(p, token);
2377
- break;
2378
- }
2379
- // Ignore null
2380
- }
2381
- }
2382
- else {
2383
- tokenInTable(p, token);
2384
- }
2385
- }
2386
- function captionStartTagInTable(p, token) {
2387
- p.openElements.clearBackToTableContext();
2388
- p.activeFormattingElements.insertMarker();
2389
- p._insertElement(token, html_js_1.NS.HTML);
2390
- p.insertionMode = InsertionMode.IN_CAPTION;
2391
- }
2392
- function colgroupStartTagInTable(p, token) {
2393
- p.openElements.clearBackToTableContext();
2394
- p._insertElement(token, html_js_1.NS.HTML);
2395
- p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
2396
- }
2397
- function colStartTagInTable(p, token) {
2398
- p.openElements.clearBackToTableContext();
2399
- p._insertFakeElement(html_js_1.TAG_NAMES.COLGROUP, html_js_1.TAG_ID.COLGROUP);
2400
- p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
2401
- startTagInColumnGroup(p, token);
2402
- }
2403
- function tbodyStartTagInTable(p, token) {
2404
- p.openElements.clearBackToTableContext();
2405
- p._insertElement(token, html_js_1.NS.HTML);
2406
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2407
- }
2408
- function tdStartTagInTable(p, token) {
2409
- p.openElements.clearBackToTableContext();
2410
- p._insertFakeElement(html_js_1.TAG_NAMES.TBODY, html_js_1.TAG_ID.TBODY);
2411
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2412
- startTagInTableBody(p, token);
2413
- }
2414
- function tableStartTagInTable(p, token) {
2415
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TABLE)) {
2416
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TABLE);
2417
- p._resetInsertionMode();
2418
- p._processStartTag(token);
2419
- }
2420
- }
2421
- function inputStartTagInTable(p, token) {
2422
- if (isHiddenInput(token)) {
2423
- p._appendElement(token, html_js_1.NS.HTML);
2424
- }
2425
- else {
2426
- tokenInTable(p, token);
2427
- }
2428
- token.ackSelfClosing = true;
2429
- }
2430
- function formStartTagInTable(p, token) {
2431
- if (!p.formElement && p.openElements.tmplCount === 0) {
2432
- p._insertElement(token, html_js_1.NS.HTML);
2433
- p.formElement = p.openElements.current;
2434
- p.openElements.pop();
2435
- }
2436
- }
2437
- function startTagInTable(p, token) {
2438
- switch (token.tagID) {
2439
- case html_js_1.TAG_ID.TD:
2440
- case html_js_1.TAG_ID.TH:
2441
- case html_js_1.TAG_ID.TR: {
2442
- tdStartTagInTable(p, token);
2443
- break;
2444
- }
2445
- case html_js_1.TAG_ID.STYLE:
2446
- case html_js_1.TAG_ID.SCRIPT:
2447
- case html_js_1.TAG_ID.TEMPLATE: {
2448
- startTagInHead(p, token);
2449
- break;
2450
- }
2451
- case html_js_1.TAG_ID.COL: {
2452
- colStartTagInTable(p, token);
2453
- break;
2454
- }
2455
- case html_js_1.TAG_ID.FORM: {
2456
- formStartTagInTable(p, token);
2457
- break;
2458
- }
2459
- case html_js_1.TAG_ID.TABLE: {
2460
- tableStartTagInTable(p, token);
2461
- break;
2462
- }
2463
- case html_js_1.TAG_ID.TBODY:
2464
- case html_js_1.TAG_ID.TFOOT:
2465
- case html_js_1.TAG_ID.THEAD: {
2466
- tbodyStartTagInTable(p, token);
2467
- break;
2468
- }
2469
- case html_js_1.TAG_ID.INPUT: {
2470
- inputStartTagInTable(p, token);
2471
- break;
2472
- }
2473
- case html_js_1.TAG_ID.CAPTION: {
2474
- captionStartTagInTable(p, token);
2475
- break;
2476
- }
2477
- case html_js_1.TAG_ID.COLGROUP: {
2478
- colgroupStartTagInTable(p, token);
2479
- break;
2480
- }
2481
- default: {
2482
- tokenInTable(p, token);
2483
- }
2484
- }
2485
- }
2486
- function endTagInTable(p, token) {
2487
- switch (token.tagID) {
2488
- case html_js_1.TAG_ID.TABLE: {
2489
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TABLE)) {
2490
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TABLE);
2491
- p._resetInsertionMode();
2492
- }
2493
- break;
2494
- }
2495
- case html_js_1.TAG_ID.TEMPLATE: {
2496
- templateEndTagInHead(p, token);
2497
- break;
2498
- }
2499
- case html_js_1.TAG_ID.BODY:
2500
- case html_js_1.TAG_ID.CAPTION:
2501
- case html_js_1.TAG_ID.COL:
2502
- case html_js_1.TAG_ID.COLGROUP:
2503
- case html_js_1.TAG_ID.HTML:
2504
- case html_js_1.TAG_ID.TBODY:
2505
- case html_js_1.TAG_ID.TD:
2506
- case html_js_1.TAG_ID.TFOOT:
2507
- case html_js_1.TAG_ID.TH:
2508
- case html_js_1.TAG_ID.THEAD:
2509
- case html_js_1.TAG_ID.TR: {
2510
- // Ignore token
2511
- break;
2512
- }
2513
- default: {
2514
- tokenInTable(p, token);
2515
- }
2516
- }
2517
- }
2518
- function tokenInTable(p, token) {
2519
- const savedFosterParentingState = p.fosterParentingEnabled;
2520
- p.fosterParentingEnabled = true;
2521
- // Process token in `In Body` mode
2522
- modeInBody(p, token);
2523
- p.fosterParentingEnabled = savedFosterParentingState;
2524
- }
2525
- // The "in table text" insertion mode
2526
- //------------------------------------------------------------------
2527
- function whitespaceCharacterInTableText(p, token) {
2528
- p.pendingCharacterTokens.push(token);
2529
- }
2530
- function characterInTableText(p, token) {
2531
- p.pendingCharacterTokens.push(token);
2532
- p.hasNonWhitespacePendingCharacterToken = true;
2533
- }
2534
- function tokenInTableText(p, token) {
2535
- let i = 0;
2536
- if (p.hasNonWhitespacePendingCharacterToken) {
2537
- for (; i < p.pendingCharacterTokens.length; i++) {
2538
- tokenInTable(p, p.pendingCharacterTokens[i]);
2539
- }
2540
- }
2541
- else {
2542
- for (; i < p.pendingCharacterTokens.length; i++) {
2543
- p._insertCharacters(p.pendingCharacterTokens[i]);
2544
- }
2545
- }
2546
- p.insertionMode = p.originalInsertionMode;
2547
- p._processToken(token);
2548
- }
2549
- // The "in caption" insertion mode
2550
- //------------------------------------------------------------------
2551
- const TABLE_VOID_ELEMENTS = new Set([html_js_1.TAG_ID.CAPTION, html_js_1.TAG_ID.COL, html_js_1.TAG_ID.COLGROUP, html_js_1.TAG_ID.TBODY, html_js_1.TAG_ID.TD, html_js_1.TAG_ID.TFOOT, html_js_1.TAG_ID.TH, html_js_1.TAG_ID.THEAD, html_js_1.TAG_ID.TR]);
2552
- function startTagInCaption(p, token) {
2553
- const tn = token.tagID;
2554
- if (TABLE_VOID_ELEMENTS.has(tn)) {
2555
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.CAPTION)) {
2556
- p.openElements.generateImpliedEndTags();
2557
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.CAPTION);
2558
- p.activeFormattingElements.clearToLastMarker();
2559
- p.insertionMode = InsertionMode.IN_TABLE;
2560
- startTagInTable(p, token);
2561
- }
2562
- }
2563
- else {
2564
- startTagInBody(p, token);
2565
- }
2566
- }
2567
- function endTagInCaption(p, token) {
2568
- const tn = token.tagID;
2569
- switch (tn) {
2570
- case html_js_1.TAG_ID.CAPTION:
2571
- case html_js_1.TAG_ID.TABLE: {
2572
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.CAPTION)) {
2573
- p.openElements.generateImpliedEndTags();
2574
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.CAPTION);
2575
- p.activeFormattingElements.clearToLastMarker();
2576
- p.insertionMode = InsertionMode.IN_TABLE;
2577
- if (tn === html_js_1.TAG_ID.TABLE) {
2578
- endTagInTable(p, token);
2579
- }
2580
- }
2581
- break;
2582
- }
2583
- case html_js_1.TAG_ID.BODY:
2584
- case html_js_1.TAG_ID.COL:
2585
- case html_js_1.TAG_ID.COLGROUP:
2586
- case html_js_1.TAG_ID.HTML:
2587
- case html_js_1.TAG_ID.TBODY:
2588
- case html_js_1.TAG_ID.TD:
2589
- case html_js_1.TAG_ID.TFOOT:
2590
- case html_js_1.TAG_ID.TH:
2591
- case html_js_1.TAG_ID.THEAD:
2592
- case html_js_1.TAG_ID.TR: {
2593
- // Ignore token
2594
- break;
2595
- }
2596
- default: {
2597
- endTagInBody(p, token);
2598
- }
2599
- }
2600
- }
2601
- // The "in column group" insertion mode
2602
- //------------------------------------------------------------------
2603
- function startTagInColumnGroup(p, token) {
2604
- switch (token.tagID) {
2605
- case html_js_1.TAG_ID.HTML: {
2606
- startTagInBody(p, token);
2607
- break;
2608
- }
2609
- case html_js_1.TAG_ID.COL: {
2610
- p._appendElement(token, html_js_1.NS.HTML);
2611
- token.ackSelfClosing = true;
2612
- break;
2613
- }
2614
- case html_js_1.TAG_ID.TEMPLATE: {
2615
- startTagInHead(p, token);
2616
- break;
2617
- }
2618
- default: {
2619
- tokenInColumnGroup(p, token);
2620
- }
2621
- }
2622
- }
2623
- function endTagInColumnGroup(p, token) {
2624
- switch (token.tagID) {
2625
- case html_js_1.TAG_ID.COLGROUP: {
2626
- if (p.openElements.currentTagId === html_js_1.TAG_ID.COLGROUP) {
2627
- p.openElements.pop();
2628
- p.insertionMode = InsertionMode.IN_TABLE;
2629
- }
2630
- break;
2631
- }
2632
- case html_js_1.TAG_ID.TEMPLATE: {
2633
- templateEndTagInHead(p, token);
2634
- break;
2635
- }
2636
- case html_js_1.TAG_ID.COL: {
2637
- // Ignore token
2638
- break;
2639
- }
2640
- default: {
2641
- tokenInColumnGroup(p, token);
2642
- }
2643
- }
2644
- }
2645
- function tokenInColumnGroup(p, token) {
2646
- if (p.openElements.currentTagId === html_js_1.TAG_ID.COLGROUP) {
2647
- p.openElements.pop();
2648
- p.insertionMode = InsertionMode.IN_TABLE;
2649
- p._processToken(token);
2650
- }
2651
- }
2652
- // The "in table body" insertion mode
2653
- //------------------------------------------------------------------
2654
- function startTagInTableBody(p, token) {
2655
- switch (token.tagID) {
2656
- case html_js_1.TAG_ID.TR: {
2657
- p.openElements.clearBackToTableBodyContext();
2658
- p._insertElement(token, html_js_1.NS.HTML);
2659
- p.insertionMode = InsertionMode.IN_ROW;
2660
- break;
2661
- }
2662
- case html_js_1.TAG_ID.TH:
2663
- case html_js_1.TAG_ID.TD: {
2664
- p.openElements.clearBackToTableBodyContext();
2665
- p._insertFakeElement(html_js_1.TAG_NAMES.TR, html_js_1.TAG_ID.TR);
2666
- p.insertionMode = InsertionMode.IN_ROW;
2667
- startTagInRow(p, token);
2668
- break;
2669
- }
2670
- case html_js_1.TAG_ID.CAPTION:
2671
- case html_js_1.TAG_ID.COL:
2672
- case html_js_1.TAG_ID.COLGROUP:
2673
- case html_js_1.TAG_ID.TBODY:
2674
- case html_js_1.TAG_ID.TFOOT:
2675
- case html_js_1.TAG_ID.THEAD: {
2676
- if (p.openElements.hasTableBodyContextInTableScope()) {
2677
- p.openElements.clearBackToTableBodyContext();
2678
- p.openElements.pop();
2679
- p.insertionMode = InsertionMode.IN_TABLE;
2680
- startTagInTable(p, token);
2681
- }
2682
- break;
2683
- }
2684
- default: {
2685
- startTagInTable(p, token);
2686
- }
2687
- }
2688
- }
2689
- function endTagInTableBody(p, token) {
2690
- const tn = token.tagID;
2691
- switch (token.tagID) {
2692
- case html_js_1.TAG_ID.TBODY:
2693
- case html_js_1.TAG_ID.TFOOT:
2694
- case html_js_1.TAG_ID.THEAD: {
2695
- if (p.openElements.hasInTableScope(tn)) {
2696
- p.openElements.clearBackToTableBodyContext();
2697
- p.openElements.pop();
2698
- p.insertionMode = InsertionMode.IN_TABLE;
2699
- }
2700
- break;
2701
- }
2702
- case html_js_1.TAG_ID.TABLE: {
2703
- if (p.openElements.hasTableBodyContextInTableScope()) {
2704
- p.openElements.clearBackToTableBodyContext();
2705
- p.openElements.pop();
2706
- p.insertionMode = InsertionMode.IN_TABLE;
2707
- endTagInTable(p, token);
2708
- }
2709
- break;
2710
- }
2711
- case html_js_1.TAG_ID.BODY:
2712
- case html_js_1.TAG_ID.CAPTION:
2713
- case html_js_1.TAG_ID.COL:
2714
- case html_js_1.TAG_ID.COLGROUP:
2715
- case html_js_1.TAG_ID.HTML:
2716
- case html_js_1.TAG_ID.TD:
2717
- case html_js_1.TAG_ID.TH:
2718
- case html_js_1.TAG_ID.TR: {
2719
- // Ignore token
2720
- break;
2721
- }
2722
- default: {
2723
- endTagInTable(p, token);
2724
- }
2725
- }
2726
- }
2727
- // The "in row" insertion mode
2728
- //------------------------------------------------------------------
2729
- function startTagInRow(p, token) {
2730
- switch (token.tagID) {
2731
- case html_js_1.TAG_ID.TH:
2732
- case html_js_1.TAG_ID.TD: {
2733
- p.openElements.clearBackToTableRowContext();
2734
- p._insertElement(token, html_js_1.NS.HTML);
2735
- p.insertionMode = InsertionMode.IN_CELL;
2736
- p.activeFormattingElements.insertMarker();
2737
- break;
2738
- }
2739
- case html_js_1.TAG_ID.CAPTION:
2740
- case html_js_1.TAG_ID.COL:
2741
- case html_js_1.TAG_ID.COLGROUP:
2742
- case html_js_1.TAG_ID.TBODY:
2743
- case html_js_1.TAG_ID.TFOOT:
2744
- case html_js_1.TAG_ID.THEAD:
2745
- case html_js_1.TAG_ID.TR: {
2746
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) {
2747
- p.openElements.clearBackToTableRowContext();
2748
- p.openElements.pop();
2749
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2750
- startTagInTableBody(p, token);
2751
- }
2752
- break;
2753
- }
2754
- default: {
2755
- startTagInTable(p, token);
2756
- }
2757
- }
2758
- }
2759
- function endTagInRow(p, token) {
2760
- switch (token.tagID) {
2761
- case html_js_1.TAG_ID.TR: {
2762
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) {
2763
- p.openElements.clearBackToTableRowContext();
2764
- p.openElements.pop();
2765
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2766
- }
2767
- break;
2768
- }
2769
- case html_js_1.TAG_ID.TABLE: {
2770
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) {
2771
- p.openElements.clearBackToTableRowContext();
2772
- p.openElements.pop();
2773
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2774
- endTagInTableBody(p, token);
2775
- }
2776
- break;
2777
- }
2778
- case html_js_1.TAG_ID.TBODY:
2779
- case html_js_1.TAG_ID.TFOOT:
2780
- case html_js_1.TAG_ID.THEAD: {
2781
- if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(html_js_1.TAG_ID.TR)) {
2782
- p.openElements.clearBackToTableRowContext();
2783
- p.openElements.pop();
2784
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
2785
- endTagInTableBody(p, token);
2786
- }
2787
- break;
2788
- }
2789
- case html_js_1.TAG_ID.BODY:
2790
- case html_js_1.TAG_ID.CAPTION:
2791
- case html_js_1.TAG_ID.COL:
2792
- case html_js_1.TAG_ID.COLGROUP:
2793
- case html_js_1.TAG_ID.HTML:
2794
- case html_js_1.TAG_ID.TD:
2795
- case html_js_1.TAG_ID.TH: {
2796
- // Ignore end tag
2797
- break;
2798
- }
2799
- default: {
2800
- endTagInTable(p, token);
2801
- }
2802
- }
2803
- }
2804
- // The "in cell" insertion mode
2805
- //------------------------------------------------------------------
2806
- function startTagInCell(p, token) {
2807
- const tn = token.tagID;
2808
- if (TABLE_VOID_ELEMENTS.has(tn)) {
2809
- if (p.openElements.hasInTableScope(html_js_1.TAG_ID.TD) || p.openElements.hasInTableScope(html_js_1.TAG_ID.TH)) {
2810
- p._closeTableCell();
2811
- startTagInRow(p, token);
2812
- }
2813
- }
2814
- else {
2815
- startTagInBody(p, token);
2816
- }
2817
- }
2818
- function endTagInCell(p, token) {
2819
- const tn = token.tagID;
2820
- switch (tn) {
2821
- case html_js_1.TAG_ID.TD:
2822
- case html_js_1.TAG_ID.TH: {
2823
- if (p.openElements.hasInTableScope(tn)) {
2824
- p.openElements.generateImpliedEndTags();
2825
- p.openElements.popUntilTagNamePopped(tn);
2826
- p.activeFormattingElements.clearToLastMarker();
2827
- p.insertionMode = InsertionMode.IN_ROW;
2828
- }
2829
- break;
2830
- }
2831
- case html_js_1.TAG_ID.TABLE:
2832
- case html_js_1.TAG_ID.TBODY:
2833
- case html_js_1.TAG_ID.TFOOT:
2834
- case html_js_1.TAG_ID.THEAD:
2835
- case html_js_1.TAG_ID.TR: {
2836
- if (p.openElements.hasInTableScope(tn)) {
2837
- p._closeTableCell();
2838
- endTagInRow(p, token);
2839
- }
2840
- break;
2841
- }
2842
- case html_js_1.TAG_ID.BODY:
2843
- case html_js_1.TAG_ID.CAPTION:
2844
- case html_js_1.TAG_ID.COL:
2845
- case html_js_1.TAG_ID.COLGROUP:
2846
- case html_js_1.TAG_ID.HTML: {
2847
- // Ignore token
2848
- break;
2849
- }
2850
- default: {
2851
- endTagInBody(p, token);
2852
- }
2853
- }
2854
- }
2855
- // The "in select" insertion mode
2856
- //------------------------------------------------------------------
2857
- function startTagInSelect(p, token) {
2858
- switch (token.tagID) {
2859
- case html_js_1.TAG_ID.HTML: {
2860
- startTagInBody(p, token);
2861
- break;
2862
- }
2863
- case html_js_1.TAG_ID.OPTION: {
2864
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) {
2865
- p.openElements.pop();
2866
- }
2867
- p._insertElement(token, html_js_1.NS.HTML);
2868
- break;
2869
- }
2870
- case html_js_1.TAG_ID.OPTGROUP: {
2871
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) {
2872
- p.openElements.pop();
2873
- }
2874
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) {
2875
- p.openElements.pop();
2876
- }
2877
- p._insertElement(token, html_js_1.NS.HTML);
2878
- break;
2879
- }
2880
- case html_js_1.TAG_ID.HR: {
2881
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) {
2882
- p.openElements.pop();
2883
- }
2884
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) {
2885
- p.openElements.pop();
2886
- }
2887
- p._appendElement(token, html_js_1.NS.HTML);
2888
- token.ackSelfClosing = true;
2889
- break;
2890
- }
2891
- case html_js_1.TAG_ID.INPUT:
2892
- case html_js_1.TAG_ID.KEYGEN:
2893
- case html_js_1.TAG_ID.TEXTAREA:
2894
- case html_js_1.TAG_ID.SELECT: {
2895
- if (p.openElements.hasInSelectScope(html_js_1.TAG_ID.SELECT)) {
2896
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT);
2897
- p._resetInsertionMode();
2898
- if (token.tagID !== html_js_1.TAG_ID.SELECT) {
2899
- p._processStartTag(token);
2900
- }
2901
- }
2902
- break;
2903
- }
2904
- case html_js_1.TAG_ID.SCRIPT:
2905
- case html_js_1.TAG_ID.TEMPLATE: {
2906
- startTagInHead(p, token);
2907
- break;
2908
- }
2909
- default:
2910
- // Do nothing
2911
- }
2912
- }
2913
- function endTagInSelect(p, token) {
2914
- switch (token.tagID) {
2915
- case html_js_1.TAG_ID.OPTGROUP: {
2916
- if (p.openElements.stackTop > 0 &&
2917
- p.openElements.currentTagId === html_js_1.TAG_ID.OPTION &&
2918
- p.openElements.tagIDs[p.openElements.stackTop - 1] === html_js_1.TAG_ID.OPTGROUP) {
2919
- p.openElements.pop();
2920
- }
2921
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTGROUP) {
2922
- p.openElements.pop();
2923
- }
2924
- break;
2925
- }
2926
- case html_js_1.TAG_ID.OPTION: {
2927
- if (p.openElements.currentTagId === html_js_1.TAG_ID.OPTION) {
2928
- p.openElements.pop();
2929
- }
2930
- break;
2931
- }
2932
- case html_js_1.TAG_ID.SELECT: {
2933
- if (p.openElements.hasInSelectScope(html_js_1.TAG_ID.SELECT)) {
2934
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT);
2935
- p._resetInsertionMode();
2936
- }
2937
- break;
2938
- }
2939
- case html_js_1.TAG_ID.TEMPLATE: {
2940
- templateEndTagInHead(p, token);
2941
- break;
2942
- }
2943
- default:
2944
- // Do nothing
2945
- }
2946
- }
2947
- // The "in select in table" insertion mode
2948
- //------------------------------------------------------------------
2949
- function startTagInSelectInTable(p, token) {
2950
- const tn = token.tagID;
2951
- if (tn === html_js_1.TAG_ID.CAPTION ||
2952
- tn === html_js_1.TAG_ID.TABLE ||
2953
- tn === html_js_1.TAG_ID.TBODY ||
2954
- tn === html_js_1.TAG_ID.TFOOT ||
2955
- tn === html_js_1.TAG_ID.THEAD ||
2956
- tn === html_js_1.TAG_ID.TR ||
2957
- tn === html_js_1.TAG_ID.TD ||
2958
- tn === html_js_1.TAG_ID.TH) {
2959
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT);
2960
- p._resetInsertionMode();
2961
- p._processStartTag(token);
2962
- }
2963
- else {
2964
- startTagInSelect(p, token);
2965
- }
2966
- }
2967
- function endTagInSelectInTable(p, token) {
2968
- const tn = token.tagID;
2969
- if (tn === html_js_1.TAG_ID.CAPTION ||
2970
- tn === html_js_1.TAG_ID.TABLE ||
2971
- tn === html_js_1.TAG_ID.TBODY ||
2972
- tn === html_js_1.TAG_ID.TFOOT ||
2973
- tn === html_js_1.TAG_ID.THEAD ||
2974
- tn === html_js_1.TAG_ID.TR ||
2975
- tn === html_js_1.TAG_ID.TD ||
2976
- tn === html_js_1.TAG_ID.TH) {
2977
- if (p.openElements.hasInTableScope(tn)) {
2978
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.SELECT);
2979
- p._resetInsertionMode();
2980
- p.onEndTag(token);
2981
- }
2982
- }
2983
- else {
2984
- endTagInSelect(p, token);
2985
- }
2986
- }
2987
- // The "in template" insertion mode
2988
- //------------------------------------------------------------------
2989
- function startTagInTemplate(p, token) {
2990
- switch (token.tagID) {
2991
- // First, handle tags that can start without a mode change
2992
- case html_js_1.TAG_ID.BASE:
2993
- case html_js_1.TAG_ID.BASEFONT:
2994
- case html_js_1.TAG_ID.BGSOUND:
2995
- case html_js_1.TAG_ID.LINK:
2996
- case html_js_1.TAG_ID.META:
2997
- case html_js_1.TAG_ID.NOFRAMES:
2998
- case html_js_1.TAG_ID.SCRIPT:
2999
- case html_js_1.TAG_ID.STYLE:
3000
- case html_js_1.TAG_ID.TEMPLATE:
3001
- case html_js_1.TAG_ID.TITLE: {
3002
- startTagInHead(p, token);
3003
- break;
3004
- }
3005
- // Re-process the token in the appropriate mode
3006
- case html_js_1.TAG_ID.CAPTION:
3007
- case html_js_1.TAG_ID.COLGROUP:
3008
- case html_js_1.TAG_ID.TBODY:
3009
- case html_js_1.TAG_ID.TFOOT:
3010
- case html_js_1.TAG_ID.THEAD: {
3011
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;
3012
- p.insertionMode = InsertionMode.IN_TABLE;
3013
- startTagInTable(p, token);
3014
- break;
3015
- }
3016
- case html_js_1.TAG_ID.COL: {
3017
- p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;
3018
- p.insertionMode = InsertionMode.IN_COLUMN_GROUP;
3019
- startTagInColumnGroup(p, token);
3020
- break;
3021
- }
3022
- case html_js_1.TAG_ID.TR: {
3023
- p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;
3024
- p.insertionMode = InsertionMode.IN_TABLE_BODY;
3025
- startTagInTableBody(p, token);
3026
- break;
3027
- }
3028
- case html_js_1.TAG_ID.TD:
3029
- case html_js_1.TAG_ID.TH: {
3030
- p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;
3031
- p.insertionMode = InsertionMode.IN_ROW;
3032
- startTagInRow(p, token);
3033
- break;
3034
- }
3035
- default: {
3036
- p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;
3037
- p.insertionMode = InsertionMode.IN_BODY;
3038
- startTagInBody(p, token);
3039
- }
3040
- }
3041
- }
3042
- function endTagInTemplate(p, token) {
3043
- if (token.tagID === html_js_1.TAG_ID.TEMPLATE) {
3044
- templateEndTagInHead(p, token);
3045
- }
3046
- }
3047
- function eofInTemplate(p, token) {
3048
- if (p.openElements.tmplCount > 0) {
3049
- p.openElements.popUntilTagNamePopped(html_js_1.TAG_ID.TEMPLATE);
3050
- p.activeFormattingElements.clearToLastMarker();
3051
- p.tmplInsertionModeStack.shift();
3052
- p._resetInsertionMode();
3053
- p.onEof(token);
3054
- }
3055
- else {
3056
- stopParsing(p, token);
3057
- }
3058
- }
3059
- // The "after body" insertion mode
3060
- //------------------------------------------------------------------
3061
- function startTagAfterBody(p, token) {
3062
- if (token.tagID === html_js_1.TAG_ID.HTML) {
3063
- startTagInBody(p, token);
3064
- }
3065
- else {
3066
- tokenAfterBody(p, token);
3067
- }
3068
- }
3069
- function endTagAfterBody(p, token) {
3070
- var _a;
3071
- if (token.tagID === html_js_1.TAG_ID.HTML) {
3072
- if (!p.fragmentContext) {
3073
- p.insertionMode = InsertionMode.AFTER_AFTER_BODY;
3074
- }
3075
- //NOTE: <html> is never popped from the stack, so we need to updated
3076
- //the end location explicitly.
3077
- if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === html_js_1.TAG_ID.HTML) {
3078
- p._setEndLocation(p.openElements.items[0], token);
3079
- // Update the body element, if it doesn't have an end tag
3080
- const bodyElement = p.openElements.items[1];
3081
- if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) {
3082
- p._setEndLocation(bodyElement, token);
3083
- }
3084
- }
3085
- }
3086
- else {
3087
- tokenAfterBody(p, token);
3088
- }
3089
- }
3090
- function tokenAfterBody(p, token) {
3091
- p.insertionMode = InsertionMode.IN_BODY;
3092
- modeInBody(p, token);
3093
- }
3094
- // The "in frameset" insertion mode
3095
- //------------------------------------------------------------------
3096
- function startTagInFrameset(p, token) {
3097
- switch (token.tagID) {
3098
- case html_js_1.TAG_ID.HTML: {
3099
- startTagInBody(p, token);
3100
- break;
3101
- }
3102
- case html_js_1.TAG_ID.FRAMESET: {
3103
- p._insertElement(token, html_js_1.NS.HTML);
3104
- break;
3105
- }
3106
- case html_js_1.TAG_ID.FRAME: {
3107
- p._appendElement(token, html_js_1.NS.HTML);
3108
- token.ackSelfClosing = true;
3109
- break;
3110
- }
3111
- case html_js_1.TAG_ID.NOFRAMES: {
3112
- startTagInHead(p, token);
3113
- break;
3114
- }
3115
- default:
3116
- // Do nothing
3117
- }
3118
- }
3119
- function endTagInFrameset(p, token) {
3120
- if (token.tagID === html_js_1.TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) {
3121
- p.openElements.pop();
3122
- if (!p.fragmentContext && p.openElements.currentTagId !== html_js_1.TAG_ID.FRAMESET) {
3123
- p.insertionMode = InsertionMode.AFTER_FRAMESET;
3124
- }
3125
- }
3126
- }
3127
- // The "after frameset" insertion mode
3128
- //------------------------------------------------------------------
3129
- function startTagAfterFrameset(p, token) {
3130
- switch (token.tagID) {
3131
- case html_js_1.TAG_ID.HTML: {
3132
- startTagInBody(p, token);
3133
- break;
3134
- }
3135
- case html_js_1.TAG_ID.NOFRAMES: {
3136
- startTagInHead(p, token);
3137
- break;
3138
- }
3139
- default:
3140
- // Do nothing
3141
- }
3142
- }
3143
- function endTagAfterFrameset(p, token) {
3144
- if (token.tagID === html_js_1.TAG_ID.HTML) {
3145
- p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;
3146
- }
3147
- }
3148
- // The "after after body" insertion mode
3149
- //------------------------------------------------------------------
3150
- function startTagAfterAfterBody(p, token) {
3151
- if (token.tagID === html_js_1.TAG_ID.HTML) {
3152
- startTagInBody(p, token);
3153
- }
3154
- else {
3155
- tokenAfterAfterBody(p, token);
3156
- }
3157
- }
3158
- function tokenAfterAfterBody(p, token) {
3159
- p.insertionMode = InsertionMode.IN_BODY;
3160
- modeInBody(p, token);
3161
- }
3162
- // The "after after frameset" insertion mode
3163
- //------------------------------------------------------------------
3164
- function startTagAfterAfterFrameset(p, token) {
3165
- switch (token.tagID) {
3166
- case html_js_1.TAG_ID.HTML: {
3167
- startTagInBody(p, token);
3168
- break;
3169
- }
3170
- case html_js_1.TAG_ID.NOFRAMES: {
3171
- startTagInHead(p, token);
3172
- break;
3173
- }
3174
- default:
3175
- // Do nothing
3176
- }
3177
- }
3178
- // The rules for parsing tokens in foreign content
3179
- //------------------------------------------------------------------
3180
- function nullCharacterInForeignContent(p, token) {
3181
- token.chars = unicode.REPLACEMENT_CHARACTER;
3182
- p._insertCharacters(token);
3183
- }
3184
- function characterInForeignContent(p, token) {
3185
- p._insertCharacters(token);
3186
- p.framesetOk = false;
3187
- }
3188
- function popUntilHtmlOrIntegrationPoint(p) {
3189
- while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== html_js_1.NS.HTML &&
3190
- p.openElements.currentTagId !== undefined &&
3191
- !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) {
3192
- p.openElements.pop();
3193
- }
3194
- }
3195
- function startTagInForeignContent(p, token) {
3196
- if (foreignContent.causesExit(token)) {
3197
- popUntilHtmlOrIntegrationPoint(p);
3198
- p._startTagOutsideForeignContent(token);
3199
- }
3200
- else {
3201
- const current = p._getAdjustedCurrentElement();
3202
- const currentNs = p.treeAdapter.getNamespaceURI(current);
3203
- if (currentNs === html_js_1.NS.MATHML) {
3204
- foreignContent.adjustTokenMathMLAttrs(token);
3205
- }
3206
- else if (currentNs === html_js_1.NS.SVG) {
3207
- foreignContent.adjustTokenSVGTagName(token);
3208
- foreignContent.adjustTokenSVGAttrs(token);
3209
- }
3210
- foreignContent.adjustTokenXMLAttrs(token);
3211
- if (token.selfClosing) {
3212
- p._appendElement(token, currentNs);
3213
- }
3214
- else {
3215
- p._insertElement(token, currentNs);
3216
- }
3217
- token.ackSelfClosing = true;
3218
- }
3219
- }
3220
- function endTagInForeignContent(p, token) {
3221
- if (token.tagID === html_js_1.TAG_ID.P || token.tagID === html_js_1.TAG_ID.BR) {
3222
- popUntilHtmlOrIntegrationPoint(p);
3223
- p._endTagOutsideForeignContent(token);
3224
- return;
3225
- }
3226
- for (let i = p.openElements.stackTop; i > 0; i--) {
3227
- const element = p.openElements.items[i];
3228
- if (p.treeAdapter.getNamespaceURI(element) === html_js_1.NS.HTML) {
3229
- p._endTagOutsideForeignContent(token);
3230
- break;
3231
- }
3232
- const tagName = p.treeAdapter.getTagName(element);
3233
- if (tagName.toLowerCase() === token.tagName) {
3234
- //NOTE: update the token tag name for `_setEndLocation`.
3235
- token.tagName = tagName;
3236
- p.openElements.shortenToLength(i);
3237
- break;
3238
- }
3239
- }
3240
- }