HOME


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

ƪb���d�dZddlZddlZddlZddlZddlZddlmZddlm	Z	iZ
ej��Zej
�ej
�e��d��Zejdej��Zd�Zd�Zd	�Zd
�Zdd�Zd
�ZGd�d��ZGd�dej��ZdS)aG
    babel.localedata
    ~~~~~~~~~~~~~~~~

    Low-level locale data access.

    :note: The `Locale` class, which uses this module under the hood, provides a
           more convenient interface for accessing the locale data.

    :copyright: (c) 2013-2022 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�N)�abc)�chainzlocale-dataz%^(con|prn|aux|nul|com[0-9]|lpt[0-9])$c��|rt|t��sdS|������}t	jtt��g��D]}||���kr|cS�dS)z�Normalize a locale ID by stripping spaces and apply proper casing.

    Returns the normalized locale ID string or `None` if the ID is not
    recognized.
    N)�
isinstance�str�strip�lowerr�
from_iterable�_cache�locale_identifiers)�name�	locale_ids  �2/usr/lib/python3/dist-packages/babel/localedata.py�normalize_localers�����z�$��,�,���t��:�:�<�<�����D��(�&�2D�2F�2F�)G�H�H���	��9�?�?�$�$�$�$�����%���c�N�tj�|��}tjdkrOt
�tj�|��d��rtd|z���tj�	td|z��S)z?
    Resolve a locale identifier to a `.dat` path on disk.
    �win32rzName %s is invalid on Windowsz%s.dat)�os�path�basename�sys�platform�_windows_reserved_name_re�match�splitext�
ValueError�join�_dirname)r
s r�resolve_locale_filenamer+s����7���D�!�!�D��|�w���#<�#B�#B�2�7�CS�CS�TX�CY�CY�Z[�C\�#]�#]���8�4�?�@�@�@��7�<�<��(�T�/�2�2�2rc���|rt|t��sdS|tvrdStj�t
|����}|rdntt|����S)z�Check whether locale data is available for the given locale.

    Returns `True` if it exists, `False` otherwise.

    :param name: the locale identifier string
    FT)	rrrrr�existsr�boolr)r
�
file_founds  rr!r!;sl����z�$��,�,���u��v�~�~��t����� 7�� =� =�>�>�J��?�4�4�4�(8��(>�(>�#?�#?�?rc��ttdd��}|�9d�d�tjt��D��D��xt_}|S)a�Return a list of all locale identifiers for which locale data is
    available.

    This data is cached after the first invocation in `locale_identifiers.cache`.

    Removing the `locale_identifiers.cache` attribute or setting it to `None`
    will cause this function to re-read the list from disk.

    .. versionadded:: 0.8.1

    :return: a list of locale identifiers (strings)
    �cacheNc�0�g|]\}}|dk�|dk�|��S)z.dat�root�)�.0�stem�	extensions   r�
<listcomp>z&locale_identifiers.<locals>.<listcomp>Ys9��+
�+
�+
���i��F�"�"�t�v�~�~�
�(6�~�~rc3�TK�|]#}tj�|��V��$dS�N)rrr)r)�filenames  r�	<genexpr>z%locale_identifiers.<locals>.<genexpr>\s2����M�M�H�R�W�
�
�h�
'�
'�M�M�M�M�M�Mr)�getattrrr�listdirrr%)�datas rrrJsf���%�w��5�5�D��|�+
�+
�
N�M��
�8�8L�8L�M�M�M�+
�+
�+
�	
�� �4��KrTc�T�tj�|��}t���	t
�|��}|�s|dks|si}n�ddlm}|d���|��}|sH|�	d��}t|��dkrd}nd�|dd���}t|���
��}t|��}t|d	��5}|dkr%|r#t!|t#j|����nt#j|��}ddd��n#1swxYwY|t
|<|t���S#t���wxYw)
aeLoad the locale data for the given locale.

    The locale data is a dictionary that contains much of the data defined by
    the Common Locale Data Repository (CLDR). This data is stored as a
    collection of pickle files inside the ``babel`` package.

    >>> d = load('en_US')
    >>> d['languages']['sv']
    u'Swedish'

    Note that the results are cached, and subsequent requests for the same
    locale return the same dictionary:

    >>> d1 = load('en_US')
    >>> d2 = load('en_US')
    >>> d1 is d2
    True

    :param name: the locale identifier string (or "root")
    :param merge_inherited: whether the inherited data should be merged into
                            the data of the requested locale
    :raise `IOError`: if no locale data file is found for the given locale
                      identifer, or one of the locales it inherits from
    r'r)�
get_global�parent_exceptions�_�N����rb)rrr�_cache_lock�acquirer�get�
babel.corer5�split�lenr�load�copyr�open�merge�pickle�release)r
�merge_inheritedr3r5�parent�partsr/�fileobjs        rrArAbs���2�7���D�!�!�D���������z�z�$�����	 ��v�~�~�_�~����1�1�1�1�1�1�#��$7�8�8�<�<�T�B�B���6� �J�J�s�O�O�E��5�z�z�Q���!'���!$���%����*�!5�!5���F�|�|�(�(�*�*��.�t�4�4�H��h��%�%�
0���6�>�>�o�>��$���G� 4� 4�5�5�5�5�!�;�w�/�/�D�	
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
 �F�4�L�������������������s1�CF�AE�F�E � F�#E �$F�F'c��|���D]�\}}|��|�|��}t|t��r�|�i}t|t��r||f}njt|t
��r.|\}}|���}t||��||f}n'|���}t||��n|}|||<��dS)anMerge the data from `dict2` into the `dict1` dictionary, making copies
    of nested dictionaries.

    >>> d = {1: 'foo', 3: 'baz'}
    >>> merge(d, {1: 'Foo', 2: 'Bar'})
    >>> sorted(d.items())
    [(1, 'Foo'), (2, 'Bar'), (3, 'baz')]

    :param dict1: the dictionary to merge into
    :param dict2: the dictionary containing the data that should be merged
    N)�itemsr=r�dict�Alias�tuplerBrD)�dict1�dict2�key�val2�val1�alias�otherss       rrDrD�s����[�[�]�]���	��T����9�9�S�>�>�D��$��%�%�
��<��D��d�E�*�*�	&� �$�<�D�D���e�,�,�&�$(�M�E�6�#�[�[�]�]�F��&�$�'�'�'�!�6�?�D�D��9�9�;�;�D��$��%�%�%�%����E�#�J��%�rc�$�eZdZdZd�Zd�Zd�ZdS)rNz�Representation of an alias in the locale data.

    An alias is a value that refers to some other part of the locale data,
    as specified by the `keys`.
    c�.�t|��|_dSr.)rO�keys)�selfrYs  r�__init__zAlias.__init__�s���$�K�K��	�	�	rc�B�dt|��j�d|j�d�S)N�<� �>)�type�__name__rY�rZs r�__repr__zAlias.__repr__�s$��� ��J�J�/�/�/�����;�;rc���|}|jD]
}||}�t|t��r|�|��}n/t|t��r|\}}|�|��}|S)z�Resolve the alias based on the given data.

        This is done recursively, so if one alias resolves to a second alias,
        that second alias will also be resolved.

        :param data: the locale data
        :type data: `dict`
        )rYrrN�resolverO)rZr3�baserRrUrVs      rrez
Alias.resolve�s{�����9�	�	�C���9�D�D��d�E�"�"�	'��<�<��%�%�D�D�
��e�
$�
$�	'� �M�E�6��=�=��&�&�D��rN)ra�
__module__�__qualname__�__doc__r[rcrer(rrrNrN�sK�������� � � �<�<�<�����rrNc�>�eZdZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
dS)�LocaleDataDictzUDictionary wrapper that automatically resolves aliases to the actual
    values.
    Nc�*�||_|�|}||_dSr.)�_datarf)rZr3rfs   rr[zLocaleDataDict.__init__�s����
��<��D���	�	�	rc�*�t|j��Sr.)r@rmrbs r�__len__zLocaleDataDict.__len__�s���4�:���rc�*�t|j��Sr.)�iterrmrbs r�__iter__zLocaleDataDict.__iter__�s���D�J���rc��|j|x}}t|t��r|�|j��}t|t
��rA|\}}|�|j�����}t||��t|��turt||j���}||ur
||j|<|S�N)rf)rmrrNrerfrOrBrDr`rMrk)rZrR�orig�valrUrVs      r�__getitem__zLocaleDataDict.__getitem__�s����Z��_�$��s��c�5�!�!�	)��+�+�d�i�(�(�C��c�5�!�!�	��M�E�6��-�-��	�*�*�/�/�1�1�C��#�v������9�9���� ��4�9�5�5�5�C��d�?�?�!�D�J�s�O��
rc��||j|<dSr.�rm)rZrR�values   r�__setitem__zLocaleDataDict.__setitem__�s����
�3���rc��|j|=dSr.ry)rZrRs  r�__delitem__zLocaleDataDict.__delitem__�s���J�s�O�O�Orc�\�t|j���|j���Srt)rkrmrBrfrbs rrBzLocaleDataDict.copys#���d�j�o�o�/�/�d�i�@�@�@�@rr.)rargrhrir[rorrrwr{r}rBr(rrrkrk�s���������������� � � ���� � � ����A�A�A�A�Arrk)T)rirEr�rer�	threading�collectionsr�	itertoolsrr�RLockr;rr�dirname�__file__r�compile�Irrrr!rrArDrN�MutableMappingrkr(rr�<module>r�s������
�
�
�	�	�	�	�	�	�	�	�
�
�
�
�����������������
���i�o����
�7�<�<������1�1�=�A�A��&�B�J�'N�PR�PT�U�U�����
3�
3�
3� @�@�@����04�4�4�4�n���B��������B&A�&A�&A�&A�&A�S�'�&A�&A�&A�&A�&Ar