Ë
    †jF6  ã                   óz   — d Z ddlZddlmZmZmZmZ ddlm	Z	 ddl
mZ ddlmZ erddlmZ e G d„ d	«      «       Zy)
z\This module contains the class Defaults, which allows passing default values to Application.é    N)ÚTYPE_CHECKINGÚAnyÚNoReturnÚfinal)ÚUTC)Úwarn)ÚPTBDeprecationWarning)ÚLinkPreviewOptionsc                   óÖ  — e Zd ZdZdZddedddddfdedz  dedz  dej                  ded	edz  d
edz  dddedz  fd„Z
defd„Zdedefd„Zedeeef   fd„«       Zededz  fd„«       Zej(                  dedefd„«       Zededz  fd„«       Zej(                  dedefd„«       Zededz  fd„«       Zej(                  dedefd„«       Zededz  fd„«       Zej(                  dedefd„«       Zededz  fd„«       Zej(                  dedefd„«       Zededz  fd„«       Zej(                  dedefd „«       Zededz  fd!„«       Zej(                  dedefd"„«       Zedej                  fd#„«       Z	e	j(                  dedefd$„«       Z	edefd%„«       Zej(                  dedefd&„«       Zededz  fd'„«       Zej(                  dedefd(„«       Zed+d)„«       Zededz  fd*„«       Zy),ÚDefaultsaø  Convenience Class to gather all parameters with a (user defined) default value

    .. seealso:: :wiki:`Architecture Overview <Architecture>`,
        :wiki:`Adding Defaults to Your Bot <Adding-defaults-to-your-bot>`

    .. versionchanged:: 20.0
        Removed the argument and attribute ``timeout``. Specify default timeout behavior for the
        networking backend directly via :class:`telegram.ext.ApplicationBuilder` instead.

    .. versionchanged:: 22.0
        Removed deprecated arguments and properties ``disable_web_page_preview`` and ``quote``.
        Use :paramref:`link_preview_options` and :paramref:`do_quote` instead.

    Parameters:
        parse_mode (:obj:`str`, optional): |parse_mode|
        disable_notification (:obj:`bool`, optional): |disable_notification|
        allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|.
            Will be used for :attr:`telegram.ReplyParameters.allow_sending_without_reply`.
        tzinfo (:class:`datetime.tzinfo`, optional): A timezone to be used for all date(time)
            inputs appearing throughout PTB, i.e. if a timezone naive date(time) object is passed
            somewhere, it will be assumed to be in :paramref:`tzinfo`. Defaults to
            :attr:`datetime.timezone.utc` otherwise.

            .. deprecated:: 21.10
                Support for ``pytz`` timezones is deprecated and will be removed in future
                versions.

        block (:obj:`bool`, optional): Default setting for the :paramref:`BaseHandler.block`
            parameter
            of handlers and error handlers registered through :meth:`Application.add_handler` and
            :meth:`Application.add_error_handler`. Defaults to :obj:`True`.
        protect_content (:obj:`bool`, optional): |protect_content|

            .. versionadded:: 20.0
        link_preview_options (:class:`telegram.LinkPreviewOptions`, optional):
            Link preview generation options for all outgoing messages. Mutually exclusive with
            :paramref:`disable_web_page_preview`.
            This object is used for the corresponding parameter of
            :meth:`telegram.Bot.send_message`, :meth:`telegram.Bot.edit_message_text`,
            and :class:`telegram.InputTextMessageContent` if not specified. If a value is specified
            for the corresponding parameter, only those parameters of
            :class:`telegram.LinkPreviewOptions` will be overridden that are not
            explicitly set.

            Example:

                .. code-block:: python

                    from telegram import LinkPreviewOptions
                    from telegram.ext import Defaults, ExtBot

                    defaults = Defaults(
                        link_preview_options=LinkPreviewOptions(show_above_text=True)
                    )
                    chat_id = 123

                    async def main():
                        async with ExtBot("Token", defaults=defaults) as bot:
                            # The link preview will be shown above the text.
                            await bot.send_message(chat_id, "https://python-telegram-bot.org")

                            # The link preview will be shown below the text.
                            await bot.send_message(
                                chat_id,
                                "https://python-telegram-bot.org",
                                link_preview_options=LinkPreviewOptions(show_above_text=False)
                            )

                            # The link preview will be shown above the text, but the preview will
                            # show Telegram.
                            await bot.send_message(
                                chat_id,
                                "https://python-telegram-bot.org",
                                link_preview_options=LinkPreviewOptions(url="https://telegram.org")
                            )

            .. versionadded:: 20.8
        do_quote(:obj:`bool`, optional): |reply_quote|

            .. versionadded:: 20.8
    )	Ú_allow_sending_without_replyÚ_api_defaultsÚ_blockÚ_disable_notificationÚ	_do_quoteÚ_link_preview_optionsÚ_parse_modeÚ_protect_contentÚ_tzinfoNTÚ
parse_modeÚdisable_notificationÚtzinfoÚblockÚallow_sending_without_replyÚprotect_contentÚlink_preview_optionsúLinkPreviewOptions | NoneÚdo_quotec	                 ó>  — || _         || _        || _        || _        || _        || _        dt        | j                  j                  «      v rt        t        dd¬«      d¬«       || _
        || _        i | _        dD ]   }	t        | |	«      }
|
€Œ|
| j                  |	<   Œ" y )NÚpytzz21.10zPSupport for pytz timezones is deprecated and will be removed in future versions.)ÚversionÚmessageé   )r"   Ú
stacklevel)	r   r   r   Úexplanation_parse_moder   r   Útext_parse_moder   Úquestion_parse_mode)r   r   r   r   r   r   ÚstrÚ	__class__r   r	   r   r   r   Úgetattr)Úselfr   r   r   r   r   r   r   r   ÚkwargÚvalues              úU/var/www/html/datingFans/myenv/lib/python3.12/site-packages/telegram/ext/_defaults.pyÚ__init__zDefaults.__init__€   s¶   € ð (2ˆÔØ2FˆÔ"Ø9TˆÔ)Ø#)ˆŒØ!ˆŒØ-<ˆÔà”S˜Ÿ™×/Ñ/Ó0Ñ0äÜ-Ø#ð+ôð õ	ð &:ˆÔ"Ø!ˆŒð  ˆÔð

ò 	2ˆEô ˜D %Ó(ˆEØÑ Ø,1�×"Ñ" 5Ò)ñ	2ó    Úreturnc           
      óÈ   — t        | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  f«      S )zçBuilds a hash value for this object such that the hash of two objects is equal if and
        only if the objects are equal in terms of :meth:`__eq__`.

        Returns:
            :obj:`int` The hash value of the object.
        )	Úhashr   r   r   r   r   r   r   r   ©r+   s    r.   Ú__hash__zDefaults.__hash__³   sX   € ô à× Ñ Ø×*Ñ*Ø×*Ñ*Ø×1Ñ1Ø—‘Ø—‘Ø—‘Ø×%Ñ%ð	ó
