[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.147.56.105: ~ $
�

3�Dg����UdZddlmZddlZddlZddlmZddlmZm	Z	erddl
mZmZdZ
ded	<d
Zded<dd�Zddd�ZdS)z�
    babel.messages.mofile
    ~~~~~~~~~~~~~~~~~~~~~

    Writing of files in the ``gettext`` MO (machine object) format.

    :copyright: (c) 2013-2023 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�)�annotationsN)�
TYPE_CHECKING)�Catalog�Message)�SupportsRead�
SupportsWritel�*�int�LE_MAGICl�$<�BE_MAGIC�fileobj�SupportsRead[bytes]�returnrc���t���i}t|dd��}|���}t|��}tj}|d|dd���d}|tkr|d|dd���\}}}	}
d	}n8|tkr|d
|dd���\}}}	}
d}ntdd|���t|��D�]�}||||	|	d
z���\}
}||
z}||||
|
d
z���\}}||z}||kr||kr|||�}|||�}ntdd|���|
dkr�dx}}|�
��D]�}|���}|s�d|vrY|�dd��\}}|����
��x}}|���||<�v|r||xxd|zz
cc<��d|vr|�d��\}}nd}d|vrN|�d��}|�d��}�jr�fd�|D��}�fd�|D��}n;�jr4|��j��}|��j��}t!|||����|<|	d
z
}	|
d
z
}
���|����_�S)aaRead a binary MO file from the given file-like object and return a
    corresponding `Catalog` object.

    :param fileobj: the file-like object to read the MO file from

    :note: The implementation of this function is heavily based on the
           ``GNUTranslations._parse`` method of the ``gettext`` module in the
           standard library.
    �name�z<IN�rz<4I�z<IIz>4Iz>IIzBad magic number�zFile is corrupt�:��
��c�D��g|]}|��j����S���decode�charset��.0�x�catalogs  ��u/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/babel/messages/mofile.py�
<listcomp>zread_mo.<locals>.<listcomp>]s'���>�>�>�Q�q�x�x���0�0�>�>�>�c�D��g|]}|��j����Srrrs  �r#r$zread_mo.<locals>.<listcomp>^s'���@�@�@�a������1�1�@�@�@r%)�context)r�getattr�read�len�struct�unpackr
r�OSError�range�
splitlines�strip�split�lowerrrr�items�mime_headers)r�headers�filename�buf�buflenr,�magic�version�msgcount�origidx�transidx�ii�_i�mlen�moff�mend�tlen�toff�tend�msg�tmsg�lastkey�key�item�value�ctxtr"s                          @r#�read_morMsN����i�i�G��G��w���+�+�H�
�,�,�.�.�C�
��X�X�F�
�]�F�
�F�4��R�a�R��!�!�!�$�E�����/5�v�e�S��2��Y�/G�/G�,���7�H�
���	�(�	�	�/5�v�e�S��2��Y�/G�/G�,���7�H�
����a�+�X�6�6�6��H�o�o�-�-���V�B��G�G�a�K�$7� 8�9�9�
��d��d�{���V�B��H�X��\�$9� :�;�;�
��d��d�{���&�=�=�T�F�]�]��d�4�i�.�C��t�D�y�>�D�D��!�.��9�9�9��1�9�9� � �G�c����)�)�	
5�	
5���z�z�|�|������4�<�<�!%���D�!�!4�!4�J�C��$'�I�I�K�K�$5�$5�$7�$7�7�G�c�#(�;�;�=�=�G�C�L�L��5��G�$�$�$����4�$�$�$���c�>�>��	�	�'�*�*�I�D�#�#��D��c�>�>��)�)�G�$�$�C��:�:�g�&�&�D���
A�>�>�>�>�#�>�>�>��@�@�@�@�4�@�@�@�����
4��j�j���1�1���{�{�7�?�3�3���s�D�$�7�7�7����	�1����A�
���"�=�=�?�?�G���Nr%F�SupportsWrite[bytes]r"�	use_fuzzy�bool�Nonec
�|���t���}�fd�|dd�D��|dd�<|���dx}}g}|D�]�}|jr�d��fd�|jD����}g}	t|j��D]X\}
}|s<|	�|jtt|
��d�����C|	�|���Yd��fd�|	D����}n>|j�
�j��}|j�
�j��}|jr4d�|j�
�j��|g��}|�t|��t|��t|��t|��f��||dzz
}||dzz
}���d	d
t|��zz}
|
t|��z}g}g}|D]\}}}}||||
zgz
}||||zgz
}�||z}|�tjdt"dt|��d	d	t|��d
zzdd��t$j�t%jd|����z|z|z��dS)a�Write a catalog to the specified file-like object using the GNU MO file
    format.

    >>> import sys
    >>> from babel.messages import Catalog
    >>> from gettext import GNUTranslations
    >>> from io import BytesIO

    >>> catalog = Catalog(locale='en_US')
    >>> catalog.add('foo', 'Voh')
    <Message ...>
    >>> catalog.add((u'bar', u'baz'), (u'Bahr', u'Batz'))
    <Message ...>
    >>> catalog.add('fuz', 'Futz', flags=['fuzzy'])
    <Message ...>
    >>> catalog.add('Fizz', '')
    <Message ...>
    >>> catalog.add(('Fuzz', 'Fuzzes'), ('', ''))
    <Message ...>
    >>> buf = BytesIO()

    >>> write_mo(buf, catalog)
    >>> x = buf.seek(0)
    >>> translations = GNUTranslations(fp=buf)
    >>> if sys.version_info[0] >= 3:
    ...     translations.ugettext = translations.gettext
    ...     translations.ungettext = translations.ngettext
    >>> translations.ugettext('foo')
    u'Voh'
    >>> translations.ungettext('bar', 'baz', 1)
    u'Bahr'
    >>> translations.ungettext('bar', 'baz', 2)
    u'Batz'
    >>> translations.ugettext('fuz')
    u'fuz'
    >>> translations.ugettext('Fizz')
    u'Fizz'
    >>> translations.ugettext('Fuzz')
    u'Fuzz'
    >>> translations.ugettext('Fuzzes')
    u'Fuzzes'

    :param fileobj: the file-like object to write to
    :param catalog: the `Catalog` instance
    :param use_fuzzy: whether translations marked as "fuzzy" should be included
                      in the output
    c�4��g|]}|j�	�s|j�|��Sr)�string�fuzzy)r �mrOs  �r#r$zwrite_mo.<locals>.<listcomp>�sJ���@�@�@�!��x�@�%.�@�67�g�@�A�@�@�@r%rNr%rc�D��g|]}|��j����Sr��encoder)r �msgidr"s  �r#r$zwrite_mo.<locals>.<listcomp>�s4���"�"�"�27����W�_�-�-�"�"�"r%c�D��g|]}|��j����SrrX)r �msgstrr"s  �r#r$zwrite_mo.<locals>.<listcomp>�s4���#�#�#�39��
�
�g�o�.�.�#�#�#r%r���Iiiiiiirr�i)�list�sort�pluralizable�join�id�	enumeraterT�append�minr	rYrr'r*�writer+�packr
�array�tobytes)rr"rO�messages�ids�strs�offsets�messagerZ�msgstrs�idxrTr\�keystart�
valuestart�koffsets�voffsets�o1�l1�o2�l2s ``                  r#�write_mor|msB����`�G�}�}�H�@�@�@�@�x����|�@�@�@�H�Q�R�R�L��M�M�O�O�O���C�$��G��!�!����	<��L�L�"�"�"�"�;B�:�"�"�"���E��G�(���8�8�
+�
+���V��+��N�N�7�:�c�#�c�(�(�A�.>�.>�#?�@�@�@�@��N�N�6�*�*�*�*��\�\�#�#�#�#�=D�#�#�#���F�F��J�%�%�g�o�6�6�E��^�*�*�7�?�;�;�F��?�	*��L�L�'�/�"8�"8���"I�"I�"'�")�*�*�E�����C���#�e�*�*�c�$�i�i��V���E�F�F�F��u�w������� � ����r�C��M�M�)�)�H��C��H�H�$�J��H��H�!�*�*���B��B��R��h��'�'���R��j��)�)�����!�G��M�M�&�+�i�&��!�(�m�m�#�#�c�(�m�m�a�&7�7���
 � �#(�+�"5�"5�e�k�#�w�6O�6O�"P�"P�Q�TW�W�Z^�^�_�_�_�_�_r%)rr
rr)F)rrNr"rrOrPrrQ)�__doc__�
__future__rrkr+�typingr�babel.messages.catalogrr�	_typeshedrrr
�__annotations__rrMr|rr%r#�<module>r�s������#�"�"�"�"�"�����
�
�
�
� � � � � � �3�3�3�3�3�3�3�3��6�5�5�5�5�5�5�5�5�������������Q�Q�Q�Q�hg_�g_�g_�g_�g_�g_�g_r%

Filemanager

Name Type Size Permission Actions
__init__.cpython-311.pyc File 615 B 0644
catalog.cpython-311.pyc File 45.14 KB 0644
checkers.cpython-311.pyc File 7.45 KB 0644
extract.cpython-311.pyc File 34.64 KB 0644
frontend.cpython-311.pyc File 50.48 KB 0644
jslexer.cpython-311.pyc File 8.39 KB 0644
mofile.cpython-311.pyc File 9.52 KB 0644
plurals.cpython-311.pyc File 6.16 KB 0644
pofile.cpython-311.pyc File 32.08 KB 0644