ó
    F\hÜ ã                   ó@  • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	  SSK
r
SSK
Jr  / SQrS>S jrS rS?S jrS>S	 jrS>S
 jrSrSr " S S5      r\" 5       rS r\\SSS4S jr\" 5       rS r\\SS4S jr\4SS.S jjrSSS.S jr\4S jrS@S jr SAS jr!S@S jr"SBS jr#S?S jr$S?S jr%S  r& " S! S"5      r'S# r(S$ r)S% r*S& r+S'r, " S( S)\-5      r.S* r/\R`                  " S+/ S,QS-S./S/9r1S0 r2S1r3S>S2 jr4 " S3 S45      r5 " S5 S65      r6S7r7S8r8S9r9S:r:S; r;S< r<S= r=g)Cz@Extract, format and print information about Python stack traces.é    N)Úsuppress)Ú
ANSIColors)Úextract_stackÚ
extract_tbÚformat_exceptionÚformat_exception_onlyÚformat_listÚformat_stackÚ	format_tbÚ	print_excÚ
format_excÚprint_exceptionÚ
print_lastÚprint_stackÚprint_tbÚclear_framesÚFrameSummaryÚStackSummaryÚTracebackExceptionÚ
walk_stackÚwalk_tbc                 ó’   • Uc  [         R                  n[        R                  U 5      R	                  5        H  n[        X!SS9  M     g)zuPrint the list of tuples as returned by extract_tb() or
extract_stack() as a formatted stack trace to the given file.NÚ ©ÚfileÚend)ÚsysÚstderrr   Ú	from_listÚformatÚprint)Úextracted_listr   Úitems      Ú /usr/lib/python3.13/traceback.pyÚ
print_listr%      s;   € ð �|Ü�z‰zˆÜ×&Ñ& ~Ó6×=Ñ=Ö?ˆÜˆd 2Ô&ò @ó    c                 óH   • [         R                  U 5      R                  5       $ )a·  Format a list of tuples or FrameSummary objects for printing.

Given a list of tuples or FrameSummary objects as returned by
extract_tb() or extract_stack(), return a list of strings ready
for printing.

Each string in the resulting list corresponds to the item with the
same index in the argument list.  Each string ends in a newline;
the strings may contain internal newlines as well, for those items
whose source text line is not None.
)r   r   r    )r"   s    r$   r	   r	   !   s   € ô ×!Ñ! .Ó1×8Ñ8Ó:Ð:r&   c                 ó&   • [        [        XS9US9  g)a  Print up to 'limit' stack trace entries from the traceback 'tb'.

If 'limit' is omitted or None, all entries are printed.  If 'file'
is omitted or None, the output goes to sys.stderr; otherwise
'file' should be an open file or file-like object with a write()
method.
©Úlimit©r   N)r%   r   )Útbr*   r   s      r$   r   r   3   s   € ô Œz˜"Ñ*°Ó6r&   c                 ó0   • [        XS9R                  5       $ )z5A shorthand for 'format_list(extract_tb(tb, limit))'.r)   )r   r    ©r,   r*   s     r$   r   r   =   s   € ä�bÑ&×-Ñ-Ó/Ð/r&   c                 ó<   • [         R                  [        U 5      US9$ )aû  
Return a StackSummary object representing a list of
pre-processed entries from traceback.

