+
     h'  c                   st  a  Rj tn0 t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	H
t
HtHtHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHtHtHtHtHtHtH t H!t!H"t"H#t# ^ R	I$H%t%  ^ RI&t'](! ]'R
4      t)^RI+H,t, ^RI-H.t. ^RI/H0t0 ^RI1H2t2 ^RI3H4t4 ^RI5H6t6 ^RI7H8t8H9t9 ^RI:H;t; ^RI<H=t= ]'       d   ^RI>H?t?H@t@HAtAHBtBHCtCHDtD R R ltER R ltFR R ltG]P                  ! R. 4      tIR R ltJRkR R  lltKR! R" ltLRkR# R$ lltM ! R% R&]84      tNR' R( ltOR) R* ltPR+ R, ltQ]P                  R- ]]Q]]O]	R. ]]P]SR/ ]
R0 ]TR1 ]UR2 ]R3 ]VR4 ]WR5 ]R6 /tX] ^ k ]W! ]XP                  4       4      tZ]S]P                  ]]
3t[R7 R8 lt\] ! R9 R:4      4       t]] ! R; R<4      4       t^R= R> lt_RlR? R@ llt`RA^PRB^RCRRDRRERRFR/RG RH lltaRIRRJRKRCRRDRRERRFR/RL RM lltb]cRN8X  d    ! RO RP4      td^ RQIHete  ! RR RS]e4      tf]! ]g4      th^]hRT&   RT^RURVRWRX0 Rmm.RY]T! 0 Rnm4      RZ]! ]UR[. RoO/4      R\]	! . RpO4      R]RqR^]f! R_R`RaRbRcRd.4      Re]d! 4       /ti]iRT,          P                  ]i4       ^ RfIkHltl ]l! ]N! ]iRK^Rg7      4        ! Rh Ri4      tm]l! ]N! ]m! 4       4      4       R# R#   ]* d    Rt) EL1i ; i)r    N)array)CounterUserDictUserListdefaultdictdeque)	dataclassfieldsis_dataclass)isclass)islice)MappingProxyType)TYPE_CHECKINGAnyCallableDefaultDictDequeDictIterableListOptionalSequenceSetTupleUnion)RichReprResultZibFget_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultc                0    V ^8  d   QhR\         R\        /#    objreturnr   boolformat   "</usr/lib/python3.14/site-packages/pip/_vendor/rich/pretty.py__annotate__r8   <   s     6 6 6 6    c                s\    \         ;'       d     \        P                  ! \        V 4      4      # )z1Check if an object was created with attrs module.)
_has_attrs_attr_moduleZhastyper0      &r7   _is_attr_objectr?   <   s    55,**4955r9   c                s>    V ^8  d   QhR\         R\        R,          /# )r/   r0   r1   z_attr_module.Attribute[Any])r   r   r4   r6   r7   r8   r8   A   s$     @ @# @(+H"I @r9   c                s\    \         '       d    \        P                  ! \        V 4      4      # . # )zGet fields for an attrs object.)r:   r;   r   r<   r=   r>   r7   _get_attr_fieldsr@   A   s     -7Z<tCy)?R?r9   c                r-   r.   objectr3   r4   r6   r7   r8   r8   F   s      F t r9   c                s     V P                   P                  P                  \        P                  \
        P                  39   #   \         d     R# i ; i)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__Z__code__Zco_filenamedataclassesZ__file__reprlib	Exceptionr=   r>   r7   _is_dataclass_reprrG   F   sO    ||$$00  5
 
 	
  s   A A AA_dummy_namedtuplec                r-   r.   rA   r4   r6   r7   r8   r8   ]   s     ) )f ) )r9   c                s    Rp \         P                  ! V P                  4      p\         P                  ! \
        P                  4      pW8H  #   \        \        3 d     L;i ; i)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)inspectZgetfilerC   ZOSErrorZ	TypeErrorrH   )r0   Zobj_fileZdefault_repr_files   &  r7   _has_default_namedtuple_reprrJ   ]   s\     H??3<<0
  (9(B(BC(( Y  	s    A A A c                s    V ^8  d   QhR\         R\        R,          RRR\        R\        R\        \        ,          R	\        \        ,          R
\        \        ,          R\        R\        \
        R3,          /
# )r/   valueconsoler'   overflowr+   cropindent_guides
max_length
max_string	max_depth
expand_allr1   N)r   r   r3   intr   strr4   r6   r7   r8   r8   q   s     -& -&-&i -& -& 	-&
 -& -& -& }-& -& 39-&r9   c	                 s   ^RI Hp	 \        V \        4      '       g   V f   R# T;'       g    \	        4       pVP                  4       ;_uu_ 4       p
\        W	4      '       d   VP                  4        TP                  \        V \        4      '       d   T M\        V VVVVVV^R7      VRRR7       RRR4       X
P                  4       P                  R4      #   + '       g   i     L/; i)   )ConsoleRenderableN)rM   rO   rP   rQ   rR   rS   marginT )rN   Znew_line_startZend
)rL   rW   _safe_isinstancer$   r   capturelineprintr   PrettyZgetrstrip)rK   rL   rM   rN   rO   rP   rQ   rR   rS   rW   r\   s   &&&&&&&&&  r7   _ipy_display_hookra   q   s     + 011U]&&G			gE55LLN $E>:: %"/))')	 # 	 	
	 
