Ë
    !täi§<  ã                   ó   — d Z ddlZddlmZmZ ddlmZmZmZm	Z	 ddl
mZmZmZmZmZmZmZmZmZmZ ddlmZ g d¢Z G d„ d	e«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)zØ
    pygments.lexers.textfmts
    ~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various text formats.

    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
é    N)Úguess_lexerÚget_lexer_by_name)Ú
RegexLexerÚbygroupsÚdefaultÚinclude)
ÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚGenericÚLiteralÚPunctuation)ÚClassNotFound)ÚIrcLogsLexerÚTodotxtLexerÚ	HttpLexerÚGettextLexerÚNotmuchLexerÚKernelLogLexerc                   ó°  — e Zd ZdZdZdgZdgZdgZdZdZ	e
j                  e
j                  z  ZdZd	efd
ez   dz    eej"                  ej&                  «      fd
ez   dz    eej"                  ej&                  «      dfd
ez   dz    eej"                  eej,                  «      fd
ez   dz    eej"                  eee«      fdefgdej2                  fdedfgdœZy)r   zD
    Lexer for IRC logs in *irssi*, *xchat* or *weechat* style.
    zIRC logsÚircz*.weechatlogztext/x-irclogz1https://en.wikipedia.org/wiki/Internet_Relay_ChatÚ af  
        (
          # irssi / xchat and others
          (?: \[|\()?                  # Opening bracket or paren for the timestamp
            (?:                        # Timestamp
                (?: (?:\d{1,4} [-/])*  # Date as - or /-separated groups of digits
                    (?:\d{1,4})
                 [T ])?                # Date/time separator: T or space
                (?: \d?\d [:.])*       # Time as :/.-separated groups of 1 or 2 digits
                    (?: \d?\d)
            )
          (?: \]|\))?\s+               # Closing bracket or paren for the timestamp
        |
          # weechat
          \d{4}\s\w{3}\s\d{2}\s        # Date
          \d{2}:\d{2}:\d{2}\s+         # Time + Whitespace
        |
          # xchat
          \w{3}\s\d{2}\s               # Date
          \d{2}:\d{2}:\d{2}\s+         # Time + Whitespace
        )?
    z^\*\*\*\*(.*)\*\*\*\*$Ú^z(\s*<[^>]*>\s*)$z/
                (\s*<.*?>\s*)          # Nick Úmsgzo
                (\s*[*]\s+)            # Star
                (\S+\s+.*?\n)          # Nick + rest of message zÅ
                (\s*(?:\*{3}|<?-[!@=P]?->?)\s*)  # Star(s) or symbols
                (\S+\s+)                     # Nick + Space
                (.*?\n)                         # Rest of message z^.*?\nz
\S+:(?!//)z.*\nú#pop)Úrootr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚaliasesÚ	filenamesÚ	mimetypesÚurlÚversion_addedÚreÚVERBOSEÚ	MULTILINEÚflagsÚ	timestampr
   r   ÚPreprocr   ÚTagr   r   ÚInsertedr   r	   Ú	AttributeÚtokens© ó    úg/Volumes/fast/ai/experiments/MLX_z-image/.venv/lib/python3.12/site-packages/pygments/lexers/textfmts.pyr   r      s2  „ ñð €DØˆg€GØÐ €IØ Ð!€IØ
=€CØ€Mà�J‰J˜Ÿ™Ñ%€Eð€Ið2 '¨Ð0à�9‰_Ð2Ñ2±H¸W¿_¹_ÈdÏhÉhÓ4WÐXà�9‰_ð  2ñ 2á�g—o‘o t§x¡xÓ0°%ð9ð �9‰_ð  Dñ Dñ �g—o‘o w°×0@Ñ0@ÓAðCð
 �9‰_ð  Fñ Fñ �g—o‘o w°¸Ó@ð	Bð
 ˜Ðð)
