§
    ¦eîiÐi  ã                   óz  — d Z ddl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 dd
lmZ ddlmZmZmZ ddlmZ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%dS )z;This module contains the Telegram Business related classes.é    N)ÚSequence)ÚTYPE_CHECKING)ÚZoneInfo)ÚChat)ÚLocation)ÚSticker)ÚTelegramObject)ÚUser)Úde_json_optionalÚde_list_optionalÚparse_sequence_arg)Úextract_tzinfo_from_defaultsÚfrom_timestampÚget_zone_info)ÚJSONDict)ÚBotc            !       óâ   ‡ — e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 	 dddœded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  ded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  dedz  fˆ fd„Zˆ xZS )ÚBusinessBotRightsaW  
    This object represents the rights of a business bot.

    Objects of this class are comparable in terms of equality.
    Two objects of this class are considered equal, if all their attributes are equal.

    .. versionadded:: 22.1

    Args:
        can_reply (:obj:`bool`, optional): True, if the bot can send and edit messages in the
            private chats that had incoming messages in the last 24 hours.
        can_read_messages (:obj:`bool`, optional): True, if the bot can mark incoming private
            messages as read.
        can_delete_sent_messages (:obj:`bool`, optional): True, if the bot can delete messages
            sent by the bot.
        can_delete_all_messages (:obj:`bool`, optional): True, if the bot can delete all private
            messages in managed chats.
        can_edit_name (:obj:`bool`, optional): True, if the bot can edit the first and last name
            of the business account.
        can_edit_bio (:obj:`bool`, optional): True, if the bot can edit the bio of the
            business account.
        can_edit_profile_photo (:obj:`bool`, optional): True, if the bot can edit the profile
            photo of the business account.
        can_edit_username (:obj:`bool`, optional): True, if the bot can edit the username of the
            business account.
        can_change_gift_settings (:obj:`bool`, optional): True, if the bot can change the privacy
            settings pertaining to gifts for the business account.
        can_view_gifts_and_stars (:obj:`bool`, optional): True, if the bot can view gifts and the
            amount of Telegram Stars owned by the business account.
        can_convert_gifts_to_stars (:obj:`bool`, optional): True, if the bot can convert regular
            gifts owned by the business account to Telegram Stars.
        can_transfer_and_upgrade_gifts (:obj:`bool`, optional): True, if the bot can transfer and
            upgrade gifts owned by the business account.
        can_transfer_stars (:obj:`bool`, optional): True, if the bot can transfer Telegram Stars
            received by the business account to its own account, or use them to upgrade and
            transfer gifts.
        can_manage_stories (:obj:`bool`, optional): True, if the bot can post, edit and delete
            stories on behalf of the business account.

    Attributes:
        can_reply (:obj:`bool`): Optional. True, if the bot can send and edit messages in the
            private chats that had incoming messages in the last 24 hours.
        can_read_messages (:obj:`bool`): Optional. True, if the bot can mark incoming private
            messages as read.
        can_delete_sent_messages (:obj:`bool`): Optional. True, if the bot can delete messages
            sent by the bot.
        can_delete_all_messages (:obj:`bool`): Optional. True, if the bot can delete all private
            messages in managed chats.
        can_edit_name (:obj:`bool`): Optional. True, if the bot can edit the first and last name
            of the business account.
        can_edit_bio (:obj:`bool`): Optional. True, if the bot can edit the bio of the
            business account.
        can_edit_profile_photo (:obj:`bool`): Optional. True, if the bot can edit the profile
            photo of the business account.
        can_edit_username (:obj:`bool`): Optional. True, if the bot can edit the username of the
            business account.
        can_change_gift_settings (:obj:`bool`): Optional. True, if the bot can change the privacy
            settings pertaining to gifts for the business account.
        can_view_gifts_and_stars (:obj:`bool`): Optional. True, if the bot can view gifts and the
            amount of Telegram Stars owned by the business account.
        can_convert_gifts_to_stars (:obj:`bool`): Optional. True, if the bot can convert regular
            gifts owned by the business account to Telegram Stars.
        can_transfer_and_upgrade_gifts (:obj:`bool`): Optional. True, if the bot can transfer and
            upgrade gifts owned by the business account.
        can_transfer_stars (:obj:`bool`): Optional. True, if the bot can transfer Telegram Stars
            received by the business account to its own account, or use them to upgrade and
            transfer gifts.
        can_manage_stories (:obj:`bool`): Optional. True, if the bot can post, edit and delete
            stories on behalf of the business account.
    )Úcan_change_gift_settingsÚcan_convert_gifts_to_starsÚcan_delete_all_messagesÚcan_delete_sent_messagesÚcan_edit_bioÚcan_edit_nameÚcan_edit_profile_photoÚcan_edit_usernameÚcan_manage_storiesÚcan_read_messagesÚ	can_replyÚcan_transfer_and_upgrade_giftsÚcan_transfer_starsÚcan_view_gifts_and_starsN©Ú
