§
    'ºje  ã                   óx   — d Z ddl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 ddlmZ  G d„ d	¦  «        ZdS )
zˆThe base class of Socket Mode client implementation.
If you want to build asyncio-based ones, use `AsyncBaseSocketModeHandler` instead.
é    N)ÚEvent)ÚBaseSocketModeClient)ÚSocketModeRequest)ÚApp)Úget_boot_messagec                   óP   — e Zd ZU eed<   eed<   dededdfd„Zd„ Zd„ Z	d	„ Z
d
„ ZdS )ÚBaseSocketModeHandlerÚappÚclientÚreqÚreturnNc                 ó   — t          ¦   «         ‚)z´Handles Socket Mode envelope requests through a WebSocket connection.

        Args:
            client: this Socket Mode client instance
            req: the request data
        )ÚNotImplementedError)Úselfr   r   s      úl/usr/local/lib/hermes-agent/venv/lib/python3.11/site-packages/slack_bolt/adapter/socket_mode/base_handler.pyÚhandlezBaseSocketModeHandler.handle   s   € õ "Ñ#Ô#Ð#ó    c                 ó8   — | j                              ¦   «          dS )z8Establishes a new connection with the Socket Mode serverN)r   Úconnect©r   s    r   r   zBaseSocketModeHandler.connect   s   € àŒ×ÒÑÔÐÐÐr   c                 ó8   — | j                              ¦   «          dS )zHDisconnects the current WebSocket connection with the Socket Mode serverN)r   Ú
disconnectr   s    r   r   z BaseSocketModeHandler.disconnect"   s   € àŒ×ÒÑ Ô Ð Ð Ð r   c                 ó8   — | j                              ¦   «          dS )zWDisconnects from the Socket Mode server and cleans the resources this instance holds upN)r   Úcloser   s    r   r   zBaseSocketModeHandler.close&   s   € àŒ×ÒÑÔÐÐÐr   c                 ó¬  — |                       ¦   «          | j        j        j        t          j        k    rt          t          ¦   «         ¦  «         n+| j        j                             t          ¦   «         ¦  «         t          j
        dk    r)t          j        t          j        t          j        ¦  «         t          ¦   «                              ¦   «          dS )zÔEstablishes a new connection and then blocks the current thread
        to prevent the termination of this process.
        If you don't want to block the current thread, use `#connect()` method instead.
        Úwin32N)r   r
   ÚloggerÚlevelÚloggingÚINFOÚprintr   ÚinfoÚsysÚplatformÚsignalÚSIGINTÚSIG_DFLr   Úwaitr   s    r   ÚstartzBaseSocketModeHandler.start*   s–   € ð
 	Š‰ŒˆØŒ8Œ?Ô ¥7¤<Ò/Ð/ÝÕ"Ñ$Ô$Ñ%Ô%Ð%Ð%àŒHŒO× Ò Õ!1Ñ!3Ô!3Ñ4Ô4Ð4åŒ<˜7Ò"Ð"õ ŒM&œ-­¬Ñ8Ô8Ð8å‰ŒŠ‰Œˆˆˆr   )Ú__name__Ú
__module__Ú__qualname__r   Ú__annotations__r   r   r   r   r   r   r)   © r   r   r	   r	      s’   € € € € € € Ø	€H€HHØ Ð Ð Ñ ð$Ð1ð $Ð8Ið $Èdð $ð $ð $ð $ðð ð ð!ð !ð !ðð ð ðð ð ð ð r   r	   )Ú__doc__r   r%   r#   Ú	threadingr   Úslack_sdk.socket_mode.clientr   Úslack_sdk.socket_mode.requestr   Ú
slack_boltr   Úslack_bolt.util.utilsr   r	   r.   r   r   ú<module>r5      s¸   ððð ð €€€Ø €€€Ø 
€
€
€
Ø Ð Ð Ð Ð Ð à =Ð =Ð =Ð =Ð =Ð =Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;à Ð Ð Ð Ð Ð Ø 2Ð 2Ð 2Ð 2Ð 2Ð 2ð)ð )ð )ð )ð )ñ )ô )ð )ð )ð )r   