
    A[h                     P   U d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlmZmZm	Z	m
Z
mZ d dlmZmZmZ d dlmZ d dlmZ d dl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  d d	l!m"Z" 	 d dl#Z$d
Z%n# e&$ r dZ%Y nw xY wddl'm(Z( ddl)m*Z* ddl+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4m5Z5 ddl6m7Z7 ddl8m9Z9 erddl:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ dhZAdedeBfdZCdeded         fdZDdeEdeBfdZF ejG        dg           ZHdeEdeBfdZI	 	 	 	 	 	 	 dnd!ed"ed#         d$d%d&eBd'eBd(eeJ         d)eeJ         d*eBddfd+ZKdeEd,e eLeeLd-f         f         deBfd.ZM	 	 	 	 	 	 	 dnd"ed#         d$d%d&eBd'eBd(eeJ         d)eeJ         d*eBddfd/ZN G d0 d1e4          ZOd2eeef         deePePePf         fd3ZQd2d4deePePePf         fd5ZRejS        d6 eeRe
eQed7 ed8 eTd9 ed: eUd; eVd< e	d= eWd> eXd? ed@ iZYeeLeegeePePePf         f         f         eZdA<    eXeY[                                          Z\eTejS        eefZ]dedeBfdBZ^e G dC dD                      Z_e G dE dF                      Z`dedeBfdGZa	 	 	 dod2ed(eeJ         d)eeJ         dHeeJ         de_f
dIZbdJdKdddddLd2edMeJdNeJd(eeJ         d)eeJ         dHeeJ         d*eBdePfdOZcdd
dddddPd2ed"ed#         d'eBd(eeJ         d)eeJ         dHeeJ         d*eBddfdQZdeedRk    r G dS dT          Zfd dUlmgZg  G dV dWeg          Zh e
eJ          ZidXeidY<   ddZd[d\d]h d^g eUh d_           e
eVd`g dai           eg db          dc ehdddedfdgdhdig           ef            djZjejdY         k                    ej           d dkllmmZm  em eOejd
dlm                     dS dS )p    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)RichReprResultTF   get_console)	loop_last)	pick_bool)RichRenderablecell_len)ReprHighlighter)JupyterMixinJupyterRenderable)Measurement)Text)ConsoleConsoleOptionsHighlighterTypeJustifyMethodOverflowMethodRenderResultzmatplotlib.artist.Artistobjreturnc                 R    t           o t          j        t          |                     S )z1Check if an object was created with attrs module.)
_has_attrs_attr_modulehastyper/   s    f/var/www/api.easyaligner.net/htdocs/venv_linux/lib/python3.11/site-packages/pip/_vendor/rich/pretty.py_is_attr_objectr8   A   s    5,*499555    z_attr_module.Attribute[Any]c                 V    t           r!t          j        t          |                     ng S )zGet fields for an attrs object.)r2   r3   r
   r5   r6   s    r7   _get_attr_fieldsr;   F   s#    -7?<tCyy)))R?r9   c                 d    	 | j         j        j        t          j        k    S # t
          $ r Y dS w xY w)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__	Exceptionr6   s    r7   _is_dataclass_reprrC   K   s?    |$0K4HHH   uus   ! 
//_dummy_namedtuplec                     d}	 t          j        | j                  }n# t          t          f$ r Y nw xY wt          j        t
          j                  }||k    S )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	TypeErrorrD   )r/   obj_filedefault_repr_files      r7   _has_default_namedtuple_reprrL   _   sj     H?3<00Y    	  (9(BCC(((s    22ignorevalueconsoler)   overflowr-   cropindent_guides
max_length
max_string
expand_allc                    ddl m} ddlm}	 t	          | t
                    s| d S |pt                      }|j        rbg d}
|
D ]H}t          | |d           }t          j
        |          r!	  |            }n# t          $ r Y ?w xY w| d S I || t                    rd S t	          | |	          r|                                 |                    t	          | t                    r| nt!          | |||||d          |d           d S )	Nr   )is_object_one_of_types)ConsoleRenderable)_repr_html__repr_markdown__repr_json__repr_latex__repr_jpeg_
