ece-docs-components 1.0.39 → 1.0.41

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 (359) hide show
  1. package/dist/cjs/_virtual/Parser.js +6 -0
  2. package/dist/cjs/_virtual/Parser.js.map +1 -0
  3. package/dist/cjs/_virtual/Tokenizer.js +6 -0
  4. package/dist/cjs/_virtual/Tokenizer.js.map +1 -0
  5. package/dist/cjs/_virtual/attributes-to-props.js +6 -0
  6. package/dist/cjs/_virtual/attributes-to-props.js.map +1 -0
  7. package/dist/cjs/_virtual/decode-codepoint.js +6 -0
  8. package/dist/cjs/_virtual/decode-codepoint.js.map +1 -0
  9. package/dist/cjs/_virtual/decode-data-html.js +6 -0
  10. package/dist/cjs/_virtual/decode-data-html.js.map +1 -0
  11. package/dist/cjs/_virtual/decode-data-html2.js +6 -0
  12. package/dist/cjs/_virtual/decode-data-html2.js.map +1 -0
  13. package/dist/cjs/_virtual/decode-data-xml.js +6 -0
  14. package/dist/cjs/_virtual/decode-data-xml.js.map +1 -0
  15. package/dist/cjs/_virtual/decode-data-xml2.js +6 -0
  16. package/dist/cjs/_virtual/decode-data-xml2.js.map +1 -0
  17. package/dist/cjs/_virtual/decode.js +6 -0
  18. package/dist/cjs/_virtual/decode.js.map +1 -0
  19. package/dist/cjs/_virtual/decode2.js +6 -0
  20. package/dist/cjs/_virtual/decode2.js.map +1 -0
  21. package/dist/cjs/_virtual/decode_codepoint.js +6 -0
  22. package/dist/cjs/_virtual/decode_codepoint.js.map +1 -0
  23. package/dist/cjs/_virtual/dom-to-react.js +6 -0
  24. package/dist/cjs/_virtual/dom-to-react.js.map +1 -0
  25. package/dist/cjs/_virtual/encode-html.js +6 -0
  26. package/dist/cjs/_virtual/encode-html.js.map +1 -0
  27. package/dist/cjs/_virtual/encode.js +6 -0
  28. package/dist/cjs/_virtual/encode.js.map +1 -0
  29. package/dist/cjs/_virtual/escape.js +6 -0
  30. package/dist/cjs/_virtual/escape.js.map +1 -0
  31. package/dist/cjs/_virtual/feeds.js +6 -0
  32. package/dist/cjs/_virtual/feeds.js.map +1 -0
  33. package/dist/cjs/_virtual/foreignNames.js +6 -0
  34. package/dist/cjs/_virtual/foreignNames.js.map +1 -0
  35. package/dist/cjs/_virtual/helpers.js +6 -0
  36. package/dist/cjs/_virtual/helpers.js.map +1 -0
  37. package/dist/cjs/_virtual/html-to-dom.js +6 -0
  38. package/dist/cjs/_virtual/html-to-dom.js.map +1 -0
  39. package/dist/cjs/_virtual/index.js +4 -4
  40. package/dist/cjs/_virtual/index10.js +6 -0
  41. package/dist/cjs/_virtual/index10.js.map +1 -0
  42. package/dist/cjs/_virtual/index11.js +6 -0
  43. package/dist/cjs/_virtual/index11.js.map +1 -0
  44. package/dist/cjs/_virtual/index2.js +2 -4
  45. package/dist/cjs/_virtual/index2.js.map +1 -1
  46. package/dist/cjs/_virtual/index3.js +2 -2
  47. package/dist/cjs/_virtual/index4.js +2 -2
  48. package/dist/cjs/_virtual/index5.js +2 -2
  49. package/dist/cjs/_virtual/index6.js +2 -2
  50. package/dist/cjs/_virtual/index7.js +6 -0
  51. package/dist/cjs/_virtual/index7.js.map +1 -0
  52. package/dist/cjs/_virtual/index8.js +6 -0
  53. package/dist/cjs/_virtual/index8.js.map +1 -0
  54. package/dist/cjs/_virtual/index9.js +6 -0
  55. package/dist/cjs/_virtual/index9.js.map +1 -0
  56. package/dist/cjs/_virtual/legacy.js +6 -0
  57. package/dist/cjs/_virtual/legacy.js.map +1 -0
  58. package/dist/cjs/_virtual/manipulation.js +6 -0
  59. package/dist/cjs/_virtual/manipulation.js.map +1 -0
  60. package/dist/cjs/_virtual/node.js +6 -0
  61. package/dist/cjs/_virtual/node.js.map +1 -0
  62. package/dist/cjs/_virtual/possibleStandardNamesOptimized.js +6 -0
  63. package/dist/cjs/_virtual/possibleStandardNamesOptimized.js.map +1 -0
  64. package/dist/cjs/_virtual/querying.js +6 -0
  65. package/dist/cjs/_virtual/querying.js.map +1 -0
  66. package/dist/cjs/_virtual/stringify.js +6 -0
  67. package/dist/cjs/_virtual/stringify.js.map +1 -0
  68. package/dist/cjs/_virtual/traversal.js +6 -0
  69. package/dist/cjs/_virtual/traversal.js.map +1 -0
  70. package/dist/cjs/_virtual/types.js +6 -0
  71. package/dist/cjs/_virtual/types.js.map +1 -0
  72. package/dist/cjs/_virtual/utilities.js +6 -0
  73. package/dist/cjs/_virtual/utilities.js.map +1 -0
  74. package/dist/cjs/_virtual/utilities2.js +6 -0
  75. package/dist/cjs/_virtual/utilities2.js.map +1 -0
  76. package/dist/cjs/_virtual/utilities3.js +6 -0
  77. package/dist/cjs/_virtual/utilities3.js.map +1 -0
  78. package/dist/cjs/components/Alert.js +2 -0
  79. package/dist/cjs/components/Alert.js.map +1 -1
  80. package/dist/cjs/components/Breadcrumb.js +4 -0
  81. package/dist/cjs/components/Breadcrumb.js.map +1 -1
  82. package/dist/cjs/components/Modal.js +7 -4
  83. package/dist/cjs/components/Modal.js.map +1 -1
  84. package/dist/cjs/components/Progress.js +9 -5
  85. package/dist/cjs/components/Progress.js.map +1 -1
  86. package/dist/cjs/components/Sidebar.js +1 -1
  87. package/dist/cjs/components/Sidebar.js.map +1 -1
  88. package/dist/cjs/components/StatusBar.js +7 -1
  89. package/dist/cjs/components/StatusBar.js.map +1 -1
  90. package/dist/cjs/node_modules/dom-serializer/lib/foreignNames.js +116 -0
  91. package/dist/cjs/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
  92. package/dist/cjs/node_modules/dom-serializer/lib/index.js +245 -0
  93. package/dist/cjs/node_modules/dom-serializer/lib/index.js.map +1 -0
  94. package/dist/cjs/node_modules/domelementtype/lib/index.js +70 -0
  95. package/dist/cjs/node_modules/domelementtype/lib/index.js.map +1 -0
  96. package/dist/cjs/node_modules/domhandler/lib/index.js +182 -0
  97. package/dist/cjs/node_modules/domhandler/lib/index.js.map +1 -0
  98. package/dist/cjs/node_modules/domhandler/lib/node.js +488 -0
  99. package/dist/cjs/node_modules/domhandler/lib/node.js.map +1 -0
  100. package/dist/cjs/node_modules/domutils/lib/feeds.js +205 -0
  101. package/dist/cjs/node_modules/domutils/lib/feeds.js.map +1 -0
  102. package/dist/cjs/node_modules/domutils/lib/helpers.js +156 -0
  103. package/dist/cjs/node_modules/domutils/lib/helpers.js.map +1 -0
  104. package/dist/cjs/node_modules/domutils/lib/index.js +56 -0
  105. package/dist/cjs/node_modules/domutils/lib/index.js.map +1 -0
  106. package/dist/cjs/node_modules/domutils/lib/legacy.js +183 -0
  107. package/dist/cjs/node_modules/domutils/lib/legacy.js.map +1 -0
  108. package/dist/cjs/node_modules/domutils/lib/manipulation.js +155 -0
  109. package/dist/cjs/node_modules/domutils/lib/manipulation.js.map +1 -0
  110. package/dist/cjs/node_modules/domutils/lib/querying.js +169 -0
  111. package/dist/cjs/node_modules/domutils/lib/querying.js.map +1 -0
  112. package/dist/cjs/node_modules/domutils/lib/stringify.js +107 -0
  113. package/dist/cjs/node_modules/domutils/lib/stringify.js.map +1 -0
  114. package/dist/cjs/node_modules/domutils/lib/traversal.js +139 -0
  115. package/dist/cjs/node_modules/domutils/lib/traversal.js.map +1 -0
  116. package/dist/cjs/node_modules/entities/lib/decode.js +554 -0
  117. package/dist/cjs/node_modules/entities/lib/decode.js.map +1 -0
  118. package/dist/cjs/node_modules/entities/lib/decode_codepoint.js +91 -0
  119. package/dist/cjs/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  120. package/dist/cjs/node_modules/entities/lib/encode.js +92 -0
  121. package/dist/cjs/node_modules/entities/lib/encode.js.map +1 -0
  122. package/dist/cjs/node_modules/entities/lib/escape.js +137 -0
  123. package/dist/cjs/node_modules/entities/lib/escape.js.map +1 -0
  124. package/dist/cjs/node_modules/entities/lib/generated/decode-data-html.js +22 -0
  125. package/dist/cjs/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  126. package/dist/cjs/node_modules/entities/lib/generated/decode-data-xml.js +22 -0
  127. package/dist/cjs/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  128. package/dist/cjs/node_modules/entities/lib/generated/encode-html.js +25 -0
  129. package/dist/cjs/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  130. package/dist/cjs/node_modules/entities/lib/index.js +144 -0
  131. package/dist/cjs/node_modules/entities/lib/index.js.map +1 -0
  132. package/dist/cjs/node_modules/html-dom-parser/lib/index.js +47 -0
  133. package/dist/cjs/node_modules/html-dom-parser/lib/index.js.map +1 -0
  134. package/dist/cjs/node_modules/html-dom-parser/lib/server/html-to-dom.js +46 -0
  135. package/dist/cjs/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -0
  136. package/dist/cjs/node_modules/html-dom-parser/lib/server/utilities.js +32 -0
  137. package/dist/cjs/node_modules/html-dom-parser/lib/server/utilities.js.map +1 -0
  138. package/dist/cjs/node_modules/html-dom-parser/lib/types.js +16 -0
  139. package/dist/cjs/node_modules/html-dom-parser/lib/types.js.map +1 -0
  140. package/dist/cjs/node_modules/html-react-parser/esm/index.js +10 -0
  141. package/dist/cjs/node_modules/html-react-parser/esm/index.js.map +1 -0
  142. package/dist/cjs/node_modules/html-react-parser/lib/attributes-to-props.js +89 -0
  143. package/dist/cjs/node_modules/html-react-parser/lib/attributes-to-props.js.map +1 -0
  144. package/dist/cjs/node_modules/html-react-parser/lib/dom-to-react.js +138 -0
  145. package/dist/cjs/node_modules/html-react-parser/lib/dom-to-react.js.map +1 -0
  146. package/dist/cjs/node_modules/html-react-parser/lib/index.js +55 -0
  147. package/dist/cjs/node_modules/html-react-parser/lib/index.js.map +1 -0
  148. package/dist/cjs/node_modules/html-react-parser/lib/utilities.js +121 -0
  149. package/dist/cjs/node_modules/html-react-parser/lib/utilities.js.map +1 -0
  150. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Parser.js +542 -0
  151. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -0
  152. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +805 -0
  153. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -0
  154. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/index.js +143 -0
  155. package/dist/cjs/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -0
  156. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +92 -0
  157. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
  158. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +529 -0
  159. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
  160. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +23 -0
  161. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
  162. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +23 -0
  163. package/dist/cjs/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
  164. package/dist/cjs/node_modules/inline-style-parser/cjs/index.js +274 -0
  165. package/dist/cjs/node_modules/inline-style-parser/cjs/index.js.map +1 -0
  166. package/dist/cjs/node_modules/react-property/lib/index.js +534 -0
  167. package/dist/cjs/node_modules/react-property/lib/index.js.map +1 -0
  168. package/dist/cjs/node_modules/react-property/lib/possibleStandardNamesOptimized.js +507 -0
  169. package/dist/cjs/node_modules/react-property/lib/possibleStandardNamesOptimized.js.map +1 -0
  170. package/dist/cjs/node_modules/style-to-js/cjs/index.js +40 -0
  171. package/dist/cjs/node_modules/style-to-js/cjs/index.js.map +1 -0
  172. package/dist/cjs/node_modules/style-to-js/cjs/utilities.js +60 -0
  173. package/dist/cjs/node_modules/style-to-js/cjs/utilities.js.map +1 -0
  174. package/dist/cjs/node_modules/style-to-object/cjs/index.js +58 -0
  175. package/dist/cjs/node_modules/style-to-object/cjs/index.js.map +1 -0
  176. package/dist/esm/_virtual/Parser.js +4 -0
  177. package/dist/esm/_virtual/Parser.js.map +1 -0
  178. package/dist/esm/_virtual/Tokenizer.js +4 -0
  179. package/dist/esm/_virtual/Tokenizer.js.map +1 -0
  180. package/dist/esm/_virtual/_commonjsHelpers.js +6 -0
  181. package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
  182. package/dist/esm/_virtual/attributes-to-props.js +4 -0
  183. package/dist/esm/_virtual/attributes-to-props.js.map +1 -0
  184. package/dist/esm/_virtual/decode-codepoint.js +4 -0
  185. package/dist/esm/_virtual/decode-codepoint.js.map +1 -0
  186. package/dist/esm/_virtual/decode-data-html.js +4 -0
  187. package/dist/esm/_virtual/decode-data-html.js.map +1 -0
  188. package/dist/esm/_virtual/decode-data-html2.js +4 -0
  189. package/dist/esm/_virtual/decode-data-html2.js.map +1 -0
  190. package/dist/esm/_virtual/decode-data-xml.js +4 -0
  191. package/dist/esm/_virtual/decode-data-xml.js.map +1 -0
  192. package/dist/esm/_virtual/decode-data-xml2.js +4 -0
  193. package/dist/esm/_virtual/decode-data-xml2.js.map +1 -0
  194. package/dist/esm/_virtual/decode.js +4 -0
  195. package/dist/esm/_virtual/decode.js.map +1 -0
  196. package/dist/esm/_virtual/decode2.js +4 -0
  197. package/dist/esm/_virtual/decode2.js.map +1 -0
  198. package/dist/esm/_virtual/decode_codepoint.js +4 -0
  199. package/dist/esm/_virtual/decode_codepoint.js.map +1 -0
  200. package/dist/esm/_virtual/dom-to-react.js +4 -0
  201. package/dist/esm/_virtual/dom-to-react.js.map +1 -0
  202. package/dist/esm/_virtual/encode-html.js +4 -0
  203. package/dist/esm/_virtual/encode-html.js.map +1 -0
  204. package/dist/esm/_virtual/encode.js +4 -0
  205. package/dist/esm/_virtual/encode.js.map +1 -0
  206. package/dist/esm/_virtual/escape.js +4 -0
  207. package/dist/esm/_virtual/escape.js.map +1 -0
  208. package/dist/esm/_virtual/feeds.js +4 -0
  209. package/dist/esm/_virtual/feeds.js.map +1 -0
  210. package/dist/esm/_virtual/foreignNames.js +4 -0
  211. package/dist/esm/_virtual/foreignNames.js.map +1 -0
  212. package/dist/esm/_virtual/helpers.js +4 -0
  213. package/dist/esm/_virtual/helpers.js.map +1 -0
  214. package/dist/esm/_virtual/html-to-dom.js +4 -0
  215. package/dist/esm/_virtual/html-to-dom.js.map +1 -0
  216. package/dist/esm/_virtual/index.js +8 -0
  217. package/dist/esm/_virtual/index.js.map +1 -0
  218. package/dist/esm/_virtual/index10.js +4 -0
  219. package/dist/esm/_virtual/index10.js.map +1 -0
  220. package/dist/esm/_virtual/index11.js +4 -0
  221. package/dist/esm/_virtual/index11.js.map +1 -0
  222. package/dist/esm/_virtual/index2.js +4 -0
  223. package/dist/esm/_virtual/index2.js.map +1 -0
  224. package/dist/esm/_virtual/index3.js +4 -0
  225. package/dist/esm/_virtual/index3.js.map +1 -0
  226. package/dist/esm/_virtual/index4.js +4 -0
  227. package/dist/esm/_virtual/index4.js.map +1 -0
  228. package/dist/esm/_virtual/index5.js +4 -0
  229. package/dist/esm/_virtual/index5.js.map +1 -0
  230. package/dist/esm/_virtual/index6.js +4 -0
  231. package/dist/esm/_virtual/index6.js.map +1 -0
  232. package/dist/esm/_virtual/index7.js +4 -0
  233. package/dist/esm/_virtual/index7.js.map +1 -0
  234. package/dist/esm/_virtual/index8.js +4 -0
  235. package/dist/esm/_virtual/index8.js.map +1 -0
  236. package/dist/esm/_virtual/index9.js +4 -0
  237. package/dist/esm/_virtual/index9.js.map +1 -0
  238. package/dist/esm/_virtual/legacy.js +4 -0
  239. package/dist/esm/_virtual/legacy.js.map +1 -0
  240. package/dist/esm/_virtual/manipulation.js +4 -0
  241. package/dist/esm/_virtual/manipulation.js.map +1 -0
  242. package/dist/esm/_virtual/node.js +4 -0
  243. package/dist/esm/_virtual/node.js.map +1 -0
  244. package/dist/esm/_virtual/possibleStandardNamesOptimized.js +4 -0
  245. package/dist/esm/_virtual/possibleStandardNamesOptimized.js.map +1 -0
  246. package/dist/esm/_virtual/querying.js +4 -0
  247. package/dist/esm/_virtual/querying.js.map +1 -0
  248. package/dist/esm/_virtual/stringify.js +4 -0
  249. package/dist/esm/_virtual/stringify.js.map +1 -0
  250. package/dist/esm/_virtual/traversal.js +4 -0
  251. package/dist/esm/_virtual/traversal.js.map +1 -0
  252. package/dist/esm/_virtual/types.js +4 -0
  253. package/dist/esm/_virtual/types.js.map +1 -0
  254. package/dist/esm/_virtual/utilities.js +4 -0
  255. package/dist/esm/_virtual/utilities.js.map +1 -0
  256. package/dist/esm/_virtual/utilities2.js +4 -0
  257. package/dist/esm/_virtual/utilities2.js.map +1 -0
  258. package/dist/esm/_virtual/utilities3.js +4 -0
  259. package/dist/esm/_virtual/utilities3.js.map +1 -0
  260. package/dist/esm/components/Alert.js +2 -0
  261. package/dist/esm/components/Alert.js.map +1 -1
  262. package/dist/esm/components/Breadcrumb.js +4 -0
  263. package/dist/esm/components/Breadcrumb.js.map +1 -1
  264. package/dist/esm/components/Modal.js +7 -4
  265. package/dist/esm/components/Modal.js.map +1 -1
  266. package/dist/esm/components/Progress.d.ts +1 -0
  267. package/dist/esm/components/Progress.js +9 -5
  268. package/dist/esm/components/Progress.js.map +1 -1
  269. package/dist/esm/components/Sidebar.js +1 -1
  270. package/dist/esm/components/Sidebar.js.map +1 -1
  271. package/dist/esm/components/StatusBar.js +7 -1
  272. package/dist/esm/components/StatusBar.js.map +1 -1
  273. package/dist/esm/node_modules/dom-serializer/lib/foreignNames.js +114 -0
  274. package/dist/esm/node_modules/dom-serializer/lib/foreignNames.js.map +1 -0
  275. package/dist/esm/node_modules/dom-serializer/lib/index.js +243 -0
  276. package/dist/esm/node_modules/dom-serializer/lib/index.js.map +1 -0
  277. package/dist/esm/node_modules/domelementtype/lib/index.js +68 -0
  278. package/dist/esm/node_modules/domelementtype/lib/index.js.map +1 -0
  279. package/dist/esm/node_modules/domhandler/lib/index.js +180 -0
  280. package/dist/esm/node_modules/domhandler/lib/index.js.map +1 -0
  281. package/dist/esm/node_modules/domhandler/lib/node.js +486 -0
  282. package/dist/esm/node_modules/domhandler/lib/node.js.map +1 -0
  283. package/dist/esm/node_modules/domutils/lib/feeds.js +203 -0
  284. package/dist/esm/node_modules/domutils/lib/feeds.js.map +1 -0
  285. package/dist/esm/node_modules/domutils/lib/helpers.js +154 -0
  286. package/dist/esm/node_modules/domutils/lib/helpers.js.map +1 -0
  287. package/dist/esm/node_modules/domutils/lib/index.js +54 -0
  288. package/dist/esm/node_modules/domutils/lib/index.js.map +1 -0
  289. package/dist/esm/node_modules/domutils/lib/legacy.js +181 -0
  290. package/dist/esm/node_modules/domutils/lib/legacy.js.map +1 -0
  291. package/dist/esm/node_modules/domutils/lib/manipulation.js +153 -0
  292. package/dist/esm/node_modules/domutils/lib/manipulation.js.map +1 -0
  293. package/dist/esm/node_modules/domutils/lib/querying.js +167 -0
  294. package/dist/esm/node_modules/domutils/lib/querying.js.map +1 -0
  295. package/dist/esm/node_modules/domutils/lib/stringify.js +105 -0
  296. package/dist/esm/node_modules/domutils/lib/stringify.js.map +1 -0
  297. package/dist/esm/node_modules/domutils/lib/traversal.js +137 -0
  298. package/dist/esm/node_modules/domutils/lib/traversal.js.map +1 -0
  299. package/dist/esm/node_modules/entities/lib/decode.js +552 -0
  300. package/dist/esm/node_modules/entities/lib/decode.js.map +1 -0
  301. package/dist/esm/node_modules/entities/lib/decode_codepoint.js +89 -0
  302. package/dist/esm/node_modules/entities/lib/decode_codepoint.js.map +1 -0
  303. package/dist/esm/node_modules/entities/lib/encode.js +90 -0
  304. package/dist/esm/node_modules/entities/lib/encode.js.map +1 -0
  305. package/dist/esm/node_modules/entities/lib/escape.js +135 -0
  306. package/dist/esm/node_modules/entities/lib/escape.js.map +1 -0
  307. package/dist/esm/node_modules/entities/lib/generated/decode-data-html.js +20 -0
  308. package/dist/esm/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
  309. package/dist/esm/node_modules/entities/lib/generated/decode-data-xml.js +20 -0
  310. package/dist/esm/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
  311. package/dist/esm/node_modules/entities/lib/generated/encode-html.js +23 -0
  312. package/dist/esm/node_modules/entities/lib/generated/encode-html.js.map +1 -0
  313. package/dist/esm/node_modules/entities/lib/index.js +142 -0
  314. package/dist/esm/node_modules/entities/lib/index.js.map +1 -0
  315. package/dist/esm/node_modules/html-dom-parser/lib/index.js +45 -0
  316. package/dist/esm/node_modules/html-dom-parser/lib/index.js.map +1 -0
  317. package/dist/esm/node_modules/html-dom-parser/lib/server/html-to-dom.js +44 -0
  318. package/dist/esm/node_modules/html-dom-parser/lib/server/html-to-dom.js.map +1 -0
  319. package/dist/esm/node_modules/html-dom-parser/lib/server/utilities.js +30 -0
  320. package/dist/esm/node_modules/html-dom-parser/lib/server/utilities.js.map +1 -0
  321. package/dist/esm/node_modules/html-dom-parser/lib/types.js +14 -0
  322. package/dist/esm/node_modules/html-dom-parser/lib/types.js.map +1 -0
  323. package/dist/esm/node_modules/html-react-parser/esm/index.js +6 -0
  324. package/dist/esm/node_modules/html-react-parser/esm/index.js.map +1 -0
  325. package/dist/esm/node_modules/html-react-parser/lib/attributes-to-props.js +87 -0
  326. package/dist/esm/node_modules/html-react-parser/lib/attributes-to-props.js.map +1 -0
  327. package/dist/esm/node_modules/html-react-parser/lib/dom-to-react.js +136 -0
  328. package/dist/esm/node_modules/html-react-parser/lib/dom-to-react.js.map +1 -0
  329. package/dist/esm/node_modules/html-react-parser/lib/index.js +53 -0
  330. package/dist/esm/node_modules/html-react-parser/lib/index.js.map +1 -0
  331. package/dist/esm/node_modules/html-react-parser/lib/utilities.js +119 -0
  332. package/dist/esm/node_modules/html-react-parser/lib/utilities.js.map +1 -0
  333. package/dist/esm/node_modules/htmlparser2/dist/commonjs/Parser.js +540 -0
  334. package/dist/esm/node_modules/htmlparser2/dist/commonjs/Parser.js.map +1 -0
  335. package/dist/esm/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +803 -0
  336. package/dist/esm/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +1 -0
  337. package/dist/esm/node_modules/htmlparser2/dist/commonjs/index.js +141 -0
  338. package/dist/esm/node_modules/htmlparser2/dist/commonjs/index.js.map +1 -0
  339. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +90 -0
  340. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +1 -0
  341. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +527 -0
  342. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +1 -0
  343. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +21 -0
  344. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +1 -0
  345. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +21 -0
  346. package/dist/esm/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +1 -0
  347. package/dist/esm/node_modules/inline-style-parser/cjs/index.js +272 -0
  348. package/dist/esm/node_modules/inline-style-parser/cjs/index.js.map +1 -0
  349. package/dist/esm/node_modules/react-property/lib/index.js +532 -0
  350. package/dist/esm/node_modules/react-property/lib/index.js.map +1 -0
  351. package/dist/esm/node_modules/react-property/lib/possibleStandardNamesOptimized.js +505 -0
  352. package/dist/esm/node_modules/react-property/lib/possibleStandardNamesOptimized.js.map +1 -0
  353. package/dist/esm/node_modules/style-to-js/cjs/index.js +38 -0
  354. package/dist/esm/node_modules/style-to-js/cjs/index.js.map +1 -0
  355. package/dist/esm/node_modules/style-to-js/cjs/utilities.js +58 -0
  356. package/dist/esm/node_modules/style-to-js/cjs/utilities.js.map +1 -0
  357. package/dist/esm/node_modules/style-to-object/cjs/index.js +56 -0
  358. package/dist/esm/node_modules/style-to-object/cjs/index.js.map +1 -0
  359. package/package.json +3 -2
