§
    
Á³gªH  ã                   ó:  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	 d 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 d dlmZ d dlmZ d dlmZmZmZmZ d dlm Z  d d	l!m"Z"m#Z# erd d
l$m%Z%  ej&        e'¦  «        Z(dZ) e	d¬¦  «         G d„ d¦  «        ¦   «         Z*de+de+fd„Z,de+de+fd„Z- ej.        dej/        ¦  «        Z0de+de1de+fd„Z2de+de+fd„Z3 G d„ de ¦  «        Z4 G d„ de¦  «        Z5de4de5fd„Z6 e j7        d¬ ¦  «        d!e4d"e4de1fd#„¦   «         Z8dS )$é    N)Ú	dataclass)	ÚTYPE_CHECKINGÚAnyÚDictÚListÚMappingÚ
NamedTupleÚOptionalÚTupleÚUnion)Ú
deprecated)ÚWHEEL_EXTENSION)ÚHashes)ÚpairwiseÚredact_auth_from_urlÚsplit_auth_from_netlocÚsplitext)ÚKeyBasedCompareMixin)Úpath_to_urlÚurl_to_path)ÚIndexContent)Úsha512Úsha384Úsha256Úsha224Úsha1Úmd5T)Úfrozenc                   óP  — e Zd ZU dZeed<   eed<    ej        d                     d 	                    d„ e
D ¦   «         ¦  «        ¬¦  «        ¦  «        Zdd
„Ze ej        d	¬¦  «        deded          fd„¦   «         ¦   «         Zdeeef         fd„Zdefd„Zdee         defd„Zd	S )ÚLinkHashaµ  Links to content may have embedded hash values. This class parses those.

    `name` must be any member of `_SUPPORTED_HASHES`.

    This class can be converted to and from `ArchiveInfo`. While ArchiveInfo intends to
    be JSON-serializable to conform to PEP 610, this class contains the logic for
    parsing a hash name and value for correctness, and then checking whether that hash
    conforms to a schema with `.is_hash_allowed()`.ÚnameÚvaluez({choices})=(.*)ú|c              #   ó>   K  — | ]}t          j        |¦  «        V — Œd S ©N)ÚreÚescape)Ú.0Ú	hash_names     úW/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_internal/models/link.pyú	<genexpr>zLinkHash.<genexpr>A   s,   è è € ÐUÐU°i�RœY yÑ1Ô1ÐUÐUÐUÐUÐUÐUó    )ÚchoicesÚreturnNc                 ó\   — | j                              | j        › d| j        › �¦  «        sJ ‚d S )Nú=)Ú_hash_reÚmatchr!   r"   ©Úselfs    r*   Ú__post_init__zLinkHash.__post_init__E   s6   € ØŒ}×"Ò" d¤iÐ#>Ð#>°$´*Ð#>Ð#>Ñ?Ô?Ð?Ð?Ð?Ð?Ð?r,   ©ÚmaxsizeÚurlc                 ó†   — | j                              |¦  «        }|€dS |                     ¦   «         \  }} | ||¬¦  «        S )zGSearch a string for a checksum algorithm name and encoded output value.N©r!   r"   )r1   ÚsearchÚgroups)Úclsr8   r2   r!   r"   s        r*   Úsplit_hash_name_and_valuez"LinkHash.split_hash_name_and_valueH   sI   € ð ”×#Ò# CÑ(Ô(ˆØˆ=Ø�4Ø—l’l‘n”n‰ˆˆeØˆs˜ EÐ*Ñ*Ô*Ð*r,   c                 ó   — | j         | j        iS r%   r:   r3   s    r*   Úas_dictzLinkHash.as_dictR   s   € Ø”	˜4œ:Ð&Ð&r,   c                 ó:   — t          | j        | j        gi¦  «        S )z@Return a Hashes instance which checks only for the current hash.)r   r!   r"   r3   s    r*   Ú	as_hasheszLinkHash.as_hashesU   s   € å�t”y 4¤: ,Ð/Ñ0Ô0Ð0r,   Úhashesc                 óL   — |€dS |                      | j        | j        ¬¦  «        S )zI
        Return True if the current hash is allowed by `hashes`.
        NF)Ú
