Your IP : 3.14.255.58


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/plistlib.cpython-312.opt-1.pyc

�

�Q�f�n���dZgd�ZddlZddlZddlZddlZddlmZddlZddl	Z	ddl
Z
ddlZddlm
Z
ejdde��Ze�j%ej&�Gd	�d
�ZdZe
j,d�Zd1d
�Zd�Ze
j,de
j4�Zd�Zd�Zd�ZGd�d�ZGd�d�Z Gd�de �Z!d�Z"Gd�de#�Z$ddddd �Z%e&�Z'Gd!�d"�Z(d#�Z)e*e+e,eje-fZ.Gd$�d%e&�Z/d&�Z0e1e2e"ee!�'�e3e2e0e(e/�'�iZ4de2d(�d)�Z5de2d(�d*�Z6e1d+d,d-�d.�Z7e1d,d+d/�d0�Z8y)2a>plistlib.py -- a tool to generate and parse MacOSX .plist files.

The property list (.plist) file format is a simple XML pickle supporting
basic object types, like dictionaries, lists, numbers and strings.
Usually the top level object is a dictionary.

To write out a plist file, use the dump(value, file)
function. 'value' is the top level object, 'file' is
a (writable) file object.

To parse a plist from a file, use the load(file) function,
with a (readable) file object as the only argument. It
returns the top level object (again, usually a dictionary).

To work with plist data in bytes objects, you can use loads()
and dumps().

Values can be strings, integers, floats, booleans, tuples, lists,
dictionaries (but only with string keys), Data, bytes, bytearray, or
datetime.datetime objects.

Generate Plist example:

    import datetime
    import plistlib

    pl = dict(
        aString = "Doodah",
        aList = ["A", "B", 12, 32.1, [1, 2, 3]],
        aFloat = 0.1,
        anInt = 728,
        aDict = dict(
            anotherString = "<hello & hi there!>",
            aThirdString = "M\xe4ssig, Ma\xdf",
            aTrueValue = True,
            aFalseValue = False,
        ),
        someData = b"<binary gunk>",
        someMoreData = b"<lots of binary gunk>" * 10,
        aDate = datetime.datetime.now()
    )
    print(plistlib.dumps(pl).decode())

Parse Plist example:

    import plistlib

    plist = b'''<plist version="1.0">
    <dict>
        <key>foo</key>
        <string>bar</string>
    </dict>
    </plist>'''
    pl = plistlib.loads(plist)
    print(pl["foo"])
)�InvalidFileException�FMT_XML�
FMT_BINARY�load�dump�loads�dumps�UID�N)�BytesIO)�ParserCreate�PlistFormatzFMT_XML FMT_BINARY)�modulec�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)r	c��t|t�std��|dk\rtd��|dkrtd��||_y)Nzdata must be an int�zUIDs cannot be >= 2**64r
�UIDs must be positive)�
isinstance�int�	TypeError�
ValueError�data��selfrs  �//opt/alt/python312/lib64/python3.12/plistlib.py�__init__zUID.__init__NsE���$��$��1�2�2��7�?��6�7�7��!�8��4�5�5���	�c��|jS�N)r�rs r�	__index__z
UID.__index__Ws���y�y�rc�`�|jj�dt|j��d�S)N�(�))�	__class__�__name__�reprrrs r�__repr__zUID.__repr__Zs���>�>�2�2�D����O�D�Drc�4�|j|jffSr)r$rrs r�
__reduce__zUID.__reduce__]s���~�~��	�	�|�+�+rc�`�t|t�stS|j|jk(Sr)rr	�NotImplementedr)r�others  r�__eq__z
UID.__eq__`s%���%��%�!�!��y�y�E�J�J�&�&rc�,�t|j�Sr)�hashrrs r�__hash__zUID.__hash__es���D�I�I��rN)	r%�
__module__�__qualname__rr r'r)r-r0�rrr	r	Ms!����E�,�'�
rr	s�<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
zv[\x00\x01\x02\x03\x04\x05\x06\x07\x08\x0b\x0c\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f]c���|dzdz}g}tdt|�|�D].}||||z}|jtj|���0dj|�S)N��r
r)�range�len�append�binascii�
b2a_base64�join)�s�
maxlinelength�
maxbinsize�pieces�i�chunks      r�_encode_base64rCyse����"�A�%�J�
�F�
�1�c�!�f�j�
)���!�a�*�n�%���
�
�h�)�)�%�0�1�*��8�8�F��rc��t|t�r$tj|j	d��Stj|�S)N�utf-8)r�strr:�
a2b_base64�encode)r=s r�_decode_base64rI�s9���!�S���"�"�1�8�8�G�#4�5�5��"�"�1�%�%rz{(?P<year>\d\d\d\d)(?:-(?P<month>\d\d)(?:-(?P<day>\d\d)(?:T(?P<hour>\d\d)(?::(?P<minute>\d\d)(?::(?P<second>\d\d))?)?)?)?)?Zc���d}tj|�j�}g}|D]%}||}|�n|jt	|���'tj
|�S)N��year�month�day�hour�minute�second)�_dateParser�match�	groupdictr9r�datetime)r=�order�gd�lst�key�vals      r�_date_from_stringr[�sc��@�E�	�	�	�1�	�	'�	'�	)�B�
�C�����g���;���
�
�3�s�8��	�
���c�"�"rc��d|j|j|j|j|j|j
fzS)Nz%04d-%02d-%02dT%02d:%02d:%02dZrK)�ds r�_date_to_stringr^�s:��+�	���������	������!�(�(�/��rc��tj|�}|�td��|jdd�}|jdd�}|jdd�}|jdd�}|jd	d
�}|S)Nz;strings can't contain control characters; use bytes insteadz
�
�
�&z&amp;�<z&lt;�>z&gt;)�_controlCharPat�searchr�replace)�text�ms  r�_escaperj�s~�����t�$�A��}��-�.�	.��<�<���%�D��<�<��d�#�D��<�<��W�%�D��<�<��V�$�D��<�<��V�$�D��Krc��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zy)�_PlistParserc�<�g|_d|_d|_||_yr)�stack�current_key�root�
_dict_type�r�	dict_types  rrz_PlistParser.__init__�s����
������	�#��rc�F�t�|_|j|j_|j|j_|j|j_|j|j_	|jj|�|jSr)r�parser�handle_begin_element�StartElementHandler�handle_end_element�EndElementHandler�handle_data�CharacterDataHandler�handle_entity_decl�EntityDeclHandler�	ParseFilerp)r�fileobjs  r�parsez_PlistParser.parse�so��"�n���*.�*C�*C����'�(,�(?�(?����%�+/�+;�+;����(�(,�(?�(?����%������g�&��y�y�rc��td��)Nz8XML entity declarations are not supported in plist files)r)r�entity_name�is_parameter_entity�value�base�	system_id�	public_id�
notation_names        rr|z_PlistParser.handle_entity_decl�s��#�#]�^�^rc�H�g|_t|d|zd�}|�	||�yy)N�begin_)r�getattr)r�element�attrs�handlers    rrvz!_PlistParser.handle_begin_element�s.����	��$��7� 2�D�9�����E�N�rc�8�t|d|zd�}|�|�yy)N�end_)r�)rr�r�s   rrxz_PlistParser.handle_end_element�s%���$��� 0�$�7�����I�rc�:�|jj|�yr)rr9rs  rrzz_PlistParser.handle_data�s���	�	����rc���|j�ct|jdt�s"t	d|j
jz��||jd|j<d|_y|js||_yt|jdt�s"t	d|j
jz��|jdj|�y)N���zunexpected element at line %d)
rorrn�dictrru�CurrentLineNumberrp�listr9�rr�s  r�
add_objectz_PlistParser.add_object�s������'��d�j�j��n�d�3� �!@�!%���!>�!>�"?�@�@�/4�D�J�J�r�N�4�+�+�,�#�D������D�I��d�j�j��n�d�3� �!@�!%���!>�!>�"?�@�@��J�J�r�N�!�!�%�(rc�J�dj|j�}g|_|S)N�)r<rrs  r�get_dataz_PlistParser.get_data�s ���w�w�t�y�y�!����	��rc�|�|j�}|j|�|jj|�yr)rqr�rnr9)rr�r]s   r�
begin_dictz_PlistParser.begin_dict�s,���O�O���������
�
���!�rc��|jr.td|j|jjfz��|jj�y)Nz%missing value for key '%s' at line %d)rorrur�rn�poprs r�end_dictz_PlistParser.end_dict�sI������D�"�.�.�t�{�{�/L�/L�M�N�O�
O��
�
���rc���|jst|jdt�s"t	d|j
jz��|j�|_y)Nr�zunexpected key at line %d)rorrnr�rrur�r�rs r�end_keyz_PlistParser.end_key�sL�����:�d�j�j��n�d�#C��8�!�[�[�:�:�;�<�
<��=�=�?��rc�`�g}|j|�|jj|�yr)r�rnr9)rr��as   r�begin_arrayz_PlistParser.begin_array�s%����������
�
���!�rc�8�|jj�yr)rnr�rs r�	end_arrayz_PlistParser.end_array�s���
�
���rc�&�|jd�y)NT�r�rs r�end_truez_PlistParser.end_trues������rc�&�|jd�y)NFr�rs r�	end_falsez_PlistParser.end_falses������rc���|j�}|jd�s|jd�r|jt|d��y|jt|��y)N�0x�0X�)r��
startswithr�r)r�raws  r�end_integerz_PlistParser.end_integersF���m�m�o���>�>�$��3�>�>�$�#7��O�O�C��R�L�)��O�O�C��H�%rc�T�|jt|j���yr)r��floatr�rs r�end_realz_PlistParser.end_reals������d�m�m�o�.�/rc�B�|j|j��yr)r�r�rs r�
end_stringz_PlistParser.end_strings������
�
��(rc�T�|jt|j���yr)r�rIr�rs r�end_dataz_PlistParser.end_datas������t�}�}��7�8rc�T�|jt|j���yr)r�r[r�rs r�end_datez_PlistParser.end_dates�����)�$�-�-�/�:�;rN)r%r1r2rr�r|rvrxrzr�r�r�r�r�r�r�r�r�r�r�r�r�r�r3rrrlrl�sg��$��_���
�)� ��
�+��
���&�0�)�9�<rrlc�.�eZdZdd�Zd�Zd�Zdd�Zd�Zy)	�_DumbXMLWriterc�<�||_g|_||_||_yr)�filern�
_indent_level�indent)rr��indent_levelr�s    rrz_DumbXMLWriter.__init__s����	���
�)�����rc��|jj|�|jd|z�|xjdz
c_y)Nz<%s>�)rnr9�writelnr��rr�s  r�
begin_elementz_DumbXMLWriter.begin_element"s6���
�
���'�"����V�g�%�&����a��rc�V�|xjdzc_|jd|z�y)Nr�z</%s>)r�r�r�s  r�end_elementz_DumbXMLWriter.end_element's&��	
���a������W�w�&�'rNc	�~�|�'t|�}|jd|�d|�d|�d��y|jd|z�y)Nrcrdz</z<%s/>)rjr�)rr�r�s   r�simple_elementz_DumbXMLWriter.simple_element-s7�����E�N�E��L�L�'�5�'�B�C�
�L�L��7�*�+rc��|rnt|t�r|jd�}|jj	|j
|jz�|jj	|�|jj	d�y)NrE�
)rrFrHr��writer�r�)r�lines  rr�z_DumbXMLWriter.writeln5s^����$��$��{�{�7�+���I�I�O�O�D�.�.����<�=��I�I�O�O�D�!��	�	����r)r
�	r)r%r1r2rr�r�r�r�r3rrr�r�s��� �
(�,�	rr�c�6�eZdZ		dd�Zd�Zd�Zd�Zd�Zd�Zy)	�_PlistWriterc�~�|r|jt�tj||||�||_||_yr)r��PLISTHEADERr�r�
_sort_keys�	_skipkeys)rr�r�r��writeHeader�	sort_keys�skipkeyss       rrz_PlistWriter.__init__Bs5����J�J�{�#�����d�L�&�A�#���!��rc�j�|jd�|j|�|jd�y)Nz<plist version="1.0">z</plist>)r��write_valuer�s  rr�z_PlistWriter.writeLs)�����.�/���������Z� rc��t|t�r|jd|�y|dur|jd�y|dur|jd�yt|t�r9d|cxkrdkr#nt	|��|jdd	|z�yt	|��t|t
�r|jd
t
|��yt|t�r|j|�yt|ttf�r|j|�yt|tj�r|jdt|��yt|ttf�r|j!|�yt#dt%|�z��)
N�stringT�trueF�falsel����r�integerz%d�real�datezunsupported type: %s)rrFr�r�
OverflowErrorr�r&r��
write_dict�bytes�	bytearray�write_bytesrUr^�tupler��write_arrayr�typer�s  rr�z_PlistWriter.write_valueQs4���e�S�!�����%�0�
�d�]�����'�
�e�^�����(�
��s�
#��5�*�7�*�$�E�*�*��#�#�I�t�e�|�<�#�E�*�*�
��u�
%������U��4�
��t�
$��O�O�E�"�
���y�1�
2����U�#�
��x�0�0�
1�������(>�?�
���t�}�
-����U�#��2�T�%�[�@�A�Arc
��|jd�|xjdzc_tddt|jjdd�|jz�z
�}t
||�jd�D]}|s�|j|��|xjdz
c_|jd�y)Nrr�r��L�	s        r�)
r�r��maxr8r�rgrC�splitr�r�)rrr>r�s    rr�z_PlistWriter.write_bytesss������6�"����a�������T�[�[�(�(���9�D�<N�<N�N�O�O�Q�
�#�4��7�=�=�e�D�D�����T�"�E�	
���a������� rc��|r�|jd�|jrt|j��}n|j�}|D]P\}}t	|t
�s|jr�#td��|jd|�|j|��R|jd�y|jd�y)Nr��keys must be stringsrY)r�r��sorted�itemsrrFr�rr�r�r�)rr]r�rYr�s     rr�z_PlistWriter.write_dict�s�������v�&�����q�w�w�y�)�����	��#�
��U�!�#�s�+��~�~� �#�$:�;�;��#�#�E�3�/�� � ��'�
$�
���V�$�
����'rc��|r;|jd�|D]}|j|��|jd�y|jd�y)N�array)r�r�r�r�)rr�r�s   rr�z_PlistWriter.write_array�sI������w�'���� � ��'�����W�%�
����(rN)r
r�r�TF)	r%r1r2rr�r�r�r�r�r3rrr�r�As(��BC�%*�"�!�
 B�D!�(�()rr�c�V�d}|D]}|j|�s�ytjdftjdftjdffD]U\}}|j|�s�|D]9}||jd�j
