Ë
    A²XjÜC  ã                  óú  — U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZm	Z	m
Z
mZmZmZmZmZmZmZ d dlmZmZmZmZmZ d dlZd dlZd dlZddlmZ ddlmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z% dd	l&m'Z' dd
l(m)Z)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 erddl"m2Z2 ddl3m4Z4  ed«      Z5 ed«      Z6 ed«      Z7 edd¬«      Z8 ejr                  e:«      Z;de<d<    G d„ dee6   «      Z= G d„ de>«      Z?dd„Z@d d„ZA G d„ d«      ZBy)!é    )ÚannotationsN)
ÚTYPE_CHECKINGÚAnyÚUnionÚGenericÚTypeVarÚCallableÚIteratorÚAsyncIteratorÚcastÚoverload)Ú	AwaitableÚ	ParamSpecÚoverrideÚ
deprecatedÚ
get_originé   )ÚNoneType)Úis_givenÚextract_type_argÚis_annotated_typeÚis_type_alias_type)Ú	BaseModelÚis_basemodelÚadd_request_id)ÚRAW_RESPONSE_HEADER)ÚStreamÚAsyncStreamÚis_stream_class_typeÚextract_stream_chunk_type)ÚAPIResponseValidationError)ÚJSONLDecoderÚAsyncJSONLDecoder)ÚFinalRequestOptions)Ú
BaseClientÚPÚRÚ_TÚ_T_coT)Ú	covariantzlogging.LoggerÚlogc                  ó¨  — e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ded<   	 ddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d'd„Zed(d„«       Zed)d„«       Z	ed*d„«       Z	ddœd+d„Z	ed,d„«       Z
ed-d„«       Zed.d„«       Zed/d„«       Zed0d„«       Zed1d „«       Zed0d!„«       Zed0d"„«       Zed2d#„«       Zed3d$„«       Zddœd+d%„Zed0d&„«       Zy)4ÚLegacyAPIResponsea°  This is a legacy class as it will be replaced by `APIResponse`
    and `AsyncAPIResponse` in the `_response.py` file in the next major
    release.

    For the sync client this will mostly be the same with the exception
    of `content` & `text` will be methods instead of properties. In the
    async client, all methods will be async.

    A migration script will be provided & the migration in general should
    be smooth.
    útype[R]Ú_cast_toúBaseClient[Any, Any]Ú_clientzdict[type[Any], Any]Ú_parsed_by_typeÚboolÚ_streamú1type[Stream[Any]] | type[AsyncStream[Any]] | NoneÚ_stream_clsr$   Ú_optionsúhttpx.ResponseÚhttp_responseÚintÚretries_takenr   )r;   c               ót   — || _         || _        i | _        || _        || _        || _        || _        || _        y ©N)r/   r1   r2   r4   r6   r7   r9   r;   )ÚselfÚrawÚcast_toÚclientÚstreamÚ
stream_clsÚoptionsr;   s           ú`/var/www/html/content_generation/venv/lib/python3.12/site-packages/anthropic/_legacy_response.pyÚ__init__zLegacyAPIResponse.__init__H   s@   € ð  ˆŒØˆŒØ!ˆÔØˆŒØ%ˆÔØˆŒØ ˆÔØ*ˆÕó    c                óL   — | j                   j                  j                  d«      S )Nz
request-id)r9   ÚheadersÚget©r>   s    rE   Ú
request_idzLegacyAPIResponse.request_id\   s   € à×!Ñ!×)Ñ)×-Ñ-¨lÓ;Ð;rG   c                ó   — y r=   © )r>   Útos     rE   ÚparsezLegacyAPIResponse.parse`   s   € Ø,/rG   c                 ó   — y r=   rN   rK   s    rE   rP   zLegacyAPIResponse.parsec   s   € ØrG   N©rO   c               ó‚  — |�|n| j                   }| j                  j                  |«      }|�|S | j                  |¬«      }t	        | j
                  j                  «      r| j
                  j                  |«      }t        |t        «      rt        || j                  «       || j                  |<   t        t        |«      S )aá  Returns the rich python representation of this response's data.

        NOTE: For the async client: this will become a coroutine in the next major version.

        For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

        You can customise the type that the response is parsed into through
        the `to` argument, e.g.

        ```py
        from anthropic import BaseModel


        class MyModel(BaseModel):
            foo: str


        obj = response.parse(to=MyModel)
        print(obj.foo)
        ```

        We support parsing:
          - `BaseModel`
          - `dict`
          - `list`
          - `Union`
          - `str`
          - `int`
          - `float`
          - `httpx.Response`
        rR   )r/   r2   rJ   Ú_parser   r7   Úpost_parserÚ
