
    kj                     <   d Z ddlZddlZddlmZ ddlmZmZmZmZ ddl	Z	ddl
mZmZmZmZ ddlmZmZ eegef         Z	  ed           G d	 d
                      Z ej        d           G d d                      Z G d de          Z e            ZdS )zm
This module contains components that specifically address the styling and theming
of the ``--help`` output.
    N)	dataclass)AnyCallableDictOptional)FrozenSpaceclick_version_tupledelete_keysidentity)MISSINGPossiblyT)frozenc                      e Zd ZU dZeZeed<   	 eZeed<   	 eZ	eed<   	 eZ
eed<   	 eZeed<   	 eZeed<   	 eZeed<   	 eZeed	<   	 d
Zee         ed<   	 eZeed<   	 d
d
d
d
d
d
d
d
ed
f
dee         dee         dee         dee         dee         dee         dee         d	ee         deee                  dee         dd fdZedd            Zedd            Zd
S )	HelpThemeaJ  A collection of styles for several elements of the help page.

    A "style" is just a function or a callable that takes a string and returns
    a styled version of it. This means you can use your favorite styling/color
    library (like rich, colorful etc). Nonetheless, given that Click has some
    basic styling functionality built-in, Cloup provides the :class:`Style`
    class, which is a wrapper of the ``click.style`` function.

    :param invoked_command:
        Style of the invoked command name (in Usage).
    :param command_help:
        Style of the invoked command description (below Usage).
    :param heading:
        Style of help section headings.
    :param constraint:
        Style of an option group constraint description.
    :param section_help:
        Style of the help text of a section (the optional paragraph below the heading).
    :param col1:
        Style of the first column of a definition list (options and command names).
    :param col2:
        Style of the second column of a definition list (help text).
    :param epilog:
        Style of the epilog.
    :param alias:
        Style of subcommand aliases in a definition lists.
    :param alias_secondary:
        Style of separator and eventual parenthesis/brackets in subcommand alias lists.
        If not provided, the ``alias`` style will be used.
    invoked_commandcommand_helpheading
constraintsection_helpcol1col2aliasNalias_secondaryepilogreturnc                     d t                                                      D             }|	t          u r|d= |                    d           |rt	          j        | fi |S | S )Nc                     i | ]
\  }}|||S )N ).0keyvals      H/home/agentuser/manim-venv/lib/python3.11/site-packages/cloup/styling.py
<dictcomp>z#HelpTheme.with_.<locals>.<dictcomp>_   s    OOOxsCs#s    r   self)localsitemsr   popdataclassesreplace)r%   r   r   r   r   r   r   r   r   r   r   kwargss               r"   with_zHelpTheme.with_S   sr     PO688>>+;+;OOOg%%()

6 	7&t66v666r$   c            
          t          t          d          t          dd          t          d          t          d          t          d          t          d          	          S )
z2A theme assuming a dark terminal background color.bright_yellowfgbright_whiteT)r0   boldmagentayellowwhite)r   r   r   r   r   r   r   Styler   r$   r"   darkzHelpTheme.darkg   sq     !_555^$777	***/***8$$$!W---
 
 
 	
r$   c                      t          t          d          t          d          t          d          t          d                    S )z3A theme assuming a light terminal background color.r4   r/   bright_bluered)r   r   r   r   r6   r   r$   r"   lightzHelpTheme.lights   sP     !X...]+++(###	
 
 
 	
r$   )r   r   )__name__
__module____qualname____doc__r   r   IStyle__annotations__r   r   r   r   r   r   r   r   r   r   r   r   r,   staticmethodr8   r<   r   r$   r"   r   r      s         > 'OV&&&7#L&###AGV)!J!!!:#L&###YD&UD&FE6<(,OXf%,,,: FF 37)-$('+)-!%!%"&6=#' '/v& &! V$	
 v& v v  "(6"23   
   ( 	
 	
 	
 \	
 
 
 
 \
 
 
r$   r   c                      e Zd ZU dZdZee         ed<   dZee         ed<   dZ	ee
         ed<   dZee
         ed<   dZee
         ed<   dZee
         ed<   dZee
         ed	<   dZee
         ed
<   dZee
         ed<   dZee
         ed<   dZee         ed<    ej        dd          Zeeeef                  ed<   dedefdZdS )r7   a  Wraps :func:`click.style` for a better integration with :class:`HelpTheme`.

    Available colors are defined as static constants in :class:`Color`.

    Arguments are set to ``None`` by default. Passing ``False`` to boolean args
    or ``Color.reset`` as color causes a reset code to be inserted.

    With respect to :func:`click.style`, this class:

    - has an argument less, ``reset``, which is always ``True``
    - add the ``text_transform``.

    .. warning::
        The arguments ``overline``, ``italic`` and ``strikethrough`` are only
        supported in Click 8 and will be ignored if you are using Click 7.

    :param fg: foreground color
    :param bg: background color
    :param bold:
    :param dim:
    :param underline:
    :param overline:
    :param italic:
    :param blink:
    :param reverse:
    :param strikethrough:
    :param text_transform:
        a generic string transformation; useful to apply functions like ``str.upper``

    .. versionadded:: 0.8.0
    Nr0   bgr2   dim	underlineoverlineitalicblinkreversestrikethroughtext_transformF)initdefault_style_kwargstextr   c                 `   | j         st          j        |           }t          |ddg           t	          t
          d                   dk     rt          |g d           t                              | d|           n| j         }| j        r|                     |          }t          j
        |fi |S )NrM   rP   r      )rH   rI   rL   )rP   dcasdictr
   intr	   object__setattr__rM   clickstyle)r%   rQ   r+   s      r"   __call__zStyle.__call__   s    %Yt__F!1? CDDD&q)**Q..F$K$K$KLLLt_f===='F 	-&&t,,D{4**6***r$   )r=   r>   r?   r@   r0   r   strrB   rE   r2   boolrF   rG   rH   rI   rJ   rK   rL   rM   rA   rT   fieldrP   r   r   r[   r   r$   r"   r7   r7   ~   sO         > BBD(4.C$ $Ix~$$$#Hhtn###!FHTN!!! E8D>   "GXd^"""$(M8D>((('+NHV$+++.6bhE4.P.P.PM8DcN+PPP+S +S + + + + + +r$   r7   c                   V    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdZdZdS )Colorz:Colors accepted by :class:`Style` and :func:`click.style`.blackr;   greenr4   bluer3   cyanr5   resetbright_black
bright_redbright_greenr.   r:   bright_magentabright_cyanr1   N)r=   r>   r?   r@   ra   r;   rb   r4   rc   r3   rd   r5   re   rf   rg   rh   r.   r:   ri   rj   r1   r   r$   r"   r`   r`      si        DDE
CEFDGDEE!LJ!L#MK%NK!LLLr$   r`   )r@   r)   rT   r   typingr   r   r   r   rY   cloup._utilr   r	   r
   r   cloup.typingr   r   r\   rA   r   r7   r`   DEFAULT_THEMEr   r$   r"   <module>ro      s            ! ! ! ! ! ! 0 0 0 0 0 0 0 0 0 0 0 0  O O O O O O O O O O O O * * * * * * * *	3%*	 H $g
 g
 g
 g
 g
 g
 g
 g
T T;+ ;+ ;+ ;+ ;+ ;+ ;+ ;+|" " " " "K " " "* 	r$   