HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_vendor/rich/__pycache__/traceback.cpython-311.pyc
�

�mi��#��ddlZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZm
Z
ddlmZmZmZmZmZmZmZmZmZmZmZddlmZddlmZmZmZm Z m!Z!m"Z"dd	lm#Z$dd
lm%Z%ddl&m'Z'dd
l(m)Z)ddl*m+Z+m,Z,ddl-m.Z.ddl/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5ddl6m7Z7ddl8m9Z9m:Z:ddl;m<Z<ddl=m>Z>ddl?m@Z@ddlAmBZBmCZCdd	lDm#Z#ddlEmFZFejGdkZHdZIdZJdeCdeCdeeeKeKeKffd�ZLddd d!dd"d"eIeJd#dd#d$dd%�d&ee0d'eeKd(eeKd)eKd*eeMd+eNd,eNd-eKd.eKd/eNd0eeNd1eNd2eeeMefd3eKdeeeOeOee
geffd4�ZPeGd5�d6����ZQeGd7�d8����ZReGd9�d:����ZSeGd;�d<����ZTGd=�d>e9��ZUGd?�d@��ZVeWdAkr0ePd#�B��ddlZdCeddfdD�ZXdCeddfdE�ZYdGdF�ZZeZ��dSdS)H�N)�	dataclass�field)�islice)�walk_tb)�
ModuleType�
TracebackType)�Any�Callable�Dict�Iterable�List�Optional�Sequence�Set�Tuple�Type�Union)�guess_lexer_for_filename)�Comment�Keyword�Name�Number�Operator�String)�Text)�Token)�
ClassNotFound�)�pretty)�loop_first_last�	loop_last)�Columns)�Console�ConsoleOptions�ConsoleRenderable�Group�RenderResult�group)�	Constrain)�RegexHighlighter�ReprHighlighter)�Panel)�render_scope)�Style)�Syntax�SyntaxPosition)�Theme�win32�
�P�start�end�returnc#�K�|\}}|\}}||kr	|||fV�dStt||dz����D]!\}}}|r||dfV��|r|d|fV��|ddfV��"dS)z�Yield start and end positions per line.

    Args:
        start: Start position.
        end: End position.

    Returns:
        Iterable of (LINE, COLUMN1, COLUMN2).
    r���rN)r �range)	r5r6�line1�column1�line2�column2�first�last�line_nos	         �<D:\Python311\Lib\site-packages\pip/_vendor/rich/traceback.py�_iter_syntax_linesrC7s������N�E�7��N�E�7���~�	%��W�g�%�%�%�%�%�%�$3�E�%����4K�4K�$L�$L�	%�	%� �E�4���
%��w��*�*�*�*�*��
%��q�'�)�)�)�)�)��q�"�n�$�$�$�$�
	%�	%��d�X�FT�)�console�width�
code_width�extra_lines�theme�	word_wrap�show_locals�locals_max_length�locals_max_string�locals_hide_dunder�locals_hide_sunder�
indent_guides�suppress�
max_framesrIrJrKrLrMrNrOrPrQrRrSrTrUrVc����������	�
���
���|�td���n|��jr�
�dn�
�
dttdtdtt
ddf����	�
���
������fd��d	tddf�fd
�}	t��}||��tj	S#t$rtj	}�t_	|cYSwxYw)a�Install a rich traceback handler.

    Once installed, any tracebacks will be printed with syntax highlighting and rich formatting.


    Args:
        console (Optional[Console], optional): Console to write exception to. Default uses internal Console instance.
        width (Optional[int], optional): Width (in characters) of traceback. Defaults to 100.
        code_width (Optional[int], optional): Code width (in characters) of traceback. Defaults to 88.
        extra_lines (int, optional): Extra lines of code. Defaults to 3.
        theme (Optional[str], optional): Pygments theme to use in traceback. Defaults to ``None`` which will pick
            a theme appropriate for the platform.
        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.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        suppress (Sequence[Union[str, ModuleType]]): Optional sequence of modules or paths to exclude from traceback.

    Returns:
        Callable: The previous exception handler that was replaced.

    NT)�stderr�type_�value�	tracebackr7c���t�|||�������	�
�t�����
����}��|��dS)N�
rJrKrLrMrNrOrPrQrRrSrTrUrV)�	Traceback�from_exception�bool�print)rYrZr[�exception_tracebackrKrLrTrRrSrPrQrVrOrUrM�traceback_consolerJrNs    ��������������rB�
excepthookzinstall.<locals>.excepthook�sv���
(�6�6�����!�#���#�/�/�1�#�$6�7�7�'��!�!7�
�
��$	��� 3�4�4�4�4�4rD�ipc	��������i��j�dtdtddf��fd�}dd�dtdtdtddf���fd����_|�_�fd	��_dS)
N�args�kwargsr7c���|��|i|��dS)zEwrap the default ip.showtraceback to store info for ip._showtracebackNrH)rgrh�default_showtraceback�tb_datas  ��rB�ipy_show_tracebackzCinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_show_traceback�s&����G�!�!�4�2�6�2�2�2�2�2rDF)�	is_syntaxrmc����	���}|rdn|d}�
�dd��}�
�d��}|�|rdnd}t|��D]
}|�n|j}��|d|d|��i�
dS)z2Internally called traceback from ip._showtracebackN��running_compiled_codeF�	tb_offsetrr)�
_get_exc_info�getr:�tb_next)rmrgrh�	exc_tuple�tb�compiledrq�_rdrerks        ���rB�ipy_display_tracebackzFinstall.<locals>.ipy_excepthook_closure.<locals>.ipy_display_traceback�s����
�(�(�*�*�I�3<�*M�$�$��1��B��{�{�#:�E�B�B�H����K�0�0�I��
1�!)�0�A�A�q�	��9�%�%�
 �
 �����E��Z����J�y��|�Y�q�\�2�6�6�6��G�G�GrDc����|ddi|��S)NrmTrH)rgrhrys  �rB�<lambda>z9install.<locals>.ipy_excepthook_closure.<locals>.<lambda>�s(���5J�5J�
�6
�!�6
�%+�6
�6
�rD)�
showtracebackr	r`�_showtraceback�showsyntaxerror)rerlrjryrkrds` @@@�rB�ipy_excepthook_closurez'install.<locals>.ipy_excepthook_closure�s���������� "� 0��	3�c�	3�S�	3�T�	3�	3�	3�	3�	3�	3�	3�+0�	�	�	��	�#'�	�;>�	�
�	�	�	�	�	�	�	�	�42���-���
�
�
�
����rD)r#�
is_jupyterr�
BaseExceptionrrr	�get_ipython�sysrd�	Exception)rIrJrKrLrMrNrOrPrQrRrSrTrUrVrre�old_excepthookrdrcs `````````````   @@rB�installr�Ssf�����������������V18�L��t�,�,�,�,�W��
�(�	 �-?�	 ���
��5��M�"�5��5��M�*�5�
�	5�5�5�5�5�5�5�5�5�5�5�5�5�5�5�5�5�5�5�2)
�3�)
�4�)
�)
�)
�)
�)
�)
�V	�
�]�]����r�"�"�"��~����������#�������	���s�$B&�&$C
�C
c��eZdZUeed<eed<eed<dZeed<dZee	ee
jfed<dZee
e
eefe
eeffed<dS)	�Frame�filename�lineno�name��lineN�locals�last_instruction)�__name__�
__module__�__qualname__�str�__annotations__�intr�r�rrr�Noder�rrHrDrBr�r��s���������M�M�M��K�K�K�

�I�I�I��D�#�N�N�N�/3�F�H�T�#�v�{�*�+�,�3�3�3�JN��h�u�U�3��8�_�e�C��H�o�%E�F�G�N�N�N�N�NrDr�c�p�eZdZUeed<eed<eed<eed<eed<ee���Ze	eed<dS)	�_SyntaxError�offsetr�r�r��msg��default_factory�notesN)
r�r�r�r�r�r�r�listr�r
rHrDrBr�r��s`��������K�K�K��M�M�M�

