Ë
    ­Œjmn  ã                   ó~  — d Z ddlZddlZddlZddlZddlmZ dej                  dd cxk  rdk  r
n nddlmZ	 n(ej                  dd dk\  r	 ddlmZ	 nddlmZ  ee«      Z	ej                  dd dk\  ZerddlZd	Zd	Zd	Zd	Zd
ZerJddlmZmZmZmZmZmZmZmZmZ ddlmZmZ ej                  dd dk\  rddlm Z  ee ejB                  fZ"n6efZ"n2ddlmZm#Z#mZmZm$Z$mZm%Z%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„ Z*d„ Z+d„ Z,d„ Z-d„ Z.d„ Z/	 ej`                  Z1d„ Z3ehZ4 e5ed«      re4jm                  ej>                  «       d„ Z7d„ Z8d„ Z9d„ Z:d „ Z;d!„ Z<d"„ Z=d#„ Z>d$„ Z?d%„ Z@d8d&„ZAd'„ ZBd(„ ZCd)„ ZDd*„ ZEd+„ ZFd,„ ZGd-„ ZHd.„ ZId9d/„ZJd9d0„ZKd9d1„ZLd9d2„ZMd3„ ZNd4„ ZOd5„ ZPd6„ ZQd7„ ZRy# e
$ r
 ddlmZ	 Y �ŒQw xY w# e
$ r  ee«      Z'd
Zd	ZY ŒÝw xY w# e
$ r 	 ddlm)Z) n# e
$ r d
ZY nw xY wY Œöw xY w# e
$ r 	 ddlmZ n# e
$ r d
ZY nw xY wY �Œw xY w# e
$ r 	 ddlmZ n# e
$ r d
ZY nw xY wY �Œ*w xY w# e2$ r dZ1Y �Œw xY w):z¢Defines experimental API for runtime inspection of types defined
in the standard "typing" module.

Example usage::
    from typing_inspect import is_generic_type
é    N)Ú_TypedDictMeta)é   é   r   r   )r   é	   é   )Ú	TypedDict)r   é   r   TF)	ÚGenericÚCallableÚUnionÚTypeVarÚClassVarÚTupleÚ_GenericAliasÚ
ForwardRefÚNewType)ÚFinalÚLiteral)r   r   r   )Ú_SpecialGenericAlias)r   ÚCallableMetar   r   Ú	TupleMetar   ÚGenericMetaÚ_ForwardRef)Ú_UnionÚ	_ClassVar)Ú_Final)r   )r   c                 ó¤   — t        | t        «      sJ ‚t        | d«      r| j                  S | j                  �| j                  } | j                  �Œ| S )z@This function exists for compatibility with old typing versions.Ú_gorg)Ú
isinstancer   Úhasattrr   Ú
__origin__©Úclss    úX/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/typing_inspect.pyr   r   \   sJ   € ä�cœ;Ô'Ð'Ð'Üˆs�GÔØ�y‰yÐØ
�.‰.Ð
$Ø�n‰nˆð �.‰.Ñ
$à€Jó    c                 ó8  — t         rlt        | t        «      xr t        | t        «      xsH t        | t
        «      xr6 | j                  t        t        t        t        j                  j                  fvS t        | t        «      xr t        | t        t        f«       S )aË  Test if the given type is a generic type. This includes Generic itself, but
    excludes special typing constructs such as Union, Tuple, Callable, ClassVar.
    Examples::

        is_generic_type(int) == False
        is_generic_type(Union[int, str]) == False
        is_generic_type(Union[int, T]) == False
        is_generic_type(ClassVar[List[int]]) == False
        is_generic_type(Callable[..., T]) == False

        is_generic_type(Generic) == True
        is_generic_type(Generic[T]) == True
        is_generic_type(Iterable[int]) == True
        is_generic_type(Mapping) == True
        is_generic_type(MutableMapping[T, List[int]]) == True
        is_generic_type(Sequence[Union[str, bytes]]) == True
    )Ú
