ó
    Þ jƒ!  ã            	       ó  • S SK Jr  S SKrS SKrS SKrSSKJr  SS jrS r	SSS	.r
\
R                  \" S S
5       V s0 sH,  n U S;  d  M  \R                  U 5      SR                  U 5      _M.     sn 5        S rS r\r " S S\5      rgs  sn f )é    )Úabsolute_importNé   )Úsixc                 óX   • U (       a"  [         R                  " U 5      S   =(       d    U$ U$ )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     ÚT/var/www/html/gaurav/venv/lib/python3.13/site-packages/pip/_vendor/urllib3/fields.pyÚguess_content_typer   
   s'   € ö Ü×#Ò# HÓ-¨aÑ0×;°GÐ;Ø€Nó    c                 óî  ^• [        T[        R                  5      (       a  TR                  S5      m[	        U4S jS 5       5      (       d  U < ST< S3n UR                  S5        U$ [        R                  (       a  TR                  S5      m[        R                  R                  TS5      mU < ST< 3m[        R                  (       a  TR                  S5      mT$ ! [        [        4 a     N‰f = f)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   ó*   >#   • U H	  oT;   v •  M     g 7f©N© )Ú.0ÚchÚvalues     €r   Ú	<genexpr>Ú.format_header_param_rfc2231.<locals>.<genexpr>+   s   øé € Ð/¡Y˜r�UŽ{¢Yù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! Ã!C4Ã3C4z%22z\\)r   Ú\é    )é   z%{:02X}c           
      óî   ^• U4S jn[         R                  " SR                  TR                  5        Vs/ sH  n[         R                  " U5      PM     sn5      5      nUR                  X 5      nU$ s  snf )Nc                 ó,   >• TU R                  S5         $ )Nr   )Úgroup)ÚmatchÚneedles_and_replacementss    €r   ÚreplacerÚ#_replace_multiple.<locals>.replacerS   s   ø€ Ø'¨¯©°A«Ñ7Ð7r   Ú|)ÚreÚcompileÚjoinÚkeysÚescapeÚsub)r   r0   r1   ÚneedleÚpatternr'   s    `    r   Ú_replace_multipler<   R   sc   ø€ õ8ô �jŠjØ�	‰	Ð3K×3PÑ3PÔ3RÓSÑ3R¨”2—9’9˜VÖ$Ñ3RÑSÓTó€Gð �[‰[˜Ó)€Fà€Mùò Ts   µA2c                 ó–   • [        U[        R                  5      (       a  UR                  S5      n[	        U[
        5      nU < SU< S3$ )ay  
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?   _   s;   € ô& �%œŸ™×)Ñ)Ø—‘˜WÓ%ˆä˜eÔ%8Ó9€Eã›uÐ%Ð%r   c                   ó\   • \ rS rSrSrSS\4S jr\\4S j5       rS r	S r
S r SS	 jrS
rg)ÚRequestFieldé~   aá  
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                 óp   • Xl         X0l        X l        0 U l        U(       a  [	        U5      U l        XPl        g r   )Ú_nameÚ	_filenameÚdataÚheadersÚdictÚheader_formatter)Úselfr&   rF   r	   rG   rI   s         r   Ú__init__ÚRequestField.__init__�   s.   € ð Œ
Ø!ŒØŒ	ØˆŒÞÜ ›=ˆDŒLØ 0Õr   c                 ó²   • [        U[        5      (       a%  [        U5      S:X  a  Uu  pEnOUu  pE[        U5      nOSnSnUnU " XXCS9nUR	                  US9  U$ )aS  
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	   rI   )Úcontent_type)r   ÚtupleÚlenr   Úmake_multipart)ÚclsÚ	fieldnamer   rI   r	   rF   rO   Úrequest_params           r   Úfrom_tuplesÚRequestField.from_tuplesŸ   sn   € ô$ �eœU×#Ñ#Ü�5‹z˜Q‹Ø/4Ñ,�¡à!&‘�Ü1°(Ó;‘àˆHØˆLØˆDáØ hñ
ˆð 	×$Ñ$°,Ð$Ñ?àÐr   c                 ó$   • U R                  X5      $ )a  
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.
)rI   )rJ   r&   r   s      r   Ú_render_partÚRequestField._render_partÃ   s   € ð ×$Ñ$ TÓ1Ð1r   c                 óÖ   • / nUn[        U[        5      (       a  UR                  5       nU H*  u  pEUc  M
  UR                  U R	                  XE5      5        M,     SR                  U5      $ )a  
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   rH   ÚitemsÚappendrY   r6   )rJ   Úheader_partsÚpartsÚiterabler&   r   s         r   Ú_render_partsÚRequestField._render_partsÐ   sc   € ð ˆØˆÜ�l¤D×)Ñ)Ø#×)Ñ)Ó+ˆHã#‰KˆDØÓ Ø—‘˜T×.Ñ.¨tÓ;Ö<ñ $ð �z‰z˜%Ó Ð r   c                 óŠ  • / n/ SQnU HK  nU R                   R                  US5      (       d  M&  UR                  U< SU R                   U   < 35        MM     U R                   R                  5        H-  u  pEXB;  d  M  U(       d  M  UR                  U< SU< 35        M/     UR                  S5        SR	                  U5      $ )z-
Renders the headers for this request field.
)úContent-DispositionúContent-TypeúContent-LocationFz: z
)rG   Úgetr^   r]   r6   )rJ   ÚlinesÚ	sort_keysÚsort_keyÚheader_nameÚheader_values         r   Úrender_headersÚRequestField.render_headersæ   sž   € ð ˆâOˆ	Û!ˆHØ�|‰|×Ñ ¨%×0Ó0Ø—‘«(°D·L±LÀÓ4JÐKÖLñ "ð *.¯©×);Ñ);Ö)=Ñ%ˆKØÕ+ß�<Ø—L‘L«kº<Ð!HÖIñ *>ð
 	�‰�WÔØ�|‰|˜EÓ"Ð"r   c                 ó  • U=(       d    SU R                   S'   U R                   S==   SR                  SU R                  SU R                  4SU R                  445      /5      -  ss'   X R                   S'   X0R                   S'   g	)
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-datare   r\   Ú r&   r	   rf   rg   N)rG   r6   rb   rD   rE   )rJ   Úcontent_dispositionrO   Úcontent_locations       r   rR   ÚRequestField.make_multipartù   s„   € ð /B×.QÀ\ˆ�‰Ð*Ñ+Ø�‰Ð*Ó+¨u¯z©zàØ×"Ñ"Ø˜tŸz™zÐ*¨[¸$¿.¹.Ð,IÐJóðó0
ñ 	
Ó+ð (4�‰�^Ñ$Ø+;�‰Ð'Ò(r   )rE   rD   rF   rI   rG   )NNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r?   rK   ÚclassmethodrV   rY   rb   rn   rR   Ú__static_attributes__r   r   r   rA   rA   ~   sJ   † ñð( ØØ2ô1ð  Ø<Uó !ó ð!òF2ò!ò,#ð( MQ÷<r   rA   )zapplication/octet-stream)Ú
__future__r   Úemail.utilsr#   r   r4   Úpackagesr   r   r(   r>   ÚupdateÚrangeÚunichrÚformatr<   r?   Úformat_header_paramÚobjectrA   )Úccs   0r   Ú<module>r†      s«   ðÝ &ã Û Û 	å ôò'ðV àñÐ ð × Ñ ñ ˜˜hÔ'óá'ˆBØ�WÑó 	.ˆ�
‰
�2‹˜
×)Ñ)¨"Ó-Ò-Ù'ñôò
ò&ð8 0Ð ôT<�6õ T<ùòis   ¼	B	Á	%B	