isinstancer   r   rL   r   r'   )r>   rO   Ú	cache_keyÚcachedÚparseds        rE   rP   zLegacyAPIResponse.parsef   sŸ   € ð@ ˜.‘B¨d¯m©mˆ	Ø×%Ñ%×)Ñ)¨)Ó4ˆØÐØˆMà—‘ �Ó#ˆÜ�D—M‘M×-Ñ-Ô.Ø—]‘]×.Ñ.¨vÓ6ˆFä�fœiÔ(Ü˜6 4§?¡?Ô3à*0ˆ×Ñ˜YÑ'Ü”A�v‹ÐrG   c                ó.   — | j                   j                  S r=   )r9   rI   rK   s    rE   rI   zLegacyAPIResponse.headers•   ó   € à×!Ñ!×)Ñ)Ð)rG   c                ó.   — | j                   j                  S r=   )r9   ÚrequestrK   s    rE   Úhttp_requestzLegacyAPIResponse.http_request™   r[   rG   c                ó.   — | j                   j                  S r=   )r9   Ústatus_coderK   s    rE   r`   zLegacyAPIResponse.status_code�   s   € à×!Ñ!×-Ñ-Ð-rG   c                ó.   — | j                   j                  S r=   )r9   ÚurlrK   s    rE   rb   zLegacyAPIResponse.url¡   s   € à×!Ñ!×%Ñ%Ð%rG   c                ó.   — | j                   j                  S r=   )r^   ÚmethodrK   s    rE   rd   zLegacyAPIResponse.method¥   s   € à× Ñ ×'Ñ'Ð'rG   c                ó.   — | j                   j                  S )zŠReturn the binary response content.

        NOTE: this will be removed in favour of `.read()` in the
        next major version.
        )r9   ÚcontentrK   s    rE   rf   zLegacyAPIResponse.content©   s   € ð ×!Ñ!×)Ñ)Ð)rG   c                ó.   — | j                   j                  S )zyReturn the decoded response content.

        NOTE: this will be turned into a method in the next major version.
        )r9   ÚtextrK   s    rE   rh   zLegacyAPIResponse.text²   s   € ð ×!Ñ!×&Ñ&Ð&rG   c                ó.   — | j                   j                  S r=   )r9   Úhttp_versionrK   s    rE   rj   zLegacyAPIResponse.http_versionº   s   € à×!Ñ!×.Ñ.Ð.rG   c                ó.   — | j                   j                  S r=   )r9   Ú	is_closedrK   s    rE   rl   zLegacyAPIResponse.is_closed¾   s   € à×!Ñ!×+Ñ+Ð+rG   c                ó.   — | j                   j                  S )zCThe time taken for the complete request/response cycle to complete.)r9   ÚelapsedrK   s    rE   rn   zLegacyAPIResponse.elapsedÂ   s   € ð ×!Ñ!×)Ñ)Ð)rG   c               ó  — |�|n| j                   }t        |«      r|j                  }|rt        |«      rt	        |d«      }t        |«      xs |}t        j                  |«      rÞt        t        t        |«      t        «      rQt        t         t        d|«      | j                  j                  d¬«      t	        |d«      | j                  ¬«      «      S t        t        t        |«      t        «      rQt        t         t        d|«      | j                  j!                  d¬«      t	        |d«      | j                  ¬«      «      S | j"                  �rW|rut%        |«      st'        dt(        › dt*        › �«      ‚t        t,         |t/        |d	¬
«      | j                  t        t        | j0                  «      | j2                  ¬«      «      S | j4                  rbt        t        | j5                  t/        | j4                  «      | j                  t        t        | j0                  «      | j2                  ¬«      «      S t        d| j0                  j6                  «      }|€
t9        «       ‚t        t         ||| j                  t        t        | j0                  «      | j2                  ¬«      «      S |t:        u rt        t        d «      S | j                  }|t<        k(  rt        t        |j>                  «      S |t@        k(  r#t        t        tA        |j>                  «      «      S |tB        k(  r#t        t        tC        |j>                  «      «      S |tD        k(  r+t        t        |j>                  jG                  «       dk(  «      S t        j                  |«      r&t        |tH        «      rt        t         ||«      «      S |tJ        k(  rtM        d«      ‚t        j                  |«      rHt        |tN        jP                  «      r.|tN        jP                  k7  rtS        d«      ‚t        t        |«      S t        j                  |«      r5t        |tT        «      s%t        |tV        jT                  «      rt'        d«      ‚|tX        urr|tZ        urj|t\        urb|t^        urZt        |tT        «      sJtM        d|› dtT        › dt\        › dtZ        › dt^        › dt:        › dt<        › dtN        jP                  › d�«      ‚|j`                  jc                  dd«      je                  d«      ^}}|jg                  d«      sxti        |«      r/	 |jk                  «       }| j0                  jm                  |||¬«      S | j0                  jv                  rty        |d|› d�|j>                  ¬«      ‚|j>                  S |jk                  «       }| j0                  jm                  |||¬«      S # tn        $ r*}	tp        js                  dtu        |	«      |	«       Y d }	~	Œšd }	~	ww xY w)Nr   ztype[JSONLDecoder[Any]]é@   ©Ú
chunk_size)Úraw_iteratorÚ	line_typer9   ztype[AsyncJSONLDecoder[Any]]z/Expected custom parse type to be a subclass of z or zUExpected custom stream type to be passed with a type argument, e.g. Stream[ChunkType])Úfailure_message)r@   ÚresponserA   rD   r5   Útruez+Unexpected state - cast_to is `APIResponse`z:Subclasses of httpx.Response cannot be passed to `cast_to`zYPydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`zUnsupported type, expected z to be a subclass of z, Ú.zcontent-typeÚ*Ú;Újson)Údatar@   rv   z5Could not read JSON from response data due to %s - %szMExpected Content-Type response header to be `application/json` but received `z
` instead.)rv   ÚmessageÚbody)=r/   r   Ú	__value__r   r   r   ÚinspectÚisclassÚ
issubclassr   r   r"   r'   r9   Ú
iter_bytesr#   Úaiter_bytesr4   r   Ú	TypeErrorr   r   r(   r    r1   r7   r6   Ú_default_stream_clsÚMissingStreamClassErrorr   Ústrrh   r:   Úfloatr3   ÚlowerÚHttpxBinaryResponseContentr-   ÚRuntimeErrorÚhttpxÚResponseÚ
ValueErrorr   ÚpydanticÚobjectÚlistÚdictr   rI   rJ   ÚsplitÚendswithr   r{   Ú_process_response_dataÚ	Exceptionr+   ÚdebugÚtypeÚ_strict_response_validationr!   )
r>   rO   r@   ÚoriginrC   rv   Úcontent_typeÚ_r|   Úexcs
             rE   rT   zLegacyAPIResponse._parseÇ   sl  € Ø˜‘"¨D¯M©Mˆô ˜gÔ&Ø×'Ñ'ˆGñ Ô(¨Ô1Ü& w°Ó2ˆGä˜GÓ$Ò/¨ˆä�?‰?˜6Ô"Üœ$œs FÓ+¬\Ô:ÜÜØ<”DÐ2°GÓ<Ø%)×%7Ñ%7×%BÑ%BÈbÐ%BÓ%QÜ"2°7¸AÓ">Ø&*×&8Ñ&8ôóð ô œ$œs FÓ+Ô->Ô?ÜÜØA”DÐ7¸ÓAØ%)×%7Ñ%7×%CÑ%CÈrÐ%CÓ%RÜ"2°7¸AÓ">Ø&*×&8Ñ&8ôóð ð �<‹<ÙÜ+¨BÔ/Ü#Ð&UÔV\ÐU]Ð]aÔbmÐanÐ$oÓpÐpäÜÙÜ 9Øð -Dô!ð "&×!3Ñ!3Ü#¤C¨¯©Ó6Ø $§¡ôóð ð ×ÒÜÜØ×$Ñ$Ü 9¸$×:JÑ:JÓ KØ!%×!3Ñ!3Ü#¤C¨¯©Ó6Ø $§¡ð	 %ó óð ô ÐQÐSW×S_ÑS_×SsÑSsÓtˆJØÐ!Ü-Ó/Ð/äÜÙØ#Ø!×/Ñ/Ü¤ T§\¡\Ó2Ø ŸM™Mô	óð ð ”hÑÜœ˜4“=Ð à×%Ñ%ˆØ”cŠ>Üœ˜8Ÿ=™=Ó)Ð)à”cŠ>Üœœ3˜xŸ}™}Ó-Ó.Ð.à”eÒÜœœ5 §¡Ó/Ó0Ð0à”dŠ?Üœ˜8Ÿ=™=×.Ñ.Ó0°FÑ:Ó;Ð;ä�?‰?˜6Ô"¤z°&Ô:TÔ'UÜœ™7 8Ó,Ó-Ð-àÔ&Ò&ÜÐLÓMÐMä�?‰?Øô
ä˜¤§¡Ô0ð œ%Ÿ.™.Ò(Ü Ð#]Ó_Ð_Üœ˜8Ó$Ð$ô �O‰OØôô ˜v¤yÔ1Ü˜6¤8×#5Ñ#5Ô6äÐwÓxÐxð œ6Ñ!Øœd‘NØœd‘NØœe‘OÜ˜v¤yÔ1äØ-¨g¨YÐ6KÌIÈ;ÐVXÔY]ÐX^Ð^`ÔaeÐ`fÐfhÔinÐhoÐoqÔrzÐq{Ð{}ô  Bð  ~Cð  CGô  HM÷  HVñ  HVð  GWð  WXð  Yóð ð $×+Ñ+×/Ñ/°ÀÓD×JÑJÈ3ÓOÐˆ�qØ×$Ñ$ VÔ,Ü˜GÔ$ð	Ø#Ÿ=™=›?�Dð  Ÿ<™<×>Ñ>Ø!Ø 'Ø!)ð ?ó ð ð �|‰|×7Ò7Ü0Ø%ØkÐlxÐkyð  zDð  EØ!Ÿ™ôð ð —=‘=Ð à�}‰}‹ˆà�|‰|×2Ñ2ØØØð 3ó 
ð 	
øô/ !ò gÜ—I‘IÐUÔW[Ð\_ÓW`Ðbe×fÑfûðgús   Ô4W ×	X× W<×<Xc                ój   — d| j                   › d| j                  j                  › d| j                  › d�S )Nz<APIResponse [Ú z] type=Ú>)r`   r9   Úreason_phraser/   rK   s    rE   Ú__repr__zLegacyAPIResponse.__repr__n  s;   € à × 0Ñ 0Ð1°°4×3EÑ3E×3SÑ3SÐ2TÐT[Ð\`×\iÑ\iÐ[jÐjkÐlÐlrG   )r?   r8   r@   r.   rA   r0   rB   r3   rC   r5   rD   r$   r;   r:   ÚreturnÚNone©r¤   z
str | None)rO   ztype[_T]r¤   r(   )r¤   r'   )rO   ztype[_T] | Noner¤   zR | _T)r¤   zhttpx.Headers)r¤   zhttpx.Request)r¤   r:   )r¤   z	httpx.URL©r¤   rˆ   ©r¤   Úbytes)r¤   r3   )r¤   zdatetime.timedelta)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__rF   ÚpropertyrL   r   rP   rI   r^   r`   rb   rd   rf   rh   rj   rl   rn   rT   r   r£   rN   rG   rE   r-   r-   /   s»  … ñ
ð ÓØ!Ó!Ø)Ó)ØƒMØBÓBØ!Ó!à!Ó!àÓØMð ñ+ð ð+ð ð	+ð
 %ð+ð ð+ð Fð+ð %ð+ð ð+ð 
