h$w      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~  Safe-Inferred53Iconic names and categories for various characters.(c) 2020-2021 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferred willowInfra:  /https://infra.spec.whatwg.org/#ascii-whitespaceASCII whitespaceThe ASCII characters defined as whitespace in the HTML standard. Unlike Haskell's  , and anything following that example, does not include \x11 (VT).willowInfra:  *https://infra.spec.whatwg.org/#ascii-alpha ASCII alphaTest whether the character is an alphabetic character in the ASCII range ([A-Za-z]).willowInfra:  1https://infra.spec.whatwg.org/#ascii-alphanumericASCII alphanumericTest whether the character is either an alphabetic character or a digit in the ASCII range ( [A-Za-z0-9]).willowInfra:  /https://infra.spec.whatwg.org/#ascii-whitespaceASCII whitespace9Test whether the character fits the spec's definition of .willowConvert an uppercase, alphabetic, ASCII character to its lowercase form. This has the same semantics within the ASCII range as 1, but leaves any non-ASCII characters unchanged.toAsciiLower 'A''a'toAsciiLower ''''willowConvert a lowercase, alphabetic, ASCII character to its uppercase form. This has the same semantics within the ASCII range as 1, but leaves any non-ASCII characters unchanged.toAsciiUpper 'a''A'toAsciiUpper ''''willowThe Unicode character \xFFFD, safely (but unrecoverably) representing an illegal, invalid, or otherwise unknown character.,Generic lazy parsers for transforming input.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferred>& willow*Generalize the transformation of an input  into a more meaningful value. This class provides the basic building blocks from which more expressive such parsers may be constructed.See also the description of " for some of the design decisions. willowRuns the argument parser on the current input, without consuming any of it; these are identical semantics to saving and restoring the input after running the computation, assuming the + instance runs over the input stream (see ):  input <-  a <- parser  input a <-   parser willowSucceeds if and only if the argument parser fails (the input is not consumed). willowRetrieve the next token in the stream, whatever it may be. Identical to  in all but type. willow?Retrieve the next several tokens in the stream. Identical to  - (with a safer index type) in the case that gather is a list [token].If fewer tokens are in the input stream than asked for, returns what does remain in the input stream.willowPrepend a token to the input stream to be processed next. Identical to operating on the stream directly through  , if that instance also exists.  stream <-   $  tok stream  tok willowConcatenate the given sequence with the existing input, processing the argument before the older stream.willowDrop the remainder of the input, simulating an early end-of-stream. Can be emulated through appropriate  and  instances:  stream <-     stream  willow2A sequence of values which may be processed via a  . This class is essentially just a unification of the various list-like interfaces ( == , etc.) as Haskell's abstractions are slightly lacking in that area.(Just (tok, str) == uncons (cons tok str)TruewillowPrepend a token to the stream for proximate processing, before everything already in it.willowAs %, but append multiple tokens at once.willow(Retrieve the next token from the stream.This should only return  if the stream is actually empty---if the next value is not available yet due to slow IO or other computation,  waits until it is.willow1Retrieve the next several tokens from the stream.If fewer tokens are in the input stream than asked for, the left side of the return value is the (shorter than requested) entire input stream and the right is .willow-The number of tokens remaining in the stream.willow=Encapsulation of an operation for transforming the head of a  into some other value. Standard usage, with similar behaviour to other  Text.Parsec-derived parsers, ("accept the first which matches") may be obtained by instantiating gather with , or non-deterministic parsing ("accept any of these") through [].Notably, this implementation is designed to allow laziness in both input and output. For the best usage, therefore, consume as little input at a time as possible, and so call  often).$As part of this simplification, all  Text.Parsec-style integrated state (use ) and Text.Megaparsec-style error pretty-printing (build your position tracking into the stream, and/or wrap the output in ) has been stripped out.willowPurely a convenience of the package rather than the module, the state machines described by the HTML standard all involve some degree of persistence, and so are built over a deeper monad stack. This could easily one of the most common transformers to add, anyway, no matter what input is being parsed.willow"Unlike most monad transformers, a  is built around the concept of success and failure, so its "default" form is better structured over  than over .willowSet the constructed parser loose on a given input. Returns both the resulting value and the remaining contents of the .willow+Succeeds if and only if the input is empty.willow!Expect a specific token from the , and fail if a different token is found instead. Identical to running  6 with equality in the (by far most likely) case that gather is a  in addition to an : tok <-      ( desired) tok <-  desired willow.Expect a specific sequence of tokens from the 9, and fail if anything else is found instead, or if the  doesn't have enough characters before its end. Identical to running   with equality over   in the case that stream is an > (which all provided instances are) and can easily provide a  (which they do, unless the sequence to test against also needs to be lazy).  stream <-   ( desired)    ( desired)  stream <-  desired willowSucceeds if and only if the value parsed by the argument parser satisfies the predicate. No further input is consumed.!willowThe parser the inner function generates is run over the remaining input after the argument function runs (thus generating the inner function).#willow8Operates over the input that has not yet been processed.Note that this therefore provides the means for forcing an early end-of-stream:   $willowPerforms an action on the current input without consuming it; i.e.  is identical to .'willow is a + which fails without consuming any input. # runs the recovery parser over the same7 input as was passed to the original (failing) parser.)willow is a - which fails without consuming input, while > applies both to the same input, modulo the semantics of the  gather instance.*willow( ) runs the  resulting from the right (generation function) argument over the remaining input after the left (value)  returns.+willow is a  which succeeds< without consuming any input; it is therefore identical to   and not  or .,willow() runs the right * over the remaining input after the left  returns.-willow is a , which fails without consuming any input. () applies both 1s to the same input ("automatically backtracks")..willow is a / which succeeds without consuming any input. (4) and the other sequencing functions run the right * over the remaining input after the left  returns.      5A monad combinator emulating greedy pattern matching.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com provisionalportable Safe-Inferred2^ Awillow9The building blocks for predictable pattern matches over . The constructors are distinguished along three axes (see also the examples in the documentation for J):"masking" vs. "non-masking": only the first "masking" case fulfilled will be returned, while every "non-masking" one is returned"matching" vs. "catchall": whether the output is gated by a predicate test or not"piped" vs. "static": whether the output is passed the original test tokenBwillowMasking, matching, and pipedCwillowMasking, matching, and staticDwillowMasking, catchall, and pipedEwillowMasking, catchall, and staticFwillow Non-masking, matching, and pipedGwillow!Non-masking, matching, and staticHwillow Non-masking, catchall, and pipedIwillow!Non-masking, catchall, and staticJwillowRun a block of As, collapsing any masking cases so that only the first matched test remains. This is strictly more powerful than pattern matching, as it allows interspersing non-masking tests alongside masking ones; for compatibility with refactoring to single-return  instances, however (i.e. !), it's best to order everything as if every case could mask the ones after it. Note that the masking only affects the output; the tests themselves may still be run, so expensive computations are best put elsewhere.7Only the first overlapping (maskable) case is selected:/uppercase = If_ isUpper $ return "uppercase"0one = When_ (== '1') $ return "single '1'"alpha = If_ isAlpha $ return "ASCII letter" -- Matchescatchall = Else_ $ return "none of the above" -- Matches8switch [uppercase, one, alpha, catchall] 'a' :: [String]["ASCII letter"]?Non-masking cases don't interact with the masking calculations:/uppercase = If_ isUpper $ return "uppercase"one = When_ (== '1') $ return "single '1'" -- Matches2alpha = If_ isAlpha $ return "ASCII letter"catchall = Else_ $ return "none of the above" -- Matches8switch [uppercase, one, alpha, catchall] '1' :: [String]#["single '1'", "none of the above"]+ always takes the earliest successful test:/uppercase = If_ isUpper $ return "uppercase"one = When_ (== '1') $ return "single '1'" -- Matches2alpha = If_ isAlpha $ return "ASCII letter"catchall = Else_ $ return "none of the above" -- Matches b tok <|> cTrue ABCDEFGHIJ ABCDEFGHIJ'Small helpers for constructing parsers.(c) 2020-2021 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferred5KwillowTest whether a given value falls within the range defined by the two bounds, inclusive. range 1 2 3False range 1 3 2True range 1 2 2TrueLwillowReduce a list of s, such that the first successful instance will be run. If the list is empty, the resulting value will always fail.MwillowScan through the stream, until the given parser succeeds (discarding any tokens between the initial location and where the first success is found). Fails if the parser does not succeed at any point in the remainder of the stream.Kwillow Low boundwillow High boundwillow Value to testKLMKLM>Functions and objects used to build the encode/decode parsers.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable TrustworthytPwillowSpecialization of the CJK lookup table for parsers comprising a text-to-bytes algorithm.willowSpecialization of the CJK lookup table for parsers comprising a bytes-to-text algorithm.willowMemoization table for lookups into the CJK index files. Storing the entire thing in a  or other indexable form would take a megabyte of memory each in the best case, and many characters would likely never be used. At the same time, performing a file lookup on every character would be unacceptably slow. Instead, take the performance hit once per character, and store the result for faster access in future calls.>Depending on the frequency of the updates, some updates (via  updateIndices) may be lost. This should still be a smaller performance hit than getting blocked while several other threads try to do the same.willowAs , for those few encodings which require tracking a persistent state across character boundaries.willowEfficient construction of  s from a  string. This will be called in a loop until failure or the end of the stream, and so should operate on a single  at a time unless some property of the encoding requires a longer span (e.g. UTF-7 requires three s to return to a byte boundary). No attempt at Unicode (de)composition is attempted, even if that would succeed where the input form fails.If the current  can not be represented in the encoding, it should be returned as a  value, so failure only occurs at the end of the stream. Note that a failing base case must eventually be reached on an empty stream, or the generated  will be infinite.willowAs , for those few encodings which require tracking a persistent state across character boundaries.willowEfficient construction of  strings from a . This will be called in a loop until failure or the end of the stream, and so should return a sensible minimum string given the restriction of consuming whole bytes (e.g. a UTF-7 3 might translate blocks of eight bytes into three !s, while UTF-8 would translate a - at a time from a variable number of bytes).If the current such block is invalid for the encoding, it should be returned in the  instead of any "sensible" default, so failure only occurs at the end of the stream. Note that a failing base case must eventually be reached on an empty stream, or the generated  will be infinite.willowThe fallible output of one of the core text-to-bytes parsers. If some character is not representable in the encoding, the  value contains the original  unchanged; such a value should be either ignored or reported verbatim, with no further fallback attempts at encoding.willowA parser combinator written as part of the algorithm to serialize text into a binary stream. For compatibility with the few encodings which require tracking some state, all of the core bytes-to-text algorithms are written within a null .willowA parser combinator written as part of the algorithm to serialize text into a binary stream, carrying some persistent state.willowThe fallible output of one of the core bytes-to-text parsers. If some binary sequence proves uninterpretable, the  value contains the original sequence unchanged; such a value should be either ignored or reported verbatim, with no further fallback attempts at parsing.willowA parser combinator written as part of the algorithm to extract text from a binary stream. For compatibility with the few encodings which require tracking some state, all of the core bytes-to-text algorithms are written within a null .willowA parser combinator written as part of the algorithm to extract text from a binary stream, carrying some persistent state.NwillowAll the data which needs to be tracked for correct behaviour in decoding a binary stream into readable text.willow)The encoding scheme in use by the parser.willowAny state parameters specific to the encoding scheme used. Note that this value takes precidence over the W specified by  if the two differ.OwillowHTML:  https://html.spec.whatwg.org/multipage/parsing.html#change-the-encodingchange the encodingThe data required to determine if a new encoding would produce an identical output to what the current one has already done, and to restart the parsing with the new one if the two are incompatible. Values may be easily initialized via .QwillowThe input binary sequences and the resulting characters which are already emitted to the output.RwillowThe complete binary sequence parsed thus far, in case it needs to be re-processed under a new, incompatible encoding.SwillowHTML:  https://html.spec.whatwg.org/multipage/parsing.html#concept-encoding-confidence confidenceHow likely the specified encoding is to be the actual stream encoding.(The spec names a third confidence level  irrelevant, to be used when the stream doesn't depend on any particular encoding scheme (i.e. it is composed directly of s rather than parsed from a binary stream). This has not been included in the sum type, as it makes little sense to have that as a parameter of the decoding stage. Use  V to represent it instead.TwillowThe binary stream is likely the named encoding, but more data may prove it to be something else. In the latter case, the O (if available) may be used to transition to the proper encoding, or restart the stream if necessary.Uwillow;The binary stream is confirmed to be of the given encoding.VwillowAll the data which needs to be tracked for correct behaviour in decoding a binary stream into readable text.willowThe encoding scheme currently in use by the parser, along with how likely that scheme actually represents the binary stream.willowWhether a byte-order mark at the beginning of the stream should override the encoding given by . A 2 value treats it as any other character, while a   does the same if and only if it differs from the current encoding, silently consuming it (without output) if it matches.willowAny state parameters specific to the encoding scheme used. Note this value takes precidence over the W specified by > (but not the degree of confidence itself) if the two differ.willowAny leftover bytes at the end of the binary stream, which require further input to be processed in order to correctly map to a character or error value.Wwillow Encoding:  *https://encoding.spec.whatwg.org/#encodingencodingAll character encoding schemes supported by the HTML standard, defined as a bidirectional map between characters and binary sequences. X is strongly encouraged for new content (including all encoding purposes), but the others are retained for compatibility with existing pages.Note that none of these are complete functions, to one degree or another, and that no guarantee is made that the mapping round-trips.XwillowThe UTF-8 encoding for Unicode.Ywillow5The UTF-16 encoding for Unicode, in big endian order.'No encoder is provided for this scheme.Zwillow8The UTF-16 encoding for Unicode, in little endian order.'No encoder is provided for this scheme.[willow *https://encoding.spec.whatwg.org/big5.htmlBig55, primarily covering traditional Chinese characters.\willow4EUC-JP, primarily covering Japanese as the union of  -https://encoding.spec.whatwg.org/jis0208.htmlJIS-0208 and  -https://encoding.spec.whatwg.org/jis0212.htmlJIS-0212.]willow ,https://encoding.spec.whatwg.org/euc-kr.htmlEUC-KR, primarily covering Hangul.^willowThe  -https://encoding.spec.whatwg.org/gb18030.htmlGB18030-2005 extension to GBK, with one tweak for web compatibility, primarily covering both forms of Chinese characters.Note that this encoding also includes a large number of four-byte sequences which aren't listed in the linked visualization._willow6GBK, primarily covering simplified Chinese characters.In practice, this is just ^ with a restricted set of encodable characters; the decoder is identical.`willow DOS and OS/2  ,https://encoding.spec.whatwg.org/ibm866.html code page for Cyrillic characters.awillowA Japanese-focused implementation of the ISO 2022 meta-encoding, including both  -https://encoding.spec.whatwg.org/jis0208.htmlJIS-0208 and halfwidth katakana.bwillow 0https://encoding.spec.whatwg.org/iso-8859-2.htmlLatin-2 (Central European).cwillow 0https://encoding.spec.whatwg.org/iso-8859-3.htmlLatin-3 (South European and Esperanto)dwillow 0https://encoding.spec.whatwg.org/iso-8859-4.htmlLatin-4 (North European).ewillow 0https://encoding.spec.whatwg.org/iso-8859-5.htmlLatin/Cyrillic.fwillow 0https://encoding.spec.whatwg.org/iso-8859-6.html Latin/Arabic.gwillow 0https://encoding.spec.whatwg.org/iso-8859-7.html Latin/Greek (modern monotonic).hwillow 0https://encoding.spec.whatwg.org/iso-8859-8.html Latin/Hebrew (visual order).iwillow 0https://encoding.spec.whatwg.org/iso-8859-8.html Latin/Hebrew (logical order).jwillow 1https://encoding.spec.whatwg.org/iso-8859-10.htmlLatin-6 (Nordic).kwillow 1https://encoding.spec.whatwg.org/iso-8859-13.htmlLatin-7 (Baltic Rim).lwillow 1https://encoding.spec.whatwg.org/iso-8859-14.htmlLatin-8 (Celtic).mwillow 1https://encoding.spec.whatwg.org/iso-8859-15.htmlLatin-94 (revision of ISO 8859-1 Latin-1, Western European).nwillow 1https://encoding.spec.whatwg.org/iso-8859-16.htmlLatin-10 (South-Eastern European).owillowKOI-8  ,https://encoding.spec.whatwg.org/koi8-r.html specialized for Russian Cyrillic.pwillowKOI-8  ,https://encoding.spec.whatwg.org/koi8-u.html specialized for Ukrainian Cyrillic.qwillow /https://encoding.spec.whatwg.org/macintosh.html Mac OS Roman.rwillow 4https://encoding.spec.whatwg.org/x-mac-cyrillic.htmlMac OS Cyrillic (as of Mac OS 9.0)swillowThe  /https://encoding.spec.whatwg.org/shift_jis.htmlWindows variant (code page 932) of Shift JIS.twillow ISO 8859-11  1https://encoding.spec.whatwg.org/windows-874.html Latin/Thai< with Windows extensions in the C1 control character slots.Note that this encoding is always used instead of pure Latin/Thai.uwillow The Windows  2https://encoding.spec.whatwg.org/windows-1250.htmlextension and rearrangement of ISO 8859-2 Latin-2.vwillow 2https://encoding.spec.whatwg.org/windows-1251.htmlWindows Cyrillic.wwillow$The Windows extension of ISO 8859-1  2https://encoding.spec.whatwg.org/windows-1252.htmlLatin-1, replacing most of the C1 control characters with printable glyphs.?Note that this encoding is always used instead of pure Latin-1.xwillow 2https://encoding.spec.whatwg.org/windows-1253.html Windows Greek (modern monotonic).ywillow$The Windows extension of ISO 8859-9  2https://encoding.spec.whatwg.org/windows-1254.htmlLatin-5 (Turkish), replacing most of the C1 control characters with printable glyphs.?Note that this encoding is always used instead of pure Latin-5.zwillow The Windows  2https://encoding.spec.whatwg.org/windows-1255.htmlextension and rearrangement of ISO 8859-8 Latin/Hebrew.{willow 2https://encoding.spec.whatwg.org/windows-1256.htmlWindows Arabic.|willow 2https://encoding.spec.whatwg.org/windows-1257.htmlWindows Baltic.}willow 2https://encoding.spec.whatwg.org/windows-1258.htmlWindows Vietnamese.~willow!The input is reduced to a single \xFFFD replacement character.'No encoder is provided for this scheme.willowNon-ASCII bytes (\x80 through \xFF<) are mapped to a portion of the Unicode Private Use Area (\xF780 through \xF7FF).willowAllow specifying binary data as ASCII, purely to simplify authoring.willow)The underlying binary representations of $, in any ASCII-compatible encoding.willowMap a byte representing an ASCII uppercase letter to its corresponding lowercase value; compare with  .willow>Extract the underlying encoding scheme from the wrapping data.willowThe collection of data which would indicate nothing has yet been parsed.willowTest whether the byte is within the range of ASCII (only lower seven bits may be set).willowConvert an ASCII character into its respective singleton byte. Fails if the character is not included in the basic ASCII set.willowConvert a numeric value to its associated Unicode character, and wrap it accordingly for the parsers.willowConvert a numeric value to its associated Unicode character, and wrap it accordingly for the parsers.willowWrap a single character in the enclosing functors required to use it as the output of a binary-to-text parser.willowWrap several characters in the enclosing functors required to use them as the output of a binary-to-text parser.willowFetch the current value of the state determining how to transform a binary stream into a * representation within an encoding scheme.willow*Update the current state of the binary-to-) parser according to the given function.willowFetch the current value of the state determining how to serialize :s into a binary representation within an encoding scheme.willow Update the current state of the 3-to-binary parser according to the given function.willow1Pack the given binary sequence as a failed parse.willowPack the given byte as a singleton sequence triggering a failed parse.willowCombine the given bytes as a binary sequence triggering a failed parse. This is purely driven by a few fallback statements in multi-byte encodings, where the lead byte is known from the invocation, and the trail byte is piped in from the  block.willowhttps://encoding.spec.whatwg.org/#legacy-single-byte-encodingsLegacy single-byte encodings table column 1,All byte-per-character encodings handled by  and ); those parsers will fail if passed any W not in this list.Mappings between textual names of encoding schemes and the type-safe .(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com provisionalportable Trustworthy0willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-getget an encodingGiven an encoding's case-insensitive label, try to retrieve an appropriate W. The set prescribed by the HTML specification is smaller than that used by other registries for security and interoperability reasons, and may not always return the expected W if an alternate one has been determined to be more internet-compatible.Character translation functions to and from the gb18030 and GBK encoding schemes.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Trustworthywillow Encoding:  1https://encoding.spec.whatwg.org/#gb18030-decodergp18030 decoder Decodes a . from a binary stream encoded with either the ^ or the _ encoding schemes, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  1https://encoding.spec.whatwg.org/#gb18030-encodergb18030 encoder without is GBKEncode the first  in a string according to the ^ encoding scheme, or return that same character if that scheme doesn't define a binary representation for it.Does not round-trip on \xE5E5.willow Encoding:  1https://encoding.spec.whatwg.org/#gb18030-encodergb18030 encoder with is GBKEncode the first  in a string according to the _ encoding scheme, or return that same character if that scheme doesn't define a binary representation for it.Does not round-trip on \xE5E5.Character translation functions to and from the EUC-KR encoding scheme.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferredwillow Encoding:  0https://encoding.spec.whatwg.org/#euc-kr-decoderEUC-KR decoder Decodes a ' from a binary stream encoded with the ] encoding scheme, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  0https://encoding.spec.whatwg.org/#euc-kr-encoderEUC-KR encoderEncode the first  in a string according to the ] encoding scheme, or return that same character if that scheme doesn't define a binary representation for it. Character translation functions to and from the EUC-JP encoding scheme.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferred)willow Encoding:  0https://encoding.spec.whatwg.org/#euc-jp-decoderEUC-JP decoder Decodes a ' from a binary stream encoded with the \ encoding scheme, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  0https://encoding.spec.whatwg.org/#euc-jp-encoderEUC-JP encoderEncode the first  in a string according to the \/jis02080 encoding scheme, or return that same character if that scheme doesn't define a binary representation for it.willowLook for a character in the jis0208 encoding at the given index.willowLook for the index of a given character in the jis0208 encoding.!Character translation functions to and from the Shift_JIS encoding scheme.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferredwillow Encoding:  3https://encoding.spec.whatwg.org/#shift_jis-decoderShift_JIS decoder Decodes a ' from a binary stream encoded with the s encoding scheme, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  3https://encoding.spec.whatwg.org/#shift_jis-encoderShift_JIS encoderEncode the first  in a string according to the s encoding scheme, or return that same character if that scheme doesn't define a binary representation for it."Character translation functions to and from the ISO-2022-JP encoding scheme.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Trustworthy fwillow6Shorthand type for parser combinators written for the a encoding algorithm.willow6Shorthand type for parser combinators written for the a decoding algorithm.willow The various *-byte mappings which may be loaded by the a algorithms.willowThe basic, seven-bit ASCII set.willowAs , but replacing backslash ('\' ) with yen ('') and tilde ('~') with overline ('@').willowThe standard block of halfwidth katakana located in Unicode between \xFF61 and \xFF9F.*Note that this has identical behaviour to  when passed to 6; halfwidth katakana are instead encoded as fullwidth.willowAn encoding of the full jis0208 set into a seven-bit-compatible transmission scheme.willowa is a "sticky-shift" encoding, where the escape sequences change the behaviour of every following character until the next escape; it therefore needs to track which character mode it is currently in.willowThe set of character mappings currently "loaded" into the algorithm.willowa is a "sticky-shift" encoding, where the escape sequences change the behaviour of every following character until the next escape; it therefore needs to track which character mode it is currently in. Additionally, escape sequences need to be separated by at least one real character, and while that could be ensured with pure code, we may as well add it to the state data being tracked anyway.willowThe set of character mappings currently "loaded" into the algorithm.willowWhether an output character is required (() or if an escape sequence is allowed ().willow+The default initial state to kickstart the a decoder.willow+The default initial state to kickstart the a encoder.willow Encoding:  5https://encoding.spec.whatwg.org/#iso-2022-jp-decoderISO-2022-JP decoder Decodes a ' from a binary stream encoded with the a encoding scheme, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  5https://encoding.spec.whatwg.org/#iso-2022-jp-encoderISO-2022-JP encoderEncode the first  in a string according to the a encoding scheme, or return that same character if that scheme doesn't define a binary representation for it.#Character translation functions to and from the Big5 encoding scheme.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-InferredSwillow Encoding:  .https://encoding.spec.whatwg.org/#big5-decoder Big5 decoder Decodes a ' from a binary stream encoded with the [ encoding scheme, or returns 5 if the stream starts with an invalid byte sequence.willow Encoding:  .https://encoding.spec.whatwg.org/#big5-encoder Big5 encoderEncode the first  in a string according to the [ encoding scheme, or return that same character if that scheme doesn't define a binary representation for it.Character translation functions to and from standardized binary streams.(c) 2020 Sam MayMPL-2.0ag.eitilt@gmail.com experimentalportable Safe-Inferred willow0The union of all state variables tracked by the :-to-bytes encoding algorithm of a single encoding scheme.willow9The union of all state variables tracked by the bytes-to-1 decoding algorithm of a single encoding scheme.willow Encoding:  +https://encoding.spec.whatwg.org/#bom-sniff BOM sniffChecks for a "byte-order mark" signature character in various encodings. If present, returns both the encoding found and the remainder of the stream, otherwise returns the input unchanged.willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-runrun an encoding's decoder with error mode fatal9Given a character encoding scheme, transform a dependant  into portable s. If any byte sequences are meaningless or illegal, they are returned verbatim for error reporting; a  should not be parsed further.See & to decode only a minimal section, or & for simple error replacement. Call  on the returned V; if no further bytes will be added to the document stream.willow Encoding:  (https://encoding.spec.whatwg.org/#decodedecode9Given a character encoding scheme, transform a dependant  into a portable . If any byte sequences are meaningless or illegal, they are replaced with the Unicode replacement character \xFFFD.See & to decode only a minimal section, or  if the original data should be retained for custom error reporting. Call  on the returned V; if no further bytes will be added to the document stream.willowRead a binary stream of UTF-8 encoded text. If the stream begins with a UTF-8 byte-order mark, it's silently dropped (any other BOM is ignored but remains in the output). Fails (returning a ) if the stream contains byte sequences which don't represent any character, or which encode a surrogate character.See " for simple error replacement, or ' if the BOM should always be retained.willow Encoding:  https://encoding.spec.whatwg.org/#utf-8-decode-without-bom-or-fail UTF-8 decode without BOM or failRead a binary stream of UTF-8 encoded text. If the stream begins with a byte-order mark, it is kept as the first character of the output. Fails (returning a ) if the stream contains byte sequences which don't represent any character, or which encode a surrogate character.See " for simple error replacement, or - if a redundant UTF-8 BOM should be dropped.willow Encoding:  .https://encoding.spec.whatwg.org/#utf-8-decode UTF-8 decodeRead a binary stream of UTF-8 encoded text. If the stream begins with a UTF-8 byte-order mark, it's silently dropped (any other BOM is ignored but remains in the output). Any surrogate characters or invalid byte sequences are replaced with the Unicode replacement character \xFFFD.See  if the original data should be retained for custom error reporting, or & if the BOM should always be retained.willow Encoding:  :https://encoding.spec.whatwg.org/#utf-8-decode-without-bomUTF-8 decode without BOMRead a binary stream of UTF-8 encoded text. If the stream begins with a byte-order mark, it is kept as the first character of the output. Any surrogate characters or invalid byte sequences are replaced with the Unicode replacement character \xFFFD.See  if the original data should be retained for custom error reporting, or - if a redundant UTF-8 BOM should be dropped.willowThe collection of data which, for any given encoding scheme, results in behaviour according to the vanilla decoder before any bytes have been read.willowExplicitly indicate that the input stream will not contain any further bytes, and perform any finalization processing based on that.See  for simple error replacement.willowExplicitly indicate that the input stream will not contain any further bytes, and perform any finalization processing based on that.See  if the original data should be retained for custom error reporting.willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-runrun an encoding's decoder with error mode fatal7Read the smallest number of bytes from the head of the  which would leave the decoder in a re-enterable state. If any byte sequences are meaningless or illegal, they are returned verbatim for error reporting; a  should not be parsed further.See ) to decode the entire string at once, or  for simple error replacement.willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-runrun an encoding's decoder with error mode  replacement7Read the smallest number of bytes from the head of the  which would leave the decoder in a re-enterable state. Any byte sequences which are meaningless or illegal are replaced with the Unicode replacement character \xFFFD.See ) to decode the entire string at once, or  if the original data should be retained for custom error reporting.willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-runrun an encoding's encoder with error mode fatal8Given a character encoding scheme, transform a portable  into a sequence of bytes representing those characters. If the encoding scheme does not define a binary representation for a character in the input, the original 2 is returned unchanged for custom error reporting.See & to encode only a minimal section, or / for escaping with HTML-style character codes.willow Encoding:  (https://encoding.spec.whatwg.org/#encodeencode8Given a character encoding scheme, transform a portable  into a sequence of bytes representing those characters. If the encoding scheme does not define a binary representation for a character in the input, they are replaced with an HTML-style escape (e.g.  "�").See & to encode only a minimal section, or  if the original data should be retained for custom error reporting.willow Encoding:  .https://encoding.spec.whatwg.org/#utf-8-encode UTF-8 encodeTransform a portable  into a sequence of bytes according to the UTF-8 encoding scheme.willowThe collection of data which, for any given encoding scheme, results in behaviour according to the vanilla decoder before any bytes have been read.willow Encoding:  6https://encoding.spec.whatwg.org/#concept-encoding-runrun an encoding's encoder with error mode fatal algorithm. Values may be easily instantiated as updates to .willowThe encoding the end user has specified should be used. Note that even this can still be overridden by the presence of a byte-order mark at the head of the stream.willowThe encoding given by the transport layer (e.g. through an HTTP  Content-Type header).willow0The number of bytes which should be skimmed for  meta$ attributes specifying an encoding.willowThe encoding used for the enclosing document (e.g., if this document is loaded via an