HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991111/cwd/usr/lib/python3/dist-packages/babel/__pycache__/
Upload File :
Current File : //proc/1991111/cwd/usr/lib/python3/dist-packages/babel/__pycache__/util.cpython-311.pyc
�

ƪb����dZddlZddlZddlmZmZddlZddlZddlZddl	Z
ddlmZe
��Zd�Zejdej��Zd�Zejd��Zdd
�Zd�ZGd�d
ej��Zdd�ZejZGd�de��Ze
jZejZejZej Z ej!Z!ej"Z"ej#Z#d�Z$dS)z�
    babel.util
    ~~~~~~~~~~

    Various utility classes and functions.

    :copyright: (c) 2013-2022 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�N)�	timedelta�tzinfo)�	localtimec#�K�t��}t|��D]}||vr|V�|�|��� dS)a�Yield all items in an iterable collection that are distinct.

    Unlike when using sets for a similar effect, the original ordering of the
    items in the collection is preserved by this function.

    >>> print(list(distinct([1, 2, 1, 3, 4, 4])))
    [1, 2, 3, 4]
    >>> print(list(distinct('foobar')))
    ['f', 'o', 'b', 'a', 'r']

    :param iterable: the iterable collection providing the data
    N)�set�iter�add)�iterable�seen�items   �,/usr/lib/python3/dist-packages/babel/util.py�distinctrsT�����5�5�D��X�������t����J�J�J��H�H�T�N�N�N����s([ \t\f]* \# .* coding[=:][ \t]*([-\w.]+)c���|���}|�d��	|���}|�tj��}|r!|t
tj��d�}t�|��}|sy	ddl	}|�
|�d����|���}t�|��}n#tttf$rYnwxYw|rj|rP|�d���d��}|dkr"td�|�����	|�|��dS|r=|�d���d��|�|��S	|�|��dS#|�|��wxYw)a/Deduce the encoding of a source file from magic comment.

    It does this in the same way as the `Python interpreter`__

    .. __: https://docs.python.org/3.4/reference/lexical_analysis.html#encoding-declarations

    The ``fp`` argument should be a seekable file object.

    (From Jeff Dairiki)
    rN�latin-1�zutf-8zencoding problem: {0} with BOM)�tell�seek�readline�
startswith�codecs�BOM_UTF8�len�PYTHON_MAGIC_COMMENT_re�match�ast�parse�decode�ImportError�SyntaxError�UnicodeEncodeError�group�format)�fp�pos�line1�has_bom�mr�line2�magic_comment_encodings        r
�parse_encodingr+/s���
�'�'�)�)�C��G�G�A�J�J�J�"����
�
���"�"�6�?�3�3���	1��#�f�o�.�.�/�/�0�E�#�)�)�%�0�0���	9�
9��
�
�
��	�	�%�,�,�y�1�1�2�2�2����
�
��+�1�1�%�8�8���� ��.@�A�
�
�
�
��
�����	��
5�)*������):�):�9�)E�)E�&�)�W�4�4�%�8�?�?�2�4�4�5�5�5��	����������	��7�7�1�:�:�$�$�Y�/�/�	���������
��������������������s7�A2G�,C9�
/G�9D�G�D�AG�)G�G0z'from\s+__future__\s+import\s+\(*(.+)\)*rc�|�ddl}|���}|�d��d}	|����|��}tjdd|��}tjdd|��}tjdd|��}t�|��D]V}d	�|�	d
���
d��D��}|D]}t||d��}	|	r
||	jz}� �W	|�|��n#|�|��wxYw|S)zRParse the compiler flags by :mod:`__future__` from the given Python
    code.
    rNzimport\s*\([\r\n]+zimport (z,\s*[\r\n]+z, z\\\s*[\r\n]+� c�\�g|])}|����d����*S)z())�strip)�.0�xs  r
