Ë
    R>{i“  ã                  óö  — U d dl mZ d dlZd dlZd dlmZ d dlmZ ddlm	Z	 ddl
mZ ej                  rd d	lmZ d
Z eg d¢«      ZdZ	 	 d dlZedz  Z	 d dlZedz  Z G d„ de«      Zej4                  Zded<   ej:                  eef   Zh d£Z 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z!	 	 	 	 	 	 dd„Z"dd„Z# G d„ dejH                  «      Z%	 	 	 	 	 	 	 	 dd„Z&y# e$ r d dlZY Œ“w xY w# e$ r Y Œ™w xY w# e$ r Y Œšw xY w)é    )ÚannotationsN)Ú	b64encode)ÚEnumé   )ÚUnrewindableBodyErroré   )Úto_bytes)ÚFinalz@@@SKIP_HEADER@@@)úaccept-encodingÚhostú
user-agentzgzip,deflatez,brz,zstdc                  ó   — e Zd ZdZy)Ú_TYPE_FAILEDTELLr   N)Ú__name__Ú
__module__Ú__qualname__Útoken© ó    úR/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/urllib3/util/request.pyr   r   '   s   „ Ø�Er   r   zFinal[_TYPE_FAILEDTELL]Ú_FAILEDTELL>   ÚGETÚHEADÚTRACEÚDELETEÚCONNECTÚOPTIONSc                ót  — i }|r>t        |t        «      rn(t        |t        «      rdj                  |«      }nt        }||d<   |r||d<   | rd|d<   |r.dt        |j                  d«      «      j                  «       › �|d<   |r.dt        |j                  d«      «      j                  «       › �|d	<   |rd
|d<   |S )aÎ  
    Shortcuts for generating request headers.

    :param keep_alive:
        If ``True``, adds 'connection: keep-alive' header.

    :param accept_encoding:
        Can be a boolean, list, or string.
        ``True`` translates to 'gzip,deflate'.  If either the ``brotli`` or
        ``brotlicffi`` package is installed 'gzip,deflate,br' is used instead.
        List will get joined by comma.
        String will be used as provided.

    :param user_agent:
        String representing the user-agent you want, such as
        "python-urllib3/0.6"

    :param basic_auth:
        Colon-separated username:password string for 'authorization: basic ...'
        auth header.

    :param proxy_basic_auth:
        Colon-separated username:password string for 'proxy-authorization: basic ...'
        auth header.

    :param disable_cache:
        If ``True``, adds 'cache-control: no-cache' header.

    Example:

    .. code-block:: python

        import urllib3

        print(urllib3.util.make_headers(keep_alive=True, user_agent="Batman/1.0"))
        # {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
        print(urllib3.util.make_headers(accept_encoding=True))
        # {'accept-encoding': 'gzip,deflate'}
    ú,r   r   z
keep-aliveÚ
connectionzBasic zlatin-1Úauthorizationzproxy-authorizationzno-cachezcache-control)Ú
isinstanceÚstrÚlistÚjoinÚACCEPT_ENCODINGr   ÚencodeÚdecode)Ú
keep_aliveÚaccept_encodingÚ
user_agentÚ
basic_authÚproxy_basic_authÚdisable_cacheÚheaderss          r   Úmake_headersr0   7   sß   € ð^ !€GÙÜ�o¤sÔ+ØÜ˜¬Ô.Ø!Ÿh™h Ó7‰Oä-ˆOØ%4ˆÐ!Ñ"áØ *ˆ�ÑáØ ,ˆ�Ñáð ”Y˜z×0Ñ0°Ó;Ó<×CÑCÓEÐFÐGð 	Øñ	
ñ ð ”YÐ/×6Ñ6°yÓAÓB×IÑIÓKÐLÐMð 	Ø!ñ	
ñ Ø#-ˆ�Ñ à€Nr   c                ó’   — |�t        | |«       |S t        | dd«      �	 | j                  «       }|S |S # t        $ r
 t        }Y |S w xY w)z
    If a position is provided, move file to that point.
    Otherwise, we'll attempt to record a position for future use.
    NÚtell)Úrewind_bodyÚgetattrr2   ÚOSErrorr   )ÚbodyÚposs     r   Úset_file_positionr8   †   sc   € ð €Ü�D˜#Ôð €Jô 
��v˜tÓ	$Ð	0ð	Ø—)‘)“+ˆCð €Jˆ3€Jøô ò 	ô ‰Cà€Jð	ús   Ÿ3 ³AÁAc                óä   — t        | dd«      }|�t        |t        «      r
	  ||«       y|t
        u rt	        d«      ‚t        dt        |«      › d�«      ‚# t        $ r}t	        d«      |‚d}~ww xY w)zæ
    Attempt to rewind body to a certain position.
    Primarily used for request redirects and retries.

    :param body:
        File-like object that supports seek.

    :param int pos:
        Position to seek to in file.
    ÚseekNzAAn error occurred when rewinding request body for redirect/retry.zRUnable to record file position for rewinding request body during a redirect/retry.z1body_pos must be of type integer, instead it was ú.)r4   r"   Úintr5   r   r   Ú