api_kwargsr   r   r   r   r   r   r   r   r   r"   r   r    r!   r   r$   c                óî  •— t          ¦   «                              |¬¦  «         || _        || _        || _        || _        || _        || _        || _        || _	        |	| _
        |
| _        || _        || _        || _        || _        | j        | j        | j        | j        | j        | j        | j        | j	        | j
        | j        | j        | j        | j        | j        f| _        |                      ¦   «          d S ©Nr#   )ÚsuperÚ__init__r   r   r   r   r   r   r   r   r   r"   r   r    r!   r   Ú	_id_attrsÚ_freeze)Úselfr   r   r   r   r   r   r   r   r   r"   r   r    r!   r   r$   Ú	__class__s                   €úV/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/_business.pyr(   zBusinessBotRights.__init__‰   s   ø€ õ& 	‰Œ×Ò JÐÑ/Ô/Ð/Ø&/ˆŒØ.?ˆÔØ5MˆÔ%Ø4KˆÔ$Ø*7ˆÔØ)5ˆÔØ3IˆÔ#Ø.?ˆÔØ5MˆÔ%Ø5MˆÔ%Ø7QˆÔ'Ø;YˆÔ+Ø/AˆÔØ/AˆÔð ŒNØÔ"ØÔ)ØÔ(ØÔØÔØÔ'ØÔ"ØÔ)ØÔ)ØÔ+ØÔ/ØÔ#ØÔ#ð
ˆŒð" 	�Š‰Œˆˆˆó    )NNNNNNNNNNNNNN)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úboolr   r(   Ú__classcell__©r,   s   @r-   r   r   0   sa  ø€ € € € € ðEð EðN€Ið& "&Ø)-Ø04Ø/3Ø%)Ø$(Ø.2Ø)-Ø04Ø04Ø26Ø6:Ø*.Ø*.ð4ð" '+ð#4ð 4ð 4à˜$‘;ð4ð   $™;ð4ð #'¨¡+ð	4ð
 "&¨¡ð4ð ˜d‘{ð4ð ˜T‘kð4ð !% t¡ð4ð   $™;ð4ð #'¨¡+ð4ð #'¨¡+ð4ð %)¨4¡Kð4ð )-¨t©ð4ð ! 4™Kð4ð ! 4™Kð4ð" ˜t‘Oð#4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4ð 4r.   r   c                   óŽ   ‡ — e Zd ZdZdZ	 dddœdeddded	ej        d