2 ;;=%%3 
	s   A CC&	c                sx    V ^8  d   QhR\         R\        \        \        \        R3,          3,          R\        /# )r/   r0   class_or_tuple.r1   )rB   r   r<   r   r3   r4   r6   r7   r8   r8      s7      	!&tU49-='=!>	r9   c                s>     \        W4      #   \         d     R# i ; i)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerF   )r0   rb   s   &&r7   r[   r[      s$    #.. s   
 c                s    V ^8  d   QhR\         R,          RRR\        R\        R\         \        ,          R\         \        ,          R	\         \        ,          R
\        RR/	# )r/   rL   r'   rM   r+   rN   rO   rP   rQ   rR   rS   r1   N)r   r3   rT   r4   r6   r7   r8   r8      s     OG OGi OGOG OG 	OG
 OG OG }OG OG 
OGr9   c           	     s4  a aaaaaaaa ^ RI Ho S ;'       g    S! 4       o S f   Q hR V VVVVVVV3R llp \        4       p	^ RIHp
  ! VVVVVVV3R lRV
4      pV! 4       pWP
                  P                  R&   R#   \         d    T\        n	         R# i ; i)	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   Nc                s(    V ^8  d   QhR\         RR/# )r/   rK   r1   Nr   r4   r6   r7   r8   Zinstall.<locals>.__annotate__   s      C D r9   c                s   < V eZ   Sf   Q hR\         n        SP                  \        V \        4      '       d   T M\        V SSSSSSR7      SR7       V \         n        R# R# )z?Replacement sys.displayhook which prettifies objects with Rich.N)rM   rO   rP   rQ   rR   rS   )rN   )builtinsZ_r^   r[   r   r_   )	rK   rL   rN   rS   rO   rR   rP   rQ   rM   s	   &r7   display_hookZinstall.<locals>.display_hook   sq    &&&HJMM (~>> !)&3#-#-"+#-     HJ' r9   )BaseFormatterc                   sV   <a  ] tR t^t o RtV 3R lVVVVVVV3R lltV 3R ltRtV tR# )install.<locals>.RichFormatterTc                s&   < V ^8  d   QhRS[ RS[ /# )r/   rK   r1   rd   r5   __classdict__   "r7   r8   +install.<locals>.RichFormatter.__annotate__   s     ' 'c 'c 'r9   c                sn   < V P                   '       d   \        VS! 4       SSSSSSR 7      # \        V4      # ))rL   rM   rO   rP   rQ   rR   rS   )pprintra   repr)	selfrK   rS   r   rO   rR   rP   rQ   rM   s	   &&r7   __call__Z'install.<locals>.RichFormatter.__call__   s?    ;;;, +!)&3#-#-"+#-	 	  ;&r9   c                s&   < V ^8  d   Qh/ S[ ;R&   # )r/   rm   r3   ri   rk   r7   r8   rl      s      r9    N)	__name__