hex_digest)Úis_hash_allowedr!   r"   ©r4   rC   s     r*   rF   zLinkHash.is_hash_allowedY   s+   € ð ˆ>Ø�5Ø×%Ò% d¤i¸D¼JÐ%ÑGÔGÐGr,   )r.   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__r&   ÚcompileÚformatÚjoinÚ_SUPPORTED_HASHESr1   r5   ÚclassmethodÚ	functoolsÚ	lru_cacher
   r>   r   r@   r   rB   ÚboolrF   © r,   r*   r    r    ,   sS  € € € € € € ð7ð 7ð €I€I�IØ€J€J�JàˆrŒzð 	×"Ò"Ø—H’HÐUÐUÐCTÐUÑUÔUÑUÔUð 	#ñ 	
ô 	
ñ	ô 	€Hð@ð @ð @ð @ð Ø€YÔ Ð&Ñ&Ô&ð+¨Cð +°H¸ZÔ4Hð +ð +ð +ñ 'Ô&ñ „[ð+ð'˜˜c 3˜hœð 'ð 'ð 'ð 'ð1˜6ð 1ð 1ð 1ð 1ðH h¨vÔ&6ð H¸4ð Hð Hð Hð Hð Hð Hr,   r    Úpartr.   c                 óz   — t           j                             t           j                             | ¦  «        ¦  «        S )zP
    Clean a "part" of a URL path (i.e. after splitting on "@" characters).
    )ÚurllibÚparseÚquoteÚunquote©rW   s    r*   Ú_clean_url_path_partr^   b   s*   € õ
 Œ<×Ò�fœl×2Ò2°4Ñ8Ô8Ñ9Ô9Ð9r,   c                 óz   — t           j                             t           j                             | ¦  «        ¦  «        S )z•
    Clean the first part of a URL path that corresponds to a local
    filesystem path (i.e. the first part after splitting on "@" characters).
    )rY   ÚrequestÚpathname2urlÚurl2pathnamer]   s    r*   Ú_clean_file_url_pathrc   j   s*   € õ Œ>×&Ò&¥v¤~×'BÒ'BÀ4Ñ'HÔ'HÑIÔIÐIr,   z(@|%2F)ÚpathÚis_local_pathc                 ób  — |rt           }nt          }t                               | ¦  «        }g }t	          t          j        |dg¦  «        ¦  «        D ]J\  }}|                      ||¦  «        ¦  «         |                     |                     ¦   «         ¦  «         ŒKd 	                    |¦  «        S )z*
    Clean the path portion of a URL.
    Ú )
rc   r^   Ú_reserved_chars_reÚsplitr   Ú	itertoolsÚchainÚappendÚupperrP   )rd   re   Ú
clean_funcÚpartsÚcleaned_partsÚto_cleanÚreserveds          r*   Ú_clean_url_pathrs   {   s­   € ð ð *Ý)ˆ
ˆ
å)ˆ
õ ×$Ò$ TÑ*Ô*€Eà€MÝ&¥y¤°u¸r¸dÑ'CÔ'CÑDÔDð /ð /Ñˆ�(Ø×Ò˜Z˜Z¨Ñ1Ô1Ñ2Ô2Ð2à×Ò˜XŸ^š^Ñ-Ô-Ñ.Ô.Ð.Ð.à�7Š7�=Ñ!Ô!Ð!r,   r8   c                 óâ   — t           j                             | ¦  «        }|j         }t	          |j        |¬¦  «        }t           j                             |                     |¬¦  «        ¦  «        S )z§
    Make sure a link is fully quoted.
    For example, if ' ' occurs in the URL, it will be replaced with "%20",
    and without double-quoting other characters.
    )re   )rd   )rY   rZ   ÚurlparseÚnetlocrs   rd   Ú
