Ë
    ��hƒ!  ã            	       ó  — d dl mZ d dlZd dlZd dlZddlmZ dd„Zd„ Z	ddd	œZ
e
j                   ed d
«      D � ci c](  } | dvr" ej                  | «      dj                  | «      “Œ* c} «       d„ Zd„ ZeZ G d„ de«      Zyc c} w )é    )Úabsolute_importNé   )Úsixc                 óB   — | rt        j                  | «      d   xs |S |S )zæ
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    r   )Ú	mimetypesÚ
guess_type)ÚfilenameÚdefaults     úX/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/pip/_vendor/urllib3/fields.pyÚguess_content_typer   
   s'   € ñ Ü×#Ñ# HÓ-¨aÑ0Ò;°GÐ;Ø€Nó    c                 óº  ‡— t        ‰t        j                  «      r‰j                  d«      Št	        ˆfd„dD «       «      s| ›d‰›d�}	 |j                  d«       |S t        j                  r‰j                  d«      Št        j                  j                  ‰d«      Š| ›d‰›�Št        j                  r‰j                  d«      Š‰S # t        t        f$ r Y Œ|w xY w)a!  
    Helper function to format and quote a single header parameter using the
    strategy defined in RFC 2231.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows
    `RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        An RFC-2231-formatted unicode string.
    úutf-8c              3   ó&   •K  — | ]  }|‰v –— Œ
 y ­w©N© )Ú.0ÚchÚvalues     €r   ú	<genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>+   s   øè ø€ Ò/˜rˆr�UŒ{Ñ/ùs   ƒz"\
ú="ú"Úasciiz*=)Ú
isinstancer   Úbinary_typeÚdecodeÚanyÚencodeÚUnicodeEncodeErrorÚUnicodeDecodeErrorÚPY2ÚemailÚutilsÚencode_rfc2231)Únamer   Úresults    ` r   Úformat_header_param_rfc2231r'      s¼   ø€ ô  �%œŸ™Ô)Ø—‘˜WÓ%ˆäÓ/ YÔ/Ô/Ú#¢UÐ+ˆð	Ø�M‰M˜'Ô"ð ˆMä
‡w‚wØ—‘˜WÓ%ˆô �K‰K×&Ñ& u¨gÓ6€EÚ™eÐ$€Eä
‡w‚wØ—‘˜WÓ%ˆà€Løô! #Ô$6Ð7ò 	Ùð	ús   Á
C ÃCÃCz%22z\\)r   ú\é    )é   z%{:02X}c           
      óæ   ‡— ˆfd„}t        j                  dj                  ‰j                  «       D �cg c]  }t        j                  |«      ‘Œ c}«      «      }|j                  || «      }|S c c}w )Nc                 ó,   •— ‰| j                  d«         S )Nr   )Úgroup)ÚmatchÚneedles_and_replacementss    €r   Úreplacerz#_replace_multiple.<locals>.replacerS   s   ø€ Ø'¨¯©°A«Ñ7Ð7r   ú|)ÚreÚcompileÚjoinÚkeysÚescapeÚsub)r   r/   r0   ÚneedleÚpatternr&   s    `    r   Ú_replace_multipler:   R   s_   ø€ ô8ô �j‰jØ�	‰	Ð3K×3PÑ3PÓ3RÖS¨”2—9‘9˜VÕ$ÒSÓTó€Gð �[‰[˜ 5Ó)€Fà€Mùò Ts   ³A.c                 óˆ   — t        |t        j                  «      r|j                  d«      }t	        |t
        «      }| ›d|›d�S )a±  
    Helper function to format and quote a single header parameter using the
    HTML5 strategy.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows the `HTML5 Working Draft
    Section 4.10.22.7`_ and matches the behavior of curl and modern browsers.

    .. _HTML5 Working Draft Section 4.10.22.7:
        https://w3c.github.io/html/sec-forms.html#multipart-form-data

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :ret:
        A unicode string, stripped of troublesome characters.
    r   r   r   )r   r   r   r   r:   Ú_HTML5_REPLACEMENTS)r%   r   s     r   Úformat_header_param_html5r=   _   s8   € ô& �%œŸ™Ô)Ø—‘˜WÓ%ˆä˜eÔ%8Ó9€EâšuÐ%Ð%r   c                   óN   — e Zd ZdZddefd„Zeefd„«       Zd„ Zd„ Z	d„ Z
	 d	d„Zy)
ÚRequestFielda  
    A data container for request body parameters.

    :param name:
        The name of this request field. Must be unicode.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field. Must be unicode.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    :param header_formatter:
        An optional callable that is used to encode and format the headers. By
        default, this is :func:`format_header_param_html5`.
    Nc                 ón   — || _         || _        || _        i | _        |rt	        |«      | _        || _        y r   )Ú_nameÚ	_filenameÚdataÚheadersÚdictÚheader_formatter)Úselfr%   rC   r	   rD   rF   s         r   Ú__init__zRequestField.__init__�   s6   € ð ˆŒ