__module____qualname____firstlineno__rm   rp   __annotate_func____static_attributes____classdictcell__)rj   rS   r   rO   rR   rP   rQ   rM   s   @r7   RichFormatterrh      s      F' ' '  r9   rz   z
text/plain)
pip._vendor.richr   Zget_ipythonZIPython.core.formattersrg   Zdisplay_formatterZ
formattersZ	NameErrorsysZdisplayhook)rL   rM   rN   rO   rP   rQ   rR   rS   rf   Ziprg   rz   Zrich_formatterr   s   ffffffff     @r7   installr}      s    0 -&&G .G] 	:	' 	'M 	'& '8F''53  '&'s   
A= =BBc                   s   a  ] tR t^t o RtRR^RRRRRRRRR	RR
RRRRRR^ RR/V 3R lR llltV 3R lR ltV 3R lR ltRtV t	R# )r_   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indent_sizejustifyrM   no_wrapFrO   rP   rQ   rR   rS   rX   insert_linec                s   < V ^8  d   QhRS[ RS[R,          RS[RS[R,          RS[R,          R	S[S[,          R
S[RS[S[,          RS[S[,          RS[S[,          RS[RS[RS[RR/# )r/   _objecthighlighterr)   r~   r   r*   rM   r+   r   rO   rP   rQ   rR   rS   rX   r   r1   N)r   r   rT   r3   ri   rk   r7   r8   Pretty.__annotate__  s     ' '' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!'r9   c               s    Wn         T;'       g    \        4       V n        W0n        W@n        WPn        W`n        Wpn        Wn        Wn	        Wn
        Wn        Wn        Wn        R # N)r   r"   r   r~   r   rM   r   rO   rP   rQ   rR   rS   rX   r   )ro   r   r   r~   r   rM   r   rO   rP   rQ   rR   rS   rX   r   s   &&&$$$$$$$$$$$r7   __init__ZPretty.__init__  sV    " &;;/*;&294<*$$"$&r9   c                &   < V ^8  d   QhRRRRRR/# )r/   rL   r'   optionsr(   r1   r,   rr   ri   rk   r7   r8   r   0  s%     ! ! !+;!	!r9   c           
   #  s  "   \        V P                  VP                  V P                  ,
          V P                  V P
                  V P                  V P                  V P                  R 7      p\        P                  ! TV P                  ;'       g    VP                  V P                  ;'       g    VP                  \        V P                  VP                  4      RR7      pV'       d   V P                  V4      M"\        \!        V P                  4       R2RR7      pV P"                  '       d0   VP$                  '       g   VP'                  V P                  RR7      pV P(                  '       d   RV9   d   Rx  Vx  R	# 5i)
	max_widthr~   rP   rQ   rR   rS   Zpretty)r   rM   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indentrZ   rY   N)pretty_reprr   r   rX   r~   rP   rQ   rR   rS   r&   Z	from_ansir   rM   r   r   r   r<   rO   Z
ascii_onlyZwith_indent_guidesr   )ro   rL   r   
pretty_strZpretty_text   &&&  r7   __rich_console__ZPretty.__rich_console__0  s2     !LL''$++5((nn

 nnLL33GOO]]66g&6&6dllGOO<
  [)%&&EF" 	 g&8&8&8%88   9 K  3Hs   B,F/A?F/F.F0Fc                r   )r/   rL   r'   r   r(   r1   r%   rr   ri   rk   r7   r8   r   S  s%     3 3 3+;3	3r9   c           
     s   \        V P                  VP                  V P                  V P                  V P
                  V P                  V P                  R 7      pV'       d!   \        R VP                  4        4       4      M^ p\        WD4      # )r   c              3   8   "   T F  p\        V4      x  K  	  R # 5ir   r    .0r]      & r7   	<genexpr>Z*Pretty.__rich_measure__.<locals>.<genexpr>`  s     C+B4+B   )r   r   r   r~   rP   rQ   rR   rS   ZmaxZ
splitlinesr%   )ro   rL   r   r   Z
text_widthr   r7   __rich_measure__ZPretty.__rich_measure__S  su     !LL''((nn

 HRCC:+@+@+BCCWX 	 :22r9   )r   rS   r   rO   r~   r   r   rX   rR   rP   rQ   r   rM   r   )
rs   rt   ru   rv   __doc__r   r   r   rx   ry   rj      @r7   r_   r_      s     &'
 ' .2' 04' #(' $' %)' %)' $(' !' ' "' '>! !F3 3r9   r_   c                s~    V ^8  d   QhR\         \        \        3,          R\        \        \        \        3,          /# r/   r   r1   )r   r   r   rU   r4   r6   r7   r8   r8   e  s/      S#X)> 5cSVCW r9   c                 H    R V P                   : R2RR V P                   : R23# )zdefaultdict(z, {})z, {}))Zdefault_factoryr   r>   r7   _get_braces_for_defaultdictr   e  s5    
w..16
w..19 r9   c                sr    V ^8  d   QhR\         \        ,          R\        \        \        \        3,          /# r   )r   r   r   rU   r4   r6   r7   r8   r8   m  s)      5: %S#2F r9   c                 sd    V P                   f   R# RRV P                    R2RV P                    R23# )Ndeque([z
], maxlen=)zdeque(maxlen=)r   ])zdeque())Zmaxlenr   r>   r7   _get_braces_for_dequer   m  sA    ~~++
W^^$A&
'q) r9   c                sT    V ^8  d   QhRRR\         \        \        \        3,          /# )r/   r   z
array[Any]r1   )r   rU   r4   r6   r7   r8   r8   w  s)     T T< TE#sC-4H Tr9   c                 r   )zarray(z, [r   r   )Ztypecoder   r>   r7   _get_braces_for_arrayr   w  s0    W%%(,dfW=M=M<PPQ4RSSr9   c                     R# )	environ({)r   r   zenviron({})rr   r   r>   r7   <lambda>r   |  s    !Cr9   c                 r   )	Counter({)r   r   z	Counter()rr   r   r>   r7   r   r     s    =r9   c                 r   {)r   }z{}rr   r   r>   r7   r   r         *r9   c                 r   r   rr   r   r>   r7   r   r         .r9   c                 r   )frozenset({)r   r   zfrozenset()rr   r   r>   r7   r   r     s    Cr9   c                 r   [)r   Z]z[]rr   r   r>   r7   r   r     r   r9   c                 r   r   rr   r   r>   r7   r   r     r   r9   c                 r   )r   )r   r   zset()rr   r   r>   r7   r   r     s    ,r9   c                 r   )()r   r   ()rr   r   r>   r7   r   r     s    +r9   c                 r   )mappingproxy({)r   r   zmappingproxy({})rr   r   r>   r7   r   r     s    &Rr9   c                r-   r.   r2   r4   r6   r7   r8   r8     s      s t r9   c                s    \        V \        4      ;'       g;    \        V 4      ;'       g(    \        V R4      ;'       g    \	        V 4      ;'       d    \        V 4      '       * # )z3Check if an object may be expanded by pretty print.__rich_repr__)r[   _CONTAINERSr	   hasattrr?   r
   r=   r>   r7   is_expandabler     sc     	k* 	  	 	  	 C)	  	  3	 
 cl
