AlkantarClanX12

Your IP : 13.58.239.56


Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/yaml/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/yaml/__pycache__/emitter.cpython-311.pyc

�

�܋f����r�ddgZddlmZddlTGd�de��ZGd�d��ZGd�d��Zd	S)
�Emitter�EmitterError�)�	YAMLError)�*c��eZdZdS)rN)�__name__�
__module__�__qualname__���C/opt/cloudlinux/venv/lib64/python3.11/site-packages/yaml/emitter.pyrrs�������Drc��eZdZd�ZdS)�ScalarAnalysisc	�v�||_||_||_||_||_||_||_||_dS�N��scalar�empty�	multiline�allow_flow_plain�allow_block_plain�allow_single_quoted�allow_double_quoted�allow_block)	�selfrrrrrrrrs	         r
�__init__zScalarAnalysis.__init__sG�������
�"��� 0���!2���#6�� �#6�� �&����rN)rr	r
rrrr
rrs#������'�'�'�'�'rrc��eZdZddd�Z		dRd�Zd�Zd�Zd�Zd	�ZdSd�Z	d�Z
d
�Zd�ZdTd�Z
d�Zd�Z		dUd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdTd�Zd �Zd!�ZdTd"�Z d#�Z!d$�Z"d%�Z#d&�Z$d'�Z%d(�Z&d)�Z'd*�Z(d+�Z)d,�Z*d-�Z+d.�Z,d/�Z-d0�Z.d1�Z/d2�Z0d3�Z1d4�Z2d5�Z3	dSd6�Z4d7�Z5dVd8�Z6d9�Z7d:�Z8dWd<�Z9d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdL�Z:dWdM�Z;dN�Z<dO�Z=dP�Z>dWdQ�Z?dS)Xr�!z!!)rztag:yaml.org,2002:Nc��||_d|_g|_|j|_g|_d|_g|_d|_d|_	d|_
d|_d|_d|_
d|_d|_d|_d|_d|_||_||_d|_|rd|cxkrdkr
nn||_d|_|r||jdzkr||_d|_|d	vr||_d|_d|_d|_d|_d|_dS)
N�FT�r�
�P�
)�
r$z
)�stream�encoding�states�expect_stream_start�state�events�event�indents�indent�
flow_level�root_context�sequence_context�mapping_context�simple_key_context�line�column�
whitespace�	indention�
open_ended�	canonical�
allow_unicode�best_indent�
best_width�best_line_break�tag_prefixes�prepared_anchor�prepared_tag�analysis�style)rr&r9r.�widthr:�
line_breaks       r
rzEmitter.__init__&sN�������
�����-��
������
����������"��� %���$���"'�����	���������� ���#���*�������	&�a�&�o�o�o�o�2�o�o�o�o�o�%�D������	$�U�T�-�a�/�/�/�#�D�O�#����-�-�-�#-�D� �!��� $��� �����
���
�
�
rc�"�g|_d|_dSr)r(r*�rs r
�disposezEmitter.disposejs�������
�
�
rc��|j�|��|���sP|j�d��|_|���d|_|����NdSdS�Nr )r+�append�need_more_events�popr,r*�rr,s  r
�emitzEmitter.emitos������5�!�!�!��'�'�)�)�	������+�+�D�J��J�J�L�L�L��D�J��'�'�)�)�	�	�	�	�	rc�.�|jsdS|jd}t|t��r|�d��St|t��r|�d��St|t
��r|�d��SdS)NTr rr!�F)r+�
isinstance�DocumentStartEvent�need_events�SequenceStartEvent�MappingStartEventrMs  r
rKzEmitter.need_more_eventsxs����{�	��4���A����e�/�0�0�	��#�#�A�&�&�&�
��1�
2�
2�	��#�#�A�&�&�&�
��0�
1�
1�	��#�#�A�&�&�&��5rc�(�d}|jdd�D]f}t|ttf��r|dz
}n9t|tt
f��r|dz}nt|t��rd}|dkrdS�gt|j��|dzkS)Nr r���F)r+rQrR�CollectionStartEvent�DocumentEndEvent�CollectionEndEvent�StreamEndEvent�len)r�count�levelr,s    r
rSzEmitter.need_events�s������[����_�	�	�E��%�"4�6J�!K�L�L�
���
����E�$4�6H�#I�J�J�
���
����E�>�2�2�
����q�y�y��u�u���D�K� � �5��7�*�+rFc��|j�|j��|j�|r|j|_dSd|_dS|s|xj|jz
c_dSdSrI)r-rJr.r;)r�flow�
indentlesss   r
�increase_indentzEmitter.increase_indent�sl������D�K�(�(�(��;���
 �"�.�����������	,��K�K�4�+�+�K�K�K�K�	,�	,rc��t|jt��rT|jjr&t	|jd��s|jj|_|���|j|_dStd|jz���)Nr'z%expected StreamStartEvent, but got %s)
rQr,�StreamStartEventr'�hasattrr&�write_stream_start�expect_first_document_startr*rrFs r
r)zEmitter.expect_stream_start�s����d�j�"2�3�3�	"��z�"�
4�7�4�;�
�+K�+K�
4� $�
� 3��
��#�#�%�%�%��9�D�J�J�J��F��j� !�"�"�
"rc�0�td|jz���)Nzexpected nothing, but got %s)rr,rFs r
�expect_nothingzEmitter.expect_nothing�s���9�D�J�F�G�G�Grc�.�|�d���S�NT)�first)�expect_document_startrFs r
rgz#Emitter.expect_first_document_start�s���)�)��)�5�5�5rc���t|jt���r�|jjs|jjr1|jr*|�dd��|���|jjr4|�|jj��}|�	|��|j
���|_|jjr�t|jj�����}|D]^}|jj|}||j|<|�|��}|�|��}|�||���_|oC|jjo6|jo.|jjo!|jjo|���}|sE|���|�dd��|jr|���|j|_dSt|jt.��rS|jr*|�dd��|���|���|j|_dSt5d|jz���)N�...T�---z'expected DocumentStartEvent, but got %s)rQr,rR�version�tagsr8�write_indicator�write_indent�prepare_version�write_version_directive�DEFAULT_TAG_PREFIXES�copyr>�sorted�keys�prepare_tag_handle�prepare_tag_prefix�write_tag_directive�explicitr9�check_empty_document�expect_document_rootr*r[�write_stream_endrir)	rrl�version_text�handles�handle�prefix�handle_text�prefix_text�implicits	         r
rmzEmitter.expect_document_start�s���d�j�"4�5�5�!	"��
�"�
$�d�j�o�
$�4�?�
$��$�$�U�D�1�1�1��!�!�#�#�#��z�!�
;�#�3�3�D�J�4F�G�G���,�,�\�:�:�:� $� 9� >� >� @� @�D���z��
G� ����!5�!5�!7�!7�8�8��%�G�G�F�!�Z�_�V�4�F�06�D�%�f�-�"&�"9�"9�&�"A�"A�K�"&�"9�"9�&�"A�"A�K��,�,�[�+�F�F�F�F��8�d�j�&9�"9�8�$�.�>P�8� �J�.�.�8�7;�z��3F�8� �5�5�7�7�7�
��
(��!�!�#�#�#��$�$�U�D�1�1�1��>�(��%�%�'�'�'��2�D�J�J�J�
��
�N�
3�
3�	"���
$��$�$�U�D�1�1�1��!�!�#�#�#��!�!�#�#�#��,�D�J�J�J��H��j� !�"�"�
"rc�<�t|jt��rl|���|jjr*|�dd��|���|���|j|_dStd|jz���)NroTz%expected DocumentEndEvent, but got %s)
rQr,rYrtr~rs�flush_streamrmr*rrFs r
�expect_document_endzEmitter.expect_document_end�s����d�j�"2�3�3�		"��������z�"�
$��$�$�U�D�1�1�1��!�!�#�#�#��������3�D�J�J�J��F��j� !�"�"�
"rc�p�|j�|j��|�d���dS)NT)�root)r(rJr��expect_noderFs r
r�zEmitter.expect_document_root�s8������4�3�4�4�4����d��#�#�#�#�#rc��||_||_||_||_t	|jt��r|���dSt	|jttf���rC|�
d��|���t	|jt��r|���dSt	|jt��rZ|js'|js |jjs|���r|���dS|���dSt	|jt(��rZ|js'|js |jjs|���r|���dS|���dSdSt1d|jz���)N�&zexpected NodeEvent, but got %s)r0r1r2r3rQr,�
AliasEvent�expect_alias�ScalarEventrX�process_anchor�process_tag�
expect_scalarrTr/r9�
flow_style�check_empty_sequence�expect_flow_sequence�expect_block_sequencerU�check_empty_mapping�expect_flow_mapping�expect_block_mappingr)rr��sequence�mapping�
simple_keys     r
r�zEmitter.expect_node�s��� ��� (���&���",����d�j�*�-�-�	N���������
��
�[�2F�$G�
H�
H�	N�����$�$�$��������$�*�k�2�2�

0��"�"�$�$�$�$�$��D�J�(:�;�;�
0��?�1�d�n�1��
�8M�1��4�4�6�6�1��-�-�/�/�/�/�/��.�.�0�0�0�0�0��D�J�(9�:�:�
0��?�0�d�n�0��
�8M�0��3�3�5�5�0��,�,�.�.�.�.�.��-�-�/�/�/�/�/�
0�
0��?�$�*�L�M�M�Mrc��|jj�td���|�d��|j���|_dS)Nz!anchor is not specified for aliasr)r,�anchorrr�r(rLr*rFs r
r�zEmitter.expect_aliassG���:��$��B�C�C�C����C� � � ��[�_�_�&�&��
�
�
rc���|�d���|���|j���|_|j���|_dS)NT�r`)rb�process_scalarr-rLr.r(r*rFs r
r�zEmitter.expect_scalar
sW�����$��'�'�'��������l�&�&�(�(����[�_�_�&�&��
�
�
rc��|�ddd���|xjdz
c_|�d���|j|_dS)N�[T�r6rr�)rsr/rb�expect_first_flow_sequence_itemr*rFs r
r�zEmitter.expect_flow_sequencesR�����S�$�4��8�8�8����1�������$��'�'�'��9��
�
�
rc���t|jt��rd|j���|_|xjdzc_|�dd��|j���|_	dS|j
s|j|jkr|�
��|j�|j��|�d���dS)Nr�]FT�r�)rQr,�SequenceEndEventr-rLr.r/rsr(r*r9r5r<rtrJ�expect_flow_sequence_itemr�rFs r
r�z'Emitter.expect_first_flow_sequence_items����d�j�"2�3�3�		,��,�*�*�,�,�D�K��O�O�q� �O�O�� � ��e�,�,�,�����*�*�D�J�J�J��~�
$���t��!>�!>��!�!�#�#�#��K���t�=�>�>�>����d��+�+�+�+�+rc�P�t|jt��r�|j���|_|xjdzc_|jr*|�dd��|�	��|�dd��|j
���|_dS|�dd��|js|j|j
kr|�	��|j
�|j��|�d���dS)Nr�,Fr�Tr�)rQr,r�r-rLr.r/r9rsrtr(r*r5r<rJr�r�rFs r
r�z!Emitter.expect_flow_sequence_item$s���d�j�"2�3�3�
	,��,�*�*�,�,�D�K��O�O�q� �O�O��~�
$��$�$�S�%�0�0�0��!�!�#�#�#�� � ��e�,�,�,�����*�*�D�J�J�J�� � ��e�,�,�,��~�
$���t��!>�!>��!�!�#�#�#��K���t�=�>�>�>����d��+�+�+�+�+rc��|�ddd���|xjdz
c_|�d���|j|_dS)N�{Tr�rr�)rsr/rb�expect_first_flow_mapping_keyr*rFs r
r�zEmitter.expect_flow_mapping6sR�����S�$�4��8�8�8����1�������$��'�'�'��7��
�
�
rc��t|jt��rd|j���|_|xjdzc_|�dd��|j���|_	dS|j
s|j|jkr|�
��|j
sL|���r8|j�|j��|�dd���dS|�dd��|j�|j��|�d���dS)Nr�}FT�r�r��?�r�)rQr,�MappingEndEventr-rLr.r/rsr(r*r9r5r<rt�check_simple_keyrJ� expect_flow_mapping_simple_valuer��expect_flow_mapping_valuerFs r
r�z%Emitter.expect_first_flow_mapping_key<s3���d�j�/�2�2�	/��,�*�*�,�,�D�K��O�O�q� �O�O�� � ��e�,�,�,�����*�*�D�J�J�J��~�
$���t��!>�!>��!�!�#�#�#��>�
/�d�&;�&;�&=�&=�
/���"�"�4�#H�I�I�I�� � ��$� �?�?�?�?�?��$�$�S�$�/�/�/���"�"�4�#A�B�B�B�� � �� �.�.�.�.�.rc�"�t|jt��r�|j���|_|xjdzc_|jr*|�dd��|�	��|�dd��|j
���|_dS|�dd��|js|j|j
kr|�	��|jsL|���r8|j
�|j��|�dd���dS|�dd��|j
�|j��|�d���dS)	Nrr�Fr�Tr�r�r�)rQr,r�r-rLr.r/r9rsrtr(r*r5r<r�rJr�r�r�rFs r
�expect_flow_mapping_keyzEmitter.expect_flow_mapping_keyMs{���d�j�/�2�2�	/��,�*�*�,�,�D�K��O�O�q� �O�O��~�
$��$�$�S�%�0�0�0��!�!�#�#�#�� � ��e�,�,�,�����*�*�D�J�J�J�� � ��e�,�,�,��~�
$���t��!>�!>��!�!�#�#�#��>�
/�d�&;�&;�&=�&=�
/���"�"�4�#H�I�I�I�� � ��$� �?�?�?�?�?��$�$�S�$�/�/�/���"�"�4�#A�B�B�B�� � �� �.�.�.�.�.rc��|�dd��|j�|j��|�d���dS�N�:FTr�)rsr(rJr�r�rFs r
r�z(Emitter.expect_flow_mapping_simple_valuebsN�����S�%�(�(�(�����4�7�8�8�8������&�&�&�&�&rc���|js|j|jkr|���|�dd��|j�|j��|�d���dS)Nr�Tr�)	r9r5r<rtrsr(rJr�r�rFs r
r�z!Emitter.expect_flow_mapping_valuegsx���>�	 �T�[�4�?�:�:����������S�$�'�'�'�����4�7�8�8�8������&�&�&�&�&rc�j�|jo|j}|�d|���|j|_dS)NF)r`ra)r2r7rb� expect_first_block_sequence_itemr*)rras  r
r�zEmitter.expect_block_sequenceps;���*�A�4�>�/A�
����%�J��?�?�?��:��
�
�
rc�.�|�d���Srk)�expect_block_sequence_itemrFs r
r�z(Emitter.expect_first_block_sequence_itemus���.�.�T�.�:�:�:rc�|�|sXt|jt��r>|j���|_|j���|_dS|���|�	ddd���|j�
|j��|�d���dS)N�-T�r7r�)
rQr,r�r-rLr.r(r*rtrsrJr�r��rrls  r
r�z"Emitter.expect_block_sequence_itemxs����	,��D�J�0@�A�A�	,��,�*�*�,�,�D�K�����*�*�D�J�J�J�������� � ��d�d� �;�;�;��K���t�>�?�?�?����d��+�+�+�+�+rc�J�|�d���|j|_dS)NFr�)rb�expect_first_block_mapping_keyr*rFs r
r�zEmitter.expect_block_mapping�s'�����%��(�(�(��8��
�
�
rc�.�|�d���Srk)�expect_block_mapping_keyrFs r
r�z&Emitter.expect_first_block_mapping_key�s���,�,�4�,�8�8�8rc��|sXt|jt��r>|j���|_|j���|_dS|���|�	��r8|j�
|j��|�dd���dS|�
ddd���|j�
|j��|�d���dS)NTr�r�r�r�)rQr,r�r-rLr.r(r*rtr�rJ�!expect_block_mapping_simple_valuer�rs�expect_block_mapping_valuer�s  r
r�z Emitter.expect_block_mapping_key�s����	/��D�J��@�@�	/��,�*�*�,�,�D�K�����*�*�D�J�J�J��������$�$�&�&�
/���"�"�4�#I�J�J�J�� � ��$� �?�?�?�?�?��$�$�S�$�$�$�?�?�?���"�"�4�#B�C�C�C�� � �� �.�.�.�.�.rc��|�dd��|j�|j��|�d���dSr�)rsr(rJr�r�rFs r
r�z)Emitter.expect_block_mapping_simple_value�sN�����S�%�(�(�(�����4�8�9�9�9������&�&�&�&�&rc���|���|�ddd���|j�|j��|�d���dS)Nr�Tr�r�)rtrsr(rJr�r�rFs r
r�z"Emitter.expect_block_mapping_value�se�����������S�$�$��7�7�7�����4�8�9�9�9������&�&�&�&�&rc��t|jt��o&|jot|jdt��SrI)rQr,rTr+r�rFs r
r�zEmitter.check_empty_sequence�s<���4�:�'9�:�:�A�t�{�A��t�{�1�~�/?�@�@�	Brc��t|jt��o&|jot|jdt��SrI)rQr,rUr+r�rFs r
r�zEmitter.check_empty_mapping�s;���4�:�'8�9�9�@�d�k�@��t�{�1�~��?�?�	Arc���t|jt��r|jsdS|jd}t|t��o#|jduo|jduo|jo
|jdkS)NFr �)	rQr,rRr+r�r��tagr��valuerMs  r
rzEmitter.check_empty_document�s}���$�*�&8�9�9�	���	��5���A����5�+�.�.�O�5�<�4�3G�O��I��%�O�*/�.�O�=B�[�B�=N�	Prc�n�d}t|jt��rN|jj�B|j�$|�|jj��|_|t
|j��z
}t|jttf��rN|jj	�B|j
�$|�|jj	��|_
|t
|j
��z
}t|jt��rG|j�$|�
|jj��|_|t
|jj��z
}|dkout|jt ��p[t|jt��o|jjo|jjp'|���p|���S)Nr �)rQr,�	NodeEventr�r?�prepare_anchorr\r�rXr�r@�prepare_tagrA�analyze_scalarr�rr�rrr�r�)r�lengths  r
r�zEmitter.check_simple_key�s������d�j�)�,�,�	0���1B�1N��#�+�'+�':�':�4�:�;L�'M�'M��$��c�$�.�/�/�/�F��d�j�;�0D�"E�F�F�	-��J�N�.�� �(�$(�$4�$4�T�Z�^�$D�$D��!��c�$�+�,�,�,�F��d�j�+�.�.�	0��}�$� $� 3� 3�D�J�4D� E� E��
��c�$�-�.�/�/�/�F����J�*�T�Z��"D�"D�#I��4�:�{�3�3�P� �M�/�/�P�8<�
�8O�4O�#I��(�(�*�*�#I�/3�.F�.F�.H�.H�	Krc���|jj�	d|_dS|j�$|�|jj��|_|jr|�||jzd��d|_dS)NT)r,r�r?r�rs)r�	indicators  r
r�zEmitter.process_anchor�sv���:��$�#'�D� ��F���'�#'�#6�#6�t�z�7H�#I�#I�D� ���	G�� � ��4�+?�!?��F�F�F�#����rc�X�|jj}t|jt��r�|j�|���|_|jr|�C|jdkr|jjds|jdkr|jjdr	d|_dS|jjdr|�	d}d|_n|jr|�|jjr	d|_dS|�td���|j�|�
|��|_|jr|�|jd��d|_dS)Nr�r rrztag is not specifiedT)r,r�rQr�rB�choose_scalar_styler9r�r@rr�rs)rr�s  r
r�zEmitter.process_tag�s:���j�n���d�j�+�.�.�	��z�!�!�5�5�7�7��
��^�
�s�{��*��"�"�t�z�':�1�'=�"� �J�"�,�,���1D�Q�1G�,�$(��!����z�"�1�%�
)�#�+���$(��!���N�
�c�k�t�z�7J�k�$(��!����;��5�6�6�6���$� $� 0� 0�� 5� 5�D����	:�� � ��!2�D�9�9�9� ����rc�R�|j�$|�|jj��|_|jjdks|jrdS|jjsY|jjdrG|jr|jjs4|jj	s(|j
r|jjs|j
s|jjrdS|jjr4|jjdvr&|j
s|js|jj
r|jjS|jjr|jjdkr!|jjr|jr|jj	sdSdS)N�"r r�z|>�')rAr�r,r�rBr9r�r3rrr/rrrrrFs r
r�zEmitter.choose_scalar_style�sO���=� � �/�/��
�0@�A�A�D�M��:��s�"�"�d�n�"��3��z��	�D�J�$7��$:�	��,�
��]�(�
�,0�M�,C�
��_�
�)-��)G�
�!�O�
�15�
�0O�
��r��:��	(��
� 0�D� 8� 8��O�
(�D�,C�
(��
�1�
(��z�'�'��z��	�4�:�#3�t�#;�#;��
�1�
��0�
�59�]�5L�
��t��src�d�|j�$|�|jj��|_|j�|���|_|j}|jdkr!|�|jj|��n�|jdkr!|�	|jj|��nv|jdkr |�
|jj��nK|jdkr |�|jj��n |�|jj|��d|_d|_dS)Nr�r��>�|)
rAr�r,r�rBr�r3�write_double_quotedr�write_single_quoted�write_folded�
write_literal�write_plain)r�splits  r
r�zEmitter.process_scalars!���=� � �/�/��
�0@�A�A�D�M��:���1�1�3�3�D�J��,�,���:�����$�$�T�]�%9�5�A�A�A�A�
�Z�4�
�
��$�$�T�]�%9�5�A�A�A�A�
�Z�3�
�
����d�m�2�3�3�3�3�
�Z�3�
�
����t�}�3�4�4�4�4����T�]�1�5�9�9�9���
���
�
�
rc�N�|\}}|dkrtd||fz���d||fzS)Nrzunsupported YAML version: %d.%dz%d.%d�r)rrq�major�minors    r
ruzEmitter.prepare_versions;�����u��A�:�:��@�E�5�>�Q�R�R�R��%���'�'rc�"�|std���|ddks|ddkrtd|z���|dd�D]H}d|cxkrdks9nd	|cxkrd
ks*nd|cxkrdksn|d
vstd|�d|������I|S)Nztag handle must not be emptyr rrWz*tag handle must start and end with '!': %rr�0�9�A�Z�a�z�-_�invalid character z in the tag handle: r�)rr��chs   r
r{zEmitter.prepare_tag_handle!s����	?��=�>�>�>��!�9����v�b�z�S�0�0��K�f�T�U�U�U���2��,�	(�	(�B��2�$�$�$�$��$�$�$�$��r�(8�(8�(8�(8�S�(8�(8�(8�(8�C�2�<L�<L�<L�<L��<L�<L�<L�<L��T�z�z�"�l��2�2�v�v�$'�(�(�(���
rc�X�|std���g}dx}}|ddkrd}|t|��kr�||}d|cxkrdks$nd|cxkrdksnd	|cxkrd
ksn|dvr|dz
}ni||kr|�|||���|dzx}}|�d��}|D]'}|�d
t	|��z���(|t|��k��||kr|�|||���d�|��S)Nztag prefix must not be emptyr rrr�r�r�r�r�r�z-;/?!:@&=+$,_.~*'()[]�utf-8�%%%02Xr�)rr\rJ�encode�ord�join)rr��chunks�start�endr��datas       r
r|zEmitter.prepare_tag_prefix-s����	?��=�>�>�>��������!�9�����C��C��K�K������B��b�����C�����3�"�#3�#3�#3�#3��#3�#3�#3�#3�s�b�7G�7G�7G�7G�C�7G�7G�7G�7G��5�5�5��q�����3�;�;��M�M�&��s��"3�4�4�4�!�!�e�#����y�y��)�)���6�6�B��M�M�(�S��W�W�"4�5�5�5�5��C��K�K����3�;�;��M�M�&��s��+�,�,�,��w�w�v���rc��|std���|dkr|Sd}|}t|j�����}|D]a}|�|��rJ|dks t|��t|��kr$|j|}|t|��d�}�bg}dx}}|t|��kr�||}	d|	cxkrdks0nd|	cxkrdks!nd|	cxkrd	ksn|	d
vs|	dkr|dkr|dz
}n\||kr|�|||���|dzx}}|	�d��}
|
D]}	|�d
|	z���|t|��k��||kr|�|||���d�|��}|r|�|��Sd|zS)Nztag must not be emptyrr r�r�r�r�r�r�z-;/?:@&=+$,_.~*'()[]rrrr�z!<%s>)	rryr>rz�
startswithr\rJrr)rr�r��suffix�prefixesr�rrrr�r�suffix_texts            r
r�zEmitter.prepare_tagDs1���	8��6�7�7�7��#�:�:��J������$�+�0�0�2�2�3�3���	+�	+�F��~�~�f�%�%�
+��3���#�f�+�+��C���*@�*@��*�6�2���S��[�[�\�\�*����������C��K�K������B��b�����C�����3�"�#3�#3�#3�#3��#3�#3�#3�#3�s�b�7G�7G�7G�7G�C�7G�7G�7G�7G��4�4�4��c�	�	�f��m�m��q�����3�;�;��M�M�&��s��"3�4�4�4�!�!�e�#����y�y��)�)���1�1�B��M�M�(�R�-�0�0�0�0��C��K�K����3�;�;��M�M�&��s��+�,�,�,��g�g�f�o�o���	)�#�V�[�[�1�1��[�(�(rc��|std���|D]H}d|cxkrdks9nd|cxkrdks*nd|cxkrdksn|dvstd	|�d
|������I|S)Nzanchor must not be emptyr�r�r�r�r�r�r�r�z in the anchor: r�)rr�r�s   r
r�zEmitter.prepare_anchorhs����	;��9�:�:�:��	(�	(�B��2�$�$�$�$��$�$�$�$��r�(8�(8�(8�(8�S�(8�(8�(8�(8�C�2�<L�<L�<L�<L��<L�<L�<L�<L��T�z�z�"�l��2�2�v�v�$'�(�(�(���
rc
�l�|st|ddddddd���Sd}d}d}d}d}d}d}d}	d}
d}|�d��s|�d��rd}d}d}t|��dkp	|ddv}
d}d}d}|t|��k�rN||}|dkr|d	vrd}d}|d
vrd}|
rd}|dkr|
rd}d}n|dvrd}|d
krd}|
rd}|dkr|rd}d}|dvrd}|dksWd|cxkrdksJn|dks.d|cxkrdks!nd|cxkrdksnd|cxkrdkrnn|dkrd}|jsd}nd}|dkr)|dkrd}|t|��dz
krd}|rd}
d}d}n1|dvr)|dkrd}|t|��dz
krd}	|rd}d}d}nd}d}|dz
}|dv}|dzt|��kp||dzdv}
|t|��k��Nd}d}d}d}d}|s|s|s|	rdx}}|rd}|
rdx}x}}|s|rdx}x}x}}|rdx}}|rd}|rd}t|d||||||���S)NTFrrproru
 	
