+
    *j%                        R t ^ RIt^ RIt^ RIt^ RIHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ]]]]3w  tttt]P.                  t];QJ d    R R$ 4       F  '       g   K   RM	  R	M! R R$ 4       4      t];QJ d    R
 R% 4       F  '       g   K   RM	  R	M! R
 R% 4       4      t]P8                  ! R4      t ]'       d   ^ RItM]h  ]P@                  ! R	R7       R&R lt" ^ RI"H"t"  ! R R4      t$ ! R R4      t% ! R R4      t& ! R R]&4      t' ! R R]&4      t( ! R R]&4      t)R t*R t+R t,R t-R t.R  t/R! t0R" t1R# t2R#   ]! d    ]P@                  ! 4         Li ; i  ] d    Rt Li ; i  ]# d     Li ; i)'z*
General helpers required for `tqdm.std`.
N)partialpartialmethodwraps)	signatureeast_asian_width)warnproxyc              #   L   "   T F  p\         P                  V4      x  K  	  R # 5iNCUR_OS
startswith.0is   & *lib/python3.14/site-packages/tqdm/utils.py	<genexpr>r      s      ?+>aVq!!+>   "$TFc              #   L   "   T F  p\         P                  V4      x  K  	  R # 5ir   r   r   s   & r   r   r      s      Q+PaVq!!+Pr   z\x1b\[[;\d]*[A-Za-z])stripc                  aaaaa	 Sf   / oV R,          R8X  d   V RR p \        R\        ^R7       V'       d	   W  RV 23MV 3p/ oV F]  o	S	P                  4       R,           o	\        S	4      oSP	                  VV	3R l\
        P                  P                  4        4       4       K_  	  V'       d   \        M\        oVVV3R lpV# )zt
Basic (env-only) version of [envwrap](https://github.com/tqdm/envwrap).
Install `envwrap` for config file support.
N_z*Trailing underscore in `name` is automatic
stacklevelc              3      <"   T F5  w  rVP                  S4      '       g   K  VSR  P                  4       V3x  K7  	  R # 5ir   )r   lower)r   kvr   prefixs   &  r   r   envwrap.<locals>.<genexpr>1   s7      W+=41fAUQqrU[[]A+=s
   A A c                 P  < \        V 4      P                  pSP                  4        UUu/ uF  w  r#W!9   g   K  W#bK  	  pppV F  pW,          pVP                  VP                  Jd>   \        VP                  R VP                  34       F  p V! WB,          4      WB&    K^  	  Kb  VP                  e&   \        VP                  4      ! WB,          4      WB&   K   S	V,          ! WB,          4      WB&   K  	  S! V 3/ VB # u uppi   \         d     K  i ; i  \         d     K  i ; i)__args__)
r   
parametersitems
annotationemptygetattr	ExceptiondefaulttypeKeyError)
funcparamsr   r   	overridesparamtypenv_overridesparttypess
   &      r   wrapenvwrap.<locals>.wrap5   s   4++&3&9&9&;K&;daq{TQT&;	KAIEu{{2"5#3#3Z%BRBRATUC'*9<'8	  V *#EMM29<@	#(8IL#9IL " D&I&&' L %    s.   
C>C>DDDDD%$D%)
r   DeprecationWarningupperlenupdateosenvironr%   r   r   )
nameappr4   	is_methodprefixesr5   r2   r   r3   r    s
   &&f&  @@@@r   envwraprB   "   s    
 }Bx3CRy9;MZ[\*-auo&D7HM#%K W+-::+;+;+=W 	W 
 &=7D'. K    )rB   c                   4   a  ] tR t^Ut o RtRR ltR tRtV tR# )FormatReplacez>
>>> a = FormatReplace('something')
>>> f"{a:5d}"
'something'
c                     Wn         ^ V n        R# )    N)replaceformat_called)selfrH   s   &&r   __init__FormatReplace.__init__[   s    rC   c                L    V ;P                   ^,          un         V P                  # )   rI   rH   )rJ   r   s   &&r   
__format__FormatReplace.__format___   s    a||rC   rO   N) )	__name__
__module____qualname____firstlineno____doc__rK   rP   __static_attributes____classdictcell____classdict__s   @r   rE   rE   U   s     
 rC   rE   c                   H   a  ] tR t^dt o RtR tR tR tR tR t	R t
RtV tR	# )

