o
    j܁                     @  s   d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	m
Z
mZmZmZmZmZmZmZmZmZmZmZmZmZmZ erHddlmZ ddlmZ G dd	 d	eeZG d
d dZe dj!Z"e dj#Z$e dj#Z%G dd dZ&G dd de&Z'dS )z
cssselect.xpath
===============

Translation of parsed CSS selectors to XPath expressions.


:copyright: (c) 2007-2012 Ian Bicking and contributors.
See AUTHORS for more details.
:license: BSD, see LICENSE for more details.

    )annotationsN)TYPE_CHECKINGcast)AttribClassCombinedSelectorElementFunctionHashMatchingNegationPseudoPseudoElementRelationSelectorSelectorErrorSpecificityAdjustmentTreeparseparse_series)Callable)Selfc                   @  s   e Zd ZdZdS )ExpressionErrorz3Unknown or unsupported selector (eg. pseudo-class).N)__name__
__module____qualname____doc__ r   r   P/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/cssselect/xpath.pyr   .   s    r   c                   @  sd   e Zd Z				d#d$ddZd%ddZd%ddZd&d'ddZd(ddZd(ddZ		d)d*d!d"Z	dS )+	XPathExpr *Fpathstrelement	conditionstar_prefixboolreturnNonec                 C  s   || _ || _|| _d S N)r"   r$   r%   )selfr"   r$   r%   r&   r   r   r   __init__6   s   
zXPathExpr.__init__c                 C  s0   t | jt | j }| jr|d| j d7 }|S N[]r#   r"   r$   r%   )r+   r"   r   r   r   __str__A   s   zXPathExpr.__str__c                 C  s   | j j d|  dS r-   )	__class__r   r+   r   r   r   __repr__G   s   zXPathExpr.__repr__and
conjuctionr   c                 C  s0   | j rd| j  d| d| d| _ | S || _ | S )N(z) z ())r%   )r+   r%   r6   r   r   r   add_conditionJ   s
   zXPathExpr.add_conditionc                 C  s0   | j dkrd S | dt| j   d| _ d S )Nr!   z	name() = )r$   r9   GenericTranslatorxpath_literalr3   r   r   r   add_name_testQ   s   

zXPathExpr.add_name_testc                 C  s   |  j d7  _ dS )ze
        Append '*/' to the path to keep the context constrained
        to a single parent.
        */N)r"   r3   r   r   r   add_star_prefixX   s   zXPathExpr.add_star_prefixNcombinerotherclosing_combiner
str | Nonehas_inner_conditionc                 C  s   t | | }|jdkr||j7 }|| _|s&|r|j| n|j| _|j| _| S |j| _|jr9|  jd|j d 7  _|rB|  j|7  _| S )Nr=   r.   r/   r0   )r+   r?   r@   rA   rC   r"   r   r   r   join_   s   

zXPathExpr.join)r    r!   r    F)
r"   r#   r$   r#   r%   r#   r&   r'   r(   r)   )r(   r#   )r5   )r%   r#   r6   r#   r(   r   )r(   r)   )NF)
r?   r#   r@   r   rA   rB   rC   r'   r(   r   )
r   r   r   r,   r1   r4   r9   r<   r>   rD   r   r   r   r   r   5   s    



r   z('+)z^[a-zA-Z_][a-zA-Z0-9_.-]*$z^[^ \t\r\n\f]+$c                	   @  sb  e Zd ZdZdddddZddd	d
dddddZdZdZdZdZ	dZ
eZddddZ		ddddZdd$d%Zedd'd(Zdd+d,Zdd/d0Zdd3d4Zdd7d8Zdd;d<Zdd>d?ZddBdCZddFdGZddIdJZddMdNZddQdRZddTdUZddXdYZddZd[Zdd\d]Z dd^d_Z!dd`daZ"ddbdcZ#ddddeZ$ddfdgZ%		hdddkdlZ&ddmdnZ'ddodpZ(ddqdrZ)ddsdtZ*ddudvZ+ddwdxZ,ddydzZ-dd{d|Z.dd}d~Z/dddZ0dddZ1dddZ2dddZ3dddZ4dddZ5e5Z6e5Z7e5Z8e5Z9e5Z:e5Z;e5Z<e5Z=e5Z>dddZ?dddZ@dddZAdddZBdddZCdddZDdddZEdddZFdS )r:   z
    Translator for "generic" XML documents.

    Everything is case-sensitive, no assumption is made on the meaning
    of element names and attribute names.

    Z