NEW_TYPINGr   ÚtypeÚ
issubclassr
   ÚtypingGenericAliasr!   r   Útupler   ÚcollectionsÚabcr   r   r   r   ©Útps    r$   Úis_generic_typer0   f   sƒ   € õ$ Ü˜2œtÓ$Ò@¬°B¼Ó)@ò XÜ˜2Ô1Ó2ò XØ—‘¤e¬U´H¼k¿o¹o×>VÑ>VÐ%WÐWð	Yô �rœ;Ó'ò 6Ü�rœL¬)Ð4Ó5ð-6ð 7r%   c                 óH  — t         rŒ| t        u xs‚ t        | t        «      xr& | j                  t
        j                  j                  u xsH t        | t        «      xr6 t        | t        «      xr$ t        | t
        j                  j                  «      S t        | «      t        u S )a˜  Test if the type is a generic callable type, including subclasses
    excluding non-generic types and callables.
    Examples::

        is_callable_type(int) == False
        is_callable_type(type) == False
        is_callable_type(Callable) == True
        is_callable_type(Callable[..., int]) == True
        is_callable_type(Callable[[int, int], Iterable[str]]) == True
        class MyClass(Callable[[int], int]):
            ...
        is_callable_type(MyClass) == True

    For more general tests use callable(), for more precise test
    (excluding subclasses) use::

        get_origin(tp) is collections.abc.Callable  # Callable prior to Python 3.7
    )r'   r   r   r*   r!   r,   r-   r(   r)   r
   r   r.   s    r$   Úis_callable_typer2   €   s„   € õ& Ø”h�ò 9¤*¨RÔ1CÓ"Dò #:Ø—‘¤§¡×!9Ñ!9Ð9ò9ä˜2œtÓ$ò 9¬°B¼Ó)@ò 9Ü˜2œ{Ÿ™×7Ñ7Ó8ð	:ô �‹8”|Ð#Ð#r%   c                 óø   — t         rd| t        u xsZ t        | t        «      xr | j                  t
        u xs4 t        | t        «      xr" t        | t        «      xr t        | t
        «      S t        | «      t        u S )a   Test if the type is a generic tuple type, including subclasses excluding
    non-generic classes.
    Examples::

        is_tuple_type(int) == False
        is_tuple_type(tuple) == False
        is_tuple_type(Tuple) == True
        is_tuple_type(Tuple[str, int]) == True
        class MyClass(Tuple[str, int]):
            ...
        is_tuple_type(MyClass) == True

    For more general tests use issubclass(..., tuple), for more precise test
    (excluding subclasses) use::

        get_origin(tp) is tuple  # Tuple prior to Python 3.7
    )
r'   r   r   r*   r!   r+   r(   r)   r
   r   r.   s    r$   Úis_tuple_typer4   ›   sp   € õ$ Ø”e�ò &œz¨"Ô.@ÓAò  'Ø—‘¤Ð&ò&ä˜2œtÓ$ò &¬°B¼Ó)@ò &Ü˜2œuÓ%ð	'ô �‹8”yÐ Ð r%   c                 óp   — | t        d«      u ryt        | «      rt        d„ t        | d¬«      D «       «      S y)a  Test if the type is type(None), or is a direct union with it, such as Optional[T].

    NOTE: this method inspects nested `Union` arguments but not `TypeVar` definition
    bounds and constraints. So it will return `False` if
     - `tp` is a `TypeVar` bound, or constrained to, an optional type
     - `tp` is a `Union` to a `TypeVar` bound or constrained to an optional type,
     - `tp` refers to a *nested* `Union` containing an optional type or one of the above.

    Users wishing to check for optionality in types relying on type variables might wish
    to use this method in combination with `get_constraints` and `get_bound`
    NTc              3   ó2   K  — | ]  }t        |«      –— Œ y ­w©N)Úis_optional_type)Ú.0Útts     r$   Ú	<genexpr>z#is_optional_type.<locals>.<genexpr>Å   s   è ø€ ÐNÑ2M¨BÔ# B×'Ñ2Mùs   ‚)ÚevaluateF)r(   Úis_union_typeÚanyÚget_argsr.   s    r$   r8   r8   µ   s6   € ð 
ŒT�$‹ZÑØÜ	�rÔ	ÜÑN´(¸2ÈÕ2MÓNÓNÐNàr%   c                 óœ   — t         r.| t        u xs$ t        | t        «      xr | j                  t        u S t
        xr t        | «      t        u S )z¥Test if the type is a final type. Examples::

        is_final_type(int) == False
        is_final_type(Final) == True
        is_final_type(Final[int]) == True
    )r'   r   r   r*   r!   Ú
WITH_FINALr(   r   r.   s    r$   Úis_final_typerB   Ê   sG   € õ Ø”e�ò NÜ˜2Ô1Ó2ÒM°r·}±}ÌÐ7Mð	OäÒ,œ$˜r›(¤fÐ,Ð,r%   c                 óÀ   — t         rH| t        u xs> t        | t        «      xr | j                  t        u xs t
        xr t        | t
        «      S t        | «      t        u S )a)  Test if the type is a union type. Examples::

        is_union_type(int) == False
        is_union_type(Union) == True
        is_union_type(Union[int, int]) == False
        is_union_type(Union[T, int]) == True
        is_union_type(int | int) == False
        is_union_type(T | int) == True
    )r'   r   r   r*   r!   ÚMaybeUnionTyper(   r   r.   s    r$   r=   r=   Ý   sY   € õ Ø”e�ò DÜ˜BÔ 2Ó3ÒN¸¿¹ÌÐ8NòDäÒB¤J¨r´>Ó$Bð	Eô �‹8”vÐÐr%   r   c                 ó®   — t         r.| t        v xs$ t        | t        «      xr | j                  t        v S t
        xr t        | «      t        t        «      u S r7   )r'   ÚLITERALSr   r*   r!   ÚWITH_LITERALr(   r   r.   s    r$   Úis_literal_typerH   ó   sI   € ÝØ”h�ò QÜ˜2Ô1Ó2ÒP°r·}±}ÌÐ7Pð	RäÒ5œD ›H¬¬W«Ð5Ð5r%   c                 ó$   — t        | «      t        u S )z§Test if the type represents a type variable. Examples::

        is_typevar(int) == False
        is_typevar(T) == True
        is_typevar(Union[T, int]) == False
    )r(   r   r.   s    r$   Ú
is_typevarrJ   ú   s   € ô �‹8”wÐÐr%   c                 óš   — t         r.| t        u xs$ t        | t        «      xr | j                  t        u S t
        rt        | «      t        u S y)zàTest if the type represents a class variable. Examples::

        is_classvar(int) == False
        is_classvar(ClassVar) == True
        is_classvar(ClassVar[int]) == True
        is_classvar(ClassVar[List[T]]) == True
    F)r'   r   r   r*   r!   ÚWITH_CLASSVARr(   r   r.   s    r$   Úis_classvarrM     sH   € õ Ø”h�ò QÜ˜2Ô1Ó2ÒP°r·}±}ÌÐ7Pð	Rå	Ü�B‹xœ9Ð$Ð$àr%   c                 óZ  — t         syt        j                  dd dk\  rWt        j                  j                  dk7  r:| t        t
        j                  fv xs  t        | t        t
        j                  f«      S t        j                  dd dk\  rj	 t        | t
        j                  «      }|r|S | t        t
        j                  fv xs1 t        | dd«      duxr  t        | dd	«      d
