
    Yi                        S r SSKJr  SSKJrJrJr  SSKJr  SSK	J
r
  SSKJr  SSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ r   SSK!J"r"J#r#J$r$  SSK%J&r&  \\
\\\\4   r' " S S\5      r( " S S\5      r) " S S\)5      r* " S S\)5      r+ " S S\(5      r, " S S\(5      r- " S S \(5      r. " S! S"\(5      r/ " S# S$\(5      r0g%)&z+Base class for Telegram InputMedia Objects.    )Sequence)FinalOptionalUnion)	constants)	Animation)Audio)Document)	InputFile)	PhotoSize)Video)MessageEntity)TelegramObject)enum)parse_sequence_arg)DEFAULT_NONEparse_file_input)	FileInputJSONDictODVInput)InputMediaTypec                      ^  \ rS rSrSrSrSS\4SS.S\S\\\	\
4   S\\   S	\\\      S
\\   S\\   4U 4S jjjjr\S\\   S\\\\	4      4S j5       rSrU =r$ )
InputMedia*   a  
Base class for Telegram InputMedia Objects.

.. versionchanged:: 20.0
    Added arguments and attributes :attr:`type`, :attr:`media`, :attr:`caption`,
        :attr:`caption_entities`, :paramref:`parse_mode`.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

Args:
    media_type (:obj:`str`): Type of media that the instance represents.
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Animation` |  :class:`telegram.Audio` |             :class:`telegram.Document` | :class:`telegram.PhotoSize` |             :class:`telegram.Video`): File to send.
        |fileinputnopath|
        Lastly you can pass an existing telegram media object of the corresponding type
        to send.
    caption (:obj:`str`, optional): Caption of the media to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
        parsing.
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|

    parse_mode (:obj:`str`, optional): |parse_mode|

Attributes:
    type (:obj:`str`): Type of the input media.
    media (:obj:`str` | :class:`telegram.InputFile`): Media to send.
    caption (:obj:`str`): Optional. Caption of the media to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after entities
        parsing.
    parse_mode (:obj:`str`): Optional. |parse_mode|
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|

)captioncaption_entitiesmedia
parse_modetypeN
api_kwargs
media_typer   r   r   r   r"   c                   > [         TU ]  US9  [        R                  " [        R
                  X5      U l        X l        X0l        [        U5      U l
        XPl        U R                  5         g Nr!   )super__init__r   
get_memberr   r   r    r   r   r   r   r   _freeze)selfr#   r   r   r   r   r"   	__class__s          E/app/.venv/lib/python3.13/site-packages/telegram/_files/inputmedia.pyr'   InputMedia.__init__Y   sS     	J/)A)A:Z	Z_
&-;MN^;_)3    	thumbnailreturnc                 "    U b  [        U SSS9$ U $ )NTattach
local_moder   )r/   s    r,   _parse_thumbnail_input!InputMedia._parse_thumbnail_inputl   s'     $ YtE	
 	
r.   )__name__
__module____qualname____firstlineno____doc__	__slots__r   strr   r   	MediaTyper   r   r   r   r   r'   staticmethodr   r5   __static_attributes____classcell__r+   s   @r,   r   r   *   s    *X OI "&>B$0 *. S)Y./ #	
 #8M#:; SM X& & 
(9*= 
(5QTV_Q_K`Ba 
 
r.   r   c            	          ^  \ rS rSr% Sr\R                  R                  r\\	   \
S'    \R                  R                  r\\	   \
S'    SrSS.S\	S	\\	\\\4   S
\\   4U 4S jjjrSrU =r$ )InputPaidMediaw   a  
Base class for Telegram InputPaidMedia Objects. Currently, it can be one of:

* :class:`telegram.InputMediaPhoto`
* :class:`telegram.InputMediaVideo`

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

.. versionadded:: 21.4

