+
    <j!                        ^ RI t ^ RIt^ RIt^ RIHt ^ RIHtHtHtH	t	H
t
Ht ^ RIHtHtHtHtHt ^ RIHt ^ RIHt ^ RIHtHt ^ RIHt ] P6                  ! ]4      t]],          t]],          t]].]],          3,          t ]].]!3,          t" ! R	 R
4      t#R R lt$ ! R R4      t% ! R R]#4      t& ! R R]#4      t' ! R R]#4      t( ! R R]#4      t)R R lt*R# )    N)defaultdict)CallableDictIterableListOptionalTuple)InvalidSdistFilenameInvalidWheelFilenamecanonicalize_nameparse_sdist_filenameparse_wheel_filename)InstallationCandidate)Link)path_to_urlurl_to_path)is_urlc                   `   a  ] tR t^t o ]V 3R lR l4       tV 3R lR ltV 3R lR ltRtV t	R# )	
LinkSourcec                0   < V ^8  d   QhRS[ S[,          /#    returnr   r   )format__classdict__s   "P/opt/headortail/venv/lib/python3.14/site-packages/pip/_internal/index/sources.py__annotate__LinkSource.__annotate__   s     $ $htn $    c                    \        4       h)z,Returns the underlying link, if there's one.NotImplementedErrorselfs   &r   linkLinkSource.link   s     "##r    c                    < V ^8  d   QhRS[ /# r   FoundCandidates)r   r   s   "r   r   r   "   s     $ $ $r    c                    \        4       h)z9Candidates found by parsing an archive listing HTML file.r"   r$   s   &r   page_candidatesLinkSource.page_candidates"       !##r    c                    < V ^8  d   QhRS[ /# r   
FoundLinks)r   r   s   "r   r   r   &   s     $ $J $r    c                    \        4       h)z,Links found by specifying archives directly.r"   r$   s   &r   
file_linksLinkSource.file_links&   r.   r     N)
__name__
__module____qualname____firstlineno__propertyr&   r,   r3   __static_attributes____classdictcell__r   s   @r   r   r      s+     $ $$ $$ $r    r   c                0    V ^8  d   QhR\         R\        /# )r   file_urlr   )strbool)r   s   "r   r   r   +   s     J JC JD Jr    c                 F    \         P                  ! V R R7      ^ ,          R8H  # )F)strictz	text/html)	mimetypes
guess_type)r?   s   &r   _is_html_filerF   +   s    7:kIIr    c                      a  ] tR t^/t o RtV 3R lR ltV 3R lR lt]V 3R lR l4       t]V 3R lR	 l4       t	R
t
V tR# )_FlatDirectoryToUrlsz"Scans directory and caches resultsc                $   < V ^8  d   QhRS[ RR/# )r   pathr   N)r@   )r   r   s   "r   r   !_FlatDirectoryToUrls.__annotate__2   s     ( (S (T (r    c                V    Wn         . V n        \        \        4      V n        R V n        R# )FN)_path_page_candidatesr   list_project_name_to_urls_scanned_directory)r%   rJ   s   &&r   __init___FlatDirectoryToUrls.__init__2   s$    
+-;Ft;L""'r    c                   < V ^8  d   QhRR/# )r   r   Nr5   )r   r   s   "r   r   rK   8   s     ' ' 'r    c                   \         P                  ! V P                  4       F  p\        VP                  4      p\        V4      '       d   V P                  P                  V4       KF   \        VP                  4      ^ ,          pT P                  T,          P                  T4       K  	  RV n        R#   \         d4     \        TP                  4      ^ ,          p LY  \         d      K  i ; ii ; i)zbScans directory once and populates both page_candidates
and project_name_to_urls at the same time
TN)osscandirrM   r   rJ   rF   rN   appendr   namer   r   r
   rP   rQ   )r%   entryurlproject_filenames   &   r   _scan_directory$_FlatDirectoryToUrls._scan_directory8   s     ZZ

+Eejj)CS!!%%,,S1#7

#CA#F  &&'78??D! ," #' ( ';EJJ'G'J$+ s*   (B33C1?CC-(C1,C--C1c                0   < V ^8  d   QhRS[ S[,          /# r   )r   r@   )r   r   s   "r   r   rK   P   s     % %c %r    c                ^    V P                   '       g   V P                  4        V P                  # N)rQ   r]   rN   r$   s   &r   r,   $_FlatDirectoryToUrls.page_candidatesO   s&    &&&  "$$$r    c                F   < V ^8  d   QhRS[ S[S[S[,          3,          /# r   )r   r@   r   )r   r   s   "r   r   rK   W   s!     * *d3S	>&: *r    c                ^    V P                   '       g   V P                  4        V P                  # ra   )rQ   r]   rP   r$   s   &r   project_name_to_urls)_FlatDirectoryToUrls.project_name_to_urlsV   s&    &&&  ")))r    )rN   rM   rP   rQ   N)r6   r7   r8   r9   __doc__rR   r]   r:   r,   re   r;   r<   r=   s   @r   rH   rH   /   sD     ,( (' '. % % * *r    rH   c                      a  ] tR t^^t o Rt/ tV 3R lR lt]V 3R lR l4       tV 3R lR lt	V 3R lR	 lt
V 3R
 ltRtV tR# )_FlatDirectorySourcezLink source specified by ``--find-links=<path-to-dir>``.

