
    q"hq              	       (   S SK JrJrJr  S SKJrJrJrJrJ	r	J
r
JrJrJr  SSKJrJr  SSKJrJr  SSKJr  SSK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!  SSK"J#r#  SSK$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  \(       a  SSK,J-r-J.r.J/r/J0r0J1r1J2r2  \ " S S5      5       r3\ " S S5      5       r4 " S S\	5      r5 " S S\5      r6\7S:X  Ga  S SK8J-r-  S SK9J:r:  SSK;J<r<  \<" S5         \6" SSS S!9r=\=R}                  S"S#S$S%S&9  \=R}                  S'S(S)9  \=R}                  S*S S+S,9  \=R                  S-S.S/5        \=R                  S0S1S25        \=R                  S3S4S5S6S%S79  \=R                  S8S9S:5        S;\@S<S=4S> jrA\-" 5       r,\:" 5       rB\A" S?5        \,R                  \=S@SA9  S%\=lD        \A" SB5        \,R                  \=5        SC\=lE        \A" SD5        \,R                  \=S@SA9  S=\=lE        SE\=lD        SFSG/\=lF        \A" SH5        \,R                  \=S@SA9  S=\=lE        SE\=lD        SFSG/\=lF        S\=lG        \A" SI5        \,R                  \=S@SA9  S=\=lE        SE\=lD        SFSG/\=lF        S%\=lH        S \=lG        \A" SJ5        \,R                  \=S@SA9  S=S=S=5        g=g=! , (       d  f       g== f)K    )	dataclassfieldreplace)	TYPE_CHECKINGDictIterableList
NamedTupleOptionalSequenceTupleUnion   )boxerrors)loop_first_last	loop_last)	pick_bool)ratio_distributeratio_reduce)VerticalAlignMethod)JupyterMixin)Measurement)PaddingPaddingDimensions)is_renderable)Segment)Style	StyleType)TextTextType)ConsoleConsoleOptionsJustifyMethodOverflowMethodRenderableTypeRenderResultc                   ~   \ rS rSr% SrSrS\S'    SrS\S'    Sr\	\S'    Sr
\	\S'    Sr\	\S	'    S
rS\S'    SrS\S'    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9r\S   \S'   S$S  jr\S\S   4S! j5       r \S\4S" j5       r!S#r"g)%Column&   a9
  Defines a column within a ~Table.

Args:
    title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
    caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
    width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
    min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
    box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
    safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
    padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
    pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
    show_header (bool, optional): Show a header row. Defaults to True.
    show_footer (bool, optional): Show a footer row. Defaults to False.
    show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
    show_lines (bool, optional): Draw lines between every row. Defaults to False.
    leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
    style (Union[str, Style], optional): Default style for the table. Defaults to "none".
    row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
    header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
    footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
    border_style (Union[str, Style], optional): Style of the border. Defaults to None.
    title_style (Union[str, Style], optional): Style of the title. Defaults to None.
    caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
    title_justify (str, optional): Justify method for title. Defaults to "center".
    caption_justify (str, optional): Justify method for caption. Defaults to "center".
    highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
 r&   headerfooterheader_stylefooter_stylestyleleftr$   justifytopr   verticalellipsisr%   overflowNwidth	min_width	max_widthratioFno_wrap	highlightr   _index)default_factory_cellsreturnc                     [        U / S9$ )zReturn a copy of this Column.r?   )r   selfs    H/var/www/html/env/lib/python3.13/site-packages/pip/_vendor/rich/table.pycopyColumn.copyu   s    tB''    c              #   8   #    U R                    Sh  vN   g N7f)z2Get all cells in the column, not including header.NrB   rC   s    rE   cellsColumn.cellsy   s      ;;s   c                     U R                   SL$ )z!Check if this column is flexible.N)r:   rC   s    rE   flexibleColumn.flexible~   s     zz%%rH    )r@   r)   )#__name__