…

r z#,[]{}&*!|>'"%@`z?:r�z,?[]{}r��#�	
…

r$� �~�…� �퟿���u𐀀u􏿿�)rr
r\r:)rr�block_indicators�flow_indicators�line_breaks�special_characters�
leading_space�
leading_break�trailing_space�trailing_break�break_space�space_break�preceded_by_whitespace�followed_by_whitespace�previous_space�previous_break�indexr��unicode_charactersrrrrrs                        r
r�zEmitter.analyze_scalarrsn���	'�!��t�u�%*�d�(,�$� %�'�'�'�
'�!������"���
��
������������U�#�#�	#�v�'8�'8��'?�'?�	#�#��"�O�"&��#&�f�+�+��"2�#9��q�	�8�8�	��������c�&�k�k�!�!����B���z�z��-�-�-�&*�O�'+�$���:�:�&*�O�-�0�+/�(���9�9�!7�9�&*�O�'+�$����>�>�&*�O���9�9�&*�O�-�0�+/�(���9�9�!7�9�&*�O�'+�$��)�)�)�"���$�J�J�&�B�"8�"8�"8�"8�&�"8�"8�"8�"8��&�L�L�F�b�$<�$<�$<�$<�H�$<�$<�$<�$<�#�r�5�5�5�5�X�5�5�5�5�'�2�<�<�<�<��<�<�<�<�<�"��.�.�)-�&��-�2�-1�*��)-�&��S�y�y��A�:�:�$(�M��C��K�K��M�)�)�%)�N�!�'�"&�K�!%��!&����+�+�+��A�:�:�$(�M��C��K�K��M�)�)�%)�N�!�'�"&�K�!&��!%���!&��!&��
�Q�J�E�&(�,G�&G�"�&+�A�g��V���&<�'C��5��7�O�'B�B�
#�G�c�&�k�k�!�!�N �� ��"��"����
�	9�]�	9�!�	9�%3�	9�38�8��0��	 ��K��	O�IN�N��N�0�3F��	6�,�	6�05�
6��
6�0�
6��+��	9�38�8��0��	%�$���	&� %���V��{�!1�"3�$7�$7�'�
)�)�)�	)rc�f�t|jd��r|j���dSdS)N�flush)rer&r+rFs r
r�zEmitter.flush_streams:���4�;��(�(�	 ��K��������	 �	 rc��|jrN|j�d��r6|j�d�|j����dSdSdS)Nzutf-16r)r'r
r&�writerrFs r
rfzEmitter.write_stream_startsa���=�	>�T�]�5�5�h�?�?�	>��K���h�o�o�d�m�<�<�=�=�=�=�=�	>�	>�	>�	>rc�.�|���dSr)r�rFs r
r�zEmitter.write_stream_ends���������rc��|js|s|}nd|z}||_|jo||_|xjt|��z
c_d|_|jr|�|j��}|j�|��dS)NrF)	r6r7r5r\r8r'rr&r-)rr��need_whitespacer6r7rs      r
rszEmitter.write_indicator s����?�	!�/�	!��D�D��y�=�D�$�����5�I������s�4�y�y� �������=�	.��;�;�t�}�-�-�D�����$�����rc�N�|jpd}|jr|j|ks|j|kr|js|���|j|krXd|_d||jz
z}||_|jr|�|j��}|j�|��dSdS)Nr Tr)	r.r7r5r6�write_line_breakr'rr&r-)rr.rs   r
rtzEmitter.write_indent.s�����!����~�	$���v�!5�!5��K�6�)�)�$�/�)��!�!�#�#�#��;����"�D�O���t�{�*�+�D� �D�K��}�
2��{�{�4�=�1�1���K���d�#�#�#�#�#�
 �rc���|�|j}d|_d|_|xjdz
c_d|_|jr|�|j��}|j�|��dS)NTrr )	r=r6r7r4r5r'rr&r-)rrs  r
r2zEmitter.write_line_break;sl���<��'�D��������	�	�Q��	�	�����=�	.��;�;�t�}�-�-�D�����$�����rc��d|z}|jr|�|j��}|j�|��|���dS)Nz	%%YAML %s�r'rr&r-r2)rr�rs   r
rvzEmitter.write_version_directiveFsW���\�)���=�	.��;�;�t�}�-�-�D�����$�����������rc��d|�d|��}|jr|�|j��}|j�|��|���dS)Nz%TAG rr5)rr�r�rs    r
r}zEmitter.write_tag_directiveMs_��� +���[�[�9���=�	.��;�;�t�}�-�-�D�����$�����������rTc��|�dd��d}d}dx}}|t|��k�rDd}|t|��kr||}|r�|�|dkr�|dz|kr@|j|jkr0|r.|dkr(|t|��kr|���nb|||�}|xjt|��z
c_|jr|�|j��}|j�|��|}n�|rz|�|dvrs||dkr|�	��|||�D]2}	|	dkr|�	���|�	|	���3|���|}nv|�
|d	vs|dkrj||krd|||�}|xjt|��z
c_|jr|�|j��}|j�|��|}|dkrRd
}|xjdz
c_|jr|�|j��}|j�|��|dz}|�
|dk}|dv}|dz
}|t|��k��D|�dd��dS)Nr�TFr rrrr$�
 
