wh UddlZddlZddlZddlZddlZddlmZmZddlm Z m Z ddl m Z ddl m Z ddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZmZmZdd lmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1m2Z2m3Z3ddl4m4Z4ddl5m6Z6m7Z7ddl8m9Z9ddl:m;Z;mZ>m?Z?ddl@mAZAmBZBddlCmDZDddlEmFZFddlGmHZHmIZIddlJmKZLddlMmNZNmOZOddlPmQZQmRZRddlSmTZTmUZUddlVmWZWddlXmYZYdd lZm[Z[dd!l\m]Z]dd"l^m_Z_dd#l`maZambZbdd$lcmdZddd%lemfZfmgZgmhZhdd&limjZjmkZkdd'llmmZmmnZnerdd(lompZpdd)lqmrZrdd*lsmtZtd+Zud,Zvejwd-kZxe e,eyd.fgd.fZze$d/Z{e$d0Z|Gd1d2Z}e}Z~ ejZn #e$rdZYnwxYw ejZn #e$rdZYnwxYw ejZn #e$rd3ZYnwxYweeefZeefZeAjeAjeAjd4ZGd5d6e&Ze Gd7d8Ze.Gd9d:e(Ze.Gd;deZGd?d@ZGdAdBZGdCdDZGdEdFZGdGdHZGdIdJZGdKdLZd~dNedOe dPe dPefffdQZdOefdRZeAjeAjeAjeAjxdSZdTeDZe GdUdVejZGdWdXeZdae'dYedZ<dd[ZdOefd\ZGd]d^Zd_eydOeyfd`ZedakredMbZedcdddedMdfddgdhdidjdkdldmedndoeeedgdMdpgdqdrdsdtdfdugdvdwdsdxgdydzdsd{d|d}dSdS)N)ABCabstractmethod) dataclassfield)datetime)wraps)getpass)escape)isclass)islice)ceil) monotonic) FrameType ModuleType TracebackType)IO TYPE_CHECKINGAnyCallableDictIterableListLiteralMapping NamedTupleOptionalProtocolTextIOTupleTypeUnioncastruntime_checkable) NULL_FILE)errorsthemes)_emoji_replace)CONSOLE_HTML_FORMATCONSOLE_SVG_FORMAT) get_fileno)FormatTimeCallable LogRender)Align AlignMethod) ColorSystem blend_rgb)Control) EmojiVariant)NullHighlighterReprHighlighterrender) Measurementmeasure_renderables)Pager SystemPager)Pretty is_expandable) rich_cast)Region) render_scope)Screen)Segment)Style StyleTypeStyled)DEFAULT_TERMINAL_THEMESVG_EXPORT_THEME TerminalTheme)TextTextType)Theme ThemeStack)WindowsConsoleFeatures)LiveStatussdwin32rJ)defaultleftcenterrightfull)foldcropellipsisignoreceZdZdS)NoChangeN)__name__ __module__ __qualname__\/home/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/rich/console.pyr_r_OsDrdr_)kitty256color16colorc*eZdZUdZeed< eed<dS)ConsoleDimensionszSize of the terminal.widthheightN)r`rarb__doc__int__annotations__rcrdrerkrkms- JJJ. KKK--rdrkceZdZUdZeed< eed< eed< eed< eed< eed< eed< d Z e e ed < d Z e e ed < d Ze eed < d Ze eed< d Ze eed< d Ze eed<edefdZddZeeeeeeeeed deeefdeeefdeeefd ee e efd ee e efd ee eefdee eefdee eefdee eefddfdZdeddfdZdeddfdZddZdededdfdZd S)ConsoleOptionsz$Options for __rich_console__ method.sizelegacy_windows min_width max_width is_terminalencoding max_heightNjustifyoverflowFno_wrap highlightmarkuprmreturnc8|jd S)z+Check if renderables should use ascii only.utf)rx startswithselfs re ascii_onlyzConsoleOptions.ascii_onlys=++E2222rdctt}|j|_|S)zdReturn a copy of the options. Returns: ConsoleOptions: a copy of self. )rr__new____dict__copyroptionss rerzConsoleOptions.copys2 #1"8"8"H"H=--//rd) rlrurvrzr{r|r}r~rmrlc |} t|tstd|x| _| _t|ts|| _t|ts|| _t|ts|| _t|ts|| _t|ts|| _t|ts|| _ t|ts|| _ t| ts"| | | _ | dntd| | _ | S)zUpdate values, return a copy.rN) r isinstancer_maxrurvrzr{r|r}r~ryrm) rrlrurvrzr{r|r}r~rmrs reupdatezConsoleOptions.updates,))++%** B475MM AG  1)X.. * )G )X.. * )G '8,, &%GO(H-- ('G '8,, &%GO)X.. * )G &(++ $#GN&(++ H!%+"%+^TTQGNrdcf|}td|x|_|_|S)zUpdate just the width, return a copy. Args: width (int): New width (sets both min_width and max_width) Returns: ~ConsoleOptions: New console options instance. r)rrrurv)rrlrs re update_widthzConsoleOptions.update_widths.))++03Au =G-rdcJ|}|x|_|_|S)zUpdate the height, and return a copy. Args: height (int): New height Returns: ~ConsoleOptions: New Console options instance. )rryrm)rrmrs re update_heightzConsoleOptions.update_heights%))++.44W^rdc<|}d|_|S)zReturn a copy of the options with height set to ``None``. Returns: ~ConsoleOptions: New console options instance. N)rrmrs re reset_heightzConsoleOptions.reset_heights ))++rdc|}td|x|_|_|x|_|_|S)aUpdate the width and height, and return a copy. Args: width (int): New width (sets both min_width and max_width). height (int): New height. Returns: ~ConsoleOptions: New console options instance. r)rrrurvrmry)rrlrmrs reupdate_dimensionsz ConsoleOptions.update_dimensionss=))++03Au =G-.44+rd)rrr)r`rarbrnrkrpboolrostrrzr JustifyMethodr{OverflowMethodr|r}r~rmpropertyrr NO_CHANGEr!r_rrrrrrcrdrerrrrvs.. 2NNN&NNN&<MMMOOO2'+GXm $+++0)-Hh~&---1#GXd^###$ $Ix~$$$,!FHTN!!!/ FHSM    3D333X3'0*3*3G3<5>2;1:###S(]##h' # h' # x .89 #0(:;#x~x/0#$12#htnh./#hsmX-.# ####J # *:     C ,<     s C .decorator.._replaces* &$1&11K+/3// /rd)rrr)rrr s` re decoratorzgroup..decoratorsU v 0C 03 05 0 0 0 0 0 0  0rd)rrr r)r rs` regrouprsQ h~667  #u*        rdc tn#t$rYdSwxYwt}|jj}dt |jvst jds|dkrdS|dkrdSdS)z-Check if we're running in a Jupyter notebook.Fz google.colabDATABRICKS_RUNTIME_VERSIONZMQInteractiveShellTTerminalInteractiveShell) get_ipython NameError __class__r`rosgetenv)ipythonshells re _is_jupyterr(s uummG   &E#g/0000 91 2 2 1 ) ) )t , , ,uus  )standard256 truecolorwindowsci|]\}}|| Srcrc).0namesystems re r1sOOOvOOOrdcZeZdZUdZeed<eeZe e ed<dZ e ed<dS)ConsoleThreadLocalsz(Thread local values for Console context. theme_stack)default_factoryrr buffer_indexN) r`rarbrnrMrprrrrrBr6rorcrdrer3r3sU22!E$777FDM777L#rdr3cJeZdZdZedeedeefdZdS) RenderHookz(Provides hooks in to the render process.rrcdS)aLCalled with a list of objects to render. This method can return a new list of renderables, or modify and return the same list. Args: renderables (List[ConsoleRenderable]): A number of renderable objects. Returns: List[ConsoleRenderable]: A replacement list of renderables. Nrc)rrs reprocess_renderableszRenderHook.process_renderables)srdN)r`rarbrnrrrr:rcrdrer8r8&sT22   12       ^    rdr8rN_windows_console_featurescLttSddlm}|atS)Nr%get_windows_console_features)r;_windowsr>r=s rer>r><s5 ,((666666 < < > > $$rdc8totj S)zDetect legacy Windows.)WINDOWSr>vtrcrdredetect_legacy_windowsrCFs  <799<<e-d?e-d(dfd@Z.ddAZ/d(efdBZ0ddCdedDe d(dfdEZ1ddFZ2ddCdedDe d(e3fdGZ4ed(e efdHZ5ed(efdIZ6ed(e fdJZ7ed(e fdKZ8ed(e9fdLZ:ed(e;fdMZe>jded(dfdQZ>ed(efdRZ?e?jded(dfdSZ?ddTZ@d(eAfdUZB ddVe eCdWe dXe d(eDfdYZEdd[ed(dfd\ZFdd]e d(dfd^ZGd_d`dadbdcddeHdeedfedgedhed(dif djZIddke d(e fdlZJddme d(e fdnZKed(e fdoZLdped(e fdqZM ddre de ed(dsfdtZNddudveHdwe e9d(eOfdxZP ddveHdwe e9d(eQefdyZR dddddzdveHdwe e9de eSd{e d|e d(eeef d}ZTd~ddddddddedeeeSfde eUde eVde e de e de e d!e eWd(dfdZXdddeeeSfde eeSefd(eSfdZYddddddeQe-dedede eUde e de e de e d(eeZfdZ[ ddddddpe\dedeeeSfde]d(df dZ^de_d(dfdZ`dddddde-dedede eeeSfde e d(df dZadddddddddddddddde-dedede eeeSfde eUde eVde e de e de e de e de ede ede de e de d(df dZb ddddddddddd de ede-dedeefde de de de de de ee-ge-fde d(dfdZcddddveHde eddwe e9d(dfdZe ddeeededed(dfdZfddddddddde edede ede de deQeeegfded(dfdZheiejjkfdedege elfd(e=eeemee-fffdZndddddddddZd de-dedede eeeSfde eUde e de e de e de ded(dfdÄZoddĄZpddńZqddƄZrdeQed(efdȄZs ddddddɜde\de de de de etd(ef d̈́ZudddΜde dWe d(efdЄZvdddΜdede dWe d(dfd҄ZwdddddӜde exde de ede d(ef dքZyddezddӜdede exde dede d(df dׄZ{ddde|dddڜdpede exde dedede ed(efd݄Z}ddde|dddڜdedpede exde dedede ed(dfdބZ~dS)rar A high level console interface. Args: color_system (str, optional): The color system supported by your terminal, either ``"standard"``, ``"256"`` or ``"truecolor"``. Leave as ``"auto"`` to autodetect. force_terminal (Optional[bool], optional): Enable/disable terminal control codes, or None to auto-detect terminal. Defaults to None. force_jupyter (Optional[bool], optional): Enable/disable Jupyter rendering, or None to auto-detect Jupyter. Defaults to None. force_interactive (Optional[bool], optional): Enable/disable interactive mode, or None to auto detect. Defaults to None. soft_wrap (Optional[bool], optional): Set soft wrap default on print method. Defaults to False. theme (Theme, optional): An optional style theme object, or ``None`` for default theme. stderr (bool, optional): Use stderr rather than stdout if ``file`` is not specified. Defaults to False. file (IO, optional): A file object where the console should write to. Defaults to stdout. quiet (bool, Optional): Boolean to suppress all output. Defaults to False. width (int, optional): The width of the terminal. Leave as default to auto-detect width. height (int, optional): The height of the terminal. Leave as default to auto-detect height. style (StyleType, optional): Style to apply to all output, or None for no style. Defaults to None. no_color (Optional[bool], optional): Enabled no color mode, or None to auto detect. Defaults to None. tab_size (int, optional): Number of spaces used to replace a tab character. Defaults to 8. record (bool, optional): Boolean to enable recording of terminal output, required to call :meth:`export_html`, :meth:`export_svg`, and :meth:`export_text`. Defaults to False. markup (bool, optional): Boolean to enable :ref:`console_markup`. Defaults to True. emoji (bool, optional): Enable emoji code. Defaults to True. emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None. highlight (bool, optional): Enable automatic highlighting. Defaults to True. log_time (bool, optional): Boolean to enable logging of time by :meth:`log` methods. Defaults to True. log_path (bool, optional): Boolean to enable the logging of the caller by :meth:`log`. Defaults to True. log_time_format (Union[str, TimeFormatterCallable], optional): If ``log_time`` is enabled, either string for strftime or callable that formats the time. Defaults to "[%X] ". highlighter (HighlighterType, optional): Default highlighter. legacy_windows (bool, optional): Enable legacy Windows mode, or ``None`` to auto detect. Defaults to ``None``. safe_box (bool, optional): Restrict box options that don't render on legacy Windows. get_datetime (Callable[[], datetime], optional): Callable that gets the current time as a datetime.datetime object (used by Console.log), or None for datetime.now. get_time (Callable[[], time], optional): Callable that gets the current time in seconds, default uses time.monotonic. _environautoNFTz[%X]) color_systemforce_terminal force_jupyterforce_interactive soft_wraprstderrfilequietrlrmrno_colortab_sizerecordr~emoji emoji_variantr}log_timelog_pathlog_time_format highlighterrtsafe_box get_datetimeget_timerErH)rFr)r*r+r,rIrJrKrLrrMrNrOrlrmrrPrQrRr~rSrTr}rUrVrWrXHighlighterTypertrYrZr[c|||_|tn||_|jr| G|jd}|$|rt |} nt } | G|jd}|$|rt |} nt} ||_||_ ||_ ||_ ||_ ||_ |to|j n||_| G|jd}|+|rt ||jz } | ?|jd} | #| rt | } ||_| |_| |_|d|_|||_||_| |_||_|d|_n2|dkr||_nt2||_t5j|_t;||||_|pt>|_ ||_!|p tDj#|_$|ptJ|_&| |_'| | n|jdddk|_(|.|jd d}!|!|!d krd }n|!d krd }||j)o|j* n||_+t5j|_,t[t]| t^j0n||_1g|_2g|_3g|_4d |_5dS)NJUPYTER_COLUMNS JUPYTER_LINESCOLUMNSLINESrF) show_time show_path time_formatNO_COLORrTTY_INTERACTIVE0F1T)r4)6rEr( is_jupyterrisdigitroJUPYTER_DEFAULT_COLUMNSJUPYTER_DEFAULT_LINESrQrR_markup_emoji_emoji_variant _highlightrCrtrL_width_height_force_terminal_filerOrM _color_system_detect_color_system COLOR_SYSTEMS threadingRLockrr- _log_render_null_highlighterrXrYrnowrZrr[rrPrwis_dumb_terminalis_interactive_record_buffer_lockr3rMr'DEFAULT_thread_locals_record_buffer _render_hooks _live_stack_is_alt_screen)"rrHrIrJrKrLrrMrNrOrlrmrrPrQrRr~rSrTr}rUrVrWrXrtrYrZr[rEjupyter_columns jupyter_linescolumnsrtty_interactives" rerzConsole.__init__qsF  $DM+8+@+---m ? 3}"&-"3"34E"F"F".?3J3J3L3L.00EE3E~ $ 1 1/ B B  ,1F1F1H1H, //FF2F     6C#%# $ $ M%%g..E U]]__ U"   1#  %#1D     !%D   V # #!%!:!:!>NN   .0/1')#rdrc(d|jd|jdS)Nz)rlrurs re__repr__zConsole.__repr__s EEEd.@EEEErdc|jp|jr tjn tj}t |d|}|t }|S)z Get the file object to write to.rich_proxied_file)rtrMsysstdoutgetattrr$)rrNs rerNz Console.files@zHDKGcjjSZt0$77 <D rdnew_filec||_dS)zSet a new file object.N)rt)rrs rerNz Console.files rdc|jjSzGet a thread local buffer.)rrrs rerzConsole._buffers"))rdc|jjSrrr6rs re _buffer_indexzConsole._buffer_index s"//rdvaluec||j_dSrr)rrs rerzConsole._buffer_indexs+0(((rdc|jjS)z!Get the thread local theme stack.)rr4rs re _theme_stackzConsole._theme_stacks"..rdcr|jr tjS|jr|jrdSt r@|jr tjSt}|jr tjn tj S|j dd }|dvr tjS|j dd }|d\}}}t |tj}|S)z"Detect color system from env vars.N COLORTERMr)r+24bitTERM-)rir0 TRUECOLORrwr}rArtr>r+ EIGHT_BITrErstriplower rpartition _TERM_COLORSSTANDARD)rwindows_console_features color_termterm _term_name_hyphencolorsrHs rervzConsole._detect_color_systems" ? )( ( 4#8 4  " +"**'C'E'E $,5+ %% *  **;;;AACCIIKKJ333",,=$$VR006688>>@@D*.//#*>*> 'J'++FK4HIIL rdc&|xjdz c_dS)z4Enter in to a buffer context, and buffer all output.r%N)rrs rerzConsole._enter_buffer3s ardcN|xjdzc_|dS)z5Leave buffer context, and render content if required.r%N)r _check_bufferrs rerzConsole._exit_buffer7s. a rdliverOc|j5|j|t|jdkcdddS#1swxYwYdS)a`Set Live instance. Used by Live context manager (no need to call directly). Args: live (Live): Live instance using this Console. Returns: Boolean that indicates if the live is the topmost of the stack. Raises: errors.LiveError: If this Console has a Live context currently active. r%N)rrappendr)rrs reset_livezConsole.set_live<sZ . .   # #D ) ) )t'((A- . . . . . . . . . . . . . . . . . .s2AA A cx|j5|jddddS#1swxYwYdS)zUClear the Live instance. Used by the Live context manager (no need to call directly).N)rrpoprs re clear_livezConsole.clear_liveLs Z # #   " " " # # # # # # # # # # # # # # # # # # /33hookcz|j5|j|ddddS#1swxYwYdS)zpAdd a new render hook to the stack. Args: hook (RenderHook): Render hook instance. N)rrr)rrs repush_render_hookzConsole.push_render_hookQs Z , ,   % %d + + + , , , , , , , , , , , , , , , , , ,s 044cx|j5|jddddS#1swxYwYdS)z'Pop the last renderhook from the stack.N)rrrrs repop_render_hookzConsole.pop_render_hookZs Z % %   " " $ $ $ % % % % % % % % % % % % % % % % % %rc.||S)z,Own context manager to enter buffer context.rrs rerzConsole.__enter___s  rdr exc_value tracebackc.|dS)zExit buffer context.N)r)rrrrs rerzConsole.__exit__ds rdc.|dS)z`Begin capturing console output. Call :meth:`end_capture` to exit capture mode and return output.Nrrs rerzConsole.begin_capturehs rdcv||j}|jdd=||S)zhEnd capture mode and return captured string. Returns: str: Console output. N)rrr)r render_results rerzConsole.end_capturels> ++DL99 LO rdrrc>|j||dS)aPush a new theme on to the top of the stack, replacing the styles from the previous theme. Generally speaking, you should call :meth:`~rich.console.Console.use_theme` to get a context manager, rather than calling this method directly. Args: theme (Theme): A theme instance. inherit (bool, optional): Inherit existing styles. Defaults to True. rN)rrrrrs rerzConsole.push_themews& $$UG$<<<<ED' ' 'DKl*FF    s&A??BBnew_sizec,|\}}||_||_dS)zvSet a new size for the terminal. Args: new_size (Tuple[int, int]): New width and height. N)rqrr)rrrlrms rersz Console.sizes! v  rdc|jjS)zsGet the width of the console. Returns: int: The width (in characters) of the console. )rsrlrs rerlz Console.width&syrdc||_dS)zFSet width. Args: width (int): New width. N)rq)rrls rerlz Console.width/s rdc|jjS)zpGet the height of the console. Returns: int: The height (in lines) of the console. )rsrmrs rermzConsole.height8syrdc||_dS)zISet height. Args: height (int): new height. N)rr)rrms rermzConsole.heightAs rdcR|tjdS)z3Play a 'bell' sound (if supported by the terminal).N)controlr2bellrs rerz Console.bellJs  W\^^$$$$$rdc$t|}|S)aA context manager to *capture* the result of print() or log() in a string, rather than writing it to the console. Example: >>> from rich.console import Console >>> console = Console() >>> with console.capture() as capture: ... console.print("[bold magenta]Hello World[/]") >>> print(capture.get()) Returns: Capture: Context manager with disables writing to the terminal. )r)rcaptures rerzConsole.captureNs$--rdrrrc(t||||S)aA context manager to display anything printed within a "pager". The pager application is defined by the system and will typically support at least pressing a key to scroll. Args: pager (Pager, optional): A pager object, or None to use :class:`~rich.pager.SystemPager`. Defaults to None. styles (bool, optional): Show styles in pager. Defaults to False. links (bool, optional): Show links in pager. Defaults to False. Example: >>> from rich.console import Console >>> from rich.__main__ import make_test_card >>> console = Console() >>> with console.pager(): console.print(make_test_card()) Returns: PagerContext: A context manager. )rrr)r)rrrrs rerz Console.pager_s*DfEJJJJrdr%rcj|dks Jd|t|dS)zqWrite new line(s). Args: count (int, optional): Number of new lines. Defaults to 1. rzcount must be >= 0N)rrrs rerz Console.linevs6zzz/zzz 75>>"""""rdhomec|r:|tjtjdS|tjdS)zClear the screen. Args: home (bool, optional): Also move the cursor to 'home' position. Defaults to True. N)rr2clearr)rrs rerz Console.clearsP  * LL',.. 9 9 9 9 9 LL ) ) ) ) )rddotszstatus.spinnerg?g)@)spinner spinner_stylespeedrefresh_per_secondstatusrrrrrQc4ddlm}|||||||}|S)atDisplay a status and spinner. Args: status (RenderableType): A status renderable (str or Text typically). spinner (str, optional): Name of spinner animation (see python -m rich.spinner). Defaults to "dots". spinner_style (StyleType, optional): Style of spinner. Defaults to "status.spinner". speed (float, optional): Speed factor for spinner animation. Defaults to 1.0. refresh_per_second (float, optional): Number of refreshes per second. Defaults to 12.5. Returns: Status: A Status object that may be used as a context manager. r%rP)rrrrr)rrQ)rrrrrrrQstatus_renderables rerzConsole.statussG* #""""""F '1    ! rdrcf|jr)|tj|dSdS)zqShow or hide the cursor. Args: show (bool, optional): Set visibility of the cursor. TF)rwrr2r)rrs rerzConsole.show_cursors6    LL,T22 3 3 34urdenablecd}|jr7|js0|tj|d}||_|S)aEnables alternative screen mode. Note, if you enable this mode, you should ensure that is disabled before the application exits. See :meth:`~rich.Console.screen` for a context manager that handles this for you. Args: enable (bool, optional): Enable (True) or disable (False) alternate screen. Defaults to True. Returns: bool: True if the control codes were written. FT)rwrtrr2 alt_screenr)rrchangeds rerzConsole.set_alt_screensM   )D$7 ) LL+F33 4 4 4G"(D rdc|jS)zCheck if the alt screen was enabled. Returns: bool: True if the alt screen was enabled, otherwise False. )rrs re is_alt_screenzConsole.is_alt_screens ""rdtitlecf|jr)|tj|dSdS)aSet the title of the console terminal window. Warning: There is no means within Rich of "resetting" the window title to its previous value, meaning the title you set will persist even after your application exits. ``fish`` shell resets the window title before and after each command by default, negating this issue. Windows Terminal and command prompt will also reset the title for you. Most other shells and terminals, however, do not do this. Some terminals may require configuration changes before you can set the title. Some terminals may not support setting the title at all. Other software (including the terminal itself, the shell, custom prompts, plugins, etc.) may also set the terminal window title. This could result in whatever value you write using this method being overwritten. Args: title (str): The new title of the terminal window. Returns: bool: True if the control code to change the terminal title was written, otherwise False. Note that a return value of True does not guarantee that the window title has actually changed, since the feature may be unsupported/disabled in some terminals. TF)rwrr2r )rr s reset_window_titlezConsole.set_window_titles56    LLu-- . . .4urdrrc*t|||pdS)auContext manager to enable and disable 'alternative screen' mode. Args: hide_cursor (bool, optional): Also hide the cursor. Defaults to False. style (Style, optional): Optional style for screen. Defaults to None. Returns: ~ScreenContext: Context which enables alternate screen on enter, and disables it on exit. r)rr)r)rrrs rerzConsole.screensT{%+2NNNNrdrrrc@tj||p|j|}|S)aMeasure a renderable. Returns a :class:`~rich.measure.Measurement` object which contains information regarding the number of characters required to print the renderable. Args: renderable (RenderableType): Any renderable or string. options (Optional[ConsoleOptions], optional): Options to use when measuring, or None to use default options. Defaults to None. Returns: Measurement: A measurement of the renderable. )r8rr)rrr measurements remeasurezConsole.measures$"odG,Ct|ZPP rdc#K|p|j}|jdkrdSt|}t|dr&t |s|||}nft |tr9|||j |j }|||}ntj d|d t|}n&#t$rtj d|dwxYwt}|}|D]3}t ||r|V|||Ed{V4dS) akRender an object in to an iterable of `Segment` instances. This method contains the logic for rendering objects with the console protocol. You are unlikely to need to use it directly, unless you are extending the library. Args: renderable (RenderableType): An object supporting the console protocol, or an object that may be converted to a string. options (ConsoleOptions, optional): An options object, or None to use self.options. Defaults to None. Returns: Iterable[Segment]: An iterable of segments that may be rendered. r%Nr)r}r~zUnable to render zC; A str, Segment or object with __rich_console__ method is requiredzobject z is not renderable)rrvr>rr rrr render_strr}r~r&NotRenderableErroriter TypeErrorrBrr7) rrr_optionsrender_iterabletext_renderable iter_render_Segment render_outputs rer7zConsole.renders"*dl   ! ! Fz** :1 2 2 7:;N;N (99$IIOO  C ( ( "ooh&8.O.>>tXNNOO+TJTTT   //KK   +?/???  ((**( @ @M-22 @#####;;}h??????????  @ @s C#C8)rpad new_linesrr c X|j5|p|j}|||}|rtj||}|j}|t d|}tttj ||j |||d|} |jx|jt| z } | dkr[|r'td|j z|tdgntd|j z|gg} | | | z| cdddS#1swxYwYdS)aGRender objects in to a list of lines. The output of render_lines is useful when further formatting of rendered console text is required, such as the Panel class which draws a border around any renderable object. Args: renderable (RenderableType): Any object renderable in the console. options (Optional[ConsoleOptions], optional): Console options, or None to use self.options. Default to ``None``. style (Style, optional): Optional style to apply to renderables. Defaults to ``None``. pad (bool, optional): Pad lines shorter than render width. Defaults to ``True``. new_lines (bool, optional): Include " " characters at end of lines. Returns: List[List[Segment]]: A list of lines, where a line is a list of Segment objects. Nr)include_new_linesrrrr) rrr7rB apply_stylermrrr split_and_crop_linesrvrextend) rrrrrr render_options _rendered render_heightr extra_linespad_lines re render_lineszConsole.render_linesGs0Z& & $4 N J??I B#/ 5AA *1M( #A} 5 5 0!&0*3# !    E$0,3c%jj@ ?? ) R 'n.F(F N N '  #*#0H*H%"P"P!Q HLLK!7888M& & & & & & & & & & & & & & & & & & sD DD#&D#r)rrzr{rSr~r}rXtextrzr{rJcx|p |duo|j} |p |duo|j} |p |duo|j} | r't||| |j} || _|| _n+t| rt||jn||||} | r |p|j nd} | /| t| }| | |S| S)aConvert a string to a Text instance. This is called automatically if you print or log a string. Args: text (str): Text to render. style (Union[str, Style], optional): Style to apply to rendered text. justify (str, optional): Justify method: "default", "left", "center", "full", or "right". Defaults to ``None``. overflow (str, optional): Overflow method: "crop", "fold", or "ellipsis". Defaults to ``None``. emoji (Optional[bool], optional): Enable emoji, or ``None`` to use Console default. markup (Optional[bool], optional): Enable markup, or ``None`` to use Console default. highlight (Optional[bool], optional): Enable highlighting, or ``None`` to use Console default. highlighter (HighlighterType, optional): Optional highlighter to apply. Returns: ConsoleRenderable: Renderable object. N)rrSrT)default_variant)rzr{r) rnrmrp render_markuprorzr{rJr(rXr copy_styles)rr,rrzr{rSr~r}rX emoji_enabledmarkup_enabledhighlight_enabled rich_text _highlighterhighlight_texts rerzConsole.render_strs8@%4-"?DK DFdN$Ct|%P)t*;*O  %#"1 I !(I !)I  %N49LMMMM!   I=NW 7t'7SW  #)\#i..99N  & &y 1 1 1! !rd)rUr/rUcht|tr|S |j|}|tj|}|jr|n|S#tj$r<}|| |cYd}~Stj d|d|dd}~wwxYw)a Get a Style instance by its theme name or parse a definition. Args: name (str): The name of a style or a style definition. Returns: Style: A Style object. Raises: MissingStyle: If no style could be parsed from name. NzFailed to get style z; ) rrCrrparselinkrr&StyleSyntaxError get_style MissingStyle)rr/rUrerrors rer;zConsole.get_styles dE " " K %))$//E} D))#(:85::<<<5 8&   "~~g........%8t8888  s$A A&&B15B, B1B,,B1rzrSr~r}objectsseprc g}|jgj} dvrdtddffd } | t} |s ||jr|j} d fd } |D]} t | } t | tr$| || |||| Jt | tr | | kt | tr| | t| r%| t| | | | t| | |j (||j fd |D}|S) aCombine a number of renderables and text into one renderable. Args: objects (Iterable[Any]): Anything that Rich can render. sep (str): String to write between print data. end (str): String to write at end of print data. justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Returns: List[ConsoleRenderable]: A list of things to render. )rVrWrXrrNc `t|ttdSr)r.r"r/)r_appendrzs re align_appendz2Console._collect_renderables..align_appends-j${G*D*DEEFFFFFrdcrFt}|dSdS)N)rzr)rJjoinr)sep_textrrrzr@r,s re check_textz0Console._collect_renderables..check_text sV W#>>>x}}T**+++   rd)rSr~r}rX)rXc0g|]}t|SrcrEr.rrs re z0Console._collect_renderables..-s#SSS6*e44SSSrdrN)rr r{rprXr>rrrrJrr=r<rr;)rr?r@rrzrSr~r}r append_textrDr5rHrrCrrr,s ``` @@@@re_collect_renderableszConsole._collect_renderabless2202 $k  1 1 1 G GD G G G G G G G"F(9  ,*t*+L           " ; ;J":..J*c** ; OO"#%"+$0 $J-- ; J''''J(9:: ; z""""z** ; vjlCCCDDDD LLZ99:::: : !NN4:..ESSSS{SSSKrdu─z rule.linerW) charactersralignrOrPcZddlm}|||||}||dS)uDraw a line with optional centered title. Args: title (str, optional): Text to render over the rule. Defaults to "". characters (str, optional): Character(s) to form the line. Defaults to "─". style (str, optional): Style of line. Defaults to "rule.line". align (str, optional): How to align the title, one of "left", "center", or "right". Defaults to "center". r%)Rule)r rOrrPN)rulerRr)rr rOrrPrRrSs rerSz Console.rule1sF t%Je5QQQ 4rdrc|jsA|5|jd|DddddS#1swxYwYdSdS)zInsert non-printing control codes. Args: control_codes (str): Control codes, such as those that may move the cursor. c3$K|] }|jV dSr)segment)r._controls re z"Console.control..Ns%#M#MH$4#M#M#M#M#M#MrdN)r}rr%)rrs rerzConsole.controlFs $ N N N ###M#MW#M#M#MMMM N N N N N N N N N N N N N N N N N N N Ns%<AArr)r@rrr}c |d|D}||||ddddd| dS)aOutput to the terminal. This is a low-level way of writing to the terminal which unlike :meth:`~rich.console.Console.print` won't pretty print, wrap text, or apply markup, but will optionally apply highlighting and a basic style. Args: sep (str, optional): String to write between print data. Defaults to " ". end (str, optional): String to write at end of print data. Defaults to "\\n". style (Union[str, Style], optional): A style to apply to output. Defaults to None. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``. c34K|]}t|VdSr)r)r._objects rerXzConsole.out..cs("G"GG3w<<"G"G"G"G"G"GrdFTr])rr}rSr~r|r{r[rN)rFr)rr@rrr}r? raw_outputs reoutz Console.outPsd&(("G"Gw"G"G"GGG    rd)r@rrrzr{r|rSr~r}rlrmr[rLnew_line_startr|r[r^c |stf}| |j} | r |d}|d}d} |jdd}|5|||||||| }|D]}||}|j||| t| |jnt| ||| }g}|j }|j }||D]}||||n@|D]=}|tj |||||>|ritdd|Dd kr'|d tj| r7|jj }tj||jd D] }||n|j |ddddS#1swxYwYdS) a[Print to the console. Args: objects (positional args): Objects to log to the terminal. sep (str, optional): String to write between print data. Defaults to " ". end (str, optional): String to write at end of print data. Defaults to "\\n". style (Union[str, Style], optional): A style to apply to output. Defaults to None. justify (str, optional): Justify method: "default", "left", "right", "center", or "full". Defaults to ``None``. overflow (str, optional): Overflow method: "ignore", "crop", "fold", or "ellipsis". Defaults to None. no_wrap (Optional[bool], optional): Disable word wrapping. Defaults to None. emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to ``None``. markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to ``None``. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to ``None``. width (Optional[int], optional): Width of output, or ``None`` to auto-detect. Defaults to ``None``. crop (Optional[bool], optional): Crop output to width of terminal. Defaults to True. soft_wrap (bool, optional): Enable soft wrap mode which disables word wrapping and cropping of text or ``None`` for Console default. Defaults to ``None``. new_line_start (bool, False): Insert a new line at the start if the output contains more than one line. Defaults to ``False``. NTr]Fr>)rzr{rlrmr|r~r}rc3$K|] }|jV dSrr,r.rVs rerXz Console.print..s$II IIIIIIrdr%rr)rrLrrNr:rrminrlrr%r7rBr#r;rrF splitlinesinsertrrr$)rr@rrrzr{r|rSr~r}rlrmr[rLr^r? render_hooksrrr& new_segmentsr%r7r buffer_extendrs rerz Console.printpsJ #yylG  I  #D)!!!, 0 20 233#4K% D D"66{CC !\00!050Ac%,,,y#1N+-L!(F[F}"-??JF66*n==>>>>?#.JF+"F:~>>u@U@U  ;IILIIIIITTVVWW!''7<>>::: 2 $ 3 #8 $*%((D"M$''''(  ##L111a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2sFG$$G(+G(rf) dataindentr} skip_keys ensure_asciicheck_circular allow_nanrU sort_keysjsonrjrkrlrmrnrorpc ddlm} || |||||||| |  } nIA+==(.*?*N4;NN#) Aq%+==eVLLN!!*n!EE   1-----rdrrrrc|jstjdt|||}||}|j||dS)aUpdate lines of the screen at a given offset. Args: lines (List[List[Segment]]): Rendered lines (as produced by :meth:`~rich.Console.render_lines`). x (int, optional): x offset (column no). Defaults to 0. y (int, optional): y offset (column no). Defaults to 0. Raises: errors.NoAltScreen: If the Console isn't in alt screen mode. rzN)r r&r{rr7rr%r)rrrr screen_updaters rer|zConsole.update_screen_lines2sr! Y$%WXX X$UAq11 ;;}-- H%%% rdrSrcrlr)r word_wrap show_localssuppress max_framesr)rrrrc `ddlm}||||||||} || dS)a Prints a rich render of the last exception and traceback. Args: width (Optional[int], optional): Number of characters used to render code. Defaults to 100. extra_lines (int, optional): Additional lines of code to render. Defaults to 3. theme (str, optional): Override pygments theme used in traceback word_wrap (bool, optional): Enable word wrapping of long lines. Defaults to False. show_locals (bool, optional): Enable display of local variables. Defaults to False. suppress (Iterable[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback. max_frames (int): Maximum number of frames to show in a traceback, 0 for no maximum. Defaults to 100. r%) TracebackrN)rrr) rrlr)rrrrrrrs reprint_exceptionzConsole.print_exceptionFs[, )(((((I##!    9rdr currentframec|dz }|}|1|r||j}|dz}|r||J|jj|j|jfSt j|}|j|j|j jfS)aEGet caller frame information. Args: offset (int): the caller offset within the current frame stack. currentframe (Callable[[], Optional[FrameType]], optional): the callable to use to retrieve the current frame. Defaults to ``inspect.currentframe``. Returns: Tuple[str, int, Dict[str, Any]]: A tuple containing the filename, the line number and the dictionary of local variables associated with the caller frame. Raises: RuntimeError: If the stack offset is invalid. r%) f_backf_code co_filenamef_linenof_localsinspectstackfilenamelinenoframe)rrr frame_infos re_caller_frame_infozConsole._caller_frame_infois( !     U. !  U.$$$<+U^U^K K!0J& (9:;K;TT Trd) r@rrrzrSr~r} log_locals _stack_offsetrrc | stf} |jdd} |5|| ||||||} fd| D} || \} }}| drdnt j| }| t j d}|rBd| D}| t|d| || |||| g} | D]}|| } g}|j}|j}|j}| D]}|||||jj}t)j||jd D] }|| ddddS#1swxYwYdS) aXLog rich content to the terminal. Args: objects (positional args): Objects to log to the terminal. sep (str, optional): String to write between print data. Defaults to " ". end (str, optional): String to write at end of print data. Defaults to "\\n". style (Union[str, Style], optional): A style to apply to output. Defaults to None. justify (str, optional): One of "left", "right", "center", or "full". Defaults to ``None``. emoji (Optional[bool], optional): Enable emoji code, or ``None`` to use console default. Defaults to None. markup (Optional[bool], optional): Enable markup, or ``None`` to use console default. Defaults to None. highlight (Optional[bool], optional): Enable automatic highlighting, or ``None`` to use console default. Defaults to None. log_locals (bool, optional): Boolean to enable logging of locals where ``log()`` was called. Defaults to False. _stack_offset (int, optional): Offset of caller from end of call stack. Defaults to 1. Nr>c0g|]}t|SrcrErJs rerKzConsole.log..s#WWWZvj%88WWWrd.s@"U>>$//rdz [i]locals)r )rUpathline_no link_pathFrc)rrrNrrr$rabspathrr@itemsrr@rzrZr:r%r7rrrBr$rl)rr@rrrzrSr~r}rrr?rgrrrlocalsrr locals_maprrhr%r7r&rrirs ` relogz Console.logs8 #yylG)!!!, . $. $33#4K WWWW;WWW (,(?(? (N(N %Hgv ( 3 3C 8 8Wbgooh>W>WI&&rv..r2D P&,llnn ""< +#N#N#NOOO  !..00#' ! K% D D"66{CC *,L!(F[F!\N) ; ; vvj.99:::: L/M4dje $ $ d#### $W. $. $. $. $. $. $. $. $. $. $. $. $. $. $. $. $. $. $sFGG  G cd|_tjtjtj}tj|t jtd)alThis function is called when a `BrokenPipeError` is raised. This can occur when piping Textual output in Linux and macOS. The default implementation is to exit the app, but you could implement this method in a subclass to change the behavior. See https://docs.python.org/3/library/signal.html#note-on-sigpipe for details. Tr%) rOr$opendevnullO_WRONLYdup2rrfileno SystemExit)rrs reon_broken_pipezConsole.on_broken_pipesL '"*bk22 **,,---mmrdc|jr |jdd=dS |dS#t$r|YdSwxYw)aQCheck if the buffer may be rendered. Render it if it can (e.g. Console.quiet is False) Rendering is supported on Windows, Unix and Jupyter environments. For legacy Windows consoles, the win32 API is called directly. This method will also record what it renders if recording is enabled via Console.record. N)rOr _write_bufferBrokenPipeErrorrrs rerzConsole._check_bufferss :  QQQ F "     " " "    ! ! ! ! ! ! "s+A  A c 6|j5|jrM|jsF|j5|j|jdddddn #1swxYwY|jdkr|jrCddlm }||j| |jdd|jdd=nNtrd}|j rt|j}| |tv}|rfddlm}ddlm}|jdd}|jr(|jr!t-t/j|}||||jn| |jdd}|jj}d} t5|| kr ||ng} | j} d} |d D]k} | t5| z| kr6| r4|d | | d} | | | t5| z } l| r2|d | | n#t>$r}|j d |_ d}~wwxYw| |jdd} |j|n"#t>$r}|j d |_ d}~wwxYw|j!|jdd=ddddS#1swxYwYdS) z$Write the buffer to the output file.Nrr%)displayF)LegacyWindowsTerm)legacy_windows_renderi TrzG *** You may need to add PYTHONIOENCODING=utf-8 to your environment ***)"rrRrrrr%rrijupyterrrrArtr+rNrrich._win32_consolerrich._windows_rendererrrPrurrB remove_colorwriterrrerFrUnicodeEncodeErrorreasonflush)rruse_legacy_windows_renderrrrrr,r MAX_WRITEbatch batch_appendrsrr=s rerzConsole._write_buffersLZD (D ({ @4#5 @-@@'..t|AAA???@@@@@@@@@@@@@@@!Q&&?>(000000GDL$*=*=dl111o*N*NOOO QQQ5"491."%/ %:%:F%1$*.A$A!:5%&MMMMMMTTTTTT%)\!!!_F#}L1CL)-g.B6.J.J)K)K11&:K:KDI:V:VWWWW$(#6#6t|AAA#G#GD%)IOE(6I&#&t99 #9#9$)E$KKKK79E38.sR&eQ,1:U\\$'''drdc32K|]}|j |jVdSr)rr,rbs rerXz&Console.export_text..s@"?LrdN)rRrrFr)rrrr,s re export_textzConsole.export_text}s K W W V W W W % + + ww*.*= ww#'#6  +'* + + + + + + + + + + + + + + + sAA==BBrc|||}t|dd5}||ddddS#1swxYwYdS)aGenerate text from console and save to a given location (requires record=True argument in constructor). Args: path (str): Path to write text files. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. styles (bool, optional): If ``True``, ansi style codes will be included. ``False`` for plain text. Defaults to ``False``. rwrrxN)rrr)rrrrr, write_files re save_textzConsole.save_textseF;; $g . . . #*   T " " " # # # # # # # # # # # # # # # # # #sA  AArr code_format inline_stylesrrc >|js Jdg}|j}|pt}d}|tn|} |j5|rt jt j|jD]Y\} } } t| } | r7| |} | j rd| j d| d} | r d| d| dn| } || Zni}t jt j|jD]\} } } t| } | r]| |} | | t|d z}| j rd |d | j d| d} n d |d| d} || g}|j}|D]\}}|r|d |d|dd|}| d|||jj|jj}|r |jdd=dddn #1swxYwY|S)aIGenerate HTML from console contents (requires record=True argument in constructor). Args: theme (TerminalTheme, optional): TerminalTheme object containing console colors. clear (bool, optional): Clear record buffer after exporting. Defaults to ``True``. code_format (str, optional): Format string to render HTML. In addition to '{foreground}', '{background}', and '{code}', should contain '{stylesheet}' if inline_styles is ``False``. inline_styles (bool, optional): If ``True`` styles will be inlined in to spans, which makes files larger but easier to cut and paste markup. If ``False``, styles will be embedded in a style tag. Defaults to False. Returns: str: String containing console contents as HTML. rrNz zz .get_svg_style4 sy ##"5))IK'5;+A'''[..v66 M)U]-E)'']0088  } 0!(%wy 7!%#66   1ei11 2 2 2z 6  !4555| 8  !6777 @  !>???| C  !ABBB((9%%C!$K JrdgQ?r%(rGr,cHt|ddS)z.HTML escape text and replace spaces with nbsp.rz )r replaceras re escape_textz'Console.export_svg..escape_textp s$<<''X66 6rdNr/rattribsc dtdtfddfd|D}|rd|d|d|d|d nd|d|d S) z.Make a tag from name, content, and attributes.rrcjt|trt|dSt|S)Ng)rfloatrr)rs re stringifyz7Console.export_svg..make_tag..stringifyy s0ee--.!%---5zz!rdrc3K|]?\}}|dddd|dV@dS)rrz=""N)lstripr)r.kvrs rerXz7Console.export_svg..make_tag..~ sn##Aq88C==((c22EEiillEEE######rdrrz)objectrrFr)r/rr tag_attribsrs @remake_tagz$Console.export_svg..make_tagt s  " "C " " " " ((#####MMOO###K 0;D;;;;;;;D;;;;/// /// rdz terminal-rc34K|]}t|VdSr)reprrbs rerXz%Console.export_svg.. s(CCwT']]CCCCCCrdrr])lengthrTrect?? crispEdges)fillrrrlrmshape_renderingrrzurl(#-line-))_classrr textLength clip_pathc g|] }|zdz S)r%rc)r.r line_heights rerKz&Console.export_svg.. s#LLL+-3LLLrdrc3^K|]'\}}dd|ddd|zdzdV(dS) z r$rr&)rrrlrmz Nrc)r.rr char_widthr0rrrls rerXz%Console.export_svg.. s    y     XfV:+=kTXFXYYY         rdc36K|]\}}dd|d|dVdS).z-rz { z }Nrc)r.r rule_nors rerXz%Console.export_svg.. sT  7CsG 2 2 2W 2 2# 2 2 2      rdzrgba(255,255,255,0.35)rh)r(stroke stroke_widthrrrlrmrxz-titlemiddlerf)r,r( text_anchorrrz )rr2 char_heightr0terminal_widthterminal_heightrlrm terminal_x terminal_yrchrome backgroundsmatrixrr)" rich.cellsrrCrrHrlrrrrrBrrrzlibadler32rFencoderr$rrrrrrrrrrrangerr r)8rr rrrrrrr r< margin_top margin_right margin_bottom margin_left padding_top padding_rightpadding_bottom padding_left padding_widthpadding_height margin_width margin_heighttext_backgrounds text_groupclassesstyle_norrrrrr,rrWrules class_namehas_backgroundrr text_length line_offsetsrrrBrCr=r>rA title_colorsvgrr2r0rr rls8 ` @@@@@@re export_svgzConsole.export_svg s6 ('''''(*   3       B**   #44 !D(        $}4 $~5"\1 "]2 &( " "$ 7c 7c 7 7 7 7 15    (  AG      ( % , ,G243FGGHHH ,#))+++ , , , , , , , , , , , , , , ,  #c WWCC(CCCCCKK ll7H55 6''I  !=hu!U!U!UVV4 $4 $GAtA)-2 $2 $%eX(% e,,''%-GENMH111 =%)N!;./33"[66v>>BJ $mG%,D%8%SAS=SN!=0/33"]88@@D 'htnn ! $++ "!+*n+o3",{":#.#5,8   3T?**%% "'K--&/#>#>*#>#>*n+o ;'1CII'=&Ci&C&Cq&C&C&C   XXd^^#e2 $hMLLL588LLL          $-\#:#:          GN}}     gg.// $$ej0=@AAq5K/.@ (,+ "    -1   hh E""#+++ $ A%{*Q. F     !##%-1Uk1A5 </"]2"\1!K/#!  " s3ADDDc|||||||}t|dd5} | |ddddS#1swxYwYdS)a7Generate an SVG file from the console contents (requires record=True in Console constructor). Args: path (str): The path to write the SVG to. title (str, optional): The title of the tab in the output image theme (TerminalTheme, optional): The ``TerminalTheme`` object to use to style the terminal clear (bool, optional): Clear record buffer after exporting. Defaults to ``True`` code_format (str, optional): Format string used to generate the SVG. Rich will inject a number of variables into the string in order to form the final SVG output. The default template used and the variables injected by Rich can be found by inspecting the ``console.CONSOLE_SVG_FORMAT`` variable. font_aspect_ratio (float, optional): The width to height ratio of the font used in the ``code_format`` string. Defaults to 0.61, which is the width to height ratio of Fira Code (the default font). If you aren't specifying a different font inside ``code_format``, you probably don't need this. unique_id (str, optional): unique id that is used as the prefix for various elements (CSS styles, node ids). If not set, this defaults to a computed value based on the recorded content. rrrrN)r`rr) rrr rrrrrr_rs resave_svgzConsole.save_svg s6oo#/   $g . . . "*   S ! ! ! " " " " " " " " " " " " " " " " " "sAAArL)rrrrr)TNrr)rr)r`rarbrnr$rrErrrpr5rrrrLrrorDr3r!r,rrrrrrrNsetterrrBrrrMrr0rvrrrrr8rrrrrrrrrrrrHrxrwr}rrrrkrsrrlrmrrrr:rrrrr rrrr rrr8rrr7rCr+rrr\rr;rrNrKr/rSr2rr]rrwr?r}r|rr staticmethodrrrrrrrrrrrrrrrIrr)rr*r`rbrcrdrerrKs!!F#%*Hgc3h,,, )-(,,0!%"&# $%)#'04:@3B?3D3D)-9=2604AD$D$D$ E F D$ ! D$ ~D$$D>D$D$D$D$r#wD$D$}D$ D$  "!D$"4.#D$$%D$&'D$()D$*+D$, --D$./D$01D$23D$4s$6675D$6/07D$8!9D$:;D$<xH 56=D$>8BI./?D$@738,-AD$D$D$D$LF#FFFFbgX [RW[*g***X*0s000X013141111/j///X/ h{&;    0     .V..... #### ,Z,D,,,,%%%%   S    ;? = = = =4 =4 = = = =&&&&:> 2 2 2u 2$ 2, 2 2 2 2 hsm   X L#LLLXL-T---X-^ ,$ , , ,X ,      X  & '& & & X& P [U38_[sX \34\    X  ]ST]%%%%$RWKKe_K59KJNK KKKK.####d#### * *$ *$ * * * *#3$(!!!! ! ! !  !"! !!!!B       TT*#t###X#cdBFJ O O O/7 /B O  O O O ORV(6>~6N $OS1@1@(1@3;N3K1@ ' 1@1@1@1@l-1> "&>>>">.)>  >  >> d7m >>>>H$&+/-1 $!%$(15;;;;S%Z ; -( ; >* ;~;;D>;o.; ;;;;|RV#u*%3;E%*M  MMMMb #.%   S%Z    *NNDNNNN-1$(        c5j)*  D>       F-1+/-1"& $!%$(# $$($!a2a2a2a2a2 a2 c5j)* a2 -( a2>*a2$a2~a2a2D>a2}a2 a2a2D>a2 !a2" #a2a2a2a2J#;4()"#26;4;4;4sm;4 ;4 dCn% ;4  ;4;4;4;4;4(C5#:./;4;4 ;4;4;4;4B$(,0 . . ." . . .) .  . . . .F@A$w-(-09< . ##!57!!!}! ! } !  !!5j12!! !!!!F;B:N U U Ur8I#667 U sCc3h' ( U U U\ UJ-1+/ $!%$( O$O$O$O$O$ O$ c5j)* O$ -( O$~O$O$D>O$O$O$ O$O$O$O$b     " " " "G(G(G(G(RXg%634 #'                D,0D#@59 # # #c #T #$ #SW # # # #"*.%)# III &I I c] I  I IIII^*..##### & #  #  ## ####D)--#'#'yyyy & y  y  y!yC=y yyyy~)--#'#'$"$"$"$" $"  & $"  $"$"!$"C=$" $"$"$"$"$"$"rdr svg_main_codechttj|S)zReturns a unique hash for the given SVG main code. Args: svg_main_code (str): The content we're going to inject in the SVG envelope. Returns: str: a hash of the given content )rrErFrG)res re _svg_hashrg7 s( t|M002233 4 44rd__main__)rRzJSONRPC [i]request[/i]g?Fz2.0subtract*)minuend subtrahendr)jsonrpcrparamsidz Hello, World!z{'a': 1}z&Which one is correct team name in NBA?)zNew York BullszLos Angeles KingszGolden State Warriors Huston Rocketrr)questionranswer)answeredq1z 5 + 7 = ?) ryz 12 - 8 = ?)r%rfrr{)rurvq2)sportmaths)r/emptyquizr)rrN)rr$rrxrEabcrr dataclassesrrr functoolsrr rr r itertoolsr mathr timertypesrrrtypingrrrrrrrrrrrrrrr r!r"r#rich._null_filer$rr&r'r(_export_formatr)r*_filenor+rzr,r-rPr.r/rr0r1rr2rSr3rXr4r5r~r7r/rr8r9rr:r;prettyr<r=protocolr>rxr?scoper@rrArVrBrrCrDstyledrFterminal_themerGrHrIr,rJrKrrLrMr?rNrrOrrQrkrlplatformrArr\rrr_r __stdin__r _STDIN_FILENO Exception __stdout___STDOUT_FILENO __stderr___STDERR_FILENOrrrrrrkrrrrr rr{rrrrrrrrrrr(rrwrrlocalr3r8r;rpr>rCrrgr`rrr!rrcrdrers   ########((((((((6666666666*&%%%%%******CCCCCCCC66666666%%%%%%%%))))))))99999999++++++55555555%%%%%%%%))))))))########SSSSSSSSSS $$$$$$$$000000 ,' !E#v+./78DE =>         HJJ M((**MMMMM^**,,NNNNN^**,,NNNNN~~> %~6 "%# ..... ... BBBBBBB BJ     x           ((C78:ng567 #O%%333339333 ) ) ) ) ) ) ) )$B!!!!!!!!*$%$%$%$%$%$%$%$%N,/,/,/,/,/,/,/,/^$$$$$$$$BtxXc5j-A(AB,T*$  &"  PO9L9L9N9NOOO )/         &AE8$<=DDD%%%%=t==== i"i"i"i"i"i"i"i"X? 5S 5S 5 5 5 5 zgT"""G KK       "$B77       KKTT']];;; MM!%$L$$$ #2    !&$/#3#3#3"$ %1#/<<"#    !!!!!)s6F22F<;F<GG$#G$(HH  H