ó
    Ú°›jé  ã                  ór   • S SK Jr  S SKJr  S SKJr  S SKJr   " S S5      r " S S5      r " S	 S
\	5      r
g)é    )Úannotations)ÚAny)Ú
ParseError)ÚUnexpectedCharErrorc                  óX   • \ rS rSr  S       SS jjrS	S jr        S
S jrSrg)Ú_Stateé	   c                ó(   • Xl         X l        X0l        g ©N)Ú_sourceÚ_save_markerÚrestore)ÚselfÚsourceÚsave_markerr   s       ÚK/home/mande/repo/quber/.venv/lib/python3.13/site-packages/tomlkit/source.pyÚ__init__Ú_State.__init__
   s   € ð ŒØ'ÔØ�ó    c                ó¨   • U R                   R                  U l        U R                   R                  U l        U R                   R                  U l        U $ r   )r   Ú_idxÚ_currentÚ_marker©r   s    r   Ú	__enter__Ú_State.__enter__   s<   € ð
 —L‘L×%Ñ%ˆŒ	ØŸ™×-Ñ-ˆŒØ—|‘|×+Ñ+ˆŒàˆr   c                óü   • U R                   (       d  U(       ad  U R                  U R                  l        U R                  U R                  l        U R                  (       a  U R
                  U R                  l        g g g r   )r   r   r   r   r   r   )r   Úexception_typeÚexception_valÚtraces       r   Ú__exit__Ú_State.__exit__   sP   € ð �<�<ž>Ø $§	¡	ˆD�L‰LÔØ$(§M¡MˆD�L‰LÔ!Ø× × Ø'+§|¡|�—‘Õ$ð !ð *r   )r   r   r   r   r   r   N©FF)r   ÚSourcer   úbool | Noner   r%   ÚreturnÚNone©r&   r   ©r   ztype[BaseException] | Noner   zBaseException | Noner    r   r&   r'   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r!   Ú__static_attributes__© r   r   r   r   	   se   † ð $)Ø$ð	àðð !ðð ð	ð
 
õô	ð4à2ð4ð ,ð4ð ð	4ð
 
÷4r   r   c                  ób   • \ rS rSrSrS	S jr  S
     SS jjrSS jr        SS jrSr	g)Ú_StateHandleré-   z!
State preserver for the Parser.
c                ó   • Xl         / U l        g r   ©r   Ú_states)r   r   s     r   r   Ú_StateHandler.__init__2   s   € ØŒØ%'ˆ�r   c                ó.   • [        U R                  X5      $ r   )r   r   )r   r   r   s      r   Ú__call__Ú_StateHandler.__call__6   s   € ô
 �d—l‘l KÓ9Ð9r   c                óf   • U " 5       nU R                   R                  U5        UR                  5       $ r   )r5   Úappendr   )r   Ústates     r   r   Ú_StateHandler.__enter__=   s(   € Ù“ˆØ�‰×Ñ˜EÔ"Ø�‰Ó Ð r   c                ó\   • U R                   R                  5       nUR                  XU5        g r   )r5   Úpopr!   )r   r   r   r    r<   s        r   r!   Ú_StateHandler.__exit__B   s$   € ð —‘× Ñ Ó"ˆØ�‰�~°eÕ<r   r4   N)r   r$   r&   r'   r#   )r   r%   r   r%   r&   r   r(   r)   )
r*   r+   r,   r-   Ú__doc__r   r8   r   r!   r.   r/   r   r   r1   r1   -   se   † ñô(ð $)Ø$ð:à ð:ð ð:ð 
õ	:ô!ð
=à2ð=ð ,ð=ð ð	=ð
 
÷=r   r1   c                  ó  ^ • \ rS rSrSrSU 4S jjrSS jr\SS j5       r\SS j5       r	\SS j5       r
\SS j5       rSS	 jrSSS
 jjrSS jrSS jrSSS jjrSSS jjrS S jrSS jr\4       S!S jjrS"S jrSrU =r$ )#r$   éL   Ú c                óŒ   >• [         TU ]  5         SU l        SU l        SU l        [        U 5      U l        U R                  5         g )Néÿÿÿÿr   Ú )Úsuperr   r   r   r   r1   Ú_stateÚinc)r   Ú_Ú	__class__s     €r   r   ÚSource.__init__R   s:   ø€ Ü‰ÑÔð
 ˆŒ	ØˆŒØˆŒä# DÓ)ˆŒà�‰�
r   c                óD   • U R                  5         U R                  5         g r   )rJ   Úmarkr   s    r   ÚresetÚSource.reset`   s   € à�‰Œ
ð 	�	‰	�r   c                ó   • U R                   $ r   )rI   r   s    r   r<   ÚSource.stateg   s   € à�{‰{Ðr   c                ó   • U R                   $ r   )r   r   s    r   ÚidxÚ
Source.idxk   s   € à�y‰yÐr   c                ó   • U R                   $ r   )r   r   s    r   ÚcurrentÚSource.currento   s   € à�}‰}Ðr   c                ó   • U R                   $ r   )r   r   s    r   ÚmarkerÚSource.markers   s   € à�|‰|Ðr   c                ó2   • X R                   U R                   $ )z-
Extracts the value between marker and index
)r   r   r   s    r   ÚextractÚSource.extractw   s   € ð —L‘L 4§9¡9Ð-Ð-r   c                óÔ   • U R                   S-   nU[        U 5      :  a  X l         X   U l        g[        U 5      U l         U R                  U l        U(       a  U R	                  U5      Seg)zt
Increments the parser if the end of the input has not been reached.
Returns whether or not it was able to advance.
é   TNF)r   Úlenr   ÚEOFÚparse_error)r   Ú	exceptionÚnext_idxs      r   rJ   Ú
Source.inc}   s_   € ð —9‘9˜q‘=ˆØ”c˜$“iÓØ ŒIØ ™NˆDŒMØô ˜“IˆŒ	ØŸ™ˆŒÞØ×"Ñ" 9Ó-°4Ð7Ør   c                óÌ   • U R                   n[        U 5      nX#:  a  X   U;   a  US-  nX#:  a
  X   U;   a  M  X#:  a  X l         X   U l        gX0l         U R                  U l        g)uÒ  Advance while the current character is in ``charset``.

Equivalent to ``while self.current in charset and self.inc(): pass`` but
it scans the underlying string in a single pass and updates the index
and current character only once, instead of paying a per-character
``inc()`` call. On return ``current`` is the first character NOT in
``charset`` (or EOF). Returns ``True`` if it stopped on a real
character, ``False`` at EOF â€” the same value contract as the loop.
ra   TF©r   rb   r   rc   )r   ÚcharsetÚiÚns       r   Úadvance_whileÚSource.advance_while�   sf   € ð �I‰IˆÜ�‹IˆØ‹e˜™ 7Ó*Ø�‰FˆAð ‹e˜™ 7Õ*à‹5ØŒIØ ™GˆDŒMØØŒ	ØŸ™ˆŒØr   c                óÌ   • U R                   n[        U 5      nX#:  a  X   U;  a  US-  nX#:  a
  X   U;  a  M  X#:  a  X l         X   U l        gX0l         U R                  U l        g)a'  Advance while the current character is NOT in ``stopset``.

The mirror of :meth:`advance_while`: equivalent to
``while self.current not in stopset and self.inc(): pass`` in a single
scan. On return ``current`` is the first character IN ``stopset`` (or
EOF), with the same return-value contract.
ra   TFri   )r   Ústopsetrk   rl   s       r   Úadvance_untilÚSource.advance_until¦   sf   € ð �I‰IˆÜ�‹IˆØ‹e˜™ wÓ.Ø�‰FˆAð ‹e˜™ wÕ.à‹5ØŒIØ ™GˆDŒMØØŒ	ØŸ™ˆŒØr   c                óD   ^ ^• [        UU 4S j[        U5       5       5      $ )zU
Increments the parser by n characters
if the end of the input has not been reached.
c              3  óB   >#   • U  H  nTR                  TS 9v •  M     g7f))re   N)rJ   )Ú.0rK   re   r   s     €€r   Ú	<genexpr>ÚSource.inc_n.<locals>.<genexpr>¿   s   øé € ÐCº(°Q�4—8‘8 i�8Õ0º(ùs   ƒ)ÚallÚrange)r   rl   re   s   ` `r   Úinc_nÚSource.inc_nº   s   ù€ ô
 ÕC¼%À¼(ÓCÓCÐCr   c                óì   • U R                   U;   a>  US:w  a8  US-  nUS-  nU R                  5       (       d  OU R                   U;   a  US:w  a  M8  US:”  a   U R                  [        U R                   5      eg)z4
Consume chars until min/max is satisfied is valid.
r   ra   N)rX   rJ   rd   r   )r   ÚcharsÚminÚmaxs       r   ÚconsumeÚSource.consumeÁ   sp   € ð �l‰l˜eÓ#¨¨q«Ø�1‰HˆCØ�1‰HˆCØ—8‘8—:‘:Øð	 �l‰l˜eÓ#¨¨q­ð �‹7Ø×"Ñ"Ô#6¸¿¹ÓEÐEð r   c                ó2   • U R                   [        U 5      :¬  $ )z>
Returns True if the parser has reached the end of the input.
)r   rb   r   s    r   ÚendÚ
Source.endÏ   s   € ð �y‰yœC ›IÑ%Ð%r   c                ó&   • U R                   U l        g)z1
Sets the marker to the index's current position
N)r   r   r   s    r   rO   ÚSource.markÕ   s   € ð —y‘yˆ�r   c                ó>   • U R                  5       u  pEU" XE/UQ70 UD6$ )z:
Creates a generic "parse error" at the current position.
)Ú_to_linecol)r   re   ÚargsÚkwargsÚlineÚcols         r   rd   ÚSource.parse_errorÛ   s)   € ð ×$Ñ$Ó&‰	ˆá˜Ð4 TÒ4¨VÑ4Ð4r   c                ó  • Sn[        U R                  5       5       HK  u  p#U[        U5      -   S-   U R                  :”  a  US-   U R                  U-
  4s  $ U[        U5      S-   -  nMM     [        U R                  5       5      S4$ )Nr   ra   )Ú	enumerateÚ
splitlinesrb   rU   )r   Úcurrk   r‹   s       r   rˆ   ÚSource._to_linecolè   sz   € ØˆÜ  §¡Ó!2Ö3‰GˆAØ”S˜“Y‰ Ñ" T§X¡XÓ-Ø˜A™˜tŸx™x¨#™~Ð.Ò.à”3�t“9˜q‘=Ñ ŠCñ	 4ô �4—?‘?Ó$Ó% qÐ(Ð(r   )r   r   r   rI   )rK   Ústrr&   r'   )r&   r'   )r&   r1   )r&   Úint)r&   r“   r   )re   útype[ParseError] | Noner&   Úbool)rj   Ú	frozensetr&   r–   )rp   r—   r&   r–   )rl   r”   re   r•   r&   r–   )r   rF   )r}   r“   r~   r”   r   r”   r&   r'   )r&   r–   )re   ztype[ParseError]r‰   r   rŠ   r   r&   r   )r&   ztuple[int, int])r*   r+   r,   r-   rc   r   rP   Úpropertyr<   rU   rX   r[   r^   rJ   rm   rq   rz   r€   rƒ   rO   r   rd   rˆ   r.   Ú__classcell__)rL   s   @r   r$   r$   L   sÈ   ø† ð €C÷ôð óó ðð óó ðð óó ðð óó ðô.öô&ô,ö(DöFô&ô!ð '1ð5à#ð5ð ð5ð ð	5ð
 
õ5÷)ò )r   r$   N)Ú
__future__r   Útypingr   Útomlkit.exceptionsr   r   r   r1   r“   r$   r/   r   r   Ú<module>r�      s4   ðÝ "å å )Ý 2÷!4ñ !4÷H=ñ =ô>d)ˆSõ d)r   