urlunparseÚ_replace)r8   Úresultre   rd   s       r*   Ú_ensure_quoted_urlrz   ‘   s[   € õ Œ\×"Ò" 3Ñ'Ô'€FàœÐ%€MÝ˜6œ;°mÐDÑDÔD€DÝŒ<×"Ò" 6§?¢?¸ ?Ñ#=Ô#=Ñ>Ô>Ð>r,   c                   óJ  ‡ — e Zd ZdZg d¢Z	 	 	 	 	 	 d1dedeeedf                  dee         d	ee         d
ee         dedee	eef                  ddfˆ fd„Z
edeeef         deded          fd„¦   «         Zedeeee         f         dededed          fd„¦   «         Zdefd„Z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fd„¦   «         Zedefd„¦   «         Zdeeef         fd„Zedefd„¦   «         Zedefd„¦   «         Z ej        d ¦  «        Z ej        d!ej         ¦  «        Z!dee         fd"„Z" ej        d#¦  «        Z#edee         fd$„¦   «         Z$ded          fd%„Z%de&fd&„Z'edee         fd'„¦   «         Z(edee         fd(„¦   «         Z)edefd)„¦   «         Z*edefd*„¦   «         Z+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/„¦   «         Z0dee&         defd0„Z1ˆ xZ2S )2ÚLinkz:Represents a parsed link from a Package Index's simple URL)	Ú_parsed_urlÚ_urlÚ_hashesÚ
comes_fromÚrequires_pythonÚyanked_reasonÚdist_info_metadataÚcache_link_parsingÚegg_fragmentNTr8   r€   r   r�   r‚   rƒ   r„   rC   r.   c                 ó  •— |                      d¦  «        rt          |¦  «        }t          j                             |¦  «        | _        || _        t                               |¦  «        }|€i n| 	                    ¦   «         }	|€|	| _
        ni |¥|	¥| _
        || _        |r|nd| _        || _        || _        t          ¦   «                              |t"          ¬¦  «         || _        |                      ¦   «         | _        dS )aG  
        :param url: url of the resource pointed to (href of the link)
        :param comes_from: instance of IndexContent where the link was found,
            or string.
        :param requires_python: String containing the `Requires-Python`
            metadata field, specified in PEP 345. This may be specified by
            a data-requires-python attribute in the HTML link tag, as
            described in PEP 503.
        :param yanked_reason: the reason the file has been yanked, if the
            file has been yanked, or None if the file hasn't been yanked.
            This is the value of the "data-yanked" attribute, if present, in
            a simple repository HTML link. If the file has been yanked but
            no reason was provided, this should be the empty string. See
            PEP 592 for more information and the specification.
        :param dist_info_metadata: the metadata attached to the file, or None if no such
            metadata is provided. This is the value of the "data-dist-info-metadata"
            attribute, if present, in a simple repository HTML link. This may be parsed
            into its own `Link` by `self.metadata_link()`. See PEP 658 for more
            information and the specification.
        :param cache_link_parsing: A flag that is used elsewhere to determine
            whether resources retrieved from this link should be cached. PyPI
            URLs should generally have this set to False, for example.
        :param hashes: A mapping of hash names to digests to allow us to
            determine the validity of a download.
        z\\N)ÚkeyÚdefining_class)Ú
startswithr   rY   rZ   Úurlsplitr}   r~   r    r>   r@   r   r€   r�   r‚   rƒ   ÚsuperÚ__init__r|   r„   Ú_egg_fragmentr…   )r4   r8   r€   r�   r‚   rƒ   r„   rC   Ú	link_hashÚhashes_from_linkÚ	__class__s             €r*   rŒ   zLink.__init__¯   sý   ø€ ðJ �>Š>˜&Ñ!Ô!ð 	#Ý˜cÑ"Ô"ˆCå!œ<×0Ò0°Ñ5Ô5ˆÔð ˆŒ	å×6Ò6°sÑ;Ô;ˆ	Ø!*Ð!2˜2˜2¸	×8IÒ8IÑ8KÔ8KÐØˆ>Ø+ˆDŒLˆLà9˜fÐ9Ð(8Ð9ˆDŒLà$ˆŒØ2AÐK˜˜ÀtˆÔØ*ˆÔØ"4ˆÔå‰Œ×Ò˜SµÐÑ6Ô6Ð6à"4ˆÔØ ×.Ò.Ñ0Ô0ˆÔÐÐr,   Ú	file_dataÚpage_urlc                 ó–  — |                      d¦  «        }|€dS t          t          j                             ||¦  «        ¦  «        }|                      d¦  «        }|                      d¦  «        }|                      d¦  «        }|                      di ¦  «        }|rt          |t          ¦  «        sd}n|sd} | ||||||¬¦  «        S )	zZ
        Convert an pypi json document from a simple repository page into a Link.
        r8   Nzrequires-pythonÚyankedzdist-info-metadatarC   rg   )r€   r�   r‚   rC   rƒ   )Úgetrz   rY   rZ   ÚurljoinÚ
