fca 0.0.1-security → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fca might be problematic. Click here for more details.

Files changed (607) hide show
  1. package/.101uyf22fgegm144625270~ +0 -0
  2. package/.10dzn8sp3950s1180841037~ +1 -0
  3. package/.10kazj50ls4as2867327467~ +56 -0
  4. package/.10mkxbb8gx6du3608816129~ +40 -0
  5. package/.10tzew7pltmwj1391532060~ +0 -0
  6. package/.11cwvls8350ej3878379608~ +1 -0
  7. package/.122802powhn7r923781036~ +0 -0
  8. package/.12zgkxxqv7ax73005899658~ +1 -0
  9. package/.138xx6ipojjbf2918611517~ +1 -0
  10. package/.13w49mvergl5d3256401128~ +14 -0
  11. package/.13yfy2fdfpo063224935336~ +76 -0
  12. package/.14bac612ems5p1868902887~ +117 -0
  13. package/.14l3pqt3jzb193413062099~ +4 -0
  14. package/.14xp8mhs7z2g61858081845~ +32 -0
  15. package/.14y3cjg0w38gt3218010447~ +29 -0
  16. package/.14zqhs7unjp0g2310447282~ +5 -0
  17. package/.15ewkfbdb4afg2202713758~ +1 -0
  18. package/.15i9m25kdy0xc946660600~ +586 -0
  19. package/.15kebfvs698dc1603026467~ +1 -0
  20. package/.15m9gh7cg9lci2505313902~ +1 -0
  21. package/.15oaq931mo23r411018264~ +1 -0
  22. package/.15obr43t6z39s1934090498~ +29 -0
  23. package/.15zq425y4ogjy3645715121~ +44 -0
  24. package/.162swnlob3ioj116163238~ +6 -0
  25. package/.16iwuczj3cjja1819779385~ +89 -0
  26. package/.16kipcjdaw045938027767~ +2 -0
  27. package/.17lcsvvhw3r0n1024189693~ +191 -0
  28. package/.17o16rda7z5gj1722407514~ +400 -0
  29. package/.17odkco0hza9z3351822036~ +18 -0
  30. package/.17umosls5x74o1297092232~ +81 -0
  31. package/.183f2w0o02zj22469803059~ +5 -0
  32. package/.18rn7m062ejqc249671519~ +5 -0
  33. package/.18ts89hvyk7ik2894865221~ +58 -0
  34. package/.18vfhx0izu4i33542565794~ +0 -0
  35. package/.1a1nrqm00zvtu2477785931~ +83 -0
  36. package/.1agvtfwwnqmwu3798436313~ +22 -0
  37. package/.1b9s80ytqkr272731949846~ +1 -0
  38. package/.1bw83uge5zsu54080141650~ +40 -0
  39. package/.1c3km16h6iakm3715951672~ +0 -0
  40. package/.1c4f4xari1yy1623757157~ +56 -0
  41. package/.1ccq8b4bzkb4849340544~ +26 -0
  42. package/.1ce9uwdvc82yh719955153~ +5 -0
  43. package/.1cjjxfkzf0rcn1084807587~ +5 -0
  44. package/.1cvu6hevrwx1i751765662~ +68 -0
  45. package/.1d1tkh8iogc3w2972838288~ +5 -0
  46. package/.1dof517fpthxp830379003~ +1 -0
  47. package/.1dsm0o2sierpu4198712502~ +0 -0
  48. package/.1dy08uplgw16p1442327199~ +141 -0
  49. package/.1e3xuevzinhbc885709015~ +16 -0
  50. package/.1esbfyja7ismd1929269465~ +1 -0
  51. package/.1f8g1n2pno2kl97531592~ +0 -0
  52. package/.1fe1eugr6o2m1664086712~ +0 -0
  53. package/.1g5hiv3sx3qbj3787143599~ +33 -0
  54. package/.1ght76sv24t753304850094~ +5 -0
  55. package/.1gtwt6wuu3v1o2028351054~ +904 -0
  56. package/.1gx6suvhpguml1504289324~ +1 -0
  57. package/.1h9ton586fbmo3607369266~ +1 -0
  58. package/.1hy4jza4hg37o3201245005~ +45 -0
  59. package/.1i4xqs8ap7xqq3110932256~ +1 -0
  60. package/.1ibdm69ica795743641695~ +11 -0
  61. package/.1ibyaanq992i61326150808~ +5 -0
  62. package/.1iclrjvyz4iqd2821248293~ +87 -0
  63. package/.1j0j3a7kvt7981654034609~ +36 -0
  64. package/.1jbzqqfxips3q973567988~ +0 -0
  65. package/.1jha9m5qypyd3237825042~ +37 -0
  66. package/.1jhbc1rtgtyda1969698392~ +43 -0
  67. package/.1ji6w1ww8l2o13509217657~ +27 -0
  68. package/.1jj1a6lcq625z3070549186~ +135 -0
  69. package/.1jn0vmi9lyd0g1482872373~ +49 -0
  70. package/.1jxq9rj0vxob13948164849~ +0 -0
  71. package/.1k133365os32t1921063678~ +1 -0
  72. package/.1k54a4kk1o1eb69149399~ +0 -0
  73. package/.1kkufn3golnd61672340479~ +0 -0
  74. package/.1krlow7k4q1vu1382870816~ +61 -0
  75. package/.1kt5mkau5afp52058617316~ +0 -0
  76. package/.1l1u7oga0cblg2851602315~ +0 -0
  77. package/.1l6x6gmupwxvh3759704356~ +1 -0
  78. package/.1lev5h7777jk62907878574~ +0 -0
  79. package/.1ljoqlmxtri4u471366957~ +5 -0
  80. package/.1lmu4gyeg65sn1711976930~ +43 -0
  81. package/.1lnhfpqnfqqfz2003724656~ +11 -0
  82. package/.1lt1g1mvfgb5j4266255235~ +28 -0
  83. package/.1lxqi59es6rrn2802385028~ +58 -0
  84. package/.1mahmttkt5ix3605289782~ +5 -0
  85. package/.1mc7nnauqac5g1364251658~ +25 -0
  86. package/.1mdctn2ghj9k63251473180~ +1 -0
  87. package/.1mp1u5klt3tdl3870346703~ +1 -0
  88. package/.1mw8wcpt26el61936058094~ +44 -0
  89. package/.1n63dyghkc8jo200251661~ +1 -0
  90. package/.1oakazs0ei8s2364924190~ +1 -0
  91. package/.1od47pemj5i7r2847175167~ +628 -0
  92. package/.1oeqx6o1i9ydp1054998532~ +137 -0
  93. package/.1pd299ftouc5c1650400787~ +1 -0
  94. package/.1pgpi36ml535e3941623899~ +100 -0
  95. package/.1pnuos6kft5jh2977940398~ +0 -0
  96. package/.1pp4dnqadmhen4182791997~ +5 -0
  97. package/.1pra1dmqltbik2575948847~ +5 -0
  98. package/.1pwrqj8ljo2m94160442355~ +1 -0
  99. package/.1q5vsyu8x3la7737019296~ +64 -0
  100. package/.1qj0a29jpnx7h646472455~ +5 -0
  101. package/.1qnsipef6yffq2013753806~ +0 -0
  102. package/.1qz5ed6w7ljp71459721291~ +0 -0
  103. package/.1r08xq0r3k2tu2371397069~ +26 -0
  104. package/.1r5oswraz0ye83984878240~ +29 -0
  105. package/.1s2hvzezodncb1354771824~ +122 -0
  106. package/.1sa4ts24rqxlw566769119~ +5 -0
  107. package/.1sjj4cumgba0p4125293219~ +1 -0
  108. package/.1t7kms9ugsusj510827519~ +1 -0
  109. package/.1taft47ga5f882850052124~ +5 -0
  110. package/.1tasp7zrezgn51676497553~ +1 -0
  111. package/.1td38r74dxbm9515756242~ +0 -0
  112. package/.1toye7ga3pfla4276397754~ +26 -0
  113. package/.1u8e37ck883tz3960238568~ +1 -0
  114. package/.1uip1w96yk5ha983874073~ +40 -0
  115. package/.1uxyhu36oz9ur862165667~ +5 -0
  116. package/.1v0n6knh9apy52021270197~ +50 -0
  117. package/.1v0puqjyle06e617329989~ +0 -0
  118. package/.1vb155ft29adf3903541491~ +1 -0
  119. package/.1vfr6s6kxe4va1960191265~ +1 -0
  120. package/.1vklw1t7ijh814282541105~ +42 -0
  121. package/.1vogdyv3tmz7q3503287797~ +183 -0
  122. package/.1vycghooil3qo3909296198~ +5 -0
  123. package/.1w39cg37nhtng1565007916~ +5 -0
  124. package/.1whd4msxs8fgz2685716031~ +8 -0
  125. package/.1wm1msbyloior467390473~ +5 -0
  126. package/.1wns1vrdmyulg1748631284~ +1 -0
  127. package/.1x93s0kzoi5nh1818809799~ +3 -0
  128. package/.1xdtkfz4acq8m1600020550~ +62 -0
  129. package/.1xix6og83yrh82283780791~ +31 -0
  130. package/.1xj5cxtmudrhy576371930~ +23 -0
  131. package/.1y0za7dvgim2h1733847930~ +5 -0
  132. package/.1yl3al13l8kg2355785228~ +1133 -0
  133. package/.1yzqoti3miog72630858031~ +60 -0
  134. package/.1z9ddth4824kp1894768968~ +5 -0
  135. package/.1zkyeg9fzlkxs3393119001~ +9 -0
  136. package/.1zxewxwkecty52790248441~ +1 -0
  137. package/.203x6u8m3ipcr3686538493~ +52 -0
  138. package/.21motxybma5j01509553865~ +0 -0
  139. package/.227uubrh9awvu1450662436~ +38 -0
  140. package/.2281q7wdabozj737187844~ +1 -0
  141. package/.22bhkipeae6ie2151902860~ +1 -0
  142. package/.22c2b14l7a2tg3686359746~ +71 -0
  143. package/.23b1yood9hlix3156660663~ +1 -0
  144. package/.23mtj0rxd63y1845686844~ +154 -0
  145. package/.23za5zy17688n2033225056~ +32 -0
  146. package/.241ffmj84poj82685659043~ +1 -0
  147. package/.24h09i5wpjix91031113020~ +1 -0
  148. package/.24t0fuq7ruybu1687973865~ +0 -0
  149. package/.24tf5v9cb8mjy856121635~ +40 -0
  150. package/.253iqvjynv1kp4248214651~ +37 -0
  151. package/.25pva2ff6vwek768998118~ +65 -0
  152. package/.261jrkwuhshjs1517093944~ +3 -0
  153. package/.269xm75mylhup3180398191~ +0 -0
  154. package/.26di48xmqc5v63800794606~ +55 -0
  155. package/.26dijratxb4jb2672899126~ +1 -0
  156. package/.26qjyg1p833oi2055710078~ +0 -0
  157. package/.27beehv11enxi913747745~ +10 -0
  158. package/.27u83t454e7xf848381419~ +1 -0
  159. package/.27vzjpfz4pssa581626631~ +119 -0
  160. package/.27z430ojxqzvw1218526954~ +32 -0
  161. package/.28290i1dyb5442654687940~ +28 -0
  162. package/.28gctqeilept62219560245~ +3877 -0
  163. package/.28odmmd8p8c3n3323893199~ +1 -0
  164. package/.28s04zau6hkn62480307329~ +1 -0
  165. package/.28zmai5ipekg93370495824~ +5 -0
  166. package/.293wsp54ud3vq3120794255~ +1 -0
  167. package/.2974yes9y7w224066171818~ +143 -0
  168. package/.297l35apffbgo2395112676~ +1 -0
  169. package/.29e322yocabk42537057133~ +62 -0
  170. package/.29p3vvct5s1823122443735~ +20 -0
  171. package/.29rsmidv7xjx94259901899~ +5 -0
  172. package/.2a2b8twcmyh042748420589~ +102 -0
  173. package/.2a44gek172lcf4119931147~ +31 -0
  174. package/.2a84e3mpnmlxz2922567501~ +25 -0
  175. package/.2aj1dgxjojjxa1020318125~ +1 -0
  176. package/.2alb0dbv0g2la3759643739~ +1 -0
  177. package/.2am05jz2ttewk226192306~ +46 -0
  178. package/.2aoynfo28570d2002532653~ +5 -0
  179. package/.2bb04ktpn7isx1795804911~ +5 -0
  180. package/.2bglxlzupk3t62860368596~ +1 -0
  181. package/.2bgnsysi1qye526803916~ +1 -0
  182. package/.2c088lxl2nf013950916128~ +1 -0
  183. package/.2cdyjnfibvbzk518685807~ +5 -0
  184. package/.2ea7eu6hxny6q2843495014~ +0 -0
  185. package/.2ejvcdxgp9oft1145113614~ +58 -0
  186. package/.2eohh4nj94xtu2674101062~ +0 -0
  187. package/.2era2yqowbflc3097534780~ +37 -0
  188. package/.2es1qr48z84pv3407379162~ +63 -0
  189. package/.2eyclmr52zejp1370998661~ +5 -0
  190. package/.2f1rr7b0a1d7g2767432904~ +1 -0
  191. package/.2g4mg0mw23ti23079346858~ +28 -0
  192. package/.2gkl2a4dcfzc23964915329~ +0 -0
  193. package/.2h8q5z76c8iap4146792901~ +22 -0
  194. package/.2hhsfdstxpio72629786162~ +0 -0
  195. package/.2hwwzj78etbev1768472794~ +1 -0
  196. package/.2i5se734n7pj02714411453~ +7 -0
  197. package/.2i8j11v3vbzwl3291437227~ +31 -0
  198. package/.2icmktdtmoaln2190125344~ +33 -0
  199. package/.2idc4nmhbnjkr3129730516~ +66 -0
  200. package/.2is2fitjuvq7u2434386411~ +1 -0
  201. package/.2itrvtt8hmh2g1915278859~ +0 -0
  202. package/.2iy6olikzgw4o1415667821~ +5 -0
  203. package/.2j4yh3gex0qqc4205290854~ +0 -0
  204. package/.2jbyckxslwl5q3707375400~ +179 -0
  205. package/.2jlzwsx06ccoo436588672~ +5 -0
  206. package/.2jqkhe2stlmkl3431459884~ +1 -0
  207. package/.2jv1hnao69iqv1135593507~ +148 -0
  208. package/.2jxp6nzne77ul1121207824~ +110 -0
  209. package/.2jznxr43l1lby39672370~ +10 -0
  210. package/.2k33twa4vb4571573471693~ +1 -0
  211. package/.2k4f3q4a5yqez3541425671~ +102 -0
  212. package/.2k8y8nih2szwa1967545770~ +1 -0
  213. package/.2kmkv83j1vohi4167272997~ +1 -0
  214. package/.2l310phblwkn42411620554~ +0 -0
  215. package/.2lc6tjz22s0mt2920088089~ +31 -0
  216. package/.2lrr80p7mvuuf2409419719~ +216 -0
  217. package/.2m46p9j8cgrb22722613749~ +5 -0
  218. package/.2mak0s91aaq161821854781~ +1 -0
  219. package/.2mhaoumq5ofp51817670934~ +59 -0
  220. package/.2mxvjkqgqp6jv654823037~ +38 -0
  221. package/.2n5v3rkqmeo07113983488~ +124 -0
  222. package/.2n6abvahcj85t1471017378~ +5 -0
  223. package/.2neidr3jvtuos3947779986~ +9 -0
  224. package/.2nigc4wuq5cxk3429819584~ +5 -0
  225. package/.2nkxyc1hwa6dl824547234~ +29 -0
  226. package/.2nry9k0xdcgu1737155015~ +0 -0
  227. package/.2nuatmz1jj7u13701560675~ +0 -0
  228. package/.2o0rj13kx3ofp1528749978~ +5 -0
  229. package/.2o8ns2dni8sq43317794183~ +4 -0
  230. package/.2orduglgrsfln4155117007~ +1 -0
  231. package/.2owwbjldj9r2z3747396580~ +5 -0
  232. package/.2p50q7ih72sce3090454917~ +1 -0
  233. package/.2p85j3n10xm0i3801111893~ +1 -0
  234. package/.2pcfr5ost3t8x1916107804~ +5 -0
  235. package/.2pheqai6js25a1137361529~ +79 -0
  236. package/.2pke45sksofwj1004641271~ +5 -0
  237. package/.2ql38euuqnoy3696759808~ +123 -0
  238. package/.2qx9tb7ttv4kj3753029942~ +0 -0
  239. package/.2rh2p75x2iohu4286375103~ +0 -0
  240. package/.2rqseqol6sii63693929867~ +42 -0
  241. package/.2rtb8fljlbt4z2092636315~ +5 -0
  242. package/.2sitontl9zv7k989095683~ +1 -0
  243. package/.2sumckzkf6inc3037839420~ +46 -0
  244. package/.2sxus1ge734sc2055831895~ +0 -0
  245. package/.2ui1ufm6um3ew3207223830~ +134 -0
  246. package/.2uwvucq1upxmb3946253608~ +1 -0
  247. package/.2uz4jqhgjy0u43246103708~ +38 -0
  248. package/.2v6pvcvymakli124117893~ +22 -0
  249. package/.2v7n2r8yaxtj63907558506~ +191 -0
  250. package/.2vf4ld7ko06rz827853413~ +0 -0
  251. package/.2vw9cvcqj3njx4015131583~ +5 -0
  252. package/.2w01io1er57qr1531918602~ +1 -0
  253. package/.2wclho9qme74x1915135050~ +18 -0
  254. package/.2wezwvtkd2lmr1644625228~ +1 -0
  255. package/.2wg6sd5gwvhnt871965459~ +1 -0
  256. package/.2wu4bj8km6mgi1637289598~ +42 -0
  257. package/.2ww0qqx1qrpye2349203581~ +898 -0
  258. package/.2x4jvr3abso9v3033863453~ +1 -0
  259. package/.2xsh2ufi2z5vs1183027099~ +5 -0
  260. package/.2ytxht5pxnch72470357200~ +6 -0
  261. package/.2z92ycdrz3a1o3062754157~ +190 -0
  262. package/.2zbhn8ub0tq0p3915616493~ +58 -0
  263. package/.2zeuhskh5he07529439039~ +21 -0
  264. package/.2zg62s3g166ju3067737050~ +1 -0
  265. package/.309epuyovrw253423629891~ +57 -0
  266. package/.30g99o6ofh99z193472967~ +5 -0
  267. package/.30hoynx8z3yrb2385169428~ +1 -0
  268. package/.30iexfq90oeis3767491456~ +30 -0
  269. package/.30jil41jj9hoa420757755~ +1 -0
  270. package/.30jyb5qvxxjpf1988048841~ +18 -0
  271. package/.313gbxymr9v193269183776~ +0 -0
  272. package/.320chegsq06tt3221565641~ +1 -0
  273. package/.32fpr8sv5zqrc1340207193~ +5 -0
  274. package/.32yltdqu5vfxe1759274202~ +5 -0
  275. package/.332pixy7fs61w65903022~ +36 -0
  276. package/.339m7bxfb94gu88802246~ +5 -0
  277. package/.33i4scm0qth52139373522~ +518 -0
  278. package/.33zx6sybvp67g1293988556~ +0 -0
  279. package/.34xt9kyk7xx6y1975279869~ +96 -0
  280. package/.353g9kuh4f61k3255636656~ +5 -0
  281. package/.35bax92xmisy83669870306~ +129 -0
  282. package/.35k28ipj1w8fg895818612~ +3 -0
  283. package/.35rd6dwekodfd1214052327~ +15 -0
  284. package/.36gpihsc7yrzi4198455788~ +58 -0
  285. package/.36p0b8vly84cn1225266395~ +0 -0
  286. package/.36pqazlgwdfwj3950316203~ +0 -0
  287. package/.36skp5440fh9l3178641287~ +143 -0
  288. package/.36xvgs5gnm2lk2934335117~ +0 -0
  289. package/.37gze5nbg89tn3648899686~ +106 -0
  290. package/.37kcv3gj8vfzo945988828~ +46 -0
  291. package/.38mlnmc19bgf4341919534~ +22 -0
  292. package/.38o6golibikz21230537896~ +1 -0
  293. package/.38p61lmzcu0rf107683206~ +175 -0
  294. package/.397tioksx01xw2456939194~ +5 -0
  295. package/.39a6vitc9jr943494957978~ +49 -0
  296. package/.39b9ewnm8v6pv1869092260~ +1 -0
  297. package/.39dko26ojf5rv46135612~ +3 -0
  298. package/.39lr4jbs5ml4a3497324322~ +21 -0
  299. package/.39rpfskonondp1562809914~ +0 -0
  300. package/.3adl2luw4cebg1845312515~ +26 -0
  301. package/.3ag1a9ogqbay72842186109~ +1 -0
  302. package/.3b1t8gg5syj283121715999~ +42 -0
  303. package/.3b6cmjwur0bbc2102891025~ +1 -0
  304. package/.3b6zz5zm0x2mb4112640944~ +0 -0
  305. package/.3c1lhp0wok0nk3598581795~ +168 -0
  306. package/.3cvhv0x6vazb4931313715~ +43 -0
  307. package/.3cxbpt3j9yhbr2883458382~ +16 -0
  308. package/.3d0ff5wli5ggt2036501705~ +55 -0
  309. package/.3djzslufow12w3031143355~ +0 -0
  310. package/.3dmrbn3bmunat857555010~ +29 -0
  311. package/.3dq25d8f9o5ao793394336~ +0 -0
  312. package/.3dypup0b9zksj3088223637~ +0 -0
  313. package/.3e93rxyoq9z01815047779~ +15 -0
  314. package/.3edb94ognl6as1640169920~ +1 -0
  315. package/.3eoh4dku6h7af409567786~ +0 -0
  316. package/.3f1lr5cyqsgrg2014144268~ +55 -0
  317. package/.3fffe0krdlsd32051661593~ +2 -0
  318. package/.3fidcv2b2y8gq3103560043~ +41 -0
  319. package/.3fsuen5xnevzz3796135550~ +54 -0
  320. package/.3fu60shivl4gn2031866129~ +1 -0
  321. package/.3fva0z6bvwteh1395049228~ +40 -0
  322. package/.3fxohqnz0e93l779243415~ +1 -0
  323. package/.3gwy9a6symur11725184847~ +45 -0
  324. package/.3h6y4wmal7glf3011994092~ +1 -0
  325. package/.3hj6byks40pos34084510~ +0 -0
  326. package/.3hjpqwkmnlpxd1505151696~ +5 -0
  327. package/.3hq147ve6bbjd563354974~ +79 -0
  328. package/.3hwl1qalklu9g3837493393~ +5 -0
  329. package/.3i6o14vs451s22755057300~ +0 -0
  330. package/.3i78sxmab0q7v1480495828~ +5 -0
  331. package/.3iqscrw4vueio1140833855~ +5 -0
  332. package/.3iwoh3fg13oo4824656621~ +113 -0
  333. package/.3jbtqgciwjrto3717938548~ +40 -0
  334. package/.3jgvptkad5z7h3586071166~ +5 -0
  335. package/.3jiki3myt6nj31583285087~ +1 -0
  336. package/.3jt5h2cal8v864261600338~ +0 -0
  337. package/.3jt5rx9wnd0ld234275893~ +1 -0
  338. package/.3k7udu1btobar1617030290~ +1 -0
  339. package/.3ka4d0j59x5z33151824935~ +5 -0
  340. package/.3kbe19nei1n9z506901208~ +1 -0
  341. package/.3kmcf9eh4vgyt413601944~ +5 -0
  342. package/.3knhbwbcv47kn1366578523~ +5 -0
  343. package/.3kqshr5nm5pje1185287852~ +5 -0
  344. package/.3l0xyjgq3jckz2440540082~ +58 -0
  345. package/.3l3gp25tb5udi4073829557~ +0 -0
  346. package/.3l4l5zcydbo8t1650090963~ +43 -0
  347. package/.3llf11a6y6v7e2937755977~ +2 -0
  348. package/.3lzp5lwxh550a3696103830~ +22 -0
  349. package/.3mz5wurutwxgr3682216161~ +44 -0
  350. package/.3n4r0jtu8thvm2598207744~ +20 -0
  351. package/.3nfcgvrc4huxg263624324~ +1 -0
  352. package/.3ns9bu1hk4m091745683722~ +43 -0
  353. package/.3nsk8idgknn8z3636783124~ +1 -0
  354. package/.3occvj5aqvouj2606275959~ +9798 -0
  355. package/.3ojqbfkmp06d3972387030~ +0 -0
  356. package/.3opq5vrvdz0qu2829190270~ +0 -0
  357. package/.3oqehsphn5fh92234214544~ +112 -0
  358. package/.3ospup0k4hsfe247229966~ +26 -0
  359. package/.3ozhgukt5qz7o495869311~ +10 -0
  360. package/.3pbek487atkgx3975156135~ +137 -0
  361. package/.3plwhze1kh93g2821462760~ +166 -0
  362. package/.3q2rikx4x4c463440283132~ +7 -0
  363. package/.3q7wsid1op2ps1946113274~ +1 -0
  364. package/.3rvgzymk01i3n3713837507~ +167 -0
  365. package/.3sqawoy2ro4us2631593937~ +66 -0
  366. package/.3sqr2lmh137im829274841~ +40 -0
  367. package/.3su4sqm1gjlwc1018589512~ +1 -0
  368. package/.3sutzc4hxafv23574462652~ +10 -0
  369. package/.3svrx7fmt0ack3179552017~ +62 -0
  370. package/.3szjns2q2qpsx2114251279~ +18 -0
  371. package/.3t20ml7op2uem1208226102~ +1 -0
  372. package/.3t9ndf9rh2xho2923082359~ +0 -0
  373. package/.3tdiig0kvsmll4012939608~ +0 -0
  374. package/.3tnmwg9uj8wsz320817598~ +1 -0
  375. package/.3udscu5iru0av1139192605~ +138 -0
  376. package/.3unntri6rcy0i1721696573~ +34 -0
  377. package/.3ur9m0xoi7jd61539943890~ +5 -0
  378. package/.3uzx817kp0sk84116207118~ +38 -0
  379. package/.3vic8umnlo3tv3016161514~ +1 -0
  380. package/.3vn73f2o0cf0r3971540318~ +41 -0
  381. package/.3vpmpp97jkr5w1188886173~ +25 -0
  382. package/.3vzdy769mqu063810593396~ +115 -0
  383. package/.3yqobuiq8u9x1554302470~ +1 -0
  384. package/.3ywedyp8mgpo3629876734~ +5 -0
  385. package/.43ixunofakod2495516571~ +54 -0
  386. package/.472ihf4mmidi1904079000~ +8 -0
  387. package/.4jv4d17vg0d53351776898~ +57 -0
  388. package/.551dn5jhnnju144752964~ +45 -0
  389. package/.57abo7wxbpcs1502411293~ +33 -0
  390. package/.5h57em0xx2uc2396663983~ +60 -0
  391. package/.5parwpklmz081686408756~ +1 -0
  392. package/.6ewx6767k46o2908216367~ +5 -0
  393. package/.6gg4j4nfif7x1033191544~ +5 -0
  394. package/.6oi4m19s4wm527068511~ +0 -0
  395. package/.6sx9ppwxr6gm4204660296~ +1 -0
  396. package/.7idfkwgr3gbp256398058~ +33 -0
  397. package/.88rgww4ma36n3533403168~ +62 -0
  398. package/.88vgwoll2j9s3515583568~ +5 -0
  399. package/.8ehx2yz3i9973551251302~ +0 -0
  400. package/.8vtbpi40j0rq1786300431~ +5 -0
  401. package/.941z40mxdu1b2889515977~ +2 -0
  402. package/.95el4cno26iw3987534559~ +7 -0
  403. package/.a5ujkq4n9cwk3094111830~ +0 -0
  404. package/.aabr25ngut7s944869094~ +7 -0
  405. package/.aovadh0o288e3149932842~ +44 -0
  406. package/.bb81q1foihe73573312315~ +1 -0
  407. package/.berfxqvefinu450206808~ +1 -0
  408. package/.bu8vygooqwcv820176316~ +18 -0
  409. package/.c0zruh0tpbq31622552571~ +12 -0
  410. package/.c4d0o2n2d76s3226734365~ +5 -0
  411. package/.cache/replit/nix/env.json +1 -0
  412. package/.cjcao8esnv1n3333504904~ +1 -0
  413. package/.cjp9d3d99pza641796410~ +0 -0
  414. package/.ckspfutgjv1z1024550144~ +124 -0
  415. package/.cm3l813oph6x1631579838~ +5 -0
  416. package/.cm6rmi6zuex12552202253~ +0 -0
  417. package/.config/configstore/update-notifier-npm.json +4 -0
  418. package/.cvv0i5eyu9861159801169~ +3 -0
  419. package/.cwxw18i2z5uo8070200~ +0 -0
  420. package/.d4p7zqjqagr93465124918~ +5 -0
  421. package/.d7gv1w49g1t5978702571~ +4 -0
  422. package/.da7937lbkyab2840770081~ +25 -0
  423. package/.dpm4jqakt5f23962068621~ +1 -0
  424. package/.e1jen1t286kt2094874529~ +45 -0
  425. package/.eeocd7cjzzbe3807606656~ +1 -0
  426. package/.ehbvd91iysif1745678093~ +205 -0
  427. package/.etktjsd8aa0k602384377~ +46 -0
  428. package/.fez0ldeaoqs82489136305~ +67 -0
  429. package/.fo1dvi38u9743896420676~ +50 -0
  430. package/.g5gxaq23coy03806728314~ +33 -0
  431. package/.ge3qskprhmvf887831962~ +1 -0
  432. package/.gjmg7mfepcjv1201709417~ +190 -0
  433. package/.godo8u6hmeh61555162256~ +1 -0
  434. package/.gssyikzgf9zw3674741004~ +1 -0
  435. package/.gxiawruyatt61454121973~ +16 -0
  436. package/.gz9bxoz2qx3273940574~ +5 -0
  437. package/.hacobw0a1cez2244818935~ +8 -0
  438. package/.hcg120mkjvwl1902622193~ +30 -0
  439. package/.hrj7swqv7u2f672210500~ +0 -0
  440. package/.ht0c44i3uu82190446773~ +2 -0
  441. package/.huned6wyo68m259851920~ +69 -0
  442. package/.hwzwznhe7b8m2588864820~ +1 -0
  443. package/.i0fc17g7sag4950598326~ +43 -0
  444. package/.icukae02z73c1256854950~ +3 -0
  445. package/.ide6mq198hfb4086599346~ +1 -0
  446. package/.injs115092cl1076900915~ +0 -0
  447. package/.jb2hc2neo3lh3292228122~ +1 -0
  448. package/.jpwpegk4epm91345563788~ +5 -0
  449. package/.juc08y51hcaw2534784803~ +65 -0
  450. package/.k3oovnl0l8n54100463127~ +23 -0
  451. package/.k41co211hr8333667245~ +33 -0
  452. package/.k5ezd3cc6fly3736128928~ +26 -0
  453. package/.kk5otxu1wdmm3738382659~ +5 -0
  454. package/.kmapz3w89p23765985971~ +5 -0
  455. package/.l67dk13uf7bz4241145366~ +1 -0
  456. package/.lgc8w27h31i066158222~ +31 -0
  457. package/.liguu6b84gpv111565250~ +77 -0
  458. package/.m4rlshnt7afg85435358~ +0 -0
  459. package/.m8afkftbrf6t1507877154~ +1 -0
  460. package/.mn24mjzqy2581742599686~ +1 -0
  461. package/.mpr4clsr6die3721927047~ +31 -0
  462. package/.mt3lbwul9gqx3961120840~ +128 -0
  463. package/.n7vn856mn8bo1690122400~ +39 -0
  464. package/.n87cpqrrww1k2068922549~ +1 -0
  465. package/.nkxq1ssvv9xy2709416196~ +5 -0
  466. package/.oh18zjvbcnln3882327119~ +1 -0
  467. package/.ohf6hza6agp7898893110~ +1 -0
  468. package/.oj1hgqjmqj2f2704649393~ +717 -0
  469. package/.onsdnq6jyu53240985077~ +23 -0
  470. package/.ow1zxfydp5qq3607654581~ +0 -0
  471. package/.oyuiyttcckbp2343293247~ +1 -0
  472. package/.p44l63l8ectc3361364369~ +1 -0
  473. package/.ph3mshsq682a2271606102~ +60 -0
  474. package/.pz25xe0l5fri1327842439~ +1 -0
  475. package/.ql4igy8wtg623099207478~ +8 -0
  476. package/.qpejebq7rnjm3421752185~ +1 -0
  477. package/.replit +6 -0
  478. package/.rplas0l9g8lp1805141666~ +1 -0
  479. package/.rxoawymlox6e44043914~ +92 -0
  480. package/.s9osotjya7jy2384519992~ +0 -0
  481. package/.sjh768z8khhb3519645975~ +35 -0
  482. package/.t8gen2wl41dp490640253~ +1 -0
  483. package/.tchlyvvlqto1959613069~ +1553 -0
  484. package/.tkvbm2tfuv2a815177943~ +35 -0
  485. package/.tqay45yz3v9f2970423582~ +1 -0
  486. package/.u6kja2g03g6e421942798~ +1 -0
  487. package/.vfqrldzsw3qb1703032508~ +131 -0
  488. package/.vmpch6h7luy03572133091~ +39 -0
  489. package/.vpzx2gjpfg163934792219~ +33 -0
  490. package/.vs4fb8zwm8502692774503~ +155 -0
  491. package/.vv7todb6fhic2818468436~ +1 -0
  492. package/.w6swvtt894da1090000254~ +1 -0
  493. package/.w9cs9i79day91114236209~ +0 -0
  494. package/.wa685b1scl5b4110564116~ +1 -0
  495. package/.wg446us1sab11025383459~ +0 -0
  496. package/.wk5wqycx2aq13181454918~ +489 -0
  497. package/.wqzuk9hgjng32571763176~ +0 -0
  498. package/.wtwcl2dud1aj1535416583~ +52 -0
  499. package/.wvyijisgbpfx2012597012~ +0 -0
  500. package/.xfr3b1wu9vzp2610754112~ +5 -0
  501. package/.xhcf613oksrg1591880987~ +0 -0
  502. package/.xqhk38v4zdsu2802007983~ +112 -0
  503. package/.y4tn7qkymq6t1811274166~ +109 -0
  504. package/.yahgzbbrpwls3177458907~ +31 -0
  505. package/.ynmnlx97mw6o234850451~ +39 -0
  506. package/.yq8ssg1l9dpk2338570127~ +0 -0
  507. package/.yzldn2r24c7v1098551596~ +0 -0
  508. package/.zczm44zyytsj1763543339~ +0 -0
  509. package/.zpifsvg0gj7d821207284~ +5 -0
  510. package/package.json +9 -3
  511. package/replit.nix +7 -0
  512. package/zyx/.gitattributes +2 -0
  513. package/zyx/Extra/ExtraAddons.js +78 -0
  514. package/zyx/Extra/ExtraFindUID.js +60 -0
  515. package/zyx/Extra/ExtraGetThread.js +118 -0
  516. package/zyx/Extra/ExtraTranslate.js +62 -0
  517. package/zyx/Extra/ExtraUptimeRobot.js +59 -0
  518. package/zyx/Extra/Html/Classic/script.js +231 -0
  519. package/zyx/Extra/Html/Classic/style.css +8 -0
  520. package/zyx/Extra/PM2/ecosystem.config.js +23 -0
  521. package/zyx/Extra/Security/Index.js +174 -0
  522. package/zyx/Extra/Security/Step_1.js +15 -0
  523. package/zyx/Extra/Security/Step_2.js +23 -0
  524. package/zyx/Extra/Security/Step_3.js +23 -0
  525. package/zyx/Extra/Src/History.js +115 -0
  526. package/zyx/Extra/Src/Last-Run.js +65 -0
  527. package/zyx/Extra/Src/Premium.js +84 -0
  528. package/zyx/Extra/Src/SecurityCheck.js +2 -0
  529. package/zyx/Func/AcceptAgreement.js +32 -0
  530. package/zyx/Func/ClearCache.js +63 -0
  531. package/zyx/Func/ReportV1.js +54 -0
  532. package/zyx/Language/index.json +176 -0
  533. package/zyx/OldSecurity.js +100 -0
  534. package/zyx/README.md +129 -0
  535. package/zyx/Settings/Database.js +21 -0
  536. package/zyx/Settings/Location.js +60 -0
  537. package/zyx/Settings/Location.json +24 -0
  538. package/zyx/Settings/Settings.js +60 -0
  539. package/zyx/StateCrypt.js +98 -0
  540. package/zyx/broadcast.js +38 -0
  541. package/zyx/index.js +1327 -0
  542. package/zyx/logger.js +65 -0
  543. package/zyx/package.json +87 -0
  544. package/zyx/src/K2IMG.js +8 -0
  545. package/zyx/src/Premium.js +30 -0
  546. package/zyx/src/Screenshot.js +77 -0
  547. package/zyx/src/T2S.js +8 -0
  548. package/zyx/src/addExternalModule.js +16 -0
  549. package/zyx/src/addUserToGroup.js +79 -0
  550. package/zyx/src/changeAdminStatus.js +79 -0
  551. package/zyx/src/changeArchivedStatus.js +41 -0
  552. package/zyx/src/changeAvt.js +85 -0
  553. package/zyx/src/changeBio.js +65 -0
  554. package/zyx/src/changeBlockedStatus.js +36 -0
  555. package/zyx/src/changeGroupImage.js +106 -0
  556. package/zyx/src/changeNickname.js +45 -0
  557. package/zyx/src/changeThreadColor.js +62 -0
  558. package/zyx/src/changeThreadEmoji.js +42 -0
  559. package/zyx/src/createNewGroup.js +70 -0
  560. package/zyx/src/createPoll.js +60 -0
  561. package/zyx/src/deleteMessage.js +45 -0
  562. package/zyx/src/deleteThread.js +43 -0
  563. package/zyx/src/desktop.ini +2 -0
  564. package/zyx/src/forwardAttachment.js +48 -0
  565. package/zyx/src/getAccessToken.js +32 -0
  566. package/zyx/src/getCurrentUserID.js +7 -0
  567. package/zyx/src/getEmojiUrl.js +27 -0
  568. package/zyx/src/getFriendsList.js +73 -0
  569. package/zyx/src/getMessage.js +80 -0
  570. package/zyx/src/getThreadHistory.js +537 -0
  571. package/zyx/src/getThreadInfo.js +346 -0
  572. package/zyx/src/getThreadList.js +213 -0
  573. package/zyx/src/getThreadMain.js +219 -0
  574. package/zyx/src/getThreadPictures.js +59 -0
  575. package/zyx/src/getUID.js +59 -0
  576. package/zyx/src/getUserID.js +62 -0
  577. package/zyx/src/getUserInfo.js +129 -0
  578. package/zyx/src/getUserInfoMain.js +65 -0
  579. package/zyx/src/getUserInfoV2.js +35 -0
  580. package/zyx/src/getUserInfoV3.js +63 -0
  581. package/zyx/src/getUserInfoV4.js +55 -0
  582. package/zyx/src/getUserInfoV5.js +61 -0
  583. package/zyx/src/handleFriendRequest.js +46 -0
  584. package/zyx/src/handleMessageRequest.js +49 -0
  585. package/zyx/src/httpGet.js +49 -0
  586. package/zyx/src/httpPost.js +48 -0
  587. package/zyx/src/httpPostFormData.js +41 -0
  588. package/zyx/src/listenMqtt.js +725 -0
  589. package/zyx/src/logout.js +68 -0
  590. package/zyx/src/markAsDelivered.js +48 -0
  591. package/zyx/src/markAsRead.js +70 -0
  592. package/zyx/src/markAsReadAll.js +43 -0
  593. package/zyx/src/markAsSeen.js +51 -0
  594. package/zyx/src/muteThread.js +47 -0
  595. package/zyx/src/removeUserFromGroup.js +49 -0
  596. package/zyx/src/resolvePhotoUrl.js +37 -0
  597. package/zyx/src/searchForThread.js +43 -0
  598. package/zyx/src/sendMessage.js +334 -0
  599. package/zyx/src/sendTypingIndicator.js +80 -0
  600. package/zyx/src/setMessageReaction.js +109 -0
  601. package/zyx/src/setPostReaction.js +102 -0
  602. package/zyx/src/setTitle.js +74 -0
  603. package/zyx/src/threadColors.js +39 -0
  604. package/zyx/src/unfriend.js +43 -0
  605. package/zyx/src/unsendMessage.js +40 -0
  606. package/zyx/utils.js +1648 -0
  607. package/README.md +0 -5