r9   c                   s   a  ] tR tRt o RtRtRtRtRtRt	Rt
RtRtRtRtRtV 3R lR	 ltV 3R
 lR ltV 3R lR ltRV 3R lR lltV 3R ltRtV tR# )Nodei  z4A node in a repr tree. May be atomic or a container.rY   FNz: z, c                s0   < V ^8  d   QhRS[ S[,          /# r/   r1   )r   rU   ri   rk   r7   r8   Node.__annotate__  s     ! !Xc] !r9   c              #  s  "   V P                   '       d   V P                   x  V P                  x  V P                  '       d   V P                  x  R# V P                  e   V P                  '       d   V P                  x  V P
                  '       d[   V P                  '       gI   \        V P                  4      ^8X  d/   V P                  ^ ,          P                  4        Rj  xL
  Rx  MMV P                   F=  pVP                  4        Rj  xL
  VP                  '       d   K/  V P                  x  K?  	  V P                  x  R# V P                  x  R# R#  Lx LN5i)zGenerate tokens for this node.N,)key_reprkey_separator
value_reprchildren
open_braceis_tupleis_namedtupleleniter_tokenslast	separatorclose_braceempty)ro   childr   r7   r   ZNode.iter_tokens  s     ===--$$$???//!]]&}}}oo%===);););DMM@RVW@W#}}Q/;;===I!%#(#4#4#666$zzz"&..0 "/ &&&jj  ' > 7sB   A E /E 3E E %>E #E$+E EE (5E E c                s,   < V ^8  d   QhRS[ RS[ RS[/# )r/   start_lengthrP   r1   rT   r3   ri   rk   r7   r8   r     s"       # $ r9   c                sn    TpV P                  4        F  pV\        V4      ,          pW28  g   K   R# 	  R# )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!   )ro   r   rP   Ztotal_lengthZtokenr   r7   check_lengthZNode.check_length  s8     $%%'EHUO+L( ( r9   c                    < V ^8  d   QhRS[ /# r   rU   ri   rk   r7   r8   r     s       r9   c                sD    R P                  V P                  4       4      pV# rY   )joinr   )ro   Z	repr_textr   r7   __str__ZNode.__str__  s    GGD,,./	r9   c                s2   < V ^8  d   QhRS[ RS[ RS[RS[/# )r/   r   r~   rS   r1   )rT   r3   rU   ri   rk   r7   r8   r     s-      03EI	r9   c                sV   \        V RR7      .p^ pV\        V4      8  dq   WE,          pVP                  '       dL   VP                  '       g:   V'       g   VP	                  V4      '       g   VP                  V4      WEV^,           % V^,          pK  RP                  R V 4       4      pV# )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_rootrZ   c              3   r   r   r   r   r   r7   r   ZNode.render.<locals>.<genexpr>  s     954SYY5r   )_Liner   
expandableexpandedr   expandr   )ro   r   r~   rS   ZlinesZline_nor]   repr_strs   &&&&    r7   renderZNode.render  s     D$/0E
">Dt}}}T%6%6y%A%A37;;{3KEGaK0qLG999599r9   c                s   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[ ;R&   S[;R&   S[;R&   S[;R&   S[S[R	,          ,          ;R
&   S[ ;R&   S[ ;R&   # )r/   r   r   r   r   r   r   r   r   r   r   r   r   )rU   r3   r   r   ri   rk   r7   r8   r     s      	 
       O        tF|$+     r9   rr   )iP      F)rs   rt   ru   rv   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rw   rx   ry   r   r   r7   r   r     so     >HJJKEDHM'+HMI! !, "  w  r9   r   c                   s   a  ] tR tRt o RtRtRtRtRtRt	Rt