_repr_png_
_repr_svg__repr_mimebundle_   )rP   rR   rS   rT   rU   marginT)rQ   new_line_start)_inspectrW   rO   rX   _safe_isinstancer&   r   
is_jupytergetattrrF   ismethodrB   JUPYTER_CLASSES_TO_NOT_RENDERlineprintr!   Pretty)rN   rO   rP   rQ   rR   rS   rT   rU   rW   rX   ipython_repr_methodsrepr_methodmethodrepr_results                 r7   _ipy_display_hookrq   s   s    100000****** 011 U]&G 	 
 	 
 	 
 0 	 	KUK66F'' 	"(&((KK    H*FF "!%)FGG 	F 011 MME>22
	
'!!!
 
 
       s   +
A66
BBclass_or_tuple.c                 F    	 t          | |          S # t          $ r Y dS w xY w)zFisinstance can fail in rare cases, for example types with no __class__F)
isinstancerB   )r/   rr   s     r7   re   re      s9    #~...   uus    
  c                 ,    ddl m  p	               J dt          ddf fd}	 t                      }ddlm}	  G fdd	|	          }
 |
            }||j        j        d
<   dS # t          $ r |t          _
        Y dS w xY w)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.
        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   r0   c           
          | _J dt           _                            t          | t                    r| nt          |                      | t           _        dS dS )z?Replacement sys.displayhook which prettifies objects with Rich.N)rP   rR   rS   rT   rU   )rQ   )builtins_rk   re   r!   rl   )rN   rO   rQ   rU   rR   rS   rT   rP   s    r7   display_hookzinstall.<locals>.display_hook   s    &&&HJMM#E>::	%"/)))        HJJJ! r9   )BaseFormatterc                   >    e Zd ZU dZeed<   dedef fdZdS )install.<locals>.RichFormatterTpprintrN   r0   c           	      l    | j         rt          |                       S t          |          S )N)rO   rP   rR   rS   rT   rU   )r}   rq   repr)selfrN   rU   r   rR   rS   rT   rP   s     r7   __call__z'install.<locals>.RichFormatter.__call__   sM    ; ', +!)&3#-#-#-     ;;&r9   N)__name__