Comparablez1Assumes child has self._comparable attr/@propertyc                4    V P                   VP                   8  # r   _comparablerJ   others   &&r   __lt__Comparable.__lt__f   s    %"3"333rC   c                "    W8  ;'       g    W8H  # r    ra   s   &&r   __le__Comparable.__le__i   s    00$-0rC   c                4    V P                   VP                   8H  # r   r_   ra   s   &&r   __eq__Comparable.__eq__l   s    5#4#444rC   c                    W8X  * # r   rf   ra   s   &&r   __ne__Comparable.__ne__o         rC   c                    W8:  * # r   rf   ra   s   &&r   __gt__Comparable.__gt__r   ro   rC   c                    W8  * # r   rf   ra   s   &&r   __ge__Comparable.__ge__u   s    rC   rf   N)rS   rT   rU   rV   rW   rc   rg   rj   rm   rq   rt   rX   rY   rZ   s   @r   r]   r]   d   s+     ;415!!   rC   r]   c                   >   a  ] tR t^yt o R tR tR tR tR tRt	V t
R# )ObjectWrapperc                .    \        V P                  V4      # r   )r(   _wrappedrJ   r>   s   &&r   __getattr__ObjectWrapper.__getattr__z   s    t}}d++rC   c                .    \        V P                  W4      # r   )setattrry   rJ   r>   values   &&&r   __setattr__ObjectWrapper.__setattr__}   s    t}}d22rC   c                f     \         P                  W4      #   \         d    \        Y4      u # i ; i)z7Actual `self.getattr` rather than self._wrapped.getattr)objectr{   AttributeErrorr(   rz   s   &&r   wrapper_getattrObjectWrapper.wrapper_getattr   s2    	'%%d11 	'4&&	's    00c                .    \         P                  WV4      # )z7Actual `self.setattr` rather than self._wrapped.setattr)r   r   r   s   &&&r   wrapper_setattrObjectWrapper.wrapper_setattr   s    !!$e44rC   c                *    V P                  RV4       R# )z$
Thin wrapper around a given object
ry   N)r   )rJ   wrappeds   &&r   rK   ObjectWrapper.__init__   s     	Z1rC   rf   N)rS   rT   rU   rV   r{   r   r   r   rK   rX   rY   rZ   s   @r   rw   rw   y   s#     ,3'52 2rC   rw   c                   B   a a ] tR t^t oRtV 3R ltR tR tRtVt	V ;t
# )SimpleTextIOWrapperz
Change only `.write()` of the wrapped object by encoding the passed
value and passing the result to the wrapped object's `.write()` method.
c                J   < \         SV `  V4       V P                  R V4       R# )encodingN)superrK   r   )rJ   r   r   	__class__s   &&&r   rK   SimpleTextIOWrapper.__init__   s     !Z2rC   c                t    V P                   P                  VP                  V P                  R4      4      4      # )z@
Encode `s` and pass to the wrapped object's `.write()` method.
r   )ry   writeencoder   )rJ   ss   &&r   r   SimpleTextIOWrapper.write   s-     }}""188D,@,@,L#MNNrC   c                6    V P                   \        VR V4      8H  # ry   ry   r(   ra   s   &&r   rj   SimpleTextIOWrapper.__eq__       }}z5 AAArC   rf   )rS   rT   rU   rV   rW   rK   r   rj   rX   rY   __classcell__r   r[   s   @@r   r   r      s!     
3OB BrC   r   c                   L   a a ] tR t^t oRt]R 4       tV 3R ltR tRt	Vt
V ;t# )DisableOnWriteErrorzG
Disable the given `tqdm_instance` upon `write()` or `flush()` errors.
c                .   a a \        S 4      o VV 3R lpV# )zF
Quietly set `tqdm_instance.miniters=inf` if `func` raises `errno=5`.
c                  R  <  S! V / VB #   \          dE   pTP                  ^8w  d   h  \        R4      Sn         Rp?R#   \         d	      Rp?R# i ; iRp?i\
         dD   pR\        T4      9  d   h  \        R4      Sn         Rp?R#   \         d	      Rp?R# i ; iRp?ii ; i)   infNclosed)OSErrorerrnofloatminitersReferenceError
ValueErrorstr)argskwargser-   tqdm_instances   *, r   inner7DisableOnWriteError.disable_on_exception.<locals>.inner   s    T,V,, 77a<-25\M**%  3q6)-25\M**% s_    B&A?A
AAAB&"B&#B!5BBB!BB!!B&r	   )r   r-   r   s   ff r   disable_on_exception(DisableOnWriteError.disable_on_exception   s    
 m,	" rC   c                  < \         SV `  V4       \        VR 4      '       d,   V P                  R V P	                  W!P
                  4      4       \        VR4      '       d.   V P                  RV P	                  W!P                  4      4       R# R# )r   flushN)r   rK   hasattrr   r   r   r   )rJ   r   r   r   s   &&&r   rK   DisableOnWriteError.__init__   su    !7G$$  22=--PR7G$$  22=--PR %rC   c                6    V P                   \        VR V4      8H  # r   r   ra   s   &&r   rj   DisableOnWriteError.__eq__   r   rC   rf   )rS   rT   rU   rV   rW   staticmethodr   rK   rj   rX   rY   r   r   s   @@r   r   r      s0       2RB BrC   r   c                   6   a a ] tR t^t oRV 3R lltRtVtV ;t# )CallbackIOWrapperc                  <aa \         SV `  V4       \        W#4      oVR8X  d*   \        S4      VV3R l4       pV P	                  RV4       R# VR8X  d*   \        S4      VV3R l4       pV P	                  RV4       R# \        R4      h)zc
Wrap a given `file`-like object's `read()` or `write()` to report
lengths to the given `callback`
r   c                 B   < S! V .VO5/ VB pS! \        V 4      4       V# r   r:   )datar   r   rescallbackr-   s   &*, r   r   )CallbackIOWrapper.__init__.<locals>.write   s(    41$1&1T#
rC   readc                  :   < S! V / VB pS! \        V4      4       V# r   r   )r   r   r   r   r-   s   *, r   r   (CallbackIOWrapper.__init__.<locals>.read   s#    T,V,T#rC   z Can only wrap read/write methodsN)r   rK   r(   r   r   r,   )rJ   r   streammethodr   r   r-   r   s   &f&&  @r   rK   CallbackIOWrapper.__init__   s    
 	 v&W4[    %0v4[    .=>>rC   rf   )r   )rS   rT   rU   rV   rK   rX   rY   r   r   s   @@r   r   r      s     ? ?rC   r   c                      R P                  V 4       R#   \         d     R# \         dD     T P                  4       P	                  R4      ;'       g    RT 8H  u #   \         d      R# i ; ii ; i)u   █▉TFzutf-U8)r   UnicodeEncodeErrorr)   r   r   )r   s   &r   _is_utfr      sr    
h'    	>>#..v6LL48;KL 		s<    A0A0A0%AAA0A,'A0+A,,A0c                 R     \        V P                  4      #   \         d     R # i ; i)F)r   r   r   )fps   &r   _supports_unicoder      s(    r{{## s    &&c                     \        V \        4      '       d   V  F  p\        V4      ^8  g   K   R# 	  R# \        V 4      # )   FT)
isinstancer   ordr   )r   cs   & r   	_is_asciir      s7    !SA1v|  QrC   c                     a ^ RI Ho V3R lp V # )zm
Return a function which returns console dimensions (width, height).
Supported: linux, osx, windows, cygwin.
)get_terminal_sizec                    <  S! \        V R R 4      ! 4       4      w  rV^,
          V^,
          3#   \         d    Ru # i ; i)filenoc                      R # r   rf   rf   rC   r   <lambda>6_screen_shape_wrapper.<locals>.inner.<locals>.<lambda>  s    $rC   )NN)r(   r)   )r   colslinesr   s   &  r   r   $_screen_shape_wrapper.<locals>.inner  sH    	+GB,,O,QRKD!8UQY&& 		s   ,0 A A )r<   r   )r   r   s    @r   _screen_shape_wrapperr   	  s    
 % LrC   c                 |   a \        R\        ^R7       \        4       oS'       g   R# \        S4      V3R l4       p V # )zX