ð. ˜DŸN™NÐ+Ø�d˜FÐ#ð
ñ/�Fr6   r   c                   ó:  — e Zd ZdZdZddgZddgZg d¢ZdZd	Z	d
de
j                  fde
j                  fdej                  fd eeej$                  e«      fdefd eej&                  ee«      fd eej&                  ej,                  ej&                  ee«      fgiZy)r   z*
    Lexer for Gettext catalog files.
    zGettext CatalogÚpotÚpoz*.potz*.po)zapplication/x-gettextztext/x-gettextztext/gettextz$https://www.gnu.org/software/gettextz0.9r    z	^#,\s.*?$z	^#:\s.*?$z^(#|#\.\s|#\|\s|#~\s|#\s).*$z^(")([A-Za-z-]+:)(.*")$z^".*"$z0^(msgid|msgid_plural|msgstr|msgctxt)(\s+)(".*")$z^(msgstr\[)(\d)(\])(\s+)(".*")$N)r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r   ÚTypeÚDeclarationr
   ÚSingler   r   r   ÚPropertyÚVariabler	   r   ÚIntegerr4   r5   r6   r7   r   r   X   sÄ   „ ñð €DØ�dˆm€GØ˜&Ð!€IÚK€IØ
0€CØ€Mð 	Ø˜7Ÿ<™<Ð(Ø˜7×.Ñ.Ð/à,¨g¯n©nÐ=Ø'Ù�f˜dŸm™m¨VÓ4ð6à˜ÐØ@Ù�d—m‘m T¨6Ó2ð4à/Ù�d—m‘m V§^¡^°T·]±]ÀDÈ&ÓQðSð
ð�Fr6   r   c                   ó(  — e Zd ZdZdZdgZdZdZej                  Z
dd„Zd„ Zd„ Zd	„ Zd
 eej"                  eej&                  eej*                  eee«      dfd eej*                  eeeeeej0                  e«      dfgdefdefdedfgdefgdœZd„ Zy)r   z"
    Lexer for HTTP sessions.
    ÚHTTPÚhttpzhttps://httpwg.org/specsz1.5c                 ó>   — d| _         t        j                  | ||«      S )zReset the content-type state.N)Úcontent_typer   Úget_tokens_unprocessed)ÚselfÚtextÚstacks      r7   rF   z HttpLexer.get_tokens_unprocessed€   s   € à ˆÔÜ×0Ñ0°°t¸UÓCÐCr6   c              #   óè  K  — |j                  d«      j                  «       dk(  rL|j                  d«      j                  «       }d|v r"|d |j                  d«       j                  «       }|| _        |j                  d«      t        j                  |j                  d«      f–— |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— y ­w)	Né   zcontent-typeé   Ú;é   é   é   é   )ÚgroupÚlowerÚstripÚfindrE   Ústartr   r3   r	   r   r   )rG   ÚmatchrE   s      r7   Úheader_callbackzHttpLexer.header_callback…   s  è ø€ Ø�;‰;�q‹>×ÑÓ! ^Ò3Ø Ÿ;™; q›>×/Ñ/Ó1ˆLØ�lÑ"Ø+Ð,C¨\×->Ñ->¸sÓ-CÐD×JÑJÓL�Ø ,ˆDÔØ�k‰k˜!‹nœdŸn™n¨e¯k©k¸!«nÐ<Ò<Ø�k‰k˜!‹nœd E§K¡K°£NÐ2Ò2Ø�k‰k˜!‹nœh¨¯©°A«Ð6Ò6Ø�k‰k˜!‹nœd E§K¡K°£NÐ2Ò2Ø�k‰k˜!‹nœg u§{¡{°1£~Ð5Ò5Ø�k‰k˜!‹nœd E§K¡K°£NÐ2Ó2ùs   ‚E0E2c              #   ó  K  — |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— |j                  d«      t        |j                  d«      f–— y ­w)NrK   rN   rO   )rV   r	   rR   r   )rG   rW   s     r7   Úcontinuous_header_callbackz$HttpLexer.continuous_header_callback’   s]   è ø€ Ø�k‰k˜!‹nœd E§K¡K°£NÐ2Ò2Ø�k‰k˜!‹nœg u§{¡{°1£~Ð5Ò5Ø�k‰k˜!‹nœd E§K¡K°£NÐ2Ó2ùs   ‚A=A?c              #   ór  K  — t        | dd «      }|j                  «       }|j                  «       }|rjddlm} |g}d|v r(t        j                  dd|«      }|j                  |«       |D ]0  }	  ||«      }	|	j                  |«      D ]  \  }
}}||
z   ||f–— Œ  y  |t        |f–— y # t        $ r Y ŒJw xY w­w)NrE   r   )Úget_lexer_for_mimetypeÚ+z^(.*)/.*\+(.*)$z\1/\2)ÚgetattrrR   rV   Úpygments.lexersr\   r+   ÚsubÚappendrF   r   r	   )rG   rW   rE   ÚcontentÚoffsetr\   Úpossible_lexer_mimetypesÚgeneral_typeÚiÚlexerÚidxÚtokenÚvalues                r7   Úcontent_callbackzHttpLexer.content_callback—   sÔ   è ø€ Ü˜t ^°TÓ:ˆØ—+‘+“-ˆØ—‘“ˆÙÝ>Ø(4 ~Ð$Ø�lÑ"ô  "Ÿv™vÐ&8¸(Ø&2ó 4�à(×/Ñ/°Ô=ã-�ðÙ2°1Ó5�Eð .3×-IÑ-IÈ'Ö-RÑ)˜˜U EØ$ s™l¨E°5Ð8Ó8ð .Sáð .ð ”d˜GÐ#Ó#øô %ò Ùðüs*   ‚A*B7Á-B(Á53B7Â(	B4Â1B7Â3B4Â4B7zL([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)ÚheaderszF(HTTP)(/)(1\.[01]|2(?:\.0)?|3)( +)(\d{3})(?:( +)([^\r\n]*))?(\r?\n|\Z)z(([^\s:]+)( *)(:)( *)([^\r\n]*)(\r?\n|\Z)z([\t ]+)([^\r\n]+)(\r?\n|\Z)z\r?\nrb   z.+)r    rl   rb   c                 ó,   ‡ — t        ˆ fd„dD «       «      S )Nc              3   óN   •K  — | ]  }t        j                  |‰«      d u–— Œ y ­w)N)r+   Úsearch)Ú.0ÚpatternrH   s     €r7   Ú	<genexpr>z)HttpLexer.analyse_text.<locals>.<genexpr>Ç   s-   øè ø€ ð 
ñ�ô �I‰I�g˜tÓ$¨DÔ0ñùs   ƒ"%)zM^([a-zA-Z][-_a-zA-Z]+)( +)([^ ]+)( +)(HTTP)(/)(1\.[01]|2(?:\.0)?|3)(\r?\n|\Z)zG^(HTTP)(/)(1\.[01]|2(?:\.0)?|3)( +)(\d{3})(?:( +)([^\r\n]*))?(\r?\n|\Z))Úany©rH   s   `r7   Úanalyse_textzHttpLexer.analyse_textÆ   s   ø€ Üó 
ñó
ó 
ð 	
r6   N))r    )r!   r"   r#   r$   r%   r&   r)   r*   r+   ÚDOTALLr.   rF   rX   rZ   rk   r   r   ÚFunctionr	   Ú	Namespacer   ÚReservedr   r   Ú	Exceptionr4   ru   r5   r6   r7   r   r   t   sæ   „ ñð €DØˆh€GØ
$€CØ€Mà�I‰I€EóDò
3ò3ò
$ð69á�d—m‘m T¨4¯>©>¸4Ø×&Ñ&¨°&¸$ó@àð	ð
 WÙ�g×&Ñ&¨°&¸$ÀÈØ—n‘n dó,àðð