Args:
    type (:obj:`str`): Type of media that the instance represents.
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.PhotoSize` | :class:`telegram.Video`): File
        to send. |fileinputnopath|
        Lastly you can pass an existing telegram media object of the corresponding type
        to send.

Attributes:
    type (:obj:`str`): Type of the input media.
    media (:obj:`str` | :class:`telegram.InputFile`): Media to send.
PHOTOVIDEO)r   r    Nr!   r    r   r"   c                   > [         TU ]  US9  [        R                  " [        R
                  X5      U l        X l        U R                  5         g r%   )	r&   r'   r   r(   r   InputPaidMediaTyper    r   r)   )r*   r    r   r"   r+   s       r,   r'   InputPaidMedia.__init__   s;     	J/)E)EtR	>C
r.   )r7   r8   r9   r:   r;   r   rI   rF   r   r=   __annotations__rG   r<   r   r   r   r   r   r   r'   r@   rA   rB   s   @r,   rD   rD   w   s    . "44::E5::>!44::E5::>!I *. S)Y56
 X& r.   rD   c                   T   ^  \ rS rSrSrSrSS.S\\\4   S\	\
   4U 4S jjjrSrU =r$ )	InputPaidMediaPhoto   aj  The paid media to send is a photo.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

.. versionadded:: 21.4

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.PhotoSize`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.PhotoSize` object to send.

Attributes:
    type (:obj:`str`): Type of the media, always
        :tg-const:`telegram.constants.InputPaidMediaType.PHOTO`.
    media (:obj:`str` | :class:`telegram.InputFile`): Photo to send.
 Nr!   r   r"   c                ~   > [        U[        SSS9n[        TU ]  [        R
                  XS9  U R                  5         g NTr2   )r    r   r"   )r   r   r&   r'   rD   rF   r)   )r*   r   r"   r+   s      r,   r'   InputPaidMediaPhoto.__init__   s6     !	$4Pn22%Wr.   )r7   r8   r9   r:   r;   r<   r   r   r   r   r   r'   r@   rA   rB   s   @r,   rM   rM      s?    " I *.	Y	)* X&	 r.   rM   c                      ^  \ rS rSrSrSr     SSS.S\\\4   S\	\   S\	\
   S	\	\
   S
\	\
   S\	\   S\	\   4U 4S jjjjrSrU =r$ )InputPaidMediaVideo   a  
The paid media to send is a video.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

.. versionadded:: 21.4

Note:
    *  When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the
       width, height and duration from that video, unless otherwise specified with the optional
       arguments.
    *  :paramref:`thumbnail` will be ignored for small video files, for which Telegram can
       easily generate thumbnails. However, this behaviour is undocumented and might be
       changed by Telegram.

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Video`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.Video` object to send.
    thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|
    width (:obj:`int`, optional): Video width.
    height (:obj:`int`, optional): Video height.
    duration (:obj:`int`, optional): Video duration in seconds.
    supports_streaming (:obj:`bool`, optional): Pass :obj:`True`, if the uploaded video is
        suitable for streaming.

Attributes:
    type (:obj:`str`): Type of the media, always
        :tg-const:`telegram.constants.InputPaidMediaType.VIDEO`.
    media (:obj:`str` | :class:`telegram.InputFile`): Video to send.
    thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|
    width (:obj:`int`): Optional. Video width.
    height (:obj:`int`): Optional. Video height.
    duration (:obj:`int`): Optional. Video duration in seconds.
    supports_streaming (:obj:`bool`): Optional. :obj:`True`, if the uploaded video is
        suitable for streaming.
)durationheightsupports_streamingr/   widthNr!   r   r/   rY   rW   rV   rX   r"   c                  > [        U[        5      (       a@  Ub  UOUR                  nUb  UOUR                  nUb  UOUR                  nUR
                  nO[        USSS9n[        TU ]!  [        R                  XS9  U R                  5          [        R                  U5      U l        X0l        X@l        XPl        X`l        S S S 5        g ! , (       d  f       g = frQ   )
isinstancer   rY   rW   rV   file_idr   r&   r'   rD   rG   	_unfrozenr   r5   r/   rX   )	r*   r   r/   rY   rW   rV   rX   r"   r+   s	           r,   r'   InputPaidMediaVideo.__init__   s     eU##".EEKKE%1Vu||F#+#7xU^^HMME %U4DIEn22%W^^>H>_>_?DN ).J)/K+3M6H# s   3C


C)NNNNN)r7   r8   r9   r:   r;   r<   r   r   r   r   intboolr   r'   r@   rA   rB   s   @r,   rT   rT      s    %N SI
 *.# $"&-1I *.IY%&I I&I }	I
 I 3-I %TNI X&I Ir.   rT   c                      ^  \ rS rSrSrSrS\SSSSSSSS4
