+
    ÁFñj™  ã                   óÐ   € R t ^ RIt^ RIHtHt ^ RIHtHtHtHt ^ RI	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 InlineQueryHandler class.N)ÚMatchÚPattern)ÚTYPE_CHECKINGÚAnyÚTypeVarÚcast)ÚUpdate)ÚDEFAULT_TRUE)ÚDVType)ÚBaseHandler)ÚCCTÚHandlerCallback)ÚApplicationÚRTc                   ót   a a€ ] tR t^%t oRtR	tR]R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# )
ÚInlineQueryHandleran	  
BaseHandler class to handle Telegram updates that contain a
:attr:`telegram.Update.inline_query`.
Optionally based on a regex. Read the documentation of the :mod:`re` module for more
information.

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.
    * :attr:`telegram.InlineQuery.chat_type` will not be set for inline queries from secret
      chats and may not be set for inline queries coming from third-party clients. These
      updates won't be handled, if :attr:`chat_types` is passed.

Examples:
    :any:`Inline Bot <examples.inlinebot>`


Args:
    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: Update, context: CallbackContext)

        The return value of the callback is usually ignored except for the special case of
        :class:`telegram.ext.ConversationHandler`.
    pattern (:obj:`str` | :func:`re.Pattern <re.compile>`, optional): Regex pattern.
        If not :obj:`None`, :func:`re.match` is used on :attr:`telegram.InlineQuery.query`
        to determine if an update should be handled by this handler.
    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`
    chat_types (list[:obj:`str`], optional): List of allowed chat types. If passed, will only
        handle inline queries with the appropriate :attr:`telegram.InlineQuery.chat_type`.

        .. versionadded:: 13.5
Attributes:
    callback (:term:`coroutine function`): The callback function for this handler.
    pattern (:obj:`str` | :func:`re.Pattern <re.compile>`): Optional. Regex pattern to test
        :attr:`telegram.InlineQuery.query` against.
    chat_types (list[:obj:`str`]): Optional. List of allowed chat types.

        .. versionadded:: 13.5
    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`.

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

Args:
    update (:class:`telegram.Update` | :obj:`object`): Incoming update.

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

NFT)	r%   r   Úinline_queryr   Ú	chat_typer   r&   ÚmatchÚquery)r   r+   r1   s   && r   Úcheck_updateÚInlineQueryHandler.check_updatej   sƒ   € ô �fœf×%Ò%¨&×*=×*=Ð*=Ø—‘Ò+Ø×#Ñ#×-Ñ-°T·_±_ÔDáØ�|�|ˆ|¬"¯(ª(°4·<±<À×ATÑAT×AZÑAZÓ*[Ð![ Ö![Ø�Ø—<—<�<ÙÙr!   c          
      ób   <€ V ^8„  d   QhRS[ RS[RRRS[S[S[,          ,          R,          RR/# )r   Úcontextr+   Úapplicationz)Application[Any, CCT, Any, Any, Any, Any]Úcheck_resultNr,   )r   r   r   r   r   )r   r   s   "€r   r   r    €   sL   ø€ ÷ -ñ -áð-ñ ð-ð Að	-ñ
 ™U¡3�ZÕ'¨$Õ.ð-ð 
ñ-r!   c                óV   € V P                   '       d   \        RV4      pV.Vn        R# R# )z€Add the result of ``re.match(pattern, update.inline_query.query)`` to
:attr:`CallbackContext.matches` as list with one element.
r   N)r   r   Úmatches)r   r6   r+   r7   r8   s   &&&&&r   Úcollect_additional_contextÚ-InlineQueryHandler.collect_additional_context€   s'   € ð �<�<ˆ<Ü ¨Ó6ˆLØ+˜nˆGŽOñ r!   )r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r	   r$   r3   r;   Ú__static_attributes__Ú__classdictcell__Ú__classcell__)r(   r   s   @@r   r   r   %   s@   ù‡ € ñ1ðf *€Ið
 .2Ø*Ø'+÷7õ 7÷ð ÷,-÷ -ð -r!   r   )rA   r&   r   r   Útypingr   r   r   r   Útelegramr   Útelegram._utils.defaultvaluer	   Útelegram._utils.typesr
   Ú"telegram.ext._handlers.basehandlerr   Útelegram.ext._utils.typesr   r   Útelegram.extr   r   r   © r!   r   Ú<module>rN      sM   ðñ& 9ã 	ß ß 4Ó 4å Ý 5Ý (Ý :ß :çÝ(áˆTƒ]€ôg-˜ V¨S°" _Õ5ö g-r!   