@@ -0,0 +1,898 @@
1
+ import { htmlDecodeTree, xmlDecodeTree, BinTrieFlags, determineBranch, replaceCodePoint, } from "entities/lib/decode.js";
2
+ var CharCodes;
3
+ (function (CharCodes) {
4
+ CharCodes[CharCodes["Tab"] = 9] = "Tab";
5
+ CharCodes[CharCodes["NewLine"] = 10] = "NewLine";
6
+ CharCodes[CharCodes["FormFeed"] = 12] = "FormFeed";
7
+ CharCodes[CharCodes["CarriageReturn"] = 13] = "CarriageReturn";
8
+ CharCodes[CharCodes["Space"] = 32] = "Space";
9
+ CharCodes[CharCodes["ExclamationMark"] = 33] = "ExclamationMark";
10
+ CharCodes[CharCodes["Num"] = 35] = "Num";
11
+ CharCodes[CharCodes["Amp"] = 38] = "Amp";
12
+ CharCodes[CharCodes["SingleQuote"] = 39] = "SingleQuote";
13
+ CharCodes[CharCodes["DoubleQuote"] = 34] = "DoubleQuote";
14
+ CharCodes[CharCodes["Dash"] = 45] = "Dash";
15
+ CharCodes[CharCodes["Slash"] = 47] = "Slash";
16
+ CharCodes[CharCodes["Zero"] = 48] = "Zero";
17
+ CharCodes[CharCodes["Nine"] = 57] = "Nine";
18
+ CharCodes[CharCodes["Semi"] = 59] = "Semi";
19
+ CharCodes[CharCodes["Lt"] = 60] = "Lt";
20
+ CharCodes[CharCodes["Eq"] = 61] = "Eq";
21
+ CharCodes[CharCodes["Gt"] = 62] = "Gt";
22
+ CharCodes[CharCodes["Questionmark"] = 63] = "Questionmark";
23
+ CharCodes[CharCodes["UpperA"] = 65] = "UpperA";
24
+ CharCodes[CharCodes["LowerA"] = 97] = "LowerA";
25
+ CharCodes[CharCodes["UpperF"] = 70] = "UpperF";
26
+ CharCodes[CharCodes["LowerF"] = 102] = "LowerF";
27
+ CharCodes[CharCodes["UpperZ"] = 90] = "UpperZ";
28
+ CharCodes[CharCodes["LowerZ"] = 122] = "LowerZ";
29
+ CharCodes[CharCodes["LowerX"] = 120] = "LowerX";
30
+ CharCodes[CharCodes["OpeningSquareBracket"] = 91] = "OpeningSquareBracket";
31
+ })(CharCodes || (CharCodes = {}));
32
+ /** All the states the tokenizer can be in. */
33
+ var State;
34
+ (function (State) {
35
+ State[State["Text"] = 1] = "Text";
36
+ State[State["BeforeTagName"] = 2] = "BeforeTagName";
37
+ State[State["InTagName"] = 3] = "InTagName";
38
+ State[State["InSelfClosingTag"] = 4] = "InSelfClosingTag";
39
+ State[State["BeforeClosingTagName"] = 5] = "BeforeClosingTagName";
40
+ State[State["InClosingTagName"] = 6] = "InClosingTagName";
41
+ State[State["AfterClosingTagName"] = 7] = "AfterClosingTagName";
42
+ // Attributes
43
+ State[State["BeforeAttributeName"] = 8] = "BeforeAttributeName";
44
+ State[State["InAttributeName"] = 9] = "InAttributeName";
45
+ State[State["AfterAttributeName"] = 10] = "AfterAttributeName";
46
+ State[State["BeforeAttributeValue"] = 11] = "BeforeAttributeValue";
47
+ State[State["InAttributeValueDq"] = 12] = "InAttributeValueDq";
48
+ State[State["InAttributeValueSq"] = 13] = "InAttributeValueSq";
49
+ State[State["InAttributeValueNq"] = 14] = "InAttributeValueNq";
50
+ // Declarations
51
+ State[State["BeforeDeclaration"] = 15] = "BeforeDeclaration";
52
+ State[State["InDeclaration"] = 16] = "InDeclaration";
53
+ // Processing instructions
54
+ State[State["InProcessingInstruction"] = 17] = "InProcessingInstruction";
55
+ // Comments & CDATA
56
+ State[State["BeforeComment"] = 18] = "BeforeComment";
57
+ State[State["CDATASequence"] = 19] = "CDATASequence";
58
+ State[State["InSpecialComment"] = 20] = "InSpecialComment";
59
+ State[State["InCommentLike"] = 21] = "InCommentLike";
60
+ // Special tags
61
+ State[State["BeforeSpecialS"] = 22] = "BeforeSpecialS";
62
+ State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
63
+ State[State["InSpecialTag"] = 24] = "InSpecialTag";
64
+ State[State["BeforeEntity"] = 25] = "BeforeEntity";
65
+ State[State["BeforeNumericEntity"] = 26] = "BeforeNumericEntity";
66
+ State[State["InNamedEntity"] = 27] = "InNamedEntity";
67
+ State[State["InNumericEntity"] = 28] = "InNumericEntity";
68
+ State[State["InHexEntity"] = 29] = "InHexEntity";
69
+ })(State || (State = {}));
70
+ function isWhitespace(c) {
71
+ return (c === CharCodes.Space ||
72
+ c === CharCodes.NewLine ||
73
+ c === CharCodes.Tab ||
74
+ c === CharCodes.FormFeed ||
75
+ c === CharCodes.CarriageReturn);
76
+ }
77
+ function isEndOfTagSection(c) {
78
+ return c === CharCodes.Slash || c === CharCodes.Gt || isWhitespace(c);
79
+ }
80
+ function isNumber(c) {
81
+ return c >= CharCodes.Zero && c <= CharCodes.Nine;
82
+ }
83
+ function isASCIIAlpha(c) {
84
+ return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
85
+ (c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
86
+ }
87
+ function isHexDigit(c) {
88
+ return ((c >= CharCodes.UpperA && c <= CharCodes.UpperF) ||
89
+ (c >= CharCodes.LowerA && c <= CharCodes.LowerF));
90
+ }
91
+ export var QuoteType;
92
+ (function (QuoteType) {
93
+ QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
94
+ QuoteType[QuoteType["Unquoted"] = 1] = "Unquoted";
95
+ QuoteType[QuoteType["Single"] = 2] = "Single";
96
+ QuoteType[QuoteType["Double"] = 3] = "Double";
97
+ })(QuoteType || (QuoteType = {}));
98
+ /**
99
+ * Sequences used to match longer strings.
100
+ *
101
+ * We don't have `Script`, `Style`, or `Title` here. Instead, we re-use the *End
102
+ * sequences with an increased offset.
103
+ */
104
+ const Sequences = {
105
+ Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]),
106
+ CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]),
107
+ CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]),
108
+ ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]),
109
+ StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]),
110
+ TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
111
+ };
112
+ export default class Tokenizer {
113
+ constructor({ xmlMode = false, decodeEntities = true, }, cbs) {
114
+ this.cbs = cbs;
115
+ /** The current state the tokenizer is in. */
116
+ this.state = State.Text;
117
+ /** The read buffer. */
118
+ this.buffer = "";
119
+ /** The beginning of the section that is currently being read. */
120
+ this.sectionStart = 0;
121
+ /** The index within the buffer that we are currently looking at. */
122
+ this.index = 0;
123
+ /** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
124
+ this.baseState = State.Text;
125
+ /** For special parsing behavior inside of script and style tags. */
126
+ this.isSpecial = false;
127
+ /** Indicates whether the tokenizer has been paused. */
128
+ this.running = true;
129
+ /** The offset of the current buffer. */
130
+ this.offset = 0;
131
+ this.sequenceIndex = 0;
132
+ this.trieIndex = 0;
133
+ this.trieCurrent = 0;
134
+ /** For named entities, the index of the value. For numeric entities, the code point. */
135
+ this.entityResult = 0;
136
+ this.entityExcess = 0;
137
+ this.xmlMode = xmlMode;
138
+ this.decodeEntities = decodeEntities;
139
+ this.entityTrie = xmlMode ? xmlDecodeTree : htmlDecodeTree;
140
+ }
141
+ reset() {
142
+ this.state = State.Text;
143
+ this.buffer = "";
144
+ this.sectionStart = 0;
145
+ this.index = 0;
146
+ this.baseState = State.Text;
147
+ this.currentSequence = undefined;
148
+ this.running = true;
149
+ this.offset = 0;
150
+ }
151
+ write(chunk) {
152
+ this.offset += this.buffer.length;
153
+ this.buffer = chunk;
154
+ this.parse();
155
+ }
156
+ end() {
157
+ if (this.running)
158
+ this.finish();
159
+ }
160
+ pause() {
161
+ this.running = false;
162
+ }
163
+ resume() {
164
+ this.running = true;
165
+ if (this.index < this.buffer.length + this.offset) {
166
+ this.parse();
167
+ }
168
+ }
169
+ /**
170
+ * The current index within all of the written data.
171
+ */
172
+ getIndex() {
173
+ return this.index;
174
+ }
175
+ /**
176
+ * The start of the current section.
177
+ */
178
+ getSectionStart() {
179
+ return this.sectionStart;
180
+ }
181
+ stateText(c) {
182
+ if (c === CharCodes.Lt ||
183
+ (!this.decodeEntities && this.fastForwardTo(CharCodes.Lt))) {
184
+ if (this.index > this.sectionStart) {
185
+ this.cbs.ontext(this.sectionStart, this.index);
186
+ }
187
+ this.state = State.BeforeTagName;
188
+ this.sectionStart = this.index;
189
+ }
190
+ else if (this.decodeEntities && c === CharCodes.Amp) {
191
+ this.state = State.BeforeEntity;
192
+ }
193
+ }
194
+ stateSpecialStartSequence(c) {
195
+ const isEnd = this.sequenceIndex === this.currentSequence.length;
196
+ const isMatch = isEnd
197
+ ? // If we are at the end of the sequence, make sure the tag name has ended
198
+ isEndOfTagSection(c)
199
+ : // Otherwise, do a case-insensitive comparison
200
+ (c | 0x20) === this.currentSequence[this.sequenceIndex];
201
+ if (!isMatch) {
202
+ this.isSpecial = false;
203
+ }
204
+ else if (!isEnd) {
205
+ this.sequenceIndex++;
206
+ return;
207
+ }
208
+ this.sequenceIndex = 0;
209
+ this.state = State.InTagName;
210
+ this.stateInTagName(c);
211
+ }
212
+ /** Look for an end tag. For <title> tags, also decode entities. */
213
+ stateInSpecialTag(c) {
214
+ if (this.sequenceIndex === this.currentSequence.length) {
215
+ if (c === CharCodes.Gt || isWhitespace(c)) {
216
+ const endOfText = this.index - this.currentSequence.length;
217
+ if (this.sectionStart < endOfText) {
218
+ // Spoof the index so that reported locations match up.
219
+ const actualIndex = this.index;
220
+ this.index = endOfText;
221
+ this.cbs.ontext(this.sectionStart, endOfText);
222
+ this.index = actualIndex;
223
+ }
224
+ this.isSpecial = false;
225
+ this.sectionStart = endOfText + 2; // Skip over the `</`
226
+ this.stateInClosingTagName(c);
227
+ return; // We are done; skip the rest of the function.
228
+ }
229
+ this.sequenceIndex = 0;
230
+ }
231
+ if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
232
+ this.sequenceIndex += 1;
233
+ }
234
+ else if (this.sequenceIndex === 0) {
235
+ if (this.currentSequence === Sequences.TitleEnd) {
236
+ // We have to parse entities in <title> tags.
237
+ if (this.decodeEntities && c === CharCodes.Amp) {
238
+ this.state = State.BeforeEntity;
239
+ }
240
+ }
241
+ else if (this.fastForwardTo(CharCodes.Lt)) {
242
+ // Outside of <title> tags, we can fast-forward.
243
+ this.sequenceIndex = 1;
244
+ }
245
+ }
246
+ else {
247
+ // If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
248
+ this.sequenceIndex = Number(c === CharCodes.Lt);
249
+ }
250
+ }
251
+ stateCDATASequence(c) {
252
+ if (c === Sequences.Cdata[this.sequenceIndex]) {
253
+ if (++this.sequenceIndex === Sequences.Cdata.length) {
254
+ this.state = State.InCommentLike;
255
+ this.currentSequence = Sequences.CdataEnd;
256
+ this.sequenceIndex = 0;
257
+ this.sectionStart = this.index + 1;
258
+ }
259
+ }
260
+ else {
261
+ this.sequenceIndex = 0;
262
+ this.state = State.InDeclaration;
263
+ this.stateInDeclaration(c); // Reconsume the character
264
+ }
265
+ }
266
+ /**
267
+ * When we wait for one specific character, we can speed things up
268
+ * by skipping through the buffer until we find it.
269
+ *
270
+ * @returns Whether the character was found.
271
+ */
272
+ fastForwardTo(c) {
273
+ while (++this.index < this.buffer.length + this.offset) {
274
+ if (this.buffer.charCodeAt(this.index - this.offset) === c) {
275
+ return true;
276
+ }
277
+ }
278
+ /*
279
+ * We increment the index at the end of the `parse` loop,
280
+ * so set it to `buffer.length - 1` here.
281
+ *
282
+ * TODO: Refactor `parse` to increment index before calling states.
283
+ */
284
+ this.index = this.buffer.length + this.offset - 1;
285
+ return false;
286
+ }
287
+ /**
288
+ * Comments and CDATA end with `-->` and `]]>`.
289
+ *
290
+ * Their common qualities are:
291
+ * - Their end sequences have a distinct character they start with.
292
+ * - That character is then repeated, so we have to check multiple repeats.
293
+ * - All characters but the start character of the sequence can be skipped.
294
+ */
295
+ stateInCommentLike(c) {
296
+ if (c === this.currentSequence[this.sequenceIndex]) {
297
+ if (++this.sequenceIndex === this.currentSequence.length) {
298
+ if (this.currentSequence === Sequences.CdataEnd) {
299
+ this.cbs.oncdata(this.sectionStart, this.index, 2);
300
+ }
301
+ else {
302
+ this.cbs.oncomment(this.sectionStart, this.index, 2);
303
+ }
304
+ this.sequenceIndex = 0;
305
+ this.sectionStart = this.index + 1;
306
+ this.state = State.Text;
307
+ }
308
+ }
309
+ else if (this.sequenceIndex === 0) {
310
+ // Fast-forward to the first character of the sequence
311
+ if (this.fastForwardTo(this.currentSequence[0])) {
312
+ this.sequenceIndex = 1;
313
+ }
314
+ }
315
+ else if (c !== this.currentSequence[this.sequenceIndex - 1]) {
316
+ // Allow long sequences, eg. --->, ]]]>
317
+ this.sequenceIndex = 0;
318
+ }
319
+ }
320
+ /**
321
+ * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.
322
+ *
323
+ * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
324
+ * We allow anything that wouldn't end the tag.
325
+ */
326
+ isTagStartChar(c) {
327
+ return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
328
+ }
329
+ startSpecial(sequence, offset) {
330
+ this.isSpecial = true;
331
+ this.currentSequence = sequence;
332
+ this.sequenceIndex = offset;
333
+ this.state = State.SpecialStartSequence;
334
+ }
335
+ stateBeforeTagName(c) {
336
+ if (c === CharCodes.ExclamationMark) {
337
+ this.state = State.BeforeDeclaration;
338
+ this.sectionStart = this.index + 1;
339
+ }
340
+ else if (c === CharCodes.Questionmark) {
341
+ this.state = State.InProcessingInstruction;
342
+ this.sectionStart = this.index + 1;
343
+ }
344
+ else if (this.isTagStartChar(c)) {
345
+ const lower = c | 0x20;
346
+ this.sectionStart = this.index;
347
+ if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {
348
+ this.startSpecial(Sequences.TitleEnd, 3);
349
+ }
350
+ else {
351
+ this.state =
352
+ !this.xmlMode && lower === Sequences.ScriptEnd[2]
353
+ ? State.BeforeSpecialS
354
+ : State.InTagName;
355
+ }
356
+ }
357
+ else if (c === CharCodes.Slash) {
358
+ this.state = State.BeforeClosingTagName;
359
+ }
360
+ else {
361
+ this.state = State.Text;
362
+ this.stateText(c);
363
+ }
364
+ }
365
+ stateInTagName(c) {
366
+ if (isEndOfTagSection(c)) {
367
+ this.cbs.onopentagname(this.sectionStart, this.index);
368
+ this.sectionStart = -1;
369
+ this.state = State.BeforeAttributeName;
370
+ this.stateBeforeAttributeName(c);
371
+ }
372
+ }
373
+ stateBeforeClosingTagName(c) {
374
+ if (isWhitespace(c)) {
375
+ // Ignore
376
+ }
377
+ else if (c === CharCodes.Gt) {
378
+ this.state = State.Text;
379
+ }
380
+ else {
381
+ this.state = this.isTagStartChar(c)
382
+ ? State.InClosingTagName
383
+ : State.InSpecialComment;
384
+ this.sectionStart = this.index;
385
+ }
386
+ }
387
+ stateInClosingTagName(c) {
388
+ if (c === CharCodes.Gt || isWhitespace(c)) {
389
+ this.cbs.onclosetag(this.sectionStart, this.index);
390
+ this.sectionStart = -1;
391
+ this.state = State.AfterClosingTagName;
392
+ this.stateAfterClosingTagName(c);
393
+ }
394
+ }
395
+ stateAfterClosingTagName(c) {
396
+ // Skip everything until ">"
397
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
398
+ this.state = State.Text;
399
+ this.sectionStart = this.index + 1;
400
+ }
401
+ }
402
+ stateBeforeAttributeName(c) {
403
+ if (c === CharCodes.Gt) {
404
+ this.cbs.onopentagend(this.index);
405
+ if (this.isSpecial) {
406
+ this.state = State.InSpecialTag;
407
+ this.sequenceIndex = 0;
408
+ }
409
+ else {
410
+ this.state = State.Text;
411
+ }
412
+ this.baseState = this.state;
413
+ this.sectionStart = this.index + 1;
414
+ }
415
+ else if (c === CharCodes.Slash) {
416
+ this.state = State.InSelfClosingTag;
417
+ }
418
+ else if (!isWhitespace(c)) {
419
+ this.state = State.InAttributeName;
420
+ this.sectionStart = this.index;
421
+ }
422
+ }
423
+ stateInSelfClosingTag(c) {
424
+ if (c === CharCodes.Gt) {
425
+ this.cbs.onselfclosingtag(this.index);
426
+ this.state = State.Text;
427
+ this.baseState = State.Text;
428
+ this.sectionStart = this.index + 1;
429
+ this.isSpecial = false; // Reset special state, in case of self-closing special tags
430
+ }
431
+ else if (!isWhitespace(c)) {
432
+ this.state = State.BeforeAttributeName;
433
+ this.stateBeforeAttributeName(c);
434
+ }
435
+ }
436
+ stateInAttributeName(c) {
437
+ if (c === CharCodes.Eq || isEndOfTagSection(c)) {
438
+ this.cbs.onattribname(this.sectionStart, this.index);
439
+ this.sectionStart = -1;
440
+ this.state = State.AfterAttributeName;
441
+ this.stateAfterAttributeName(c);
442
+ }
443
+ }
444
+ stateAfterAttributeName(c) {
445
+ if (c === CharCodes.Eq) {
446
+ this.state = State.BeforeAttributeValue;
447
+ }
448
+ else if (c === CharCodes.Slash || c === CharCodes.Gt) {
449
+ this.cbs.onattribend(QuoteType.NoValue, this.index);
450
+ this.state = State.BeforeAttributeName;
451
+ this.stateBeforeAttributeName(c);
452
+ }
453
+ else if (!isWhitespace(c)) {
454
+ this.cbs.onattribend(QuoteType.NoValue, this.index);
455
+ this.state = State.InAttributeName;
456
+ this.sectionStart = this.index;
457
+ }
458
+ }
459
+ stateBeforeAttributeValue(c) {
460
+ if (c === CharCodes.DoubleQuote) {
461
+ this.state = State.InAttributeValueDq;
462
+ this.sectionStart = this.index + 1;
463
+ }
464
+ else if (c === CharCodes.SingleQuote) {
465
+ this.state = State.InAttributeValueSq;
466
+ this.sectionStart = this.index + 1;
467
+ }
468
+ else if (!isWhitespace(c)) {
469
+ this.sectionStart = this.index;
470
+ this.state = State.InAttributeValueNq;
471
+ this.stateInAttributeValueNoQuotes(c); // Reconsume token
472
+ }
473
+ }
474
+ handleInAttributeValue(c, quote) {
475
+ if (c === quote ||
476
+ (!this.decodeEntities && this.fastForwardTo(quote))) {
477
+ this.cbs.onattribdata(this.sectionStart, this.index);
478
+ this.sectionStart = -1;
479
+ this.cbs.onattribend(quote === CharCodes.DoubleQuote
480
+ ? QuoteType.Double
481
+ : QuoteType.Single, this.index);
482
+ this.state = State.BeforeAttributeName;
483
+ }
484
+ else if (this.decodeEntities && c === CharCodes.Amp) {
485
+ this.baseState = this.state;
486
+ this.state = State.BeforeEntity;
487
+ }
488
+ }
489
+ stateInAttributeValueDoubleQuotes(c) {
490
+ this.handleInAttributeValue(c, CharCodes.DoubleQuote);
491
+ }
492
+ stateInAttributeValueSingleQuotes(c) {
493
+ this.handleInAttributeValue(c, CharCodes.SingleQuote);
494
+ }
495
+ stateInAttributeValueNoQuotes(c) {
496
+ if (isWhitespace(c) || c === CharCodes.Gt) {
497
+ this.cbs.onattribdata(this.sectionStart, this.index);
498
+ this.sectionStart = -1;
499
+ this.cbs.onattribend(QuoteType.Unquoted, this.index);
500
+ this.state = State.BeforeAttributeName;
501
+ this.stateBeforeAttributeName(c);
502
+ }
503
+ else if (this.decodeEntities && c === CharCodes.Amp) {
504
+ this.baseState = this.state;
505
+ this.state = State.BeforeEntity;
506
+ }
507
+ }
508
+ stateBeforeDeclaration(c) {
509
+ if (c === CharCodes.OpeningSquareBracket) {
510
+ this.state = State.CDATASequence;
511
+ this.sequenceIndex = 0;
512
+ }
513
+ else {
514
+ this.state =
515
+ c === CharCodes.Dash
516
+ ? State.BeforeComment
517
+ : State.InDeclaration;
518
+ }
519
+ }
520
+ stateInDeclaration(c) {
521
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
522
+ this.cbs.ondeclaration(this.sectionStart, this.index);
523
+ this.state = State.Text;
524
+ this.sectionStart = this.index + 1;
525
+ }
526
+ }
527
+ stateInProcessingInstruction(c) {
528
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
529
+ this.cbs.onprocessinginstruction(this.sectionStart, this.index);
530
+ this.state = State.Text;
531
+ this.sectionStart = this.index + 1;
532
+ }
533
+ }
534
+ stateBeforeComment(c) {
535
+ if (c === CharCodes.Dash) {
536
+ this.state = State.InCommentLike;
537
+ this.currentSequence = Sequences.CommentEnd;
538
+ // Allow short comments (eg. <!-->)
539
+ this.sequenceIndex = 2;
540
+ this.sectionStart = this.index + 1;
541
+ }
542
+ else {
543
+ this.state = State.InDeclaration;
544
+ }
545
+ }
546
+ stateInSpecialComment(c) {
547
+ if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
548
+ this.cbs.oncomment(this.sectionStart, this.index, 0);
549
+ this.state = State.Text;
550
+ this.sectionStart = this.index + 1;
551
+ }
552
+ }
553
+ stateBeforeSpecialS(c) {
554
+ const lower = c | 0x20;
555
+ if (lower === Sequences.ScriptEnd[3]) {
556
+ this.startSpecial(Sequences.ScriptEnd, 4);
557
+ }
558
+ else if (lower === Sequences.StyleEnd[3]) {
559
+ this.startSpecial(Sequences.StyleEnd, 4);
560
+ }
561
+ else {
562
+ this.state = State.InTagName;
563
+ this.stateInTagName(c); // Consume the token again
564
+ }
565
+ }
566
+ stateBeforeEntity(c) {
567
+ // Start excess with 1 to include the '&'
568
+ this.entityExcess = 1;
569
+ this.entityResult = 0;
570
+ if (c === CharCodes.Num) {
571
+ this.state = State.BeforeNumericEntity;
572
+ }
573
+ else if (c === CharCodes.Amp) {
574
+ // We have two `&` characters in a row. Stay in the current state.
575
+ }
576
+ else {
577
+ this.trieIndex = 0;
578
+ this.trieCurrent = this.entityTrie[0];
579
+ this.state = State.InNamedEntity;
580
+ this.stateInNamedEntity(c);
581
+ }
582
+ }
583
+ stateInNamedEntity(c) {
584
+ this.entityExcess += 1;
585
+ this.trieIndex = determineBranch(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);
586
+ if (this.trieIndex < 0) {
587
+ this.emitNamedEntity();
588
+ this.index--;
589
+ return;
590
+ }
591
+ this.trieCurrent = this.entityTrie[this.trieIndex];
592
+ const masked = this.trieCurrent & BinTrieFlags.VALUE_LENGTH;
593
+ // If the branch is a value, store it and continue
594
+ if (masked) {
595
+ // The mask is the number of bytes of the value, including the current byte.
596
+ const valueLength = (masked >> 14) - 1;
597
+ // If we have a legacy entity while parsing strictly, just skip the number of bytes
598
+ if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {
599
+ this.trieIndex += valueLength;
600
+ }
601
+ else {
602
+ // Add 1 as we have already incremented the excess
603
+ const entityStart = this.index - this.entityExcess + 1;
604
+ if (entityStart > this.sectionStart) {
605
+ this.emitPartial(this.sectionStart, entityStart);
606
+ }
607
+ // If this is a surrogate pair, consume the next two bytes
608
+ this.entityResult = this.trieIndex;
609
+ this.trieIndex += valueLength;
610
+ this.entityExcess = 0;
611
+ this.sectionStart = this.index + 1;
612
+ if (valueLength === 0) {
613
+ this.emitNamedEntity();
614
+ }
615
+ }
616
+ }
617
+ }
618
+ emitNamedEntity() {
619
+ this.state = this.baseState;
620
+ if (this.entityResult === 0) {
621
+ return;
622
+ }
623
+ const valueLength = (this.entityTrie[this.entityResult] & BinTrieFlags.VALUE_LENGTH) >>
624
+ 14;
625
+ switch (valueLength) {
626
+ case 1:
627
+ this.emitCodePoint(this.entityTrie[this.entityResult] &
628
+ ~BinTrieFlags.VALUE_LENGTH);
629
+ break;
630
+ case 2:
631
+ this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
632
+ break;
633
+ case 3: {
634
+ this.emitCodePoint(this.entityTrie[this.entityResult + 1]);
635
+ this.emitCodePoint(this.entityTrie[this.entityResult + 2]);
636
+ }
637
+ }
638
+ }
639
+ stateBeforeNumericEntity(c) {
640
+ if ((c | 0x20) === CharCodes.LowerX) {
641
+ this.entityExcess++;
642
+ this.state = State.InHexEntity;
643
+ }
644
+ else {
645
+ this.state = State.InNumericEntity;
646
+ this.stateInNumericEntity(c);
647
+ }
648
+ }
649
+ emitNumericEntity(strict) {
650
+ const entityStart = this.index - this.entityExcess - 1;
651
+ const numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);
652
+ if (numberStart !== this.index) {
653
+ // Emit leading data if any
654
+ if (entityStart > this.sectionStart) {
655
+ this.emitPartial(this.sectionStart, entityStart);
656
+ }
657
+ this.sectionStart = this.index + Number(strict);
658
+ this.emitCodePoint(replaceCodePoint(this.entityResult));
659
+ }
660
+ this.state = this.baseState;
661
+ }
662
+ stateInNumericEntity(c) {
663
+ if (c === CharCodes.Semi) {
664
+ this.emitNumericEntity(true);
665
+ }
666
+ else if (isNumber(c)) {
667
+ this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);
668
+ this.entityExcess++;
669
+ }
670
+ else {
671
+ if (this.allowLegacyEntity()) {
672
+ this.emitNumericEntity(false);
673
+ }
674
+ else {
675
+ this.state = this.baseState;
676
+ }
677
+ this.index--;
678
+ }
679
+ }
680
+ stateInHexEntity(c) {
681
+ if (c === CharCodes.Semi) {
682
+ this.emitNumericEntity(true);
683
+ }
684
+ else if (isNumber(c)) {
685
+ this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);
686
+ this.entityExcess++;
687
+ }
688
+ else if (isHexDigit(c)) {
689
+ this.entityResult =
690
+ this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);
691
+ this.entityExcess++;
692
+ }
693
+ else {
694
+ if (this.allowLegacyEntity()) {
695
+ this.emitNumericEntity(false);
696
+ }
697
+ else {
698
+ this.state = this.baseState;
699
+ }
700
+ this.index--;
701
+ }
702
+ }
703
+ allowLegacyEntity() {
704
+ return (!this.xmlMode &&
705
+ (this.baseState === State.Text ||
706
+ this.baseState === State.InSpecialTag));
707
+ }
708
+ /**
709
+ * Remove data that has already been consumed from the buffer.
710
+ */
711
+ cleanup() {
712
+ // If we are inside of text or attributes, emit what we already have.
713
+ if (this.running && this.sectionStart !== this.index) {
714
+ if (this.state === State.Text ||
715
+ (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
716
+ this.cbs.ontext(this.sectionStart, this.index);
717
+ this.sectionStart = this.index;
718
+ }
719
+ else if (this.state === State.InAttributeValueDq ||
720
+ this.state === State.InAttributeValueSq ||
721
+ this.state === State.InAttributeValueNq) {
722
+ this.cbs.onattribdata(this.sectionStart, this.index);
723
+ this.sectionStart = this.index;
724
+ }
725
+ }
726
+ }
727
+ shouldContinue() {
728
+ return this.index < this.buffer.length + this.offset && this.running;
729
+ }
730
+ /**
731
+ * Iterates through the buffer, calling the function corresponding to the current state.
732
+ *
733
+ * States that are more likely to be hit are higher up, as a performance improvement.
734
+ */
735
+ parse() {
736
+ while (this.shouldContinue()) {
737
+ const c = this.buffer.charCodeAt(this.index - this.offset);
738
+ if (this.state === State.Text) {
739
+ this.stateText(c);
740
+ }
741
+ else if (this.state === State.SpecialStartSequence) {
742
+ this.stateSpecialStartSequence(c);
743
+ }
744
+ else if (this.state === State.InSpecialTag) {
745
+ this.stateInSpecialTag(c);
746
+ }
747
+ else if (this.state === State.CDATASequence) {
748
+ this.stateCDATASequence(c);
749
+ }
750
+ else if (this.state === State.InAttributeValueDq) {
751
+ this.stateInAttributeValueDoubleQuotes(c);
752
+ }
753
+ else if (this.state === State.InAttributeName) {
754
+ this.stateInAttributeName(c);
755
+ }
756
+ else if (this.state === State.InCommentLike) {
757
+ this.stateInCommentLike(c);
758
+ }
759
+ else if (this.state === State.InSpecialComment) {
760
+ this.stateInSpecialComment(c);
761
+ }
762
+ else if (this.state === State.BeforeAttributeName) {
763
+ this.stateBeforeAttributeName(c);
764
+ }
765
+ else if (this.state === State.InTagName) {
766
+ this.stateInTagName(c);
767
+ }
768
+ else if (this.state === State.InClosingTagName) {
769
+ this.stateInClosingTagName(c);
770
+ }
771
+ else if (this.state === State.BeforeTagName) {
772
+ this.stateBeforeTagName(c);
773
+ }
774
+ else if (this.state === State.AfterAttributeName) {
775
+ this.stateAfterAttributeName(c);
776
+ }
777
+ else if (this.state === State.InAttributeValueSq) {
778
+ this.stateInAttributeValueSingleQuotes(c);
779
+ }
780
+ else if (this.state === State.BeforeAttributeValue) {
781
+ this.stateBeforeAttributeValue(c);
782
+ }
783
+ else if (this.state === State.BeforeClosingTagName) {
784
+ this.stateBeforeClosingTagName(c);
785
+ }
786
+ else if (this.state === State.AfterClosingTagName) {
787
+ this.stateAfterClosingTagName(c);
788
+ }
789
+ else if (this.state === State.BeforeSpecialS) {
790
+ this.stateBeforeSpecialS(c);
791
+ }
792
+ else if (this.state === State.InAttributeValueNq) {
793
+ this.stateInAttributeValueNoQuotes(c);
794
+ }
795
+ else if (this.state === State.InSelfClosingTag) {
796
+ this.stateInSelfClosingTag(c);
797
+ }
798
+ else if (this.state === State.InDeclaration) {
799
+ this.stateInDeclaration(c);
800
+ }
801
+ else if (this.state === State.BeforeDeclaration) {
802
+ this.stateBeforeDeclaration(c);
803
+ }
804
+ else if (this.state === State.BeforeComment) {
805
+ this.stateBeforeComment(c);
806
+ }
807
+ else if (this.state === State.InProcessingInstruction) {
808
+ this.stateInProcessingInstruction(c);
809
+ }
810
+ else if (this.state === State.InNamedEntity) {
811
+ this.stateInNamedEntity(c);
812
+ }
813
+ else if (this.state === State.BeforeEntity) {
814
+ this.stateBeforeEntity(c);
815
+ }
816
+ else if (this.state === State.InHexEntity) {
817
+ this.stateInHexEntity(c);
818
+ }
819
+ else if (this.state === State.InNumericEntity) {
820
+ this.stateInNumericEntity(c);
821
+ }
822
+ else {
823
+ // `this._state === State.BeforeNumericEntity`
824
+ this.stateBeforeNumericEntity(c);
825
+ }
826
+ this.index++;
827
+ }
828
+ this.cleanup();
829
+ }
830
+ finish() {
831
+ if (this.state === State.InNamedEntity) {
832
+ this.emitNamedEntity();
833
+ }
834
+ // If there is remaining data, emit it in a reasonable way
835
+ if (this.sectionStart < this.index) {
836
+ this.handleTrailingData();
837
+ }
838
+ this.cbs.onend();
839
+ }
840
+ /** Handle any trailing data. */
841
+ handleTrailingData() {
842
+ const endIndex = this.buffer.length + this.offset;
843
+ if (this.state === State.InCommentLike) {
844
+ if (this.currentSequence === Sequences.CdataEnd) {
845
+ this.cbs.oncdata(this.sectionStart, endIndex, 0);
846
+ }
847
+ else {
848
+ this.cbs.oncomment(this.sectionStart, endIndex, 0);
849
+ }
850
+ }
851
+ else if (this.state === State.InNumericEntity &&
852
+ this.allowLegacyEntity()) {
853
+ this.emitNumericEntity(false);
854
+ // All trailing data will have been consumed
855
+ }
856
+ else if (this.state === State.InHexEntity &&
857
+ this.allowLegacyEntity()) {
858
+ this.emitNumericEntity(false);
859
+ // All trailing data will have been consumed
860
+ }
861
+ else if (this.state === State.InTagName ||
862
+ this.state === State.BeforeAttributeName ||
863
+ this.state === State.BeforeAttributeValue ||
864
+ this.state === State.AfterAttributeName ||
865
+ this.state === State.InAttributeName ||
866
+ this.state === State.InAttributeValueSq ||
867
+ this.state === State.InAttributeValueDq ||
868
+ this.state === State.InAttributeValueNq ||
869
+ this.state === State.InClosingTagName) {
870
+ /*
871
+ * If we are currently in an opening or closing tag, us not calling the
872
+ * respective callback signals that the tag should be ignored.
873
+ */
874
+ }
875
+ else {
876
+ this.cbs.ontext(this.sectionStart, endIndex);
877
+ }
878
+ }
879
+ emitPartial(start, endIndex) {
880
+ if (this.baseState !== State.Text &&
881
+ this.baseState !== State.InSpecialTag) {
882
+ this.cbs.onattribdata(start, endIndex);
883
+ }
884
+ else {
885
+ this.cbs.ontext(start, endIndex);
886
+ }
887
+ }
888
+ emitCodePoint(cp) {
889
+ if (this.baseState !== State.Text &&
890
+ this.baseState !== State.InSpecialTag) {
891
+ this.cbs.onattribentity(cp);
892
+ }
893
+ else {
894
+ this.cbs.ontextentity(cp);
895
+ }
896
+ }
897
+ }
898
+ //# sourceMappingURL=Tokenizer.js.map