
    dh                        d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dl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ddZ ed       G d d             Z G d d      ZddZ G d d      Zy)    )annotations)Iterable)	dataclass)Optional)SpecifierSet)NormalizedName)Version)Linklinks_equivalent)InstallRequirement)Hashes	Candidatec                N    |s| S dj                  t        |            }|  d| dS )N,[])joinsorted)projectextrasextras_exprs      j/var/www/html/vivango/api/ia/venv/lib/python3.12/site-packages/pip/_internal/resolution/resolvelib/base.pyformat_namer      s/    ((6&>*KYa}A&&    T)frozenc                  h    e Zd ZU ded<   ded<   ded<   edd       Zedd       Zdd	Zdd
ZddZ	y)
Constraintr   	specifierr   hasheszfrozenset[Link]linksc                L    t        t               t               t                     S N)r   r   r   	frozenset)clss    r   emptyzConstraint.empty   s    ,.&(IK@@r   c                    |j                   rt        |j                   g      n	t               }t        |j                  |j	                  d      |      S NF)trust_internet)linkr#   r   r   r   )r$   ireqr    s      r   	from_ireqzConstraint.from_ireq#   s:    *.))	499+&$..$++U+*KUSSr   c                    t        | j                        xs, t        | j                        xs t        | j                        S r"   )boolr   r   r    selfs    r   __bool__zConstraint.__bool__(   s-    DNN#LtDKK'8LD<LLr   c                    t        |t              st        S | j                  |j                  z  }| j                  |j	                  d      z  }| j
                  }|j                  r|j                  |j                  g      }t        |||      S r'   )	
isinstancer   NotImplementedr   r   r    r)   unionr   )r/   otherr   r   r    s        r   __and__zConstraint.__and__+   sq    %!34!!NNU__4	u||5|AA

::KK-E)VU33r   c                    | j                   rt        fd| j                   D              sy| j                  j                  j                  d      S )Nc              3  6   K   | ]  }t        |        y wr"   )_match_link).0r)   	candidates     r   	<genexpr>z-Constraint.is_satisfied_by.<locals>.<genexpr>7   s     !V4+dI">!Vs   FT)prereleases)r    allr   containsversionr/   r;   s    `r   is_satisfied_byzConstraint.is_satisfied_by5   s@    ::c!V4::!VV ~~&&y'8'8d&KKr   N)returnr   )r*   r   rC   r   rC   r-   )r5   r   rC   r   r;   r   rC   r-   )
__name__
__module____qualname____annotations__classmethodr%   r+   r0   r6   rB    r   r   r   r      sN    NA A T TM4Lr   r   c                  H    e Zd Zedd       Zedd       Zd	dZd
dZddZy)Requirementc                    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NotImplementedErrorr.   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   r.   s    r   namezRequirement.nameJ   s     ""<==r   c                     yNFrK   rA   s     r   rB   zRequirement.is_satisfied_byS   s    r   c                    t        d      NrO   rP   r.   s    r   get_candidate_lookupz Requirement.get_candidate_lookupV       !"<==r   c                    t        d      rX   rP   r.   s    r   format_for_errorzRequirement.format_for_errorY   rZ   r   NrC   r   rC   strrE   )rC   CandidateLookup)	rF   rG   rH   propertyrR   rT   rB   rY   r\   rK   r   r   rM   rM   ?   s7    > > > >>>r   rM   c                H    |j                   rt        | |j                         S yrV   )source_linkr   )r)   r;   s     r   r9   r9   ]   s!    i&;&;<<r   c                      e Zd Zedd       Zedd       Zedd       Zedd       Zedd       Zedd       Z	ddZ
ddZdd	Zy
)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   r.   s    r   rR   zCandidate.project_named   s     ""8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.
        rf   rP   r.   s    r   rT   zCandidate.namen   s     ""899r   c                    t        d      Nrf   rP   r.   s    r   r@   zCandidate.versionw       !"899r   c                    t        d      ri   rP   r.   s    r   is_installedzCandidate.is_installed{   rj   r   c                    t        d      ri   rP   r.   s    r   is_editablezCandidate.is_editable   rj   r   c                    t        d      ri   rP   r.   s    r   rc   zCandidate.source_link   rj   r   c                    t        d      ri   rP   )r/   with_requiress     r   iter_dependencieszCandidate.iter_dependencies       !"899r   c                    t        d      ri   rP   r.   s    r   get_install_requirementz!Candidate.get_install_requirement   rs   r   c                    t        d      rX   rP   r.   s    r   r\   zCandidate.format_for_error   rZ   r   Nr]   r^   )rC   r	   rD   )rC   zLink | None)rq   r-   rC   zIterable[Requirement | None])rC   zInstallRequirement | None)rF   rG   rH   ra   rR   rT   r@   rl   rn   rc   rr   ru   r\   rK   r   r   r   r   c   s    : : : : : : : : : : : :::>r   N)r   r   r   zfrozenset[NormalizedName]rC   r_   )r)   r
   r;   r   rC   r-   )
__future__r   collections.abcr   dataclassesr   typingr    pip._vendor.packaging.specifiersr   pip._vendor.packaging.utilsr   pip._vendor.packaging.versionr	   pip._internal.models.linkr
   r   pip._internal.req.req_installr   pip._internal.utils.hashesr   tupler`   r   r   rM   r9   r   rK   r   r   <module>r      s}    " $ !  9 6 1 < < --x8J/KKL' $"L "L "LJ> ><+> +>r   