
    	              
           S r SSKJr  SSKJrJr  SSKJr  SSKJ	r	  Sr
\" SS5      r \" S	S	S
S
S
S
S
S9r/ SQr " S S\	" \\5      5      r " S S\5      rg	)z#
The base classes for the styling.
    )unicode_literals)ABCMetaabstractmethod)
namedtuple)with_metaclass)AttrsDEFAULT_ATTRSANSI_COLOR_NAMESStyleDynamicStyler   z1color bgcolor bold underline italic blink reverseNF)colorbgcolorbold	underlineitalicblinkreverse)	ansiblack	ansiwhiteansidefaultansired	ansigreen
ansiyellowansiblueansifuchsiaansiturquoiseansilightgrayansidarkgrayansidarkredansidarkgreen	ansibrownansidarkblue
ansipurpleansitealc                   8    \ rS rSrSr\S 5       r\S 5       rSrg)r   3   z0
Abstract base class for prompt_toolkit styles.
c                     g)z-
Return :class:`.Attrs` for the given token.
N )selftokens     -lib/third_party/prompt_toolkit/styles/base.pyget_attrs_for_tokenStyle.get_attrs_for_token7           c                     g)z
Invalidation hash for the style. When this changes over time, the
renderer knows that something in the style changed, and that everything
has to be redrawn.
Nr(   r)   s    r+   invalidation_hashStyle.invalidation_hash=   r.   r/   r(   N)	__name__
__module____qualname____firstlineno____doc__r   r,   r2   __static_attributes__r(   r/   r+   r   r   3   s/      
  r/   r   c                   *    \ rS rSrSrS rS rS rSrg)r   F   z
Style class that can dynamically returns an other Style.

:param get_style: Callable that returns a :class:`.Style` instance.
c                     Xl         g N	get_style)r)   r?   s     r+   __init__DynamicStyle.__init__L   s    "r/   c                 r    U R                  5       n[        U[        5      (       d   eUR                  U5      $ r=   )r?   
isinstancer   r,   )r)   r*   styles      r+   r,    DynamicStyle.get_attrs_for_tokenO   s2     %''''((//r/   c                 >    U R                  5       R                  5       $ r=   )r?   r2   r1   s    r+   r2   DynamicStyle.invalidation_hashU   s    ~~1133r/   r>   N)	r4   r5   r6   r7   r8   r@   r,   r2   r9   r(   r/   r+   r   r   F   s    
#04r/   r   )r8   
__future__r   abcr   r   collectionsr   sixr   __all__r   r	   r
   objectr   r   r(   r/   r+   <module>rN      sv    ( ' "  	7OP D$Ue"%@	 N7F+ &45 4r/   