Ë
    §ŒjEs  ã                  óò  — 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 d dlmZ d dlmZmZmZ d dlZddlmZ ddlmZmZ dd	lmZmZ dd
lmZmZmZm Z m!Z! ddl"m#Z# ddl$m%Z% ddl&m'Z' ddl(m)Z)m*Z* ddl+m,Z,m-Z- ddl.m/Z/m0Z0m1Z1m2Z2 ddl3m4Z4 ddlm5Z5m6Z6m7Z7 ddl8m9Z9m:Z: ddl;m<Z< ddl=m>Z> g d¢Z? e@ej‚                  j…                  dd«      «      ZC G d„ de<«      ZD G d„ d«      ZE	 	 d)	 	 	 	 	 	 	 d*d„ZF	 d dlGmHZH d d lIm/ZJ eHj–                  eHj–                  eHj˜                  eHj˜                  d!œZMd"d#d"d#d!œZN	 	 	 	 	 	 	 	 d+d$„ZOd,d&„ZQdddd'œ	 	 	 	 	 	 	 	 	 	 	 	 	 d-d(„ZRy# eP$ r 	 	 	 	 	 	 	 	 d+d%„ZOY Œ.w xY w).é    )ÚannotationsN)ÚAsyncIteratorÚ	GeneratorÚSequence)ÚTracebackType)ÚAnyÚCallableÚLiteralé   )Úprocess_exception)ÚClientProtocolÚbackoff)ÚHeadersÚHeadersLike)ÚInvalidProxyMessageÚInvalidProxyStatusÚInvalidStatusÚ
ProxyErrorÚSecurityError)ÚClientExtensionFactory)Ú enable_client_permessage_deflate)Úvalidate_subprotocols)Ú
USER_AGENTÚResponse)Ú
CONNECTINGÚEvent)ÚProxyÚ	get_proxyÚparse_proxyÚprepare_connect_request)ÚStreamReader)Ú
LoggerLikeÚOriginÚSubprotocol)ÚWebSocketURIÚ	parse_urié   )Ú
Connection)Úrace_events)ÚconnectÚunix_connectÚClientConnectionÚWEBSOCKETS_MAX_REDIRECTSÚ10c                  ór   ‡ — e Zd ZdZdddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d
ˆ fd„Zdef	 	 	 	 	 dd„Zdˆ fd	„Zˆ xZS )r,   al  
    :mod:`trio` implementation of a WebSocket client connection.

    :class:`ClientConnection` provides :meth:`recv` and :meth:`send` coroutines
    for receiving and sending messages.

    It supports asynchronous iteration to receive messages::

        async for message in websocket:
            await process(message)

    The iterator exits normally when the connection is closed with close code
    1000 (OK) or 1001 (going away) or without a close code. It raises a
    :exc:`~websockets.exceptions.ConnectionClosedError` when the connection is
    closed with any other code.

    The ``ping_interval``, ``ping_timeout``, ``close_timeout``, and
    ``max_queue`` arguments have the same meaning as in :func:`connect`.

    Args:
        nursery: Trio nursery.
        stream: Trio stream connected to a WebSocket server.
        protocol: Sans-I/O connection.

    é   é
   é   ©Úping_intervalÚping_timeoutÚclose_timeoutÚ	max_queuec          	     óh   •— |  t         ‰| �  |||||||¬«       t        j                  «       | _        y )Nr3   )ÚsuperÚ__init__Útrior   Úresponse_rcvd)	ÚselfÚnurseryÚstreamÚprotocolr4   r5   r6   r7   Ú	__class__s	           €ú`/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/websockets/trio/client.pyr:   zClientConnection.__init__E   s?   ø€ ñ 	Ü‰ÑØØØØ'Ø%Ø'Øð 	ô 	
ô "ŸZ™Z›\ˆÕó    Nc              ƒ  ón  K  — | j                   j                  «       | _        |�%| j                  j                  j	                  |«       |�&| j                  j                  j                  d|«       | j                  t        ¬«      4 ƒd{  –—†  | j                   j                  | j                  «       ddd«      ƒd{  –—†  t        | j                  | j                  «      ƒ d{  –—†  | j                   j                  �| j                   j                  ‚y7 ŒŽ7 Œ[# 1 ƒd{  –—†7  sw Y   ŒkxY w7 ŒJ­w)z1
        Perform the opening handshake.

        Nz
User-Agent)Úexpected_state)r@   r*   ÚrequestÚheadersÚupdateÚ
setdefaultÚsend_contextr   Úsend_requestr)   r<   Ústream_closedÚhandshake_exc)r=   Úadditional_headersÚuser_agent_headers      rB   Ú	handshakezClientConnection.handshake\   sï   è ø€ ð —}‘}×,Ñ,Ó.ˆŒØÐ)Ø�L‰L× Ñ ×'Ñ'Ð(:Ô;ØÐ(Ø�L‰L× Ñ ×+Ñ+¨LÐ:KÔLØ×$Ñ$´JÐ$×?Õ?Ø�M‰M×&Ñ& t§|¡|Ô4÷ @×?ô ˜$×,Ñ,¨d×.@Ñ.@ÓA×AÐAð �=‰=×&Ñ&Ð2Ø—-‘-×-Ñ-Ð-ð 3ð @øÐ?ø×?×?Ñ?úð 	BúsT   ‚B	D5ÂDÂD5Â&DÂ5D5Ã DÃ'D5Ã(D3Ã)2D5ÄD5ÄD0Ä$D'Ä%D0Ä,D5c                ó¤   •— | j                   €4t        |t        «      sJ ‚|| _         | j                  j	                  «        yt
        ‰| �  |«       y)z.
        Process one incoming event.

        N)ÚresponseÚ
isinstancer   r<   Úsetr9   Úprocess_event)r=   ÚeventrA   s     €rB   rU   zClientConnection.process_eventv   sG   ø€ ð �=‰=Ð Ü˜e¤XÔ.Ð.Ð.Ø!ˆDŒMØ×Ñ×"Ñ"Õ$ô ‰GÑ! %Õ(rC   )r>   útrio.Nurseryr?   útrio.abc.Streamr@   r   r4   úfloat | Noner5   rY   r6   rY   r7   ú*int | None | tuple[int | None, int | None]ÚreturnÚNone)rN   úHeadersLike | NonerO   ú
str | Noner[   r\   )rV   r   r[   r\   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r:   r   rP   rU   Ú__classcell__)rA   s   @rB   r,   r,   *   s�   ø„ ñð@ ')Ø%'Ø&(Ø@Bñ*àð*ð  ð*ð !ð	*ð $ð*ð #ð*ð $ð*ð >ð*ð 
õ*ð2 26Ø(2ð.à.ð.ð &ð.ð 
ó	.÷4)ñ )rC   r,   c                  ó  — e Zd ZdZddddddddedddeddddeddddd	œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd
„Zdd„Zdd„Z	dd„Z
dd„Zdd„Zdd„Z	 	 	 	 	 	 	 	 dd„Zdd„Z	 	 	 	 	 	 	 	 dd„Zdd„Zy)r*   aq  
    Connect to the WebSocket server at ``uri``.

    This coroutine returns a :class:`ClientConnection` instance, which you can
    use to send and receive messages.

    :func:`connect` may be used as an asynchronous context manager::

        from websockets.trio.client import connect

        async with connect(...) as websocket:
            ...

    The connection is closed automatically when exiting the context.

    :func:`connect` can be used as an infinite asynchronous iterator to
    reconnect automatically on errors::

        async for websocket in connect(...):
            try:
                ...
            except websockets.exceptions.ConnectionClosed:
                continue

    If the connection fails with a transient error, it is retried with
    exponential backoff. If it fails with a fatal error, the exception is
    raised, breaking out of the loop.

    The connection is closed automatically after each iteration of the loop.

    Args:
        uri: URI of the WebSocket server.
        stream: Preexisting TCP stream. ``stream`` overrides the host and port
            from ``uri``. You may call :func:`~trio.open_tcp_stream` to create a
            suitable TCP stream.
        ssl: Configuration for enabling TLS on the connection.
        server_hostname: Host name for the TLS handshake. ``server_hostname``
            overrides the host name from ``uri``.
        origin: Value of the ``Origin`` header, for servers that require it.
        extensions: List of supported extensions, in order in which they
            should be negotiated and run.
        subprotocols: List of supported subprotocols, in order of decreasing
            preference.
        compression: The "permessage-deflate" extension is enabled by default.
            Set ``compression`` to :obj:`None` to disable it. See the
            :doc:`compression guide <../../topics/compression>` for details.
        additional_headers: Arbitrary HTTP headers to add to the handshake
            request.
        user_agent_header: Value of  the ``User-Agent`` request header.
            It defaults to ``"Python/x.y.z websockets/X.Y"``.
            Setting it to :obj:`None` removes the header.
        proxy: If a proxy is configured, it is used by default. Set ``proxy``
            to :obj:`None` to disable the proxy or to the address of a proxy
            to override the system configuration. See the :doc:`proxy docs
            <../../topics/proxies>` for details.
        proxy_ssl: Configuration for enabling TLS on the proxy connection.
        proxy_server_hostname: Host name for the TLS handshake with the proxy.
            ``proxy_server_hostname`` overrides the host name from ``proxy``.
        process_exception: When reconnecting automatically, tell whether an
            error is transient or fatal. The default behavior is defined by
            :func:`process_exception`. Refer to its documentation for details.
        open_timeout: Timeout for opening the connection in seconds.
            :obj:`None` disables the timeout.
        ping_interval: Interval between keepalive pings in seconds.
            :obj:`None` disables keepalive.
        ping_timeout: Timeout for keepalive pings in seconds.
            :obj:`None` disables timeouts.
        close_timeout: Timeout for closing the connection in seconds.
            :obj:`None` disables the timeout.
        reconnect_delays: Delays in seconds between reconnection attempts.
            Default is exponential backoff with 5s jitter, capped at 60s.
        max_size: Maximum size of incoming messages in bytes.
            :obj:`None` disables the limit. You may pass a ``(max_message_size,
            max_fragment_size)`` tuple to set different limits for messages and
            fragments when you expect long messages sent in short fragments.
        max_queue: High-water mark of the buffer where frames are received.
            It defaults to 16 frames. The low-water mark defaults to ``max_queue
            // 4``. You may pass a ``(high, low)`` tuple to set the high-water
            and low-water marks. If you want to disable flow control entirely,
            you may set it to ``None``, although that's a bad idea.
        logger: Logger for this client.
            It defaults to ``logging.getLogger("websockets.client")``.
            See the :doc:`logging guide <../../topics/logging>` for details.
        create_connection: Factory for the :class:`ClientConnection` managing
            the connection. Set it to a wrapper or a subclass to customize
            connection handling.

    Any other keyword arguments are passed to :func:`~trio.open_tcp_stream`.

    Raises:
        InvalidURI: If ``uri`` isn't a valid WebSocket URI.
        InvalidProxy: If ``proxy`` isn't a valid proxy.
        OSError: If the TCP connection fails.
        InvalidHandshake: If the opening handshake fails.
        TimeoutError: If the opening handshake times out.

    NÚdeflateTr1   r0   i   r2   )r?   ÚsslÚserver_hostnameÚoriginÚ
extensionsÚsubprotocolsÚcompressionrN   rO   ÚproxyÚ	proxy_sslÚproxy_server_hostnamer   Úopen_timeoutr4   r5   r6   Úreconnect_delaysÚmax_sizer7   ÚloggerÚcreate_connectionc               ó(  — || _         t        |«      | _        | j                  j                  s|�t	        d«      ‚|�t        |«       |dk(  rt        |«      }n|�t	        d|› �«      ‚|€t        j                  d«      }|€t        }|| _
        || _        || _        |	| _        |
| _        || _        || _        || _        || _        || _        || _        || _        || _        || _        t1        |||||¬«      | _        t1        ||||¬«      | _        y )Nz-ssl argument is incompatible with a ws:// URIre   zunsupported compression: zwebsockets.client)rh   ri   rj   rq   rr   r3   )Úurir&   Úws_uriÚsecureÚ
ValueErrorr   r   ÚloggingÚ	getLoggerr,   r?   rf   rg   rN   rO   rl   rm   rn   r   ro   rp   rr   rs   Úopen_tcp_stream_kwargsÚdictÚprotocol_kwargsÚconnection_kwargs)r=   ru   r?   rf   rg   rh   ri   rj   rk   rN   rO   rl   rm   rn   r   ro   r4   r5   r6   rp   rq   r7   rr   rs   Úkwargss                            rB   r:   zconnect.__init__ì   s1  € ðH ˆŒÜ “nˆŒØ�{‰{×!Ò! c oÜÐLÓMÐMàÐ#Ü! ,Ô/à˜)Ò#Ü9¸*ÓE‰JØÐ$ÜÐ8¸¸ÐFÓGÐGàˆ>Ü×&Ñ&Ð':Ó;ˆFàÐ$Ü 0ÐàˆŒØˆŒØ.ˆÔØ"4ˆÔØ!2ˆÔØˆŒ
Ø"ˆŒØ%:ˆÔ"Ø!2ˆÔØ(ˆÔØ 0ˆÔØˆŒØ!2ˆÔØ&,ˆÔ#Ü#ØØ!Ø%ØØô 
ˆÔô "&Ø'Ø%Ø'Øô	"
ˆÕrC   c              ƒ  óž  K  — | j                   j                  «       }| j                  }|j                  dd«      rd}|du rt	        | j
                  «      }|j                  dd«      r t        j                  |d   «      ƒ d{  –—† S |�Ñt        |«      }|j                  dd dk(  r0t        || j
                  |j                  dd«      ¬	«      ƒ d{  –—† S |j                  dd
 dk(  rg|j                  dk7  r| j                  �t        d«      ‚t        || j
                  f| j                  | j                  | j                   dœ|¤Žƒ d{  –—† S t#        d«      ‚|j%                  d| j
                  j&                  «       |j%                  d| j
                  j(                  «       t        j*                  di |¤Žƒ d{  –—† S 7 �ŒA7 Œô7 Œ}7 Œ­w)zFOpen a TCP or Unix connection to the server, possibly through a proxy.ÚunixFNTÚpathé   ÚsocksÚlocal_address)Ú
local_addré   ÚhttpÚhttpsz8proxy_ssl argument is incompatible with an http:// proxy©rO   rf   rg   z&parse_proxy returned unsupported proxyÚhostÚport© )r{   Úcopyrl   Úgetr   rv   Úpopr;   Úopen_unix_socketr   ÚschemeÚconnect_socks_proxyrm   rx   Úconnect_http_proxyrO   rn   ÚAssertionErrorrI   r‹   rŒ   Úopen_tcp_stream)r=   r   rl   Úproxy_parseds       rB   r–   zconnect.open_tcp_stream?  s»  è ø€ à×,Ñ,×1Ñ1Ó3ˆà—
‘
ˆØ�:‰:�f˜eÔ$ØˆEØ�D‰=Ü˜dŸk™kÓ*ˆEà�:‰:�f˜eÔ$Ü×.Ñ.¨v°f©~Ó>×>Ð>àÐÜ& uÓ-ˆLà×"Ñ" 2 AÐ&¨'Ò1Ü0Ø Ø—K‘Kð  &Ÿz™z¨/¸4Ó@ô÷ ð ð ×$Ñ$ R aÐ(¨FÒ2Ø×&Ñ&¨'Ò1°d·n±nÐ6PÜ$ØRóð ô 0Ø Ø—K‘Kðð '+×&<Ñ&<ØŸ™Ø$(×$>Ñ$>ñð ñ÷ ð ô %Ð%MÓNÐNð ×Ñ˜f d§k¡k×&6Ñ&6Ô7Ø×Ñ˜f d§k¡k×&6Ñ&6Ô7Ü×-Ñ-Ñ7°Ñ7×7Ð7ðE ?ùðøðøð 8úsK   ‚BGÂGÂAGÃGÃA8GÅG	ÅA3GÆ?GÇ GÇGÇ	GÇGc              ƒ  ó,  K  — | j                   €t        j                  «       }n| j                   }| j                  €| j                  j
                  }n| j                  }t        j                  |||d¬«      }|j                  «       ƒ d{  –—†  |S 7 Œ­w)zEnable TLS on the connection.NT©rg   Úhttps_compatible)	rf   Ú
ssl_moduleÚcreate_default_contextrg   rv   r‹   r;   Ú	SSLStreamÚdo_handshake)r=   r?   rf   rg   Ú
ssl_streams        rB   Ú
enable_tlszconnect.enable_tlsn  s†   è ø€ à�8‰8ÐÜ×3Ñ3Ó5‰Cà—(‘(ˆCØ×ÑÐ'Ø"Ÿk™k×.Ñ.‰Oà"×2Ñ2ˆOÜ—^‘^ØØØ+Ø!ô	
ˆ
ð ×%Ñ%Ó'×'Ð'ØÐð 	(ús   ‚B	BÂBÂBc              ƒ  ó„  K  — | j                   €| j                  «       ƒ d{  –—† }n| j                   }	 | j                  j                  r| j	                  |«      ƒ d{  –—† }t        | j                  fi | j                  ¤Ž} | j                  |||fi | j                  ¤Ž}|j                  | j                  | j                  «      ƒ d{  –—†  |S 7 Œ°7 Œu7 Œ
# t        j                  $ r* t        j                  |«      ƒ d{  –—†7   t        d«      ‚t         $ r  t        j                  |«      ƒ d{  –—†7   ‚ w xY w­w)zCreate a WebSocket connection.Nznursery should be canceled)r?   r–   rv   rw   r    r   r}   rs   r~   rP   rN   rO   r;   Ú	CancelledÚaclose_forcefullyr•   Ú	Exception)r=   r>   r?   r@   Ú
connections        rB   Úopen_connectionzconnect.open_connection�  s7  è ø€ ð �;‰;ÐØ×/Ñ/Ó1×1‰Fà—[‘[ˆFð#	Ø�{‰{×!Ò!Ø#Ÿ™¨vÓ6×6�ä%Ø—‘ñà×&Ñ&ñˆHð 0˜×/Ñ/ØØØñð ×(Ñ(ñ	ˆJð ×&Ñ&Ø×'Ñ'Ø×&Ñ&ó÷ ð ð
 Ðð5 2øð 7øðùô �~‰~ò 	?Ü×(Ñ(¨Ó0×0Ñ0ô !Ð!=Ó>Ð>Üò 	ô ×(Ñ(¨Ó0×0Ñ0Øð	üsc   ‚ E ¢C£E µ*C ÁCÁ A,C ÃCÃC ÃE ÃC ÃC Ã+D=ÄDÄ0D=Ä5D8Ä6D=Ä=E c                óº  — t        |t        «      r0|j                  j                  dv rd|j                  j                  v s|S | j
                  }t        j                  j                  | j                  |j                  j                  d   «      }t        |«      }| j                  �t        d|› d�«      S |j                  r|j                  st        d|› �«      S |j                  |j                  k7  s2|j                  |j                  k7  s|j                   |j                   k7  r´| j"                  j%                  dd«      rt        d|› d	�«      S | j"                  j%                  d
«      €| j"                  j%                  d«      �t        d|› d�«      S | j&                  �8t)        d„ t)        | j&                  «      j+                  «       D «       «      | _        |S )z¬
        Determine whether a connection error is a redirect that can be followed.

        Return the new URI if it's a valid redirect. Else, return an exception.

        )é,  i-  i.  i/  i3  i4  ÚLocationzcannot follow redirect to z with a preexisting streamz)cannot follow redirect to non-secure URI r�   Fz'cannot follow cross-origin redirect to z with a Unix socketr‹   rŒ   z with an explicit host or portc              3  óN   K  — | ]  \  }}|j                  «       d vr||f–— Œ y­w))ÚauthorizationÚcookiezproxy-authorizationN)Úlower)Ú.0ÚkeyÚvalues      rB   Ú	<genexpr>z+connect.process_redirect.<locals>.<genexpr>ë  s2   è ø€ ð á*V™J˜C ØŸ9™9›;ØQñRð ˜eœÙ*Vùs   ‚#%)rS   r   rR   Ústatus_coderG   rv   ÚurllibÚparseÚurljoinru   r&   r?   rx   rw   r   r‹   rŒ   r{   r�   rN   r   Ú	raw_items)r=   ÚexcÚ
old_ws_uriÚnew_uriÚ
new_ws_uris        rB   Úprocess_redirectzconnect.process_redirect®  sÅ  € ô �sœMÔ*Ø—‘×(Ñ(ðñð ˜cŸl™l×2Ñ2Ñ2àˆJà—[‘[ˆ
Ü—,‘,×&Ñ& t§x¡x°·±×1EÑ1EÀjÑ1QÓRˆÜ˜wÓ'ˆ
ð �;‰;Ð"ÜØ,¨W¨IÐ5OÐPóð ð
 ×Ò Z×%6Ò%6Ü Ð#LÈWÈIÐ!VÓWÐWð ×Ñ ×!2Ñ!2Ò2Ø�‰ *§/¡/Ò1Ø�‰ *§/¡/Ò1ð ×*Ñ*×.Ñ.¨v°uÔ=Ü!Ø=¸g¸Yð G)ð *óð ð ×+Ñ+×/Ñ/°Ó7ÐCØ×.Ñ.×2Ñ2°6Ó:ÐFä!Ø=¸g¸Yð G4ð 5óð ð ×&Ñ&Ð2Ü*1ñä*1°$×2IÑ2IÓ*J×*TÑ*TÔ*Vóó+�Ô'ð ˆrC   c              ƒ  ó\  K  — 	 | j                   €t        j                  «       nt        j                  | j                   «      5  t	        t
        «      D ]8  }	 | j                  |«      ƒ d {  –—† }|j                  «        |c cd d d «       S  t        dt
        › d�«      ‚7 Œ5# t        $ rJ}| j                  |«      }t        |t        «      r||u r‚ ||‚|| _        t        |«      | _        Y d }~Œžd }~ww xY w# 1 sw Y   y xY w# t        j                  $ r}t!        d«      |‚d }~ww xY w­w)Nz
more than z
 redirectsz"timed out during opening handshake)ro   r;   ÚCancelScopeÚ
fail_afterÚrangeÚMAX_REDIRECTSr¦   Ústart_keepaliver¤   r»   rS   ru   r&   rv   r   ÚTooSlowErrorÚTimeoutError)r=   r>   Ú_r¥   r·   Ú
exc_or_uris         rB   r*   zconnect.connectõ  s(  è ø€ ð	Nð ×$Ñ$Ð,ô × Ñ Ô"ä—_‘_ T×%6Ñ%6Ó7ñ8ô œ}Ö-�Að*Ø+/×+?Ñ+?ÀÓ+H×%H˜
ð  #×2Ñ2Ô4Ø)Ñ)÷/8ñ 8ð .ô* (¨*´]°OÀ:Ð(NÓOÐOð' &IùÜ$ò %Ø%)×%:Ñ%:¸3Ó%?˜
Ü% j´)Ô<à)¨SÑ0Ø %à&0°cÐ 9ð (2˜DœHÜ*3°JÓ*?˜DœKÜ$ûð%ú÷8ð 8ûô6 × Ñ ò 	NäÐCÓDÈ#ÐMûð	Nüs�   ‚D,„?D ÁC9ÁB#Á+B!Á,B#Á0C9Â	D ÂD,ÂC9Â!B#Â#	C6Â,A C1Ã,C9Ã1C6Ã6C9Ã9DÃ>D ÄD,ÄD ÄD)ÄD$Ä$D)Ä)D,c              ƒ  óB  K  — | j                  «       ƒ d {  –—†  	 | j                  | j                  «      ƒ d {  –—† | _        | j                  S 7 Œ97 Œ# t        $ r?}| j                  t        |«      ||j                  «      ƒ d {  –—†7   t        d«      ‚d }~ww xY w­w)Nz4expected __aexit_nursery__ to re-raise the exception)	Ú__aenter_nursery__r*   r>   r¥   ÚBaseExceptionÚ__aexit_nursery__ÚtypeÚ__traceback__r•   )r=   r·   s     rB   Ú
__aenter__zconnect.__aenter__  s‡   è ø€ Ø×%Ñ%Ó'×'Ð'ð	YØ$(§L¡L°·±Ó$>×>ˆDŒOØ—?‘?Ð"ð 	(øà>ùäò 	YØ×(Ñ(¬¨c«°C¸×9JÑ9JÓK×KÑKÜ Ð!WÓXÐXûð	YüsN   ‚B–A—BœA ºA»A ÁBÁA Á	BÁ)BÂB	ÂBÂBÂBc              ƒ  óè   K  — 	 	 | j                   j                  «       ƒ d {  –—†  | ` 	 | j                  |||«      ƒ d {  –—†  y 7 Œ## | ` w xY w7 Œ# | j                  |||«      ƒ d {  –—†7   w xY w­w)N)r¥   ÚacloserÉ   )r=   Úexc_typeÚ	exc_valueÚ	tracebacks       rB   Ú	__aexit__zconnect.__aexit__%  sk   è ø€ ð	Ið$Ø—o‘o×,Ñ,Ó.×.Ð.à‘Oà×(Ñ(¨°9¸iÓH×HÑHð	 /ùà‘OúàHù�$×(Ñ(¨°9¸iÓH×HÒHüsZ   ‚A2…A ¢A£A §A ªA2Á AÁA2ÁA ÁAÁA ÁA2ÁA/Á(A+Á)A/Á/A2c              ƒ  ó¾   K  — t        | d«      rt        d«      ‚t        j                  «       | _        | j                  j                  «       ƒ d {  –—† | _        y 7 Œ
­w)NÚnursery_managerzconnect() isn't reentrant)ÚhasattrÚRuntimeErrorr;   Úopen_nurseryrÔ   rÌ   r>   )r=   s    rB   rÇ   zconnect.__aenter_nursery__3  sJ   è ø€ Ü�4Ð*Ô+ÜÐ:Ó;Ð;Ü#×0Ñ0Ó2ˆÔØ!×1Ñ1×<Ñ<Ó>×>ˆ�Ð>ús   ‚AAÁAÁAc              ƒ  ó^  K  — 	 | j                   j                  |||«      ƒ d {  –—†  | ` y 7 Œ# t        $ rl}t        |t        «      sJ ‚	 t
        j                  j                  |«       n-# t
        j                  j                  $ r t        d«      |‚w xY wY d }~| ` y d }~ww xY w# | ` w xY w­w)Nz8unexpected multiple exceptions; please file a bug report)