…

z''r!)
rsr\r5r<rtr'rr&r-r2)
r�textr��spaces�breaksrrr�r�brs
          r
r�zEmitter.write_single_quotedVs������T�4�(�(�(����������S��Y�Y����B��S��Y�Y����#�Y���
$��:��s����Q�w�#�~�~�$�+���*G�*G�E�*G� %��
�
�s�c�$�i�i�/?�/?��)�)�+�+�+�+�#�E�#�I������s�4�y�y�0����=�>�#'�;�;�t�}�#=�#=�D���)�)�$�/�/�/��E���
$��:��+?�!?�!?��E�{�d�*�*��-�-�/�/�/�"�5��9�o�6�6����:�:� �1�1�3�3�3�3� �1�1�"�5�5�5�5��%�%�'�'�'��E���:��'<�!<�!<��d�
�
��s�{�{�#�E�#�I������s�4�y�y�0����=�>�#'�;�;�t�}�#=�#=�D���)�)�$�/�/�/� #���T�z�z������q� ����=�6��;�;�t�}�5�5�D���!�!�$�'�'�'��a����~���)��� 4�4���1�H�C�]�S��Y�Y���^	
���T�5�)�)�)�)�)rr�r��b�t�n�v�f�r�er��\�N�_�L�P)����	r$��r%�r�rDrru
u
c�:�|�dd��dx}}|t|��k�r�d}|t|��kr||}|�;|dvs7d|cxkrdk�sPn|jr d|cxkrdk�s9nd	|cxkrd
k�s)n||krd|||�}|xjt|��z
c_|jr|�|j��}|j�|��|}|��||jvrd|j|z}nD|dkrd
t|��z}n+|dkrdt|��z}ndt|��z}|xjt|��z
c_|jr|�|j��}|j�|��|dz}d|cxkrt|��dz
k�rn�n|dks||k�r
|j||z
z|j
kr�|r�|||�dz}||kr|}|xjt|��z
c_|jr|�|j��}|j�|��|���d|_d|_
||dkrZd}|xjt|��z
c_|jr|�|j��}|j�|��|dz
}|t|��k���|�dd��dS)Nr�Tr u
"\…

