<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

7Rew  c            1   @   s  d  d l  m Z m Z m Z d  d l m Z d  d l Z d  d l Z d d l m	 Z	 m
 Z
 m Z m Z d d l m Z m Z d d l m Z d  d l m Z y d  d	 l m Z Wn e k
 r e Z Yn Xy d  d
 l m Z Wn( e k
 r	Gd d   d e  Z Yn Xe d d   e
 D  Z e d d   e D  Z e d d   e D  Z e e d d g  BZ e j d  Z e d d d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 g   Z e j d4  Z  i  Z! Gd5 d6   d6 e  Z" d dE dE d7 d8  Z% Gd9 d:   d: e  Z& Gd; d<   d< e&  Z' Gd= d>   d> e(  Z) Gd? d@   d@ e  Z* GdA dB   dB e  Z+ dC dD   Z, d S(F   i    (   u   absolute_importu   divisionu   unicode_literals(   u	   text_typeNi   (   u   EOFu   spaceCharactersu   asciiLettersu   asciiUppercase(   u	   encodingsu   ReparseException(   u   utils(   u   StringIO(   u   BytesIO(   u   BufferedIOBasec             B   s   |  Ee  Z d  Z d S(   u   BufferedIOBaseN(   u   __name__u
   __module__u   __qualname__(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   BufferedIOBase   s   u   BufferedIOBasec             C   s   g  |  ] } | j  d    q S(   u   ascii(   u   encode(   u   .0u   item(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   <listcomp>   s   	 u
   <listcomp>c             C   s   g  |  ] } | j  d    q S(   u   ascii(   u   encode(   u   .0u   item(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   <listcomp>   s   	 c             C   s   g  |  ] } | j  d    q S(   u   ascii(   u   encode(   u   .0u   item(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   <listcomp>   s   	 s   >s   <u   [----﷐-﷯￾￿🿾🿿𯿾𯿿𿿾𿿿񏿾񏿿񟿾񟿿񯿾񯿿񿿾񿿿򏿾򏿿򟿾򟿿򯿾򯿿򿿾򿿿󏿾󏿿󟿾󟿿󯿾󯿿󿿾󿿿􏿾􏿿]i i i i i i i i i i i i i i i i i	 i	 i
 i
 i i i i i i i i i i i i u   [	- -/:-@[-`{-~]c             B   sn   |  Ee  Z d  Z d Z d d   Z d d   Z d d   Z d d	   Z d
 d   Z d d   Z	 d d   Z
 d S(   u   BufferedStreamu   Buffering for streams that do not have buffering of their own

    The buffer is implemented as a list of chunks on the assumption that
    joining many strings will be slow since it is O(n**2)
    c             C   s%   | |  _  g  |  _ d d g |  _ d  S(   Ni   i    i(   u   streamu   bufferu   position(   u   selfu   stream(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__5   s    		u   BufferedStream.__init__c             C   sP   d } x2 |  j  d  |  j d  D] } | t |  7} q! W| |  j d 7} | S(   Ni    i   (   u   bufferu   positionu   len(   u   selfu   posu   chunk(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   tell:   s
    !u   BufferedStream.tellc             C   sx   | |  j    k s t  | } d } x> t |  j |  | k  rd | t |  j |  8} | d 7} q' W| | g |  _ d  S(   Ni    i   (   u   _bufferedBytesu   AssertionErroru   lenu   bufferu   position(   u   selfu   posu   offsetu   i(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   seekA   s    u   BufferedStream.seekc             C   sp   |  j  s |  j |  S|  j d t |  j   k r_ |  j d t |  j  d  k r_ |  j |  S|  j |  Sd  S(   Ni    i   i(   u   bufferu   _readStreamu   positionu   lenu   _readFromBuffer(   u   selfu   bytes(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   readJ   s    	 u   BufferedStream.readc             C   s   t  d d   |  j D  S(   Nc             S   s   g  |  ] } t  |   q S(    (   u   len(   u   .0u   item(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   <listcomp>T   s   	 u1   BufferedStream._bufferedBytes.<locals>.<listcomp>(   u   sumu   buffer(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   _bufferedBytesS   s    u   BufferedStream._bufferedBytesc             C   sJ   |  j  j |  } |  j j |  |  j d d 7<t |  |  j d <| S(   Ni    i   (   u   streamu   readu   bufferu   appendu   positionu   len(   u   selfu   bytesu   data(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   _readStreamV   s
    u   BufferedStream._readStreamc             C   s%  | } g  } |  j  d } |  j  d } x | t |  j  k  r | d k r | d k s\ t  |  j | } | t |  | k r | } | | | g |  _  n/ t |  | } | t |  g |  _  | d 7} | j | | | |   | | 8} d } q) W| r| j |  j |   n  d j |  S(   Ni    i   s    (   u   positionu   lenu   bufferu   AssertionErroru   appendu   _readStreamu   join(   u   selfu   bytesu   remainingBytesu   rvu   bufferIndexu   bufferOffsetu   bufferedDatau   bytesToRead(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   _readFromBuffer]   s&    $


u   BufferedStream._readFromBufferN(   u   __name__u
   __module__u   __qualname__u   __doc__u   __init__u   tellu   seeku   readu   _bufferedBytesu   _readStreamu   _readFromBuffer(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   BufferedStream.   s   		u   BufferedStreamc             C   s{   t  |  d  r* t |  j d  t  } n t |  t  } | rd | d  k	 rZ t d   n  t |   St |  | | |  Sd  S(   Nu   readi    u7   Cannot explicitly set an encoding with a unicode string(   u   hasattru
   isinstanceu   readu	   text_typeu   Noneu	   TypeErroru   HTMLUnicodeInputStreamu   HTMLBinaryInputStream(   u   sourceu   encodingu	   parseMetau   chardetu	   isUnicode(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   HTMLInputStreamx   s    
u   HTMLInputStreamc             B   s   |  Ee  Z d  Z d Z d Z d d   Z d d   Z d d   Z d	 d
   Z d d   Z	 d d   Z
 d d d  Z d d   Z d d   Z d d d  Z d d   Z d S(   u   HTMLUnicodeInputStreamu   Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    i (  c             C   s   t  d  d k r3 |  j |  _ t j d  |  _ n |  j |  _ t j d  |  _ d g |  _ d	 |  _ |  j	 |  |  _
 |  j   d S(
   u  Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        u   􏿿i   u	   [-]u0   ([-](?![-])|(?<![-])[-])i    u   utf-8u   certainN(   u   utf-8u   certain(   u   lenu   characterErrorsUCS4u   reportCharacterErrorsu   reu   compileu   replaceCharactersRegexpu   characterErrorsUCS2u   newLinesu   charEncodingu
   openStreamu
   dataStreamu   reset(   u   selfu   source(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__   s    	u   HTMLUnicodeInputStream.__init__c             C   sC   d |  _  d |  _ d |  _ g  |  _ d |  _ d |  _ d  |  _ d  S(   Nu    i    (   u   chunku	   chunkSizeu   chunkOffsetu   errorsu   prevNumLinesu   prevNumColsu   Noneu   _bufferedCharacter(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   reset   s    						u   HTMLUnicodeInputStream.resetc             C   s(   t  | d  r | } n t |  } | S(   uv   Produces a file object from source.

        source can be either a file object, local filename or a string.

        u   read(   u   hasattru   StringIO(   u   selfu   sourceu   stream(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   openStream   s    	u!   HTMLUnicodeInputStream.openStreamc             C   st   |  j  } | j d d |  } |  j | } | j d d |  } | d k r\ |  j | } n | | d } | | f S(   Nu   
i    i   i(   u   chunku   countu   prevNumLinesu   rfindu   prevNumCols(   u   selfu   offsetu   chunku   nLinesu   positionLineu   lastLinePosu   positionColumn(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	   _position   s    	u    HTMLUnicodeInputStream._positionc             C   s&   |  j  |  j  \ } } | d | f S(   u:   Returns (line, col) of the current position in the stream.i   (   u	   _positionu   chunkOffset(   u   selfu   lineu   col(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   position   s    u   HTMLUnicodeInputStream.positionc             C   sL   |  j  |  j k r% |  j   s% t Sn  |  j  } |  j | } | d |  _  | S(   uo    Read one character from the stream or queue if available. Return
            EOF when EOF is reached.
        i   (   u   chunkOffsetu	   chunkSizeu	   readChunku   EOFu   chunk(   u   selfu   chunkOffsetu   char(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   char   s    	u   HTMLUnicodeInputStream.charc             C   s^  | d  k r |  j } n  |  j |  j  \ |  _ |  _ d |  _ d |  _ d |  _ |  j j	 |  } |  j
 r |  j
 | } d  |  _
 n
 | s d St |  d k r t | d  } | d k s d | k o d k n r | d |  _
 | d  d  } q n  |  j |  |  j j d |  } | j d d	  } | j d
 d	  } | |  _ t |  |  _ d S(   Nu    i    i   i   i   i  u   �u   
u   
u   FiiiT(   u   Noneu   _defaultChunkSizeu	   _positionu	   chunkSizeu   prevNumLinesu   prevNumColsu   chunku   chunkOffsetu
   dataStreamu   readu   _bufferedCharacteru   Falseu   lenu   ordu   reportCharacterErrorsu   replaceCharactersRegexpu   subu   replaceu   True(   u   selfu	   chunkSizeu   datau   lastv(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	   readChunk   s0    				(	u    HTMLUnicodeInputStream.readChunkc             C   s:   x3 t  t t j |    D] } |  j j d  q Wd  S(   Nu   invalid-codepoint(   u   rangeu   lenu   invalid_unicode_reu   findallu   errorsu   append(   u   selfu   datau   i(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   characterErrorsUCS4  s    "u*   HTMLUnicodeInputStream.characterErrorsUCS4c             C   s  d } x t j |  D] } | r( q n  t | j    } | j   } t j | | | d   r t j | | | d   } | t	 k r |  j
 j d  n  d } q | d k r | d k r | t |  d k r |  j
 j d  q d } |  j
 j d  q Wd  S(   Ni   u   invalid-codepointi   i  i   FT(   u   Falseu   invalid_unicode_reu   finditeru   ordu   groupu   startu   utilsu   isSurrogatePairu   surrogatePairToCodepointu   non_bmp_invalid_codepointsu   errorsu   appendu   Trueu   len(   u   selfu   datau   skipu   matchu	   codepointu   posu   char_val(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   characterErrorsUCS2  s     	u*   HTMLUnicodeInputStream.characterErrorsUCS2c       
      C   sp  y t  | | f } Wn t k
 r x& | D] } t |  d k  s+ t  q+ Wd j d d   | D  } | s| d | } n  t j d |  } t  | | f <Yn Xg  } x | j |  j |  j	  } | d k r |  j	 |  j k r-Pq-nE | j   } | |  j k r-| j |  j |  j	 |   | |  _	 Pn  | j |  j |  j	 d   |  j   s Pq q d j |  }	 |	 S(   u    Returns a string of characters from the stream up to but not
        including any character in 'characters' or EOF. 'characters' must be
        a container that supports the 'in' method and iteration over its
        characters.
        i   u    c             S   s    g  |  ] } d  t  |   q S(   u   \x%02x(   u   ord(   u   .0u   c(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   <listcomp>>  s   	 u5   HTMLUnicodeInputStream.charsUntil.<locals>.<listcomp>u   ^%su   [%s]+N(   u   charsUntilRegExu   KeyErroru   ordu   AssertionErroru   joinu   reu   compileu   matchu   chunku   chunkOffsetu   Noneu	   chunkSizeu   endu   appendu	   readChunk(
   u   selfu
   charactersu   oppositeu   charsu   cu   regexu   rvu   mu   endu   r(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   charsUntil0  s2    &	u!   HTMLUnicodeInputStream.charsUntilc             C   so   | d  k	 rk |  j d k r= | |  j |  _ |  j d 7_ qk |  j d 8_ |  j |  j | k sk t  n  d  S(   Ni    i   (   u   Noneu   chunkOffsetu   chunku	   chunkSizeu   AssertionError(   u   selfu   char(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   unget_  s    u   HTMLUnicodeInputStream.ungetNF(   u   __name__u
   __module__u   __qualname__u   __doc__u   _defaultChunkSizeu   __init__u   resetu
   openStreamu	   _positionu   positionu   charu   Noneu	   readChunku   characterErrorsUCS4u   characterErrorsUCS2u   Falseu
   charsUntilu   unget(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   HTMLUnicodeInputStream   s   !(/u   HTMLUnicodeInputStreamc             B   s}   |  Ee  Z d  Z d Z d d d d d  Z d d   Z d d   Z d d d d	  Z	 d
 d   Z
 d d   Z d d   Z d S(   u   HTMLBinaryInputStreamu   Provides a unicode stream of characters to the HTMLTokenizer.

    This class takes care of character encoding and removing or replacing
    incorrect byte-sequences and also provides column and line tracking.

    c             C   s   |  j  |  |  _ t j |  |  j  t |  d f |  _ d |  _ d |  _ d |  _ |  j d d k r |  j
 | |  |  _ n  |  j   d S(   u  Initialises the HTMLInputStream.

        HTMLInputStream(source, [encoding]) -> Normalized stream from source
        for use by html5lib.

        source can be either a file-object, local filename or a string.

        The optional encoding parameter must be a string that indicates
        the encoding.  If specified, that encoding will be used,
        regardless of any BOM or later declaration (such as in a meta
        element)

        parseMeta - Look for a <meta> element containing encoding information

        u   certaini   id   u   windows-1252i    N(   u
   openStreamu	   rawStreamu   HTMLUnicodeInputStreamu   __init__u	   codecNameu   charEncodingu   numBytesMetau   numBytesChardetu   defaultEncodingu   Noneu   detectEncodingu   reset(   u   selfu   sourceu   encodingu	   parseMetau   chardet(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__x  s    			u   HTMLBinaryInputStream.__init__c             C   s6   t  j |  j d  |  j d  |  _ t j |   d  S(   Ni    u   replace(   u   codecsu	   getreaderu   charEncodingu	   rawStreamu
   dataStreamu   HTMLUnicodeInputStreamu   reset(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   reset  s    u   HTMLBinaryInputStream.resetc          	   C   sV   t  | d  r | } n t |  } y | j | j    Wn t |  } Yn X| S(   uv   Produces a file object from source.

        source can be either a file object, local filename or a string.

        u   read(   u   hasattru   BytesIOu   seeku   tellu   BufferedStream(   u   selfu   sourceu   stream(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   openStream  s    	u    HTMLBinaryInputStream.openStreamc       
      C   s  |  j    } d } | d  k r9 | r9 |  j   } d } n  | d  k r:| r:d } y y d d l m } Wn" t k
 r d d l m } Yn Xg  } |   } x[ | j s |  j j	 |  j
  } t | t  s t  | s Pn  | j |  | j |  q W| j   | j d } |  j j d  Wq:t k
 r6Yq:Xn  | d  k rXd } |  j } n  i d d 6}	 | j   |	 k r|	 | j   } n  | | f S(   Nu   certainu	   tentativei    (   u   UniversalDetectoru   encodingu   windows-1252u
   iso-8859-1(   u	   detectBOMu   Noneu   detectEncodingMetau   charade.universaldetectoru   UniversalDetectoru   ImportErroru   chardet.universaldetectoru   doneu	   rawStreamu   readu   numBytesChardetu
   isinstanceu   bytesu   AssertionErroru   appendu   feedu   closeu   resultu   seeku   defaultEncodingu   lower(
   u   selfu	   parseMetau   chardetu   encodingu
   confidenceu   UniversalDetectoru   buffersu   detectoru   bufferu   encodingSub(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   detectEncoding  sB    		
u$   HTMLBinaryInputStream.detectEncodingc             C   s   |  j  d d k s t  t |  } | d	 k r: d } n  | d  k rJ d  S| |  j  d k rv |  j  d d f |  _  nF |  j j d  |  j   | d f |  _  t d |  j  d | f   d  S(
   Ni   u   certainu   utf-16u	   utf-16-beu	   utf-16-leu   utf-8i    u   Encoding changed from %s to %s(   u   utf-16u	   utf-16-beu	   utf-16-le(   u   charEncodingu   AssertionErroru	   codecNameu   Noneu	   rawStreamu   seeku   resetu   ReparseException(   u   selfu   newEncoding(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   changeEncoding  s    	
u$   HTMLBinaryInputStream.changeEncodingc             C   s   i d t  j 6d t  j 6d t  j 6d t  j 6d t  j 6} |  j j d  } t | t	  s_ t
  | j | d d   } d } | s | j |  } d } | s | j | d d	   } d	 } q n  |  j j | r | p d
  | S(   u   Attempts to detect at BOM at the start of the stream. If
        an encoding can be determined from the BOM return the name of the
        encoding otherwise return Noneu   utf-8u	   utf-16-leu	   utf-16-beu	   utf-32-leu	   utf-32-bei   Ni   i   i    (   u   codecsu   BOM_UTF8u   BOM_UTF16_LEu   BOM_UTF16_BEu   BOM_UTF32_LEu   BOM_UTF32_BEu	   rawStreamu   readu
   isinstanceu   bytesu   AssertionErroru   getu   seek(   u   selfu   bomDictu   stringu   encodingu   seek(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	   detectBOM  s     
u   HTMLBinaryInputStream.detectBOMc             C   sk   |  j  j |  j  } t | t  s* t  t |  } |  j  j d  | j   } | d k rg d } n  | S(   u9   Report the encoding declared by the meta element
        i    u   utf-16u	   utf-16-beu	   utf-16-leu   utf-8(   u   utf-16u	   utf-16-beu	   utf-16-le(	   u	   rawStreamu   readu   numBytesMetau
   isinstanceu   bytesu   AssertionErroru   EncodingParseru   seeku   getEncoding(   u   selfu   bufferu   parseru   encoding(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   detectEncodingMeta  s    	u(   HTMLBinaryInputStream.detectEncodingMetaNT(   u   __name__u
   __module__u   __qualname__u   __doc__u   Noneu   Trueu   __init__u   resetu
   openStreamu   detectEncodingu   changeEncodingu	   detectBOMu   detectEncodingMeta(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   HTMLBinaryInputStreamp  s   (-u   HTMLBinaryInputStreamc             B   s   |  Ee  Z d  Z d Z d d   Z d d   Z d d   Z d d	   Z d
 d   Z d d   Z	 d d   Z
 d d   Z e e e
  Z d d   Z e e  Z e d d  Z d d   Z d d   Z d d   Z d S(   u   EncodingBytesu   String-like object with an associated position and various extra methods
    If the position is ever greater than the string length then an exception is
    raisedc             C   s+   t  | t  s t  t j |  | j    S(   N(   u
   isinstanceu   bytesu   AssertionErroru   __new__u   lower(   u   selfu   value(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __new__&  s    u   EncodingBytes.__new__c             C   s   d |  _  d  S(   Ni   i(   u	   _position(   u   selfu   value(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__*  s    u   EncodingBytes.__init__c             C   s   |  S(   N(    (   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __iter__-  s    u   EncodingBytes.__iter__c             C   sV   |  j  d } |  _  | t |   k r/ t  n | d k  rD t  n  |  | | d  S(   Ni   i    (   u	   _positionu   lenu   StopIterationu	   TypeError(   u   selfu   p(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __next__0  s    		u   EncodingBytes.__next__c             C   s
   |  j    S(   N(   u   __next__(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   next8  s    u   EncodingBytes.nextc             C   s\   |  j  } | t |   k r$ t  n | d k  r9 t  n  | d |  _  } |  | | d  S(   Ni    i   (   u	   _positionu   lenu   StopIterationu	   TypeError(   u   selfu   p(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   previous<  s    			u   EncodingBytes.previousc             C   s+   |  j  t |   k r t  n  | |  _  d  S(   N(   u	   _positionu   lenu   StopIteration(   u   selfu   position(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   setPositionE  s    	u   EncodingBytes.setPositionc             C   s<   |  j  t |   k r t  n  |  j  d k r4 |  j  Sd  Sd  S(   Ni    (   u	   _positionu   lenu   StopIterationu   None(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   getPositionJ  s
    	u   EncodingBytes.getPositionc             C   s   |  |  j  |  j  d  S(   Ni   (   u   position(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   getCurrentByteT  s    u   EncodingBytes.getCurrentBytec             C   sf   |  j  } xM | t |   k  rX |  | | d  } | | k rK | |  _ | S| d 7} q W| |  _ d S(   u   Skip past a list of charactersi   N(   u   positionu   lenu	   _positionu   None(   u   selfu   charsu   pu   c(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   skipY  s    			u   EncodingBytes.skipc             C   sf   |  j  } xM | t |   k  rX |  | | d  } | | k rK | |  _ | S| d 7} q W| |  _ d  S(   Ni   (   u   positionu   lenu	   _positionu   None(   u   selfu   charsu   pu   c(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	   skipUntile  s    			u   EncodingBytes.skipUntilc             C   sT   |  j  } |  | | t |   } | j |  } | rP |  j  t |  7_  n  | S(   u   Look for a sequence of bytes at the start of a string. If the bytes
        are found return True and advance the position to the byte after the
        match. Otherwise return False and leave the position alone(   u   positionu   lenu
   startswith(   u   selfu   bytesu   pu   datau   rv(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   matchBytesp  s    	u   EncodingBytes.matchBytesc             C   sn   |  |  j  d  j |  } | d k rd |  j d k rC d |  _ n  |  j | t |  d 7_ d St  d S(   u   Look for the next sequence of bytes matching a given sequence. If
        a match is found advance the position to the last byte of the matchNi   i    iiT(   u   positionu   findu	   _positionu   lenu   Trueu   StopIteration(   u   selfu   bytesu   newPosition(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   jumpTo{  s    u   EncodingBytes.jumpToN(   u   __name__u
   __module__u   __qualname__u   __doc__u   __new__u   __init__u   __iter__u   __next__u   nextu   previousu   setPositionu   getPositionu   propertyu   positionu   getCurrentByteu   currentByteu   spaceCharactersBytesu   skipu	   skipUntilu
   matchBytesu   jumpTo(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   EncodingBytes"  s    	u   EncodingBytesc             B   s   |  Ee  Z d  Z d Z d d   Z d d   Z d d   Z d d	   Z d
 d   Z d d   Z	 d d   Z
 d d   Z d d   Z d S(   u   EncodingParseru?   Mini parser for detecting character encoding from meta elementsc             C   s   t  |  |  _ d |  _ d S(   u3   string - the data to work on for encoding detectionN(   u   EncodingBytesu   datau   Noneu   encoding(   u   selfu   data(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__  s    u   EncodingParser.__init__c             C   s   d |  j  f d |  j f d |  j f d |  j f d |  j f d |  j f f } xw |  j D]l } d } xS | D]K \ } } |  j j |  rk y |   } PWq t k
 r d } PYq Xqk qk W| sX PqX qX W|  j
 S(	   Ns   <!--s   <metas   </s   <!s   <?s   <TF(   u   handleCommentu
   handleMetau   handlePossibleEndTagu   handleOtheru   handlePossibleStartTagu   datau   Trueu
   matchBytesu   StopIterationu   Falseu   encoding(   u   selfu   methodDispatchu   byteu   keepParsingu   keyu   method(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   getEncoding  s&    	u   EncodingParser.getEncodingc             C   s   |  j  j d  S(   u   Skip over commentss   -->(   u   datau   jumpTo(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   handleComment  s    u   EncodingParser.handleCommentc             C   sD  |  j  j t k r d Sd } d  } x|  j   } | d  k rA d S| d d k r | d d k } | r=| d  k	 r=| |  _ d Sq% | d d k r | d } t |  } | d  k	 r=| |  _ d Sq% | d d k r% t	 t
 | d   } | j   } | d  k	 r=t |  } | d  k	 r:| r.| |  _ d S| } q:q=q% q% d  S(	   Ni    s
   http-equivi   s   content-types   charsets   contentTF(   u   datau   currentByteu   spaceCharactersBytesu   Trueu   Falseu   Noneu   getAttributeu   encodingu	   codecNameu   ContentAttrParseru   EncodingBytesu   parse(   u   selfu	   hasPragmau   pendingEncodingu   attru   tentativeEncodingu   codecu   contentParser(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu
   handleMeta  s:    	
		u   EncodingParser.handleMetac             C   s   |  j  d  S(   NF(   u   handlePossibleTagu   False(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   handlePossibleStartTag  s    u%   EncodingParser.handlePossibleStartTagc             C   s   t  |  j  |  j d  S(   NT(   u   nextu   datau   handlePossibleTagu   True(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   handlePossibleEndTag  s    u#   EncodingParser.handlePossibleEndTagc             C   s   |  j  } | j t k r9 | r5 | j   |  j   n  d S| j t  } | d k ra | j   n+ |  j   } x | d  k	 r |  j   } qp Wd S(   Ns   <T(
   u   datau   currentByteu   asciiLettersBytesu   previousu   handleOtheru   Trueu	   skipUntilu   spacesAngleBracketsu   getAttributeu   None(   u   selfu   endTagu   datau   cu   attr(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   handlePossibleTag  s    	
u    EncodingParser.handlePossibleTagc             C   s   |  j  j d  S(   Ns   >(   u   datau   jumpTo(   u   self(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   handleOther  s    u   EncodingParser.handleOtherc             C   s  |  j  } | j t t d g  B } | d k sI t |  d k sI t  | d	 k rY d Sg  } g  } x | d k r~ | r~ Pnz | t k r | j   } Pn^ | d
 k r d j |  d f S| t k r | j	 | j
    n | d k r d S| j	 |  t |  } qh | d k r0| j   d j |  d f St |  | j   } | d k r| } x t |  } | | k rt |  d j |  d j |  f S| t k r| j	 | j
    q[| j	 |  q[n^ | d k rd j |  d f S| t k r| j	 | j
    n | d k rd S| j	 |  xv t |  } | t k rcd j |  d j |  f S| t k r| j	 | j
    q/| d k rd S| j	 |  q/d S(   u_   Return a name,value pair for the next attribute in the stream,
        if one is found, or Nones   /i   s   >s   =s    s   's   "N(   s   >N(   s   /s   >(   s   's   "(   u   datau   skipu   spaceCharactersBytesu	   frozensetu   Noneu   lenu   AssertionErroru   joinu   asciiUppercaseBytesu   appendu   loweru   nextu   previousu   spacesAngleBrackets(   u   selfu   datau   cu   attrNameu	   attrValueu	   quoteChar(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   getAttribute  sh    	$


u   EncodingParser.getAttributeN(   u   __name__u
   __module__u   __qualname__u   __doc__u   __init__u   getEncodingu   handleCommentu
   handleMetau   handlePossibleStartTagu   handlePossibleEndTagu   handlePossibleTagu   handleOtheru   getAttribute(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   EncodingParser  s   $u   EncodingParserc             B   s,   |  Ee  Z d  Z d d   Z d d   Z d S(   u   ContentAttrParserc             C   s"   t  | t  s t  | |  _ d  S(   N(   u
   isinstanceu   bytesu   AssertionErroru   data(   u   selfu   data(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   __init__?  s    u   ContentAttrParser.__init__c             C   sN  y1|  j  j d  |  j  j d 7_ |  j  j   |  j  j d k sH d  S|  j  j d 7_ |  j  j   |  j  j d k r |  j  j } |  j  j d 7_ |  j  j } |  j  j |  r |  j  | |  j  j  Sd  Sn] |  j  j } y+ |  j  j t  |  j  | |  j  j  SWn# t k
 r/|  j  | d   SYn XWn t k
 rId  SYn Xd  S(   Ns   charseti   s   =s   "s   '(   s   "s   '(	   u   datau   jumpTou   positionu   skipu   currentByteu   Noneu	   skipUntilu   spaceCharactersBytesu   StopIteration(   u   selfu	   quoteMarku   oldPosition(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   parseC  s.    u   ContentAttrParser.parseN(   u   __name__u
   __module__u   __qualname__u   __init__u   parse(   u
   __locals__(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   ContentAttrParser>  s   u   ContentAttrParserc             C   st   t  |  t  r> y |  j d  }  Wq> t k
 r: d SYq> Xn  |  rl t j d |   j   } t j	 | d  Sd Sd S(   u{   Return the python codec name corresponding to an encoding or None if the
    string doesn't correspond to a valid encoding.u   asciiu    N(
   u
   isinstanceu   bytesu   decodeu   UnicodeDecodeErroru   Noneu   ascii_punctuation_reu   subu   loweru	   encodingsu   get(   u   encodingu   canonicalName(    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu	   codecNamee  s    u	   codecNameT(-   u
   __future__u   absolute_importu   divisionu   unicode_literalsu   pip._vendor.sixu	   text_typeu   codecsu   reu	   constantsu   EOFu   spaceCharactersu   asciiLettersu   asciiUppercaseu	   encodingsu   ReparseExceptionu    u   utilsu   iou   StringIOu   BytesIOu   ImportErroru   BufferedIOBaseu   objectu	   frozensetu   spaceCharactersBytesu   asciiLettersBytesu   asciiUppercaseBytesu   spacesAngleBracketsu   compileu   invalid_unicode_reu   setu   non_bmp_invalid_codepointsu   ascii_punctuation_reu   charsUntilRegExu   BufferedStreamu   Noneu   Trueu   HTMLInputStreamu   HTMLUnicodeInputStreamu   HTMLBinaryInputStreamu   bytesu   EncodingBytesu   EncodingParseru   ContentAttrParseru	   codecName(    (    (    u9   /tmp/pip-zej_zi-build/pip/_vendor/html5lib/inputstream.pyu   <module>   sJ   "Jg'