+
    ÆÚjÉ  ã                  óÊ   € ^ RI Ht ^ RIt^ RIt^ RIt^ RIHtH	t	H
t
Ht ^ RIHt ^ RIHtHt ^RIHtHt ^RIHtHtHt . ROt ! R	 R4      tR
RRRRR/R R lltRR R lltR# )é    )ÚannotationsN)ÚAnyÚ	AwaitableÚCallableÚLiteral)ÚNotFound)ÚMapÚRequestRedirect)ÚRequestÚResponse)ÚServerÚServerConnectionÚserveÚRouterc                  óf   € ] tR t^tRtRR R lltR R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )r   z*WebSocket router supporting :func:`route`.Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	é   Úurl_mapr	   Úserver_nameú
str | NoneÚ
url_schemeÚstrÚreturnÚNone© )Úformats   "Ú�/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/websockets/asyncio/router.pyÚ__annotate__ÚRouter.__annotate__   s2   € ÷ 
"ñ 
"àð
"ð  ð
"ð ð	
"ð
 
ñ
"ó    c                	óz   € Wn         W n        W0n        V P                   P                  4        F
  pR Vn        K  	  R# )TN)r   r   r   Ú
iter_rulesÚ	websocket)Úselfr   r   r   Úrules   &&&& r   Ú__init__ÚRouter.__init__   s2   € ð ŒØ&ÔØ$ŒØ—L‘L×+Ñ+Ö-ˆDØ!ˆDŽNó .r    c               ó$   € V ^8„  d   QhRRRRRR/# )r   Ú
connectionr   Úrequestr   r   r   r   )r   s   "r   r   r   !   s#   € ÷ $ñ $Ð*:ð $ÀWð $ÐQTñ $r    c                	ó\   € V P                   f   VP                  R,          # V P                   # )NÚHost)r   Úheaders)r$   r)   r*   s   &&&r   Úget_server_nameÚRouter.get_server_name!   s)   € Ø×ÑÒ#Ø—?‘? 6Õ*Ð*à×#Ñ#Ð#r    c               ó$   € V ^8„  d   QhRRRRRR/# )r   r)   r   Úurlr   r   r   r   )r   s   "r   r   r   '   s"   € ÷ ñ Ð#3ð ¸#ð À(ñ r    c                	ó|   € VP                  \        P                  P                  R V 24      pW#P                  R&   V# )z	Found at ÚLocation)ÚrespondÚhttpÚ
HTTPStatusÚFOUNDr-   )r$   r)   r1   Úresponses   &&& r   ÚredirectÚRouter.redirect'   s8   € Ø×%Ñ%¤d§o¡o×&;Ñ&;¸yÈÈÐ=NÓOˆØ'*×Ñ˜Ñ$Øˆr    c               ó    € V ^8„  d   QhRRRR/# )r   r)   r   r   r   r   )r   s   "r   r   r   ,   s   € ÷ Jñ JÐ$4ð J¸ñ Jr    c                	óV   € VP                  \        P                  P                  R 4      # )z	Not Found)r4   r5   r6   Ú	NOT_FOUND©r$   r)   s   &&r   Ú	not_foundÚRouter.not_found,   s   € Ø×!Ñ!¤$§/¡/×";Ñ";¸[ÓIÐIr    c               ó$   € V ^8„  d   QhRRRRRR/# ©r   r)   r   r*   r   r   zResponse | Noner   )r   s   "r   r   r   /   s$   € ÷ ñ Ø*ðØ5<ðà	ñr    c                óÔ  € V P                   P                  V P                  W4      V P                  R7      p \        P
                  P                  VP                  4      pVP                  VP                  VP                  R7      w  rVYVuTn        Tn        R#   \         d&   pT P                  YP                  4      u Rp?# Rp?i\         d    T P                  T4      u # i ; i)zRoute incoming request.)r   r   )Ú	path_infoÚ
query_argsN)r   Úbindr.   r   ÚurllibÚparseÚurlparseÚpathÚmatchÚqueryr
   r9   Únew_urlr   r?   ÚhandlerÚhandler_kwargs)r$   r)   r*   Úurl_map_adapterÚparsedrN   Úkwargsr9   s   &&&     r   Úroute_requestÚRouter.route_request/   sÈ   € ð Ÿ,™,×+Ñ+Ø×,Ñ,¨ZÓAØ—‘ð ,ó 
ˆð		.Ü—\‘\×*Ñ*¨7¯<©<Ó8ˆFØ-×3Ñ3Ø Ÿ+™+Ø!Ÿ<™<ð 4ó ‰OˆGð 9@Ð5ˆ
Ô˜JÔ5Ùøô ô 	?Ø—=‘= ×-=Ñ-=Ó>Õ>ûÜô 	.Ø—>‘> *Ó-Ò-ð	.ús*   ¸AB ÂC'Â%CÂ?C'ÃC'ÃC'Ã&C'c               ó    € V ^8„  d   QhRRRR/# )r   r)   r   r   r   r   )r   s   "r   r   r   D   s   € ÷ Qñ QÐ(8ð Q¸Tñ Qr    c              ƒ  óX   "  € VP                   ! V3/ VP                  B G Rj  x€L
 #  L5i)zHandle a connection.N)rN   rO   r>   s   &&r   rN   ÚRouter.handlerD   s'   é € à×'Ò'¨