__module____qualname__r}   bool__annotations__r   r   )rU   r   rR   rS   rT   rP   s   r7   RichFormatterr|      sl         FD'c 'c ' ' ' ' ' ' ' ' ' ' ' ' 'r9   r   z
text/plain)pip._vendor.richr   r   get_ipythonIPython.core.formattersrz   display_formatter
formattersrB   sysdisplayhook)rO   rP   rQ   rR   rS   rT   rU   ry   iprz   r   rich_formatterr   s   ```````     @r7   installr      s<   , -,,,,,&GC D            (']]999999	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	'M 	' 	' 	'$ '8F'555 ' ' '&'s   AA9 9BBc                       e Zd ZdZ	 d!dddddddddddddeded	         d
eded         ded         dee         dedee         dee         dee         dedededdfdZ	 	 	 	 	 	 d"dZ		 	 	 	 	 	 d#d Z
dS )$rl   ak  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   	max_depthrU   rb   insert_line_objecthighlighterr+   r   r   r,   rP   r-   r   rR   rS   rT   r   rU   rb   r   r0   c                    || _         |pt                      | _        || _        || _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        || _        d S N)r   r$   r   r   r   rP   r   rR   rS   rT   r   rU   rb   r   )r   r   r   r   r   rP   r   rR   rS   rT   r   rU   rb   r   s                 r7   __init__zPretty.__init__%  st    " &;/*;*;&294<*$$"$&r9   rO   r)   optionsr*   r.   c           	   #     K   t          | j        |j        | j        z
  | j        | j        | j        | j        | j                  }t          || j
        p|j
        | j        p|j        t          | j        |j                  d          }|r|                     |          n%t          t          | j                   dd          }| j        r#|j        s|                    | j        d          }| j        rd|v rd	V  |V  d S )
N	max_widthr   rS   rT   r   rU   pretty)r   rP   r   stylez.__repr__ returned empty stringz
dim italic)r   zrepr.indent
 )pretty_reprr   r   rb   r   rS   rT   r   rU   r(   r   rP   r    r   r   r5   rR   
ascii_onlywith_indent_guidesr   )r   rO   r   
pretty_strpretty_texts        r7   __rich_console__zPretty.__rich_console__D  sF      !L'$+5(n
 
 

 L3GO]6g&6dlGO<<
 
 
 D[)))%%FFF"   	  	g&8 	%88  9  K  	 3 3HHHr9   r'   c                     t          | j        |j        | j        | j        | j        | j                  }|r+t          d |                                D                       nd}t          ||          S )N)r   r   rS   rT   rU   c              3   4   K   | ]}t          |          V  d S r   r"   .0rj   s     r7   	<genexpr>z*Pretty.__rich_measure__.<locals>.<genexpr>s  s(      CC4CCCCCCr9   r   )
r   r   r   r   rS   rT   rU   max
splitlinesr'   )r   rO   r   r   
text_widths        r7   __rich_measure__zPretty.__rich_measure__g  s     !L'(
 
 

 HRXCCC:+@+@+B+BCCCCCCWX 	 :z222r9   r   )rO   r)   r   r*   r0   r.   )rO   r)   r   r*   r0   r'   )r   r   r   __doc__r   r   intr   r   r   r    r9   r7   rl   rl     sm        , 48'
 -1/3"'#$($(#' !' ' '' /0'
 ' /*' +,' $' ' SM' SM' C=' ' ' '  
!' ' ' '>! !+;!	! ! ! !F3 3+;3	3 3 3 3 3 3r9   rl   r   c                 0    d| j         ddd| j         dfS )Nzdefaultdict(z, {})z, {}))default_factoryr   s    r7   _get_braces_for_defaultdictr   x  s1    6w.6669w.999 r9   z
array[Any]c                 0    d| j         ddd| j         dfS )Nzarray(z, [])))typecoder   s    r7   _get_braces_for_arrayr     s,    ,W%,,,d4RW=M4R4R4RSSr9   c                     dS )N)z	environ({r   zenviron({})r   r   s    r7   <lambda>r     s    !C r9   c                     dS )N)z	Counter({r   z	Counter()r   r   s    r7   r   r     s    = r9   c                     dS )N)zdeque([r   zdeque()r   r   s    r7   r   r     s    7 r9   c                     dS N){}z{}r   r   s    r7   r   r         * r9   c                     dS r   r   r   s    r7   r   r         . r9   c                     dS )N)zfrozenset({r   zfrozenset()r   r   s    r7   r   r     s    C r9   c                     dS N)[]z[]r   r   s    r7   r   r     r   r9   c                     dS r   r   r   s    r7   r   r     r   r9   c                     dS )N)r   r   zset()r   r   s    r7   r   r     s    , r9   c                     dS )N)(r   ()r   r   s    r7   r   r     s    + r9   c                     dS )N)zmappingproxy({r   zmappingproxy({})r   r   s    r7   r   r     s    &R r9   _BRACESc                     t          | t                    p-t          |           pt          | d          pt	          |           ot          |            S )z3Check if an object may be expanded by pretty print.__rich_repr__)re   _CONTAINERSr   hasattrr8   r   r6   s    r7   is_expandabler     s]     	k** 	 	 C))	  3	
 cll
r9   c            	          e Zd ZU dZdZeed<   dZeed<   dZeed<   dZ	eed<   dZ
eed<   dZeed	<   dZeed
<   dZeed<   dZeed                   ed<   dZdZeed<   dee         fdZdededefdZdefdZ	 ddedededefdZdS )Nodez4A 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: z, 	separatorr0   c              #     K   | j         r| j         V  | j        V  | j        r| j        V  dS | j        | j        r| j        V  | j        rI| j        sBt          | j                  dk    r*| j        d                                         E d{V  dV  n4| j        D ],}|                                E d{V  |j	        s	| j
        V  -| j        V  dS | j        V  dS dS )zGenerate tokens for this node.Nr   r   ,)r   key_separatorr   r   r   r   r   leniter_tokensr   r   r   r   )r   childs     r7   r   zNode.iter_tokens  sI     = 	%-$$$$? 	!/!!!!!]&} !o%%%= 1); 1DM@R@RVW@W@W#}Q/;;=========IIII!% 1 1#(#4#4#6#66666666$z 1"&.000&&&&&&j      '&r9   start_lengthrS   c                 n    |}|                                  D ]}|t          |          z  }||k    r dS dS )a*  Check 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#   )r   r   rS   total_lengthtokens        r7   check_lengthzNode.check_length  sP     $%%'' 	 	EHUOO+Lj((uu )tr9   c                 T    d                     |                                           }|S Nr   )joinr   )r   	repr_texts     r7   __str__zNode.__str__  s%    GGD,,..//	r9   P   r   r   r   rU   c                 V   t          | d          g}d}|t          |          k     rb||         }|j        r;|j        s4|s|                    |          s|                    |          |||dz   <   |dz  }|t          |          k     bd                    d |D                       }|S )al  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   4   K   | ]}t          |          V  d S r   )strr   s     r7   r   zNode.render.<locals>.<genexpr>  s(      994SYY999999r9   )_Liner   
expandableexpandedr   expandr   )r   r   r   rU   linesline_norj   repr_strs           r7   renderzNode.render  s     D$///0E

"">D Lt} L LT%6%6y%A%A L37;;{3K3KE'GaK/0qLG E

"" 9999599999r9   )r   r   F)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   r9   r7   r   r     sj        >>HcJJKE3OOOD$HdM4'+HhtF|$+++MIs!Xc] ! ! ! !, # $    "    
 MR 03EI	     r9   r   c                       e Zd ZU dZdZed          ed<   dZeed<   dZ	ee
         ed<   dZeed<   dZeed	<   dZeed
<   dZeed<   dZeed<   edefd            ZdedefdZdeded          fdZdefdZdS )r   zA line in repr output.NparentFr   r   r   textsuffix
whitespacer  r   r0   c                 F    t          | j        duo| j        j                  S )z"Check if the line may be expanded.N)r   r   r   r   s    r7   r  z_Line.expandable  s#     DIT)@di.@AAAr9   rS   c                     t          | j                  t          | j                  z   t          | j                  z   }| j        J | j                            ||          S )z4Check this line fits within a given number of cells.)r   r  r#   r
  r  r   r   )r   rS   r   s      r7   r   z_Line.check_length  s\       8DI#6#66$+9N9NN 	 y$$$y%%lJ???r9   r   c              #     K   | j         }|J | j        }|j        sJ |j        r)t	          |j         |j         |j         |          V }nt	          |j        |          V }| j        d|z  z   }|j        ot          |j                  dk    }t          |j                  D ]+\  }}|rdn|j
        }	t	          ||||	|o|           }
|
V  ,t	          |j        || j        | j                  V  dS )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   )r   r   r   r  new_linechild_whitespacetuple_of_oner   r   r   rj   s              r7   r  z_Line.expand  sb     y_
}= 	P"Lt'9L4?LL%    HH
 #JOOOOOH?S;->>}@T]););q)@$T]33 		 		KD%+?I+ .,.  D JJJJ!!;	
 
 
 	
 	
 	
 	
 	
r9   c                     | j         r| j         | j         | j        pd S | j         | j         | j        pd | j                                         S r   )r   r  r
  r   r  rstripr  s    r7   r   z_Line.__str__1  sc    9 	oCtyC$)/rCCC ?VDIVtyBV@R@R@T@TVVr9   )r   r   r   r   r	  r   r   r   r   r   r   r
  r   r  r  r  r   propertyr  r   r   r   r  r   r   r9   r7   r   r     s7           $FHW$$$GTD(4.D#NNNFCJHdD$BD B B B XB@s @t @ @ @ @
# 
(7*; 
 
 
 
B      r9   r   c                     	 t          | dd          }n# t          $ r Y dS w xY wt          | t                    ot          |t                    S )aX  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)rg   rB   rt   tuple)r/   r
   s     r7   _is_namedtupler  :  s]    i..   uu c5!!?j&?&??s    
""r   c           	         	 dt           dt          ffdt                      		j        	j        ddt           dt
          dt          dt          f	fd | d	
          }|S )a`  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.
    r/   r0   c                 $   Qt          | t          t          f          r5t          |           k    r"t          |           z
  }| d         d| }n;	 t	          |           }n*# t
          $ r}dt          |          d}Y d}~nd}~ww xY w|S )z0Get repr string for an object, but catch errors.N+z<repr-error >)re   bytesr   r   r   rB   )r/   	truncatedobj_reprerrorrT   s       r7   to_reprztraverse.<locals>.to_reprb  s     " ucl33 #C:%%C:-Ikzk*::y::HH:99 : : :9#e**999:s   A& &
