+
    ÁFñjÃ  ã                   óÀ   € R t ^ RIt^ RIHtHt ^ RIHtHtHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHtHt ]'       d   ^ RIHt ]! R	4      t ! R
 R]]]]3,          4      tR# )z2This module contains the StringRegexHandler class.N)ÚMatchÚPattern)ÚTYPE_CHECKINGÚAnyÚTypeVar)ÚDEFAULT_TRUE)ÚDVType)ÚBaseHandler)ÚCCTÚHandlerCallback)ÚApplicationÚRTc                   óp   a a€ ] tR t^$t oRtRt]3V3R lV 3R llltV3R lR ltV3R lR lt	Rt
VtV ;t# )	ÚStringRegexHandlera  Handler class to handle string updates based on a regex which checks the update content.

Read the documentation of the :mod:`re` module for more information. The :func:`re.match`
function is used to determine if an update should be handled by this handler.

Note:
    This handler is not used to handle Telegram :class:`telegram.Update`, but strings manually
    put in the queue. For example to send messages with the bot using command line or API.

Warning:
    When setting :paramref:`block` to :obj:`False`, you cannot rely on adding custom
    attributes to :class:`telegram.ext.CallbackContext`. See its docs for more info.

Args:
    pattern (:obj:`str` | :func:`re.Pattern <re.compile>`): The regex pattern.
    callback (:term:`coroutine function`): The callback function for this handler. Will be
        called when :meth:`check_update` has determined that an update should be processed by
        this handler. Callback signature::

            async def callback(update: str, context: CallbackContext)

        The return value of the callback is usually ignored except for the special case of
        :class:`telegram.ext.ConversationHandler`.
    block (:obj:`bool`, optional): Determines whether the return value of the callback should
        be awaited before processing the next handler in
        :meth:`telegram.ext.Application.process_update`. Defaults to :obj:`True`.

        .. seealso:: :wiki:`Concurrency`

Attributes:
    pattern (:obj:`str` | :func:`re.Pattern <re.compile>`): The regex pattern.
    callback (:term:`coroutine function`): The callback function for this handler.
    block (:obj:`bool`): Determines whether the return value of the callback should be
        awaited before processing the next handler in
        :meth:`telegram.ext.Application.process_update`.

c          	      óz   <€ V ^8„  d   QhRRRS[ S[S[ ,          ,          RS[S[ S[S[3,          RS[S[,          /# )é   ÚselfzStringRegexHandler[CCT, RT]ÚpatternÚcallbackÚblock)Ústrr   r   r
   r   r   Úbool)ÚformatÚ__classdict__s   "€Ú_/opt/hermes-site/venv/lib/python3.14/site-packages/telegram/ext/_handlers/stringregexhandler.pyÚ__annotate__ÚStringRegexHandler.__annotate__M   sI   ø€ ÷ 3ñ 3Ø+ð3á‘w™s•|Õ#ð3ñ "¡#¡s©B ,Õ/ð3ñ ‘d�|ñ	3ó    c                óŒ   <€ \         SV `  W#R 7       \        V\        4      '       d   \        P
                  ! V4      pWn        R# ))r   N)ÚsuperÚ__init__Ú
isinstancer   ÚreÚcompiler   )r   r   r   r   Ú	__class__s   &&&&€r   r    ÚStringRegexHandler.__init__M   s5   ø€ ô 	‰Ñ˜ÐÔ/ä�gœs×#Ò#Ü—j’j Ó)ˆGà+2Žr   c                óD   <€ V ^8„  d   QhRS[ RS[S[,          R,          /# )r   ÚupdateÚreturnN)Úobjectr   r   )r   r   s   "€r   r   r   Z   s$   ø€ ÷ ñ ¡6ð ©e±C­j¸4Õ.?ñ r   c                óˆ   € \        V\        4      '       d,   \        P                  ! V P                  V4      ;p'       d   V# R# )z·Determines whether an update should be passed to this handler's :attr:`callback`.

Args:
    update (:obj:`object`): The incoming update.

Returns:
    :obj:`None` | :obj:`re.match`

N)r!   r   r"   Úmatchr   )r   r'   r+   s   && r   Úcheck_updateÚStringRegexHandler.check_updateZ   s2   € ô �fœc×"Ò"´·²¸$¿,¹,ÈÓ1OÐ(O¨Ö(OØˆLÙr   c          
      óR   <€ V ^8„  d   QhRS[ RS[RRRS[S[,          R,          RR/# )r   Úcontextr'   Úapplicationz)Application[Any, CCT, Any, Any, Any, Any]Úcheck_resultNr(   )r
   r   r   )r   r   s   "€r   r   r   h   sG   ø€ ÷ -ñ -áð-ñ ð-ð Að	-ñ
 ™C•j 4Õ'ð-ð 
ñ-r   c                óR   € V P                   '       d   V'       d   V.Vn        R# R# R# )zmAdd the result of ``re.match(pattern, update)`` to :attr:`CallbackContext.matches` as
list with one element.
N)r   Úmatches)r   r/   r'   r0   r1   s   &&&&&r   Úcollect_additional_contextÚ-StringRegexHandler.collect_additional_contexth   s   € ð �<�<ˆ<ŸLØ+˜nˆGŽOñ )‰<r   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r   r    r,   r4   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r$   r   s   @@r   r   r   $   s:   ù‡ € ñ$ðL €Ið +÷	3õ 3÷ð ÷-÷ -ð -r   r   )r:   r"   r   r   Útypingr   r   r   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   Ú"telegram.ext._handlers.basehandlerr	   Útelegram.ext._utils.typesr
   r   Útelegram.extr   r   r   r   © r   r   Ú<module>rF      sJ   ðñ& 9ã 	ß ß .Ñ .å 5Ý (Ý :ß :çÝ(áˆTƒ]€ôO-˜ S¨#¨r \Õ2ö O-r   