ð 	
r0   Úotherc                 óf   ‡ ‡— t        ‰t        «      rt        ˆˆ fd„‰ j                  D «       «      S y)a"  Defines equality condition for the :class:`Defaults` object.
        Two objects of this class are considered to be equal if all their parameters
        are identical.

        Returns:
            :obj:`True` if both objects have all parameters identical. :obj:`False` otherwise.
        c              3   óP   •K  — | ]  }t        ‰|«      t        ‰|«      k(  –— Œ y ­w©N)r*   )Ú.0Úattrr6   r+   s     €€r.   ú	<genexpr>z"Defaults.__eq__.<locals>.<genexpr>Ð   s$   øè ø€ Ò^Àt”w˜t TÓ*¬g°e¸TÓ.BÕBÑ^ùs   ƒ#&F)Ú
isinstancer   ÚallÚ	__slots__)r+   r6   s   ``r.   Ú__eq__zDefaults.__eq__Ç   s'   ù€ ô �eœXÔ&ÜÔ^ÈtÏ~É~Ô^Ó^Ð^Ør0   c                 ó   — | j                   S r9   )r   r4   s    r.   Úapi_defaultszDefaults.api_defaultsÓ   s   € à×!Ñ!Ð!r0   c                 ó   — | j                   S )z�:obj:`str`: Optional. Send Markdown or HTML, if you want Telegram apps to show
        bold, italic, fixed-width text or URLs in your bot's message.
        ©r   r4   s    r.   r   zDefaults.parse_mode×   ó   € ð
 ×ÑÐr0   Ú_c                 ó   — t        d«      ‚)NzBYou can not assign a new value to parse_mode after initialization.©ÚAttributeError©r+   rF   s     r.   r   zDefaults.parse_modeÞ   s   € äÐaÓbÐbr0   c                 ó   — | j                   S )zŒ:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for
        the corresponding parameter of :meth:`telegram.Bot.send_poll`.
        rD   r4   s    r.   r%   zDefaults.explanation_parse_modeâ   rE   r0   c                 ó   — t        d«      ‚)NzNYou can not assign a new value to explanation_parse_mode after initialization.rH   rJ   s     r.   r%   zDefaults.explanation_parse_modeé   s   € äØ\ó