SS.S\\\	4   S\
\   S\\   S	\
\   S
\
\   S\
\   S\
\\      S\
\   S\
\   S\
\   S\
\   S\
\   4U 4S jjjjrSrU =r$ )InputMediaAnimationi  a  Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.

Note:
    When using a :class:`telegram.Animation` for the :attr:`media` attribute, it will take the
    width, height and duration from that animation, unless otherwise specified with the
    optional arguments.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

.. versionchanged:: 20.5
  |removed_thumb_note|

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Animation`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.Animation` object to send.

        .. versionchanged:: 13.2
           Accept :obj:`bytes` as input.
    filename (:obj:`str`, optional): Custom file name for the animation, when uploading a
        new file. Convenience parameter, useful e.g. when sending files generated by the
        :obj:`tempfile` module.

        .. versionadded:: 13.1
    caption (:obj:`str`, optional): Caption of the animation to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`, optional): |parse_mode|
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|

    width (:obj:`int`, optional): Animation width.
    height (:obj:`int`, optional): Animation height.
    duration (:obj:`int`, optional): Animation duration in seconds.
    has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the animation needs to be covered
        with a spoiler animation.

        .. versionadded:: 20.0
    thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

        .. versionadded:: 20.2
    show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

        .. versionadded:: 21.3

Attributes:
    type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.ANIMATION`.
    media (:obj:`str` | :class:`telegram.InputFile`): Animation to send.
    caption (:obj:`str`): Optional. Caption of the animation to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`): Optional. The parse mode to use for text formatting.
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    width (:obj:`int`): Optional. Animation width.
    height (:obj:`int`): Optional. Animation height.
    duration (:obj:`int`): Optional. Animation duration in seconds.
    has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the animation is covered with a
        spoiler animation.

        .. versionadded:: 20.0
    thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

        .. versionadded:: 20.2
    show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

        .. versionadded:: 21.3
)rV   has_spoilerrW   show_caption_above_mediar/   rY   Nr!   r   r   r   rY   rW   rV   r   filenamerc   r/   rd   r"   c          	        > [        U[        5      (       a@  Uc  UR                  OUnUc  UR                  OUnUc  UR                  OUnUR
                  nO[        XSSS9n[        TU ]!  [        R                  UUUUUS9  U R                  5          U R                  U
5      U l        X@l        XPl        X`l        Xl        Xl        S S S 5        g ! , (       d  f       g = fNT)re   r3   r4   r!   )r[   r   rY   rW   rV   r\   r   r&   r'   r   	ANIMATIONr]   r5   r/   rc   rd   )r*   r   r   r   rY   rW   rV   r   re   rc   r/   rd   r"   r+   s                r,   r'   InputMediaAnimation.__init__c  s      eY''#(=EKKeE%+^U\\F)1)9u~~xHMME %UdW[\E$$! 	 	
 ^^>B>Y>Y?DN ).J)/K+3M/:<T) s   5C
C)r7   r8   r9   r:   r;   r<   r   r   r   r   r   r=   r   r_   r   r   r`   r   r'   r@   rA   rB   s   @r,   rb   rb     s   JXI "&$0# $"&>B"&&*)-37*U *.*UY	)**U #*U SM	*U
 }*U *U 3-*U #8M#:;*U 3-*U d^*U I&*U #+4.*U X&*U *Ur.   rb   c                      ^  \ rS rSrSrSrS\SSSS4SS.S\\\	4   S\
\   S\\   S	\
\\      S
\
\   S\
\   S\
\   S\
\   4U 4S jjjjrSrU =r$ )InputMediaPhotoi  a  Represents a photo to be sent.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.PhotoSize`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.PhotoSize` object to send.

        .. versionchanged:: 13.2
           Accept :obj:`bytes` as input.
    filename (:obj:`str`, optional): Custom file name for the photo, when uploading a
        new file. Convenience parameter, useful e.g. when sending files generated by the
        :obj:`tempfile` module.

        .. versionadded:: 13.1
    caption (:obj:`str`, optional ): Caption of the photo to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
        entities parsing.
    parse_mode (:obj:`str`, optional): |parse_mode|
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|
    has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the photo needs to be covered
        with a spoiler animation.

        .. versionadded:: 20.0
    show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

        .. versionadded:: 21.3

Attributes:
    type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.PHOTO`.
    media (:obj:`str` | :class:`telegram.InputFile`): Photo to send.
    caption (:obj:`str`): Optional. Caption of the photo to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`): Optional. |parse_mode|
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the photo is covered with a
        spoiler animation.

        .. versionadded:: 20.0
    show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

        .. versionadded:: 21.3
)rc   rd   Nr!   r   r   r   r   re   rc   rd   r"   c          	         > [        U[        USSS9n[        T	U ]  [        R
                  UUUUUS9  U R                  5          X`l        Xpl        S S S 5        g ! , (       d  f       g = frg   )	r   r   r&   r'   r   rF   r]   rc   rd   )