isinstancerL   )	r=   r‘   r’   Úfile_urlr8   Ú	pyrequirer‚   rƒ   rC   s	            r*   Ú	from_jsonzLink.from_jsoní   sâ   € ð —=’= Ñ'Ô'ˆØÐØ�4å ¥¤×!5Ò!5°hÀÑ!IÔ!IÑJÔJˆØ—M’MÐ"3Ñ4Ô4ˆ	Ø!Ÿš hÑ/Ô/ˆØ&Ÿ]š]Ð+?Ñ@Ô@ÐØ—’˜x¨Ñ,Ô,ˆð ð 	!¥¨M½3Ñ!?Ô!?ð 	!ØˆMˆMàð 	!Ø ˆMàˆsØØØ%Ø'ØØ1ð
ñ 
ô 
ð 	
r,   Úanchor_attribsÚbase_urlc                 ó,  — |                      d¦  «        }|sdS t          t          j                             ||¦  «        ¦  «        }|                      d¦  «        }|                      d¦  «        }|                      d¦  «        } | |||||¬¦  «        S )z_
        Convert an anchor element's attributes in a simple repository page to a Link.
        ÚhrefNzdata-requires-pythonzdata-yankedzdata-dist-info-metadata)r€   r�   r‚   rƒ   )r•   rz   rY   rZ   r–   )	r=   r›   r’   rœ   rž   r8   r™   r‚   rƒ   s	            r*   Úfrom_elementzLink.from_element  s§   € ð ×!Ò! &Ñ)Ô)ˆØð 	Ø�4å ¥¤×!5Ò!5°hÀÑ!EÔ!EÑFÔFˆØ"×&Ò&Ð'=Ñ>Ô>ˆ	Ø&×*Ò*¨=Ñ9Ô9ˆØ+×/Ò/Ð0IÑJÔJÐàˆsØØØ%Ø'Ø1ð
ñ 
ô 
ð 	
r,   c                 óØ   — | j         rd| j         › d�}nd}| j        r.d                     t          | j        ¦  «        | j        |¦  «        S t          t          | j        ¦  «        ¦  «        S )Nz (requires-python:ú)rg   z{} (from {}){})r�   r€   rO   r   r~   rL   )r4   Úrps     r*   Ú__str__zLink.__str__+  st   € ØÔð 	Ø= dÔ&:Ð=Ð=Ð=ˆBˆBàˆBØŒ?ð 	8Ø#×*Ò*Ý$ T¤YÑ/Ô/°´À"ñô ð õ (­¨D¬I©¬Ñ7Ô7Ð7r,   c                 ó   — d| › d�S )Nz<Link ú>rV   r3   s    r*   Ú__repr__zLink.__repr__7  s   € Ø˜ÐÐÐÐr,   c                 ó   — | j         S r%   )r~   r3   s    r*   r8   zLink.url:  s
   € àŒyÐr,   c                 ó   — | j                              d¦  «        }t          j        |¦  «        }|st	          | j        ¦  «        \  }}|S t          j                             |¦  «        }|sJ d| j	        ›d�¦   «         ‚|S )Nú/zURL z produced no filename)
