Ë
    †j›>  ã                   ón  — d Z ddlZddlmZ ddlmZ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mZmZ ddlmZmZ ddlmZ erddlmZ  G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z  G d„ de«      Z! G d„ de«      Z" G d„ de«      Z# G d„ de«      Z$y) zDThis module contains the classes that represent Telegram ChatBoosts.é    N)ÚSequence)ÚTYPE_CHECKINGÚFinal)Ú	constants)ÚChat)ÚTelegramObject)ÚUser)Úenum)Úde_json_optionalÚde_list_optionalÚparse_sequence_arg)Úextract_tzinfo_from_defaultsÚfrom_timestamp)ÚJSONDict)ÚBotc                   ó@   ‡ — e Zd ZdZdZddœdededz  ddfˆ fd„Zˆ xZS )	ÚChatBoostAddedaµ  
    This object represents a service message about a user boosting a chat.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal, if their
    :attr:`boost_count` are equal.

    .. versionadded:: 21.0

    Args:
        boost_count (:obj:`int`): Number of boosts added by the user.

    Attributes:
        boost_count (:obj:`int`): Number of boosts added by the user.

    )Úboost_countN©Ú
api_kwargsr   r   Úreturnc                óx   •— t         ‰| �  |¬«       || _        | j                  f| _        | j	                  «        y ©Nr   )ÚsuperÚ__init__r   Ú	_id_attrsÚ_freeze)Úselfr   r   Ú	__class__s      €úR/var/www/html/datingFans/myenv/lib/python3.12/site-packages/telegram/_chatboost.pyr   zChatBoostAdded.__init__:   s6   ø€ ô 	‰Ñ JÐÔ/Ø +ˆÔØ×*Ñ*Ð,ˆŒà�‰�ó    )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úintr   r   Ú__classcell__©r   s   @r    r   r   &   s>   ø„ ñð" !€Ið '+ò	
àð
ð ˜t‘Oð	
ð
 
÷
ñ 
r!   r   c                   ó  ‡ — e Zd ZU dZdZej                  j                  Zee	   e
d<   	 ej                  j                  Zee	   e
d<   	 ej                  j                  Zee	   e
d<   	 ddœde	d	edz  fˆ fd
„Zeddedddd fˆ fd„«       Zˆ xZS )ÚChatBoostSourcea|  
    Base class for Telegram ChatBoostSource objects. It can be one of:

    * :class:`telegram.ChatBoostSourcePremium`
    * :class:`telegram.ChatBoostSourceGiftCode`
    * :class:`telegram.ChatBoostSourceGiveaway`

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`source` is equal.

    .. versionadded:: 20.8

    Args:
        source (:obj:`str`): The source of the chat boost. Can be one of:
            :attr:`~telegram.ChatBoostSource.PREMIUM`, :attr:`~telegram.ChatBoostSource.GIFT_CODE`,
            or :attr:`~telegram.ChatBoostSource.GIVEAWAY`.

    Attributes:
        source (:obj:`str`): The source of the chat boost. Can be one of:
            :attr:`~telegram.ChatBoostSource.PREMIUM`, :attr:`~telegram.ChatBoostSource.GIFT_CODE`,
            or :attr:`~telegram.ChatBoostSource.GIVEAWAY`.
    )ÚsourceÚPREMIUMÚ	GIFT_CODEÚGIVEAWAYNr   r,   r   c                ó¾   •— t         ‰| �  |¬«       t        j                  t        j
                  ||«      | _        | j                  f| _        | j                  «        y r   )	r   r   r
   Ú
get_memberr   ÚChatBoostSourcesr,   r   r   )r   r,   r   r   s      €r    r   zChatBoostSource.__init__h   sE   ø€ Ü‰Ñ JÐÔ/ô  Ÿ?™?¬9×+EÑ+EÀvÈvÓVˆŒàŸ+™+˜ˆŒØ�‰�r!   ÚdataÚbotú
Bot | Noner   c                 óz  •— | j                  |«      }| j                  t        | j                  t        | j
                  t        i}| t        u r8|j                  d«      |v r%||j                  d«         j                  ||¬«      S d|v r#t        |j                  d«      t        |«      |d<   t        ‰| �)  ||¬«      S )ú,See :meth:`telegram.TelegramObject.de_json`.r,   ©r3   r4   Úuser)Ú_parse_datar-   ÚChatBoostSourcePremiumr.   ÚChatBoostSourceGiftCoder/   ÚChatBoostSourceGiveawayr+   ÚgetÚpopÚde_jsonr   r	   r   )Úclsr3   r4   Ú_class_mappingr   s       €r    r@   zChatBoostSource.de_jsonq   s­   ø€ ð �‰˜tÓ$ˆð �K‰KÔ/Ø�M‰MÔ2Ø�L‰LÔ1ð<