k(  xr | j                  dv S | t        u xs t        | dd«      duxr | j                  dv S # t        $ r Y Œw xY w)zýTests if the type represents a distinct type. Examples::

        is_new_type(int) == False
        is_new_type(NewType) == True
        is_new_type(NewType('Age', int)) == True
        is_new_type(NewType('Scores', List[Dict[str, float]])) == True
    FNr   )r   é
   r   Úbeta)r   r   r   Ú__supertype__Ú__qualname__Ú zNewType.<locals>.new_type)ÚtypingÚtyping_extensions)
ÚWITH_NEWTYPEÚsysÚversion_infoÚreleaselevelr   rU   r   Ú	TypeErrorÚgetattrÚ
__module__)r/   Úress     r$   Úis_new_typer^     sI  € õ ØÜ	×	Ñ	˜"˜1Ð	 Ò	+´×0@Ñ0@×0MÑ0MÐQWÒ0WØ”wÔ 1× 9Ñ 9Ð:Ð:ò EÜ˜2¤Ô):×)BÑ)BÐCÓDð	Fä	×	Ñ	˜"˜1Ð	 Ò	*ð	Ü˜RÔ!2×!:Ñ!:Ó;ˆCñ Ø�
Ø”wÔ 1× 9Ñ 9Ð:Ð:ò CÜ˜˜_¨dÓ3¸4Ð?ò BÜ˜˜^¨RÓ0Ð4OÑOòBà—‘Ð"AÐAð	Dð ”g�ò CÜ˜˜_¨dÓ3¸4Ð?ò BØ—‘Ð"AÐAð	Døô ò 	Ùð	ús   ÂD Ä	D*Ä)D*c                 óN   — t         st        | t        «      S t        | t        «      S )zÎTests if the type is a :class:`typing.ForwardRef`. Examples::

        u = Union["Milk", Way]
        args = get_args(u)
        is_forward_ref(args[0]) == True
        is_forward_ref(args[1]) == False
    )r'   r   r   r   r.   s    r$   Úis_forward_refr`   6  s!   € õ Ü˜"œkÓ*Ð*Ü�bœ*Ó%Ð%r%   c                 óh   — t         rt        d«      ‚t        «       }t        | d|«      }||u ry|€| S |S )aÍ  Get the last base of (multiply) subscripted type. Supports generic types,
    Union, Callable, and Tuple. Returns None for unsupported types.
    Examples::

        get_last_origin(int) == None
        get_last_origin(ClassVar[int]) == None
        get_last_origin(Generic[T]) == Generic
        get_last_origin(Union[T, int][str]) == Union[T, int]
        get_last_origin(List[Tuple[T, T]][int]) == List[Tuple[T, T]]
        get_last_origin(List) == List
    zEThis function is only supported in Python 3.6, use get_origin insteadr!   N)r'   Ú
ValueErrorÚobjectr[   )r/   ÚsentinelÚorigins      r$   Úget_last_originrf   C  sH   € õ Üð 3ó 4ð 	4ä‹x€HÜ�R˜ xÓ0€FØ�ÑØØ€~Øˆ	Ø€Mr%   c                 óV  — t         r?t        | t        «      r | j                  t        ur| j                  S dS | t
        u rt
        S yt        | t        «      rt        | «      S t        | «      rt        S t        | «      rt        S t        | «      rt         r| j                  xs | S t        S y)aª  Get the unsubscripted version of a type. Supports generic types, Union,
    Callable, and Tuple. Returns None for unsupported types. Examples::

        get_origin(int) == None
        get_origin(ClassVar[int]) == None
        get_origin(Generic) == Generic
        get_origin(Generic[T]) == Generic
        get_origin(Union[T, int]) == Union
        get_origin(List[Tuple[T, T]][int]) == list  # List prior to Python 3.7
    N)r'   r   r*   r!   r   r
   r   r   r=   r   r4   r   rH   r   r.   s    r$   Ú