e	de
dz  dedz  fˆ fd„Zeddedddd fˆ fd„¦   «         Zˆ xZS )ÚBusinessConnectionaÈ  
    Describes the connection of the bot with a business account.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal if their :attr:`id`, :attr:`user`, :attr:`user_chat_id`, :attr:`date`,
    :attr:`rights`, and :attr:`is_enabled` are equal.

    .. versionadded:: 21.1
    .. versionchanged:: 22.1
        Equality comparison now considers :attr:`rights` instead of ``can_reply``.

    .. versionremoved:: 22.3
       Removed argument and attribute ``can_reply`` deprecated  by API 9.0.

    Args:
        id (:obj:`str`): Unique identifier of the business connection.
        user (:class:`telegram.User`): Business account user that created the business connection.
        user_chat_id (:obj:`int`): Identifier of a private chat with the user who created the
            business connection.
        date (:obj:`datetime.datetime`): Date the connection was established in Unix time.
        is_enabled (:obj:`bool`): True, if the connection is active.
        rights (:class:`BusinessBotRights`, optional): Rights of the business bot.

            .. versionadded:: 22.1

    Attributes:
        id (:obj:`str`): Unique identifier of the business connection.
        user (:class:`telegram.User`): Business account user that created the business connection.
        user_chat_id (:obj:`int`): Identifier of a private chat with the user who created the
            business connection.
        date (:obj:`datetime.datetime`): Date the connection was established in Unix time.
        is_enabled (:obj:`bool`): True, if the connection is active.
        rights (:class:`BusinessBotRights`): Optional. Rights of the business bot.

            .. versionadded:: 22.1
    )ÚdateÚidÚ
is_enabledÚrightsÚuserÚuser_chat_idNr#   r:   r=   r
   r>   r9   r;   r<   r$   c                ó  •— t          ¦   «                              |¬¦  «         || _        || _        || _        || _        || _        || _        | j        | j        | j        | j        | j        | j        f| _        |  	                    ¦   «          d S r&   )
r'   r(   r:   r=   r>   r9   r;   r<   r)   r*   )	r+   r:   r=   r>   r9   r;   r<   r$   r,   s	           €r-   r(   zBusinessConnection.__init__ï   sˆ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/ØˆŒØˆŒ	Ø!-ˆÔØ"&ˆŒ	Ø *ˆŒØ06ˆŒð ŒGØŒIØÔØŒIØŒKØŒOð
ˆŒð 	�Š‰Œˆˆˆr.   ÚdataÚbotú
Bot | NoneÚreturnc                 ó�  •— |                       |¦  «        }t          |¦  «        }t          |                     d¦  «        |¬¦  «        |d<   t	          |                     d¦  «        t
          |¦  «        |d<   t	          |                     d¦  «        t          |¦  «        |d<   t          ¦   «                              ||¬¦  «        S )ú,See :meth:`telegram.TelegramObject.de_json`.r9   ©Útzinfor=   r<   ©r@   rA   )	Ú_parse_datar   r   Úgetr   r
   r   r'   Úde_json)Úclsr@   rA   Ú
loc_tzinfor,   s       €r-   rK   zBusinessConnection.de_json  s¥   ø€ ð �Š˜tÑ$Ô$ˆõ 2°#Ñ6Ô6ˆ
å% d§h¢h¨vÑ&6Ô&6¸zÐJÑJÔJˆˆV‰Ý'¨¯ª°Ñ(8Ô(8½$ÀÑDÔDˆˆV‰Ý)¨$¯(ª(°8Ñ*<Ô*<Õ>OÐQTÑUÔUˆˆX‰å‰wŒw�Š D¨cˆÑ2Ô2Ð2r.   ©N)r/   r0   r1   r2   r3   ÚstrÚintÚdtmÚdatetimer4   r   r   r(   ÚclassmethodrK   r5   r6   s   @r-   r8   r8   À   sü   ø€ € € € € ð#ð #ðJ€Ið  ,0ðð '+ðð ð àðð ðð ð	ð
 Œlðð ðð " DÑ(ðð ˜t‘Oðð ð ð ð ð ð< ð3ð 3˜8ð 3¨,ð 3ÐBVð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r.   r8   c            
       óz   ‡ — e Zd ZdZdZddœdede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 )ÚBusinessMessagesDeleteda€  
    This object is received when messages are deleted from a connected business account.

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

    .. versionadded:: 21.1

    Args:
        business_connection_id (:obj:`str`): Unique identifier of the business connection.
        chat (:class:`telegram.Chat`): Information about a chat in the business account. The bot
            may not have access to the chat or the corresponding user.
        message_ids (Sequence[:obj:`int`]): A list of identifiers of the deleted messages in the
            chat of the business account.

    Attributes:
        business_connection_id (:obj:`str`): Unique identifier of the business connection.
        chat (:class:`telegram.Chat`): Information about a chat in the business account. The bot
            may not have access to the chat or the corresponding user.
        message_ids (tuple[:obj:`int`]): A list of identifiers of the deleted messages in the
            chat of the business account.
    )Úbusiness_connection_idÚchatÚmessage_idsNr#   rV   rW   rX   r$   c                óê   •— t          ¦   «                              |¬¦  «         || _        || _        t	          |¦  «        | _        | j        | j        | j        f| _        |                      ¦   «          d S r&   )r'   r(   rV   rW   r   rX   r)   r*   )r+   rV   rW   rX   r$   r,   s        €r-   r(   z BusinessMessagesDeleted.__init__;  sn   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø+AˆÔ#ØˆŒ	Ý,>¸{Ñ,KÔ,KˆÔð Ô'ØŒIØÔð
