
    &g                        % S SK r S SKrS SKrS SKrS SKrS SKrS SKJr  S SKJrJrJ	r	J
r
Jr  S SKJrJrJr  S SKJr  S SKJr  S SKJr  S SKJrJrJrJrJrJrJrJrJrJrJrJ r   S S	K!J"r"   S SK#r$\%" \$S
5      r&SSK(J)r)  SSK*J+r+  SSK,J-r-  SSK.J/r/  SSK0J1r1  SSK2J3r3  SSK4J5r5J6r6  SSK7J8r8  SSK9J:r:  \(       a  SSK;J<r<J=r=J>r>J?r?J@r@JArA  S\S\B4S jrCS\S\S   4S jrDS\ES\B4S jrF\R                  " S/ 5      rHS\ES\B4S jrI        SoS\S \S!   S"S#S$\BS%\BS&\\J   S'\\J   S(\\J   S)\BS\ \KS4   4S* jjrLS\ES+\ \M\\MS,4   4   S\B4S- jrN        SoS \S!   S"S#S$\BS%\BS&\\J   S'\\J   S(\\J   S)\BSS4S. jjrO " S/ S0\55      rPS1\\\4   S\\K\K\K4   4S2 jrQS1S3S\\K\K\K4   4S4 jrR\R                  S5 \\R\
\Q\S6 \S7 \TS8 \S9 \US: \VS; \	S< \WS= \XS> \S? 0rY\\M\\/\\K\K\K4   4   4   \ZS@'   \X" \YR                  5       5      r\\T\R                  \\4r]S\S\B4SA jr^\ " SB SC5      5       r_\ " SD SE5      5       r`S\S\B4SF jra   SpS1\S&\\J   S'\\J   S(\\J   S\_4
SG jjrbSHSISSSSSJ.S1\SK\JSL\JS&\\J   S'\\J   S(\\J   S)\BS\K4SM jjrcSSNSSSSSO.S1\S \S!   S%\BS&\\J   S'\\J   S(\\J   S)\BSS4SP jjrd\eSQ:X  a   " SR SS5      rfS STKJgrg   " SU SV\g5      rh\
" \J5      riSW\iSX'   SSYSZS[S\1 S]k/\U" 1 S^k5      \
" \VS_/ S`Q05      \" / SaQ5      Sb\h" ScSdSeSfSgSh/5      \f" 5       Si.rj\jSX   R                  \j5        S SjKlJmrm  \m" \P" \jSNSkSl95         " Sm Sn5      rn\m" \P" \n" 5       5      5        gg! \' a    Sr& GNf = f)q    N)array)CounterUserDictUserListdefaultdictdeque)	dataclassfieldsis_dataclass)isclass)islice)MappingProxyType)TYPE_CHECKINGAnyCallableDefaultDictDictIterableListOptionalSequenceSetTupleUnion)RichReprResultibF   get_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultobjreturnc                 Z    [         =(       a    [        R                  " [        U 5      5      $ )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper0   s    P/home/matz/Project1/venv/lib/python3.13/site-packages/pip/_vendor/rich/pretty.py_is_attr_objectr9   :   s    5,**4955    z_attr_module.Attribute[Any]c                 Z    [         (       a  [        R                  " [        U 5      5      $ / $ )zGet fields for an attrs object.)r3   r4   r
   r6   r7   s    r8   _get_attr_fieldsr<   ?   s     -7Z<tCy)?R?r:   c                      U R                   R                  R                  [        R                  :H  $ ! [
         a     gf = f)zCheck if an instance of a dataclass contains the default repr.

Args:
    obj (object): A dataclass instance.

Returns:
    bool: True if the default repr is used, False if there is a custom repr.
F)__repr____code__co_filenamedataclasses__file__	Exceptionr7   s    r8   _is_dataclass_reprrD   D   s:    ||$$00K4H4HHH s   03 
A A _dummy_namedtuplec                     Sn [         R                  " U R                  5      n[         R                  " [
        R                  5      nX:H  $ ! [        [        4 a     N:f = f)zCheck if an instance of namedtuple contains the default repr

Args:
    obj (object): A namedtuple

Returns:
    bool: True if the default repr is used, False if there's a custom repr.
N)inspectgetfiler>   OSError	TypeErrorrE   )r0   obj_filedefault_repr_files      r8   _has_default_namedtuple_reprrM   X   s\     H??3<<0
  (9(B(BC(( Y  	s    A AAvalueconsoler*   overflowr.   cropindent_guides
max_length
max_string	max_depth
expand_allc	                    SSK Jn	  [        U [        5      (       d  U c  g U=(       d
    [	        5       nUR                  5        n
[        X	5      (       a  UR                  5         UR                  [        U [        5      (       a  U O[        U UUUUUUSS9USSS9  S S S 5        W
R                  5       R                  S5      $ ! , (       d  f       N-= f)	Nr   )ConsoleRenderable   )rP   rR   rS   rT   rU   rV   marginT )rQ   new_line_startend
)rO   rX   _safe_isinstancer'   r   capturelineprintr"   Prettygetrstrip)rN   rO   rP   rQ   rR   rS   rT   rU   rV   rX   r`   s              r8   _ipy_display_hookrf   l   s     + 011U]&G		gE55LLN~66 !+%%#%	  	 	
	 
. ;;=%%/ 
	s   AC
Cclass_or_tuple.c                 :     [        X5      $ ! [         a     gf = f)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerC   )r0   rg   s     r8   r_   r_      s$    #.. s   
 
c           	      8  ^ ^^^^^^^^ SSK Jm  T =(       d    T" 5       m T c   eS[        SS4U UUUUUUU4S jjn [        5       n	SSKJn
   " UUUUUUU4S jS	U
5      nU" 5       nXR                  R                  S
'   g! [         a    U[        l
         gf = f)a  Install automatic pretty printing in the Python REPL.

Args:
    console (Console, optional): Console instance or ``None`` to use global console. Defaults to None.
    overflow (Optional[OverflowMethod], optional): Overflow method. Defaults to "ignore".
    crop (Optional[bool], optional): Enable cropping of long lines. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100.
r   r   NrN   r1   c                    > U bP  Tc   eS[         l        TR                  [        U [        5      (       a  U O[        U TTTTTTS9TS9  U [         l        gg)z?Replacement sys.displayhook which prettifies objects with Rich.N)rP   rR   rS   rT   rU   rV   )rQ   )builtins_rb   r_   r"   rc   )	rN   rO   rQ   rV   rR   rU   rS   rT   rP   s	    r8   display_hookinstall.<locals>.display_hook   so    &&&HJMM#E>:: %"/))')    HJ# r:   )BaseFormatterc                   J   > \ rS rSr% Sr\\S'   S\S\4U UUUUUU4S jjrSr	g)	zinstall.<locals>.RichFormatter   TpprintrN   r1   c                 f   > U R                   (       a  [        UT" 5       TTTTTTS9$ [        U5      $ )N)rO   rP   rR   rS   rT   rU   rV   )rs   rf   repr)	selfrN   rV   r   rR   rU   rS   rT   rP   s	     r8   __call__'install.<locals>.RichFormatter.__call__   s=    ;;, +!)&3#-#-"+#-	 	  ;&r:    N)
__name__
__module____qualname____firstlineno__rs   bool__annotations__r   rw   __static_attributes__)rV   r   rR   rU   rS   rT   rP   s   r8   RichFormatterinstall.<locals>.RichFormatter   s*    FD'c 'c ' ' 'r:   r   z
text/plain)pip._vendor.richr   r   get_ipythonIPython.core.formattersrp   display_formatter
formatters	NameErrorsysdisplayhook)rO   rP   rQ   rR   rS   rT   rU   rV   rn   iprp   r   rich_formatterr   s   ````````     @r8   installr      s    0 -&GC D  *G] 	:	' 	'M 	'& '8F''53  '&'s   
B BBc                       \ rS rSrSr SSSSSSSSSSSSS.S\S	\S
   S\S\S   S\S   S\\   S\S\\   S\\   S\\   S\S\S\SS4S jjjr	      SS jr
      SS jrSrg) rc      a+  A rich renderable that pretty prints an object.

Args:
    _object (Any): An object to pretty print.
    highlighter (HighlighterType, optional): Highlighter object to apply to result, or None for ReprHighlighter. Defaults to None.
    indent_size (int, optional): Number of spaces in indent. Defaults to 4.
    justify (JustifyMethod, optional): Justify method, or None for default. Defaults to None.
    overflow (OverflowMethod, optional): Overflow method, or None for default. Defaults to None.
    no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to False.
    indent_guides (bool, optional): Enable indentation guides. Defaults to False.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structures, or None for no maximum. Defaults to None.
    expand_all (bool, optional): Expand all containers. Defaults to False.
    margin (int, optional): Subtrace a margin from width to force containers to expand earlier. Defaults to 0.
    insert_line (bool, optional): Insert a new line if the output has multiple new lines. Defaults to False.
N   Fr   )indent_sizejustifyrP   no_wraprR   rS   rT   rU   rV   rZ   insert_line_objecthighlighterr,   r   r   r-   rP   r.   r   rR   rS   rT   rU   rV   rZ   r   r1   c                    Xl         U=(       d
    [        5       U l        X0l        X@l        XPl        X`l        Xpl        Xl        Xl	        Xl
        Xl        Xl        Xl        g N)r   r%   r   r   r   rP   r   rR   rS   rT   rU   rV   rZ   r   )rv   r   r   r   r   rP   r   rR   rS   rT   rU   rV   rZ   r   s                 r8   __init__Pretty.__init__  sS    " &;/*;&294<*$$"$&r:   c           
   #     #    [        U R                  UR                  U R                  -
  U R                  U R
                  U R                  U R                  U R                  S9n[        R                  " UU R                  =(       d    UR                  U R                  =(       d    UR                  [        U R                  UR                  5      SS9nU(       a  U R                  U5      O[        [!        U R                  5       S3SS9nU R"                  (       a+  UR$                  (       d  UR'                  U R                  SS9nU R(                  (       a
  SU;   a  S	v   Uv   g 7f)
N	max_widthr   rS   rT   rU   rV   pretty)r   rP   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indentr^   r[   )pretty_reprr   r   rZ   r   rS   rT   rU   rV   r)   	from_ansir   rP   r!   r   r   r6   rR   
ascii_onlywith_indent_guidesr   )rv   rO   options
pretty_strpretty_texts        r8   __rich_console__Pretty.__rich_console__'  s#     !LL''$++5((nn

 nnLL3GOO]]6g&6&6dllGOO<
  [)%&&EF" 	 g&8&8%88   9 K  3Hs   E'E)c           
         [        U R                  UR                  U R                  U R                  U R
                  U R                  U R                  S9nU(       a   [        S UR                  5        5       5      OSn[        XD5      $ )Nr   c              3   8   #    U  H  n[        U5      v   M     g 7fr   r#   .0ra   s     r8   	<genexpr>*Pretty.__rich_measure__.<locals>.<genexpr>W  s     C+B4+B   r   )r   r   r   r   rS   rT   rU   rV   max
splitlinesr(   )rv   rO   r   r   
text_widths        r8   __rich_measure__Pretty.__rich_measure__J  su     !LL''((nn

 HRCC:+@+@+BCCWX 	 :22r:   )r   rV   r   rR   r   r   r   rZ   rU   rS   rT   r   rP   r   )rO   r*   r   r+   r1   r/   )rO   r*   r   r+   r1   r(   )rz   r{   r|   r}   __doc__r   r   intr~   r   r   r   r   ry   r:   r8   rc   rc      s   , 48'
 -1/3"'#$($(#' !'' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!'>! !+;!	!F3 3+;3	3r:   rc   r   c                 H    SU R                   < S3SSU R                   < S34$ )Nzdefaultdict(z, {})z, {}))default_factoryr   s    r8   _get_braces_for_defaultdictr   \  s5    
w..16
w..19 r:   z
array[Any]c                 H    SU R                   < S3SSU R                   < S34$ )Nzarray(z, [])))typecoder   s    r8   _get_braces_for_arrayr   d  s0    W%%(,dfW=M=M<PPQ4RSSr:   c                     g)N)z	environ({r   zenviron({})ry   r   s    r8   <lambda>r   i  s    !Cr:   c                     g)N)z	Counter({r   z	Counter()ry   r   s    r8   r   r   l  s    =r:   c                     g)N)zdeque([r   zdeque()ry   r   s    r8   r   r   m  s    7r:   c                     gN){}z{}ry   r   s    r8   r   r   n      *r:   c                     gr   ry   r   s    r8   r   r   o      .r:   c                     g)N)zfrozenset({r   zfrozenset()ry   r   s    r8   r   r   p  s    Cr:   c                     gN)[]z[]ry   r   s    r8   r   r   q  r   r:   c                     gr   ry   r   s    r8   r   r   r  r   r:   c                     g)N)r   r   zset()ry   r   s    r8   r   r   s  s    ,r:   c                     g)N)(r   ()ry   r   s    r8   r   r   t  s    +r:   c                     g)N)zmappingproxy({r   zmappingproxy({})ry   r   s    r8   r   r   u  s    &Rr:   _BRACESc                     [        U [        5      =(       d0    [        U 5      =(       d    [        U S5      =(       d    [	        U 5      =(       a    [        U 5      (       + $ )z3Check if an object may be expanded by pretty print.__rich_repr__)r_   _CONTAINERSr   hasattrr9   r   r7   s    r8   is_expandabler   {  sO     	k* 	 	 C)	  3	
 cl
r:   c            	          \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   Sr
\\S'   Sr\\S'   S	r\\S
'   S	r\\S'   S	r\\S'   Sr\\S       \S'   Sr\\S'   Sr\\S'   S\\   4S jrS\S\S\4S jrS\4S jr SS\S\S\S\4S jjrSrg)Nodei  z4A node in a repr tree. May be atomic or a container.r[   key_repr
value_repr
open_braceclose_braceemptyFlastis_tupleis_namedtupleNchildrenz: key_separatorz, 	separatorr1   c              #     #    U R                   (       a  U R                   v   U R                  v   U R                  (       a  U R                  v   gU R                  b  U R                  (       a  U R                  v   U R
                  (       aT  U R                  (       dC  [        U R                  5      S:X  a*  U R                  S   R                  5        Sh  vN   Sv   OLU R                   H<  nUR                  5        Sh  vN   UR                  (       a  M.  U R                  v   M>     U R                  v   gU R                  v   gg Nt NJ7f)zGenerate tokens for this node.Nr   r   ,)r   r   r   r   r   r   r   leniter_tokensr   r   r   r   )rv   childs     r8   r   Node.iter_tokens  s     ==--$$$??//!]]&}}oo%==););DMM@RVW@W#}}Q/;;===I!%#(#4#4#666$zzz"&..0 "/ &&&jj  ' > 7s*   CEE+EEE2EEstart_lengthrS   c                 `    UnU R                  5        H  nU[        U5      -  nX2:  d  M    g   g)zCheck the length fits within a limit.

Args:
    start_length (int): Starting length of the line (indent, prefix, suffix).
    max_length (int): Maximum length.

Returns:
    bool: True if the node can be rendered within max length, otherwise False.
FT)r   r$   )rv   r   rS   total_lengthtokens        r8   check_lengthNode.check_length  s8     $%%'EHUO+L( ( r:   c                 D    SR                  U R                  5       5      nU$ Nr[   )joinr   )rv   	repr_texts     r8   __str__Node.__str__  s    GGD,,./	r:   r   r   rV   c                 L   [        U SS9/nSnU[        U5      :  ao  XE   nUR                  (       aD  UR                  (       d3  U(       d  UR	                  U5      (       d  UR                  U5      XEUS-   & US-  nU[        U5      :  a  Mo  SR                  S U 5       5      nU$ )a4  Render the node to a pretty repr.

Args:
    max_width (int, optional): Maximum width of the repr. Defaults to 80.
    indent_size (int, optional): Size of indents. Defaults to 4.
    expand_all (bool, optional): Expand all levels. Defaults to False.

Returns:
    str: A repr string of the original object.
T)nodeis_rootr   r   r^   c              3   8   #    U  H  n[        U5      v   M     g 7fr   )strr   s     r8   r   Node.render.<locals>.<genexpr>  s     954SYY5r   )_Liner   
expandableexpandedr   expandr   )rv   r   r   rV   linesline_nora   repr_strs           r8   renderNode.render  s     D$/0E
">Dt}}T%6%6y%A%A37;;{3KEGaK0qLG E
" 999599r:   ry   )P   r   F)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   ry   r:   r8   r   r     s    >HcJJKE3OD$HdM4'+HhtF|$+M3Is!Xc] !, # $ " 
 MR03EI	 r:   r   c                       \ rS rSr% SrSr\S    \S'   Sr\	\S'   Sr
\\   \S'   Sr\\S	'   Sr\\S
'   Sr\\S'   Sr\	\S'   Sr\	\S'   \S\	4S j5       rS\S\	4S jrS\S\S    4S jrS\4S jrSrg)r  i  zA line in repr output.NparentFr   r   r[   textsuffix
whitespacer  r   r1   c                 j    [        U R                  SL=(       a    U R                  R                  5      $ )z"Check if the line may be expanded.N)r~   r   r   rv   s    r8   r  _Line.expandable  s'     DIIT)@dii.@.@AAr:   rS   c                     [        U R                  5      [        U R                  5      -   [        U R                  5      -   nU R
                  c   eU R
                  R                  X!5      $ )z4Check this line fits within a given number of cells.)r   r  r$   r  r  r   r   )rv   rS   r   s      r8   r   _Line.check_length  sX      8DII#66$++9NN 	 yy$$$yy%%l??r:   r   c           	   #     #    U R                   nUc   eU R                  nUR                  (       d   eUR                  (       a1  [	        UR                   UR
                   UR                   3US9v nO[	        UR                  US9v nU R                  SU-  -   nUR                  =(       a    [        UR                  5      S:H  n[        UR                  5       H9  u  pxU(       a  SOUR                  n	[	        UUUU	U=(       a    U(       + S9n
U
v   M;     [	        UR                  UU R                  U R                  S9v   g7f)z6Expand this line by adding children on their own line.N)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   )rv   r   r   r  new_linechild_whitespacetuple_of_oner   r   r   ra   s              r8   r  _Line.expand  s     yy__
}}}=="t'9'9&:4??:KL% H
 #JOOH??S;->>}}@T]]);q)@$T]]3KD+I+ .,.D J 4 !!!;;	
 	
s   EEc                    U R                   (       a/  U R                   U R                   U R                  =(       d    S 3$ U R                   U R                   U R                  =(       d    S U R                  R                  5        3$ r   )r   r  r  r   r  re   r  s    r8   r   _Line.__str__  si    99oo&tyyk$))/r1BCC ??#DII;tyyB.?@R@R@T?UVr:   ry   )rz   r{   r|   r}   r   r  r   r   r   r~   r   r   r  r   r  r  r  r   propertyr  r   r   r   r  r   r   ry   r:   r8   r  r    s      $FHW$GTD(4.D#NFCJHdD$BD B B@s @t @
# 
(7*; 
B r:   r  c                      [        U SS5      n[        U [        5      =(       a    [        U[        5      $ ! [         a     gf = f)a<  Checks if an object is most likely a namedtuple. It is possible
to craft an object that passes this check and isn't a namedtuple, but
there is only a minuscule chance of this happening unintentionally.

Args:
    obj (Any): The object to test

Returns:
    bool: True if the object is a namedtuple. False otherwise.
_fieldsNF)getattrrC   ri   tuple)r0   r
   s     r8   _is_namedtupler#    sD    i. c5!?j&??  s   6 
AAc           	         ^^^^^^^^	 S[         S[        4U4S jjm[        5       m	T	R                  mT	R                  mS	S[         S[
        S[        S[        4UUUUUUU	4S jjjmT" U SS9nU$ )
a4  Traverse object and generate a tree.

Args:
    _object (Any): Object to be traversed.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of data structures, or None for no maximum.
        Defaults to None.

Returns:
    Node: The root of a tree structure which can be used to render a pretty repr.
r0   r1   c                    > TbE  [        U [        [        45      (       a*  [        U 5      T:  a  [        U 5      T-
  nU ST < SU 3nU$  [	        U 5      nU$ ! [
         a  nS[        U5      < S3n SnAU$ SnAff = f)z0Get repr string for an object, but catch errors.N+z<repr-error >)r_   bytesr   r   ru   rC   )r0   	truncatedobj_reprerrorrT   s       r8   to_reprtraverse.<locals>.to_reprF  s     " ucl33C:%C:-Ikz*-Qyk:H 	:9   :)#e*q9:s   A 
A="A88A=rootdepthc           	        >^ ^" [        T 5      nUT);   a	  [        SS9$ [        T 5      nT$SL=(       a    UT$:  nS[        S[        [
        [        [        [        [        4   4      4S jn [        T S5      nSnU(       d2   [        T S	5      (       a   [        T 5      (       d  T R                  5       nUGbC  T'" U5        [        T R                  S
S5      n	[        U" U5      5      n
T R                  R                  nU
(       a  / nUR                   nU(       a"  U	(       a  [        SU S3S9nO[        U S3S9nOU	(       a  [        SU S3SUUSS9nO[        U S3SUUS9n[#        U
5       Hb  u  nn[%        U[&        5      (       a.  Uu  nnT#" UUS-   S9nUUl        UUl        SUl        U" U5        MI  T#" UUS-   S9nUUl        U" U5        Md     O[        U	(       a  SU S3OU S3/ US9nT&" U5        GO<[/        T 5      (       GaJ  U(       GdB  T'" U5        / nUR                   n[1        T 5      m"T"(       a  U(       a!  [        T R                  R                   S3S9nO[        T R                  R                   S3SUUS9nS[        [        [        [        [2        [4        [        /[        4      4      4U"U 4S jjn[#        U" 5       5       HQ  u  nu  nnnU(       a  [        [        U" U5      5      S9nO
T#" UUS-   S9nUUl        UUl        SUl        U" U5        MS     O"[        T R                  R                   S3/ US9nT&" U5        GO[7        T 5      (       Ga  [%        T [        5      (       Gd  U(       d  [9        T 5      (       a  T'" U5        / nUR                   nU(       a!  [        T R                  R                   S3S9nO[        T R                  R                   S3SUUT R                  R                   S3S9n[#        S [;        T 5       5       5       HK  u  nnT#" [        T UR<                  5      US-   S9nUR<                  Ul        UUl        SUl        U" U5        MM     T&" U5        GO[?        T 5      (       a  [A        T 5      (       a  T'" U5        T R                  R                  nU(       a  [        U S3S9nO{/ nUR                   n[        U S3SUU S3S9n[#        T RC                  5       RE                  5       5       H0  u  nu  nnT#" UUS-   S9nUUl        UUl        SUl        U" U5        M2     T&" U5        GO[%        T [F        5      (       Ga  [F         H  n[%        T U5      (       d  M  Un  O   T'" U5        [H        U   " T 5      u  nnnU(       a  [        U SU 3S9nGO\URJ                  [        T 5      RJ                  :w  a  [        T(" T 5      US9nGO'T (       Ga  / n[        UUUUS9nUR                   n[M        T 5      nUS-
  n[%        T [N        5      (       aj  [Q        T RE                  5       5      nT%b  [S        UT%5      n[U        U5       H2  u  n u  nnT#" UUS-   S9nT(" U5      Ul        U U:H  Ul        U" U5        M4     OK[Q        T 5      n!T%b  [S        U!T%5      n![U        U!5       H"  u  n nT#" UUS-   S9nU U:H  Ul        U" U5        M$     T%b  UT%:  a  U" [        SUT%-
   3SS95        O[        U/ US 9nT&" U5        O[        T(" T 5      US9n[%        T [&        5      Ul+        [?        T 5      Ul,        U$ ! [         a    Sn GNf = f! [         a     GNf = f)!zWalk the object depth first.z...)r   N	rich_argsr1   c              3      #    U  Hr  n[        U[        5      (       aV  [        U5      S:X  a  Uu  p#nXC:X  a  M3  X#4v   M:  [        U5      S:X  a  Uu  p#X#4v   MT  [        U5      S:X  a	  US   v   Ml  Mn  Uv   Mt     g 7f)N      r   r   )r_   r"  r   )r1  argkeyr   defaults        r8   iter_rich_args3traverse.<locals>._traverse.<locals>.iter_rich_argsf  s|      #C//3x1}.1+G"+$!j(SQ%(
!j(SQ!!f ' I !s   A:A<,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angular<z...>z(...)r  r'  )r   r   r   r   r   r   r   )r   r   r   r   r   )r/  =r   )r   r   r   c               3   4  >#    T Hd  n U R                   (       d  M   [        TU R                  5      nU R                  U[        U R                   5      (       a  U R                   OS4v   Mf     g! [         a  nU R                  US4v    SnAM  SnAff = f7f)z$Iterate over attr fields and values.N)ru   r!  namecallablerC   )attrrN   r+  attr_fieldsr0   s      r8   
iter_attrs/traverse.<locals>._traverse.<locals>.iter_attrs  s      %0D#yyy
!&,3C,CE )-		(-5=dii5H5H		d+& %& %0 (1 !C+/99eT*B$B$B!Cs-   BA/<B/
B9B
BBB)r   r   r   r   r   c              3   J   #    U  H  oR                   (       d  M  Uv   M     g 7fr   )ru   )r   fields     r8   r   .traverse.<locals>._traverse.<locals>.<genexpr>  s      -'2ejjEE{s   #	#)r   r   r   r   )r   r   z... +T)r   r   r   )-idr   r6   r   r   r   r   r   r   rC   r   r   r!  list	__class__rz   appendr    r_   r"  r   r   r   r9   r<   r   r   r   rD   r
   r?  r#  rM   _asdictitemsr   r   r>   r   _MAPPING_CONTAINERSiterr   	enumerater   r   )*r0   r.  r/  obj_idobj_typereached_max_depthr8  fake_attributesrich_repr_resultr;  args
class_namer   rK  r   r   r5  r6  r   
child_noderC  r?  rN   repr_callablerF  container_typer   r   r   	num_itemslast_item_index
iter_itemsindexiter_valuesrB  	_traverserU   rS   pop_visitedpush_visitedr,  visited_idss*   `                                 @r8   r`  traverse.<locals>._traverseZ  su    C[ 5))9%T1Hey6H	c 	huS%S/=Q7R.S 	 	$%CO 6:300'*'8'8':$ ' c//EBG'789D//J!$#:,d/CD#*U/CD#)*:,a'8(+%-!%&)   $*4Q'7(+%-!%	  &/t_	c+C77),JC)25	)JJ.2JO25J/7:J4":.)23eai)HJ.2JO":. &5 4;:,a0J<rAR
 S!!/ H__F*3/K$cmm.D.D-EU+KLD&)mm&<&<%=Q#?$'!)!	D& sC(C5#::N1O'O!PQ& &$ ?H
>U::tUM()-]5=Q9R)SJ)25	)JJ*.
.2
+36
0z* ?V "%--"8"8!9<rPT $S$//#"3'' H__F #--*@*@)A'GH"%--"8"8!9; #% ]]334B7 $- -'-c{- $KD% "+73

+C5ST9!UJ*/**J'&*JO/2J,:&$ C  %A#%F%F //J ",U3 !",Q/ #%'L+	 +4CKKM4G4G4I*J&D,3!*5	!BJ*-J'&*JO/2J,:& +K c;//"-#C88-H #.
  -4X->s-C*JU *S'FG""d3i&8&88ws|$?) +%	 "H	"+a-#C)<==!%ciik!2J!-%+J
%C
/8/D+|U%.uEAI%F
.5cl
+*/?*B
z*	 0E #'s)K!-&,[*&E(1+(>u%.uEAI%F
*/?*B
z* )? )i*.D4U9z3I2J+KRVWX%"4@73<d;D(e4+C0s  	$#O	$  s$   ,] 1]0 ]-,]-0
]>=]>T)r.  )Fr   )r   r   setaddremover~   r   r   )
r   rS   rT   rU   r   r`  ra  rb  r,  rc  s
    ``` @@@@@r8   traverserh  1  ss    *S S    EK??L$$Kys y$ ys y4 y yv W4(DKr:   r  r   r   r   r   c                j    [        U [        5      (       a  U nO
[        XXES9nUR                  XUS9nU$ )aO  Prettify repr string by expanding on to new lines to fit within a given width.

Args:
    _object (Any): Object to repr.
    max_width (int, optional): Desired maximum width of repr string. Defaults to 80.
    indent_size (int, optional): Number of spaces to indent. Defaults to 4.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of string before truncating, or None to disable truncating.
        Defaults to None.
    max_depth (int, optional): Maximum depth of nested data structure, or None for no depth.
        Defaults to None.
    expand_all (bool, optional): Expand all containers regardless of available width. Defaults to False.

Returns:
    str: A possibly multi-line representation of the object.
)rS   rT   rU   )r   r   rV   )r_   r   rh  r	  )	r   r   r   rS   rT   rU   rV   r   r  s	            r8   r   r   Y  sF    8 &&z
 KK   H Or:   T)rO   rR   rS   rT   rU   rV   c                \    Uc
  [        5       OUnUR                  [        U UUUUUSS9SS9  g)a  A convenience function for pretty printing.

Args:
    _object (Any): Object to pretty print.
    console (Console, optional): Console instance, or None to use default. Defaults to None.
    max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
        Defaults to None.
    max_string (int, optional): Maximum length of strings before truncating, or None to disable. Defaults to None.
    max_depth (int, optional): Maximum depth for nested data structures, or None for unlimited depth. Defaults to None.
    indent_guides (bool, optional): Enable indentation guides. Defaults to True.
    expand_all (bool, optional): Expand all containers. Defaults to False.
Nignore)rS   rT   rU   rR   rV   rP   T)	soft_wrap)r   rb   rc   )r   rO   rR   rS   rT   rU   rV   _consoles           r8   rs   rs     sD    , !({}WHNN!!'!	
   r:   __main__c                   "    \ rS rSrS\4S jrSrg)
BrokenRepri  r1   c                     SS-    g)Nr   r   zthis will failry   r  s    r8   r>   BrokenRepr.__repr__  s    E#r:   ry   Nrz   r{   r|   r}   r   r>   r   ry   r:   r8   rp  rp    s    	$c 	$r:   rp  )
NamedTuplec                   N    \ rS rSr% \\S'   \\S'   \\S'   \\S'   \\   \S'   Srg)	StockKeepingUniti  r?  descriptionpricecategoryreviewsry   N)	rz   r{   r|   r}   r   r   floatr   r   ry   r:   r8   rv  rv    s!    	cr:   rv     foozHello World!gZd;Y@gʡE3t@g    cA>   r   r4  r3  r   r|           >   r   r4  r3  crumble)applerhubarbbuttersugarflour)r  orangepearkumquatr  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!)r}  barr   counteratomic
namedtupleBroken)rb      )rR   rT   c                   "    \ rS rSrS\4S jrSrg)Thingi  r1   c                     g)NzHello[38;5;239m World!ry   r  s    r8   r>   Thing.__repr__  s    /r:   ry   Nrs  ry   r:   r8   r  r    s    	0c 	0r:   r  )Nrk  FFNNNF)NNN)orl   collectionsrA   rG   osr   r   r   r   r   r   r   r	   r
   r   r   	itertoolsr   typesr   typingr   r   r   r   r   r   r   r   r   r   r   r   pip._vendor.rich.reprr   rA  r4   r   r3   ImportErrorr[   r   _loopr    _pickr!   abcr"   cellsr$   r   r%   jupyterr&   r'   measurer(   r  r)   rO   r*   r+   r,   r-   r.   r/   r~   r9   r<   objectrD   r  rE   rM   r   r   rf   r6   r_   r   rc   r   r   _Environdict	frozensetrI  re  r"  r   r   keysr   rN  r   r   r  r#  rh  r   rs   rz   rp  rt  rv  ddatarK  r   rb   r  ry   r:   r8   <module>r     s       	 
  G G 7 7   "    1t,J      ( 4    6 6 6
@# @(+H"I @
F t "  **+>C )f ) ), $(!) $ $#+&+&i +& +& 	+&
 +& +& +& }+& +& 39+&\	!&tU49-='=!>	 $(!) $ $#MGi MGMG MG 	MG
 MG MG }MG MG 
MG`e3\ e3PS#X)> 5cSVCW T< TE#sC-4H T
 KKC	 ,=	7
*.C
*.	,	+R>dHcUE#sC-$8899	:  GLLN#R[[*:HE s t  Q Q Qh @ @ @F@ @ @* !% $#	eee e }	e
 
eV	  $ $#%% % 	%
 % % }% % 	%V $( $ $#"" i " 	"
 " " }" " 
"J z$ $
 ":  	CAAeH &
 #"9NO
 	
 &&,%_-
 ,? DB 	Kt&	&Tb
9:0 0 
&/{ I  Js   -M% %M10M1