ˆð ”/Ñ! d§h¡h¨xÓ&8¸NÑ&JØ! $§(¡(¨8Ó"4Ñ5×=Ñ=À4ÈSÐ=ÓQÐQà�T‰>Ü+¨D¯H©H°VÓ,<¼dÀCÓHˆD�‰Lä‰w‰ D¨cˆÓ2Ð2r!   ©N)r"   r#   r$   r%   r&   r   r2   r-   r   ÚstrÚ__annotations__r.   r/   r   r   Úclassmethodr@   r(   r)   s   @r    r+   r+   G   sª   ø… ñð. €Ià#×4Ñ4×<Ñ<€GˆU�3‰ZÓ<Ø>Ø%×6Ñ6×@Ñ@€Iˆu�S‰zÓ@Ø@Ø$×5Ñ5×>Ñ>€Hˆe�C‰jÓ>Ø?àEIò ˜sð °8¸d±?õ ð ñ3˜8ð 3¨,ð 3ÐBSô 3ó ô3r!   r+   c                   ó<   ‡ — e Zd ZdZdZddœdededz  fˆ fd„Zˆ xZS )r;   a½  
    The boost was obtained by subscribing to Telegram Premium or by gifting a Telegram Premium
    subscription to another user.

    .. versionadded:: 20.8

    Args:
        user (:class:`telegram.User`): User that boosted the chat.

    Attributes:
        source (:obj:`str`): The source of the chat boost. Always
            :attr:`~telegram.ChatBoostSource.PREMIUM`.
        user (:class:`telegram.User`): User that boosted the chat.
    ©r9   Nr   r9   r   c                ó”   •— t         ‰| �  | j                  |¬«       | j                  «       5  || _        d d d «       y # 1 sw Y   y xY w©N)r,   r   )r   r   r-   Ú	_unfrozenr9   ©r   r9   r   r   s      €r    r   zChatBoostSourcePremium.__init__—   s?   ø€ Ü‰Ñ §¡¸ÐÔDà�^‰^Óñ 	#Ø"ˆDŒI÷	#÷ 	#ñ 	#úó	   ­>¾A©	r"   r#   r$   r%   r&   r	   r   r   r(   r)   s   @r    r;   r;   …   s.   ø„ ñð €IàDHò #˜Tð #°(¸T±/÷ #ñ #r!   r;   c                   ó<   ‡ — e Zd ZdZdZddœdededz  fˆ fd„Zˆ xZS )r<   a)  
    The boost was obtained by the creation of Telegram Premium gift codes to boost a chat. Each
    such code boosts the chat 4 times for the duration of the corresponding Telegram Premium
    subscription.

    .. versionadded:: 20.8

    Args:
        user (:class:`telegram.User`): User for which the gift code was created.

    Attributes:
        source (:obj:`str`): The source of the chat boost. Always
            :attr:`~telegram.ChatBoostSource.GIFT_CODE`.
        user (:class:`telegram.User`): User for which the gift code was created.
    rH   Nr   r9   r   c                ó”   •— t         ‰| �  | j                  |¬«       | j                  «       5  || _        d d d «       y # 1 sw Y   y xY wrJ   )r   r   r.   rK   r9   rL   s      €r    r   z ChatBoostSourceGiftCode.__init__±   s?   ø€ Ü‰Ñ §¡¸:ÐÔFà�^‰^Óñ 	#Ø"ˆDŒI÷	#÷ 	#ñ 	#úrM   rN   r)   s   @r    r<   r<   ž   s.   ø„ ñð  €IàDHò #˜Tð #°(¸T±/÷ #ñ #r!   r<   c                   ób   ‡ — e Zd ZdZdZ	 	 	 dddœdededz  dedz  dedz  d	edz  f
ˆ fd
„Z	ˆ xZ
S )r=   a
  
    The boost was obtained by the creation of a Telegram Premium giveaway or a Telegram Star.
    This boosts the chat 4 times for the duration of the corresponding Telegram Premium
    subscription for Telegram Premium giveaways and :attr:`prize_star_count` / 500 times for
    one year for Telegram Star giveaways.

    .. versionadded:: 20.8

    Args:
        giveaway_message_id (:obj:`int`): Identifier of a message in the chat with the giveaway;
            the message could have been deleted already. May be 0 if the message isn't sent yet.
        user (:class:`telegram.User`, optional): User that won the prize in the giveaway if any;
            for Telegram Premium giveaways only.
        prize_star_count (:obj:`int`, optional): The number of Telegram Stars to be split between
            giveaway winners; for Telegram Star giveaways only.

            .. versionadded:: 21.6
        is_unclaimed (:obj:`bool`, optional): :obj:`True`, if the giveaway was completed, but
            there was no user to win the prize.

    Attributes:
        source (:obj:`str`): Source of the boost. Always
            :attr:`~telegram.ChatBoostSource.GIVEAWAY`.
        giveaway_message_id (:obj:`int`): Identifier of a message in the chat with the giveaway;
            the message could have been deleted already. May be 0 if the message isn't sent yet.
        user (:class:`telegram.User`): Optional. User that won the prize in the giveaway if any.
        prize_star_count (:obj:`int`): Optional. The number of Telegram Stars to be split between
            giveaway winners; for Telegram Star giveaways only.

            .. versionadded:: 21.6
        is_unclaimed (:obj:`bool`): Optional. :obj:`True`, if the giveaway was completed, but
            there was no user to win the prize.
    )Úgiveaway_message_idÚis_unclaimedÚprize_star_countr9   Nr   rR   r9   rS   rT   r   c                ó¾   •— t         ‰| �  | j                  |¬«       | j                  «       5  || _        || _        || _        || _        d d d «       y # 1 sw Y   y xY wrJ   )r   r   r/   rK   rR   r9   rT   rS   )r   rR   r9   rS   rT   r   r   s         €r    r   z ChatBoostSourceGiveaway.__init__Ý   sY   ø€ ô 	‰Ñ §¡¸*ÐÔEà�^‰^Óñ 	:Ø,?ˆDÔ$Ø%)ˆDŒIØ0@ˆDÔ!Ø-9ˆDÔ÷		:÷ 	:ñ 	:ús   ­AÁA)NNN)r"   r#   r$   r%   r&   r'   r	   Úboolr   r   r(   r)   s   @r    r=   r=   ¸   sp   ø„ ñ ðD T€Ið
 !Ø$(Ø'+ð:ð '+ò:à ð:ð �T‰kð:ð ˜T‘kð	:ð
  ™*ð:ð ˜t‘O÷:ñ :r!   r=   c                   ó”   ‡ — e Zd ZdZdZddœdedej                  dej                  ded	e	dz  f
ˆ fd
„Z
edde	dddd fˆ fd„«       Zˆ xZS )Ú	ChatBoostaà  
    This object contains information about a chat boost.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`boost_id`, :attr:`add_date`, :attr:`expiration_date`,
    and :attr:`source` are equal.

    .. versionadded:: 20.8

    Args:
        boost_id (:obj:`str`): Unique identifier of the boost.
        add_date (:obj:`datetime.datetime`): Point in time when the chat was boosted.
        expiration_date (:obj:`datetime.datetime`): Point in time when the boost
            will automatically expire, unless the booster's Telegram Premium subscription is
            prolonged.
        source (:class:`telegram.ChatBoostSource`): Source of the added boost.

    Attributes:
        boost_id (:obj:`str`): Unique identifier of the boost.
        add_date (:obj:`datetime.datetime`): Point in time when the chat was boosted.
            |datetime_localization|
        expiration_date (:obj:`datetime.datetime`): Point in time when the boost
            will automatically expire, unless the booster's Telegram Premium subscription is
            prolonged. |datetime_localization|
        source (:class:`telegram.ChatBoostSource`): Source of the added boost.
    )Úadd_dateÚboost_idÚexpiration_dater,   Nr   rZ   rY   r[   r,   r   c                óä   •— t         ‰| �  |¬«       || _        || _        || _        || _        | j                  | j                  | j                  | j
                  f| _        | j                  «        y r   )r   r   rZ   rY   r[   r,   r   r   )r   rZ   rY   r[   r,   r   r   s         €r    r   zChatBoost.__init__  s]   ø€ ô 	‰Ñ JÐÔ/à%ˆŒØ&.ˆŒØ-<ˆÔØ'-ˆŒàŸ-™-¨¯©¸×8LÑ8LÈdÏkÉkÐZˆŒØ�‰�r!   r3   r4   r5   r   c                 ó   •— | j                  |«      }t        |j                  d«      t        |«      |d<   t	        |«      }t        |j                  d«      |¬«      |d<   t        |j                  d«      |¬«      |d<   t        ‰| �  ||¬«      S )r7   r,   rY   ©Útzinfor[   r8   )r:   r   r>   r+   r   r   r   r@   ©rA   r3   r4   Ú