This is useful for alternate formatting of stack traces.  If
'limit' is omitted or None, all entries are extracted.  A
pre-processed stack trace entry is a FrameSummary object
containing attributes filename, lineno, name, and line
representing the information that is usually printed for a stack
trace.  The line is a string with leading and trailing
whitespace stripped; if the source is not available it is None.
r)   )r   Ú _extract_from_extended_frame_genÚ_walk_tb_with_full_positionsr.   s     r$   r   r   A   s&   € ô ×8Ñ8Ü$ RÓ(°ð 9ð 7ð 7r&   zG
The above exception was the direct cause of the following exception:

zF
During handling of the above exception, another exception occurred:

c                   ó   • \ rS rSrS rSrg)Ú	_Sentinelé^   c                 ó   • g)Nz
<implicit>© ©Úselfs    r$   Ú__repr__Ú_Sentinel.__repr___   s   € Ør&   r6   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r9   Ú__static_attributes__r6   r&   r$   r3   r3   ^   s   † õr&   r3   c                 óø   • U[         L U[         L :w  a  [        S5      eXs=L a	  [         L aM  O  X4$ U bD  [        U [        5      (       a  X R                  4$ [        S[        U 5      R                   S35      egX4$ )Nz-Both or neither of value and tb must be givenzException expected for value, z found©NN)Ú	_sentinelÚ
ValueErrorÚ
isinstanceÚBaseExceptionÚ__traceback__Ú	TypeErrorÚtyper;   )ÚexcÚvaluer,   s      r$   Ú_parse_value_tbrK   d   s‹   € Ø”Ð ¤i Ó0ÜÐHÓIÐIØÔ”iÔð ˆ9Ðð ‰?Ü˜#œ}×-Ñ-Ø×-Ñ-Ð-Ð-äÐ<Ü# C›y×1Ñ1Ð2°&ð:ó ;ð ;ð Øˆ9Ðr&   Tc                óŽ   • UR                  SS5      n[        XU5      u  p[        [        U5      XUSS9nUR	                  XEUS9  g)aÙ  Print exception up to 'limit' stack trace entries from 'tb' to 'file'.

This differs from print_tb() in the following ways: (1) if
traceback is not None, it prints a header "Traceback (most recent
call last):"; (2) it prints the exception type and value after the
stack trace; (3) if type is SyntaxError and value has the
appropriate format, it prints the line where the syntax error
occurred with a caret on the next line indicating the approximate
position of the error.
ÚcolorizeFT©r*   Úcompact)r   ÚchainrM   N)ÚgetrK   r   rH   r!   )	rI   rJ   r,   r*   r   rP   ÚkwargsrM   Útes	            r$   r   r   s   sF   € ð �z‰z˜* eÓ,€HÜ ¨BÓ/�I€EÜ	œD ›K¨¸%ÈÑ	N€BØ‡H�H�$¨h€HÒ7r&   c                óª   • [         R                  b  [         R                  O[         R                  n[        R                  " US9n[        U [        XS9$ )Nr+   )r*   r   rM   )r   r   Ú
__stderr__Ú	_colorizeÚcan_colorizer   ÚBUILTIN_EXCEPTION_LIMIT)rI   r   rM   s      r$   Ú_print_exception_bltinrY   ˆ   s:   € ÜŸ™Ñ/Œ3�:Š:´S·^±^€DÜ×%Ò%¨4Ñ0€HÜ˜3Ô&=ÀDÑ\Ð\r&   c                óœ   • UR                  SS5      n[        XU5      u  p[        [        U5      XUSS9n[	        UR                  XFS95      $ )ab  Format a stack trace and the exception information.

The arguments have the same meaning as the corresponding arguments
to print_exception().  The return value is a list of strings, each
ending in a newline and some containing internal newlines.  When
these lines are concatenated and printed, exactly the same text is
printed as does print_exception().
rM   FTrN   ©rP   rM   )rQ   rK   r   rH   Úlistr    )rI   rJ   r,   r*   rP   rR   rM   rS   s           r$   r   r   Ž   sL   € ð �z‰z˜* eÓ,€HÜ ¨BÓ/�I€EÜ	œD ›K¨¸%ÈÑ	N€BÜ�—	‘	 �	Ð9Ó:Ð:r&   F)Ú
show_groupc               ó–   • UR                  SS5      nU[        L a  U n[        [        U5      USSS9n[	        UR                  X$S95      $ )ak  Format the exception part of a traceback.

The return value is a list of strings, each ending in a newline.

The list contains the exception's message, which is
normally a single string; however, for :exc:`SyntaxError` exceptions, it
contains several lines that (when printed) display detailed information
about where the syntax error occurred. Following the message, the list
contains the exception's ``__notes__``.

When *show_group* is ``True``, and the exception is an instance of
:exc:`BaseExceptionGroup`, the nested exceptions are included as
well, recursively, with indentation relative to their nesting depth.
rM   FNT)rO   )r]   rM   )rQ   rB   r   rH   r\   r   )rI   rJ   r]   rR   rM   rS   s         r$   r   r   ž   sN   € ð �z‰z˜* eÓ,€HØ”	ÒØˆÜ	œD ›K¨°¸dÑ	C€BÜ�×(Ñ(°JÐ(ÐRÓSÐSr&   ©Úinsert_final_newlinerM   c                ót  • [        US5      nU(       a  SOSnU(       a~  Ub  U(       d(  [        R                   U  [        R                   U 3nU$ [        R                   U  [        R                   S[        R                   U [        R                   U 3n U$ Ub  U(       d  U  U 3nU$ U  SU U 3nU$ )NÚ	exceptionÚ
r   z: )Ú_safe_stringr   ÚBOLD_MAGENTAÚRESETÚMAGENTA)ÚetyperJ   r`   rM   ÚvaluestrÚend_charÚlines          r$   Ú_format_final_exc_linerl   ¶   sÞ   € Ü˜E ;Ó/€HÞ+‰t°€HÞØ‰=¦Ü ×-Ñ-Ð.¨u¨g´j×6FÑ6FÐ5GÈÀzÐRˆDð €Kô !×-Ñ-Ð.¨u¨g´j×6FÑ6FÐ5GÀrÌ*×J\ÑJ\ÐI]Ð^fÐ]gÔhr×hxÑhxÐgyð  {Cð  zDð  E‰Dð €Kð	 ‰=¦Ø�W˜X˜JÐ'ˆDð €Kð �W˜B˜x˜j¨¨
Ð3ˆDØ€Kr&   c                 óH   •  U" U 5      $ !   SU SUR                    S3s $ = f)NÚ<Ú z
() failed>)r;   )rJ   ÚwhatÚfuncs      r$   rd   rd   Æ   s1   € ð4Ù�E‹{Ðøð4Ø�4�&˜˜$Ÿ-™-˜¨
Ð3Ò3ús   ‚
 Š!c                 ó@   • [        [        R                  " 5       XUS9  g)zVShorthand for 'print_exception(sys.exception(), limit=limit, file=file, chain=chain)'.©r*   r   rP   N)r   r   rb   rs   s      r$   r   r   Î   s   € ä”C—M’M“O¨5À5ÓIr&   c                 óZ   • SR                  [        [        R                  " 5       XS95      $ )z%Like print_exc() but return a string.r   ©r*   rP   )Újoinr   r   rb   ru   s     r$   r   r   Ò   s   € à�7‰7Ô#¤C§M¢M£O¸5ÑNÓOÐOr&   c           	      ó:  • [        [        S5      (       d   [        [        S5      (       d  [        S5      e[        [        S5      (       a  [        [        R                  XUS9  g[        [        R
                  [        R                  [        R                  XUS9  g)z]This is a shorthand for 'print_exception(sys.last_exc, limit=limit, file=file, chain=chain)'.Úlast_excÚ	last_typezno last exceptionrs   N)Úhasattrr   rC   r   rx   ry   Ú
last_valueÚlast_tracebackrs   s      r$   r   r   Ö   se   € ä”3˜
×#Ñ#¬G´C¸×,EÑ,EÜÐ,Ó-Ð-äŒs�J×ÑÜœŸ™¨EÀEÓJäœŸ™¤s§~¡~´s×7IÑ7IØ#°eó	=r&   c                 ój   • U c  [         R                  " 5       R                  n [        [	        XS9US9  g)zçPrint a stack trace from its invocation point.

The optional 'f' argument can be used to specify an alternate
stack frame at which to start. The optional 'limit' and 'file'
arguments have the same meaning as for print_exception().
Nr)   r+   )r   Ú	_getframeÚf_backr%   r   )Úfr*   r   s      r$   r   r   æ   s)   € ð 	�yÜ�MŠM‹O×"Ñ"ˆÜŒ}˜QÑ,°4Ó8r&   c                 ój   • U c  [         R                  " 5       R                  n [        [	        XS95      $ )z5Shorthand for 'format_list(extract_stack(f, limit))'.r)   )r   r~   r   r	   r   )r€   r*   s     r$   r
   r
   ò   s(   € à�yÜ�MŠM‹O×"Ñ"ˆÜ”} QÑ4Ó5Ð5r&   c                 ó¤   • U c  [         R                  " 5       R                  n [        R	                  [        U 5      US9nUR                  5         U$ )a[  Extract the raw traceback from the current stack frame.

The return value has the same format as for extract_tb().  The
optional 'f' and 'limit' arguments have the same meaning as for
print_stack().  Each item in the list is a quadruple (filename,
line number, function name, text), and the entries are in order
from oldest to newest stack frame.
r)   )r   r~   r   r   Úextractr   Úreverse)r€   r*   Ústacks      r$   r   r   ù   sA   € ð 	�yÜ�MŠM‹O×"Ñ"ˆÜ× Ñ ¤¨A£°eÐ Ð<€EØ	‡M�M„OØ€Lr&   c                 ó„   • U b-   U R                   R                  5         U R                  n U b  M,  gg! [         a     Nf = f)zEClear all references to local variables in the frames of a traceback.N)Útb_frameÚclearÚRuntimeErrorÚtb_next©r,   s    r$   r   r   	  sB   € à
‰.ð	Ø�K‰K×ÑÔð �Z‰Zˆð �.øô ó 	áð	ús   …2 ²
?¾?c                   óˆ   • \ rS rSrSrSrSSSSSSS.S jrS rS	 rS
 r	S r
S rS r\S 5       r\S 5       r\S 5       rSrg)r   i  a  Information about a single frame from a traceback.

- :attr:`filename` The filename for the frame.
- :attr:`lineno` The line within filename for the frame that was
  active when the frame was captured.
- :attr:`name` The name of the function or method that was executing
  when the frame was captured.
- :attr:`line` The text from the linecache module for the
  of code that was running when the frame was captured.
- :attr:`locals` Either None if locals were not supplied, or a dict
  mapping the name to the repr() of the variable.
)
ÚfilenameÚlinenoÚ
end_linenoÚcolnoÚ	end_colnoÚnameÚ_linesÚ_lines_dedentedÚlocalsÚ_codeTN)Úlookup_liner•   rk   r�   r�   r‘   c                ó^  • Xl         X l        Uc  UOUU l        X€l        X�l        X0l        U
R                  S5      U l        X`l        SU l	        U(       a  U R                    U(       a9  UR                  5        VVs0 s H  u  p¼U[        US[        S9_M     snnU l        gSU l        gs  snnf )ac  Construct a FrameSummary.

:param lookup_line: If True, `linecache` is consulted for the source
    code line. Otherwise, the line will be looked up when first needed.
:param locals: If supplied the frame locals, which will be captured as
    object representations.
:param line: If provided, use this instead of looking up the line in
    the linecache.
Nr–   Úlocal©rq   )r�   rŽ   r�   r�   r‘   r’   rQ   r–   r“   r”   rk   Úitemsrd   Úreprr•   )r8   r�   rŽ   r’   r—   r•   rk   r�   r�   r‘   rR   ÚkÚvs                r$   Ú__init__ÚFrameSummary.__init__%  s˜   € ð !ŒØŒØ$.Ñ$6™&¸JˆŒØŒ
Ø"ŒØŒ	Ø—Z‘Z Ó(ˆŒ
ØŒØ#ˆÔÞØ�IŠIæ+1˜Ÿ™œô(Ú&‘�ð œ, q¨'¼Ñ=Ò=Ù&ò(ˆ�Ø7;ð 	�ùó (s   Á;B)c                 ó¶  • [        U[        5      (       ay  U R                  UR                  :H  =(       aY    U R                  UR                  :H  =(       a9    U R                  UR                  :H  =(       a    U R
                  UR
                  :H  $ [        U[        5      (       a1  U R                  U R                  U R                  U R                  4U:H  $ [        $ ©N)	rD   r   r�   rŽ   r’   r•   Útuplerk   ÚNotImplemented©r8   Úothers     r$   Ú__eq__ÚFrameSummary.__eq__?  sž   € Ü�eœ\×*Ñ*Ø—M‘M U§^¡^Ñ3÷ 0Ø—K‘K 5§<¡<Ñ/÷0à—I‘I §¡Ñ+÷0ð —K‘K 5§<¡<Ñ/ð1ô �eœU×#Ñ#Ø—M‘M 4§;¡;°·	±	¸4¿9¹9ÐEÈÑNÐNÜÐr&   c                 ód   • U R                   U R                  U R                  U R                  4U   $ r¢   )r�   rŽ   r’   rk   )r8   Úposs     r$   Ú__getitem__ÚFrameSummary.__getitem__I  s&   € Ø—‘˜tŸ{™{¨D¯I©I°t·y±yÐAÀ#ÑFÐFr&   c                 óp   • [        U R                  U R                  U R                  U R                  /5      $ r¢   )Úiterr�   rŽ   r’   rk   r7   s    r$   Ú__iter__ÚFrameSummary.__iter__L  s&   € Ü�T—]‘] D§K¡K°·±¸D¿I¹IÐFÓGÐGr&   c                 ó`   • SR                  U R                  U R                  U R                  S9$ )Nz7<FrameSummary file {filename}, line {lineno} in {name}>)r�   rŽ   r’   )r    r�   rŽ   r’   r7   s    r$   r9   ÚFrameSummary.__repr__O  s0   € ØH×OÑOØ—]‘]¨4¯;©;¸T¿Y¹Yð Pð Hð 	Hr&   c                 ó   • g)Né   r6   r7   s    r$   Ú__len__ÚFrameSummary.__len__S  s   € Ør&   c                 ó*  • U R                   Gc  U R                  b÷  U R                  bé  / n[        U R                  U R                  S-   5       H¦  n[        R
                  " U R                  U5      R                  5       nU(       d\  U R                  bO  U R                  R                  S5      (       a/  [        R                  " U R                  U5      R                  5       nUR                  U5        M¨     SR                  U5      S-   U l         g g g g )Né   rn   rc   )r“   rŽ   r�   ÚrangeÚ	linecacheÚgetliner�   Úrstripr–   Ú
startswithÚ_getline_from_codeÚappendrv   )r8   ÚlinesrŽ   rk   s       r$   Ú
_set_linesÚFrameSummary._set_linesV  sÕ   € à�K‰KÒØ—‘Ñ'Ø—‘Ñ+àˆEÜ §¡¨T¯_©_¸qÑ-@ÖA�ä ×(Ò(¨¯©¸Ó?×FÑFÓH�Þ §
¡
Ñ 6¸4¿=¹=×;SÑ;SÐTW×;XÑ;XÜ$×7Ò7¸¿
¹
ÀFÓK×RÑRÓT�DØ—‘˜TÖ"ñ Bð Ÿ)™) EÓ*¨TÑ1ˆD�Kð ,ð (ð  r&   c                 ó:   • U R                  5         U R                  $ r¢   )rÁ   r“   r7   s    r$   Ú_original_linesÚFrameSummary._original_linese  s   € ð 	�‰ÔØ�{‰{Ðr&   c                 ó¸   • U R                  5         U R                  c2  U R                  b%  [        R                  " U R                  5      U l        U R                  $ r¢   )rÁ   r”   r“   ÚtextwrapÚdedentr7   s    r$   Ú_dedented_linesÚFrameSummary._dedented_linesk  sD   € ð 	�‰ÔØ×ÑÑ'¨D¯K©KÑ,CÜ#+§?¢?°4·;±;Ó#?ˆDÔ Ø×#Ñ#Ð#r&   c                 ó–   • U R                  5         U R                  c  g U R                  R                  S5      S   R                  5       $ )Nrc   r   )rÁ   r“   Ú	partitionÚstripr7   s    r$   rk   ÚFrameSummary.lines  s<   € à�‰ÔØ�;‰;ÑØà�{‰{×$Ñ$ TÓ*¨1Ñ-×3Ñ3Ó5Ð5r&   )
r–   r“   r”   r�   r‘   r�   r�   rŽ   r•   r’   )r;   r<   r=   r>   Ú__doc__Ú	__slots__rŸ   r§   r«   r¯   r9   rµ   rÁ   ÚpropertyrÄ   rÉ   rk   r?   r6   r&   r$   r   r     sƒ   † ñðI€Ið ?CØ˜dØ 4°4õ<ò4òGòHòHòò2ð ñó ðð
 ñ$ó ð$ð ñ6ó ó6r&   r   c              #   óÔ   #   • U c=  [         R                  " 5       R                  R                  R                  R                  n U b!  X R                  4v •  U R                  n U b  M   gg7f)zÊWalk a stack yielding the frame and line number for each frame.

This will follow f.f_back from the given frame. If no frame is given, the
current stack is used. Usually used with StackSummary.extract.
N)r   r~   r   Úf_lineno)r€   s    r$   r   r   |  sP   é € ð 	�yÜ�MŠM‹O×"Ñ"×)Ñ)×0Ñ0×7Ñ7ˆØ
‰-Ø—‘ˆmÒØ�H‰Hˆð �-ùs   ‚A"A(Á&A(c              #   ój   #   • U b,  U R                   U R                  4v •  U R                  n U b  M+  gg7f)z¼Walk a traceback yielding the frame and line number for each frame.

This will follow tb.tb_next (and thus is in the opposite order to
walk_stack). Usually used with StackSummary.extract.
N)r‡   Ú	tb_linenorŠ   r‹   s    r$   r   r   ‰  s/   é € ð ‰.Ø�k‰k˜2Ÿ<™<Ð'Ò'Ø�Z‰Zˆð �.ùs   ‚-3±3c              #   óú   #   • U bt  [        U R                  R                  U R                  5      nUS   c"  U R                  U R                  4USS  -   4v •  OU R                  U4v •  U R
                  n U b  Ms  g g 7f©Nr   r¸   )Ú_get_code_positionr‡   Úf_codeÚtb_lastirÕ   rŠ   )r,   Ú	positionss     r$   r1   r1   ”  sr   é € ð ‰.Ü& r§{¡{×'9Ñ'9¸2¿;¹;ÓGˆ	ð �Q‰<ÑØ—+‘+ §¡Ð/°)¸A¸B°-Ñ?Ð?Ó?à—+‘+˜yÐ(Ò(Ø�Z‰Zˆð �.ùs   ‚A5A;Á9A;c                 óv   • US:  a  gU R                  5       n[        [        R                  " X!S-  S 5      5      $ )Nr   )NNNNé   )Úco_positionsÚnextÚ	itertoolsÚislice)ÚcodeÚinstruction_indexÚpositions_gens      r$   rØ   rØ   ¢  s8   € Ø˜1ÓØ'Ø×%Ñ%Ó'€MÜ”	× Ò  ÀQÑ0FÈÓMÓNÐNr&   é   c                   ór   • \ rS rSrSr\SSSS.S j5       r\SSSS.S j5       r\S	 5       rS
 r	S r
S rSrg)r   i¬  z?A list of FrameSummary objects, representing a stack of frames.NTF©r*   Úlookup_linesÚcapture_localsc                ó<   ^• U4S jnU R                  U" 5       X#US9$ )a  Create a StackSummary from a traceback or stack object.

:param frame_gen: A generator that yields (frame, lineno) tuples
    whose summaries are to be included in the stack.
:param limit: None to include all frames or the number of frames to
    include.
:param lookup_lines: If True, lookup lines for each frame immediately,
    otherwise lookup is deferred until the frame is rendered.
:param capture_locals: If True, the local variables from each frame will
    be captured as object representations into the FrameSummary.
c               3   ó6   >#   • T H  u  pXS S S 44v •  M     g 7fr¢   r6   )r€   rŽ   Ú	frame_gens     €r$   Úextended_frame_genÚ0StackSummary.extract.<locals>.extended_frame_gen½  s$   øé € Û&‘	�Ø $¨¨dÐ3Ð3Ô3ò 'ùs   ƒrç   )r0   )Úklassrì   r*   rè   ré   rí   s    `    r$   rƒ   ÚStackSummary.extract¯  s-   ø€ õ	4ð ×5Ñ5ÙÓ ¨Ø)ð 6ð +ð 	+r&   c                óð  • U[         L nUb  U(       a  [        [        SS 5      nUb  US:  a  SnUbV  U(       a  [        U5      nU[	        U5      U-
  S  nO2US:¼  a  [
        R                  " X5      nO[        R                  " X* S9nU " 5       n[        5       nU Hœ  u  nu  pšp¼UR                  nUR                  nUR                  nUR                  U5        [        R                  " XèR                   5        U(       a  UR"                  nOS nUR%                  ['        XéUSUX«UUR                  S9	5        Mž     U H  n[        R(                  " U5        M     U(       a  U H  nUR*                    M     U$ )NÚtracebacklimitr   )ÚmaxlenF)r—   r•   r�   r�   r‘   r–   )rX   Úgetattrr   r£   Úlenrà   rá   ÚcollectionsÚdequeÚsetrÙ   Úco_filenameÚco_nameÚaddrº   Ú	lazycacheÚ	f_globalsÚf_localsr¿   r   Ú
checkcacherk   )rï   rì   r*   rè   ré   Úbuiltin_limitÚresultÚfnamesr€   rŽ   r�   r�   r‘   Úcor�   r’   rþ   s                    r$   r0   Ú-StackSummary._extract_from_extended_frame_genÅ  sS  € ð Ô!8Ð8ˆØ‰=žMÜœCÐ!1°4Ó8ˆEØÑ  U¨Q£YØ�ØÑÞÜ! )Ó,�	Ø%¤c¨)£n°uÑ&<Ð&=Ð>‘	Ø˜!“Ü%×,Ò,¨YÓ>‘	ä'×-Ò-¨iÀÑG�	á“ˆÜ“ˆÛ9BÑ5ˆAÑ5� EØ—‘ˆBØ—~‘~ˆHØ—:‘:ˆDØ�J‰J�xÔ Ü×Ò ¯+©+Ô6æØŸ:™:‘à�Ø�M‰MÜ˜X¨tØ %¨hØ)À)ØŸ(™(ñöñ :Có$ ˆHÜ× Ò  Ö*ñ ö Û�Ø—”ñ àˆr&   c           
      ó¸   • [        5       nU HI  n[        U[        5      (       a  UR                  U5        M+  Uu  pEpgUR                  [        XEXgS95        MK     U$ )zh
Create a StackSummary object from a supplied list of
FrameSummary objects or old-style list of tuples.
©rk   )r   rD   r   r¿   )rï   Úa_listr  Úframer�   rŽ   r’   rk   s           r$   r   ÚStackSummary.from_list÷  sR   € ô “ˆÛˆEÜ˜%¤×.Ñ.Ø—‘˜eÖ$à/4Ñ,� $Ø—‘œl¨8¸TÑMÖNñ ð ˆr&   c                 óæ
  ^^^^^^^^^^^• UR                  SS5      m/ nUR                  nUR                  R                  S5      (       a  SnT(       a‘  UR                  SR	                  [
        R                  U[
        R                  [
        R                  UR                  [
        R                  [
        R                  UR                  [
        R                  5	      5        O5UR                  SR	                  XAR                  UR                  5      5        UR                  (       GaÆ  UR                  R                  5       (       Ga¦  UR                  b  UR                  c5  UR                  [        R                  " UR                   S5      S	-   5        GOWUR"                  R%                  5       nUS
   nXQR&                  UR                  -
     n[)        XaR                  5      n[)        XqR                  5      n	UR                  R%                  5       SUR&                  UR                  -
  S-    m[+        U5      [+        TS
   5      -
  n
[-        S
XŠ-
  5      n[-        S
Xš-
  5      n	[/        TS
   US9m[/        TS   U	S9mS	R1                  T5      nX¸[+        U5      [+        TS   5      U	-
  -
   nSmSm[3        [4        5         [7        U5      mSSS5        U R9                  X‰TT5      m/ mS
[+        T5      S-
  1nS
mS
mSmSmT(       aò  TR:                  mTR<                  mTR>                  S
:X  a  TU-  mTR@                  S
:X  a  TU-  m[/        TTR>                     TS9m[/        TTR@                     TS9mTRB                  mTRD                  mURG                  [I        TR>                  S-
  TR>                  S-   5      5        URG                  [I        TR@                  S-
  TR@                  S-   5      5        URK                  S5        URK                  [+        T5      5        UUUUUUUUUUU4S jn[M        U5      n[O        U5       HO  u  nnU(       a:  UXïS-
     -
  nUS:X  a  U" US-
  5        OUS:”  a  TR                  SUS-
   S35        U" U5        MQ     UR                  [        R                  " [        RP                  " SR1                  T5      5      SS 5      5        URR                  (       aL  [M        URR                  RU                  5       5       H%  u  nnUR                  SR	                  UUS95        M'     SR1                  U5      $ ! , (       d  f       GN’= f)z±Format the lines for a single FrameSummary.

Returns a string representing one frame involved in the stack. This
gets called for every frame to be printed in the stack summary.
rM   Fz<stdin>-z<stdin>z(  File {}"{}"{}, line {}{}{}, in {}{}{}
z  File "{}", line {}, in {}
Nz    rc   r   r¸   )ÚoffsetéÿÿÿÿÚ^rÝ   c                 ó   >• TR                  TU    S-   5        T(       d  g[        TU    5      [        TU    R                  5       5      -
  n/ nU [        T5      S-
  :X  a  TO[        TU    5      n[	        U5       Hž  nXA:  d  U S:X  a  UT:  a  UR                  S5        M'  T(       a_  U TR
                  :”  d  U TR
                  :X  a?  UT:¼  a9  U TR                  :  d  U TR                  :X  a  UT:  a  UR                  T5        M�  UR                  T5        M      T(       Ga  TS   n/ n/ n[        R                  " [        R                  " XRSS9S	 S
9 GH”  u  p‰[        U	5      n
US:X  a”  UR                  [        R                  SR                  S U
 5       5      -   [        R                  -   5        UR                  [        R                  SR                  S U
 5       5      -   [        R                  -   5        M«  US:X  a•  UR                  [        R                  SR                  S U
 5       5      -   [        R                  -   5        UR                  [        R                  SR                  S U
 5       5      -   [        R                  -   5        GMF  UR                  SR                  S U
 5       5      5        UR                  SR                  S U
 5       5      5        GM—     SR                  U5      nSR                  U5      nUTS'   TR                  US-   5        gTR                  SR                  U5      S-   5        g)z*output all_lines[lineno] along with caretsrc   Nr¸   r   ro   r  r   )Ú	fillvaluec                 ó   • U S   $ ©Nr¸   r6   ©Úxs    r$   Ú<lambda>ÚHStackSummary.format_frame_summary.<locals>.output_line.<locals>.<lambda>˜  s   € ð  @Að  BCò  @Dr&   )Úkeyr  c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   ©Ú.0ÚcharÚ_s      r$   Ú	<genexpr>ÚIStackSummary.format_frame_summary.<locals>.output_line.<locals>.<genexpr>›  s   é € ÐYzÒnyÑcjÐcgÕZ^Ònyùó   ‚c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   ©r  r  Úcarets      r$   r  r  œ  s   é € Ð[~Òr}ÑfnÐfgÕ\aÒr}ùr  Ú~c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   r  s      r$   r  r  ž  s   é € ÐTuÒitÑ^eÐ^bÕUYÒitùr  c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   r   s      r$   r  r  Ÿ  s   é € ÐVyÒmxÑaiÐabÕW\Òmxùr  c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   r  s      r$   r  r  ¡  s   é € ÐCdÒXcÉWÈTÅDÒXcùr  c              3   ó*   #   • U  H	  u  pUv •  M     g 7fr¢   r6   r   s      r$   r  r  ¢  s   é € ÐEhÒ\gÑPXÐPQÅeÒ\gùr  )r¿   rõ   ÚlstripÚ_display_widthr¹   Úleft_end_linenoÚright_start_linenorà   ÚgroupbyÚzip_longestr\   r   ÚBOLD_REDrv   rf   ÚRED)rŽ   Ú
num_spacesÚcaretsÚ
num_caretsÚcolrk   Úcolorized_line_partsÚcolorized_carets_partsÚcolorÚgroupÚcaret_groupÚcolorized_lineÚcolorized_caretsÚ	all_linesÚanchorsÚanchors_left_end_offsetÚanchors_right_start_offsetrM   Údp_end_offsetÚdp_start_offsetÚprimary_charr  Úsecondary_charÚshow_caretss                €€€€€€€€€€€r$   Úoutput_lineÚ6StackSummary.format_frame_summary.<locals>.output_liney  s  ø€ à—M‘M )¨FÑ"3°dÑ":Ô;Þ&ØÜ!$ Y¨vÑ%6Ó!7¼#¸iÈÑ>O×>VÑ>VÓ>XÓ:YÑ!Y�JØ�FØ28¼CÀ	»NÈQÑ<NÓ2N¡ÔTbÐclÐmsÑctÓTu�Jä$ ZÖ0˜ØÓ+°¸!³ÀÀoÓ@Uà"ŸM™M¨#Ö.Þ$Ø" W×%<Ñ%<Ó<Ø# w×'>Ñ'>Ó>À3ÐJaÓCaà" W×%?Ñ%?Ó?Ø# w×'AÑ'AÓAÀcÐLfÓFfð #ŸM™M¨.Ö9à"ŸM™M¨,Ö7ñ  1÷  ð  & b™z˜Ø/1Ð,Ø13Ð.ä,5×,=Ò,=¼i×>SÒ>SÐTXÐlnÑ>oñ  vDõ  -E™L˜EÜ*.¨u«+˜KØ$¨›|Ø 4× ;Ñ ;¼J×<OÑ<OÐRT×RYÑRYÑYzÑnyÓYzÓRzÑ<zô  ~H÷  ~Nñ  ~Nñ  =Nô  !OØ 6× =Ñ =¼j×>QÑ>QÐTV×T[ÑT[Ñ[~Ñr}Ó[~ÓT~Ñ>~ô  BL÷  BRñ  BRñ  ?Rö  !SØ!&¨#£Ø 4× ;Ñ ;¼J¿N¹NÈRÏWÉWÑTuÑitÓTuÓMuÑ<uô  yC÷  yIñ  yIñ  =Iô  !JØ 6× =Ñ =¼j¿n¹nÈrÏwÉwÑVyÑmxÓVyÓOyÑ>yô  }G÷  }Mñ  }Mñ  ?M÷  !Nà 4× ;Ñ ;¸B¿G¹GÑCdÑXcÓCdÓ<dÔ eØ 6× =Ñ =¸b¿g¹gÑEhÑ\gÓEhÓ>h× iñ -Eð *,¯©Ð1EÓ)F˜Ø+-¯7©7Ð3IÓ+JÐ(Ø%3˜˜r™
ØŸ™Ð&6¸Ñ&=Õ>àŸ™ b§g¡g¨f£o¸Ñ&<Õ=r&   z...<z lines>...
r   c                 ó   • g©NTr6   r  s    r$   r  Ú3StackSummary.format_frame_summary.<locals>.<lambda>¹  s   € Ð[_r&   z    {name} = {value}
)r’   rJ   )+rQ   r�   r½   r¿   r    r   rg   rf   rŽ   r’   rÉ   rÍ   r�   r‘   rÇ   Úindentrk   rÄ   Ú
splitlinesr�   Ú _byte_offset_to_character_offsetrõ   Úmaxr(  rv   r   Ú	ExceptionÚ(_extract_caret_anchors_from_line_segmentÚ_should_show_caretsÚleft_end_offsetÚright_start_offsetr)  r*  r@  rA  Úupdater¹   ÚdiscardÚsortedÚ	enumeraterÈ   r•   r›   )r8   Úframe_summaryrR   Úrowr�   Úall_lines_originalÚ
first_lineÚ	last_lineÚstart_offsetÚ
end_offsetÚdedent_charactersÚsegmentÚsignificant_linesrC  Úsig_lines_listÚirŽ   Úlinediffr’   rJ   r:  r;  r<  r=  rM   r>  r?  r@  r  rA  rB  s                       @@@@@@@@@@@r$   Úformat_frame_summaryÚ!StackSummary.format_frame_summary
  sñ  ÿú€ ð —:‘:˜j¨%Ó0ˆØˆØ ×)Ñ)ˆØ×!Ñ!×,Ñ,¨Z×8Ñ8Ø ˆHÞØ�J‰JÐB×IÑIÜ×&Ñ&ØÜ×$Ñ$Ü×&Ñ&Ø!×(Ñ(Ü×$Ñ$Ü×&Ñ&Ø!×&Ñ&Ü×$Ñ$ó
õ ð �J‰JÐ6×=Ñ=Ø×.Ñ.°×0BÑ0BóDô Eà×(×(Ð(¨]×-JÑ-J×-PÑ-P×-RÒ-Rà×#Ñ#Ñ+Ø×'Ñ'Ñ/ð —
‘
œ8Ÿ?š?¨=×+=Ñ+=¸vÓFÈÑMÖNð &3×%BÑ%B×%MÑ%MÓ%OÐ"Ø/°Ñ2�
à.×/GÑ/GÈ-×J^ÑJ^Ñ/^Ñ_�	ô  @À
×L_ÑL_Ó`�Ü=¸i×I`ÑI`Óa�
à)×9Ñ9×DÑDÓFØH�]×-Ñ-°×0DÑ0DÑDÀqÑHð�	ô
 %(¨
£O´c¸)ÀA¹,Ó6GÑ$GÐ!Ü" 1 lÑ&FÓG�Ü   JÑ$BÓC�
ô
 #1°¸1±ÀlÑ"S�Ü .¨y¸©}ÀZÑ P�ð Ÿ)™) IÓ.�Ø!¬s°7«|¼sÀ9ÈRÁ=Ó?QÐT^Ñ?^Ñ/_Ð`�ð �Ø#�ÜœiÕ(ÜFÀwÓO�G÷ )à"×6Ñ6°|ÐQZÐ\cÓd�à�ð &'¬¨I«¸Ñ(:Ð$;Ð!à*+Ð'Ø-.Ð*Ø"�Ø!$�ÞØ.5×.EÑ.EÐ+Ø18×1KÑ1KÐ.ð ×.Ñ.°!Ó3Ø/°<Ñ?Ð/Ø×1Ñ1°QÓ6Ø2°lÑBÐ2ô /=Ø! '×"9Ñ"9Ñ:ÐCZñ/Ð+ô 2@Ø! '×"<Ñ"<Ñ=ÐF`ñ2Ð.ð $+×#7Ñ#7�LØ%,×%;Ñ%;�NØ%×,Ñ,Ü˜g×5Ñ5¸Ñ9¸7×;RÑ;RÐUVÑ;VÓWôð &×,Ñ,Ü˜g×8Ñ8¸1Ñ<¸g×>XÑ>XÐ[\Ñ>\Ó]ôð
 "×)Ñ)¨"Ô-Ø!×)Ñ)¬#¨i«.Ô9÷0>÷ 0>ôf "(Ð(9Ó!:�Ü!*¨>Ö!:‘I�A�vÞØ#)¨N¸q¹5Ñ,AÑ#A˜Ø# q›=á'¨°©
Õ3Ø%¨›\à"ŸM™M¨D°¸A±°¸lÐ*KÔLÙ Ö'ñ ";ð —
‘
Ü—O’O¤H§O¢O°B·G±G¸F³OÓ$DÀfÑN_Ó`ôð ××Ü% m×&:Ñ&:×&@Ñ&@Ó&BÖC‘��eØ—
‘
Ð3×:Ñ:ÀÈEÐ:ÐRÖSñ  Dð �w‰w�s‹|Ð÷e )Ö(ús   Ë
U!Õ!
U0c                 óv  ^^^• [        [        [        5         SS KnUR	                  SR                  T5      5      nUR                  (       d
   S S S 5        gUR                  S   nS nUUU4S jn	U=UR                  S` =bQ  u  UR                  S` =b?  u     [        UR                  R                  UR                  5      (       a�  UR                  nOt  UR                  S` =bb  u  UR                  S` =bP  u   [        UR                  5      S:X  a6  [        UR                  S   UR                  5      (       a  UR                  nO  Ub  U	" U5      (       a
   S S S 5        gS S S 5        U(       a  gTS   S T R!                  5       (       d  TS	   TS  R#                  5       (       a  gg! , (       d  f       NN= f)
Nr   rc   Fc                 ó¸   >• U R                   S:H  =(       aD    U R                  [        T5      :H  =(       a%    U R                  T:H  =(       a    U R                  T:H  $ r  )rŽ   r�   rõ   Ú
col_offsetÚend_col_offset)rJ   r:  r[  rZ  s    €€€r$   Ú_spawns_full_lineÚ;StackSummary._should_show_carets.<locals>._spawns_full_lineÉ  sS   ø€ à—L‘L AÑ%÷ ;Ø×(Ñ(¬C°	«NÑ:÷;à×(Ñ(¨LÑ8÷;ð ×,Ñ,°
Ñ:ð	r&   )rJ   r6   r¸   Tr  )r   ÚSyntaxErrorÚImportErrorÚastÚparserv   ÚbodyÚReturnÚCallrD   rJ   rq   ÚNameÚAssignrõ   Útargetsr'  r¼   )
r8   rZ  r[  r:  r;  rl  ÚtreeÚ	statementrJ   rh  s
    ```      r$   rN  Ú StackSummary._should_show_caretsÁ  sS  ú€ Ü”k¤;Õ/ÛØ—9‘9˜TŸY™Y yÓ1Ó2ˆDØ—9—9Ø÷	 0Ð/ð
 Ÿ	™	 !™ˆIØˆE÷ð Ø1�S—Z‘ZÖ1 c§h¡h¦jÐ1Ü! )§/¡/×"6Ñ"6¸¿¹×AÑAØ )§¡™ð 2ð —Z‘ZÖ1 c§h¡h¦jä˜I×-Ñ-Ó.°!Ó3Ü" 9×#4Ñ#4°QÑ#7¸¿¹×BÑBà )§¡™ð 2ð Ñ Ñ%6°u×%=Ñ%=Ø÷3 0×/Ð/ö4 ØØ�Q‰<˜˜Ð&×-Ñ-×/Ñ/°9¸R±=ÀÀÐ3M×3TÑ3T×3VÑ3VØØ÷= 0Õ/ús%   ˜7F*ÁA-F*ÃA	F*Ä&F*Ä:F*Æ*
F8c                 ó@  • UR                  SS5      n/ nSnSnSnSnU  HÈ  nU R                  X‚S9n	U	c  M  Ub3  XHR                  :w  d$  Ub!  XXR                  :w  d  Ub  XhR                  :w  aY  U[
        :”  a)  U[
        -  nUR                  SU SUS:”  a  S	OS
 S35        UR                  nUR                  nUR                  nSnUS-  nU[
        :”  a  M·  UR                  U	5        MÊ     U[
        :”  a)  U[
        -  nUR                  SU SUS:”  a  S	OS
 S35        U$ )aÀ  Format the stack ready for printing.

Returns a list of strings ready for printing.  Each string in the
resulting list corresponds to a single frame from the stack.
Each string ends in a newline; the strings may contain internal
newlines as well, for those items with source text lines.

For long sequences of the same frame and line, the first few
repetitions are shown, followed by a summary line stating the exact
number of further repetitions.
rM   FNr   ©rM   z  [Previous line repeated z
 more timer¸   Úsr   z]
)rQ   rb  r�   rŽ   r’   Ú_RECURSIVE_CUTOFFr¿   )
r8   rR   rM   r  Ú	last_filerY  Ú	last_nameÚcountrU  Úformatted_frames
             r$   r    ÚStackSummary.formatâ  sZ  € ð —:‘:˜j¨%Ó0ˆØˆØˆ	Øˆ	Øˆ	ØˆÛ!ˆMØ"×7Ñ7¸Ð7ÐYˆOØÑ&ÙØÑ! Y×2HÑ2HÓ%HØÑ! Y×2FÑ2FÓ%FØÑ! Y×2DÑ2DÓ%DØÔ,Ó,ØÔ.Ñ.�EØ—M‘MØ4°U°Gð <Ø&+¨a£i™s°RÐ8¸ð=ôð *×2Ñ2�	Ø)×0Ñ0�	Ø)×.Ñ.�	Ø�Ø�Q‰JˆEØÔ(Ó(ÙØ�M‰M˜/Ö*ñ) "ð, Ô$Ó$ØÔ&Ñ&ˆEØ�M‰MØ,¨U¨Gð 4Ø# a›i‘s¨RÐ0°ð5ôð ˆr&   r6   )r;   r<   r=   r>   rÏ   Úclassmethodrƒ   r0   r   rb  rN  r    r?   r6   r&   r$   r   r   ¬  sb   † ÙIàØ+/¸dØ ô+ó ð+ð* ØDHØ¨eô/ó ð/ðb ñó ðò$uònõB.r&   r   c                 ó\   • U R                  S5      n[        US U R                  SSS95      $ )Nzutf-8Úreplace)Úerrors)Úencoderõ   Údecode)Ústrr  Úas_utf8s      r$   rJ  rJ    s2   € Ø�j‰j˜Ó!€GÜˆw�w˜Ð×&Ñ& w°yÐ&ÐAÓBÐBr&   Ú_Anchors)r)  rO  r*  rP  r@  rA  r"  r  )Údefaultsc                 ó&  ^^^^^• SSK n UR                  SU  S35      n[        UR                  5      S:w  a  gU R                  5       mU4S jmU4S jmU4S jmU4S	 jmUUU4S
 jnSUU4S jjnUR                  S   nUUR                  S`=Gbm  u  nU=UR                  S` =bÃ  u     U" UR                  5      u  pxU" XxS 5      u  pxUS-   n	U	[        TU   5      :  a}  UR                  R                  S-
  U:”  d8  U	T" UR                  R                  S-
  UR                  R                  5      :  a(  TU   U	   =n
R                  5       (       d  U
S;  a  U	S-  n	[        XxXy5      $   =UR                  S` =b8  u     U" UR                  5      u  p¼U" X¼S 5      u  p¼U" USS9u  pÙ[        X¼XÙ5      $   UR                   S` =b7  u   U" UR"                  5      u  p¼U" X¼S 5      u  p¼U" USS9u  pÙ[        X¼XÙ5      $    g  g! [         a     gf = f)zù
Given source code `segment` corresponding to a FrameSummary, determine:
    - for binary ops, the location of the binary op
    - for indexing and function calls, the location of the brackets.
`segment` is expected to be a valid Python expression.
r   Nz(
z
)r¸   c                 ó"   >• [        TU    U5      $ )z%Get character index given byte offset)rJ  )rŽ   r  rÀ   s     €r$   Ú	normalizeÚ;_extract_caret_anchors_from_line_segment.<locals>.normalizeL  s   ø€ ä/°°f±¸vÓFÐFr&   c                 óæ   >• U [        T5      :  a<  U[        TU    5      :¼  a*  SnU S-  n U [        T5      :  a  U[        TU    5      :¼  a  M*  U [        T5      :  a  U[        TU    5      :  d   eX4$ )zkGets the next valid character index in `lines`, if
the current location is not valid. Handles empty lines.
r   r¸   )rõ   )rŽ   r2  rÀ   s     €r$   Únext_valid_charÚA_extract_caret_anchors_from_line_segment.<locals>.next_valid_charP  sy   ø€ ð ”s˜5“zÓ! c¬S°°v±Ó-?Ó&?ØˆCØ�a‰KˆFð ”s˜5“zÓ! c¬S°°v±Ó-?Õ&?ð œ˜E›
Ó" s¬S°°v±Ó-?Ó'?Ð?Ð?Øˆ{Ðr&   c                 ó(   >• US-  nT" X5      u  pX4$ )z.Get the next valid character index in `lines`.r¸   r6   ©rŽ   r2  r�  s     €r$   Ú	incrementÚ;_extract_caret_anchors_from_line_segment.<locals>.incrementZ  s    ø€ àˆq‰ˆÙ% fÓ2‰ˆØˆ{Ðr&   c                 ó,   >• SnU S-  n T" X5      u  pX4$ )z6Get the next valid character at least on the next liner   r¸   r6   r’  s     €r$   ÚnextlineÚ:_extract_caret_anchors_from_line_segment.<locals>.nextline`  s%   ø€ àˆØ�!‰ˆÙ% fÓ2‰ˆØˆ{Ðr&   c                 ót   >•  TU    U   nUS;   a  T" X5      u  pOU" U5      (       d  T" X5      u  pO X4$ M7  )zIGet the next valid non-"\#" character that satisfies the `stop` predicateú\#r6   )rŽ   r2  ÚstopÚchr“  rÀ   r–  s       €€€r$   Úincrement_untilÚA_extract_caret_anchors_from_line_segment.<locals>.increment_untilg  sP   ø€ àØ�v‘˜sÑ#ˆBØ�U‹{Ù& vÓ3‘�˜Ù˜"—X‘XÙ'¨Ó4‘�˜àØˆ{Ðñ r&   c                 ój   >• U R                   S-
  nT" X R                  5      nU(       a  T" X#5      $ X#4$ )zÄGet the lineno/col position of the end of `expr`. If `force_valid` is True,
forces the position to be a valid character (e.g. if the position is beyond the
end of the line, move to the next line)
rÝ   )r�   rg  )ÚexprÚforce_validrŽ   r2  r�  rŒ  s       €€r$   Úsetup_positionsÚA_extract_caret_anchors_from_line_segment.<locals>.setup_positionss  s7   ø€ ð —‘ 1Ñ$ˆÙ˜× 3Ñ 3Ó4ˆÞ/:‰˜vÓ+ÐMÀÀÐMr&   r6   c                 óD   • U R                  5       (       + =(       a    U S:g  $ )NÚ)©Úisspacer  s    r$   r  Ú:_extract_caret_anchors_from_line_segment.<locals>.<lambda>‰  s   € ÈQÏYÉYË[Ì×IeÐ]^ÐbeÑ]eÐIer&   rÝ   r™  c                 ó   • U S:H  $ )NÚ[r6   r  s    r$   r  r§  ¤  ó   € Ð]^ÐbeÒ]er&   F)r   c                 ó   • U S:H  $ )NÚ(r6   r  s    r$   r  r§  °  rª  r&   )T)rl  rm  rj  rõ   rn  rI  ÚExprÚBinOpÚleftÚrightrŽ   rf  r¦  rˆ  Ú	SubscriptrJ   rp  rq   )r]  rl  rt  rœ  r¡  ru  rŸ  rŽ   r2  Ú	right_colr›  Úleft_linenoÚleft_colÚright_linenor“  rÀ   r�  r–  rŒ  s                 @@@@@r$   rM  rM  %  s#  ü€ ó ðð* �y‰y˜3˜w˜i sÐ+Ó,ˆô ˆ4�9‰9ƒ~˜ÓØà×ÑÓ €EõGõõõ÷
÷	Nð 	Nð —	‘	˜!‘€IØ
Ø�X‰X�^ˆ^ØØ �S—Y‘Y—[ñ #2°$·)±)Ó"<‘K�Fñ #2°&Ñ?eÓ"f‘K�Fð !$ a¡�Ià!¤C¨¨f©Ó$6Ó6ð !ŸJ™J×-Ñ-°Ñ1°FÓ:Ø%©	°$·*±*×2CÑ2CÀaÑ2GÈÏÉ×I^ÑI^Ó(_Ó_à',¨V¡}°YÑ'?Ð!? × HÑ H× JÑ JØ e›Oà! Q™˜	ô $ F°ÓCÐCð3 !ð4 %�S—]‘]—_ñ -<¸D¿J¹JÓ,GÑ)�KÙ,;¸KÑSeÓ,fÑ)�Ká.=¸dÐPUÑ.VÑ+�LÜ# K¸<ÓSÐSð %ð —X‘X–Zñ -<¸D¿I¹IÓ,FÑ)�KÙ,;¸KÑSeÓ,fÑ)�Ká.=¸dÐPUÑ.VÑ+�LÜ# K¸<ÓSÐSñ  ð ðk ðj øôc ó Ùðús   ‹H È
HÈHÚWFc                 ó†   ^• Uc  [        U 5      nU R                  5       (       a  U$ SSKm[        U4S jU SU  5       5      $ )zºCalculate the extra amount of width space the given source
code segment might take if it were to be displayed on a fixed
width output device. Supports wide unicode characters and emojis.Nr   c              3   ó^   >#   • U  H"  nTR                  U5      [        ;   a  S OSv •  M$     g7f)rÝ   r¸   N)Úeast_asian_widthÚ_WIDE_CHAR_SPECIFIERS)r  r  Úunicodedatas     €r$   r  Ú!_display_width.<locals>.<genexpr>Ç  s0   øé € ð â!ˆDð ×)Ñ)¨$Ó/Ô3HÓH‰ÈaÔOÚ!ùs   ƒ*-)rõ   Úisasciir»  Úsum)rk   r  r»  s     @r$   r(  r(  ¹  sH   ø€ ð
 �~Ü�T“ˆð ‡|�|‡~�~Øˆãäô à˜˜&‘Móó ð r&   c                   ó*   • \ rS rSrS rS rSS jrSrg)Ú_ExceptionPrintContextiÎ  c                 ó>   • [        5       U l        SU l        SU l        g )Nr   F)rø   ÚseenÚexception_group_depthÚ
need_closer7   s    r$   rŸ   Ú_ExceptionPrintContext.__init__Ï  s   € Ü“EˆŒ	Ø%&ˆÔ"Øˆ�r&   c                 ó&   • SSU R                   -  -  $ )Nro   rÝ   )rÃ  r7   s    r$   rH  Ú_ExceptionPrintContext.indentÔ  s   € Ø�a˜$×4Ñ4Ñ4Ñ5Ð5r&   Nc              #   ó  #   • Uc  SnU R                  5       nU R                  (       a  X2S-   -  n[        U[        5      (       a  [        R                   " XS 5      v •  g U H  n[        R                   " XCS 5      v •  M     g 7f)NÚ|ro   c                 ó   • grF  r6   r  s    r$   r  Ú-_ExceptionPrintContext.emit.<locals>.<lambda>ß  ó   € ÀTr&   c                 ó   • grF  r6   r  s    r$   r  rË  â  rÌ  r&   )rH  rÃ  rD   r†  rÇ   )r8   Útext_genÚmargin_charÚ
indent_strÚtexts        r$   ÚemitÚ_ExceptionPrintContext.emit×  sl   é € ØÑØˆKØ—[‘[“]ˆ
Ø×%×%Ø¨Ñ+Ñ+ˆJä�h¤×$Ñ$Ü—/’/ (Ñ8IÓJÓJã �Ü—o’o dÑ8IÓJÔJò !ùs   ‚BB)rÃ  rÄ  rÂ  r¢   )r;   r<   r=   r>   rŸ   rH  rÒ  r?   r6   r&   r$   rÀ  rÀ  Î  s   † ò ò
6÷Kr&   rÀ  c            	       ó¬   • \ rS rSrSrSSSSSSSSS.S	 jr\S
 5       r\S 5       r	\S 5       r
S rS rS rSSS.S jrS rSSS.S jrSSS.S jrSrg)r   iå  aR  An exception ready for rendering.

The traceback module captures enough attributes from the original exception
to this intermediary form to ensure that no references are held, while
still being able to fully print or format it.

max_group_width and max_group_depth control the formatting of exception
groups. The depth refers to the nesting level of the group, and the width
refers to the size of a single exception group's exceptions array. The
formatted output is truncated when either limit is exceeded.

Use `from_exception` to create TracebackException instances from exception
objects, or the constructor to create TracebackException instances from
individual components.

- :attr:`__cause__` A TracebackException of the original *__cause__*.
- :attr:`__context__` A TracebackException of the original *__context__*.
- :attr:`exceptions` For exception groups - a list of TracebackException
  instances for the nested *exceptions*.  ``None`` for other exceptions.
- :attr:`__suppress_context__` The *__suppress_context__* value from the
  original exception.
- :attr:`stack` A `StackSummary` representing the traceback.
- :attr:`exc_type` (deprecated) The class of the original traceback.
- :attr:`exc_type_str` String display of exc_type
- :attr:`filename` For syntax errors - the filename where the error
  occurred.
- :attr:`lineno` For syntax errors - the linenumber where the error
  occurred.
- :attr:`end_lineno` For syntax errors - the end linenumber where the error
  occurred. Can be `None` if not present.
- :attr:`text` For syntax errors - the text where the error
  occurred.
- :attr:`offset` For syntax errors - the offset into the text where the
  error occurred.
- :attr:`end_offset` For syntax errors - the end offset into the text where
  the error occurred. Can be `None` if not present.
- :attr:`msg` For syntax errors - the compiler error message.
NTFé   é
   )r*   rè   ré   rO   Úmax_group_widthÚmax_group_depthÚsave_exc_typeÚ_seenc                ó  • US LnUc
  [        5       nUR                  [        U5      5        X€l        X�l        [
        R                  [        U5      XEUS9U l        U
(       a  UOS U l	        [        US5      U l         [        USS 5      U l        SU l        US LU l        Ub#  UR$                  U l        UR(                  U l        OS U l        S U l        U(       aµ  [-        U[.        5      (       a   UR0                  U l        UR2                  nUb  [5        U5      OS U l        UR6                  nUb  [5        U5      OS U l        UR8                  U l        UR:                  U l        UR<                  U l        UR>                  U l        SU l        GO@U(       a]  [-        U[@        5      (       aH  [        USS 5      b:  [        USS 5      n[C        X#U5      nU(       a  U =R                  SU S	3-  sl        OÜU(       aÕ  [-        U[D        [F        45      (       aº  [        US
S 5      b¬  [        US
S 5      n[C        X#U5      nU(       a  U =R                  SU S	3-  sl        [-        U[D        5      (       a^  [        US
S 5      nUbN  U[H        RJ                  ;   a:  U(       a  U =R                  SU S	3-  sl        OU =R                  SU S	3-  sl        U(       a  U RM                  5         Ub  URN                  OSU l'        U(       GdK  X4/nU(       Ga>  URQ                  5       u  nnUbi  URR                  b\  [        URR                  5      U;  aC  [U        [W        URR                  5      URR                  URR                  RX                  UUUUU	US9	nOS nU(       a(  US L =(       a    US L=(       a    URN                  (       + nOSnUbp  URZ                  bc  U(       a\  [        URZ                  5      U;  aC  [U        [W        URZ                  5      URZ                  URZ                  RX                  UUUUU	US9	nOS nUb`  []        U[^        5      (       aK  / nUR`                   H8  n[U        [W        U5      UURX                  UUUUU	US9	nURc                  U5        M:     OS nUUl)        UUl-        UUl0        U(       a'  URc                  URR                  URR                  45        U(       a'  URc                  URZ                  URZ                  45        U(       a/  URe                  [g        UR`                  UR`                  5      5        U(       a  GM=  g g g ! [         a%  nS[        US[        5       3/U l         S nAGNëS nAff = f)Nrç   rb   Ú	__notes__z!Ignored error getting __notes__: FTÚ	name_fromz. Did you mean: 'z'?r’   z Or did you forget to import 'z. Did you forget to import ')r*   rè   ré   r×  rØ  rÚ  )4rø   rû   Úidr×  rØ  r   r0   r1   r…   Ú	_exc_typerd   Ú_strrô   rÜ  rL  rœ   Ú_is_syntax_errorÚ_have_exc_typer=   Úexc_type_qualnamer<   Úexc_type_moduleÚ
issubclassrj  r�   rŽ   r†  r�   rÑ  r  r[  Úmsgrk  Ú_compute_suggestion_errorÚ	NameErrorÚAttributeErrorr   Ústdlib_module_namesÚ_load_linesÚ__suppress_context__ÚpopÚ	__cause__r   rH   rF   Ú__context__rD   ÚBaseExceptionGroupÚ
exceptionsr¿   ÚextendÚzip)r8   Úexc_typeÚ	exc_valueÚexc_tracebackr*   rè   ré   rO   r×  rØ  rÙ  rÚ  Úis_recursive_callÚeÚlnoÚend_lnoÚ
wrong_nameÚ
suggestionÚqueuerS   ÚcauseÚneed_contextÚcontextrñ  rI   Útexcs                             r$   rŸ   ÚTracebackException.__init__  sÎ  € ð "¨Ð-ÐØ‰=Ü“EˆEØ�	‰	”"�Y“-Ô à.ÔØ.Ôä!×BÑBÜ(¨Ó7ØØ)ð Cð +ˆŒ
ö
 &3™¸ˆŒô ! ¨KÓ8ˆŒ	ð	ZÜ$ Y°¸TÓBˆDŒNð
 !&ˆÔØ&¨dÐ2ˆÔØÑØ%-×%:Ñ%:ˆDÔ"Ø#+×#6Ñ#6ˆDÕ à%)ˆDÔ"Ø#'ˆDÔ æœ
 8¬[×9Ñ9à%×.Ñ.ˆDŒMØ×"Ñ"ˆCØ&)¡oœ#˜cœ(¸4ˆDŒKØ×*Ñ*ˆGØ.5Ñ.Aœc 'œlÀtˆDŒOØ!Ÿ™ˆDŒIØ#×*Ñ*ˆDŒKØ'×2Ñ2ˆDŒOØ —}‘}ˆDŒHØ$(ˆDÖ!Þœ* X¬{×;Ñ;Ü˜	 ;°Ó5ÑAÜ  ¨K¸Ó>ˆJÜ2°9ÈZÓXˆJÞØ—	’	Ð0°°¸BÐ?Ñ?•	øÞœ* X´	¼>Ð/J×KÑKÜ˜	 6¨4Ó0Ñ<Ü  ¨F°DÓ9ˆJÜ2°9ÈZÓXˆJÞØ—	’	Ð0°°¸BÐ?Ñ?•	Ü˜(¤I×.Ñ.Ü$ Y°¸Ó=�
ØÑ)¨j¼C×<SÑ<SÓ.SÞ!ØŸ	š	Ð'EÀjÀ\ÐQSÐ%TÑTž	àŸ	š	Ð'CÀJÀ<ÈrÐ%RÑR�	ÞØ×ÑÔà.7Ñ.CˆI×*Ò*Èð 	Ô!÷
 !ØÐ&Ð'ˆEßØŸ	™	›‘��AØ‘M a§k¡kÑ&=Ü˜1Ÿ;™;›¨uÓ4Ü.Ü˜QŸ[™[Ó)ØŸ™ØŸ™×1Ñ1Ø#Ø%1Ø'5Ø(7Ø(7Ø#ñ	%‘Eð !�EæØ$)¨T M÷ %?Ø$%¨T M÷%?à()×(>Ñ(>Ô$>ñ !ð $(�LØ‘M a§m¡mÑ&?Þ$¬¨A¯M©MÓ):À%Ó)GÜ0Ü˜QŸ]™]Ó+ØŸ™ØŸ™×3Ñ3Ø#Ø%1Ø'5Ø(7Ø(7Ø#ñ	%‘Gð #�Gà‘=¤Z°Ô3E×%FÑ%FØ!#�JØ Ÿ|œ|˜Ü1Ü  ›IØØ×-Ñ-Ø"'Ø)5Ø+9Ø,;Ø,;Ø"'ñ	 )˜ð #×)Ñ)¨$Ö/ò  ,ð "&�Jà$�”Ø!(�”Ø *�”ÞØ—L‘L "§,¡,°·±Ð!<Ô=ÞØ—L‘L "§.¡.°!·-±-Ð!@ÔAÞØ—L‘L¤ R§]¡]°A·L±LÓ!AÔB÷ “%ð !øôg ó 	Zà3´LÀÀKÔQUÓ4VÐ3WÐXðZˆD�NŠNûð	Zús   Á=U Õ
U?ÕU:Õ:U?c                 óB   • U " [        U5      XR                  /UQ70 UD6$ )z.Create a TracebackException from an exception.)rH   rF   )ÚclsrI   ÚargsrR   s       r$   Úfrom_exceptionÚ!TracebackException.from_exceptionž  s%   € ñ ”4˜“9˜c×#4Ñ#4ÐF°tÒF¸vÑFÐFr&   c                 óN   • [         R                  " S[        SS9  U R                  $ )Nz-Deprecated in 3.13. Use exc_type_str instead.rÝ   )Ú
stacklevel)ÚwarningsÚwarnÚDeprecationWarningrß  r7   s    r$   rô  ÚTracebackException.exc_type£  s    € ä�ŠÐEÜ(°Qò	8à�~‰~Ðr&   c                 ó¤   • U R                   (       d  g U R                  nU R                  nUS;  a  [        U[        5      (       d  SnUS-   U-   nU$ )N)Ú__main__Úbuiltinsz	<unknown>Ú.)râ  rã  rä  rD   r†  )r8   ÚstypeÚsmods      r$   Úexc_type_strÚTracebackException.exc_type_str©  sR   € à×"×"ØØ×&Ñ&ˆØ×#Ñ#ˆØÐ/Ó/Ü˜d¤C×(Ñ(Ø"�Ø˜3‘J Ñ&ˆEØˆr&   c                 óB   • U R                    H  nUR                    M     g)z7Private API. force all lines in the stack to be loaded.N)r…   rk   )r8   r  s     r$   rë  ÚTracebackException._load_linesµ  s   € à—Z”ZˆEØ�JŒJò  r&   c                 ój   • [        U[        5      (       a  U R                  UR                  :H  $ [        $ r¢   )rD   r   Ú__dict__r¤   r¥   s     r$   r§   ÚTracebackException.__eq__º  s)   € Ü�eÔ/×0Ñ0Ø—=‘= E§N¡NÑ2Ð2ÜÐr&   c                 ó   • U R                   $ r¢   )rà  r7   s    r$   Ú__str__ÚTracebackException.__str__¿  s   € Ø�y‰yÐr&   r   )r]   Ú_depthc          	   +   ón  #   • UR                  SS5      nSU-  S-  nU R                  (       d  U[        SU R                  US9-   v •  gU R                  nU R
                  (       db  US:”  aE  [        X`R                  SUS9R                  S	5      nU Vs/ s H
  nXX-   S	-   PM     sn Sh  v•N   OA[        X`R                  US9v •  O*U R                  XdS9 Vs/ s H  o…U-   PM	     sn Sh  v•N   [        U R                  [        R                  R                  5      (       at  [        U R                  [        [        45      (       dO  U R                   H>  n	[        U	S
5      n	U	R                  S	5       Vs/ s H
  o…U-   S	-   PM     sn Sh  v•N   M@     O:U R                  b-  USR!                  [        U R                  S["        S95      -   v •  U R$                  (       a7  U(       a/  U R$                   H  n
U
R'                  XS-   US9 Sh  v•N   M      gggs  snf  GNvs  snf  GN<s  snf  N¡ N"7f)am  Format the exception part of the traceback.

The return value is a generator of strings, each ending in a newline.

Generator yields the exception message.
For :exc:`SyntaxError` exceptions, it
also yields (before the exception message)
several lines that (when printed)
display detailed information about where the syntax error occurred.
Following the message, generator also yields
all the exception's ``__notes__``.

When *show_group* is ``True``, and the exception is an instance of
:exc:`BaseExceptionGroup`, the nested exceptions are included as
well, recursively, with indentation relative to their nesting depth.
rM   Frå   ro   Nrx  r   r_   rc   Únotez{}
rÜ  rš   r¸   )r]   r  rM   )rQ   râ  rl   rà  r  rá  ÚsplitÚ_format_syntax_errorrD   rÜ  rö   ÚabcÚSequencer†  Úbytesrd   r    rœ   rñ  r   )r8   r]   r  rR   rM   rH  r  Ú	formattedÚlr   Úexs              r$   r   Ú(TracebackException.format_exception_onlyÂ  sõ  é € ð" —:‘:˜j¨%Ó0ˆà�V‘˜cÑ!ˆØ×"×"ØÔ1°$¸¿	¹	ÈHÑUÑUÒUØà×!Ñ!ˆØ×$×$Ø˜‹zä2ØŸ9™9¸5È8ñç‘%˜“+ð ñ
 'óâ&˜ð ‘J Ô%Ù&ñ÷ ñ ô
 -¨U·I±IÈÑQÓQà,0×,EÑ,EÀeÐ,EÑ,_Ó`Ò,_ q œ
Ñ,_Ñ`×`Ð`ô �t—~‘~¤{§¡×'?Ñ'?×@Ñ@Ü˜tŸ~™~´´U¨|×<Ñ<àŸœ�Ü# D¨&Ó1�Ø7;·z±zÀ$Ô7GÓHÒ7G°! Q™J¨Ô-Ñ7GÑH×HÒHò 'ð �^‰^Ñ'Ø˜6Ÿ=™=¬°d·n±nÀkÔX\Ñ)]Ó^Ñ^Ò^à�?�?žzØ—o”o�Ø×3Ñ3¸zÐYZÑRZÐemÐ3Ðn×nÒnò &ð  *ˆ?ùò'ò ùò aÒ`ùò IÑHñ oùsn   ‚BH5ÂHÂ%H5Â+H!Â,-H5ÃH$Ã'H5Ã-H)Ã.B
H5Å8H,Æ	H5ÆH1ÆB H5ÈH3ÈH5È$H5È,H5È3H5c           	   +   ó°  #   • UR                  SS5      nSnU R                  b§  U(       an  SR                  [        R                  U R
                  =(       d    S[        R                  [        R                  U R                  [        R                  5      v •  OZSR                  U R
                  =(       d    SU R                  5      v •  O(U R
                  b  SR                  U R
                  5      nU R                  n[        U[        5      (       Ga=  UR                  S	5      nUR                  S
5      n[        U5      [        U5      -
  nU R                  c  SR                  U5      v •  GOâ[        U R                  [        5      (       GaÂ  U R                  n	U R                  U R                  :X  a>  [        U R                   [        5      (       a  U R                   S:w  a  U R                   OU	n
O[        U5      S-   n
U R                  (       a'  U	[        U R                  5      :”  a  [        U5      S-   n	U R                  (       a'  U
[        U R                  5      :”  a  [        U5      S-   n
Xš:¼  d  U
S:  a  U	S-   n
U	S-
  U-
  nU
S-
  U-
  nSnUS:¼  a¥  S USU  5       nS=pïU(       aQ  USU [        R"                  -   X{U -   [        R                  -   X|S -   n[        R"                  n[        R                  nSR                  U5      v •  SR                  SR%                  U5      USXË-
  -  U5      v •  OSR                  U5      v •  U R&                  =(       d    SnU(       aR  SR                  [        R(                  U[        R                  [        R                  U[        R                  U5      v •  gSR                  UUU5      v •  g7f)z0Format SyntaxError exceptions (internal helper).rM   Fr   Nz  File {}"{}"{}, line {}{}{}
z<string>z  File "{}", line {}
z ({})rc   z 
z    {}
r   r¸   ro   c              3   óR   #   • U  H  oR                  5       (       a  UOS v •  M     g7f)ro   Nr¥  )r  Úcs     r$   r  Ú:TracebackException._format_syntax_error.<locals>.<genexpr>2  s   é € Ð!UÂ}À!¯	©	¯©¡1¸Ô#<Â}ùs   ‚%'z    {}{}{}{}
r  z<no detail available>z{}{}{}: {}{}{}{}
z	{}: {}{}
)rQ   rŽ   r    r   rg   r�   rf   rÑ  rD   r†  r¼   r'  rõ   r  Úintr�   r[  r-  rv   ræ  re   )r8   r  rR   rM   Úfilename_suffixrÑ  ÚrtextÚltextÚspacesr  r[  r�   r‘   Ú
caretspaceÚstart_colorÚ	end_colorræ  s                    r$   r"  Ú'TracebackException._format_syntax_errorø  s?  é € ð —:‘:˜j¨%Ó0ˆØˆØ�;‰;Ñ"ÞØ6×=Ñ=Ü×&Ñ&Ø—M‘M×/ ZÜ×$Ñ$Ü×&Ñ&Ø—K‘KÜ×$Ñ$óó ð /×5Ñ5Ø—M‘M×/ Z°·±ó>ó >à�]‰]Ñ&Ø%Ÿn™n¨T¯]©]Ó;ˆOà�y‰yˆÜ�dœC× Ò ð —K‘K Ó%ˆEØ—L‘L Ó)ˆEÜ˜“Z¤# e£*Ñ,ˆFØ�{‰{Ñ"Ø ×'Ñ'¨Ó.Ô.Ü˜DŸK™K¬×-Ò-ØŸ™�Ø—;‘; $§/¡/Ó1ô ' t§¡¼×<Ñ<Ø $§¡°1Ó 4ð Ÿšð
 $ñ ô "% U£¨a¡�Jà—9—9 ¬#¨d¯i©i«.Ó!8Ü  ›Z¨!™^�FØ—9—9 ¬c°$·)±)«nÓ!<Ü!$ U£¨a¡�JØÓ'¨:¸«>Ø!'¨!¡�Jð  ™
 VÑ+�Ø&¨™N¨VÑ3�	Ø �
Ø˜A“:á!UÀuÈVÈeÁ}Ó!U�JØ.0Ð0�KÞð " & 5˜MÜ&×/Ñ/ñ0Ø27¸iÐ2HñIÜKU×K[ÑK[ñ\à! *Ð-ñ.ð ô
 '1×&9Ñ&9˜Ü$.×$4Ñ$4˜	Ø$×+Ñ+¨EÓ2Ò2Ø*×1Ñ1ØŸ™ 
Ó+Ø#Ø 	Ñ 1Ñ2Ø!ó	ó ð %×+Ñ+¨EÓ2Ò2Ø�h‰h×1Ð1ˆÞØ&×-Ñ-Ü×'Ñ'ØÜ× Ñ Ü×"Ñ"ØÜ× Ñ Øó!ó !ð ×%Ñ% e¨S°/ÓBÓBùs   ‚OO)rP   Ú_ctxc          	   +   óZ  #   • UR                  SS5      nUc
  [        5       n/ nU nU(       az  U(       ar  UR                  b  [        nUR                  nO5UR                  b$  UR
                  (       d  [        nUR                  nOSnSnUR                  Xv45        UnU(       a  Mr  OUR                  SU45        [        U5       GHD  u  p–U	b  UR                  U	5       Sh  v•N   UR                  c‚  UR                  (       aI  UR                  S5       Sh  v•N   UR                  UR                  R                  US95       Sh  v•N   UR                  UR                  US95       Sh  v•N   M±  UR                  U R                  :”  a)  UR                  SU R                   S35       Sh  v•N   Mô  UR                  S:H  n
U
(       a  U=R                  S	-  sl        UR                  (       aQ  UR                  S
U
(       a  SOSS9 Sh  v•N   UR                  UR                  R                  US95       Sh  v•N   UR                  UR                  US95       Sh  v•N   [!        UR                  5      nX°R"                  ::  a  UnOU R"                  S	-   nSUl        ['        U5       GH-  nXÜS	-
  :H  nU(       a  SUl        U R"                  b  XÐR"                  :¬  nOSnU(       d  US	-    OSnUR)                  5       US:X  a  SOS-   SU S3-   v •  U=R                  S	-  sl        U(       d&  UR                  U   R                  XUS9 Sh  v•N   O8X°R"                  -
  nUS	:”  a  SOSnUR                  SU SU S35       Sh  v•N   U(       a-  UR$                  (       a  UR)                  5       S-   v •  SUl        U=R                  S	-  sl        GM0     U
(       d  GM+  UR                  S	:X  d   eSUl        GMG     g GN- GNù GNÌ GN© GNi GN GNà GN½ NÌ N•7f)a„  Format the exception.

If chain is not *True*, *__cause__* and *__context__* will not be formatted.

The return value is a generator of strings, each ending in a newline and
some containing internal newlines. `print_exception` is a wrapper around
this method which just prints the lines to a file.

The message indicating which exception occurred is always the last
string in the output.
rM   FNz#Traceback (most recent call last):
rx  z... (max_group_depth is z)
r   r¸   z3Exception Group Traceback (most recent call last):
Ú+)rÏ  Tz...z+-z  z+---------------- z ----------------
)rP   r7  rM   ry  r   zand z more exceptionrc   z&+------------------------------------
)rQ   rÀ  rî  Ú_cause_messagerï  rì  Ú_context_messager¿   ÚreversedrÒ  rñ  r…   r    r   rÃ  rØ  rõ   r×  rÄ  r¹   rH  )r8   rP   r7  rR   rM   ÚoutputrI   Úchained_msgÚchained_excræ  Úis_toplevelÚnum_excsÚnr`  rx   Ú	truncatedÚtitleÚ	remainingÚplurals                      r$   r    ÚTracebackException.formatS  sÙ  é € ð —:‘:˜j¨%Ó0ˆØ‰<Ü)Ó+ˆDàˆØˆÞÞØ—=‘=Ñ,Ü"0�KØ"%§-¡-‘KØ—o‘oÑ2Ø×2×2Ü"2�KØ"%§/¡/‘Kà"&�KØ"&�Kà—‘˜{Ð0Ô1Ø!�÷ �#øð �M‰M˜4 ˜+Ô&ä  ×(‰HˆCØ‰ØŸ9™9 S›>×)Ð)Ø�~‰~Ñ%Ø—9—9Ø#Ÿy™yÐ)OÓP×PÐPØ#Ÿy™y¨¯©×)9Ñ)9À8Ð)9Ð)LÓM×MÐMØŸ9™9 S×%>Ñ%>ÈÐ%>Ð%QÓR×RÒRØ×+Ñ+¨d×.BÑ.BÓBàŸ9™9Ø.¨t×/CÑ/CÐ.DÀCÐHóJ÷ Jò Jð  $×9Ñ9¸QÑ>�ÞØ×.Ò.°!Ñ3Õ.à—9—9Ø#Ÿy™yØNÞ-8¡c¸dð  )ð  D÷ Dð Dð  $Ÿy™y¨¯©×)9Ñ)9À8Ð)9Ð)LÓM×MÐMàŸ9™9 S×%>Ñ%>ÈÐ%>Ð%QÓR×RÐRÜ˜sŸ~™~Ó.�Ø×3Ñ3Ó3Ø ‘Aà×,Ñ,¨qÑ0�AØ"'�”Ü˜qŸ�AØ ! q¡S¡�HÞà*.˜œà×+Ñ+Ñ7Ø%&×*>Ñ*>Ñ%>™	à$)˜	Þ,5˜q ™s™e¸5�EØŸ;™;›=Ø$% q£D™D¨dñ4à/°¨wÐ6IÐJñKò Lð ×.Ò.°!Ñ3Õ.Þ$Ø#&§>¡>°!Ñ#4×#;Ñ#;À%Ð]eÐ#;Ð#f×fÑfà$,×/CÑ/CÑ$C˜	Ø(1°A«¡¸2˜Ø#'§9¡9Ø" 9 +¨_¸V¸HÀBÐGó$I÷ Ið Iö   D§O§OØ#Ÿ{™{›}ØHñ Iò Jà*/˜œØ×.Ò.°!Ñ3×.Ð.ñ7 "÷: ‘;Ø×5Ñ5¸Ó:Ð:Ð:Ø12�D×.ò} )â)ò QÚMÚRòJòDò NâRñ. gñIùsÄ   ‚B"P+Â&<P+Ã"PÃ#6P+ÄPÄ/P+Å	PÅ
%P+Å/PÅ0AP+Æ2PÆ3AP+ÈPÈ/P+ÉP!É%P+É'P$É(C2P+ÍP'Í8P+ÎP)ÎAP+Ï0 P+ÐP+ÐP+ÐP+ÐP+ÐP+Ð!P+Ð$P+Ð'P+Ð)P+)r   rP   c                óŽ   • UR                  SS5      nUc  [        R                  nU R                  X$S9 H  n[	        XQSS9  M     g)z7Print the result of self.format(chain=chain) to 'file'.rM   FNr[   r   r   )rQ   r   r   r    r!   )r8   r   rP   rR   rM   rk   s         r$   r!   ÚTracebackException.print¸  s@   € à—:‘:˜j¨%Ó0ˆØ‰<Ü—:‘:ˆDØ—K‘K e�KÓ?ˆDÜ�$ rÔ*ò @r&   )rÜ  rì  rß  râ  rá  rà  r�   r[  rä  rã  r�   rŽ   rØ  r×  ræ  r  r…   rÑ  )r;   r<   r=   r>   rÏ   rŸ   r€  r  rÑ   rô  r  rë  r§   r  r   r"  r    r!   r?   r6   r&   r$   r   r   å  s©   † ñ%ðN EIØ¨e¸UØ°À$ÈdõOCðb ñGó ðGð ñó ðð
 ñ	ó ð	òò
ò
ð 38Àõ 4oòlYCðv #¨õ b3ðJ !¨÷ +ð +r&   r   iî  é(   rÝ   r¸   c                 ój   • X:X  a  gU R                  5       UR                  5       :X  a  [        $ [        $ )Nr   )ÚlowerÚ
_CASE_COSTÚ
_MOVE_COST)Úch_aÚch_bs     r$   Ú_substitution_costrQ  Ç  s*   € Øƒ|ØØ‡z�zƒ|�t—z‘z“|Ó#ÜÐÜÐr&   c           	      óF  • Ub  [        U[        5      (       d  g [        U [        5      (       aÛ  U R                  n  [	        U5      n[        U Vs/ s H  n[        U[        5      (       d  M  UPM     sn5      nUS S S:g  nU(       a[  UbX  UR                  b  UR                  nUR                  b  M  UR                  nSUR                  ;   a  UR                  S   UL a  SnU(       a  U Vs/ s H  oUS S S:w  d  M  UPM     nnGO€[        U [        5      (       a{   [!        U R"                  5      n [	        U5      n[        U Vs/ s H  n[        U[        5      (       d  M  UPM     sn5      nUS S S:w  a  U Vs/ s H  oUS S S:w  d  M  UPM     nnOð[        U [$        5      (       d   eUc  g UR                  b  UR                  nUR                  b  M  UR                  n[        UR                  5      [        UR&                  5      -   [        UR(                  5      -   nU Vs/ s H  n[        U[        5      (       d  M  UPM     nnSUR                  ;   a'  UR                  S   n	 [+        X’5      n
U
(       a  SU 3$  SS KnUR/                  XB5      $ ! [
         aU    [        UR                  R                  R                  5       5      [        UR                  R                  5       5      -   n GN¶f = fs  snf s  snf ! [         a     g f = f! [
         a'    [        UR                  R                  5       5      n GNf = fs  snf s  snf ! [         a     g f = fs  snf ! [         a    Sn
 GN f = f! [         a     Of = f[1        U5      [2        :”  a  g [1        U5      nU[4        :”  a  g UnS nU H[  nXò:X  a  M
  [1        U5      U-   S-   [6        -  S-  n[9        UUS-
  5      n[;        X/U5      nUU:”  a  MH  U(       a  UU:  d  MW  UnUnM]     U$ )	Nr¸   r  r8   Fzself.r   rå   é   )rD   r†  ré  ÚobjÚdirrG   r\   Ú	__class__r  ÚkeysrS  rŠ   r‡   rþ   rL  rk  Ú
__import__r’   rè  rý   Ú
f_builtinsrz   Ú_suggestionsÚ_generate_suggestionsrõ   Ú_MAX_CANDIDATE_ITEMSÚ_MAX_STRING_SIZErN  ÚminÚ_levenshtein_distance)rõ  r,   rû  rT  Údr  Úhide_underscoredr  Úmodr8   Úhas_wrong_namerZ  Úwrong_name_lenÚbest_distancerü  Úpossible_nameÚmax_distanceÚcurrent_distances                     r$   rç  rç  Ï  sÑ  € ØÑ¤¨J¼×!<Ñ!<ØÜ�)œ^×,Ñ,Ø�m‰mˆð	ðTÜ˜“H�ô ¡1Ó;¢1˜a¬
°1´c×(:Ÿ¡1Ñ;Ó<ˆAØ *¨2¨A °#Ñ 5ÐÞ B¡NØ—j‘jÑ,ØŸ™�Bð —j‘jÓ,àŸ™�Ø˜UŸ^™^Ó+°·±¸vÑ0FÈ#Ò0MØ',Ð$ÞÙ !Ó2¢˜1 r¨ U¨c¡\—Q¡�Ð2ùô 
�Iœ{×	+Ñ	+ð
	Ü˜YŸ^™^Ó,ˆCð.Ü˜“H�ô ¡1Ó;¢1˜a¬
°1´c×(:Ÿ¡1Ñ;Ó<ˆAØ˜"˜1ˆ~ Ó$Ù !Ó2¢˜1 r¨ U¨c¡\—Q¡�Ð2øô ˜)¤Y×/Ñ/Ð/Ð/à‰:ØØ�j‰jÑ$Ø—‘ˆBð �j‰jÓ$à—‘ˆä�—‘Ó Ü�5—?‘?Ó#ñ$ä�5×#Ñ#Ó$ñ%ð 	
ñ
 Ó0š�1œZ¨¬3×/�Q™ˆÐ0ð �U—^‘^Ó#Ø—>‘> &Ñ)ˆDð'Ü!(¨Ó!:�ö Ø˜z˜lÐ+Ð+ðAÛð ×1Ñ1°!Ó@Ð@øôs ó TÜ˜Ÿ™×/Ñ/×4Ñ4Ó6Ó7¼$¸s¿|¹|×?PÑ?PÓ?RÓ:SÑS“ðTüâ;ùò 3øÜó 	Ùð	ûô ó .Ü˜Ÿ™×*Ñ*Ó,Ó-“ð.üâ;ùâ2øÜó 	Ùð	üò 1øô ó 'Ø!&“ð'ûô ó Ùðúô ˆ1ƒvÔ$Ó$ØÜ˜“_€NØÔ(Ó(ØØ"€MØ€JÛˆØÓ&áä˜MÓ*¨^Ñ;¸aÑ?Ä:ÑMÐQRÑRˆä˜<¨¸Ñ):Ó;ˆÜ0°ÈLÓYÐØ˜lÓ*ÙÞÐ-°Õ=Ø&ˆJØ,ŠMñ ð Ðsä   ½J  Á	L ÁLÁ.LÁ4?L Â5;L Ã0LÄ LÄL Ä M Ä6L Å	M Å
MÅ'MÅ-M ÆMÆMÆM È.M*ÉM*É3M/ ÊN Ê AK?Ë;L Ë>K?Ë?L Ì
LÌLÌ-MÍ	M ÍMÍM Í
M'Í&M'Í/M?Í>M?Î
NÎNc           	      óš  • X:X  a  gSnXS  (       a6  XS  (       a-  X   X   :X  a#  US-  nXS  (       a  XS  (       a  X   X   :X  a  M#  XS  n XS  nSnU S U=(       d    S  (       a`  US U=(       d    S  (       aM  XS-
     XS-
     :X  a=  US-  nU S U=(       d    S  (       a%  US U=(       d    S  (       a  XS-
     XS-
     :X  a  M=  U S U=(       d    S  n US U=(       d    S  nU (       a  U(       d  [         [        U 5      [        U5      -   -  $ [        U 5      [        :”  d  [        U5      [        :”  a  US-   $ [        U5      [        U 5      :  a  Xp[        U5      [        U 5      -
  [         -  U:”  a  US-   $ [        [	        [         [         [        U 5      S-   -  [         5      5      nSn[	        [        U5      5       H‡  nX   nU[         -  =p–[
        R                  n
[	        [        U 5      5       HB  nU	[        X€U   5      -   nX[   n	[        Xi5      [         -   n[        XÜ5      nXeU'   Xj:  d  M@  Un
MD     X¢:”  d  M‚  US-   s  $    U$ r×   )	rN  rõ   r]  r\   r¹   r   ÚmaxsizerQ  r^  )ÚaÚbÚmax_costÚpreÚpostrV  r  ÚbindexÚbcharÚdistanceÚminimumÚindexÚ
substituteÚinsert_deletes                 r$   r_  r_  ,  s1  € ð 	ƒvØð €CØ
ˆDŽ'�a˜–g !¡&¨A©FÓ"2Øˆq‰ˆð ˆDŽ'�a˜–g !¡&¨A©FÕ"2à	ˆ$ˆ€AØ	ˆ$ˆ€AØ€DØ
ˆMˆT�\�TÖ
˜q  $§,¨$Ö/°A¸1±f±IÀÈÁ6ÁÓ4JØ�‰	ˆð ˆMˆT�\�TÖ
˜q  $§,¨$Ö/°A¸1±f±IÀÈÁ6ÁÕ4Jà	ˆ-ˆ4�<�4Ð€AØ	ˆ-ˆ4�<�4Ð€AÞ–AÜœS ›V¤c¨!£f™_Ñ-Ð-Ü
ˆ1ƒvÔ Ó ¤C¨£FÔ-=Ó$=Ø˜!‰|Ðô ˆ1ƒv”�A“ƒØˆ1ô 	ˆA‹”�Q“‰œ:Ñ%¨Ó0Ø˜!‰|Ðô
 Œu”Z¤¬s°1«v¸©zÑ!:¼JÓGÓ
H€Cà€FÜœ˜A›–-ˆØ‘	ˆØ"¤ZÑ/Ð/ˆÜ—+‘+ˆÜœ3˜q›6–]ˆEà!Ô$6°uÀ¹hÓ$GÑGˆJà‘zˆHô   Ó1´JÑ>ˆMÜ˜Ó3ˆFð  �‰JØÕØ ’ñ #ð Õà˜a‘<Òñ)  ð* €Mr&   r¢   rA   )NNTrF  )NNN)>rÏ   Úcollections.abcrö   rà   rº   r   rÇ   r
  Ú
contextlibr   rV   r   Ú__all__r%   r	   r   r   r   r:  r;  r3   rB   rK   r   ÚobjectrX   rY   r   r   rl   r†  rd   r   r   r   r   r
   r   r   r   r   r   r1   rØ   rz  r\   r   rJ  Ú
namedtuplerˆ  rM  rº  r(  rÀ  r   r\  r]  rN  rM  rQ  rç  r_  r6   r&   r$   Ú<module>r|     s¬  ðÙ Fã Û Û Û 
Û Û Ý Û Ý  ò$€ô'ò;ô$7ô0ô7ð*&ð ð
&ð ÷
ñ ñ ‹K€	òð #,°	ÀØ Tô8ñ$ !›(Ð ò]ð $-°À$Øô;ð  )2ð TÀö Tð0 BFÐPUõ ð  $'ô 4ôJôPô	=ô 	9ô6ôò ÷e6ñ e6òP
òòòOð Ð ôd�4ô dòNCð
 ×!Ò!Øòð �3ˆZñ€òPðd Ð ô÷*Kñ K÷.Y+ñ Y+ðx Ð ØÐ Ø€
Ø€
òòZóz:r&   