
    #
3j{                    v    % S SK Jr  S SKrS SKJr  S/rSqS\S'   SS jr	SS jr
SS jrSS	 jrSS
 jrSS jrg)    )annotationsNz7`(?P<syntax>[^`]*)`|(?:^|\s)(?P<args>-{1,2}[\w]+[\w-]*)zbool | None_windows_console_fixedc                    [        U R                  5      [        U R                  R                  5       5      -
  nU(       a  XS n U R                  5         U $ )z<Strip leading and trailing whitespace from `rich.text.Text`.N)lenplainlstriprstrip)text	lstrip_ats     O/home/wildlama/miniconda3/lib/python3.13/site-packages/rich_argparse/_common.py
rich_stripr      sA    DJJ#djj&7&7&9"::IJKKMK    c                    UR                  5       nUR                  S5        [        R                  [	        [
        S5      [        S5      5      nUR                  R                  U5      Ul        UR                  X5      $ )z2`textwrap.wrap()` equivalent for `rich.text.Text`.   z	
  )	copyexpand_tabsdictfromkeysmapordr   	translatewrap)consoler
   widthwhitespace_transs       r   	rich_wrapr      s^    99;DQ}}S.?%@#c(K%%&67DJ99W$$r   c                z   ^ [        XU5      n[        R                  " S5      R                  U4S jU 5       5      $ )z2`textwrap.fill()` equivalent for `rich.text.Text`.
c              3  .   >#    U  H
  nTU-   v   M     g 7f)N ).0lineindents     r   	<genexpr>rich_fill.<locals>.<genexpr>*   s     =utVd]us   )r   rTextjoin)r   r
   r   r$   liness      ` r   	rich_fillr+   '   s.    gU+E66$<=u===r   c                j    [         R                  R                  S[         R                  " U 5      5      $ )z8Remove ANSI color codes and control codes from a string. )r'   re_ansisubstrip_control_codes)r
   s    r   _strip_codesr1   -   s"    99==Q224899r   c                    [         R                  S:X  d   e[        c  [         R                  " 5       n U R                  S:  d  U R
                  S:  a9   SS Kn[        [         R                  UR                  R                  5      q[        $ SS KnUR                  R                  nSnSnSnS	nUR                  UR!                  U5      UU-  U-  5        S
q[        $ ! [         a
    Sq [        $ f = f)Nwin32
   iZ)  r   F         iT)sysplatformr   getwindowsversionmajorbuildcolorama
isinstancestdoutansitowin32StreamWrapper	Exceptionctypeswindllkernel32SetConsoleModeGetStdHandle)winverr=   rC   rE   ENABLE_PROCESSED_OUTPUTENABLE_WRAP_AT_EOL_OUTPUT"ENABLE_VIRTUAL_TERMINAL_PROCESSINGSTD_OUTPUT_HANDLEs           r   _initialize_win_colorsrM   2   s    <<7"""%&&(<<"u 4/)3CJJ@T@T@b@b)c&$ "! }}--H&)#(+%14. ###%%&78'+,45 &*"!!#  /).&  "!#/s   2C C10C1c                    U(       ah  [         R                  S:X  aT  U R                  (       aC  U R                  b6  [	        5       (       d'  SR                  S UR                  S5       5       5      nU$ )Nr3   r   c              3  b   #    U  H%  n[         R                  R                  S U5      v   M'     g7f)r-   N)r'   r.   r/   )r"   r#   s     r   r%   '_fix_legacy_win_text.<locals>.<genexpr>Y   s$     N=MTr400=Ms   -/)r8   r9   legacy_windowscolor_systemrM   r)   split)r   r
   s     r   _fix_legacy_win_textrT   P   sS     	LLG#""  ,&((yyNTZZ=MNNKr   )r
   r.TextreturnrU   )r   	r.Consoler
   rU   r   intrV   zr.Lines)
r   rW   r
   rU   r   rX   r$   rU   rV   rU   )r
   strrV   rY   )rV   bool)r   rW   r
   rY   rV   rY   )
__future__r   r8   rich_argparse._lazy_rich
_lazy_richr'   _HIGHLIGHTSr   __annotations__r   r   r+   r1   rM   rT   r!   r   r   <module>r`      sG   
 # 
 $ ? '+  *%>:
"<
r   