descendantchildZdirect_adjacentZindirect_adjacent) >+~existsequalsZincludesZ	dashmatchZprefixmatchZsuffixmatchZsubstringmatchZ	different)rJ   =z~=z|=z^=z$=z*=z!=idzxml:langFdescendant-or-self::cssr#   prefixr(   c                   s   d  fddt|D S )u  Translate a *group of selectors* to XPath.

        Pseudo-elements are not supported here since XPath only knows
        about "real" elements.

        :param css:
            A *group of selectors* as a string.
        :param prefix:
            This string is prepended to the XPath expression for each selector.
            The default makes selectors scoped to the context node’s subtree.
        :raises:
            :class:`~cssselect.SelectorSyntaxError` on invalid selectors,
            :class:`ExpressionError` on unknown/unsupported selectors,
            including pseudo-elements.
        :returns:
            The equivalent XPath 1.0 expression as a string.

        z | c                 3  s     | ]}j | d dV  qdS )T)translate_pseudo_elementsN)selector_to_xpath.0selectorrP   r+   r   r   	<genexpr>   s
    
z1GenericTranslator.css_to_xpath.<locals>.<genexpr>)rD   r   )r+   rO   rP   r   rV   r   css_to_xpath   s   zGenericTranslator.css_to_xpathrU   r   rQ   r'   c                 C  s`   t |dd}|std|| |}t|| jsJ |r(|jr(| ||j}|p+dt| S )u+  Translate a parsed selector to XPath.


        :param selector:
            A parsed :class:`Selector` object.
        :param prefix:
            This string is prepended to the resulting XPath expression.
            The default makes selectors scoped to the context node’s subtree.
        :param translate_pseudo_elements:
            Unless this is set to ``True`` (as :meth:`css_to_xpath` does),
            the :attr:`~Selector.pseudo_element` attribute of the selector
            is ignored.
            It is the caller's responsibility to reject selectors
            with pseudo-elements, or to account for them somehow.
        :raises:
            :class:`ExpressionError` on unknown/unsupported selectors.
        :returns:
            The equivalent XPath 1.0 expression as a string.

        parsed_treeNz Expected a parsed selector, got r    )getattr	TypeErrorxpath
isinstancexpathexpr_clspseudo_elementxpath_pseudo_elementr#   )r+   rU   rP   rQ   treer\   r   r   r   rR      s   

z#GenericTranslator.selector_to_xpathr\   r   r_   r   c                 C  s   t d)zTranslate a pseudo-element.

        Defaults to not supporting pseudo-elements at all,
        but can be overridden by sub-classes.

        z"Pseudo-elements are not supported.)r   )r+   r\   r_   r   r   r   r`     s   	z&GenericTranslator.xpath_pseudo_elementsc                 C  s^   t | } d| vrd|  d} | S d| vrd|  d} | S dd t| D }dd|} | S )N'"c                 S  s0   g | ]}|rd |v rd| dnd | d qS )rc   rd   r   )rT   partr   r   r   