B0BBFr   rootdepthc           	         # t                     }t          j        j        t          j        j        f}%duo|%k    }dt
          dt          t          t
          t          t          t
          f         f                  fd}	 t           d          }n# t          $ r d}Y nw xY wd}|sE	 t           d          r#t                     s                                 }n# t          $ r Y nw xY w|-t           j        dd          }	t           ||                    }
 j        j        }|
rg }|j        }|rt'          d	
          }ni|	rt'          d| dd||d          }nt'          | dd||          }t)          |
          D ]r\  }}t+          |t,                    r6|\  }} $||dz             }||_        ||_        d|_         ||           P $||dz             }||_         ||           snt'          |	rd| dn| dg |          }nt5                     r=|s:g }|j        }t7                     ##r|rt'          d	
          }nTt'           j        j         dd||          }dt          t          t          t
          t8          t:          t
          gt          f                  f                  f# fd}t)           |                      D ]b\  }\  }}}|r't'          t           ||                    
          }n $||dz             }||_        ||_        d|_         ||           cnit'           j        j         dg |          }nHt=                     rt+           t                     s|st?                     s|dk    rtA                     }|*v rt'          d	
          S  (|           g }|j        }|rt'          d	
          }nt'           j        j         dd||          }t)          d tC                     D                       D ]M\  }} $t           |j"                  |dz             }|j"        |_        ||_        d|_         ||           N '|           ntG                     rtI                     r|rt'          d	
          }ng } j        j        }t'          | dd|| d          }|j        }t)           %                                &                                          D ]8\  }\  }} $||dz             }||_        ||_        d|_         ||           9nPt+           tN                    r tN          D ]}t+           |          r|} ntA                     }|*v rt'          d	
          S  (|           tQ          |                    \  }}}|rt'          d	|          }n|j)        t                     j)        k    rt'           )           |          }na rLg }t'          ||||          }|j        }tU                     }|dz
  }t+           tV                    rtY           &                                          } &t[          | &          } t]          |           D ]>\  }!\  }} $||dz             } )|          |_        |!|k    |_         ||           ?n\tY                     }"&t[          |"&          }"t]          |"          D ]+\  }!} $||dz             }|!|k    |_         ||           ,&&|&k    r  |t'          d|&z
   d                     nt'          |g |          } '|           nt'           )           |          }t+           t,                    |_/        tG                     |_0        |S )zWalk the object depth first.N	rich_argsr0   c              3     K   | D ]}t          |t                    rdt          |          dk    r|\  }}}||k    r7||fV  >t          |          dk    r|\  }}||fV  ]t          |          dk    r
