+
    }i".                        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 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  t/R! t0R" t1R# t2R$ t3R% t4R#   ]! d    ]P@                  ! 4         Li ; i  ] d    Rt 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   & \/Users/ahmad/.openclaw/workspace/my-crawler/.venv/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 Sf   / o\        V 4      p\        P                  P                  4        UUu/ uF1  w  rEVP	                  V 4      '       g   K  WCR P                  4       VbK3  	  uppoV'       d   \        M\        oVVV3R lpV# u uppi )a  
Override parameter defaults via `os.environ[prefix + param_name]`.
Maps UPPER_CASE env vars map to lower_case param names.
camelCase isn't supported (because Windows ignores case).

Precedence (highest first):

- call (`foo(a=3)`)
- environ (`FOO_A=2`)
- signature (`def foo(a=1)`)

Parameters
----------
prefix  : str
    Env var prefix, e.g. "FOO_"
types  : dict, optional
    Fallback mappings `{'param_name': type, ...}` if types cannot be
    inferred from function signature.
    Consider using `types=collections.defaultdict(lambda: ast.literal_eval)`.
is_method  : bool, optional
    Whether to use `functools.partialmethod`. If (default: False) use `functools.partial`.

Examples
--------
```
$ cat foo.py
from tqdm.utils import envwrap
@envwrap("FOO_")
def test(a=1, b=2, c=3):
    print(f"received: a={a}, b={b}, c={c}")

$ FOO_A=42 FOO_C=1337 python -c 'import foo; foo.test(c=99)'
received: a=42, b=2, c=99
```
Nc                 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paramskv	overridesparamtypenv_overridesparttypess
   &      r   wrapenvwrap.<locals>.wrapL   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%)lenosenvironr   r   lowerr   r   )	prefixr-   	is_methodr   r&   r'   r.   r+   r,   s	   &f&    @@r   envwrapr6   "   sw    H }FA24**2B2B2D]2D$!U[H\%QrU[[]A%2D]M%=7D'. K5 ^s   BBc                   4   a  ] tR t^ft 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)selfr;   s   &&r   __init__FormatReplace.__init__l   s        c                L    V ;P                   ^,          un         V P                  # )   r<   r;   )r=   _s   &&r   
__format__FormatReplace.__format__p   s    a||r@   rC   N) )	__name__
__module____qualname____firstlineno____doc__r>   rE   __static_attributes____classdictcell____classdict__s   @r   r8   r8   f   s     
 r@   r8   c                   H   a  ] tR t^ut 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r=   others   &&r   __lt__Comparable.__lt__w   s    %"3"333r@   c                "    W8  ;'       g    W8H  # r    rV   s   &&r   __le__Comparable.__le__z   s    00$-0r@   c                4    V P                   VP                   8H  # r   rT   rV   s   &&r   __eq__Comparable.__eq__}   s    5#4#444r@   c                    W8X  * # r   r[   rV   s   &&r   __ne__Comparable.__ne__         r@   c                    W8:  * # r   r[   rV   s   &&r   __gt__Comparable.__gt__   rd   r@   c                    W8  * # r   r[   rV   s   &&r   __ge__Comparable.__ge__   s    r@   r[   N)rH   rI   rJ   rK   rL   rX   r\   r_   rb   rf   ri   rM   rN   rO   s   @r   rR   rR   u   s+     ;415!!   r@   rR   c                   >   a  ] tR t^t o R tR tR tR tR tRt	V t