rrrrrrrD�ÿz\x%02Xu￿z\u%04Xz\U%08XrF)rsr\r:r5r'rr&r-�ESCAPE_REPLACEMENTSrr<rtr6r7)rr9r�rrr�rs       r
r�zEmitter.write_double_quoted�se�����S�$�'�'�'������S��Y�Y����B��S��Y�Y����#�Y���z�R�#>�>�>�"�b�2�2�2�2�F�2�2�2�2� �.�3�!'�2�!9�!9�!9�!9��!9�!9�!9�!9�#+�r�#=�#=�#=�#=�X�#=�#=�#=�#=��3�;�;���c�	�?�D��K�K�3�t�9�9�,�K�K��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+��E��>��T�5�5�5�#�D�$<�R�$@�@����v���(�3�r�7�7�2����x���(�3�r�7�7�2���(�3�r�7�7�2���K�K�3�t�9�9�,�K�K��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+���E�E��3�$�$�$�$��T���1��$�$�$�$�$�"��)�)�u��|�|���S��Y�/�$�/�A�A�e�A��E�#�I��t�+���3�;�;��E����s�4�y�y�(����=�6��;�;�t�}�5�5�D���!�!�$�'�'�'��!�!�#�#�#�"'���!&�����;�#�%�%��D��K�K�3�t�9�9�,�K�K��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+��1�H�C�a�S��Y�Y���b	
���S�%�(�(�(�(�(rc��d}|rS|ddvr|t|j��z
}|ddvr|dz
}n"t|��dks
|ddvr|d	z
}|S)
Nr�r r8rWrr�r����+)�strr;r\)rr9�hintss   r
�determine_block_hintszEmitter.determine_block_hints�s{�����	��A�w�/�/�/���T�-�.�.�.���B�x�3�3�3�������T���a���4��8�/C�#C�#C������rc���|�|��}|�d|zd��|dd�dkrd|_|���d}d}d}dx}}|t	|��k�r�d}|t	|��kr||}|r�|�|dvr�|s(|�&|dkr ||d	kr|���|dk}|||�D]2}	|	d	kr|����|�|	���3|�|���|}�n|r�|dkr�|d
z|kr%|j|jkr|���nb|||�}
|xjt	|
��z
c_|jr|
�	|j��}
|j
�|
��|}n�|�|dvrz|||�}
|xjt	|
��z
c_|jr|
�	|j��}
|j
�|
��|�|���|}|�
|dv}|dk}|d
z
}|t	|��k���dSdS)Nr�TrWrUFr rrr$rr8)rXrsr8r2r\rtr5r<r'rr&r-)rr9rWrr:r;rrr�r<rs           r
r�zEmitter.write_folded�s����*�*�4�0�0�����S��Y��-�-�-�����:����"�D�O��������
����������S��Y�Y����B��S��Y�Y����#�Y���"
 ��:��+?�!?�!?�(�0�R�^��c�	�	� $�U��t� 3� 3��-�-�/�/�/�%'�3�Y�M�"�5��9�o�6�6����:�:� �1�1�3�3�3�3� �1�1�"�5�5�5�5��~��)�)�+�+�+��E���
 ���9�9��Q�w�#�~�~�$�+���*G�*G��)�)�+�+�+�+�#�E�#�I������s�4�y�y�0����=�>�#'�;�;�t�}�#=�#=�D���)�)�$�/�/�/��E���:��'<�!<�!<���c�	�?�D��K�K�3�t�9�9�,�K�K��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+��z��-�-�/�/�/��E��~�� 4�4����)���1�H�C�U�S��Y�Y������rc���|�|��}|�d|zd��|dd�dkrd|_|���d}dx}}|t	|��kr�d}|t	|��kr||}|r\|�|dvrU|||�D]2}|dkr|����|�|���3|�|���|}nc|�|dvr]|||�}|jr|�|j��}|j�	|��|�|���|}|�|dv}|dz
}|t	|��k��dSdS)	Nr�TrWrUr rr$r)
rXrsr8r2r\rtr'rr&r-)	rr9rWr;rrr�r<rs	         r
r�zEmitter.write_literals����*�*�4�0�0�����S��Y��-�-�-�����:����"�D�O��������������S��Y�Y����B��S��Y�Y����#�Y���
 ��:��+?�!?�!?�"�5��9�o�6�6����:�:� �1�1�3�3�3�3� �1�1�"�5�5�5�5��~��)�)�+�+�+��E���:��';�!;�!;���c�	�?�D��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+��z��-�-�/�/�/��E��~�� 4�4���1�H�C�3�S��Y�Y������rc��|jrd|_|sdS|jsZd}|xjt	|��z