rÔ   rÒ   rÈ   rS   ÚBaseExceptionGroupr;   Ú_utilÚ!raise_single_exception_from_groupÚMultipleExceptionErrorr•   )r=   rÏ   rÐ   rÑ   r·   s        rB   rÉ   zconnect.__aexit_nursery__9  s±   è ø€ ð	%Ø×&Ñ&×0Ñ0°¸9ÀiÓP×PÐPð Ñ$ð QùÜò 	Ü˜cÔ#5Ô6Ð6Ð6ðÜ—
‘
×<Ñ<¸SÕAøÜ—:‘:×4Ñ4ò Ü$ØNóàððúó Bð Ñ$ûð	ûð Ñ$üs`   ‚B-„ . ¤,¥. ©B-¬. ®	B#·BÁ
A*Á)BÁ**BÂBÂB& ÂB-ÂB#Â#B& Â&B*Â*B-c               ó  K  — d }	 	 | 4 ƒd {  –—† }|­–— d d d «      ƒd {  –—†  d }Œ$7 Œ7 Œ	# 1 ƒd {  –—†7  sw Y   ŒxY w# t         $ r»}	 | j                  |«      }n# t         $ r}|}Y d }~nd }~ww xY w||u r‚ |�||‚|€| j                  «       }t        |«      }| j                  j                  d|t        j                  |«      d   j                  «       «       t        j                  |«      ƒ d {  –—†7   Y d }~ŒÙd }~ww xY w­w)Nz0connect failed; reconnecting in %.1f seconds: %sr   )r¤   r   rp   Únextrr   ÚinforÑ   Úformat_exception_onlyÚstripr;   Úsleep)r=   Údelaysr¥   r·   Únew_excÚ
raised_excÚdelays          rB   Ú	__aiter__zconnect.__aiter__S  sû   è ø€ Ø*.ˆØð"ß™4 :Ø$Ó$÷  Ÿ4ðB �ðG àø˜4øŸ4Ÿ4™4ûäò (ð
)Ø"×4Ñ4°SÓ9‘GøÜ ò )Ø(•Gûð)úð
 ˜c‘>ØØÐ&Ø! sÐ*ð �>Ø!×2Ñ2Ó4�FÜ˜V›�Ø—‘× Ñ ØFØÜ×3Ñ3°CÓ8¸Ñ;×AÑAÓCôô
 —j‘j Ó'×'Ö'ûð7(üs–   ‚D
‡A �*ŽA ‘.—A ¢,£A §D
ªA ¬A ®A ´7µA ¼A Á	DÁAÁDÁ	A4Á(A/Á*DÁ/A4Á4BDÃ7C:Ã8DÃ=D
ÄDÄD
)2ru   Ústrr?   ztrio.abc.Stream | Nonerf   ússl_module.SSLContext | Nonerg   r^   rh   zOrigin | Noneri   z'Sequence[ClientExtensionFactory] | Nonerj   zSequence[Subprotocol] | Nonerk   r^   rN   r]   rO   r^   rl   zstr | Literal[True] | Nonerm   ré   rn   r^   r   z'Callable[[Exception], Exception | None]ro   rY   r4   rY   r5   rY   r6   rY   rp   zCallable[[], Generator[float]]rq   rZ   r7   rZ   rr   zLoggerLike | Noners   ztype[ClientConnection] | Noner   r   r[   r\   )r[   rX   )r?   rX   r[   rX   )r>   rW   r[   r,   )r·   r¤   r[   zException | str)r[   r,   )rÏ   ztype[BaseException] | NonerÐ   zBaseException | NonerÑ   zTracebackType | Noner[   r\   )r[   r\   )r[   zAsyncIterator[ClientConnection])r_   r`   ra   rb   r   r   r   r:   r–   r    r¦   r»   r*   rÌ   rÒ   rÇ   rÉ   rç   r�   rC   rB   r*   r*   †   s÷  „ ñ`ðT *.Ø,0Ø&*à $Ø>BØ59Ø"+à15Ø(2Ø,0Ø26Ø,0ØEVà%'Ø&(Ø%'Ø&(Ø;Bà?DØ@Bà$(à;?ñAQ
àðQ
ð
 'ðQ
ð *ðQ
ð $ðQ
ð ðQ
ð <ðQ
ð 3ðQ
ð  ðQ
ð /ðQ
ð &ðQ
ð  *ð!Q
ð" 0ð#Q
ð$  *ð%Q
ð& Cð'Q
ð* #ð+Q
ð, $ð-Q
ð. #ð/Q
ð0 $ð1Q
ð2 9ð3Q
ð6 =ð7Q
ð8 >ð9Q
ð< "ð=Q
ð@ 9ðAQ
ðD ðEQ
ðF 
óGQ
óf-8ó^ó&+óZEóN NóNYðIà,ðIð (ðIð (ð	Ið
 
óIó?ð%à,ð%ð (ð%ð (ð	%ð
 
ó%ô4%rC   r*   c                óP   — |€|j                  d«      €d}nd}t        d|d| dœ|¤ŽS )aã  
    Connect to a WebSocket server listening on a Unix socket.

    This function accepts the same keyword arguments as :func:`connect`.

    It's only available on Unix.

    It's mainly useful for debugging servers listening on Unix sockets.

    Args:
        path: File system path to the Unix socket.
        uri: URI of the WebSocket server. ``uri`` defaults to
            ``ws://localhost/`` or, when a ``ssl`` argument is provided, to
            ``wss://localhost/``.

    rf   zws://localhost/zwss://localhost/T)ru   r�   r‚   r�   )r�   r*   )r‚   ru   r   s      rB   r+   r+   {  s9   € ð* €{Ø�:‰:�eÓÐ$Ø#‰Cà$ˆCÜÐ;�s ¨DÑ;°FÑ;Ð;rC   )Ú	ProxyType)r   )Úsocks5hÚsocks5Úsocks4aÚsocks4TFc           	   ‹  ó–  K  — t        t        | j                     | j                  | j                  | j
                  | j                  t        | j                     «      }	 t        j                   |j                  |j                  |j                  fi |¤Žƒ d{  –—† «      S 7 Œ# t        $ r ‚ t        $ r}t        d«      |‚d}~ww xY w­w)z0Connect via a SOCKS proxy and return the socket.Nz failed to connect to SOCKS proxy)Ú
SocksProxyÚSOCKS_PROXY_TYPESr’   r‹   rŒ   ÚusernameÚpasswordÚSOCKS_PROXY_RDNSr;   ÚSocketStreamr*   ÚOSErrorr¤   r   )rl   rv   r   Úsocks_proxyr·   s        rB   r“   r“   ´  s®   è ø€ ô !Ü˜eŸl™lÑ+Ø�J‰JØ�J‰JØ�N‰NØ�N‰NÜ˜UŸ\™\Ñ*ó
ˆð	JÜ×$Ñ$Ø)�k×)Ñ)¨&¯+©+°v·{±{ÑMÀfÑM×Móð ØMùäò 	ØÜò 	JÜÐ?Ó@ÀcÐIûð	Jüs<   ‚AC	Á:B# ÂB!ÂB# Â C	Â!B# Â#CÂ5CÃCÃC	c              ‹  ó    K  — t        d«      ‚­w)Nz6connecting through a SOCKS proxy requires python-socks)ÚImportError)rl   rv   r   s      rB   r“   r“   ž  s   è ø€ ô
 ÐRÓSÐSùs   ‚c              ƒ  ó0  K  — t        «       }t        j                  |j                  |j                  |j
                  d¬«      }	 	 | j                  d«      ƒ d {  –—† }|r|j                  |«       n|j                  «        t        |«       ŒI7 Œ4# t        $ ra}t        |j                  t        «      sJ ‚|j                  }d|j                  cxk  rdk  rn t        |«      ‚|cY d }~S t        |«      ‚d }~wt        $ r}t!        d«      |‚d }~ww xY w­w)NT)rl   i   éÈ   r¨   z0did not receive a valid HTTP response from proxy)r!   r   r´   Ú	read_lineÚ
read_exactÚread_to_eofÚreceive_someÚ	feed_dataÚfeed_eofrÞ   ÚStopIterationrS   r°   r²   r   r¤   r   )r?   ÚreaderÚparserÚdatar·   rR   s         rB   Úread_connect_responser  Ï  sú   è ø€ Ü‹^€FÜ�^‰^Ø×ÑØ×ÑØ×ÑØô	€FðØØ×,Ñ,¨TÓ2×2ˆDÙØ× Ñ  Õ&à—‘Ô!Ü�ŒLð Ø2ùô ò /Ü˜#Ÿ)™)¤XÔ.Ð.Ð.Ø—9‘9ˆØ�(×&Ñ&Ô,¨Ô,ô % XÓ.Ð.ð �Oä$ XÓ.Ð.ûÜò Ü!Ø>ó
àð	ûðüsO   ‚ADÁB ÁBÁ5B Â	DÂAC6Ã%DÃ&DÃ+C6Ã6DÄDÄDÄDrŠ   c             ‹  ó<  K  — t        j                  | j                  | j                  fi |¤Žƒ d {  –—† }	 | j                  dk(  rW|€t        j                  «       }|€| j                  }t        j                  |||d¬«      }|j                  «       ƒ d {  –—†  |}t        | ||«      }|j                  |«      ƒ d {  –—†  t        |«      ƒ d {  –—†  |S 7 Œ¦7 ŒC7 Œ7 Œ# t         j                  t        f$ r  t        j                  |«      ƒ d {  –—†7   ‚ w xY w­w)Nr‰   Tr™   )r;   r–   r‹   rŒ   r’   r›   rœ   r�   rž   r    Úsend_allr  r¢   r¤   r£   )	rl   rv   rO   rf   rg   r   r?   rŸ   rF   s	            rB   r”   r”   ì  s  è ø€ ô ×'Ñ'¨¯
©
°E·J±JÑIÀ&ÑI×I€Fðà�<‰<˜7Ò"Øˆ{Ü ×7Ñ7Ó9�ØÐ&Ø"'§*¡*�ÜŸ™ØØØ /Ø!%ô	ˆJð ×)Ñ)Ó+×+Ð+ØˆFô *¨%°Ð9JÓKˆØ�o‰o˜gÓ&×&Ð&Ü# FÓ+×+Ð+ð €Mð7 Jøð ,øð
 	'øØ+ùä�N‰NœIÐ&ò Ü×$Ñ$ VÓ,×,Ñ,Øðüsi   ‚/D±C²D·AC  ÂCÂ'C  Â>CÂ?C  ÃCÃC  ÃDÃC  ÃC  ÃC  Ã 1DÄDÄDÄD)NN)r‚   r^   ru   r^   r   r   r[   r*   )rl   r   rv   r%   r   r   r[   rX   )r?   rX   r[   r   )rl   r   rv   r%   rO   r^   rf   ré   rg   r^   r   r   r[   rX   )SÚ
__future__r   ry   Úosrf   r›   rÑ   Úurllib.parser³   Úcollections.abcr   r   r   Útypesr   Útypingr   r	   r
   r;   Úasyncio.clientr   Úclientr   r   Údatastructuresr   r   Ú
exceptionsr   r   r   r   r   Úextensions.baser   Úextensions.permessage_deflater   rG   r   Úhttp11r   r   r@   r   r   rl   r   r   r   r    Ústreamsr!   r"   r#   r$   ru   r%   r&   r¥   r(   Úutilsr)   Ú__all__ÚintÚenvironr�   rÀ   r,   r*   r+   Úpython_socksrë   Úpython_socks.async_.triorñ   ÚSOCKS5ÚSOCKS4rò   rõ   r“   rú   r  r”   r�   rC   rB   Ú<module>r      së  ðÝ "ã Û 	Û Û Û ß >Ñ >Ý ß )Ñ )ã å .ß ,ß 1÷õ õ 5Ý LÝ +ß )ß (ß JÓ JÝ "ß 4Ñ 4ß )Ý "Ý ò :€á�B—J‘J—N‘NÐ#=¸tÓDÓE€ôX)�zô X)÷xrñ rðl Øð<Ø
ð<à	ð<ð ð<ð ó	<ð:4JÝ&Ý<ð ×#Ñ#Ø×"Ñ"Ø×#Ñ#Ø×"Ñ"ñ	Ðð ØØØñ	ÐðJØðJàðJð ðJð 
ó	Jó6ðB %)Ø(,Ø"&ñ%Øð%àð%ð "ð	%ð
 
&ð%ð  ð%ð ð%ð ô%øða ò TðTØðTàðTð ðTð 
õ	TðTús   Ã9E" Å"E6Å5E6