loc_tzinfor   s       €r    r@   zChatBoost.de_json   s‚   ø€ ð �‰˜tÓ$ˆä)¨$¯(©(°8Ó*<¼oÈsÓSˆˆX‰Ü1°#Ó6ˆ
Ü)¨$¯(©(°:Ó*>ÀzÔRˆˆZÑÜ"0°·±Ð:KÓ1LÐU_Ô"`ˆÐÑä‰w‰ D¨cˆÓ2Ð2r!   rC   )r"   r#   r$   r%   r&   rD   ÚdtmÚdatetimer+   r   r   rF   r@   r(   r)   s   @r    rX   rX   ï   s   ø„ ñð6 F€Ið '+òàðð —,‘,ðð Ÿ™ð	ð
  ðð ˜t‘Oõð& ñ	3˜8ð 	3¨,ð 	3À+ô 	3ó ô	3r!   rX   c                   ód   ‡ — e Zd ZdZdZddœdedededz  fˆ fd„Ze	dd	ed
ddd fˆ fd„«       Z
ˆ xZS )ÚChatBoostUpdateda;  This object represents a boost added to a chat or changed.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`chat`, and :attr:`boost` are equal.

    .. versionadded:: 20.8

    Args:
        chat (:class:`telegram.Chat`): Chat which was boosted.
        boost (:class:`telegram.ChatBoost`): Information about the chat boost.

    Attributes:
        chat (:class:`telegram.Chat`): Chat which was boosted.
        boost (:class:`telegram.ChatBoost`): Information about the chat boost.
    )ÚboostÚchatNr   rg   rf   r   c                ó°   •— t         ‰| �  |¬«       || _        || _        | j                  j                  | j                  f| _        | j                  «        y r   )r   r   rg   rf   Úidr   r   )r   rg   rf   r   r   s       €r    r   zChatBoostUpdated.__init__@  sD   ø€ ô 	‰Ñ JÐÔ/àˆŒ	Ø %ˆŒ
àŸ)™)Ÿ,™,¨¯
©
Ð3ˆŒØ�‰�r!   r3   r4   r5   r   c                 óÔ   •— | j                  |«      }t        |j                  d«      t        |«      |d<   t        |j                  d«      t        |«      |d<   t
        ‰| �  ||¬«      S )r7   rg   rf   r8   )r:   r   r>   r   rX   r   r@   ©rA   r3   r4   r   s      €r    r@   zChatBoostUpdated.de_jsonO  s\   ø€ ð �‰˜tÓ$ˆä'¨¯©°Ó(8¼$ÀÓDˆˆV‰Ü(¨¯©°'Ó):¼IÀsÓKˆˆW‰ä‰w‰ D¨cˆÓ2Ð2r!   rC   )r"   r#   r$   r%   r&   r   rX   r   r   rF   r@   r(   r)   s   @r    re   re   -  sc   ø„ ñð  "€Ið '+òàðð ðð
 ˜t‘Oõð ñ3˜8ð 3¨,ð 3ÐBTô 3ó ô3r!   re   c                   ó€   ‡ — e Zd ZdZdZddœdededej                  de	d	e
dz  f
ˆ fd
„Zedde
dddd fˆ fd„«       Zˆ xZS )ÚChatBoostRemoveda£  
    This object represents a boost removed from a chat.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`chat`, :attr:`boost_id`, :attr:`remove_date`, and
    :attr:`source` are equal.

    Args:
        chat (:class:`telegram.Chat`): Chat which was boosted.
        boost_id (:obj:`str`): Unique identifier of the boost.
        remove_date (:obj:`datetime.datetime`): Point in time when the boost was removed.
        source (:class:`telegram.ChatBoostSource`): Source of the removed boost.

    Attributes:
        chat (:class:`telegram.Chat`): Chat which was boosted.
        boost_id (:obj:`str`): Unique identifier of the boost.
        remove_date (:obj:`datetime.datetime`): Point in time when the boost was removed.
            |datetime_localization|
        source (:class:`telegram.ChatBoostSource`): Source of the removed boost.
    )rZ   rg   Úremove_dater,   Nr   rg   rZ   rn   r,   r   c                óä   •— t         ‰| �  |¬«       || _        || _        || _        || _        | j                  | j                  | j                  | j
                  f| _        | j                  «        y r   )r   r   rg   rZ   rn   r,   r   r   )r   rg   rZ   rn   r,   r   r   s         €r    r   zChatBoostRemoved.__init__r  s]   ø€ ô 	‰Ñ JÐÔ/àˆŒ	Ø%ˆŒØ)4ˆÔØ'-ˆŒàŸ)™) T§]¡]°D×4DÑ4DÀdÇkÁkÐRˆŒØ�‰�r!   r3   r4   r5   r   c                 ó(  •— | j                  |«      }t        |j                  d«      t        |«      |d<   t        |j                  d«      t        |«      |d<   t        |«      }t        |j                  d«      |¬«      |d<   t        ‰| �!  ||¬«      S )r7   rg   r,   rn   r^   r8   )	r:   r   r>   r   r+   r   r   r   r@   r`   s       €r    r@   zChatBoostRemoved.de_json…  s€   ø€ ð �‰˜tÓ$ˆä'¨¯©°Ó(8¼$ÀÓDˆˆV‰Ü)¨$¯(©(°8Ó*<¼oÈsÓSˆˆX‰Ü1°#Ó6ˆ
Ü,¨T¯X©X°mÓ-DÈZÔXˆˆ]Ñä‰w‰ D¨cˆÓ2Ð2r!   rC   )r"   r#   r$   r%   r&   r   rD   rb   rc   r+   r   r   rF   r@   r(   r)   s   @r    rm   rm   Z  s{   ø„ ñð* >€Ið '+òàðð ðð —\‘\ð	ð
  ðð ˜t‘Oõð& ñ	3˜8ð 	3¨,ð 	3ÐBTô 	3ó ô	3r!   rm   c                   óf   ‡ — e Zd ZdZdZddœdee   dedz  fˆ fd„Ze	dded	d
dd fˆ fd„«       Z
ˆ xZS )ÚUserChatBoostsaë  This object represents a list of boosts added to a chat by a user.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`boosts` are equal.

    .. versionadded:: 20.8

    Args:
        boosts (Sequence[:class:`telegram.ChatBoost`]): List of boosts added to the chat by the
            user.

    Attributes:
        boosts (tuple[:class:`telegram.ChatBoost`]): List of boosts added to the chat by the user.
    )ÚboostsNr   rs   r   c                óŠ   •— t         ‰| �  |¬«       t        |«      | _        | j                  f| _        | j                  «        y r   )r   r   r   rs   r   r   )r   rs   r   r   s      €r    r   zUserChatBoosts.__init__¤  s7   ø€ ô 	‰Ñ JÐÔ/ä-?ÀÓ-GˆŒàŸ+™+˜ˆŒØ�‰�r!   r3   r4   r5   r   c                 óŽ   •— | j                  |«      }t        |j                  d«      t        |«      |d<   t        ‰| �  ||¬«      S )r7   rs   r8   )r:   r   r>   rX   r   r@   rk   s      €r    r@   zUserChatBoosts.de_json±  sA   ø€ ð �‰˜tÓ$ˆä)¨$¯(©(°8Ó*<¼iÈÓMˆˆX‰ä‰w‰ D¨cˆÓ2Ð2r!   rC   )r"   r#   r$   r%   r&   r   rX   r   r   rF   r@   r(   r)   s   @r    rr   rr   ’  s^   ø„ ñð €Ið '+ò	à˜Ñ#ðð ˜t‘Oõ	ð ñ3˜8ð 3¨,ð 3ÐBRô 3ó ô3r!   rr   )%r%   rc   rb   Úcollections.abcr   Útypingr   r   Útelegramr   Útelegram._chatr   Útelegram._telegramobjectr   Útelegram._userr	   Útelegram._utilsr
   Útelegram._utils.argumentparsingr   r   r   Útelegram._utils.datetimer   r   Útelegram._utils.typesr   r   r   r+   r;   r<   r=   rX   re   rm   rr   © r!   r    ú<module>r�      s§   ðñ& Kã Ý $ß 'å Ý Ý 3Ý Ý  ß bÑ bß QÝ *áÝô�^ô ôB;3�nô ;3ô|#˜_ô #ô2#˜oô #ô44:˜oô 4:ôn;3�ô ;3ô|*3�~ô *3ôZ53�~ô 53ôp&3�^õ &3r!   