L i UddlmZddlmZmZddlZddlmZddlmZddl m Z ddl m Z e e Zded <d d Zdd Zdd Zy)) annotations)AnyFinalN)config)get_dg_singleton_instance) exception) get_loggerr_LOGGERc ddlmddlm}Gfdd|}ddlm}||_ddlm}|dd d d d }|j|jjt|||jd d dd dtg y)Nr)Box)Panelc6eZdZ d dfd ZxZS)0_print_rich_exception..ConfigurablePanelc<t||||ndfi|y)NuP──── ──── ──── ──── ──── )super__init__)self renderableboxkwargsr __class__s Z/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/streamlit/error_util.pyrz9_print_rich_exception..ConfigurablePanel.__init__"s2 G ?st     )N)rrrz Box | NonerrreturnNone)__name__ __module__ __qualname__r __classcell__)rr s@rConfigurablePanelr!s8#       rr ) traceback)Console256TXF) color_systemforce_terminalwidthno_colortab_sized)r( show_locals max_frames word_wrap extra_linessuppress)rich.boxr rich.panelr richr! rich.consoler"print Tracebackfrom_exceptiontype __traceback__ streamlit)er r rich_tracebackr"consoler s @r_print_rich_exceptionr?s  E 1,N% G MM  // G OO[ 0  rc\tj}tj||dy)z#Show the exception on the frontend.T)is_uncaught_app_exceptionN)rmain_dgr _exception)exmain_delta_generators r_show_exceptionrFOs$46>> -rTRrcd}tjdr t|d}|stj d|t |y#t$rd}Y2wxYw)zHandle an exception that originated from a user app. By default, we show exceptions directly in the browser. However, if the user has disabled client error details, we display a generic warning in the frontend instead. Fzlogger.enableRichTzUncaught app execution)exc_infoN)r get_optionr? Exceptionr errorrF)rD error_loggeds rhandle_uncaught_app_exceptionrMUsbL ,- ! "" %L  . <B !!L  !s A AA)r< BaseExceptionrr)rDrNrr) __future__rtypingrrr;r$streamlit.delta_generator_singletonsrstreamlit.elementsrstreamlit.loggerr rr __annotations__r?rFrMrrrVs<#J('H%%0fS r