ð 9¸/ÐJØ,Ð.HÐIØ�t˜YÐ'ð
ð Ð$Ð%ð
ñ#€Fó,
r6   r   c            
       ó’  — e Zd ZdZdZdZdgZdZddgZdgZ	e
ZeZej                  Zej"                  Zej&                  ZeZd	Zd
ZdZdZdez   dz   Zedz   ez   dz   Zdez   dz   ez   dz   Ze eeeee«      dfe eee«      dfe eeee«      dfeedfeedfeedfeedfdedfgdedfeefeefdefdefgdedfeefeefdefdefgdœZy)r   z.
    Lexer for Todo.txt todo list format.
    ÚTodotxtzhttp://todotxt.com/Útodotxtz2.0ztodo.txtz	*.todotxtztext/x-todoz\d{4,}-\d{2}-\d{2}z	\([A-Z]\)z\+\S+z@\S+z(x )(Ú)z( )(Ú(z)( )(ÚcompleteÚ
incompletez\S+z\s*\nr   z\s+)r    r€   r�   N) r!   r"   r#   r$   r%   r)   r&   r*   r'   r(   r   ÚCompleteTaskTextr	   ÚIncompleteTaskTextr   ÚHeadingÚPriorityÚ
SubheadingÚDateÚErrorÚProjectr   ÚContextÚ
date_regexÚpriority_regexÚproject_regexÚcontext_regexÚcomplete_one_date_regexÚcomplete_two_date_regexÚpriority_date_regexr   r4   r5   r6   r7   r   r   Ð   s¼  „ ñð €DØ
€CØˆk€GØ€Mð ˜[Ð)€IØ�€Ið  ÐØÐð �‰€Hà×Ñ€Dð �m‰m€GØ€Gð '€JØ!€NØ€MØ€Mð '¨Ñ3°dÑ:ÐØ6¸Ñ@Ø)ñ *Ø,0ñ 1Ðà Ñ/°(Ñ:¸ZÑGÈ$ÑNÐð %¡hÐ/?ÀØ/?Àó'Gàðð %¡hÐ/?ÀÓ&FØðð
 !¡(¨8Ð5GÈÓ"NØðð ˜X |Ð4à˜˜|Ð,à˜G \Ð2à˜G \Ð2àÐ'¨Ð6ð/
ð: Ð'¨Ð0à˜GÐ$Ø˜GÐ$àÐ%Ð&àÐ%Ð&ð

ð Ð)¨6Ð2à˜GÐ$Ø˜GÐ$àÐ'Ð(àÐ'Ð(ð

ñU5�Fr6   r   c                   óB  — e Zd ZdZdZdZdgZdZd„ Zde	dfgd	 e
ej                  e«      fd
 e
ej                  ej                  «      fd e
ej                  e«      f ed«      gde	dfde	dfde	dfgde	dfd e
ej                  e«      fd e
ej$                  eej(                  «      fgde	dfde	dfde	dfgd e
ej                  ej                  «      fd e
eej                  e«      fd e
eej                  e«      f ed«      gde	dfde	dfd efd!efgd"œZd#„ Zd$„ Zy%)&r   zü
    For Notmuch email text format.

    Additional options accepted:

    `body_lexer`
        If given, highlight the contents of the message body with the specified
        lexer, else guess it according to the body content (default: ``None``).
    ÚNotmuchzhttps://notmuchmail.org/Únotmuchz2.5c              #   ó  K  — |j                  d«      }	 | j                  rt        | j                  «      }nt        |j	                  «       «      }|j                  |«      E d {  –—†  y # t
        $ r t        d«      }Y Œ0w xY w7 Œ­w)NrK   rH   )rR   Ú