ó+ð( ò<ó ð<ð Ú/ó Ø/àÚó Øà-1õ -ð^ ò*ó ð*ð ò*ó ð*ð ò.ó ð.ð ò&ó ð&ð ò(ó ð(ð ò*ó ð*ð ò'ó ð'ð ò/ó ð/ð ò,ó ð,ð ò*ó ð*ð /3õ e
ðN òmó ñmrG   r-   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )r‡   c                ó$   •— t         ‰| �  d«       y )Nz}The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `anthropic._streaming` for reference)ÚsuperrF   )r>   Ú	__class__s    €rE   rF   z MissingStreamClassError.__init__t  s   ø€ Ü‰Ñð Lõ	
rG   ©r¤   r¥   )rª   r«   r¬   rF   Ú__classcell__)r³   s   @rE   r‡   r‡   s  s   ø„ ÷
ñ 
rG   r‡   c                óD   ‡ — t        j                  ‰ «      dˆ fd„«       }|S )ú�Higher order function that takes one of our bound API methods and wraps it
    to support returning the raw `APIResponse` object directly.
    c                 ó¤   •— i t        t        |j                  d«      «      xs i ¥}d|t        <   ||d<   t        t        t
            ‰| i |¤Ž«      S ©NÚextra_headersrw   ©r   r   rJ   r   r-   r'   ©ÚargsÚkwargsrº   Úfuncs      €rE   Úwrappedz(to_raw_response_wrapper.<locals>.wrapped  sU   ø€ à(Z¬D´°f·j±jÀÓ6QÓ,RÒ,XÐVXÐ(ZˆØ-3ˆÔ)Ñ*à"/ˆˆÑäÔ%¤aÑ(©$°Ð*?¸Ñ*?Ó@Ð@rG   ©r½   zP.argsr¾   zP.kwargsr¤   zLegacyAPIResponse[R]©Ú	functoolsÚwraps©r¿   rÀ   s   ` rE   Úto_raw_response_wrapperrÆ   z  s)   ø€ ô
 ‡_�_�TÓôAó ðAð €NrG   c                óD   ‡ — t        j                  ‰ «      dˆ fd„«       }|S )r·   c               Ÿ  óÀ   •K  — i t        t        |j                  d«      «      xs i ¥}d|t        <   ||d<   t        t        t
            ‰| i |¤Žƒ d {  –—† «      S 7 Œ­wr¹   r»   r¼   s      €rE   rÀ   z.async_to_raw_response_wrapper.<locals>.wrapped�  s_   øè ø€ à(Z¬D´°f·j±jÀÓ6QÓ,RÒ,XÐVXÐ(ZˆØ-3ˆÔ)Ñ*à"/ˆˆÑäÔ%¤aÑ(±°dÐ0E¸fÑ0E×*EÓFÐFÐ*Eús   ƒAAÁA
Á	ArÁ   rÂ   rÅ   s   ` rE   Úasync_to_raw_response_wrapperrÉ   ‹  s)   ø€ ô
 ‡_�_�TÓôGó ðGð €NrG   c                  óH  — e Zd ZU ded<   dd„Zedd„«       Zedd„«       Zedd„«       Zedd„«       Z	dd„Z
dd	„Zd d!d„Zd d"d„Zd#d„Zd d!d„Z	 	 	 	 d$d„Z ed«      d
dœ	 	 	 	 	 d%d„«       Zd&d„Zdd„Zd d'd„Zd d(d„Zd)d„Zd d'd„Z ed«      d
dœ	 	 	 	 	 d%d„«       Zd&d„Zy
)*r‹   r8   rv   c                ó   — || _         y r=   )rv   )r>   rv   s     rE   rF   z#HttpxBinaryResponseContent.__init__Ÿ  s	   € Ø ˆ�rG   c                ó.   — | j                   j                  S r=   )rv   rf   rK   s    rE   rf   z"HttpxBinaryResponseContent.content¢  s   € à�}‰}×$Ñ$Ð$rG   c                ó.   — | j                   j                  S r=   )rv   rh   rK   s    rE   rh   zHttpxBinaryResponseContent.text¦  s   € à�}‰}×!Ñ!Ð!rG   c                ó.   — | j                   j                  S r=   )rv   ÚencodingrK   s    rE   rÏ   z#HttpxBinaryResponseContent.encodingª  s   € à�}‰}×%Ñ%Ð%rG   c                ó.   — | j                   j                  S r=   )rv   Úcharset_encodingrK   s    rE   rÑ   z+HttpxBinaryResponseContent.charset_encoding®  s   € à�}‰}×-Ñ-Ð-rG   c                ó:   —  | j                   j                  di |¤ŽS )NrN   )rv   r{   )r>   r¾   s     rE   r{   zHttpxBinaryResponseContent.json²  s   € Ø!ˆt�}‰}×!Ñ!Ñ+ FÑ+Ð+rG   c                ó6   — | j                   j                  «       S r=   )rv   ÚreadrK   s    rE   rÔ   zHttpxBinaryResponseContent.readµ  s   € Ø�}‰}×!Ñ!Ó#Ð#rG   Nc                ó8   — | j                   j                  |«      S r=   )rv   rƒ   ©r>   rr   s     rE   rƒ   z%HttpxBinaryResponseContent.iter_bytes¸  s   € Ø�}‰}×'Ñ'¨
Ó3Ð3rG   c                ó8   — | j                   j                  |«      S r=   )rv   Ú	iter_textrÖ   s     rE   rØ   z$HttpxBinaryResponseContent.iter_text»  s   € Ø�}‰}×&Ñ& zÓ2Ð2rG   c                ó6   — | j                   j                  «       S r=   )rv   Ú
iter_linesrK   s    rE   rÚ   z%HttpxBinaryResponseContent.iter_lines¾  s   € Ø�}‰}×'Ñ'Ó)Ð)rG   c                ó8   — | j                   j                  |«      S r=   )rv   Úiter_rawrÖ   s     rE   rÜ   z#HttpxBinaryResponseContent.iter_rawÁ  s   € Ø�}‰}×%Ñ% jÓ1Ð1rG   c                óª   — t        |d¬«      5 }| j                  j                  «       D ]  }|j                  |«       Œ 	 ddd«       y# 1 sw Y   yxY w)av  Write the output to the given file.

        Accepts a filename or any path-like object, e.g. pathlib.Path

        Note: if you want to stream the data to the file instead of writing
        all at once then you should use `.with_streaming_response` when making
        the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')`
        Úwb©ÚmodeN©Úopenrv   rƒ   Úwrite)r>   ÚfileÚfr|   s       rE   Úwrite_to_filez(HttpxBinaryResponseContent.write_to_fileÄ  s>   € ô �$˜TÕ" aØŸ™×0Ñ0Ö2�Ø—‘˜•ñ 3÷ #×"Ñ"ús   Ž1A	Á	Az‚Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used insteadrq   c               ó¬   — t        |d¬«      5 }| j                  j                  |«      D ]  }|j                  |«       Œ 	 d d d «       y # 1 sw Y   y xY w©NrÞ   rß   rá   )r>   rä   rr   rå   r|   s        rE   Ústream_to_filez)HttpxBinaryResponseContent.stream_to_fileÔ  s@   € ô �$˜TÕ" aØŸ™×0Ñ0°Ö<�Ø—‘˜•ñ =÷ #×"Ñ"ús   Ž2A
Á
Ac                ó6   — | j                   j                  «       S r=   )rv   ÚcloserK   s    rE   rë   z HttpxBinaryResponseContent.closeá  s   € Ø�}‰}×"Ñ"Ó$Ð$rG   c              ƒ  óR   K  — | j                   j                  «       ƒ d {  –—† S 7 Œ­wr=   )rv   ÚareadrK   s    rE   rí   z HttpxBinaryResponseContent.areadä  s   è ø€ Ø—]‘]×(Ñ(Ó*×*Ð*Ð*úó   ‚' %¡'c              ƒ  ó@   K  — | j                   j                  |«      S ­wr=   )rv   r„   rÖ   s     rE   r„   z&HttpxBinaryResponseContent.aiter_bytesç  s   è ø€ Ø�}‰}×(Ñ(¨Ó4Ð4ùó   ‚c              ƒ  ó@   K  — | j                   j                  |«      S ­wr=   )rv   Ú
aiter_textrÖ   s     rE   rò   z%HttpxBinaryResponseContent.aiter_textê  s   è ø€ Ø�}‰}×'Ñ'¨
Ó3Ð3ùrð   c              ƒ  ó>   K  — | j                   j                  «       S ­wr=   )rv   Úaiter_linesrK   s    rE   rô   z&HttpxBinaryResponseContent.aiter_linesí  s   è ø€ Ø�}‰}×(Ñ(Ó*Ð*ùs   ‚c              ƒ  ó@   K  — | j                   j                  |«      S ­wr=   )rv   Ú	aiter_rawrÖ   s     rE   rö   z$HttpxBinaryResponseContent.aiter_rawð  s   è ø€ Ø�}‰}×&Ñ& zÓ2Ð2ùrð   c             ƒ  óV  K  — t        j                  |«      }|j                  d¬«      ƒ d {  –—† 4 ƒd {  –—† }| j                  j	                  |«      2 3 d {  –—† }|j                  |«      ƒ d {  –—†  Œ#7 ŒK7 ŒD7 Œ"7 Œ6 d d d «      ƒd {  –—†7   y # 1 ƒd {  –—†7  sw Y   y xY w­wrè   )ÚanyioÚPathrâ   rv   r„   rã   )r>   rä   rr   Úpathrå   r|   s         rE   Úastream_to_filez*HttpxBinaryResponseContent.astream_to_fileó  s„   è ø€ ô �z‰z˜$ÓˆØŸ™¨˜Ó-×-×-Ð-°Ø"Ÿm™m×7Ñ7¸
ÔC÷ $�dØ—g‘g˜d“m×#Ñ#ð .øÐ-øð$øØ#øð D÷ .×-×-×-Ó-üsŠ   ‚+B)­A9®B)¶A;·B)ºBÁBÁA=ÁBÁBÁ3A?Á4BÁ9B)Á;B)Á=BÁ?BÂBÂB)ÂBÂB)ÂB&ÂBÂB&Â"B)c              ƒ  óR   K  — | j                   j                  «       ƒ d {  –—† S 7 Œ­wr=   )rv   ÚacloserK   s    rE   rý   z!HttpxBinaryResponseContent.aclose  s   è ø€ Ø—]‘]×)Ñ)Ó+×+Ð+Ð+úrî   )rv   r8   r¤   r¥   r¨   r§   r¦   )r¾   r   r¤   r   r=   )rr   ú
int | Noner¤   zIterator[bytes])rr   rþ   r¤   úIterator[str])r¤   rÿ   )rä   ústr | os.PathLike[str]r¤   r¥   )rä   r   rr   rþ   r¤   r¥   r´   )rr   rþ   r¤   zAsyncIterator[bytes])rr   rþ   r¤   úAsyncIterator[str])r¤   r  )rª   r«   r¬   r®   rF   r¯   rf   rh   rÏ   rÑ   r{   rÔ   rƒ   rØ   rÚ   rÜ   ræ   r   ré   rë   rí   r„   rò   rô   rö   rû   rý   rN   rG   rE   r‹   r‹   œ  s5  … ØÓó!ð ò%ó ð%ð ò"ó ð"ð ò&ó ð&ð ò.ó ð.ó,ó$ô4ô3ó*ô2ðà$ðð 
óñ  ð 	Móð "&ñ	à$ðð ð	ð
 
òóðó%ó+ô5ô4ó+ô3ñ ð 	Móð "&ñ		$à$ð	$ð ð		$ð
 
ò	$óð	$ô,rG   r‹   )r¿   zCallable[P, R]r¤   z!Callable[P, LegacyAPIResponse[R]])r¿   zCallable[P, Awaitable[R]]r¤   z,Callable[P, Awaitable[LegacyAPIResponse[R]]])CÚ
__future__r   Úosr€   ÚloggingÚdatetimerÃ   Útypingr   r   r   r   r   r	   r
   r   r   r   Útyping_extensionsr   r   r   r   r   rø   r�   r�   Ú_typesr   Ú_utilsr   r   r   r   Ú_modelsr   r   r   Ú
_constantsr   Ú
_streamingr   r   r   r    Ú_exceptionsr!   Ú_decoders.jsonlr"   r#   r$   Ú_base_clientr%   r&   r'   r(   r)   Ú	getLoggerrª   r+   r®   r-   r…   r‡   rÆ   rÉ   r‹   rN   rG   rE   Ú<module>r     sÖ   ðÞ "ã 	Û Û Û Û ÷÷ ÷ ÷ UÕ Tã Û Û å ß UÓ Uß <Ñ <Ý +ß \Ó \Ý 3ß <áÝ,Ý(ñ ˆcƒN€ÙˆCƒL€ÙˆTƒ]€Ù� 4Ô(€à'�g×'Ñ'¨Ó1€€^Ó 1ôAm˜ ™
ô AmôH

˜iô 
óó"÷"f,ò f,rG   