ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/tomlkit/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/tomlkit/__pycache__/parser.cpython-311.pyc

�

�܋fϓ��P�ddlmZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZddl
mZdd	l
mZdd
l
mZddl
mZddl
mZdd
l
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&dd lm'Z'dd!lm(Z(dd"lm)Z)dd#lm*Z*dd$lm+Z+dd%lm,Z,dd&lm-Z-dd'lm.Z.dd(lm/Z/dd)lm0Z0dd*l1m2Z2dd+l3m4Z4dd,l5m6Z6d-Z7d.Z8d/Z9d0Z:d1Z;Gd2�d3��Z<dS)4�)�annotationsN)�decode)�RFC_3339_LOOSE)�_escaped)�
parse_rfc3339)�	Container)�
EmptyKeyError)�EmptyTableNameError)�InternalParserError)�InvalidCharInStringError)�InvalidControlChar)�InvalidDateError)�InvalidDateTimeError)�InvalidNumberError)�InvalidTimeError)�InvalidUnicodeValueError)�
ParseError)�UnexpectedCharError)�UnexpectedEofError)�AoT)�Array)�Bool)�BoolType)�Comment)�Date)�DateTime)�Float)�InlineTable)�Integer)�Item)�Key)�KeyType)�Null)�	SingleKey)�String)�
StringType)�Table)�Time)�Trivia)�
Whitespace)�Source)�TOMLChar)�TOMLDocument�	�
�
��c�z�eZdZdZdYd�Zed���Zed���Zed	���Zed
���Z	dZd�Z
d[d\d�Zd[d]d�Zd^d�Z
d_d�Zd`d�Zefd�Zdad�Zdbd �Zdcd$�Zddd&�Zdedfd*�Zdgdhd.�Zdid/�Zdid0�Zdid1�Zdjd2�Zd3�Zd4�Zdkd8�Zdld:�Zdmd<�Z dndA�Z!dodC�Z"dodD�Z#dE�Z$dpdH�Z%	dqdrdM�Z&dsdO�Z'dtdT�Z(dudU�Z)dvdX�Z*dS)w�Parserz$
    Parser for TOML documents.
    �string�str�return�Nonec�V�tt|����|_g|_dS�N)r+r�_src�
_aot_stack)�selfr5s  �_/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/tomlkit/parser.py�__init__zParser.__init__?s"���6�&�>�>�*�*��	�%'�����c��|jjSr:)r;�state�r=s r>�_statez
Parser._stateEs���y��r@c��|jjSr:)r;�idxrCs r>�_idxzParser._idxIs���y�}�r@c��|jjSr:)r;�currentrCs r>�_currentzParser._currentMs
���y� � r@c��|jjSr:)r;�markerrCs r>�_markerzParser._markerQs
���y��r@c�4�|j���S)z=
        Extracts the value between marker and index
        )r;�extractrCs r>rOzParser.extractUs���y� � �"�"�"r@N�	exception�type[ParseError] | None�boolc�8�|j�|���S)z�
        Increments the parser if the end of the input has not been reached.
        Returns whether or not it was able to advance.
        �rP)r;�inc)r=rPs  r>rUz
Parser.inc[s��
�y�}�}�y�}�1�1�1r@�n�intc�:�|j�||���S)zm
        Increments the parser by n characters
        if the end of the input has not been reached.
        )rVrP)r;�inc_n)r=rVrPs   r>rYzParser.inc_nbs��
�y����i��8�8�8r@r���c�<�|j�|||���S)zD
        Consume chars until min/max is satisfied is valid.
        )�chars�min�max)r;�consume)r=r\r]r^s    r>r_zParser.consumeis!���y� � �u�#�3� �?�?�?r@c�4�|j���S)zN
        Returns True if the parser has reached the end of the input.
        )r;�endrCs r>raz
Parser.endos���y�}�}���r@c�8�|j���dS)zA
        Sets the marker to the index's current position
        N)r;�markrCs r>rczParser.markus��	
�	�������r@c�.�|jj|g|�Ri|��S)zJ
        Creates a generic "parse error" at the current position.
        )r;�parse_error)r=rP�args�kwargss    r>rezParser.parse_error{s)��%�t�y�$�Y�@��@�@�@��@�@�@r@r-c��td��}|���s�|jdkrn�|���}|sn�|\}}|�|���s|�||��sS	|�||��n;#t$r.}|�tt|����|�d}~wwxYw|���|�����|���s�|���\}}t|t��r*|���r|�||��}	|�||��n;#t$r.}|�tt|����|�d}~wwxYw|�����|�d��|S)NT�[F)r-rarJ�_parse_item�is_multi�	_merge_ws�append�	Exceptionrerr6rc�_parse_table�
isinstancer'�is_aot_element�
_parse_aot�parsing)r=�body�item�key�value�es      r>�parsezParser.parse�s����D�!�!���(�(�*�*�	��}��#�#���#�#�%�%�D��
���J�C����C�L�L�N�N��4�>�>�%�QU�;V�;V��F��K�K��U�+�+�+�+�� �F�F�F��*�*�:�s�1�v�v�>�>�A�E�����F����
�I�I�K�K�K�%�(�(�*�*�	�(�(�(�*�*�
	B��*�*�,�,�J�C���%��'�'�
4�E�,@�,@�,B�,B�
4�����s�3�3��
B����C��'�'�'�'���
B�
B�
B��&�&�z�3�q�6�6�:�:��A�����
B�����(�(�*�*�
	B�	
���U�����s0�9B�
C�)C�C�E5�5
F-�?)F(�(F-rur �	containerrc�h�|���}|sdSt|t��rt|t��sdS|jt	|j��t	|j��zz
}|jddt|j||j���f|jd<dS)z�
        Merges the given Item with the last one currently in the given Container if
        both are whitespace items.

        Returns True if the items were merged.
        FrZrT)�	last_itemrpr*rG�len�srtr;)r=rurz�last�starts     r>rlzParser._merge_ws�s����"�"�$�$���	��5��$�
�+�+�	�:�d�J�3O�3O�	��5��	�S���[�[�3�t�v�;�;�6�7���N�2��q�!��t�y����!2�3�4�4�
�	��r��
�tr@�parentr!�childc��t|��}t|��}||krdS||dt|���kS)z�
        Returns whether a key is strictly a child of another key.
        AoT siblings are not considered children of one another.
        FN)�tupler})r=r�r��parent_parts�child_partss     r>�	_is_childzParser._is_child�sH��
�V�}�}���E�l�l���;�&�&��5��{�+>�S��->�->�+>�?�?�?r@�tuple[Key | None, Item] | Nonec
��|���|j5}	|j}|dkrC|���dt	|�����fcddd��S|dvrD|���s/dt	|�����fcddd��Sn{|dkrY|���}|���\}}}dtt||||����fcddd��S|dkr	ddd��dSd|_	n��	ddd��n#1swxYwY|�
d��S)zw
        Attempts to parse the next item and returns it, along with its key
        if the item is value-like.
        T�
N� 	
�#ri)rcrDrJrUr*rO�_parse_comment_trailrr)�restore�_parse_key_value)r=rB�c�indent�cws�comment�trails       r>rjzParser._parse_item�s��
	
�	�	����
�[�	�E�
��M����9�9��H�H�J�J�J���D�L�L�N�N�!;�!;�;�	�	�	�	�	�	�	�	��'�\�\��8�8�:�:�@�#�Z������%?�%?�?�	�	�	�	�	�	�	�	�@��#�X�X�!�\�\�^�^�F�*.�*C�*C�*E�*E�'�C��%������W�e�)L�)L�!M�!M�M�#	�	�	�	�	�	�	�	�$�#�X�X��)	�	�	�	�	�	�	�	�2%)�E�M��3
�2�5	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�8�$�$�T�*�*�*s+�AE�.:E�5AE�E�)
E�E�ET�parse_trail�tuple[str, str, str]c�*�|���rdSd}d}|���	|j}|dkr�nw|dk�r%|���}|���|���|���s�|j���s�t
|j��}|tks|tkr'|tkr|�
t|d���|���sn-|���s|j�����|���}|���nK|dvr|���n|�
t|���|���rn���d}|r�|j�
��rB|���r.	|j�
��r|����.|jdkr|���|jdkr|���|j|jks|j���r|���}|||fS)	z�
        Returns (comment_ws, comment, trail)
        If there is no comment, comment_ws and comment will
        simply be empty.
        )�r�r�r�Tr�r��commentsr��
)rarcrJrOrU�is_nl�ord�CHR_DEL�CTRL_CHAR_LIMIT�CTRL_Irer
r�	is_spacesrGrM�is_ws)r=r�r��
comment_wsr��coder�s       r>r�zParser._parse_comment_trail�sS���8�8�:�:�	��:����
��	�	����	��
�A��D�y�y���c���!�\�\�^�^�
��	�	�������
�
�
��(�(�*�*��T�]�-@�-@�-B�-B���t�}�-�-�D��w���$�/�*A�*A�d�f�n�n�"�.�.�/A�4��T�T�T��8�8�:�:���
�(�(�*�*��T�]�-@�-@�-B�-B���,�,�.�.���	�	������g������
�
�
�
��&�&�':�A�>�>�>��x�x�z�z�
��=	�@���	'��-�)�)�+�+�
����
�
�
���-�)�)�+�+�
����
�
�
��}��$�$����
�
�
��}��$�$����
�
�
��y�D�L�(�(�D�M�,?�,?�,A�,A�(��������7�E�)�)r@F�
parse_comment�tuple[Key, Item]c��|���|j���rB|���r.	|j���r|����.|���}|���}|���|jdk}|j���rk|���rW|jdkr|r|�td���d}|j���r|����W|s |�t|j���|j	s|���|_	n"|xj	|���z
c_	|�
��}|r<|���\}}}|j}	|	j
s||	_
||	_||	_nd|j_||j_||fS)N�=Tr�)rcrJr�rUrO�
_parse_key�	is_kv_seprer�sep�_parse_valuer��triviar�r�r�r�)
r=r�r�rv�found_equals�valr�r�r��metas
          r>r�zParser._parse_key_value-s����	�	�����m�%�%�'�'�	�D�H�H�J�J�	���m�%�%�'�'�	�D�H�H�J�J�	��������o�o�����	�	�����}��+���m�%�%�'�'�	(�D�H�H�J�J�	(��}��#�#��(��*�*�+>��D�D�D�#'�L��m�%�%�'�'�	(�D�H�H�J�J�	(��	G��"�"�#6��
�F�F�F��w�	&��l�l�n�n�C�G�G��G�G�t�|�|�~�~�%�G�G����!�!���		"�"&�";�";�"=�"=��C��%��:�D��?�
&�"%���"�D�L��D�J�J�!�C�J��"��
���C�x�r@c�B�|���|j���rB|���r.	|j���r|����.|jdvr|���S|���S)zz
        Parses a Key at the current position;
        WS before the key must be exhausted first at the callsite.
        z"')rcrJr�rU�_parse_quoted_key�_parse_bare_keyrCs r>r�zParser._parse_key\s���
	
�	�	�����m�%�%�'�'�	�D�H�H�J�J�	���m�%�%�'�'�	�D�H�H�J�J�	��=�E�!�!��)�)�+�+�+��'�'�)�)�)r@c���|���}|j�t�fd�tD��d��}|�t	d���|�|tjkrtjntj	��}|j
���r%|�t|j
j���||���z
}|���|j���rB|���r.	|j���r|����.||���z
}t't)|��|d|���}|jdkr;|���|�|�����}|S)zJ
        Parses a key enclosed in either single or double quotes.
        c3�2�K�|]}|j�k�
|V��dSr:)rw)�.0�t�quote_styles  �r>�	<genexpr>z+Parser._parse_quoted_key.<locals>.<genexpr>qs/�����F�F�q�q�w�+�/E�/E��/E�/E�/E�/E�F�Fr@Nz+Should not have entered _parse_quoted_key()r�)r�r��original�.)rOrJ�nextr"�RuntimeError�
_parse_string�Basicr&�SLB�SLL�_t�is_multilinererrw�	as_stringrcr�rUr$r6�concatr�)r=r��key_type�key_strrvr�s     @r>r�zParser._parse_quoted_keyjs����
�<�<�>�>���m���F�F�F�F�G�F�F�F��M�M�����L�M�M�M��$�$�&�'�-�7�7�J�N�N�Z�^�
�
���:�"�"�$�$�	J��"�"�#6��
�8H�I�I�I��G�%�%�'�'�'���	�	�����m�%�%�'�'�	�D�H�H�J�J�	���m�%�%�'�'�	�D�H�H�J�J�	��D�L�L�N�N�"����G����b�8�L�L�L���=�C����H�H�J�J�J��*�*�T�_�_�.�.�/�/�C��
r@c��|j���s|j���r[|���rG	|j���s|j���r|����G|���}|���}|s|�t���d|vr|�td|�d����t|tjd|��}|jdkr;|���|�|�
����}|S)z$
        Parses a bare key.
        � z
Invalid key "�"r�r�)rJ�is_bare_key_charr�rUrO�striprer	rr$r"�Barer�r�)r=r�rvs   r>r�zParser._parse_bare_key�s7��

�M�*�*�,�,�	�04�
�0G�0G�0I�0I�	��h�h�j�j�	�
�
�M�*�*�,�,�	�04�
�0G�0G�0I�0I�	��h�h�j�j�	�
�<�<�>�>���n�n�����	2��"�"�=�1�1�1��#�:�:��"�"�:�/E�s�/E�/E�/E�F�F�F���W�\�2�x�8�8���=�C����H�H�J�J�J��*�*�T�_�_�.�.�/�/�C��
r@c
�
�|���|j}t��}|tjjkr|���S|tjjkr|���S|tj
jdkr|���S|tjjdkr|�
��S|dkr|���S|dkr|���S|dvs|�d��dvr�|jdvr2|���r	|jdvr|����|���}|�||��}|�|S|�t*���|t,jv�r�|jdvr2|���r	|jdvr|����|���}t1j|��}|�r�|�d	��r�|�d
��r�	t7|��}t9|t:j��sJ�t=|j|j |j!|j"|j#|j$|j%|j&||�
�
S#tN$r|�tP���wxYw|�d	���r~	t7|��}t9|t:j)��sJ�tU|j|j |j!||��}|���|jdvr2|���r	|jdvr|����|���}|�+��}	|tY|	��d�|_-|	s|St7||	z��}t9|t:j��sJ�t=|j|j |j!|j"|j#|j$|j%|j&|||	z�
�
S#tN$r|�t\���wxYw|�d
��r�	t7|��}
t9|
t:j/��sJ�ta|
j"|
j#|
j$|
j%|
j&||��S#tN$r|�tb���wxYw|�||��}|�|S|�t*���|�td|���)zD
        Attempts to parse a value at the current position.
        rri�{z+-�>�+inf�+nan�-inf�-nan�inf�nan� 	

#,]}N��z	

#,]})3rcrJr)r&r�rw�_parse_basic_stringr��_parse_literal_stringr�TRUE�_parse_true�FALSE�_parse_false�_parse_array�_parse_inline_table�_peekrUrO�
_parse_numberrerr5�digitsr�match�grouprrp�datetimer�year�month�day�hour�minute�second�microsecond�tzinfo�
ValueErrorr�dater�rstripr}r�r�timer(rr)r=r�r��rawru�m�dtr��time_raw�	time_partr�s           r>r�zParser._parse_value�s@��	
�	�	�����M�������
��$�$�$��+�+�-�-�-�
�*�.�&�
&�
&��-�-�/�/�/�
�(�-�%�a�(�
(�
(��#�#�%�%�%�
�(�.�&�q�)�
)�
)��$�$�&�&�&�
�#�X�X��$�$�&�&�&�
�#�X�X��+�+�-�-�-�
�$�Y�Y�$�*�*�Q�-�-�,
�
�
��-�}�4�4������4���-�}�4�4������4��,�,�.�.�C��%�%�c�6�2�2�D������"�"�#5�6�6�6�
�&�-�
�
��-�}�4�4������4���-�}�4�4������4��,�,�.�.�C��$�S�)�)�A��C
A��7�7�1�:�:�E�!�'�'�!�*�*�E�E�*�3�/�/��)�"�h�.?�@�@�@�@�@�'��G��H��F��G��I��I��N��I�"�� � ���&�E�E�E�"�.�.�/C�D�D�D�E�����7�7�1�:�:�A�A�*�3�/�/��)�"�h�m�<�<�<�<�<�#�B�G�R�X�r�v�v�s�K�K���	�	����"�m�<�?�?�D�H�H�J�J�?� �#�m�<�?�?�D�H�H�J�J�?�$(�<�<�>�>��$,�O�O�$5�$5�	�,4�S��^�^�5E�5E�,F��)�(�(�#'�K�*�3��?�;�;��)�"�h�.?�@�@�@�@�@�'��G��H��F��G��I��I��N��I�"��)�O� � ���&�A�A�A�"�.�.�/?�@�@�@�A�����7�7�1�:�:�A�
A�)�#�.�.��)�!�X�]�;�;�;�;�;�#��F��H��H��M��H�"�� � ���&�A�A�A�"�.�.�/?�@�@�@�A�����%�%�c�6�2�2�D������"�"�#5�6�6�6��"�"�#6��:�:�:s.�A*J7�7%K�6C#Q�A0Q�%Q0�	AS"�"%Tc�@�|�tj��Sr:)�_parse_boolrr�rCs r>r�zParser._parse_trues������
�.�.�.r@c�@�|�tj��Sr:)r�rr�rCs r>r�zParser._parse_false!s�������/�/�/r@�stylerrc���|j5t|��}|D]}|�|dd����t|t	����cddd��S#1swxYwYdS)Nr�)r]r^)rDrr_rr))r=r�r�s   r>r�zParser._parse_bool$s���
�[�	)�	)��U�O�O�E��
.�
.�����Q�A�1��-�-�-�-���v�x�x�(�(�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)s�AA�A!�$A!rc
�`�|�t���g}d}	|j}|�tjtjz��|j||j�}ttj��t|��z}|r#|�	t|������|jdkrM|�d���\}}}|�	tt||||��������|r$|�	t|������|s<	|�	|�����d}��B#t $rYnwxYw|rL|jdkrA|�t���|�	td����d}���|jdkr|���n |�t |j���	t%|t����}	|	S#t&$rYdSwxYw)NrTTr�F)r��,�])rUrrGr_r,�SPACES�NLr;�setrmr*rJr�rr)r�rrerr�)
r=�elems�
prev_valuercr��newliner�r�r��ress
          r>r�zParser._parse_array/s4�����-��.�.�.����
�+	G��9�D��L�L���8�;�6�7�7�7��Y�t�d�i�/�0�F��(�+�&�&��V���4�G��
����Z��/�/�0�0�0���}��#�#�&*�&?�&?�E�&?�&R�&R�#��W�e����W�V�F�C��%�%H�%H�I�I�J�J�J���
����Z��/�/�0�0�0���
���L�L��!2�!2�!4�!4�5�5�5�!%�J���*�����D������
�d�m�s�2�2����#5��6�6�6����Z��_�_�-�-�-�"�
���}��#�#����
�
�
���"�"�#6��
�F�F�F�	���v�x�x�(�(�C��J���	�	�	��D�D�	���s$�7)E"�"
E/�.E/�H�
H-�,H-rc���|�t���td��}d}	|j}|�t
j��|j||j�}|r"|�t|����|sS|j
dkr|����n|dus
|�+|j
dkr |�t|j
���n6|j
dks|j
dkr |�t|j
���|�
d��\}}|�||��|j}|�t
j��|j||j�}|r"|�t|����|j
dk}|r|�t������t|t����S)NrTT�}Fr�)rUrrrGr_r,rr;�addr*rJrerr�rr))r=r�trailing_commarcr�rvr�s       r>r�zParser._parse_inline_tableis������-��.�.�.��$������+	7��9�D��L�L���)�)�)��)�D�4�9�,�-�C��
+��	�	�*�S�/�/�*�*�*�!�
O��=�C�'�'��H�H�J�J�J��#�e�+�+�%�-��
��,�,��*�*�+>��
�N�N�N���=�C�'�'�4�=�C�+?�+?��*�*�+>��
�N�N�N��,�,�U�3�3�H�C���I�I�c�3�����9�D��L�L���)�)�)��)�D�4�9�,�-�C��
+��	�	�*�S�/�/�*�*�*�"�]�c�1�N��
7����#5��6�6�6�W+	7�Z�5�&�(�(�+�+�+r@r�r�r)�Item | Nonec���d}|�d��r|d}|dd�}t|��dkrC|�d��r|�d��r|r|�d��rdS|�d��r|rdSd	}d
}|�d��rd}d
}n3|�d��rd}d}n|�d��rd}d}tjd|�d|�d�d|�����}d|vrdS|�d��sD|�d��s1|�dd��d�d��rdS	tt||z|��|||z��S#t$r:	tt||z��|||z��cYS#t$rYYdSwxYwwxYw)Nr�)�+�-rr��0)z0.�0o�0x�0b�0er�)rrrz[0-9]r/rz[01]�rz[0-7]�rz[0-9a-f]�z(?i)(?<=z)_(?=�)�_rx)�
startswithr}�re�sub�lower�endswith�splitrrWr�r�float)r=r�r��signr��base�cleans       r>r�zParser._parse_number�sO�����>�>�*�%�%�	��q�6�D��a�b�b�'�C��s�8�8�a�<�<��N�N�3�����N�N�#A�B�B�������s�#�#�	��4��>�>�,�-�-�	�$�	��4������>�>�$���	��F��D�D�
�^�^�D�
!�
!�	��F��D�D�
�^�^�D�
!�
!�	��F��D���8�&�8�8�v�8�8�8�"�c�B�B�H�H�J�J���%�<�<��4�
�N�N�3���	��#�#�D�)�)�	����C��#�#�A�&�/�/��4�4�	�
�4�	��3�t�e�|�T�2�2�F�D�3�J�G�G�G���	�	�	�
��U�4�%�<�0�0�&�$��*�E�E�E�E�E���
�
�
��t�t�t�
����	���s0�;$F � 
G$�+#G�G$�
G �G$�G � G$r%c��|j5|�tj��cddd��S#1swxYwYdSr:)rDr�r&r�rCs r>r�zParser._parse_literal_string����
�[�	6�	6��%�%�j�n�5�5�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�	6�	6��4�8�8c��|j5|�tj��cddd��S#1swxYwYdSr:)rDr�r&r�rCs r>r�zParser._parse_basic_string�r$r%c��|r�|j���rgd}|j���r&||jz
}|�t����?d|vr |�t
|j���dS|jtvr/t|j}|�t���|S|jdvrd|�|jdk��\}}|�'|�t|��dz��|S|�t���|�t
|j���)Nr�rTr���U�ur)r�)rJr�rUrrerr�
_peek_unicoderYr}r)r=�	multiline�tmpr�r*�ues      r>�_parse_escaped_charzParser._parse_escaped_char�s?���	���,�,�.�.�	��C��-�%�%�'�'�
��t�}�$�����#5��6�6�6���3����&�&�'?���O�O�O��2��=�H�$�$����'�A�
�H�H�1�H�2�2�2��H��=�J�&�&��&�&�t�}��';�<�<�E�A�r��}��
�
�3�r�7�7�Q�;�'�'�'����"�"�#;�<�<�<����7���G�G�Gr@�delimr&c��|j|jkr|�td|�����|�t
���|j|jkrq|���r|j|jkrt
|ddt����S|�t
���|���}|�	��d}|�
��r�|jdkr|�t
���nu|j}|�d���5|���r
||jz
}ddd��n#1swxYwY|dkr|�dt
���d	}	t|j��}|���r#|s!|tksX|t kr|t"ksB|�
��rJ|sH|tks!|t kr2|t"t$t&fvr|�t(|d
���|�sc|j|jk�rR|���}d}|�
��r�d}|j|jkr.||jz
}|���|j|jk�.t-|��dkr||z
}��Bt-|��dkrt
|||t����St-|��dkr |�t.|j���||dd
�z
}||dd
�z
}t
|||t����S|���t
|||t����S|���r/|r-||�|�
����z
}d	}nb|���r)|jdkrd}|�t
���n%||jz
}|�t
������)Nz"Invalid character for string type rTr�r�T�r�z
rF�strings������\)rJ�unitrerrUrr%r)�togglercr�rDrYr��
is_singleliner�r�r��CTRL_J�CTRL_Mr
rOr}r�is_basicr/)r=r0rw�cur�escapedr�r��closes        r>r�zParser._parse_stringsk���=�E�J�&�&��"�"�#�<�U�<�<���
�	
���-��.�.�.��=�E�J�&�&��8�8�:�:�
7���%�*�!<�!<��e�R��V�X�X�6�6�6�
�H�H�1�H�2�2�2��L�L�N�N�E��	�	�����������
	@��}��$�$����#5��6�6�6�6��m���[�[��[�.�.�-�-��x�x�z�z�-��t�}�,��-�-�-�-�-�-�-�-�-�-�-����-�-�-�-��&�=�=��J�J�q�,>�J�?�?�?���F	7��t�}�%�%�D��#�#�%�%�D
