)L i UdZddlmZddlmZmZddlmZmZm Z gdZ Gdde Z e ddd d d d d d d d Z gd Z d d ddddddddd Zded<eej#j%ee sJeej'ee zrJGddeZGddeZGddeZy )!z# The base classes for the styling. ) annotations)ABCMetaabstractmethod)CallableHashable NamedTuple)Attrs DEFAULT_ATTRSANSI_COLOR_NAMESANSI_COLOR_NAMES_ALIASES BaseStyle DummyStyle DynamicStylecreZdZUded<ded<ded<ded<ded<ded<ded <ded <ded <ded <y )r z str | Nonecolorbgcolorz bool | Nonebold underlinestrikeitalicblinkreversehiddendimN)__name__ __module__ __qualname____annotations__`/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/prompt_toolkit/styles/base.pyr r s>         r r F) rrrrrrrrrr) ansidefault ansiblackansired ansigreen ansiyellowansiblue ansimagentaansicyanansigrayansibrightblack ansibrightredansibrightgreenansibrightyellowansibrightblueansibrightmagentaansibrightcyan ansiwhiter,r*r2r'r)r1r+r%r&r() ansidarkgrayansiteal ansiturquoise ansibrown ansipurple ansifuchsia ansilightgray ansidarkred ansidarkgreen ansidarkbluezdict[str, str]r c^eZdZdZeef ddZeeddZeddZ y) r z8 Abstract base class for prompt_toolkit styles. cy)a Return :class:`.Attrs` for the given style string. :param style_str: The style string. This can contain inline styling as well as classnames (e.g. "class:title"). :param default: `Attrs` to be used if no styling was defined. Nrself style_strdefaults r!get_attrs_for_style_strz!BaseStyle.get_attrs_for_style_strur cgS)z The list of style rules, used to create this style. (Required for `DynamicStyle` and `_MergedStyle` to work.) rrAs r! style_ruleszBaseStyle.style_ruless  r cy)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. NrrGs r!invalidation_hashzBaseStyle.invalidation_hashrEr NrBstrrCr returnr rMzlist[tuple[str, str]]rMr) rrr__doc__rr rDpropertyrHrJrr r!r r psf/<    ',        r r ) metaclassc@eZdZdZef ddZddZeddZy) rz. A style that doesn't style anything. c|SNrr@s r!rDz"DummyStyle.get_attrs_for_style_strs r cy)NrrGs r!rJzDummyStyle.invalidation_hashsr cgSrUrrGs r!rHzDummyStyle.style_ruless r NrKrOrN) rrrrPr rDrJrQrHrr r!rrsB 0=',  r rcHeZdZdZddZef ddZd dZed dZ y) rz Style class that can dynamically returns an other Style. :param get_style: Callable that returns a :class:`.Style` instance. c0||_t|_yrU) get_styler_dummy)rAr[s r!__init__zDynamicStyle.__init__s" l r cb|jxs |j}|j||SrU)r[r\rD)rArBrCstyles r!rDz$DynamicStyle.get_attrs_for_style_strs, /DKK,,Y@@r cZ|jxs |jjSrU)r[r\rJrGs r!rJzDynamicStyle.invalidation_hashs! /DKKBBDDr cR|jxs |jjSrU)r[r\rHrGs r!rHzDynamicStyle.style_ruless /DKK<<rjs#'11  J            &:&%&  ,.  # * * ,-66s;K7LMMM (--/ 037G3H HII  '  F$=9=r