ValueErrorÚtype)r6   Úbody_posÚ	body_seekÚes       r   r3   r3   š   s�   € ô ˜˜f dÓ+€IØÐ¤¨H´cÔ!:ð	Ù�hÕð
 
”[Ñ	 Ü#ð4ó
ð 	
ô
 Ø?ÄÀXÃÐ?OÈqÐQó
ð 	
øô ò 	Ü'ØSóàðûð	ús   ¡A Á	A/ÁA*Á*A/c                  ó"   — e Zd ZU ded<   ded<   y)ÚChunksAndContentLengthztyping.Iterable[bytes] | NoneÚchunksz
int | NoneÚcontent_lengthN)r   r   r   Ú__annotations__r   r   r   rC   rC   ¸   s   … Ø)Ó)ØÔr   rC   c                ó¦  ‡ ‡— ‰ €d}|j                  «       t        vrd}nld}nit        ‰ t        t        f«      rt        ‰ «      f}t        |d   «      }n8t        ‰ d«      rdˆˆ fd„} |«       }d}n	 t        ‰ «      }‰ f}|j                  }t        ||¬«      S # t        $ r. 	 t        ‰ «      }d}n# t        $ r t        d‰ ›�«      d‚w xY wY ŒCw xY w)aR  Takes the HTTP request method, body, and blocksize and
    transforms them into an iterable of chunks to pass to
    socket.sendall() and an optional 'Content-Length' header.

    A 'Content-Length' of 'None' indicates the length of the body
    can't be determined so should use 'Transfer-Encoding: chunked'
    for framing instead.
    Nr   Úreadc               3  óš   •K  — t        ‰t        j                  «      } 	 ‰j                  ‰«      }|sy | r|j	                  d«      }|–— Œ,­w)Nz
iso-8859-1)r"   ÚioÚ
TextIOBaserH   r'   )r'   Ú	datablockÚ	blocksizer6   s     €€r   Úchunk_readablez&body_to_chunks.<locals>.chunk_readableÞ   sK   øè ø€ ä ¤b§m¡mÓ4ˆFØØ ŸI™I iÓ0�	Ù ØÙØ )× 0Ñ 0°Ó >�IØ’ð ùs   ƒAAzO'body' must be a bytes-like object, file-like object, or iterable. Instead was )rD   rE   )Úreturnztyping.Iterable[bytes])ÚupperÚ_METHODS_NOT_EXPECTING_BODYr"   r#   Úbytesr	   ÚlenÚhasattrÚ
memoryviewÚnbytesÚ	TypeErrorÚiterrC   )r6   ÚmethodrM   rD   rE   rN   Úmvs   ` `    r   Úbody_to_chunksr[   ½   sù   ù€ ð$ €|ØˆØ�<‰<‹>Ô!<Ñ<Ø‰Nà!‰Nô 
�Dœ3¤˜,Ô	'Ü˜4“.Ð"ˆÜ˜V A™Y›‰ô 
��vÔ	ö		 ñ  Ó!ˆØ‰ð	'ä˜DÓ!ˆBð �WˆFØŸY™YˆNä!¨ÀÔOÐOøô ò 		ðä˜d›�Ø!%‘øÜò Üð8Ø8<°xðAóð ððúñ ð			ús*   Á2B Â	CÂ#B1Â0CÂ1C
Ã
CÃC)NNNNNN)r)   úbool | Noner*   zbool | list[str] | str | Noner+   ú
str | Noner,   r]   r-   r]   r.   r\   rO   zdict[str, str])r6   z
typing.Anyr7   ú_TYPE_BODY_POSITION | NonerO   r^   )r6   ztyping.IO[typing.AnyStr]r?   Ú_TYPE_BODY_POSITIONrO   ÚNone)r6   ztyping.Any | NonerY   r#   rM   r<   rO   rC   )'Ú
__future__r   rJ   ÚtypingÚbase64r   Úenumr   Ú
exceptionsr   Úutilr	   ÚTYPE_CHECKINGÚtyping_extensionsr
   ÚSKIP_HEADERÚ	frozensetÚSKIPPABLE_HEADERSr&   Ú
brotlicffiÚ_unused_module_brotliÚImportErrorÚbrotliÚ	zstandardÚ_unused_module_zstdr   r   r   rF   ÚUnionr<   r_   rQ   r0   r8   r3   Ú
NamedTuplerC   r[   r   r   r   ú<module>rt      s¨  ðÞ "ã 	Û Ý Ý å .Ý à	×ÒÝ'ð "€ÙÒGÓHÐ à €ðð/Û2ð �uÑ€OðÛ+ð �wÑ€Oô�tô ð (8×'=Ñ'=€Ð$Ó =à—l‘l 3Ð(8Ð#8Ñ9Ð ò WÐ ð #Ø59Ø!Ø!Ø#'Ø!%ðLØðLà2ðLð ðLð ð	Lð
 !ðLð ðLð óLð^Ø
ðØ5ðàóó(
ô<˜V×.Ñ.ô ð
CPØ
ðCPØ%(ðCPØ58ðCPàôCPøðI ò /Ý.ð/ûàò 	Ùð	ûð ò 	Ùð	ús<   Á
C ÁC0 Ã	C"ÃC% Ã!C"Ã"C% Ã%C-Ã,C-Ã0C8Ã7C8