ó
    Ñ]jõI  ã                   óh  • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
JrJrJrJrJrJrJrJr  SSKJrJrJrJr  SSK
Jr   " S S	\5      r " S
 S\\   5      rS5S\S\S\S\S\4
S jjrS\\\\   4   S\\   4S jr S6S\S\S\S\4S jjr!S\S\4S jr"S\S\4S jr#S\S\4S jr$ " S S\5      r% " S S \5      r& " S! S"\&5      r' S7S#\\   S$\S%\S\\\      4S& jjr(S'\\   S%\S(\S)\S\\\4   4
S* jr)\" S+5      r*S,\\*   S-\S.\*S\*4S/ jr+ S8S0\\   S1\S2\S3\S\4
S4 jjr,g)9z~
Utilities for working with strings and text.

Inheritance diagram:

.. inheritance-diagram:: IPython.utils.text
   :parts: 3
é    N)Ú	Formatter)ÚPath)ÚListÚDictÚTupleÚOptionalÚcastÚAnyÚUnionÚTypeVar)ÚSequenceÚMappingÚCallableÚIterator)ÚSelfc                   óØ   • \ rS rSr% Sr\\   \S'   \\S'   \\   \S'   S\\   4S jr	\
" \	5      =rrS\4S jr\
" \5      =rrS\4S	 jr\
" \5      =rrS\\   4S
 jr\
" \5      =rrSrg)ÚLSStringé"   a<  String derivative with a special access attributes.

These are normal strings, but with the special attributes:

    .l (or .list) : value as list (split on newlines).
    .n (or .nlstr): original value (the string itself).
    .s (or .spstr): value as whitespace-separated string.
    .p (or .paths): list of path objects (requires path.py package)

Any values which require transformations are computed only once and
cached.

