B -JY^Bw@spddlZdddZdddZGdddejZGd d d ejZGd d d ejZGd ddejZddZdS)NstrictcCstjt||dt|fS)Nr)codecsBOM_UTF8 utf_8_encodelen)inputerrorsr 6/opt/alt/python37/lib/python3.7/encodings/utf_8_sig.pyencodesr cCsDd}|ddtjkr&|dd}d}t||d\}}|||fS)NrT)rr utf_8_decode)rrprefixoutputconsumedr r r decodes  rc@s8eZdZdddZdddZddZd d Zd d Zd S)IncrementalEncoderrcCstj||d|_dS)N)rr__init__first)selfrr r r rszIncrementalEncoder.__init__FcCs:|jr$d|_tjt||jdSt||jdSdS)Nr)rrrrr)rrfinalr r r r s zIncrementalEncoder.encodecCstj|d|_dS)Nr)rrresetr)rr r r r's zIncrementalEncoder.resetcCs|jS)N)r)rr r r getstate+szIncrementalEncoder.getstatecCs ||_dS)N)r)rstater r r setstate.szIncrementalEncoder.setstateN)r)F)__name__ __module__ __qualname__rr rrrr r r r rs   rc@s6eZdZd ddZddZddZdd Zd d Zd S)IncrementalDecoderrcCstj||d|_dS)Nr)rBufferedIncrementalDecoderrr)rrr r r r2szIncrementalDecoder.__init__cCsv|jrht|dkr*tj|r"dSd|_n>d|_|ddtjkrht|dd||\}}||dfSt|||S)Nr )rr)rrrr startswithr )rrrrrrr r r _buffer_decode6s   z!IncrementalDecoder._buffer_decodecCstj|d|_dS)Nr)rr rr)rr r r rGs zIncrementalDecoder.resetcCstj|}|d|jfS)Nr)rr rr)rrr r r rKs zIncrementalDecoder.getstatecCstj|||d|_dS)Nr)rr rr)rrr r r rPszIncrementalDecoder.setstateN)r)rrrrr#rrrr r r r r1s  rc@seZdZddZdddZdS) StreamWritercCs.tj|y|`Wntk r(YnXdS)N)rr$rr AttributeError)rr r r rVs  zStreamWriter.resetrcCstj|_t||S)N)rrr )rrrr r r r ]szStreamWriter.encodeN)r)rrrrr r r r r r$Usr$c@seZdZddZdddZdS) StreamReadercCs.tj|y|`Wntk r(YnXdS)N)rr&rrr%)rr r r rbs  zStreamReader.resetrcCspt|dkrtj|r\dSn>|ddtjkr\tj|_t|dd|\}}||dfStj|_t||S)Nr )r!r)rrrr"r r)rrrrrr r r ris   zStreamReader.decodeN)r)rrrrrr r r r r&asr&c CstjdttttttdS)Nz utf-8-sig)namer rincrementalencoderincrementaldecoder streamreader streamwriter)r CodecInfor rrrr&r$r r r r getregentryysr-)r)r) rr rrr rr$r&r-r r r r  s  $