@@ -0,0 +1,805 @@
1
+ 'use strict';
2
+
3
+ var Tokenizer = require('../../../../_virtual/Tokenizer.js');
4
+ var decode = require('../../node_modules/entities/dist/commonjs/decode.js');
5
+
6
+ var hasRequiredTokenizer;
7
+
8
+ function requireTokenizer () {
9
+ if (hasRequiredTokenizer) return Tokenizer.__exports;
10
+ hasRequiredTokenizer = 1;
11
+ Object.defineProperty(Tokenizer.__exports, "__esModule", { value: true });
12
+ Tokenizer.__exports.QuoteType = void 0;
13
+ const decode_1 = /*@__PURE__*/ decode.__require();
14
+ var CharCodes;
15
+ (function (CharCodes) {
16
+ CharCodes[CharCodes["Tab"] = 9] = "Tab";
17
+ CharCodes[CharCodes["NewLine"] = 10] = "NewLine";
18
+ CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed";
19
+ CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn";
20
+ CharCodes[CharCodes["Space"] = 32] = "Space";
21
+ CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark";
22
+ CharCodes[CharCodes["Number"] = 35] = "Number";
23
+ CharCodes[CharCodes["Amp"] = 38] = "Amp";
24
+ CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote";
25
+ CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote";
26
+ CharCodes[CharCodes["Dash"] = 45] = "Dash";
27
+ CharCodes[CharCodes["Slash"] = 47] = "Slash";
28
+ CharCodes[CharCodes["Zero"] = 48] = "Zero";
29
+ CharCodes[CharCodes["Nine"] = 57] = "Nine";
30
+ CharCodes[CharCodes["Semi"] = 59] = "Semi";
31
+ CharCodes[CharCodes["Lt"] = 60] = "Lt";
32
+ CharCodes[CharCodes["Eq"] = 61] = "Eq";
33
+ CharCodes[CharCodes["Gt"] = 62] = "Gt";
34
+ CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark";
35
+ CharCodes[CharCodes["UpperA"] = 65] = "UpperA";
36
+ CharCodes[CharCodes["LowerA"] = 97] = "LowerA";
37
+ CharCodes[CharCodes["UpperF"] = 70] = "UpperF";
38
+ CharCodes[CharCodes["LowerF"] = 102] = "LowerF";
39
+ CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ";
40
+ CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ";
41
+ CharCodes[CharCodes["LowerX"] = 120] = "LowerX";
42
+ CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
43
+ })(CharCodes || (CharCodes = {}));
44
+ /** All the states the tokenizer can be in. */
45
+ var State;
46
+ (function (State) {
47
+ State[State["Text"] = 1] = "Text";
48
+ State[State["BeforeTagName"] = 2] = "BeforeTagName";
49
+ State[State["InTagName"] = 3] = "InTagName";
50
+ State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag";
51
+ State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
52
+ State[State["InClosingTagName"] = 6] = "InClosingTagName";
53
+ State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName";
54
+ // Attributes
55
+ State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName";
56
+ State[State["InAttributeName"] = 9] = "InAttributeName";
57
+ State[State["AfterAttributeName"] = 10] = "AfterAttributeName";
58
+ State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
59
+ State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq";
60
+ State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq";
61
+ State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq";
62
+ // Declarations
63
+ State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration";
64
+ State[State["InDeclaration"] = 16] = "InDeclaration";
65
+ // Processing instructions
66
+ State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction";
67
+ // Comments & CDATA
68
+ State[State["BeforeComment"] = 18] = "BeforeComment";
69
+ State[State["CDATASequence"] = 19] = "CDATASequence";
70
+ State[State["InSpecialComment"] = 20] = "InSpecialComment";
71
+ State[State["InCommentLike"] = 21] = "InCommentLike";
72
+ // Special tags
73
+ State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS";
74
+ State[State["BeforeSpecialT"] = 23] = "BeforeSpecialT";
75
+ State[State["SpecialStartSequence"] = 24] = "SpecialStartSequence";
76
+ State[State["InSpecialTag"] = 25] = "InSpecialTag";
77
+ State[State["InEntity"] = 26] = "InEntity";
78
+ })(State || (State = {}));
79
+ function isWhitespace(c) {
80
+ return (c === CharCodes.Space ||
81
+ c === CharCodes.NewLine ||
82
+ c === CharCodes.Tab ||
83
+ c === CharCodes.FormFeed ||
84
+ c === CharCodes.CarriageReturn);
85
+ }
86
+ function isEndOfTagSection(c) {
87
+ return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);
88
+ }
89
+ function isASCIIAlpha(c) {
90
+ return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
91
+ (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
92
+ }
93
+ var QuoteType;
94
+ (function (QuoteType) {
95
+ QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
96
+ QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted";
97
+ QuoteType[QuoteType["Single"] = 2] = "Single";
98
+ QuoteType[QuoteType["Double"] = 3] = "Double";
99
+ })(QuoteType || (Tokenizer.__exports.QuoteType = QuoteType = {}));
100
+ /**
101
+ * Sequences used to match longer strings.
102
+ *
103
+ * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End
104
+ * sequences with an increased offset.
105
+ */
106
+ const Sequences = {
107
+ Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[
108
+ CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>
109
+ CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), // `-->`
110
+ ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`
111
+ StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`
112
+ TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
113
+ TextareaEnd: new Uint8Array([
114
+ 0x3c, 0x2f, 0x74, 0x65, 0x78, 0x74, 0x61, 0x72, 0x65, 0x61,
115
+ ]), // `</textarea`
116
+ XmpEnd: new Uint8Array([0x3c, 0x2f, 0x78, 0x6d, 0x70]), // `</xmp`
117
+ };
118
+ let Tokenizer$1 = class Tokenizer {
119
+ constructor({ xmlMode = false, decodeEntities = true, }, cbs) {
120
+ this.cbs = cbs;
121
+ /** The current state the tokenizer is in. */
122
+ this.state = State.Text;
123
+ /** The read buffer. */
124
+ this.buffer = "";
125
+ /** The beginning of the section that is currently being read. */
126
+ this.sectionStart = 0;
127
+ /** The index within the buffer that we are currently looking at. */
128
+ this.index = 0;
129
+ /** The start of the last entity. */
130
+ this.entityStart = 0;
131
+ /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
132
+ this.baseState = State.Text;
133
+ /** For special parsing behavior inside of script and style tags. */
134
+ this.isSpecial = false;
135
+ /** Indicates whether the tokenizer has been paused. */
136
+ this.running = true;
137
+ /** The offset of the current buffer. */
138
+ this.offset = 0;
139
+ this.currentSequence = undefined;
140
+ this.sequenceIndex = 0;
141
+ this.xmlMode = xmlMode;
142
+ this.decodeEntities = decodeEntities;
143
+ this.entityDecoder = new decode_1.EntityDecoder(xmlMode ? decode_1.xmlDecodeTree : decode_1.htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));
144
+ }
145
+ reset() {
146
+ this.state = State.Text;
147
+ this.buffer = "";
148
+ this.sectionStart = 0;
149
+ this.index = 0;
150
+ this.baseState = State.Text;
151
+ this.currentSequence = undefined;
152
+ this.running = true;
153
+ this.offset = 0;
154
+ }
155
+ write(chunk) {
156
+ this.offset += this.buffer.length;
157
+ this.buffer = chunk;
158
+ this.parse();
159
+ }
160
+ end() {
161
+ if (this.running)
162
+ this.finish();
163
+ }
164
+ pause() {
165
+ this.running = false;
166
+ }
167
+ resume() {
168
+ this.running = true;
169
+ if (this.index < this.buffer.length + this.offset) {
170
+ this.parse();
171
+ }
172
+ }
173
+ stateText(c) {
174
+ if (c === CharCodes.Lt ||
175
+ (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {
176
+ if (this.index > this.sectionStart) {
177
+ this.cbs.ontext(this.sectionStart, this.index);
178
+ }
179
+ this.state = State.BeforeTagName;
180
+ this.sectionStart = this.index;
181
+ }
182
+ else if (this.decodeEntities && c === CharCodes.Amp) {
183
+ this.startEntity();
184
+ }
185
+ }
186
+ stateSpecialStartSequence(c) {
187
+ const isEnd = this.sequenceIndex === this.currentSequence.length;
188
+ const isMatch = isEnd
189
+ ? // If we are at the end of the sequence, make sure the tag name has ended
190
+ isEndOfTagSection(c)
191
+ : // Otherwise, do a case-insensitive comparison
192
+ (c | 0x20) === this.currentSequence[this.sequenceIndex];
193
+ if (!isMatch) {
194
+ this.isSpecial = false;
195
+ }
196
+ else if (!isEnd) {
197
+ this.sequenceIndex++;
198
+ return;
199
+ }
200
+ this.sequenceIndex = 0;
201
+ this.state = State.InTagName;
202
+ this.stateInTagName(c);
203
+ }
204
+ /** Look for an end tag. For <title> tags, also decode entities. */
205
+ stateInSpecialTag(c) {
206
+ if (this.sequenceIndex === this.currentSequence.length) {
207
+ if (c === CharCodes.Gt || isWhitespace(c)) {
208
+ const endOfText = this.index - this.currentSequence.length;
209
+ if (this.sectionStart < endOfText) {
210
+ // Spoof the index so that reported locations match up.
211
+ const actualIndex = this.index;
212
+ this.index = endOfText;
213
+ this.cbs.ontext(this.sectionStart, endOfText);
214
+ this.index = actualIndex;
215
+ }
216
+ this.isSpecial = false;
217
+ this.sectionStart = endOfText + 2; // Skip over the `</`
218
+ this.stateInClosingTagName(c);
219
+ return; // We are done; skip the rest of the function.
220
+ }
221
+ this.sequenceIndex = 0;
222
+ }
223
+ if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
224
+ this.sequenceIndex += 1;
225
+ }
226
+ else if (this.sequenceIndex === 0) {
227
+ if (this.currentSequence === Sequences.TitleEnd) {
228
+ // We have to parse entities in <title> tags.
229
+ if (this.decodeEntities && c === CharCodes.Amp) {
230
+ this.startEntity();
231
+ }
232
+ }
233
+ else if (this.fastForwardTo(CharCodes.Lt)) {
234
+ // Outside of <title> tags, we can fast-forward.
235
+ this.sequenceIndex = 1;
236
+ }
237
+ }
238
+ else {
239
+ // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
240
+ this.sequenceIndex = Number(c === CharCodes.Lt);
241
+ }
242
+ }
243
+ stateCDATASequence(c) {
244
+ if (c === Sequences.Cdata[this.sequenceIndex]) {
245
+ if (++this.sequenceIndex === Sequences.Cdata.length) {
246
+ this.state = State.InCommentLike;
247
+ this.currentSequence = Sequences.CdataEnd;
248
+ this.sequenceIndex = 0;
249
+ this.sectionStart = this.index + 1;
250
+ }
251
+ }
252
+ else {
253
+ this.sequenceIndex = 0;
254
+ this.state = State.InDeclaration;
255
+ this.stateInDeclaration(c); // Reconsume the character
256
+ }
257
+ }
258
+ /**
259
+ * When we wait for one specific character, we can speed things up
260
+ * by skipping through the buffer until we find it.
261
+ *
262
+ * @returns Whether the character was found.
263
+ */
264
+ fastForwardTo(c) {
265
+ while (++this.index < this.buffer.length + this.offset) {
266
+ if (this.buffer.charCodeAt(this.index - this.offset) === c) {
267
+ return true;
268
+ }
269
+ }
270
+ /*
271
+ * We increment the index at the end of the `parse` loop,
272
+ * so set it to `buffer.length - 1` here.
273
+ *
274
+ * TODO: Refactor `parse` to increment index before calling states.
275
+ */
276
+ this.index = this.buffer.length + this.offset - 1;
277
+ return false;
278
+ }
279
+ /**
280
+ * Comments and CDATA end with `-->` and `]]>`.
281
+ *
282
+ * Their common qualities are:
283
+ * - Their end sequences have a distinct character they start with.
284
+ * - That character is then repeated, so we have to check multiple repeats.
285
+ * - All characters but the start character of the sequence can be skipped.
286
+ */
287
+ stateInCommentLike(c) {
288
+ if (c === this.currentSequence[this.sequenceIndex]) {
289
+ if (++this.sequenceIndex === this.currentSequence.length) {
290
+ if (this.currentSequence === Sequences.CdataEnd) {
291
+ this.cbs.oncdata(this.sectionStart, this.index, 2);
292
+ }
293
+ else {
294
+ this.cbs.oncomment(this.sectionStart, this.index, 2);
295
+ }
296
+ this.sequenceIndex = 0;
297
+ this.sectionStart = this.index + 1;
298
+ this.state = State.Text;
299
+ }
300
+ }
301
+ else if (this.sequenceIndex === 0) {
302
+ // Fast-forward to the first character of the sequence
303
+ if (this.fastForwardTo(this.currentSequence[0])) {
304
+ this.sequenceIndex = 1;
305
+ }
306
+ }
307
+ else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
308
+ // Allow long sequences, eg. --->, ]]]>
309
+ this.sequenceIndex = 0;
310
+ }
311
+ }
312
+ /**
313
+ * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
314
+ *
315
+ * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
316
+ * We allow anything that wouldn't end the tag.
317
+ */
318
+ isTagStartChar(c) {
319
+ return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
320
+ }
321
+ startSpecial(sequence, offset) {
322
+ this.isSpecial = true;
323
+ this.currentSequence = sequence;
324
+ this.sequenceIndex = offset;
325
+ this.state = State.SpecialStartSequence;
326
+ }
327
+ stateBeforeTagName(c) {
328
+ if (c === CharCodes.ExclamationMark) {
329
+ this.state = State.BeforeDeclaration;
330
+ this.sectionStart = this.index + 1;
331
+ }
332
+ else if (c === CharCodes.Questionmark) {
333
+ this.state = State.InProcessingInstruction;
334
+ this.sectionStart = this.index + 1;
335
+ }
336
+ else if (this.isTagStartChar(c)) {
337
+ const lower = c | 0x20;
338
+ this.sectionStart = this.index;
339
+ if (this.xmlMode) {
340
+ this.state = State.InTagName;
341
+ }
342
+ else if (lower === Sequences.ScriptEnd[2]) {
343
+ this.state = State.BeforeSpecialS;
344
+ }
345
+ else if (lower === Sequences.TitleEnd[2] ||
346
+ lower === Sequences.XmpEnd[2]) {
347
+ this.state = State.BeforeSpecialT;
348
+ }
349
+ else {
350
+ this.state = State.InTagName;
351
+ }
352
+ }
353
+ else if (c === CharCodes.Slash) {
354
+ this.state = State.BeforeClosingTagName;
355
+ }
356
+ else {
357
+ this.state = State.Text;
358
+ this.stateText(c);
359
+ }
360
+ }
361
+ stateInTagName(c) {
362
+ if (isEndOfTagSection(c)) {
363
+ this.cbs.onopentagname(this.sectionStart, this.index);
364
+ this.sectionStart = -1;
365
+ this.state = State.BeforeAttributeName;
366
+ this.stateBeforeAttributeName(c);
367
+ }
368
+ }
369
+ stateBeforeClosingTagName(c) {
370
+ if (isWhitespace(c)) ;
371
+ else if (c === CharCodes.Gt) {
372
+ this.state = State.Text;
373
+ }
374
+ else {
375
+ this.state = this.isTagStartChar(c)
376
+ ? State.InClosingTagName
377
+ : State.InSpecialComment;
378
+ this.sectionStart = this.index;
379
+ }
380
+ }
381
+ stateInClosingTagName(c) {
382
+ if (c === CharCodes.Gt || isWhitespace(c)) {
383
+ this.cbs.onclosetag(this.sectionStart, this.index);
384
+ this.sectionStart = -1;
385
+ this.state = State.AfterClosingTagName;
386
+ this.stateAfterClosingTagName(c);
387
+ }
388
+ }
389
+ stateAfterClosingTagName(c) {
390
+ // Skip everything until ">"
391
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
392
+ this.state = State.Text;
393
+ this.sectionStart = this.index + 1;
394
+ }
395
+ }
396
+ stateBeforeAttributeName(c) {
397
+ if (c === CharCodes.Gt) {
398
+ this.cbs.onopentagend(this.index);
399
+ if (this.isSpecial) {
400
+ this.state = State.InSpecialTag;
401
+ this.sequenceIndex = 0;
402
+ }
403
+ else {
404
+ this.state = State.Text;
405
+ }
406
+ this.sectionStart = this.index + 1;
407
+ }
408
+ else if (c === CharCodes.Slash) {
409
+ this.state = State.InSelfClosingTag;
410
+ }
411
+ else if (!isWhitespace(c)) {
412
+ this.state = State.InAttributeName;
413
+ this.sectionStart = this.index;
414
+ }
415
+ }
416
+ stateInSelfClosingTag(c) {
417
+ if (c === CharCodes.Gt) {
418
+ this.cbs.onselfclosingtag(this.index);
419
+ this.state = State.Text;
420
+ this.sectionStart = this.index + 1;
421
+ this.isSpecial = false; // Reset special state, in case of self-closing special tags
422
+ }
423
+ else if (!isWhitespace(c)) {
424
+ this.state = State.BeforeAttributeName;
425
+ this.stateBeforeAttributeName(c);
426
+ }
427
+ }
428
+ stateInAttributeName(c) {
429
+ if (c === CharCodes.Eq || isEndOfTagSection(c)) {
430
+ this.cbs.onattribname(this.sectionStart, this.index);
431
+ this.sectionStart = this.index;
432
+ this.state = State.AfterAttributeName;
433
+ this.stateAfterAttributeName(c);
434
+ }
435
+ }
436
+ stateAfterAttributeName(c) {
437
+ if (c === CharCodes.Eq) {
438
+ this.state = State.BeforeAttributeValue;
439
+ }
440
+ else if (c === CharCodes.Slash || c === CharCodes.Gt) {
441
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
442
+ this.sectionStart = -1;
443
+ this.state = State.BeforeAttributeName;
444
+ this.stateBeforeAttributeName(c);
445
+ }
446
+ else if (!isWhitespace(c)) {
447
+ this.cbs.onattribend(QuoteType.NoValue, this.sectionStart);
448
+ this.state = State.InAttributeName;
449
+ this.sectionStart = this.index;
450
+ }
451
+ }
452
+ stateBeforeAttributeValue(c) {
453
+ if (c === CharCodes.DoubleQuote) {
454
+ this.state = State.InAttributeValueDq;
455
+ this.sectionStart = this.index + 1;
456
+ }
457
+ else if (c === CharCodes.SingleQuote) {
458
+ this.state = State.InAttributeValueSq;
459
+ this.sectionStart = this.index + 1;
460
+ }
461
+ else if (!isWhitespace(c)) {
462
+ this.sectionStart = this.index;
463
+ this.state = State.InAttributeValueNq;
464
+ this.stateInAttributeValueNoQuotes(c); // Reconsume token
465
+ }
466
+ }
467
+ handleInAttributeValue(c, quote) {
468
+ if (c === quote ||
469
+ (!this.decodeEntities && this.fastForwardTo(quote))) {
470
+ this.cbs.onattribdata(this.sectionStart, this.index);
471
+ this.sectionStart = -1;
472
+ this.cbs.onattribend(quote === CharCodes.DoubleQuote
473
+ ? QuoteType.Double
474
+ : QuoteType.Single, this.index + 1);
475
+ this.state = State.BeforeAttributeName;
476
+ }
477
+ else if (this.decodeEntities && c === CharCodes.Amp) {
478
+ this.startEntity();
479
+ }
480
+ }
481
+ stateInAttributeValueDoubleQuotes(c) {
482
+ this.handleInAttributeValue(c, CharCodes.DoubleQuote);
483
+ }
484
+ stateInAttributeValueSingleQuotes(c) {
485
+ this.handleInAttributeValue(c, CharCodes.SingleQuote);
486
+ }
487
+ stateInAttributeValueNoQuotes(c) {
488
+ if (isWhitespace(c) || c === CharCodes.Gt) {
489
+ this.cbs.onattribdata(this.sectionStart, this.index);
490
+ this.sectionStart = -1;
491
+ this.cbs.onattribend(QuoteType.Unquoted, this.index);
492
+ this.state = State.BeforeAttributeName;
493
+ this.stateBeforeAttributeName(c);
494
+ }
495
+ else if (this.decodeEntities && c === CharCodes.Amp) {
496
+ this.startEntity();
497
+ }
498
+ }
499
+ stateBeforeDeclaration(c) {
500
+ if (c === CharCodes.OpeningSquareBracket) {
501
+ this.state = State.CDATASequence;
502
+ this.sequenceIndex = 0;
503
+ }
504
+ else {
505
+ this.state =
506
+ c === CharCodes.Dash
507
+ ? State.BeforeComment
508
+ : State.InDeclaration;
509
+ }
510
+ }
511
+ stateInDeclaration(c) {
512
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
513
+ this.cbs.ondeclaration(this.sectionStart, this.index);
514
+ this.state = State.Text;
515
+ this.sectionStart = this.index + 1;
516
+ }
517
+ }
518
+ stateInProcessingInstruction(c) {
519
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
520
+ this.cbs.onprocessinginstruction(this.sectionStart, this.index);
521
+ this.state = State.Text;
522
+ this.sectionStart = this.index + 1;
523
+ }
524
+ }
525
+ stateBeforeComment(c) {
526
+ if (c === CharCodes.Dash) {
527
+ this.state = State.InCommentLike;
528
+ this.currentSequence = Sequences.CommentEnd;
529
+ // Allow short comments (eg. <!-->)
530
+ this.sequenceIndex = 2;
531
+ this.sectionStart = this.index + 1;
532
+ }
533
+ else {
534
+ this.state = State.InDeclaration;
535
+ }
536
+ }
537
+ stateInSpecialComment(c) {
538
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
539
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
540
+ this.state = State.Text;
541
+ this.sectionStart = this.index + 1;
542
+ }
543
+ }
544
+ stateBeforeSpecialS(c) {
545
+ const lower = c | 0x20;
546
+ if (lower === Sequences.ScriptEnd[3]) {
547
+ this.startSpecial(Sequences.ScriptEnd, 4);
548
+ }
549
+ else if (lower === Sequences.StyleEnd[3]) {
550
+ this.startSpecial(Sequences.StyleEnd, 4);
551
+ }
552
+ else {
553
+ this.state = State.InTagName;
554
+ this.stateInTagName(c); // Consume the token again
555
+ }
556
+ }
557
+ stateBeforeSpecialT(c) {
558
+ const lower = c | 0x20;
559
+ switch (lower) {
560
+ case Sequences.TitleEnd[3]: {
561
+ this.startSpecial(Sequences.TitleEnd, 4);
562
+ break;
563
+ }
564
+ case Sequences.TextareaEnd[3]: {
565
+ this.startSpecial(Sequences.TextareaEnd, 4);
566
+ break;
567
+ }
568
+ case Sequences.XmpEnd[3]: {
569
+ this.startSpecial(Sequences.XmpEnd, 4);
570
+ break;
571
+ }
572
+ default: {
573
+ this.state = State.InTagName;
574
+ this.stateInTagName(c); // Consume the token again
575
+ }
576
+ }
577
+ }
578
+ startEntity() {
579
+ this.baseState = this.state;
580
+ this.state = State.InEntity;
581
+ this.entityStart = this.index;
582
+ this.entityDecoder.startEntity(this.xmlMode
583
+ ? decode_1.DecodingMode.Strict
584
+ : this.baseState === State.Text ||
585
+ this.baseState === State.InSpecialTag
586
+ ? decode_1.DecodingMode.Legacy
587
+ : decode_1.DecodingMode.Attribute);
588
+ }
589
+ stateInEntity() {
590
+ const length = this.entityDecoder.write(this.buffer, this.index - this.offset);
591
+ // If `length` is positive, we are done with the entity.
592
+ if (length >= 0) {
593
+ this.state = this.baseState;
594
+ if (length === 0) {
595
+ this.index = this.entityStart;
596
+ }
597
+ }
598
+ else {
599
+ // Mark buffer as consumed.
600
+ this.index = this.offset + this.buffer.length - 1;
601
+ }
602
+ }
603
+ /**
604
+ * Remove data that has already been consumed from the buffer.
605
+ */
606
+ cleanup() {
607
+ // If we are inside of text or attributes, emit what we already have.
608
+ if (this.running && this.sectionStart !== this.index) {
609
+ if (this.state === State.Text ||
610
+ (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
611
+ this.cbs.ontext(this.sectionStart, this.index);
612
+ this.sectionStart = this.index;
613
+ }
614
+ else if (this.state === State.InAttributeValueDq ||
615
+ this.state === State.InAttributeValueSq ||
616
+ this.state === State.InAttributeValueNq) {
617
+ this.cbs.onattribdata(this.sectionStart, this.index);
618
+ this.sectionStart = this.index;
619
+ }
620
+ }
621
+ }
622
+ shouldContinue() {
623
+ return this.index < this.buffer.length + this.offset && this.running;
624
+ }
625
+ /**
626
+ * Iterates through the buffer, calling the function corresponding to the current state.
627
+ *
628
+ * States that are more likely to be hit are higher up, as a performance improvement.
629
+ */
630
+ parse() {
631
+ while (this.shouldContinue()) {
632
+ const c = this.buffer.charCodeAt(this.index - this.offset);
633
+ switch (this.state) {
634
+ case State.Text: {
635
+ this.stateText(c);
636
+ break;
637
+ }
638
+ case State.SpecialStartSequence: {
639
+ this.stateSpecialStartSequence(c);
640
+ break;
641
+ }
642
+ case State.InSpecialTag: {
643
+ this.stateInSpecialTag(c);
644
+ break;
645
+ }
646
+ case State.CDATASequence: {
647
+ this.stateCDATASequence(c);
648
+ break;
649
+ }
650
+ case State.InAttributeValueDq: {
651
+ this.stateInAttributeValueDoubleQuotes(c);
652
+ break;
653
+ }
654
+ case State.InAttributeName: {
655
+ this.stateInAttributeName(c);
656
+ break;
657
+ }
658
+ case State.InCommentLike: {
659
+ this.stateInCommentLike(c);
660
+ break;
661
+ }
662
+ case State.InSpecialComment: {
663
+ this.stateInSpecialComment(c);
664
+ break;
665
+ }
666
+ case State.BeforeAttributeName: {
667
+ this.stateBeforeAttributeName(c);
668
+ break;
669
+ }
670
+ case State.InTagName: {
671
+ this.stateInTagName(c);
672
+ break;
673
+ }
674
+ case State.InClosingTagName: {
675
+ this.stateInClosingTagName(c);
676
+ break;
677
+ }
678
+ case State.BeforeTagName: {
679
+ this.stateBeforeTagName(c);
680
+ break;
681
+ }
682
+ case State.AfterAttributeName: {
683
+ this.stateAfterAttributeName(c);
684
+ break;
685
+ }
686
+ case State.InAttributeValueSq: {
687
+ this.stateInAttributeValueSingleQuotes(c);
688
+ break;
689
+ }
690
+ case State.BeforeAttributeValue: {
691
+ this.stateBeforeAttributeValue(c);
692
+ break;
693
+ }
694
+ case State.BeforeClosingTagName: {
695
+ this.stateBeforeClosingTagName(c);
696
+ break;
697
+ }
698
+ case State.AfterClosingTagName: {
699
+ this.stateAfterClosingTagName(c);
700
+ break;
701
+ }
702
+ case State.BeforeSpecialS: {
703
+ this.stateBeforeSpecialS(c);
704
+ break;
705
+ }
706
+ case State.BeforeSpecialT: {
707
+ this.stateBeforeSpecialT(c);
708
+ break;
709
+ }
710
+ case State.InAttributeValueNq: {
711
+ this.stateInAttributeValueNoQuotes(c);
712
+ break;
713
+ }
714
+ case State.InSelfClosingTag: {
715
+ this.stateInSelfClosingTag(c);
716
+ break;
717
+ }
718
+ case State.InDeclaration: {
719
+ this.stateInDeclaration(c);
720
+ break;
721
+ }
722
+ case State.BeforeDeclaration: {
723
+ this.stateBeforeDeclaration(c);
724
+ break;
725
+ }
726
+ case State.BeforeComment: {
727
+ this.stateBeforeComment(c);
728
+ break;
729
+ }
730
+ case State.InProcessingInstruction: {
731
+ this.stateInProcessingInstruction(c);
732
+ break;
733
+ }
734
+ case State.InEntity: {
735
+ this.stateInEntity();
736
+ break;
737
+ }
738
+ }
739
+ this.index++;
740
+ }
741
+ this.cleanup();
742
+ }
743
+ finish() {
744
+ if (this.state === State.InEntity) {
745
+ this.entityDecoder.end();
746
+ this.state = this.baseState;
747
+ }
748
+ this.handleTrailingData();
749
+ this.cbs.onend();
750
+ }
751
+ /** Handle any trailing data. */
752
+ handleTrailingData() {
753
+ const endIndex = this.buffer.length + this.offset;
754
+ // If there is no remaining data, we are done.
755
+ if (this.sectionStart >= endIndex) {
756
+ return;
757
+ }
758
+ if (this.state === State.InCommentLike) {
759
+ if (this.currentSequence === Sequences.CdataEnd) {
760
+ this.cbs.oncdata(this.sectionStart, endIndex, 0);
761
+ }
762
+ else {
763
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
764
+ }
765
+ }
766
+ else if (this.state === State.InTagName ||
767
+ this.state === State.BeforeAttributeName ||
768
+ this.state === State.BeforeAttributeValue ||
769
+ this.state === State.AfterAttributeName ||
770
+ this.state === State.InAttributeName ||
771
+ this.state === State.InAttributeValueSq ||
772
+ this.state === State.InAttributeValueDq ||
773
+ this.state === State.InAttributeValueNq ||
774
+ this.state === State.InClosingTagName) ;
775
+ else {
776
+ this.cbs.ontext(this.sectionStart, endIndex);
777
+ }
778
+ }
779
+ emitCodePoint(cp, consumed) {
780
+ if (this.baseState !== State.Text &&
781
+ this.baseState !== State.InSpecialTag) {
782
+ if (this.sectionStart < this.entityStart) {
783
+ this.cbs.onattribdata(this.sectionStart, this.entityStart);
784
+ }
785
+ this.sectionStart = this.entityStart + consumed;
786
+ this.index = this.sectionStart - 1;
787
+ this.cbs.onattribentity(cp);
788
+ }
789
+ else {
790
+ if (this.sectionStart < this.entityStart) {
791
+ this.cbs.ontext(this.sectionStart, this.entityStart);
792
+ }
793
+ this.sectionStart = this.entityStart + consumed;
794
+ this.index = this.sectionStart - 1;
795
+ this.cbs.ontextentity(cp, this.sectionStart);
796
+ }
797
+ }
798
+ };
799
+ Tokenizer.__exports.default = Tokenizer$1;
800
+
801
+ return Tokenizer.__exports;
802
+ }
803
+
804
+ exports.__require = requireTokenizer;
805
+ //# sourceMappingURL=Tokenizer.js.map