7��D
7��W�_�_���(?�(?�D�F�N�N��"�"�$�$�ES� �ES�
�G�O�O���.�.��V�V�V�$<�<�<��&�&�'9�4��K�K�K��6
7���%�*�!<�!<��<�<�>�>�����%�%�'�'���E��-�5�:�5�5����.�����
�
�
��-�5�:�5�5��5�z�z�A�~�~����� ��5�z�z�Q���%�e�U�H�f�h�h�G�G�G��5�z�z�Q���"�.�.�/G���W�W�W��U�3�B�3�Z�'�E���c�r�c�
�*�H�!�%���&�(�(�C�C�C��H�H�J�J�J��e�U�H�f�h�h�?�?�?����!�!�
7�g�
7���1�1�%�2D�2D�2F�2F�G�G�G�� ������!�!�
7�d�m�t�&;�&;������#5��6�6�6�6����&�����#5��6�6�6�MF	7s�9E$�$E(�+E(�parent_name�
Key | None�Table | None�tuple[Key, Table | AoT]c��|jdkr|�td���|���}|���|���r|�t���d}|jdkr0|���s|�t���d}	|���}n)#t$r|�t��d�wxYw|���r|�t���|jdkr |�t|j���d|_|}t|��}td�|D����r1|�td	|����d
����d}|rt|��}	nd}	t!|��t!|	��dzkrd}|t!|	��d�}t#d��}
|���|r|���|���\}}}
t'��}t)|
t+||||
��||r
|d
jn|j|���d���}t!|��dk�rz|rKt)t#d��t+d|||
��|o|d
|jvd|d
j���}|}|d
}t1|dd���D�]	\}}|�|t)t#d��t+||||
��|o|t!|��dz
k|t!|��dz
k|j|t!|��dz
kr|���nd�����}|rC|t!|��dz
kr-|�|t7|g|jd�����n|�||��|}|j}
��n
|r|d
}|����sf|���}|r3|\}}|�||
��s|�||���n|jdkr�|� ��\}}|�!||��r�|�"||��\}}|�||��|���sq|� ��\}}|�!||��snC|�"||��\}}|�||��|����qn0|�td���|�����ftG|t&��r2|}|r.|jr||jdkr|�$||��}||fS)z)
        Parses a table element.
        riz/_parse_table() called on non-bracket character.FTNr�r�c3�tK�|]3}d|j���vo|���V��4dS)r�N)rvr��is_bare)r��parts  r>r�z&Parser._parse_table.<locals>.<genexpr>�s@����Q�Q�d�s�d�h�n�n�&�&�&�9�4�<�<�>�>�Q�Q�Q�Q�Q�Qr@zInvalid table name "r��r�r)�name�display_name�is_super_table)rLrJr)rLrJrK)rJ�parsedz7_parse_item() returned None on a non-bracket character.rZ)%rJrerrOrUrarr�r	r