r*   r   r   r   r   re   rc   rd   r"   r+   s
            r,   r'   InputMediaPhoto.__init__  sf     !	HT^bc  ! 	 	
 ^^/:<T) s   A
A')r7   r8   r9   r:   r;   r<   r   r   r   r   r   r=   r   r   r   r`   r   r'   r@   rA   rB   s   @r,   rk   rk     s    4lI "&$0>B"&&*37U *.UY	)*U #U SM	U
 #8M#:;U 3-U d^U #+4.U X&U Ur.   rk   c                      ^  \ rS rSrSrSrSSSSS\SSSSS4SS.S\\\	4   S\
\   S\
\   S	\
\   S
\
\   S\
\   S\\   S\
\\      S\
\   S\
\   S\
\   S\
\   S\
\   4U 4S jjjjrSrU =r$ )InputMediaVideoi  a  Represents a video to be sent.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

Note:
    *  When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the
       width, height and duration from that video, unless otherwise specified with the optional
       arguments.
    *  :paramref:`thumbnail` will be ignored for small video files, for which Telegram can
        easily generate thumbnails. However, this behaviour is undocumented and might be
        changed by Telegram.

.. versionchanged:: 20.5
  |removed_thumb_note|

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Video`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.Video` object to send.

        .. versionchanged:: 13.2
           Accept :obj:`bytes` as input.
    filename (:obj:`str`, optional): Custom file name for the video, when uploading a
        new file. Convenience parameter, useful e.g. when sending files generated by the
        :obj:`tempfile` module.

        .. versionadded:: 13.1
    caption (:obj:`str`, optional): Caption of the video to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
        entities parsing.
    parse_mode (:obj:`str`, optional): |parse_mode|
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|

    width (:obj:`int`, optional): Video width.
    height (:obj:`int`, optional): Video height.
    duration (:obj:`int`, optional): Video duration in seconds.
    supports_streaming (:obj:`bool`, optional): Pass :obj:`True`, if the uploaded video is
        suitable for streaming.
    has_spoiler (:obj:`bool`, optional): Pass :obj:`True`, if the video needs to be covered
        with a spoiler animation.

        .. versionadded:: 20.0
    thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

        .. versionadded:: 20.2
    show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|

        .. versionadded:: 21.3