get_originrh   [  s‹   € õ Ü�bÔ,Ô-Ø$&§M¡M¼Ñ$A�2—=‘=ÐKÀtÐKØ”‰=ÜˆNØÜ�"”kÔ"Ü�R‹yÐÜ�RÔÜˆÜ�RÔÜˆÜ�rÔÝØ—=‘=Ò& BÐ&Üˆàr%   c                 ó†  — t         �rt        | «      r:g }| j                  �| j                  ndD ]  }|t        |«      z  }Œ t	        |«      S t        | «      r:g }| j                  �| j                  ndD ]  }|t        |«      z  }Œ t	        |«      S t        | «      r‡g }| j                  }|€y|D ]c  }t        |«      rt        |«      n|fD ]E  }t        |«      rt        |t        «      st        d|z  «      ‚|€g }||vsŒ5|j                  |«       ŒG Œe |�t	        |«      S yyt        rQt        | t         «      rt#        | d«      s(t        | t$        «      r$t'        | t(        «      r| t(        ur| j                  S yt        | «      s!t        | «      st+        | «      st        | «      r| j                  �| j                  S dS y)a>  Return type parameters of a parameterizable type as a tuple
    in lexicographic order. Parameterizable types are generic types,
    unions, tuple types and callable types. Examples::

        get_parameters(int) == ()
        get_parameters(Generic) == ()
        get_parameters(Union) == ()
        get_parameters(List[int]) == ()

        get_parameters(Generic[T]) == (T,)
        get_parameters(Tuple[List[T], List[S_co]]) == (T, S_co)
        get_parameters(Union[S_co, Tuple[T, T]][int, U]) == (U,)
        get_parameters(Mapping[T, Tuple[S_co, T]]) == (T, S_co)
    © zKCannot inherit from a generic class parameterized with non-type-variable %sÚ__parameters__)ÚLEGACY_TYPINGr=   Ú__union_params__Úget_parametersr+   r4   Ú__tuple_params__r0   rk   r?   Ú_has_type_varr   r   rZ   Úappendr'   r*   r    r(   r)   r
   r2   )r/   ÚparamsÚargÚbase_paramsÚbp_Úbps         r$   rn   rn   z  sÄ  € ö ä˜ÔØˆFØ/1×/BÑ/BÐ/N˜×+Ò+ÐTVÒV�Øœ.¨Ó-Ñ-‘ð Wä˜“=Ð Ü˜2ÔØˆFØ/1×/BÑ/BÐ/N˜×+Ò+ÐTVÒV�Øœ.¨Ó-Ñ-‘ð Wä˜“=Ð Ü˜RÔ ØˆFØ×+Ñ+ˆKØÐ"ØÛ"�Ü,9¸#Ô,>œ8 Cœ=ÀSÀFÒJ�BÜ$ RÔ(´¸BÄÔ1HÜ'ð3à57ñ8ó9ð 9ð �~Ø!#˜Ø Ò'ØŸ™ bÕ)ñ Kð #ð Ð!Ü˜V“}Ð$ààÝ	ô ˜rÔ#5Ô6Ü˜BÐ 0Ô1ä˜2œtÔ$¬°B¼Ô)@Øœ'Ñ!Ø×$Ñ$Ð$àä˜Ôœ}¨RÔ0Ü˜Ô¤¨bÔ 1à$&×$5Ñ$5Ð$Aˆr× Ñ ÐIÀrÐIàr%   c                 óÊ  — t         rt        d«      ‚t        | «      r| j                  �| j                  fS dS t	        | «      rK	 | j
                  �$t        | j
                  «      dkD  r| j
                  S | j                  �| j                  S dS t        | «      r	 | j
                  �| j
                  S dS t        | «      r| j
                  �| j
                  S dS t        | «      r	 | j
                  �| j
                  S dS y# t        $ r Y Œ—w xY w# t        $ r | j                  �| j                  cY S dcY S w xY w# t        $ r | j                  �| j                  cY S dcY S w xY w)a¿  Get last arguments of (multiply) subscripted type.
       Parameters for Callable are flattened. Examples::

        get_last_args(int) == ()
        get_last_args(Union) == ()
        get_last_args(ClassVar[int]) == (int,)
        get_last_args(Union[T, int]) == (T, int)
        get_last_args(Iterable[Tuple[T, S]][int, T]) == (int, T)
        get_last_args(Callable[[T], int]) == (T, int)
        get_last_args(Callable[[], int]) == (int,)
    zCThis function is only supported in Python 3.6, use get_args insteadrj   r   )r'   rb   rM   Ú__type__r0   Ú__args__ÚlenÚAttributeErrorrk   r=   rm   r2   r4   ro   r.   s    r$   Úget_last_argsr|   ¿  sl  € õ Üð 1ó 2ð 	2ä	�RŒØ!#§¡Ð!8�—‘ˆ~Ð@¸bÐ@Ü	˜Ô	ð	Ø�{‰{Ð&¬3¨r¯{©{Ó+;¸aÒ+?Ø—{‘{Ð"ð %'×$5Ñ$5Ð$Aˆr× Ñ ÐIÀrÐIÜ	�rÔ	ð	RØ"$§+¡+Ð"9�2—;‘;ÐA¸rÐAô 