Ø!ˆŒØˆŒ	ØˆŒÙÜ ›=ˆDŒLØ 0ˆÕr   c                 óº   — t        |t        «      r&t        |«      dk(  r|\  }}}n|\  }}t        |«      }nd}d}|} | ||||¬«      }|j	                  |¬«       |S )a³  
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from
        parameter of key/value strings AND key/filetuple. A filetuple is a
        (filename, data, MIME type) tuple where the MIME type is optional.
        For example::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        é   N)r	   rF   )Úcontent_type)r   ÚtupleÚlenr   Úmake_multipart)ÚclsÚ	fieldnamer   rF   r	   rC   rK   Úrequest_params           r   Úfrom_tupleszRequestField.from_tuplesŸ   st   € ô$ �eœUÔ#Ü�5‹z˜QŠØ/4Ñ,�˜$¡à!&‘�˜$Ü1°(Ó;‘àˆHØˆLØˆDáØ�t hÐAQô
ˆð 	×$Ñ$°,Ð$Ô?àÐr   c                 ó&   — | j                  ||«      S )aI  
        Overridable helper function to format a single header parameter. By
        default, this calls ``self.header_formatter``.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        )rF   )rG   r%   r   s      r   Ú_render_partzRequestField._render_partÃ   s   € ð ×$Ñ$ T¨5Ó1Ð1r   c                 óÈ   — g }|}t        |t        «      r|j                  «       }|D ])  \  }}|€Œ	|j                  | j	                  ||«      «       Œ+ dj                  |«      S )aO  
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
            as `k1="v1"; k2="v2"; ...`.
        ú; )r   rE   ÚitemsÚappendrT   r4   )rG   Úheader_partsÚpartsÚiterabler%   r   s         r   Ú_render_partszRequestField._render_partsÐ   si   € ð ˆØˆÜ�l¤DÔ)Ø#×)Ñ)Ó+ˆHà#ò 	=‰KˆD�%ØÑ Ø—‘˜T×.Ñ.¨t°UÓ;Õ<ð	=ð �z‰z˜%Ó Ð r   c                 ó`  — g }g d¢}|D ]B  }| j                   j                  |d«      sŒ |j                  |›d| j                   |   ›�«       ŒD | j                   j                  «       D ]#  \  }}||vsŒ|sŒ|j                  |›d|›�«       Œ% |j                  d«       dj	                  |«      S )z=
        Renders the headers for this request field.
        )úContent-DispositionúContent-TypeúContent-LocationFz: z
)rD   ÚgetrX   rW   r4   )rG   ÚlinesÚ	sort_keysÚsort_keyÚheader_nameÚheader_values         r   Úrender_headerszRequestField.render_headersæ   s«   € ð ˆâOˆ	Ø!ò 	MˆHØ�|‰|×Ñ ¨%Õ0Ø—‘ª(°D·L±LÀÒ4JÐKÕLð	Mð *.¯©×);Ñ);Ó)=ò 	JÑ%ˆK˜Ø )Ò+ÚØ—L‘Lªk¹<Ð!HÕIð	Jð
 	�‰�WÔØ�|‰|˜EÓ"Ð"r   c                 ó  — |xs d| j                   d<   | j                   dxx   dj                  d| j                  d| j                  fd| j                  ff«      g«      z  cc<   || j                   d<   || j                   d<   y	)
a|  
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        z	form-datar^   rV   Ú r%   r	   r_   r`   N)rD   r4   r\   rA   rB   )rG   Úcontent_dispositionrK   Úcontent_locations       r   rN   zRequestField.make_multipartù   sˆ   € ð /BÒ.QÀ\ˆ�‰Ð*Ñ+Ø�‰Ð*Ó+¨u¯z©zàØ×"Ñ"Ø˜tŸz™zÐ*¨[¸$¿.¹.Ð,IÐJóðó0
ñ 	
Ó+ð (4ˆ�‰�^Ñ$Ø+;ˆ�‰Ð'Ò(r   )NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r=   rH   ÚclassmethodrR   rT   r\   rg   rN   r   r   r   r?   r?   ~   sJ   „ ñð( ØØ2ó1ð  Ø<Uò !ó ð!òF2ò!ò,#ð( MQô<r   r?   )zapplication/octet-stream)Ú
__future__r   Úemail.utilsr"   r   r2   Úpackagesr   r   r'   r<   ÚupdateÚrangeÚunichrÚformatr:   r=   Úformat_header_paramÚobjectr?   )Úccs   0r   ú<module>r{      s¦   ðÝ &ã Û Û 	å óò'ðV àñÐ ð × Ñ ñ ˜˜hÓ'öàØ�WÑð 	ˆ�
‰
�2‹˜
×)Ñ)¨"Ó-Ñ-òôò
ò&ð8 0Ð ôT<�6õ T<ùòis   »-B