ˆŒð 	�Š‰Œˆˆˆr.   r@   rA   rB   rC   c                 óÌ   •— |                       |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t	          ¦   «                              ||¬¦  «        S )rE   rW   rH   )rI   r   rJ   r   r'   rK   ©rL   r@   rA   r,   s      €r-   rK   zBusinessMessagesDeleted.de_jsonP  sQ   ø€ ð �Š˜tÑ$Ô$ˆå'¨¯ª°Ñ(8Ô(8½$ÀÑDÔDˆˆV‰å‰wŒw�Š D¨cˆÑ2Ô2Ð2r.   rN   )r/   r0   r1   r2   r3   rO   r   r   rP   r   r(   rS   rK   r5   r6   s   @r-   rU   rU     sÐ   ø€ € € € € ðð ð0€Ið '+ðð ð à #ðð ðð ˜c”]ð	ð ˜t‘Oðð ð ð ð ð ð* ð3ð 3˜8ð 3¨,ð 3ÐB[ð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r.   rU   c                   óˆ   ‡ — e Zd ZdZdZ	 	 	 dddœdedz  dedz  dedz  dedz  fˆ fd	„Ze	dd
edddd fˆ fd„¦   «         Z
ˆ xZS )ÚBusinessIntroa3  
    This object contains information about the start page settings 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
    :attr:`title`, :attr:`message` and :attr:`sticker` are equal.

    .. versionadded:: 21.1

    Args:
        title (:obj:`str`, optional): Title text of the business intro.
        message (:obj:`str`, optional): Message text of the business intro.
        sticker (:class:`telegram.Sticker`, optional): Sticker of the business intro.

    Attributes:
        title (:obj:`str`): Optional. Title text of the business intro.
        message (:obj:`str`): Optional. Message text of the business intro.
        sticker (:class:`telegram.Sticker`): Optional. Sticker of the business intro.
    )ÚmessageÚstickerÚtitleNr#   r`   r^   r_   r$   c                óÐ   •— t          ¦   «                              |¬¦  «         || _        || _        || _        | j        | j        | j        f| _        |                      ¦   «          d S r&   )r'   r(   r`   r^   r_   r)   r*   )r+   r`   r^   r_   r$   r,   s        €r-   r(   zBusinessIntro.__init__u  sZ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø!&ˆŒ