Attributes:
    type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.VIDEO`.
    media (:obj:`str` | :class:`telegram.InputFile`): Video file to send.
    caption (:obj:`str`): Optional. Caption of the video to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`): Optional. |parse_mode|
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    width (:obj:`int`): Optional. Video width.
    height (:obj:`int`): Optional. Video height.
    duration (:obj:`int`): Optional. Video duration in seconds.
    supports_streaming (:obj:`bool`): Optional. :obj:`True`, if the uploaded video is
        suitable for streaming.
    has_spoiler (:obj:`bool`): Optional. :obj:`True`, if the video is covered with a
        spoiler animation.

        .. versionadded:: 20.0
    thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

        .. versionadded:: 20.2
    show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|

        .. versionadded:: 21.3
)rV   rc   rW   rd   rX   r/   rY   Nr!   r   r   rY   rW   rV   rX   r   r   re   rc   r/   rd   r"   c          	        > [        U[        5      (       a@  Ub  UOUR                  nUb  UOUR                  nUb  UOUR                  nUR
                  nO[        XSSS9n[        TU ]!  [        R                  UUUUUS9  U R                  5          X0l        X@l        XPl        U R                  U5      U l        X`l        Xl        Xl        S S S 5        g ! , (       d  f       g = frg   )r[   r   rY   rW   rV   r\   r   r&   r'   r   rG   r]   r5   r/   rX   rc   rd   )r*   r   r   rY   rW   rV   rX   r   r   re   rc   r/   rd   r"   r+   s                 r,   r'   InputMediaVideo.__init__G  s    " eU##".EEKKE%1Vu||F#+#7xU^^HMME %UdW[\E  ! 	 	
 ^^(-J)/K+3M>B>Y>Y?DN 7I#/:<T) s   ;C
C$)r7   r8   r9   r:   r;   r<   r   r   r   r   r   r=   r_   r`   r   r   r   r   r'   r@   rA   rB   s   @r,   ro   ro     s   QfI "&# $"&-1$0>B"&&*)-37,U *.,UY%&,U #,U }	,U
 ,U 3-,U %TN,U SM,U #8M#:;,U 3-,U d^,U I&,U #+4.,U X&,U ,Ur.   ro   c                      ^  \ rS rSrSrSrS\SSSSSS4SS.S\\\	4   S\
\   S\\   S	\
\   S
\
\   S\
\   S\
\\      S\
\   S\
\   S\
\   4U 4S jjjjrSrU =r$ )InputMediaAudioiv  a  Represents an audio file to be treated as music to be sent.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

Note:
    When using a :class:`telegram.Audio` for the :attr:`media` attribute, it will take the
    duration, performer and title from that video, unless otherwise specified with the
    optional arguments.

.. versionchanged:: 20.5
  |removed_thumb_note|

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes` |             :class:`pathlib.Path` | :class:`telegram.Audio`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.Audio` object to send.

        .. versionchanged:: 13.2
           Accept :obj:`bytes` as input.
    filename (:obj:`str`, optional): Custom file name for the audio, when uploading a
        new file. Convenience parameter, useful e.g. when sending files generated by the
        :obj:`tempfile` module.

        .. versionadded:: 13.1
    caption (:obj:`str`, optional): Caption of the audio to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
        entities parsing.
    parse_mode (:obj:`str`, optional): |parse_mode|
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|

    duration (:obj:`int`, optional): Duration of the audio in seconds as defined by the sender.
    performer (:obj:`str`, optional): Performer of the audio as defined by the sender or by
        audio tags.
    title (:obj:`str`, optional): Title of the audio as defined by the sender or by audio tags.
    thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

        .. versionadded:: 20.2

Attributes:
    type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.AUDIO`.
    media (:obj:`str` | :class:`telegram.InputFile`): Audio file to send.
    caption (:obj:`str`): Optional. Caption of the audio to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`): Optional. |parse_mode|
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    duration (:obj:`int`): Optional. Duration of the audio in seconds.
    performer (:obj:`str`): Optional. Performer of the audio as defined by the sender or by
        audio tags.
    title (:obj:`str`): Optional. Title of the audio as defined by the sender or by audio tags.
    thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

        .. versionadded:: 20.2

)rV   	performerr/   titleNr!   r   r   r   rV   rt   ru   r   re   r/   r"   c
          	        > [        U[        5      (       a@  Uc  UR                  OUnUc  UR                  OUnUc  UR                  OUnUR
                  nO[        XSSS9n[        TU ]!  [        R                  UUUUU
S9  U R                  5          U R                  U	5      U l        X@l        X`l        XPl        S S S 5        g ! , (       d  f       g = frg   )r[   r	   rV   rt   ru   r\   r   r&   r'   r   AUDIOr]   r5   r/   )r*   r   r   r   rV   rt   ru   r   re   r/   r"   r+   s              r,   r'   InputMediaAudio.__init__  s     eU##)1)9u~~xH+4+<)I#(=EKKeEMME %UdW[\E  ! 	 	
 ^^>B>Y>Y?DN ,4M(-J,5N s   )C
C)r7   r8   r9   r:   r;   r<   r   r   r   r	   r   r=   r   r_   r   r   r   r'   r@   rA   rB   s   @r,   rs   rs   v  s    ?B @I
 "&$0"&#'#>B"&)-&6 *.&6Y%&&6 #&6 SM	&6
 3-&6 C=&6 }&6 #8M#:;&6 3-&6 I&&6 X&&6 &6r.   rs   c                      ^  \ rS rSrSrSrS\SSSS4SS.S\\\	4   S\
\   S\\   S	\
\   S
\
\\      S\
\   S\
\   S\
\   4U 4S jjjjrSrU =r$ )InputMediaDocumenti  a	  Represents a general file to be sent.

.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`

.. versionchanged:: 20.5
  |removed_thumb_note|

Args:
    media (:obj:`str` | :term:`file object` | :class:`~telegram.InputFile` | :obj:`bytes`             | :class:`pathlib.Path` | :class:`telegram.Document`): File to send. |fileinputnopath|
        Lastly you can pass an existing :class:`telegram.Document` object to send.

        .. versionchanged:: 13.2
           Accept :obj:`bytes` as input.
    filename (:obj:`str`, optional): Custom file name for the document, when uploading a
        new file. Convenience parameter, useful e.g. when sending files generated by the
        :obj:`tempfile` module.

        .. versionadded:: 13.1
    caption (:obj:`str`, optional): Caption of the document to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters after
        entities parsing.
    parse_mode (:obj:`str`, optional): |parse_mode|
    caption_entities (Sequence[:class:`telegram.MessageEntity`], optional): |caption_entities|

        .. versionchanged:: 20.0
            |sequenceclassargs|

    disable_content_type_detection (:obj:`bool`, optional): Disables automatic server-side
        content type detection for files uploaded using multipart/form-data. Always
        :obj:`True`, if the document is sent as part of an album.
    thumbnail (:term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | :obj:`str`,                 optional): |thumbdocstringnopath|

        .. versionadded:: 20.2

Attributes:
    type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.DOCUMENT`.
    media (:obj:`str` | :class:`telegram.InputFile`): File to send.
    caption (:obj:`str`): Optional. Caption of the document to be sent,
        0-:tg-const:`telegram.constants.MessageLimit.CAPTION_LENGTH` characters
        after entities parsing.
    parse_mode (:obj:`str`): Optional. |parse_mode|
    caption_entities (tuple[:class:`telegram.MessageEntity`]): Optional. |captionentitiesattr|

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    disable_content_type_detection (:obj:`bool`): Optional. Disables automatic server-side
        content type detection for files uploaded using multipart/form-data. Always
        :obj:`True`, if the document is sent as part of an album.
    thumbnail (:class:`telegram.InputFile`): Optional. |thumbdocstringbase|

        .. versionadded:: 20.2
)disable_content_type_detectionr/   Nr!   r   r   r   r{   r   re   r/   r"   c          	         > [        U[        USSS9n[        T	U ]  [        R
                  UUUUUS9  U R                  5          U R                  U5      U l        X@l	        S S S 5        g ! , (       d  f       g = frg   )
r   r
   r&   r'   r   DOCUMENTr]   r5   r/   r{   )
r*   r   r   r   r{   r   re   r/   r"   r+   s
            r,   r'   InputMediaDocument.__init__  sy     !8D]ab##! 	 	
 ^^>B>Y>Y?DN Ca/	 s   A))
A7)r7   r8   r9   r:   r;   r<   r   r   r   r
   r   r=   r   r`   r   r   r   r'   r@   rA   rB   s   @r,   rz   rz     s    7r @I
 "&$09=>B"&)-a *.aY()a #a SM	a
 )1a #8M#:;a 3-a I&a X&a ar.   rz   N)1r;   collections.abcr   typingr   r   r   telegramr   telegram._files.animationr   telegram._files.audior	   telegram._files.documentr
   telegram._files.inputfiler   telegram._files.photosizer   telegram._files.videor   telegram._messageentityr   telegram._telegramobjectr   telegram._utilsr   telegram._utils.argumentparsingr   telegram._utils.defaultvaluer   telegram._utils.filesr   telegram._utils.typesr   r   r   telegram.constantsr   r>   r   rD   rM   rT   rb   rk   ro   rs   rz   rO   r.   r,   <module>r      s   & 2 $ ) )  / ' - / / ' 1 3   > 5 2 ? ? -)UHi>?	J
 J
Z*^ *Z. >GI. GIT@U* @UFVUj VUrJUj JUZj6j j6ZXa Xar.   