�
<listcomp>z&parse_future_flags.<locals>.<listcomp>{s,��J�J�J�q�Q�W�W�Y�Y�_�_�T�*�*�J�J�Jrr�,)
�
__future__rr�readr�re�sub�PYTHON_FUTURE_IMPORT_re�finditerr"�split�getattr�
compiler_flag)
r$�encodingr4r%�flags�bodyr(�names�name�features
          r
�parse_future_flagsrCesA������
�'�'�)�)�C��G�G�A�J�J�J�
�E���w�w�y�y����)�)���v�+�Z��>�>���v�n�d�D�1�1���v�o�s�D�1�1��(�1�1�$�7�7�	3�	3�A�J�J�A�G�G�A�J�J�4D�4D�S�4I�4I�J�J�J�E��
3�
3��!�*�d�D�9�9���3��W�2�2�E��
3�	3�	���������������������Ls�CD"�"D9c�"�ddddddd�}|�d��rdg}|d	d
�}n%|�d��rdg}|dd
�}ng}ttjd
|����D]O\}}|dzr|�||���&|r'|�tj|�����Ptjd�|��dz|�tj
d����}|d
uS)a�Extended pathname pattern matching.

    This function is similar to what is provided by the ``fnmatch`` module in
    the Python standard library, but:

     * can match complete (relative or absolute) path names, and not just file
       names, and
     * also supports a convenience pattern ("**") to match files at any
       directory level.

    Examples:

    >>> pathmatch('**.py', 'bar.py')
    True
    >>> pathmatch('**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('**.py', 'templates/index.html')
    False

    >>> pathmatch('./foo/**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('./foo/**.py', 'bar/baz.py')
    False

    >>> pathmatch('^foo/**.py', 'foo/bar/baz.py')
    True
    >>> pathmatch('^foo/**.py', 'bar/baz.py')
    False

    >>> pathmatch('**/templates/*.html', 'templates/index.html')
    True
    >>> pathmatch('**/templates/*.html', 'templates/foo/bar.html')
    False

    :param pattern: the glob pattern
    :param filename: the path name of the file to match against
    z[^/]z[^/]/z[^/]+z[^/]+/z	(?:.+/)*?z(?:.+/)*?[^/]+)�?z?/�*z*/z**/z**�^rNz./�z	([?*]+/?)��$�/)r�	enumerater6r:�append�escaper�join�replace�os�sep)�pattern�filename�symbols�buf�idx�partrs       r
�	pathmatchrY�s.��N��
����
��G����#�����e���!�"�"�+���	�	�	�D�	!�	!���e���!�"�"�+������r�x��W�=�=�>�>�(�(�	��T���7�	(��J�J�w�t�}�%�%�%�%�
�	(��J�J�r�y����'�'�'���H�R�W�W�S�\�\�C�'��)9�)9�"�&�#�)F�)F�G�G�E����rc�.�eZdZejd��ZdS)�TextWrapperz((\s+|(?<=[\w\!\"\'\&\.\,\?])-{2,}(?=\w))N)�__name__�
__module__�__qualname__r6�compile�
wordsep_re�rr
r[r[�s&���������	/���J�J�Jrr[�FrIc�R�t|||d���}|�|��S)a�Simple wrapper around the ``textwrap.wrap`` function in the standard
    library. This version does not wrap lines on hyphens in words.

    :param text: the text to wrap
    :param width: the maximum line width
    :param initial_indent: string that will be prepended to the first line of
                           wrapped output
    :param subsequent_indent: string that will be prepended to all lines save
                              the first of wrapped output
    F)�width�initial_indent�subsequent_indent�break_long_words)r[�wrap)�textrdrerf�wrappers     r
�wraptextrk�s6����n�,=�+0�2�2�2�G��<�<����rc�8�eZdZdZd	d�Zd�Zd�Zd�Zd�Zd�Z	dS)
�FixedOffsetTimezonez&Fixed offset in minutes east from UTC.Nc�L�t|���|_|�d|z}||_dS)N)�minutesz
Etc/GMT%+d)r�_offset�zone)�self�offsetrAs   r
�__init__zFixedOffsetTimezone.__init__�s.�� ��0�0�0����<��&�(�D���	�	�	rc��|jS�N�rq�rrs r
�__str__zFixedOffsetTimezone.__str__��
���y�rc�(�d|j�d|j�d�S)Nz<FixedOffset "z" �>)rqrprxs r
�__repr__zFixedOffsetTimezone.__repr__�s���*.�)�)�)�T�\�\�\�B�Brc��|jSrv)rp�rr�dts  r
�	utcoffsetzFixedOffsetTimezone.utcoffset�s
���|�rc��|jSrvrwrs  r
�tznamezFixedOffsetTimezone.tzname�rzrc��tSrv)�ZEROrs  r
�dstzFixedOffsetTimezone.dst�s���rrv)
r\r]r^�__doc__rtryr}r�r�r�rarr
rmrm�s|������0�0��������C�C�C�����������rrmc��||k||kz
Srvra)�a�bs  r
�_cmpr�s��
��E�a�!�e��r)r)rbrIrI)%r�r�collections�datetimerrrQr6�textwrap�pytz�_pytz�babelr�object�missingrr_�VERBOSErr+r8rCrYr[rk�OrderedDict�odictrm�utc�UTC�LOCALTZ�
get_localzone�	STDOFFSET�	DSTOFFSET�DSTDIFFr�r�rarr
�<module>r�s������
�
�
�����&�&�&�&�&�&�&�&�	�	�	�	�	�	�	�	���������������
�&�(�(�����(%�"�*�0�"�*�>�>��/�/�/�d%�"�*�.�0�0������@>�>�>�B�����(�&��������$	��������&����6�i��
�
���'�
���	���	�
�
���~������r