
                         0    d dl mZ ddlmZmZ dZd Zd Zy)    )unicode_literals   )DEFAULT_ATTRSAttrs)split_token_in_partsmerge_attrsc                     g }g }| dz   D ]8  }|dk(  r |s|j                  t        |             g }(|j                  |       : |S )zq
    Take a Token, and turn it in a list of tokens, by splitting
    it on ':' (taking that as a separator.)
    ):r
   )appendtuple)tokenresultcurrentparts       .lib/third_party/prompt_toolkit/styles/utils.pyr   r   
   sN    
 FG3;eGn-NN4    M    c                    t         }| D ]  }t        |j                  xs |j                  |j                  xs |j                  |j                  xs |j                  |j
                  xs |j
                  |j                  xs |j                  |j                  xs |j                  |j                  xs |j                        } |S )z
    Take a list of :class:`.Attrs` instances and merge them into one.
    Every `Attr` in the list can override the styling of the previous one.
    )colorbgcolorbold	underlineitalicblinkreverse)	r   r   r   r   r   r   r   r   r   )list_of_attrsr   attrs      r   r   r      s    
 F**,LL2FNN)fkknn8(8(8;;/&--**,LL2FNN4  Mr   N)
__future__r   baser   r   __all__r   r    r   r   <module>r!      s    ' &$r   