˜"Ô	Ø Ÿk™kÐ5ˆr�{‰{Ð=¸2Ð=Ü	�rÔ	ð	RØ"$§+¡+Ð"9�2—;‘;ÐA¸rÐAð
 øô' ò 	áð	ûô ò 	Rà*,×*=Ñ*=Ð*I�2×&Ñ&ÒQÈrÒQð	Rûô ò 	Rà*,×*=Ñ*=Ð*I�2×&Ñ&ÒQÈrÒQð	RúsN   Á/D  ÂD Â2D Ã%D: Ã=D: Ä 	DÄDÄ!D7Ä2D7Ä6D7Ä:!E"ÅE"Å!E"c                 ó  — g }| D ]û  }t        |t        «      s|j                  |«       Œ%t        |d   «      r�t	        |dd «      }t        |«      dk(  r|j                  t        g |d   f   «       Œm|d   t        u r|j                  t        d|d   f   «       Œ–|j                  t        t        |dd «      |d   f   «       ŒÀ|j                  t        |d   «      j                  |d   t	        |dd «      «      «       Œý t        |«      S )zInternal helper for get_args.r   é   Nr   .éÿÿÿÿ)r   r+   rq   r2   Ú
_eval_argsrz   r   ÚEllipsisÚlistr(   Ú__getitem__)Úargsr]   rs   Úcallable_argss       r$   r€   r€   ê  sò   € à
€CÛˆÜ˜#œuÔ%Ø�J‰J�s�OÜ˜c !™fÔ%Ü& s¨1¨2 wÓ/ˆMÜ�3‹x˜1Š}Ø—
‘
œ8 B¨°aÑ(8Ð$8Ñ9Õ:Ø�Q‘œ8Ñ#Ø—
‘
œ8 C¨°qÑ)9Ð$9Ñ:Õ;à—
‘
œ8¤D¨°s¸Ð);Ó$<¸mÈBÑ>OÐ$OÑPÕQà�J‰J”t˜C ™F“|×/Ñ/°°A±¼
À3ÀqÀrÀ7Ó8KÓLÕMð ô �‹:Ðr%   c                 óÔ  — t         rŸ|�|st        d«      ‚t        | t        «      r]t	        | d«      rQ| j
                  }t        | «      t        j                  j                  u r|d   t        urt        |dd «      |d   f}|S t        rt        | t        «      r| j
                  S yt        | «      st        | «      r| j                  �| j                  fS dS t!        | «      r| j"                  xs dS t%        | «      s!t'        | «      st)        | «      st+        | «      ru	 | j-                  «       }t        |t6        «      rTt9        |«      dkD  rF|s|dd S t;        |dd «      }t        | «      t        u r|d   t        urt        |dd «      |d   f}|S y# t.        $ rJ t'        | «      rt1        | «      }n0t%        | «      rt3        | «      }nt+        | «      rt5        | «      }nY yY Œ·w xY w)a¬  Get type arguments with all substitutions performed. For unions,
    basic simplifications used by Union constructor are performed.
    On versions prior to 3.7 if `evaluate` is False (default),
    report result as nested tuple, this matches
    the internal representation of types. If `evaluate` is True
    (or if Python version is 3.7 or greater), then all
    type parameters are applied (this could be time and memory expensive).
    Examples::

        get_args(int) == ()
        get_args(Union[int, Union[T, int], str][int]) == (int, str)
        get_args(Union[int, Tuple[T, int]][str]) == (int, (Tuple, str, int))

        get_args(Union[int, Tuple[T, int]][str], evaluate=True) ==                  (int, Tuple[str, int])
        get_args(Dict[int, Tuple[T, T]][Optional[int]], evaluate=True) ==                  (int, Tuple[Optional[int], Optional[int]])
        get_args(Callable[[], T][int], evaluate=True) == ([], int,)
    Nz*evaluate can only be True in Python >= 3.7ry   r   r   rj   r~   )r'   rb   r   r*   r    ry   rh   r,   r-   r   r�   r‚   rD   rM   rB   rx   rH   Ú