ð 	
r0   c                 ó   — | j                   S )zŽ:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for
        the corresponding parameter of :meth:`telegram.ReplyParameters`.
        rD   r4   s    r.   Úquote_parse_modezDefaults.quote_parse_modeï   rE   r0   c                 ó   — t        d«      ‚)NzHYou can not assign a new value to quote_parse_mode after initialization.rH   rJ   s     r.   rN   zDefaults.quote_parse_modeö   s   € äØVó
ð 	
r0   c                 ó   — | j                   S )zÚ:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for
        the corresponding parameter of :class:`telegram.InputPollOption` and
        :meth:`telegram.Bot.send_gift`.

        .. versionadded:: 21.2
        rD   r4   s    r.   r&   zDefaults.text_parse_modeü   s   € ð ×ÑÐr0   c                 ó   — t        d«      ‚)NzGYou can not assign a new value to text_parse_mode after initialization.rH   rJ   s     r.   r&   zDefaults.text_parse_mode  s   € äØUó
ð 	
r0   c                 ó   — | j                   S )z¬:obj:`str`: Optional. Alias for :attr:`parse_mode`, used for
        the corresponding parameter of :meth:`telegram.Bot.send_poll`.

        .. versionadded:: 21.2
        rD   r4   s    r.   r'   zDefaults.question_parse_mode  s   € ð ×ÑÐr0   c                 ó   — t        d«      ‚)NzKYou can not assign a new value to question_parse_mode after initialization.rH   rJ   s     r.   r'   zDefaults.question_parse_mode  s   € äØYó
ð 	
r0   c                 ó   — | j                   S )zt:obj:`bool`: Optional. Sends the message silently. Users will
        receive a notification with no sound.
        )r   r4   s    r.   r   zDefaults.disable_notification  s   € ð
 ×)Ñ)Ð)r0   c                 ó   — t        d«      ‚)NzLYou can not assign a new value to disable_notification after initialization.rH   rJ   s     r.   r   zDefaults.disable_notification"  s   € äØZó
ð 	
r0   c                 ó   — | j                   S )zŽ:obj:`bool`: Optional. Pass :obj:`True`, if the message
        should be sent even if the specified replied-to message is not found.
        )r   r4   s    r.   r   z$Defaults.allow_sending_without_reply(  s   € ð
 ×0Ñ0Ð0r0   c                 ó   — t        d«      ‚)NzSYou can not assign a new value to allow_sending_without_reply after initialization.rH   rJ   s     r.   r   z$Defaults.allow_sending_without_reply/  s   € äØaó