|�z}|dt|�|k(s�8y�Wy)N)s<?xmls<plistTrEz	utf-16-bez	utf-16-le�asciiF)r��codecs�BOM_UTF8�BOM_UTF16_BE�BOM_UTF16_LE�decoderHr8)�header�prefixes�pfx�bom�encoding�start�prefixs       r�_is_fmt_xmlr�s���$�H������S�!������'�*��$�$�k�2��$�$�k�2��
��X�� � ��%���E��5�<�<��0�7�7��A�A�F��l�s�6�{�#�v�-���� rc��eZdZdd�Zy)rc�0�tj||�yr)rr)r�messages  rrzInvalidFileException.__init__�s�����D�'�*rN)zInvalid file)r%r1r2rr3rrrr�s��+rr�B�H�L�Q)r��r5�c�4�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	y)	�_BinaryPlistParsera
    Read or write a binary plist file, following the description of the binary
    format.  Raise InvalidFileException in case of error, otherwise return the
    root object.

    see also: http://opensource.apple.com/source/CF/CF-744.18/CFBinaryPList.c
    c��||_yr)rqrrs  rrz_BinaryPlistParser.__init__�s	��#��rc��	||_|jjdtj�|jj	d�}t|�dk7r
t
��tjd|�\}|_	}}}|jj|�|j||�|_tg|z|_
|j|�S#tt tj"t$t&f$rt
��wxYw)Ni��� z>6xBBQQQ)�_fp�seek�os�SEEK_END�readr8r�struct�unpack�	_ref_size�
_read_ints�_object_offsets�
_undefined�_objects�_read_object�OSError�
IndexError�errorr�r)r�fp�trailer�offset_size�num_objects�
top_object�offset_table_offsets       rr�z_BinaryPlistParser.parse�s���	)��D�H��H�H�M�M�#�r�{�{�+��h�h�m�m�B�'�G��7�|�r�!�*�,�,��
�
�j�'�2�
��T�^�[�*�#��H�H�M�M�-�.�#'�?�?�;��#L�D� �'�L�;�6�D�M��$�$�Z�0�0����V�\�\�=���	)�&�(�(�	)�s�CC�3Dc���|dk(rd|jjd�ddz}d|z}dt|z}tj||jj|��dS|S)z$ return the size of the next object.�r�r
r6rd)rr�_BINARY_FORMATrr)r�tokenLrir=�fs     r�	_get_sizez_BinaryPlistParser._get_size�se���S�=����
�
�a� ��#�c�)�A��Q��A��n�Q�'�'�A��=�=��D�H�H�M�M�!�$4�5�a�8�8��
rc����|jj�|z���tvr"tjd|�t�����S�rt���|zk7r
t
��t��fd�td�|z��D��S)Nrdc3�V�K�|] }tj�||�zd����"y�w)�bigN)r�
from_bytes)�.0rAr�sizes  ��r�	<genexpr>z0_BinaryPlistParser._read_ints.<locals>.<genexpr>�s/�����<�":�Q�����Q��D��(9�5�A�":�s�&)r
)	rrr,rrr8rr�r7)r�nr5rs  `@rrz_BinaryPlistParser._read_ints�s�����x�x�}�}�T�A�X�&���>�!��=�=�1�Q�C��t�(<�'=�!>��E�E��3�t�9��q��0�*�,�,��<�"'��4�!�8�T�":�<�<�
<rc�:�|j||j�Sr)rr)rr7s  r�
_read_refsz_BinaryPlistParser._read_refss�����q�$�.�.�1�1rc����j|}|tur|S�j|}�jj	|��jjd�d}|dz|dz}}|dk(rd}�ne|dk(rd}�n\|dk(rd	}�nS|dk(rd
}�nJ|dk(r9tj�jjd|z�d|d
k\��}�n|dk(r4tjd�jjd��d}�n�|dk(r4tjd�jjd��d}�n�|dk(rbtjd�jjd��d}tjddd�tj|��z}�n3|dk(rE�j|�}�jj|�}t|�|k7�r�t��|dk(rW�j|�}�jj|�}	t|	�|k7r
t��|	jd�}�n�|dk(rZ�j|�dz}�jj|�}	t|	�|k7r
t��|	jd�}�n.|dk(r<t!tj�jjd|z�d��}n�|dk(rN�j|�}�j#|�}
g}|�j|<|j%�fd�|
D��n�|d k(r��j|�}�j#|�}�j#|�}
�j'�}|�j|<	t)||
�D](\}}
�j+|
�|�j+|�<�*n
t��|�j|<|S#t,$rt��wxYw)!zx
        read the object by reference.

        May recursively read sub-objects (content of an array/dict/set)
        r�r
��r+NrF�	Trr�r2r6��signed�"z>fr5�#z>d�3��)�seconds�@�Pr��`r
�utf-16be��c3�@�K�|]}�j|����y�wr)r )r4�xrs  �rr6z2_BinaryPlistParser._read_object.<locals>.<genexpr>Os�����A��1�$�+�+�A�.��s���)rrrrrrrr3rrrU�	timedeltar/r8rr�r	r9�extendrq�zipr r)r�ref�result�offset�token�tokenHr-r.r=r�obj_refs�key_refs�k�os`             rr z_BinaryPlistParser._read_objects������s�#����#��M��%�%�c�*�����
�
�f�����
�
�a� ��#�����u�t�|����D�=��F�
�d�]��F�
�d�]��F�
�d�]��F�
�t�^��^�^�D�H�H�M�M�!�v�+�$>�$)�&�A�+�$�?�F��d�]��]�]�4������q�)9�:�1�=�F�
�d�]��]�]�4������q�)9�:�1�=�F�
�d�]��
�
�d�D�H�H�M�M�!�$4�5�a�8�A��'�'��a��3��(�(��3�4�F��t�^����v�&�A��X�X�]�]�1�%�F��6�{�a��*�,�,�
�t�^����v�&�A��8�8�=�=��#�D��4�y�A�~�*�,�,��[�[��)�F�
�t�^����v�&��*�A��8�8�=�=��#�D��4�y�A�~�*�,�,��[�[��,�F�
�t�^��������
�
�a�&�j�(A�5�I�J�F�
�t�^����v�&�A����q�)�H��F�!'�D�M�M�#���M�M�A��A�A��t�^����v�&�A����q�)�H����q�)�H��_�_�&�F�!'�D�M�M�#��
-���(�3�D�A�q�37�3D�3D�Q�3G�F�4�,�,�Q�/�0�4�
'�(�(�#��
�
�c���
��
�
-�*�,�,�
-�s�7O,�,PN)
r%r1r2�__doc__rr�r/rr9r r3rrrr�s&���$�)�2�<�2�crrc�(�|dkry|dkry|dkryy)N�r��r
�r5rr3)�counts r�_count_to_sizer_hs%���v�~��	����	����rc�0�eZdZd�Zd�Zd�Zd�Zd�Zd�Zy)�_BinaryPlistWriterc�.�||_||_||_yr)rr�r�)rr$r�r�s    rrz_BinaryPlistWriter.__init__xs�����#���!��rc���g|_i|_i|_|j|�t	|j�}dg|z|_t
|�|_t|j|_	|jjd�|jD]}|j|��|j|�}|jj�}t
|�}dt||zz}|jjtj |g|j
����d}|||j|||f}	|jjtj dg|	����y)Nr
�bplist00rdz	>5xBBBQQQ)�_objlist�	_objtable�_objidtable�_flattenr8rr_rr,�_ref_formatrr��
_write_object�
_getrefnum�tellr�pack)
rr�r'�objr(r)r&�
offset_format�sort_versionr%s
          rr�z_BinaryPlistWriter.write}s9����
�������	
�
�
�e���$�-�-�(�� !�s�;����'��4���)�$�.�.�9���	
�����{�#��=�=�C����s�#�!��_�_�U�+�
�"�h�h�m�m�o��$�%8�9���n�[�9�K�G�G�
������v�{�{�=�H�4�3G�3G�H�I����+�t�~�~�{��+�
��	
�����v�{�{�;�9��9�:rc�D�t|t�rt|�|f|jvryt	|�|j
vryt
|j�}|jj|�t|t�r||jt|�|f<n||j
t	|�<t|t�r�g}g}|j�}|jrt|�}|D]O\}}t|t�s|jr�#td��|j|�|j|��Qt!j"||�D]}|j%|��yt|t&t(f�r|D]}|j%|��yy)Nr�)r�_scalarsr�rf�idrgr8rer9r�r�r�r�rFr�r�	itertools�chainrhr�r�)	rr��refnum�keys�valuesr�rW�vrXs	         rrhz_BinaryPlistWriter._flatten�sV���e�X�&��U��U�#�t�~�~�5��
��Y�$�*�*�
*���T�]�]�#���
�
���U�#��e�X�&�39�D�N�N�D��K��/�0�*0�D���R��Y�'��e�T�"��D��F��K�K�M�E�����u�
�����1�!�!�S�)��~�~� �#�$:�;�;����A���
�
�a� �
��_�_�T�6�2���
�
�a� �3����e�}�
-����
�
�a� ��.rc��t|t�r|jt|�|fS|jt|�Sr)rrrrfr�rgrsr�s  rrkz_BinaryPlistWriter._getrefnum�s9���e�X�&��>�>�4��;��"6�7�7��#�#�B�u�I�.�.rc�8�|dkr3|jjtjd||z��y|dkr5|jjtjd|dzd|��y|dkr5|jjtjd|dzd|��y|d	kr5|jjtjd
|dzd|��y|jjtjd|dzd
|��y)Nr+z>Br[z>BBBr�r\z>BBH�r]z>BBL�z>BBQ�)rr�rrm)rrSr5s   r�_write_sizez_BinaryPlistWriter._write_size�s����"�9��H�H�N�N�6�;�;�t�U�T�\�:�;�
�F�]��H�H�N�N�6�;�;�v�u�s�{�D�$�G�H�
�G�^��H�H�N�N�6�;�;�v�u�s�{�D�$�G�H�
�G�^��H�H�N�N�6�;�;�v�u�s�{�D�$�G�H�
�H�H�N�N�6�;�;�v�u�s�{�D�$�G�Hrc��
�|j|�}|jj�|j|<|�|jj	d�y|dur|jj	d�y|dur|jj	d�yt|t��rP|dkr2	|jj	tjdd|��y|d	kr1|jj	tjd
d|��y|dkr1|jj	tjd
d|��y|dkr1|jj	tjdd|��y|dkr1|jj	tjdd|��y|dkr1|jj	d|jddd��z�yt|��t|t�r1|jj	tjdd|��yt|tj�rY|tjddd�z
j�}|jj	tjdd|��yt|tt f�r7|j#dt%|��|jj	|�yt|t&�rI	|j)d�}|j#dt%|��|jj	|�yt|t,��r%|j.dkrt1d#��|j.d	kr1|jj	tjd
d$|��y|j.dkr1|jj	tjd
d%|��y|j.dkr1|jj	tjdd&|��y|j.dkr1|jj	tjdd'|��yt|��t|t2t4f�r{|D�cgc]}|j|���}}t%|�}|j#d(|�|jj	tjd)|j6|zzg|����yt|t8��rHgg}	}|j:rt=|j?��}
n|j?�}
|
D]m\}}t|t&�s|j@r�#tCd*��|jE|j|��|	jE|j|���ot%|�}|j#d+|�|jj	tjd)|j6|zzg|����|jj	tjd)|j6|zzg|	����ytC|��#tj$r
t|�d�wxYw#t*$r3|j)d �}|j#d!t%|�d"z�Y���wxYwcc}w),N�F�Tr�r
z>Bqr~r[z>BBr�r\z>BHr|r]z>BLr}lz>BQr�r2r=z>Bdr@rBr�rArDr�rErGrFr
rrH���rIrdr�rL)#rkrrlrr�rrrrmr#r��to_bytesr�rU�
total_secondsr�r�rr8rFrH�UnicodeEncodeErrorr	rrr�r�rir�r�r�r�r�rr9)
rr�rPr.�trX�refsr=�keyRefs�valRefs�	rootItemsrWrys
             rrjz _BinaryPlistWriter._write_object�s���o�o�e�$��$(�H�H�M�M�O����S�!��=��H�H�N�N�7�#�
�e�^��H�H�N�N�7�#�
�d�]��H�H�N�N�7�#�
��s�
#��q�y�9��H�H�N�N�6�;�;�u�d�E�#B�C���������v�{�{�5�$��>�?���������v�{�{�5�$��>�?���������v�{�{�5�$��>�?���������v�{�{�5�$��>�?���������w�����E�$��)O�O�P�#�E�*�*�
��u�
%��H�H�N�N�6�;�;�u�d�E�:�;�
��x�0�0�
1���*�*�4��A�6�6�E�E�G�A��H�H�N�N�6�;�;�u�d�A�6�7�
���y�1�
2����T�3�u�:�.��H�H�N�N�5�!�
��s�
#�
4��L�L��)��� � ��s�5�z�2�

�H�H�N�N�1��
��s�
#��z�z�A�~� �!8�9�9����f�$������v�{�{�5�$��>�?����g�%������v�{�{�5�$��>�?����g�%������v�{�{�5�$��>�?����g�%������v�{�{�5�$��>�?�#�E�*�*�
���e�}�
-�05�6��1�D�O�O�A�&��D�6��D�	�A����T�1�%��H�H�N�N�6�;�;�s�T�-=�-=��-A�'A�I�D�I�J�
��t�
$�!�2�W�G����"�5�;�;�=�1�	�!�K�K�M�	�!���1�!�!�S�)��~�~� �#�$:�;�;����t���q�1�2����t���q�1�2�
"��G��A����T�1�%��H�H�N�N�6�;�;�s�T�-=�-=��-A�'A�L�G�L�M��H�H�N�N�6�;�;�s�T�-=�-=��-A�'A�L�G�L�M��E�"�"��]�|�|�9�'��.�D�8�9��<&�
4��L�L��,��� � ��s�1�v��{�3�
4��*7s$�.0Y=�
,Z �"[�= Z� 8[�[N)	r%r1r2rr�rhrkrrjr3rrraraws$��"�
+;�Z(!�T/�I� ^#rrac��|dddk(S)Nrrdr3)r�s r�_is_fmt_binaryr�Ks���"�1�:��$�$r)�detectru�writer��fmtrsc��|�W|jd�}|jd�tj�D]}|d|�s�|d}nt	��t|d}||��}|j|�S)z�Read a .plist file. 'fp' should be a readable and binary file object.
    Return the unpacked root object (which usually is a dictionary).
    rr
r�ru)rs)rr�_FORMATSrxrr�)r$r�rsr��info�P�ps       rrras���{�������
����
��O�O�%�D��t�H�~�f�%���N���&�'�(�(�
�S�M�(�#��	�I��A��7�7�2�;�rc�4�t|�}t|||��S)zqRead a .plist file from a bytes object.
    Return the unpacked root object (which usually is a dictionary).
    r�)rr)r�r�rsr$s    rrrws��
���B����y�1�1rTF)r�r�r�c�z�|tvrtd|����t|d|||��}|j|�y)zWWrite 'value' to a .plist file. 'fp' should be a writable,
    binary file object.
    zUnsupported format: r�)r�r�N)r�rr�)r�r$r�r�r�r�s      rrrs=���(���3�8�9�9�
�c�]�8�
$�R�9�x�
P�F�
�L�L��r�r�r�r�c�V�t�}t|||||��|j�S)z?Return a bytes object with the contents for a .plist file.
    r�)rr�getvalue)r�r�r�r�r$s     rrr�s'��
��B�����h�)�D�
�;�;�=�r)r�)9rY�__all__r:r�rU�enum�iorrtr�rer�xml.parsers.expatr�Enumr%r
�globals�update�__members__r	r��compilererCrI�ASCIIrRr[r^rjrlr�r�rrrr,�objectrrr_rFrr�r�rrrar�rr�rr�rrrrr3rr�<module>r�s���7�p���
�����	�	�
�*��d�i�i�
�';�H�M���	����(�(�)���B���"�*�*�I�J���&��b�j�j�X�Z\�Zb�Zb�c��	#��
�k<�k<�\#�#�L[)�>�[)�|�B+�J�+��S�S�S�1��
�X�
�^�^�@�
��e�X�.�.��6��Q#�&�Q#�h%��T�����
���!�!��

���D��,��2�#�d�U�� �%�4�r

?>