__values__r0   r=   r2   r4   Ú
_subs_treer{   Ú_union_subs_treeÚ_generic_subs_treeÚ_tuple_subs_treer+   rz   r€   )r/   r<   r]   Útrees       r$   r?   r?   ý  s´  € õ( ØÐ©ÜÐIÓJÐJä�bÔ,Ô-´'¸"¸jÔ2IØ—+‘+ˆCÜ˜"‹~¤§¡×!9Ñ!9Ñ9¸cÀ!¹fÌHÑ>TÜ˜C  ˜H“~ s¨2¡wÐ/�ØˆJÝœj¨¬^Ô<Ø—;‘;ÐØÜ�2„œ-¨Ô+Ø!#§¡Ð!8�—‘ˆ~Ð@¸bÐ@Ü�rÔØ�}‰}Ò" Ð"ä˜Ôœ}¨RÔ0Ü˜Ô¤¨bÔ 1ð	Ø—=‘=“?ˆDô  �dœEÔ"¤s¨4£y°1¢}ÙØ˜A˜B�x�Ü˜T ! "˜XÓ&ˆCÜ˜"‹~¤Ñ)¨c°!©f¼HÑ.DÜ˜C  ˜H“~ s¨2¡wÐ/�ØˆJàøô/ ò 	ä˜RÔ ä'¨Ó+‘Ü  Ô$ä)¨"Ó-‘Ü˜rÔ"ä'¨Ó+‘ñ ùð	ús   ÄF ÆAG'Ç&G'c                 ó`   — t        | «      rt        | dd«      S t        dt        | «      z   «      ‚)zÙReturn the type bound to a `TypeVar` if any.

    It the type is not a `TypeVar`, a `TypeError` is raised.
    Examples::

        get_bound(TypeVar('T')) == None
        get_bound(TypeVar('T', bound=int)) == int
    Ú	__bound__Nútype is not a `TypeVar`: ©rJ   r[   rZ   Ústrr.   s    r$   Ú	get_boundr’   A  s/   € ô �"„~Ü�r˜;¨Ó-Ð-äÐ3´c¸"³gÑ=Ó>Ð>r%   c                 ó`   — t        | «      rt        | dd«      S t        dt        | «      z   «      ‚)zêReturns the constraints of a `TypeVar` if any.

    It the type is not a `TypeVar`, a `TypeError` is raised
    Examples::

        get_constraints(TypeVar('T')) == ()
        get_constraints(TypeVar('T', int, str)) == (int, str)
    Ú__constraints__rj   r�   r�   r.   s    r$   Úget_constraintsr•   Q  s0   € ô �"„~Ü�rÐ,¨bÓ1Ð1äÐ3´c¸"³gÑ=Ó>Ð>r%   c                 ó:   — t        | dd«      }|�|S t        | «      S )a6  Get the generic type of an object if possible, or runtime class otherwise.
    Examples::

        class Node(Generic[T]):
            ...
        type(Node[int]()) == Node
        get_generic_type(Node[int]()) == Node[int]
        get_generic_type(Node[T]()) == Node[T]
        get_generic_type(1) == int
    Ú__orig_class__N)r[   r(   )ÚobjÚgen_types     r$   Úget_generic_typerš   a  s'   € ô �sÐ,¨dÓ3€HØÐ+ˆ8Ð:´°c³Ð:r%   c                 ó`   — t         rt        d„ | j                  D «       «      S t        | dd«      S )a  Get generic base types of a type or empty tuple if not possible.
    Example::

        class MyClass(List[int], Mapping[str, List[int]]):
            ...
        MyClass.__bases__ == (List, Mapping)
        get_generic_bases(MyClass) == (List[int], Mapping[str, List[int]])
    c              3   óB   K  — | ]  }t        |t        «      sŒ|–— Œ y ­wr7   )r   r   )r9   Úts     r$   r;   z$get_generic_bases.<locals>.<genexpr>{  s   è ø€ ÐK¡˜1´
¸1¼kÕ0J”Q¡ùs   ‚˜Ú__orig_bases__rj   )rl   r+   Ú	__bases__r[   r.   s    r$   Úget_generic_basesr    q  s,   € õ ÜÑK §¢ÓKÓKÐKä�rÐ+¨RÓ0Ð0r%   c                 ód   — t        | t        t        f«      r| j                  j	                  «       S y)aƒ  If td is a TypedDict class, return a dictionary mapping the typed keys to types.
    Otherwise, return None. Examples::

        class TD(TypedDict):
            x: int
            y: int
        class Other(dict):
            x: int
            y: int

        typed_dict_keys(TD) == {'x': int, 'y': int}
        typed_dict_keys(dict) == None
        typed_dict_keys(Other) == None
    N)r   Ú_TypedDictMeta_MypyÚ_TypedDictMeta_TEÚ__annotations__Úcopy)Útds    r$   Útyped_dict_keysr§   €  s-   € ô �"Ô*Ô,=Ð>Ô?Ø×!Ñ!×&Ñ&Ó(Ð(Ør%   c                 ó4   — t        | «      r| j                  S dS )a  
    If fr is a ForwardRef, return the string representation of the forward reference.
    Otherwise return None. Examples::

        tp = List["FRef"]
        fr = get_args(tp)[0]
        get_forward_arg(fr) == "FRef"
        get_forward_arg(tp) == None
    N)r`   Ú__forward_arg__)Úfrs    r$   Úget_forward_argr«   ”  s   € ô "0°Ô!3ˆ2×ÑÐ=¸Ð=r%   c                 óü   — |€g }t        | «      rt        | ||«      S t        | «      rt        | ||«      S t	        | «      rt        | ||«      S t        | t        «      rt        |«      D ]  \  }}| |k(  sŒ||   c S  | S )zbackport of _replace_arg)	r=   r‰   r4   r‹   r0   rŠ   r   r   Ú	enumerate)rs   Útvarsr„   ÚiÚtvars        r$   Ú_replace_argr±   £  s‡   € à€}Øˆô �SÔÜ  U¨DÓ1Ð1Ü�SÔÜ  U¨DÓ1Ð1Ü�sÔÜ! # u¨dÓ3Ð3Ü�#”wÔÜ  Ö'‰GˆAˆtØ�d‹{Ø˜A‘w’ð (ð €Jr%   c                 óŠ  ‡‡— g }| D ]}  }t        |t        «      r|j                  |j                  «       Œ/t        |t        «      r.t        |«      dkD  r |d   t        u r|j                  |dd «       Œm|j                  |«       Œ t        |«      Št        ‰«      t        |«      k  r;g }|D ])  }|‰v sŒ|j                  |«       ‰j                  |«       Œ+ |}‰rJ ‰«       ‚t        |«      Š|D ]=  Št        ‰t        «      sŒt        ˆfd„‰‰hz
  D «       «      sŒ-‰j                  ‰«       Œ? t	        ˆfd„|D «       «      S )z backport of _remove_dups_flattenr   r~   Nc              3   ó°   •K  — | ]M  }t        |t        «      rt        |«      €0t        |t        «      s t        |t        «      xr t        ‰|«      –— ŒO y ­wr7   )r   r   rh   r   r(   r)   )r9   Út2Út1s     €r$   r;   z'_remove_dups_flatten.<locals>.<genexpr>Õ  sM   øè ø€ ð 1Ù*�2Ü" 2¤{Ô3Ü" 2›Ð2Ü! "¤gÔ.ô	 ˜"œdÓ#Ò:¬
°2°rÓ(:Ó:Ù*ùs   ƒAAc              3   ó,   •K  — | ]  }|‰v sŒ|–— Œ y ­wr7   rj   )r9   r�   Ú
all_paramss     €r$   r;   z'_remove_dups_flatten.<locals>.<genexpr>Û  s   øè ø€ Ð6™F�q a¨:¢o”™Fùs   ƒ	�)r   r   Úextendrm   r+   rz   r   rq   ÚsetÚremover(   r>   )Ú
parametersrr   ÚpÚ
new_paramsr�   r·   rµ   s        @@r$   Ú_remove_dups_flattenr¾   ¶  s.  ù€ ð €FÛˆÜ�aœÔ Ø�M‰M˜!×,Ñ,Õ-Ü˜œ5Ô!¤c¨!£f¨q¢j°Q°q±T¼U±]Ø�M‰M˜!˜A˜B˜%Õ à�M‰M˜!Õð ô �V“€JÜ
ˆ:ƒœ˜V›Ò$Øˆ
ÛˆAØ�JŠØ×!Ñ! !Ô$Ø×!Ñ! !Õ$ð ð ˆÙÐ)˜zÓ)ˆ~ô �V“€JÛˆÜ˜"œdÔ#ØÜó 1Ø# r dÒ*ó1õ 1ð
 ×Ñ˜bÕ!ð ô Ó6™FÓ6Ó6Ð6r%   c           
      ó~  — d„ } || «      }|€t        | «      st        | «      s| S g } ||«      �"|j                  |«        ||«      } ||«      �Œ"g }d„ } || «      D ]  }|j                  t        |||«      «       Œ  |D ]8  }	g }
 ||	«      D ]'  }|
j                  t        |t	        |	«      |«      «       Œ) |
}Œ: |S )z;backport of typing._subs_tree, adapted for legacy versions c                 ó:   — 	 | j                   S # t        $ r Y y w xY wr7   )r!   r{   r"   s    r$   Ú_get_originz_subs_tree.<locals>._get_originà  s#   € ð	Ø—>‘>Ð!øÜò 	Ùð	ús   ‚ Ž	™c                 óª   — t        | «      r| j                  }n%t        | «      r| j                  }n	 | j                  }|�|S dS # t
        $ r d}Y Œw xY w)Nrj   )r=   rm   r4   ro   ry   r{   )r#   Úcls_argss     r$   Ú	_get_argsz_subs_tree.<locals>._get_argsô  s^   € Ü˜ÔØ×+Ñ+‰HÜ˜3ÔØ×+Ñ+‰HðØŸ<™<�ð $Ð/ˆxÐ7°RÐ7øô "ò Ø’ðús   ²A ÁAÁA)r=   r4   rq   r±   rn   )r#   r®   r„   rÁ   ÚcurrentÚ
orig_chainÚ	tree_argsrÄ   rs   ÚoclsÚnew_tree_argss              r$   rˆ   rˆ   Þ  sÞ   € òñ ˜#Ó€GØ€Ü˜SÔ!¬-¸Ô*<ØˆJð €JÙ
�gÓ
Ð
*Ø×Ñ˜'Ô"Ù˜gÓ&ˆñ �gÓ
Ñ
*ð
 €Iò
8ñ ˜Ž~ˆØ×Ñœ c¨5°$Ó7Õ8ð ó ˆØˆÙ˜T–?ˆCØ× Ñ ¤¨c´>À$Ó3GÈÓ!SÕTð #à!‰	ð	 ð
 Ðr%   c                 óˆ   — | t         u rt         S t        | ||«      }t        |«      }t        |«      dk(  r|d   S t         f|z   S )z backport of Union._subs_tree r~   r   )r   rˆ   r¾   rz   ©r/   r®   r„   rÇ   s       r$   r‰   r‰     sI   € à	ŒU�{ÜˆÜ˜2˜u dÓ+€Iä$ YÓ/€IÜ
ˆ9ƒ~˜ÒØ˜‰|ÐÜˆ8�iÑÐr%   c                 óh   — | j                   €| S t        | ||«      }t        | «      ft        |«      z   S )z$ backport of GenericMeta._subs_tree )r!   rˆ   r   r+   rË   s       r$   rŠ   rŠ     s5   € à	‡}�}ÐØˆ	Ü˜2˜u dÓ+€IÜ�"‹Iˆ<œ% 	Ó*Ñ*Ð*r%   c                 ó^   — | t         u rt         S t        | ||«      }t         ft        |«      z   S )z7 ad-hoc function (inspired by union) for legacy typing )r   rˆ   r+   rË   s       r$   r‹   r‹     s.   € à	ŒU�{ÜˆÜ˜2˜u dÓ+€IÜˆ8”e˜IÓ&Ñ&Ð&r%   c                 óº   — | €yt        | «      rt        | «      S t        | «      rt        | «      S t	        | «      rt        | «      S t        | «      rt        | «      S y)NF)r=   Ú_union_has_type_varr4   Ú_tuple_has_type_varr0   Ú_generic_has_type_varr2   Ú_callable_has_type_var)r�   s    r$   rp   rp   '  sY   € Ø€yØÜ	�qÔ	Ü" 1Ó%Ð%Ü	�qÔ	Ü" 1Ó%Ð%Ü	˜Ô	Ü$ QÓ'Ð'Ü	˜!Ô	Ü% aÓ(Ð(àr%   c                 óX   — | j                   r| j                   D ]  }t        |«      sŒ y y©NTF)rm   rp   ©r/   r�   s     r$   rÏ   rÏ   6  ó+   € Ø	×ÒØ×$Ô$ˆAÜ˜QÕÙð %ð r%   c                 óX   — | j                   r| j                   D ]  }t        |«      sŒ y yrÔ   )ro   rp   rÕ   s     r$   rÐ   rÐ   >  rÖ   r%   c                 ó€   — | j                   r| j                   D ]  }t        |«      sŒ y t        | j                  «      S )NT)ry   rp   Ú
__result__rÕ   s     r$   rÒ   rÒ   F  s3   € Ø	‡{‚{Ø—”ˆAÜ˜QÕÙð ô ˜Ÿ™Ó'Ð'r%   c                 óX   — | j                   r| j                   D ]  }t        |«      sŒ y yrÔ   )rk   rp   rÕ   s     r$   rÑ   rÑ   N  s+   € Ø	×ÒØ×"Ô"ˆAÜ˜QÕÙð #ð r%   r7   )NN)SÚ__doc__rW   ÚtypesrT   rU   Úmypy_extensionsr   r¢   rX   r£   ÚImportErrorr   r(   r'   Úcollections.abcr,   rA   rG   rL   rV   rl   r
   r   r   r   r   r   r   r   r   r   r   r   ÚGenericAliasr*   r   r   r   r   r   r   r   r   r0   r2   r4   r8   rB   Ú	UnionTyperD   r{   r=   rF   r    ÚaddrH   rJ   rM   r^   r`   rf   rh   rn   r|   r€   r?   r’   r•   rš   r    r§   r«   r±   r¾   rˆ   r‰   rŠ   r‹   rp   rÏ   rÐ   rÒ   rÑ   rj   r%   r$   Ú<module>rã      sÖ  ðñó Û Û Û å Að �× Ñ   !Ð$Ô0 yÕ0ÞEØ×Ñ�b�qÐ˜YÒ&ð?ÞIõ
 !Ù˜Y›Ðà×Ñ˜b˜qÐ! YÑ.€