ð 	
r0   c                 ó   — | j                   S )zj:obj:`tzinfo`: A timezone to be used for all date(time) objects appearing
        throughout PTB.
        )r   r4   s    r.   r   zDefaults.tzinfo5  s   € ð
 �|‰|Ðr0   c                 ó   — t        d«      ‚)Nz>You can not assign a new value to tzinfo after initialization.rH   rJ   s     r.   r   zDefaults.tzinfo<  s   € äÐ]Ó^Ð^r0   c                 ó   — | j                   S )zì:obj:`bool`: Optional. Default setting for the :paramref:`BaseHandler.block` parameter
        of handlers and error handlers registered through :meth:`Application.add_handler` and
        :meth:`Application.add_error_handler`.
        )r   r4   s    r.   r   zDefaults.block@  s   € ð �{‰{Ðr0   c                 ó   — t        d«      ‚)Nz=You can not assign a new value to block after initialization.rH   rJ   s     r.   r   zDefaults.blockH  s   € äÐ\Ó]Ð]r0   c                 ó   — | j                   S )z�:obj:`bool`: Optional. Protects the contents of the sent message from forwarding and
        saving.

        .. versionadded:: 20.0
        )r   r4   s    r.   r   zDefaults.protect_contentL  s   € ð ×$Ñ$Ð$r0   c                 ó   — t        d«      ‚)NzEYou can't assign a new value to protect_content after initialization.rH   rJ   s     r.   r   zDefaults.protect_contentU  s   € äØSó
ð 	
r0   c                 ó   — | j                   S )z›:class:`telegram.LinkPreviewOptions`: Optional. Link preview generation options for all
        outgoing messages.

        .. versionadded:: 20.8
        )r   r4   s    r.   r   zDefaults.link_preview_options[  s   € ð ×)Ñ)Ð)r0   c                 ó   — | j                   S )zM:obj:`bool`: Optional. |reply_quote|

        .. versionadded:: 20.8
        )r   r4   s    r.   r   zDefaults.do_quoted  s   € ð �~‰~Ðr0   )r1   r   ) Ú__name__Ú
__module__Ú__qualname__Ú__doc__r?   r   r(   ÚboolÚdtmr   r/   Úintr5   Úobjectr@   ÚpropertyÚdictr   rB   r   Úsetterr   r%   rN   r&   r'   r   r   r   r   r   r   © r0   r.   r   r       sÕ  „ ñPðd
€Ið "&Ø,0Ø ØØ37Ø'+Ø<@Ø $ñ12à˜$‘Jð12ð # T™kð12ð —
‘
ð	12ð
 ð12ð &*¨D¡[ð12ð  ™ð12ð :ð12ð ˜‘+ó12ðf
˜#ó 
ð(
˜Fð 
 tó 
ð ð"˜d 3¨ 8™nò "ó ð"ð ð ˜C $™Jò  ó ð ð ×Ñðc˜Fð c xò có ðcð ð ¨¨d©
ò  ó ð ð ×"Ñ"ð
¨ð 
°8ò 
ó #ð
ð
 ð  #¨¡*ò  ó ð ð ×Ñð
 &ð 
¨Xò 
ó ð
ð
 ð   t¡ò  ó ð ð ×Ñð
 ð 
¨Hò 
ó ð
ð
 ð  S¨4¡Zò  ó ð ð ×Ñð
 Vð 
°ò 
ó  ð
ð
 ð* d¨T¡kò *ó ð*ð × Ñ ð
 fð 
°ò 
ó !ð
ð
 ð1¨T°D©[ò 1ó ð1ð !×'Ñ'ð
¨Vð 
¸ò 
ó (ð
ð
 ð˜Ÿ
™
ò ó ðð ‡]�]ð_˜ð _ 8ò _ó ð_ð ð�tò ó ðð ‡\�\ð^�vð ^ (ò ^ó ð^ð ð% ¨¡ò %ó ð%ð ×Ñð
 ð 
¨Hò 
ó ð
ð
 ò*ó ð*ð ð˜$ ™+ò ó ñr0   r   )rc   Údatetimere   Útypingr   r   r   r   Útelegram._utils.datetimer   Útelegram._utils.warningsr   Útelegram.warningsr	   Útelegramr
   r   rk   r0   r.   ú<module>rr      s?   ðñ& cã ß 6Ó 6å (Ý )Ý 3áÝ+ð ÷Ið Ió ñIr0   