rd   ÚrstripÚ	posixpathÚbasenamer   rv   rY   rZ   r\   r~   )r4   rd   r!   rv   Ú	user_passs        r*   ÚfilenamezLink.filename>  s†   € àŒy×Ò Ñ$Ô$ˆÝÔ! $Ñ'Ô'ˆØð 	õ !7°t´{Ñ CÔ CÑˆF�IØˆMåŒ|×#Ò# DÑ)Ô)ˆØÐ>Ð>Ð>˜DœIÐ>Ð>Ð>Ñ>Ô>Ð>Øˆr,   c                 ó*   — t          | j        ¦  «        S r%   )r   r8   r3   s    r*   Ú	file_pathzLink.file_pathL  s   € å˜4œ8Ñ$Ô$Ð$r,   c                 ó   — | j         j        S r%   )r}   Úschemer3   s    r*   r²   zLink.schemeP  s   € àÔÔ&Ð&r,   c                 ó   — | j         j        S )z4
        This can contain auth information.
        )r}   rv   r3   s    r*   rv   zLink.netlocT  s   € ð
 ÔÔ&Ð&r,   c                 óT   — t           j                             | j        j        ¦  «        S r%   )rY   rZ   r\   r}   rd   r3   s    r*   rd   z	Link.path[  s   € åŒ|×#Ò# DÔ$4Ô$9Ñ:Ô:Ð:r,   c                 ót   — t          t          j        | j                             d¦  «        ¦  «        ¦  «        S )Nr©   )r   r«   r¬   rd   rª   r3   s    r*   r   zLink.splitext_  s+   € Ý�	Ô*¨4¬9×+;Ò+;¸CÑ+@Ô+@ÑAÔAÑBÔBÐBr,   c                 ó6   — |                       ¦   «         d         S ©Né   )r   r3   s    r*   ÚextzLink.extb  s   € à�}Š}‰Œ˜qÔ!Ð!r,   c                 ód   — | j         \  }}}}}t          j                             ||||df¦  «        S )Nrg   )r}   rY   rZ   Ú
urlunsplit)r4   r²   rv   rd   ÚqueryÚfragments         r*   Úurl_without_fragmentzLink.url_without_fragmentf  s6   € à04Ô0@Ñ-ˆ�˜˜e XÝŒ|×&Ò&¨°¸¸eÀRÐ'HÑIÔIÐIr,   z[#&]egg=([^&]*)z)^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$c                 óÖ   — | j                              | j        ¦  «        }|sd S |                     d¦  «        }| j                             |¦  «        st          | › d�ddd¬¦  «         |S )Nr¸   z1 contains an egg fragment with a non-PEP 508 namez8to use the req @ url syntax, and remove the egg fragmentz25.0ia-  )ÚreasonÚreplacementÚgone_inÚissue)Ú_egg_fragment_rer;   r~   ÚgroupÚ_project_name_rer2   r   )r4   r2   Úproject_names      r*   r�   zLink._egg_fragmentr  s…   € ØÔ%×,Ò,¨T¬YÑ7Ô7ˆØð 	Ø�4ð —{’{ 1‘~”~ˆØÔ$×*Ò*¨<Ñ8Ô8ð 	ÝØÐQÐQÐQØVØØð	ñ ô ð ð Ðr,   z[#&]subdirectory=([^&]*)c                 ór   — | j                              | j        ¦  «        }|sd S |                     d¦  «        S r·   )Ú_subdirectory_fragment_rer;   r~   rÅ   )r4   r2   s     r*   Úsubdirectory_fragmentzLink.subdirectory_fragment†  s7   € àÔ.×5Ò5°d´iÑ@Ô@ˆØð 	Ø�4Ø�{Š{˜1‰~Œ~Ðr,   c                 óê   — | j         €dS | j        › d�}| j         dk    r t                               | j         ¦  «        }nd}|€t	          |¦  «        S t	          ||                     ¦   «         ¬¦  «        S )z"Implementation of PEP 658 parsing.Nz	.metadataÚtrue)rC   )rƒ   r¾   r    r>   r|   r@   )r4   Úmetadata_urlrŽ   s      r*   Úmetadata_linkzLink.metadata_link�  sƒ   € ð
 Ô"Ð*Ø�4ØÔ3Ð>Ð>Ð>ˆð Ô" fÒ,Ð,Ý ×:Ò:¸4Ô;RÑSÔSˆIˆIàˆIØÐÝ˜Ñ%Ô%Ð%Ý�L¨×):Ò):Ñ)<Ô)<Ð=Ñ=Ô=Ð=r,   c                 ób   — t          d„ | j                             ¦   «         D ¦   «         ¦  «        S )Nc                 ó   — i | ]	\  }}||g“Œ