body_lexerr   r   rT   r   rF   )rG   rW   Úcoderg   s       r7   Ú_highlight_codezNotmuchLexer._highlight_codeD  ss   è ø€ Ø�{‰{˜1‹~ˆð	.Ø�ŠÜ)¨$¯/©/Ó:‘ä# D§J¡J£LÓ1�ð ×/Ñ/°Ó5×5Ñ5øô ò 	.Ü% fÓ-ŠEð	.úð 	6ús4   ‚B•;A* ÁBÁ$BÁ%BÁ*BÁ>BÂ BÂBz\fmessage\{\s*)Úmessageúmessage-attrz(\s*id:\s*)(\S+)z&(\s*(?:depth|match|excluded):\s*)(\d+)z(\s*filename:\s*)(.+\n)r   z\fmessage\}\nz\fheader\{\nÚheaderz
\fbody\{\nÚbodyz\fheader\}\nz'((?:Subject|From|To|Cc|Date):\s*)(.*\n)z(.*)(\s*\(.*\))(\s*\(.*\)\n)z
\fpart\{\nÚpartz\f(part|attachment)\{\s*)r�   ú	part-attrz
\fbody\}\nz(ID:\s*)(\d+)z*(,\s*)((?:Filename|Content-id):\s*)([^,]+)z(,\s*)(Content-type:\s*)(.+\n)z\f(?:part|attachment)\}\nz\f(?:part|attachment)\{\s*)z#pushrž   z^Non-text part: .*\nz&(?s)(.*?(?=\f(?:part|attachment)\}\n)))r    rš   r™   r›   rœ   rž   r�   c                 ó,   — | j                  d«      rdS dS )Nz	message{g      ð?g        )Ú
startswithrt   s    r7   ru   zNotmuchLexer.analyse_text~  s   € Ø—o‘o lÔ3ˆsÐ<¸Ð<r6   c                 ó^   — |j                  dd «      | _        t        j                  | fi |¤Ž y )Nr–   )Úgetr–   r   Ú__init__)rG   Úoptionss     r7   r£   zNotmuchLexer.__init__�  s'   € Ø!Ÿ+™+ l°DÓ9ˆŒÜ×Ñ˜DÑ, GÓ,r6   N)r!   r"   r#   r$   r%   r)   r&   r*   r˜   r   r   r   r3   r   r   r@   r   r   ÚStrongr   r1   r   r
   r4   ru   r£   r5   r6   r7   r   r   4  s©  „ ñð €DØ