R# )ObjectWrapperc                .    \        V P                  V4      # r   )r   _wrappedr=   names   &&r   __getattr__ObjectWrapper.__getattr__   s    t}}d++r@   c                .    \        V P                  W4      # r   )setattrrn   r=   rp   values   &&&r   __setattr__ObjectWrapper.__setattr__   s    t}}d22r@   c                f     \         P                  W4      #   \         d    \        Y4      u # i ; i)z7Actual `self.getattr` rather than self._wrapped.getattr)objectrq   AttributeErrorr   ro   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)rz   rw   ru   s   &&&r   wrapper_setattrObjectWrapper.wrapper_setattr   s    !!$e44r@   c                *    V P                  RV4       R# )z$
Thin wrapper around a given object
rn   N)r   )r=   wrappeds   &&r   r>   ObjectWrapper.__init__   s     	Z1r@   r[   N)rH   rI   rJ   rK   rq   rw   r|   r   r>   rM   rN   rO   s   @r   rl   rl      s#     ,3'52 2r@   rl   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)superr>   r   )r=   r   r   	__class__s   &&&r   r>   SimpleTextIOWrapper.__init__   s     !Z2r@   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   )rn   writeencoder|   )r=   ss   &&r   r   SimpleTextIOWrapper.write   s-     }}""188D,@,@,L#MNNr@   c                6    V P                   \        VR V4      8H  # rn   rn   r   rV   s   &&r   r_   SimpleTextIOWrapper.__eq__       }}z5 AAAr@   r[   )rH   rI   rJ   rK   rL   r>   r   r_   rM   rN   __classcell__r   rP   s   @@r   r   r      s!     
3OB Br@   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,	" r@   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   r>   hasattrr   r   r   r   )r=   r   r   r   s   &&&r   r>   DisableOnWriteError.__init__   su    !7G$$  22=--PR7G$$  22=--PR %r@   c                6    V P                   \        VR V4      8H  # r   r   rV   s   &&r   r_   DisableOnWriteError.__eq__   r   r@   r[   )rH   rI   rJ   rK   rL   staticmethodr   r>   r_   rM   rN   r   r   s   @@r   r   r      s0       2RB Br@   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   r0   )datar   r   rescallbackr$   s   &*, r   r   )CallbackIOWrapper.__init__.<locals>.write   s(    41$1&1T#
r@   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#r@   z Can only wrap read/write methodsN)r   r>   r   r   r   r#   )r=   r   streammethodr   r   r$   r   s   &f&&  @r   r>   CallbackIOWrapper.__init__   s    
 	 v&W4[    %0v4[    .=>>r@   r[   )r   )rH   rI   rJ   rK   r>   rM   rN   r   r   s   @@r   r   r      s     ? ?r@   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    r3   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r@   c                 f    Rp \         '       d   \        p V f   \        p \        '       d   \        p V # )zm
Return a function which returns console dimensions (width, height).
Supported: linux, osx, windows, cygwin.
N)IS_WIN_screen_shape_windows_screen_shape_tputIS_NIX_screen_shape_linux)_screen_shapes    r   _screen_shape_wrapperr     s.    
 Mv- .Mv+r@   c                 v    ^ RI p^ RIHpHp ^ RIHpHp RpW8X  d   RpMW8X  d   RpVP                  P                  V4      pV! ^4      pVP                  P                  Wx4      p	V	'       d8   VP                  RVP                  4      w  rrrpppppVV,
          VV,
          3#  R#   \         d     R# i ; i)	r:   N)create_string_bufferwindll)stdinstdouthhhhHhhhhhhiiiNN)structctypesr   r   sysr   r   kernel32GetStdHandleGetConsoleScreenBufferInfounpackrawr    )r   r   r   r   r   r   	io_handlehcsbir   _bufx_bufy_curx_cury_wattrlefttoprightbottom_maxx_maxys   &                    r   r   r   )  s    7%	;I\IOO((3#B'oo88A#]]=$((CU5sE6E4<#--    s   B#B) )B87B8c                      ^ RI p^ RIHp R Uu. uF1  p\        V! VP	                  RV,           4      4      4      ^,
          NK3  	  up# u upi   \
         d     R# i ; i)zcygwin xterm (windows)N)
check_callztput )colslinesr   )shlex
subprocessr   intsplitr    )rD   r   r   r   s   *   r   r   r   A  si    )*,*A Ju{{7Q;789A==*, 	, , s"   A 7A
A 
A AAc                 \    ^ RI H p ^ RIHp ^ RIHp  V! RV! WR4      4      R,          w  rEWT3#   \
         d]     R Uu. uF*  p\        \        P                  T,          4      ^,
          NK,  	  Mu upi upu #   \        \        3 d    Ru u # i ; ii ; i  \         d    Ru # i ; i)	r:   )array)ioctl)
TIOCGWINSZr   :N   Nz        )COLUMNSLINESr   )r   fcntlr   termiosr   r    r   r1   r2   r#   r   ImportError)r   r   r   r   rowsr   r   s   &      r   r   r   M  s    "&	"sE"($CDRHJD: 	""8LM8L1BJJqM*Q..8LMMj) "!!"	"  sI   B 1 BA<0A21A<9B<BBBBB+*B+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)`)
stacklevelNc                 "   < S! V 4      ^ ,          # )r:   r[   )r   shapes   &r   r   $_environ_cols_wrapper.<locals>.innerk  s    Ry|r@   )r   DeprecationWarningr   r   )r   r  s    @r   _environ_cols_wrapperr  `  sC    
 	 
,-?AO!#E
5\  Lr@   c                  D    \         P                  R 8X  d   \        f   R# R# )ntrG   z[A)r1   rp   coloramar[   r@   r   _term_move_upr  r  s    ''T/(82GxGr@   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>w  s"     I&B$R(D0qa7&s   !#)sumr   )r   s   &r   _text_widthr  v  s    I#a&IIIr@   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.
rG   )r  RE_ANSIsub)r   s   &r   disp_lenr  z  s    
 w{{2t,--r@   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[0m)r0   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Kr@   )win32cygwin)aixlinuxdarwinfreebsd)NF)5rL   r1   rer   	functoolsr   r   r   inspectr   unicodedatar   warningsr   weakrefr
   rangechrr   _range_unich_unicode_basestringplatformr   anyr   r   compiler  r  r  init	TypeErrorr6   r8   rR   rl   r   r   r   r   r   r   r   r   r   r   r  r  r  r  r%  r[   r@   r   <module>r=     sy   
 	 
 3 3  (  (-sC(< %+		?+>??+>?	?	Q+PQQ+PQ	Q
**,
- 	E"
AH    *2 22B- B((B- (BV? ?4 0	"&$HJ.I    Hs*   ;E' E' E	 	E$#E$'	E32E3