<listcomp>  s    z3GenericTranslator.xpath_literal.<locals>.<listcomp>z
concat({}),)r#   split_at_single_quotesformatrD   )rb   Zparts_quotedr   r   r   r;     s   
zGenericTranslator.xpath_literalparsed_selectorr   c                 C  sD   t |j}tdt| d|  d}|du rt| d||S )z%Translate any parsed selector object.z"Callable[[Tree], XPathExpr] | Nonexpath_Nz is not supported.)typer   r   rZ   lowerr   )r+   rj   	type_namemethodr   r   r   r\   !  s   
zGenericTranslator.xpathcombinedr   c                 C  s>   | j |j }tdt| d| d}|| |j| |jS )zTranslate a combined selector.+Callable[[XPathExpr, XPathExpr], XPathExpr]rk   _combinator)combinator_mapping
combinatorr   rZ   r\   rU   subselector)r+   rp   rt   ro   r   r   r   xpath_combinedselector.  s   z(GenericTranslator.xpath_combinedselectornegationr   c                 C  sD   |  |j}|  |j}|  |jr|d|j dS |dS )Nnot(r8   0)r\   rU   ru   r<   r%   r9   )r+   rw   r\   Z	sub_xpathr   r   r   xpath_negation7  s   
z GenericTranslator.xpath_negationrelationr   c              	   C  sT   |  |j}|j}|j}|  |j}tdt| d| jtd|j  d}|||S )Nrq   Zxpath_relation_r#   rr   )	r\   rU   rt   ru   rY   r   rZ   rs   value)r+   r{   r\   rt   ru   rightro   r   r   r   xpath_relation?  s   
z GenericTranslator.xpath_relationmatchingr   c                   J     |j} fdd|jD }|D ]}|  |jr"||jd q|S )Nc                      g | ]}  |qS r   r\   rS   r3   r   r   rf   O      z4GenericTranslator.xpath_matching.<locals>.<listcomp>orr\   rU   Zselector_listr<   r%   r9   r+   r   r\   Zexprser   r3   r   xpath_matchingM     z GenericTranslator.xpath_matchingr   c                   r   )Nc                   r   r   r   rS   r3   r   r   rf   X  r   zAGenericTranslator.xpath_specificityadjustment.<locals>.<listcomp>r   r   r   r   r3   r   xpath_specificityadjustmentV  r   z-GenericTranslator.xpath_specificityadjustmentfunctionr	   c                 C  sN   d |jdd}tdt| |d}|std|j d|| |j|S )z$Translate a functional pseudo-class.zxpath_{}_function-_z1Callable[[XPathExpr, Function], XPathExpr] | NoneNThe pseudo-class :z() is unknown)ri   namereplacer   rZ   r   r\   rU   )r+   r   method_namero   r   r   r   xpath_function_  s   
z GenericTranslator.xpath_functionpseudor   c                 C  sL   d |jdd}tdt| |d}|std|j d|| |jS )zTranslate a pseudo-class.zxpath_{}_pseudor   r   z'Callable[[XPathExpr], XPathExpr] | NoneNr   z is unknown)ri   identr   r   rZ   r   r\   rU   )r+   r   r   ro   r   r   r   xpath_pseudoj  s   
zGenericTranslator.xpath_pseudor   c                 C  s   | j |j }tdt| d| }| jr|j }n|j}t|}|jr3|j d| }|o2t|j}|r:d| }n	d| 	| d}|j
du rKd}n| jrXtd|j
j
 }n|j
j
}|| |j||S )	z Translate an attribute selector.z1Callable[[XPathExpr, str, str | None], XPathExpr]Zxpath_attrib_:@zattribute::*[name() = r/   Nr#   )attribute_operator_mappingoperatorr   rZ   lower_case_attribute_namesattribrm   is_safe_name	namespacer;   r|   lower_case_attribute_valuesr\   rU   )r+   rU   r   ro   r   safer   r|   r   r   r   xpath_attribv  s*   

zGenericTranslator.xpath_attribclass_selectorr   c                 C     |  |j}| |d|jS )zTranslate a class selector.z@class)r\   rU   xpath_attrib_includes
class_name)r+   r   r\   r   r   r   xpath_class  s   zGenericTranslator.xpath_classid_selectorr
   c                 C  r   )zTranslate an ID selector.z@id)r\   rU   xpath_attrib_equalsrM   )r+   r   r\   r   r   r   
