
    gk                     X    S SK r S SKJrJrJr  \" SSS9r " S S\ R                  5      rg)    N)TypeTypeVarUnionTIntEnumIntEnum)boundc                      \ rS rSr\S 5       r\S 5       r\S\\   S\	S\4S j5       r
\S\\   S\S\	4S	 j5       r\S\\   S\\\	4   S\4S
 j5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       r\S 5       rSrg)r      c                     U R                  U5        [        R                  X5      nU R                  US 5      =(       d    U R	                  5        U 3Ul        Xl        U$ N)_check_valueint__new___extra_to_text_prefix_name__value_)clsvaluevals      A/home/matz/Project1/venv/lib/python3.13/site-packages/dns/enum.py	_missing_IntEnum._missing_   sP    kk#%''t4Q3;;=/%8Q

    c                     U R                  5       n[        U[        5      (       d  [        eUS:  d  X:  a   U R	                  5       n[        U SU 35      eg )Nr   z$ must be an int between >= 0 and <= )_maximum
isinstancer   	TypeError_short_name
ValueError)r   r   maxnames       r   r   IntEnum._check_value!   sR    lln%%%O19??$Dv%I#OPP $r   r   textreturnc                    UR                  5       n X   $ ! [         a     Of = fU R                  U5      nU(       a  U$ U R                  5       nUR	                  U5      (       ad  U[        U5      S  R                  5       (       aC  [        U[        U5      S  5      nU R                  U5         U " U5      $ ! [         a    Us $ f = fU R                  5       er   )upperKeyError_extra_from_textr   
startswithlenisdigitr   r   r    _unknown_exception_class)r   r$   r   prefixs       r   	from_textIntEnum.from_text*   s    zz|	9 		$$T*L??6""tCKM':'B'B'D'DS[]+,EU#5z! **,,s    
##0B8 8CCr   c                     U R                  U5         U " U5      R                  nU R                  X5      nUc  U R	                  5        U 3nU$ ! [         a    S n N8f = fr   )r   r"   r    r   r   )r   r   r$   s      r   to_textIntEnum.to_text>   sh    	u:??D !!%.<kkm_UG,D  	D	s   A AAc                     [        U[        5      (       a  U R                  U5      $ U R                  U5        U " U5      $ )am  Convert text or a value into an enumerated type, if possible.

*value*, the ``int`` or ``str`` to convert.

Raises a class-specific exception if a ``str`` is provided that
cannot be converted.

Raises ``ValueError`` if the value is out of range.

Returns an enumeration from the calling class corresponding to the
value, if one is defined, or an ``int`` otherwise.
)r   strr/   r   )r   r   s     r   makeIntEnum.makeJ   s8     eS!!==''5zr   c                     [         er   )NotImplementedErrorr   s    r   r   IntEnum._maximum^   s    !!r   c                 6    U R                   R                  5       $ r   )__name__lowerr:   s    r   r   IntEnum._short_nameb   s    ||!!##r   c                     g)N  r:   s    r   r   IntEnum._prefixf   s    r   c                     g r   rB   )r   r$   s     r   r)   IntEnum._extra_from_textj   s    r   c                     U$ r   rB   )r   r   current_texts      r   r   IntEnum._extra_to_textn   s    r   c                     [         $ r   )r    r:   s    r   r-    IntEnum._unknown_exception_classr   s    r   rB   N)r=   
__module____qualname____firstlineno__classmethodr   r   r   r   r5   r/   r   r2   r   r6   r   r   r   r)   r   r-   __static_attributes__rB   r   r   r   r      s1     Q Q -tH~ -S -X - -& 	T(^ 	C 	C 	 	 $x. sCx X  & " " $ $        r   )enumtypingr   r   r   r   r   rB   r   r   <module>rR      s.   $  ' ':Y/\dll \r   