|d         V  {|V  d S )N      r   r   )re   r  r   )r(  argkeyr   defaults        r7   iter_rich_argsz3traverse.<locals>._traverse.<locals>.iter_rich_args~  s         #C// 3xx1}}.1+UG"e++$!5j((((SQ%(
U!5j((((SQ!!fIIII r9   ,awehoi234_wdfjwljet234_234wdfoijsdfmmnxpi492Fr   angularz...)r   <r  r  )r   r   r   r   r   r   r   )r   r   r   r   r   )r&  =r   )r   r   r   c               3      K   D ]j} | j         ra	 t          | j                  }| j        |t          | j                   r| j         ndfV  G# t          $ r}| j        |dfV  Y d}~bd}~ww xY wkdS )z$Iterate over attr fields and values.N)r   rg   namecallablerB   )attrrN   r#  attr_fieldsr/   s      r7   
iter_attrsz/traverse.<locals>._traverse.<locals>.iter_attrs  s       %0 & &D#y &
!&,3C,C,CE )-	(-5=di5H5H(R		d+& %& %& %& %&	 (1 !C !C !C+/9eT*B$B$B$B$B$B$B$B$B!C&& &s   A
A-A((A-)r*     c              3   (   K   | ]}|j         	|V  d S r   )r   )r   fields     r7   r   z.traverse.<locals>._traverse.<locals>.<genexpr>  s=       - -#ej-- - - - - -r9   )r   r   r   r   )r   r   z... +T)r   r   r   )1r5   r   version_infomajorminorr   r   r   r   r   r   rB   r   r   rg   list	__class__r   appendr   r   re   r  r   r   r   r8   r;   r   r   r   rC   idr
   r5  r  rL   _asdictitemsr   r   r=   r   _MAPPING_CONTAINERSiterr   	enumerater   r   )+r/   r%  r&  obj_type