xpath_hash  s   zGenericTranslator.xpath_hashr   c                 C  sr   |j }|s
d}d}ntt|}| jr| }|jr+|j d| }|o*tt|j}| j|d}|s7|  |S )z'Translate a type or universal selector.r!   Tr   )r$   )r$   r'   r   lower_case_element_namesrm   r   r^   r<   )r+   rU   r$   r   r\   r   r   r   xpath_element  s   zGenericTranslator.xpath_elementleftr}   c                 C     | d|S )z;right is a child, grand-child or further descendant of leftz/descendant-or-self::*/rD   r+   r   r}   r   r   r   xpath_descendant_combinator     z-GenericTranslator.xpath_descendant_combinatorc                 C  r   )z#right is an immediate child of left/r   r   r   r   r   xpath_child_combinator  s   z(GenericTranslator.xpath_child_combinatorc                 C  s   | d|}|  |dS )z)right is a sibling immediately after left/following-sibling::zposition() = 1)rD   r<   r9   )r+   r   r}   r\   r   r   r    xpath_direct_adjacent_combinator  s   
z2GenericTranslator.xpath_direct_adjacent_combinatorc                 C  r   )z1right is a sibling after left, immediately or notr   r   r   r   r   r   "xpath_indirect_adjacent_combinator  r   z4GenericTranslator.xpath_indirect_adjacent_combinatorc                 C  s   |j d|dddS )zHright is a child, grand-child or further descendant of left; select leftz[descendant::r/   T)rA   rC   r   r   r   r   r   $xpath_relation_descendant_combinator  s   z6GenericTranslator.xpath_relation_descendant_combinatorc                 C     |j d|ddS )z0right is an immediate child of left; select leftz[./r/   rA   r   r   r   r   r   xpath_relation_child_combinator     z1GenericTranslator.xpath_relation_child_combinatorc                 C  s   | d|j dS )z6right is a sibling immediately after left; select leftz following-sibling::*[(name() = 'z') and (position() = 1)])r9   r$   r   r   r   r   )xpath_relation_direct_adjacent_combinator  s   z;GenericTranslator.xpath_relation_direct_adjacent_combinatorc                 C  r   )z>right is a sibling after left, immediately or not; select leftz[following-sibling::r/   r   r   r   r   r   r   +xpath_relation_indirect_adjacent_combinator  r   z=GenericTranslator.xpath_relation_indirect_adjacent_combinatorTlastr<   c              
     s  z	t |j\}}W n ty } z