Ø#*ˆŒØ'.ˆŒàœ* d¤l°D´LÐAˆŒà�Š‰Œˆˆˆr.   r@   rA   rB   rC   c                 óÌ   •— |                       |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t	          ¦   «                              ||¬¦  «        S )rE   r_   rH   )rI   r   rJ   r   r'   rK   r[   s      €r-   rK   zBusinessIntro.de_json†  sQ   ø€ ð �Š˜tÑ$Ô$ˆå*¨4¯8ª8°IÑ+>Ô+>ÅÈÑMÔMˆˆY‰å‰wŒw�Š D¨cˆÑ2Ô2Ð2r.   )NNNrN   )r/   r0   r1   r2   r3   rO   r   r   r(   rS   rK   r5   r6   s   @r-   r]   r]   Z  sç   ø€ € € € € ðð ð(€Ið !Ø"Ø"&ð	ð '+ðð ð à�T‰zðð �t‘ðð ˜4‘ð	ð ˜t‘Oðð ð ð ð ð ð" ð3ð 3˜8ð 3¨,ð 3À/ð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r.   r]   c            	       ón   ‡ — e Zd ZdZdZ	 dddœdedddedz  fˆ fd	„Zedd
edddd fˆ fd„¦   «         Z	ˆ xZ
S )ÚBusinessLocationaD  
    This object contains information about the location 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
    :attr:`address` is equal.

    .. versionadded:: 21.1

    Args:
        address (:obj:`str`): Address of the business.
        location (:class:`telegram.Location`, optional): Location of the business.

    Attributes:
        address (:obj:`str`): Address of the business.
        location (:class:`telegram.Location`): Optional. Location of the business.
    )ÚaddressÚlocationNr#   re   rf   zLocation | Noner$   c                óª   •— t          ¦   «                              |¬¦  «         || _        || _        | j        f| _        |                      ¦   «          d S r&   )r'   r(   re   rf   r)   r*   )r+   re   rf   r$   r,   s       €r-   r(   zBusinessLocation.__init__¨  sJ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø#ˆŒØ)1ˆŒàœ,˜ˆŒà�Š‰Œˆˆˆr.   r@   rA   rB   rC   c                 óÌ   •— |                       |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t	          ¦   «                              ||¬¦  «        S )rE   rf   rH   )rI   r   rJ   r   r'   rK   r[   s      €r-   rK   zBusinessLocation.de_json·  sR   ø€ ð �Š˜tÑ$Ô$ˆå+¨D¯HªH°ZÑ,@Ô,@Å(ÈCÑPÔPˆˆZÑå‰wŒw�Š D¨cˆÑ2Ô2Ð2r.   rN   )r/   r0   r1   r2   r3   rO   r   r(   rS   rK   r5   r6   s   @r-   rd   rd   �  sÌ   ø€ € € € € ðð ð$€Ið '+ðð
 '+ðð ð àðð $ðð
 ˜t‘Oðð ð ð ð ð ð ð3ð 3˜8ð 3¨,ð 3ÐBTð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r.   rd   c                   ó¾   ‡ — e Zd ZdZdZddœdedededz  fˆ fd„Zd	ed
