
    Yi                        S r SSKrSSKrSSKJrJr  \" S5      r\" S5      r\" S\R                  S9r
S\\
   S	\S
\S\\
\\4   4S jr " S S\\R                  5      r " S S\R                  5      r " S S\\R                  5      rg)a  This module contains helper functions related to enums.

Warning:
    Contents of this module are intended to be used internally by the library and *not* by the
    user. Changes to this module are not considered breaking changes and may not be documented in
    the changelog.
    N)TypeVarUnion_A_B_Enum)boundenum_clsvaluedefaultreturnc                 8     U " U5      $ ! [          a    Us $ f = f)zTries to call ``enum_cls(value)`` to convert the value into an enumeration member.
If that fails, the ``default`` is returned.
)
ValueError)r	   r
   r   s      ?/app/.venv/lib/python3.13/site-packages/telegram/_utils/enum.py
get_memberr   #   s%     s   
 c                   8    \ rS rSrSrSrS\4S jrS\4S jrSr	g)
StringEnum0   z{Helper class for string enums where ``str(member)`` prints the value, but ``repr(member)``
gives ``EnumName.MEMBER_NAME``.
 r   c                 P    SU R                   R                   SU R                   S3$ N<.>	__class____name__nameselfs    r   __repr__StringEnum.__repr__7   &    4>>**+1TYYKq99    c                 ,    [         R                  U 5      $ N)str__str__r   s    r   r'   StringEnum.__str__:   s    {{4  r#   N
r   
__module____qualname____firstlineno____doc__	__slots__r&   r    r'   __static_attributes__r   r#   r   r   r   0   s&     I:# :! !r#   r   c                   ^    \ rS rSrSrSrS\4S jr\R                  S:  a
  S\4S jr
SrgSrg)	IntEnum?   zxHelper class for int enums where ``str(member)`` prints the value, but ``repr(member)``
gives ``EnumName.MEMBER_NAME``.
r   r   c                 P    SU R                   R                   SU R                   S3$ r   r   r   s    r   r    IntEnum.__repr__F   r"   r#   )      c                 ,    [        U R                  5      $ r%   r&   r
   r   s    r   r'   IntEnum.__str__K   s    tzz?"r#   N)r   r*   r+   r,   r-   r.   r&   r    sysversion_infor'   r/   r   r#   r   r1   r1   ?   s;     I:# : '!	#S 	# "r#   r1   c                   8    \ rS rSrSrSrS\4S jrS\4S jrSr	g)	FloatEnumO   zzHelper class for float enums where ``str(member)`` prints the value, but ``repr(member)``
gives ``EnumName.MEMBER_NAME``.
r   r   c                 P    SU R                   R                   SU R                   S3$ r   r   r   s    r   r    FloatEnum.__repr__V   r"   r#   c                 ,    [        U R                  5      $ r%   r8   r   s    r   r'   FloatEnum.__str__Y   s    4::r#   Nr)   r   r#   r   r=   r=   O   s&     I:# : r#   r=   )r-   enum_enumr:   typingr   r   r   r   Enumr   typer   r&   r   r1   floatr=   r   r#   r   <module>rI      s   &  
 !T]T]uzz*e R " ubRT}AU !ejj !#emm # uzz r#   