RtRt]V 3R lR l4       tV 3R lR	 ltV 3R
 lR ltV 3R lR ltV 3R ltRtV tR# )r   i  zA line in repr output.NFrY   c                r   r   rq   ri   rk   r7   r8   _Line.__annotate__  s     B BD Br9   c                sl    \        V P                  RJ;'       d    V P                  P                  4      # )z"Check if the line may be expanded.N)r3   r   r   ro   r>   r7   r   Z_Line.expandable  s*     DIIT)@@dii.@.@AAr9   c                s&   < V ^8  d   QhRS[ RS[/# )r/   rP   r1   r   ri   rk   r7   r8   r     s     @ @s @t @r9   c                s    \        V P                  4      \        V P                  4      ,           \        V P                  4      ,           pV P
                  f   Q hV P
                  P                  W!4      # )z4Check this line fits within a given number of cells.)r   
whitespacer!   textsuffixr   r   )ro   rP   r   s   && r7   r   Z_Line.check_length  sX      8DII#66$++9NN 	 yy$$$yy%%l??r9   c                s4   < V ^8  d   QhRS[ RS[R,          /# )r/   r~   r1   r   )rT   r   ri   rk   r7   r8   r     s      
 
# 
(7*; 
r9   c           	   #  s  "   V P                   pVf   Q hV P                  pVP                  '       g   Q hVP                  '       d5   \	        VP                   VP
                   VP                   2VR7      x pM\	        VP                  VR7      x pV P                  RV,          ,           pVP                  ;'       d    \        VP                  4      ^8H  p\        VP                  4       F>  w  rxV'       d   RMVP                  p	\	        TTTT	T;'       d    V'       * R7      p
V
x  K@  	  \	        VP                  VV P                  V P                  R7      x  R# 5i)z6Expand this line by adding children on their own line.N)r   r    r   )parentr   r   r   r   )r   r   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   )ro   r~   r   r   Znew_lineZchild_whitespaceZtuple_of_oner   r   r   r]   s   &&         r7   r   Z_Line.expand  s*    yy__
}}}}==="t'9'9&:4??:KL% H
 #JOOH??S;->>}}@@T]]);q)@$T]]3KD+I+ ..,.D J 4 !!!;;	
 	
s   0E"E"A9E"AE"AE"c                r   r   r   ri   rk   r7   r8   r   (  s       r9   c                s   V P                   '       d1   V P                   V P                   V P                  ;'       g    R  2# V P                   V P                   V P                  ;'       g    R  V P                  P                  4        2# r   )r   r   r   r   r   r`   r   r>   r7   r   Z_Line.__str__(  so    999oo&tyyk$))//r1BCC ??#DII;tyyB.?@R@R@T?UVr9   c                s   < V ^8  d   Qh/ S[ R,          ;R&   S[;R&   S[ S[,          ;R&   S[;R&   S[;R&   S[;R&   S[;R&   S[;R	&   # )
r/   r   r   r   r   r   r   r   r   r   )r   r3   r   rU   ri   rk   r7   r8   r     su      W$	 
   4.  N         r9   rr   )rs   rt   ru   rv   r   r   r   r   r   r   r   r   r   Zpropertyr   r   r   r   rw   rx   ry   r   r   r7   r   r     sm       $FGDDFJHDB B@ @
 
B w  r9   r   c                r-   r.   r2   r4   r6   r7   r8   r8   1  s     @ @ @ @r9   c                s     \        V RR4      p\        T \        4      ;'       d    \        T\        4      #   \         d     R# i ; i)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.
Z_fieldsNF)getattrrF   rc   tuple)r0   r   r   r7   _is_namedtupler   1  sG    i. c5!??j&??  s   7 AAc          
      s    V ^8  d   QhR\         R\        \        ,          R\        \        ,          R\        \        ,          R\        /# )r/   r   rP   rQ   rR   r1   )r   r   rT   r   r4   r6   r7   r8   r8   D  sM     g ggg g }	g
 