ÑP°j×6OÑ6OÑP×PÐPÑPùs   ‚!*£(¤*)r   r   r   )NÚws)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r&   r.   r9   r?   rS   rN   Ú__static_attributes__r   r    r   r   r      s+   † Ù4÷
"õ$õõ
Jõ÷*Qñ Qr    r   ÚsslÚcreate_routerc               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# )r   r   r	   Úargsr   r   r   r_   z,ssl_module.SSLContext | Literal[True] | Noner`   ztype[Router] | NonerR   r   úAwaitable[Server]r   )r   s   "r   r   r   I   s`   € ÷ jSñ jSØðjSàðjSð ðjSð 
6ð	jSð
 'ðjSð ðjSð ñjSr    c               óè   aa	€ Vf   RMRpVRJd	   Ve   W%R&   Vf   \         pV! WV4      o	VP                  RR4      oSf   S	P                  pM
R VV	3R llp\        S	P                  .VO5RV/VB # )	a�  
Create a WebSocket server dispatching connections to different handlers.

This feature requires the third-party library `werkzeug`_:

.. code-block:: console

    $ pip install werkzeug

.. _werkzeug: https://werkzeug.palletsprojects.com/

:func:`route` accepts the same arguments as
:func:`~websockets.sync.server.serve`, except as described below.

The first argument is a :class:`werkzeug.routing.Map` that maps URL patterns
to connection handlers. In addition to the connection, handlers receive
parameters captured in the URL as keyword arguments.

Here's an example::


    from websockets.asyncio.router import route
    from werkzeug.routing import Map, Rule

    async def channel_handler(websocket, channel_id):
        ...

    url_map = Map([
        Rule("/channel/<uuid:channel_id>", endpoint=channel_handler),
        ...
    ])

    # set this future to exit the server
    stop = asyncio.get_running_loop().create_future()

    async with route(url_map, ...) as server:
        await stop


Refer to the documentation of :mod:`werkzeug.routing` for details.

If you define redirects with ``Rule(..., redirect_to=...)`` in the URL map,
when the server runs behind a reverse proxy that modifies the ``Host``
header or terminates TLS, you need additional configuration:

* Set ``server_name`` to the name of the server as seen by clients. When not
  provided, websockets uses the value of the ``Host`` header.

* Set ``ssl=True`` to generate ``wss://`` URIs without actually enabling
  TLS. Under the hood, this bind the URL map with a ``url_scheme`` of
  ``wss://`` instead of ``ws://``.

There is no need to specify ``websocket=True`` in each rule. It is added
automatically.

Args:
    url_map: Mapping of URL patterns to connection handlers.
    server_name: Name of the server as seen by clients. If :obj:`None`,
        websockets uses the value of the ``Host`` header.
    ssl: Configuration for enabling TLS on the connection. Set it to
        :obj:`True` if a reverse proxy terminates TLS connections.
    create_router: Factory for the :class:`Router` dispatching requests to
        handlers. Set it to a wrapper or a subclass to customize routing.

NrX   ÚwssTr_   Úprocess_requestc               ó$   € V ^8„  d   QhRRRRRR/# rB   r   )r   s   "r   r   Úroute.<locals>.__annotate__©   s$   € ÷ 	=ñ 	=Ø(ð	=Ø3:ð	=àñ	=r    c              “  óŽ   <"  € S! W4      p\        V\        4      '       d   VG R j  x€L
 pVe   V# SP                  W4      #  L5i©N)Ú
isinstancer   rS   )r)   r*   r8   Ú_process_requestÚrouters   && €€r   rf   Úroute.<locals>.process_request©   sG   øé € ñ (¨
Ó<ˆHÜ˜(¤I×.Ò.Ø!)Ÿ>�ØÒ#Ø�Ø×'Ñ'¨
Ó<Ð<ñ *ùs   ƒ$A§A¨A)r   ÚpoprS   r   rN   )
r   r   r_   r`   rb   rR   r   rf   rl   rm   s
   &$$$*,  @@r   Úrouterp   I   s’   ù€ ðR š‘¨%€JØ
�$ƒ˜3š?Øˆu‰àÒÜˆá˜7°Ó<€Fð 	�
‰
Ð$ dÓ+ð ð Òð × Ñ ñ 	÷	=ñ 	=ô �—‘ÐR $ÒR¸ÐRÈ6ÑRÐRr    c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   r	   rJ   r   rR   r   r   rc   r   )r   s   "r   r   r   ¶   s0   € ÷ :ñ :Øð:à
ð:ð ð:ð ñ	:r    c                ó"   € \        V 3RRRV/VB # )a2  
Create a WebSocket Unix server dispatching connections to different handlers.

:func:`unix_route` combines the behaviors of :func:`route` and
:func:`~websockets.asyncio.server.unix_serve`.

Args:
    url_map: Mapping of URL patterns to connection handlers.
    path: File system path to the Unix socket.

ÚunixTrJ   )rp   )r   rJ   rR   s   &&,r   Ú
unix_routert   ¶   s   € ô  �Ñ9˜tÐ9¨$Ð9°&Ñ9Ð9r    )rp   rt   r   rj   )Ú
__future__r   r5   r_   Ú
ssl_moduleÚurllib.parserG   Útypingr   r   r   r   Úwerkzeug.exceptionsr   Úwerkzeug.routingr	   r
   Úhttp11r   r   Úserverr   r   r   Ú__all__r   rp   rt   r   r    r   Ú<module>r~      sp   ðÝ "ã Û Û ß 4Ó 4å (ß 1ç &ß 3Ñ 3ò ,€÷4Qñ 4QðnjSð #ðjSð 9=ð	jSð
 *.÷jS÷Z:ñ :r    