§
    êd×ic@  ã                   óz   — d 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
 ddlmZ ddlmZ  G d	„ d
e
¦  «        ZdS )zNThis module contains an object that represents a Telegram ReplyKeyboardMarkup.é    )ÚSequence)ÚFinal)Ú	constants)ÚKeyboardButton)ÚTelegramObject)Úcheck_keyboard_type)ÚJSONDictc                   ó  ‡ — e Zd ZU dZdZ	 	 	 	 	 dddœdeeeez                    dedz  dedz  dedz  d	edz  d
edz  de	dz  fˆ fd„Z
e	 	 	 	 	 ddeez  dededed	edz  d
edz  dedd fd„¦   «         Ze	 	 	 	 	 ddeeez           dededed	edz  d
edz  dedd fd„¦   «         Ze	 	 	 	 	 ddeeez           dededed	edz  d
edz  dedd fd„¦   «         Zej        j        Zee         ed<   	 ej        j        Zee         ed<   ˆ xZS )ÚReplyKeyboardMarkupa™  This object represents a custom keyboard with reply options. Not supported in channels and
    for messages sent on behalf of a Telegram Business account.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their size of :attr:`keyboard` and all the buttons are equal.

    .. figure:: https://core.telegram.org/file/464001950/1191a/2RwpmgU-swU.123554/b5        0478c124d5914c23
        :align: center

        A reply keyboard with reply options.

    .. seealso::
        Another kind of keyboard would be the :class:`telegram.InlineKeyboardMarkup`.

    Examples:
        * Example usage: A user requests to change the bot's language, bot replies to the request
          with a keyboard to select the new language. Other users in the group don't see
          the keyboard.
        * :any:`Conversation Bot <examples.conversationbot>`
        * :any:`Conversation Bot 2 <examples.conversationbot2>`

    Args:
        keyboard (Sequence[Sequence[:obj:`str` | :class:`telegram.KeyboardButton`]]): Array of
            button rows, each represented by an Array of :class:`telegram.KeyboardButton` objects.
        resize_keyboard (:obj:`bool`, optional): Requests clients to resize the keyboard vertically
            for optimal fit (e.g., make the keyboard smaller if there are just two rows of
            buttons). Defaults to :obj:`False`, in which case the custom keyboard is always of the
            same height as the app's standard keyboard.
        one_time_keyboard (:obj:`bool`, optional): Requests clients to hide the keyboard as soon as
            it's been used. The keyboard will still be available, but clients will automatically
            display the usual letter-keyboard in the chat - the user can press a special button in
            the input field to see the custom keyboard again. Defaults to :obj:`False`.
        selective (:obj:`bool`, optional): Use this parameter if you want to show the keyboard to
            specific users only. Targets:

            1) Users that are @mentioned in the :attr:`~telegram.Message.text` of the
               :class:`telegram.Message` object.
            2) If the bot's message is a reply to a message in the same chat and forum topic,
                sender of the original message.

            Defaults to :obj:`False`.

        input_field_placeholder (:obj:`str`, optional): The placeholder to be shown in the input
            field when the keyboard is active;
            :tg-const:`telegram.ReplyKeyboardMarkup.MIN_INPUT_FIELD_PLACEHOLDER`-
            :tg-const:`telegram.ReplyKeyboardMarkup.MAX_INPUT_FIELD_PLACEHOLDER`
            characters.

            .. versionadded:: 13.7
        is_persistent (:obj:`bool`, optional): Requests clients to always show the keyboard when
            the regular keyboard is hidden. Defaults to :obj:`False`, in which case the custom
            keyboard can be hidden and opened with a keyboard icon.

            .. versionadded:: 20.0

    Attributes:
        keyboard (tuple[tuple[:class:`telegram.KeyboardButton`]]): Array of button rows,
            each represented by an Array of :class:`telegram.KeyboardButton` objects.
        resize_keyboard (:obj:`bool`): Optional. Requests clients to resize the keyboard vertically
            for optimal fit (e.g., make the keyboard smaller if there are just two rows of
            buttons). Defaults to :obj:`False`, in which case the custom keyboard is always of the
            same height as the app's standard keyboard.
        one_time_keyboard (:obj:`bool`): Optional. Requests clients to hide the keyboard as soon as
            it's been used. The keyboard will still be available, but clients will automatically
            display the usual letter-keyboard in the chat - the user can press a special button in
            the input field to see the custom keyboard again. Defaults to :obj:`False`.
        selective (:obj:`bool`): Optional. Show the keyboard to specific users only.
            Targets:

            1) Users that are @mentioned in the :attr:`~telegram.Message.text` of the
               :class:`telegram.Message` object.
            2) If the bot's message is a reply to a message in the same chat and forum topic,
                sender of the original message.

            Defaults to :obj:`False`.

        input_field_placeholder (:obj:`str`): Optional. The placeholder to be shown in the input
            field when the keyboard is active;
            :tg-const:`telegram.ReplyKeyboardMarkup.MIN_INPUT_FIELD_PLACEHOLDER`-
            :tg-const:`telegram.ReplyKeyboardMarkup.MAX_INPUT_FIELD_PLACEHOLDER`
            characters.

            .. versionadded:: 13.7
        is_persistent (:obj:`bool`): Optional. Requests clients to always show the keyboard when
            the regular keyboard is hidden. If :obj:`False`, the custom keyboard can be hidden and
            opened with a keyboard icon.

            .. versionadded:: 20.0

    )Úinput_field_placeholderÚis_persistentÚkeyboardÚone_time_keyboardÚresize_keyboardÚ	selectiveN©Ú