Such strings are very useful to efficiently interact with the shell, which
typically only understands whitespace-separated options for commands.Ú_LSString__listÚ_LSString__spstrÚ_LSString__pathsÚreturnc                 ó€   •  U R                   $ ! [         a%    U R                  S5      U l         U R                   s $ f = f©NÚ
)r   ÚAttributeErrorÚsplit©Úselfs    ÚO/home/mande/repo/quber/.venv/lib/python3.13/site-packages/IPython/utils/text.pyÚget_listÚLSString.get_list6   s:   € ð	Ø—;‘;ÐøÜó 	ØŸ*™* TÓ*ˆDŒKØ—;‘;Òð	úó   ‚ Ž,=¼=c                 ó‚   •  U R                   $ ! [         a&    U R                  SS5      U l         U R                   s $ f = f)Nr   Ú )r   r   Úreplacer   s    r    Ú	get_spstrÚLSString.get_spstr?   s<   € ð	 Ø—<‘<ÐøÜó 	 ØŸ<™<¨¨SÓ1ˆDŒLØ—<‘<Òð	 ús   ‚ Ž->½>c                 ó   • U $ ©N© r   s    r    Ú	get_nlstrÚLSString.get_nlstrH   ó   € Øˆó    c                 ó  •  U R                   $ ! [         ak    U R                  S5       Vs/ s H4  n[        R                  R                  U5      (       d  M)  [        U5      PM6     Os  snf snU l         U R                   s $ f = fr   )r   r   r   ÚosÚpathÚexistsr   ©r   Úps     r    Ú	get_pathsÚLSString.get_pathsM   sa   € ð	 Ø—<‘<ÐøÜó 	 Ø-1¯Z©Z¸Ô-=ÓSÒ-=¨ÄÇÁÇÁÐPQ×AR›GœD žGÒ-=ùÔSˆDŒLØ—<‘<Òð	 ús    ‚ ŽB«(A'ÁA'Á&BÂB)Ú__listÚ__pathsÚ__spstrN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   ÚstrÚ__annotations__r   r!   ÚpropertyÚlÚlistr'   ÚsÚspstrr   r,   ÚnÚnlstrr6   r5   ÚpathsÚ__static_attributes__r+   r/   r    r   r   "   sŸ   ‡ ñMð �‰IÓØƒLØ�$‰ZÓð˜$˜s™)ô ñ ˜Ó!Ð!€Aˆð ˜3ô  ñ ˜Ó#Ð#€Aˆð˜4ô ñ ˜Ó#Ð#€Aˆð ˜4 ™:ô  ñ ˜Ó#Ð#€A‹r/   r   c            	       óx  • \ rS rSr% Sr\\S'   \\S'   \\   \S'   S\	4S jr
\" \
5      =rrS\4S jr\" \5      =rrS\4S	 jr\" \5      =rrS\\   4S
 jr\" \5      =rr  SS\\\\/\R6                  \   S-  4   4   S\S\\   S\	4S jjrS\\   S\\\      4S jr   SS\\\      S\S\	4S jjr!Sr"g)ÚSListéc   až  List derivative with a special access attributes.

These are normal lists, but with the special attributes:

* .l (or .list) : value as list (the list itself).
* .n (or .nlstr): value as a string, joined on newlines.
* .s (or .spstr): value as a string, joined on spaces.
* .p (or .paths): list of path objects (requires path.py package)

Any values which require transformations are computed only once and
cached.Ú_SList__spstrÚ_SList__nlstrÚ_SList__pathsr   c                 ó   • U $ r*   r+   r   s    r    r!   ÚSList.get_listt   r.   r/   c                 ó€   •  U R                   $ ! [         a%    SR                  U 5      U l         U R                   s $ f = f)Nr%   )rN   r   Újoinr   s    r    r'   ÚSList.get_spstry   s9   € ð	 Ø—<‘<ÐøÜó 	 ØŸ8™8 D›>ˆDŒLØ—<‘<Òð	 úr#   c                 ó€   •  U R                   $ ! [         a%    SR                  U 5      U l         U R                   s $ f = fr   )rO   r   rT   r   s    r    r,   ÚSList.get_nlstr‚   s9   € ð	 Ø—<‘<ÐøÜó 	 ØŸ9™9 T›?ˆDŒLØ—<‘<Òð	 úr#   c                 óî   •  U R                   $ ! [         a\    U  Vs/ s H4  n[        R                  R	                  U5      (       d  M)  [        U5      PM6     Os  snf snU l         U R                   s $ f = fr*   )rP   r   r1   r2   r3   r   r4   s     r    r6   ÚSList.get_paths‹   sU   € ð	 Ø—<‘<ÐøÜó 	 Ù-1ÓGªT¨´R·W±W·^±^ÀA×5F›GœD žGªTùÔGˆDŒLØ—<‘<Òð	 ús    ‚ ŽA4œ(AÁAÁA4Á3A4NÚpatternÚpruneÚfieldc           
      ód  ^^• S[         S[         4U4S jjn[        T[         5      (       a  U4S jnOTnU(       d6  [        U 5      " U  Vs/ s H  oe" U" U5      5      (       d  M  UPM     sn5      $ [        U 5      " U  Vs/ s H  oe" U" U5      5      (       a  M  UPM     sn5      $ s  snf s  snf )aa  Return all strings matching 'pattern' (a regex or callable)

This is case-insensitive. If prune is true, return all items
NOT matching the pattern.

If field is specified, the match must occur in the specified
whitespace-separated field.

Examples::

    a.grep( lambda x: x.startswith('C') )
    a.grep('Cha.*log', prune=1)
    a.grep('chm', field=-1)
rE   r   c                 ó^   >• Tc  U $ U R                  5       n UT   nU$ ! [         a     gf = f)NÚ )r   Ú
IndexError)rE   ÚpartsÚtgtr\   s      €r    Úmatch_targetÚ SList.grep.<locals>.match_target©   s=   ø€ Ø‰}Ø�Ø—G‘G“IˆEðØ˜E‘l�Ø�
øÜó Ùðús   ˜ Ÿ
,«,c                 óP   >• [         R                  " TU [         R                  5      $ r*   )ÚreÚsearchÚ
IGNORECASE)ÚxrZ   s    €r    Ú<lambda>ÚSList.grep.<locals>.<lambda>´   s   ø€ œbŸiši¨°´B·M±MÔBr/   )r@   Ú
isinstanceÚtype)r   rZ   r[   r\   rc   ÚpredÚels    ` `   r    ÚgrepÚ
SList.grep”   s�   ù€ ð*	œCð 	¤C÷ 	ô �gœs×#Ñ#ÜB‰DàˆDÞÜ˜”:©DÓKªD b°D¹ÀbÓ9I×4JŸr©DÑKÓLÐLä˜”:©DÓOªD b¸¹\È"Ó=M×8NŸr©DÑOÓPÐPùò LùâOs   ÁB(Á%B(ÂB-ÂB-Úfieldsc                 óŒ  • [        U5      S:X  a   U  Vs/ s H  o"R                  5       PM     sn$ [        5       nU  Vs/ s H  oDR                  5       PM     sn HK  n/ nU H  n UR                  X&   5        M     U(       d  M+  UR                  SR                  U5      5        MM     U$ s  snf s  snf ! [         a     Ma  f = f)a#  Collect whitespace-separated fields from string list

Allows quick awk-like usage of string lists.

Example data (in var a, created by 'a = !ls -l')::

    -rwxrwxrwx  1 ville None      18 Dec 14  2006 ChangeLog
    drwxrwxrwx+ 6 ville None       0 Oct 24 18:05 IPython

* ``a.fields(0)`` is ``['-rwxrwxrwx', 'drwxrwxrwx+']``
* ``a.fields(1,0)`` is ``['1 -rwxrwxrwx', '6 drwxrwxrwx+']``
  (note the joining by space).
* ``a.fields(-1)`` is ``['ChangeLog', 'IPython']``

IndexErrors are ignored.

Without args, fields() just split()'s the strings.
r   r%   )Úlenr   rL   Úappendr`   rT   )r   rr   ro   ÚresÚfÚ	linepartsÚfds          r    rr   ÚSList.fields¼   s²   € ô& ˆv‹;˜!ÓÙ)-Ó.ª 2—H‘H–J©Ñ.Ð.ä‹gˆÙ&*Ó+¢d —7‘7–9¡dÔ+ˆBØˆIã�ðØ×$Ñ$ R¡VÖ,ñ ÷
 ˆyØ—
‘
˜3Ÿ8™8 IÓ.Ö/ñ ,ð ˆ
ùò /ùò ,øô "ó Úðús   ”B+¾B0Á%B5Â5
CÃCÚnumsc                 ó"  • Ub.  U  Vs/ s H   n[        U/5      R                  U5      U/PM"     nnOU  Vs/ s H  o3U/PM     nnU(       ak  [        [        U5      5       HS  nSR	                  XE   S    Vs/ s H  ofR                  5       (       d  M  UPM     sn5      n [        U5      nX„U   S'   MU     UR                  5         [        U 5      " U V	s/ s H  o™S   PM	     sn	5      $ s  snf s  snf s  snf ! [         a    Sn N\f = fs  sn	f )zŽsort by specified fields (see fields())

Example::

    a.sort(1, nums = True)

Sorts a by second field, in numerical order (so that 21 > 3)

r_   r   é   )
rL   rr   Úrangert   rT   ÚisdigitÚintÚ
ValueErrorÚsortrm   )
r   r\   r{   ÚlineÚdsuÚiÚchÚnumstrrG   Úts
             r    r‚   Ú
SList.sortà   sù   € ð  ÑÙDHÓIÂD¸D”E˜4˜&“M×(Ñ(¨Ó/°$Ó7ÁDˆCÐIˆCá-1Ó2ªT T˜4“=©TˆCÐ2ÞÜœ3˜s›8–_�ØŸ™¨s©v°aªyÓ!Iªy¨¿J¹J¿L§"©yÑ!IÓJ�ðÜ˜F›�Að �A‘�q“	ñ %ð 	�‰Œ
Ü�DŒz©Ó-ª A˜Qœ4©Ñ-Ó.Ð.ùò Jùâ2ùò "Jøô "ó Ø’Aðüò .s.   ˆ'C+¶C0Á7C5
ÂC5
Â!C:ÃDÃ:D	ÄD	)Ú__nlstrr9   r:   )FN)NF)#r;   r<   r=   r>   r?   r@   rA   r   r   r   r!   rB   rC   rD   r'   rE   rF   r,   rG   rH   r6   r5   rI   r   r   r
   rf   ÚMatchÚboolr   r€   rp   rr   r‚   rJ   r+   r/   r    rL   rL   c   sL  ‡ ñ
ð ƒLØƒLØ�$‰ZÓð˜$ô ñ ˜Ó!Ð!€Aˆð ˜3ô  ñ ˜Ó#Ð#€Aˆð ˜3ô  ñ ˜Ó#Ð#€Aˆð ˜4 ™:ô  ñ ˜Ó#Ð#€Aˆð
 Ø#ñ	&Qà�s˜H c U¨B¯H©H°S©M¸DÑ,@Ð%@ÑAÐAÑBð&Qð ð&Qð ˜‰}ð	&Qð
 
õ&QðP"˜d 3™ið "¨D°°c±©Oô "ðL &*Øñ/à˜˜S™	Ñ"ð/ð ð/ð 
÷	/ð /r/   rL   ÚinstrÚnspacesÚntabsÚflattenr   c                 óZ  • SU-  SU-  -   nU(       a&  [         R                  " S[         R                  5      nO%[         R                  " S[         R                  5      n[         R                  " XTU 5      nUR	                  [
        R                  U-   5      (       a  US[        U5      *  $ U$ )aN  Indent a string a given number of spaces or tabstops.

indent(str, nspaces=4, ntabs=0) -> indent str by ntabs+nspaces.

Parameters
----------
instr : basestring
    The string to be indented.
nspaces : int (default: 4)
    The number of spaces to be indented.
ntabs : int (default: 0)
    The number of tabs to be indented.
flatten : bool (default: False)
    Whether to scrub existing indentation.  If True, all lines will be
    aligned to the same indentation.  If False, existing indentation will
    be strictly increased.

Returns
-------
str : string indented by ntabs and nspaces.

Ú	r%   z^\s*Ú^N)rf   ÚcompileÚ	MULTILINEÚsubÚendswithr1   Úlineseprt   )r�   rŽ   r�   r�   ÚindÚpatÚoutstrs          r    Úindentrœ     s€   € ð. �‰,˜˜w™Ñ
&€CÞÜ�jŠj˜¤"§,¡,Ó/‰ä�jŠj˜œrŸ|™|Ó,ˆÜ�VŠV�C˜eÓ$€FØ‡�”r—z‘z #‘~×&Ñ&Ø�jœ˜C›�yÐ!Ð!àˆr/   Úargc                 ó6   • [        U [        5      (       a  U /$ U $ )au  Always return a list of strings, given a string or list of strings
as input.

Examples
--------
::

    In [7]: list_strings('A single string')
    Out[7]: ['A single string']

    In [8]: list_strings(['A single string in a list'])
    Out[8]: ['A single string in a list']

    In [9]: list_strings(['A','list','of','strings'])
    Out[9]: ['A', 'list', 'of', 'strings']
)rl   r@   )r�   s    r    Úlist_stringsrŸ   %  s   € ô$ �#”s×ÑØˆuˆàˆ
r/   ÚtxtÚwidthÚmarkc                 ó�   • U (       d  X!-  SU $ U[        U 5      -
  S-
  [        U5      -  S-  nUS:  a  SnX#-  nU< SU < SU< 3$ )aa  Return the input string centered in a 'marquee'.

Examples
--------
::

    In [16]: marquee('A test',40)
    Out[16]: '**************** A test ****************'

    In [17]: marquee('A test',40,'-')
    Out[17]: '---------------- A test ----------------'

    In [18]: marquee('A test',40,' ')
    Out[18]: '                 A test                 '

Né   r   r%   ©rt   )r    r¡   r¢   ÚnmarkÚmarkss        r    Úmarqueer¨   =  sU   € ö" Ø‘
˜F˜UÐ#Ð#Ø”3�s“8‰^˜AÑ¤ D£	Ñ)¨1Ñ,€EØˆqƒy˜�%Ø‰J€EÛ›s¢5Ð)Ð)r/   Ústrngc                 ót   • [         R                  " S[         R                  5      nUR                  SU 5      n U $ )zPFormat a string for screen printing.

This removes some latex-type format codes.z\\$r_   )rf   r”   r•   r–   )r©   Úpar_res     r    Úformat_screenr¬   V  s-   € ô
 �ZŠZ˜œrŸ|™|Ó,€FØ�J‰J�r˜%Ó €EØ€Lr/   Útextc                 ó   • U R                  S5      (       a  [        R                  " U 5      $ U R                  SS5      n[	        U5      S:X  a  [        R                  " U 5      $ Uu  p#[        R                  " U5      nSR                  X#/5      $ )z¢Equivalent of textwrap.dedent that ignores unindented first line.

This means it will still dedent strings like:
'''foo
is a bar
'''

For use in wrap_paragraphs.
r   r}   )Ú
startswithÚtextwrapÚdedentr   rt   rT   )r­   ÚsplitsÚfirstÚrests       r    r±   r±   `  su   € ð ‡��t×Ñä�Š˜tÓ$Ð$ð �Z‰Z˜˜QÓ€FÜ
ˆ6ƒ{�aÓä�Š˜tÓ$Ð$à�K€Eä�?Š?˜4Ó €DØ�9‰9�e�]Ó#Ð#r/   c                 ó  • U R                  5       nSn[        U6  HC  n[        [        U5      5      S:”  a    O*US   nU[        R
                  ;   d  US:X  a  US-  nMC    O   SR                  U Vs/ s H  oUUS PM	     sn5      n U $ s  snf )aþ  Strip leading email quotation characters ('>').

Removes any combination of leading '>' interspersed with whitespace that
appears *identically* in all lines of the input text.

Parameters
----------
text : str

Examples
--------

Simple uses::

    In [2]: strip_email_quotes('> > text')
    Out[2]: 'text'

    In [3]: strip_email_quotes('> > text\n> > more')
    Out[3]: 'text\nmore'

Note how only the common prefix that appears in all lines is stripped::

    In [4]: strip_email_quotes('> > text\n> > more\n> more...')
    Out[4]: '> text\n> more\nmore...'

So if any line has no quote marks ('>'), then none are stripped from any
of them ::

    In [5]: strip_email_quotes('> > text\n> > more\nlast different')
    Out[5]: '> > text\n> > more\nlast different'
r   r}   Ú>r   N)Ú
splitlinesÚziprt   ÚsetÚstringÚ
whitespacerT   )r­   ÚlinesÚ	strip_lenÚ
charactersÚprefix_charÚlns         r    Ústrip_email_quotesrÁ   {  s�   € ð@ �O‰OÓ€EØ€Iä˜5“kˆ
äŒs�:‹Ó !Ó#ÙØ  ‘mˆàœ&×+Ñ+Ó+¨{¸cÓ/AØ˜‰NŠIáñ "ð �9‰9©uÓ5ªu¨˜˜“n©uÑ5Ó6€DØ€Kùò 6s   Á1Bc            
       ó<   • \ rS rSrSrS\S\S\S\\\4   4S jrSr	g	)