gr9   c           	     s   aaaaaaaa	 R V3R llo\        4       o	S	P                  oS	P                  oRR VVVVVVV	3R llloS! V RR7      pV# )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.
c                r-   r.   )r   rU   r4   r6   r7   r8   traverse.<locals>.__annotate__Y  s      S S r9   c                s  < SeL   \        V \        \        34      '       d0   \        V 4      S8  d    \        V 4      S,
          pV RS : RV 2pV#  \	        V 4      pV#   \
         d   pR\        T4      : R2p Rp?T# Rp?ii ; i)z0Get repr string for an object, but catch errors.NZ+z<repr-error >)r[   ZbytesrU   r   rn   rF   )r0   Z	truncatedZobj_reprerrorrQ   s   &   r7   to_reprZtraverse.<locals>.to_reprY  s     " ucl33C:%C:-Ikz*-Qyk:H 	:9   :)#e*q9:s   A B*B  Bc                sH    V ^8  d   QhR\         R\        R\        R\        /# )r/   r0   rootdepthr1   )r   r3   rT   r   r4   r6   r7   r8   r   m  s.     { {s {$ {s {4 {r9   c                s  <a a" \        S 4      pVS)9   d   \        RR7      # \        S 4      pS$RJ;'       d    VS$8  pR R lp \        S R4      pRpV'       g5    \        S R4      '       d"   \        S 4      '       g   S P                  4       pVEeg   S'! V4       \        S P                  R	R4      p	\        V! V4      4      p