td|jd|d }~ww |d }|dkr.|dkr.|S |dk r;|dk r;|dS |r?dn|j }	|sLd|	 d}
nd	|	 d}
|dkr`||
 d
| S g }|dkru|dkrt||
 d|  n
||
 d|  t|dkr|
}| t| }|dkrd| d| d}|| d| d t|dkrdnd |d	 fdd|D  |S )NzInvalid series: 'rc      r   ry   r!   count(preceding-sibling::r8   count(following-sibling:: = z >= z <= r7   z +z mod z = 0z(%s)z%sz and c                 3  s    | ]} | V  qd S r*   r   )rT   
expressiontemplater   r   rW   h  s    z=GenericTranslator.xpath_nth_child_function.<locals>.<genexpr>)
r   	arguments
ValueErrorr   r9   r$   appendabslenrD   )r+   r\   r   r   r<   abexZb_min_1ZnodetestZsiblings_countZexpressionsr   Zb_negr   r   r   xpath_nth_child_function  sD   ,
z*GenericTranslator.xpath_nth_child_functionc                 C  s   | j ||ddS )NT)r   )r   r+   r\   r   r   r   r   xpath_nth_last_child_functionl  s   z/GenericTranslator.xpath_nth_last_child_functionc                 C  s"   |j dkr	td| j||ddS )Nr!   "*:nth-of-type() is not implementedF)r<   r$   r   r   r   r   r   r   xpath_nth_of_type_functionq  s   
z,GenericTranslator.xpath_nth_of_type_functionc                 C  s$   |j dkr	td| j||dddS )Nr!   r   TF)r   r<   r   r   r   r   r   xpath_nth_last_of_type_functionx  s
   
z1GenericTranslator.xpath_nth_last_of_type_functionc                 C  N   |  dgdgfvrtd|jtd|jd j}|d| | dS )NSTRINGIDENTz7Expected a single string or ident for :contains(), got r#   r   zcontains(., r8   argument_typesr   r   r   r|   r9   r;   r+   r\   r   r|   r   r   r   xpath_contains_function  s   
z)GenericTranslator.xpath_contains_functionc                 C  r   )Nr   r   3Expected a single string or ident for :lang(), got r#   r   zlang(r8   r   r   r   r   r   xpath_lang_function  s   
z%GenericTranslator.xpath_lang_functionc                 C  
   | dS )Nznot(parent::*)r9   r+   r\   r   r   r   xpath_root_pseudo     
z#GenericTranslator.xpath_root_pseudoc                 C  r   )N1r   r   r   r   r   xpath_scope_pseudo  r   z$GenericTranslator.xpath_scope_pseudoc                 C  r   )Nzcount(preceding-sibling::*) = 0r   r   r   r   r   xpath_first_child_pseudo  r   z*GenericTranslator.xpath_first_child_pseudoc                 C  r   )Nzcount(following-sibling::*) = 0r   r   r   r   r   xpath_last_child_pseudo  r   z)GenericTranslator.xpath_last_child_pseudoc                 C  &   |j dkr	td|d|j  dS )Nr!   z"*:first-of-type is not implementedr   ) = 0r$   r   r9   r   r   r   r   xpath_first_of_type_pseudo     
z,GenericTranslator.xpath_first_of_type_pseudoc                 C  r   )Nr!   z!*:last-of-type is not implementedr   r   r   r   r   r   r   xpath_last_of_type_pseudo  r   z+GenericTranslator.xpath_last_of_type_pseudoc                 C  r   )Nzcount(parent::*/child::*) = 1r   r   r   r   r   xpath_only_child_pseudo  r   z)GenericTranslator.xpath_only_child_pseudoc                 C  r   )Nr!   z!*:only-of-type is not implementedzcount(parent::*/child::z) = 1r   r   r   r   r   xpath_only_of_type_pseudo  r   z+GenericTranslator.xpath_only_of_type_pseudoc                 C  r   )Nznot(*) and not(string-length())r   r   r   r   r   xpath_empty_pseudo  r   z$GenericTranslator.xpath_empty_pseudoc                 C  r   )z:Common implementation for pseudo-classes that never match.ry   r   r   r   r   r   pseudo_never_matches  s   
z&GenericTranslator.pseudo_never_matchesr   r|   rB   c                 C  s   |rJ | | |S r*   r   r+   r\   r   r|   r   r   r   xpath_attrib_exists  s   
z%GenericTranslator.xpath_attrib_existsc                 C  s*   |d usJ | | d| |  |S )Nr   r9   r;   r   r   r   r   r     s   z%GenericTranslator.xpath_attrib_equalsc              
   C  sT   |d usJ |r| d| d| d| |  |S | | d| |  |S )Nrx   z) or z != r   r   r   r   r   xpath_attrib_different  s   "z(GenericTranslator.xpath_attrib_differentc                 C  sL   |rt |r| d| d }|| d| d| d |S |d |S )NrF   z* and contains(concat(' ', normalize-space(z	), ' '), r8   ry   )is_non_whitespacer;   r9   )r+   r\   r   r|   argr   r   r   r     s   
z'GenericTranslator.xpath_attrib_includesc                 C  sP   |d usJ |  |}|  |d }|| d| d| d| d| d
 |S )Nr   z and (r   z or starts-with(, z)))r;   r9   )r+   r\   r   r|   r   Zarg_dashr   r   r   xpath_attrib_dashmatch  s   
 z(GenericTranslator.xpath_attrib_dashmatchc              	   C  8   |r| | d| d| | d |S | d |S )Nz and starts-with(r   r8   ry   r   r   r   r   r   xpath_attrib_prefixmatch  s   
z*GenericTranslator.xpath_attrib_prefixmatchc                 C  sJ   |r| | d| d| dt|d  d| | 	 |S | d |S )Nz and substring(z, string-length(z)-r   z) = ry   )r9   r   r;   r   r   r   r   xpath_attrib_suffixmatch	  s   ,
z*GenericTranslator.xpath_attrib_suffixmatchc              	   C  r   )Nz and contains(r   r8   ry   r   r   r   r   r   xpath_attrib_substringmatch  s   
z-GenericTranslator.xpath_attrib_substringmatchN)rN   )rO   r#   rP   r#   r(   r#   )rN   F)rU   r   rP   r#   rQ   r'   r(   r#   )r\   r   r_   r   r(   r   )rb   r#   r(   r#   )rj   r   r(   r   )rp   r   r(   r   )rw   r   r(   r   )r{   r   r(   r   )r   r   r(   r   )r   r   r(   r   )r   r	   r(   r   )r   r   r(   r   )rU   r   r(   r   )r   r   r(   r   )r   r
   r(   r   )rU   r   r(   r   )r   r   r}   r   r(   r   )FT)
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|   rB   r(   r   )Gr   r   r   r   rs   r   Zid_attributelang_attributer   r   r   r   r^   rX   rR   r`   staticmethodr;   r\   rv   rz   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   xpath_link_pseudoZxpath_visited_pseudoZxpath_hover_pseudoZxpath_active_pseudoZxpath_focus_pseudoZxpath_target_pseudoxpath_enabled_pseudoxpath_disabled_pseudoxpath_checked_pseudor   r   r   r   r   r   r   r   r   r   r   r   r:      s    
#


	


	
	












 



	


















