
    i
                       d Z ddlmZ ddlZddlmZ  ej        d          Z ej        d          Z ej        d          Z	 ej        d          Z
 ej        d	          Z ej        d
          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Z ej        d          Zi dedede	de
dededededededed ed!ed"ed#ed$eZd*d)ZdS )+a  
Format a pretty string of a `SoupSieve` object for easy debugging.

This won't necessarily support all types and such, and definitely
not support custom outputs.

It is mainly geared towards our types as the `SelectorList`
object is a beast to look at without some indentation and newlines.
The format and various output types is fairly known (though it
hasn't been tested extensively to make sure we aren't missing corners).

Example:
-------
```
>>> import soupsieve as sv
>>> sv.compile('this > that.class[name=value]').selectors.pretty()
SelectorList(
    selectors=(
        Selector(
            tag=SelectorTag(
                name='that',
                prefix=None),
            ids=(),
            classes=(
                'class',
                ),
            attributes=(
                SelectorAttribute(
                    attribute='name',
                    prefix='',
                    pattern=re.compile(
                        '^value$'),
                    xml_type_pattern=None),
                ),
            nth=(),
            selectors=(),
            relation=SelectorList(
                selectors=(
                    Selector(
                        tag=SelectorTag(
                            name='this',
                            prefix=None),
                        ids=(),
                        classes=(),
                        attributes=(),
                        nth=(),
                        selectors=(),
                        relation=SelectorList(
                            selectors=(),
                            is_not=False,
                            is_html=False),
                        rel_type='>',
                        contains=(),
                        lang=(),
                        flags=0),
                    ),
                is_not=False,
                is_html=False),
            rel_type=None,
            contains=(),
            lang=(),
            flags=0),
        ),
    is_not=False,
    is_html=False)
```

    )annotationsN)Anyz(?i)[a-z_][_a-z\d.]+\(z(?i)[_a-z][_a-z\d]+=z\(\)|\[\]|\{\}z\[z\{z\(z\]z\}z\)z\d+z(?i)[_a-z][_a-z\d.]+z"(?:\\.|[^"\\])*"z'(?:\\.|[^'\\])*'z	\s*(,)\s*z	\s*(:)\s*z
\s*(\|)\s*classparamemptylstrtdstrttstrtlenddendtendsqstrsepdseppsepintkworddqstrobjr   returnstrc                   t          |           }d}t          |          dz
  }d}g }||k    rd}t                                          D ]f\  }}|                    ||          }|rG|}	|                    d          }|	dv r6|dz  }|                    |                    d           dd|z              n|	dv r)|                    |                    d                     n|	d	v r.|dz  }|                    |                    d                     n|	d
v r1|                    |                    d           dd|z              n`|	dv r,|                    |                    d           d           n0|	dv r,|                    d|                    d           d            nh| |                    ||                    |dz  }||k    d                    |          S )z%Make the object output string pretty.r      N)r   r   r	   r
      
 )r   r   r   r   r   r   )r   r   r   )r   )r   r    )	r   lenTOKENSitemsmatchendappendgroupjoin)
r   selindexr"   indentoutputmkvnames
             J/var/www/cyber-strat/venv/lib/python3.11/site-packages/soupsieve/pretty.pyprettyr/   n   s    c((CE
c((Q,CFF
3,,LLNN 	 	DAqU##A a???aKFMMQWWQZZ"A"A3<"A"ABBBBQQQMM!''!**----555aKFMM!''!**----X%%MMQWWQZZ"A"A3<"A"ABBBBY&&MMQWWQZZ"2"2"23333f%%MM"3aggajj"3"3"3444#( 9MM#e*%%%QJE7 3,,: 776??    )r   r   r   r   )__doc__
__future__r   retypingr   compileRE_CLASSRE_PARAMRE_EMPTYRE_LSTRTRE_DSTRTRE_TSTRTRE_LENDRE_DENDRE_TENDRE_INTRE_KWORDRE_DQSTRRE_SQSTRRE_SEPRE_DSEPRE_PSEPr   r/    r0   r.   <module>rG      s8  C CH # " " " " " 				      2:/002:-..2:'((2:e2:e2:e
"*U


"*U


"*U

	F		2:-..2:*++2:*++	L	!	!
"*\
"
"
"*]
#
#
X
X
 X
 X	

 X
 X
 G
 G
 G
 X
 
6
 G
 G
 
6
 X
  X!
(& & & & & &r0   