eeeef         fd„Z	e
d
eeeef         fd„¦   «         Ze
d
eeeef         fd„¦   «         Zˆ xZS )ÚBusinessOpeningHoursIntervala|  
    This object describes an interval of time during which a business is open.

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

    .. versionadded:: 21.1

    Examples:
        A day has (24 * 60 =) 1440 minutes, a week has (7 * 1440 =) 10080 minutes.
        Starting the minute's sequence from Monday, example values of
        :attr:`opening_minute`, :attr:`closing_minute` will map to the following day times:

        * Monday - 8am to 8:30pm:
            - ``opening_minute = 480`` :guilabel:`8 * 60`
            - ``closing_minute = 1230`` :guilabel:`20 * 60 + 30`
        * Tuesday - 24 hours:
            - ``opening_minute = 1440`` :guilabel:`24 * 60`
            - ``closing_minute = 2879`` :guilabel:`2 * 24 * 60 - 1`
        * Sunday - 12am - 11:58pm:
            - ``opening_minute = 8640`` :guilabel:`6 * 24 * 60`
            - ``closing_minute = 10078`` :guilabel:`7 * 24 * 60 - 2`

    Args:
        opening_minute (:obj:`int`): The minute's sequence number in a week, starting on Monday,
            marking the start of the time interval during which the business is open;
            0 - 7 * 24 * 60.
        closing_minute (:obj:`int`): The minute's
            sequence number in a week, starting on Monday, marking the end of the time interval
            during which the business is open; 0 - 8 * 24 * 60

    Attributes:
        opening_minute (:obj:`int`): The minute's sequence number in a week, starting on Monday,
            marking the start of the time interval during which the business is open;
            0 - 7 * 24 * 60.
        closing_minute (:obj:`int`): The minute's
            sequence number in a week, starting on Monday, marking the end of the time interval
            during which the business is open; 0 - 8 * 24 * 60
    )Ú_closing_timeÚ_opening_timeÚclosing_minuteÚopening_minuteNr#   rn   rm   r$   c                óÒ   •— t          ¦   «                              |¬¦  «         || _        || _        d | _        d | _        | j        | j        f| _        |                      ¦   «          d S r&   )r'   r(   rn   rm   rl   rk   r)   r*   )r+   rn   rm   r$   r,   s       €r-   r(   z%BusinessOpeningHoursInterval.__init__í  sc   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø#1ˆÔØ#1ˆÔà:>ˆÔØ:>ˆÔàÔ-¨tÔ/BÐCˆŒà�Š‰Œˆˆˆr.   ÚminuterC   c                 ó*   — |dz  |dz  dz  |dz  dz  fS )Né   é<   © )r+   rp   s     r-   Ú_parse_minutez*BusinessOpeningHoursInterval._parse_minuteÿ  s%   € Ø˜$‘ ¨¡°Ñ 3°V¸d±]ÀRÑ5GÐHÐHr.   c                 ó\   — | j         €|                      | j        ¦  «        | _         | j         S )aW  Convenience attribute. A :obj:`tuple` parsed from :attr:`opening_minute`. It contains
        the `weekday`, `hour` and `minute` in the same ranges as :attr:`datetime.datetime.weekday`,
        :attr:`datetime.datetime.hour` and :attr:`datetime.datetime.minute`

        Returns:
            tuple[:obj:`int`, :obj:`int`, :obj:`int`]:
        )rl   ru   rn   ©r+   s    r-   Úopening_timez)BusinessOpeningHoursInterval.opening_time  ó/   € ð ÔÐ%Ø!%×!3Ò!3°DÔ4GÑ!HÔ!HˆDÔØÔ!Ð!r.   c                 ó\   — | j         €|                      | j        ¦  «        | _         | j         S )aW  Convenience attribute. A :obj:`tuple` parsed from :attr:`closing_minute`. It contains
        the `weekday`, `hour` and `minute` in the same ranges as :attr:`datetime.datetime.weekday`,
        :attr:`datetime.datetime.hour` and :attr:`datetime.datetime.minute`

        Returns:
            tuple[:obj:`int`, :obj:`int`, :obj:`int`]:
        )rk   ru   rm   rw   s    r-   Úclosing_timez)BusinessOpeningHoursInterval.closing_time  ry   r.   )r/   r0   r1   r2   r3   rP   r   r(   Útupleru   Úpropertyrx   r{   r5   r6   s   @r-   rj   rj   Á  s  ø€ € € € € ð'ð 'ðR W€Ið '+ðð ð àðð ðð
 ˜t‘Oðð ð ð ð ð ð$I Cð I¨E°#°s¸C°-Ô,@ð Ið Ið Ið Ið ð
"˜e C¨¨c MÔ2ð 
"ð 
"ð 
"ñ „Xð
"ð ð
"˜e C¨¨c MÔ2ð 
"ð 
"ð 
"ñ „Xð
"ð 
"ð 
"ð 
"ð 
"r.   rj   c            
       ó  ‡ — e Zd ZdZdZddœdedee         dedz  fˆ fd„Z	e
d	efd
„¦   «         Z	 ddej        dej        ez  dz  d	eeej        ej        f         df         fd„Zdej        d	efd„Zeddeddd	d fˆ fd„¦   «         Zˆ xZS )ÚBusinessOpeningHoursaS  
    This object describes the opening hours of a business.

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

    .. versionadded:: 21.1

    Args:
        time_zone_name (:obj:`str`): Unique name of the time zone for which the opening
            hours are defined.
        opening_hours (Sequence[:class:`telegram.BusinessOpeningHoursInterval`]): List of
            time intervals describing business opening hours.

    Attributes:
        time_zone_name (:obj:`str`): Unique name of the time zone for which the opening
            hours are defined.
        opening_hours (Sequence[:class:`telegram.BusinessOpeningHoursInterval`]): List of
            time intervals describing business opening hours.
    )Ú_cached_zone_infoÚopening_hoursÚtime_zone_nameNr#   r‚   r�   r$   c                óÞ   •— t          ¦   «                              |¬¦  «         || _        t          |¦  «        | _        d | _        | j        | j        f| _        |                      ¦   «          d S r&   )r'   r(   r‚   r   r�   r€   r)   r*   )r+   r‚   r�   r$   r,   s       €r-   r(   zBusinessOpeningHours.__init__6  sl   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/Ø#1ˆÔÝEWØñF