ÚEvalFormatteri­  aç  A String Formatter that allows evaluation of simple expressions.

Note that this version interprets a `:`  as specifying a format string (as per
standard string formatting), so if slicing is required, you must explicitly
create a slice.

Note that on Python 3.14+ this version interprets `[]` as indexing operator
so you need to use generators instead of list comprehensions, for example:
`list(i for i in range(10))`.

This is to be used in templating cases, such as the parallel batch
script templates, where simple arithmetic on arguments is useful.

Examples
--------
::

    In [1]: f = EvalFormatter()
    In [2]: f.format('{n//4}', n=8)
    Out[2]: '2'

    In [3]: f.format("{greeting[slice(2,4)]}", greeting="Hello")
    Out[3]: 'll'
ÚnameÚargsÚkwargsr   c                 ó    • [        XU5      nXA4$ r*   )Úeval)r   rÄ   rÅ   rÆ   Úvs        r    Ú	get_fieldÚEvalFormatter.get_fieldÇ  s   € Ü�˜vÓ&ˆØˆwˆr/   r+   N)
r;   r<   r=   r>   r?   r@   r
   r   rÊ   rJ   r+   r/   r    rÃ   rÃ   ­  s0   † ñð2˜cð ¨ð °cð ¸eÀCÈÀH¹o÷ r/   rÃ   c                   óB   • \ rS rSrSrS\S\\   S\\\4   S\4S jr	Sr