py_versionreached_max_depthr/  fake_attributesrich_repr_resultr1  args
class_namer   rB  r   r   r,  r-  r   
child_noder9  r5  rN   repr_callableobj_idr<  container_typer   r   r   	num_itemslast_item_index
iter_itemsindexiter_valuesr8  	_traverser   rS   pop_visitedpush_visitedr$  visited_idss+   `                                  @r7   rY  ztraverse.<locals>._traversev  s	    99&,c.>.DE
%T1Hey6H	c 	huS%S/=Q7R.S 	 	 	 	 	$%C OO  	$ 	$ 	$#OOO	$ 6: 	300 ; ;'*'8'8':':$    'c/EBBG'78899D/J '!$ /6222DD #'8:'8'8'8(+%-!%&)       $*4'7'7'7(+%-!%	      &/t__ / /	c+C77 
/),JC)25	)J)J)JJ.2JO25J/7:J4"F:....)23eai)H)H)HJ.2JO"F:..../ 4;R0:0000JARARAR  
 S!! [	</ [	<H_F*3//K )$ $+6222DD&)m&<#?#?#?$'!)!	  D&c33%*1E(FFG) & & & & & & &$ ?H

>U>U + +::tUM( K)-]]5=Q=Q9R9R)S)S)SJJ)25	)J)J)JJ*.
.2
+36
0z****+ "%-"8<<<rPT  
 k	<$S$//k	< $k	< $C((	k	< -7&,@,@WWF$$u----L   H_F  $v..."%-"8;;; #%	   $- - -'-c{{- - - $ $ ' 'KD% "+73
+C+C5ST9!U!U!UJ*/*J'&*JO/2J,F:&&&&F####C   I	<%A#%F%F I	<  'u--- ]3
",/// #%'+++	   "*3CKKMM4G4G4I4I*J*J ' '&D,3!*5	!B!B!BJ*-J'&*JO/2J,F:&&&&' c;// 6	<"-  #C88 -HE WWF$$u----L   -4X->s-C-C*JU  $AvD999"d3ii&888wws||$???  A) +%	   "HH	"+a-#C)<== +!%ciikk!2!2J!-%+J
%C%C
/8/D/D + ++|U%.YuEAI%F%F%F
.5gcll
+*/?*B
z****	+ #'s))K!-&,[*&E&E(1+(>(> + +u%.YuEAI%F%F%F
*/?*B
z****)i*.D.DF4+K9z3I+K+KRVWWWXXX%"4@@@K773<<d;;;D(e44+C00s$   B B! B!)3C 
C*)C*T)r%  )Fr   )r   r   setaddremover   r   r   )
r   rS   rT   r   r   rY  rZ  r[  r$  r\  s
    ``` @@@@@r7   traverser`  M  s    *S S         EEK?L$Kr rs r$ rs r4 r r r r r r r r r r r rh 9W4(((DKr9   r   r   r   r   r   c                    t          | t                    r| }nt          | |||          }|                    |||          }|S )a  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   r   )r   r   rU   )re   r   r`  r  )	r   r   r   rS   rT   r   rU   r   r  s	            r7   r   r   n  sb    8 && 