ô F
ˆÔð 37ˆÔàÔ-¨tÔ/AÐBˆŒà�Š‰Œˆˆˆr.   rC   c                 óP   — | j         €t          | j        ¦  «        | _         | j         S rN   )r€   r   r‚   rw   s    r-   Ú
_zone_infozBusinessOpeningHours._zone_infoI  s'   € àÔ!Ð)Ý%2°4Ô3FÑ%GÔ%GˆDÔ"ØÔ%Ð%r.   r9   Ú	time_zone.c           	      óz  — |                      ¦   «         }g }t          |t          ¦  «        rt          |¦  «        }n|€| j        }n|}| j        D ]Î}|j        }|j        }|d         |k    rŒt          j	        |j
        |j        |j        |d         |d         | j        ¬¦  «                             |¦  «        }	t          j	        |j
        |j        |j        |d         |d         | j        ¬¦  «                             |¦  «        }
|                     |	|
f¦  «         ŒÏt          t!          |d„ ¬¦  «        ¦  «        S )añ  Returns the opening hours intervals for a specific day as datetime objects.

        .. versionadded:: 22.5

        Args:
            date (:obj:`datetime.date`): The date to get opening hours for.
            time_zone (:obj:`datetime.tzinfo` | :obj:`str`, optional): Timezone to use for the
                returned datetime objects. If not specified, then :attr:`time_zone_name` be used.

        Returns:
            tuple[tuple[:obj:`datetime.datetime`, :obj:`datetime.datetime`], ...]:
            A tuple of datetime pairs representing opening and closing times for the specified day.
            Each pair consists of ``(opening_time, closing_time)``.
            Returns an empty tuple if there are no opening hours for the given day.
        Nr   é   é   )ÚyearÚmonthÚdayÚhourrp   rG   c                 ó   — | d         S )Nr   rt   )Úxs    r-   ú<lambda>z@BusinessOpeningHours.get_opening_hours_for_day.<locals>.<lambda>‹  s
   € ¨q°¬t€ r.   )Úkey)ÚweekdayÚ