ÙÛà€
Ø€Ø€Ø€Ø€á÷÷ õ ÷ 1Ø
×Ñ˜˜Ð˜yÒ(Ý/Ø+Ð-AÀ5×CUÑCUÐVÑà+Ð-Ñ÷÷ ó ðß,ðÝ,ð!Ý-ð!Ý-òò7ò4$ò6!ò4ò*
-ðØ—_‘_€Nò
ð" ˆ9€Ù
ˆ6�9ÔØ‡L�L�—‘Ô ò6òòò"Dò@
&òò0ò>BòJ(òVó&AòH?ò ?ò ;ò 1òò(
>òò&%7óP*óZ	 ó+ó'òòòò(óøði ò ?ß>Ð>ð?ûðF ò á�e“ˆØˆØŠð	ûð ò ð	Þ%øØò 	ØŠJð	üðûð ò !ð	!Þ&øØò 	!Ø ŠLð	!ýð!ûð ò !ð	!Þ&øØò 	!Ø ŠLð	!ýð!ûðH ò ØƒNðúsØ   ÁF& Ã&F8 Ã/G Ã6G/ Ã=H ÄH1 Æ&F5Æ4F5Æ8GÇGÇG,ÇGÇG,ÇG&Ç#G,Ç%G&Ç&G,Ç+G,Ç/HÇ5G<Ç;HÇ<HÈHÈHÈHÈHÈH.ÈHÈH.ÈH'È$H.È&H'È'H.È-H.È1H<È;H<