zY
 
 
 KK    H Or9   )rO   rR   rS   rT   r   rU   c                    |t                      n|}|                    t          | |||||d          d           dS )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.
    NrM   )rS   rT   r   rR   rU   rP   T)	soft_wrap)r   rk   rl   )r   rO   rR   rS   rT   r   rU   _consoles           r7   r}   r}     sf    , !({}}}WHNN!!'!	
 	
 	
       r9   __main__c                       e Zd ZdefdZdS )
BrokenReprr0   c                     ddz   dS )Nr   r   zthis will failr   r  s    r7   r=   zBrokenRepr.__repr__  s    EE##r9   N)r   r   r   r   r=   r   r9   r7   rg  rg    s/        	$c 	$ 	$ 	$ 	$ 	$ 	$r9   rg  )
NamedTuplec                   N    e Zd ZU eed<   eed<   eed<   eed<   ee         ed<   dS )StockKeepingUnitr5  descriptionpricecategoryreviewsN)r   r   r   r   r   floatr   r   r9   r7   rk  rk    sI         			cr9   rk     foozHello World!gZd;Y@gʡE3t@g    cA>   r   r+  r*  r   rq  r:        >   r   r+  r*  crumble)applerhubarbbuttersugarflour)rw  orangepearkumquatr~  X  duriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurianduriandurian)FTNzSparkling British Spring WaterzCarbonated spring waterg?waterzits amazing!zits terrible!)rr  barr   counteratomic
namedtupleBroken)rk      )rR   rT   )NrM   FFNNF)NNN)nrw   collectionsr@   rF   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   r7  r3   r2   ImportErrorr   r   _loopr   _pickr    abcr!   cellsr#   r   r$   jupyterr%   r&   measurer'   r
  r(   rO   r)   r*   r+   r,   r-   r.   ri   r   r8   r;   objectrC   r  rD   rL   r   rq   r5   re   r   rl   r   r   r   _Environdict	frozensetr@  r]  r  r   r   keysr   rF  r   r   r   r  r`  r   r}   r   rg  ri  rk  ddatarB  r   rk   r   r9   r7   <module>r     s>
             				 



       G G G G G G G G G G G G G G 7 7 7 7 7 7 7 7 7 7             " " " " " "                            1 0 0 0 0 0JJ   JJJ                               ( ( ( ( ( ( 4 4 4 4 4 4 4 4                                   ! 6 6 6 6 6 6
@# @(+H"I @ @ @ @
F t    " +K*+>CC )f ) ) ) ) ), $(!) $ $F FFi F F 	F
 F F F F 
F F F FR	!&tU49-='=!>	    $(!) $ $H' H'i H'H' H' 	H'
 H' H' H' 
H' H' H' H'Vd3 d3 d3 d3 d3\ d3 d3 d3NS#X)> 5cSVCW    T< TE#sC-4H T T T T
 KCC	 ,==	77
*
*..CC
*
*..	,	,	++RR>dHcUE#sC-$8899	:    eGLLNN##R[*:HE s t     Q Q Q Q Q Q Q Qh @ @ @ @ @ @ @ @F@ @ @ @ @ @* !% $#	^ ^^^ ^ }	^
 
^ ^ ^ ^H	  $ $#% % %% % 	%
 % % }% % 	% % % %V $( $ $#" " "" i " 	"
 " " }" " 
" " " "J z$ $ $ $ $ $ $ $
 "!!!!!    :    	CAAeH &&&
 y##"{9NNNO
 
 7  	
 	
 &&&,%_-
 
 *,,?   DB 	Kt&&&&&&	E&&Tb
9
9
9:::::o s   -A4 4A>=A>