
^Wc           @` s  d  d l  m Z m Z m Z d  d l m Z d  d l Z d d l m Z d d l m	 Z	 d d l m
 Z
 d d l m Z d d	 l m Z d d
 l m Z d d l m Z m Z d d l m Z d d l m Z d d l m Z m Z d d l m Z m Z m Z d d l m Z m Z d d l m Z d d l m Z d e e d  Z d d e e d  Z  d   Z! d e" f d     YZ# d   Z$ d e e% d  Z& d e' f d     YZ( d S(   i    (   t   absolute_importt   divisiont   unicode_literals(   t   with_metaclassNi   (   t   inputstream(   t	   tokenizer(   t   treebuilders(   t   Marker(   t   utils(   t	   constants(   t   spaceCharacterst   asciiUpper2Lower(   t   specialElements(   t   headingElements(   t   cdataElementst   rcdataElements(   t
   tokenTypest   ReparseExceptiont
   namespaces(   t   htmlIntegrationPointElementst"   mathmlTextIntegrationPointElements(   t   adjustForeignAttributes(   t   Eu   etreec         C` s4   t  j |  } t | d | } | j |  d | S(   u.   Parse a string or file-like object into a treet   namespaceHTMLElementst   encoding(   R   t   getTreeBuildert
   HTMLParsert   parse(   t   doct   treebuilderR   R   t   tbt   p(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR      s    u   divc         C` s:   t  j |  } t | d | } | j |  d | d | S(   NR   t	   containerR   (   R   R   R   t   parseFragment(   R   R    R   R   R   R   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR!       s    c         ` s    d t  f   f d     Y} | S(   Nt	   Decoratedc           ` s   e  Z   f d    Z RS(   c         ` s^   xE | j    D]7 \ } } t | t j  r:   |  } n  | | | <q Wt j |  | | |  S(   N(   t   itemst
   isinstancet   typest   FunctionTypet   typet   __new__(   t   metat	   classnamet   basest	   classDictt   attributeNamet	   attribute(   t   function(    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR(   )   s
    (   t   __name__t
   __module__R(   (    (   R/   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR"   (   s   (   R'   (   R/   R"   (    (   R/   sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   method_decorator_metaclass'   s    R   c           B` s   e  Z d  Z d e j e e e d  Z e d d e e d  Z	 d   Z
 e d    Z d   Z d   Z d   Z d	   Z d e e d
  Z d d e e d  Z d i  d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   uZ   HTML parser. Generates a tree structure from a stream of (possibly
        malformed) HTMLc         C` s   | |  _  | d k r' t j d  } n  | |  |  _ | |  _ g  |  _ t g  t |  j	   D]$ \ } } | | |  |  j  f ^ q^  |  _
 d S(   u  
        strict - raise an exception when a parse error is encountered

        tree - a treebuilder class controlling the type of tree that will be
        returned. Built in treebuilders can be accessed through
        html5lib.treebuilders.getTreeBuilder(treeType)

        tokenizer - a class that provides a stream of tokens to the treebuilder.
        This may be replaced for e.g. a sanitizer which converts some tags to
        text
        u   etreeN(   t   strictt   NoneR   R   t   treet   tokenizer_classt   errorst   dictt	   getPhasesR#   t   phases(   t   selfR5   R   R3   R   t   debugt   namet   cls(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   __init__7   s    			u   divc         K` s   | |  _  | |  _ |  j | d | d | d | d |  | |  _ |  j   x7 t r y |  j   PWqL t k
 r~ |  j   qL XqL Wd  S(   NR   t	   parseMetat
   useChardett   parser(   t   innerHTMLModeR    R6   R   t   resett   Truet   mainLoopR   (   R;   t   streamt	   innerHTMLR    R   R@   RA   t   kwargs(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   _parseQ   s    		
	
c         C` s  |  j  j   t |  _ g  |  _ g  |  _ d |  _ |  j r |  j j	   |  _
 |  j
 t k rp |  j j |  j _ nH |  j
 t k r |  j j |  j _ n$ |  j
 d k r |  j j |  j _ n  |  j d |  _ |  j j   |  j   n t |  _
 |  j d |  _ d  |  _ d  |  _ t |  _ d  S(   Nu	   no quirksu	   plaintextu
   beforeHtmlu   initial(   R5   RD   t   Falset   firstStartTagR7   t   logt
   compatModeRC   R    t   lowerRH   R   R   t   rcdataStatet   stateR   t   rawtextStatet   plaintextStateR:   t   phaset   insertHtmlElementt   resetInsertionModeR4   t	   lastPhaset   beforeRCDataPhaseRE   t
   framesetOK(   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD   c   s*    								c         C` s$   t  |  d  s d S|  j j j d S(   u   The name of the character encoding
        that was used to decode the input stream,
        or :obj:`None` if that is not determined yet.

        u	   tokenizeri    N(   t   hasattrR4   R   RG   t   charEncoding(   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   documentEncoding   s    c         C` se   | j  d k rK | j t d k rK d | j k oJ | j d j t  d k S| j | j  f t k Sd  S(   Nu   annotation-xmlu   mathmlu   encodingu	   text/htmlu   application/xhtml+xml(   u	   text/htmlu   application/xhtml+xml(   R=   t	   namespaceR   t
   attributest	   translateR   R   (   R;   t   element(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   isHTMLIntegrationPoint   s    c         C` s   | j  | j f t k S(   N(   R]   R=   R   (   R;   R`   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   isMathMLTextIntegrationPoint   s    c         C` s*  t  d } t  d } t  d } t  d } t  d } t  d } t  d } x|  j   D]y} | }	 x+|	 d  k	 r|  j j r |  j j d n d  }
 |
 r |
 j n d  } |
 r |
 j n d  } |	 d	 } | | k r |  j |	 d
 |	 j d i    d  }	 qb t	 |  j j  d k s| |  j j
 k s|  j |
  rl| | k rZ| d t d d g  k s| | | f k s| t d k r| d k r| d d k s|  j |
  r| | | | f k r|  j } n |  j d } | | k r| j |	  }	 qb | | k r| j |	  }	 qb | | k r/| j |	  }	 qb | | k rM| j |	  }	 qb | | k rk| j |	  }	 qb | | k rb | j |	  }	 qb qb W| | k rS | d rS | d rS |  j d i | d d 6 qS qS Wt } g  } xG | r%| j |  j  |  j j   } | r|  j | k s"t  qqWd  S(   Nu
   Charactersu   SpaceCharactersu   StartTagu   EndTagu   Commentu   Doctypeu
   ParseErroriu   typeu   datau   datavarsi    u   nameu   mglyphu
   malignmarku   mathmlu   annotation-xmlu   svgu   inForeignContentu   selfClosingu   selfClosingAcknowledgedu&   non-void-element-with-trailing-solidus(   R   t   normalizedTokensR4   R5   t   openElementsR]   R=   t
   parseErrort   gett   lent   defaultNamespaceRb   t	   frozensetR   Ra   RT   R:   t   processCharacterst   processSpaceCharacterst   processStartTagt   processEndTagt   processCommentt   processDoctypeRE   t   appendt
   processEOFt   AssertionError(   R;   t   CharactersTokent   SpaceCharactersTokent   StartTagTokent   EndTagTokent   CommentTokent   DoctypeTokent   ParseErrorTokent   tokent	   new_tokent   currentNodet   currentNodeNamespacet   currentNodeNameR'   RT   t	   reprocessR:   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRF      sj    






"
 			c         c` s&   x |  j  D] } |  j |  Vq
 Wd  S(   N(   R   t   normalizeToken(   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRc      s    c      
   C` s2   |  j  | d t d | d | d | |  j j   S(   uf  Parse a HTML document into a well-formed tree

        stream - a filelike object or string containing the HTML to be parsed

        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)
        RH   R   R@   RA   (   RJ   RK   R5   t   getDocument(   R;   RG   R   R@   RA   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR      s    
c         C` s)   |  j  | t d | d | |  j j   S(   u  Parse a HTML fragment into a well-formed tree fragment

        container - name of the element we're setting the innerHTML property
        if set to None, default to 'div'

        stream - a filelike object or string containing the HTML to be parsed

        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)
        R    R   (   RJ   RE   R5   t   getFragment(   R;   RG   R    R   R@   RA   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR!      s    u   XXX-undefined-errorc         C` sI   |  j  j |  j j j   | | f  |  j rE t t | |   n  d  S(   N(   R7   Rp   R   RG   t   positionR3   t
   ParseErrorR   (   R;   t	   errorcodet   datavars(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRe      s    %	c         C` s<   | d t  d k r8 t | d d d d   | d <n  | S(   u3    HTML5 specific normalizations to the token stream u   typeu   StartTagu   dataNi(   R   R8   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    $c         C` sb   i d d 6} xN | j    D]@ \ } } | | d k r | d | | d | <| d | =q q Wd  S(   Nu   definitionURLu   definitionurlu   data(   R#   (   R;   Rz   t   replacementst   kt   v(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   adjustMathMLAttributes  s
    c         C` s  i> d d 6d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d! d" 6d# d$ 6d% d& 6d' d( 6d) d* 6d+ d, 6d- d. 6d/ d0 6d1 d2 6d3 d4 6d5 d6 6d7 d8 6d9 d: 6d; d< 6d= d> 6d? d@ 6dA dB 6dC dD 6dE dF 6dG dH 6dI dJ 6dK dL 6dM dN 6dO dP 6dQ dR 6dS dT 6dU dV 6dW dX 6dY dZ 6d[ d\ 6d] d^ 6d_ d` 6da db 6dc dd 6de df 6dg dh 6di dj 6dk dl 6dm dn 6do dp 6dq dr 6ds dt 6du dv 6dw dx 6dy dz 6d{ d| 6} xX t  | d} j    D]@ } | | k r| | } | d} | | d} | <| d} | =qqWd  S(~   Nu   attributeNameu   attributenameu   attributeTypeu   attributetypeu   baseFrequencyu   basefrequencyu   baseProfileu   baseprofileu   calcModeu   calcmodeu   clipPathUnitsu   clippathunitsu   contentScriptTypeu   contentscripttypeu   contentStyleTypeu   contentstyletypeu   diffuseConstantu   diffuseconstantu   edgeModeu   edgemodeu   externalResourcesRequiredu   externalresourcesrequiredu	   filterResu	   filterresu   filterUnitsu   filterunitsu   glyphRefu   glyphrefu   gradientTransformu   gradienttransformu   gradientUnitsu   gradientunitsu   kernelMatrixu   kernelmatrixu   kernelUnitLengthu   kernelunitlengthu	   keyPointsu	   keypointsu
   keySplinesu
   keysplinesu   keyTimesu   keytimesu   lengthAdjustu   lengthadjustu   limitingConeAngleu   limitingconeangleu   markerHeightu   markerheightu   markerUnitsu   markerunitsu   markerWidthu   markerwidthu   maskContentUnitsu   maskcontentunitsu	   maskUnitsu	   maskunitsu
   numOctavesu
   numoctavesu
   pathLengthu
   pathlengthu   patternContentUnitsu   patterncontentunitsu   patternTransformu   patterntransformu   patternUnitsu   patternunitsu	   pointsAtXu	   pointsatxu	   pointsAtYu	   pointsatyu	   pointsAtZu	   pointsatzu   preserveAlphau   preservealphau   preserveAspectRatiou   preserveaspectratiou   primitiveUnitsu   primitiveunitsu   refXu   refxu   refYu   refyu   repeatCountu   repeatcountu	   repeatDuru	   repeatduru   requiredExtensionsu   requiredextensionsu   requiredFeaturesu   requiredfeaturesu   specularConstantu   specularconstantu   specularExponentu   specularexponentu   spreadMethodu   spreadmethodu   startOffsetu   startoffsetu   stdDeviationu   stddeviationu   stitchTilesu   stitchtilesu   surfaceScaleu   surfacescaleu   systemLanguageu   systemlanguageu   tableValuesu   tablevaluesu   targetXu   targetxu   targetYu   targetyu
   textLengthu
   textlengthu   viewBoxu   viewboxu
   viewTargetu
   viewtargetu   xChannelSelectoru   xchannelselectoru   yChannelSelectoru   ychannelselectoru
   zoomAndPanu
   zoomandpanu   data(   t   listt   keys(   R;   Rz   R   t   originalNamet   svgName(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   adjustSVGAttributes  s    

c         C` s_   t  } xR | d j   D]@ } | | k r | | } | d | | d | <| d | =q q Wd  S(   Nu   data(   t   adjustForeignAttributesMapR   (   R;   Rz   R   R   t   foreignName(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   \  s    
c         C` s   |  j  j   d  S(   N(   RB   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   reparseTokenNormale  s    c         C` s]  t  } i d d 6d d 6d d 6d d 6d d	 6d d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6} x |  j j d  d  d  D] } | j } d  } | |  j j d k r |  j s t  t } |  j } n  | d k r |  j s t  n  | r| j |  j j	 k rq n  | | k r5|  j
 | | } Pq | r |  j
 d } Pq q W| |  _ d  S(   Nu   inSelectu   selectu   inCellu   tdu   thu   inRowu   tru   inTableBodyu   tbodyu   theadu   tfootu	   inCaptionu   captionu   inColumnGroupu   colgroupu   inTableu   tableu   inBodyu   headu   bodyu
   inFramesetu   framesetu
   beforeHeadu   htmlii    (   u   selectu   colgroupu   headu   html(   RK   R5   Rd   R=   R4   RH   Rr   RE   R]   Rh   R:   RT   (   R;   t   lastt   newModest   nodet   nodeNamet	   new_phase(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRV   h  sD    
 	c         C` su   | d k s t   |  j j |  | d k rC |  j j |  j _ n |  j j |  j _ |  j |  _ |  j	 d |  _ d S(   uY   Generic RCDATA/RAWTEXT Parsing algorithm
        contentType - RCDATA or RAWTEXT
        u   RAWTEXTu   RCDATAu   textN(   u   RAWTEXTu   RCDATA(
   Rr   R5   t   insertElementR   RR   RQ   RP   RT   t   originalPhaseR:   (   R;   Rz   t   contentType(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   parseRCDataRawtext  s    N(   R0   R1   t   __doc__R4   R   t   HTMLTokenizerRK   RE   R?   RJ   RD   t   propertyR\   Ra   Rb   RF   Rc   R   R!   Re   R   R   R   R   R   RV   R   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   3   s,   		"	
		@				G				,c         ` s1  d   } d   } d t  | |  |   f d     Y  d   f d     Y} d   f d     Y} d	   f   f d
     Y} d   f   f d     Y} d   f   f d     Y} d   f   f d     Y} d   f   f d     Y}	 d   f   f d     Y}
 d   f   f d     Y} d   f   f d     Y} d   f   f d     Y} d   f   f d     Y} d   f   f d     Y} d   f   f d      Y} d!   f   f d"     Y} d#   f   f d$     Y} d%   f   f d&     Y} d'   f   f d(     Y} d)   f   f d*     Y} d+   f   f d,     Y} d-   f   f d.     Y} d/   f   f d0     Y} i | d1 6| d2 6| d3 6| d4 6| d5 6| d6 6|	 d7 6|
 d8 6| d9 6| d: 6| d; 6| d< 6| d= 6| d> 6| d? 6| d@ 6| dA 6| dB 6| dC 6| dD 6| dE 6| dF 6S(G   Nc         ` s5   t  d   t j j   D      f d   } | S(   u4   Logger that records which phase processes each tokenc         s` s!   |  ] \ } } | | f Vq d  S(   N(    (   t   .0t   keyt   value(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pys	   <genexpr>  s    c         ` s     j  j d  r t |  d k r | d } y i  | d d 6} Wn
   n X| d t j k rx | d | d <n  |  j j j |  j j j	 j  |  j j
 j j  |  j j    j  | f    |  | |  S  |  | |  Sd  S(   Nu   processi    u   typeu   name(   R0   t
   startswithRg   R	   t   tagTokenTypesRB   RM   Rp   R   RQ   RT   t	   __class__(   R;   t   argsRI   Rz   t   info(   R/   t
   type_names(    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   wrapped  s    $
	
(   R8   R	   R   R#   (   R/   R   (    (   R/   R   sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRM     s    	c         S` s   |  r t  |  St Sd  S(   N(   R2   R'   (   t   use_metaclasst   metaclass_func(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   getMetaclass  s    
t   Phasec           B` s_   e  Z d  Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   uN   Base class for helper object that implements each phase of processing
        c         S` s   | |  _  | |  _ d  S(   N(   RB   R5   (   R;   RB   R5   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s    	c         S` s
   t   d  S(   N(   t   NotImplementedError(   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    c         S` s!   |  j  j | |  j  j d  d  S(   Ni(   R5   t   insertCommentRd   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn     s    c         S` s   |  j  j d  d  S(   Nu   unexpected-doctype(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRo     s    c         S` s   |  j  j | d  d  S(   Nu   data(   R5   t
   insertText(   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s   |  j  j | d  d  S(   Nu   data(   R5   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j  | d |  S(   Nu   name(   t   startTagHandler(   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRl     s    c         S` s   |  j  j r0 | d d k r0 |  j  j d  n  xQ | d j   D]? \ } } | |  j j d j k rA | |  j j d j | <qA qA Wt |  j  _ d  S(   Nu   nameu   htmlu   non-html-rootu   datai    (   RB   RL   Re   R#   R5   Rd   R^   RK   (   R;   Rz   t   attrR   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   startTagHtml  s    c         S` s   |  j  | d |  S(   Nu   name(   t   endTagHandler(   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm     s    (   R0   R1   R   R?   Rq   Rn   Ro   Rj   Rk   Rl   R   Rm   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s   								
t   InitialPhasec           B` sP   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         S` s   d  S(   N(    (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j  j | |  j  j  d  S(   N(   R5   R   t   document(   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn     s    c      8   S` su  | d } | d } | d } | d } | d k sX | d  k	 sX | d  k	 rk | d k rk |  j j d  n  | d  k r d } n  |  j j |  | d k r | j t  } n  | s| d d k s| j dJ  s| dK k s| j dL  r | d  k s| r"| j   dD k r"dE |  j _	 n9 | j dM  sL| j dN  r[| d  k	 r[dH |  j _	 n  |  j j
 dI |  j _ d  S(O   Nu   nameu   publicIdu   systemIdu   correctu   htmlu   about:legacy-compatu   unknown-doctypeu    u*   +//silmaril//dtd html pro v0r11 19970101//u4   -//advasoft ltd//dtd html 3.0 aswedit + extensions//u*   -//as//dtd html 3.0 aswedit + extensions//u   -//ietf//dtd html 2.0 level 1//u   -//ietf//dtd html 2.0 level 2//u&   -//ietf//dtd html 2.0 strict level 1//u&   -//ietf//dtd html 2.0 strict level 2//u   -//ietf//dtd html 2.0 strict//u   -//ietf//dtd html 2.0//u   -//ietf//dtd html 2.1e//u   -//ietf//dtd html 3.0//u   -//ietf//dtd html 3.2 final//u   -//ietf//dtd html 3.2//u   -//ietf//dtd html 3//u   -//ietf//dtd html level 0//u   -//ietf//dtd html level 1//u   -//ietf//dtd html level 2//u   -//ietf//dtd html level 3//u"   -//ietf//dtd html strict level 0//u"   -//ietf//dtd html strict level 1//u"   -//ietf//dtd html strict level 2//u"   -//ietf//dtd html strict level 3//u   -//ietf//dtd html strict//u   -//ietf//dtd html//u(   -//metrius//dtd metrius presentational//u5   -//microsoft//dtd internet explorer 2.0 html strict//u.   -//microsoft//dtd internet explorer 2.0 html//u0   -//microsoft//dtd internet explorer 2.0 tables//u5   -//microsoft//dtd internet explorer 3.0 html strict//u.   -//microsoft//dtd internet explorer 3.0 html//u0   -//microsoft//dtd internet explorer 3.0 tables//u#   -//netscape comm. corp.//dtd html//u*   -//netscape comm. corp.//dtd strict html//u*   -//o'reilly and associates//dtd html 2.0//u3   -//o'reilly and associates//dtd html extended 1.0//u;   -//o'reilly and associates//dtd html extended relaxed 1.0//uN   -//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//uE   -//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//u$   -//spyglass//dtd html 2.0 extended//u+   -//sq//dtd html 2.0 hotmetal + extensions//u-   -//sun microsystems corp.//dtd hotjava html//u4   -//sun microsystems corp.//dtd hotjava strict html//u   -//w3c//dtd html 3 1995-03-24//u   -//w3c//dtd html 3.2 draft//u   -//w3c//dtd html 3.2 final//u   -//w3c//dtd html 3.2//u   -//w3c//dtd html 3.2s draft//u   -//w3c//dtd html 4.0 frameset//u#   -//w3c//dtd html 4.0 transitional//u(   -//w3c//dtd html experimental 19960712//u&   -//w3c//dtd html experimental 970421//u   -//w3c//dtd w3 html//u   -//w3o//dtd w3 html 3.0//u#   -//webtechs//dtd mozilla html 2.0//u   -//webtechs//dtd mozilla html//u$   -//w3o//dtd w3 html strict 3.0//en//u"   -/w3c/dtd html 4.0 transitional/enu    -//w3c//dtd html 4.01 frameset//u$   -//w3c//dtd html 4.01 transitional//u:   http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtdu   quirksu    -//w3c//dtd xhtml 1.0 frameset//u$   -//w3c//dtd xhtml 1.0 transitional//u   limited quirksu
   beforeHtml(7   u*   +//silmaril//dtd html pro v0r11 19970101//u4   -//advasoft ltd//dtd html 3.0 aswedit + extensions//u*   -//as//dtd html 3.0 aswedit + extensions//u   -//ietf//dtd html 2.0 level 1//u   -//ietf//dtd html 2.0 level 2//u&   -//ietf//dtd html 2.0 strict level 1//u&   -//ietf//dtd html 2.0 strict level 2//u   -//ietf//dtd html 2.0 strict//u   -//ietf//dtd html 2.0//u   -//ietf//dtd html 2.1e//u   -//ietf//dtd html 3.0//u   -//ietf//dtd html 3.2 final//u   -//ietf//dtd html 3.2//u   -//ietf//dtd html 3//u   -//ietf//dtd html level 0//u   -//ietf//dtd html level 1//u   -//ietf//dtd html level 2//u   -//ietf//dtd html level 3//u"   -//ietf//dtd html strict level 0//u"   -//ietf//dtd html strict level 1//u"   -//ietf//dtd html strict level 2//u"   -//ietf//dtd html strict level 3//u   -//ietf//dtd html strict//u   -//ietf//dtd html//u(   -//metrius//dtd metrius presentational//u5   -//microsoft//dtd internet explorer 2.0 html strict//u.   -//microsoft//dtd internet explorer 2.0 html//u0   -//microsoft//dtd internet explorer 2.0 tables//u5   -//microsoft//dtd internet explorer 3.0 html strict//u.   -//microsoft//dtd internet explorer 3.0 html//u0   -//microsoft//dtd internet explorer 3.0 tables//u#   -//netscape comm. corp.//dtd html//u*   -//netscape comm. corp.//dtd strict html//u*   -//o'reilly and associates//dtd html 2.0//u3   -//o'reilly and associates//dtd html extended 1.0//u;   -//o'reilly and associates//dtd html extended relaxed 1.0//uN   -//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//uE   -//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//u$   -//spyglass//dtd html 2.0 extended//u+   -//sq//dtd html 2.0 hotmetal + extensions//u-   -//sun microsystems corp.//dtd hotjava html//u4   -//sun microsystems corp.//dtd hotjava strict html//u   -//w3c//dtd html 3 1995-03-24//u   -//w3c//dtd html 3.2 draft//u   -//w3c//dtd html 3.2 final//u   -//w3c//dtd html 3.2//u   -//w3c//dtd html 3.2s draft//u   -//w3c//dtd html 4.0 frameset//u#   -//w3c//dtd html 4.0 transitional//u(   -//w3c//dtd html experimental 19960712//u&   -//w3c//dtd html experimental 970421//u   -//w3c//dtd w3 html//u   -//w3o//dtd w3 html 3.0//u#   -//webtechs//dtd mozilla html 2.0//u   -//webtechs//dtd mozilla html//(   u$   -//w3o//dtd w3 html strict 3.0//en//u"   -/w3c/dtd html 4.0 transitional/enu   html(   u    -//w3c//dtd html 4.01 frameset//u$   -//w3c//dtd html 4.01 transitional//(   u    -//w3c//dtd xhtml 1.0 frameset//u$   -//w3c//dtd xhtml 1.0 transitional//(   u    -//w3c//dtd html 4.01 frameset//u$   -//w3c//dtd html 4.01 transitional//(   R4   RB   Re   R5   t   insertDoctypeR_   R   R   RO   RN   R:   RT   (   R;   Rz   R=   t   publicIdt   systemIdt   correct(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRo     s    



	                                                      	  	 	 	 	c         S` s&   d |  j  _ |  j  j d |  j  _ d  S(   Nu   quirksu
   beforeHtml(   RB   RN   R:   RT   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   anythingElseV  s    c         S` s   |  j  j d  |  j   | S(   Nu   expected-doctype-but-got-chars(   RB   Re   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   Z  s    
c         S` s,   |  j  j d i | d d 6 |  j   | S(   Nu"   expected-doctype-but-got-start-tagu   name(   RB   Re   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRl   _  s    
c         S` s,   |  j  j d i | d d 6 |  j   | S(   Nu    expected-doctype-but-got-end-tagu   name(   RB   Re   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm   e  s    
c         S` s   |  j  j d  |  j   t S(   Nu   expected-doctype-but-got-eof(   RB   Re   R   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   k  s    
(
   R0   R1   Rk   Rn   Ro   R   Rj   Rl   Rm   Rq   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s   			`				t   BeforeHtmlPhasec           B` sG   e  Z d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         S` s3   |  j  j t d d   |  j j d |  j _ d  S(   Nu   htmlu   StartTagu
   beforeHead(   R5   t
   insertRoott   impliedTagTokenRB   R:   RT   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRU   r  s    c         S` s   |  j    t S(   N(   RU   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   w  s    
c         S` s   |  j  j | |  j  j  d  S(   N(   R5   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn   {  s    c         S` s   d  S(   N(    (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk   ~  s    c         S` s   |  j    | S(   N(   RU   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    
c         S` s-   | d d k r t  |  j _ n  |  j   | S(   Nu   nameu   html(   RE   RB   RL   RU   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRl     s    
c         S` sC   | d d k r1 |  j  j d i | d d 6 n |  j   | Sd  S(   Nu   nameu   headu   bodyu   htmlu   bru   unexpected-end-tag-before-html(   u   headu   bodyu   htmlu   br(   RB   Re   RU   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm     s
    
(	   R0   R1   RU   Rq   Rn   Rk   Rj   Rl   Rm   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   p  s   						t   BeforeHeadPhasec           ` s_   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         ` s}     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ t j d |  j f g  |  _	 |  j
 |  j	 _ d  S(   Nu   htmlu   headu   bodyu   br(   u   headu   bodyu   htmlu   br(   R?   R   t   MethodDispatcherR   t   startTagHeadR   t   startTagOthert   defaultt   endTagImplyHeadR   t   endTagOther(   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s    c         S` s   |  j  t d d   t S(   Nu   headu   StartTag(   R   R   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    c         S` s   d  S(   N(    (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j  t d d   | S(   Nu   headu   StartTag(   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s@   |  j  j |  |  j  j d |  j  _ |  j j d |  j _ d  S(   Niu   inHead(   R5   R   Rd   t   headPointerRB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  t d d   | S(   Nu   headu   StartTag(   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  t d d   | S(   Nu   headu   StartTag(   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   end-tag-after-implied-rootu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   Rq   Rk   Rj   R   R   R   R   R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s   							t   InHeadPhasec           ` s   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z RS(   c      
   ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f d |  j f d |  j f d |  j	 f g  |  _
 |  j |  j
 _ t j d |  j f d |  j f g  |  _ |  j |  j _ d  S(   Nu   htmlu   titleu   noscriptu   noframesu   styleu   scriptu   baseu   basefontu   bgsoundu   commandu   linku   metau   headu   bru   body(   u   noscriptu   noframesu   style(   u   baseu   basefontu   bgsoundu   commandu   link(   u   bru   htmlu   body(   R?   R   R   R   t   startTagTitlet   startTagNoScriptNoFramesStylet   startTagScriptt   startTagBaseLinkCommandt   startTagMetaR   R   R   R   t
   endTagHeadt   endTagHtmlBodyBrR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s    	c         S` s   |  j    t S(   N(   R   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    
c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    
c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j d  d  S(   Nu!   two-heads-are-not-better-than-one(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s.   |  j  j |  |  j  j j   t | d <d  S(   Nu   selfClosingAcknowledged(   R5   R   Rd   t   popRE   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j |  |  j  j j   t | d <| d } |  j j j j d d k r d | k ry |  j j j j	 | d  q d | k r d | k r | d j
   d k r t j | d j d	   } t j |  } | j   } |  j j j j	 |  q n  d  S(
   Nu   selfClosingAcknowledgedu   datai   u	   tentativeu   charsetu   contentu
   http-equivu   content-typeu   utf-8(   R5   R   Rd   R   RE   RB   R   RG   R[   t   changeEncodingRO   R   t   EncodingBytest   encodet   ContentAttrParserR   (   R;   Rz   R^   t   dataRB   t   codec(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    

c         S` s   |  j  j | d  d  S(   Nu   RCDATA(   RB   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR      s    c         S` s   |  j  j | d  d  S(   Nu   RAWTEXT(   RB   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sT   |  j  j |  |  j j j |  j j _ |  j j |  j _ |  j j d |  j _ d  S(   Nu   text(	   R5   R   RB   R   t   scriptDataStateRQ   RT   R   R:   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    
c         S` sQ   |  j  j j j   } | j d k s7 t d | j   |  j  j d |  j  _ d  S(   Nu   headu   Expected head got %su	   afterHead(   RB   R5   Rd   R   R=   Rr   R:   RT   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    "c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    
c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  t d   d  S(   Nu   head(   R   R   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   Rq   Rj   R   R   R   R   R   R   R   R   R   R   R   R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s   													t   AfterHeadPhasec           ` sz   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z RS(   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f d |  j f g  |  _ |  j	 |  j _
 t j d |  j f g  |  _ |  j |  j _
 d  S(   Nu   htmlu   bodyu   framesetu   baseu   basefontu   bgsoundu   linku   metau   noframesu   scriptu   styleu   titleu   headu   br(	   u   baseu   basefontu   bgsoundu   linku   metau   noframesu   scriptu   styleu   title(   u   bodyu   htmlu   br(   R?   R   R   R   t   startTagBodyt   startTagFramesett   startTagFromHeadR   R   R   R   R   R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   %  s     		c         S` s   |  j    t S(   N(   R   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   6  s    
c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   :  s    
c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   >  s    c         S` s6   t  |  j _ |  j j |  |  j j d |  j _ d  S(   Nu   inBody(   RK   RB   RY   R5   R   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   A  s    c         S` s*   |  j  j |  |  j j d |  j _ d  S(   Nu
   inFrameset(   R5   R   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   F  s    c         S` s   |  j  j d i | d d 6 |  j j j |  j j  |  j  j d j |  xG |  j j d  d  d  D], } | j d k rh |  j j j	 |  Pqh qh Wd  S(   Nu#   unexpected-start-tag-out-of-my-headu   nameu   inHeadiu   head(
   RB   Re   R5   Rd   Rp   R   R:   Rl   R=   t   remove(   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   J  s     c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-start-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   T  s    c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   W  s    
c         S` s   |  j    | S(   N(   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   [  s    
c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   _  s    c         S` s?   |  j  j t d d   |  j j d |  j _ t |  j _ d  S(   Nu   bodyu   StartTagu   inBody(   R5   R   R   RB   R:   RT   RE   RY   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   b  s    (   R0   R1   R?   Rq   Rj   R   R   R   R   R   R   R   R   R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   $  s   						
				t   InBodyPhasec           ` s  e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z  d   Z! d    Z" d!   Z# d"   Z$ d#   Z% d$   Z& d%   Z' d&   Z( d'   Z) d(   Z* d)   Z+ d*   Z, d+   Z- d,   Z. d-   Z/ d.   Z0 d/   Z1 d0   Z2 d1   Z3 RS(2   c      +   ` s]    j  |  | |  |  j |  _ t j d |  j f dd |  j f d |  j f d |  j f de |  j	 f t
 |  j f df |  j f d& |  j f dg |  j f d* |  j f d+ |  j f dh |  j f d8 |  j f d9 |  j f di |  j f d= |  j f d> |  j f dj |  j f dk |  j f dH |  j f dI |  j f dJ |  j f dK |  j f dL |  j f dM |  j f dl |  j f dQ |  j  f dm |  j! f dn |  j" f dV |  j# f dW |  j$ f do |  j% f g   |  _& |  j' |  j& _( t j d |  j) f d |  j* f dp |  j+ f d& |  j, f d  |  j- f dq |  j. f t
 |  j/ f dr |  j0 f ds |  j1 f d@ |  j2 f g
  |  _3 |  j4 |  j3 _( d  S(t   Nu   htmlu   baseu   basefontu   bgsoundu   commandu   linku   metau   scriptu   styleu   titleu   bodyu   framesetu   addressu   articleu   asideu
   blockquoteu   centeru   detailsu   diru   divu   dlu   fieldsetu
   figcaptionu   figureu   footeru   headeru   hgroupu   mainu   menuu   navu   olu   pu   sectionu   summaryu   ulu   preu   listingu   formu   liu   ddu   dtu	   plaintextu   au   bu   bigu   codeu   emu   fontu   iu   su   smallu   strikeu   strongu   ttu   uu   nobru   buttonu   appletu   marqueeu   objectu   xmpu   tableu   areau   bru   embedu   imgu   keygenu   wbru   paramu   sourceu   tracku   inputu   hru   imageu   isindexu   textareau   iframeu   noembedu   noframesu   noscriptu   selectu   rpu   rtu   optionu   optgroupu   mathu   svgu   captionu   colu   colgroupu   frameu   headu   tbodyu   tdu   tfootu   thu   theadu   tru   dialog(	   u   baseu   basefontu   bgsoundu   commandu   linku   metau   scriptu   styleu   title(   u   addressu   articleu   asideu
   blockquoteu   centeru   detailsu   detailsu   diru   divu   dlu   fieldsetu
   figcaptionu   figureu   footeru   headeru   hgroupu   mainu   menuu   navu   olu   pu   sectionu   summaryu   ul(   u   preu   listing(   u   liu   ddu   dt(   u   bu   bigu   codeu   emu   fontu   iu   su   smallu   strikeu   strongu   ttu   u(   u   appletu   marqueeu   object(   u   areau   bru   embedu   imgu   keygenu   wbr(   u   paramu   sourceu   track(   u   noembedu   noframesu   noscript(   u   rpu   rt(   u   optionu   optgroup(   u   captionu   colu   colgroupu   frameu   headu   tbodyu   tdu   tfootu   thu   theadu   tr(   u   addressu   articleu   asideu
   blockquoteu   buttonu   centeru   detailsu   dialogu   diru   divu   dlu   fieldsetu
   figcaptionu   figureu   footeru   headeru   hgroupu   listingu   mainu   menuu   navu   olu   preu   sectionu   summaryu   ul(   u   ddu   dtu   li(   u   au   bu   bigu   codeu   emu   fontu   iu   nobru   su   smallu   strikeu   strongu   ttu   u(   u   appletu   marqueeu   object(5   R?   Rk   t   processSpaceCharactersNonPreR   R   R   t   startTagProcessInHeadR   R   t   startTagClosePR   t   startTagHeadingt   startTagPreListingt   startTagFormt   startTagListItemt   startTagPlaintextt	   startTagAt   startTagFormattingt   startTagNobrt   startTagButtont   startTagAppletMarqueeObjectt   startTagXmpt   startTagTablet   startTagVoidFormattingt   startTagParamSourcet   startTagInputt
   startTagHrt   startTagImaget   startTagIsIndext   startTagTextareat   startTagIFramet   startTagRawtextt   startTagSelectt   startTagRpRtt   startTagOptt   startTagMatht   startTagSvgt   startTagMisplacedR   R   R   t
   endTagBodyt
   endTagHtmlt   endTagBlockt
   endTagFormt   endTagPt   endTagListItemt   endTagHeadingt   endTagFormattingt   endTagAppletMarqueeObjectt   endTagBrR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   j  s|     	   	 	      c         S` s   | j  | j  k s$ | j | j k r( t St | j  t | j  k rJ t St | j j    } t | j j    } x- t | |  D] \ } } | | k r t Sq Wt S(   N(	   R=   R]   RK   Rg   R^   t   sortedR#   t   zipRE   (   R;   t   node1t   node2t   attributes1t   attributes2t   attr1t   attr2(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   isMatchingFormattingElement  s    $c         S` s   |  j  j |  |  j  j d } g  } xS |  j  j d  d  d  D]8 } | t k rV Pq@ |  j | |  r@ | j |  q@ q@ Wt |  d k s t  t |  d k r |  j  j j	 | d  n  |  j  j j |  d  S(   Nii   (
   R5   R   Rd   t   activeFormattingElementsR   R  Rp   Rg   Rr   R   (   R;   Rz   R`   t   matchingElementsR   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   addFormattingElement  s     c         S` sW   t  d  } xD |  j j d  d  d  D]) } | j | k r& |  j j d  Pq& q& Wd  S(   Nu   ddu   dtu   liu   pu   tbodyu   tdu   tfootu   thu   theadu   tru   bodyu   htmliu    expected-closing-tag-but-got-eof(   u   ddu   dtu   liu   pu   tbodyu   tdu   tfootu   thu   theadu   tru   bodyu   html(   Ri   R5   Rd   R=   RB   Re   (   R;   t   allowed_elementsR   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s     	 c         S` s   | d } |  j  |  _ | j d  rb |  j j d j d k rb |  j j d j   rb | d } n  | r |  j j   |  j j |  n  d  S(	   Nu   datau   
iu   preu   listingu   textareai   (   u   preu   listingu   textarea(	   R   Rk   R   R5   Rd   R=   t
   hasContentt#   reconstructActiveFormattingElementsR   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt!   processSpaceCharactersDropNewline  s    
c         S` s}   | d d k r d  S|  j  j   |  j  j | d  |  j j ry t g  | d D] } | t k ^ qO  ry t |  j _ n  d  S(   Nu   datau    (   R5   R  R   RB   RY   t   anyR
   RK   (   R;   Rz   t   char(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    #c         S` s%   |  j  j   |  j  j | d  d  S(   Nu   data(   R5   R  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j  j d j |  S(   Nu   inHead(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j d i d d 6 t |  j j  d k sK |  j j d j d k r` |  j  j s t  n` t |  j  _	 xQ | d j
   D]? \ } } | |  j j d j k r} | |  j j d j | <q} q} Wd  S(   Nu   unexpected-start-tagu   bodyu   namei   u   data(   RB   Re   Rg   R5   Rd   R=   RH   Rr   RK   RY   R#   R^   (   R;   Rz   R   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s  |  j  j d i d d 6 t |  j j  d k sK |  j j d j d k r` |  j  j s t  n |  j  j so n |  j j d j	 r |  j j d j	 j
 |  j j d  n  x- |  j j d j d k r |  j j j   q W|  j j |  |  j  j d |  j  _ d  S(	   Nu   unexpected-start-tagu   framesetu   namei   u   bodyiu   htmlu
   inFrameset(   RB   Re   Rg   R5   Rd   R=   RH   Rr   RY   t   parentt   removeChildR   R   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    1'c         S` sB   |  j  j d d d r. |  j t d   n  |  j  j |  d  S(   Nu   pt   variantu   button(   R5   t   elementInScopeR   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sZ   |  j  j d d d r. |  j t d   n  |  j  j |  t |  j _ |  j |  _	 d  S(   Nu   pR  u   button(
   R5   R  R   R   R   RK   RB   RY   R  Rk   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` s   |  j  j r) |  j j d i d d 6 nT |  j  j d d d rW |  j t d   n  |  j  j |  |  j  j d |  j  _ d  S(   Nu   unexpected-start-tagu   formu   nameu   pR  u   buttoni(	   R5   t   formPointerRB   Re   R  R   R   R   Rd   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   t  |  j _ i d g d 6d d g d 6d d g d 6} | | d } xn t |  j j  D]Z } | j | k r |  j j j t	 | j d   Pn  | j
 t k rW | j d k rW PqW qW W|  j j d d	 d
 r |  j j j t	 d d   n  |  j j |  d  S(   Nu   liu   dtu   ddu   nameu   EndTagu   addressu   divu   pR  u   button(   u   addressu   divu   p(   RK   RB   RY   t   reversedR5   Rd   R=   RT   Rm   R   t	   nameTupleR   R  R   (   R;   Rz   t   stopNamesMapt	   stopNamesR   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   '  s"    c         S` sZ   |  j  j d d d r. |  j t d   n  |  j  j |  |  j j j |  j j _ d  S(   Nu   pR  u   button(	   R5   R  R   R   R   RB   R   RS   RQ   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   =  s    c         S` s   |  j  j d d d r. |  j t d   n  |  j  j d j t k rx |  j j d i | d d 6 |  j  j j	   n  |  j  j
 |  d  S(   Nu   pR  u   buttoniu   unexpected-start-tagu   name(   R5   R  R   R   Rd   R=   R   RB   Re   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   C  s    c         S` s   |  j  j d  } | r |  j j d i d d 6d d 6 |  j t d   | |  j  j k rt |  j  j j |  n  | |  j  j k r |  j  j j |  q n  |  j  j	   |  j
 |  d  S(   Nu   au$   unexpected-start-tag-implies-end-tagu	   startNameu   endName(   R5   t!   elementInActiveFormattingElementsRB   Re   R  R   Rd   R   R  R  R  (   R;   Rz   t   afeAElement(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   K  s    c         S` s   |  j  j   |  j |  d  S(   N(   R5   R  R  (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   X  s    c         S` st   |  j  j   |  j  j d  rc |  j j d i d d 6d d 6 |  j t d   |  j  j   n  |  j |  d  S(   Nu   nobru$   unexpected-start-tag-implies-end-tagu	   startNameu   endName(   R5   R  R  RB   Re   Rm   R   R  (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   \  s    c         S` sw   |  j  j d  rJ |  j j d i d d 6d d 6 |  j t d   | S|  j  j   |  j  j |  t |  j _	 d  S(   Nu   buttonu$   unexpected-start-tag-implies-end-tagu	   startNameu   endName(
   R5   R  RB   Re   Rm   R   R  R   RK   RY   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   f  s    c         S` s@   |  j  j   |  j  j |  |  j  j j t  t |  j _ d  S(   N(	   R5   R  R   R  Rp   R   RK   RB   RY   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   q  s    c         S` s^   |  j  j d d d r. |  j t d   n  |  j  j   t |  j _ |  j j | d  d  S(   Nu   pR  u   buttonu   RAWTEXT(	   R5   R  R   R   R  RK   RB   RY   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   w  s
    c         S` sy   |  j  j d k rC |  j j d d d rC |  j t d   qC n  |  j j |  t |  j  _ |  j  j	 d |  j  _
 d  S(   Nu   quirksu   pR  u   buttonu   inTable(   RB   RN   R5   R  Rm   R   R   RK   RY   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   ~  s    c         S` sG   |  j  j   |  j  j |  |  j  j j   t | d <t |  j _ d  S(   Nu   selfClosingAcknowledged(	   R5   R  R   Rd   R   RE   RK   RB   RY   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    
c         S` sY   |  j  j } |  j |  d | d k rU | d d j t  d k rU | |  j  _ n  d  S(   Nu   typeu   datau   hidden(   RB   RY   R   R_   R   (   R;   Rz   RY   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` s.   |  j  j |  |  j  j j   t | d <d  S(   Nu   selfClosingAcknowledged(   R5   R   Rd   R   RE   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sh   |  j  j d d d r. |  j t d   n  |  j  j |  |  j  j j   t | d <t |  j	 _
 d  S(   Nu   pR  u   buttonu   selfClosingAcknowledged(   R5   R  R   R   R   Rd   R   RE   RK   RB   RY   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    
c      	   S` sO   |  j  j d i d d 6d d 6 |  j t d d d | d d	 | d
  d  S(   Nu   unexpected-start-tag-treated-asu   imageu   originalNameu   imgu   newNameu   StartTagR^   u   datat   selfClosingu   selfClosing(   RB   Re   Rl   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    
c      	   S` s  |  j  j d i d d 6 |  j j r* d  Si  } d | d k rU | d d | d <n  |  j t d d d |  |  j t d	 d   |  j t d
 d   d | d k r | d d } n d } |  j i t d d 6| d 6 | d j   } d | k r	| d =n  d | k r| d =n  d | d <|  j t d d d | d | d  |  j	 t d
   |  j t d	 d   |  j	 t d   d  S(   Nu   deprecated-tagu   isindexu   nameu   actionu   datau   formu   StartTagR^   u   hru   labelu   promptu3   This is a searchable index. Enter search keywords: u
   Charactersu   typeu   inputR!  u   selfClosing(
   RB   Re   R5   R  Rl   R   Rj   R   t   copyRm   (   R;   Rz   t
   form_attrst   promptR^   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s6    



c         S` sD   |  j  j |  |  j j j |  j j _ |  j |  _ t |  j _	 d  S(   N(
   R5   R   RB   R   RP   RQ   R  Rk   RK   RY   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   t  |  j _ |  j |  d  S(   N(   RK   RB   RY   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j | d  d S(   u8   iframe, noembed noframes, noscript(if scripting enabled)u   RAWTEXTN(   RB   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sY   |  j  j d j d k r5 |  j j j t d   n  |  j  j   |  j j  j |  d  S(   Niu   option(	   R5   Rd   R=   RB   RT   Rm   R   R  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j   |  j  j |  t |  j _ |  j j |  j j d |  j j d |  j j d |  j j d |  j j d |  j j d f k r |  j j d |  j _ n |  j j d |  j _ d  S(	   Nu   inTableu	   inCaptionu   inColumnGroupu   inTableBodyu   inRowu   inCellu   inSelectInTableu   inSelect(   R5   R  R   RK   RB   RY   RT   R:   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s_   |  j  j d  rK |  j  j   |  j  j d j d k rK |  j j   qK n  |  j  j |  d  S(   Nu   rubyi(   R5   R  t   generateImpliedEndTagsRd   R=   RB   Re   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` sv   |  j  j   |  j j |  |  j j |  t d | d <|  j  j |  | d rr |  j  j j   t	 | d <n  d  S(   Nu   mathmlu	   namespaceu   selfClosingu   selfClosingAcknowledged(
   R5   R  RB   R   R   R   R   Rd   R   RE   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    
c         S` sv   |  j  j   |  j j |  |  j j |  t d | d <|  j  j |  | d rr |  j  j j   t	 | d <n  d  S(   Nu   svgu	   namespaceu   selfClosingu   selfClosingAcknowledged(
   R5   R  RB   R   R   R   R   Rd   R   RE   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    
c         S` s"   |  j  j d i | d d 6 d S(   u5   Elements that should be children of other elements that have a
            different insertion mode; here they are ignored
            "caption", "col", "colgroup", "frame", "frameset", "head",
            "option", "optgroup", "tbody", "td", "tfoot", "th", "thead",
            "tr", "noscript"
            u   unexpected-start-tag-ignoredu   nameN(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   
  s    c         S` s!   |  j  j   |  j  j |  d  S(   N(   R5   R  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j d d d sa |  j t d d   |  j j d i d d 6 |  j t d d   n |  j  j d  |  j  j d j	 d k r |  j j d i d d 6 n  |  j  j j
   } x% | j	 d k r |  j  j j
   } q Wd  S(	   Nu   pR  u   buttonu   StartTagu   unexpected-end-tagu   nameu   EndTagi(   R5   R  R   R   RB   Re   R   R%  Rd   R=   R   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j d  s# |  j j   d  S|  j  j d j d k r xX |  j  j d D]C } | j t d  k rM |  j j d i d d 6| j d 6 PqM qM Wn  |  j j d |  j _ d  S(   Nu   bodyii   u   ddu   dtu   liu   optgroupu   optionu   pu   rpu   rtu   tbodyu   tdu   tfootu   thu   theadu   tru   htmlu$   expected-one-end-tag-but-got-anotheru   expectedNameu   gotNameu	   afterBody(   u   ddu   dtu   liu   optgroupu   optionu   pu   rpu   rtu   tbodyu   tdu   tfootu   thu   theadu   tru   bodyu   html(	   R5   R  RB   Re   Rd   R=   Ri   R:   RT   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   $  s    	   	c         S` s-   |  j  j d  r) |  j t d   | Sd  S(   Nu   body(   R5   R  R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   6  s    c         S` s   | d d k r |  j  |  _ n  |  j j | d  } | rK |  j j   n  |  j j d j | d k r |  j j d i | d d 6 n  | r |  j j j	   } x, | j | d k r |  j j j	   } q Wn  d  S(   Nu   nameu   preiu   end-tag-too-early(
   R   Rk   R5   R  R%  Rd   R=   RB   Re   R   (   R;   Rz   t   inScopeR   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   <  s    !c         S` s   |  j  j } d  |  j  _ | d  k s7 |  j  j |  rT |  j j d i d d 6 nS |  j  j   |  j  j d | k r |  j j d i d d 6 n  |  j  j j |  d  S(   Nu   unexpected-end-tagu   formu   nameiu   end-tag-too-early-ignored(	   R5   R  R4   R  RB   Re   R%  Rd   R   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   J  s    c         S` s   | d d k r d } n d  } |  j j | d d | s\ |  j j d i | d d 6 n |  j j d | d  |  j j d j | d k r |  j j d i | d d 6 n  |  j j j   } x) | j | d k r |  j j j   } q Wd  S(	   Nu   nameu   liu   listR  u   unexpected-end-tagt   excludeiu   end-tag-too-early(	   R4   R5   R  RB   Re   R%  Rd   R=   R   (   R;   Rz   R  R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   W  s    	!	c         S` s   x1 t  D]) } |  j j |  r |  j j   Pq q W|  j j d j | d k rr |  j j d i | d d 6 n  x^ t  D]V } |  j j |  ry |  j j j   } x% | j t  k r |  j j j   } q WPqy qy Wd  S(   Niu   nameu   end-tag-too-early(	   R   R5   R  R%  Rd   R=   RB   Re   R   (   R;   Rz   t   item(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   h  s    !c         S` s3  d } x&| d k  r.| d 7} |  j  j | d  } | sd | |  j  j k ru |  j  j | j  ru |  j |  d S| |  j  j k r |  j j d i | d d 6 |  j  j j	 |  d S|  j  j | j  s |  j j d i | d d 6 d S| |  j  j d k r*|  j j d	 i | d d 6 n  |  j  j j
 |  } d } x1 |  j  j | D] } | j t k rV| } PqVqVW| d k r|  j  j j   } x" | | k r|  j  j j   } qW|  j  j j	 |  d S|  j  j | d } |  j  j j
 |  } | }	 }
 d } |  j  j j
 |
  } x| d
 k  r9| d 7} | d 8} |  j  j | }
 |
 |  j  j k r|  j  j j	 |
  q$n  |
 | k rPn  |	 | k r|  j  j j
 |
  d } n  |
 j   } | |  j  j |  j  j j
 |
  <| |  j  j |  j  j j
 |
  <| }
 |	 j r#|	 j j |	  n  |
 j |	  |
 }	 q$W|	 j rV|	 j j |	  n  | j t d  k r|  j  j   \ } } | j |	 |  n | j |	  | j   } | j |  | j |  |  j  j j	 |  |  j  j j | |  |  j  j j	 |  |  j  j j |  j  j j
 |  d |  q	 Wd S(   u)   The much-feared adoption agency algorithmi    i   i   u   nameNu   adoption-agency-1.2u   adoption-agency-4.4iu   adoption-agency-1.3i   u   tableu   tbodyu   tfootu   theadu   tr(   u   tableu   tbodyu   tfootu   theadu   tr(   R5   R  Rd   R  R=   R   RB   Re   R  R   t   indexR4   R  R   R   t	   cloneNodeR  R  t   appendChildRi   t   getTableMisnestedNodePositiont   insertBeforet   reparentChildrent   insert(   R;   Rz   t   outerLoopCountert   formattingElementt   afeIndext   furthestBlockR`   t   commonAncestort   bookmarkt   lastNodeR   t   innerLoopCounterR)  t   cloneR  R-  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR  w  s    

	!



	
	c         S` s   |  j  j | d  r& |  j  j   n  |  j  j d j | d k rd |  j j d i | d d 6 n  |  j  j | d  r |  j  j j   } x) | j | d k r |  j  j j   } q W|  j  j   n  d  S(   Nu   nameiu   end-tag-too-early(	   R5   R  R%  Rd   R=   RB   Re   R   t   clearActiveFormattingElements(   R;   Rz   R`   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR    s    !c         S` s[   |  j  j d i d d 6d d 6 |  j j   |  j j t d d   |  j j j   d  S(   Nu   unexpected-end-tag-treated-asu   bru   originalNameu
   br elementu   newNameu   StartTag(   RB   Re   R5   R  R   R   Rd   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR  &  s
    c         S` s   x |  j  j d  d  d  D] } | j | d k r |  j  j d | d  |  j  j d j | d k r |  j j d i | d d 6 n  x |  j  j j   | k r q WPq | j t k r |  j j d i | d d 6 Pq q Wd  S(   Niu   nameR'  u   unexpected-end-tag(	   R5   Rd   R=   R%  RB   Re   R   R  R   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   -  s     !(4   R0   R1   R?   R  R  Rq   R  Rj   Rk   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R   R  R  R  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   g  sd   F			
																
																															t	   TextPhasec           ` sD   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z RS(   c         ` se     j  |  | |  t j g   |  _ |  j |  j _ t j d |  j f g  |  _ |  j |  j _ d  S(   Nu   script(	   R?   R   R   R   R   R   t   endTagScriptR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   <  s    c         S` s   |  j  j | d  d  S(   Nu   data(   R5   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   D  s    c         S` sM   |  j  j d i |  j j d j d 6 |  j j j   |  j  j |  j  _ t S(   Nu&   expected-named-closing-tag-but-got-eofiu   name(	   RB   Re   R5   Rd   R=   R   R   RT   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   G  s
    c         S` s   t  s t d | d   d  S(   Nu4   Tried to process start tag %s in RCDATA/RAWTEXT modeu   name(   RK   Rr   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   N  s    c         S` s=   |  j  j j   } | j d k s' t  |  j j |  j _ d  S(   Nu   script(   R5   Rd   R   R=   Rr   RB   R   RT   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR;  Q  s    c         S` s&   |  j  j j   |  j j |  j _ d  S(   N(   R5   Rd   R   RB   R   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   X  s    (   R0   R1   R?   Rj   Rq   R   R;  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR:  ;  s   				t   InTablePhasec           ` s   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f d |  j f d |  j f d |  j	 f d |  j
 f d |  j f d |  j f g
  |  _ |  j |  j _ t j d |  j f d |  j f g  |  _ |  j |  j _ d  S(   Nu   htmlu   captionu   colgroupu   colu   tbodyu   tfootu   theadu   tdu   thu   tru   tableu   styleu   scriptu   inputu   formu   body(   u   tbodyu   tfootu   thead(   u   tdu   thu   tr(   u   styleu   script(   u   bodyu   captionu   colu   colgroupu   htmlu   tbodyu   tdu   tfootu   thu   theadu   tr(   R?   R   R   R   t   startTagCaptiont   startTagColgroupt   startTagColt   startTagRowGroupt   startTagImplyTbodyR   t   startTagStyleScriptR   R   R   R   R   t   endTagTablet   endTagIgnoreR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   ^  s$     c         S` s4   x- |  j  j d j d k r/ |  j  j j   q Wd  S(   Niu   tableu   html(   u   tableu   html(   R5   Rd   R=   R   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   clearStackToTableContextv  s    c         S` sB   |  j  j d j d k r, |  j j d  n |  j j s> t  d  S(   Niu   htmlu   eof-in-table(   R5   Rd   R=   RB   Re   RH   Rr   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    c         S` sH   |  j  j } |  j  j d |  j  _ | |  j  j _ |  j  j j |  d  S(   Nu   inTableText(   RB   RT   R:   R   Rk   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` sH   |  j  j } |  j  j d |  j  _ | |  j  j _ |  j  j j |  d  S(   Nu   inTableText(   RB   RT   R:   R   Rj   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s3   t  |  j _ |  j j d j |  t |  j _ d  S(   Nu   inBody(   RE   R5   t   insertFromTableRB   R:   Rj   RK   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sG   |  j    |  j j j t  |  j j |  |  j j d |  j _ d  S(   Nu	   inCaption(	   RE  R5   R  Rp   R   R   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR=    s    
c         S` s4   |  j    |  j j |  |  j j d |  j _ d  S(   Nu   inColumnGroup(   RE  R5   R   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR>    s    
c         S` s   |  j  t d d   | S(   Nu   colgroupu   StartTag(   R>  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?    s    c         S` s4   |  j    |  j j |  |  j j d |  j _ d  S(   Nu   inTableBody(   RE  R5   R   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR@    s    
c         S` s   |  j  t d d   | S(   Nu   tbodyu   StartTag(   R@  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRA    s    c         S` sN   |  j  j d i d d 6d d 6 |  j  j j t d   |  j  j sJ | Sd  S(   Nu$   unexpected-start-tag-implies-end-tagu   tableu	   startNameu   endName(   RB   Re   RT   Rm   R   RH   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` s   |  j  j d j |  S(   Nu   inHead(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRB    s    c         S` sq   d | d k r` | d d j  t  d k r` |  j j d  |  j j |  |  j j j   n |  j |  d  S(   Nu   typeu   datau   hiddenu    unexpected-hidden-input-in-table(	   R_   R   RB   Re   R5   R   Rd   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s_   |  j  j d  |  j j d  k r[ |  j j |  |  j j d |  j _ |  j j j   n  d  S(   Nu   unexpected-form-in-tablei(   RB   Re   R5   R  R4   R   Rd   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` sQ   |  j  j d i | d d 6 t |  j _ |  j  j d j |  t |  j _ d  S(   Nu)   unexpected-start-tag-implies-table-voodoou   nameu   inBody(   RB   Re   RE   R5   RF  R:   Rl   RK   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j d d d r |  j  j   |  j  j d j d k ro |  j j d i d d 6|  j  j d j d 6 n  x- |  j  j d j d k r |  j  j j   qr W|  j  j j   |  j j   n |  j j	 s t
  |  j j   d  S(   Nu   tableR  iu   end-tag-too-early-namedu   gotNameu   expectedName(   R5   R  R%  Rd   R=   RB   Re   R   RV   RH   Rr   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRC    s    
c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD    s    c         S` sQ   |  j  j d i | d d 6 t |  j _ |  j  j d j |  t |  j _ d  S(   Nu'   unexpected-end-tag-implies-table-voodoou   nameu   inBody(   RB   Re   RE   R5   RF  R:   Rm   RK   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   RE  Rq   Rk   Rj   R   R=  R>  R?  R@  RA  R   RB  R   R   R   RC  RD  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR<  \  s&   														
				t   InTableTextPhasec           ` sV   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         ` s)     j  |  | |  d  |  _ g  |  _ d  S(   N(   R?   R4   R   t   characterTokens(   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s    	c         S` s   d j  g  |  j D] } | d ^ q  } t g  | D] } | t k ^ q3  r i t d d 6| d 6} |  j j d j |  n | r |  j j |  n  g  |  _ d  S(   Nu    u   datau
   Charactersu   typeu   inTable(	   t   joinRH  R  R
   R   RB   R:   R   R5   (   R;   R(  R   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   flushCharacters  s    )%c         S` s   |  j    |  j |  j _ | S(   N(   RJ  R   RB   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn     s    
c         S` s   |  j    |  j |  j _ t S(   N(   RJ  R   RB   RT   RE   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    
c         S` s(   | d d k r d  S|  j  j |  d  S(   Nu   datau    (   RH  Rp   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s   |  j  j |  d  S(   N(   RH  Rp   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j    |  j |  j _ | S(   N(   RJ  R   RB   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRl     s    
c         S` s   |  j    |  j |  j _ | S(   N(   RJ  R   RB   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm     s    
(
   R0   R1   R?   RJ  Rn   Rq   Rj   Rk   Rl   Rm   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRG    s   							t   InCaptionPhasec           ` sh   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   c         ` s     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ t j d |  j f d |  j	 f d |  j
 f g  |  _ |  j |  j _ d  S(   Nu   htmlu   captionu   colu   colgroupu   tbodyu   tdu   tfootu   thu   theadu   tru   tableu   body(	   u   captionu   colu   colgroupu   tbodyu   tdu   tfootu   thu   theadu   tr(
   u   bodyu   colu   colgroupu   htmlu   tbodyu   tdu   tfootu   thu   theadu   tr(   R?   R   R   R   t   startTagTableElementR   R   R   t   endTagCaptionRC  RD  R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s      c         S` s   |  j  j d d d S(   Nu   captionR  u   table(   R5   R  (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   ignoreEndTagCaption.  s    c         S` s   |  j  j d j   d  S(   Nu   inBody(   RB   R:   Rq   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   1  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rj   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   4  s    c         S` s@   |  j  j   |  j   } |  j  j j t d   | s< | Sd  S(   Nu   caption(   RB   Re   RN  RT   Rm   R   (   R;   Rz   t   ignoreEndTag(    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRL  7  s
    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   ?  s    c         S` s   |  j    s |  j j   |  j j d j d k rc |  j j d i d d 6|  j j d j d 6 n  x- |  j j d j d k r |  j j j   qf W|  j j j   |  j j   |  j j	 d |  j _
 n |  j j s t  |  j j   d  S(   Niu   captionu$   expected-one-end-tag-but-got-anotheru   gotNameu   expectedNameu   inTable(   RN  R5   R%  Rd   R=   RB   Re   R   R9  R:   RT   RH   Rr   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRM  B  s    
c         S` s@   |  j  j   |  j   } |  j  j j t d   | s< | Sd  S(   Nu   caption(   RB   Re   RN  RT   Rm   R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRC  T  s
    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD  [  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rm   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   ^  s    (   R0   R1   R?   RN  Rq   Rj   RL  R   RM  RC  RD  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRK    s   								t   InColumnGroupPhasec           ` s_   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         ` s     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ t j d |  j f d |  j	 f g  |  _
 |  j |  j
 _ d  S(   Nu   htmlu   colu   colgroup(   R?   R   R   R   R?  R   R   R   t   endTagColgroupt	   endTagColR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   d  s    c         S` s   |  j  j d j d k S(   Niu   html(   R5   Rd   R=   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   ignoreEndTagColgroups  s    c         S` s\   |  j  j d j d k r/ |  j j s+ t  d  S|  j   } |  j t d   | sX t	 Sd  S(   Niu   htmlu   colgroup(
   R5   Rd   R=   RB   RH   Rr   RS  RQ  R   RE   (   R;   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   v  s    c         S` s-   |  j    } |  j t d   | s) | Sd  S(   Nu   colgroup(   RS  RQ  R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s$   |  j  j |  |  j  j j   d  S(   N(   R5   R   Rd   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?    s    c         S` s-   |  j    } |  j t d   | s) | Sd  S(   Nu   colgroup(   RS  RQ  R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sX   |  j    r. |  j j s t  |  j j   n& |  j j j   |  j j d |  j _	 d  S(   Nu   inTable(
   RS  RB   RH   Rr   Re   R5   Rd   R   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRQ    s
    c         S` s   |  j  j d i d d 6 d  S(   Nu
   no-end-tagu   colu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRR    s    c         S` s-   |  j    } |  j t d   | s) | Sd  S(   Nu   colgroup(   RS  RQ  R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   RS  Rq   Rj   R?  R   RQ  RR  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRP  a  s   		
						t   InTableBodyPhasec           ` s   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z RS(   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f g  |  _ |  j |  j _	 t j d |  j
 f d |  j f d |  j f g  |  _ |  j |  j _	 d  S(   Nu   htmlu   tru   tdu   thu   captionu   colu   colgroupu   tbodyu   tfootu   theadu   tableu   body(   u   tdu   th(   u   captionu   colu   colgroupu   tbodyu   tfootu   thead(   u   tbodyu   tfootu   thead(   u   bodyu   captionu   colu   colgroupu   htmlu   tdu   thu   tr(   R?   R   R   R   t
   startTagTrt   startTagTableCellt   startTagTableOtherR   R   R   t   endTagTableRowGroupRC  RD  R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s     c         S` sb   x- |  j  j d j d k r/ |  j  j j   q W|  j  j d j d k r^ |  j j s^ t  n  d  S(   Niu   tbodyu   tfootu   theadu   html(   u   tbodyu   tfootu   theadu   html(   R5   Rd   R=   R   RB   RH   Rr   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   clearStackToTableBodyContext  s
    	c         S` s   |  j  j d j   d  S(   Nu   inTable(   RB   R:   Rq   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rk   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk     s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rj   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s4   |  j    |  j j |  |  j j d |  j _ d  S(   Nu   inRow(   RY  R5   R   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRU    s    
c         S` s8   |  j  j d i | d d 6 |  j t d d   | S(   Nu   unexpected-cell-in-table-bodyu   nameu   tru   StartTag(   RB   Re   RU  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRV    s    c         S` s   |  j  j d d d sH |  j  j d d d sH |  j  j d d d rv |  j   |  j t |  j  j d j   | S|  j j s t	  |  j j
   d  S(   Nu   tbodyR  u   tableu   theadu   tfooti(   R5   R  RY  RX  R   Rd   R=   RB   RH   Rr   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRW    s    
c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sq   |  j  j | d d d rO |  j   |  j  j j   |  j j d |  j _ n |  j j d i | d d 6 d  S(   Nu   nameR  u   tableu   inTableu    unexpected-end-tag-in-table-body(	   R5   R  RY  Rd   R   RB   R:   RT   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRX    s    
c         S` s   |  j  j d d d sH |  j  j d d d sH |  j  j d d d rv |  j   |  j t |  j  j d j   | S|  j j s t	  |  j j
   d  S(   Nu   tbodyR  u   tableu   theadu   tfooti(   R5   R  RY  RX  R   Rd   R=   RB   RH   Rr   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRC    s    
c         S` s"   |  j  j d i | d d 6 d  S(   Nu    unexpected-end-tag-in-table-bodyu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD    s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rm   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   RY  Rq   Rk   Rj   RU  RV  RW  R   RX  RC  RD  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRT    s   	
											t
   InRowPhasec           ` s   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z d   Z RS(   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f g  |  _ |  j |  j _ t j d
 |  j	 f d |  j
 f d |  j f d |  j f g  |  _ |  j |  j _ d  S(   Nu   htmlu   tdu   thu   captionu   colu   colgroupu   tbodyu   tfootu   theadu   tru   tableu   body(   u   tdu   th(   u   captionu   colu   colgroupu   tbodyu   tfootu   theadu   tr(   u   tbodyu   tfootu   thead(   u   bodyu   captionu   colu   colgroupu   htmlu   tdu   th(   R?   R   R   R   RV  RW  R   R   R   t   endTagTrRC  RX  RD  R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s     c         S` s[   xT |  j  j d j d k rV |  j j d i |  j  j d j d 6 |  j  j j   q Wd  S(   Niu   tru   htmlu'   unexpected-implied-end-tag-in-table-rowu   name(   u   tru   html(   R5   Rd   R=   RB   Re   R   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   clearStackToTableRowContext  s    c         S` s   |  j  j d d d S(   Nu   trR  u   table(   R5   R  (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   ignoreEndTagTr   s    c         S` s   |  j  j d j   d  S(   Nu   inTable(   RB   R:   Rq   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   $  s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rk   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk   '  s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rj   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   *  s    c         S` sG   |  j    |  j j |  |  j j d |  j _ |  j j j t  d  S(   Nu   inCell(	   R\  R5   R   RB   R:   RT   R  Rp   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRV  -  s    
c         S` s-   |  j    } |  j t d   | s) | Sd  S(   Nu   tr(   R]  R[  R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRW  3  s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   :  s    c         S` sb   |  j    s? |  j   |  j j j   |  j j d |  j _ n |  j j sQ t	  |  j j
   d  S(   Nu   inTableBody(   R]  R\  R5   Rd   R   RB   R:   RT   RH   Rr   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR[  =  s    
c         S` s-   |  j    } |  j t d   | s) | Sd  S(   Nu   tr(   R]  R[  R   (   R;   Rz   RO  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRC  G  s    c         S` sD   |  j  j | d d d r3 |  j t d   | S|  j j   d  S(   Nu   nameR  u   tableu   tr(   R5   R  R[  R   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRX  O  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tag-in-table-rowu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD  V  s    c         S` s   |  j  j d j |  S(   Nu   inTable(   RB   R:   Rm   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   Z  s    (   R0   R1   R?   R\  R]  Rq   Rk   Rj   RV  RW  R   R[  RC  RX  RD  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRZ    s   									
			t   InCellPhasec           ` sh   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z RS(
   c         ` s     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ t j d |  j f d |  j	 f d |  j
 f g  |  _ |  j |  j _ d  S(   Nu   htmlu   captionu   colu   colgroupu   tbodyu   tdu   tfootu   thu   theadu   tru   bodyu   table(	   u   captionu   colu   colgroupu   tbodyu   tdu   tfootu   thu   theadu   tr(   u   tdu   th(   u   bodyu   captionu   colu   colgroupu   html(   u   tableu   tbodyu   tfootu   theadu   tr(   R?   R   R   R   RW  R   R   R   t   endTagTableCellRD  t   endTagImplyR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   _  s     c         S` s`   |  j  j d d d r. |  j t d   n. |  j  j d d d r\ |  j t d   n  d  S(   Nu   tdR  u   tableu   th(   R5   R  R_  R   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt	   closeCellp  s    c         S` s   |  j  j d j   d  S(   Nu   inBody(   RB   R:   Rq   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   w  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rj   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   z  s    c         S` sa   |  j  j d d d s0 |  j  j d d d r> |  j   | S|  j j sP t  |  j j   d  S(   Nu   tdR  u   tableu   th(   R5   R  Ra  RB   RH   Rr   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRW  }  s    
c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s   |  j  j | d d d r |  j  j | d  |  j  j d j | d k r |  j j d i | d d 6 xF t r |  j  j j   } | j | d k rn Pqn qn Wn |  j  j j   |  j  j	   |  j j
 d |  j _ n |  j j d i | d d 6 d  S(   Nu   nameR  u   tableiu   unexpected-cell-end-tagu   inRowu   unexpected-end-tag(   R5   R  R%  Rd   R=   RB   Re   RE   R   R9  R:   RT   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR_    s    	c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRD    s    c         S` s;   |  j  j | d d d r* |  j   | S|  j j   d  S(   Nu   nameR  u   table(   R5   R  Ra  RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR`    s    
c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rm   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    (   R0   R1   R?   Ra  Rq   Rj   RW  R   R_  RD  R`  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR^  ]  s   				
				t   InSelectPhasec           ` s   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 d	   Z d
   Z d   Z d   Z RS(   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f d	 |  j f d |  j f g  |  _	 |  j
 |  j	 _ t j d |  j f d |  j f d |  j f g  |  _ |  j |  j _ d  S(
   Nu   htmlu   optionu   optgroupu   selectu   inputu   keygenu   textareau   script(   u   inputu   keygenu   textarea(   R?   R   R   R   t   startTagOptiont   startTagOptgroupR   R   R   R   R   R   t   endTagOptiont   endTagOptgroupt   endTagSelectR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?     s    c         S` sB   |  j  j d j d k r, |  j j d  n |  j j s> t  d  S(   Niu   htmlu   eof-in-select(   R5   Rd   R=   RB   Re   RH   Rr   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq     s    c         S` s,   | d d k r d  S|  j  j | d  d  S(   Nu   datau    (   R5   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj     s    c         S` s@   |  j  j d j d k r, |  j  j j   n  |  j  j |  d  S(   Niu   option(   R5   Rd   R=   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRc    s    c         S` sl   |  j  j d j d k r, |  j  j j   n  |  j  j d j d k rX |  j  j j   n  |  j  j |  d  S(   Niu   optionu   optgroup(   R5   Rd   R=   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRd    s
    c         S` s'   |  j  j d  |  j t d   d  S(   Nu   unexpected-select-in-selectu   select(   RB   Re   Rg  R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sU   |  j  j d  |  j j d d d r? |  j t d   | S|  j  j sQ t  d  S(   Nu   unexpected-input-in-selectu   selectR  (   RB   Re   R5   R  Rg  R   RH   Rr   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s
    c         S` s   |  j  j d j |  S(   Nu   inHead(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-start-tag-in-selectu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR     s    c         S` sJ   |  j  j d j d k r, |  j  j j   n |  j j d i d d 6 d  S(   Niu   optionu   unexpected-end-tag-in-selectu   name(   R5   Rd   R=   R   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRe    s    c         S` s   |  j  j d j d k rE |  j  j d j d k rE |  j  j j   n  |  j  j d j d k rq |  j  j j   n |  j j d i d d 6 d  S(   Niu   optioniu   optgroupu   unexpected-end-tag-in-selectu   name(   R5   Rd   R=   R   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRf    s    c         S` s   |  j  j d d d rb |  j  j j   } x% | j d k rQ |  j  j j   } q- W|  j j   n |  j j st t  |  j j	   d  S(   Nu   selectR  (
   R5   R  Rd   R   R=   RB   RV   RH   Rr   Re   (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRg    s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tag-in-selectu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   		  s    (   R0   R1   R?   Rq   Rj   Rc  Rd  R   R   R   R   Re  Rf  Rg  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRb    s   											t   InSelectInTablePhasec           ` sM   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c      	   ` sq     j  |  | |  t j d	 |  j f g  |  _ |  j |  j _ t j d
 |  j f g  |  _ |  j	 |  j _ d  S(   Nu   captionu   tableu   tbodyu   tfootu   theadu   tru   tdu   th(   u   captionu   tableu   tbodyu   tfootu   theadu   tru   tdu   th(   u   captionu   tableu   tbodyu   tfootu   theadu   tru   tdu   th(
   R?   R   R   R   R   R   R   RC  R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   	  s    c         S` s   |  j  j d j   d  S(   Nu   inSelect(   RB   R:   Rq   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   	  s    c         S` s   |  j  j d j |  S(   Nu   inSelect(   RB   R:   Rj   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj    	  s    c         S` s5   |  j  j d i | d d 6 |  j t d   | S(   Nu5   unexpected-table-element-start-tag-in-select-in-tableu   nameu   select(   RB   Re   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   #	  s    c         S` s   |  j  j d j |  S(   Nu   inSelect(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   (	  s    c         S` sU   |  j  j d i | d d 6 |  j j | d d d rQ |  j t d   | Sd  S(   Nu3   unexpected-table-element-end-tag-in-select-in-tableu   nameR  u   tableu   select(   RB   Re   R5   R  R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRC  +	  s    c         S` s   |  j  j d j |  S(   Nu   inSelect(   RB   R:   Rm   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   1	  s    (	   R0   R1   R?   Rq   Rj   R   R   RC  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRh  	  s   					t   InForeignContentPhasec        -   ` s   e  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 d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ g,  Z   f d,   Z d-   Z   f d.   Z d/   Z d0   Z RS(1   u   bu   bigu
   blockquoteu   bodyu   bru   centeru   codeu   ddu   divu   dlu   dtu   emu   embedu   h1u   h2u   h3u   h4u   h5u   h6u   headu   hru   iu   imgu   liu   listingu   menuu   metau   nobru   olu   pu   preu   rubyu   su   smallu   spanu   strongu   strikeu   subu   supu   tableu   ttu   uu   ulu   varc         ` s     j  |  | |  d  S(   N(   R?   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   >	  s    c         S` s+  i$ d d 6d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d 6d d  6d! d" 6d# d$ 6d% d& 6d' d( 6d) d* 6d+ d, 6d- d. 6d/ d0 6d1 d2 6d3 d4 6d5 d6 6d7 d8 6d9 d: 6d; d< 6d= d> 6d? d@ 6dA dB 6dC dD 6dE dF 6dG dH 6} | dI | k r'| | dI | dI <n  d  S(J   Nu   altGlyphu   altglyphu   altGlyphDefu   altglyphdefu   altGlyphItemu   altglyphitemu   animateColoru   animatecoloru   animateMotionu   animatemotionu   animateTransformu   animatetransformu   clipPathu   clippathu   feBlendu   feblendu   feColorMatrixu   fecolormatrixu   feComponentTransferu   fecomponenttransferu   feCompositeu   fecompositeu   feConvolveMatrixu   feconvolvematrixu   feDiffuseLightingu   fediffuselightingu   feDisplacementMapu   fedisplacementmapu   feDistantLightu   fedistantlightu   feFloodu   fefloodu   feFuncAu   fefuncau   feFuncBu   fefuncbu   feFuncGu   fefuncgu   feFuncRu   fefuncru   feGaussianBluru   fegaussianbluru   feImageu   feimageu   feMergeu   femergeu   feMergeNodeu   femergenodeu   feMorphologyu   femorphologyu   feOffsetu   feoffsetu   fePointLightu   fepointlightu   feSpecularLightingu   fespecularlightingu   feSpotLightu   fespotlightu   feTileu   fetileu   feTurbulenceu   feturbulenceu   foreignObjectu   foreignobjectu   glyphRefu   glyphrefu   linearGradientu   lineargradientu   radialGradientu   radialgradientu   textPathu   textpathu   name(    (   R;   Rz   R   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   adjustSVGTagNamesA	  sL    

c         ` sf   | d d k r d | d <n5 |  j  j rR t d   | d D  rR t |  j  _ n    j |  |  d  S(   Nu   datau    u   �c         s` s   |  ] } | t  k Vq d  S(   N(   R
   (   R   R  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pys	   <genexpr>n	  s    (   RB   RY   R  RK   Rj   (   R;   Rz   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   j	  s    c         S` s  |  j  j d } | d |  j k s\ | d d k r t | d j    t d d d g  @r |  j j d i | d d 6 xm |  j  j d j |  j  j k r |  j j	 |  j  j d  r |  j j
 |  j  j d  r |  j  j j   q} W| S| j t d	 k r|  j j |  n3 | j t d
 k rG|  j |  |  j j |  n  |  j j |  | j | d <|  j  j |  | d r|  j  j j   t | d <n  d  S(   Niu   nameu   fontu   datau   coloru   faceu   sizeu*   unexpected-html-element-in-foreign-contentu   mathmlu   svgu	   namespaceu   selfClosingu   selfClosingAcknowledged(   R5   Rd   t   breakoutElementst   setR   RB   Re   R]   Rh   Ra   Rb   R   R   R   Rj  R   R   R   RE   (   R;   Rz   R|   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRl   r	  s.    )
c         S` sQ  t  |  j j  d } |  j j d } | j | d k rZ |  j j d i | d d 6 n  x t rL| j j t  | d k r |  j j	 |  j j
 d k r |  j j	 j   |  j j	 j |  j _	 n  x. |  j j j   | k r |  j j s t  q Wd  } Pn  | d 8} |  j j | } | j |  j j k r3q] q] |  j j	 j |  } Pq] W| S(   Ni   iu   nameu   unexpected-end-tagu   inTableText(   Rg   R5   Rd   R=   RB   Re   RE   R_   R   RT   R:   RJ  R   R   Rr   R4   R]   Rh   Rm   (   R;   Rz   t	   nodeIndexR   R{   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm   	  s(    !	
(	   R0   R1   Ri   Rk  R?   Rj  Rj   Rl   Rm   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRi  4	  s   	)	t   AfterBodyPhasec           ` sV   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         ` sq     j  |  | |  t j d |  j f g  |  _ |  j |  j _ t j d |  j f g  |  _ |  j	 |  j _ d  S(   Nu   html(
   R?   R   R   R   R   R   R   R   R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   	  s    c         S` s   d  S(   N(    (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   	  s    c         S` s!   |  j  j | |  j  j d  d  S(   Ni    (   R5   R   Rd   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn   	  s    c         S` s*   |  j  j d  |  j  j d |  j  _ | S(   Nu   unexpected-char-after-bodyu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   	  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    c         S` s8   |  j  j d i | d d 6 |  j  j d |  j  _ | S(   Nu   unexpected-start-tag-after-bodyu   nameu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    c         S` s9   |  j  j r |  j  j d  n |  j  j d |  j  _ d  S(   Nu'   unexpected-end-tag-after-body-innerhtmlu   afterAfterBody(   RB   RH   Re   R:   RT   (   R;   R=   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    c         S` s8   |  j  j d i | d d 6 |  j  j d |  j  _ | S(   Nu   unexpected-end-tag-after-bodyu   nameu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    (
   R0   R1   R?   Rq   Rn   Rj   R   R   R   R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn  	  s   						t   InFramesetPhasec           ` s_   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         ` s     j  |  | |  t j d |  j f d |  j f d |  j f d |  j f g  |  _ |  j |  j _	 t j d |  j
 f g  |  _ |  j |  j _	 d  S(   Nu   htmlu   framesetu   frameu   noframes(   R?   R   R   R   R   t   startTagFramet   startTagNoframesR   R   R   t   endTagFramesetR   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   	  s    c         S` sB   |  j  j d j d k r, |  j j d  n |  j j s> t  d  S(   Niu   htmlu   eof-in-frameset(   R5   Rd   R=   RB   Re   RH   Rr   (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   	  s    c         S` s   |  j  j d  d  S(   Nu   unexpected-char-in-frameset(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   	  s    c         S` s   |  j  j |  d  S(   N(   R5   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    c         S` s$   |  j  j |  |  j  j j   d  S(   N(   R5   R   Rd   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRp  	  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq  	  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu    unexpected-start-tag-in-framesetu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   	  s    c         S` s   |  j  j d j d k r, |  j j d  n |  j  j j   |  j j r{ |  j  j d j d k r{ |  j j d |  j _ n  d  S(   Niu   htmlu)   unexpected-frameset-in-frameset-innerhtmlu   framesetu   afterFrameset(	   R5   Rd   R=   RB   Re   R   RH   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRr  	  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   unexpected-end-tag-in-framesetu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   
  s    (   R0   R1   R?   Rq   Rj   R   Rp  Rq  R   Rr  R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRo  	  s   							t   AfterFramesetPhasec           ` sM   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   c         ` s}     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ t j d |  j f g  |  _	 |  j
 |  j	 _ d  S(   Nu   htmlu   noframes(   R?   R   R   R   Rq  R   R   R   R   R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   
  s    c         S` s   d  S(   N(    (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   
  s    c         S` s   |  j  j d  d  S(   Nu   unexpected-char-after-frameset(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   #
  s    c         S` s   |  j  j d j |  S(   Nu   inHead(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq  &
  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu#   unexpected-start-tag-after-framesetu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   )
  s    c         S` s   |  j  j d |  j  _ d  S(   Nu   afterAfterFrameset(   RB   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   -
  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu!   unexpected-end-tag-after-framesetu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   0
  s    (	   R0   R1   R?   Rq   Rj   Rq  R   R   R   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRs  
  s   					t   AfterAfterBodyPhasec           ` sV   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 RS(   c         ` sD     j  |  | |  t j d |  j f g  |  _ |  j |  j _ d  S(   Nu   html(   R?   R   R   R   R   R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   5
  s    c         S` s   d  S(   N(    (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   =
  s    c         S` s   |  j  j | |  j  j  d  S(   N(   R5   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn   @
  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rk   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk   C
  s    c         S` s*   |  j  j d  |  j  j d |  j  _ | S(   Nu   expected-eof-but-got-charu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   F
  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   K
  s    c         S` s8   |  j  j d i | d d 6 |  j  j d |  j  _ | S(   Nu   expected-eof-but-got-start-tagu   nameu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   N
  s    c         S` s8   |  j  j d i | d d 6 |  j  j d |  j  _ | S(   Nu   expected-eof-but-got-end-tagu   nameu   inBody(   RB   Re   R:   RT   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm   T
  s    (
   R0   R1   R?   Rq   Rn   Rk   Rj   R   R   Rm   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRt  4
  s   						t   AfterAfterFramesetPhasec           ` s_   e  Z   f d    Z d   Z d   Z d   Z d   Z d   Z d   Z d   Z	 d   Z
 RS(	   c         ` sP     j  |  | |  t j d |  j f d |  j f g  |  _ |  j |  j _ d  S(   Nu   htmlu   noframes(   R?   R   R   R   t   startTagNoFramesR   R   R   (   R;   RB   R5   (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR?   [
  s
    c         S` s   d  S(   N(    (   R;   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRq   d
  s    c         S` s   |  j  j | |  j  j  d  S(   N(   R5   R   R   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRn   g
  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rk   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRk   j
  s    c         S` s   |  j  j d  d  S(   Nu   expected-eof-but-got-char(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRj   m
  s    c         S` s   |  j  j d j |  S(   Nu   inBody(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   p
  s    c         S` s   |  j  j d j |  S(   Nu   inHead(   RB   R:   Rl   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRv  s
  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   expected-eof-but-got-start-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   v
  s    c         S` s"   |  j  j d i | d d 6 d  S(   Nu   expected-eof-but-got-end-tagu   name(   RB   Re   (   R;   Rz   (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRm   z
  s    (   R0   R1   R?   Rq   Rn   Rk   Rj   R   Rv  R   Rm   (    (   R   (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyRu  Z
  s   								u   initialu
   beforeHtmlu
   beforeHeadu   inHeadu	   afterHeadu   inBodyu   textu   inTableu   inTableTextu	   inCaptionu   inColumnGroupu   inTableBodyu   inRowu   inCellu   inSelectu   inSelectInTableu   inForeignContentu	   afterBodyu
   inFramesetu   afterFramesetu   afterAfterBodyu   afterAfterFrameset(   R   (   R<   RM   R   R   R   R   R   R   R   R:  R<  RG  RK  RP  RT  RZ  R^  Rb  Rh  Ri  Rn  Ro  Rs  Rt  Ru  (    (   R   sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR9     sd    		%)#.cC  !-GAbYLd's/9%&$u   EndTagc         C` s9   | d  k r i  } n  i t | d 6|  d 6| d 6| d 6S(   Nu   typeu   nameu   datau   selfClosing(   R4   R   (   R=   R'   R^   R!  (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   
  s    	R   c           B` s   e  Z d  Z RS(   u   Error in parsed document(   R0   R1   R   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyR   
  s   ()   t
   __future__R    R   R   t   pip._vendor.sixR   R%   t    R   R   R   t   treebuilders._baseR   R   R	   R
   R   R   R   R   R   R   R   R   R   R   R   R   R   R4   RE   R   R!   R2   t   objectR   R9   RK   R   t	   ExceptionR   (    (    (    sq   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/html5lib/html5parser.pyt   <module>   sF   		 t	        