o
    tfe                     @   s   d d Z dd Zdd Zdd Zdd	 Zd
d Zedd dD dd dD  dd dD  dd dD  dd dD  dd dD  dd dD  g d ZdS )c                 C   s   g }t | |j d|S )a  Serialize nodes to CSS syntax.

    This should be used for :term:`component values`
    instead of just :meth:`tinycss2.ast.Node.serialize` on each node
    as it takes care of corner cases such as ``;`` between declarations,
    and consecutive identifiers
    that would otherwise parse back as the same token.

    :type nodes: :term:`iterable`
    :param nodes: An iterable of :class:`tinycss2.ast.Node` objects.
    :returns: A :obj:`string <str>` representing the nodes.

     )_serialize_toappendjoin)nodeschunks r   \/var/www/html/software/conda/envs/catlas/lib/python3.10/site-packages/tinycss2/serializer.py	serialize   s   
r	   c                 C   s   | dkrdS | dd dkrdt | dd  S | d dkr'd}| dd } nd}| d }||d	v s8t|d
kr:|n|dkr@dn|dkrFdn|dkrLdn|dv rVdt| nd| 7 }|t | dd 7 }|S )aX  Serialize any string as a CSS identifier

    :type value: :obj:`str`
    :param value: A string representing a CSS value.
    :returns:
        A :obj:`string <str>` that would parse as an
        :class:`tinycss2.ast.IdentToken` whose
        :attr:`tinycss2.ast.IdentToken.value` attribute equals the passed
        ``value`` argument.

    -z\-N   z--       r   Z5abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ   
\A \D \C 
0123456789z\%X \)serialize_nameord)valueresultcr   r   r   serialize_identifier   s*   	r   c                 C      d dd | D S )Nr   c                 s   sT    | ]%}|d v st |dkr|n|dkrdn|dkrdn	|dkr"dnd| V  qd	S )
z@abcdefghijklmnopqrstuvwxyz-_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZr   r   r   r   r   r   r   r   N)r   .0r   r   r   r   	<genexpr>:   s    
z!serialize_name.<locals>.<genexpr>r   r   r   r   r   r   9      
r   c                 C   r   )Nr   c                 s   sP    | ]#}|d kr
dn|dkrdn|dkrdn|dkrdn|dkr"d	n|V  qd
S )"\"r   \\r   r   r   r   r   r   Nr   r   r   r   r   r    F   s    
z)serialize_string_value.<locals>.<genexpr>r!   r"   r   r   r   serialize_string_valueE   r#   r'   c                 C   r   )Nr   c                 s   s    | ]A}|d kr
dn7|dkrdn1|dkrdn+|dkrdn%|dkr"d	n|d
kr(dn|dkr.dn|dkr4dn|dkr:dn|dkr@dn|V  qdS )'z\'r$   r%   r   r&    z\ 	z\9 r   r   r   r   r   r   (z\()z\)Nr   r   r   r   r   r    R   s    
z serialize_url.<locals>.<genexpr>r!   r"   r   r   r   serialize_urlQ   s   
r-   c                 C   s   t }d}| D ]9}|jdkr|jn|j}||f|v r|d n|dkr0|dkr,|jds0|d || |dkr=|d |}qdS )	zSerialize an iterable of nodes to CSS syntax.

    White chunks as a string by calling the provided :obj:`write` callback.

    Nliteralz/**/r   
whitespacer   Zdeclaration;)	BAD_PAIRStyper   
startswithr   )r   writeZ	bad_pairsZprevious_typenodeZserialization_typer   r   r   r   c   s$   


r   c                 C      g | ]}d D ]}||fqqS ))identfunctionurlnumber
percentage	dimensionunicode-ranger   r   abr   r   r   
<listcomp>{       rA   )r7   
at-keywordhashr<   #r
   r:   c                 C   r6   ))r
   z-->r   r>   r   r   r   rA      rB   )r7   rC   rD   r<   c                 C   r6   ))r7   r8   r9   r   r>   r   r   r   rA      rB   )rE   r
   r:   @c                 C   r6   ))r:   r;   r<   r   r>   r   r   r   rA      rB   )r=   .+c                 C      g | ]}d |fqS )rF   r   r   r@   r   r   r   rA          )r7   r8   r9   r=   r
   c                 C   rI   )r=   r   rJ   r   r   r   rA      rK   )r7   r8   ?c                 C   s   g | ]}|d fqS )=r   )r   r?   r   r   r   rA      rK   z$*^~|))r7   z() block)|rN   )/*N)r	   r   r   r'   r-   r   setr1   r   r   r   r   <module>   s>    %