c_|jr|�|j��}|j�|��d|_d|_	d}d}dx}}|t	|��k�r�d}|t	|��kr||}|r�|dkr�|dz|kr5|j|j
kr%|r#|���d|_d|_	nb|||�}|xjt	|��z
c_|jr|�|j��}|j�|��|}n�|r�|dvr�||dkr|���|||�D]2}	|	dkr|����|�|	���3|���d|_d|_	|}nj|�|dvrd|||�}|xjt	|��z
c_|jr|�|j��}|j�|��|}|�
|dk}|dv}|dz
}|t	|��k���dSdS)	NTrFr rrr$r8)
r0r8r6r5r\r'rr&r-r7r<rtr2)
rr9r�rr:r;rrr�r<s
          r
r�zEmitter.write_plain8s�����	#�"�D�O��	��F���	$��D��K�K�3�t�9�9�$�K�K��}�
2��{�{�4�=�1�1���K���d�#�#�#����������������S��Y�Y����B��S��Y�Y����#�Y���!
 ���9�9��Q�w�#�~�~�$�+���*G�*G�E�*G��)�)�+�+�+�*/���).����#�E�#�I������s�4�y�y�0����=�>�#'�;�;�t�}�#=�#=�D���)�)�$�/�/�/��E���
 ��1�1�1��E�{�d�*�*��-�-�/�/�/�"�5��9�o�6�6����:�:� �1�1�3�3�3�3� �1�1�"�5�5�5�5��%�%�'�'�'�&+�D�O�%*�D�N��E���:��'<�!<�!<���c�	�?�D��K�K�3�t�9�9�,�K�K��}�:�#�{�{�4�=�9�9���K�%�%�d�+�+�+��E��~���)��� 4�4���1�H�C�S�S��Y�Y������r)NNNNN)FF)F)FFFFr)T)@rr	r
rwrrGrNrKrSrbr)rirgrmr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rr�r�r�r�r�rur{r|r�r�r�r�rfr�rsrtr2rvr}r�rRr�rXr�r�r�rrr
rrsK�������#����
CG�+/�B�B�B�B�H���
������,�,�,�,�,�,�,�"�"�"�H�H�H�
6�6�6�""�""�""�""�H
"�
"�
"�$�$�$�?D��N�N�N�N�8'�'�'�'�'�'�:�:�:�
,�
,�
,�,�,�,�$8�8�8�/�/�/�"/�/�/�*'�'�'�
'�'�'�;�;�;�
;�;�;�,�,�,�,�9�9�9�9�9�9�/�/�/�/�'�'�'�
'�'�'�B�B�B�A�A�A�P�P�P�K�K�K�,$�$�$�!�!�!�2���*���0(�(�(�
�
�
����.")�")�")�H���^)�^)�^)�D � � �>�>�>�
���).� � � � �$�$�$�	 �	 �	 �	 � � � � � � �4*�4*�4*�4*�n������������������$4)�4)�4)�4)�l	�	�	�4�4�4�l!�!�!�F9�9�9�9�9�9rN)�__all__�errorrr+rrrrrr
�<module>r^s����n�
%������������	�	�	�	�	�9�	�	�	�'�'�'�'�'�'�'�'�R�R�R�R�R�R�R�R�R�Rr