$€CØˆk€GØ€Mò6ð  Ð)DÐEð
ð !¡(¨4¯>©>¸6Ó"BÐCØ6Ù�d—n‘n f§n¡nÓ5ð7à'Ù�d—n‘n fÓ-ð/á�F‹Oð
ð ˜w¨Ð/Ø˜g xÐ0Ø˜G VÐ,ð
ð ˜g vÐ.Ø7Ù�d—n‘n fÓ-ð/à,Ù�g—n‘n g¨t¯x©xÓ8ð:ð	
ð ˜G VÐ,Ø(¨'Ð3HÐIØ˜G VÐ,ð
ð ™x¨¯©¸¿¹ÓGÐHØ:Ù�k 4§>¡>°6Ó:ð<à.Ù�k 4§>¡>°6Ó:ð<á�F‹Oð
ð *¨7°FÐ;Ø*¨GÐ5KÐLØ$ gÐ.Ø6¸ÐHð	
ñK+€FòZ=ó-r6   r   c            
       ó*  — e Zd ZdZdZddgZddgZdZdZd	e	d
fde	dfde	dfde	dfde	dfde	dfde	dfgde	dfde	df e
d«      gdefdefde	dfg ed«      dedfg ed«      de	dfg ed«      dej                   dfg ed«      dej"                  dfgdœZy)r   z0
    For Linux Kernel log ("dmesg") output.
    z
Kernel logÚkmsgÚdmesgz*.kmsgz*.dmesgz#https://fr.wikipedia.org/wiki/Dmesgz2.6z^[^:]+:debug : (?=\[)Údebugz^[^:]+:info  : (?=\[)Úinfoz^[^:]+:warn  : (?=\[)Úwarnz^[^:]+:notice: (?=\[)z^[^:]+:err   : (?=\[)Úerrorz^[^:]+:crit  : (?=\[)z^(?=\[)Úunknownz(^(?=.+(warning|notice|audit|deprecated))z ^(?=.+(error|critical|fail|Bug))z\[[0-9. ]+\] z(?<=\] ).+?:z\nr   Úbasez.+\n)r    r­   r®   r©   rª   r«   r¬   N)r!   r"   r#   r$   r%   r&   r'   r)   r*   r	   r   r   r   r   r
   r   r¥   rˆ   r4   r5   r6   r7   r   r   †  s,  „ ñð €DØ�wÐ€GØ˜9Ð%€IØ
/€CØ€Mð & t¨WÐ5Ø% t¨VÐ4Ø% t¨VÐ4Ø% t¨VÐ4Ø% t¨WÐ5Ø% t¨WÐ5Ø˜˜yÐ)ð
ð 9¸$ÀÐGØ0°$¸Ð@Ù�F‹Oð
ð ˜vÐ&Ø˜gÐ&Ø�D˜&Ð!ð
ñ �F‹OØ�g˜vÐ&ð
ñ
 �F‹OØ�d˜FÐ#ð
ñ
 �F‹OØ�g—n‘n fÐ-ð
ñ
 �F‹OØ�g—m‘m VÐ,ð
ñA$�Fr6   r   )r$   r+   r_   r   r   Úpygments.lexerr   r   r   r   Úpygments.tokenr	   r
   r   r   r   r   r   r   r   r   Úpygments.utilr   Ú__all__r   r   r   r   r   r   r5   r6   r7   Ú<module>r³      sƒ   ðñó 
ç :ß AÓ A÷*÷ *÷ *å 'ò-€ô>�:ô >ôB�:ô ô8Y
�
ô Y
ôxa�:ô aôHO-�:ô O-ôd.�Zõ .r6   