This looks the content of the directory, and returns:

* ``page_candidates``: Links listed on each HTML file in the directory.
* ``file_candidates``: Archives in the directory.
c                0   < V ^8  d   QhRS[ RS[RS[RR/# )r   candidates_from_pagerJ   project_namer   N)CandidatesFromPager@   )r   r   s   "r   r   !_FlatDirectorySource.__annotate__i   s3     ; ;0; ; 	;
 
;r    c                    Wn         \        V4      V n        W P                  9   d   V P                  V,          V n        R# \        VR 7      V n        V P                  V P                  V&   R# ))rJ   N)_candidates_from_pager   _project_name_paths_to_urls_path_to_urlsrH   )r%   rk   rJ   rl   s   &&&&r   rR   _FlatDirectorySource.__init__i   s[     &:".|< &&&!%!4!4T!:D!54!@D(,(:(:D%r    c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   rn   z   s      htn r    c                    R # ra   r5   r$   s   &r   r&   _FlatDirectorySource.linky   s    r    c                    < V ^8  d   QhRS[ /# r   r)   )r   r   s   "r   r   rn   }   s     = = =r    c              #     "   V P                   P                   F%  pV P                  \        V4      4       R j  xL
  K'  	  R #  L
5ira   )rs   r,   rp   r   r%   r[   s   & r   r,   $_FlatDirectorySource.page_candidates}   s6     %%55C11$s)<<< 6<s   7AAAc                    < V ^8  d   QhRS[ /# r   r0   )r   r   s   "r   r   rn      s      J r    c              #     "   V P                   P                  V P                  ,           F  p\        V4      x  K  	  R # 5ira   )rs   re   rq   r   rz   s   & r   r3   _FlatDirectorySource.file_links   s3     %%::4;M;MNNCs)O Os   >A c                <   < V ^8  d   Qh/ S[ S[S[3,          ;R&   # )r   rr   )r   r@   rH   )r   r   s   "r   r   rn   ^   s      2238 r    )rp   rs   rq   N)r6   r7   r8   r9   rg   rr   rR   r:   r&   r,   r3   __annotate_func__r;   r<   r=   s   @r   ri   ri   ^   sK      79N; ;   = = G  r    ri   c                   v   a  ] tR t^t o RtV 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	R
t
V tR# )_LocalFileSourcea/  ``--find-links=<path-or-url>`` or ``--[extra-]index-url=<path-or-url>``.

If a URL is supplied, it must be a ``file:`` URL. If a path is supplied to
the option, it is converted to a URL first. This returns:

* ``page_candidates``: Links listed on an HTML file.
* ``file_candidates``: The non-HTML file.
c                *   < V ^8  d   QhRS[ RS[RR/# r   rk   r&   r   Nrm   r   )r   r   s   "r   r   _LocalFileSource.__annotate__   )      0  
	r    c                    Wn         W n        R # ra   rp   _linkr%   rk   r&   s   &&&r   rR   _LocalFileSource.__init__       
 &:"
r    c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   r            htn r    c                    V P                   # ra   r   r$   s   &r   r&   _LocalFileSource.link       zzr    c                    < V ^8  d   QhRS[ /# r   r)   )r   r   s   "r   r   r           : : :r    c              #     "   \        V P                  P                  4      '       g   R # V P                  V P                  4       R j  xL
  R #  L5ira   )rF   r   r[   rp   r$   s   &r   r,    _LocalFileSource.page_candidates   s3     TZZ^^,,--djj999s   AAA	Ac                    < V ^8  d   QhRS[ /# r   r0   )r   r   s   "r   r   r      s      J r    c              #  x   "   \        V P                  P                  4      '       d   R # V P                  x  R # 5ira   )rF   r   r[   r$   s   &r   r3   _LocalFileSource.file_links   s%     ((jjs   8:r   Nr6   r7   r8   r9   rg   rR   r:   r&   r,   r3   r;   r<   r=   s   @r   r   r      s<        : :
 r    r   c                   v   a  ] tR t^t o RtV 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	R
t
V tR# )_RemoteFileSourcez``--find-links=<url>`` or ``--[extra-]index-url=<url>``.

This returns:

* ``page_candidates``: Links listed on an HTML file.
* ``file_candidates``: The non-HTML file.
c                0   < V ^8  d   QhRS[ RS[RS[RR/# )r   rk   page_validatorr&   r   N)rm   PageValidatorr   )r   r   s   "r   r   _RemoteFileSource.__annotate__   s3      0 & 	
 
r    c                *    Wn         W n        W0n        R # ra   )rp   _page_validatorr   )r%   rk   r   r&   s   &&&&r   rR   _RemoteFileSource.__init__   s     &:"-
r    c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   r      r   r    c                    V P                   # ra   r   r$   s   &r   r&   _RemoteFileSource.link   r   r    c                    < V ^8  d   QhRS[ /# r   r)   )r   r   s   "r   r   r      r   r    c              #     "   V P                  V P                  4      '       g   R # V P                  V P                  4       R j  xL
  R #  L5ira   )r   r   rp   r$   s   &r   r,   !_RemoteFileSource.page_candidates   s5     ##DJJ//--djj999s   AAAAc                    < V ^8  d   QhRS[ /# r   r0   )r   r   s   "r   r   r      s      J r    c              #  *   "   V P                   x  R # 5ira   r   r$   s   &r   r3   _RemoteFileSource.file_links   s     jjs   )rp   r   r   Nr   r=   s   @r   r   r      s<        : :
 r    r   c                   v   a  ] tR t^t o RtV 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	R
t
V tR# )_IndexDirectorySourcez``--[extra-]index-url=<path-to-directory>``.

This is treated like a remote URL; ``candidates_from_page`` contains logic
for this by appending ``index.html`` to the link.
c                *   < V ^8  d   QhRS[ RS[RR/# r   r   )r   r   s   "r   r   "_IndexDirectorySource.__annotate__   r   r    c                    Wn         W n        R # ra   r   r   s   &&&r   rR   _IndexDirectorySource.__init__   r   r    c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   r      r   r    c                    V P                   # ra   r   r$   s   &r   r&   _IndexDirectorySource.link   r   r    c                    < V ^8  d   QhRS[ /# r   r)   )r   r   s   "r   r   r      s     : : :r    c              #  X   "   V P                  V P                  4       R j  xL
  R #  L5ira   r   r$   s   &r   r,   %_IndexDirectorySource.page_candidates   s     --djj999s   *(*c                    < V ^8  d   QhRS[ /# r   r0   )r   r   s   "r   r   r      s      J r    c                    R# )Nr5   r5   r$   s   &r   r3    _IndexDirectorySource.file_links   s    	r    r   Nr   r=   s   @r   r   r      s<        : : r    r   c                    V ^8  d   QhR\         R\        R\        R\        R\        R\         R\        \
        \         ,          \
        \        ,          3,          /# )r   locationrk   r   
expand_dircache_link_parsingrl   r   )r@   rm   r   rA   r	   r   r   )r   s   "r   r   r      sc     ; ;; -; "	;
 ; ; ; 8C=(:../;r    c          	         R pR p\         P                  P                  V 4      '       d   \        V 4      pT pM8V P	                  R4      '       d   T p\        V 4      pM\        V 4      '       d   T pVf   Rp\        P                  W4       R# Vf   \        VV\        WtR7      R7      p	Wy3# \         P                  P                  V4      '       d4   V'       d   \        VVVR7      p	Wy3# \        V\        WtR7      R7      p	Wy3# \         P                  P                  V4      '       d   \        V\        WtR7      R7      p	Wy3# \        P                  RV 4       VR 3# )	Nzfile:zVLocation '%s' is ignored: it is either a non-existing path or lacks a specific scheme.)r   )rk   r   r&   )rk   rJ   rl   )rk   r&   z?Location '%s' is ignored: it is neither a file nor a directory.)NN)rV   rJ   existsr   
startswithr   r   loggerwarningr   r   isdirri   r   isfiler   )
r   rk   r   r   r   rl   rJ   r[   msgsources
   &$$$$$    r   build_sourcer      sO    DC	ww~~h(#			W	%	%8$			
{K 	 	s%|.!5)cA

 }	ww}}T)%9)F }	 +%9#EF }			!!5cA
 }
NNI ;r    )+loggingrD   rV   collectionsr   typingr   r   r   r   r   r	   pip._vendor.packaging.utilsr
   r   r   r   r   pip._internal.models.candidater   pip._internal.models.linkr   pip._internal.utils.urlsr   r   pip._internal.vcsr   	getLoggerr6   r   r*   r1   rm   rA   r   r   rF   rH   ri   r   r   r   r   r5   r    r   <module>r      s      	 # B B  A * = $			8	$01d^
tfh/D&EEF $&$ $J,* ,*^%: %Pz B
 @J 4;r    