�I�I�I��K�K�K�	�H�H�H��u�T�2�2�2�E�4��9�2�2�2�2�2rDr�c���eZdZUeed<eed<dZeeed<dZe	ed<e
e���Ze
eed<e
e���Ze
eed	<dZe	ed
<e
e���Ze
ded<dS)
�Stack�exc_type�	exc_valueN�syntax_errorF�is_causer��framesr��is_group�Trace�
exceptions)r�r�r�r�r�r�rr�r�r`rr�r�r
r�r�r�r�rHrDrBr�r��s���������M�M�M��N�N�N�+/�L�(�<�(�/�/�/��H�d�����%��5�5�5�F�D��K�5�5�5��u�T�2�2�2�E�4��9�2�2�2��H�d���� %��d� ;� ;� ;�J��W�
�;�;�;�;�;rDr�c�&�eZdZUeeed<dS)r��stacksN)r�r�r�r
r�r�rHrDrBr�r��s"���������K�����rDr�c��eZdZdgZdS)�PathHighlighterz(?P<dim>.*/)(?P<bold>.+)N)r�r�r��
highlightsrHrDrBr�r��s������-�.�J�J�JrDr�c$��eZdZdZdddddd�Z	d0dd	d
dddeedddd
dd�
deedee	dee	de	dee
dedede	de	dedededee
e
efde	fd�Zedd	d
dddeedddd
dd�
deeded eedee	dee	de	dee
dedede	de	dedededee
e
efde	d!df"d"���Zedeedddd#�deeded eedede	de	deded$eeed!efd%���Zd&ed'ed!efd(�Ze��d)ed!efd*���Zed+e
d,e
d!e
fd-���Ze��d.e d!efd/���Z!dS)1r^aA Console renderable that renders a traceback.

    Args:
        trace (Trace, optional): A `Trace` object produced from `extract`. Defaults to None, which uses
            the last exception.
        width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
        code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
        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.
        indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
        locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
            Defaults to 10.
        locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
        locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
        locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.
        suppress (Sequence[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.

    �text�python�cython�pyrex)r�z.pyz.pxdz.pyxz.pxiNrErFrGFTrHr]�tracerJrKrLrMrNrOrPrQrRrSrTrUrVc
��|�Etj��\}}}|�|�|�td���|�||||���}||_||_||_||_tj	|pd��|_
||_||_||_
||_|	|_|
|_||_g|_|
D]�}t'|t(��s9|j�
J|�d����t,j�|j��}n|}t,j�t,j�|����}|j�|����|dkrt9d|��nd|_dS)Nz9Value for 'trace' required if not called in except: block�rO�	ansi_darkz+ must be a module with '__file__' attributer�)r��exc_info�
ValueError�extractr�rJrKrLr/�	get_themerMrNrOrTrPrQrRrSrU�
isinstancer��__file__�os�path�dirname�normpath�abspath�append�maxrV)�selfr�rJrKrLrMrNrOrPrQrRrSrTrUrVr�r�r[�suppress_entityr�s                    rB�__init__zTraceback.__init__s���$�	�-0�\�^�^�*�H�i���
�9�
�	�
� �O�����L�L��)�Y�K�!���E���
���
�$���&����%�e�&:�{�;�;��
�"���&���*���!2���!2���"4���"4���')��
�'�		'�		'�O��o�s�3�3�
'�#�,�U�U�%�T�T�T�U�U�U��w����'?�@�@���&���7�#�#�B�G�O�O�D�$9�$9�:�:�D��M� � ��&�&�&�&�0:�Q��E�#�a��,�,�,�A����rDr�r�r[r7c
�n�|�||||	|
|||
���}||||||||	||
|||
||���S)a�Create a traceback from exception info

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            width (Optional[int], optional): Number of characters used to traceback. Defaults to 100.
            code_width (Optional[int], optional): Number of code characters used to traceback. Defaults to 88.
            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.
            indent_guides (bool, optional): Enable indent guides in code and locals. Defaults to True.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. 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.

        Returns:
            Traceback: A Traceback instance that may be printed.
        )rOrPrQrRrS)
rJrKrLrMrNrOrTrPrQrRrSrUrV)r�)�clsr�r�r[rJrKrLrMrNrOrPrQrRrSrTrUrV�rich_tracebacks                  rBr_zTraceback.from_exceptionSsz��Z������#�/�/�1�1�%�	
�	
���s���!�#���#�'�/�/�1�1��!�
�
�
�	
rD)rOrPrQrRrS�_visited_exceptionsr�c
������g}
d}ddlm}t|dd��pg}
|	�t��n|	}dtdt
fd�}	t
||j��||��||
�
��}tj	dkr�t|ttf��rwd	|_
|jD]h}||vr�|�|��|j�t"�t'|��||j|���|������it|t*��r;t-|jpd|jpd
|jpd|jpd|j|
���|_|
�|��|jj}dt<t>t
t@fdt<t>t
t@ff��fd�}tC|��D�]p\}}|j"j#}d}tj	dkrY|j$dz}tKtM|j"�'��||dz����}|\}}}}|�|�|�
|�||f||ff}|rT|�(d��s?tRj*�+|��s tRj*�,||��}|j-�.dd��r��t_|pd
||j"j0|r/��fd�||j-�1����D��nd|���}||��|j-�.dd��r
|jdd�=��r|sYt|dd��}|�||ur|j2}|}|j}d	}��<|j3}|�%t|dd��s|j2}|}|j}d}��j	ti|
���} | S)a�Extract traceback information.

        Args:
            exc_type (Type[BaseException]): Exception type.
            exc_value (BaseException): Exception value.
            traceback (TracebackType): Python Traceback object.
            show_locals (bool, optional): Enable display of local variables. Defaults to False.
            locals_max_length (int, optional): Maximum length of containers before abbreviating, or None for no abbreviation.
                Defaults to 10.
            locals_max_string (int, optional): Maximum length of string before truncating, or None to disable. Defaults to 80.
            locals_hide_dunder (bool, optional): Hide locals prefixed with double underscore. Defaults to True.
            locals_hide_sunder (bool, optional): Hide locals prefixed with single underscore. Defaults to False.

        Returns:
            Trace: A Trace instance which you can use to construct a `Traceback`.
        Fr)�_IMPORT_CWD�	__notes__N�_objectr7c�D�	t|��S#t$rYdSwxYw)z1Don't allow exceptions from __str__ to propagate.z<exception str() failed>)r�r�)r�s rB�safe_strz#Traceback.extract.<locals>.safe_str�s7��
2��7�|�|�#���
2�
2�
2�1�1�1�
2���s��
�T)r�r�r�r�)rG�)rOrPrRrSr��?r�)r�r�r�r�r�r��iter_localsc3��K��s�s
|Ed{V��dS|D];\}}�r|�d��r��r|�d��r�5||fV��<dS)z-Extract locals from an iterator of key pairs.N�__rx��
startswith)r��keyrZrRrSs   ��rB�
get_localsz%Traceback.extract.<locals>.get_locals�s������+��.@��*�*�*�*�*�*�*�*��F�"-�%�%�J�C��)�!�c�n�n�T�.B�.B�!� �)�!�c�n�n�S�.A�.A�!� ��u�*�$�$�$�$�%�%rDror�<�_rich_traceback_omitc���i|]E\}}tj|���tj|���-|tj|�������FS))�
max_length�
max_string)�inspect�
isfunction�isclassr�traverse)�.0r�rZrPrQs   ��rB�
<dictcomp>z%Traceback.extract.<locals>.<dictcomp>.ss������!+��U�$+�$6�u�$=�$=��BI��QV�AW�AW����� %�+<�+<�"�"�"���rD)r�r�r�r�r��_rich_traceback_guard�	__cause__�__suppress_context__)r�)5�pip._vendor.richr��getattr�setr	r�r�r�r��version_infor��BaseExceptionGroup�ExceptionGroupr�r��addr�r^r��type�
__traceback__�SyntaxErrorr�r�r�r�r�r�r�r�rr�objectr�f_code�co_filename�f_lasti�nextr�co_positionsr�r�r��isabs�join�f_localsrsr��co_name�items�	__class__�__context__r�)!r�r�r�r[rOrPrQrRrSr�r�r�r�r��grouped_exceptionsr��stack�	exceptionr�r��
frame_summaryrAr�r��instruction_index�instruction_position�
start_line�end_line�start_column�
end_column�frame�causer�s!     ````                        rBr�zTraceback.extract�s�������>!����0�0�0�0�0�0�"�9�k�4�@�@�F�B��)�I�C�E�E�E�6I�	�	2�c�	2�c�	2�	2�	2�	2�H	��!��(�"3�4�4�"�(�9�-�-�!��	���E���7�*�
��i�*<�n�)M�N�N��%)�E�N�%.�%9���	�$�(:�:�%�$�*�.�.�y�9�9�9��(�/�/�%�-�-� $�Y��� )� )� 7�,7�2C�3E�3E�4F�.�	�	������)�[�1�1�
�%1�$�+�0�q�&�/�6�3�$�+�0�q�"��-�2�!�
��
&�&�&��"�
�M�M�%� � � ��\�(�F�
%�%�e�C��K�&8�9�
%��%��V��,�-�
%�
%�
%�
%�
%�
%�
%�+2�)�*<�*<�:
(�:
(�&�
�w�(�/�;��$(� ��#�w�.��(5�(=��(B�%�+/��)�0�=�=�?�?�-�-��1���,�,�(�-��"� �$�"�#�	�$�	�)�	�'�		�(��6�%�z�2�,�(�
�G�H�$7�$7��$<�$<�G��7�=�=��2�2�G�#%�7�<�<��X�#F�#F�� �)�-�-�.D�e�L�L����%�_��"�&�-�5�'�
"������/9�j��9O�9U�9U�9W�9W�.X�.X�
����"�%5�#����&��u�
�
�
� �)�-�-�.E�u�M�M�(���Q�Q�Q���%�
��	�;��=�=�����i�)?��$��H� %�I�!&� 3�I�#�H��!�-����W��5�u�.�.�� %��H� %�I� %� 3�I�$�H����V�$�$�$���rDrI�optionsc#�6�����	�
K��j}|����|j}tid|t���d|t
���d|t���d|tj���d|t���d|t��td���z�d	|t���d
|t��td���z�d|t���d
|tj
���d|tj
���d|tj
���d|tj���d|t���d|t���d|tj
��td���z�d����
t!���t#��dt$dt&dt(f����	��
fd����	t+t-�jj����D]\}}�	||��V��dS)Nr�
pygments.text�pygments.string�pygments.function�pygments.numberzrepr.indentT)�dimzrepr.strz
repr.brace)�boldzrepr.numberzrepr.bool_truezrepr.bool_falsez	repr.nonezscope.borderzscope.equalsz	scope.keyzscope.key.specialF)�inheritrr@r7c3���K�|jrnt�
�|��d�	ddd���}t|�
j��}�
����5|V�ddd��n#1swxYwY|j���
����5tt�
�|j���	ddd�
j����
j��V�ddd��n#1swxYwYtj	|j
�d�d	f�|jj����V�nU|jr0tj	|j
�d�d	f�|j����V�ntj	|j
�d	f��V�|j
D]"}tj	d
�|����V��#|jr�t|jd��D]u\}}g}t#|j��D]$\}}|��||�����%dV�ttt)|�d
|��d����
j��V��v|s7|jrtjd��V�dStjd��V�dSdS)Nz7[traceback.title]Traceback [dim](most recent call last)ztraceback.borderT)rr)�title�style�border_style�expand�paddingztraceback.border.syntax_error)rrrrrJz: ztraceback.exc_type)z[NOTE] ztraceback.noterr�zSub-exception #ztraceback.group.border)rrzI
[i]The above exception was the direct cause of the following exception:
zH
[i]During handling of the above exception, another exception occurred:
)r�r,�
_render_stackr)rJ�	use_themer��_render_syntax_errorr�assembler�r�r�r�r��	enumerater�r!r�r�r&r��from_markup)rr@�stack_renderable�note�group_no�group_exceptionr�
group_last�group_stack�background_stylerI�highlighter�render_stackr��traceback_themes         ������rBr)z0Traceback.__rich_console__.<locals>.render_stackzs�������|�
+�6;��&�&�u�-�-�S�*�!3��"�
7�7�7� �$-�-=�t�z�#J�#J� ��&�&��7�7�+�+�*�*�*�*�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+��!�
Q��&�&��7�7���#�� �5�5�e�6H�I�I�"2�)H�#'�$*�"&�*�
����
�
�
�
�
�
��������������������m���*�*�*�,@�A��K�� 2� 6�7�7���������
Q��m���*�*�*�,@�A��K���0�0�������
�m���%8�:N�$O�P�P�P�P�P���
V�
V���m�$A�;�;�t�CT�CT�U�U�U�U�U�U��~�

�1:�5�;K�Q�1O�1O���-�H�o�68�&�3<�_�=S�3T�3T�Y�Y�/�
�K�*�1�1�,�,�{�J�2W�2W�X�X�X�X��H�H�H�#��!�#5�6�">�H�">�">�)A����
�
�
�������
��>���*�e���������*�d��������

�
s%�A.�.A2�5A2�AC)�)C-�0C-)rM�get_background_style�get_style_for_tokenr1�	TextTokenrrr�Functionrrr.r�Constant�	Delimiterrr+r(r�r`r'r!�reversedr�r�)r�rIrrM�token_styler@rr'r(r)r*s``     @@@@rB�__rich_console__zTraceback.__rich_console__[s������������
�� �5�5�7�7���/���
��+�+�i�0�0�
����U�!3�!3�
�"�;�;�v�#6�#6�
�$�[�[���%?�%?�	
�
"�;�;�v�#6�#6�
��{�{�7�3�3�e��o�o�o�E�

��K�K��/�/�
��k�k�)�4�4�u�$�7G�7G�7G�G�
��{�{�6�2�2�
�!�+�+�g�.>�"?�"?�
�"�;�;�w�/?�#@�#@�
��[�[��)9�:�:�
����F�,<� =� =�
����H� 5� 5�
��[�[��.�.�
� $�[�[���%?�%?�%�D�/�/�/�%Q�!
�$�'
�
�
��,&�'�'��	���A	��A	�T�A	�l�A	�A	�A	�A	�A	�A	�A	�A	�A	�A	�
��A	�F%�X�d�j�.?�%@�%@�A�A�	,�	,�K�D�%��,�u�d�+�+�+�+�+�+�	,�	,rDr�c#�<K�t��}t��}|jdkrgtj�|j��rCt
jd|j��dfdt|j	��dfd���}||��V�||j
�����}d|_t|jd	z
t|����}|�d
||��|t
jdd|zzdzd���z
}|V�dS)
Nz<stdin>� r��:rrr�rTrzbold underline�
u[traceback.offset]▲[/])r+r�r�r�r��existsrrr�r�r��rstrip�no_wrap�minr��len�stylizer )r�r�r(�path_highlighterr��syntax_error_textr�s       rBrzTraceback._render_syntax_error�sL����%�'�'��*�,�,��� �I�-�	-��w�~�~�l�3�4�4�
-��}�0��.�0�0�2C�D�*���,�-�-�/@�A�)�	����'�&�t�,�,�,�,�,�'�K��(9�(@�(@�(B�(B�C�C��$(��!��\�(�1�,�c�2C�.D�.D�E�E���!�!�"2�F�F�C�C�C��T�-��3��<��"<�<�!�
�
�
�	
�� �����rDr��codec�z�tj�|��d}|sT|�d��}|dkr
|d|�n|}|�d��rd|���vrdS	|j�|��pt||��j	S#t$rYdSwxYw)Nr9r9z#!r�r�)r�r��splitext�indexr��lower�LEXERSrsrr�r)r�r�rB�ext�new_line_index�
first_lines      rB�_guess_lexerzTraceback._guess_lexer�s����g���x�(�(��,���	 �"�Z�Z��-�-�N�2@�B�2F�P��o�~�o�.�.�D�J��$�$�T�*�*�
 �x�:�;K�;K�;M�;M�/M�
 ��x�	��:�>�>�#�&�&�W�*B�8�T�*R�*R�*W�W���	�	�	��6�6�	���s�=.B,�,
B:�9B:rc
#�X��K�t��}�j}dtdttf�fd�}d}�jdkr5t
�jdzt|j���jdzz
��}d}t|j��D�]\}}|r||vrd}�|r+|�J�tdt|���d	�d
d���V�d}|dk}	|j�t�fd
��j
D����}
tj�|j��rStj|t|jd�����dt%|j��dfd|jdfd���}n4tjd|jdfdt%|j��dfd���}|j�d��s|	sdV�|V�|j�d��r||��Ed{V����e|
�s�	t-j|j��}d�|��}
|
s�����|j|
��}t5|
||d|j�jz
|j�jzf|jh�j�j�jd��
�
}dV�|j��|j\}}tA||��D]�\}}}	|dkr<||dz
}t|��t|�!����z
}|dkrt||dz
��}n#tD$rY�twxYw|�#d||f||f�����|j$rtK|g||���d���n|V����#tL$r&}tjd|��df��V�Yd}~��d}~wwxYw��dS)Nr
r7c3�r�K�|jr,t|jd�j�j�j���V�dSdS)Nr�)rrTr�r�)r�r-rTrPrQ)r
r�s �rB�
render_localsz.Traceback._render_stack.<locals>.render_locals�s`������|�
�"��L�"�"&�"4�#�5�#�5���������
�
rDrroFTz
... z frames hidden ...�centerztraceback.error)�justifyrc3�B�K�|]}��|��V��dS�Nr�)r�r��frame_filenames  �rB�	<genexpr>z*Traceback._render_stack.<locals>.<genexpr>s1�����W�W��^�6�6�t�<�<�W�W�W�W�W�WrDrr8r6rz in rrzin r�r�)rM�line_numbers�
line_range�highlight_linesrNrKrT�dedentrr9ztraceback.error_range)rr5r6)rr9)'r�rMr�rr%rVr:r>r�rrr��anyrUr�r�r:rr�r�r�r��	linecache�getlinesr�rKr/rLrNrKrTr�rC�lstrip�
IndexError�
stylize_ranger�r"r�)r�rr@rMrN�exclude_frames�excluded�frame_indexr
r?�
suppressedr��
code_linesrB�
lexer_name�syntaxr5r6r;r<r>r��errorrSs`                      @rBrzTraceback._render_stack�s������*�,�,���
��	��	�8�4E�+F�	�	�	�	�	�	�+/���?�a��	�"���1�$��E�L�!�!�D�O�q�$8�8���N�
��"+�E�L�"9�"9�g	�g	��K���
�+��"?�
�����
!�%�1�1�1��D�S��0�0�D�D�D�$�+�������
!���1�$�E�"�^�N��W�W�W�W���W�W�W�W�W�J��w�~�~�e�n�-�-�
��}�$�$�T�%�.�@Q�%R�%R�%R�S�S�*����&�&�(9�:���Z�!4�5�)�
������}���Z�!4�5�*����&�&�(9�:�)������>�,�,�S�1�1�
�%�
������J�J�J��~�(�(��-�-�
�(�=��/�/�/�/�/�/�/�/�/���>
�=�!*�!3�E�N�!C�!C�J��7�7�:�.�.�D��!�!�!%�!2�!2�5�>�4�!H�!H�J�#��"�#�%)�!�L�4�+;�;�!�L�4�+;�;�$�*/���"&�.�#'�?�&*�&8�$����F��H�H�H��-��%*�%;�
��s�8J�%�QT�7U�7U���3�E�7�G�	)�#*�a�<�!M�+5�e�a�i�+@�D�.1�$�i�i�#�d�k�k�m�m�:L�:L�.L�G�#*�b�=�!I�.1�*�U�Q�Y�2G�.H�.H�G���#-�)�)�)�!)��)����
#�0�0�&=�',�g�&6�%*�G�$4�1�����!�<�$�� &��!.��u�!5�!5��%&�����$�
�
�
�
��7!�����-�%�e���'8�9�������������������3>
�Sg	�g	s2�:0M5�,A)M5�=A L�
L+�*L+�5
N%�?N � N%rR)"r�r�r��__doc__rG�LOCALS_MAX_LENGTH�LOCALS_MAX_STRINGrr�r�r�r`rrrr��classmethodrr	r�rr_rr�r#r$r'r3r(r�rrKr�rrHrDrBr^r^�s��������.
�������F�"&�3F� #�$&��#��!�!2�!2�#'�#(�"�57��!3F�3F�3F����3F���}�	3F�
�S�M�3F��
3F���}�3F��3F��3F��3F��3F�!�3F�!�3F��3F��5��j��1�2�3F� �!3F�3F�3F�3F�j� #�$&��#��!�!2�!2�#'�#(�"�57��%F
�F
�F
��s�)�F
�!�F
��M�*�	F
���}�
F
��S�M�F
��F
���}�F
��F
��F
��F
��F
�!�F
�!�F
� �!F
�"�5��j��1�2�#F
�$�%F
�&
�'F
�F
�F
��[�F
�P�"�!2�!2�#'�#(�<@�|�|�|��}�%�|�!�|��M�*�	|��
|��|��|�!�|�!�|�&�c�-�&8�9�|�
�|�|�|��[�|�|d,��d,�)7�d,�	�d,�d,�d,�d,�L�U�W�W� �� �,� � � �
�W� �,�
�C�
�s�
�s�
�
�
��[�
��U�W�W�}�5�}�\�}�}�}�
�W�}�}�}rDr^�__main__r��ac�.�d}t||z��dS)Nr)ra)rl�ones  rB�barroms����
�c�A�g�����rDc�6�d}hd�dd�}t|��dS)NT>�Duncan Idaho�Thufir Hawat�
Paul Atreides�Vladimir Harkonnen)NFT)�
characters�atomic_types)ro)rlr��zeds   rB�foorxss9�� $�����0�
�
��	�A�����rDc�$�td��dS)Nr)rxrHrDrBrfrf�s���A�����rD)r7N)[r�rZr�r��dataclassesrr�	itertoolsrr[r�typesrr�typingr	r
rrr
rrrrrr�pip._vendor.pygments.lexersr�pip._vendor.pygments.tokenrrrrrrrr-r�pip._vendor.pygments.utilrr�r�_loopr r!�columnsr"rIr#r$r%r&r'r(�	constrainr)r(r*r+�panelr,�scoper-rr.rer/r0r�rMr1�platform�WINDOWSrhrir�rCr�r`r�r�r�r�r�r�r�r^r�rorxrfrHrDrB�<module>r�s����������	�	�	�	�
�
�
�
�(�(�(�(�(�(�(�(�������������+�+�+�+�+�+�+�+���������������������������A�@�@�@�@�@�W�W�W�W�W�W�W�W�W�W�W�W�W�W�W�W�8�8�8�8�8�8�,�,�,�,�,�,�3�3�3�3�3�3�������-�-�-�-�-�-�-�-�����������������������!� � � � � �:�:�:�:�:�:�:�:�������������������*�*�*�*�*�*�*�*�������������

�,�'�
!������%��%� .�%�
�e�C��c�M�"�#�%�%�%�%�<"&�� "�����.�.�#�)-��13��@�@�@�
�g�
�@��C�=�@���
�	@�
�@��C�=�
@��@��@��@��@��@�!���@��@��u�S�*�_�-�.�@��@� �t�M�"�M�8�M�3J�K�S�P�Q�!@�@�@�@�F�O�O�O�O�O�O�O���O��3�3�3�3�3�3�3���3��<�<�<�<�<�<�<���<������������/�/�/�/�/�&�/�/�/�g	�g	�g	�g	�g	�g	�g	�g	�T�z����G�������J�J�J����	
������s��t���������
�E�G�G�G�G�G�5�rD