Return a function which returns console width.
Supported: linux, osx, windows, cygwin.
zQUse `_screen_shape_wrapper()(file)[0]` instead of `_environ_cols_wrapper()(file)`r   Nc                 "   < S! V 4      ^ ,          # )rG   rf   )r   shapes   &r   r   $_environ_cols_wrapper.<locals>.inner%  s    Ry|rC   )r   r8   r   r   )r   r   s    @r   _environ_cols_wrapperr     sC    
 	 
,-?AO!#E
5\  LrC   c                  D    \         P                  R 8X  d   \        f   R# R# )ntrR   z[A)r<   r>   coloramarf   rC   r   _term_move_upr   ,  s    ''T/(82GxGrC   c                 8    \        R  \        V 4       4       4      # )c              3   J   "   T F  p\        V4      R 9   d   ^M^x  K  	  R# 5i)FWNr   )r   chs   & r   r   _text_width.<locals>.<genexpr>1  s"     I&B$R(D0qa7&s   !#)sumr   )r   s   &r   _text_widthr   0  s    I#a&IIIrC   c                @    \        \        P                  RV 4      4      # )zd
Returns the real on-screen length of a string which may contain
ANSI control codes and wide chars.
rR   )r   RE_ANSIsub)r   s   &r   disp_lenr   4  s    
 w{{2t,--rC   c                H   \        V 4      \        V 4      8X  d   V RV # \        \        P	                  V 4      4      p\        V 4      V8  d   V RR p K  V'       dG   \        \        P	                  V 4      4      '       d#   V P                  R4      '       d   V # V R,           # V # )z:
Trim a string which may contain ANSI control characters.
Nz[0mr7   )r:   r   boolr   searchendswith)r   lengthansi_presents   && r   	disp_trimr   <  s     4yHTN"GV}t,-L
4.6
!CRyW^^D122}}Y//tETI5EEKrC   )win32cygwin)aixlinuxdarwinfreebsd)rR   NF)3rW   r<   resys	functoolsr   r   r   inspectr   unicodedatar   warningsr   weakrefr
   rangechrr   _range_unich_unicode_basestringplatformr   anyIS_WINIS_NIXcompiler   r   ImportErrorinit	TypeErrorrB   ModuleNotFoundErrorrE   r]   rw   r   r   r   r   r   r   r   r   r   r   r   r   rf   rC   r   <module>r     s   
 	 
 3 3  (  (-sC(< %+		?+>??+>?	?	Q+PQQ+PQ	Q
**,
- 	E"
*Z	
    *2 22B- B((B- (BV? ?4 "$HJ.}    Hp  		s<   ;E% E% E %E4 E"!E"%	E10E14E>=E>