api_kwargsr   r   r   r   r   r   r   c                óL  •— t          ¦   «                              |¬¦  «         t          |¦  «        st          d¦  «        ‚t	          d„ |D ¦   «         ¦  «        | _        || _        || _        || _        || _	        || _
        | j        f| _        |                      ¦   «          d S )Nr   zXThe parameter `keyboard` should be a sequence of sequences of strings or KeyboardButtonsc              3   óH   K  — | ]}t          d „ |D ¦   «         ¦  «        V — ŒdS )c              3   ób   K  — | ]*}t          |t          ¦  «        rt          |¦  «        n|V — Œ+d S )N)Ú
isinstanceÚstrr   ©Ú.0Úbuttons     úZ/root/projects/qq-shell/venv/lib/python3.11/site-packages/telegram/_replykeyboardmarkup.pyú	<genexpr>z9ReplyKeyboardMarkup.__init__.<locals>.<genexpr>.<genexpr>™   s?   è è € ÐbÐbÐTZ­J°v½sÑ,CÔ,CÐO•. Ñ(Ô(Ð(ÈÐbÐbÐbÐbÐbÐbó    N)Útuple)r   Úrows     r   r   z/ReplyKeyboardMarkup.__init__.<locals>.<genexpr>˜   sV   è è € ð F
ð F
àõ ÐbÐbÐ^aÐbÑbÔbÑbÔbðF
ð F
ð F
ð F
ð F
ð F
r   )ÚsuperÚ__init__r   Ú
ValueErrorr   r   r   r   r   r   r   Ú	_id_attrsÚ_freeze)	Úselfr   r   r   r   r   r   r   Ú	__class__s	           €r   r"   zReplyKeyboardMarkup.__init__…   sÅ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ý" 8Ñ,Ô,ð 	Ýð-ñô ð õ AFð F
ð F
àðF
ñ F
ô F
ñ A
ô A
ˆŒð -<ˆÔØ.?ˆÔØ&/ˆŒØ3JˆÔ$Ø*7ˆÔàœ-Ð)ˆŒàŠ‰Œˆˆˆr   Fr   ÚkwargsÚreturnc           	      ó$   —  | |ggf|||||dœ|¤ŽS )a¶  Shortcut for::

            ReplyKeyboardMarkup([[button]], **kwargs)

        Return a ReplyKeyboardMarkup from a single KeyboardButton.

        Args:
            button (:class:`telegram.KeyboardButton` | :obj:`str`): The button to use in
                the markup.
            resize_keyboard (:obj:`bool`, optional): Requests clients to resize the keyboard
                vertically for optimal fit (e.g., make the keyboard smaller if there are just two
                rows of buttons). Defaults to :obj:`False`, in which case the custom keyboard is
                always of the same height as the app's standard keyboard.
            one_time_keyboard (:obj:`bool`, optional): Requests clients to hide the keyboard as
                soon as it's been used. The keyboard will still be available, but clients will
                automatically display the usual letter-keyboard in the chat - the user can press
                a special button in the input field to see the custom keyboard again.
                Defaults to :obj:`False`.
            selective (:obj:`bool`, optional): Use this parameter if you want to show the keyboard
                to specific users only. Targets:

                1) Users that are @mentioned in the text of the Message object.
                2) If the bot's message is a reply to a message in the same chat and forum topic,
                    sender of the original message.

                Defaults to :obj:`False`.

            input_field_placeholder (:obj:`str`): Optional. The placeholder shown in the input
                field when the reply is active.

                .. versionadded:: 13.7
            is_persistent (:obj:`bool`): Optional. Requests clients to always show the keyboard
                when the regular keyboard is hidden. Defaults to :obj:`False`, in which case the
                custom keyboard can be hidden and opened with a keyboard icon.

                .. versionadded:: 20.0
        ©r   r   r   r   r   © )Úclsr   r   r   r   r   r   r(   s           r   Úfrom_buttonzReplyKeyboardMarkup.from_button¨   sC   € ð` ˆsØˆXˆJð
à+Ø/ØØ$;Ø'ð
ð 
ð ð
ð 
ð 	
r   Ú
button_rowc           	      ó"   —  | |gf|||||dœ|¤ŽS )a  Shortcut for::

            ReplyKeyboardMarkup([button_row], **kwargs)

        Return a ReplyKeyboardMarkup from a single row of KeyboardButtons.

        Args:
            button_row (Sequence[:class:`telegram.KeyboardButton` | :obj:`str`]): The button to
                use in the markup.

                .. versionchanged:: 20.0
                    |sequenceargs|
            resize_keyboard (:obj:`bool`, optional): Requests clients to resize the keyboard
                vertically for optimal fit (e.g., make the keyboard smaller if there are just two
                rows of buttons). Defaults to :obj:`False`, in which case the custom keyboard is
                always of the same height as the app's standard keyboard.
            one_time_keyboard (:obj:`bool`, optional): Requests clients to hide the keyboard as
                soon as it's been used. The keyboard will still be available, but clients will
                automatically display the usual letter-keyboard in the chat - the user can press
                a special button in the input field to see the custom keyboard again.
                Defaults to :obj:`False`.
            selective (:obj:`bool`, optional): Use this parameter if you want to show the keyboard
                to specific users only. Targets:

                1) Users that are @mentioned in the text of the Message object.
                2) If the bot's message is a reply to a message in the same chat and forum topic,
                    sender of the original message.

                Defaults to :obj:`False`.

            input_field_placeholder (:obj:`str`): Optional. The placeholder shown in the input
                field when the reply is active.

                .. versionadded:: 13.7
            is_persistent (:obj:`bool`): Optional. Requests clients to always show the keyboard
                when the regular keyboard is hidden. Defaults to :obj:`False`, in which case the
                custom keyboard can be hidden and opened with a keyboard icon.

                .. versionadded:: 20.0

        r+   r,   )r-   r/   r   r   r   r   r   r(   s           r   Úfrom_rowzReplyKeyboardMarkup.from_rowâ   sA   € ðh ˆsØˆLð
à+Ø/ØØ$;Ø'ð
ð 
ð ð
ð 
ð 	
r   Úbutton_columnc           	      ó8   — d„ |D ¦   «         } | |f|||||dœ|¤ŽS )a<  Shortcut for::

            ReplyKeyboardMarkup([[button] for button in button_column], **kwargs)

        Return a ReplyKeyboardMarkup from a single column of KeyboardButtons.

        Args:
            button_column (Sequence[:class:`telegram.KeyboardButton` | :obj:`str`]): The button
                to use in the markup.

                .. versionchanged:: 20.0
                    |sequenceargs|
            resize_keyboard (:obj:`bool`, optional): Requests clients to resize the keyboard
                vertically for optimal fit (e.g., make the keyboard smaller if there are just two
                rows of buttons). Defaults to :obj:`False`, in which case the custom keyboard is
                always of the same height as the app's standard keyboard.
            one_time_keyboard (:obj:`bool`, optional): Requests clients to hide the keyboard as
                soon as it's been used. The keyboard will still be available, but clients will
                automatically display the usual letter-keyboard in the chat - the user can press
                a special button in the input field to see the custom keyboard again.
                Defaults to :obj:`False`.
            selective (:obj:`bool`, optional): Use this parameter if you want to show the keyboard
                to specific users only. Targets:

                1) Users that are @mentioned in the text of the Message object.
                2) If the bot's message is a reply to a message in the same chat and forum topic,
                    sender of the original message.

                Defaults to :obj:`False`.

            input_field_placeholder (:obj:`str`): Optional. The placeholder shown in the input
                field when the reply is active.

                .. versionadded:: 13.7
            is_persistent (:obj:`bool`): Optional. Requests clients to always show the keyboard
                when the regular keyboard is hidden. Defaults to :obj:`False`, in which case the
                custom keyboard can be hidden and opened with a keyboard icon.

                .. versionadded:: 20.0

        c                 ó   — g | ]}|g‘ŒS r,   r,   r   s     r   ú
<listcomp>z3ReplyKeyboardMarkup.from_column.<locals>.<listcomp>T  s   € Ð<Ð<Ð< F˜xÐ<Ð<Ð<r   r+   r,   )	r-   r2   r   r   r   r   r   r(   Úbutton_grids	            r   Úfrom_columnzReplyKeyboardMarkup.from_column   sR   € ðh =Ð<¨mÐ<Ñ<Ô<ˆØˆsØð
à+Ø/ØØ$;Ø'ð
ð 
ð ð
ð 
ð 	
r   ÚMIN_INPUT_FIELD_PLACEHOLDERÚMAX_INPUT_FIELD_PLACEHOLDER)NNNNN)FFFNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r   r   Úboolr	   r"   ÚclassmethodÚobjectr.   r1   r7   r   Ú
ReplyLimitr8   r   ÚintÚ__annotations__r9   Ú__classcell__)r'   s   @r   r   r      sã  ø€ € € € € € ðZð Zðx€Ið (,Ø)-Ø!%Ø.2Ø%)ð!ð '+ð!ð !ð !à˜8 C¨.Ñ$8Ô9Ô:ð!ð  ™ð!ð   $™;ð	!ð
 ˜$‘;ð!ð "% t¡ð!ð ˜d‘{ð!ð ˜t‘Oð!ð !ð !ð !ð !ð !ðF ð !&Ø"'ØØ.2Ø%)ð7
ð 7
à Ñ$ð7
ð ð7
ð  ð	7
ð
 ð7
ð "% t¡ð7
ð ˜d‘{ð7
ð ð7
ð 
ð7
ð 7
ð 7
ñ „[ð7
ðr ð !&Ø"'ØØ.2Ø%)ð;
ð ;
à˜S >Ñ1Ô2ð;
ð ð;
ð  ð	;
ð
 ð;
ð "% t¡ð;
ð ˜d‘{ð;
ð ð;
ð 
ð;
ð ;
ð ;
ñ „[ð;
ðz ð !&Ø"'ØØ.2Ø%)ð<
ð <
à  nÑ 4Ô5ð<
ð ð<
ð  ð	<
ð
 ð<
ð "% t¡ð<
ð ˜d‘{ð<
ð ð<
ð 
ð<
ð <
ð <
ñ „[ð<
ð| /8Ô.BÔ.^Ð  s¤Ð^Ð^Ñ^ðð /8Ô.BÔ.^Ð  s¤Ð^Ð^Ñ^ðð ð ð r   r   N)r=   Úcollections.abcr   Útypingr   Útelegramr   Útelegram._keyboardbuttonr   Útelegram._telegramobjectr   Útelegram._utils.markupr   Útelegram._utils.typesr	   r   r,   r   r   ú<module>rM      sÊ   ðð& UÐ Tà $Ð $Ð $Ð $Ð $Ð $Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø 6Ð 6Ð 6Ð 6Ð 6Ð 6Ø *Ð *Ð *Ð *Ð *Ð *ðIð Ið Ið Ið I˜.ñ Iô Ið Ið Ið Ir   