r:   c                   @  sR   e Zd ZdZdZdddd	ZdddZdddZdddZdddZ	dddZ
dS )HTMLTranslatora  
    Translator for (X)HTML documents.

    Has a more useful implementation of some pseudo-classes based on
    HTML-specific element names and attribute names, as described in
    the `HTML5 specification`_. It assumes no-quirks mode.
    The API is the same as :class:`GenericTranslator`.

    .. _HTML5 specification: http://www.w3.org/TR/html5/links.html#selectors

    :param xhtml:
        If false (the default), element names and attribute names
        are case-insensitive.

    langFxhtmlr'   r(   r)   c                 C  s   || _ |sd| _d| _d S d S )NT)r  r   r   )r+   r  r   r   r   r,   5  s
   
zHTMLTranslator.__init__r\   r   c                 C  r   )Nz(@selected and name(.) = 'option') or (@checked and (name(.) = 'input' or name(.) = 'command')and (@type = 'checkbox' or @type = 'radio'))r   r   r   r   r   r  <     z#HTMLTranslator.xpath_checked_pseudor   r	   c                 C  sd   |  dgdgfvrtd|j|jd j}|sJ | | d }|d| j d| dS )	Nr   r   r   r   r   z<ancestor-or-self::*[@lang][1][starts-with(concat(translate(@zE, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'), '-'), z)])r   r   r   r|   r;   rm   r9   r   )r+   r\   r   r|   r   r   r   r   r   E  s   
z"HTMLTranslator.xpath_lang_functionc                 C  r   )NzA@href and (name(.) = 'a' or name(.) = 'link' or name(.) = 'area')r   r   r   r   r   r   U  s   z HTMLTranslator.xpath_link_pseudoc                 C  r   )Na  
        (
            @disabled and
            (
                (name(.) = 'input' and @type != 'hidden') or
                name(.) = 'button' or
                name(.) = 'select' or
                name(.) = 'textarea' or
                name(.) = 'command' or
                name(.) = 'fieldset' or
                name(.) = 'optgroup' or
                name(.) = 'option'
            )
        ) or (
            (
                (name(.) = 'input' and @type != 'hidden') or
                name(.) = 'button' or
                name(.) = 'select' or
                name(.) = 'textarea'
            )
            and ancestor::fieldset[@disabled]
        )
        r   r   r   r   r   r  ]  r  z$HTMLTranslator.xpath_disabled_pseudoc                 C  r   )Na'  
        (
            @href and (
                name(.) = 'a' or
                name(.) = 'link' or
                name(.) = 'area'
            )
        ) or (
            (
                name(.) = 'command' or
                name(.) = 'fieldset' or
                name(.) = 'optgroup'
            )
            and not(@disabled)
        ) or (
            (
                (name(.) = 'input' and @type != 'hidden') or
                name(.) = 'button' or
                name(.) = 'select' or
                name(.) = 'textarea' or
                name(.) = 'keygen'
            )
            and not (@disabled or ancestor::fieldset[@disabled])
        ) or (
            name(.) = 'option' and not(
                @disabled or ancestor::optgroup[@disabled]
            )
        )
        r   r   r   r   r   r  {  r  z#HTMLTranslator.xpath_enabled_pseudoN)F)r  r'   r(   r)   r   r   )r   r   r   r   r   r,   r  r   r   r  r  r   r   r   r   r  "  s    

	

r  )(r   
__future__r   retypingr   r   Zcssselect.parserr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   collections.abcr   Ztyping_extensionsr   RuntimeErrorr   r   compilesplitrh   matchr   r   r:   r  r   r   r   r   <module>   s(    LD      