
    A>iPI                    :   % S r SSKJr  SSKJrJrJrJr  SSKrSSK	J
r
JrJrJr  SSKJr  SSKJr  SSKJr  SS	KJr  \
(       a  SS
KJr  \\\4   \\   -  rS\S'   \" S5      r\" S5      rS S jrS!S"S jjr S#         S$S jjr S#         S%S jjr      S&             S'S jjr! S(       S)S jjr"S*S jr#S+S,S jjr$    S-             S.S jjr%      S/S jr& " S S\'\\4   5      r( " S S5      r) " S S\)5      r*S0S jr+g)1z
Printing tools.
    )annotations)CallableIterableMappingSequenceN)TYPE_CHECKINGAny	TypeAliasTypeVar)east_asian_width)
get_option)is_sequence)get_console_size)ListLiker
   EscapeChars_KT_VTc           	        UR                  S[        5      nUR                  S[        5      n/ nUSS  Vs/ s H  n[        [	        X65      5      U -   PM     nnUR                  [        [	        [        US   5      5      5        [        [	        [        U5      5      n[        U5       H:  u  pU" XU	   SS9nSXy   -  /U[        U
5      -
  -  U-   nUR                  U5        M<     [        USS	06nS
R                  S U 5       5      $ s  snf )a  
Glues together two sets of strings using the amount of space requested.
The idea is to prettify.

----------
space : int
    number of spaces for padding
lists : str
    list of str which being joined
strlen : callable
    function used to calculate the length of each str. Needed for unicode
    handling.
justfunc : callable
    function used to justify str. Needed for unicode handling.
strlenjustfuncNleft)mode strictT
c              3  D   #    U  H  nS R                  U5      v   M     g7f) N)join).0liness     Y/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pandas/io/formats/printing.py	<genexpr>adjoin.<locals>.<genexpr>@   s     8RWWU^^s    )	poplen_adj_justifymaxmapappend	enumeratezipr   )spacelistskwargsr   r   newListsxlengthsmaxLenilstnltoJoins                r"   adjoinr8   #   s      ZZ#&Fzz*l3HH49#2J?Jqs3v>"U*JG?NN3s3b	*+,S%!FE"c1:F3WZ FSX$56"< # ((4(F998888 @s   !D	c                    US:X  a!  U  Vs/ s H  o3R                  U5      PM     sn$ US:X  a!  U  Vs/ s H  o3R                  U5      PM     sn$ U  Vs/ s H  o3R                  U5      PM     sn$ s  snf s  snf s  snf z:
Perform ljust, center, rjust against string or list-like
r   centerljustr;   rjust)textsmax_lenr   r1   s       r"   r'   r'   C   sr     v~*/0%Q %00		+015a!511*/0%Q %00	 110   A0A5A:c                2   [        U [        5      (       a  SnO-[        U [        5      (       a  SnO[        U S5      (       a  SOSnUSL a  SnO&U=(       d    [	        S5      =(       d    [        U 5      n[        U 5      n/ nSn[        U5       H1  u  pUb	  X:  a  S	n  O$UR                  [        XS
-   4SU0UD65        M3     SR                  U5      nU(       a  US-  nO)[        U [        5      (       a  [        U 5      S
:X  a  US-  nUR                  US9$ )z
internal. pprinter for iterables. you should probably use pprint_thing()
rather than calling this directly.

bounds length of printed sequence, depending on options
z
{{{body}}}zfrozenset({{{body}}})__setitem__z[{body}]z({body})FNmax_seq_itemsT   , , ...,)body)
isinstanceset	frozensethasattrr   r&   iterr+   r*   pprint_thingr   tupleformat)seq	_nest_lvlrD   kwdsfmt	max_itemssrmax_items_reachedr4   itemrI   s               r"   _pprint_seqr[   g   s    #s	C	#	#%#C77jZ	!LZ%@LCH	S	A
AQ<! $	dMWWRVWX	  
 99Q<D	C		CHM::4:      c                   Sn/ nSnUSL a  [        U 5      nO&U=(       d    [        S5      =(       d    [        U 5      n[        U R                  5       5      SU  HB  u  pUR	                  UR                  [        XS-   4SU0UD6[        XS-   4SU0UD6S95        MD     U[        U 5      :  a!  UR                  SR                  U5      S	-   S
9$ UR                  SR                  U5      S
9$ )zm
internal. pprinter for iterables. you should probably use pprint_thing()
rather than calling this directly.
z{{{things}}}z{key}: {val}FrD   NrE   )keyvalrF   rG   )things)r&   r   listitemsr*   rQ   rO   r   )
rR   rS   rD   rT   rU   pairspfmtnitemskvs
             r"   _pprint_dictrh      s     CEDSI*_"=ISSYY[!'6*KK MWWRVW MWWRVW  	
 + Czz5!1G!;z<<zz5!1z22r\   c                  ^ U4     SU4S jjjn[        U S5      (       a  [        U 5      $ [        U [        5      (       a  U[	        S5      :  a  [        XSUS9nU$ [        U 5      (       a  U[	        S5      :  a  [        U UUUUS9nU$ [        U [        5      (       a  U(       a  SU" U 5       S3nU$ U" U 5      nU$ )	a  
This function is the sanctioned way of converting objects
to a string representation and properly handles nested sequences.

Parameters
----------
thing : anything to be formatted
_nest_lvl : internal use only. pprint_thing() is mutually-recursive
    with pprint_sequence, this argument is used to keep track of the
    current nesting level, and limit it.
escape_chars : list[str] or Mapping[str, str], optional
    Characters to escape. If a Mapping is passed the values are the
    replacements
default_escapes : bool, default False
    Whether the input escape characters replaces or adds to the defaults
max_seq_items : int or None, default None
    Pass through to other pretty printers to limit sequence printing

Returns
-------
str
c                  > SSSSS.n[        U[        5      (       a5  T(       a  UR                  U5        OUn[        UR	                  5       5      nOU=(       d    Sn[        U 5      nU H  nUR                  XBU   5      nM     U$ )Nz\tz\nz\rz\')	r   ' )rJ   r   updatera   keysstrreplace)thingescape_chars	translateresultcdefault_escapess        r"   as_escaped_string'pprint_thing.<locals>.as_escaped_string   s}     !UG	lG,,  .(	 1 1 34L'-2LUA^^A|4F r\   __next__zdisplay.pprint_nest_depthT)quote_stringsrD   rt   r|   rD   rm   )rs   r	   rt   EscapeChars | Nonereturnrq   )rM   rq   rJ   r   r   rh   r   r[   )rs   rS   rt   rx   r|   rD   ry   rv   s      `    r"   rO   rO      s    @ 8D"4	 $ uj!!5z	E7	#	#	J#5 ) D
& M! 
U			J7R,S S %''	
 M 
E3		M&u-.a0 M #5)Mr\   c                :    [        U 5      nUR                  X5      $ N)rO   encode)objectencodingerrorsvalues       r"   pprint_thing_encodedr      s      E<<))r\   c                  ^ S[         R                  ;  a  g SSKJn  U" 5       nUc  g UR                  R
                  nSnU (       a2  XC;  a#  SSKJn  SSKJ	m   " U4S jSU5      nU" 5       X4'   S	X4   l
        g XC;   a
  S
X4   l
        g g )NIPythonr   )get_ipythonz!application/vnd.dataresource+json)BaseFormatter
ObjectNamec                  .   > \ rS rSr Y " S5      r\4rSrg)<enable_data_resource_formatter.<locals>.TableSchemaFormatteri  _repr_data_resource_rn   N)__name__
__module____qualname____firstlineno__print_methoddict_return_type__static_attributes__r   s   r"   TableSchemaFormatterr     s    )*@A $wr\   r   TF)sysmodulesr   r   display_formatter
formattersIPython.core.formattersr   	traitletsr   enabled)enabler   ipr   mimetyper   r   r   s          @r"   enable_data_resource_formatterr     s    ## 
B	z%%00J2H%=,'} '
 $8#9J '+
$		',
$ 
 r\   c                    [        U SSUS9$ )N)rk   rl   r   Tr}   rO   )rs   rD   s     r"   default_pprintr   #  s    '#	 r\   c                  ^" [        5       u  pgUc  [        S5      =(       d    SnUc  [        U 5      R                  nU(       a"  [	        U5      nSSUS-   -   3n	SSUS-   -   3n
OSn	Sn
[	        U 5      nU(       a  S	S[	        U5      -  -   nOS
n[        S5      =(       d    UnX:  n[        5       m"            SU"4S jjnSU"4S jjnSnUS:X  a  SU 3nU$ US:X  a  U(       d  U" U S   5      nSU SU 3nU$ US:X  a*  U(       d#  U" U S   5      nU" U S   5      nSU SU SU 3nU$ US:X  a  / nU SS  Vs/ s H  nU" U5      PM     nnOeX:  aF  [        US-  S5      nU SU  Vs/ s H  nU" U5      PM     nnX* S  Vs/ s H  nU" U5      PM     nnO/ nU  Vs/ s H  nU" U5      PM     nnU(       a  U(       a  [        UU5      u  nnOU(       d<  [	        SR                  U5      5      U:  a  [	        SR                  U5      5      U:  dZ  [        U" U5      U" U5      5      nU Vs/ s H  nUR                  U5      PM     nnU Vs/ s H  nUR                  U5      PM     nnU(       a  U[	        U
5      -
  nUS   nSn[        [        S[	        U5      S-   5      5       H   n[        UUS9n[	        U5      U:  d  M  Un  O   U Vs/ s H  n[        UUS9PM     nnU Vs/ s H  n[        UUS9PM     nnSnU
nU H  nUU-   S-   n U" UUU Xj5      u  nnM     U(       a  UUR                  5       U
-   S-   -  nU
nUSS  H  n!U!U-   S-   n U" UUU Xj5      u  nnM     U" UUUS   US-
  U
5      u  nnUU-  nSUR                  S5      -   nUU-  n[	        U5      U:  d  U(       a  UU	-  nOUS-  nSU[	        U
5      S -   nU$ s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf )a  
Return the formatted obj as a unicode string

Parameters
----------
obj : object
    must be iterable and support __getitem__
formatter : callable
    string formatter for an element
is_justify : bool
    should justify the display
name : name, optional
    defaults to the class name of the obj
indent_for_name : bool, default True
    Whether subsequent lines should be indented to
    align with the name.
line_break_each_value : bool, default False
    If True, inserts a line break for each value of ``obj``.
    If False, only break lines when the a line of values gets wider
    than the display width.

Returns
-------
summary string
Nzdisplay.widthP   r   r   rE      z
 z,
 rH   zdisplay.max_seq_itemsc                   > TR                  UR                  5       5      TR                  UR                  5       5      -   U:  a  XR                  5       -  n UnX-  nX4$ r   )r&   rstrip)rW   liner   display_widthnext_line_prefixadjs        r"   _extend_line+format_object_summary.<locals>._extend_linej  sQ     774;;=!CGGELLN$;;}LA#Dwr\   c                >   > U (       a  [        U4S jU  5       5      $ g)Nc              3  F   >#    U  H  nTR                  U5      v   M     g 7fr   r&   )r    r1   r   s     r"   r#   :format_object_summary.<locals>.best_len.<locals>.<genexpr>u  s     26aswwqzz6s   !r   )r(   )valuesr   s    r"   best_len'format_object_summary.<locals>.best_lens  s    26222r\   rF   r   z[][]r   
   )rD   r   z...)rW   rq   r   rq   r   rq   r   intr   rq   r   ztuple[str, str])r   	list[str]r   r   )r   r   typer   r&   get_adjustmentmin_justifyr   r(   r>   reversedranger[   r   )#obj	formatter
is_justifynameindent_for_nameline_break_each_valuer   _name_lenspace1space2nseprD   is_truncatedr   r   closesummaryfirstlastheadr1   tail
max_length	max_spacer   rV   	num_itemspprinted_seqr   
head_valueword	tail_itemr   s#                                     @r"   format_object_summaryr   ,  s   B ()M"?39r|Cy!!t9shl+-.shl+-.CA sSY&67<1M $L 
C"%69MP	 EAvug,p No 
a-#a&!eWAeW%j Ni 
a-#a&!R!eWBtfAeW-b N_ AD*-bc(3(QIaL(D3DMQ&+A*-bq'2'QIaL'D2*-bc(3(QIaL(D3DD*-.#QIaL#D. $ &dD1
dDIIdO$}4		$(=8 !$$@
59:T
+T:59:T
+T: !
 &F3IGEI%eAs5zA~&>?	*5	J|$y0 )I	 @
 FJJTK;TDJEIJTK;TDJJ#c)D($mTMGT  t{{}v-55GDcrIs?S(D($mTMGT #
 %WdDHma>OQWX4 ell3''5w<=)-BvGsNG F..NY 4 33 / ;:" KJs0   >O.O	O $O%5O*O/O42O9c                   X-   nS/[        US   5      -  nU HE  nU Vs/ s H  n[        U5      PM     nn[        X6SS9 VVs/ s H  u  px[        Xx5      PM     nnnMG     U  V	s/ s H  n	[        S [        XSS9 5       5      PM     n
n	U V	s/ s H  n	[        S [        XSS9 5       5      PM     nn	X4$ s  snf s  snnf s  sn	f s  sn	f )a  
Justify items in head and tail, so they are right-aligned when stacked.

Parameters
----------
head : list-like of list-likes of strings
tail : list-like of list-likes of strings

Returns
-------
tuple of list of tuples of strings
    Same as head and tail, but items are right aligned when stacked
    vertically.

Examples
--------
>>> _justify([["a", "b"]], [["abc", "abcd"]])
([('  a', '   b')], [('abc', 'abcd')])
r   T)r   c              3  H   #    U  H  u  pUR                  U5      v   M     g 7fr   r>   r    r1   r@   s      r"   r#   _justify.<locals>.<genexpr>        S1R:1aggg1R    "c              3  H   #    U  H  u  pUR                  U5      v   M     g 7fr   r   r   s      r"   r#   r     r   r   )r&   r,   r(   rP   )r   r   combinedr   	inner_seqrZ   lengthr1   yrR   head_tuplestail_tupless               r"   r   r     s    , {H s8A;''J	(12	#d)	2,/
4,PQ,PDAc!i,P
Q
  C 	SST1RSS   C 	SST1RSS   ## 3Qs   B9B>&$C$C	c                  "    \ rS rSrSrSS jrSrg)
PrettyDicti  z.Dict extension to support abbreviated __repr__c                    [        U 5      $ r   r   selfs    r"   __repr__PrettyDict.__repr__  s    D!!r\   rn   N)r   rq   )r   r   r   r   __doc__r   r   rn   r\   r"   r   r     s
    8"r\   r   c                  @    \ rS rSrSS jrS	S jrS
SS jjrSS jrSrg)_TextAdjustmenti	  c                $    [        S5      U l        g )Nzdisplay.encoding)r   r   r   s    r"   __init___TextAdjustment.__init__
  s    "#56r\   c                    [        U5      $ r   r   r   texts     r"   r&   _TextAdjustment.len  s    4yr\   c                    US:X  a!  U Vs/ s H  oDR                  U5      PM     sn$ US:X  a!  U Vs/ s H  oDR                  U5      PM     sn$ U Vs/ s H  oDR                  U5      PM     sn$ s  snf s  snf s  snf r:   r<   )r   r?   r@   r   r1   s        r"   justify_TextAdjustment.justify  sr     6>.34eGGG$e44X/45u!HHW%u55.34eGGG$e44	 554rA   c                N    [        U/UQ7U R                  U R                  S.UD6$ )N)r   r   )r8   r&   r   )r   r-   r.   r/   s       r"   r8   _TextAdjustment.adjoin  s&    eVeVDHHt||VvVVr\   )r   Nr   Noner   rq   r   r   right)r?   r	   r@   r   r   rq   r   r   )r-   r   r.   r	   r/   r	   r   rq   )	r   r   r   r   r   r&   r   r8   r   rn   r\   r"   r   r   	  s    7	5Wr\   r   c                  T   ^  \ rS rSrSU 4S jjrSS jr S       S	S jjrSrU =r$ )
_EastAsianTextAdjustmenti  c                z   > [         TU ]  5         [        S5      (       a  SU l        OSU l        SSSSSS.U l        g )Nz!display.unicode.ambiguous_as_wider   rE   )NaNWFH)superr   r   ambiguous_width_EAW_MAP)r   	__class__s    r"   r   !_EastAsianTextAdjustment.__init__   s>    9::#$D #$D 
  !qqqqAr\   c                n   ^  [        U[        5      (       d  [        U5      $ [        U 4S jU 5       5      $ )z>
Calculate display width considering unicode East Asian Width
c              3     >#    U  H4  nTR                   R                  [        U5      TR                  5      v   M6     g 7fr   )r  getr   r  )r    rw   r   s     r"   r#   /_EastAsianTextAdjustment.len.<locals>.<genexpr>3  s5      
RVQDMM.q143G3GHHRVs   <?)rJ   rq   r&   sumr   s   ` r"   r&   _EastAsianTextAdjustment.len,  s6     $$$t9 
RV
 
 	
r\   c                8  ^ ^ SUU 4S jjnUS:X  a'  U Vs/ s H  oUR                  U" U5      5      PM     sn$ US:X  a'  U Vs/ s H  oUR                  U" U5      5      PM     sn$ U Vs/ s H  oUR                  U" U5      5      PM     sn$ s  snf s  snf s  snf )Nc                D   > TTR                  U 5      -
  [        U 5      -   $ r   r   )tr@   r   s    r"   _get_pad2_EastAsianTextAdjustment.justify.<locals>._get_pad;  s    TXXa[(3q611r\   r   r;   )r  rq   r   r   r<   )r   r?   r@   r   r  r1   s   ` `   r"   r    _EastAsianTextAdjustment.justify7  s    	2 	2 6>278%QGGHQK(%88X3895aHHXa[)599278%QGGHQK(%88	 998s    B B* B)r  r  r  r  r  r?   zIterable[str]r@   r   r   rq   r   r   )	r   r   r   r   r   r&   r   r   __classcell__)r  s   @r"   r
  r
    s>    
B	
 ?F9"9-098;9	9 9r\   r
  c                 N    [        S5      n U (       a
  [        5       $ [        5       $ )Nz display.unicode.east_asian_width)r   r
  r   )use_east_asian_widths    r"   r   r   F  s#    %&HI'))  r\   )r-   r   r.   r   r/   r	   r   rq   r  r"  )r   N)
rR   r   rS   r   rD   
int | NonerT   r	   r   rq   )
rR   r   rS   r   rD   r&  rT   r	   r   rq   )r   NFFN)rs   r   rS   r   rt   r~   rx   boolr|   r'  rD   r&  r   rq   )zutf-8rr   )r   r   r   rq   r   rq   r   bytes)r   r'  r   r  r   )rs   r	   rD   r&  r   rq   )TNTF)r   r   r   r   r   r'  r   z
str | Noner   r'  r   r'  r   rq   )r   list[Sequence[str]]r   r)  r   z3tuple[list[tuple[str, ...]], list[tuple[str, ...]]])r   r   ),r   
__future__r   collections.abcr   r   r   r   r   typingr   r	   r
   r   unicodedatar   pandas._configr   pandas.core.dtypes.inferencer   pandas.io.formats.consoler   pandas._typingr   rq   r   __annotations__r   r   r8   r'   r[   rh   rO   r   r   r   r   r   r   r   r   r
  r   rn   r\   r"   <module>r3     s%   #    ) % 4 6' c*Xc]:Y :enen9@	1J DH%!	%!!%!6@%!QT%!%!R CG3	3 35?3PS33B '+! $III %I 	I
 I I 	IZ <E**!*58*
*-D  "'h	hh h 	h
 h  h 	hV($
($%8($8($V"c3h "W W,$9 $9N!r\   