ó
    Ð]jÐ  ã            	       ó  • S SK r S SKrS SKJr  S SKJr  S SKJrJr  Sr	 " S S\5      r
SS\S	\S
S4S jjr SS\\\4   S\S\S
\4S jjrS
\
4S jr " S S\5      r\ " S S\5      5       rS
\4S jrSS\S
\4S jjrg)é    N)Úliteral_eval)Útotal_ordering)Ú
NamedTupleÚUnion)ÚÚÚÚÚô   Â…u   â€¨u   â€©c                   ó4   • \ rS rSr% \\S'   \\S'   \\S'   Srg)ÚVersioné   ÚmajorÚminorÚmicro© N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__ÚintÚ__annotations__Ú__static_attributes__r   ó    ÚH/home/mande/repo/quber/.venv/lib/python3.13/site-packages/parso/utils.pyr   r      s   ‡ ØƒJØƒJØ†Jr   r   ÚstringÚkeependsÚreturnz	list[str]c                 óì  • U(       aµ  U R                  S5      n/ n[        U5       H(  u  pE US   nU[        ;   a  UR                  U5        M(  M*     [        U5       H  n X'   X'S-      -   X''   X'S-   	 M     U R                  S5      (       d  U R                  S5      (       d  U S:X  a  UR                  S5        U$ [        R                  " SU 5      $ ! [         a     M»  f = f! [         a     M•  f = f)a�  
Intended for Python code. In contrast to Python's :py:meth:`str.splitlines`,
looks at form feeds and other special characters as normal text. Just
splits ``\n`` and ``\r\n``.
Also different: Returns ``[""]`` for an empty string input.

In Python 2.7 form feeds are used as normal characters when using
str.splitlines. However in Python 3 somewhere there was a decision to split
also on form feeds.
Téÿÿÿÿé   Ú
ÚÚ z
\n|\r\n|\r)	Ú
splitlinesÚ	enumerateÚ_NON_LINE_BREAKSÚappendÚ
IndexErrorÚreversedÚendswithÚreÚsplit)r   r   ÚlstÚmergeÚiÚlineÚlast_chrÚindexs           r   Úsplit_linesr6      sø   € ö Ø×Ñ Ó%ˆð ˆÜ  –~‰GˆAð$Ø ™8�ð Ô/Ó/Ø—L‘L –Oñ 0ñ &ô ˜e–_ˆEðØ ™Z¨#°a©i©.Ñ8�‘
Ø ™	’Nñ %ð �?‰?˜4× Ñ  F§O¡O°D×$9Ñ$9¸VÀr»\Ø�J‰J�rŒNØˆ
ä�xŠx˜ vÓ.Ð.øô- ó Úðûô ó ò ðús#   ¬CÁ!C%Ã
C"Ã!C"Ã%
C3Ã2C3ÚsourceÚencodingÚerrorsc                 ó´   ^ ^• UU 4S jn[        T [        5      (       a  T $ U" 5       m [        T TU5      $ ! [         a    US:X  a  [        T SU5      s $ e f = f)a5  
Checks for unicode BOMs and PEP 263 encoding declarations. Then returns a
unicode object like in :py:meth:`bytes.decode`.

:param encoding: See :py:meth:`bytes.decode` documentation.
:param errors: See :py:meth:`bytes.decode` documentation. ``errors`` can be
    ``'strict'``, ``'replace'`` or ``'ignore'``.
c                  ó>  >• [        S5      n TR                  U 5      (       a  g[        R                  " ST5      R	                  S5      n[        R
                  " SU5      nU(       a5  UR	                  S5      n[        U[        5      (       d  [        USS5      nU$ T$ )	zÀ
For the implementation of encoding definitions in Python, look at:
- http://www.python.org/dev/peps/pep-0263/
- http://docs.python.org/2/reference/lexical_analysis.html#encoding-declarations
zb'\xef\xbb\xbf'úutf-8s   (?:[^\r\n]*(?:\r\n|\r|\n)){0,2}r   s   coding[=:]\s*([-\w.]+)r#   ÚasciiÚreplace)r   Ú
startswithr.   ÚmatchÚgroupÚsearchÚ
isinstanceÚstr)Ú	byte_markÚfirst_two_linesÚpossible_encodingÚer8   r7   s       €€r   Údetect_encodingÚ0python_bytes_to_unicode.<locals>.detect_encodingT   s�   ø€ ô !Ð!3Ó4ˆ	Ø×Ñ˜Y×'Ñ'àäŸ(š(Ð#FÈÓO×UÑUÐVWÓXˆÜŸIšIÐ&@Ø&5ó7ÐæØ!×'Ñ'¨Ó*ˆAÜ˜a¤×%Ñ%Ü˜˜7 IÓ.�ØˆHð ˆOr   r>   r<   )rC   rD   ÚLookupError)r7   r8   r9   rI   s   ``  r   Úpython_bytes_to_unicoderL   I   sc   ù€ öô. �&œ#×ÑàˆáÓ €Hð
ä�6˜8 VÓ,Ð,øÜó Ø�YÓô
 �v˜w¨Ó/Ò/Øðús   ©6 ¶AÁAc            	      ó¶   • SSK Jn   [        R                  " SU 5      n[	        [        U5       VVs/ s H  u  p#US:X  a  UO
[        U5      PM     snn6 $ s  snnf )zT
Returns a namedtuple of parso's version, similar to Python's
``sys.version_info``.
r   )Ú__version__z
[a-z]+|\d+é   )ÚparsorN   r.   Úfindallr   r(   r   )rN   Útuplr2   Úxs       r   Úversion_inforT   }   sI   € õ
 "Ü�:Š:�m [Ó1€DÜ¼À4¼ÔIº±°˜!˜q›&‘Q¤c¨!£fÒ,¹ÒIÐJÐJùÓIs   ±A
c                   ó*   • \ rS rSr% \\S'   \\S'   Srg)Ú_PythonVersionInfoé‡   r   r   r   Nr   r   r   r   rV   rV   ‡   s   ‡ ØƒJØ†Jr   rV   c                   ó:   ^ • \ rS rSrU 4S jrU 4S jrS rSrU =r$ )ÚPythonVersionInfoéŒ   c                 óæ   >• [        U[        5      (       a5  [        U5      S:w  a  [        S5      eU R                  U R
                  4U:„  $ [        TU ]  U5        U R                  U R
                  4$ ©Né   z'Can only compare to tuples of length 2.)rC   ÚtupleÚlenÚ
ValueErrorr   r   ÚsuperÚ__gt__©ÚselfÚotherÚ	__class__s     €r   rb   ÚPythonVersionInfo.__gt__Ž   s^   ø€ Ü�eœU×#Ñ#Ü�5‹z˜Q‹Ü Ð!JÓKÐKØ—J‘J §
¡
Ð+¨eÑ3Ð3Ü‰‰�uÔà—
‘
˜DŸJ™JÐ'Ð'r   c                 ó¸   >• [        U[        5      (       a5  [        U5      S:w  a  [        S5      eU R                  U R
                  4U:H  $ [        TU ]  U5        g r\   )rC   r^   r_   r`   r   r   ra   Ú__eq__rc   s     €r   ri   ÚPythonVersionInfo.__eq__—   sK   ø€ Ü�eœU×#Ñ#Ü�5‹z˜Q‹Ü Ð!JÓKÐKØ—J‘J §
¡
Ð+¨uÑ4Ð4Ü‰‰�uÕr   c                 ó.   • U R                  U5      (       + $ ©N)ri   )rd   re   s     r   Ú__ne__ÚPythonVersionInfo.__ne__ž   s   € Ø—;‘;˜uÓ%Ô%Ð%r   r   )	r   r   r   r   rb   ri   rm   r   Ú__classcell__)rf   s   @r   rY   rY   Œ   s   ø† õ(õ÷&ð &r   rY   c                 ó  • [         R                  " SU 5      nUc  [        S5      e[        UR	                  S5      5      nUR	                  S5      nUc  US:X  a  SnOUS:X  a  SnO[        S5      e[        U5      n[        X#5      $ )	Nz-(\d+)(?:\.(\d{1,2})(?:\.\d+)?)?((a|b|rc)\d)?$zNThe given version is not in the right format. Use something like "3.8" or "3".r#   r]   Ú7rO   Ú6z7Sorry, no support yet for those fancy new/old versions.)r.   r@   r`   r   rA   ÚNotImplementedErrorrY   )Úversionr@   r   r   s       r   Ú_parse_versionru   ¢   sŠ   € Ü�HŠHÐEÀwÓO€EØ�}Üð <ó =ð 	=ô �—‘˜A“Ó€EØ�K‰K˜‹N€EØ�}ð �A‹:Ø‰EØ�a‹ZØ‰Eä%Ð&_Ó`Ð`Ü�‹J€EÜ˜UÓ*Ð*r   rt   c                 óŠ   • U c  S[         R                  SS -  n [        U [        5      (       d  [	        S5      e[        U 5      $ )z›
Checks for a valid version number (e.g. `3.8` or `3.10.1` or `3`) and
returns a corresponding version info that is always two characters long in
decimal.
Nz%s.%sr]   z#version must be a string like "3.8")ÚsysrT   rC   rD   Ú	TypeErrorru   )rt   s    r   Úparse_version_stringry   ·   sD   € ð �ØœC×,Ñ,¨R¨aÐ0Ñ0ˆÜ�gœs×#Ñ#ÜÐ=Ó>Ð>ä˜'Ó"Ð"r   )F)r<   Ústrictrl   )r.   rw   Úastr   Ú	functoolsr   Útypingr   r   r)   r   rD   Úboolr6   ÚbytesrL   rT   rV   rY   ru   ry   r   r   r   Ú<module>r€      sÐ   ðÛ 	Û 
Ý Ý $ß $ð

Ð ôˆjô ñ)/˜ð )/ tð )/¸õ )/ðZ GOñ1Ø�#�u�*Ñð1Ø),ð1Ø@Cð1àõ1ðhK�gô Kô˜ô ð
 ô&Ð*ó &ó ð&ð*+Ð0ô +ñ*# #ð #Ð1Bö #r   