S rV   rV   )r(   ÚkÚvs      r*   ú
<dictcomp>z"Link.as_hashes.<locals>.<dictcomp>   s    € Ð?Ð?Ð?¡$ ! Q�q˜1˜#Ð?Ð?Ð?r,   )r   r   Úitemsr3   s    r*   rB   zLink.as_hashesŸ  s-   € ÝÐ?Ð?¨$¬,×*<Ò*<Ñ*>Ô*>Ð?Ñ?Ô?Ñ@Ô@Ð@r,   c                 ój   — t          t          | j                             ¦   «         ¦  «        d ¦  «        S r%   )ÚnextÚiterr   Úvaluesr3   s    r*   Úhashz	Link.hash¢  s(   € å•D˜œ×,Ò,Ñ.Ô.Ñ/Ô/°Ñ6Ô6Ð6r,   c                 óF   — t          t          | j        ¦  «        d ¦  «        S r%   )rÖ   r×   r   r3   s    r*   r)   zLink.hash_name¦  s   € å•D˜œÑ&Ô&¨Ñ-Ô-Ð-r,   c                 óœ   — t          j        | j                             dd¦  «        d                              dd¦  «        d         ¦  «        S )Nú#r¸   r   ú?)r«   r¬   r~   ri   r3   s    r*   Úshow_urlzLink.show_urlª  s=   € åÔ! $¤)§/¢/°#°qÑ"9Ô"9¸!Ô"<×"BÒ"BÀ3ÈÑ"JÔ"JÈ1Ô"MÑNÔNÐNr,   c                 ó   — | j         dk    S )NÚfile)r²   r3   s    r*   Úis_filezLink.is_file®  s   € àŒ{˜fÒ$Ð$r,   c                 óX   — | j         o#t          j                             | j        ¦  «        S r%   )rá   Úosrd   Úisdirr°   r3   s    r*   Úis_existing_dirzLink.is_existing_dir²  s   € ØŒ|Ð=¥¤§¢¨d¬nÑ =Ô =Ð=r,   c                 ó"   — | j         t          k    S r%   )r¹   r   r3   s    r*   Úis_wheelzLink.is_wheelµ  s   € àŒx�?Ò*Ð*r,   c                 ó*   — ddl m} | j        |j        v S )Nr   )Úvcs)Úpip._internal.vcsré   r²   Úall_schemes)r4   ré   s     r*   Úis_vcszLink.is_vcs¹  s#   € à)Ð)Ð)Ð)Ð)Ð)àŒ{˜cœoÐ-Ð-r,   c                 ó   — | j         d uS r%   )r‚   r3   s    r*   Ú	is_yankedzLink.is_yanked¿  s   € àÔ!¨Ð-Ð-r,   c                 ó*   — t          | j        ¦  «        S r%   )rU   r   r3   s    r*   Úhas_hashzLink.has_hashÃ  s   € å�D”LÑ!Ô!Ð!r,   c                 óp   ‡— ‰€dS t          ˆfd„| j                             ¦   «         D ¦   «         ¦  «        S )zS
        Return True if the link has a hash and it is allowed by `hashes`.
        NFc              3   óJ   •K  — | ]\  }}‰                      ||¦  «        V — Œd S r%   )rF   )r(   rÑ   rÒ   rC   s      €r*   r+   z'Link.is_hash_allowed.<locals>.<genexpr>Í  s7   øè è € ÐQÐQ±D°A°q�6×)Ò)¨!¨QÑ/Ô/ÐQÐQÐQÐQÐQÐQr,   )Úanyr   rÔ   rG   s    `r*   rF   zLink.is_hash_allowedÇ  s@   ø€ ð ˆ>Ø�5ÝÐQÐQÐQÐQ¸D¼L×<NÒ<NÑ<PÔ<PÐQÑQÔQÑQÔQÐQr,   )NNNNTN)3rH   rI   rJ   rK   Ú	__slots__rL   r
   r   rU   r   rŒ   rR   r   r   rš   rŸ   r£   r¦   Úpropertyr8   r®   r°   r²   rv   rd   r   r   r¹   r¾   r&   rN   rÄ   Ú
IGNORECASErÆ   r�   rÉ   rÊ   rÎ   r   rB   rÙ   r)   rÞ   rá   rå   rç   rì   rî   rð   rF   Ú__classcell__)r�   s   @r*   r|   r|       s„  ø€ € € € € ØDÐDð
ð 
ð 
€Ið <@Ø)-Ø'+Ø,0Ø#'Ø.2ð<1ð <1àð<1ð ˜U 3¨Ð#6Ô7Ô8ð<1ð " #œð	<1ð
   ”}ð<1ð % SœMð<1ð !ð<1ð ˜  c Ô*Ô+ð<1ð 