S P                  P                  pV
'       d   . pVP                  pV'       d*   V	'       d   \        R
V R2R7      pM\        V R2R7      pMV	'       d   \        R
V R2RVVRR7      pM\        V R2RVVR7      p\        V
4       Fq  w  pp\        V\        4      '       d6   Vw  ppS#! VV^,           R7      pVVn        VVn        RVn        V! V4       KQ  S#! VV^,           R7      pVVn        V! V4       Ks  	  M\        V	'       d   R
V R2MV R2. VR7      pS&! V4       EM}\%        S 4      '       Ed/   V'       Eg&   S'! V4       . pVP                  p\'        S 4      o"S"'       d   V'       d%   \        S P                  P                   R2R7      pM\        S P                  P                   R2RVVR7      pR V"V 3R llp\        V! 4       4       F\  w  pw  pppV'       d   \        \)        V! V4      4      R7      pMS#! VV^,           R7      pVVn        VVn        RVn        V! V4       K^  	  M%\        S P                  P                   R2. VR7      pS&! V4       EM=\+        S 4      '       Ed0   \        S \        4      '       Eg   V'       Eg   \-        S 4      '       d   S'! V4       . pVP                  pV'       d%   \        S P                  P                   R2R7      pM\        S P                  P                   R2RVVS P                  P                   R2R7      p\        V 3R l\/        S 4       4       4       FR  w  ppS#! \        S VP0                  4      V^,           R7      pVP0                  Vn        VVn        RVn        V! V4       KT  	  S&! V4       EM\3        S 4      '       d   \5        S 4      '       d   S'! V4       S P                  P                  pV'       d   \        V R2R7      pM. pVP                  p\        V R2RVV R2R7      p\        S P7                  4       P9                  4       4       F7  w  pw  ppS#! VV^,           R7      pVVn        VVn        RVn        V! V4       K9  	  S&! V4       EM\        S \:        4      '       Ed   \:         F  p\        S V4      '       g   K  Tp M	  S'! V4       \<        V,          ! S 4      w  pppV'       d   \        V RV 2R7      pEMVP>                  \        S 4      P>                  8w  d   \        S(! S 4      VR7      pEMLS '       Ed6   . p\        VVVVR7      pVP                  p\A        S 4      pV^,
          p\        S \B        4      '       ds   \E        S P9                  4       4      pS%e   \G        VS%4      p\I        V4       F9  w  p w  ppS#! VV^,           R7      pS(! V4      Vn        V V8H  Vn        V! V4       K;  	  MS\E        S 4      p!S%e   \G        V!S%4      p!\I        V!4       F)  w  p pS#! VV^,           R7      pV V8H  Vn        V! V4       K+  	  S%e%   VS%8  d   V! \        RVS%,
           2RR7      4       M\        V. VR7      pS&! V4       M\        S(! S 4      VR7      p\        S 4      \        8H  Vn%        \3        S 4      Vn&        V#   \         d    Rp EL_i ; i  \         d     EL3i ; i) zWalk the object depth first.z...)r   Nc          	      s    V ^8  d   QhR\         R\        \        \         \        \        \         3,          3,          ,          /# )r/   	rich_argsr1   )r   r   r   r   rU   r4   r6   r7   r8   1traverse.<locals>._traverse.<locals>.__annotate__y  s1     	 	c 	huS%S/=Q7R.S 	r9   c              3   s  "   V  F{  p\        V\        4      '       d_   \        V4      ^8X  d   Vw  r#pWC8X  d   K6  W#3x  K=  \        V4      ^8X  d   Vw  r#W#3x  KX  \        V4      ^8X  d   V^ ,          x  Ku  Kw  Vx  K}  	  R# 5i)   N)r[   r   r   )r   argkeyr   Zdefaults   &    r7   iter_rich_argsZ3traverse.<locals>._traverse.<locals>.iter_rich_argsy  s|      #C//3x1}.1+G"+$!j(SQ%(
!j(SQ!!f ' I !s   BBZ,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angularZ<z...>z(...)r   r   )r   r   r   r   r   r   r   )r   r   r   r   )r   Z=r   )r   r   r   c          	      s    V ^8  d   QhR\         \        \        \        \        \
        \        .\        3,          ,          3,          ,          /# r   )r   r   rU   r   r   r   r4   r6   r7   r8   r     s5     & & sC(C5#::N1O'O!PQ&r9   c               3  s<  <"   S Ff  p V P                   '       g   K   \        SV P                  4      pV P                  T\        V P                   4      '       d   V P                   MR3x  Kh  	  R#   \         d   pT P                  TR3x   Rp?K  Rp?ii ; i5i)z$Iterate over attr fields and values.N)rn   r   nameZcallablerF   )attrrK   r   attr_fieldsr0   s      r7   
iter_attrsZ/traverse.<locals>._traverse.<locals>.iter_attrs  s      %0D#yyy
!&,3C,CE )-		(-5=dii5H5H		d+& %& %0 (1 !C+/99eT*B$B$B!Cs-   BA2>B2B=BBBB)r   r   r   r   r   c              3   s   <"   T F9  pVP                   '       g   K  \        SVP                  4      '       g   K5  Vx  K;  	  R # 5ir   )rn   r   r   )r   fieldr0   s   & r7   r   Z.traverse.<locals>._traverse.<locals>.<genexpr>  s4      -!,zz &-c5::&> E!,s   AA
A)r   r   r   r   )r   r   z... +T)r   r   r   )'Zidr   r<   r   rF   r
   r   r   listZ	__class__rs   appendr   r[   r   r   r   r   r?   r@   rU   r	   rG   r   r   r   rJ   Z_asdictZitemsr   _BRACESrC   r   _MAPPING_CONTAINERSZiterr   Z	enumerater   r   )*r0   r   r   Zobj_idZobj_typeZreached_max_depthr   Zfake_attributesZrich_repr_resultr   ZargsZ
class_namer   r   r   r   r   r   r   Z
child_noder   r   rK   Zrepr_callabler   Zcontainer_typer   r   r   Z	num_itemsZlast_item_indexZ
iter_itemsZindexZiter_valuesr   	_traverserR   rP   pop_visitedpush_visitedr   visited_idss*   f&&                               @r7   r   Ztraverse.<locals>._traversem  s2    C[ 5))9%T1HHey6H	 	$%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& &$ ?H
>U::tUM()-]5=Q9R)SJ)25	)JJ*.
.2
+36
0z* ?V "%--"8"8!9<rPT $S$//#O"3'' H__F #--*@*@)A'GH"%--"8"8!9; #% ]]334B7 $- -!'- $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S	U*+C0w  	$#O	$  s$   ^  3^4  ^10^14__T)r   )Fr    )setZaddZremove)
r   rP   rQ   rR   r   r   r   r   r   r   s
   &fff @@@@@r7   traverser   D  sP    *    EK??L$$K{ { {z W4(DKr9   r   r~   rP   rQ   rR   rS   c                s    V ^8  d   QhR\         R\        R\        R\        \        ,          R\        \        ,          R\        \        ,          R\        R\        /# )	r/   r   r   r~   rP   rQ   rR   rS   r1   )r   rT   r   r3   rU   r4   r6   r7   r8   r8   n  sf     % %% % 	%
 % % }% % 	%r9   c               sx    \        V \        4      '       d   T pM\        WWER7      pVP                  WVR7      pV# )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.
)rP   rQ   rR   )r   r~   rS   )r[   r   r   r   )	r   r   r~   rP   rQ   rR   rS   r   r   s	   &$$$$$$  r7   r   r   n  sF    8 &&z
 KK   H Or9   rL   rO   Tc                s    V ^8  d   QhR\         R\        R,          R\        R\        \        ,          R\        \        ,          R\        \        ,          R\        R	R
