
    if5                     4   d dl mZmZmZmZmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZmZ d dlmZ d dlmZ eed         ee         f         Zeeef         Zd	e	d
ee	         defdZ G d d          Z G d d          ZdedddefdZ G d d          ZdS )    )	FrozenSetIterableOptionalTupleUnion)SpecifierSet)NormalizedName)LegacyVersionVersion)Linklinks_equivalent)InstallRequirement)Hashes	Candidateprojectextrasreturnc                 ^    |s| S d                     t          |                    }|  d| dS )N,[])joinsorted)r   r   extras_exprs      Z/var/www/html/env/lib/python3.11/site-packages/pip/_internal/resolution/resolvelib/base.pyformat_namer      s=     ((6&>>**K&&&&&&    c                       e Zd Zdededee         ddfdZedd            Z	ede
dd fd	            Zdefd
Zde
dd fdZdddefdZdS )
Constraint	specifierhasheslinksr   Nc                 0    || _         || _        || _        d S N)r    r!   r"   )selfr    r!   r"   s       r   __init__zConstraint.__init__   s     #


r   c                 l    t          t                      t                      t                                S r$   )r   r   r   	frozenset)clss    r   emptyzConstraint.empty   s     ,..&((IKK@@@r   ireqc                     |j         rt          |j         g          nt                      }t          |j        |                    d          |          S NF)trust_internet)linkr(   r   r    r!   )r)   r+   r"   s      r   	from_ireqzConstraint.from_ireq"   sE    *.)D	49+&&&$.$++U+*K*KUSSSr   c                 z    t          | j                  p't          | j                  pt          | j                  S r$   )boolr    r!   r"   r%   s    r   __bool__zConstraint.__bool__'   s0    DN##LtDK'8'8LD<L<LLr   otherc                    t          |t                    st          S | j        |j        z  }| j        |                    d          z  }| j        }|j        r|                    |j        g          }t          |||          S r-   )	
isinstancer   NotImplementedr    r!   r"   r/   unionr   )r%   r5   r    r!   r"   s        r   __and__zConstraint.__and__*   s{    %!344 	"!!NU_4	u||5|AAA
: 	.KK--E)VU333r   	candidater   c                     | j         r"t          fd| j         D                       sdS | j                            j        d          S )Nc              3   8   K   | ]}t          |          V  d S r$   )_match_link).0r/   r;   s     r   	<genexpr>z-Constraint.is_satisfied_by.<locals>.<genexpr>6   s-      !V!V4+dI">">!V!V!V!V!V!Vr   FT)prereleases)r"   allr    containsversionr%   r;   s    `r   is_satisfied_byzConstraint.is_satisfied_by4   sX    : 	c!V!V!V!V4:!V!V!VVV 	5 ~&&y'8d&KKKr   )r   r   )__name__
__module____qualname__r   r   r   r   r&   classmethodr*   r   r0   r2   r4   r:   rF    r   r   r   r      s       %/5>Go	    A A A [A T/ TL T T T [TM$ M M M M4/ 4L 4 4 4 4L L L L L L L Lr   r   c                   n    e Zd Zedefd            Zedefd            ZdddefdZ	de
fdZdefdZd	S )
Requirementr   c                      t          d          )zThe "project name" of a requirement.

        This is different from ``name`` if this requirement contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        Subclass should overrideNotImplementedErrorr3   s    r   project_namezRequirement.project_name?   s     ""<===r   c                      t          d          )zThe name identifying this requirement in the resolver.

        This is different from ``project_name`` if this requirement contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rO   rP   r3   s    r   namezRequirement.nameI   s     ""<===r   r;   r   c                     dS NFrK   rE   s     r   rF   zRequirement.is_satisfied_byR   s    ur   c                      t          d          NrO   rP   r3   s    r   get_candidate_lookupz Requirement.get_candidate_lookupU       !"<===r   c                      t          d          rX   rP   r3   s    r   format_for_errorzRequirement.format_for_errorX   rZ   r   N)rG   rH   rI   propertyr	   rR   strrT   r2   rF   CandidateLookuprY   r\   rK   r   r   rM   rM   >   s        >n > > > X> >c > > > X>     >o > > > >># > > > > > >r   rM   r/   r;   c                 >    |j         rt          | |j                   S dS rV   )source_linkr   )r/   r;   s     r   r>   r>   \   s%     =i&;<<<5r   c                      e Zd Zedefd            Zedefd            Zedefd            Z	ede
fd            Zede
fd            Zedee         fd            Zde
deee                  fd	Zdee         fd
ZdefdZdS )r   r   c                      t          d          )zThe "project name" of the candidate.

        This is different from ``name`` if this candidate contains extras,
        in which case ``name`` would contain the ``[...]`` part, while this
        refers to the name of the project.
        Override in subclassrP   r3   s    r   rR   zCandidate.project_namec   s     ""8999r   c                      t          d          )zThe name identifying this candidate in the resolver.

        This is different from ``project_name`` if this candidate contains
        extras, where ``project_name`` would not contain the ``[...]`` part.
        rd   rP   r3   s    r   rT   zCandidate.namem   s     ""8999r   c                      t          d          Nrd   rP   r3   s    r   rD   zCandidate.versionv       !"8999r   c                      t          d          rg   rP   r3   s    r   is_installedzCandidate.is_installedz   rh   r   c                      t          d          rg   rP   r3   s    r   is_editablezCandidate.is_editable~   rh   r   c                      t          d          rg   rP   r3   s    r   ra   zCandidate.source_link   rh   r   with_requiresc                      t          d          rg   rP   )r%   rn   s     r   iter_dependencieszCandidate.iter_dependencies       !"8999r   c                      t          d          rg   rP   r3   s    r   get_install_requirementz!Candidate.get_install_requirement   rq   r   c                      t          d          rX   rP   r3   s    r   r\   zCandidate.format_for_error   rZ   r   N)rG   rH   rI   r]   r	   rR   r^   rT   CandidateVersionrD   r2   rj   rl   r   r   ra   r   rM   rp   r   rs   r\   rK   r   r   r   r   b   si       :n : : : X: :c : : : X: :) : : : X: :d : : : X: :T : : : X: :Xd^ : : : X::t :+AV8W : : : ::2D)E : : : :># > > > > > >r   N)typingr   r   r   r   r    pip._vendor.packaging.specifiersr   pip._vendor.packaging.utilsr	   pip._vendor.packaging.versionr
   r   pip._internal.models.linkr   r   pip._internal.req.req_installr   pip._internal.utils.hashesr   r_   ru   r^   r   r   rM   r2   r>   r   rK   r   r   <module>r}      s   > > > > > > > > > > > > > > 9 9 9 9 9 9 6 6 6 6 6 6 @ @ @ @ @ @ @ @ < < < < < < < < < < < < < < - - - - - --x8J/KKL/0 ' '>1J 's ' ' ' '%L %L %L %L %L %L %L %LP> > > > > > > ><d { t    +> +> +> +> +> +> +> +> +> +>r   