ð<1ð <1ð <1ð <1ð <1ð <1ð| ð 
à˜˜S˜”>ð 
ð ð 
ð 
�&Ô	ð	 
ð  
ð  
ñ „[ð 
ðD ð
à˜S (¨3¤-Ð/Ô0ð
ð ð
ð ð	
ð
 
�&Ô	ð
ð 
ð 
ñ „[ð
ð4
8˜ð 
8ð 
8ð 
8ð 
8ð ˜#ð  ð  ð  ð  ð ð�Sð ð ð ñ „Xðð ð˜#ð ð ð ñ „Xðð ð%˜3ð %ð %ð %ñ „Xð%ð ð'˜ð 'ð 'ð 'ñ „Xð'ð ð'˜ð 'ð 'ð 'ñ „Xð'ð ð;�cð ;ð ;ð ;ñ „Xð;ðC˜%  S œ/ð Cð Cð Cð Cð ð"�Sð "ð "ð "ñ „Xð"ð ðJ cð Jð Jð Jñ „XðJð "�r”zÐ"4Ñ5Ô5Ðð "�r”zØ4°b´mñô Ðð˜x¨œ}ð ð ð ð ð$ !+ ¤
Ð+FÑ GÔ GÐàð x°¤}ð ð ð ñ „Xðð>˜x¨Ô/ð >ð >ð >ð >ð$A˜6ð Að Að Að Að ð7�h˜s”mð 7ð 7ð 7ñ „Xð7ð ð.˜8 Cœ=ð .ð .ð .ñ „Xð.ð ðO˜#ð Oð Oð Oñ „XðOð ð%˜ð %ð %ð %ñ „Xð%ð> ð >ð >ð >ð >ð ð+˜$ð +ð +ð +ñ „Xð+ð ð.˜ð .ð .ð .ñ „Xð.ð
 ð.˜4ð .ð .ð .ñ „Xð.ð ð"˜$ð "ð "ð "ñ „Xð"ðR h¨vÔ&6ð R¸4ð Rð Rð Rð Rð Rð Rð Rð Rr,   r|   c                   ó|   — e Zd ZU dZej        j        ed<   ee	e
e	         f         ed<   e	ed<   ee	e	f         ed<   dS )Ú_CleanResulta•  Convert link for equivalency check.

    This is used in the resolver to check whether two URL-specified requirements
    likely point to the same distribution and can be considered equivalent. This
    equivalency logic avoids comparing URLs literally, which can be too strict
    (e.g. "a=1&b=2" vs "b=2&a=1") and produce conflicts unexpecting to users.

    Currently this does three things:

    1. Drop the basic auth part. This is technically wrong since a server can
       serve different content based on auth, but if it does that, it is even
       impossible to guarantee two URLs without auth are equivalent, since
       the user can input different auth information when prompted. So the
       practical solution is to assume the auth doesn't affect the response.
    2. Parse the query to avoid the ordering issue. Note that ordering under the
       same key in the query are NOT cleaned; i.e. "a=1&a=2" and "a=2&a=1" are
       still considered different.
    3. Explicitly drop most of the fragment part, except ``subdirectory=`` and
       hash values, since it should have no impact the downloaded content. Note
       that this drops the "egg=" part historically used to denote the requested
       project (and extras), which is wrong in the strictest sense, but too many
       people are supplying it inconsistently to cause superfluous resolution
       conflicts, so we choose to also ignore them.
    Úparsedr¼   ÚsubdirectoryrC   N)rH   rI   rJ   rK   rY   rZ   ÚSplitResultrM   r   rL   r   rV   r,   r*   rù   rù   Ð  sh   € € € € € € ðð ð2 ŒLÔ$Ð$Ð$Ñ$Ø��T˜#”Y�ÔÐÐÑØÐÐÑØ��c�ŒNÐÐÑÐÐr,   rù   Úlinkc                 ó  ‡— | j         }|j                             dd¦  «        d         }|j        dk    r|sd}t          j                             |j        ¦  «        Šd‰v rt           	                    d| ¦  «         	 ‰d         d	         }n# t          t          f$ r d
}Y nw xY wˆfd„t          D ¦   «         }t          |                     |d
d
¬¦  «        t          j                             |j        ¦  «        ||¬¦  «        S )Nú@r¸   éÿÿÿÿrà   Ú	localhostÚeggzIgnoring egg= fragment in %srû   r   rg   c                 ó6   •— i | ]}|‰v ¯|‰|         d          “ŒS )r   rV   )r(   rÑ   r½   s     €r*   rÓ   z_clean_link.<locals>.<dictcomp>  s(   ø€ ÐLÐLÐL A¸aÀ8¸m¸mˆa�˜!”˜Q”¸m¸m¸mr,   )rv   r¼   r½   )rú   r¼   rû   rC   )r}   rv   Úrsplitr²   rY   rZ   Úparse_qsr½   ÚloggerÚdebugÚ
IndexErrorÚKeyErrorrQ   rù   rx   r¼   )rý   rú   rv   rû   rC   r½   s        @r*   Ú_clean_linkr
  ð  s  ø€ ØÔ€FØŒ]×!Ò! # qÑ)Ô)¨"Ô-€Fà„}˜ÒÐ vÐØˆÝŒ|×$Ò$ V¤_Ñ5Ô5€HØ�ÐÐÝ�ŠÐ3°TÑ:Ô:Ð:ðð   Ô/°Ô2ˆˆøÝ�Ð!ð ð ð Øˆˆˆðøøøð MÐLÐLÐLÕ):ÐLÑLÔL€FÝØ�Š f°BÀˆÑDÔDÝŒl×#Ò# F¤LÑ1Ô1Ø!Øð	ñ ô ð s   Á=B ÂB"Â!B"r6   Úlink1Úlink2c                 óB   — t          | ¦  «        t          |¦  «        k    S r%   )r
  )r  r  s     r*   Úlinks_equivalentr  
  s   € å�uÑÔ¥¨UÑ!3Ô!3Ò3Ð3r,   )9rS   rj   Úloggingrã   r«   r&   Úurllib.parserY   Údataclassesr   Útypingr   r   r   r   r   r	   r
   r   r   Úpip._internal.utils.deprecationr   Úpip._internal.utils.filetypesr   Úpip._internal.utils.hashesr   Úpip._internal.utils.miscr   r   r   r   Úpip._internal.utils.modelsr   Úpip._internal.utils.urlsr   r   Úpip._internal.index.collectorr   Ú	getLoggerrH   r  rQ   r    rL   r^   rc   rN   rö   rh   rU   rs   rz   r|   rù   r
  rT   r  rV   r,   r*   ú<module>r     sv  ðØ Ð Ð Ð Ø Ð Ð Ð Ø €€€Ø 	€	€	€	Ø Ð Ð Ð Ø 	€	€	€	Ø Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 7Ð 6Ð 6Ð 6Ð 6Ð 6Ø 9Ð 9Ð 9Ð 9Ð 9Ð 9Ø -Ð -Ð -Ð -Ð -Ð -ðð ð ð ð ð ð ð ð ð ð ð ð <Ð ;Ð ;Ð ;Ð ;Ð ;Ø =Ð =Ð =Ð =Ð =Ð =Ð =Ð =àð ;Ø:Ð:Ð:Ð:Ð:Ð:à	ˆÔ	˜8Ñ	$Ô	$€ð
 LÐ ð €�$ÐÑÔð2Hð 2Hð 2Hð 2Hð 2Hñ 2Hô 2Hñ Ôð2Hðj:˜sð : sð :ð :ð :ð :ð
J˜sð 
J sð 
Jð 
Jð 
Jð 
Jð  �R”Z 	¨2¬=Ñ9Ô9Ð ð"˜#ð "¨dð "°sð "ð "ð "ð "ð,?˜Cð ? Cð ?ð ?ð ?ð ?ðmRð mRð mRð mRð mRÐñ mRô mRð mRð`	ð ð ð ð �:ñ ô ð ð@�dð ˜|ð ð ð ð ð4 €Ô˜TÐ"Ñ"Ô"ð4˜Dð 4¨ð 4°$ð 4ð 4ð 4ñ #Ô"ð4ð 4ð 4r,   