__module____qualname____firstlineno____doc__r,   __annotations__r-   r.   r   r/   r0   r2   r4   r6   r7   r   intr8   r9   r:   r;   boolr<   r=   r   listr?   r	   rF   propertyr   rJ   rM   __static_attributes__rO   rH   rE   r)   r)   &   s5   <  "F!H!F!H L) - L) -E9-%G_%[&+H#+M!+H+E8C=\#Ix}#_#Ix}#_E8C=wGTRItCFCO%*4%@FD!"@( x 01   &$ & &rH   r)   c                   >    \ rS rSr% SrSr\\   \S'    Sr	\
\S'   Srg)Row   zInformation regarding a row.Nr0   Fend_sectionrO   )rP   rQ   rR   rS   rT   r0   r   r   rU   r^   rW   rZ   rO   rH   rE   r\   r\      s$    &!%E8I% KLrH   r\   c                   <    \ rS rSr% Sr\\S'    S\S'    \\S'   Srg)	_Cell   zA single cell in a table.r0   r&   
renderabler4   rO   N)	rP   rQ   rR   rS   rT   r   rU   r   rZ   rO   rH   rE   r`   r`      s     #!  !!"rH   r`   c            7       P   \ rS rSr% Sr\\   \S'   \\   \S'   SSSS\	R                  SSSSSSSSSS	S
SSSSSSSSSS.S\\\4   S\\   S\\   S\\   S\\   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46S+ jjr\S	SSSS,.S\\\4   S\S\S\S\S*S 4S- jj5       r\S*\4S. j5       r\R4                  S\S*S4S/ j5       r\S*\4S0 j5       r\S*\4S1 j5       rS2S3S4\S*\4S5 jrS2S3S6S7S*\4S8 jr\S*\ \\\\4   4S9 j5       r!\!R4                  S\S*S 4S: j5       r!  S]SSSSS;S<S=SSSSSS>.S?S@SAS@S!\\   S)\\   S"\\   S\\   SBS'SCSDSESFS\\   S\\   SG\\   SH\\   SI\S*S4SJ jjjr"SSSK.SL\S@   S\\   SM\S*S4SN jjr#S^SO jr$      S_SQ jr%S2S3S6S7S*\\   4SR jr&\SS\\   ST\\   SG\S*\\   4SU j5       r'S2S3SV\SW\S*\\(   4SX jr)SV\S*\4SY jr*S2S3S6S7SW\S*\4SZ jr+S2S3S6S7SS\\   S*SP4S[ jr,S\r-g)`Table   a
  A console renderable to draw a table.

Args:
    *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
    title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
    caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
    width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
    min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
    box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
    safe_box (Optional[bool], optional): Disable box characters that don't display on windows legacy terminal with *raster* fonts. Defaults to True.
    padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
    pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.
    show_header (bool, optional): Show a header row. Defaults to True.
    show_footer (bool, optional): Show a footer row. Defaults to False.
    show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
    show_lines (bool, optional): Draw lines between every row. Defaults to False.
    leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
    style (Union[str, Style], optional): Default style for the table. Defaults to "none".
    row_styles (List[Union, str], optional): Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
    header_style (Union[str, Style], optional): Style of the header. Defaults to "table.header".
    footer_style (Union[str, Style], optional): Style of the footer. Defaults to "table.footer".
    border_style (Union[str, Style], optional): Style of the border. Defaults to None.
    title_style (Union[str, Style], optional): Style of the title. Defaults to None.
    caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
    title_justify (str, optional): Justify method for title. Defaults to "center".
    caption_justify (str, optional): Justify method for caption. Defaults to "center".
    highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