g	)
ÚFullEvalFormatteriÏ  a!  A String Formatter that allows evaluation of simple expressions.

Any time a format key is not found in the kwargs,
it will be tried as an expression in the kwargs namespace.

Note that this version allows slicing using [1:2], so you cannot specify
a format string. Use :class:`EvalFormatter` to permit format strings.

Examples
--------
::

    In [1]: f = FullEvalFormatter()
    In [2]: f.format('{n//4}', n=8)
    Out[2]: '2'

    In [3]: f.format('{list(range(5))[2:4]}')
    Out[3]: '[2, 3]'

    In [4]: f.format('{3*2}')
    Out[4]: '6'
Úformat_stringrÅ   rÆ   r   c                 óX  • / nU R                  U5       Hƒ  u  pVpxU(       a  UR                  U5        Uc  M#  U(       a  SR                  Xg/5      n[        U[	        U5      5      n	U R                  X˜5      n	UR                  U R                  U	S5      5        M…     SR                  U5      $ )NÚ:r_   )Úparseru   rT   rÈ   ÚdictÚconvert_fieldÚformat_field)
r   rÎ   rÅ   rÆ   ÚresultÚliteral_textÚ
field_nameÚformat_specÚ
conversionÚobjs
             r    ÚvformatÚFullEvalFormatter.vformatè  s¤   € ð ˆàAEÇÁØöB
Ñ=ˆL kö Ø—‘˜lÔ+ð Ó%ö à!$§¡¨:Ð*CÓ!D�Jô ˜:¤t¨F£|Ó4�ð ×(Ñ(¨Ó9�ð —‘˜d×/Ñ/°°RÓ8Ö9ñ3B
ð6 �w‰w�v‹Ðr/   r+   N)r;   r<   r=   r>   r?   r@   r   r
   r   rÛ   rJ   r+   r/   r    rÍ   rÍ   Ï  s9   † ñð0 Ø ð Ø(0°©ð Ø?FÀsÈCÀxÑ?Pð à	÷ r/   rÍ   c            	       óp   • \ rS rSrSr\R                  " S5      rS\S\	\
\\\\4      4S jrS\4S jrSrg	)
ÚDollarFormatteri  a°  Formatter allowing Itpl style $foo replacement, for names and attribute
access only. Standard {foo} replacement also works, and allows full
evaluation of its arguments.

Examples
--------
::

    In [1]: f = DollarFormatter()
    In [2]: f.format('{n//4}', n=8)
    Out[2]: '2'

    In [3]: f.format('23 * 76 is $result', result=23*76)
    Out[3]: '23 * 76 is 1748'

    In [4]: f.format('$a or {b}', a=1, b=2)
    Out[4]: '1 or 2'
z,(.*?)\$(\$?[\w\.]+)(?=([^']*'[^']*')*[^']*$)Ú
fmt_stringr   c              #   óL  #   • [         R                  " X5       H†  u  p#pESnSnU R                  R                  U5       HQ  nUR	                  SS5      u  pšU
R                  S5      (       a  XyU
-   -  nOXy-   U
SS 4v •  SnUR                  5       nMS     XrUS  -   X4U4v •  Mˆ     g 7f)Nr   r_   r}   r¤   Ú$)r   rÑ   Ú#_dollar_pattern_ignore_single_quoteÚfinditerÚgroupr¯   Úend)r   rß   Úliteral_txtr×   rØ   rÙ   Úcontinue_fromr    ÚmÚnew_txtÚ	new_fields              r    rÑ   ÚDollarFormatter.parse#  s´   é € Ü@IÇÂØöA
Ñ<ˆK [ð ˆMØˆCØ×=Ñ=×FÑFÀ{ÖS�Ø%&§W¡W¨Q¨q£\Ñ"�à×'Ñ'¨×,Ñ,Ø YÑ.Ñ.‘Cà™=¨)°R¸Ð>Ò>Ø�CØ !§¡£’ñ Tð  ] ^Ð4Ñ4°jÈzÐZÔZò#A
ùs   ‚B"B$c                 ó   • g)Nz<DollarFormatter>r+   r   s    r    Ú__repr__ÚDollarFormatter.__repr__7  s   € Ø"r/   r+   N)r;   r<   r=   r>   r?   rf   r”   râ   r@   r   r   r
   rÑ   rí   rJ   r+   r/   r    rÞ   rÞ     sP   † ñð& +-¯*ª*Ø7ó+Ð'ð[ ð [¨°°s¸CÀÀcÐ7IÑ1JÑ(Kô [ð(#˜#÷ #r/   rÞ   rC   Úmax_rowsÚ	row_firstc              #   ó*  #   • U(       a^  [        U 5      U-  [        U 5      U-  S:„  -   n[        U5       H.  n[        U[        U 5      U5       Vs/ s H  oPU   PM	     snv •  M0     g[        S[        U 5      U5       H  nXXA-    v •  M     gs  snf 7f)z5Yield successive max_rows-sized column chunks from l.r   N)rt   r~   )rC   rï   rð   Úncolsr…   Újs         r    Ú_col_chunksrô   ?  sŠ   é € ö Ü�Q“˜8Ñ#¬¨A«°Ñ(9¸AÑ(=Ñ>ˆÜ�u–ˆAÜ!& q¬#¨a«&°%Ô!8Ó9Ò!8˜A�Q”4Ñ!8Ñ9Ô9ò ô �qœ#˜a›& (Ö+ˆAØ�q‘|Ð%Ô%ò ,ùò :ùs   ‚ABÁBÁ5BÚrlistÚseparator_sizeÚdisplaywidthc                 ó
  • [        S[        U 5      S-   5       HL  n[        [        [        [        XU5      5      5      n[        U5      n[        U5      nXbUS-
  -  -   U::  d  ML    O   WUS-
  (       a  UW-
  US-
  -  OSWWS.$ )z4Calculate optimal info to columnize a list of stringr}   r   )Únum_columnsÚoptimal_separator_widthrï   Úcolumn_widths)r~   rt   rD   ÚmapÚmaxrô   Úsum)rõ   rð   rö   r÷   rï   Ú
col_widthsÚ	sumlengthrò   s           r    Ú_find_optimalr  L  s�   € ô ˜!œS ›Z¨!™^Ö,ˆÜœ#œc¤;¨uÀ	Ó#JÓKÓLˆ
Ü˜
“Oˆ	Ü�J“ˆØ¨°©Ñ3Ñ3°|ÕCÙñ -ð !ØUZÐ]^×U^¨°yÑ(@ÀeÈaÁiÒ'PÐefØ Ø'ñð r/   ÚTÚmylistr…   Údefaultc                 ó,   • U[        U 5      :¼  a  U$ X   $ )z2return list item number, or default if don't existr¥   )r  r…   r  s      r    Ú_get_or_defaultr  `  s   € àŒC�‹KÓØˆà‰yÐr/   Úlist_Úlast_sepÚsepÚwrap_item_withc                 óæ   • [        U 5      S:X  a  gU(       a  U  Vs/ s H  nU< U< U< 3PM     n n[        U 5      S:X  a  U S   $ UR                  S U SS  5       5      < U< U S   < 3$ s  snf )aÇ  
Return a string with a natural enumeration of items

>>> get_text_list(['a', 'b', 'c', 'd'])
'a, b, c and d'
>>> get_text_list(['a', 'b', 'c'], ' or ')
'a, b or c'
>>> get_text_list(['a', 'b', 'c'], ', ')
'a, b, c'
>>> get_text_list(['a', 'b'], ' or ')
'a or b'
>>> get_text_list(['a'])
'a'
>>> get_text_list([])
''
>>> get_text_list(['a', 'b'], wrap_item_with="`")
'`a` and `b`'
>>> get_text_list(['a', 'b', 'c', 'd'], " = ", sep=" + ")
'a + b + c = d'
r   r_   r}   c              3   ó$   #   • U  H  ov •  M     g 7fr*   r+   )Ú.0r…   s     r    Ú	<genexpr>Ú get_text_list.<locals>.<genexpr>‡  s   é € Ð'šJ�q”šJùs   ‚Néÿÿÿÿ)rt   rT   )r  r  r	  r
  Úitems        r    Úget_text_listr  h  s€   € ô. ˆ5ƒz�QƒØÞáó Ú�ò ,ªT²>ÓBÙð 	ð  ä
ˆ5ƒz�QƒØ�Q‰xˆà�‰Ñ'˜E # 2™JÓ'Õ'Ú�%˜“)ðð ùò	 s   œA.)é   r   F)r_   éN   Ú*)F)z and z, r_   )-r?   r1   rf   rº   Úsysr°   Úwarningsr   Úpathlibr   Útypingr   r   r   r   r	   r
   r   r   Úcollections.abcr   r   r   r   r   r@   r   rD   rL   r€   rŒ   rœ   rŸ   r¨   r¬   r±   rÁ   rÃ   rÍ   rÞ   rô   r  r  r  r  r+   r/   r    Ú<module>r     s  ðñó 
Û 	Û Û 
Û Û Ý Ý ÷	÷ 	ó 	÷ BÓ Aå ô2$ˆsô 2$ôB\/ˆD�‰Iô \/ñ~ �#ð   ð  °ð  À$ð  ÐSVõ  ðF�e˜C  c¡˜NÑ+ð °°S±	ô ñ0*�ð * #ð *°#ð *Àõ *ð2˜ð  ô ð$�ð $˜ô $ð6/˜Sð / Sô /ôd�Iô ôD9˜	ô 9ôx-#Ð'ô -#ðj 49ñ
&ØˆC�yð
&Øð
&Ø,0ð
&àˆd�3‰iÑõ
&ðØ�‰9ðØ!%ðØ7:ðØJMðà	ˆ#ˆsˆ(�^ôñ" ˆCƒL€ð˜D ™Gð ¨ð °að ¸Aô ð WYñ Ø�‰9ð Ø #ð Ø47ð ØPSð àö r/   