rr�r��anyrr�r}rr�r#r'r)rvr<�	enumerate�get�
raw_appendrrJrwrjrl�_peek_tabler�rorprr)r=rAr�r��is_aotrv�full_key�
name_parts�
missing_table�parent_name_parts�valuesr�r�r��result�table�i�_namer�ru�_keyr�key_next�
table_nexts                        r>rozParser._parse_tablewsS���=�C����"�"�#�%V���
����������
�
�
��8�8�:�:�	7��"�"�#5�6�6�6����=�C����8�8�:�:�
;��&�&�'9�:�:�:��F�	B��/�/�#�#�C�C���	B�	B�	B��"�"�#6�7�7�T�A�	B�����8�8�:�:�	G��"�"�#5�6�6�6�
�]�c�
!�
!��"�"�#6��
�F�F�F�������3�Z�Z�
��Q�Q�j�Q�Q�Q�Q�Q�	��"�"��J�8�3E�3E�3G�3G�J�J�J���
��
��	#� %�k� 2� 2��� "���z�?�?�S�!2�3�3�a�7�7�7� �M���$5� 6� 6� 8� 8�9�
��4�������
�
�
��	��H�H�J�J�J�"�7�7�9�9���W�e��������6�3���/�/��&0�=��A��"�"�c�g�!�+�+�-�-� �

�
�
���z�?�?�Q����
���d�O�O��2�s�G�U�3�3��?�z�!�}���?�#'�#�A��*������F��Q�-�C�%�j����n�5�5�
%�
%���5��	�	���!�$����v�s�G�U�;�;��;�1��J���!�(;�#;�'(�3�z�?�?�Q�+>�'>�"�Y���J���!� 3�3�3�&.�%7�%7�%9�%9�%9�!�	�	�	�����3�a�3�z�?�?�Q�#6�6�6��$�$�U�C���e�j�QU�,V�,V�,V�W�W�W�W��$�$�U�E�2�2�2�������+
%�.�
$� ��m���(�(�*�*�	��#�#�%�%�D��
�!�
��d��~�~�d�F�3�3�1��$�$�T�4�0�0�0���=�C�'�'�"&�"2�"2�"4�"4�K�A�x��~�~�h��9�9�C�/3�/@�/@��5�/Q�/Q�,��*��(�(��:�>�>�>�#'�(�(�*�*�C�*.�*:�*:�*<�*<�K�A�x�#'�>�>�(�H�#E�#E�&� %�37�3D�3D�X�u�3U�3U�0�H�j�!�,�,�X�z�B�B�B�#'�(�(�*�*�C���*�*�+�Q����9�(�(�*�*�	�B�f�d�#�#�	;��F��
;�t��
;�(�d�o�b�>Q�2Q�2Q������:�:���F�{�s�;C�&C6�tuple[bool, Key]c��|�dd���5|jdkr|�td���|���d}|jdkr|���d}	||���fcddd��S#t$r|�t��d�wxYw#1swxYwYdS)z�
        Peeks ahead non-intrusively by cloning then restoring the
        initial state of the parser.

        Returns the name of the table about to be parsed,
        as well as whether it is part of an AoT.
        T��save_markerr�riz._peek_table() entered on non-bracket characterFN)rDrJrerrUr�r	r
)r=rSs  r>rRzParser._peek_tables@���[�[�T�4�[�
8�
8�	F�	F��}��#�#��&�&�'�D����
�H�H�J�J�J��F��}��#�#����
�
�
���
F��t���0�0�0�	F�	F�	F�	F�	F�	F�	F�	F��!�
F�
F�
F��&�&�':�;�;��E�
F����	F�	F�	F�	F����	F�	F�	F�	F�	F�	Fs$�AC�7B�&B?�?C�C�	C�firstr'�
name_firstrc�|�|g}|j�|��|���sb|���\}}|r4||kr.|�|��\}}|�|��nn|����b|j���t
|d���S)zg
        Parses all siblings of the provided table first and bundles them into
        an AoT.
        T)rM)r<rmrarRro�popr)r=rdre�payload�is_aot_next�	name_nextrrZs        r>rrzParser._parse_aot-s���
�'������z�*�*�*��(�(�*�*�	�%)�%5�%5�%7�%7�"�K���
�y�J�6�6��,�,�Z�8�8���5����u�%�%�%�%��
�(�(�*�*�	�	
��������7�4�(�(�(�(r@c��|�d���5d}t|��D]7}|jd|jjzvr||jz
}|����7|cddd��S#1swxYwYdS)zk
        Peeks ahead n characters.

        n is the max number of characters that will be peeked.
        Tr2r�r�N)rD�rangerJr;�EOFrU)r=rV�bufrs    r>r�zParser._peek@s����[�[��[�
&�
&�		�		��C��1�X�X�
�
���=�
��	�
�(E�E�E��4�=�(�C��H�H�J�J�J����		�		�		�		�		�		�		�		�		�		�		�		����		�		�		�		�		�		s�AA/�/A3�6A3�is_long�tuple[str | None, str | None]c�n�|�dd���5|jdvr|�td���|���|���|rd}nd}|�|��sd\}}n�|���}|d���d	kr)|d
�	d��r	ddd��dS	tt|d
����}n#ttf$rd}YnwxYw||fcddd��S#1swxYwYdS)z�
        Peeks ahead non-intrusively by cloning then restoring the
        initial state of the parser.

        Returns the unicode value is it's a valid one else None.
        Trbr(z,_peek_unicode() entered on non-unicode valuerr��NNr�dr��01234567Nr)rDrJrerrUrcrYrOrr��chrrWr��
OverflowError)r=ror\rw�	extracteds     r>r+zParser._peek_unicodeRs����[�[�T�4�[�
8�
8�	$�	$��}�J�.�.��&�&�'�)W����
�H�H�J�J�J��I�I�K�K�K��
�������:�:�e�$�$�
!�#-� ��y�y� �L�L�N�N�	��Q�<�%�%�'�'�3�.�.�9�Q�<�3E�3E�j�3Q�3Q�.�%�)	$�	$�	$�	$�	$�	$�	$�	$�,!���I�r� 2� 2�3�3�E�E��"�M�2�!�!�!� �E�E�E�!�����)�#�7	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$�	$����	$�	$�	$�	$�	$�	$s6�B=D*�#D�D*�D�D*�D�D*�*D.�1D.)r5r6r7r8)r7r6r:)rPrQr7rR)rVrWrPrQr7rR)rrZ)r7rR)r7r8)r7r-)rur rzrr7rR)r�r!r�r!r7rR)r7r�)T)r�rRr7r�)F)r�rRr7r�)r7r!)r7r )r�rr7r)r7r)r7r)r�r6r�r)r7r)r7r%)r0r&r7r%rr)rArBr�rCr7rD)r7r`)rdr'rer!r7r)rVrWr7r6)rorRr7rp)+�__name__�
__module__�__qualname__�__doc__r?�propertyrDrGrJrMrOrUrYr_rarcrreryrlr�rjr�r�r�r�r�r�r�r�r�r�r�r�r�r�r/r�rorRrrr�r+rIr@r>r4r4:s_��������(�(�(�(�����X������X���!�!��X�!�� � ��X� �#�#�#�#�2�2�2�2�2�9�9�9�9�9�@�@�@�@���������%/�A�A�A�A�&�&�&�&�P����,@�@�@�@�"+�"+�"+�"+�H;*�;*�;*�;*�;*�z-�-�-�-�-�^*�*�*�*�����:����6z;�z;�z;�z;�x/�/�/�0�0�0�	)�	)�	)�	)�8�8�8�8�t3,�3,�3,�3,�j1�1�1�1�f6�6�6�6�6�6�6�6�+H�+H�+H�Zo7�o7�o7�o7�dFJ�Y�Y�Y�Y�Y�vF�F�F�F�6)�)�)�)�&����$#$�#$�#$�#$�#$�#$r@r4)=�
__future__rr�rr5�tomlkit._compatr�tomlkit._utilsrrr�tomlkit.containerr�tomlkit.exceptionsr	r
rrr
rrrrrrrr�
tomlkit.itemsrrrrrrrrrrr r!r"r#r$r%r&r'r(r)r*�tomlkit.sourcer+�tomlkit.toml_charr,�tomlkit.toml_documentr-r�r;r<r�r�r4rIr@r>�<module>r�s}��"�"�"�"�"�"�����	�	�	�	�
�
�
�
�"�"�"�"�"�"�)�)�)�)�)�)�#�#�#�#�#�#�(�(�(�(�(�(�'�'�'�'�'�'�,�,�,�,�,�,�2�2�2�2�2�2�2�2�2�2�2�2�7�7�7�7�7�7�1�1�1�1�1�1�/�/�/�/�/�/�3�3�3�3�3�3�1�1�1�1�1�1�/�/�/�/�/�/�7�7�7�7�7�7�)�)�)�)�)�)�2�2�2�2�2�2�1�1�1�1�1�1�������������������"�"�"�"�"�"�!�!�!�!�!�!�������"�"�"�"�"�"�������%�%�%�%�%�%�!�!�!�!�!�!�������������!�!�!�!�!�!�������#�#�#�#�#�#� � � � � � �$�$�$�$�$�$������������� � � � � � �$�$�$�$�$�$�!�!�!�!�!�!�&�&�&�&�&�&�.�.�.�.�.�.�
��	
��	
����
��{$�{$�{$�{$�{$�{$�{$�{$�{$�{$r@

Zerion Mini Shell 1.0