columnsrowsN)r   r   FTr   noneztable.headerztable.footercenter)titlecaptionr7   r8   r   safe_boxpaddingcollapse_paddingpad_edgeexpandshow_headershow_footer	show_edge
show_linesleadingr0   
row_stylesr.   r/   border_styletitle_stylecaption_styletitle_justifycaption_justifyr<   headersrj   rk   r7   r8   r   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   r0   rv   r.   r/   rw   rx   ry   rz   r$   r{   r<   r@   c                   / U l         / U l        Xl        X l        X0l        X@l        XPl        X`l        [        R                  " U5      U l
        Xl        Xl        Xl        Xl        Xl        Xl        Xl        Xl        UU l        U=(       d    SU l        U=(       d    SU l        UU l        UU l        UU l        UU l        UU l        UU l        [9        U=(       d    / 5      U l        U R                   R<                  nU HK  n[?        U[@        5      (       a  U RC                  US9  M)  [E        U R                   5      Ul#        U" U5        MM     g )Nr+   )r,   )$rf   rg   rj   rk   r7   r8   r   rl   r   unpack_paddingro   _expandrq   rr   rs   rt   ru   rn   r0   r.   r/   rw   rx   ry   rz   r{   r<   rX   rv   append
isinstancestr
add_columnlenr=   )rD   rj   rk   r7   r8   r   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   r0   rv   r.   r/   rw   rx   ry   rz   r{   r<   r|   append_columnr,   s                                rE   __init__Table.__init__   s   : &(!	

" w/ &&"$ 0
(.B(.B(&*.;0?"/3J4D"/E++F&#&&v. #DLL 1f% rH   )rm   rn   ro   rp   c                     U " USUUSSSUUS.6$ )ay  Get a table with no lines, headers, or footer.

Args:
    *headers (Union[Column, str]): Column headers, either as a string, or :class:`~rich.table.Column` instance.
    padding (PaddingDimensions, optional): Get padding around cells. Defaults to 0.
    collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to True.
    pad_edge (bool, optional): Enable padding around edges of table. Defaults to False.
    expand (bool, optional): Expand the table to fit the available space if ``True``, otherwise the table width will be auto-calculated. Defaults to False.

Returns:
    Table: A table instance.
NF)r   rm   rn   rq   rr   rs   ro   rp   rO   )clsrm   rn   ro   rp   r|   s         rE   grid
Table.grid   s,    * -

 
	
rH   c                 D    U R                   =(       d    U R                  SL$ )z-Setting a non-None self.width implies expand.N)r   r7   rC   s    rE   rp   Table.expand  s     ||5tzz55rH   c                     Xl         g)zSet expand.N)r   )rD   rp   s     rE   rp   r   #  s	     rH   c                     SnU R                   (       a  U R                  (       a  US-  nU R                   (       a  U[        U R                  5      S-
  -  nU$ )z'Get extra width to add to cell content.r      r   )r   rs   r   rf   )rD   r7   s     rE   _extra_widthTable._extra_width(  sC     88QJE88S&**ErH   c                 ,    [        U R                  5      $ )zGet the current number of rows.)r   rg   rC   s    rE   	row_countTable.row_count2  s     499~rH   consoler"   indexc                    [         R                  " 5       nU R                  (       a6  X1R                  U R                  U[	        U R                  5      -     5      -  nU R
                  U   R                  nUb  X1R                  U5      -  nU$ )zGet the current row style.)r   nullrv   	get_styler   rg   r0   )rD   r   r   r0   	row_styles        rE   get_row_styleTable.get_row_style7  sp    

??&&tus4???S7S'TUUEIIe$**	 &&y11ErH   optionsr#   c           	      :   UR                   nU R                  b  U R                  nUS:  a  [        SS5      $ U R                  n[	        U R                  XR                  X4-
  5      5      5      nU R                  nU R                   Vs/ s H  nU" XR                  U5      U5      PM     nn[	        S U 5       5      U-   nU R                  c  [	        S U 5       5      U-   OU R                  n	[        X5      n
U
R                  U R                  5      n
U
$ s  snf )Nr   c              3   8   #    U  H  oR                   v   M     g 7fN)minimum.0measurements     rE   	<genexpr>)Table.__rich_measure__.<locals>.<genexpr>W       D|##|   c              3   8   #    U  H  oR                   v   M     g 7fr   )maximumr   s     rE   r   r   Z  r   r   )r9   r7   r   r   sum_calculate_column_widthsupdate_width_measure_columnrf   clampr8   )rD   r   r   r9   extra_widthr   columnmeasurementsminimum_widthmaximum_widthr   s              rE   __rich_measure__Table.__rich_measure__A  s!    %%	::!

Iq=q!$$''))--i.EF
	
 .. ,,
& G%9%9)%DfM& 	 

 D|DD{R 	
 

" D|DD{R 	
 "-?!''7
s   	"Dc                     U R                   $ )zGet cell padding.)r   rC   s    rE   rm   Table.paddingb  s     }}rH   c                 <    [         R                  " U5      U l        U $ )zSet cell padding.)r   r~   r   )rD   rm   s     rE   rm   r   g  s      w/rH   r1   r3   r5   )r.   r<   r/   r0   r2   r4   r6   r7   r8   r9   r:   r;   r,   r&   r-   r2   r4   r   r6   r%   r9   r:   r;   c                    [        [        U R                  5      UUU=(       d    SUb  UOU R                  U=(       d    SU=(       d    SUUU	U
UUUUS9nU R                  R	                  U5        g)a  Add a column to the table.

Args:
    header (RenderableType, optional): Text or renderable for the header.
        Defaults to "".
    footer (RenderableType, optional): Text or renderable for the footer.
        Defaults to "".
    header_style (Union[str, Style], optional): Style for the header, or None for default. Defaults to None.
    highlight (bool, optional): Whether to highlight the text. The default of None uses the value of the table (self) object.
    footer_style (Union[str, Style], optional): Style for the footer, or None for default. Defaults to None.
    style (Union[str, Style], optional): Style for the column cells, or None for default. Defaults to None.
    justify (JustifyMethod, optional): Alignment for cells. Defaults to "left".
    vertical (VerticalAlignMethod, optional): Vertical alignment, one of "top", "middle", or "bottom". Defaults to "top".
    overflow (OverflowMethod): Overflow method: "crop", "fold", "ellipsis". Defaults to "ellipsis".
    width (int, optional): Desired width of column in characters, or None to fit to contents. Defaults to None.
    min_width (Optional[int], optional): Minimum width of column, or ``None`` for no minimum. Defaults to None.
    max_width (Optional[int], optional): Maximum width of column, or ``None`` for no maximum. Defaults to None.
    ratio (int, optional): Flexible ratio for the column (requires ``Table.expand`` or ``Table.width``). Defaults to None.
    no_wrap (bool, optional): Set to ``True`` to disable wrapping of this column.
r+   N)r=   r,   r-   r.   r<   r/   r0   r2   r4   r6   r7   r8   r9   r:   r;   )r)   r   rf   r<   r   )rD   r,   r-   r.   r<   r/   r0   r2   r4   r6   r7   r8   r9   r:   r;   r   s                   rE   r   Table.add_columnm  sr    N t||$%+#,#8idnn%++2
" 	F#rH   r0   r^   renderablesr^   c                   S[         SSSS4S jn[        U5      nU R                  n[        U5      [        U5      :  a  / UQS/[        U5      [        U5      -
  -  Qn[	        U5       H  u  pxU[        U5      :X  aT  [        XpR
                  S9n	U R                   H  n
U" U	[        S5      5        M     U R                  R                  U	5        OXg   n	Uc  U" U	S5        Mz  [        U5      (       a
  U" X5        M  [        R                  " S	[        U5      R                   S
35      e   U R                  R                  [        XS95        g)a  Add a row of renderables.

Args:
    *renderables (None or renderable): Each cell in a row must be a renderable object (including str),
        or ``None`` for a blank cell.
    style (StyleType, optional): An optional style to apply to the entire row. Defaults to None.
    end_section (bool, optional): End a section and draw a line. Defaults to False.

Raises:
    errors.NotRenderableError: If you add something that can't be rendered.
r   rb   r&   r@   Nc                 :    U R                   R                  U5        g r   )r?   r   )r   rb   s     rE   add_cellTable.add_row.<locals>.add_cell  s    MM  ,rH   )r=   r<   r+   zunable to render z1; a string or other renderable object is requiredr   )r)   rX   rf   r   	enumerater<   rg   r    r   r   r   NotRenderableErrortyperP   r\   )rD   r0   r^   r   r   cell_renderablesrf   r   rb   r   _s              rE   add_rowTable.add_row  s@   $	-V 	-1A 	-d 	- >B+=N,, 3w</ ! 3w<#.>*??@  "++;!<EG$uGAVT"X. ###F+ !$z**,//'Z(8(A(A'BBst  "=  			5BCrH   c                 P    U R                   (       a  SU R                   S   l        gg)z2Add a new section (draw a line after current row).TN)rg   r^   rC   s    rE   add_sectionTable.add_section  s      99(,DIIbM% rH   r'   c           	   #     ^^#    U R                   (       d  [        S5      v   g UR                  nU R                  b  U R                  nU R                  nU R                  TUR                  X4-
  5      5      n[        U5      U-   nUR                  X`R                  S S9m SS[        S[        SSSS4UU4S	 jjjnU R                  (       aC  U" U R                  [        R                  " U R                  S
5      U R                   S9 S h  vN   U R#                  TTU5       S h  vN   U R$                  (       aD  U" U R$                  [        R                  " U R&                  S5      U R(                  S9 S h  vN   g g  Nu N\ N
7f)N
)r7   r<   heighttextr0   r2   r$   r@   r'   c                    > [        U [        5      (       a  TR                  XSS9OU nTR                  UTR	                  US9S9$ )NF)r0   r<   r2   )r   )r   r   
render_strrenderupdate)r   r0   r2   render_textr   render_optionss       rE   render_annotation1Table.__rich_console__.<locals>.render_annotation  sZ    
 dC(( ""4"F 
 >>^%:%:7%:%K "  rH   ztable.title)r0   r2   ztable.caption)ri   )rf   r   r9   r7   r   r   r   r   r   r<   r!   r   rj   r   
pick_firstrx   rz   _renderrk   ry   r{   )	rD   r   r   r9   r   widthstable_widthr   r   s	    `      @rE   __rich_console__Table.__rich_console__  sr     ||$-%%	::!

I''..W)))*AB
 &kK/  ( 

 JR
	
	#,
	7F
	
	 
	 ::(

&&t'7'7G**  
 <<@@@<<(&&t'9'9?K,,   
 	As7   DFFF&F'AF:F;FFFc           
         UR                   nU R                  nU Vs/ s H  oPR                  XU5      PM     nnU Vs/ s H  owR                  =(       d    SPM     nnU R                  n	U R
                  n
U R                  (       Ga/  U Vs/ s H*  oR                  (       d  M  UR                  =(       d    SPM,     nn[        U5      (       a  [        Xd5       VVs/ s H$  u  puUR                  (       a  SOUR                  PM&     nnnU Vs/ s H>  nUR                  (       d  M  UR                  =(       d    SU	" UR                  5      -   PM@     nnU[        U5      -
  n[        XU5      n[        U5      n[!        U5       H-  u  nnUR                  (       d  M  UU   [#        U5      -   UU'   M/     [        U5      nUU:  a  U R%                  UU Vs/ s H(  oUR                  SL =(       a    UR&                  (       + PM*     snU5      n[        U5      nUU:  a*  UU-
  n[)        US/[+        U5      -  X5      n[        U5      n[        X5       VVs/ s H'  u  nnU R                  XR-                  U5      U5      PM)     nnnU Vs/ s H  owR                  =(       d    SPM     nnUU:  a  U R                  (       d   U R.                  bn  UU R.                  U
-
  :  a[  U R.                  c  UO[1        U R.                  U
-
  U5      n[        UU-
  U5      n[        UU5       VVs/ s H  u  nnUU-   PM     nnnU$ s  snf s  snf s  snf s  snnf s  snf s  snf s  snnf s  snf s  snnf )zNCalculate the widths of each column, including padding, not including borders.r   r   N)r9   rf   r   r   _get_padding_widthr   rp   rM   r:   anyzipr7   r=   r   r   iterr   next_collapse_widthsr;   r   r   r   r8   min)rD   r   r   r9   rf   r   width_ranges_ranger   get_padding_widthr   colratiosfixed_widthsflex_minimumflexible_widthflex_widthsiter_flex_widthsr   r   excess_widthr7   
_max_width
pad_widths_widthpads                             rE   r   Table._calculate_column_widths  s;    %%	,,IP
IPv  6: 	 
 5AAL&..%A%LA 33'';;;07H<<nciin1nFH6{{ +.l*D *D  Afnn<*D    #* ") KV\\&Q*;FMM*JJ")   
 "+S->!>.~|T#'#4 %.w%7ME6(4U(;dCS>T(Tu &8 &k"**MTUW6,,$&=v~~+==WUF
 f+KY&*Y6%lQC#f+4EvV!&k &)%9%9ME6 $$W.B.B5.I6R%9   9EEfnn))FE)#NN&;$..;:V+W >>) +5yA 
 **{*BFKJ69&*6MN6M{vsfsl6MFNq
 B I    V F Os@   MMM$M+MM(,M/M
.M M&*M+r   wrapablec                   ^ [        U5      nXC-
  n[        U5      (       a  U(       a  US:  a  [        S [        X5       5       5      m[        U4S j[        X5       5       5      nTU-
  n[        X5       VV	s/ s H  u  pUT:X  a	  U	(       a  SOSPM     n
nn	[        U
5      (       a  U(       d   U$ [	        XW5      /[        U5      -  n[        XZX5      n[        U5      nXC-
  nU(       a  US:  a  M  U$ s  sn	nf )a  Reduce widths so that the total is under max_width.

Args:
    widths (List[int]): List of widths.
    wrapable (List[bool]): List of booleans that indicate if a column may shrink.
    max_width (int): Maximum width to reduce to.

Returns:
    List[int]: A new list of widths.
r   c              3   <   #    U  H  u  pU(       d  M  Uv   M     g 7fr   rO   )r   r7   
allow_wraps      rE   r   )Table._collapse_widths.<locals>.<genexpr>]  s      !3H/eJEE3Hs   	c              3   J   >#    U  H  u  pU(       a  UT:w  a  UOS v   M     g7f)r   NrO   )r   r7   r   
max_columns      rE   r   r   `  s)      (-B) (EZ,?EQF-Bs    #r   )r   r   maxr   r   r   r   )r   r   r   r9   total_widthr   second_max_columncolumn_differencer7   r   r   
max_reducer   s               @rE   r   Table._collapse_widthsK  s    &k".x==,"2  !36v3H! 
 %( (-0-B( %! %/1B$B! .1-B-B) !J.:QAE-B   6{{*;  ",BCc&kQ
%lJO!&k*6' ,"2( s   :C8column_indexr   c              #   B  ^^^^^^#    U R                   mU R                  mU R                  m[        T5      nUS:H  mU[	        U R
                  5      S-
  :H  m0 mS[        S[        S[        [        [        [        [        4   4UUUUUU4S jjn/ nUR                  nUR                  nU R                  (       aA  U" U R                  =(       d    S5      U" UR                  5      -   n	U" XR                  45        U" UR                  =(       d    S5      n
UR                   H  nU" X45        M     U R                   (       aA  U" U R"                  =(       d    S5      U" UR"                  5      -   nU" XR$                  45        U(       aY  [&        n[)        U5       HC  u  pu  nn[+        UU" UU" X5      5      [-        USS	5      =(       d    UR.                  5      v   ME     g	U H3  u  nn[+        UU[-        USS	5      =(       d    UR.                  5      v   M5     g	7f)
z3Get all the cells with padding and optional header.r   r   	first_rowlast_rowr@   c                   > TR                  X45      nU(       a  U$ Tu  p4pVT	(       a*  T
(       d  [        SXd-
  5      nU(       d  [        SX5-
  5      nT(       d$  T
(       a  SnT(       a  SnU (       a  SnU(       a  SnX4XV4nUTX4'   U$ )Nr   )getr  )r	  r
  cachedr3   rightbottomr1   r   _padding_cachern   first_columnlast_columnro   rm   s           rE   get_padding%Table._get_cells.<locals>.get_padding  s    #''(=>F'.$C#q$,/D CL1FDECFF1H4<NI01OrH   r+   r4   N)rn   ro   rm   r   r   rf   rW   r   rV   r   r   rq   r.   r,   r0   rJ   rr   r/   r-   r   r   r`   getattrr4   )rD   r   r  r   any_paddingr  	raw_cells_appendr   r.   
cell_stylecellr/   _Paddingfirstlastr0   rb   r  rn   r  r  ro   rm   s                     @@@@@@rE   
_get_cellsTable._get_cellsr  s    
  00==,,'l#q("c$,,&7!&;;MO	4 	4 	E#sCQTBT<U 	 	2 ?A	""%%	$T%6%6%<"=	##A L \==12v||1r2
LLDZ&' !$T%6%6%<"=	##A L \==12H4CI4N00eZZU)ABJ
D9LV__  5O &/!zJ
D9LV__  &/s   HHc                 r    U R                   u  p#p$U R                  (       a  US:  a  [        SXC-
  5      nXC-   $ )zGet extra width from padding.r   )rm   rn   r  )rD   r  r   	pad_rightpad_lefts        rE   r   Table._get_padding_width  s9    $(LL!a  aq("67##rH   c                    UR                   nUS:  a  [        SS5      $ U R                  UR                  5      nUR                  b5  [        UR                  U-   UR                  U-   5      R                  U5      $ / n/ nUR                  nUR                  n	[        R                  n
U R                  XR                  U5       H(  nU
" XUR                  5      u  pU" U5        U	" U5        M*     [        U(       a  [        U5      OSU(       a  [        U5      OU5      R                  U5      nUR                  UR                  c  SOUR                  U-   UR                   c  S5      nU$ UR                   U-   5      nU$ )z0Get the minimum and maximum width of the column.r   r   N)r9   r   r   r=   r7   with_maximumr   r  r  rb   r  r   r8   )rD   r   r   r   r9   padding_width
min_widths
max_widths
append_min
append_maxget_render_widthr  _min_maxr   s                  rE   r   Table._measure_column  sj    %%	q=q!$$//><<#},fll].Jl9%& !#
 "
&&
&&
&??OOG]]FCD)'DOOLJDtt D
 ")C
Oq)C
Oy
 ,y
! 	 "''$$,D&2B2B]2R$$,D
  392B2B]2R
 rH   c              #     ^ ^^*^+^,^-#    TR                  T R                  =(       d    S5      nUTR                  T R                  =(       d    S5      -   nUU 4S j[        T R                  5       5       n[        [        U6 5      nT R                  (       a8  T R                  R                  U[        T R                  TR                  5      S9OS nU(       a!  T R                  (       d  UR                  5       OUn[        R                  " 5       n	T R                  n
T R                  nT R                  nT R                   nT R"                  nT R$                  n[        m*U(       a  T*" UR&                  U5      T*" UR(                  U5      T*" UR*                  U5      4T*" UR,                  U5      T*" UR.                  U5      T*" UR0                  U5      4T*" UR2                  U5      T*" UR4                  U5      T*" UR6                  U5      4/nU(       a  T*" UR9                  U5      U5      v   U	v   O/ nT R:                  nTR                   n[        [=        U5      5       GH  u  nu  nnnU=(       a    Um,U=(       a    Um+T,(       d  T+(       d  T R>                  UU-
     OS nSn/ nT,(       d  T+(       a  [@        RB                  " 5       nOU" U" TU(       a  US-
  OU5      5      n[        UUU
5       H  u  nnnURE                  UURF                  URH                  URJ                  S URL                  S9nTRO                  URP                  UU" UR                  5      U-   S9n[S        U[U        U5      5      nURW                  U5        M     [S        S U 5       5      m-S[X        [X        [              S	S
S[Z        S[@        S[X        [X        [              4
U*U+U,U-4S jjn [        UUUU
5       VV!VVs/ s HA  u  nn!nnT*R]                  U " UU!R^                  UU" U!R                  5      U-   5      UU5      PMC     snnn!nUS S & U(       a  U(       a%  U(       a  T*" URa                  USUS9U5      v   U	v   UU(       a  SO
U(       a  SOS   u  n"n#n$U$Rb                  Re                  5       (       a  U$O)T*" U$Rb                  URf                  U$R                  -   5      n%[i        U5       HL  n&U(       a  U"v   [k        U5       H   u  n'n(U(U&    S h  vN   U'(       a  M  U%v   M"     U(       a  U#v   U	v   MN     O,[i        U5       H  n&U H  n(U(U&    S h  vN   M     U	v   M     U(       a,  U(       a%  U(       a  T*" URa                  USUS9U5      v   U	v   U=(       a    URl                  n)U(       d  GMX  U(       d  U(       d
  U)(       d  GMp  U(       a  GMz  U(       a  U[U        U5      S-
  :  a  GM  U(       a
  T,(       a  GM  U(       a  T*" URa                  USUS9U-  U5      v   OT*" URa                  USUS9U5      v   U	v   GM     U(       a'  U(       a  T*" URo                  U5      U5      v   U	v   g g g s  snnn!nf  GNv GN47f)Nr+   c              3   L   >#    U  H  u  pTR                  TX5      v   M     g 7fr   )r  )r   r  r   r   rD   s      rE   r    Table._render.<locals>.<genexpr>  s)      
(?$ OOG\::(?s   !$)safer   )r7   r2   r;   r6   r   r<   r0   c              3   8   #    U  H  n[        U5      v   M     g 7fr   )r   )r   r  s     rE   r   r1  E  s     954SYY5r   r  r4   r   r7   r0   r@   c                    > T(       a  SnO	T(       a  SnUS:X  a  TR                  XTU5      $ US:X  a  TR                  XTU5      $ TR                  XTU5      $ )Nr  r3   middle)	align_topalign_middlealign_bottom)r  r4   r7   r0   _Segment
footer_row
header_row
row_heights       rE   
align_cell!Table._render.<locals>.align_cellG  sd     'H$Hu$#--d:uMM)#00j%PP,,T*eLLrH   foot)edger   r   headmidrow)8r   r0   rw   r   rf   rX   r   r   
substituter   rl   rq   get_plain_headed_boxr   linerr   rs   rt   ru   	head_left
head_righthead_verticalmid_left	mid_rightmid_vertical	foot_left
foot_rightfoot_verticalget_topr   r   rg   r   r   r   r2   r;   r6   r<   render_linesrb   r  r   r   r	   rV   	set_shaper4   get_rowr   stripbackground_styleranger   r^   
get_bottom).rD   r   r   r   table_stylerw   _column_cells	row_cells_boxnew_linerf   rq   rr   rs   rt   ru   box_segmentsr   r   r   r  r  row_cellrD  
max_heightrJ   r   r7   r  r   r   linesr>  _cellr1   r  _dividerdividerline_no	last_cellrendered_cellr^   r:  r;  r<  r=  s.   ``                                        @@@@rE   r   Table._render  s     ''

(8b9"W%6%6t7H7H7NB%OO
(1$,,(?
 .2#}2E-F	
 xx HHiw7G7GH     	 /34;K;Kt((*QU<<>,,&&&&NN	__
,, T^^\:T__l;T//> T]]L9T^^\:T..= T^^\:T__l;T//>L" t||F3\BBL**%%	.7	8R.S*E*E4.;J-+J #: 		%+-. 
 J/1EZ!JJL	%!'519O	 (+68W'E#tV!("NN"NN#__$.. "0 "  ,,OO"#DJJ/); - 
 !SZ8
U# (F" 9599JM4=)M/M M 	M
 d7m$M M8 36fhw2W 3X.E5$ ""!%++.:	 	 3XE!H K"VV)Dl  #N(4%Q4aUV(X%eX
  }}**,, ! y'A'AHNN'R   %Z0G "
4=e4D0	=#0#999(y")M 5E !#"N  1  %Z0G).#0#999 */"N  1 +LLiL@,  1#//Ktw++(Uc)nq6H-H(ZZ& LLYLG'Q( 
 ' LLYLG  #Nm /Tp I4??62LAAN 4ID : :sX   O+Z3AY=;CZZ
	Z7ZZ
AZ7ZZZ5ZB ZZ)r   r   rw   r   rk   r{   ry   rn   rf   r/   r.   r<   ru   r8   ro   rv   rg   rl   rs   rr   rq   rt   r0   rj   rz   rx   r7   )r+   r+   )r@   N)r   r"   r   r#   r@   r'   ).rP   rQ   rR   rS   rT   r	   r)   rU   r\   r   
HEAVY_HEADr   r   r   r!   rV   BoxrW   r   r   r   r   classmethodr   rY   rp   setterr   r   r   r   r   r   rm   r   r   r   r   r   r   r`   r  r   r   r   rZ   rO   rH   rE   rd   rd      s   > &\
s)O
 %)&*##'!$#'%+!& ! !48,:,:,0+/-1)1+37>&$>& !>& (#	>&
 }>& C=>& cgg>& 4.>& #>& >& >& >& >& >& >&  !>&" #>&$ %>&& Xi01'>&( y))>&* y)+>&, y)->&. i(/>&0  	*1>&2 '3>&4 )5>&6 7>&8 
9>&@  &'!%
$
 #
 	

 
 
 

 
@ 6 6 6 ]]T d   c   3  Y s y  +;	B sCc12   ^^0 W   $&#%8$
 -1$(,0%)#)*/%/##'#'#!8$ 8$ !8$
 y)8$ D>8$ y)8$ 	"8$ !8$ (8$ #8$ }8$ C=8$ C=8$ }8$  !8$" 
#8$z &*!	-D/0-D 	"-D 	-D
 
-D^-- -+;-	-^> >+;>	c>@ $#Y$*.t*$AD$	c$ $LG G03G=CG	%GR$s $s $&& "& 	&
 
&Ps s+;sEI#Ys	srH   rd   __main__)r"   )ReprHighlighter)timerzTable renderzStar Wars MovieszRich example tabler  )rj   rk   r{   Releasedbright_cyancyanT)r.   r0   r;   Titlemagentar3  z
Box Officegreen)r2   r0   zDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zon blackr   zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889r   r@   Nc                     [         R                  5         [         R                  [        U 5      5        [         R                  5         g r   )r   printruler<   )r   s    rE   r,   r,     s$    MMOLL4)MMOrH   zExample Tableri   r   zexpand=True2   zwidth=50Fdimrh   zrow_styles=['dim', 'none']z%leading=1, row_styles=['dim', 'none']z+show_lines=True, row_styles=['dim', 'none'])Idataclassesr   r   r   typingr   r   r   r	   r
   r   r   r   r   r+   r   r   _loopr   r   _pickr   _ratior   r   alignr   jupyterr   measurer   rm   r   r   protocolr   segmentr   r0   r   r   r   r    r!   r   r"   r#   r$   r%   r&   r'   r)   r\   r`   rd   rP   pip._vendor.rich.consolepip._vendor.rich.highlighterrn  _timerro  tabler   r   r   r,   r<   rw  rp   r7   rv   ru   rt   rO   rH   rE   <module>r     s   1 1
 
 
  -  2 & !   / #  #    Z& Z& Z&z M M M#J #DL DN z0<	~	$(#
 	]&$ 	 	
 		2wgF.	

 	n&?P/ 	 	
 	*	
	 	 	
 )#%	eX.}ezeX.!6?+,eX.!6?67eX.!6?<=eX.O 
	  
	s   !FJ
J