isinstancerO   r   r…   r�   rx   r{   rQ   rR   rŠ   r‹   rŒ   Ú
astimezoneÚappendr|   Úsorted)r+   r9   r†   Úweek_dayÚresÚ	tz_targetÚintervalÚint_openÚ	int_closeÚresult_int_openÚresult_int_closes              r-   Úget_opening_hours_for_dayz.BusinessOpeningHours.get_opening_hours_for_dayO  sS  € ð& —<’<‘>”>ˆØˆÝ�i¥Ñ%Ô%ð 	"Ý$1°)Ñ$<Ô$<ˆIˆIØÐØœˆIˆIà!ˆIàÔ*ð 	<ð 	<ˆHØÔ,ˆHØ Ô-ˆIà˜Œ{˜hÒ&Ð&Øõ "œlØ”YØ”jØ”HØ˜a”[Ø ”{Ø”ðñ ô ÷ Šj˜Ñ#Ô#ð õ  #œ|Ø”YØ”jØ”HØ˜q”\Ø  ”|Ø”ð ñ  ô  ÷ Šj˜Ñ#Ô#ð ð �JŠJ˜Ð)9Ð:Ñ;Ô;Ð;Ð;õ •V˜C ^ ^Ð4Ñ4Ô4Ñ5Ô5Ð5r.   rR   c                 ó   — |j         €|                     | j        ¬¦  «        n|                     | j        ¦  «        }|                     ¦   «         dz  |j        dz  z   |j        z   }| j        D ]}|j        |cxk    r|j	        k     rn Œ dS Œ dS )a²  Check if the business is open at the specified datetime.

        .. versionadded:: 22.5

        Args:
            datetime (:obj:`datetime.datetime`): The datetime to check.
                If the object is timezone-naive, it is assumed to be in the
                timezone specified by :attr:`time_zone_name`.

        Returns:
            :obj:`bool`: True if the business is open at the specified time, False otherwise.
        NrF   rr   rs   TF)
rG   Úreplacer…   r”   r’   r�   rp   r�   rn   rm   )r+   rR   Údatetime_in_native_tzÚminute_of_weekrš   s        r-   Úis_openzBusinessOpeningHours.is_open�  sÂ   € ð 9A¼Ð8OˆH×Ò D¤OÐÑ4Ô4Ð4ÐU]ß
Š*�T”_Ñ
%Ô
%ð 	ð "×)Ò)Ñ+Ô+¨dÑ2Ø#Ô(¨2Ñ-ñ.à#Ô*ñ+ð 	ð Ô*ð 	ð 	ˆHØÔ&¨.ÐRÐRÒRÐR¸8Ô;RÒRÐRÐRÐRÐRØ�t�tð Sð ˆur.   r@   rA   rB   c                 óÌ   •— |                       |¦  «        }t          |                     d¦  «        t          |¦  «        |d<   t	          ¦   «                              ||¬¦  «        S )rE   r�   rH   )rI   r   rJ   rj   r'   rK   r[   s      €r-   rK   zBusinessOpeningHours.de_jsonª  sZ   ø€ ð �Š˜tÑ$Ô$ˆå 0Ø�HŠH�_Ñ%Ô%Õ'CÀSñ!
ô !
ˆˆ_Ñõ ‰wŒw�Š D¨cˆÑ2Ô2Ð2r.   rN   )r/   r0   r1   r2   r3   rO   r   rj   r   r(   r}   r   r…   rQ   r9   rG   r|   rR   rŸ   r4   r¤   rS   rK   r5   r6   s   @r-   r   r     ss  ø€ € € € € ðð ð, I€Ið '+ðð ð àðð  Ð <Ô=ðð
 ˜t‘Oðð ð ð ð ð ð& ð&˜Hð &ð &ð &ñ „Xð&ð DHð<6ð <6Ø”Hð<6Ø),¬°cÑ)9¸DÑ)@ð<6à	ˆu�S”\ 3¤<Ð/Ô0°#Ð5Ô	6ð<6ð <6ð <6ð <6ð| ¤ð °ð ð ð ð ð: ð3ð 3˜8ð 3¨,ð 3ÐBXð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r.   r   )&r2   rR   rQ   Úcollections.abcr   Útypingr   Úzoneinfor   Útelegram._chatr   Útelegram._files.locationr   Útelegram._files.stickerr   Útelegram._telegramobjectr	   Útelegram._userr
   Útelegram._utils.argumentparsingr   r   r   Útelegram._utils.datetimer   r   r   Útelegram._utils.typesr   Útelegramr   r   r8   rU   r]   rd   rj   r   rt   r.   r-   ú<module>r²      s”  ðð( BÐ Aà Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ø  Ð  Ð  Ð  Ð  Ð  Ø Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ø -Ð -Ð -Ð -Ð -Ð -Ø +Ð +Ð +Ð +Ð +Ð +Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð
 +Ð *Ð *Ð *Ð *Ð *àð ØÐÐÐÐÐðMð Mð Mð Mð M˜ñ Mô Mð Mð`Y3ð Y3ð Y3ð Y3ð Y3˜ñ Y3ô Y3ð Y3ðx;3ð ;3ð ;3ð ;3ð ;3˜nñ ;3ô ;3ð ;3ð|33ð 33ð 33ð 33ð 33�Nñ 33ô 33ð 33ðl.3ð .3ð .3ð .3ð .3�~ñ .3ô .3ð .3ðbY"ð Y"ð Y"ð Y"ð Y" >ñ Y"ô Y"ð Y"ðxV3ð V3ð V3ð V3ð V3˜>ñ V3ô V3ð V3ð V3ð V3r.   