/# )r/   r   rL   r'   rO   rP   rQ   rR   rS   r1   N)r   r   r3   rT   r4   r6   r7   r8   r8     sk     " "" i " 	"
 " " }" " 
"r9   c               sl    Vf   \        4       MTpVP                  \        V VVVVVRR7      RR7       R# )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)rP   rQ   rR   rO   rS   rM   T)Z	soft_wrap)r   r^   r_   )r   rL   rO   rP   rQ   rR   rS   Z_consoles   &$$$$$$ r7   rm   rm     sD    , !({}WHNN!!'!	
   r9   Z__main__c                   2   a  ] tR tRt o V 3R lR ltRtV tR# )
BrokenRepri  c                r   r   r   ri   rk   r7   r8   ZBrokenRepr.__annotate__  s     	$ 	$c 	$r9   c                s    ^^ ,           R# )rV   zthis will failrr   r   r>   r7   rC   ZBrokenRepr.__repr__  s    E#r9   rr   Nrs   rt   ru   rv   rC   rx   ry   r   r   r7   r  r    s     	$ 	$r9   r  )
NamedTuplec                   s,   a  ] tR tRt o V 3R ltRtV tR# )StockKeepingUniti  c                sf   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[;R&   S[ ;R&   S[S[ ,          ;R&   # )r/   r   ZdescriptionZpriceZcategoryZreviews)rU   Zfloatr   ri   rk   r7   r8   ZStockKeepingUnit.__annotate__  sC     	     	 
 c r9   rr   N)rs   rt   ru   rv   rw   rx   ry   r   r   r7   r  r    s      r9   r  ZfoozHello World!gZd;Y@gʡE3t@g    cAZbarr   ZcrumbleZcounterZatomic
namedtuplezSparkling British Spring WaterzCarbonated spring waterg?Zwaterzits amazing!zits terrible!ZBroken)r^   )rO   rQ   c                   r  )Thingi  c                r   r   r   ri   rk   r7   r8   ZThing.__annotate__  s     	0 	0c 	0r9   c                s    R # )zHello[38;5;239m World!rr   r   r>   r7   rC   ZThing.__repr__  s    /r9   rr   Nr  r   r   r7   r  r    s     	0 	0r9   r  c          	      s    V ^8  d   Qh/ ^ \         9   dC   \        \        \        \        .\
        \        \        \        3,          3,          3,          ;R&   # )r/   r   )__conditional_annotations__r   r<   r   r   r   rU   r4   r6   r7   r8   r8      s?    t dHcUE#sC-$8899	: u r9   )Nr   FFNNNF)NNN>   )rV   r/   r   r   i   i   i   i   >   rV   r/   r   )appleZrhubarbZbutterZsugarZflour)r	  ZorangeZpearkumquatr
  AX  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTN)or  re   ZcollectionsrD   rI   ZosrE   r|   r   r   r   r   r   r   r   r   r	   r
   Z	itertoolsr   Ztypesr   Ztypingr   r   r   r   r   r   r   r   r   r   r   r   r   Zpip._vendor.rich.reprr   r   r;   r   r:   ZImportErrorrY   r   Z_loopr   Z_pickr   Zabcr   Zcellsr!   r   r"   Zjupyterr#   r$   Zmeasurer%   r   r&   rL   r'   r(   r)   r*   r+   r,   r?   r@   rG   r  rH   rJ   ra   r[   r}   r_   r   r   r   Z_EnvironZdictZ	frozensetr   r   r   r   Zkeysr   r   r   r   r   r   r   r   rm   rs   r  r  r  rT   ZdZdatar   r{   r^   r  r8   )r  r   r7   <module>r     s\       	  
  G G 7 7   "     1t,J      ( 4    6
@
(  **+>C )(-&`OGde3\ e3PT
 KKC	 ,=	 
*.C
*.	,	+R>  GLLN#R[[*:HE  Q Q Qh @ @ @F@&gT	% % 	%
 !%% !%%  $% %P" $(" 	"
 !%" !%"  $" "J z$ $
 ":  	CAAeH&
 	y#{9NO
 	7	
 	%&,%_-
 	*,? DB 	Kt&	&Tb
9:0 0 
&/{ o  Js   8J* *	J76J7