%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /snap/certbot/current/lib/python3.12/site-packages/urllib3/util/__pycache__/
Upload File :
Create Path :
Current File : //snap/certbot/current/lib/python3.12/site-packages/urllib3/util/__pycache__/url.cpython-312.pyc

�

�h�j{L���ddlmZddlZddlZddlmZddlmZddl	m
Z
ddlmZd	Z
ejd
�Zejd�Zejd�Zejd
�Zejdej&ej(z�ZdZdZdj1ee��Zeed�Zgd�ZdZddj;eD�cgc]}|ez��	c}�zdzZdezdzZdezdzezdzZ dZ!ejd�Z"ejd�Z#ejd ezd!z�Z$ejd e zd!z�Z%ejd e dd"zd!z�Z&ejd#ezd$z�Z'd%e!�de�de �d&�Z(eje(ej&ej(z�Z)e*d'�Z+e*d(�Z,e+e,zd)hzZ-e-d*d+hzZ.e.d,hzxZ/Z0Gd-�d.ejbd.d/ejde3fd0ejde3fd1ejde3fd2ejde4fd3ejde3fd4ejde3fd5ejde3fg��Z5ejl						dCd6��Z7ejl						dDd7��Z7						dEd8�Z7dFd9�Z8ejldGd:��Z9ejldHd;��Z9dId<�Z9dJd=�Z:dKd>�Z;						dJd?�Z<dLd@�Z=dMdA�Z>dNdB�Z?ycc}w)O�)�annotationsN)�partial)�unquote�)�LocationParseError�)�to_str)�http�httpsNz%[a-fA-F0-9]{2}z%[a-fA-F0-9]{2}|%z^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)z[\x00-\x20\x7f]zS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$z(?:[0-9]{1,3}\.){3}[0-9]{1,3}z[0-9A-Fa-f]{1,4}z(?:{hex}:{hex}|{ipv4}))�hex�ipv4)r�ls32)	z(?:%(hex)s:){6}%(ls32)sz::(?:%(hex)s:){5}%(ls32)sz%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)sz2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)sz6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)sz/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)sz'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)sz&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)sz(?:(?:%(hex)s:){0,6}%(hex)s)?::zCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~z(?:�|�)z
(?:%25|%)(?:[z]|%[a-fA-F0-9]{2})+z\[z)?\]z!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*z!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$zE^(?:0[xX][0-9a-fA-F]+|[0-9]+)(?:\.(?:0[xX][0-9a-fA-F]+|[0-9]+)){0,3}$�^�$����(z)\]$z^(z)(?::0*?(|0|[1-9][0-9]{0,4}))?$zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~z!$&'()*+,;=�:�@�/�?c����eZdZdZ							d													d�fd�
Zed
d��Zedd��Zedd��Zedd��Z	edd��Z
edd��Zedd	��Zdd
�Z
�xZS)�Urla�
    Data structure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`. Both the scheme and host are normalized as they are
    both case-insensitive according to RFC 3986.

    :param auth: User information as defined in RFC 3986 3.2.1. This
        component is kept percent-encoded. Use :attr:`auth_decoded` or
        :attr:`auth_decoded_joined` to get the decoded form.
    c
���|r|jd�sd|z}|�|j�}t�|�
||||||||�S)Nr)�
startswith�lower�super�__new__)	�cls�scheme�auth�host�port�path�query�fragment�	__class__s	        ��L/root/parts/certbot/install/lib/python3.12/site-packages/urllib3/util/url.pyrzUrl.__new__nsJ��������,���:�D����\�\�^�F��w��s�F�D�$��d�E�8�T�T�c��|j�y|jjd�\}}}t|d��|rt|d��fSdfS)z�
        User information with %-escapes decoded as UTF-8, returned as a
        ``(username, password)`` tuple.

        Both values are ``None`` if ``auth`` is ``None``.
        ``password`` is ``None`` if not present in the auth component.
        N)NNr�utf-8)�encoding)r"�	partition�_unquote)�self�username�sep�passwords    r)�auth_decodedzUrl.auth_decoded~sY���9�9���"&�)�)�"5�"5�c�":���#�x��X��0�47�H�X��0�
�	
�=A�
�	
r*c�<�|j\}}|�y|�d|xsd��S)a�
        User information with %-escapes decoded as UTF-8, as a string
        prepared for encoding into an 'authorization: basic ...' header.

        This property does not choose the encoding used for an
        'authorization: basic ...' header. Use the ``basic_auth_encoding`` or
        ``proxy_basic_auth_encoding`` parameters of
        :func:`urllib3.util.make_headers` when converting the returned string
        into Basic authentication bytes.

        This is a convenience property that joins the username and
        password with a colon, if both are present.
        If only the username is present, a trailing colon is still
        appended.
        If ``auth`` is ``None``, this returns ``None``.
        Nr�)r4)r0r1r3s   r)�auth_decoded_joinedzUrl.auth_decoded_joined�s3��$"�.�.���(������1�X�^��,�-�-r*c��|jS)z@For backwards-compatibility with urlparse. We're nice like that.)r#�r0s r)�hostnamezUrl.hostname�s���y�y�r*c�b�|jxsd}|j�|d|jzz
}|S)z)Absolute path including the query string.rr)r%r&)r0�uris  r)�request_urizUrl.request_uri�s4���i�i��3���:�:�!��3����#�#�C��
r*c�L�|j}|j}|�|�|S|�d|��S)z�
        Authority component as defined in RFC 3986 3.2.
        This includes userinfo (auth), host and port.

        i.e.
            userinfo@host:port
        r)r"�netloc)r0�userinfor?s   r)�	authorityz
Url.authority�s6���9�9�������>�X�-��M��Z�q���)�)r*c��|j�y|j�|j�d|j��S|jS)z�
        Network location including host and port.

        If you need the equivalent of urllib.parse's ``netloc``,
        use the ``authority`` property instead.
        Nr)r#r$r9s r)r?z
Url.netloc�s>���9�9����9�9� ��i�i�[��$�)�)��-�-��y�y�r*c��|\}}}}}}}d}|�||dzz
}|�||dzz
}|�||z
}|�|dt|�zz
}|�||z
}|�|d|zz
}|�|d|zz
}|S)a2
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example:

        .. code-block:: python

            import urllib3

            U = urllib3.util.parse_url("https://google.com/mail/")

            print(U.url)
            # "https://google.com/mail/"

            print( urllib3.util.Url("https", "username:password",
                                    "host.com", 80, "/path", "query", "fragment"
                                    ).url
                )
            # "https://username:password@host.com:80/path?query#fragment"
        r6z://rrr�#)�str)	r0r!r"r#r$r%r&r'�urls	         r)rFzUrl.url�s���6;?�7���d�D�$��x������6�E�>�!�C����4�#�:��C����4�K�C����3��T��?�"�C����4�K�C����3��;��C����3��>�!�C��
r*c��|jS�N)rFr9s r)�__str__zUrl.__str__s���x�x�r*)NNNNNNN)r!�
str | Noner"rJr#rJr$z
int | Noner%rJr&rJr'rJ)�returnz*tuple[None, None] | tuple[str, str | None])rKrJ)rKrE)�__name__�
__module__�__qualname__�__doc__r�propertyr4r7r:r=rAr?rFrI�
__classcell__)r(s@r)rrVs����"����� �#�U��U��U��	U�
�U��
U��U��U� �
��
� �.��.�,���������
*��
*������-��-�^r*rr!r"r#r$r%r&r'c��yrH���	component�
allowed_charss  r)�_encode_invalid_charsrW���r*c��yrHrSrTs  r)rWrWrXr*c��|�|St|�}d|vr1|j�r!tt|j|��r|St
j
d�|�\}}|jdd�}||jd�k(}t�}|D]5}|r|dk(s|dkrt|�|vr|j|��.|d|zz
}�7|j�S)	zfPercent-encodes a URI component without reapplying
    onto an already percent-encoded component.
    �%c�@�|jd�j�S�Nr��group�upper��matchs r)�<lambda>z'_encode_invalid_chars.<locals>.<lambda>0s��e�k�k�!�n�*�*�,�r*r,�
surrogatepass�%�%�s%%%02X)
r	�isascii�all�map�__contains__�_PERCENT_RE�subn�encode�count�	bytearray�chr�append�decode)rUrV�percent_encodings�	uri_bytes�is_percent_encoded�encoded_component�byte_ords       r)rWrWs��������y�!�I�	�9��������M�.�.�	�:�;���
$/�#3�#3�,�i�$� �I� �� � ��/�:�I�*�i�o�o�d�.C�C��!����6���8�t�#3��s�N�s�8�}�
�=��$�$�X�.���X�!5�5��
6��#�#�%�%r*c�P�|jd�}g}|D]2}|dk(r�	|dk7r|j|�� |s�#|j��4|jd�r|r|dr|j	dd�|jd�r|jd�dj
|�S)Nr�.z..rr6)z/.z/..)�splitrr�popr�insert�endswith�join)r%�segments�output�segments    r)�_remove_path_dot_segmentsr�Cs����z�z�#��H�
�F��
���c�>���d�?��M�M�'�"���J�J�L�
����s��V�v�a�y��
�
�a����}�}�]�#��
�
�b���8�8�F��r*c��yrHrS�r#r!s  r)�_normalize_hostr�as��=@r*c��yrHrSr�s  r)r�r�es��;>r*c
��|�r}tj|�}|rtd|�d|j�����|tv�r>t
j
|�}|r�tj|�}|r�|jd�\}}|||}|jd�r|dk7r|dd}n|dd}tjtt|��|�}t|t�}|d|j!��d|�||d��S|j!�St"j
|�s_d|vrt$jt&|�}t)dj+|j-d	�D�cgc]
}t/|���c}�d
�S|Scc}w)N�Host � contains invalid character rz%25���
error_hostr[�.rz�ascii)�_HOST_INVALID_CHAR_RE�searchrr_�_NORMALIZABLE_SCHEMES�_IPV6_ADDRZ_RErb�_ZONE_ID_RE�spanrrl�subr�#_normalize_zone_id_percent_encodingrW�_UNRESERVED_CHARSr�_IPV4_RE�_HOST_PERCENT_RE� _normalize_host_percent_encodingr	rr{�_idna_encode)	r#r!�invalid_host_char�is_ipv6rb�start�end�zone_id�labels	         r)r�r�is����1�8�8��>���$���x�;�$�*�*�,�/�1��
��*�*�$�*�*�4�0�G��$�*�*�4�0���!&���A��J�E�3�"�5��o�G��)�)�%�0�W��5E�")�!�"�+��")�!�"�+��)�o�o�� C�PT�U���G�4�G�=N�O�G�"�6�E�l�0�0�2�3�1�W�I�d�3�4�j�\�J�J��:�:�<�'��^�^�D�)��$�;�+�/�/�0P�RV�W�D���I�I��
�
�3��P�u�|�E�2�P�Q�����K��Qs�#Fc��|jd�}tt|ddd��}|dks|dk(rtd|�d|����|S)Nrr�� �r�z4 contains invalid percent-encoded control character )r_rq�intr)rbr��percent_encoded_octet�
decoded_octets    r)�_decode_percent_encodingr��sf��!�K�K��N����1�!�"�5�r�:�;�M��v���&�!8� ��J�>�"!�!6� 9�
;�
�	
��r*c���|jd�dk(rt|j�d���t||j��}|tvr|S|jd�j�S)Nrr[z is not a valid hostr�)r_r�stringr�r�r`)rbr�s  r)r�r��s`���{�{�1�~��� �E�L�L�#3�3G�!H�I�I�,�U�u�|�|�L�M��)�)����;�;�q�>���!�!r*c�Z�t||��|jd�j�S)Nr�r)r�r_r`)rbr�s  r)r�r��s%���U�z�:��;�;�q�>���!�!r*c�R�|j�s(	ddl}	|j	|j�dd��Stjd�|j��j	d�S#t$r
td�d�wxYw#|j$rtd|�d��d�wxYw)	Nrz-Unable to parse URL without the 'idna' moduleT)�strict�
std3_ruleszName 'z' is not a valid IDNA labelc�@�|jd�j�Sr]r^ras r)rcz_idna_encode.<locals>.<lambda>�s�����Q��)=�)=�)?�r*r�)	rh�idna�ImportErrorrrnr�	IDNAErrorrlr�)�namer�s  r)r�r��s����<�<�>�	��	��;�;�t�z�z�|�D�T�;�J�J��?�?�?�����N�U�U������	�$�?���
�	���~�~�	�$����9�:���
�	�s�A-�!B�-B� B&c���tj|�}|st|�d���|j�\}}t	|t
�}|�t	|t�}|d|zz
}|S)z�Percent-encodes a request target so that there are no invalid characters

    Pre-condition for this function is that 'target' must start with '/'.
    If that is the case then _TARGET_RE will always produce a match.
    z is not a valid request URIr)�
_TARGET_RErbr�groupsrW�_PATH_CHARS�_QUERY_CHARS)�targetrbr%r&�encoded_targets     r)�_encode_targetr��sk��
���V�$�E�� �F�:�-H�!I�J�J��,�,�.�K�D�%�*�4��=�N���%�e�\�:���#��+�%���r*c	��|s
t�Stj|�sd|z}tj	|�j�\}}}}}|duxs|j
�tv}|r|j
�}|r�|jd�\}}}	|xsd}tj|	�}
|
sDtj|	�}|rtd|	�d|j�����t|	�d���|
j�\}}
|r|rt|t�}|
dk(r	d}
nd\}}}
|
�-t!|
�}d	|cxkrd
kst|��t|��d}t#||�}|r|rt%|�}t|t&�}|r|rt|t(�}|r|rt|t*�}|s	|�|�d}nd}t|||||||��S)a�
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.
    This parser is RFC 3986 and RFC 6874 compliant.

    The parser logic and helper functions are based heavily on
    work done in the ``rfc3986`` module.

    :param str url: URL to parse into a :class:`.Url` namedtuple.

    Partly backwards-compatible with :mod:`urllib.parse`.

    Example:

    .. code-block:: python

        import urllib3

        print( urllib3.util.parse_url('http://google.com/mail/'))
        # Url(scheme='http', host='google.com', port=None, path='/mail/', ...)

        print( urllib3.util.parse_url('google.com:80'))
        # Url(scheme=None, host='google.com', port=80, path=None, ...)

        print( urllib3.util.parse_url('/foo?bar'))
        # Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    z//Nrr�r�z is not a valid host or portr6)NNNri��)r!r"r#r$r%r&r')r�
_SCHEME_REr��_URI_RErbr�rr��
rpartition�
_HOST_PORT_RE�	fullmatchr�rr_rW�_USERINFO_CHARSr�r�r�r�r��_FRAGMENT_CHARS)rFr!rAr%r&r'�
normalize_urir"�_�	host_port�host_port_matchr�r#r$�port_ints               r)�	parse_urlr��s���8��u�����S�!��S�j��07�}�}�S�/A�/H�/H�/J�,�F�I�t�U�H��d�N�M�f�l�l�n�8M�&M�M�
�������&�1�1�#�6���a���|�t��'�1�1�)�<��� 5� <� <�Y� G�� �(��I�=�(D�(�.�.�0�3�5���%�	�}�4P�%Q�R�R�$�+�+�-�
��d��M�(���?�D��2�:��D�+���d�D����t�9���X�&��&�$�S�)�)�'�$�S�)�)����4��(�D���(��.��$�T�;�7����%�e�\�:����(��?�C������ 4��D��D���
�
�
�
����r*)rUrErV�typing.Container[str]rKrE)rU�NonerVr�rKr�)rUrJrVr�rKrJ)r%rErKrE)r#r�r!rJrKr�)r#rEr!rJrKrE)r#rJr!rJrKrJ)rb�
re.Match[str]r�rErKrE)rbr�rKrE)r�rErK�bytes)r�rErKrE)rFrErKr)@�
__future__r�re�typing�	functoolsr�urllib.parserr/�
exceptionsr�utilr	r��compilerlr�r�r��UNICODE�DOTALLr��	_IPV4_PAT�_HEX_PAT�format�	_LS32_PAT�_subs�_variations�_UNRESERVED_PATr�	_IPV6_PAT�_ZONE_ID_PAT�_IPV6_ADDRZ_PAT�
_REG_NAME_PATr�r��_IPV6_REr��_BRACELESS_IPV6_ADDRZ_REr��_HOST_PORT_PATr��setr��_SUB_DELIM_CHARSr�r�r�r��
NamedTuple�OptionalrEr�r�overloadrWr�r�r�r�r�r�r�r�)�xs0r)�<module>r�s���"�	�
��,�+��0���b�j�j�+�,���2�:�:�2�3��
�R�Z�Z�9�
:�
�"��
�
�#5�6��
�"�*�*��
�J�J�����
��
-�	���$�+�+��y�+�I�	��)�,����*Y���C�H�H��=�A�a�%�i�=�>�>��D�	���0�3H�H���)�#�f�,�|�;�g�E��4�
�
�R�Z�Z�<�
=�
��2�:�:�L����2�:�:�c�I�o��+�,������C�/�1�C�7�8��%�2�:�:�c�O�A�b�,A�&A�C�&G�H���b�j�j��|�+�g�5�6���
����
��
�
�>�2�:�:��	�	�+A�B�
��H����}�%��#�&6�6�#��>����c�
�*��!,��u�!4�4���n��F���
�
�v���s�+�,�
�V�_�_�S�)�*�
�V�_�_�S�)�*�
�V�_�_�S�)�*�
�V�_�_�S�)�*�
�f�o�o�c�*�+�
�����-�.�	
��n�b������#8������������$9��	����+&��+&�*?�+&��+&�\�<���@��@����>��>�&�R
�"�"��"�),�"��"��*�$j��>s�
K7

Zerion Mini Shell 1.0
GEPRES Tracking

República de Moçambique

Ministério da Economia e Finanças